summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--icons/CMakeLists.txt1
-rwxr-xr-xicons/banner.png (renamed from icons/__TODO/banner.png)bin142927 -> 142927 bytes
-rw-r--r--src/AboutDialog.cpp173
-rw-r--r--src/AboutDialog.h (renamed from src/__TODO/AboutDialog.h)22
-rwxr-xr-xsrc/AboutDialogBase.ui114
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--src/MainWindow.cpp38
-rw-r--r--src/MainWindow.h12
-rwxr-xr-xsrc/MainWindowBase.ui20
-rw-r--r--src/__TODO/AboutDialog.cpp169
-rwxr-xr-xsrc/__TODO/AboutDialog.ui87
-rwxr-xr-xsrc/__TODO/MainWindow.ui68
12 files changed, 332 insertions, 376 deletions
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
index 7d86613..90f4bf4 100644
--- a/icons/CMakeLists.txt
+++ b/icons/CMakeLists.txt
@@ -1,5 +1,6 @@
install(
FILES
+ banner.png
document-open.png
document-properties.png
document-save.png
diff --git a/icons/__TODO/banner.png b/icons/banner.png
index d0884d6..d0884d6 100755
--- a/icons/__TODO/banner.png
+++ b/icons/banner.png
Binary files differ
diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp
new file mode 100644
index 0000000..51a0653
--- /dev/null
+++ b/src/AboutDialog.cpp
@@ -0,0 +1,173 @@
+/***************************************************************************
+ * Copyright (C) 2006-2012 by Thomas Schweitzer *
+ * thomas-schweitzer(at)arcor.de *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License version 2.0 as *
+ * published by the Free Software Foundation. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program in the file LICENSE.GPL; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#include "config.h"
+#include "AboutDialog.h"
+
+//----#include "UiGuiVersion.h"
+
+//----#include <tqurl.h>
+//----#include <tqdesktopservices.h>
+//----#include <tqlocale.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqpixmap.h>
+#include <tqscrollbar.h>
+#include <tqtimer.h>
+
+/*!
+ \class AboutDialog
+ \brief Displays a dialog window with information about UniversalIndentGUI
+*/
+
+/*!
+ \brief The constructor calls the setup function for the ui created by uic and adds
+ the GPL text to the text edit.
+ */
+AboutDialog::AboutDialog(TQWidget *parent, WFlags flags) :
+ AboutDialogBase(parent, NULL, FALSE, flags), m_timer(NULL)
+{
+ // For icon setup
+ const TQString ICONS_PATH(APP_ICONS_PATH);
+
+ bannerLabel->setPixmap(TQPixmap(ICONS_PATH + "banner.png"));
+//---- _dialogForm->authorTextBrowser->setOpenExternalLinks(true);
+//---- _dialogForm->creditsTextBrowser->setOpenExternalLinks(true);
+//----
+//---- TQString versionString = _dialogForm->versionTextBrowser->toHtml();
+//---- versionString =
+//---- versionString.arg(PROGRAM_VERSION_STRING).arg(UiGuiVersion::getBuildRevision()).arg(
+//---- UiGuiVersion::getBuildDate());
+//---- _dialogForm->versionTextBrowser->setHtml(versionString);
+//----
+//---- _dialogForm->creditsTextBrowser->setHtml("<html><head></head><body>"
+//---- "<pre> </br></pre>"
+//---- "<h3 align='center'>Thanks go out to</h3>"
+//---- "<p align='center'><a href=\"http://www.csie.nctu.edu.tw/~chtai/\"><b>Nelson Tai</b></a> for Chinese translation, good ideas and always fast answers.</p></br>"
+//---- "<p align='center'><a href=\"http://www.hartwork.org/\"><b>Sebastian Pipping</b></a> for helping me bring UiGUI into the Debian repository and other good ideas.</p></br>"
+//---- "<p align='center'><a href=\"http://korytskyy.lviv.ua/\"><b>Oleksandr</b></a> for Ukrainian and Russian translation.</p></br>"
+//---- "<p align='center'><b>Erwan &quot;leg&quot;</b> for French translation and the icon logo.</p></br>"
+//---- "<p align='center'>The <a href=\"http://www.scintilla.org/\"><b>Scintilla</b></a> project for their great text editing component.</p></br>"
+//---- "<p align='center'><a href=\"http://www.riverbankcomputing.co.uk/software/qscintilla/\"><b>Riverbank</b></a> for their Scintilla TQt wrapper TQScintilla.</p></br>"
+//---- "<p align='center'>The <a href=\"http://astyle.sourceforge.net/\"><b>Artistic Style</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://invisible-island.net/bcpp/\"><b>BCPP</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://www.siber.com/sct/tools/cbl-beau.html\"><b>Cobol Beautifier</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://csstidy.sourceforge.net/\"><b>CSSTidy</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"ftp://ftp.ifremer.fr/ifremer/ditigo/fortran90/\"><b>Fortran 90 PPR</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://www.gnu.org/software/indent/\"><b>GNU Indent</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://sourceforge.net/projects/gcgreatcode/\"><b>GreatCode</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://linux.com.hk/penguin/man/1/hindent.html\"><b>hindent</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://www.digital-mines.com/htb/\"><b>HTB</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://tidy.sourceforge.net/\"><b>HTML Tidy</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://code.gosu.pl/\"><b>JsDecoder</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://jsppp.sourceforge.net/\"><b>JSPPP</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://perltidy.sourceforge.net/\"><b>Perltidy</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://beautifyphp.sourceforge.net/\"><b>PHP_Beautifier</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://www.waterproof.fr/products/phpCodeBeautifier/\"><b>phpCB</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://sourceforge.net/projects/phpstylist/\"><b>PHP Stylist</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://coverage.livinglogic.de/Tools/scripts/pindent.py.html\"><b>pindent</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://psti.etquinoxbase.com/\"><b>Pl/Sql tidy</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://www.arachnoid.com/ruby/rubyBeautifier.html\"><b>Ruby Beautifier</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://raa.ruby-lang.org/project/ruby_formatter/\"><b>Ruby Formatter</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://www.bolthole.com/AWK.html\"><b>Shell Indent</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://uncrustify.sourceforge.net/\"><b>Uncrustify</b></a> project, specially <b>Ben Gardner</b>.</p></br>"
+//---- "<p align='center'>The <a href=\"http://www.daansystems.com/vbsbeaut/\"><b>VBSBeautifier</b></a> project.</p></br>"
+//---- "<p align='center'>The <a href=\"http://xmlindent.sourceforge.net/\"><b>XML Indent</b></a> project.</p></br>"
+//---- "<p align='center'><b>Nirvash</b> for the initial Japanese translation.</p></br>"
+//---- "<p align='center'>The <a href=\"http://tango.freedesktop.org/Tango_Desktop_Project/\"><b>Tango Project</b></a> for their icons.</p></br>"
+//---- "<p align='center'><a href=\"http://www.famfamfam.com/\"><b>famfamfam</b></a> for the flag icons.</p></br>"
+//---- "<p align='center'><a href=\"http://trolltech.com/\"><b>Trolltech</b></a> for their really great GUI framework <img src=\":/aboutDialog/qt_logo.png\"/>.</p></br>"
+//---- "<h3 align='center'>My girlfriend (meanwhile also wife) for putting my head right and not sit all the time in front of my computer ;-)</h3>"
+//---- "</body></html>");
+//----
+ m_scrollDirection = 1;
+ m_scrollSpeed = 100;
+ m_timer = new TQTimer(this);
+
+ connect(m_timer, SIGNAL(timeout()), this, SLOT(scroll()));
+ connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
+}
+
+/*!
+ \brief Catches language change events and retranslates all needed widgets.
+ */
+void AboutDialog::changeEvent(TQEvent *event)
+{
+//---- if (event->type() == TQEvent::LanguageChange)
+//---- {
+//---- _dialogForm->retranslateUi(this);
+//----
+//---- TQString versionString = _dialogForm->versionTextBrowser->toHtml();
+//---- versionString =
+//---- versionString.arg(PROGRAM_VERSION_STRING).arg(UiGuiVersion::getBuildRevision()).arg(
+//---- UiGuiVersion::getBuildDate());
+//---- _dialogForm->versionTextBrowser->setHtml(versionString);
+//---- }
+//---- else
+//---- {
+//---- TQWidget::changeEvent(event);
+//---- }
+}
+
+/*!
+ \brief Reimplements the dialog execution function to init the credits scroller.
+ */
+void AboutDialog::show()
+{
+//---- //creditsTextBrowser->verticalScrollBar()->setValue(0);
+ m_timer->start(m_scrollSpeed);
+ AboutDialogBase::show();
+}
+
+/*!
+ \brief This slot is called each m_timer timeout to scroll the credits textbrowser.
+ Also changes the scroll direction and speed when reaching the start or end.
+ */
+void AboutDialog::scroll()
+{
+//---- TQScrollBar *scrollBar = _dialogForm->creditsTextBrowser->verticalScrollBar();
+//---- scrollBar->setValue(scrollBar->value() + m_scrollDirection);
+//----
+//---- if (scrollBar->value() == scrollBar->maximum())
+//---- {
+//---- // Toggle scroll direction and change scroll speed;
+//---- m_scrollDirection = -1;
+//---- m_scrollSpeed = 5;
+//---- m_timer->stop();
+//---- m_timer->start(m_scrollSpeed);
+//---- }
+//---- else if (scrollBar->value() == scrollBar->minimum())
+//---- {
+//---- // Toggle scroll direction and change scroll speed;
+//---- m_scrollDirection = 1;
+//---- m_scrollSpeed = 100;
+//---- m_timer->stop();
+//---- m_timer->start(m_scrollSpeed);
+//---- }
+//----
+//---- _dialogForm->creditsTextBrowser->update();
+}
+
+void AboutDialog::accept()
+{
+ m_timer->stop();
+ TQDialog::accept();
+}
+
+#include "AboutDialog.moc"
diff --git a/src/__TODO/AboutDialog.h b/src/AboutDialog.h
index c849f7b..2447b08 100644
--- a/src/__TODO/AboutDialog.h
+++ b/src/AboutDialog.h
@@ -20,35 +20,31 @@
#ifndef ABOUTDIALOG_H
#define ABOUTDIALOG_H
-#include <tntqdialog.h>
-
-namespace Ui
-{
- class AboutDialog;
-}
+#include <AboutDialogBase.h>
-class AboutDialog : public TQDialog
+class AboutDialog : public AboutDialogBase
{
Q_OBJECT
public:
- AboutDialog(TQWidget *parent = NULL, TQt::WindowFlags flags = 0);
+ AboutDialog(TQWidget *parent = NULL, WFlags flags = 0);
public slots:
- int exec();
void show();
+ protected slots:
+ void accept();
+
private slots:
void scroll();
private:
void changeEvent(TQEvent *event);
- Ui::AboutDialog *_dialogForm;
- int _scrollDirection;
- int _scrollSpeed;
- TQTimer *_timer;
+ int m_scrollDirection;
+ int m_scrollSpeed;
+ TQTimer *m_timer;
};
#endif // ABOUTDIALOG_H
diff --git a/src/AboutDialogBase.ui b/src/AboutDialogBase.ui
new file mode 100755
index 0000000..8bc3dab
--- /dev/null
+++ b/src/AboutDialogBase.ui
@@ -0,0 +1,114 @@
+<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
+ <class>AboutDialogBase</class>
+ <widget class="TQDialog">
+ <property name="name">
+ <cstring>AboutDialogBase</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>588</width>
+ <height>512</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>588</width>
+ <height>333</height>
+ </size>
+ </property>
+ <property name="caption">
+ <string>About UniversalIndentGUI</string>
+ </property>
+ <vbox>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <widget class="TQFrame">
+ <property name="name">
+ <cstring>frame</cstring>
+ </property>
+ <property name="frameShape">
+ <enum>StyledPanel</enum>
+ </property>
+ <vbox>
+ <widget class="TQLabel">
+ <property name="name">
+ <cstring>bannerLabel</cstring>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy>
+ <hsizetype>0</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>570</width>
+ <height>87</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>570</width>
+ <height>87</height>
+ </size>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <hbox>
+ <spacer>
+ <property name="name">
+ <cstring>spacer1</cstring>
+ </property>
+ <property name="orientation">
+ <enum>TQt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="TQPushButton">
+ <property name="name">
+ <cstring>okButton</cstring>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ <spacer>
+ <property name="name">
+ <cstring>spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>TQt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </hbox>
+ </vbox>
+ </widget>
+ </vbox>
+ </widget>
+</UI>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 19c34a8..56768b9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -26,8 +26,8 @@ link_directories(
set( target universal-indent-gui-tqt )
set( ${target}_SRCS
- MainWindowBase.ui ToolBarWidget.ui MainWindow.cpp main.cpp
- UiGuiVersion.cpp
+ AboutDialogBase.ui MainWindowBase.ui ToolBarWidget.ui
+ AboutDialog.cpp MainWindow.cpp main.cpp UiGuiVersion.cpp
)
tde_add_executable( ${target} AUTOMOC
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 2d730ac..2d4c242 100644
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -25,7 +25,7 @@
///-- #include "SettingsPaths.h"
///--
#include "ToolBarWidget.h"
-///-- #include "AboutDialog.h"
+#include "AboutDialog.h"
///-- #include "AboutDialogGraphicsView.h"
///-- #include "UiGuiSettings.h"
///-- #include "UiGuiSettingsDialog.h"
@@ -79,9 +79,9 @@
\brief Constructs the main window.
*/
MainWindow::MainWindow(TQString file2OpenOnStart, TQWidget *parent) :
- MainWindowBase(parent)
-///- , _mainWindowForm(NULL), _qSciSourceCodeEditor(NULL), _settings(NULL),
-///- _highlighter(NULL), _textEditVScrollBar(NULL), _aboutDialog(NULL), _aboutDialogGraphicsView(
+ MainWindowBase(parent), m_aboutDialog(NULL)
+///- _mainWindowForm(NULL), _qSciSourceCodeEditor(NULL), _settings(NULL),
+///- _highlighter(NULL), _textEditVScrollBar(NULL), _aboutDialogGraphicsView(
///- NULL), _settingsDialog(NULL), _encodingActionGroup(NULL), _saveEncodedActionGroup(NULL),
///- _highlighterActionGroup(NULL), _uiGuiTranslator(NULL), _qTTranslator(NULL), _toolBarWidget(
///- NULL), _indentHandler(NULL), _textEditLineColumnInfoLabel(NULL)
@@ -116,9 +116,10 @@ MainWindow::MainWindow(TQString file2OpenOnStart, TQWidget *parent) :
///-- createHighlighterMenu();
///--
///--
-///-- // Generate about dialog box
-///-- _aboutDialog = new AboutDialog(this, TQt::SplashScreen);
-///-- _aboutDialogGraphicsView = new AboutDialogGraphicsView(_aboutDialog, this);
+ // Generate about dialog box
+ //m_aboutDialog = new AboutDialog(this, WStyle_Splash);
+ m_aboutDialog = new AboutDialog(this);
+///-- _aboutDialogGraphicsView = new AboutDialogGraphicsView(m_aboutDialog, this);
connect(actionAboutUniversalIndentGUITQt, SIGNAL(activated()), this, SLOT(showAboutDialog()));
///--
///-- // Generate settings dialog box
@@ -144,13 +145,19 @@ MainWindow::MainWindow(TQString file2OpenOnStart, TQWidget *parent) :
///-- setAcceptDrops(true);
}
+MainWindow::~MainWindow()
+{
+ delete m_aboutDialog;
+ ///-- _settings.clear();
+}
+
///-- /*!
///-- \brief Initializes the main window by creating the main gui and make some _settings.
///-- */
void MainWindow::initMainWindow()
{
// For icon setup
- TQString ICONS_PATH(APP_ICONS_PATH);
+ const TQString ICONS_PATH(APP_ICONS_PATH);
// Application icon
setIcon(TQPixmap(ICONS_PATH + "universalIndentGUI_64x64.png"));
// Menu icons
@@ -245,7 +252,7 @@ void MainWindow::initMainWindow()
void MainWindow::initToolBar()
{
// For icon setup
- TQString ICONS_PATH(APP_ICONS_PATH);
+ const TQString ICONS_PATH(APP_ICONS_PATH);
// Create the tool bar and add it to the main window.
m_toolBarWidget = new ToolBarWidget(toolBar);
@@ -268,7 +275,7 @@ void MainWindow::initToolBar()
//m_toolBarWidget->cbLivePreview->setPixmap(TQPixmap(ICONS_PATH + "live-preview.png"));
connect(m_toolBarWidget->cbLivePreview, SIGNAL(toggled(bool)), this, SLOT(previewTurnedOnOff(bool)));
connect(m_toolBarWidget->cbLivePreview, SIGNAL(toggled(bool)),
- actionLiveIndentPreview, SLOT(setChecked(bool)));
+ actionLiveIndentPreview, SLOT(setOn(bool)));
///-- connect(actionLiveIndentPreview, SIGNAL(toggled(
///-- bool)), m_toolBarWidget->cbLivePreview, SLOT(setChecked(bool)));
}
@@ -1605,11 +1612,12 @@ void MainWindow::openFileFromRecentlyOpenedList(int recentlyOpenedActionId)
*/
void MainWindow::showAboutDialog()
{
-///-- //TQPixmap originalPixmap = TQPixmap::grabWindow(TQApplication::desktop()->screen()->winId());
-///-- //tqDebug("in main pixmap width %d, numScreens = %d", originalPixmap.size().width(),
-///-- // TQApplication::desktop()->availableGeometry().width());
-///-- //_aboutDialogGraphicsView->setScreenshotPixmap( originalPixmap );
-///-- _aboutDialogGraphicsView->show();
+ //TQPixmap originalPixmap = TQPixmap::grabWindow(TQApplication::desktop()->screen()->winId());
+ //tqDebug("in main pixmap width %d, numScreens = %d", originalPixmap.size().width(),
+ // TQApplication::desktop()->availableGeometry().width());
+ //_aboutDialogGraphicsView->setScreenshotPixmap( originalPixmap );
+ //----_aboutDialogGraphicsView->show();
+ m_aboutDialog->show();
}
///-- /*!
diff --git a/src/MainWindow.h b/src/MainWindow.h
index 103b26c..cb4f7c1 100644
--- a/src/MainWindow.h
+++ b/src/MainWindow.h
@@ -21,12 +21,12 @@
#define MAINWINDOW_H
#include "MainWindowBase.h"
-#include "ntqobjectdefs.h"
+#include "tqobjdefs.h"
/// #include "UiGuiSettings.h"
///
/// class UiGuiSettingsDialog;
-/// class AboutDialog;
+class AboutDialog;
/// class AboutDialogGraphicsView;
/// class UiGuiHighlighter;
/// class IndentHandler
@@ -47,11 +47,7 @@ class MainWindow : public MainWindowBase
public:
//! Constructor
MainWindow(TQString file2OpenOnStart = "", TQWidget *parent = NULL);
-
- ~MainWindow()
- {
-///-- _settings.clear();
- }
+ ~MainWindow();
///-- protected:
///-- void closeEvent(TQCloseEvent *event);
@@ -109,7 +105,7 @@ class MainWindow : public MainWindowBase
///-- TQString _sourceViewContent;
///-- UiGuiHighlighter *_highlighter;
///-- TQScrollBar *_textEditVScrollBar;
-///-- AboutDialog *_aboutDialog;
+ AboutDialog *m_aboutDialog;
///-- AboutDialogGraphicsView *_aboutDialogGraphicsView;
///-- UiGuiSettingsDialog *_settingsDialog;
int _actionClearRecentlyOpenedListId;
diff --git a/src/MainWindowBase.ui b/src/MainWindowBase.ui
index c5e124f..9d478b4 100755
--- a/src/MainWindowBase.ui
+++ b/src/MainWindowBase.ui
@@ -196,7 +196,7 @@
<string>Export</string>
</property>
<property name="statusTip">
- <string>Export the currently visible source</string>
+ <string>Export the currently visible source.</string>
</property>
</action>
<action>
@@ -207,7 +207,7 @@
<string>HTML</string>
</property>
<property name="statusTip">
- <string>Export the currently visible source code as HTML document</string>
+ <string>Export the currently visible source code as HTML document.</string>
</property>
</action>
<action>
@@ -218,7 +218,7 @@
<string>PDF</string>
</property>
<property name="statusTip">
- <string>Export the currently visible source code as PDF document</string>
+ <string>Export the currently visible source code as PDF document.</string>
</property>
</action>
<action>
@@ -300,7 +300,7 @@
<string>Set Syntax Highlighter</string>
</property>
<property name="statusTip">
- <string>Set the syntax highlighter to use</string>
+ <string>Set the syntax highlighter to use.</string>
</property>
</action>
<action>
@@ -337,7 +337,7 @@
<string>Auto open last source file on startup</string>
</property>
<property name="statusTip">
- <string>If selected opens last source code file on startup</string>
+ <string>If selected opens last source code file on startup.</string>
</property>
<property name="visible">
<bool>false</bool>
@@ -389,16 +389,6 @@
<signal>activated()</signal>
<receiver>MainWindowBase</receiver>
<slot>close()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>-1</x>
- <y>-1</y>
- </hint>
- <hint type="destinationlabel">
- <x>399</x>
- <y>299</y>
- </hint>
- </hints>
</connection>
</connections>
</UI>
diff --git a/src/__TODO/AboutDialog.cpp b/src/__TODO/AboutDialog.cpp
deleted file mode 100644
index 3cbdf4f..0000000
--- a/src/__TODO/AboutDialog.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2006-2012 by Thomas Schweitzer *
- * thomas-schweitzer(at)arcor.de *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License version 2.0 as *
- * published by the Free Software Foundation. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program in the file LICENSE.GPL; if not, write to the *
- * Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
- ***************************************************************************/
-
-#include "AboutDialog.h"
-#include "ui_AboutDialog.h"
-
-#include "UiGuiVersion.h"
-
-#include <tntqurl.h>
-#include <tqdesktopservices.h>
-#include <tntqscrollbar.h>
-#include <tntqtimer.h>
-#include <tntqlocale.h>
-
-/*!
- \class AboutDialog
- \brief Displays a dialog window with information about UniversalIndentGUI
-*/
-
-/*!
- \brief The constructor calls the setup function for the ui created by uic and adds
- the GPL text to the text edit.
- */
-AboutDialog::AboutDialog(TQWidget *parent, TQt::WindowFlags flags) :
- TQDialog(parent, flags), _dialogForm(NULL), _timer(NULL)
-{
- _dialogForm = new Ui::AboutDialog();
- _dialogForm->setupUi(this);
-
- _dialogForm->authorTextBrowser->setOpenExternalLinks(true);
- _dialogForm->creditsTextBrowser->setOpenExternalLinks(true);
-
- TQString versionString = _dialogForm->versionTextBrowser->toHtml();
- versionString =
- versionString.arg(PROGRAM_VERSION_STRING).arg(UiGuiVersion::getBuildRevision()).arg(
- UiGuiVersion::getBuildDate());
- _dialogForm->versionTextBrowser->setHtml(versionString);
-
- _dialogForm->creditsTextBrowser->setHtml("<html><head></head><body>"
- "<pre> </br></pre>"
- "<h3 align='center'>Thanks go out to</h3>"
- "<p align='center'><a href=\"http://www.csie.nctu.edu.tw/~chtai/\"><b>Nelson Tai</b></a> for Chinese translation, good ideas and always fast answers.</p></br>"
- "<p align='center'><a href=\"http://www.hartwork.org/\"><b>Sebastian Pipping</b></a> for helping me bring UiGUI into the Debian repository and other good ideas.</p></br>"
- "<p align='center'><a href=\"http://korytskyy.lviv.ua/\"><b>Oleksandr</b></a> for Ukrainian and Russian translation.</p></br>"
- "<p align='center'><b>Erwan &quot;leg&quot;</b> for French translation and the icon logo.</p></br>"
- "<p align='center'>The <a href=\"http://www.scintilla.org/\"><b>Scintilla</b></a> project for their great text editing component.</p></br>"
- "<p align='center'><a href=\"http://www.riverbankcomputing.co.uk/software/qscintilla/\"><b>Riverbank</b></a> for their Scintilla TQt wrapper TQScintilla.</p></br>"
- "<p align='center'>The <a href=\"http://astyle.sourceforge.net/\"><b>Artistic Style</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://invisible-island.net/bcpp/\"><b>BCPP</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://www.siber.com/sct/tools/cbl-beau.html\"><b>Cobol Beautifier</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://csstidy.sourceforge.net/\"><b>CSSTidy</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"ftp://ftp.ifremer.fr/ifremer/ditigo/fortran90/\"><b>Fortran 90 PPR</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://www.gnu.org/software/indent/\"><b>GNU Indent</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://sourceforge.net/projects/gcgreatcode/\"><b>GreatCode</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://linux.com.hk/penguin/man/1/hindent.html\"><b>hindent</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://www.digital-mines.com/htb/\"><b>HTB</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://tidy.sourceforge.net/\"><b>HTML Tidy</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://code.gosu.pl/\"><b>JsDecoder</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://jsppp.sourceforge.net/\"><b>JSPPP</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://perltidy.sourceforge.net/\"><b>Perltidy</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://beautifyphp.sourceforge.net/\"><b>PHP_Beautifier</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://www.waterproof.fr/products/phpCodeBeautifier/\"><b>phpCB</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://sourceforge.net/projects/phpstylist/\"><b>PHP Stylist</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://coverage.livinglogic.de/Tools/scripts/pindent.py.html\"><b>pindent</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://psti.etquinoxbase.com/\"><b>Pl/Sql tidy</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://www.arachnoid.com/ruby/rubyBeautifier.html\"><b>Ruby Beautifier</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://raa.ruby-lang.org/project/ruby_formatter/\"><b>Ruby Formatter</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://www.bolthole.com/AWK.html\"><b>Shell Indent</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://uncrustify.sourceforge.net/\"><b>Uncrustify</b></a> project, specially <b>Ben Gardner</b>.</p></br>"
- "<p align='center'>The <a href=\"http://www.daansystems.com/vbsbeaut/\"><b>VBSBeautifier</b></a> project.</p></br>"
- "<p align='center'>The <a href=\"http://xmlindent.sourceforge.net/\"><b>XML Indent</b></a> project.</p></br>"
- "<p align='center'><b>Nirvash</b> for the initial Japanese translation.</p></br>"
- "<p align='center'>The <a href=\"http://tango.freedesktop.org/Tango_Desktop_Project/\"><b>Tango Project</b></a> for their icons.</p></br>"
- "<p align='center'><a href=\"http://www.famfamfam.com/\"><b>famfamfam</b></a> for the flag icons.</p></br>"
- "<p align='center'><a href=\"http://trolltech.com/\"><b>Trolltech</b></a> for their really great GUI framework <img src=\":/aboutDialog/qt_logo.png\"/>.</p></br>"
- "<h3 align='center'>My girlfriend (meanwhile also wife) for putting my head right and not sit all the time in front of my computer ;-)</h3>"
- "</body></html>");
-
- _scrollDirection = 1;
- _scrollSpeed = 100;
- _timer = new TQTimer(this);
- connect(_timer, SIGNAL(timeout()), this, SLOT(scroll()));
- connect(this, SIGNAL(accepted()), _timer, SLOT(stop()));
-}
-
-/*!
- \brief Catches language change events and retranslates all needed widgets.
- */
-void AboutDialog::changeEvent(TQEvent *event)
-{
- if (event->type() == TQEvent::LanguageChange)
- {
- _dialogForm->retranslateUi(this);
-
- TQString versionString = _dialogForm->versionTextBrowser->toHtml();
- versionString =
- versionString.arg(PROGRAM_VERSION_STRING).arg(UiGuiVersion::getBuildRevision()).arg(
- UiGuiVersion::getBuildDate());
- _dialogForm->versionTextBrowser->setHtml(versionString);
- }
- else
- {
- TQWidget::changeEvent(event);
- }
-}
-
-/*!
- \brief Reimplements the dialog execution function to init the credits scroller.
- */
-int AboutDialog::exec()
-{
- //creditsTextBrowser->verticalScrollBar()->setValue(0);
- _timer->start(_scrollSpeed);
- return TQDialog::exec();
-}
-
-/*!
- \brief This slot is called each _timer timeout to scroll the credits textbrowser.
- Also changes the scroll direction and speed when reaching the start or end.
- */
-void AboutDialog::scroll()
-{
- TQScrollBar *scrollBar = _dialogForm->creditsTextBrowser->verticalScrollBar();
- scrollBar->setValue(scrollBar->value() + _scrollDirection);
-
- if (scrollBar->value() == scrollBar->maximum())
- {
- // Toggle scroll direction and change scroll speed;
- _scrollDirection = -1;
- _scrollSpeed = 5;
- _timer->stop();
- _timer->start(_scrollSpeed);
- }
- else if (scrollBar->value() == scrollBar->minimum())
- {
- // Toggle scroll direction and change scroll speed;
- _scrollDirection = 1;
- _scrollSpeed = 100;
- _timer->stop();
- _timer->start(_scrollSpeed);
- }
-
- _dialogForm->creditsTextBrowser->update();
-}
-
-/*!
- \brief Shows the about dialog and also starts the credits scroller.
- */
-void AboutDialog::show()
-{
- _timer->start(_scrollSpeed);
- TQDialog::show();
-}
diff --git a/src/__TODO/AboutDialog.ui b/src/__TODO/AboutDialog.ui
index dbc2b8c..3415427 100755
--- a/src/__TODO/AboutDialog.ui
+++ b/src/__TODO/AboutDialog.ui
@@ -2,69 +2,19 @@
<ui version="4.0">
<class>AboutDialog</class>
<widget class="TQDialog" name="AboutDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>588</width>
- <height>512</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>588</width>
- <height>333</height>
- </size>
- </property>
- <property name="windowTitle">
- <string>About UniversalIndentGUI</string>
- </property>
<property name="windowIcon">
<iconset resource="../resources/Icons.qrc">
<normaloff>:/mainWindow/info.png</normaloff>:/mainWindow/info.png</iconset>
</property>
<layout class="TQVBoxLayout">
- <property name="margin">
- <number>0</number>
- </property>
<item>
<widget class="TQFrame" name="frame">
<property name="styleSheet">
<string notr="true">TQFrame#frame { background-color: qlineargradient( x1:0, y1:0, x2:0, y2:1, stop:0 #FFFF60, stop:0.5 #D8C304, stop:1 #FFFF60 ); border: 2px solid #A89C57; border-radius: 4px;}</string>
</property>
- <property name="frameShape">
- <enum>TQFrame::StyledPanel</enum>
- </property>
<layout class="TQVBoxLayout">
<item>
<widget class="TQLabel" name="bannerLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>570</width>
- <height>87</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>570</width>
- <height>87</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
<property name="pixmap">
<pixmap resource="../resources/Icons.qrc">:/aboutDialog/banner.png</pixmap>
</property>
@@ -166,27 +116,8 @@ p, li { white-space: pre-wrap; }
</item>
<item>
<widget class="TQPushButton" name="okButton">
- <property name="styleSheet">
- <string notr="true">TQPushButton#okButton { background-color: qlineargradient( x1:0, y1:0, x2:0, y2:1, stop:0 #DCB28A, stop:0.5 #B8784B, stop:1 #DCB28A ); border: 2px solid #A89C57; border-radius: 4px;} TQPushButton:hover#okButton { background-color: qlineargradient( x1:0, y1:0, x2:0, y2:1, stop:0 #B8784B, stop:0.5 #DCB28A, stop:1 #B8784B ); } TQPushButton:pressed#okButton{ border: 2px solid #D8CB75 }</string>
- </property>
- <property name="text">
- <string> OK </string>
- </property>
</widget>
</item>
- <item>
- <spacer>
- <property name="orientation">
- <enum>TQt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</item>
</layout>
@@ -197,22 +128,4 @@ p, li { white-space: pre-wrap; }
<resources>
<include location="../resources/Icons.qrc"/>
</resources>
- <connections>
- <connection>
- <sender>okButton</sender>
- <signal>clicked()</signal>
- <receiver>AboutDialog</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>278</x>
- <y>253</y>
- </hint>
- <hint type="destinationlabel">
- <x>96</x>
- <y>254</y>
- </hint>
- </hints>
- </connection>
- </connections>
</ui>
diff --git a/src/__TODO/MainWindow.ui b/src/__TODO/MainWindow.ui
index 9ac95b1..73200d1 100755
--- a/src/__TODO/MainWindow.ui
+++ b/src/__TODO/MainWindow.ui
@@ -5,26 +5,7 @@
<property name="name">
<cstring>MainWindowUi</cstring>
</property>
- <widget class="TQWidget" name="centralwidget">
- <layout class="TQHBoxLayout">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <item>
- <layout class="TQHBoxLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="margin">
- <number>2</number>
- </property>
- </layout>
- </item>
- </layout>
- </widget>
+ <widget class="TQWidget" name="centralwidget"/>
<widget class="TQStatusBar" name="statusbar"/>
<widget class="TQDockWidget" name="dockWidget">
<property name="sizePolicy">
@@ -66,52 +47,5 @@
</layout>
</widget>
</widget>
- <widget class="TQToolBar" name="toolBar">
- <property name="contextMenuPolicy">
- <enum>TQt::PreventContextMenu</enum>
- </property>
- <property name="windowTitle">
- <string>Main Toolbar</string>
- </property>
- <property name="orientation">
- <enum>TQt::Horizontal</enum>
- </property>
- <property name="iconSize">
- <size>
- <width>16</width>
- <height>16</height>
- </size>
- </property>
- <property name="toolButtonStyle">
- <enum>TQt::ToolButtonTextBesideIcon</enum>
- </property>
- <attribute name="toolBarArea">
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak">
- <bool>false</bool>
- </attribute>
- </widget>
</widget>
- <resources>
- <include location="../resources/Icons.qrc"/>
- </resources>
- <connections>
- <connection>
- <sender>actionExit</sender>
- <signal>triggered()</signal>
- <receiver>MainWindowUi</receiver>
- <slot>close()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>-1</x>
- <y>-1</y>
- </hint>
- <hint type="destinationlabel">
- <x>399</x>
- <y>299</y>
- </hint>
- </hints>
- </connection>
- </connections>
</UI>