summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2022-07-16 15:44:05 +0900
committerMichele Calgaro <[email protected]>2022-07-16 15:44:05 +0900
commita30a266067d9d952edc91305bef757557c03717e (patch)
tree7bcabd84594f751001c66b16f3c42a8d459b7773
parentd017bd37253ae35b29d82e3277b9adcbb4517dd0 (diff)
downloaduniversal-indent-gui-tqt-a30a266067d9d952edc91305bef757557c03717e.tar.gz
universal-indent-gui-tqt-a30a266067d9d952edc91305bef757557c03717e.zip
Raw Qt->TQt conversion using tde/scripts/conversions/qt3-tqt3/convert_existing_qt3_app_to_tqt3.
Signed-off-by: Michele Calgaro <[email protected]>
-rwxr-xr-xreadme.html40
-rwxr-xr-xsrc/AboutDialog.cpp32
-rwxr-xr-xsrc/AboutDialog.h10
-rwxr-xr-xsrc/AboutDialog.ui48
-rwxr-xr-xsrc/AboutDialogGraphicsView.cpp84
-rwxr-xr-xsrc/AboutDialogGraphicsView.h16
-rwxr-xr-xsrc/FindDialog.ui30
-rwxr-xr-xsrc/IndentHandler.cpp546
-rwxr-xr-xsrc/IndentHandler.h178
-rwxr-xr-xsrc/MainWindow.cpp384
-rwxr-xr-xsrc/MainWindow.h70
-rwxr-xr-xsrc/MainWindow.ui50
-rwxr-xr-xsrc/SettingsPaths.cpp80
-rwxr-xr-xsrc/SettingsPaths.h22
-rwxr-xr-xsrc/TemplateBatchScript.cpp4
-rwxr-xr-xsrc/ToolBarWidget.ui16
-rwxr-xr-xsrc/UiGuiErrorMessage.cpp18
-rwxr-xr-xsrc/UiGuiErrorMessage.h16
-rwxr-xr-xsrc/UiGuiHighlighter.cpp166
-rwxr-xr-xsrc/UiGuiHighlighter.h34
-rwxr-xr-xsrc/UiGuiIndentServer.cpp40
-rwxr-xr-xsrc/UiGuiIndentServer.h18
-rwxr-xr-xsrc/UiGuiIniFileParser.cpp38
-rwxr-xr-xsrc/UiGuiIniFileParser.h20
-rwxr-xr-xsrc/UiGuiSettings.cpp440
-rwxr-xr-xsrc/UiGuiSettings.h54
-rwxr-xr-xsrc/UiGuiSettingsDialog.cpp32
-rwxr-xr-xsrc/UiGuiSettingsDialog.h10
-rwxr-xr-xsrc/UiGuiSettingsDialog.ui118
-rwxr-xr-xsrc/UiGuiSystemInfo.cpp96
-rwxr-xr-xsrc/UiGuiSystemInfo.h4
-rwxr-xr-xsrc/UiGuiVersion.cpp20
-rwxr-xr-xsrc/UiGuiVersion.h6
-rwxr-xr-xsrc/UpdateCheckDialog.cpp72
-rwxr-xr-xsrc/UpdateCheckDialog.h32
-rwxr-xr-xsrc/UpdateCheckDialog.ui14
-rwxr-xr-xsrc/debugging/TSLogger.cpp74
-rwxr-xr-xsrc/debugging/TSLogger.h18
-rwxr-xr-xsrc/debugging/TSLoggerDialog.ui22
-rwxr-xr-xsrc/main.cpp26
40 files changed, 1499 insertions, 1499 deletions
diff --git a/readme.html b/readme.html
index 65c4def..4e259b4 100755
--- a/readme.html
+++ b/readme.html
@@ -159,10 +159,10 @@ a.external
But if you'd like to build UiGUI from source, follow these steps:
<ol>
<li>Download, unpack, configure and compile
- <a class="external" href="http://www.qtsoftware.com/downloads/opensource/appdev">Qt</a>
- >= 4.4.0. Make your QTDIR and QMAKESPEC settings. Or install Qt via a package manager.</li>
+ <a class="external" href="http://www.qtsoftware.com/downloads/opensource/appdev">TQt</a>
+ >= 4.4.0. Make your QTDIR and QMAKESPEC settings. Or install TQt via a package manager.</li>
<li>Download, unpack, compile and install
- <a class="external" href="http://www.riverbankcomputing.com/software/qscintilla/download">QScintilla</a>
+ <a class="external" href="http://www.riverbankcomputing.com/software/qscintilla/download">TQScintilla</a>
>= 2.2.</li>
<li>Checkout UiGUI: svn co https://universalindent.svn.sourceforge.net/svnroot/universalindent/trunk universalindentgui</li>
<li>In the checked out directory run "qmake UniversalIndentGUI.pro".</li>
@@ -192,32 +192,32 @@ a.external
and XCode are included.</p>
</p>
- <h3>Used Qt techniques</h3>
- <p>This list shows some selected functionalities that Qt offers and that I use with UiGUI.</p>
+ <h3>Used TQt techniques</h3>
+ <p>This list shows some selected functionalities that TQt offers and that I use with UiGUI.</p>
<ul>
<li>Translations are done with
- <a class="external" href="http://doc.trolltech.com/4.4/qtranslator.html">QTranslator</a>,
- <a class="external" href="http://doc.trolltech.com/4.4/qlocale.html">QLocale</a> and Linguist.</li>
+ <a class="external" href="http://doc.trolltech.com/4.4/ntqtranslator.html">TQTranslator</a>,
+ <a class="external" href="http://doc.trolltech.com/4.4/ntqlocale.html">TQLocale</a> and Linguist.</li>
<li>File encodings are supported by using
- <a class="external" href="http://doc.trolltech.com/4.4/qtextcodec.html">QTextCodec</a>
- and <a class="external" href="http://doc.trolltech.com/4.4/qtextstream.html">QTextStream</a>.</li>
- <li><a class="external" href="http://doc.trolltech.com/4.4/qscriptengine.html">QScriptEngine</a>
- and <a class="external" href="http://doc.trolltech.com/4.4/qscriptvalue.html">QScriptValue</a>
+ <a class="external" href="http://doc.trolltech.com/4.4/ntqtextcodec.html">TQTextCodec</a>
+ and <a class="external" href="http://doc.trolltech.com/4.4/ntqtextstream.html">TQTextStream</a>.</li>
+ <li><a class="external" href="http://doc.trolltech.com/4.4/qscriptengine.html">TQScriptEngine</a>
+ and <a class="external" href="http://doc.trolltech.com/4.4/qscriptvalue.html">TQScriptValue</a>
is included for executing JavaScript files used as indenters.</li>
- <li><a class="external" href="http://doc.trolltech.com/4.4/qgraphicsview.html">QGraphicsView</a>
- and <a class="external" href="http://doc.trolltech.com/4.4/qgraphicsproxywidget.html">QGraphicsProxyWidget</a>
+ <li><a class="external" href="http://doc.trolltech.com/4.4/qgraphicsview.html">TQGraphicsView</a>
+ and <a class="external" href="http://doc.trolltech.com/4.4/qgraphicsproxywidget.html">TQGraphicsProxyWidget</a>
for creating an animated 3D about dialog, simulating that is done on the whole desktop by using
- the screenshot capability of Qt.</li>
+ the screenshot capability of TQt.</li>
<li>Stylesheet settings give the about dialog a special look. Also gradients are used.</li>
- <li><a class="external" href="http://doc.trolltech.com/4.4/qhttp.html">QHttp</a>
- and <a class="external" href="http://doc.trolltech.com/4.4/qurl.html">QUrl</a>
+ <li><a class="external" href="http://doc.trolltech.com/4.4/ntqhttp.html">TQHttp</a>
+ and <a class="external" href="http://doc.trolltech.com/4.4/ntqurl.html">TQUrl</a>
are used for the update check.</li>
- <li><a class="external" href="http://doc.trolltech.com/4.4/qsettings.html">QSettings</a>
+ <li><a class="external" href="http://doc.trolltech.com/4.4/ntqsettings.html">TQSettings</a>
is responsible for storing the application and syntax highlighter settings.</li>
- <li><a class="external" href="http://doc.trolltech.com/4.4/qtcpserver.html">QTcpServer</a>
- and <a class="external" href="http://doc.trolltech.com/4.4/qtcpsocket.html">QTcpSocket</a>
+ <li><a class="external" href="http://doc.trolltech.com/4.4/qtcpserver.html">TQTcpServer</a>
+ and <a class="external" href="http://doc.trolltech.com/4.4/qtcpsocket.html">TQTcpSocket</a>
build the base for the UiGUI Server.</li>
- <li>Of course I use the Qt tools qmake, lupdate, lrelease, Designer, Linguist and my very best friend the Assistant.</li>
+ <li>Of course I use the TQt tools qmake, lupdate, lrelease, Designer, Linguist and my very best friend the Assistant.</li>
</ul>
<h3>Future plans</h3>
diff --git a/src/AboutDialog.cpp b/src/AboutDialog.cpp
index 13957ed..7f22ece 100755
--- a/src/AboutDialog.cpp
+++ b/src/AboutDialog.cpp
@@ -22,11 +22,11 @@
#include "UiGuiVersion.h"
-#include <tqurl.h>
+#include <tntqurl.h>
#include <tqdesktopservices.h>
-#include <tqscrollbar.h>
-#include <tqtimer.h>
-#include <tqlocale.h>
+#include <tntqscrollbar.h>
+#include <tntqtimer.h>
+#include <tntqlocale.h>
/*!
\class AboutDialog
@@ -37,7 +37,7 @@
\brief The constructor calls the setup function for the ui created by uic and adds
the GPL text to the text edit.
*/
-AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(parent, flags)
+AboutDialog::AboutDialog(TQWidget *parent, TQt::WindowFlags flags) : TQDialog(parent, flags)
, _dialogForm(NULL)
, _timer(NULL)
{
@@ -47,7 +47,7 @@ AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(paren
_dialogForm->authorTextBrowser->setOpenExternalLinks( true );
_dialogForm->creditsTextBrowser->setOpenExternalLinks( true );
- QString versionString = _dialogForm->versionTextBrowser->toHtml();
+ TQString versionString = _dialogForm->versionTextBrowser->toHtml();
versionString = versionString.arg(PROGRAM_VERSION_STRING).arg( UiGuiVersion::getBuildRevision() ).arg( UiGuiVersion::getBuildDate() );
_dialogForm->versionTextBrowser->setHtml(versionString);
@@ -59,7 +59,7 @@ AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(paren
"<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 Qt wrapper QScintilla.</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>"
@@ -77,7 +77,7 @@ AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(paren
"<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.equinoxbase.com/\"><b>Pl/Sql tidy</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>"
@@ -93,7 +93,7 @@ AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(paren
_scrollDirection = 1;
_scrollSpeed = 100;
- _timer = new QTimer(this);
+ _timer = new TQTimer(this);
connect( _timer, SIGNAL(timeout()), this, SLOT(scroll()) );
connect( this, SIGNAL(accepted()), _timer, SLOT(stop()) );
}
@@ -102,16 +102,16 @@ AboutDialog::AboutDialog(QWidget *parent, Qt::WindowFlags flags) : QDialog(paren
/*!
\brief Catches language change events and retranslates all needed widgets.
*/
-void AboutDialog::changeEvent(QEvent *event) {
- if (event->type() == QEvent::LanguageChange) {
+void AboutDialog::changeEvent(TQEvent *event) {
+ if (event->type() == TQEvent::LanguageChange) {
_dialogForm->retranslateUi(this);
- QString versionString = _dialogForm->versionTextBrowser->toHtml();
+ TQString versionString = _dialogForm->versionTextBrowser->toHtml();
versionString = versionString.arg(PROGRAM_VERSION_STRING).arg( UiGuiVersion::getBuildRevision() ).arg( UiGuiVersion::getBuildDate() );
_dialogForm->versionTextBrowser->setHtml(versionString);
}
else {
- QWidget::changeEvent(event);
+ TQWidget::changeEvent(event);
}
}
@@ -122,7 +122,7 @@ void AboutDialog::changeEvent(QEvent *event) {
int AboutDialog::exec() {
//creditsTextBrowser->verticalScrollBar()->setValue(0);
_timer->start(_scrollSpeed);
- return QDialog::exec();
+ return TQDialog::exec();
}
@@ -131,7 +131,7 @@ int AboutDialog::exec() {
Also changes the scroll direction and speed when reaching the start or end.
*/
void AboutDialog::scroll() {
- QScrollBar *scrollBar = _dialogForm->creditsTextBrowser->verticalScrollBar();
+ TQScrollBar *scrollBar = _dialogForm->creditsTextBrowser->verticalScrollBar();
scrollBar->setValue( scrollBar->value()+_scrollDirection );
if ( scrollBar->value() == scrollBar->maximum() ) {
@@ -158,5 +158,5 @@ void AboutDialog::scroll() {
*/
void AboutDialog::show() {
_timer->start(_scrollSpeed);
- QDialog::show();
+ TQDialog::show();
}
diff --git a/src/AboutDialog.h b/src/AboutDialog.h
index adbdf13..ce30bad 100755
--- a/src/AboutDialog.h
+++ b/src/AboutDialog.h
@@ -20,19 +20,19 @@
#ifndef ABOUTDIALOG_H
#define ABOUTDIALOG_H
-#include <tqdialog.h>
+#include <tntqdialog.h>
namespace Ui {
class AboutDialog;
}
-class AboutDialog : public QDialog
+class AboutDialog : public TQDialog
{
Q_OBJECT
public:
- AboutDialog(QWidget *parent = NULL, Qt::WindowFlags flags = 0);
+ AboutDialog(TQWidget *parent = NULL, TQt::WindowFlags flags = 0);
public slots:
int exec();
@@ -42,12 +42,12 @@ private slots:
void scroll();
private:
- void changeEvent(QEvent *event);
+ void changeEvent(TQEvent *event);
Ui::AboutDialog* _dialogForm;
int _scrollDirection;
int _scrollSpeed;
- QTimer *_timer;
+ TQTimer *_timer;
};
#endif // ABOUTDIALOG_H
diff --git a/src/AboutDialog.ui b/src/AboutDialog.ui
index 0e1e9d7..dbc2b8c 100755
--- a/src/AboutDialog.ui
+++ b/src/AboutDialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AboutDialog</class>
- <widget class="QDialog" name="AboutDialog">
+ <widget class="TQDialog" name="AboutDialog">
<property name="geometry">
<rect>
<x>0</x>
@@ -29,21 +29,21 @@
<iconset resource="../resources/Icons.qrc">
<normaloff>:/mainWindow/info.png</normaloff>:/mainWindow/info.png</iconset>
</property>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<property name="margin">
<number>0</number>
</property>
<item>
- <widget class="QFrame" name="frame">
+ <widget class="TQFrame" name="frame">
<property name="styleSheet">
- <string notr="true">QFrame#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>
+ <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>QFrame::StyledPanel</enum>
+ <enum>TQFrame::StyledPanel</enum>
</property>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<item>
- <widget class="QLabel" name="bannerLabel">
+ <widget class="TQLabel" name="bannerLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -71,7 +71,7 @@
</widget>
</item>
<item>
- <widget class="QTextBrowser" name="versionTextBrowser">
+ <widget class="TQTextBrowser" name="versionTextBrowser">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -85,13 +85,13 @@
</size>
</property>
<property name="styleSheet">
- <string notr="true">QTextBrowser{background-color:transparent}</string>
+ <string notr="true">TQTextBrowser{background-color:transparent}</string>
</property>
<property name="frameShape">
- <enum>QFrame::NoFrame</enum>
+ <enum>TQFrame::NoFrame</enum>
</property>
<property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
+ <enum>TQt::ScrollBarAlwaysOff</enum>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@@ -103,7 +103,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
- <widget class="QTextBrowser" name="authorTextBrowser">
+ <widget class="TQTextBrowser" name="authorTextBrowser">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
@@ -114,13 +114,13 @@ p, li { white-space: pre-wrap; }
<bool>false</bool>
</property>
<property name="styleSheet">
- <string notr="true">QTextBrowser{background-color:transparent}</string>
+ <string notr="true">TQTextBrowser{background-color:transparent}</string>
</property>
<property name="frameShape">
- <enum>QFrame::NoFrame</enum>
+ <enum>TQFrame::NoFrame</enum>
</property>
<property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
+ <enum>TQt::ScrollBarAlwaysOff</enum>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@@ -137,24 +137,24 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
- <widget class="QTextBrowser" name="creditsTextBrowser">
+ <widget class="TQTextBrowser" name="creditsTextBrowser">
<property name="styleSheet">
- <string notr="true">QTextBrowser#creditsTextBrowser{border:2px solid rgba(0,0,0,10%); background-color:qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,0,80%), stop:0.1 rgba(0,0,0,15%), stop:0.9 rgba(0,0,0,15%), stop:1 rgba(0,0,0,80%) )}</string>
+ <string notr="true">TQTextBrowser#creditsTextBrowser{border:2px solid rgba(0,0,0,10%); background-color:qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,0,80%), stop:0.1 rgba(0,0,0,15%), stop:0.9 rgba(0,0,0,15%), stop:1 rgba(0,0,0,80%) )}</string>
</property>
<property name="frameShape">
- <enum>QFrame::NoFrame</enum>
+ <enum>TQFrame::NoFrame</enum>
</property>
<property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
+ <enum>TQt::ScrollBarAlwaysOff</enum>
</property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout">
+ <layout class="TQHBoxLayout">
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>TQt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -165,9 +165,9 @@ p, li { white-space: pre-wrap; }
</spacer>
</item>
<item>
- <widget class="QPushButton" name="okButton">
+ <widget class="TQPushButton" name="okButton">
<property name="styleSheet">
- <string notr="true">QPushButton#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;} QPushButton:hover#okButton { background-color: qlineargradient( x1:0, y1:0, x2:0, y2:1, stop:0 #B8784B, stop:0.5 #DCB28A, stop:1 #B8784B ); } QPushButton:pressed#okButton{ border: 2px solid #D8CB75 }</string>
+ <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>
@@ -177,7 +177,7 @@ p, li { white-space: pre-wrap; }
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>TQt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
diff --git a/src/AboutDialogGraphicsView.cpp b/src/AboutDialogGraphicsView.cpp
index 52cb6e1..8c868ef 100755
--- a/src/AboutDialogGraphicsView.cpp
+++ b/src/AboutDialogGraphicsView.cpp
@@ -22,10 +22,10 @@
#include "AboutDialog.h"
#include <tqtgui.h>
-#include <tqdesktopwidget.h>
+#include <tntqdesktopwidget.h>
#include <tqdate.h>
#include <tqtimeline.h>
-#include <tqsplashscreen.h>
+#include <tntqsplashscreen.h>
/*!
\class AboutDialogGraphicsView
@@ -39,7 +39,7 @@
/*!
\brief The constructor initializes everything needed for the 3D animation.
*/
-AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidget *parentWindow) : QGraphicsView(parentWindow)
+AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, TQWidget *parentWindow) : TQGraphicsView(parentWindow)
, _aboutDialog(NULL)
, _graphicsProxyWidget(NULL)
, _parentWindow(NULL)
@@ -47,13 +47,13 @@ AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidg
, _aboutDialogAsSplashScreen(NULL)
{
_parentWindow = parentWindow;
- setWindowFlags(Qt::SplashScreen);
+ setWindowFlags(TQt::SplashScreen);
#ifdef Q_OS_LINUX
- QRect availableGeometry = QApplication::desktop()->availableGeometry();
- QRect newGeometry = QRect( availableGeometry.x(), availableGeometry.y(), availableGeometry.width(), availableGeometry.height() );
+ TQRect availableGeometry = TQApplication::desktop()->availableGeometry();
+ TQRect newGeometry = TQRect( availableGeometry.x(), availableGeometry.y(), availableGeometry.width(), availableGeometry.height() );
#else
- QRect newGeometry = QRect( -1,-1, QApplication::desktop()->rect().width()+2, QApplication::desktop()->rect().height()+2 );
+ TQRect newGeometry = TQRect( -1,-1, TQApplication::desktop()->rect().width()+2, TQApplication::desktop()->rect().height()+2 );
#endif
setGeometry( newGeometry );
@@ -62,30 +62,30 @@ AboutDialogGraphicsView::AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidg
_windowTitleBarWidth = 0;
_windowPosOffset = 0;
- QGraphicsScene *scene = new QGraphicsScene(this);
+ TQGraphicsScene *scene = new TQGraphicsScene(this);
setSceneRect( newGeometry );
- _aboutDialogAsSplashScreen = new QSplashScreen(this);
+ _aboutDialogAsSplashScreen = new TQSplashScreen(this);
_graphicsProxyWidget = scene->addWidget(_aboutDialogAsSplashScreen);
- _graphicsProxyWidget->setWindowFlags( Qt::ToolTip );
+ _graphicsProxyWidget->setWindowFlags( TQt::ToolTip );
setScene( scene );
- setRenderHint(QPainter::Antialiasing);
+ setRenderHint(TQPainter::Antialiasing);
- setCacheMode(QGraphicsView::CacheBackground);
- setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
+ setCacheMode(TQGraphicsView::CacheBackground);
+ setViewportUpdateMode(TQGraphicsView::BoundingRectViewportUpdate);
connect(_aboutDialog, SIGNAL(finished(int)), this, SLOT(hide()));
//setWindowOpacity(0.9);
- setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+ setVerticalScrollBarPolicy(TQt::ScrollBarAlwaysOff);
+ setHorizontalScrollBarPolicy(TQt::ScrollBarAlwaysOff);
setStyleSheet("AboutDialogGraphicsView { border: 0px; }");
- _timeLine = new QTimeLine(1000, this);
+ _timeLine = new TQTimeLine(1000, this);
_timeLine->setFrameRange(270, 0);
//_timeLine->setUpdateInterval(10);
- //_timeLine->setCurveShape(QTimeLine::EaseInCurve);
+ //_timeLine->setCurveShape(TQTimeLine::EaseInCurve);
connect(_timeLine, SIGNAL(frameChanged(int)), this, SLOT(updateStep(int)));
}
@@ -112,34 +112,34 @@ void AboutDialogGraphicsView::show() {
_windowTitleBarWidth = 27;
}
#endif
- QPixmap originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId(), QApplication::desktop()->availableGeometry().x(), QApplication::desktop()->availableGeometry().y(), geometry().width(), geometry().height() );
- QBrush brush(originalPixmap);
- QTransform transform;
- transform.translate(0, QApplication::desktop()->availableGeometry().y());
+ TQPixmap originalPixmap = TQPixmap::grabWindow(TQApplication::desktop()->winId(), TQApplication::desktop()->availableGeometry().x(), TQApplication::desktop()->availableGeometry().y(), geometry().width(), geometry().height() );
+ TQBrush brush(originalPixmap);
+ TQTransform transform;
+ transform.translate(0, TQApplication::desktop()->availableGeometry().y());
brush.setTransform(transform);
setBackgroundBrush(brush);
- _aboutDialogAsSplashScreen->setPixmap( QPixmap::grabWidget(_aboutDialog) );
+ _aboutDialogAsSplashScreen->setPixmap( TQPixmap::grabWidget(_aboutDialog) );
_graphicsProxyWidget->setGeometry( _aboutDialog->geometry() );
_aboutDialog->hide();
_graphicsProxyWidget->setPos( _parentWindow->geometry().x()+(_parentWindow->geometry().width()-_graphicsProxyWidget->geometry().width()) / 2, _parentWindow->y()+_windowTitleBarWidth-_windowPosOffset);
- QRectF r = _graphicsProxyWidget->boundingRect();
- _graphicsProxyWidget->setTransform(QTransform()
+ TQRectF r = _graphicsProxyWidget->boundingRect();
+ _graphicsProxyWidget->setTransform(TQTransform()
.translate(r.width() / 2, -_windowTitleBarWidth)
- .rotate(270, Qt::XAxis)
- //.rotate(90, Qt::YAxis)
- //.rotate(5, Qt::ZAxis)
+ .rotate(270, TQt::XAxis)
+ //.rotate(90, TQt::YAxis)
+ //.rotate(5, TQt::ZAxis)
//.scale(1 + 1.5 * step, 1 + 1.5 * step)
.translate(-r.width() / 2, _windowTitleBarWidth));
_graphicsProxyWidget->show();
//_aboutDialogAsSplashScreen->show();
- QGraphicsView::show();
+ TQGraphicsView::show();
connect(_timeLine, SIGNAL(finished()), this, SLOT(showAboutDialog()));
- _timeLine->setDirection(QTimeLine::Forward);
+ _timeLine->setDirection(TQTimeLine::Forward);
_timeLine->start();
}
@@ -148,12 +148,12 @@ void AboutDialogGraphicsView::show() {
\brief Does the next calculation/transformation step.
*/
void AboutDialogGraphicsView::updateStep(int step) {
- QRectF r = _graphicsProxyWidget->boundingRect();
- _graphicsProxyWidget->setTransform(QTransform()
+ TQRectF r = _graphicsProxyWidget->boundingRect();
+ _graphicsProxyWidget->setTransform(TQTransform()
.translate(r.width() / 2, -_windowTitleBarWidth)
- .rotate(step, Qt::XAxis)
- //.rotate(step, Qt::YAxis)
- //.rotate(step * 5, Qt::ZAxis)
+ .rotate(step, TQt::XAxis)
+ //.rotate(step, TQt::YAxis)
+ //.rotate(step * 5, TQt::ZAxis)
//.scale(1 + 1.5 * step, 1 + 1.5 * step)
.translate(-r.width() / 2, _windowTitleBarWidth));
//update();
@@ -177,21 +177,21 @@ void AboutDialogGraphicsView::showAboutDialog() {
void AboutDialogGraphicsView::hide() {
_graphicsProxyWidget->setPos( _parentWindow->geometry().x()+(_parentWindow->geometry().width()-_graphicsProxyWidget->geometry().width()) / 2, _parentWindow->y()+_windowTitleBarWidth-_windowPosOffset);
- QRectF r = _graphicsProxyWidget->boundingRect();
- _graphicsProxyWidget->setTransform(QTransform()
+ TQRectF r = _graphicsProxyWidget->boundingRect();
+ _graphicsProxyWidget->setTransform(TQTransform()
.translate(r.width() / 2, -_windowTitleBarWidth)
- .rotate(0, Qt::XAxis)
- //.rotate(90, Qt::YAxis)
- //.rotate(5, Qt::ZAxis)
+ .rotate(0, TQt::XAxis)
+ //.rotate(90, TQt::YAxis)
+ //.rotate(5, TQt::ZAxis)
//.scale(1 + 1.5 * step, 1 + 1.5 * step)
.translate(-r.width() / 2, _windowTitleBarWidth));
_graphicsProxyWidget->show();
//_aboutDialogAsSplashScreen->show();
- QGraphicsView::show();
+ TQGraphicsView::show();
connect(_timeLine, SIGNAL(finished()), this, SLOT(hideReally()));
- _timeLine->setDirection(QTimeLine::Backward);
+ _timeLine->setDirection(TQTimeLine::Backward);
_timeLine->start();
}
@@ -201,6 +201,6 @@ void AboutDialogGraphicsView::hide() {
*/
void AboutDialogGraphicsView::hideReally() {
disconnect(_timeLine, SIGNAL(finished()), this, SLOT(hideReally()));
- QGraphicsView::hide();
+ TQGraphicsView::hide();
_parentWindow->activateWindow();
}
diff --git a/src/AboutDialogGraphicsView.h b/src/AboutDialogGraphicsView.h
index c673149..411ad3a 100755
--- a/src/AboutDialogGraphicsView.h
+++ b/src/AboutDialogGraphicsView.h
@@ -23,15 +23,15 @@
class AboutDialog;
-class QTimeLine;
-class QSplashScreen;
+class TQTimeLine;
+class TQSplashScreen;
-class AboutDialogGraphicsView : public QGraphicsView
+class AboutDialogGraphicsView : public TQGraphicsView
{
Q_OBJECT
public:
- AboutDialogGraphicsView(AboutDialog *aboutDialog, QWidget *parentWindow = NULL);
+ AboutDialogGraphicsView(AboutDialog *aboutDialog, TQWidget *parentWindow = NULL);
~AboutDialogGraphicsView(void);
public slots:
@@ -45,10 +45,10 @@ private slots:
private:
AboutDialog *_aboutDialog;
- QGraphicsProxyWidget *_graphicsProxyWidget;
- QWidget *_parentWindow;
- QTimeLine *_timeLine;
- QSplashScreen *_aboutDialogAsSplashScreen;
+ TQGraphicsProxyWidget *_graphicsProxyWidget;
+ TQWidget *_parentWindow;
+ TQTimeLine *_timeLine;
+ TQSplashScreen *_aboutDialogAsSplashScreen;
int _windowTitleBarWidth;
int _windowPosOffset;
};
diff --git a/src/FindDialog.ui b/src/FindDialog.ui
index f22f574..00cc527 100755
--- a/src/FindDialog.ui
+++ b/src/FindDialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FindDialog</class>
- <widget class="QDialog" name="FindDialog">
+ <widget class="TQDialog" name="FindDialog">
<property name="geometry">
<rect>
<x>0</x>
@@ -13,9 +13,9 @@
<property name="windowTitle">
<string>Find</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="TQVBoxLayout" name="verticalLayout">
<item>
- <widget class="QLabel" name="label">
+ <widget class="TQLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
@@ -28,14 +28,14 @@
</widget>
</item>
<item>
- <widget class="QComboBox" name="comboBox">
+ <widget class="TQComboBox" name="comboBox">
<property name="editable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox">
+ <widget class="TQGroupBox" name="groupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
@@ -45,23 +45,23 @@
<property name="title">
<string>Find options</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
+ <layout class="TQVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QCheckBox" name="checkBox">
+ <widget class="TQCheckBox" name="checkBox">
<property name="text">
<string>Match case</string>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="checkBox_2">
+ <widget class="TQCheckBox" name="checkBox_2">
<property name="text">
<string>Match whole word</string>
</property>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="checkBox_3">
+ <widget class="TQCheckBox" name="checkBox_3">
<property name="text">
<string>Search forward</string>
</property>
@@ -71,7 +71,7 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="checkBox_4">
+ <widget class="TQCheckBox" name="checkBox_4">
<property name="text">
<string>Use Regular Expressions</string>
</property>
@@ -83,7 +83,7 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
- <enum>Qt::Vertical</enum>
+ <enum>TQt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -94,19 +94,19 @@
</spacer>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="TQHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
- <enum>QLayout::SetMaximumSize</enum>
+ <enum>TQLayout::SetMaximumSize</enum>
</property>
<item>
- <widget class="QPushButton" name="pushButton">
+ <widget class="TQPushButton" name="pushButton">
<property name="text">
<string>Find Next</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton_2">
+ <widget class="TQPushButton" name="pushButton_2">
<property name="text">
<string>Close</string>
</property>
diff --git a/src/IndentHandler.cpp b/src/IndentHandler.cpp
index 2446fa3..23f47f8 100755
--- a/src/IndentHandler.cpp
+++ b/src/IndentHandler.cpp
@@ -25,31 +25,31 @@
#include "UiGuiIniFileParser.h"
#include "SettingsPaths.h"
-#include <tqtoolbox.h>
+#include <tntqtoolbox.h>
#include <tqvboxlayout.h>
-#include <tqapplication.h>
-#include <tqcheckbox.h>
-#include <tqcombobox.h>
-#include <tqtoolbutton.h>
-#include <tqfile.h>
-#include <tqprocess.h>
-#include <tqsettings.h>
-#include <tqstringlist.h>
-#include <tqlineedit.h>
-#include <tqspinbox.h>
-#include <tqlabel.h>
+#include <tntqapplication.h>
+#include <tntqcheckbox.h>
+#include <tntqcombobox.h>
+#include <tntqtoolbutton.h>
+#include <tntqfile.h>
+#include <tntqprocess.h>
+#include <tntqsettings.h>
+#include <tntqstringlist.h>
+#include <tntqlineedit.h>
+#include <tntqspinbox.h>
+#include <tntqlabel.h>
#include <tqbytearray.h>
-#include <tqdir.h>
-#include <tqmessagebox.h>
-#include <tqmainwindow.h>
-#include <tqtextstream.h>
-#include <tqtextcodec.h>
+#include <tntqdir.h>
+#include <tntqmessagebox.h>
+#include <tntqmainwindow.h>
+#include <tntqtextstream.h>
+#include <tntqtextcodec.h>
#include <tqtscript.h>
#include <tqdesktopservices.h>
#include <tqmenu.h>
-#include <tqaction.h>
+#include <tntqaction.h>
#include <tqcontextmenuevent.h>
-#include <tqfiledialog.h>
+#include <tntqfiledialog.h>
#include <tqtdebug.h>
#ifdef Q_OS_WIN32
@@ -81,7 +81,7 @@ inline void UNUSED_PARAMETER_WARNING_AVOID(T){}
its \a indenterID, which is the number of found indenter ini files in alphabetic
order starting at index 0.
*/
-IndentHandler::IndentHandler(int indenterID, QWidget *mainWindow, QWidget *parent) : QWidget(parent)
+IndentHandler::IndentHandler(int indenterID, TQWidget *mainWindow, TQWidget *parent) : TQWidget(parent)
, _indenterSelectionCombobox(NULL)
, _indenterParameterHelpButton(NULL)
, _toolBoxContainerLayout(NULL)
@@ -99,7 +99,7 @@ IndentHandler::IndentHandler(int indenterID, QWidget *mainWindow, QWidget *paren
{
Q_ASSERT_X( indenterID >= 0, "IndentHandler", "the selected indenterID is < 0" );
- setObjectName(QString::fromUtf8("indentHandler"));
+ setObjectName(TQString::fromUtf8("indentHandler"));
_mainWindow = mainWindow;
@@ -111,43 +111,43 @@ IndentHandler::IndentHandler(int indenterID, QWidget *mainWindow, QWidget *paren
connect( _actionResetIndenterParameters, SIGNAL(triggered()), this, SLOT(resetIndenterParameter()) );
// define this widgets resize behavior
- setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
+ setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
// create vertical layout box, into which the toolbox will be added
- _toolBoxContainerLayout = new QVBoxLayout(this);
+ _toolBoxContainerLayout = new TQVBoxLayout(this);
_toolBoxContainerLayout->setMargin(2);
// Create horizontal layout for indenter selector and help button.
- QHBoxLayout *hboxLayout = new QHBoxLayout();
+ TQHBoxLayout *hboxLayout = new TQHBoxLayout();
//hboxLayout->setMargin(2);
_toolBoxContainerLayout->addLayout( hboxLayout );
// Create the indenter selection combo box.
- _indenterSelectionCombobox = new QComboBox(this);
- _indenterSelectionCombobox->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
+ _indenterSelectionCombobox = new TQComboBox(this);
+ _indenterSelectionCombobox->setSizeAdjustPolicy(TQComboBox::AdjustToMinimumContentsLengthWithIcon);
_indenterSelectionCombobox->setMinimumContentsLength(20);
connect( _indenterSelectionCombobox, SIGNAL(activated(int)), this, SLOT(setIndenter(int)) );
UiGuiSettings::getInstance()->registerObjectProperty(_indenterSelectionCombobox, "currentIndex", "selectedIndenter");
hboxLayout->addWidget( _indenterSelectionCombobox );
// Create the indenter parameter help button.
- _indenterParameterHelpButton = new QToolButton(this);
- _indenterParameterHelpButton->setObjectName(QString::fromUtf8("indenterParameterHelpButton"));
- _indenterParameterHelpButton->setIcon(QIcon(QString::fromUtf8(":/mainWindow/help.png")));
+ _indenterParameterHelpButton = new TQToolButton(this);
+ _indenterParameterHelpButton->setObjectName(TQString::fromUtf8("indenterParameterHelpButton"));
+ _indenterParameterHelpButton->setIcon(TQIcon(TQString::fromUtf8(":/mainWindow/help.png")));
hboxLayout->addWidget( _indenterParameterHelpButton );
// Handle if the indenter parameter help button is pressed.
connect( _indenterParameterHelpButton, SIGNAL(clicked()), this, SLOT(showIndenterManual()) );
// create a toolbox and set its resize behavior
- _indenterParameterCategoriesToolBox = new QToolBox(this);
- _indenterParameterCategoriesToolBox->setObjectName(QString::fromUtf8("_indenterParameterCategoriesToolBox"));
+ _indenterParameterCategoriesToolBox = new TQToolBox(this);
+ _indenterParameterCategoriesToolBox->setObjectName(TQString::fromUtf8("_indenterParameterCategoriesToolBox"));
#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
connect( _indenterParameterCategoriesToolBox, SIGNAL(currentChanged(int)), this, SLOT(updateDrawing()) );
#endif // UNIVERSALINDENTGUI_NPP_EXPORTS
- //_indenterParameterCategoriesToolBox->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
- //_indenterParameterCategoriesToolBox->setMaximumSize(QSize(16777215, 16777215));
+ //_indenterParameterCategoriesToolBox->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+ //_indenterParameterCategoriesToolBox->setMaximumSize(TQSize(16777215, 16777215));
// insert the toolbox into the vlayout
_toolBoxContainerLayout->addWidget(_indenterParameterCategoriesToolBox);
@@ -157,7 +157,7 @@ IndentHandler::IndentHandler(int indenterID, QWidget *mainWindow, QWidget *paren
_indenterDirctoryStr = SettingsPaths::getIndenterPath();
_tempDirctoryStr = SettingsPaths::getTempPath();
_settingsDirctoryStr = SettingsPaths::getSettingsPath();
- QDir indenterDirctory = QDir(_indenterDirctoryStr);
+ TQDir indenterDirctory = TQDir(_indenterDirctoryStr);
if ( _mainWindow != NULL ) {
_errorMessageDialog = new UiGuiErrorMessage(_mainWindow);
@@ -166,7 +166,7 @@ IndentHandler::IndentHandler(int indenterID, QWidget *mainWindow, QWidget *paren
_errorMessageDialog = new UiGuiErrorMessage(this);
}
- _indenterIniFileList = indenterDirctory.entryList( QStringList("uigui_*.ini") );
+ _indenterIniFileList = indenterDirctory.entryList( TQStringList("uigui_*.ini") );
if ( _indenterIniFileList.count() > 0 ) {
// Take care if the selected indenterID is smaller or greater than the number of existing indenters
if ( indenterID < 0 ) {
@@ -193,7 +193,7 @@ IndentHandler::IndentHandler(int indenterID, QWidget *mainWindow, QWidget *paren
}
}
else {
- _errorMessageDialog->showMessage(tr("No indenter ini files"), tr("There exists no indenter ini files in the directory \"") + QDir(_indenterDirctoryStr).absolutePath() + "\".");
+ _errorMessageDialog->showMessage(tr("No indenter ini files"), tr("There exists no indenter ini files in the directory \"") + TQDir(_indenterDirctoryStr).absolutePath() + "\".");
}
retranslateUi();
@@ -205,7 +205,7 @@ IndentHandler::IndentHandler(int indenterID, QWidget *mainWindow, QWidget *paren
*/
IndentHandler::~IndentHandler() {
// Generate the parameter string that will be saved to the indenters config file.
- QString parameterString = getParameterString();
+ TQString parameterString = getParameterString();
if ( !_indenterFileName.isEmpty() ) {
saveConfigFile( _settingsDirctoryStr + "/" + _indenterFileName + ".cfg", parameterString );
}
@@ -219,24 +219,24 @@ IndentHandler::~IndentHandler() {
*/
void IndentHandler::initIndenterMenu() {
if ( _menuIndenter == NULL ) {
- _actionLoadIndenterConfigFile = new QAction(this);
- _actionLoadIndenterConfigFile->setObjectName(QString::fromUtf8("_actionLoadIndenterConfigFile"));
- _actionLoadIndenterConfigFile->setIcon(QIcon(QString::fromUtf8(":/mainWindow/load_indent_cfg.png")));
+ _actionLoadIndenterConfigFile = new TQAction(this);
+ _actionLoadIndenterConfigFile->setObjectName(TQString::fromUtf8("_actionLoadIndenterConfigFile"));
+ _actionLoadIndenterConfigFile->setIcon(TQIcon(TQString::fromUtf8(":/mainWindow/load_indent_cfg.png")));
- _actionSaveIndenterConfigFile = new QAction(this);
- _actionSaveIndenterConfigFile->setObjectName(QString::fromUtf8("_actionSaveIndenterConfigFile"));
- _actionSaveIndenterConfigFile->setIcon(QIcon(QString::fromUtf8(":/mainWindow/save_indent_cfg.png")));
+ _actionSaveIndenterConfigFile = new TQAction(this);
+ _actionSaveIndenterConfigFile->setObjectName(TQString::fromUtf8("_actionSaveIndenterConfigFile"));
+ _actionSaveIndenterConfigFile->setIcon(TQIcon(TQString::fromUtf8(":/mainWindow/save_indent_cfg.png")));
- _actionCreateShellScript = new QAction(this);
- _actionCreateShellScript->setObjectName(QString::fromUtf8("_actionCreateShellScript"));
- _actionCreateShellScript->setIcon(QIcon(QString::fromUtf8(":/mainWindow/shell.png")));
+ _actionCreateShellScript = new TQAction(this);
+ _actionCreateShellScript->setObjectName(TQString::fromUtf8("_actionCreateShellScript"));
+ _actionCreateShellScript->setIcon(TQIcon(TQString::fromUtf8(":/mainWindow/shell.png")));
- _actionResetIndenterParameters = new QAction(this);
- _actionResetIndenterParameters->setObjectName(QString::fromUtf8("_actionResetIndenterParameters"));
- _actionResetIndenterParameters->setIcon(QIcon(QString::fromUtf8(":/mainWindow/view-refresh.png")));
+ _actionResetIndenterParameters = new TQAction(this);
+ _actionResetIndenterParameters->setObjectName(TQString::fromUtf8("_actionResetIndenterParameters"));
+ _actionResetIndenterParameters->setIcon(TQIcon(TQString::fromUtf8(":/mainWindow/view-refresh.png")));
- _menuIndenter = new QMenu(this);
- _menuIndenter->setObjectName(QString::fromUtf8("_menuIndenter"));
+ _menuIndenter = new TQMenu(this);
+ _menuIndenter->setObjectName(TQString::fromUtf8("_menuIndenter"));
_menuIndenter->addAction(_actionLoadIndenterConfigFile);
_menuIndenter->addAction(_actionSaveIndenterConfigFile);
_menuIndenter->addAction(_actionCreateShellScript);
@@ -248,7 +248,7 @@ void IndentHandler::initIndenterMenu() {
/*!
\brief Returns the context menu used for some actions like saving the indenter config file.
*/
-QMenu* IndentHandler::getIndenterMenu() {
+TQMenu* IndentHandler::getIndenterMenu() {
return _menuIndenter;
}
@@ -256,8 +256,8 @@ QMenu* IndentHandler::getIndenterMenu() {
/*!
\brief Returns the actions of the context menu used for some actions like saving the indenter config file.
*/
-QList<QAction*> IndentHandler::getIndenterMenuActions() {
- QList<QAction*> actionList;
+TQList<TQAction*> IndentHandler::getIndenterMenuActions() {
+ TQList<TQAction*> actionList;
actionList << _actionLoadIndenterConfigFile << _actionSaveIndenterConfigFile << _actionCreateShellScript << _actionResetIndenterParameters;
return actionList;
}
@@ -266,7 +266,7 @@ QList<QAction*> IndentHandler::getIndenterMenuActions() {
/*!
\brief Opens the context menu, used for some actions like saving the indenter config file, at the event position.
*/
-void IndentHandler::contextMenuEvent( QContextMenuEvent *event ) {
+void IndentHandler::contextMenuEvent( TQContextMenuEvent *event ) {
getIndenterMenu()->exec( event->globalPos() );
}
@@ -275,18 +275,18 @@ void IndentHandler::contextMenuEvent( QContextMenuEvent *event ) {
\brief Creates the content for a shell script that can be used as a external tool call
to indent an as parameter defined file.
*/
-QString IndentHandler::generateShellScript(const QString &configFilename) {
- QString indenterCompleteCallString;
- QString parameterInputFile;
- QString parameterOuputFile;
- QString parameterParameterFile;
- QString replaceInputFileCommand;
+TQString IndentHandler::generateShellScript(const TQString &configFilename) {
+ TQString indenterCompleteCallString;
+ TQString parameterInputFile;
+ TQString parameterOuputFile;
+ TQString parameterParameterFile;
+ TQString replaceInputFileCommand;
// Define the placeholder for parameter variables either in batch or bash programming.
#if defined(Q_OS_WIN32)
- QString shellParameterPlaceholder = "%1";
+ TQString shellParameterPlaceholder = "%1";
#else
- QString shellParameterPlaceholder = "$1";
+ TQString shellParameterPlaceholder = "$1";
#endif
parameterInputFile = " " + _inputFileParameter + "\"" + shellParameterPlaceholder + "\"";
@@ -345,13 +345,13 @@ QString IndentHandler::generateShellScript(const QString &configFilename) {
}
#if defined(Q_OS_WIN32)
- QString shellScript( TemplateBatchScript::getTemplateBatchScript() );
+ TQString shellScript( TemplateBatchScript::getTemplateBatchScript() );
shellScript = shellScript.replace("__INDENTERCALLSTRING2__", indenterCompleteCallString + "\n" + replaceInputFileCommand);
indenterCompleteCallString = indenterCompleteCallString.replace("%1", "%%G");
replaceInputFileCommand = replaceInputFileCommand.replace("%1", "%%G");
shellScript = shellScript.replace("__INDENTERCALLSTRING1__", indenterCompleteCallString + "\n" + replaceInputFileCommand);
#else
- QString shellScript( TemplateBatchScript::getTemplateBatchScript() );
+ TQString shellScript( TemplateBatchScript::getTemplateBatchScript() );
shellScript = shellScript.replace("__INDENTERCALLSTRING2__", indenterCompleteCallString + "\n" + replaceInputFileCommand);
indenterCompleteCallString = indenterCompleteCallString.replace("$1", "$file2indent");
replaceInputFileCommand = replaceInputFileCommand.replace("$1", "$file2indent");
@@ -368,7 +368,7 @@ QString IndentHandler::generateShellScript(const QString &configFilename) {
The \a inputFileExtension has to be given as parameter so the called indenter
can identify the programming language if needed.
*/
-QString IndentHandler::callIndenter(QString sourceCode, QString inputFileExtension) {
+TQString IndentHandler::callIndenter(TQString sourceCode, TQString inputFileExtension) {
if ( _indenterExecutableSuffix == ".js" ) {
return callJavaScriptIndenter(sourceCode);
}
@@ -384,19 +384,19 @@ QString IndentHandler::callIndenter(QString sourceCode, QString inputFileExtensi
The \a inputFileExtension has to be given as parameter so the called indenter
can identify the programming language if needed.
*/
-QString IndentHandler::callJavaScriptIndenter(QString sourceCode) {
- QScriptEngine engine;
+TQString IndentHandler::callJavaScriptIndenter(TQString sourceCode) {
+ TQScriptEngine engine;
engine.globalObject().setProperty("unformattedCode", sourceCode);
- QFile jsDecoderFile( _indenterExecutableCallString );
- QString jsDecoderCode;
- if (jsDecoderFile.open(QFile::ReadOnly)) {
+ TQFile jsDecoderFile( _indenterExecutableCallString );
+ TQString jsDecoderCode;
+ if (jsDecoderFile.open(TQFile::ReadOnly)) {
jsDecoderCode = jsDecoderFile.readAll();
}
jsDecoderFile.close();
- QScriptValue value = engine.evaluate(jsDecoderCode);
+ TQScriptValue value = engine.evaluate(jsDecoderCode);
return value.toString();
}
@@ -407,7 +407,7 @@ QString IndentHandler::callJavaScriptIndenter(QString sourceCode) {
The \a inputFileExtension has to be given as parameter so the called indenter
can identify the programming language if needed.
*/
-QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputFileExtension) {
+TQString IndentHandler::callExecutableIndenter(TQString sourceCode, TQString inputFileExtension) {
Q_ASSERT_X( !_inputFileName.isEmpty(), "callIndenter", "_inputFileName is empty" );
// Q_ASSERT_X( !_outputFileName.isEmpty(), "callIndenter", "_outputFileName is empty" );
Q_ASSERT_X( !_indenterFileName.isEmpty(), "callIndenter", "_indenterFileName is empty" );
@@ -416,16 +416,16 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
return "";
}
- QString formattedSourceCode;
- QString indenterCompleteCallString;
- QString parameterInputFile;
- QString parameterOuputFile;
- QString parameterParameterFile;
- QProcess indentProcess;
- QString processReturnString;
+ TQString formattedSourceCode;
+ TQString indenterCompleteCallString;
+ TQString parameterInputFile;
+ TQString parameterOuputFile;
+ TQString parameterParameterFile;
+ TQProcess indentProcess;
+ TQString processReturnString;
// Generate the parameter string that will be saved to the indenters config file
- QString parameterString = getParameterString();
+ TQString parameterString = getParameterString();
if ( !_globalConfigFilename.isEmpty() ) {
saveConfigFile( _tempDirctoryStr + "/" + _globalConfigFilename, parameterString );
@@ -437,13 +437,13 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
}
// Delete any previously used input src file and create a new input src file.
- QFile::remove(_tempDirctoryStr + "/" + _inputFileName + inputFileExtension);
- QFile inputSrcFile(_tempDirctoryStr + "/" + _inputFileName + inputFileExtension);
+ TQFile::remove(_tempDirctoryStr + "/" + _inputFileName + inputFileExtension);
+ TQFile inputSrcFile(_tempDirctoryStr + "/" + _inputFileName + inputFileExtension);
// Write the source code to the input file for the indenter
- if ( inputSrcFile.open( QFile::ReadWrite | QFile::Text ) ) {
+ if ( inputSrcFile.open( TQFile::ReadWrite | TQFile::Text ) ) {
inputSrcFile.write( sourceCode.toUtf8() );
inputSrcFile.close();
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Wrote to be indented source code to file " << inputSrcFile.fileName();
+ tqDebug() << __LINE__ << " " << __FUNCTION__ << ": Wrote to be indented source code to file " << inputSrcFile.fileName();
}
else {
qCritical() << __LINE__ << " " << __FUNCTION__ << ": Couldn't write to be indented source code to file " << inputSrcFile.fileName();
@@ -465,15 +465,15 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
#ifdef Q_OS_WIN32
// Paths may contain Unicode or other foreign characters. Windows commands line tools will
- // receive als falsely encoded path string by QProcess or they connot correctly handle
+ // receive als falsely encoded path string by TQProcess or they connot correctly handle
// the Unicode path on their own.
// Because of this the path gets converted to Windows short paths using the 8.3 notation.
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Temp dir before trying to convert it to short Windows path is" << _tempDirctoryStr;
+ tqDebug() << __LINE__ << " " << __FUNCTION__ << ": Temp dir before trying to convert it to short Windows path is" << _tempDirctoryStr;
// At first convert the temp path to Windows like separators.
- QString tempDirctoryStrHelper = QDir::toNativeSeparators(_tempDirctoryStr).replace("\\", "\\\\");
- // Then convert the QString to a WCHAR array and NULL terminate it.
+ TQString tempDirctoryStrHelper = TQDir::toNativeSeparators(_tempDirctoryStr).replace("\\", "\\\\");
+ // Then convert the TQString to a WCHAR array and NULL terminate it.
WCHAR *tempDirctoryWindowsStr = new WCHAR[ tempDirctoryStrHelper.length()+1 ];
tempDirctoryStrHelper.toWCharArray( tempDirctoryWindowsStr );
tempDirctoryWindowsStr[ tempDirctoryStrHelper.length() ] = (WCHAR)NULL;
@@ -484,30 +484,30 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
length = GetShortPathName((LPCTSTR)tempDirctoryWindowsStr, NULL, 0);
// If the short path could be retrieved, create a correct sized buffer, store the
- // short path in it and convert all back to QString.
+ // short path in it and convert all back to TQString.
if ( length != 0 ) {
#ifdef UNICODE
buffer = new WCHAR[length];
length = GetShortPathName((LPCTSTR)tempDirctoryWindowsStr, buffer, length);
- tempDirctoryStrHelper = QString::fromWCharArray( buffer );
+ tempDirctoryStrHelper = TQString::fromWCharArray( buffer );
#else
buffer = new TCHAR[length];
length = GetShortPathName((LPCTSTR)tempDirctoryWindowsStr, buffer, length);
tempDirctoryStrHelper = buffer;
#endif
- _tempDirctoryStr = QDir::fromNativeSeparators(tempDirctoryStrHelper).replace("//", "/");
+ _tempDirctoryStr = TQDir::fromNativeSeparators(tempDirctoryStrHelper).replace("//", "/");
delete [] buffer;
// Check whether the short path still contains some kind of non ascii characters.
if ( _tempDirctoryStr.length() != _tempDirctoryStr.toAscii().length() ) {
- qWarning() << __LINE__ << " " << __FUNCTION__ << ": Shortened path still contains non ascii characters. Could cause some indenters not to work properly!";
+ tqWarning() << __LINE__ << " " << __FUNCTION__ << ": Shortened path still contains non ascii characters. Could cause some indenters not to work properly!";
}
}
else {
- qWarning() << __LINE__ << " " << __FUNCTION__ << ": Couldn't retrieve a short version of the temporary path!";
+ tqWarning() << __LINE__ << " " << __FUNCTION__ << ": Couldn't retrieve a short version of the temporary path!";
}
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Temp dir after trying to convert it to short Windows path is " << _tempDirctoryStr;
+ tqDebug() << __LINE__ << " " << __FUNCTION__ << ": Temp dir after trying to convert it to short Windows path is " << _tempDirctoryStr;
delete [] tempDirctoryWindowsStr;
#endif
@@ -546,17 +546,17 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
indenterCompleteCallString = _indenterExecutableCallString + indenterCompleteCallString;
// errors and standard outputs from the process call are merged together
- //indentProcess.setReadChannelMode(QProcess::MergedChannels);
+ //indentProcess.setReadChannelMode(TQProcess::MergedChannels);
// Set the directory where the indenter will be executed for the process' environment as PWD.
- QStringList env = indentProcess.environment();
- env << "PWD=" + QFileInfo(_tempDirctoryStr).absoluteFilePath();
+ TQStringList env = indentProcess.environment();
+ env << "PWD=" + TQFileInfo(_tempDirctoryStr).absoluteFilePath();
indentProcess.setEnvironment( env );
// Set the directory for the indenter execution
- indentProcess.setWorkingDirectory( QFileInfo(_tempDirctoryStr).absoluteFilePath() );
+ indentProcess.setWorkingDirectory( TQFileInfo(_tempDirctoryStr).absoluteFilePath() );
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Will call the indenter in the directory " << indentProcess.workingDirectory() << " using this commandline call: " << indenterCompleteCallString;
+ tqDebug() << __LINE__ << " " << __FUNCTION__ << ": Will call the indenter in the directory " << indentProcess.workingDirectory() << " using this commandline call: " << indenterCompleteCallString;
indentProcess.start(indenterCompleteCallString);
@@ -568,22 +568,22 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
processReturnString += tr("<b>Returned error message:</b> ") + indentProcess.errorString() + "<br>";
switch ( indentProcess.error() ) {
- case QProcess::FailedToStart :
+ case TQProcess::FailedToStart :
processReturnString += tr("<b>Reason could be:</b> ") + "The process failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program.<br>";
break;
- case QProcess::Crashed :
+ case TQProcess::Crashed :
processReturnString += "The process crashed some time after starting successfully.<br>";
break;
- case QProcess::Timedout :
+ case TQProcess::Timedout :
processReturnString += "The called indenter did not response for over 10 seconds, so aborted its execution.<br>";
break;
- case QProcess::WriteError :
+ case TQProcess::WriteError :
processReturnString += "An error occurred when attempting to write to the process. For example, the process may not be running, or it may have closed its input channel.<br>";
break;
- case QProcess::ReadError :
+ case TQProcess::ReadError :
processReturnString += "An error occurred when attempting to read from the process. For example, the process may not be running.<br>";
break;
- case QProcess::UnknownError :
+ case TQProcess::UnknownError :
processReturnString += "An unknown error occurred. This is the default return value of error().<br>";
break;
default :
@@ -594,15 +594,15 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
"(STDOUT):" + encodeToHTML( indentProcess.readAllStandardOutput() ) + "<br>" +
"(STDERR):" + encodeToHTML( indentProcess.readAllStandardError() ) + "<br>" +
"</pre></html></body>";
- qWarning() << __LINE__ << " " << __FUNCTION__ << processReturnString;
- QApplication::restoreOverrideCursor();
+ tqWarning() << __LINE__ << " " << __FUNCTION__ << processReturnString;
+ TQApplication::restoreOverrideCursor();
_errorMessageDialog->showMessage(tr("Error calling Indenter"), processReturnString);
}
// If the indenter returned an error code != 0 show its output.
if ( indentProcess.exitCode() != 0 ) {
- QString exitCode;
+ TQString exitCode;
exitCode.setNum(indentProcess.exitCode());
processReturnString = tr("<b>Indenter returned with exit code:</b> ") + exitCode + "<br>" +
tr("<b>Indent console output was:</b> ") + "<br>" +
@@ -610,8 +610,8 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
"(STDERR):" + encodeToHTML( indentProcess.readAllStandardError() ) + "<br>" +
tr("<br><b>Callstring was:</b> ") + encodeToHTML(indenterCompleteCallString) +
"</html></body>";
- qWarning() << __LINE__ << " " << __FUNCTION__ << processReturnString;
- QApplication::restoreOverrideCursor();
+ tqWarning() << __LINE__ << " " << __FUNCTION__ << processReturnString;
+ TQApplication::restoreOverrideCursor();
_errorMessageDialog->showMessage( tr("Indenter returned error"), processReturnString );
}
@@ -620,17 +620,17 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
// If the indenter results are written to stdout, read them from there...
if ( indentProcess.exitCode() == 0 && _outputFileParameter == "stdout" ) {
formattedSourceCode = indentProcess.readAllStandardOutput();
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Read indenter output from StdOut.";
+ tqDebug() << __LINE__ << " " << __FUNCTION__ << ": Read indenter output from StdOut.";
}
// ... else read the output file generated by the indenter call.
else {
- QFile outSrcFile(_tempDirctoryStr + "/" + _outputFileName + inputFileExtension);
- if ( outSrcFile.open(QFile::ReadOnly | QFile::Text) ) {
- QTextStream outSrcStrm(&outSrcFile);
- outSrcStrm.setCodec( QTextCodec::codecForName("UTF-8") );
+ TQFile outSrcFile(_tempDirctoryStr + "/" + _outputFileName + inputFileExtension);
+ if ( outSrcFile.open(TQFile::ReadOnly | TQFile::Text) ) {
+ TQTextStream outSrcStrm(&outSrcFile);
+ outSrcStrm.setCodec( TQTextCodec::codecForName("UTF-8") );
formattedSourceCode = outSrcStrm.readAll();
outSrcFile.close();
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Read indenter output from file " << outSrcFile.fileName();
+ tqDebug() << __LINE__ << " " << __FUNCTION__ << ": Read indenter output from file " << outSrcFile.fileName();
}
else {
qCritical() << __LINE__ << " " << __FUNCTION__ << ": Couldn't read indenter output from file " << outSrcFile.fileName();
@@ -642,8 +642,8 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
}
// Delete the temporary input and output files.
- QFile::remove(_tempDirctoryStr + "/" + _outputFileName + inputFileExtension);
- QFile::remove(_tempDirctoryStr + "/" + _inputFileName + inputFileExtension);
+ TQFile::remove(_tempDirctoryStr + "/" + _outputFileName + inputFileExtension);
+ TQFile::remove(_tempDirctoryStr + "/" + _inputFileName + inputFileExtension);
return formattedSourceCode;
}
@@ -652,8 +652,8 @@ QString IndentHandler::callExecutableIndenter(QString sourceCode, QString inputF
/*!
\brief Generates and returns a string with all parameters needed to call the indenter.
*/
-QString IndentHandler::getParameterString() {
- QString parameterString = "";
+TQString IndentHandler::getParameterString() {
+ TQString parameterString = "";
// generate parameter string for all boolean values
foreach (ParamBoolean pBoolean, _paramBooleans) {
@@ -672,7 +672,7 @@ QString IndentHandler::getParameterString() {
// generate parameter string for all numeric values
foreach (ParamNumeric pNumeric, _paramNumerics) {
if ( pNumeric.valueEnabledChkBox->isChecked() ) {
- parameterString += pNumeric.paramCallName + QString::number( pNumeric.spinBox->value() ) + _cfgFileParameterEnding;
+ parameterString += pNumeric.paramCallName + TQString::number( pNumeric.spinBox->value() ) + _cfgFileParameterEnding;
}
}
@@ -680,7 +680,7 @@ QString IndentHandler::getParameterString() {
foreach (ParamString pString, _paramStrings) {
if ( !pString.lineEdit->text().isEmpty() && pString.valueEnabledChkBox->isChecked() ) {
// Create parameter definition for each value devided by a | sign.
- foreach (QString paramValue, pString.lineEdit->text().split("|")) {
+ foreach (TQString paramValue, pString.lineEdit->text().split("|")) {
parameterString += pString.paramCallName + paramValue + _cfgFileParameterEnding;
}
}
@@ -700,11 +700,11 @@ QString IndentHandler::getParameterString() {
/*!
\brief Write settings for the indenter to a config file.
*/
-void IndentHandler::saveConfigFile(QString filePathName, QString paramString) {
- QFile::remove( filePathName );
- QFile cfgFile( filePathName );
+void IndentHandler::saveConfigFile(TQString filePathName, TQString paramString) {
+ TQFile::remove( filePathName );
+ TQFile cfgFile( filePathName );
- cfgFile.open( QFile::ReadWrite | QFile::Text );
+ cfgFile.open( TQFile::ReadWrite | TQFile::Text );
cfgFile.write( paramString.toAscii() );
cfgFile.close();
}
@@ -713,13 +713,13 @@ void IndentHandler::saveConfigFile(QString filePathName, QString paramString) {
/*!
\brief Load the config file for the indenter and apply the settings made there.
*/
-bool IndentHandler::loadConfigFile(QString filePathName) {
- QFile cfgFile(filePathName);
+bool IndentHandler::loadConfigFile(TQString filePathName) {
+ TQFile cfgFile(filePathName);
int index;
int crPos;
int paramValue = 0;
- QString paramValueStr = "";
- QString cfgFileData = "";
+ TQString paramValueStr = "";
+ TQString cfgFileData = "";
// If the to be loaded config file does not exist leave all values as they are and return false.
if ( !cfgFile.exists() ) {
@@ -728,7 +728,7 @@ bool IndentHandler::loadConfigFile(QString filePathName) {
// else if the to be read config file exists, retrieve its whole content.
else {
// Open the config file and read all data
- cfgFile.open( QFile::ReadOnly | QFile::Text );
+ cfgFile.open( TQFile::ReadOnly | TQFile::Text );
cfgFileData = cfgFile.readAll();
cfgFile.close();
}
@@ -742,14 +742,14 @@ bool IndentHandler::loadConfigFile(QString filePathName) {
// the true parameter string is longer than the false string
if ( pBoolean.trueString.length() > pBoolean.falseString.length() ) {
// search for the true string
- index = cfgFileData.indexOf( pBoolean.trueString, 0, Qt::CaseInsensitive );
+ index = cfgFileData.indexOf( pBoolean.trueString, 0, TQt::CaseInsensitive );
// if true string found set the parameter value to true
if ( index != -1 ) {
paramValue = true;
}
// if true string not found, search for false string
else {
- index = cfgFileData.indexOf( pBoolean.falseString, 0, Qt::CaseInsensitive );
+ index = cfgFileData.indexOf( pBoolean.falseString, 0, TQt::CaseInsensitive );
// if false string found set the parameter value to false
if ( index != -1 ) {
paramValue = false;
@@ -763,14 +763,14 @@ bool IndentHandler::loadConfigFile(QString filePathName) {
// the false parameter string is longer than the true string
else {
// search for the false string
- index = cfgFileData.indexOf( pBoolean.falseString, 0, Qt::CaseInsensitive );
+ index = cfgFileData.indexOf( pBoolean.falseString, 0, TQt::CaseInsensitive );
// if false string found set the parameter value to false
if ( index != -1 ) {
paramValue = false;
}
// if false string not found, search for true string
else {
- index = cfgFileData.indexOf( pBoolean.trueString, 0, Qt::CaseInsensitive );
+ index = cfgFileData.indexOf( pBoolean.trueString, 0, TQt::CaseInsensitive );
// if true string found set the parameter value to true
if ( index != -1 ) {
paramValue = true;
@@ -786,7 +786,7 @@ bool IndentHandler::loadConfigFile(QString filePathName) {
// Search for name of each numeric parameter and set the value found behind it.
foreach (ParamNumeric pNumeric, _paramNumerics) {
- index = cfgFileData.indexOf( pNumeric.paramCallName, 0, Qt::CaseInsensitive );
+ index = cfgFileData.indexOf( pNumeric.paramCallName, 0, TQt::CaseInsensitive );
// parameter was found in config file
if ( index != -1 ) {
// set index after the parameter name, so in front of the number
@@ -796,14 +796,14 @@ bool IndentHandler::loadConfigFile(QString filePathName) {
crPos = cfgFileData.indexOf( _cfgFileParameterEnding, index+1 );
// get the number and convert it to int
- QString test = cfgFileData.mid( index, crPos - index );
+ TQString test = cfgFileData.mid( index, crPos - index );
paramValue = cfgFileData.mid( index, crPos - index ).toInt(NULL);
// disable the signal-slot connection. Otherwise signal is emmitted each time when value is set
- QObject::disconnect(pNumeric.spinBox, SIGNAL(valueChanged(int)), this, SLOT(handleChangedIndenterSettings()));
+ TQObject::disconnect(pNumeric.spinBox, SIGNAL(valueChanged(int)), this, SLOT(handleChangedIndenterSettings()));
pNumeric.spinBox->setValue( paramValue );
pNumeric.valueEnabledChkBox->setChecked( true );
- QObject::connect(pNumeric.spinBox, SIGNAL(valueChanged(int)), this, SLOT(handleChangedIndenterSettings()));
+ TQObject::connect(pNumeric.spinBox, SIGNAL(valueChanged(int)), this, SLOT(handleChangedIndenterSettings()));
}
// parameter was not found in config file
else {
@@ -818,7 +818,7 @@ bool IndentHandler::loadConfigFile(QString filePathName) {
paramValueStr = "";
// The number of the found values for this parameter name.
int numberOfValues = 0;
- index = cfgFileData.indexOf( pString.paramCallName, 0, Qt::CaseInsensitive );
+ index = cfgFileData.indexOf( pString.paramCallName, 0, TQt::CaseInsensitive );
// If parameter was found in config file
if ( index != -1 ) {
while ( index != -1 ) {
@@ -832,15 +832,15 @@ bool IndentHandler::loadConfigFile(QString filePathName) {
// Get the string and remember it.
if ( numberOfValues < 2 ) {
- paramValueStr = QString( cfgFileData.mid( index, crPos - index ) );
+ paramValueStr = TQString( cfgFileData.mid( index, crPos - index ) );
}
// If the same parameter has been set multiple times, concatenate the strings dvivided by a |.
else {
- paramValueStr = paramValueStr + "|" + QString( cfgFileData.mid( index, crPos - index ) );
+ paramValueStr = paramValueStr + "|" + TQString( cfgFileData.mid( index, crPos - index ) );
}
// Get next value for this setting, if one exists.
- index = cfgFileData.indexOf( pString.paramCallName, crPos+1, Qt::CaseInsensitive );
+ index = cfgFileData.indexOf( pString.paramCallName, crPos+1, TQt::CaseInsensitive );
}
// Set the text for the line edit.
pString.lineEdit->setText( paramValueStr );
@@ -862,7 +862,7 @@ bool IndentHandler::loadConfigFile(QString filePathName) {
// search for all parameter names of the multiple choice list
// if one is found, set it and leave the while loop
while ( i < pMultiple.choicesStrings.count() && index == -1 ) {
- index = cfgFileData.indexOf( pMultiple.choicesStrings.at(i), 0, Qt::CaseInsensitive );
+ index = cfgFileData.indexOf( pMultiple.choicesStrings.at(i), 0, TQt::CaseInsensitive );
if ( index != -1 ) {
pMultiple.comboBox->setCurrentIndex( i );
pMultiple.valueEnabledChkBox->setChecked( true );
@@ -902,7 +902,7 @@ void IndentHandler::resetToDefaultValues() {
// Search for name of each string parameter and set it.
foreach (ParamString pString, _paramStrings) {
- QString defaultValue = _indenterSettings->value(pString.paramName + "/ValueDefault").toString();
+ TQString defaultValue = _indenterSettings->value(pString.paramName + "/ValueDefault").toString();
pString.lineEdit->setText( defaultValue );
pString.valueEnabledChkBox->setChecked( _indenterSettings->value(pString.paramName + "/Enabled").toBool() );
}
@@ -919,15 +919,15 @@ void IndentHandler::resetToDefaultValues() {
/*!
\brief Opens and parses the indenter ini file that is declared by \a iniFilePath.
*/
-void IndentHandler::readIndentIniFile(QString iniFilePath) {
+void IndentHandler::readIndentIniFile(TQString iniFilePath) {
Q_ASSERT_X( !iniFilePath.isEmpty(), "readIndentIniFile", "iniFilePath is empty" );
// open the ini-file that contains all available indenter settings with their additional infos
_indenterSettings = new UiGuiIniFileParser(iniFilePath);
- QStringList categories;
- //QString indenterGroupString = "";
- QString paramToolTip = "";
+ TQStringList categories;
+ //TQString indenterGroupString = "";
+ TQString paramToolTip = "";
//
@@ -960,7 +960,7 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
_fileTypes.replace('|', " ");
// read the categories names which are separated by "|"
- QString categoriesStr = _indenterSettings->value("header/categories").toString();
+ TQString categoriesStr = _indenterSettings->value("header/categories").toString();
categories = categoriesStr.split("|");
// Assure that the category list is never empty. At least contain a "general" section.
if ( categories.isEmpty() ) {
@@ -970,11 +970,11 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
IndenterParameterCategoryPage categoryPage;
// create a page for each category and store its references in a toolboxpage-array
- foreach (QString category, categories) {
- categoryPage.widget = new QWidget();
+ foreach (TQString category, categories) {
+ categoryPage.widget = new TQWidget();
categoryPage.widget->setObjectName(category);
- categoryPage.widget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
- categoryPage.vboxLayout = new QVBoxLayout(categoryPage.widget);
+ categoryPage.widget->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
+ categoryPage.vboxLayout = new TQVBoxLayout(categoryPage.widget);
categoryPage.vboxLayout->setSpacing(6);
categoryPage.vboxLayout->setMargin(9);
categoryPage.vboxLayout->setObjectName(category);
@@ -991,7 +991,7 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
_indenterParameters = _indenterSettings->childGroups();
// read each parameter to create the corresponding input field
- foreach (QString indenterParameter, _indenterParameters) {
+ foreach (TQString indenterParameter, _indenterParameters) {
// if it is not the indent header definition read the parameter and add it to
// the corresponding category toolbox page
if ( indenterParameter != "header") {
@@ -1002,24 +1002,24 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
category = _indenterParameterCategoryPages.size()-1;
}
// read which type of input field the parameter needs
- QString editType = _indenterSettings->value(indenterParameter + "/EditorType").toString();
+ TQString editType = _indenterSettings->value(indenterParameter + "/EditorType").toString();
// edit type is numeric so create a spinbox with label
if ( editType == "numeric" ) {
// read the parameter name as it is used at the command line or in its config file
- QString parameterCallName = _indenterSettings->value(indenterParameter + "/CallName").toString();
+ TQString parameterCallName = _indenterSettings->value(indenterParameter + "/CallName").toString();
// create checkbox which enables or disables the parameter
- QCheckBox *chkBox = new QCheckBox( _indenterParameterCategoryPages.at(category).widget );
+ TQCheckBox *chkBox = new TQCheckBox( _indenterParameterCategoryPages.at(category).widget );
chkBox->setChecked( _indenterSettings->value(indenterParameter + "/Enabled").toBool() );
chkBox->setToolTip( "Enables/disables the parameter. If disabled the indenters default value will be used." );
- chkBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ chkBox->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
int left, top, right, bottom;
chkBox->getContentsMargins( &left, &top, &right, &bottom );
chkBox->setContentsMargins( left, top, 0, bottom );
// create the spinbox
- QSpinBox *spinBox = new QSpinBox( _indenterParameterCategoryPages.at(category).widget );
+ TQSpinBox *spinBox = new TQSpinBox( _indenterParameterCategoryPages.at(category).widget );
paramToolTip = _indenterSettings->value(indenterParameter + "/Description").toString();
spinBox->setToolTip( paramToolTip );
spinBox->setMaximumWidth(50);
@@ -1041,7 +1041,7 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
}
// create the label
- QLabel *label = new QLabel( _indenterParameterCategoryPages.at(category).widget );
+ TQLabel *label = new TQLabel( _indenterParameterCategoryPages.at(category).widget );
label->setText(indenterParameter);
label->setBuddy(spinBox);
label->setToolTip( paramToolTip );
@@ -1050,7 +1050,7 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
}
// put all into a layout and add it to the toolbox page
- QHBoxLayout *hboxLayout = new QHBoxLayout();
+ TQHBoxLayout *hboxLayout = new TQHBoxLayout();
hboxLayout->addWidget(chkBox);
hboxLayout->addWidget(spinBox);
hboxLayout->addWidget(label);
@@ -1066,8 +1066,8 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
paramNumeric.spinBox->setValue( _indenterSettings->value(paramNumeric.paramName + "/ValueDefault").toInt() );
_paramNumerics.append(paramNumeric);
- QObject::connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(handleChangedIndenterSettings()));
- QObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
+ TQObject::connect(spinBox, SIGNAL(valueChanged(int)), this, SLOT(handleChangedIndenterSettings()));
+ TQObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
connect( spinBox, SIGNAL(valueChanged(int)), this, SLOT(updateDrawing()) );
#endif // UNIVERSALINDENTGUI_NPP_EXPORTS
@@ -1075,7 +1075,7 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
// edit type is boolean so create a checkbox
else if ( editType == "boolean" ) {
// create the checkbox, make its settings and add it to the toolbox page
- QCheckBox *chkBox = new QCheckBox( _indenterParameterCategoryPages.at(category).widget );
+ TQCheckBox *chkBox = new TQCheckBox( _indenterParameterCategoryPages.at(category).widget );
chkBox->setText(indenterParameter);
paramToolTip = _indenterSettings->value(indenterParameter + "/Description").toString();
chkBox->setToolTip( paramToolTip );
@@ -1088,30 +1088,30 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
ParamBoolean paramBoolean;
paramBoolean.paramName = indenterParameter;
paramBoolean.checkBox = chkBox;
- QStringList trueFalseStrings = _indenterSettings->value(indenterParameter + "/TrueFalse").toString().split("|");
+ TQStringList trueFalseStrings = _indenterSettings->value(indenterParameter + "/TrueFalse").toString().split("|");
paramBoolean.trueString = trueFalseStrings.at(0);
paramBoolean.falseString = trueFalseStrings.at(1);
paramBoolean.checkBox->setChecked( _indenterSettings->value(paramBoolean.paramName + "/ValueDefault").toBool() );
_paramBooleans.append(paramBoolean);
- QObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
+ TQObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
}
// edit type is numeric so create a line edit with label
else if ( editType == "string" ) {
// read the parameter name as it is used at the command line or in its config file
- QString parameterCallName = _indenterSettings->value(indenterParameter + "/CallName").toString();
+ TQString parameterCallName = _indenterSettings->value(indenterParameter + "/CallName").toString();
// create check box which enables or disables the parameter
- QCheckBox *chkBox = new QCheckBox( _indenterParameterCategoryPages.at(category).widget );
+ TQCheckBox *chkBox = new TQCheckBox( _indenterParameterCategoryPages.at(category).widget );
chkBox->setChecked( _indenterSettings->value(indenterParameter + "/Enabled").toBool() );
chkBox->setToolTip( "Enables/disables the parameter. If disabled the indenters default value will be used." );
- chkBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ chkBox->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
int left, top, right, bottom;
chkBox->getContentsMargins( &left, &top, &right, &bottom );
chkBox->setContentsMargins( left, top, 0, bottom );
// create the line edit
- QLineEdit *lineEdit = new QLineEdit( _indenterParameterCategoryPages.at(category).widget );
+ TQLineEdit *lineEdit = new TQLineEdit( _indenterParameterCategoryPages.at(category).widget );
paramToolTip = _indenterSettings->value(indenterParameter + "/Description").toString();
lineEdit->setToolTip( paramToolTip );
lineEdit->setMaximumWidth(50);
@@ -1121,17 +1121,17 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
}
// create the label
- QLabel *label = new QLabel( _indenterParameterCategoryPages.at(category).widget );
+ TQLabel *label = new TQLabel( _indenterParameterCategoryPages.at(category).widget );
label->setText(indenterParameter);
label->setBuddy(lineEdit);
- label->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred);
+ label->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred);
label->setToolTip( paramToolTip );
if ( _mainWindow != NULL ) {
label->installEventFilter( _mainWindow );
}
// put all into a layout and add it to the toolbox page
- QHBoxLayout *hboxLayout = new QHBoxLayout();
+ TQHBoxLayout *hboxLayout = new TQHBoxLayout();
hboxLayout->addWidget(chkBox);
hboxLayout->addWidget(lineEdit);
hboxLayout->addWidget(label);
@@ -1147,30 +1147,30 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
paramString.lineEdit->setText( _indenterSettings->value(paramString.paramName + "/ValueDefault").toString() );
_paramStrings.append(paramString);
- QObject::connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(handleChangedIndenterSettings()));
- QObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
+ TQObject::connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(handleChangedIndenterSettings()));
+ TQObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
- connect( lineEdit, SIGNAL(textChanged(const QString)), this, SLOT(updateDrawing()) );
+ connect( lineEdit, SIGNAL(textChanged(const TQString)), this, SLOT(updateDrawing()) );
#endif // UNIVERSALINDENTGUI_NPP_EXPORTS
}
// edit type is multiple so create a combobox with label
else if ( editType == "multiple" ) {
// read the parameter name as it is used at the command line or in its config file
- QString parameterCallName = _indenterSettings->value(indenterParameter + "/CallName").toString();
+ TQString parameterCallName = _indenterSettings->value(indenterParameter + "/CallName").toString();
// create checkbox which enables or disables the parameter
- QCheckBox *chkBox = new QCheckBox( _indenterParameterCategoryPages.at(category).widget );
+ TQCheckBox *chkBox = new TQCheckBox( _indenterParameterCategoryPages.at(category).widget );
chkBox->setChecked( _indenterSettings->value(indenterParameter + "/Enabled").toBool() );
chkBox->setToolTip( "Enables/disables the parameter. If disabled the indenters default value will be used." );
- chkBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ chkBox->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
int left, top, right, bottom;
chkBox->getContentsMargins( &left, &top, &right, &bottom );
chkBox->setContentsMargins( left, top, 0, bottom );
// create the combo box
- QComboBox *comboBox = new QComboBox( _indenterParameterCategoryPages.at(category).widget );
- QStringList choicesStrings = _indenterSettings->value(indenterParameter + "/Choices").toString().split("|");
- QStringList choicesStringsReadable = _indenterSettings->value(indenterParameter + "/ChoicesReadable").toString().split("|", QString::SkipEmptyParts);
+ TQComboBox *comboBox = new TQComboBox( _indenterParameterCategoryPages.at(category).widget );
+ TQStringList choicesStrings = _indenterSettings->value(indenterParameter + "/Choices").toString().split("|");
+ TQStringList choicesStringsReadable = _indenterSettings->value(indenterParameter + "/ChoicesReadable").toString().split("|", TQString::SkipEmptyParts);
if ( choicesStringsReadable.isEmpty() ) {
comboBox->addItems( choicesStrings );
}
@@ -1184,7 +1184,7 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
}
// put all into a layout and add it to the toolbox page
- QHBoxLayout *hboxLayout = new QHBoxLayout();
+ TQHBoxLayout *hboxLayout = new TQHBoxLayout();
hboxLayout->addWidget(chkBox);
hboxLayout->addWidget(comboBox);
_indenterParameterCategoryPages.at(category).vboxLayout->addLayout(hboxLayout);
@@ -1200,8 +1200,8 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
paramMultiple.comboBox->setCurrentIndex( _indenterSettings->value(paramMultiple.paramName + "/ValueDefault").toInt() );
_paramMultiples.append(paramMultiple);
- QObject::connect(comboBox, SIGNAL(activated(int)), this, SLOT(handleChangedIndenterSettings()));
- QObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
+ TQObject::connect(comboBox, SIGNAL(activated(int)), this, SLOT(handleChangedIndenterSettings()));
+ TQObject::connect(chkBox, SIGNAL(clicked()), this, SLOT(handleChangedIndenterSettings()));
#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
connect( comboBox, SIGNAL(activated(int)), this, SLOT(updateDrawing()) );
#endif // UNIVERSALINDENTGUI_NPP_EXPORTS
@@ -1220,18 +1220,18 @@ void IndentHandler::readIndentIniFile(QString iniFilePath) {
\brief Searches and returns all indenters a configuration file is found for.
Opens all uigui ini files found in the list \a _indenterIniFileList, opens each ini file
- and reads the there defined real name of the indenter. These names are being returned as QStringList.
+ and reads the there defined real name of the indenter. These names are being returned as TQStringList.
*/
-QStringList IndentHandler::getAvailableIndenters() {
- QStringList indenterNamesList;
+TQStringList IndentHandler::getAvailableIndenters() {
+ TQStringList indenterNamesList;
// Loop for every existing uigui ini file
- foreach (QString indenterIniFile, _indenterIniFileList) {
+ foreach (TQString indenterIniFile, _indenterIniFileList) {
// Open the ini file and search for the indenter name
- QFile file(_indenterDirctoryStr + "/" + indenterIniFile);
- if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) {
+ TQFile file(_indenterDirctoryStr + "/" + indenterIniFile);
+ if ( file.open(TQIODevice::ReadOnly | TQIODevice::Text) ) {
int index = -1;
- QByteArray line;
+ TQByteArray line;
// Search for the string "indenterName=" and get the following string until line end.
while ( index == -1 && !file.atEnd() ) {
line = file.readLine();
@@ -1252,14 +1252,14 @@ QStringList IndentHandler::getAvailableIndenters() {
\brief Deletes all elements in the toolbox and initializes the indenter selected by \a indenterID.
*/
void IndentHandler::setIndenter(int indenterID) {
- QApplication::setOverrideCursor(Qt::WaitCursor);
+ TQApplication::setOverrideCursor(TQt::WaitCursor);
#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
disconnect( _indenterParameterCategoriesToolBox, SIGNAL(currentChanged(int)), this, SLOT(updateDrawing()) );
#endif // UNIVERSALINDENTGUI_NPP_EXPORTS
// Generate the parameter string that will be saved to the indenters config file.
- QString parameterString = getParameterString();
+ TQString parameterString = getParameterString();
if ( !_indenterFileName.isEmpty() ) {
saveConfigFile( _settingsDirctoryStr + "/" + _indenterFileName + ".cfg", parameterString );
}
@@ -1291,7 +1291,7 @@ void IndentHandler::setIndenter(int indenterID) {
delete _indenterSettings;
#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
- QWidget dummyWidget;
+ TQWidget dummyWidget;
_indenterParameterCategoriesToolBox->addItem(&dummyWidget, "dummyText");
#endif
@@ -1305,7 +1305,7 @@ void IndentHandler::setIndenter(int indenterID) {
handleChangedIndenterSettings();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
connect( _indenterParameterCategoriesToolBox, SIGNAL(currentChanged(int)), this, SLOT(updateDrawing()) );
@@ -1317,7 +1317,7 @@ void IndentHandler::setIndenter(int indenterID) {
/*!
\brief Returns a string containing by the indenter supported file types/extensions divided by a space.
*/
-QString IndentHandler::getPossibleIndenterFileExtensions() {
+TQString IndentHandler::getPossibleIndenterFileExtensions() {
return _fileTypes;
}
@@ -1325,8 +1325,8 @@ QString IndentHandler::getPossibleIndenterFileExtensions() {
/*!
\brief Returns the path and filename of the current indenter config file.
*/
-QString IndentHandler::getIndenterCfgFile() {
- QFileInfo fileInfo( _indenterDirctoryStr + "/" + _globalConfigFilename );
+TQString IndentHandler::getIndenterCfgFile() {
+ TQFileInfo fileInfo( _indenterDirctoryStr + "/" + _globalConfigFilename );
return fileInfo.absoluteFilePath();
}
@@ -1335,7 +1335,7 @@ QString IndentHandler::getIndenterCfgFile() {
\brief Tries to create a call path string for the indenter executable. If successful returns true.
*/
bool IndentHandler::createIndenterCallString() {
- QProcess indentProcess;
+ TQProcess indentProcess;
if ( _indenterFileName.isEmpty() ) {
return false;
@@ -1345,23 +1345,23 @@ bool IndentHandler::createIndenterCallString() {
// ------------------------------------------------------------------------
// Set the directory for the indenter execution
- indentProcess.setWorkingDirectory( QFileInfo(_indenterDirctoryStr).absoluteFilePath() );
+ indentProcess.setWorkingDirectory( TQFileInfo(_indenterDirctoryStr).absoluteFilePath() );
- foreach ( QString suffix, QStringList() << "" << ".exe" << ".bat" << ".com" << ".sh" ) {
+ foreach ( TQString suffix, TQStringList() << "" << ".exe" << ".bat" << ".com" << ".sh" ) {
_indenterExecutableSuffix = suffix;
- _indenterExecutableCallString = QFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/" + _indenterFileName;
+ _indenterExecutableCallString = TQFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/" + _indenterFileName;
_indenterExecutableCallString += suffix;
// Only try to call the indenter, if the file exists.
- if ( QFile::exists(_indenterExecutableCallString) ) {
+ if ( TQFile::exists(_indenterExecutableCallString) ) {
// Only try to call the indenter directly if it is no php file
- if ( QFileInfo(_indenterExecutableCallString).suffix().toLower() != "php" ) {
+ if ( TQFileInfo(_indenterExecutableCallString).suffix().toLower() != "php" ) {
indentProcess.start( "\"" + _indenterExecutableCallString + + "\" " + _indenterShowHelpParameter );
if ( indentProcess.waitForFinished(2000) ) {
_indenterExecutableCallString = "\"" + _indenterExecutableCallString + "\"";
return true;
}
- else if ( indentProcess.error() == QProcess::Timedout ) {
+ else if ( indentProcess.error() == TQProcess::Timedout ) {
_indenterExecutableCallString = "\"" + _indenterExecutableCallString + "\"";
return true;
}
@@ -1370,18 +1370,18 @@ bool IndentHandler::createIndenterCallString() {
// Test for needed interpreters
// ----------------------------
// If the file could not be executed, try to find a shebang at its start or test if its a php file.
- QString interpreterName = "";
- QFile indenterExecutable( _indenterExecutableCallString );
+ TQString interpreterName = "";
+ TQFile indenterExecutable( _indenterExecutableCallString );
// If indenter executable file has .php as suffix, use php as default interpreter
- if ( QFileInfo(_indenterExecutableCallString).suffix().toLower() == "php" ) {
+ if ( TQFileInfo(_indenterExecutableCallString).suffix().toLower() == "php" ) {
interpreterName = "php -f";
}
// Else try to open the file and read the shebang.
- else if ( indenterExecutable.open(QFile::ReadOnly) ) {
+ else if ( indenterExecutable.open(TQFile::ReadOnly) ) {
// Read the first line of the file.
- QTextStream indenterExecutableContent(&indenterExecutable);
- QString firstLineOfIndenterExe = indenterExecutableContent.readLine(75);
+ TQTextStream indenterExecutableContent(&indenterExecutable);
+ TQString firstLineOfIndenterExe = indenterExecutableContent.readLine(75);
indenterExecutable.close();
// If the initial shebang is found, read the named intepreter. e.g. perl
@@ -1398,7 +1398,7 @@ bool IndentHandler::createIndenterCallString() {
if ( indentProcess.waitForFinished(2000) ) {
return true;
}
- else if ( indentProcess.error() == QProcess::Timedout ) {
+ else if ( indentProcess.error() == TQProcess::Timedout ) {
return true;
}
// now we know an interpreter is needed but it could not be called, so inform the user.
@@ -1415,23 +1415,23 @@ bool IndentHandler::createIndenterCallString() {
// If unsuccessful try if the indenter executable is a JavaScript file
// -------------------------------------------------------------------
_indenterExecutableSuffix = ".js";
- _indenterExecutableCallString = QFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/" + _indenterFileName;
+ _indenterExecutableCallString = TQFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/" + _indenterFileName;
_indenterExecutableCallString += _indenterExecutableSuffix;
- if ( QFile::exists(_indenterExecutableCallString) ) {
+ if ( TQFile::exists(_indenterExecutableCallString) ) {
return true;
}
// If unsuccessful try to call the indenter global, using some suffix
// ------------------------------------------------------------------
- foreach ( QString suffix, QStringList() << "" << ".exe" << ".bat" << ".com" << ".sh" ) {
+ foreach ( TQString suffix, TQStringList() << "" << ".exe" << ".bat" << ".com" << ".sh" ) {
_indenterExecutableSuffix = suffix;
_indenterExecutableCallString = _indenterFileName + suffix;
indentProcess.start( _indenterExecutableCallString + " " + _indenterShowHelpParameter );
if ( indentProcess.waitForFinished(2000) ) {
return true;
}
- else if ( indentProcess.error() == QProcess::Timedout ) {
+ else if ( indentProcess.error() == TQProcess::Timedout ) {
return true;
}
}
@@ -1439,12 +1439,12 @@ bool IndentHandler::createIndenterCallString() {
// If even globally calling the indenter fails, try calling .com and .exe via wine
// -------------------------------------------------------------------------------
- _indenterExecutableCallString = "\"" + QFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/" + _indenterFileName;
+ _indenterExecutableCallString = "\"" + TQFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/" + _indenterFileName;
- foreach ( QString suffix, QStringList() << ".exe" << ".com" ) {
+ foreach ( TQString suffix, TQStringList() << ".exe" << ".com" ) {
_indenterExecutableSuffix = suffix;
- if ( QFile::exists(_indenterDirctoryStr + "/" + _indenterFileName + suffix) ) {
- QProcess wineTestProcess;
+ if ( TQFile::exists(_indenterDirctoryStr + "/" + _indenterFileName + suffix) ) {
+ TQProcess wineTestProcess;
wineTestProcess.start("wine --version");
// if the process of wine was not callable assume that wine is not installed
if ( !wineTestProcess.waitForFinished(2000) ) {
@@ -1453,7 +1453,7 @@ bool IndentHandler::createIndenterCallString() {
return false;
}
else {
- _indenterExecutableCallString = "\"" + QFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/";
+ _indenterExecutableCallString = "\"" + TQFileInfo(_indenterDirctoryStr).absoluteFilePath() + "/";
_indenterExecutableCallString += _indenterFileName + suffix + "\"";
_indenterExecutableCallString = "wine " + _indenterExecutableCallString;
@@ -1471,7 +1471,7 @@ bool IndentHandler::createIndenterCallString() {
/*!
\brief Returns a string that points to where the indenters manual can be found.
*/
-QString IndentHandler::getManual() {
+TQString IndentHandler::getManual() {
if ( _indenterSettings != NULL ) {
return _indenterSettings->value("header/manual").toString();
}
@@ -1485,8 +1485,8 @@ QString IndentHandler::getManual() {
\brief This slot gets the reference to the indenters manual and opens it.
*/
void IndentHandler::showIndenterManual() {
- QString manualReference = getManual();
- QDesktopServices::openUrl( manualReference );
+ TQString manualReference = getManual();
+ TQDesktopServices::openUrl( manualReference );
}
@@ -1497,29 +1497,29 @@ void IndentHandler::retranslateUi() {
_indenterSelectionCombobox->setToolTip( tr("<html><head><meta name=\"qrichtext\" content=\"1\" /></head><body style=\" white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Shows the currently chosen indenters name and lets you choose other available indenters</p></body></html>") );
_indenterParameterHelpButton->setToolTip( tr("Brings you to the online manual of the currently selected indenter, where you can get further help on the possible parameters.") );
- _actionLoadIndenterConfigFile->setText(QApplication::translate("IndentHandler", "Load Indenter Config File", 0, QApplication::UnicodeUTF8));
- _actionLoadIndenterConfigFile->setStatusTip(QApplication::translate("IndentHandler", "Opens a file dialog to load the original config file of the indenter.", 0, QApplication::UnicodeUTF8));
- _actionLoadIndenterConfigFile->setShortcut(QApplication::translate("IndentHandler", "Alt+O", 0, QApplication::UnicodeUTF8));
+ _actionLoadIndenterConfigFile->setText(TQApplication::translate("IndentHandler", "Load Indenter Config File", 0, TQApplication::UnicodeUTF8));
+ _actionLoadIndenterConfigFile->setStatusTip(TQApplication::translate("IndentHandler", "Opens a file dialog to load the original config file of the indenter.", 0, TQApplication::UnicodeUTF8));
+ _actionLoadIndenterConfigFile->setShortcut(TQApplication::translate("IndentHandler", "Alt+O", 0, TQApplication::UnicodeUTF8));
- _actionSaveIndenterConfigFile->setText(QApplication::translate("IndentHandler", "Save Indenter Config File", 0, QApplication::UnicodeUTF8));
- _actionSaveIndenterConfigFile->setStatusTip(QApplication::translate("IndentHandler", "Opens a dialog to save the current indenter configuration to a file.", 0, QApplication::UnicodeUTF8));
- _actionSaveIndenterConfigFile->setShortcut(QApplication::translate("IndentHandler", "Alt+S", 0, QApplication::UnicodeUTF8));
+ _actionSaveIndenterConfigFile->setText(TQApplication::translate("IndentHandler", "Save Indenter Config File", 0, TQApplication::UnicodeUTF8));
+ _actionSaveIndenterConfigFile->setStatusTip(TQApplication::translate("IndentHandler", "Opens a dialog to save the current indenter configuration to a file.", 0, TQApplication::UnicodeUTF8));
+ _actionSaveIndenterConfigFile->setShortcut(TQApplication::translate("IndentHandler", "Alt+S", 0, TQApplication::UnicodeUTF8));
- _actionCreateShellScript->setText(QApplication::translate("IndentHandler", "Create Indenter Call Shell Script", 0, QApplication::UnicodeUTF8));
- _actionCreateShellScript->setToolTip(QApplication::translate("IndentHandler", "Create a shell script that calls the current selected indenter for formatting an as parameter given file with the current indent settings.", 0, QApplication::UnicodeUTF8));
- _actionCreateShellScript->setStatusTip(QApplication::translate("IndentHandler", "Create a shell script that calls the current selected indenter for formatting an as parameter given file with the current indent settings.", 0, QApplication::UnicodeUTF8));
+ _actionCreateShellScript->setText(TQApplication::translate("IndentHandler", "Create Indenter Call Shell Script", 0, TQApplication::UnicodeUTF8));
+ _actionCreateShellScript->setToolTip(TQApplication::translate("IndentHandler", "Create a shell script that calls the current selected indenter for formatting an as parameter given file with the current indent settings.", 0, TQApplication::UnicodeUTF8));
+ _actionCreateShellScript->setStatusTip(TQApplication::translate("IndentHandler", "Create a shell script that calls the current selected indenter for formatting an as parameter given file with the current indent settings.", 0, TQApplication::UnicodeUTF8));
- _actionResetIndenterParameters->setText(QApplication::translate("IndentHandler", "Reset indenter parameters", 0, QApplication::UnicodeUTF8));
- _actionResetIndenterParameters->setToolTip(QApplication::translate("IndentHandler", "Resets all indenter parameters to the default values.", 0, QApplication::UnicodeUTF8));
- _actionResetIndenterParameters->setStatusTip(QApplication::translate("IndentHandler", "Resets all indenter parameters to the default values.", 0, QApplication::UnicodeUTF8));
+ _actionResetIndenterParameters->setText(TQApplication::translate("IndentHandler", "Reset indenter parameters", 0, TQApplication::UnicodeUTF8));
+ _actionResetIndenterParameters->setToolTip(TQApplication::translate("IndentHandler", "Resets all indenter parameters to the default values.", 0, TQApplication::UnicodeUTF8));
+ _actionResetIndenterParameters->setStatusTip(TQApplication::translate("IndentHandler", "Resets all indenter parameters to the default values.", 0, TQApplication::UnicodeUTF8));
}
/*!
\brief Returns the name of the currently selected indenter.
*/
-QString IndentHandler::getCurrentIndenterName() {
- QString currentIndenterName = _indenterSelectionCombobox->currentText();
+TQString IndentHandler::getCurrentIndenterName() {
+ TQString currentIndenterName = _indenterSelectionCombobox->currentText();
// Remove the supported programming languages from indenters name, which are set in braces.
if ( currentIndenterName.indexOf("(") > 0 ) {
@@ -1537,9 +1537,9 @@ QString IndentHandler::getCurrentIndenterName() {
If the file was successfully opened the indent handler is called to load the settings and update itself.
*/
void IndentHandler::openConfigFileDialog() {
- QString configFilePath;
+ TQString configFilePath;
- configFilePath = QFileDialog::getOpenFileName( NULL, tr("Choose indenter config file"), getIndenterCfgFile(), "All files (*.*)" );
+ configFilePath = TQFileDialog::getOpenFileName( NULL, tr("Choose indenter config file"), getIndenterCfgFile(), "All files (*.*)" );
if (configFilePath != "") {
// If the config file was loaded successfully, inform any who is interested about it.
@@ -1555,15 +1555,15 @@ void IndentHandler::openConfigFileDialog() {
If the file already exists and it should be overwritten, a warning is shown before.
*/
void IndentHandler::saveasIndentCfgFileDialog() {
- QString fileExtensions = tr("All files")+" (*.*)";
+ TQString fileExtensions = tr("All files")+" (*.*)";
- //QString openedSourceFileContent = openFileDialog( tr("Choose source code file"), "./", fileExtensions );
- QString fileName = QFileDialog::getSaveFileName( this, tr("Save indent config file"), getIndenterCfgFile(), fileExtensions);
+ //TQString openedSourceFileContent = openFileDialog( tr("Choose source code file"), "./", fileExtensions );
+ TQString fileName = TQFileDialog::getSaveFileName( this, tr("Save indent config file"), getIndenterCfgFile(), fileExtensions);
if (fileName != "") {
- QFile::remove(fileName);
- QFile outCfgFile(fileName);
- outCfgFile.open( QFile::ReadWrite | QFile::Text );
+ TQFile::remove(fileName);
+ TQFile outCfgFile(fileName);
+ outCfgFile.open( TQFile::ReadWrite | TQFile::Text );
outCfgFile.write( getParameterString().toAscii() );
outCfgFile.close();
}
@@ -1577,19 +1577,19 @@ void IndentHandler::saveasIndentCfgFileDialog() {
other application and open a save dialog for saving the shell script.
*/
void IndentHandler::createIndenterCallShellScript() {
- QString shellScriptExtension;
+ TQString shellScriptExtension;
#if defined(Q_OS_WIN32)
shellScriptExtension = "bat";
#else
shellScriptExtension = "sh";
#endif
- QString fileExtensions = tr("Shell Script")+" (*."+shellScriptExtension+");;"+tr("All files")+" (*.*)";
+ TQString fileExtensions = tr("Shell Script")+" (*."+shellScriptExtension+");;"+tr("All files")+" (*.*)";
- QString currentIndenterName = getCurrentIndenterName();
+ TQString currentIndenterName = getCurrentIndenterName();
currentIndenterName = currentIndenterName.replace(" ", "_");
- QString shellScriptFileName = QFileDialog::getSaveFileName( this, tr("Save shell script"), "call_"+currentIndenterName+"."+shellScriptExtension, fileExtensions);
+ TQString shellScriptFileName = TQFileDialog::getSaveFileName( this, tr("Save shell script"), "call_"+currentIndenterName+"."+shellScriptExtension, fileExtensions);
// Saving has been canceled if the filename is empty
if ( shellScriptFileName.isEmpty() ) {
@@ -1597,28 +1597,28 @@ void IndentHandler::createIndenterCallShellScript() {
}
// Delete any old file, write the new contents and set executable permissions.
- QFile::remove(shellScriptFileName);
- QFile outSrcFile(shellScriptFileName);
- if ( outSrcFile.open( QFile::ReadWrite | QFile::Text ) ) {
- QString shellScriptConfigFilename = QFileInfo(shellScriptFileName).baseName() + "." + QFileInfo(_globalConfigFilename).suffix();
+ TQFile::remove(shellScriptFileName);
+ TQFile outSrcFile(shellScriptFileName);
+ if ( outSrcFile.open( TQFile::ReadWrite | TQFile::Text ) ) {
+ TQString shellScriptConfigFilename = TQFileInfo(shellScriptFileName).baseName() + "." + TQFileInfo(_globalConfigFilename).suffix();
// Get the content of the shell/batch script.
- QString indenterCallShellScript = generateShellScript(shellScriptConfigFilename);
+ TQString indenterCallShellScript = generateShellScript(shellScriptConfigFilename);
// Replace placeholder for script name in script template.
- indenterCallShellScript = indenterCallShellScript.replace( "__INDENTERCALLSTRINGSCRIPTNAME__", QFileInfo(shellScriptFileName).fileName() );
+ indenterCallShellScript = indenterCallShellScript.replace( "__INDENTERCALLSTRINGSCRIPTNAME__", TQFileInfo(shellScriptFileName).fileName() );
outSrcFile.write( indenterCallShellScript.toAscii() );
#if !defined(Q_OS_WIN32)
// For none Windows systems set the files executable flag
- outSrcFile.setPermissions( outSrcFile.permissions() | QFile::ExeOwner | QFile::ExeUser| QFile::ExeGroup );
+ outSrcFile.setPermissions( outSrcFile.permissions() | TQFile::ExeOwner | TQFile::ExeUser| TQFile::ExeGroup );
#endif
outSrcFile.close();
// Save the indenter config file to the same directory, where the shell srcipt was saved to,
// because the script will reference it there via "./".
if ( !_globalConfigFilename.isEmpty() ) {
- saveConfigFile( QFileInfo(shellScriptFileName).path() + "/" + shellScriptConfigFilename, getParameterString() );
+ saveConfigFile( TQFileInfo(shellScriptFileName).path() + "/" + shellScriptConfigFilename, getParameterString() );
}
}
}
@@ -1629,8 +1629,8 @@ void IndentHandler::createIndenterCallShellScript() {
but asks the user whether to do it really.
*/
void IndentHandler::resetIndenterParameter() {
- int messageBoxAnswer = QMessageBox::question(this, tr("Really reset parameters?"), tr("Do you really want to reset the indenter parameters to the default values?"), QMessageBox::Yes | QMessageBox::Abort );
- if ( messageBoxAnswer == QMessageBox::Yes ) {
+ int messageBoxAnswer = TQMessageBox::question(this, tr("Really reset parameters?"), tr("Do you really want to reset the indenter parameters to the default values?"), TQMessageBox::Yes | TQMessageBox::Abort );
+ if ( messageBoxAnswer == TQMessageBox::Yes ) {
resetToDefaultValues();
}
}
@@ -1641,18 +1641,18 @@ void IndentHandler::resetIndenterParameter() {
Is needed for use as Notepad++ plugin.
*/
-bool IndentHandler::event( QEvent *event ) {
- if ( event->type() == QEvent::WindowActivate ) {
+bool IndentHandler::event( TQEvent *event ) {
+ if ( event->type() == TQEvent::WindowActivate ) {
event->accept();
return true;
}
- else if ( event->type() == QEvent::WindowDeactivate ) {
+ else if ( event->type() == TQEvent::WindowDeactivate ) {
event->accept();
return true;
}
else {
event->ignore();
- return QWidget::event(event);
+ return TQWidget::event(event);
}
}
@@ -1697,7 +1697,7 @@ void IndentHandler::setWindowClosedCallback( void(*winClosedCallback)(void) ) {
Is needed for use as Notepad++ plugin.
*/
-void IndentHandler::closeEvent(QCloseEvent *event) {
+void IndentHandler::closeEvent(TQCloseEvent *event) {
if ( _windowClosedCallback != NULL ) {
_windowClosedCallback();
}
@@ -1716,7 +1716,7 @@ int IndentHandler::getIndenterId() {
void IndentHandler::updateDrawing() {
#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
if ( isVisible() ) {
- QRect savedGeometry = geometry();
+ TQRect savedGeometry = geometry();
setGeometry( savedGeometry.adjusted(0,0,0,1) );
repaint();
setGeometry( savedGeometry );
@@ -1724,10 +1724,10 @@ void IndentHandler::updateDrawing() {
#endif // UNIVERSALINDENTGUI_NPP_EXPORTS
}
-void IndentHandler::wheelEvent( QWheelEvent *event ) {
+void IndentHandler::wheelEvent( TQWheelEvent *event ) {
UNUSED_PARAMETER_WARNING_AVOID(event);
#ifdef UNIVERSALINDENTGUI_NPP_EXPORTS
- QWidget::wheelEvent( event );
+ TQWidget::wheelEvent( event );
updateDrawing();
#endif // UNIVERSALINDENTGUI_NPP_EXPORTS
}
@@ -1737,8 +1737,8 @@ void IndentHandler::wheelEvent( QWheelEvent *event ) {
\brief Converts characters < > and & in the \a text to HTML codes &lt &gt and &amp.
*/
//TODO: This function should go into a string helper/tool class/file.
-QString IndentHandler::encodeToHTML(const QString &text) {
- QString htmlText = text;
+TQString IndentHandler::encodeToHTML(const TQString &text) {
+ TQString htmlText = text;
htmlText.replace("&", "&amp;");
htmlText.replace("<", "&lt;");
htmlText.replace(">", "&gt;");
diff --git a/src/IndentHandler.h b/src/IndentHandler.h
index 3f20d82..7de1f26 100755
--- a/src/IndentHandler.h
+++ b/src/IndentHandler.h
@@ -20,44 +20,44 @@
#ifndef INDENTHANDLER_H
#define INDENTHANDLER_H
-#include <tqwidget.h>
+#include <tntqwidget.h>
class UiGuiErrorMessage;
class UiGuiIniFileParser;
-class QMenu;
-class QVBoxLayout;
-class QLabel;
-class QSpinBox;
-class QComboBox;
-class QCheckBox;
-class QLineEdit;
-class QToolButton;
-class QToolBox;
+class TQMenu;
+class TQVBoxLayout;
+class TQLabel;
+class TQSpinBox;
+class TQComboBox;
+class TQCheckBox;
+class TQLineEdit;
+class TQToolButton;
+class TQToolBox;
-class IndentHandler : public QWidget
+class IndentHandler : public TQWidget
{
Q_OBJECT
public:
- IndentHandler(int indenterID, QWidget *mainWindow = NULL, QWidget *parent = NULL);
+ IndentHandler(int indenterID, TQWidget *mainWindow = NULL, TQWidget *parent = NULL);
~IndentHandler();
- QString generateShellScript(const QString &configFilename);
- QString callIndenter(QString sourceCode, QString inputFileExtension);
- bool loadConfigFile(QString filePathName);
+ TQString generateShellScript(const TQString &configFilename);
+ TQString callIndenter(TQString sourceCode, TQString inputFileExtension);
+ bool loadConfigFile(TQString filePathName);
void resetToDefaultValues();
- QStringList getAvailableIndenters();
- QString getPossibleIndenterFileExtensions();
- QString getParameterString();
- QString getIndenterCfgFile();
- QString getManual();
+ TQStringList getAvailableIndenters();
+ TQString getPossibleIndenterFileExtensions();
+ TQString getParameterString();
+ TQString getIndenterCfgFile();
+ TQString getManual();
void retranslateUi();
- QString getCurrentIndenterName();
- QMenu* getIndenterMenu();
- QList<QAction*> getIndenterMenuActions();
- void contextMenuEvent( QContextMenuEvent *event );
+ TQString getCurrentIndenterName();
+ TQMenu* getIndenterMenu();
+ TQList<TQAction*> getIndenterMenuActions();
+ void contextMenuEvent( TQContextMenuEvent *event );
void setParameterChangedCallback( void(*paramChangedCallback)(void) );
void setWindowClosedCallback( void(*winClosedCallback)(void) );
int getIndenterId();
@@ -67,9 +67,9 @@ signals:
void selectedIndenterIndexChanged(int index);
protected:
- bool event( QEvent *event );
- void closeEvent(QCloseEvent *event);
- void wheelEvent( QWheelEvent *event );
+ bool event( TQEvent *event );
+ void closeEvent(TQCloseEvent *event);
+ void wheelEvent( TQWheelEvent *event );
private slots:
void setIndenter(int indenterID);
@@ -82,102 +82,102 @@ private slots:
void updateDrawing();
private:
- QString callExecutableIndenter(QString sourceCode, QString inputFileExtension);
- QString callJavaScriptIndenter(QString sourceCode);
- void saveConfigFile(QString filePathName, QString parameterString);
- void readIndentIniFile(QString iniFilePath);
+ TQString callExecutableIndenter(TQString sourceCode, TQString inputFileExtension);
+ TQString callJavaScriptIndenter(TQString sourceCode);
+ void saveConfigFile(TQString filePathName, TQString parameterString);
+ void readIndentIniFile(TQString iniFilePath);
bool createIndenterCallString();
void initIndenterMenu();
//! Holds a reference to all created pages of the parameter categories toolbox and the pages boxlayout
struct IndenterParameterCategoryPage {
- QWidget *widget;
- QVBoxLayout *vboxLayout;
+ TQWidget *widget;
+ TQVBoxLayout *vboxLayout;
};
- QVector<IndenterParameterCategoryPage> _indenterParameterCategoryPages;
+ TQVector<IndenterParameterCategoryPage> _indenterParameterCategoryPages;
//! Holds a reference to all checkboxes needed for boolean parameter setting and the parameters name
struct ParamBoolean {
- QString paramName;
- QString trueString;
- QString falseString;
- QCheckBox *checkBox;
+ TQString paramName;
+ TQString trueString;
+ TQString falseString;
+ TQCheckBox *checkBox;
};
- QVector<ParamBoolean> _paramBooleans;
+ TQVector<ParamBoolean> _paramBooleans;
//! Holds a reference to all line edits needed for parameter setting and the parameters name
struct ParamString {
- QString paramName;
- QString paramCallName;
- QCheckBox *valueEnabledChkBox;
- QLineEdit *lineEdit;
- QLabel *label;
+ TQString paramName;
+ TQString paramCallName;
+ TQCheckBox *valueEnabledChkBox;
+ TQLineEdit *lineEdit;
+ TQLabel *label;
};
- QVector<ParamString> _paramStrings;
+ TQVector<ParamString> _paramStrings;
//! Hold a reference to all spin boxes needed for parameter setting and the parameters name
struct ParamNumeric {
- QString paramName;
- QString paramCallName;
- QCheckBox *valueEnabledChkBox;
- QSpinBox *spinBox;
- QLabel *label;
+ TQString paramName;
+ TQString paramCallName;
+ TQCheckBox *valueEnabledChkBox;
+ TQSpinBox *spinBox;
+ TQLabel *label;
};
- QVector<ParamNumeric> _paramNumerics;
+ TQVector<ParamNumeric> _paramNumerics;
//! Hold a reference to all combo boxes needed for parameter setting and the parameters name
struct ParamMultiple {
- QString paramName;
- QString paramCallName;
- QCheckBox *valueEnabledChkBox;
- QComboBox *comboBox;
- QStringList choicesStrings;
- QStringList choicesStringsReadable;
+ TQString paramName;
+ TQString paramCallName;
+ TQCheckBox *valueEnabledChkBox;
+ TQComboBox *comboBox;
+ TQStringList choicesStrings;
+ TQStringList choicesStringsReadable;
};
- QVector<ParamMultiple> _paramMultiples;
+ TQVector<ParamMultiple> _paramMultiples;
- QComboBox *_indenterSelectionCombobox;
- QToolButton *_indenterParameterHelpButton;
+ TQComboBox *_indenterSelectionCombobox;
+ TQToolButton *_indenterParameterHelpButton;
//! Vertical layout box, into which the toolbox will be added
- QVBoxLayout *_toolBoxContainerLayout;
- QToolBox *_indenterParameterCategoriesToolBox;
+ TQVBoxLayout *_toolBoxContainerLayout;
+ TQToolBox *_indenterParameterCategoriesToolBox;
UiGuiIniFileParser *_indenterSettings;
- QStringList _indenterParameters;
+ TQStringList _indenterParameters;
//! The indenters name in a descriptive form
- QString _indenterName;
+ TQString _indenterName;
//! The indenters file name (w/o extension), that is being called
- QString _indenterFileName;
- QString _indenterDirctoryStr;
- QString _tempDirctoryStr;
- QString _settingsDirctoryStr;
- QStringList _indenterIniFileList;
- QString _parameterOrder;
- QString _globalConfigFilename;
- QString _cfgFileParameterEnding;
- QString _inputFileParameter;
- QString _inputFileName;
- QString _outputFileParameter;
- QString _outputFileName;
- QString _fileTypes;
- QString _useCfgFileParameter;
- QString _indenterShowHelpParameter;
- QWidget *_mainWindow;
+ TQString _indenterFileName;
+ TQString _indenterDirctoryStr;
+ TQString _tempDirctoryStr;
+ TQString _settingsDirctoryStr;
+ TQStringList _indenterIniFileList;
+ TQString _parameterOrder;
+ TQString _globalConfigFilename;
+ TQString _cfgFileParameterEnding;
+ TQString _inputFileParameter;
+ TQString _inputFileName;
+ TQString _outputFileParameter;
+ TQString _outputFileName;
+ TQString _fileTypes;
+ TQString _useCfgFileParameter;
+ TQString _indenterShowHelpParameter;
+ TQWidget *_mainWindow;
UiGuiErrorMessage *_errorMessageDialog;
- QString _indenterExecutableCallString;
- QString _indenterExecutableSuffix;
-
- QMenu *_menuIndenter;
- QAction *_actionLoadIndenterConfigFile;
- QAction *_actionSaveIndenterConfigFile;
- QAction *_actionCreateShellScript;
- QAction *_actionResetIndenterParameters;
+ TQString _indenterExecutableCallString;
+ TQString _indenterExecutableSuffix;
+
+ TQMenu *_menuIndenter;
+ TQAction *_actionLoadIndenterConfigFile;
+ TQAction *_actionSaveIndenterConfigFile;
+ TQAction *_actionCreateShellScript;
+ TQAction *_actionResetIndenterParameters;
//! Needed for the NPP plugin.
void(*_parameterChangedCallback)(void);
//! Needed for the NPP plugin.
void(*_windowClosedCallback)(void);
//TODO: This function should go into a string helper/tool class/file.
- QString encodeToHTML(const QString &text);
+ TQString encodeToHTML(const TQString &text);
};
#endif // INDENTHANDLER_H
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
index 3c12f81..9c17954 100755
--- a/src/MainWindow.cpp
+++ b/src/MainWindow.cpp
@@ -33,25 +33,25 @@
#include "IndentHandler.h"
#include "UpdateCheckDialog.h"
-#include <tqwidget.h>
-#include <tqlabel.h>
-#include <tqstring.h>
-#include <tqscrollbar.h>
+#include <tntqwidget.h>
+#include <tntqlabel.h>
+#include <tntqstring.h>
+#include <tntqscrollbar.h>
#include <tqtextcursor.h>
-#include <tqfiledialog.h>
-#include <tqtextstream.h>
+#include <tntqfiledialog.h>
+#include <tntqtextstream.h>
#include <tqtextdocument.h>
-#include <tqprinter.h>
-#include <tqprintdialog.h>
+#include <tntqprinter.h>
+#include <tntqprintdialog.h>
#include <tqcloseevent.h>
#include <tqhelpevent.h>
-#include <tqtooltip.h>
-#include <tqtranslator.h>
-#include <tqlocale.h>
-#include <tqtextcodec.h>
+#include <tntqtooltip.h>
+#include <tntqtranslator.h>
+#include <tntqlocale.h>
+#include <tntqtextcodec.h>
#include <tqdate.h>
-#include <tqurl.h>
-#include <tqmessagebox.h>
+#include <tntqurl.h>
+#include <tntqmessagebox.h>
#include <tqtdebug.h>
#include <Qsci/qsciscintilla.h>
@@ -74,7 +74,7 @@ using namespace tschweitzer;
/*!
\brief Constructs the main window.
*/
-MainWindow::MainWindow(QString file2OpenOnStart, QWidget *parent) : QMainWindow(parent)
+MainWindow::MainWindow(TQString file2OpenOnStart, TQWidget *parent) : TQMainWindow(parent)
, _mainWindowForm(NULL)
, _qSciSourceCodeEditor(NULL)
, _settings(NULL)
@@ -109,7 +109,7 @@ MainWindow::MainWindow(QString file2OpenOnStart, QWidget *parent) : QMainWindow(
// Create toolbar and insert it into the main window.
initToolBar();
- // Create the text edit component using the QScintilla widget.
+ // Create the text edit component using the TQScintilla widget.
initTextEditor();
// Create and init the syntax highlighter.
@@ -124,7 +124,7 @@ MainWindow::MainWindow(QString file2OpenOnStart, QWidget *parent) : QMainWindow(
// Generate about dialog box
- _aboutDialog = new AboutDialog(this, Qt::SplashScreen);
+ _aboutDialog = new AboutDialog(this, TQt::SplashScreen);
_aboutDialogGraphicsView = new AboutDialogGraphicsView(_aboutDialog, this);
connect( _toolBarWidget->pbAbout, SIGNAL(clicked()), this, SLOT(showAboutDialog()) );
connect( _mainWindowForm->actionAbout_UniversalIndentGUI, SIGNAL(triggered()), this, SLOT(showAboutDialog()) );
@@ -134,7 +134,7 @@ MainWindow::MainWindow(QString file2OpenOnStart, QWidget *parent) : QMainWindow(
connect( _mainWindowForm->actionShowSettings, SIGNAL(triggered()), _settingsDialog, SLOT(showDialog()) );
// If a file that should be opened on start has been handed over to the constructor exists, load it
- if ( QFile::exists(file2OpenOnStart) ) {
+ if ( TQFile::exists(file2OpenOnStart) ) {
openSourceFileDialog(file2OpenOnStart);
}
// Otherwise load the last opened file, if this is enabled in the settings.
@@ -145,7 +145,7 @@ MainWindow::MainWindow(QString file2OpenOnStart, QWidget *parent) : QMainWindow(
updateSourceView();
// Check if a newer version is available but only if the setting for that is enabled and today not already a check has been done.
- if ( _settings->getValueByName("CheckForUpdate").toBool() && QDate::currentDate() != _settings->getValueByName("LastUpdateCheck").toDate() ) {
+ if ( _settings->getValueByName("CheckForUpdate").toBool() && TQDate::currentDate() != _settings->getValueByName("LastUpdateCheck").toDate() ) {
_updateCheckDialog->checkForUpdate();
}
@@ -165,8 +165,8 @@ void MainWindow::initMainWindow() {
// Handle last opened window size
// ------------------------------
bool maximized = _settings->getValueByName("maximized").toBool();
- QPoint pos = _settings->getValueByName("position").toPoint();
- QSize size = _settings->getValueByName("size").toSize();
+ TQPoint pos = _settings->getValueByName("position").toPoint();
+ TQSize size = _settings->getValueByName("size").toSize();
resize(size);
move(pos);
if ( maximized ) {
@@ -178,7 +178,7 @@ void MainWindow::initMainWindow() {
// Handle if first run of this version
// -----------------------------------
- QString readVersion = _settings->getValueByName("version").toString();
+ TQString readVersion = _settings->getValueByName("version").toString();
// If version strings are not equal set first run true.
if ( readVersion != PROGRAM_VERSION_STRING ) {
_isFirstRunOfThisVersion = true;
@@ -196,7 +196,7 @@ void MainWindow::initMainWindow() {
// Register the load last file setting in the menu to the _settings object.
_settings->registerObjectProperty(_mainWindowForm->loadLastOpenedFileOnStartupAction, "checked", "loadLastSourceCodeFileOnStartup");
- // Tell the QScintilla editor if it has to show white space.
+ // Tell the TQScintilla editor if it has to show white space.
connect( _mainWindowForm->whiteSpaceIsVisibleAction, SIGNAL(toggled(bool)), this, SLOT(setWhiteSpaceVisibility(bool)) );
// Register the white space setting in the menu to the _settings object.
_settings->registerObjectProperty(_mainWindowForm->whiteSpaceIsVisibleAction, "checked", "whiteSpaceIsVisible");
@@ -212,7 +212,7 @@ void MainWindow::initMainWindow() {
// Init the menu for selecting one of the recently opened files.
updateRecentlyOpenedList();
- connect( _mainWindowForm->menuRecently_Opened_Files, SIGNAL(triggered(QAction*)), this, SLOT(openFileFromRecentlyOpenedList(QAction*)) );
+ connect( _mainWindowForm->menuRecently_Opened_Files, SIGNAL(triggered(TQAction*)), this, SLOT(openFileFromRecentlyOpenedList(TQAction*)) );
//connect( _settings, SIGNAL(recentlyOpenedListSize(int)), this, SLOT(updateRecentlyOpenedList()) );
_settings->registerObjectSlot(this, "updateRecentlyOpenedList()", "recentlyOpenedListSize");
}
@@ -224,10 +224,10 @@ void MainWindow::initMainWindow() {
void MainWindow::initToolBar() {
// Create the tool bar and add it to the main window.
_toolBarWidget = new Ui::ToolBarWidget();
- QWidget* helpWidget = new QWidget();
+ TQWidget* helpWidget = new TQWidget();
_toolBarWidget->setupUi(helpWidget);
_mainWindowForm->toolBar->addWidget(helpWidget);
- _mainWindowForm->toolBar->setAllowedAreas( Qt::TopToolBarArea | Qt::BottomToolBarArea );
+ _mainWindowForm->toolBar->setAllowedAreas( TQt::TopToolBarArea | TQt::BottomToolBarArea );
// Connect the tool bar widgets to their functions.
_settings->registerObjectProperty(_toolBarWidget->enableSyntaxHighlightningCheckBox, "checked", "SyntaxHighlightingEnabled");
@@ -241,29 +241,29 @@ void MainWindow::initToolBar() {
/*!
- \brief Create and initialize the text editor component. It uses the QScintilla widget.
+ \brief Create and initialize the text editor component. It uses the TQScintilla widget.
*/
void MainWindow::initTextEditor() {
- // Create the QScintilla widget and add it to the layout.
- qDebug() << "Trying to load QScintilla library. If anything fails during loading, it might be possible that"
- << " the debug and release version of QScintilla are mixed or the library cannot be found at all.";
- // Try and catch doesn't seem to catch the runtime error when starting UiGUI release with QScintilla debug lib and the other way around.
+ // Create the TQScintilla widget and add it to the layout.
+ tqDebug() << "Trying to load TQScintilla library. If anything fails during loading, it might be possible that"
+ << " the debug and release version of TQScintilla are mixed or the library cannot be found at all.";
+ // Try and catch doesn't seem to catch the runtime error when starting UiGUI release with TQScintilla debug lib and the other way around.
try {
_qSciSourceCodeEditor = new QsciScintilla(this);
}
catch (...) {
- QMessageBox::critical(this, "Error creating QScintilla text editor component!",
- "During trying to create the text editor component, that is based on QScintilla, an error occurred. Please make sure that you have installed QScintilla and not mixed release and debug versions." );
+ TQMessageBox::critical(this, "Error creating TQScintilla text editor component!",
+ "During trying to create the text editor component, that is based on TQScintilla, an error occurred. Please make sure that you have installed TQScintilla and not mixed release and debug versions." );
exit(1);
}
_mainWindowForm->hboxLayout1->addWidget(_qSciSourceCodeEditor);
- // Make some _settings for the QScintilla widget.
+ // Make some _settings for the TQScintilla widget.
_qSciSourceCodeEditor->setUtf8(true);
_qSciSourceCodeEditor->setMarginLineNumbers(1, true);
- _qSciSourceCodeEditor->setMarginWidth(1, QString("10000") );
+ _qSciSourceCodeEditor->setMarginWidth(1, TQString("10000") );
_qSciSourceCodeEditor->setBraceMatching(_qSciSourceCodeEditor->SloppyBraceMatch);
- _qSciSourceCodeEditor->setMatchedBraceForegroundColor( QColor("red") );
+ _qSciSourceCodeEditor->setMatchedBraceForegroundColor( TQColor("red") );
_qSciSourceCodeEditor->setFolding(QsciScintilla::BoxedTreeFoldStyle);
_qSciSourceCodeEditor->setAutoCompletionSource(QsciScintilla::AcsAll);
_qSciSourceCodeEditor->setAutoCompletionThreshold(3);
@@ -276,12 +276,12 @@ void MainWindow::initTextEditor() {
int tabWidth = _settings->getValueByName("tabWidth").toInt();
_qSciSourceCodeEditor->setTabWidth(tabWidth);
- // Remember a pointer to the scrollbar of the QScintilla widget used to keep
+ // Remember a pointer to the scrollbar of the TQScintilla widget used to keep
// on the same line as before when turning preview on/off.
_textEditVScrollBar = _qSciSourceCodeEditor->verticalScrollBar();
// Add a column row indicator to the status bar.
- _textEditLineColumnInfoLabel = new QLabel( tr("Line %1, Column %2").arg(1).arg(1) );
+ _textEditLineColumnInfoLabel = new TQLabel( tr("Line %1, Column %2").arg(1).arg(1) );
_mainWindowForm->statusbar->addPermanentWidget(_textEditLineColumnInfoLabel);
connect( _qSciSourceCodeEditor, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(setStatusBarCursorPosInfo(int, int)) );
@@ -295,7 +295,7 @@ void MainWindow::initTextEditor() {
/*!
- \brief Create and init the syntax _highlighter and set it to use the QScintilla edit component.
+ \brief Create and init the syntax _highlighter and set it to use the TQScintilla edit component.
*/
void MainWindow::initSyntaxHighlighter() {
// Create the _highlighter.
@@ -319,14 +319,14 @@ void MainWindow::initSyntaxHighlighter() {
false and uses the default language, which is English.
*/
bool MainWindow::initApplicationLanguage() {
- QString languageShort;
+ TQString languageShort;
// Get the language _settings from the _settings object.
int languageIndex = _settings->getValueByName("language").toInt();
// If no language was set, indicated by a negative index, use the system language.
if ( languageIndex < 0 ) {
- languageShort = QLocale::system().name();
+ languageShort = TQLocale::system().name();
// Chinese and Japanese language consist of country and language code.
// For all others the language code will be cut off.
@@ -347,19 +347,19 @@ bool MainWindow::initApplicationLanguage() {
languageShort = _settings->getAvailableTranslations().at(languageIndex);
}
- // Load the Qt own translation file and set it for the application.
- _qTTranslator = new QTranslator();
+ // Load the TQt own translation file and set it for the application.
+ _qTTranslator = new TQTranslator();
bool translationFileLoaded;
translationFileLoaded = _qTTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/qt_" + languageShort );
if ( translationFileLoaded ) {
- qApp->installTranslator(_qTTranslator);
+ tqApp->installTranslator(_qTTranslator);
}
// Load the uigui translation file and set it for the application.
- _uiGuiTranslator = new QTranslator();
+ _uiGuiTranslator = new TQTranslator();
translationFileLoaded = _uiGuiTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/universalindent_" + languageShort );
if ( translationFileLoaded ) {
- qApp->installTranslator(_uiGuiTranslator);
+ tqApp->installTranslator(_uiGuiTranslator);
}
//connect( _settings, SIGNAL(language(int)), this, SLOT(languageChanged(int)) );
@@ -396,26 +396,26 @@ void MainWindow::initIndenter() {
/*!
- \brief Tries to load the by \a filePath defined file and returns its content as QString.
+ \brief Tries to load the by \a filePath defined file and returns its content as TQString.
If the file could not be loaded a error dialog will be shown.
*/
-QString MainWindow::loadFile(QString filePath) {
- QFile inSrcFile(filePath);
- QString fileContent = "";
+TQString MainWindow::loadFile(TQString filePath) {
+ TQFile inSrcFile(filePath);
+ TQString fileContent = "";
- if ( !inSrcFile.open(QFile::ReadOnly | QFile::Text) ) {
- QMessageBox::warning(NULL, tr("Error opening file"), tr("Cannot read the file ")+"\""+filePath+"\"." );
+ if ( !inSrcFile.open(TQFile::ReadOnly | TQFile::Text) ) {
+ TQMessageBox::warning(NULL, tr("Error opening file"), tr("Cannot read the file ")+"\""+filePath+"\"." );
}
else {
- QTextStream inSrcStrm(&inSrcFile);
- QApplication::setOverrideCursor(Qt::WaitCursor);
- inSrcStrm.setCodec( QTextCodec::codecForName(_currentEncoding.toAscii()) );
+ TQTextStream inSrcStrm(&inSrcFile);
+ TQApplication::setOverrideCursor(TQt::WaitCursor);
+ inSrcStrm.setCodec( TQTextCodec::codecForName(_currentEncoding.toAscii()) );
fileContent = inSrcStrm.readAll();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
inSrcFile.close();
- QFileInfo fileInfo(filePath);
+ TQFileInfo fileInfo(filePath);
_currentSourceFileExtension = fileInfo.suffix();
int indexOfHighlighter = _highlighter->setLexerForExtension( _currentSourceFileExtension );
_highlighterActionGroup->actions().at(indexOfHighlighter)->setChecked(true);
@@ -429,24 +429,24 @@ QString MainWindow::loadFile(QString filePath) {
If the file was successfully loaded the indenter will be called to generate the formatted source code.
*/
-void MainWindow::openSourceFileDialog(QString fileName) {
+void MainWindow::openSourceFileDialog(TQString fileName) {
// If the source code file is changed and the shown dialog for saving the file
// is canceled, also stop opening another source file.
if ( !maybeSave() ) {
return;
}
- QString openedSourceFileContent = "";
- QString fileExtensions = tr("Supported by indenter")+" ("+_indentHandler->getPossibleIndenterFileExtensions()+
+ TQString openedSourceFileContent = "";
+ TQString fileExtensions = tr("Supported by indenter")+" ("+_indentHandler->getPossibleIndenterFileExtensions()+
");;"+tr("All files")+" (*.*)";
- //QString openedSourceFileContent = openFileDialog( tr("Choose source code file"), "./", fileExtensions );
+ //TQString openedSourceFileContent = openFileDialog( tr("Choose source code file"), "./", fileExtensions );
if ( fileName.isEmpty() ) {
- fileName = QFileDialog::getOpenFileName( this, tr("Choose source code file"), _currentSourceFile, fileExtensions);
+ fileName = TQFileDialog::getOpenFileName( this, tr("Choose source code file"), _currentSourceFile, fileExtensions);
}
if (fileName != "") {
_currentSourceFile = fileName;
- QFileInfo fileInfo(fileName);
+ TQFileInfo fileInfo(fileName);
_currentSourceFileExtension = fileInfo.suffix();
openedSourceFileContent = loadFile(fileName);
@@ -474,13 +474,13 @@ void MainWindow::openSourceFileDialog(QString fileName) {
If the file already exists and it should be overwritten, a warning is shown before.
*/
-bool MainWindow::saveasSourceFileDialog(QAction *chosenEncodingAction) {
- QString encoding;
- QString fileExtensions = tr("Supported by indenter")+" ("+_indentHandler->getPossibleIndenterFileExtensions()+
+bool MainWindow::saveasSourceFileDialog(TQAction *chosenEncodingAction) {
+ TQString encoding;
+ TQString fileExtensions = tr("Supported by indenter")+" ("+_indentHandler->getPossibleIndenterFileExtensions()+
");;"+tr("All files")+" (*.*)";
- //QString openedSourceFileContent = openFileDialog( tr("Choose source code file"), "./", fileExtensions );
- QString fileName = QFileDialog::getSaveFileName( this, tr("Save source code file"), _currentSourceFile, fileExtensions);
+ //TQString openedSourceFileContent = openFileDialog( tr("Choose source code file"), "./", fileExtensions );
+ TQString fileName = TQFileDialog::getSaveFileName( this, tr("Save source code file"), _currentSourceFile, fileExtensions);
// Saving has been canceled if the filename is empty
if ( fileName.isEmpty() ) {
@@ -490,9 +490,9 @@ bool MainWindow::saveasSourceFileDialog(QAction *chosenEncodingAction) {
_savedSourceContent = _qSciSourceCodeEditor->text();
_currentSourceFile = fileName;
- QFile::remove(fileName);
- QFile outSrcFile(fileName);
- outSrcFile.open( QFile::ReadWrite | QFile::Text );
+ TQFile::remove(fileName);
+ TQFile outSrcFile(fileName);
+ outSrcFile.open( TQFile::ReadWrite | TQFile::Text );
// Get current encoding.
if ( chosenEncodingAction != NULL ) {
@@ -501,12 +501,12 @@ bool MainWindow::saveasSourceFileDialog(QAction *chosenEncodingAction) {
else {
encoding = _encodingActionGroup->checkedAction()->text();
}
- QTextStream outSrcStrm(&outSrcFile);
- outSrcStrm.setCodec( QTextCodec::codecForName(encoding.toAscii()) );
+ TQTextStream outSrcStrm(&outSrcFile);
+ outSrcStrm.setCodec( TQTextCodec::codecForName(encoding.toAscii()) );
outSrcStrm << _savedSourceContent;
outSrcFile.close();
- QFileInfo fileInfo(fileName);
+ TQFileInfo fileInfo(fileName);
_currentSourceFileExtension = fileInfo.suffix();
_qSciSourceCodeEditor->setModified( false );
@@ -528,15 +528,15 @@ bool MainWindow::saveSourceFile() {
return saveasSourceFileDialog();
}
else {
- QFile::remove(_currentSourceFile);
- QFile outSrcFile(_currentSourceFile);
+ TQFile::remove(_currentSourceFile);
+ TQFile outSrcFile(_currentSourceFile);
_savedSourceContent = _qSciSourceCodeEditor->text();
- outSrcFile.open( QFile::ReadWrite | QFile::Text );
+ outSrcFile.open( TQFile::ReadWrite | TQFile::Text );
// Get current encoding.
- QString _currentEncoding = _encodingActionGroup->checkedAction()->text();
- QTextStream outSrcStrm(&outSrcFile);
- outSrcStrm.setCodec( QTextCodec::codecForName(_currentEncoding.toAscii()) );
+ TQString _currentEncoding = _encodingActionGroup->checkedAction()->text();
+ TQTextStream outSrcStrm(&outSrcFile);
+ outSrcStrm.setCodec( TQTextCodec::codecForName(_currentEncoding.toAscii()) );
outSrcStrm << _savedSourceContent;
outSrcFile.close();
@@ -551,12 +551,12 @@ bool MainWindow::saveSourceFile() {
\brief Shows a file open dialog.
Shows a file open dialog with the title \a dialogHeaderStr starting in the directory \a startPath
- and with a file mask defined by \a fileMaskStr. Returns the contents of the file as QString.
+ and with a file mask defined by \a fileMaskStr. Returns the contents of the file as TQString.
*/
-QString MainWindow::openFileDialog(QString dialogHeaderStr, QString startPath, QString fileMaskStr) {
- QString fileContent = "";
+TQString MainWindow::openFileDialog(TQString dialogHeaderStr, TQString startPath, TQString fileMaskStr) {
+ TQString fileContent = "";
- QString fileName = QFileDialog::getOpenFileName( NULL, dialogHeaderStr, startPath, fileMaskStr);
+ TQString fileName = TQFileDialog::getOpenFileName( NULL, dialogHeaderStr, startPath, fileMaskStr);
if (fileName != "") {
fileContent = loadFile(fileName);
@@ -602,10 +602,10 @@ void MainWindow::updateSourceView() {
The original loaded source code file will not be changed.
*/
void MainWindow::callIndenter() {
- QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+ TQApplication::setOverrideCursor(TQCursor(TQt::WaitCursor));
_sourceFormattedContent = _indentHandler->callIndenter(_sourceFileContent, _currentSourceFileExtension);
//updateSourceView();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
@@ -628,7 +628,7 @@ void MainWindow::turnHighlightOnOff(bool turnOn) {
\brief Added this slot to avoid multiple calls because of changed text.
*/
void MainWindow::sourceCodeChangedHelperSlot() {
- QTimer::singleShot(0, this, SLOT(sourceCodeChangedSlot()));
+ TQTimer::singleShot(0, this, SLOT(sourceCodeChangedSlot()));
}
@@ -637,9 +637,9 @@ void MainWindow::sourceCodeChangedHelperSlot() {
to format the changed source code.
*/
void MainWindow::sourceCodeChangedSlot() {
- QChar enteredCharacter;
+ TQChar enteredCharacter;
int cursorPos, cursorPosAbsolut, cursorLine;
- QString text;
+ TQString text;
_sourceCodeChanged = true;
if ( _scrollPositionChanged ) {
@@ -750,7 +750,7 @@ void MainWindow::sourceCodeChangedSlot() {
setWindowModified( false );
}
else {
- _qSciSourceCodeEditor->setModified( true ); // Has no effect according to QScintilla docs.
+ _qSciSourceCodeEditor->setModified( true ); // Has no effect according to TQScintilla docs.
setWindowModified( true );
}
@@ -798,7 +798,7 @@ void MainWindow::indentSettingsChangedSlot() {
setWindowModified( false );
}
else {
- _qSciSourceCodeEditor->setModified( true ); // Has no effect according to QScintilla docs.
+ _qSciSourceCodeEditor->setModified( true ); // Has no effect according to TQScintilla docs.
setWindowModified( true );
}
}
@@ -848,7 +848,7 @@ void MainWindow::previewTurnedOnOff(bool turnOn) {
source code filename.
*/
void MainWindow::updateWindowTitle() {
- this->setWindowTitle( "UniversalIndentGUI " + QString(PROGRAM_VERSION_STRING) + " [*]" + _currentSourceFile );
+ this->setWindowTitle( "UniversalIndentGUI " + TQString(PROGRAM_VERSION_STRING) + " [*]" + _currentSourceFile );
}
@@ -856,18 +856,18 @@ void MainWindow::updateWindowTitle() {
\brief Opens a dialog to save the current source code as a PDF document.
*/
void MainWindow::exportToPDF() {
- QString fileExtensions = tr("PDF Document")+" (*.pdf)";
+ TQString fileExtensions = tr("PDF Document")+" (*.pdf)";
- QString fileName = _currentSourceFile;
- QFileInfo fileInfo(fileName);
- QString fileExtension = fileInfo.suffix();
+ TQString fileName = _currentSourceFile;
+ TQFileInfo fileInfo(fileName);
+ TQString fileExtension = fileInfo.suffix();
fileName.replace( fileName.length()-fileExtension.length(), fileExtension.length(), "pdf" );
- fileName = QFileDialog::getSaveFileName( this, tr("Export source code file"), fileName, fileExtensions);
+ fileName = TQFileDialog::getSaveFileName( this, tr("Export source code file"), fileName, fileExtensions);
if ( !fileName.isEmpty() ) {
- QsciPrinter printer(QPrinter::HighResolution);
- printer.setOutputFormat(QPrinter::PdfFormat);
+ QsciPrinter printer(TQPrinter::HighResolution);
+ printer.setOutputFormat(TQPrinter::PdfFormat);
printer.setOutputFileName(fileName);
printer.printRange(_qSciSourceCodeEditor);
}
@@ -878,27 +878,27 @@ void MainWindow::exportToPDF() {
\brief Opens a dialog to save the current source code as a HTML document.
*/
void MainWindow::exportToHTML() {
- QString fileExtensions = tr("HTML Document")+" (*.html)";
+ TQString fileExtensions = tr("HTML Document")+" (*.html)";
- QString fileName = _currentSourceFile;
- QFileInfo fileInfo(fileName);
- QString fileExtension = fileInfo.suffix();
+ TQString fileName = _currentSourceFile;
+ TQFileInfo fileInfo(fileName);
+ TQString fileExtension = fileInfo.suffix();
fileName.replace( fileName.length()-fileExtension.length(), fileExtension.length(), "html" );
- fileName = QFileDialog::getSaveFileName( this, tr("Export source code file"), fileName, fileExtensions);
+ fileName = TQFileDialog::getSaveFileName( this, tr("Export source code file"), fileName, fileExtensions);
if ( !fileName.isEmpty() ) {
// Create a document from which HTML code can be generated.
- QTextDocument sourceCodeDocument( _qSciSourceCodeEditor->text() );
- sourceCodeDocument.setDefaultFont( QFont("Courier", 12, QFont::Normal) );
- QString sourceCodeAsHTML = sourceCodeDocument.toHtml();
+ TQTextDocument sourceCodeDocument( _qSciSourceCodeEditor->text() );
+ sourceCodeDocument.setDefaultFont( TQFont("Courier", 12, TQFont::Normal) );
+ TQString sourceCodeAsHTML = sourceCodeDocument.toHtml();
// To ensure that empty lines are kept in the HTML code make this replacement.
sourceCodeAsHTML.replace("\"></p>", "\"><br /></p>");
// Write the HTML file.
- QFile::remove(fileName);
- QFile outSrcFile(fileName);
- outSrcFile.open( QFile::ReadWrite | QFile::Text );
+ TQFile::remove(fileName);
+ TQFile outSrcFile(fileName);
+ outSrcFile.open( TQFile::ReadWrite | TQFile::Text );
outSrcFile.write( sourceCodeAsHTML.toAscii() );
outSrcFile.close();
}
@@ -922,14 +922,14 @@ void MainWindow::loadLastOpenedFile() {
_currentSourceFile = _settings->getValueByName("lastSourceCodeFile").toString().split("|").first();
// If source file exist load it.
- if ( QFile::exists(_currentSourceFile) ) {
- QFileInfo fileInfo(_currentSourceFile);
+ if ( TQFile::exists(_currentSourceFile) ) {
+ TQFileInfo fileInfo(_currentSourceFile);
_currentSourceFile = fileInfo.absoluteFilePath();
_sourceFileContent = loadFile(_currentSourceFile);
}
// If the last opened source code file does not exist, try to load the default example.cpp file.
- else if ( QFile::exists( SettingsPaths::getIndenterPath() + "/example.cpp" ) ) {
- QFileInfo fileInfo( SettingsPaths::getIndenterPath() + "/example.cpp" );
+ else if ( TQFile::exists( SettingsPaths::getIndenterPath() + "/example.cpp" ) ) {
+ TQFileInfo fileInfo( SettingsPaths::getIndenterPath() + "/example.cpp" );
_currentSourceFile = fileInfo.absoluteFilePath();
_sourceFileContent = loadFile(_currentSourceFile);
}
@@ -976,7 +976,7 @@ void MainWindow::saveSettings() {
/*!
\brief Is always called when the program is quit. Calls the saveSettings function before really quits.
*/
-void MainWindow::closeEvent( QCloseEvent *event ) {
+void MainWindow::closeEvent( TQCloseEvent *event ) {
if ( maybeSave() ) {
saveSettings();
event->accept();
@@ -994,19 +994,19 @@ void MainWindow::closeEvent( QCloseEvent *event ) {
for indenter parameters are connected with this event filter.
So depending on the _settings the tooltips can be enabled and disabled for these widgets.
*/
-bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
- if ( event->type() == QEvent::ToolTip) {
+bool MainWindow::eventFilter(TQObject *obj, TQEvent *event) {
+ if ( event->type() == TQEvent::ToolTip) {
if ( _mainWindowForm->indenterParameterTooltipsEnabledAction->isChecked() ) {
- return QMainWindow::eventFilter(obj, event);
+ return TQMainWindow::eventFilter(obj, event);
}
else {
- //QToolTip::showText( QPoint(100,100) , "Test1");
+ //TQToolTip::showText( TQPoint(100,100) , "Test1");
return true;
}
}
else {
// pass the event on to the parent class
- return QMainWindow::eventFilter(obj, event);
+ return TQMainWindow::eventFilter(obj, event);
}
}
@@ -1016,15 +1016,15 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event) {
*/
bool MainWindow::maybeSave() {
if ( isWindowModified() ) {
- int ret = QMessageBox::warning(this, tr("Modified code"),
+ int ret = TQMessageBox::warning(this, tr("Modified code"),
tr("The source code has been modified.\nDo you want to save your changes?"),
- QMessageBox::Yes | QMessageBox::Default,
- QMessageBox::No,
- QMessageBox::Cancel | QMessageBox::Escape);
- if (ret == QMessageBox::Yes) {
+ TQMessageBox::Yes | TQMessageBox::Default,
+ TQMessageBox::No,
+ TQMessageBox::Cancel | TQMessageBox::Escape);
+ if (ret == TQMessageBox::Yes) {
return saveSourceFile();
}
- else if (ret == QMessageBox::Cancel) {
+ else if (ret == TQMessageBox::Cancel) {
return false;
}
}
@@ -1039,25 +1039,25 @@ bool MainWindow::maybeSave() {
void MainWindow::languageChanged(int languageIndex) {
if ( languageIndex < _settings->getAvailableTranslations().size() ) {
// Get the mnemonic of the new selected language.
- QString languageShort = _settings->getAvailableTranslations().at(languageIndex);
+ TQString languageShort = _settings->getAvailableTranslations().at(languageIndex);
// Remove the old qt translation.
- qApp->removeTranslator( _qTTranslator );
+ tqApp->removeTranslator( _qTTranslator );
// Remove the old uigui translation.
- qApp->removeTranslator( _uiGuiTranslator );
+ tqApp->removeTranslator( _uiGuiTranslator );
- // Load the Qt own translation file and set it for the application.
+ // Load the TQt own translation file and set it for the application.
bool translationFileLoaded;
translationFileLoaded = _qTTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/qt_" + languageShort );
if ( translationFileLoaded ) {
- qApp->installTranslator(_qTTranslator);
+ tqApp->installTranslator(_qTTranslator);
}
// Load the uigui translation file and set it for the application.
translationFileLoaded = _uiGuiTranslator->load( SettingsPaths::getGlobalFilesPath() + "/translations/universalindent_" + languageShort );
if ( translationFileLoaded ) {
- qApp->installTranslator(_uiGuiTranslator);
+ tqApp->installTranslator(_uiGuiTranslator);
}
}
}
@@ -1067,22 +1067,22 @@ void MainWindow::languageChanged(int languageIndex) {
\brief Creates a menu entries in the file menu for opening and saving a file with different encodings.
*/
void MainWindow::createEncodingMenu() {
- QAction *encodingAction;
- QString encodingName;
+ TQAction *encodingAction;
+ TQString encodingName;
- _encodingsList = QStringList() << "UTF-8" << "UTF-16" << "UTF-16BE" << "UTF-16LE"
+ _encodingsList = TQStringList() << "UTF-8" << "UTF-16" << "UTF-16BE" << "UTF-16LE"
<< "Apple Roman" << "Big5" << "Big5-HKSCS" << "EUC-JP" << "EUC-KR" << "GB18030-0"
<< "IBM 850" << "IBM 866" << "IBM 874" << "ISO 2022-JP" << "ISO 8859-1" << "ISO 8859-13"
<< "Iscii-Bng" << "JIS X 0201" << "JIS X 0208" << "KOI8-R" << "KOI8-U" << "MuleLao-1"
<< "ROMAN8" << "Shift-JIS" << "TIS-620" << "TSCII" << "Windows-1250" << "WINSAMI2";
- _encodingActionGroup = new QActionGroup(this);
- _saveEncodedActionGroup = new QActionGroup(this);
+ _encodingActionGroup = new TQActionGroup(this);
+ _saveEncodedActionGroup = new TQActionGroup(this);
// Loop for each available encoding
foreach ( encodingName, _encodingsList ) {
// Create actions for the "reopen" menu
- encodingAction = new QAction(encodingName, _encodingActionGroup);
+ encodingAction = new TQAction(encodingName, _encodingActionGroup);
encodingAction->setStatusTip( tr("Reopen the currently opened source code file by using the text encoding scheme ") + encodingName );
encodingAction->setCheckable(true);
if ( encodingName == _currentEncoding ) {
@@ -1090,15 +1090,15 @@ void MainWindow::createEncodingMenu() {
}
// Create actions for the "save as encoded" menu
- encodingAction = new QAction(encodingName, _saveEncodedActionGroup);
+ encodingAction = new TQAction(encodingName, _saveEncodedActionGroup);
encodingAction->setStatusTip( tr("Save the currently opened source code file by using the text encoding scheme ") + encodingName );
}
_mainWindowForm->encodingMenu->addActions( _encodingActionGroup->actions() );
- connect( _encodingActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(encodingChanged(QAction*)) );
+ connect( _encodingActionGroup, SIGNAL(triggered(TQAction*)), this, SLOT(encodingChanged(TQAction*)) );
_mainWindowForm->saveEncodedMenu->addActions( _saveEncodedActionGroup->actions() );
- connect( _saveEncodedActionGroup, SIGNAL(triggered(QAction*)), this, SLOT(saveAsOtherEncoding(QAction*)) );
+ connect( _saveEncodedActionGroup, SIGNAL(triggered(TQAction*)), this, SLOT(saveAsOtherEncoding(TQAction*)) );
}
@@ -1108,12 +1108,12 @@ void MainWindow::createEncodingMenu() {
If the saving is successful and not aborted, the currently used encoding, visible in the
"reopen" menu, is also changed to the new encoding.
*/
-void MainWindow::saveAsOtherEncoding(QAction *chosenEncodingAction) {
+void MainWindow::saveAsOtherEncoding(TQAction *chosenEncodingAction) {
bool fileWasSaved = saveasSourceFileDialog(chosenEncodingAction);
// If the file was save with another encoding, change the selected encoding in the reopen menu.
if ( fileWasSaved ) {
- foreach ( QAction *action, _encodingActionGroup->actions() ) {
+ foreach ( TQAction *action, _encodingActionGroup->actions() ) {
if ( action->text() == chosenEncodingAction->text() ) {
action->setChecked(true);
return;
@@ -1126,22 +1126,22 @@ void MainWindow::saveAsOtherEncoding(QAction *chosenEncodingAction) {
/*!
\brief This slot is called whenever an encoding is selected in the settings menu.
*/
-void MainWindow::encodingChanged(QAction* encodingAction) {
+void MainWindow::encodingChanged(TQAction* encodingAction) {
if ( maybeSave() ) {
- QFile inSrcFile(_currentSourceFile);
- QString fileContent = "";
+ TQFile inSrcFile(_currentSourceFile);
+ TQString fileContent = "";
- if ( !inSrcFile.open(QFile::ReadOnly | QFile::Text) ) {
- QMessageBox::warning(NULL, tr("Error opening file"), tr("Cannot read the file ")+"\""+_currentSourceFile+"\"." );
+ if ( !inSrcFile.open(TQFile::ReadOnly | TQFile::Text) ) {
+ TQMessageBox::warning(NULL, tr("Error opening file"), tr("Cannot read the file ")+"\""+_currentSourceFile+"\"." );
}
else {
- QTextStream inSrcStrm(&inSrcFile);
- QApplication::setOverrideCursor(Qt::WaitCursor);
- QString encodingName = encodingAction->text();
+ TQTextStream inSrcStrm(&inSrcFile);
+ TQApplication::setOverrideCursor(TQt::WaitCursor);
+ TQString encodingName = encodingAction->text();
_currentEncoding = encodingName;
- inSrcStrm.setCodec( QTextCodec::codecForName(encodingName.toAscii()) );
+ inSrcStrm.setCodec( TQTextCodec::codecForName(encodingName.toAscii()) );
fileContent = inSrcStrm.readAll();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
inSrcFile.close();
_qSciSourceCodeEditor->setText( fileContent );
_qSciSourceCodeEditor->setModified(false);
@@ -1154,21 +1154,21 @@ void MainWindow::encodingChanged(QAction* encodingAction) {
\brief Creates a menu entry under the settings menu for all available text encodings.
*/
void MainWindow::createHighlighterMenu() {
- QAction *highlighterAction;
- QString highlighterName;
+ TQAction *highlighterAction;
+ TQString highlighterName;
- _highlighterActionGroup = new QActionGroup(this);
+ _highlighterActionGroup = new TQActionGroup(this);
// Loop for each known highlighter
foreach ( highlighterName, _highlighter->getAvailableHighlighters() ) {
- highlighterAction = new QAction(highlighterName, _highlighterActionGroup);
+ highlighterAction = new TQAction(highlighterName, _highlighterActionGroup);
highlighterAction->setStatusTip( tr("Set the syntax highlightning to ") + highlighterName );
highlighterAction->setCheckable(true);
}
_mainWindowForm->highlighterMenu->addActions( _highlighterActionGroup->actions() );
_mainWindowForm->menuSettings->insertMenu(_mainWindowForm->indenterParameterTooltipsEnabledAction, _mainWindowForm->highlighterMenu );
- connect( _highlighterActionGroup, SIGNAL(triggered(QAction*)), _highlighter, SLOT(setHighlighterByAction(QAction*)) );
+ connect( _highlighterActionGroup, SIGNAL(triggered(TQAction*)), _highlighter, SLOT(setHighlighterByAction(TQAction*)) );
}
@@ -1191,7 +1191,7 @@ void MainWindow::setWhiteSpaceVisibility(bool visible) {
and adapts the margin for the displayed line numbers.
*/
void MainWindow::numberOfLinesChanged() {
- QString lineNumbers;
+ TQString lineNumbers;
lineNumbers.setNum( _qSciSourceCodeEditor->lines()*10 );
_qSciSourceCodeEditor->setMarginWidth(1, lineNumbers);
}
@@ -1200,11 +1200,11 @@ void MainWindow::numberOfLinesChanged() {
/*!
\brief Catches language change events and retranslates all needed widgets.
*/
-void MainWindow::changeEvent(QEvent *event) {
+void MainWindow::changeEvent(TQEvent *event) {
int i = 0;
- if (event->type() == QEvent::LanguageChange) {
- QString languageName;
+ if (event->type() == TQEvent::LanguageChange) {
+ TQString languageName;
// Translate the main window.
_mainWindowForm->retranslateUi(this);
@@ -1217,7 +1217,7 @@ void MainWindow::changeEvent(QEvent *event) {
_indentHandler->retranslateUi();
// Translate the load encoding menu.
- QList<QAction *> encodingActionList = _encodingActionGroup->actions();
+ TQList<TQAction *> encodingActionList = _encodingActionGroup->actions();
for ( i = 0; i < encodingActionList.size(); i++ ) {
encodingActionList.at(i)->setStatusTip( tr("Reopen the currently opened source code file by using the text encoding scheme ") + _encodingsList.at(i) );
}
@@ -1229,10 +1229,10 @@ void MainWindow::changeEvent(QEvent *event) {
}
// Translate the _highlighter menu.
- QList<QAction *> actionList = _mainWindowForm->highlighterMenu->actions();
+ TQList<TQAction *> actionList = _mainWindowForm->highlighterMenu->actions();
i = 0;
- foreach ( QString highlighterName, _highlighter->getAvailableHighlighters() ) {
- QAction *highlighterAction = actionList.at(i);
+ foreach ( TQString highlighterName, _highlighter->getAvailableHighlighters() ) {
+ TQAction *highlighterAction = actionList.at(i);
highlighterAction->setStatusTip( tr("Set the syntax highlightning to ") + highlighterName );
i++;
}
@@ -1243,7 +1243,7 @@ void MainWindow::changeEvent(QEvent *event) {
setStatusBarCursorPosInfo( line, column );
}
else {
- QWidget::changeEvent(event);
+ TQWidget::changeEvent(event);
}
}
@@ -1258,10 +1258,10 @@ void MainWindow::changeEvent(QEvent *event) {
the recently opened menu will be updated too.
*/
void MainWindow::updateRecentlyOpenedList() {
- QString fileName;
- QString filePath;
- QStringList recentlyOpenedList = _settings->getValueByName("lastSourceCodeFile").toString().split("|");
- QList<QAction*> recentlyOpenedActionList = _mainWindowForm->menuRecently_Opened_Files->actions();
+ TQString fileName;
+ TQString filePath;
+ TQStringList recentlyOpenedList = _settings->getValueByName("lastSourceCodeFile").toString().split("|");
+ TQList<TQAction*> recentlyOpenedActionList = _mainWindowForm->menuRecently_Opened_Files->actions();
// Check if the currently open file is in the list of recently opened.
int indexOfCurrentFile = recentlyOpenedList.indexOf( _currentSourceFile );
@@ -1274,7 +1274,7 @@ void MainWindow::updateRecentlyOpenedList() {
// Put the current file at the first position if it not already is and is not empty.
else if ( indexOfCurrentFile == -1 && !_currentSourceFile.isEmpty() ) {
recentlyOpenedList.insert(0, _currentSourceFile);
- QAction *recentlyOpenedAction = new QAction(QFileInfo(_currentSourceFile).fileName(), _mainWindowForm->menuRecently_Opened_Files);
+ TQAction *recentlyOpenedAction = new TQAction(TQFileInfo(_currentSourceFile).fileName(), _mainWindowForm->menuRecently_Opened_Files);
recentlyOpenedAction->setStatusTip(_currentSourceFile);
recentlyOpenedActionList.insert(0, recentlyOpenedAction );
}
@@ -1286,20 +1286,20 @@ void MainWindow::updateRecentlyOpenedList() {
// loop only as long as maximum allowed list entries are set.
for ( int i = 0; i < recentlyOpenedList.size() && i < recentlyOpenedListMaxSize; ) {
filePath = recentlyOpenedList.at(i);
- QFileInfo fileInfo(filePath);
+ TQFileInfo fileInfo(filePath);
// If the file does no longer exist, remove it from the list.
if ( !fileInfo.exists() ) {
recentlyOpenedList.takeAt(i);
if ( i < recentlyOpenedActionList.size()-2 ) {
- QAction* action = recentlyOpenedActionList.takeAt(i);
+ TQAction* action = recentlyOpenedActionList.takeAt(i);
delete action;
}
}
// else if its not already in the menu, add it to the menu.
else {
if ( i >= recentlyOpenedActionList.size()-2 ) {
- QAction *recentlyOpenedAction = new QAction(fileInfo.fileName(), _mainWindowForm->menuRecently_Opened_Files);
+ TQAction *recentlyOpenedAction = new TQAction(fileInfo.fileName(), _mainWindowForm->menuRecently_Opened_Files);
recentlyOpenedAction->setStatusTip(filePath);
recentlyOpenedActionList.insert( recentlyOpenedActionList.size()-2, recentlyOpenedAction );
}
@@ -1310,7 +1310,7 @@ void MainWindow::updateRecentlyOpenedList() {
// Trim the list to its in the _settings allowed maximum size.
while ( recentlyOpenedList.size() > recentlyOpenedListMaxSize ) {
recentlyOpenedList.takeLast();
- QAction* action = recentlyOpenedActionList.takeAt( recentlyOpenedActionList.size()-3 );
+ TQAction* action = recentlyOpenedActionList.takeAt( recentlyOpenedActionList.size()-3 );
delete action;
}
@@ -1335,12 +1335,12 @@ void MainWindow::updateRecentlyOpenedList() {
\brief This slot empties the list of recently opened files.
*/
void MainWindow::clearRecentlyOpenedList() {
- QStringList recentlyOpenedList = _settings->getValueByName("lastSourceCodeFile").toString().split("|");
- QList<QAction*> recentlyOpenedActionList = _mainWindowForm->menuRecently_Opened_Files->actions();
+ TQStringList recentlyOpenedList = _settings->getValueByName("lastSourceCodeFile").toString().split("|");
+ TQList<TQAction*> recentlyOpenedActionList = _mainWindowForm->menuRecently_Opened_Files->actions();
while ( recentlyOpenedList.size() > 0 ) {
recentlyOpenedList.takeLast();
- QAction* action = recentlyOpenedActionList.takeAt( recentlyOpenedActionList.size()-3 );
+ TQAction* action = recentlyOpenedActionList.takeAt( recentlyOpenedActionList.size()-3 );
delete action;
}
@@ -1356,7 +1356,7 @@ void MainWindow::clearRecentlyOpenedList() {
\brief This slot is called if an entry from the list of recently opened files is
being selected.
*/
-void MainWindow::openFileFromRecentlyOpenedList(QAction* recentlyOpenedAction) {
+void MainWindow::openFileFromRecentlyOpenedList(TQAction* recentlyOpenedAction) {
// If the selected action from the recently opened list menu is the clear action
// call the slot to clear the list and then leave.
if ( recentlyOpenedAction == _mainWindowForm->actionClear_Recently_Opened_List ) {
@@ -1364,11 +1364,11 @@ void MainWindow::openFileFromRecentlyOpenedList(QAction* recentlyOpenedAction) {
return;
}
- QString fileName = recentlyOpenedAction->text();
+ TQString fileName = recentlyOpenedAction->text();
int indexOfSelectedFile = _mainWindowForm->menuRecently_Opened_Files->actions().indexOf( recentlyOpenedAction );
- QStringList recentlyOpenedList = _settings->getValueByName("lastSourceCodeFile").toString().split("|");
- QString filePath = recentlyOpenedList.at(indexOfSelectedFile);
- QFileInfo fileInfo(filePath);
+ TQStringList recentlyOpenedList = _settings->getValueByName("lastSourceCodeFile").toString().split("|");
+ TQString filePath = recentlyOpenedList.at(indexOfSelectedFile);
+ TQFileInfo fileInfo(filePath);
// If the file exists, open it.
if ( fileInfo.exists() ) {
@@ -1376,12 +1376,12 @@ void MainWindow::openFileFromRecentlyOpenedList(QAction* recentlyOpenedAction) {
}
// If it does not exist, show a warning message and update the list of recently opened files.
else {
- QMessageBox::warning(NULL, tr("File no longer exists"), tr("The file %1 in the list of recently opened files does no longer exist.") );
+ TQMessageBox::warning(NULL, tr("File no longer exists"), tr("The file %1 in the list of recently opened files does no longer exist.") );
// The function updateRecentlyOpenedList() has to be called via a singleShot so it is executed after this
// function (openFileFromRecentlyOpenedList) has already been left. This has to be done because
- // a Qt3Support function tries to emit a signal based on the existing actions and deleting
+ // a TQt3Support function tries to emit a signal based on the existing actions and deleting
// any of these actions in updateRecentlyOpenedList() causes an error.
- QTimer::singleShot(0, this, SLOT(updateRecentlyOpenedList()) );
+ TQTimer::singleShot(0, this, SLOT(updateRecentlyOpenedList()) );
}
}
@@ -1389,7 +1389,7 @@ void MainWindow::openFileFromRecentlyOpenedList(QAction* recentlyOpenedAction) {
/*!
\brief If the dragged in object contains urls/paths to a file, accept the drag.
*/
-void MainWindow::dragEnterEvent(QDragEnterEvent *event) {
+void MainWindow::dragEnterEvent(TQDragEnterEvent *event) {
if ( event->mimeData()->hasUrls() ) {
event->acceptProposedAction();
}
@@ -1399,9 +1399,9 @@ void MainWindow::dragEnterEvent(QDragEnterEvent *event) {
/*!
\brief If the dropped in object contains urls/paths to a file, open that file.
*/
-void MainWindow::dropEvent(QDropEvent *event) {
+void MainWindow::dropEvent(TQDropEvent *event) {
if ( event->mimeData()->hasUrls() ) {
- QString filePathName = event->mimeData()->urls().first().toLocalFile();
+ TQString filePathName = event->mimeData()->urls().first().toLocalFile();
openSourceFileDialog(filePathName);
}
@@ -1413,8 +1413,8 @@ void MainWindow::dropEvent(QDropEvent *event) {
\brief If the dropped in object contains urls/paths to a file, open that file.
*/
void MainWindow::showAboutDialog() {
- //QPixmap originalPixmap = QPixmap::grabWindow(QApplication::desktop()->screen()->winId());
- //qDebug("in main pixmap width %d, numScreens = %d", originalPixmap.size().width(), QApplication::desktop()->availableGeometry().width());
+ //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();
}
diff --git a/src/MainWindow.h b/src/MainWindow.h
index 4de1450..5006f77 100755
--- a/src/MainWindow.h
+++ b/src/MainWindow.h
@@ -20,7 +20,7 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
-#include <tqmainwindow.h>
+#include <tntqmainwindow.h>
#include "UiGuiSettings.h"
@@ -35,33 +35,33 @@ namespace Ui {
class MainWindowUi;
}
-class QLabel;
-class QScrollBar;
-class QActionGroup;
-class QTranslator;
+class TQLabel;
+class TQScrollBar;
+class TQActionGroup;
+class TQTranslator;
class QsciScintilla;
-class MainWindow : public QMainWindow
+class MainWindow : public TQMainWindow
{
Q_OBJECT
public:
//! Constructor
- MainWindow(QString file2OpenOnStart = "", QWidget *parent = NULL);
+ MainWindow(TQString file2OpenOnStart = "", TQWidget *parent = NULL);
~MainWindow() {
_settings.clear();
}
protected:
- void closeEvent( QCloseEvent *event );
- bool eventFilter(QObject *obj, QEvent *event);
+ void closeEvent( TQCloseEvent *event );
+ bool eventFilter(TQObject *obj, TQEvent *event);
private slots:
- void openSourceFileDialog(QString fileName = "");
- bool saveasSourceFileDialog(QAction *chosenEncodingAction = NULL);
- void saveAsOtherEncoding(QAction *chosenEncodingAction);
+ void openSourceFileDialog(TQString fileName = "");
+ bool saveasSourceFileDialog(TQAction *chosenEncodingAction = NULL);
+ void saveAsOtherEncoding(TQAction *chosenEncodingAction);
bool saveSourceFile();
void callIndenter();
void updateSourceView();
@@ -74,10 +74,10 @@ private slots:
void exportToPDF();
void exportToHTML();
void languageChanged(int languageIndex);
- void encodingChanged(QAction *encodingAction);
+ void encodingChanged(TQAction *encodingAction);
void numberOfLinesChanged();
void updateRecentlyOpenedList();
- void openFileFromRecentlyOpenedList(QAction* recentlyOpenedAction);
+ void openFileFromRecentlyOpenedList(TQAction* recentlyOpenedAction);
void clearRecentlyOpenedList();
void showAboutDialog();
void setStatusBarCursorPosInfo(int line, int column);
@@ -85,8 +85,8 @@ private slots:
private:
Ui::MainWindowUi *_mainWindowForm;
- QString loadFile(QString filePath);
- QString openFileDialog(QString dialogHeaderStr, QString startPath, QString fileMaskStr);
+ TQString loadFile(TQString filePath);
+ TQString openFileDialog(TQString dialogHeaderStr, TQString startPath, TQString fileMaskStr);
void updateWindowTitle();
void loadLastOpenedFile();
void saveSettings();
@@ -99,45 +99,45 @@ private:
void initTextEditor();
void initSyntaxHighlighter();
void initIndenter();
- void changeEvent(QEvent *event);
- void dragEnterEvent(QDragEnterEvent *event);
- void dropEvent(QDropEvent *event);
+ void changeEvent(TQEvent *event);
+ void dragEnterEvent(TQDragEnterEvent *event);
+ void dropEvent(TQDropEvent *event);
QsciScintilla *_qSciSourceCodeEditor;
- QSharedPointer<UiGuiSettings> _settings;
+ TQSharedPointer<UiGuiSettings> _settings;
- QString _currentEncoding;
- QString _sourceFileContent;
- QString _sourceFormattedContent;
- QString _sourceViewContent;
+ TQString _currentEncoding;
+ TQString _sourceFileContent;
+ TQString _sourceFormattedContent;
+ TQString _sourceViewContent;
UiGuiHighlighter *_highlighter;
- QScrollBar *_textEditVScrollBar;
+ TQScrollBar *_textEditVScrollBar;
AboutDialog *_aboutDialog;
AboutDialogGraphicsView *_aboutDialogGraphicsView;
UiGuiSettingsDialog *_settingsDialog;
int _textEditLastScrollPos;
int _currentIndenterID;
bool _loadLastSourceCodeFileOnStartup;
- QString _currentSourceFile;
- QString _currentSourceFileExtension;
- QString _savedSourceContent;
- QActionGroup *_encodingActionGroup;
- QActionGroup *_saveEncodedActionGroup;
- QActionGroup *_highlighterActionGroup;
- QTranslator *_uiGuiTranslator;
- QTranslator *_qTTranslator;
+ TQString _currentSourceFile;
+ TQString _currentSourceFileExtension;
+ TQString _savedSourceContent;
+ TQActionGroup *_encodingActionGroup;
+ TQActionGroup *_saveEncodedActionGroup;
+ TQActionGroup *_highlighterActionGroup;
+ TQTranslator *_uiGuiTranslator;
+ TQTranslator *_qTTranslator;
bool _isFirstRunOfThisVersion;
bool _sourceCodeChanged;
bool _scrollPositionChanged;
bool _indentSettingsChanged;
bool _previewToggled;
- QStringList _encodingsList;
+ TQStringList _encodingsList;
Ui::ToolBarWidget *_toolBarWidget;
IndentHandler *_indentHandler;
UpdateCheckDialog *_updateCheckDialog;
- QLabel *_textEditLineColumnInfoLabel;
+ TQLabel *_textEditLineColumnInfoLabel;
};
#endif // MAINWINDOW_H
diff --git a/src/MainWindow.ui b/src/MainWindow.ui
index 1a3cacd..cc73e47 100755
--- a/src/MainWindow.ui
+++ b/src/MainWindow.ui
@@ -2,7 +2,7 @@
<ui version="4.0">
<author>Thomas_-_S</author>
<class>MainWindowUi</class>
- <widget class="QMainWindow" name="MainWindowUi">
+ <widget class="TQMainWindow" name="MainWindowUi">
<property name="geometry">
<rect>
<x>0</x>
@@ -18,8 +18,8 @@
<iconset resource="../resources/Icons.qrc">
<normaloff>:/mainWindow/universalIndentGUI.svg</normaloff>:/mainWindow/universalIndentGUI.svg</iconset>
</property>
- <widget class="QWidget" name="centralwidget">
- <layout class="QHBoxLayout">
+ <widget class="TQWidget" name="centralwidget">
+ <layout class="TQHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
@@ -27,7 +27,7 @@
<number>0</number>
</property>
<item>
- <layout class="QHBoxLayout">
+ <layout class="TQHBoxLayout">
<property name="spacing">
<number>0</number>
</property>
@@ -38,8 +38,8 @@
</item>
</layout>
</widget>
- <widget class="QStatusBar" name="statusbar"/>
- <widget class="QMenuBar" name="menuBar">
+ <widget class="TQStatusBar" name="statusbar"/>
+ <widget class="TQMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
@@ -48,35 +48,35 @@
<height>21</height>
</rect>
</property>
- <widget class="QMenu" name="menuIndenter">
+ <widget class="TQMenu" name="menuIndenter">
<property name="title">
<string>Indenter</string>
</property>
</widget>
- <widget class="QMenu" name="menuFile">
+ <widget class="TQMenu" name="menuFile">
<property name="title">
<string>File</string>
</property>
- <widget class="QMenu" name="menuExport">
+ <widget class="TQMenu" name="menuExport">
<property name="title">
<string>Export</string>
</property>
<addaction name="actionExportPDF"/>
<addaction name="actionExportHTML"/>
</widget>
- <widget class="QMenu" name="menuRecently_Opened_Files">
+ <widget class="TQMenu" name="menuRecently_Opened_Files">
<property name="title">
<string>Recently Opened Files</string>
</property>
<addaction name="separator"/>
<addaction name="actionClear_Recently_Opened_List"/>
</widget>
- <widget class="QMenu" name="encodingMenu">
+ <widget class="TQMenu" name="encodingMenu">
<property name="title">
<string>Reopen File with other Encoding</string>
</property>
</widget>
- <widget class="QMenu" name="saveEncodedMenu">
+ <widget class="TQMenu" name="saveEncodedMenu">
<property name="title">
<string>Save Source File As with other Encoding</string>
</property>
@@ -92,11 +92,11 @@
<addaction name="menuExport"/>
<addaction name="actionExit"/>
</widget>
- <widget class="QMenu" name="menuSettings">
+ <widget class="TQMenu" name="menuSettings">
<property name="title">
<string>Settings</string>
</property>
- <widget class="QMenu" name="highlighterMenu">
+ <widget class="TQMenu" name="highlighterMenu">
<property name="title">
<string>Set Syntax Highlighter</string>
</property>
@@ -109,7 +109,7 @@
<addaction name="loadLastOpenedFileOnStartupAction"/>
<addaction name="actionShowSettings"/>
</widget>
- <widget class="QMenu" name="menuHelp">
+ <widget class="TQMenu" name="menuHelp">
<property name="title">
<string>Help</string>
</property>
@@ -123,7 +123,7 @@
<addaction name="menuSettings"/>
<addaction name="menuHelp"/>
</widget>
- <widget class="QDockWidget" name="dockWidget">
+ <widget class="TQDockWidget" name="dockWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -131,10 +131,10 @@
</sizepolicy>
</property>
<property name="features">
- <set>QDockWidget::DockWidgetFloatable|QDockWidget::DockWidgetMovable</set>
+ <set>TQDockWidget::DockWidgetFloatable|TQDockWidget::DockWidgetMovable</set>
</property>
<property name="allowedAreas">
- <set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
+ <set>TQt::LeftDockWidgetArea|TQt::RightDockWidgetArea</set>
</property>
<property name="windowTitle">
<string>Indenter Settings</string>
@@ -142,8 +142,8 @@
<attribute name="dockWidgetArea">
<number>1</number>
</attribute>
- <widget class="QWidget" name="dockWidgetContents">
- <layout class="QHBoxLayout">
+ <widget class="TQWidget" name="dockWidgetContents">
+ <layout class="TQHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
@@ -151,7 +151,7 @@
<number>0</number>
</property>
<item>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<property name="spacing">
<number>0</number>
</property>
@@ -163,15 +163,15 @@
</layout>
</widget>
</widget>
- <widget class="QToolBar" name="toolBar">
+ <widget class="TQToolBar" name="toolBar">
<property name="contextMenuPolicy">
- <enum>Qt::PreventContextMenu</enum>
+ <enum>TQt::PreventContextMenu</enum>
</property>
<property name="windowTitle">
<string>Main Toolbar</string>
</property>
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>TQt::Horizontal</enum>
</property>
<property name="iconSize">
<size>
@@ -180,7 +180,7 @@
</size>
</property>
<property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
+ <enum>TQt::ToolButtonTextBesideIcon</enum>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
diff --git a/src/SettingsPaths.cpp b/src/SettingsPaths.cpp
index 27f9fca..f0b5b22 100755
--- a/src/SettingsPaths.cpp
+++ b/src/SettingsPaths.cpp
@@ -20,10 +20,10 @@
#include "SettingsPaths.h"
#include <tqcoreapplication.h>
-#include <tqfile.h>
-#include <tqdir.h>
+#include <tntqfile.h>
+#include <tntqdir.h>
#include <tqdiriterator.h>
-#include <tqstack.h>
+#include <tntqstack.h>
#include <tqtdebug.h>
#include <stdlib.h>
@@ -38,11 +38,11 @@
*/
bool SettingsPaths::_alreadyInitialized = false;
-QString SettingsPaths::_applicationBinaryPath = "";
-QString SettingsPaths::_settingsPath = "";
-QString SettingsPaths::_globalFilesPath = "";
-QString SettingsPaths::_indenterPath = "";
-QString SettingsPaths::_tempPath = "";
+TQString SettingsPaths::_applicationBinaryPath = "";
+TQString SettingsPaths::_settingsPath = "";
+TQString SettingsPaths::_globalFilesPath = "";
+TQString SettingsPaths::_indenterPath = "";
+TQString SettingsPaths::_tempPath = "";
bool SettingsPaths::_portableMode = false;
@@ -59,10 +59,10 @@ bool SettingsPaths::_portableMode = false;
void SettingsPaths::init() {
_alreadyInitialized = true;
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Initializing application paths.";
+ tqDebug() << __LINE__ << " " << __FUNCTION__ << ": Initializing application paths.";
// Get the applications binary path, with respect to MacOSXs use of the .app folder.
- _applicationBinaryPath = QCoreApplication::applicationDirPath();
+ _applicationBinaryPath = TQCoreApplication::applicationDirPath();
// Remove any trailing slashes
while ( _applicationBinaryPath.right(1) == "/" ) {
_applicationBinaryPath.chop(1);
@@ -86,9 +86,9 @@ void SettingsPaths::init() {
// If the "config" directory is a subdir of the applications binary path, use this one (portable mode)
_settingsPath = _applicationBinaryPath + "/config";
- if ( QFile::exists( _settingsPath ) ) {
+ if ( TQFile::exists( _settingsPath ) ) {
_portableMode = true;
- QDir dirCreator;
+ TQDir dirCreator;
_globalFilesPath = _applicationBinaryPath;
_indenterPath = _applicationBinaryPath + "/indenters";
dirCreator.mkpath( _settingsPath );
@@ -99,11 +99,11 @@ void SettingsPaths::init() {
// ... otherwise use the system specific global application data path.
else {
_portableMode = false;
- QDir dirCreator;
+ TQDir dirCreator;
#ifdef Q_OS_WIN
// Get the local users application settings directory.
// Remove any trailing slashes.
- _settingsPath = QDir::fromNativeSeparators( qgetenv("APPDATA") );
+ _settingsPath = TQDir::fromNativeSeparators( qgetenv("APPDATA") );
while ( _settingsPath.right(1) == "/" ) {
_settingsPath.chop(1);
}
@@ -113,7 +113,7 @@ void SettingsPaths::init() {
_globalFilesPath = _applicationBinaryPath;
#else
// Remove any trailing slashes.
- _settingsPath = QDir::homePath();
+ _settingsPath = TQDir::homePath();
while ( _settingsPath.right(1) == "/" ) {
_settingsPath.chop(1);
}
@@ -123,14 +123,14 @@ void SettingsPaths::init() {
dirCreator.mkpath( _settingsPath );
// If a highlighter config file does not exist in the users home config dir
// copy the default config file over there.
- if ( !QFile::exists(_settingsPath+"/UiGuiSyntaxHighlightConfig.ini") ) {
- QFile::copy( _globalFilesPath+"/config/UiGuiSyntaxHighlightConfig.ini", _settingsPath+"/UiGuiSyntaxHighlightConfig.ini" );
+ if ( !TQFile::exists(_settingsPath+"/UiGuiSyntaxHighlightConfig.ini") ) {
+ TQFile::copy( _globalFilesPath+"/config/UiGuiSyntaxHighlightConfig.ini", _settingsPath+"/UiGuiSyntaxHighlightConfig.ini" );
}
_indenterPath = _globalFilesPath + "/indenters";
- // On different systems it may be that "QDir::tempPath()" ends with a "/" or not. So check this.
+ // On different systems it may be that "TQDir::tempPath()" ends with a "/" or not. So check this.
// Remove any trailing slashes.
- _tempPath = QDir::tempPath();
+ _tempPath = TQDir::tempPath();
while ( _tempPath.right(1) == "/" ) {
_tempPath.chop(1);
}
@@ -144,15 +144,15 @@ void SettingsPaths::init() {
// to an important existing file which gets overwritten when UiGUI writes
// into this normally temporary but linked file.
char *pathTemplate = new char[_tempPath.length()+8];
- QByteArray pathTemplateQBA = QString(_tempPath + "-XXXXXX").toAscii();
+ TQByteArray pathTemplateTQBA = TQString(_tempPath + "-XXXXXX").toAscii();
delete [] pathTemplate;
- pathTemplate = pathTemplateQBA.data();
+ pathTemplate = pathTemplateTQBA.data();
pathTemplate = mkdtemp( pathTemplate );
_tempPath = pathTemplate;
#endif
}
- qDebug() << __LINE__ << " " << __FUNCTION__ << ": Paths are:" \
+ tqDebug() << __LINE__ << " " << __FUNCTION__ << ": Paths are:" \
"<ul><li>_applicationBinaryPath=" << _applicationBinaryPath \
<< "</li><li>_settingsPath=" << _settingsPath \
<< "</li><li>_globalFilesPath=" << _globalFilesPath \
@@ -165,7 +165,7 @@ void SettingsPaths::init() {
/*!
\brief Returns the path of the applications executable.
*/
-const QString SettingsPaths::getApplicationBinaryPath() {
+const TQString SettingsPaths::getApplicationBinaryPath() {
if ( !_alreadyInitialized ) {
SettingsPaths::init();
}
@@ -176,7 +176,7 @@ const QString SettingsPaths::getApplicationBinaryPath() {
/*!
\brief Returns the path where all settings are being/should be written to.
*/
-const QString SettingsPaths::getSettingsPath() {
+const TQString SettingsPaths::getSettingsPath() {
if ( !_alreadyInitialized ) {
SettingsPaths::init();
}
@@ -187,7 +187,7 @@ const QString SettingsPaths::getSettingsPath() {
/*!
\brief Returns the path where the files concerning all users reside. For example translations.
*/
-const QString SettingsPaths::getGlobalFilesPath() {
+const TQString SettingsPaths::getGlobalFilesPath() {
if ( !_alreadyInitialized ) {
SettingsPaths::init();
}
@@ -198,7 +198,7 @@ const QString SettingsPaths::getGlobalFilesPath() {
/*!
\brief Returns the path where the indenter executables reside.
*/
-const QString SettingsPaths::getIndenterPath() {
+const TQString SettingsPaths::getIndenterPath() {
if ( !_alreadyInitialized ) {
SettingsPaths::init();
}
@@ -209,7 +209,7 @@ const QString SettingsPaths::getIndenterPath() {
/*!
\brief Returns the path where the where all temporary data should be written to.
*/
-const QString SettingsPaths::getTempPath() {
+const TQString SettingsPaths::getTempPath() {
if ( !_alreadyInitialized ) {
SettingsPaths::init();
}
@@ -232,12 +232,12 @@ bool SettingsPaths::getPortableMode() {
\brief Completely deletes the created temporary directory with all of its content.
*/
void SettingsPaths::cleanAndRemoveTempDir() {
- QDirIterator dirIterator(_tempPath, QDirIterator::Subdirectories);
- QStack<QString> directoryStack;
+ TQDirIterator dirIterator(_tempPath, TQDirIterator::Subdirectories);
+ TQStack<TQString> directoryStack;
bool noErrorsOccurred = true;
while ( dirIterator.hasNext() ) {
- QString currentDirOrFile = dirIterator.next();
+ TQString currentDirOrFile = dirIterator.next();
// If this dummy call isn't done here, calling "dirIterator.fileInfo().isDir()" later somehow fails.
dirIterator.fileInfo();
@@ -246,30 +246,30 @@ void SettingsPaths::cleanAndRemoveTempDir() {
// So we changed into another parent directory and the one on the stack can be deleted
// since it must be empty.
if ( !directoryStack.isEmpty() && !currentDirOrFile.startsWith(directoryStack.top()) ) {
- QString dirToBeRemoved = directoryStack.pop();
- bool couldRemoveDir = QDir(dirToBeRemoved).rmdir(dirToBeRemoved);
+ TQString dirToBeRemoved = directoryStack.pop();
+ bool couldRemoveDir = TQDir(dirToBeRemoved).rmdir(dirToBeRemoved);
noErrorsOccurred &= couldRemoveDir;
if ( couldRemoveDir == false )
- qWarning() << __LINE__ << " " << __FUNCTION__ << "Could not remove the directory: " << dirToBeRemoved;
- //qDebug() << "Removing Dir " << directoryStack.pop();
+ tqWarning() << __LINE__ << " " << __FUNCTION__ << "Could not remove the directory: " << dirToBeRemoved;
+ //tqDebug() << "Removing Dir " << directoryStack.pop();
}
// If the iterator currently points to a directory push it onto the stack.
if ( dirIterator.fileInfo().isDir() ) {
directoryStack.push( currentDirOrFile );
- //qDebug() << "Pushing onto Stack " << currentDirOrFile;
+ //tqDebug() << "Pushing onto Stack " << currentDirOrFile;
}
// otherwise it must be a file, so delete it.
else {
- bool couldRemoveFile = QFile::remove( currentDirOrFile );
+ bool couldRemoveFile = TQFile::remove( currentDirOrFile );
noErrorsOccurred &= couldRemoveFile;
if ( couldRemoveFile == false )
- qWarning() << __LINE__ << " " << __FUNCTION__ << "Could not remove the file: " << currentDirOrFile;
- //qDebug() << "Removing File " << currentDirOrFile;
+ tqWarning() << __LINE__ << " " << __FUNCTION__ << "Could not remove the file: " << currentDirOrFile;
+ //tqDebug() << "Removing File " << currentDirOrFile;
}
}
}
- noErrorsOccurred &= QDir(_tempPath).rmdir(_tempPath);
+ noErrorsOccurred &= TQDir(_tempPath).rmdir(_tempPath);
if ( noErrorsOccurred == false )
- qWarning() << __LINE__ << " " << __FUNCTION__ << "While cleaning up the temp dir an error occurred.";
+ tqWarning() << __LINE__ << " " << __FUNCTION__ << "While cleaning up the temp dir an error occurred.";
}
diff --git a/src/SettingsPaths.h b/src/SettingsPaths.h
index 3442216..37c8bd9 100755
--- a/src/SettingsPaths.h
+++ b/src/SettingsPaths.h
@@ -20,18 +20,18 @@
#ifndef SETTINGSPATHS_H
#define SETTINGSPATHS_H
-class QString;
+class TQString;
class SettingsPaths
{
public:
static void init();
- static const QString getApplicationBinaryPath();
- static const QString getSettingsPath();
- static const QString getGlobalFilesPath();
- static const QString getIndenterPath();
- static const QString getTempPath();
+ static const TQString getApplicationBinaryPath();
+ static const TQString getSettingsPath();
+ static const TQString getGlobalFilesPath();
+ static const TQString getIndenterPath();
+ static const TQString getTempPath();
static bool getPortableMode();
static void cleanAndRemoveTempDir();
@@ -39,11 +39,11 @@ private:
SettingsPaths();
static bool _alreadyInitialized;
- static QString _applicationBinaryPath;
- static QString _settingsPath;
- static QString _globalFilesPath;
- static QString _indenterPath;
- static QString _tempPath;
+ static TQString _applicationBinaryPath;
+ static TQString _settingsPath;
+ static TQString _globalFilesPath;
+ static TQString _indenterPath;
+ static TQString _tempPath;
static bool _portableMode;
};
diff --git a/src/TemplateBatchScript.cpp b/src/TemplateBatchScript.cpp
index e8a91e8..d34681b 100755
--- a/src/TemplateBatchScript.cpp
+++ b/src/TemplateBatchScript.cpp
@@ -19,8 +19,8 @@
#include "TemplateBatchScript.h"
-// Need to include QObject here so that platform specific defines like Q_OS_WIN32 are set.
-#include <tqobject.h>
+// Need to include TQObject here so that platform specific defines like Q_OS_WIN32 are set.
+#include <tntqobject.h>
/*!
\brief The only and static function of this class returns a batch or shell script
diff --git a/src/ToolBarWidget.ui b/src/ToolBarWidget.ui
index 900c60a..8665cac 100755
--- a/src/ToolBarWidget.ui
+++ b/src/ToolBarWidget.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ToolBarWidget</class>
- <widget class="QWidget" name="ToolBarWidget">
+ <widget class="TQWidget" name="ToolBarWidget">
<property name="geometry">
<rect>
<x>0</x>
@@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QHBoxLayout">
+ <layout class="TQHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
@@ -21,7 +21,7 @@
<number>0</number>
</property>
<item>
- <widget class="QPushButton" name="pbOpen_Source_File">
+ <widget class="TQPushButton" name="pbOpen_Source_File">
<property name="toolTip">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Opens a dialog for selecting a source code file.&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;This file will be used to show what the indent tool changes.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -35,7 +35,7 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="cbLivePreview">
+ <widget class="TQCheckBox" name="cbLivePreview">
<property name="toolTip">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:MS Shell Dlg 2; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:MS Shell Dlg; font-size:8pt;&quot;&gt;Turns the preview of the reformatted source code on and off.&lt;/p&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:MS Shell Dlg; font-size:8pt;&quot;&gt;In other words it switches between formatted and nonformatted code. (Ctrl+L)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -52,7 +52,7 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="enableSyntaxHighlightningCheckBox">
+ <widget class="TQCheckBox" name="enableSyntaxHighlightningCheckBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:MS Shell Dlg 2; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:MS Shell Dlg; font-size:8pt;&quot;&gt;Enables and disables the highlightning of the source&lt;/p&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:MS Shell Dlg; font-size:8pt;&quot;&gt;code shown below. (Still needs some performance improvements) (Ctrl+H)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -77,7 +77,7 @@
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>TQt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -88,7 +88,7 @@
</spacer>
</item>
<item>
- <widget class="QPushButton" name="pbAbout">
+ <widget class="TQPushButton" name="pbAbout">
<property name="toolTip">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Shows info about UniversalIndentGUI&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@@ -102,7 +102,7 @@
</widget>
</item>
<item>
- <widget class="QPushButton" name="pbExit">
+ <widget class="TQPushButton" name="pbExit">
<property name="toolTip">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;/head&gt;&lt;body style=&quot; white-space: pre-wrap; font-family:MS Shell Dlg; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;&quot;&gt;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Quits the UniversalIndentGUI&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
diff --git a/src/UiGuiErrorMessage.cpp b/src/UiGuiErrorMessage.cpp
index 63aed21..fa04a7c 100755
--- a/src/UiGuiErrorMessage.cpp
+++ b/src/UiGuiErrorMessage.cpp
@@ -19,12 +19,12 @@
#include "UiGuiErrorMessage.h"
-#include <tqcheckbox.h>
+#include <tntqcheckbox.h>
/*!
\class UiGuiErrorMessage
\ingroup grp_Dialogs
- \brief UiGuiErrorMessage is a child of QErrorMessage. But QErrorMessages
+ \brief UiGuiErrorMessage is a child of TQErrorMessage. But TQErrorMessages
"Do not show again" didn't work with my strings, so this is my own, working
implementation of it.
*/
@@ -36,9 +36,9 @@
Retrieves the object pointer to the \a _showAgainCheckBox check box, sets the dialogs
modality and for a working translation sets the check box text.
*/
-UiGuiErrorMessage::UiGuiErrorMessage(QWidget *parent) : QErrorMessage(parent) {
- _showAgainCheckBox = findChild<QCheckBox *>();
- setWindowModality( Qt::ApplicationModal );
+UiGuiErrorMessage::UiGuiErrorMessage(TQWidget *parent) : TQErrorMessage(parent) {
+ _showAgainCheckBox = findChild<TQCheckBox *>();
+ setWindowModality( TQt::ApplicationModal );
_showAgainCheckBox->setText( tr("Show this message again") );
}
@@ -57,7 +57,7 @@ UiGuiErrorMessage::~UiGuiErrorMessage(void) {
already in that list and "Show this message again" is not checked, that
message will not be shown.
*/
-void UiGuiErrorMessage::showMessage( const QString &title, const QString &message ) {
+void UiGuiErrorMessage::showMessage( const TQString &title, const TQString &message ) {
bool showAgain = true;
if ( _showAgainCheckBox != 0 ) {
@@ -71,10 +71,10 @@ void UiGuiErrorMessage::showMessage( const QString &title, const QString &messag
if ( _showAgainCheckBox != 0 ) {
_showAgainCheckBox->setChecked(true);
}
- QErrorMessage::showMessage( message );
+ TQErrorMessage::showMessage( message );
}
else if ( showAgain ) {
- QErrorMessage::showMessage( message );
+ TQErrorMessage::showMessage( message );
}
}
@@ -82,6 +82,6 @@ void UiGuiErrorMessage::showMessage( const QString &title, const QString &messag
/*!
\brief For convinience, for showing a dialog box with the default title "UniversalIndentGUI".
*/
-void UiGuiErrorMessage::showMessage( const QString &message ) {
+void UiGuiErrorMessage::showMessage( const TQString &message ) {
showMessage( "UniversalIndentGUI", message );
}
diff --git a/src/UiGuiErrorMessage.h b/src/UiGuiErrorMessage.h
index ce5b405..123a4d7 100755
--- a/src/UiGuiErrorMessage.h
+++ b/src/UiGuiErrorMessage.h
@@ -20,24 +20,24 @@
#ifndef UIGUIERRORMESSAGE_H
#define UIGUIERRORMESSAGE_H
-#include <tqerrormessage.h>
+#include <tntqerrormessage.h>
-class QCheckBox;
+class TQCheckBox;
-class UiGuiErrorMessage : public QErrorMessage
+class UiGuiErrorMessage : public TQErrorMessage
{
Q_OBJECT
public:
- UiGuiErrorMessage(QWidget *parent = 0);
+ UiGuiErrorMessage(TQWidget *parent = 0);
~UiGuiErrorMessage(void);
- void showMessage( const QString &message );
- void showMessage( const QString &title, const QString &message );
+ void showMessage( const TQString &message );
+ void showMessage( const TQString &title, const TQString &message );
private:
- QCheckBox *_showAgainCheckBox;
- QStringList _errorMessageList;
+ TQCheckBox *_showAgainCheckBox;
+ TQStringList _errorMessageList;
};
#endif // UIGUIERRORMESSAGE_H
diff --git a/src/UiGuiHighlighter.cpp b/src/UiGuiHighlighter.cpp
index e35a8ec..c5d7f85 100755
--- a/src/UiGuiHighlighter.cpp
+++ b/src/UiGuiHighlighter.cpp
@@ -21,9 +21,9 @@
#include "SettingsPaths.h"
-#include <tqsettings.h>
+#include <tntqsettings.h>
#include <tqmenu.h>
-#include <tqscrollbar.h>
+#include <tntqscrollbar.h>
#include <tqcoreapplication.h>
#include <Qsci/qsciscintilla.h>
@@ -36,7 +36,7 @@
#include <Qsci/qscilexercss.h>
#include <Qsci/qscilexerd.h>
#include <Qsci/qscilexerdiff.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
#include <Qsci/qscilexerfortran.h>
#include <Qsci/qscilexerfortran77.h>
#endif
@@ -46,30 +46,30 @@
#include <Qsci/qscilexerjavascript.h>
#include <Qsci/qscilexerlua.h>
#include <Qsci/qscilexermakefile.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
#include <Qsci/qscilexerpascal.h>
#endif
#include <Qsci/qscilexerperl.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
#include <Qsci/qscilexerpostscript.h>
#endif
#include <Qsci/qscilexerpov.h>
#include <Qsci/qscilexerproperties.h>
#include <Qsci/qscilexerpython.h>
#include <Qsci/qscilexerruby.h>
-#if ( QSCINTILLA_VERSION >= 0x020400 )
+#if ( TQSCINTILLA_VERSION >= 0x020400 )
#include <Qsci/qscilexerspice.h>
#endif
#include <Qsci/qscilexersql.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
#include <Qsci/qscilexertcl.h>
#endif
#include <Qsci/qscilexertex.h>
-#if ( QSCINTILLA_VERSION >= 0x020400 )
+#if ( TQSCINTILLA_VERSION >= 0x020400 )
#include <Qsci/qscilexerverilog.h>
#endif
#include <Qsci/qscilexervhdl.h>
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
#include <Qsci/qscilexerxml.h>
#include <Qsci/qscilexeryaml.h>
#endif
@@ -85,66 +85,66 @@
/*!
\brief The constructor initializes some regular expressions and keywords to identify cpp tokens
*/
-UiGuiHighlighter::UiGuiHighlighter(QsciScintilla *parent) : QObject(parent) {
+UiGuiHighlighter::UiGuiHighlighter(QsciScintilla *parent) : TQObject(parent) {
_qsciEditorParent = parent;
// Create the highlighter _settings object from the UiGuiSyntaxHighlightConfig.ini file.
- _settings = new QSettings(SettingsPaths::getSettingsPath() + "/UiGuiSyntaxHighlightConfig.ini", QSettings::IniFormat, this);
+ _settings = new TQSettings(SettingsPaths::getSettingsPath() + "/UiGuiSyntaxHighlightConfig.ini", TQSettings::IniFormat, this);
_highlightningIsOn = true;
- _mapHighlighternameToExtension["Bash"] = QStringList() << "sh";
- _mapHighlighternameToExtension["Batch"] = QStringList() << "bat";
- _mapHighlighternameToExtension["CMake"] = QStringList() << "cmake";
- _mapHighlighternameToExtension["C++"] = QStringList() << "c" << "h" << "cpp" << "hpp" << "cxx" << "hxx";
- _mapHighlighternameToExtension["C#"] = QStringList() << "cs";
- _mapHighlighternameToExtension["CSS"] = QStringList() << "css";
- _mapHighlighternameToExtension["D"] = QStringList() << "d";
- _mapHighlighternameToExtension["Diff"] = QStringList() << "diff";
-#if ( QSCINTILLA_VERSION >= 0x020300 )
- _mapHighlighternameToExtension["Fortran"] = QStringList() << "f" << "for" << "f90";
- _mapHighlighternameToExtension["Fortran77"] = QStringList() << "f77";
+ _mapHighlighternameToExtension["Bash"] = TQStringList() << "sh";
+ _mapHighlighternameToExtension["Batch"] = TQStringList() << "bat";
+ _mapHighlighternameToExtension["CMake"] = TQStringList() << "cmake";
+ _mapHighlighternameToExtension["C++"] = TQStringList() << "c" << "h" << "cpp" << "hpp" << "cxx" << "hxx";
+ _mapHighlighternameToExtension["C#"] = TQStringList() << "cs";
+ _mapHighlighternameToExtension["CSS"] = TQStringList() << "css";
+ _mapHighlighternameToExtension["D"] = TQStringList() << "d";
+ _mapHighlighternameToExtension["Diff"] = TQStringList() << "diff";
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
+ _mapHighlighternameToExtension["Fortran"] = TQStringList() << "f" << "for" << "f90";
+ _mapHighlighternameToExtension["Fortran77"] = TQStringList() << "f77";
#endif
- _mapHighlighternameToExtension["HTML"] = QStringList() << "html" << "htm";
- _mapHighlighternameToExtension["IDL"] = QStringList() << "idl";
- _mapHighlighternameToExtension["Java"] = QStringList() << "java";
- _mapHighlighternameToExtension["JavaScript"] = QStringList() << "js";
- _mapHighlighternameToExtension["LUA"] = QStringList() << "lua";
- _mapHighlighternameToExtension["Makefile"] = QStringList() << "makefile";
-#if ( QSCINTILLA_VERSION >= 0x020300 )
- _mapHighlighternameToExtension["Pascal"] = QStringList() << "pas";
+ _mapHighlighternameToExtension["HTML"] = TQStringList() << "html" << "htm";
+ _mapHighlighternameToExtension["IDL"] = TQStringList() << "idl";
+ _mapHighlighternameToExtension["Java"] = TQStringList() << "java";
+ _mapHighlighternameToExtension["JavaScript"] = TQStringList() << "js";
+ _mapHighlighternameToExtension["LUA"] = TQStringList() << "lua";
+ _mapHighlighternameToExtension["Makefile"] = TQStringList() << "makefile";
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
+ _mapHighlighternameToExtension["Pascal"] = TQStringList() << "pas";
#endif
- _mapHighlighternameToExtension["Perl"] = QStringList() << "perl" << "pl" << "pm";
- _mapHighlighternameToExtension["PHP"] = QStringList() << "php";
-#if ( QSCINTILLA_VERSION >= 0x020300 )
- _mapHighlighternameToExtension["PostScript"] = QStringList() << "ps" << "eps" << "pdf" << "ai" << "fh";
+ _mapHighlighternameToExtension["Perl"] = TQStringList() << "perl" << "pl" << "pm";
+ _mapHighlighternameToExtension["PHP"] = TQStringList() << "php";
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
+ _mapHighlighternameToExtension["PostScript"] = TQStringList() << "ps" << "eps" << "pdf" << "ai" << "fh";
#endif
- _mapHighlighternameToExtension["POV"] = QStringList() << "pov";
- _mapHighlighternameToExtension["Ini"] = QStringList() << "ini";
- _mapHighlighternameToExtension["Python"] = QStringList() << "py";
- _mapHighlighternameToExtension["Ruby"] = QStringList() << "rub" << "rb";
-#if ( QSCINTILLA_VERSION >= 0x020400 )
- _mapHighlighternameToExtension["Spice"] = QStringList() << "cir";
+ _mapHighlighternameToExtension["POV"] = TQStringList() << "pov";
+ _mapHighlighternameToExtension["Ini"] = TQStringList() << "ini";
+ _mapHighlighternameToExtension["Python"] = TQStringList() << "py";
+ _mapHighlighternameToExtension["Ruby"] = TQStringList() << "rub" << "rb";
+#if ( TQSCINTILLA_VERSION >= 0x020400 )
+ _mapHighlighternameToExtension["Spice"] = TQStringList() << "cir";
#endif
- _mapHighlighternameToExtension["SQL"] = QStringList() << "sql";
-#if ( QSCINTILLA_VERSION >= 0x020300 )
- _mapHighlighternameToExtension["TCL"] = QStringList() << "tcl";
+ _mapHighlighternameToExtension["SQL"] = TQStringList() << "sql";
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
+ _mapHighlighternameToExtension["TCL"] = TQStringList() << "tcl";
#endif
- _mapHighlighternameToExtension["TeX"] = QStringList() << "tex";
-#if ( QSCINTILLA_VERSION >= 0x020400 )
- _mapHighlighternameToExtension["Verilog"] = QStringList() << "v" << "vh";
+ _mapHighlighternameToExtension["TeX"] = TQStringList() << "tex";
+#if ( TQSCINTILLA_VERSION >= 0x020400 )
+ _mapHighlighternameToExtension["Verilog"] = TQStringList() << "v" << "vh";
#endif
- _mapHighlighternameToExtension["VHDL"] = QStringList() << "vhdl";
- _mapHighlighternameToExtension["XML"] = QStringList() << "xml";
-#if ( QSCINTILLA_VERSION >= 0x020300 )
- _mapHighlighternameToExtension["YAML"] = QStringList() << "yaml";
+ _mapHighlighternameToExtension["VHDL"] = TQStringList() << "vhdl";
+ _mapHighlighternameToExtension["XML"] = TQStringList() << "xml";
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
+ _mapHighlighternameToExtension["YAML"] = TQStringList() << "yaml";
#endif
_lexer = NULL;
// This code is only for testing.
/*
- foreach(QStringList extensionList, _mapHighlighternameToExtension.values() ) {
+ foreach(TQStringList extensionList, _mapHighlighternameToExtension.values() ) {
setLexerForExtension( extensionList.at(0) );
}
*/
@@ -155,9 +155,9 @@ UiGuiHighlighter::UiGuiHighlighter(QsciScintilla *parent) : QObject(parent) {
/*!
- \brief Returns the available highlighters as QStringList.
+ \brief Returns the available highlighters as TQStringList.
*/
-QStringList UiGuiHighlighter::getAvailableHighlighters() {
+TQStringList UiGuiHighlighter::getAvailableHighlighters() {
return _mapHighlighternameToExtension.keys();
}
@@ -165,8 +165,8 @@ QStringList UiGuiHighlighter::getAvailableHighlighters() {
/*!
\brief This slot handles signals coming from selecting another syntax highlighter.
*/
-void UiGuiHighlighter::setHighlighterByAction(QAction* highlighterAction) {
- QString highlighterName = highlighterAction->text();
+void UiGuiHighlighter::setHighlighterByAction(TQAction* highlighterAction) {
+ TQString highlighterName = highlighterAction->text();
setLexerForExtension( _mapHighlighternameToExtension[highlighterName].first() );
//TODO: This is really no nice way. How do it better?
// Need to do this "text update" to update the syntax highlighting. Otherwise highlighting is wrong.
@@ -192,11 +192,11 @@ void UiGuiHighlighter::turnHighlightOff() {
_highlightningIsOn = false;
_qsciEditorParent->setLexer();
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
- _qsciEditorParent->setFont( QFont("Courier", 10, QFont::Normal) );
- _qsciEditorParent->setMarginsFont( QFont("Courier", 10, QFont::Normal) );
+ _qsciEditorParent->setFont( TQFont("Courier", 10, TQFont::Normal) );
+ _qsciEditorParent->setMarginsFont( TQFont("Courier", 10, TQFont::Normal) );
#else
- _qsciEditorParent->setFont( QFont("Monospace", 10, QFont::Normal) );
- _qsciEditorParent->setMarginsFont( QFont("Monospace", 10, QFont::Normal) );
+ _qsciEditorParent->setFont( TQFont("Monospace", 10, TQFont::Normal) );
+ _qsciEditorParent->setMarginsFont( TQFont("Monospace", 10, TQFont::Normal) );
#endif
}
@@ -208,7 +208,7 @@ void UiGuiHighlighter::turnHighlightOff() {
bool UiGuiHighlighter::readCurrentSettings( const char *prefix ) {
bool ok, flag, rc = true;
int num;
- QString key;
+ TQString key;
// Reset lists containing fonts and colors for each style
_fontForStyles.clear();
@@ -228,7 +228,7 @@ bool UiGuiHighlighter::readCurrentSettings( const char *prefix ) {
num = _settings->value(key + "color", 0).toInt();
if (ok)
- setColor( QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i );
+ setColor( TQColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i );
else
rc = false;
@@ -242,18 +242,18 @@ bool UiGuiHighlighter::readCurrentSettings( const char *prefix ) {
rc = false;
// Read the font
- QStringList fdesc;
+ TQStringList fdesc;
ok = _settings->contains(key + "font");
fdesc = _settings->value(key + "font").toStringList();
if (ok && fdesc.count() == 5) {
- QFont f;
+ TQFont f;
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
f.setFamily(fdesc[0]);
#else
- if ( fdesc[0].contains("courier", Qt::CaseInsensitive) )
+ if ( fdesc[0].contains("courier", TQt::CaseInsensitive) )
f.setFamily("Monospace");
else
f.setFamily(fdesc[0]);
@@ -273,7 +273,7 @@ bool UiGuiHighlighter::readCurrentSettings( const char *prefix ) {
num = _settings->value(key + "paper", 0).toInt();
if (ok)
- _lexer->setPaper( QColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i );
+ _lexer->setPaper( TQColor((num >> 16) & 0xff, (num >> 8) & 0xff, num & 0xff), i );
else
rc = false;
}
@@ -291,7 +291,7 @@ bool UiGuiHighlighter::readCurrentSettings( const char *prefix ) {
\brief Write the settings for the current lexer to the settings file.
*/
void UiGuiHighlighter::writeCurrentSettings( const char *prefix ) {
- QString key;
+ TQString key;
// Write the styles.
for (int i = 0; i < 128; ++i) {
@@ -300,7 +300,7 @@ void UiGuiHighlighter::writeCurrentSettings( const char *prefix ) {
continue;
int num;
- QColor c;
+ TQColor c;
key.sprintf( "%s/%s/style%d/", prefix, _lexer->language(), i );
key.replace("+", "p");
@@ -323,9 +323,9 @@ void UiGuiHighlighter::writeCurrentSettings( const char *prefix ) {
_settings->setValue( key + "eolfill", _lexer->eolFill(i) );
// Write the font
- QStringList fdesc;
- QString fmt("%1");
- QFont f;
+ TQStringList fdesc;
+ TQString fmt("%1");
+ TQFont f;
if ( _fontForStyles.contains(i) ) {
f = _fontForStyles[i];
@@ -356,7 +356,7 @@ void UiGuiHighlighter::writeCurrentSettings( const char *prefix ) {
/*!
\brief Sets the \a color for the given \a style.
*/
-void UiGuiHighlighter::setColor(const QColor &color, int style) {
+void UiGuiHighlighter::setColor(const TQColor &color, int style) {
_colorForStyles[style] = color;
_lexer->setColor( color, style );
}
@@ -365,7 +365,7 @@ void UiGuiHighlighter::setColor(const QColor &color, int style) {
/*!
\brief Sets the \a font for the given \a style.
*/
-void UiGuiHighlighter::setFont(const QFont &font, int style) {
+void UiGuiHighlighter::setFont(const TQFont &font, int style) {
_fontForStyles[style] = font;
_lexer->setFont( font, style );
}
@@ -374,7 +374,7 @@ void UiGuiHighlighter::setFont(const QFont &font, int style) {
/*!
\brief Sets the to be used lexer by giving his name.
*/
-void UiGuiHighlighter::setLexerByName( QString lexerName ) {
+void UiGuiHighlighter::setLexerByName( TQString lexerName ) {
setLexerForExtension( _mapHighlighternameToExtension[lexerName].first() );
}
@@ -382,7 +382,7 @@ void UiGuiHighlighter::setLexerByName( QString lexerName ) {
/*!
\brief Sets the proper highlighter / lexer for the given file \a extension. Returns the index of the used lexer in the list.
*/
-int UiGuiHighlighter::setLexerForExtension( QString extension ) {
+int UiGuiHighlighter::setLexerForExtension( TQString extension ) {
int indexOfHighlighter = 0;
extension = extension.toLower();
@@ -415,7 +415,7 @@ int UiGuiHighlighter::setLexerForExtension( QString extension ) {
else if ( extension == "diff" ) {
_lexer = new QsciLexerDiff();
}
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
else if ( extension == "f" || extension == "for" || extension == "f90" ) {
_lexer = new QsciLexerFortran();
}
@@ -441,7 +441,7 @@ int UiGuiHighlighter::setLexerForExtension( QString extension ) {
else if ( extension == "makefile" ) {
_lexer = new QsciLexerMakefile();
}
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
else if ( extension == "pas" ) {
_lexer = new QsciLexerPascal();
}
@@ -452,7 +452,7 @@ int UiGuiHighlighter::setLexerForExtension( QString extension ) {
else if ( extension == "php" ) {
_lexer = new QsciLexerHTML();
}
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
else if ( extension == "ps" || extension == "eps" || extension == "pdf" || extension == "ai" || extension == "fh") {
_lexer = new QsciLexerPostScript();
}
@@ -469,7 +469,7 @@ int UiGuiHighlighter::setLexerForExtension( QString extension ) {
else if ( extension == "rub" || extension == "rb" ) {
_lexer = new QsciLexerRuby();
}
-#if ( QSCINTILLA_VERSION >= 0x020400 )
+#if ( TQSCINTILLA_VERSION >= 0x020400 )
else if ( extension == "spice?" ) {
_lexer = new QsciLexerSpice();
}
@@ -477,7 +477,7 @@ int UiGuiHighlighter::setLexerForExtension( QString extension ) {
else if ( extension == "sql" ) {
_lexer = new QsciLexerSQL();
}
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
else if ( extension == "tcl" ) {
_lexer = new QsciLexerTCL();
}
@@ -485,7 +485,7 @@ int UiGuiHighlighter::setLexerForExtension( QString extension ) {
else if ( extension == "tex" ) {
_lexer = new QsciLexerTeX();
}
-#if ( QSCINTILLA_VERSION >= 0x020400 )
+#if ( TQSCINTILLA_VERSION >= 0x020400 )
else if ( extension == "vlog?" ) {
_lexer = new QsciLexerVerilog();
}
@@ -494,13 +494,13 @@ int UiGuiHighlighter::setLexerForExtension( QString extension ) {
_lexer = new QsciLexerVHDL();
}
else if ( extension == "xml" ) {
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
_lexer = new QsciLexerXML();
#else
_lexer = new QsciLexerHTML();
#endif
}
-#if ( QSCINTILLA_VERSION >= 0x020300 )
+#if ( TQSCINTILLA_VERSION >= 0x020300 )
else if ( extension == "yaml" ) {
_lexer = new QsciLexerYAML();
}
@@ -516,7 +516,7 @@ int UiGuiHighlighter::setLexerForExtension( QString extension ) {
indexOfHighlighter++;
}
- // Set the _lexer for the QScintilla widget.
+ // Set the _lexer for the TQScintilla widget.
if ( _highlightningIsOn ) {
_qsciEditorParent->setLexer(_lexer);
}
diff --git a/src/UiGuiHighlighter.h b/src/UiGuiHighlighter.h
index 4ac0f35..67212f3 100755
--- a/src/UiGuiHighlighter.h
+++ b/src/UiGuiHighlighter.h
@@ -20,19 +20,19 @@
#ifndef UIGUIHIGHLIGHTER_H
#define UIGUIHIGHLIGHTER_H
-#include <tqobject.h>
-#include <tqmap.h>
-#include <tqfont.h>
-#include <tqcolor.h>
+#include <tntqobject.h>
+#include <tntqmap.h>
+#include <tntqfont.h>
+#include <tntqcolor.h>
-class QAction;
-class QSettings;
+class TQAction;
+class TQSettings;
class QsciScintilla;
class QsciLexer;
-class UiGuiHighlighter : public QObject
+class UiGuiHighlighter : public TQObject
{
Q_OBJECT
@@ -43,32 +43,32 @@ public:
bool readCurrentSettings(const char *prefix);
void writeCurrentSettings(const char *prefix);
- QStringList getAvailableHighlighters();
+ TQStringList getAvailableHighlighters();
public slots:
//! The foreground color for style number \a style is set to \a color. If
//! \a style is -1 then the color is set for all styles.
- void setColor(const QColor &color, int style = -1);
+ void setColor(const TQColor &color, int style = -1);
//! The font for style number \a style is set to \a font. If \a style is
//! -1 then the font is set for all styles.
- void setFont(const QFont &font, int style = -1);
+ void setFont(const TQFont &font, int style = -1);
//! Sets the lexer that is responsible for the given \a extension.
- int setLexerForExtension( QString extension );
+ int setLexerForExtension( TQString extension );
- void setLexerByName( QString lexerName );
+ void setLexerByName( TQString lexerName );
- void setHighlighterByAction(QAction* highlighterAction);
+ void setHighlighterByAction(TQAction* highlighterAction);
private:
bool _highlightningIsOn;
QsciScintilla *_qsciEditorParent;
- QMap<int, QFont> _fontForStyles;
- QMap<int, QColor> _colorForStyles;
+ TQMap<int, TQFont> _fontForStyles;
+ TQMap<int, TQColor> _colorForStyles;
QsciLexer* _lexer;
- QSettings *_settings;
- QMap<QString, QStringList> _mapHighlighternameToExtension;
+ TQSettings *_settings;
+ TQMap<TQString, TQStringList> _mapHighlighternameToExtension;
};
#endif // UIGUIHIGHLIGHTER_H
diff --git a/src/UiGuiIndentServer.cpp b/src/UiGuiIndentServer.cpp
index 8a93094..ad0dd3e 100755
--- a/src/UiGuiIndentServer.cpp
+++ b/src/UiGuiIndentServer.cpp
@@ -21,7 +21,7 @@
#include <tqtcpserver.h>
#include <tqtcpsocket.h>
-#include <tqmessagebox.h>
+#include <tntqmessagebox.h>
#include <tqtdebug.h>
//! \defgroup grp_Server All concerning the server component.
@@ -43,7 +43,7 @@
matter for which application the plugin/client is developed.
*/
-UiGuiIndentServer::UiGuiIndentServer(void) : QObject() {
+UiGuiIndentServer::UiGuiIndentServer(void) : TQObject() {
_tcpServer = NULL;
_currentClientConnection = NULL;
_readyForHandleRequest = false;
@@ -56,12 +56,12 @@ UiGuiIndentServer::~UiGuiIndentServer(void) {
void UiGuiIndentServer::startServer() {
if ( _tcpServer == NULL ) {
- _tcpServer = new QTcpServer(this);
+ _tcpServer = new TQTcpServer(this);
}
if ( !_tcpServer->isListening() ) {
- if ( !_tcpServer->listen(QHostAddress::Any, quint16(84484)) ) {
- QMessageBox::critical( NULL, tr("UiGUI Server"), tr("Unable to start the server: %1.").arg(_tcpServer->errorString()) );
+ if ( !_tcpServer->listen(TQHostAddress::Any, tquint16(84484)) ) {
+ TQMessageBox::critical( NULL, tr("UiGUI Server"), tr("Unable to start the server: %1.").arg(_tcpServer->errorString()) );
return;
}
}
@@ -84,7 +84,7 @@ void UiGuiIndentServer::stopServer() {
void UiGuiIndentServer::handleNewConnection() {
- QTcpSocket *clientConnection = _tcpServer->nextPendingConnection();
+ TQTcpSocket *clientConnection = _tcpServer->nextPendingConnection();
connect( clientConnection, SIGNAL(disconnected()), clientConnection, SLOT(deleteLater()) );
connect( clientConnection, SIGNAL(readyRead()), this, SLOT(handleReceivedData()) );
@@ -96,15 +96,15 @@ void UiGuiIndentServer::handleReceivedData() {
return;
}
- _currentClientConnection = qobject_cast<QTcpSocket*>( sender() );
- QString receivedData = "";
+ _currentClientConnection = qobject_cast<TQTcpSocket*>( sender() );
+ TQString receivedData = "";
if ( _currentClientConnection != NULL ) {
- QDataStream in(_currentClientConnection);
- in.setVersion(QDataStream::Qt_4_0);
+ TQDataStream in(_currentClientConnection);
+ in.setVersion(TQDataStream::TQt_4_0);
if ( _blockSize == 0 ) {
- if ( _currentClientConnection->bytesAvailable() < (int)sizeof(quint32) )
+ if ( _currentClientConnection->bytesAvailable() < (int)sizeof(tquint32) )
return;
in >> _blockSize;
@@ -113,12 +113,12 @@ void UiGuiIndentServer::handleReceivedData() {
if ( _currentClientConnection->bytesAvailable() < _blockSize )
return;
- QString receivedMessage;
+ TQString receivedMessage;
in >> receivedMessage;
_blockSize = 0;
- qDebug() << "receivedMessage: " << receivedMessage;
+ tqDebug() << "receivedMessage: " << receivedMessage;
if ( receivedMessage == "ts" ) {
sendMessage("Toll");
@@ -130,16 +130,16 @@ void UiGuiIndentServer::handleReceivedData() {
}
-void UiGuiIndentServer::sendMessage( const QString &message ) {
+void UiGuiIndentServer::sendMessage( const TQString &message ) {
_readyForHandleRequest = false;
_dataToSend = "";
- QDataStream out(&_dataToSend, QIODevice::WriteOnly);
- out.setVersion(QDataStream::Qt_4_0);
- out << (quint32)0;
+ TQDataStream out(&_dataToSend, TQIODevice::WriteOnly);
+ out.setVersion(TQDataStream::TQt_4_0);
+ out << (tquint32)0;
out << message;
out.device()->seek(0);
- out << (quint32)(_dataToSend.size() - sizeof(quint32));
+ out << (tquint32)(_dataToSend.size() - sizeof(tquint32));
connect(_currentClientConnection, SIGNAL(bytesWritten(qint64)), this, SLOT(checkIfReadyForHandleRequest()));
_currentClientConnection->write(_dataToSend);
@@ -148,8 +148,8 @@ void UiGuiIndentServer::sendMessage( const QString &message ) {
void UiGuiIndentServer::checkIfReadyForHandleRequest() {
if ( _currentClientConnection->bytesToWrite() == 0 ) {
- QString dataToSendStr = _dataToSend.right( _dataToSend.size() - sizeof(quint32) );
- qDebug() << "checkIfReadyForHandleRequest _dataToSend was: " << dataToSendStr;
+ TQString dataToSendStr = _dataToSend.right( _dataToSend.size() - sizeof(tquint32) );
+ tqDebug() << "checkIfReadyForHandleRequest _dataToSend was: " << dataToSendStr;
disconnect(_currentClientConnection, SIGNAL(bytesWritten(qint64)), this, SLOT(checkIfReadyForHandleRequest()));
_readyForHandleRequest = true;
}
diff --git a/src/UiGuiIndentServer.h b/src/UiGuiIndentServer.h
index 79f4606..fb5e631 100755
--- a/src/UiGuiIndentServer.h
+++ b/src/UiGuiIndentServer.h
@@ -20,13 +20,13 @@
#ifndef UIGUIINDENTSERVER_H
#define UIGUIINDENTSERVER_H
-#include <tqobject.h>
+#include <tntqobject.h>
-class QTcpServer;
-class QTcpSocket;
+class TQTcpServer;
+class TQTcpSocket;
-class UiGuiIndentServer : public QObject
+class UiGuiIndentServer : public TQObject
{
Q_OBJECT
@@ -41,15 +41,15 @@ public slots:
private slots:
void handleNewConnection();
void handleReceivedData();
- void sendMessage(const QString &message);
+ void sendMessage(const TQString &message);
void checkIfReadyForHandleRequest();
private:
- QTcpServer *_tcpServer;
- QByteArray _dataToSend;
+ TQTcpServer *_tcpServer;
+ TQByteArray _dataToSend;
bool _readyForHandleRequest;
- QTcpSocket *_currentClientConnection;
- quint32 _blockSize;
+ TQTcpSocket *_currentClientConnection;
+ tquint32 _blockSize;
};
#endif // UIGUIINDENTSERVER_H
diff --git a/src/UiGuiIniFileParser.cpp b/src/UiGuiIniFileParser.cpp
index 9e1a023..3f1ee7f 100755
--- a/src/UiGuiIniFileParser.cpp
+++ b/src/UiGuiIniFileParser.cpp
@@ -19,10 +19,10 @@
#include "UiGuiIniFileParser.h"
-#include <tqfile.h>
-#include <tqstringlist.h>
-#include <tqvariant.h>
-#include <tqtextstream.h>
+#include <tntqfile.h>
+#include <tntqstringlist.h>
+#include <tntqvariant.h>
+#include <tntqtextstream.h>
//! \defgroup grp_Settings All concerning applications settings.
@@ -35,8 +35,8 @@
"keyname=keyvalue". Groups can be defined by writing the groupname
in the style [groupname] before some key-value pairs.
- The reason why I use my own class instead of QSettings is mainly, that
- QSettings always internally sorts the groups alphabetically and also
+ The reason why I use my own class instead of TQSettings is mainly, that
+ TQSettings always internally sorts the groups alphabetically and also
rewrites a settings file sorted. Very annoying for me.
*/
@@ -51,7 +51,7 @@ UiGuiIniFileParser::UiGuiIniFileParser(void) {
/*!
\brief Directly loads and parses the file with name \a iniFileName.
*/
-UiGuiIniFileParser::UiGuiIniFileParser(const QString &iniFileName) {
+UiGuiIniFileParser::UiGuiIniFileParser(const TQString &iniFileName) {
init();
_iniFileName = iniFileName;
parseIniFile();
@@ -70,10 +70,10 @@ UiGuiIniFileParser::~UiGuiIniFileParser(void) {
/*!
- \brief Returns the group/section names in the same order as they occurr in the ini file as QStringList.
+ \brief Returns the group/section names in the same order as they occurr in the ini file as TQStringList.
*/
-QStringList UiGuiIniFileParser::childGroups() {
- QStringList sectionsStringList;
+TQStringList UiGuiIniFileParser::childGroups() {
+ TQStringList sectionsStringList;
for( unsigned int i = 0; i < _sections.size(); i++ ) {
sectionsStringList << _sections[i];
@@ -84,14 +84,14 @@ QStringList UiGuiIniFileParser::childGroups() {
/*!
- \brief Returns the value of the defined \a keyName as QVariant.
+ \brief Returns the value of the defined \a keyName as TQVariant.
The \a keyName is assembled by a section name, a slash and the key name itself.
For example if you wish to access the value of the following setting:
<code>[NiceSection]</br>niceKeyName=2</code> you would have to call
value("NiceSection/niceKeyName").
*/
-QVariant UiGuiIniFileParser::value(const QString &keyName, const QString &defaultValue) {
+TQVariant UiGuiIniFileParser::value(const TQString &keyName, const TQString &defaultValue) {
return _keyValueMap.value( keyName, defaultValue );
}
@@ -100,18 +100,18 @@ QVariant UiGuiIniFileParser::value(const QString &keyName, const QString &defaul
\brief Parses the ini file and stores the key value pairs in the internal vectors \a keys and \a values.
*/
void UiGuiIniFileParser::parseIniFile() {
- QFile iniFile(_iniFileName);
+ TQFile iniFile(_iniFileName);
- if ( iniFile.open(QFile::ReadOnly) ) {
+ if ( iniFile.open(TQFile::ReadOnly) ) {
// Clear the vectors holding the keys and values.
_sections.clear();
_keyValueMap.clear();
- QTextStream iniFileStream( &iniFile );
- QString line;
- QString currentSectionName = "";
- QString keyName = "";
- QString valueAsString = "";
+ TQTextStream iniFileStream( &iniFile );
+ TQString line;
+ TQString currentSectionName = "";
+ TQString keyName = "";
+ TQString valueAsString = "";
while ( !iniFileStream.atEnd() ) {
line = iniFileStream.readLine().trimmed();
diff --git a/src/UiGuiIniFileParser.h b/src/UiGuiIniFileParser.h
index 84c19a7..322111f 100755
--- a/src/UiGuiIniFileParser.h
+++ b/src/UiGuiIniFileParser.h
@@ -20,23 +20,23 @@
#ifndef UIGUIINIFILEPARSER_H
#define UIGUIINIFILEPARSER_H
-#include <tqmap.h>
-#include <tqstring.h>
+#include <tntqmap.h>
+#include <tntqstring.h>
#include <vector>
-class QStringList;
-class QVariant;
+class TQStringList;
+class TQVariant;
class UiGuiIniFileParser
{
public:
UiGuiIniFileParser(void);
- UiGuiIniFileParser(const QString &iniFileName);
+ UiGuiIniFileParser(const TQString &iniFileName);
~UiGuiIniFileParser(void);
- QVariant value(const QString &keyName, const QString &defaultValue = "");
- QStringList childGroups();
+ TQVariant value(const TQString &keyName, const TQString &defaultValue = "");
+ TQStringList childGroups();
protected:
void init();
@@ -44,9 +44,9 @@ protected:
private:
void parseIniFile();
- QString _iniFileName;
- std::vector<QString> _sections;
- QMap<QString, QVariant> _keyValueMap;
+ TQString _iniFileName;
+ std::vector<TQString> _sections;
+ TQMap<TQString, TQVariant> _keyValueMap;
};
#endif // UIGUIINIFILEPARSER_H
diff --git a/src/UiGuiSettings.cpp b/src/UiGuiSettings.cpp
index 5d8349b..084b399 100755
--- a/src/UiGuiSettings.cpp
+++ b/src/UiGuiSettings.cpp
@@ -21,16 +21,16 @@
#include "SettingsPaths.h"
-#include <tqsettings.h>
-#include <tqpoint.h>
-#include <tqsize.h>
-#include <tqdir.h>
+#include <tntqsettings.h>
+#include <tntqpoint.h>
+#include <tntqsize.h>
+#include <tntqdir.h>
#include <tqdate.h>
-#include <tqstringlist.h>
+#include <tntqstringlist.h>
#include <tqcoreapplication.h>
#include <tqmetamethod.h>
#include <tqmetaproperty.h>
-#include <tqwidget.h>
+#include <tntqwidget.h>
//! \defgroup grp_Settings All concerning the settings.
@@ -42,15 +42,15 @@
*/
// Inits the single class instance pointer.
-QWeakPointer<UiGuiSettings> UiGuiSettings::_instance;
+TQWeakPointer<UiGuiSettings> UiGuiSettings::_instance;
/*!
\brief The constructor for the settings.
*/
-UiGuiSettings::UiGuiSettings() : QObject() {
+UiGuiSettings::UiGuiSettings() : TQObject() {
// Create the main application settings object from the UniversalIndentGUI.ini file.
- _qsettings = new QSettings(SettingsPaths::getSettingsPath() + "/UniversalIndentGUI.ini", QSettings::IniFormat, this);
+ _qsettings = new TQSettings(SettingsPaths::getSettingsPath() + "/UniversalIndentGUI.ini", TQSettings::IniFormat, this);
_indenterDirctoryStr = SettingsPaths::getGlobalFilesPath() + "/indenters";
readAvailableTranslations();
@@ -61,11 +61,11 @@ UiGuiSettings::UiGuiSettings() : QObject() {
/*!
\brief Returns the instance of the settings class. If no instance exists, ONE will be created.
*/
-QSharedPointer<UiGuiSettings> UiGuiSettings::getInstance() {
- QSharedPointer<UiGuiSettings> sharedInstance = _instance.toStrongRef();
+TQSharedPointer<UiGuiSettings> UiGuiSettings::getInstance() {
+ TQSharedPointer<UiGuiSettings> sharedInstance = _instance.toStrongRef();
if ( sharedInstance.isNull() ) {
// Create the settings object, which loads all UiGui settings from a file.
- sharedInstance = QSharedPointer<UiGuiSettings>(new UiGuiSettings());
+ sharedInstance = TQSharedPointer<UiGuiSettings>(new UiGuiSettings());
_instance = sharedInstance.toWeakRef();
}
@@ -88,18 +88,18 @@ UiGuiSettings::~UiGuiSettings() {
/*!
\brief Scans the translations directory for available translation files and
- stores them in the QList \a _availableTranslations.
+ stores them in the TQList \a _availableTranslations.
*/
void UiGuiSettings::readAvailableTranslations() {
- QString languageShort;
- QStringList languageFileList;
+ TQString languageShort;
+ TQStringList languageFileList;
// English is the default language. A translation file does not exist but to have a menu entry, added here.
languageFileList << "universalindent_en.qm";
// Find all translation files in the "translations" directory.
- QDir translationDirectory = QDir( SettingsPaths::getGlobalFilesPath() + "/translations" );
- languageFileList << translationDirectory.entryList( QStringList("universalindent_*.qm") );
+ TQDir translationDirectory = TQDir( SettingsPaths::getGlobalFilesPath() + "/translations" );
+ languageFileList << translationDirectory.entryList( TQStringList("universalindent_*.qm") );
// Loop for each found translation file
foreach ( languageShort, languageFileList ) {
@@ -116,17 +116,17 @@ void UiGuiSettings::readAvailableTranslations() {
/*!
\brief Returns a list of the mnemonics of the available translations.
*/
-QStringList UiGuiSettings::getAvailableTranslations() {
+TQStringList UiGuiSettings::getAvailableTranslations() {
return _availableTranslations;
}
/*!
- \brief Returns the value of the by \a settingsName defined setting as QVariant.
+ \brief Returns the value of the by \a settingsName defined setting as TQVariant.
If the named setting does not exist, 0 is being returned.
*/
-QVariant UiGuiSettings::getValueByName(QString settingName) {
+TQVariant UiGuiSettings::getValueByName(TQString settingName) {
return _qsettings->value("UniversalIndentGUI/" + settingName);
}
@@ -143,8 +143,8 @@ bool UiGuiSettings::initSettings()
// Read windows last size and position from the settings file.
_qsettings->setValue( "UniversalIndentGUI/maximized", _qsettings->value("UniversalIndentGUI/maximized", false) );
- _qsettings->setValue( "UniversalIndentGUI/position", _qsettings->value("UniversalIndentGUI/position", QPoint(50, 50)) );
- _qsettings->setValue( "UniversalIndentGUI/size", _qsettings->value("UniversalIndentGUI/size", QSize(800, 600)) );
+ _qsettings->setValue( "UniversalIndentGUI/position", _qsettings->value("UniversalIndentGUI/position", TQPoint(50, 50)) );
+ _qsettings->setValue( "UniversalIndentGUI/size", _qsettings->value("UniversalIndentGUI/size", TQSize(800, 600)) );
// Read last selected encoding for the opened source code file.
_qsettings->setValue( "UniversalIndentGUI/encoding", _qsettings->value("UniversalIndentGUI/encoding", "UTF-8") );
@@ -182,10 +182,10 @@ bool UiGuiSettings::initSettings()
// Read the update check settings from the settings file.
_qsettings->setValue( "UniversalIndentGUI/CheckForUpdate", _qsettings->value("UniversalIndentGUI/CheckForUpdate", false) );
- _qsettings->setValue( "UniversalIndentGUI/LastUpdateCheck", _qsettings->value("UniversalIndentGUI/LastUpdateCheck", QDate(1900,1,1)) );
+ _qsettings->setValue( "UniversalIndentGUI/LastUpdateCheck", _qsettings->value("UniversalIndentGUI/LastUpdateCheck", TQDate(1900,1,1)) );
// Read the main window state.
- _qsettings->setValue( "UniversalIndentGUI/MainWindowState", _qsettings->value("UniversalIndentGUI/MainWindowState", QByteArray()) );
+ _qsettings->setValue( "UniversalIndentGUI/MainWindowState", _qsettings->value("UniversalIndentGUI/MainWindowState", TQByteArray()) );
return true;
}
@@ -194,35 +194,35 @@ bool UiGuiSettings::initSettings()
/*!
\brief Register the by \a propertyName defined property of \a obj to be connected to the setting defined by \a settingName.
- The \a propertyName must be one of those that are listed in the Qt "Properties" documentation section of a Qt Object.
+ The \a propertyName must be one of those that are listed in the TQt "Properties" documentation section of a TQt Object.
All further needed info is retrieved via the \a obj's MetaObject, like the to the property bound signal.
*/
-bool UiGuiSettings::registerObjectProperty( QObject *obj, const QString &propertyName, const QString &settingName )
+bool UiGuiSettings::registerObjectProperty( TQObject *obj, const TQString &propertyName, const TQString &settingName )
{
- const QMetaObject *metaObject = obj->metaObject();
+ const TQMetaObject *metaObject = obj->metaObject();
bool connectSuccess = false;
// Connect to the objects destroyed signal, so that it will be correctly unregistered.
- connectSuccess = connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectProperty(QObject*)));
+ connectSuccess = connect(obj, SIGNAL(destroyed(TQObject*)), this, SLOT(unregisterObjectProperty(TQObject*)));
int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
if ( connectSuccess && indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
+ TQMetaProperty mProp = metaObject->property(indexOfProp);
// Connect to the property's value changed signal.
if ( mProp.hasNotifySignal() ) {
- QMetaMethod signal = mProp.notifySignal();
- //QString teststr = qPrintable(SIGNAL() + QString(signal.signature()));
- // The command "SIGNAL() + QString(signal.signature())" assembles the signal methods signature to a valid Qt SIGNAL.
- connectSuccess = connect(obj, qPrintable(SIGNAL() + QString(signal.signature())), this, SLOT(handleObjectPropertyChange()));
+ TQMetaMethod signal = mProp.notifySignal();
+ //TQString teststr = qPrintable(SIGNAL() + TQString(signal.signature()));
+ // The command "SIGNAL() + TQString(signal.signature())" assembles the signal methods signature to a valid TQt SIGNAL.
+ connectSuccess = connect(obj, qPrintable(SIGNAL() + TQString(signal.signature())), this, SLOT(handleObjectPropertyChange()));
}
if ( connectSuccess ) {
- _registeredObjectProperties[obj] = QStringList() << propertyName << settingName;
+ _registeredObjectProperties[obj] = TQStringList() << propertyName << settingName;
}
else {
//TODO: Write a debug warning to the log.
- disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectProperty(QObject*)));
+ disconnect(obj, SIGNAL(destroyed(TQObject*)), this, SLOT(unregisterObjectProperty(TQObject*)));
return false;
}
@@ -237,7 +237,7 @@ bool UiGuiSettings::registerObjectProperty( QObject *obj, const QString &propert
}
else {
//TODO: Write a debug warning to the log.
- disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectProperty(QObject*)));
+ disconnect(obj, SIGNAL(destroyed(TQObject*)), this, SLOT(unregisterObjectProperty(TQObject*)));
return false;
}
@@ -246,18 +246,18 @@ bool UiGuiSettings::registerObjectProperty( QObject *obj, const QString &propert
/*!
- \brief Searches the child QObjects of \a obj for a property name and setting name definition within
+ \brief Searches the child TQObjects of \a obj for a property name and setting name definition within
their custom properties and registers this property name to that setting name if both were found.
The custom properties, for which are searched, are "connectedPropertyName" and "connectedSettingName",
- where "connectedPropertyName" is the name of a QObject property as it is documented in the QtDocs, and
+ where "connectedPropertyName" is the name of a TQObject property as it is documented in the TQtDocs, and
"connectedSettingName" is the name of a setting here within UiGuiSettings. If the mentioned setting
name doesn't exist, it will be created.
Returns true, if all found property and setting definitions could be successfully registered.
Returns false, if any of those registrations fails.
*/
-bool UiGuiSettings::registerObjectPropertyRecursive(QObject *obj) {
+bool UiGuiSettings::registerObjectPropertyRecursive(TQObject *obj) {
return checkCustomPropertiesAndCallFunction(obj, &UiGuiSettings::registerObjectProperty);
}
@@ -268,13 +268,13 @@ bool UiGuiSettings::registerObjectPropertyRecursive(QObject *obj) {
Returns true, if the value could be assigned, otherwise returns false, which is the case if settingName doesn't exist
within the settings or if the mentioned propertyName wasn't found for the \a obj.
*/
-bool UiGuiSettings::setObjectPropertyToSettingValue( QObject *obj, const QString &propertyName, const QString &settingName )
+bool UiGuiSettings::setObjectPropertyToSettingValue( TQObject *obj, const TQString &propertyName, const TQString &settingName )
{
- const QMetaObject *metaObject = obj->metaObject();
+ const TQMetaObject *metaObject = obj->metaObject();
int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
+ TQMetaProperty mProp = metaObject->property(indexOfProp);
// If setting already exists, set the objects property to the setting value.
if ( _qsettings->contains("UniversalIndentGUI/" + settingName) ) {
@@ -296,17 +296,17 @@ bool UiGuiSettings::setObjectPropertyToSettingValue( QObject *obj, const QString
/*!
- \brief Searches the child QObjects of \a obj for a property name and setting name definition within
+ \brief Searches the child TQObjects of \a obj for a property name and setting name definition within
their custom properties and sets each property to settings value.
The custom properties, for which are searched, are "connectedPropertyName" and "connectedSettingName",
- where "connectedPropertyName" is the name of a QObject property as it is documented in the QtDocs, and
+ where "connectedPropertyName" is the name of a TQObject property as it is documented in the TQtDocs, and
"connectedSettingName" is the name of a setting here within UiGuiSettings.
Returns true, if all found property and setting definitions could be successfully registered.
Returns false, if any of those registrations fails.
*/
-bool UiGuiSettings::setObjectPropertyToSettingValueRecursive(QObject *obj) {
+bool UiGuiSettings::setObjectPropertyToSettingValueRecursive(TQObject *obj) {
return checkCustomPropertiesAndCallFunction(obj, &UiGuiSettings::setObjectPropertyToSettingValue);
}
@@ -319,13 +319,13 @@ bool UiGuiSettings::setObjectPropertyToSettingValueRecursive(QObject *obj) {
Returns true, if the value could be assigned, otherwise returns false, which is the case if the mentioned
propertyName wasn't found for the \a obj.
*/
-bool UiGuiSettings::setSettingToObjectPropertyValue( QObject *obj, const QString &propertyName, const QString &settingName )
+bool UiGuiSettings::setSettingToObjectPropertyValue( TQObject *obj, const TQString &propertyName, const TQString &settingName )
{
- const QMetaObject *metaObject = obj->metaObject();
+ const TQMetaObject *metaObject = obj->metaObject();
int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
+ TQMetaProperty mProp = metaObject->property(indexOfProp);
setValueByName(settingName, mProp.read(obj));
}
@@ -339,35 +339,35 @@ bool UiGuiSettings::setSettingToObjectPropertyValue( QObject *obj, const QString
/*!
- \brief Searches the child QObjects of \a obj for a property name and setting name definition within
+ \brief Searches the child TQObjects of \a obj for a property name and setting name definition within
their custom properties and sets each setting to the property value.
The custom properties, for which are searched, are "connectedPropertyName" and "connectedSettingName",
- where "connectedPropertyName" is the name of a QObject property as it is documented in the QtDocs, and
+ where "connectedPropertyName" is the name of a TQObject property as it is documented in the TQtDocs, and
"connectedSettingName" is the name of a setting here within UiGuiSettings. If the settingName
didn't exist yet, it will be created.
Returns true, if all found property and setting definitions could be successfully registered.
Returns false, if any of those registrations fails.
*/
-bool UiGuiSettings::setSettingToObjectPropertyValueRecursive(QObject *obj) {
+bool UiGuiSettings::setSettingToObjectPropertyValueRecursive(TQObject *obj) {
return checkCustomPropertiesAndCallFunction(obj, &UiGuiSettings::setSettingToObjectPropertyValue);
}
/*!
- \brief Iterates over all \a objs child QObjects and checks whether they have the custom properties
+ \brief Iterates over all \a objs child TQObjects and checks whether they have the custom properties
"connectedPropertyName" and "connectedSettingName" set. If both are set, it invokes the \a callBackFunc
with both.
*/
-bool UiGuiSettings::checkCustomPropertiesAndCallFunction(QObject *obj, bool (UiGuiSettings::*callBackFunc)(QObject *obj, const QString &propertyName, const QString &settingName)) {
+bool UiGuiSettings::checkCustomPropertiesAndCallFunction(TQObject *obj, bool (UiGuiSettings::*callBackFunc)(TQObject *obj, const TQString &propertyName, const TQString &settingName)) {
bool success = true;
// Find all widgets that have PropertyName and SettingName defined in their style sheet.
- QList<QObject *> allObjects = obj->findChildren<QObject *>();
- foreach (QObject *object, allObjects) {
- QString propertyName = object->property("connectedPropertyName").toString();
- QString settingName = object->property("connectedSettingName").toString();
+ TQList<TQObject *> allObjects = obj->findChildren<TQObject *>();
+ foreach (TQObject *object, allObjects) {
+ TQString propertyName = object->property("connectedPropertyName").toString();
+ TQString settingName = object->property("connectedSettingName").toString();
// If property and setting name were found, register that widget with the settings.
if ( !propertyName.isEmpty() && !settingName.isEmpty() ) {
@@ -382,22 +382,22 @@ bool UiGuiSettings::checkCustomPropertiesAndCallFunction(QObject *obj, bool (UiG
/*!
\brief The with a certain property registered \a obj gets unregistered.
*/
-void UiGuiSettings::unregisterObjectProperty(QObject *obj) {
+void UiGuiSettings::unregisterObjectProperty(TQObject *obj) {
if ( _registeredObjectProperties.contains(obj) ) {
- const QMetaObject *metaObject = obj->metaObject();
- QString propertyName = _registeredObjectProperties[obj].first();
- QString settingName = _registeredObjectProperties[obj].last();
+ const TQMetaObject *metaObject = obj->metaObject();
+ TQString propertyName = _registeredObjectProperties[obj].first();
+ TQString settingName = _registeredObjectProperties[obj].last();
bool connectSuccess = false;
int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
+ TQMetaProperty mProp = metaObject->property(indexOfProp);
// Disconnect to the property's value changed signal.
if ( mProp.hasNotifySignal() ) {
- QMetaMethod signal = mProp.notifySignal();
- // The command "SIGNAL() + QString(signal.signature())" assembles the signal methods signature to a valid Qt SIGNAL.
- connectSuccess = disconnect(obj, qPrintable(SIGNAL() + QString(signal.signature())), this, SLOT(handleObjectPropertyChange()));
+ TQMetaMethod signal = mProp.notifySignal();
+ // The command "SIGNAL() + TQString(signal.signature())" assembles the signal methods signature to a valid TQt SIGNAL.
+ connectSuccess = disconnect(obj, qPrintable(SIGNAL() + TQString(signal.signature())), this, SLOT(handleObjectPropertyChange()));
}
}
_registeredObjectProperties.remove(obj);
@@ -413,35 +413,35 @@ void UiGuiSettings::unregisterObjectProperty(QObject *obj) {
\a settingName changes the slot gets tried to be invoked with the settings value as parameter. This only works,
if the slot parameter is of the same type as the setting.
*/
-bool UiGuiSettings::registerObjectSlot(QObject *obj, const QString &slotName, const QString &settingName) {
+bool UiGuiSettings::registerObjectSlot(TQObject *obj, const TQString &slotName, const TQString &settingName) {
- const QMetaObject *metaObject = obj->metaObject();
+ const TQMetaObject *metaObject = obj->metaObject();
bool connectSuccess = false;
// Connect to the objects destroyed signal, so that it will be correctly unregistered.
- connectSuccess = connect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectSlot(QObject*)));
+ connectSuccess = connect(obj, SIGNAL(destroyed(TQObject*)), this, SLOT(unregisterObjectSlot(TQObject*)));
- QString normalizedSlotName = QMetaObject::normalizedSignature( qPrintable(slotName) );
+ TQString normalizedSlotName = TQMetaObject::normalizedSignature( qPrintable(slotName) );
int indexOfMethod = metaObject->indexOfMethod( qPrintable(normalizedSlotName) );
if ( connectSuccess && indexOfMethod > -1 ) {
- QMetaMethod mMethod = metaObject->method(indexOfMethod);
- //QMetaMethod::Access access = mMethod.access();
- //QMetaMethod::MethodType methType = mMethod.methodType();
+ TQMetaMethod mMethod = metaObject->method(indexOfMethod);
+ //TQMetaMethod::Access access = mMethod.access();
+ //TQMetaMethod::MethodType methType = mMethod.methodType();
// Since the method can at maximum be invoked with the setting value as argument,
// only methods taking max one argument are allowed.
if ( mMethod.parameterTypes().size() <= 1 ) {
- _registeredObjectSlots.insert(obj, QStringList() << normalizedSlotName << settingName);
+ _registeredObjectSlots.insert(obj, TQStringList() << normalizedSlotName << settingName);
}
else {
//TODO: Write a debug warning to the log.
- disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectSlot(QObject*)));
+ disconnect(obj, SIGNAL(destroyed(TQObject*)), this, SLOT(unregisterObjectSlot(TQObject*)));
return false;
}
}
else {
//TODO: Write a debug warning to the log.
- disconnect(obj, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterObjectSlot(QObject*)));
+ disconnect(obj, SIGNAL(destroyed(TQObject*)), this, SLOT(unregisterObjectSlot(TQObject*)));
return false;
}
@@ -453,10 +453,10 @@ bool UiGuiSettings::registerObjectSlot(QObject *obj, const QString &slotName, co
\brief If \a obj, \a slotName and \a settingName are given, that certain connection is unregistered.
If only \a obj is given, all to this object registered slot-setting connections are unregistered.
*/
-void UiGuiSettings::unregisterObjectSlot(QObject *obj, const QString &slotName, const QString &settingName) {
- //const QMetaObject *metaObject = obj->metaObject();
- QString normalizedSlotName = QMetaObject::normalizedSignature( qPrintable(slotName) );
- QMutableMapIterator<QObject*, QStringList> it(_registeredObjectSlots);
+void UiGuiSettings::unregisterObjectSlot(TQObject *obj, const TQString &slotName, const TQString &settingName) {
+ //const TQMetaObject *metaObject = obj->metaObject();
+ TQString normalizedSlotName = TQMetaObject::normalizedSignature( qPrintable(slotName) );
+ TQMutableMapIterator<TQObject*, TQStringList> it(_registeredObjectSlots);
while (it.hasNext()) {
it.next();
if (it.key() == obj && slotName.isEmpty() && settingName.isEmpty())
@@ -472,15 +472,15 @@ void UiGuiSettings::unregisterObjectSlot(QObject *obj, const QString &slotName,
and distributes the new value to all other to the same settingName registered objects.
*/
void UiGuiSettings::handleObjectPropertyChange() {
- QObject *obj = QObject::sender();
- QString className = obj->metaObject()->className();
- const QMetaObject *metaObject = obj->metaObject();
- QString propertyName = _registeredObjectProperties[obj].first();
- QString settingName = _registeredObjectProperties[obj].last();
+ TQObject *obj = TQObject::sender();
+ TQString className = obj->metaObject()->className();
+ const TQMetaObject *metaObject = obj->metaObject();
+ TQString propertyName = _registeredObjectProperties[obj].first();
+ TQString settingName = _registeredObjectProperties[obj].last();
int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
+ TQMetaProperty mProp = metaObject->property(indexOfProp);
setValueByName(settingName, mProp.read(obj));
}
}
@@ -493,38 +493,38 @@ void UiGuiSettings::handleObjectPropertyChange() {
the changed value set too.
If the \a settingName didn't exist yet, it will be created.
*/
-void UiGuiSettings::setValueByName(const QString &settingName, const QVariant &value) {
+void UiGuiSettings::setValueByName(const TQString &settingName, const TQVariant &value) {
// Do the updating only, if the setting was really changed.
if ( _qsettings->value("UniversalIndentGUI/" + settingName) != value ) {
_qsettings->setValue("UniversalIndentGUI/" + settingName, value);
// Set the new value for all registered object properties for settingName.
- for ( QMap<QObject*, QStringList>::ConstIterator it = _registeredObjectProperties.begin(); it != _registeredObjectProperties.end(); ++it ) {
+ for ( TQMap<TQObject*, TQStringList>::ConstIterator it = _registeredObjectProperties.begin(); it != _registeredObjectProperties.end(); ++it ) {
if ( it.value().last() == settingName ) {
- QObject *obj = it.key();
- const QMetaObject *metaObject = obj->metaObject();
- QString propertyName = it.value().first();
+ TQObject *obj = it.key();
+ const TQMetaObject *metaObject = obj->metaObject();
+ TQString propertyName = it.value().first();
int indexOfProp = metaObject->indexOfProperty( qPrintable(propertyName) );
if ( indexOfProp > -1 ) {
- QMetaProperty mProp = metaObject->property(indexOfProp);
+ TQMetaProperty mProp = metaObject->property(indexOfProp);
mProp.write(obj, value);
}
}
}
// Invoke all registered object methods for settingName.
- for ( QMap<QObject*, QStringList>::ConstIterator it = _registeredObjectSlots.begin(); it != _registeredObjectSlots.end(); ++it ) {
+ for ( TQMap<TQObject*, TQStringList>::ConstIterator it = _registeredObjectSlots.begin(); it != _registeredObjectSlots.end(); ++it ) {
if ( it.value().last() == settingName ) {
- QObject *obj = it.key();
- const QMetaObject *metaObject = obj->metaObject();
- QString slotName = it.value().first();
+ TQObject *obj = it.key();
+ const TQMetaObject *metaObject = obj->metaObject();
+ TQString slotName = it.value().first();
int indexOfMethod = metaObject->indexOfMethod( qPrintable(slotName) );
if ( indexOfMethod > -1 ) {
- QMetaMethod mMethod = metaObject->method(indexOfMethod);
- //QMetaMethod::Access access = mMethod.access();
- //QMetaMethod::MethodType methType = mMethod.methodType();
+ TQMetaMethod mMethod = metaObject->method(indexOfMethod);
+ //TQMetaMethod::Access access = mMethod.access();
+ //TQMetaMethod::MethodType methType = mMethod.methodType();
bool success = false;
@@ -536,7 +536,7 @@ void UiGuiSettings::setValueByName(const QString &settingName, const QVariant &v
}
// Handle registered slots taking zero parameters.
else {
- success = mMethod.invoke( obj, Qt::DirectConnection );
+ success = mMethod.invoke( obj, TQt::DirectConnection );
}
if ( success == false ) {
@@ -549,138 +549,138 @@ void UiGuiSettings::setValueByName(const QString &settingName, const QVariant &v
}
-#include <tqbitarray.h>
-#include <tqbitmap.h>
-#include <tqbrush.h>
-#include <tqcursor.h>
-#include <tqdatetime.h>
-#include <tqfont.h>
+#include <tntqbitarray.h>
+#include <tntqbitmap.h>
+#include <tntqbrush.h>
+#include <tntqcursor.h>
+#include <tntqdatetime.h>
+#include <tntqfont.h>
#include <tqicon.h>
-#include <tqkeysequence.h>
-#include <tqlocale.h>
-#include <tqpalette.h>
-#include <tqpen.h>
-#include <tqsizepolicy.h>
+#include <tntqkeysequence.h>
+#include <tntqlocale.h>
+#include <tntqpalette.h>
+#include <tntqpen.h>
+#include <tntqsizepolicy.h>
#include <tqtextformat.h>
#include <tqtextlength.h>
-#include <tqurl.h>
-#if QT_VERSION >= 0x040600
+#include <tntqurl.h>
+#if TQT_VERSION >= 0x040600
#include <tqmatrix4x4.h>
#include <tqvector2d.h>
#endif
-bool UiGuiSettings::invokeMethodWithValue( QObject *obj, QMetaMethod mMethod, QVariant value )
+bool UiGuiSettings::invokeMethodWithValue( TQObject *obj, TQMetaMethod mMethod, TQVariant value )
{
switch (value.type()) {
- case QVariant::BitArray :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QBitArray, value.toBitArray()) );
- case QVariant::Bitmap :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QBitmap, value.value<QBitmap>()) );
- case QVariant::Bool :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(bool, value.toBool()) );
- case QVariant::Brush :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QBrush, value.value<QBrush>()) );
- case QVariant::ByteArray :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QByteArray, value.toByteArray()) );
- case QVariant::Char :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QChar, value.toChar()) );
- case QVariant::Color :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QColor, value.value<QColor>()) );
- case QVariant::Cursor :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QCursor, value.value<QCursor>()) );
- case QVariant::Date :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QDate, value.toDate()) );
- case QVariant::DateTime :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QDateTime, value.toDateTime()) );
- case QVariant::Double :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(double, value.toDouble()) );
- case QVariant::Font :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QFont, value.value<QFont>()) );
- case QVariant::Hash :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVariantHash, value.toHash()) );
- case QVariant::Icon :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QIcon, value.value<QIcon>()) );
- case QVariant::Image :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QImage, value.value<QImage>()) );
- case QVariant::Int :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(int, value.toInt()) );
- case QVariant::KeySequence :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QKeySequence, value.value<QKeySequence>()) );
- case QVariant::Line :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QLine, value.toLine()) );
- case QVariant::LineF :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QLineF, value.toLineF()) );
- case QVariant::List :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVariantList, value.toList()) );
- case QVariant::Locale :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QLocale, value.toLocale()) );
- case QVariant::LongLong :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(qlonglong, value.toLongLong()) );
- case QVariant::Map :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVariantMap, value.toMap()) );
- case QVariant::Matrix :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QMatrix, value.value<QMatrix>()) );
- case QVariant::Transform :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTransform, value.value<QTransform>()) );
-#if QT_VERSION >= 0x040600
- case QVariant::Matrix4x4 :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QMatrix4x4, value.value<QMatrix4x4>()) );
+ case TQVariant::BitArray :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQBitArray, value.toBitArray()) );
+ case TQVariant::Bitmap :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQBitmap, value.value<TQBitmap>()) );
+ case TQVariant::Bool :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(bool, value.toBool()) );
+ case TQVariant::Brush :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQBrush, value.value<TQBrush>()) );
+ case TQVariant::ByteArray :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQByteArray, value.toByteArray()) );
+ case TQVariant::Char :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQChar, value.toChar()) );
+ case TQVariant::Color :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQColor, value.value<TQColor>()) );
+ case TQVariant::Cursor :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQCursor, value.value<TQCursor>()) );
+ case TQVariant::Date :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQDate, value.toDate()) );
+ case TQVariant::DateTime :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQDateTime, value.toDateTime()) );
+ case TQVariant::Double :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(double, value.toDouble()) );
+ case TQVariant::Font :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQFont, value.value<TQFont>()) );
+ case TQVariant::Hash :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQVariantHash, value.toHash()) );
+ case TQVariant::Icon :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQIcon, value.value<TQIcon>()) );
+ case TQVariant::Image :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQImage, value.value<TQImage>()) );
+ case TQVariant::Int :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(int, value.toInt()) );
+ case TQVariant::KeySequence :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQKeySequence, value.value<TQKeySequence>()) );
+ case TQVariant::Line :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQLine, value.toLine()) );
+ case TQVariant::LineF :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQLineF, value.toLineF()) );
+ case TQVariant::List :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQVariantList, value.toList()) );
+ case TQVariant::Locale :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQLocale, value.toLocale()) );
+ case TQVariant::LongLong :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(qlonglong, value.toLongLong()) );
+ case TQVariant::Map :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQVariantMap, value.toMap()) );
+ case TQVariant::Matrix :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQMatrix, value.value<TQMatrix>()) );
+ case TQVariant::Transform :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQTransform, value.value<TQTransform>()) );
+#if TQT_VERSION >= 0x040600
+ case TQVariant::Matrix4x4 :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQMatrix4x4, value.value<TQMatrix4x4>()) );
#endif
- case QVariant::Palette :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPalette, value.value<QPalette>()) );
- case QVariant::Pen :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPen, value.value<QPen>()) );
- case QVariant::Pixmap :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPixmap, value.value<QPixmap>()) );
- case QVariant::Point :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPoint, value.toPoint()) );
- // case QVariant::PointArray :
- // return Q_ARG(QPointArray, value.value<QPointArray>()) );
- case QVariant::PointF :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPointF, value.toPointF()) );
- case QVariant::Polygon :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QPolygon, value.value<QPolygon>()) );
-#if QT_VERSION >= 0x040600
- case QVariant::Quaternion :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QQuaternion, value.value<QQuaternion>()) );
+ case TQVariant::Palette :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQPalette, value.value<TQPalette>()) );
+ case TQVariant::Pen :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQPen, value.value<TQPen>()) );
+ case TQVariant::Pixmap :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQPixmap, value.value<TQPixmap>()) );
+ case TQVariant::Point :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQPoint, value.toPoint()) );
+ // case TQVariant::PointArray :
+ // return Q_ARG(TQPointArray, value.value<TQPointArray>()) );
+ case TQVariant::PointF :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQPointF, value.toPointF()) );
+ case TQVariant::Polygon :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQPolygon, value.value<TQPolygon>()) );
+#if TQT_VERSION >= 0x040600
+ case TQVariant::Quaternion :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQQuaternion, value.value<TQQuaternion>()) );
#endif
- case QVariant::Rect :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRect, value.toRect()) );
- case QVariant::RectF :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRectF, value.toRectF()) );
- case QVariant::RegExp :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRegExp, value.toRegExp()) );
- case QVariant::Region :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QRegion, value.value<QRegion>()) );
- case QVariant::Size :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QSize, value.toSize()) );
- case QVariant::SizeF :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QSizeF, value.toSizeF()) );
- case QVariant::SizePolicy :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QSizePolicy, value.value<QSizePolicy>()) );
- case QVariant::String :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QString, value.toString()) );
- case QVariant::StringList :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QStringList, value.toStringList()) );
- case QVariant::TextFormat :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTextFormat, value.value<QTextFormat>()) );
- case QVariant::TextLength :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTextLength, value.value<QTextLength>()) );
- case QVariant::Time :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QTime, value.toTime()) );
- case QVariant::UInt :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(uint, value.toUInt()) );
- case QVariant::ULongLong :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(qulonglong, value.toULongLong()) );
- case QVariant::Url :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QUrl, value.toUrl()) );
-#if QT_VERSION >= 0x040600
- case QVariant::Vector2D :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVector2D, value.value<QVector2D>()) );
- case QVariant::Vector3D :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVector3D, value.value<QVector3D>()) );
- case QVariant::Vector4D :
- return mMethod.invoke( obj, Qt::DirectConnection, Q_ARG(QVector4D, value.value<QVector4D>()) );
+ case TQVariant::Rect :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQRect, value.toRect()) );
+ case TQVariant::RectF :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQRectF, value.toRectF()) );
+ case TQVariant::RegExp :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQRegExp, value.toRegExp()) );
+ case TQVariant::Region :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQRegion, value.value<TQRegion>()) );
+ case TQVariant::Size :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQSize, value.toSize()) );
+ case TQVariant::SizeF :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQSizeF, value.toSizeF()) );
+ case TQVariant::SizePolicy :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQSizePolicy, value.value<TQSizePolicy>()) );
+ case TQVariant::String :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQString, value.toString()) );
+ case TQVariant::StringList :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQStringList, value.toStringList()) );
+ case TQVariant::TextFormat :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQTextFormat, value.value<TQTextFormat>()) );
+ case TQVariant::TextLength :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQTextLength, value.value<TQTextLength>()) );
+ case TQVariant::Time :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQTime, value.toTime()) );
+ case TQVariant::UInt :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(uint, value.toUInt()) );
+ case TQVariant::ULongLong :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(qulonglong, value.toULongLong()) );
+ case TQVariant::Url :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQUrl, value.toUrl()) );
+#if TQT_VERSION >= 0x040600
+ case TQVariant::Vector2D :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQVector2D, value.value<TQVector2D>()) );
+ case TQVariant::Vector3D :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQVector3D, value.value<TQVector3D>()) );
+ case TQVariant::Vector4D :
+ return mMethod.invoke( obj, TQt::DirectConnection, Q_ARG(TQVector4D, value.value<TQVector4D>()) );
#endif
default:
return false;
diff --git a/src/UiGuiSettings.h b/src/UiGuiSettings.h
index c818199..c9e5917 100755
--- a/src/UiGuiSettings.h
+++ b/src/UiGuiSettings.h
@@ -20,44 +20,44 @@
#ifndef UIGUISETTINGS_H
#define UIGUISETTINGS_H
-#include <tqobject.h>
-#include <tqstringlist.h>
+#include <tntqobject.h>
+#include <tntqstringlist.h>
#include <tqmultimap.h>
#include <tqsharedpointer.h>
-class QSettings;
+class TQSettings;
-class UiGuiSettings : public QObject
+class UiGuiSettings : public TQObject
{
Q_OBJECT
private:
UiGuiSettings();
- static QWeakPointer<UiGuiSettings> _instance;
+ static TQWeakPointer<UiGuiSettings> _instance;
public:
- static QSharedPointer<UiGuiSettings> getInstance();
+ static TQSharedPointer<UiGuiSettings> getInstance();
~UiGuiSettings();
- bool registerObjectProperty(QObject *obj, const QString &propertyName, const QString &settingName);
- bool registerObjectPropertyRecursive(QObject *obj);
- bool setObjectPropertyToSettingValue(QObject *obj, const QString &propertyName, const QString &settingName);
- bool setObjectPropertyToSettingValueRecursive(QObject *obj);
- bool setSettingToObjectPropertyValue(QObject *obj, const QString &propertyName, const QString &settingName);
- bool setSettingToObjectPropertyValueRecursive(QObject *obj);
- bool registerObjectSlot(QObject *obj, const QString &slotName, const QString &settingName);
- QVariant getValueByName(QString settingName);
- QStringList getAvailableTranslations();
+ bool registerObjectProperty(TQObject *obj, const TQString &propertyName, const TQString &settingName);
+ bool registerObjectPropertyRecursive(TQObject *obj);
+ bool setObjectPropertyToSettingValue(TQObject *obj, const TQString &propertyName, const TQString &settingName);
+ bool setObjectPropertyToSettingValueRecursive(TQObject *obj);
+ bool setSettingToObjectPropertyValue(TQObject *obj, const TQString &propertyName, const TQString &settingName);
+ bool setSettingToObjectPropertyValueRecursive(TQObject *obj);
+ bool registerObjectSlot(TQObject *obj, const TQString &slotName, const TQString &settingName);
+ TQVariant getValueByName(TQString settingName);
+ TQStringList getAvailableTranslations();
public slots:
- void setValueByName(const QString &settingName, const QVariant &value);
- void unregisterObjectProperty(QObject *obj);
- void unregisterObjectSlot(QObject *obj, const QString &slotName = "", const QString &settingName = "");
+ void setValueByName(const TQString &settingName, const TQVariant &value);
+ void unregisterObjectProperty(TQObject *obj);
+ void unregisterObjectSlot(TQObject *obj, const TQString &slotName = "", const TQString &settingName = "");
protected:
bool initSettings();
- bool invokeMethodWithValue(QObject *obj, QMetaMethod mMethod, QVariant value);
- bool checkCustomPropertiesAndCallFunction(QObject *obj, bool (UiGuiSettings::*callBackFunc)(QObject *obj, const QString &propertyName, const QString &settingName));
+ bool invokeMethodWithValue(TQObject *obj, TQMetaMethod mMethod, TQVariant value);
+ bool checkCustomPropertiesAndCallFunction(TQObject *obj, bool (UiGuiSettings::*callBackFunc)(TQObject *obj, const TQString &propertyName, const TQString &settingName));
private slots:
void handleObjectPropertyChange();
@@ -66,18 +66,18 @@ private:
void readAvailableTranslations();
//! Stores the mnemonics of the available translations.
- QStringList _availableTranslations;
+ TQStringList _availableTranslations;
//! The settings file.
- QSettings *_qsettings;
+ TQSettings *_qsettings;
- //! Maps an QObject to a string list containing the property name and the associated setting name.
- QMap<QObject*, QStringList> _registeredObjectProperties;
+ //! Maps an TQObject to a string list containing the property name and the associated setting name.
+ TQMap<TQObject*, TQStringList> _registeredObjectProperties;
- //! Maps QObjects to a string list containing the method name and the associated setting name.
- QMultiMap<QObject*, QStringList> _registeredObjectSlots;
+ //! Maps TQObjects to a string list containing the method name and the associated setting name.
+ TQMultiMap<TQObject*, TQStringList> _registeredObjectSlots;
- QString _indenterDirctoryStr;
+ TQString _indenterDirctoryStr;
};
#endif // UIGUISETTINGS_H
diff --git a/src/UiGuiSettingsDialog.cpp b/src/UiGuiSettingsDialog.cpp
index 7c7001f..7414470 100755
--- a/src/UiGuiSettingsDialog.cpp
+++ b/src/UiGuiSettingsDialog.cpp
@@ -31,7 +31,7 @@
/*!
\brief The constructor calls the setup function for the ui created by uic.
*/
-UiGuiSettingsDialog::UiGuiSettingsDialog(QWidget* parent, QSharedPointer<UiGuiSettings> settings) : QDialog(parent) {
+UiGuiSettingsDialog::UiGuiSettingsDialog(TQWidget* parent, TQSharedPointer<UiGuiSettings> settings) : TQDialog(parent) {
// Remember pointer to the UiGuiSettings object.
_settings = settings;
@@ -62,28 +62,28 @@ void UiGuiSettingsDialog::initTranslationSelection() {
_settingsDialogForm->languageSelectionComboBox->clear();
// Now add an entry into the box for every language short.
- foreach (QString languageShort, _settings->getAvailableTranslations() ) {
+ foreach (TQString languageShort, _settings->getAvailableTranslations() ) {
// Identify the language mnemonic and set the full name.
if ( languageShort == "en" ) {
- _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("English") );
+ _settingsDialogForm->languageSelectionComboBox->addItem( TQIcon(TQString(":/language/language-"+languageShort+".png")), tr("English") );
}
else if ( languageShort == "fr" ) {
- _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("French") );
+ _settingsDialogForm->languageSelectionComboBox->addItem( TQIcon(TQString(":/language/language-"+languageShort+".png")), tr("French") );
}
else if ( languageShort == "de" ) {
- _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("German") );
+ _settingsDialogForm->languageSelectionComboBox->addItem( TQIcon(TQString(":/language/language-"+languageShort+".png")), tr("German") );
}
else if ( languageShort == "zh_TW" ) {
- _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Chinese (Taiwan)") );
+ _settingsDialogForm->languageSelectionComboBox->addItem( TQIcon(TQString(":/language/language-"+languageShort+".png")), tr("Chinese (Taiwan)") );
}
else if ( languageShort == "ja" ) {
- _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Japanese") );
+ _settingsDialogForm->languageSelectionComboBox->addItem( TQIcon(TQString(":/language/language-"+languageShort+".png")), tr("Japanese") );
}
else if ( languageShort == "ru" ) {
- _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Russian") );
+ _settingsDialogForm->languageSelectionComboBox->addItem( TQIcon(TQString(":/language/language-"+languageShort+".png")), tr("Russian") );
}
else if ( languageShort == "uk" ) {
- _settingsDialogForm->languageSelectionComboBox->addItem( QIcon(QString(":/language/language-"+languageShort+".png")), tr("Ukrainian") );
+ _settingsDialogForm->languageSelectionComboBox->addItem( TQIcon(TQString(":/language/language-"+languageShort+".png")), tr("Ukrainian") );
}
else {
@@ -121,20 +121,20 @@ void UiGuiSettingsDialog::writeWidgetValuesToSettings() {
/*!
\brief Catches language change events and retranslates all needed widgets.
*/
-void UiGuiSettingsDialog::changeEvent(QEvent *event) {
- if (event->type() == QEvent::LanguageChange) {
+void UiGuiSettingsDialog::changeEvent(TQEvent *event) {
+ if (event->type() == TQEvent::LanguageChange) {
_settingsDialogForm->retranslateUi(this);
- // If this is not explicit set here, Qt < 4.3.0 does not translate the buttons.
- _settingsDialogForm->buttonBox->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::NoButton|QDialogButtonBox::Ok);
+ // If this is not explicit set here, TQt < 4.3.0 does not translate the buttons.
+ _settingsDialogForm->buttonBox->setStandardButtons(TQDialogButtonBox::Cancel | TQDialogButtonBox::NoButton|TQDialogButtonBox::Ok);
//TODO: This has to be removed when the properties for the highlighters can be set.
_settingsDialogForm->groupBoxSyntaxHighlighterProperties->setToolTip( "(Will be implemented soon)" + _settingsDialogForm->groupBoxSyntaxHighlighterProperties->toolTip() );
- QStringList languageShortList = _settings->getAvailableTranslations();
+ TQStringList languageShortList = _settings->getAvailableTranslations();
// Now retranslate every entry in the language selection box.
for (int i = 0; i < languageShortList.size(); i++ ) {
- QString languageShort = languageShortList.at(i);
+ TQString languageShort = languageShortList.at(i);
// Identify the language mnemonic and set the full name.
if ( languageShort == "en" ) {
@@ -164,6 +164,6 @@ void UiGuiSettingsDialog::changeEvent(QEvent *event) {
}
}
else {
- QWidget::changeEvent(event);
+ TQWidget::changeEvent(event);
}
}
diff --git a/src/UiGuiSettingsDialog.h b/src/UiGuiSettingsDialog.h
index 9f53262..baabffb 100755
--- a/src/UiGuiSettingsDialog.h
+++ b/src/UiGuiSettingsDialog.h
@@ -20,7 +20,7 @@
#ifndef UIGUISETTINGSDIALOG_H
#define UIGUISETTINGSDIALOG_H
-#include <tqdialog.h>
+#include <tntqdialog.h>
#include "UiGuiSettings.h"
@@ -29,12 +29,12 @@ namespace Ui {
}
-class UiGuiSettingsDialog : public QDialog
+class UiGuiSettingsDialog : public TQDialog
{
Q_OBJECT
public:
- UiGuiSettingsDialog(QWidget* parent, QSharedPointer<UiGuiSettings> settings);
+ UiGuiSettingsDialog(TQWidget* parent, TQSharedPointer<UiGuiSettings> settings);
public slots:
int showDialog();
@@ -45,10 +45,10 @@ private slots:
private:
Ui::SettingsDialog *_settingsDialogForm;
- void changeEvent(QEvent *event);
+ void changeEvent(TQEvent *event);
void initTranslationSelection();
- QSharedPointer<UiGuiSettings> _settings;
+ TQSharedPointer<UiGuiSettings> _settings;
};
#endif // UIGUISETTINGSDIALOG_H
diff --git a/src/UiGuiSettingsDialog.ui b/src/UiGuiSettingsDialog.ui
index e3c5f7a..2f96561 100755
--- a/src/UiGuiSettingsDialog.ui
+++ b/src/UiGuiSettingsDialog.ui
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>SettingsDialog</class>
- <widget class="QDialog" name="SettingsDialog">
+ <widget class="TQDialog" name="SettingsDialog">
<property name="windowModality">
- <enum>Qt::ApplicationModal</enum>
+ <enum>TQt::ApplicationModal</enum>
</property>
<property name="geometry">
<rect>
@@ -20,13 +20,13 @@
<iconset resource="../resources/Icons.qrc">
<normaloff>:/mainWindow/preferences-system.png</normaloff>:/mainWindow/preferences-system.png</iconset>
</property>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<item>
- <widget class="QTabWidget" name="tabWidget">
+ <widget class="TQTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
- <widget class="QWidget" name="tab">
+ <widget class="TQWidget" name="tab">
<attribute name="icon">
<iconset resource="../resources/Icons.qrc">
<normaloff>:/settingsDialog/applications-system.png</normaloff>:/settingsDialog/applications-system.png</iconset>
@@ -34,11 +34,11 @@
<attribute name="title">
<string>Common</string>
</attribute>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<item>
- <layout class="QHBoxLayout">
+ <layout class="TQHBoxLayout">
<item>
- <widget class="QLabel" name="label">
+ <widget class="TQLabel" name="label">
<property name="toolTip">
<string>Displays all available translations for UniversalIndentGui and lets you choose one.</string>
</property>
@@ -51,7 +51,7 @@
</widget>
</item>
<item>
- <widget class="QComboBox" name="languageSelectionComboBox">
+ <widget class="TQComboBox" name="languageSelectionComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -72,7 +72,7 @@
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>TQt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -85,7 +85,7 @@
</layout>
</item>
<item>
- <widget class="QCheckBox" name="loadLastOpenedFileOnStartupComboBox">
+ <widget class="TQCheckBox" name="loadLastOpenedFileOnStartupComboBox">
<property name="toolTip">
<string>If selected opens the source code file on startup that was opened last time.</string>
</property>
@@ -101,7 +101,7 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="enableIndenterParameterTooltipsCheckBox">
+ <widget class="TQCheckBox" name="enableIndenterParameterTooltipsCheckBox">
<property name="toolTip">
<string>If checked, tool tips will show up if the mouse cursor remains over an indenter parameter for a while.</string>
</property>
@@ -117,9 +117,9 @@
</widget>
</item>
<item>
- <layout class="QHBoxLayout">
+ <layout class="TQHBoxLayout">
<item>
- <widget class="QLabel" name="labelRecentlyOpenedListSize">
+ <widget class="TQLabel" name="labelRecentlyOpenedListSize">
<property name="toolTip">
<string>Sets how many files should be remembered in the list of recently opened files.</string>
</property>
@@ -129,7 +129,7 @@
</widget>
</item>
<item>
- <widget class="QSpinBox" name="recentlyOpenedListSizeSpinBox">
+ <widget class="TQSpinBox" name="recentlyOpenedListSizeSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -159,7 +159,7 @@
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>TQt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -174,7 +174,7 @@
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Vertical</enum>
+ <enum>TQt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -186,7 +186,7 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_2">
+ <widget class="TQWidget" name="tab_2">
<attribute name="icon">
<iconset resource="../resources/Icons.qrc">
<normaloff>:/settingsDialog/accessories-text-editor.png</normaloff>:/settingsDialog/accessories-text-editor.png</iconset>
@@ -194,9 +194,9 @@
<attribute name="title">
<string>Editor</string>
</attribute>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<item>
- <widget class="QCheckBox" name="whiteSpaceIsVisibleCheckBox">
+ <widget class="TQCheckBox" name="whiteSpaceIsVisibleCheckBox">
<property name="toolTip">
<string>Enables or disables displaying of white space characters in the editor.</string>
</property>
@@ -212,9 +212,9 @@
</widget>
</item>
<item>
- <layout class="QHBoxLayout">
+ <layout class="TQHBoxLayout">
<item>
- <widget class="QLabel" name="labelTabWidth">
+ <widget class="TQLabel" name="labelTabWidth">
<property name="toolTip">
<string>Sets width in single spaces used for tabs</string>
</property>
@@ -227,7 +227,7 @@
</widget>
</item>
<item>
- <widget class="QSpinBox" name="tabWidthSpinBox">
+ <widget class="TQSpinBox" name="tabWidthSpinBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -257,7 +257,7 @@
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>TQt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -272,7 +272,7 @@
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Vertical</enum>
+ <enum>TQt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -284,7 +284,7 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_4">
+ <widget class="TQWidget" name="tab_4">
<attribute name="icon">
<iconset resource="../resources/Icons.qrc">
<normaloff>:/mainWindow/system-software-update.png</normaloff>:/mainWindow/system-software-update.png</iconset>
@@ -292,9 +292,9 @@
<attribute name="title">
<string>Network</string>
</attribute>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="TQVBoxLayout" name="verticalLayout">
<item>
- <widget class="QCheckBox" name="checkForUpdateCheckBox">
+ <widget class="TQCheckBox" name="checkForUpdateCheckBox">
<property name="toolTip">
<string>Checks whether a new version of UniversalIndentGUI exists on program start, but only once a day.</string>
</property>
@@ -310,13 +310,13 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox">
+ <widget class="TQGroupBox" name="groupBox">
<property name="title">
<string/>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_5">
+ <layout class="TQVBoxLayout" name="verticalLayout_5">
<item>
- <widget class="QCheckBox" name="enableProxyCheckBox">
+ <widget class="TQCheckBox" name="enableProxyCheckBox">
<property name="toolTip">
<string>If checked, the made proxy settings will be applied for all network connections. Type of the used proxy is SOCKS5.</string>
</property>
@@ -332,13 +332,13 @@
</widget>
</item>
<item>
- <widget class="QWidget" name="widget" native="true">
+ <widget class="TQWidget" name="widget" native="true">
<property name="enabled">
<bool>false</bool>
</property>
- <layout class="QGridLayout" name="gridLayout">
+ <layout class="TQGridLayout" name="gridLayout">
<item row="0" column="0">
- <widget class="QLabel" name="label_2">
+ <widget class="TQLabel" name="label_2">
<property name="text">
<string>Host name:</string>
</property>
@@ -348,7 +348,7 @@
</widget>
</item>
<item row="0" column="1">
- <widget class="QLineEdit" name="proxyHostNameLineEdit">
+ <widget class="TQLineEdit" name="proxyHostNameLineEdit">
<property name="toolTip">
<string>Host name of the to be used proxy. E.g.: proxy.example.com</string>
</property>
@@ -361,7 +361,7 @@
</widget>
</item>
<item row="1" column="0">
- <widget class="QLabel" name="label_3">
+ <widget class="TQLabel" name="label_3">
<property name="text">
<string>Port:</string>
</property>
@@ -371,15 +371,15 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="QSpinBox" name="proxyPortSpinBox">
+ <widget class="TQSpinBox" name="proxyPortSpinBox">
<property name="toolTip">
<string>Port number to connect to the before named proxy.</string>
</property>
<property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ <set>TQt::AlignRight|TQt::AlignTrailing|TQt::AlignVCenter</set>
</property>
<property name="buttonSymbols">
- <enum>QAbstractSpinBox::NoButtons</enum>
+ <enum>TQAbstractSpinBox::NoButtons</enum>
</property>
<property name="maximum">
<number>99999</number>
@@ -393,7 +393,7 @@
</widget>
</item>
<item row="2" column="0">
- <widget class="QLabel" name="label_4">
+ <widget class="TQLabel" name="label_4">
<property name="text">
<string>User name:</string>
</property>
@@ -403,7 +403,7 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="QLineEdit" name="proxyUserNameLineEdit">
+ <widget class="TQLineEdit" name="proxyUserNameLineEdit">
<property name="toolTip">
<string>If the proxy needs authentification, enter the login name here.</string>
</property>
@@ -416,7 +416,7 @@
</widget>
</item>
<item row="3" column="0">
- <widget class="QLabel" name="label_6">
+ <widget class="TQLabel" name="label_6">
<property name="text">
<string>Password:</string>
</property>
@@ -426,12 +426,12 @@
</widget>
</item>
<item row="3" column="1">
- <widget class="QLineEdit" name="proxyPasswordLineEdit">
+ <widget class="TQLineEdit" name="proxyPasswordLineEdit">
<property name="toolTip">
<string>If the proxy needs authentification, enter the password here.</string>
</property>
<property name="echoMode">
- <enum>QLineEdit::Password</enum>
+ <enum>TQLineEdit::Password</enum>
</property>
<property name="connectedSettingName" stdset="0">
<string notr="true">ProxyPassword</string>
@@ -449,7 +449,7 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_3">
+ <widget class="TQWidget" name="tab_3">
<attribute name="icon">
<iconset resource="../resources/Icons.qrc">
<normaloff>:/settingsDialog/syntax-highlight.png</normaloff>:/settingsDialog/syntax-highlight.png</iconset>
@@ -457,9 +457,9 @@
<attribute name="title">
<string>Syntax Highlighting</string>
</attribute>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<item>
- <widget class="QCheckBox" name="enableSyntaxHighlightningCheckBox">
+ <widget class="TQCheckBox" name="enableSyntaxHighlightningCheckBox">
<property name="toolTip">
<string>By enabling special key words of the source code are highlighted.</string>
</property>
@@ -475,7 +475,7 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBoxSyntaxHighlighterProperties">
+ <widget class="TQGroupBox" name="groupBoxSyntaxHighlighterProperties">
<property name="enabled">
<bool>false</bool>
</property>
@@ -485,25 +485,25 @@
<property name="title">
<string>Highlighter settings</string>
</property>
- <layout class="QHBoxLayout">
+ <layout class="TQHBoxLayout">
<item>
- <widget class="QListWidget" name="listWidget">
+ <widget class="TQListWidget" name="listWidget">
<property name="currentRow">
<number>-1</number>
</property>
</widget>
</item>
<item>
- <widget class="QListWidget" name="listWidget_2">
+ <widget class="TQListWidget" name="listWidget_2">
<property name="currentRow">
<number>-1</number>
</property>
</widget>
</item>
<item>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<item>
- <widget class="QPushButton" name="pushButton_2">
+ <widget class="TQPushButton" name="pushButton_2">
<property name="toolTip">
<string>Set the font for the current selected highlighter property.</string>
</property>
@@ -513,7 +513,7 @@
</widget>
</item>
<item>
- <widget class="QPushButton" name="pushButton">
+ <widget class="TQPushButton" name="pushButton">
<property name="toolTip">
<string>Set the color for the current selected highlighter property.</string>
</property>
@@ -525,7 +525,7 @@
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Vertical</enum>
+ <enum>TQt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -543,7 +543,7 @@
<item>
<spacer>
<property name="orientation">
- <enum>Qt::Vertical</enum>
+ <enum>TQt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -558,12 +558,12 @@
</widget>
</item>
<item>
- <widget class="QDialogButtonBox" name="buttonBox">
+ <widget class="TQDialogButtonBox" name="buttonBox">
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>TQt::Horizontal</enum>
</property>
<property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ <set>TQDialogButtonBox::Cancel|TQDialogButtonBox::Ok</set>
</property>
</widget>
</item>
diff --git a/src/UiGuiSystemInfo.cpp b/src/UiGuiSystemInfo.cpp
index b83a636..ac72ce1 100755
--- a/src/UiGuiSystemInfo.cpp
+++ b/src/UiGuiSystemInfo.cpp
@@ -19,10 +19,10 @@
#include "UiGuiSystemInfo.h"
-#include <tqstring.h>
+#include <tntqstring.h>
#include <tqsysinfo.h>
-#include <tqprocess.h>
-#include <tqfile.h>
+#include <tntqprocess.h>
+#include <tntqfile.h>
UiGuiSystemInfo::UiGuiSystemInfo() {
}
@@ -33,51 +33,51 @@ UiGuiSystemInfo::UiGuiSystemInfo() {
The String contains name and version of the os. E.g. Linux Ubuntu 9.04.
*/
-QString UiGuiSystemInfo::getOperatingSystem() {
- QString operatingSystemString = "";
+TQString UiGuiSystemInfo::getOperatingSystem() {
+ TQString operatingSystemString = "";
#if defined(Q_WS_WIN)
- switch ( QSysInfo::WindowsVersion ) {
- case QSysInfo::WV_32s :
+ switch ( TQSysInfo::WindowsVersion ) {
+ case TQSysInfo::WV_32s :
operatingSystemString = "Windows 3.1 with Win 32s";
break;
- case QSysInfo::WV_95 :
+ case TQSysInfo::WV_95 :
operatingSystemString = "Windows 95";
break;
- case QSysInfo::WV_98 :
+ case TQSysInfo::WV_98 :
operatingSystemString = "Windows 98";
break;
- case QSysInfo::WV_Me :
+ case TQSysInfo::WV_Me :
operatingSystemString = "Windows Me";
break;
- case QSysInfo::WV_NT :
+ case TQSysInfo::WV_NT :
operatingSystemString = "Windows NT (operating system version 4.0)";
break;
- case QSysInfo::WV_2000 :
+ case TQSysInfo::WV_2000 :
operatingSystemString = "Windows 2000 (operating system version 5.0)";
break;
- case QSysInfo::WV_XP :
+ case TQSysInfo::WV_XP :
operatingSystemString = "Windows XP (operating system version 5.1)";
break;
- case QSysInfo::WV_2003 :
+ case TQSysInfo::WV_2003 :
operatingSystemString = "Windows Server 2003, Windows Server 2003 R2, Windows Home Server, Windows XP Professional x64 Edition (operating system version 5.2)";
break;
- case QSysInfo::WV_VISTA :
+ case TQSysInfo::WV_VISTA :
operatingSystemString = "Windows Vista, Windows Server 2008 (operating system version 6.0)";
break;
- case QSysInfo::WV_WINDOWS7 :
+ case TQSysInfo::WV_WINDOWS7 :
operatingSystemString = "Windows 7 (operating system version 6.1)";
break;
- case QSysInfo::WV_CE :
+ case TQSysInfo::WV_CE :
operatingSystemString = "Windows CE";
break;
- case QSysInfo::WV_CENET :
+ case TQSysInfo::WV_CENET :
operatingSystemString = "Windows CE .NET";
break;
- case QSysInfo::WV_CE_5 :
+ case TQSysInfo::WV_CE_5 :
operatingSystemString = "Windows CE 5.x";
break;
- case QSysInfo::WV_CE_6 :
+ case TQSysInfo::WV_CE_6 :
operatingSystemString = "Windows CE 6.x";
break;
default :
@@ -85,32 +85,32 @@ QString UiGuiSystemInfo::getOperatingSystem() {
break;
}
#elif defined(Q_WS_MAC)
- switch ( QSysInfo::MacintoshVersion ) {
- case QSysInfo::MV_9 :
+ switch ( TQSysInfo::MacintoshVersion ) {
+ case TQSysInfo::MV_9 :
operatingSystemString = "Mac OS 9 (unsupported)";
break;
- case QSysInfo::MV_10_0 :
+ case TQSysInfo::MV_10_0 :
operatingSystemString = "Mac OS X 10.0 Cheetah (unsupported)";
break;
- case QSysInfo::MV_10_1 :
+ case TQSysInfo::MV_10_1 :
operatingSystemString = "Mac OS X 10.1 Puma (unsupported)";
break;
- case QSysInfo::MV_10_2 :
+ case TQSysInfo::MV_10_2 :
operatingSystemString = "Mac OS X 10.2 Jaguar (unsupported)";
break;
- case QSysInfo::MV_10_3 :
+ case TQSysInfo::MV_10_3 :
operatingSystemString = "Mac OS X 10.3 Panther";
break;
- case QSysInfo::MV_10_4 :
+ case TQSysInfo::MV_10_4 :
operatingSystemString = "Mac OS X 10.4 Tiger";
break;
- case QSysInfo::MV_10_5 :
+ case TQSysInfo::MV_10_5 :
operatingSystemString = "Mac OS X 10.5 Leopard";
break;
- case QSysInfo::MV_10_6 :
+ case TQSysInfo::MV_10_6 :
operatingSystemString = "Mac OS X 10.6 Snow Leopard";
break;
- case QSysInfo::MV_Unknown :
+ case TQSysInfo::MV_Unknown :
operatingSystemString = "An unknown and currently unsupported platform";
break;
default :
@@ -120,46 +120,46 @@ QString UiGuiSystemInfo::getOperatingSystem() {
#else
//TODO: Detect Unix, Linux etc. distro as described on http://www.novell.com/coolsolutions/feature/11251.html
operatingSystemString = "Linux";
- QProcess process;
+ TQProcess process;
process.start("uname -s");
bool result = process.waitForFinished(1000);
- QString os = process.readAllStandardOutput().trimmed();
+ TQString os = process.readAllStandardOutput().trimmed();
process.start("uname -r");
result = process.waitForFinished(1000);
- QString rev = process.readAllStandardOutput().trimmed();
+ TQString rev = process.readAllStandardOutput().trimmed();
process.start("uname -m");
result = process.waitForFinished(1000);
- QString mach = process.readAllStandardOutput().trimmed();
+ TQString mach = process.readAllStandardOutput().trimmed();
if ( os == "SunOS" ) {
os = "Solaris";
process.start("uname -p");
result = process.waitForFinished(1000);
- QString arch = process.readAllStandardOutput().trimmed();
+ TQString arch = process.readAllStandardOutput().trimmed();
process.start("uname -v");
result = process.waitForFinished(1000);
- QString timestamp = process.readAllStandardOutput().trimmed();
+ TQString timestamp = process.readAllStandardOutput().trimmed();
operatingSystemString = os + " " + rev + " (" + arch + " " + timestamp + ")";
}
else if ( os == "AIX" ) {
process.start("oslevel -r");
result = process.waitForFinished(1000);
- QString oslevel = process.readAllStandardOutput().trimmed();
+ TQString oslevel = process.readAllStandardOutput().trimmed();
operatingSystemString = os + "oslevel " + oslevel;
}
else if ( os == "Linux" ) {
- QString dist;
- QString pseudoname;
- QString kernel = rev;
+ TQString dist;
+ TQString pseudoname;
+ TQString kernel = rev;
- if ( QFile::exists("/etc/redhat-release") ) {
+ if ( TQFile::exists("/etc/redhat-release") ) {
dist = "RedHat";
process.start("sh -c \"cat /etc/redhat-release | sed s/.*\\(// | sed s/\\)//\"");
@@ -170,7 +170,7 @@ QString UiGuiSystemInfo::getOperatingSystem() {
result = process.waitForFinished(1000);
rev = process.readAllStandardOutput().trimmed();
}
- else if ( QFile::exists("/etc/SUSE-release") ) {
+ else if ( TQFile::exists("/etc/SUSE-release") ) {
process.start("sh -c \"cat /etc/SUSE-release | tr '\\n' ' '| sed s/VERSION.*//\"");
result = process.waitForFinished(1000);
dist = process.readAllStandardOutput().trimmed();
@@ -179,7 +179,7 @@ QString UiGuiSystemInfo::getOperatingSystem() {
result = process.waitForFinished(1000);
rev = process.readAllStandardOutput().trimmed();
}
- else if ( QFile::exists("/etc/mandrake-release") ) {
+ else if ( TQFile::exists("/etc/mandrake-release") ) {
dist = "Mandrake";
process.start("sh -c \"cat /etc/mandrake-release | sed s/.*\\(// | sed s/\\)//\"");
@@ -190,20 +190,20 @@ QString UiGuiSystemInfo::getOperatingSystem() {
result = process.waitForFinished(1000);
rev = process.readAllStandardOutput().trimmed();
}
- else if ( QFile::exists("/etc/lsb-release") ) {
+ else if ( TQFile::exists("/etc/lsb-release") ) {
dist = "Ubuntu";
- QString processCall = "sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_RELEASE=// | sed s/\\ .*//\"";
+ TQString processCall = "sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_RELEASE=// | sed s/\\ .*//\"";
process.start( processCall );
result = process.waitForFinished(1000);
rev = process.readAllStandardOutput().trimmed();
- QString errorStr = process.readAllStandardError();
+ TQString errorStr = process.readAllStandardError();
process.start("sh -c \"cat /etc/lsb-release | tr '\\n' ' ' | sed s/.*DISTRIB_CODENAME=// | sed s/\\ .*//\"");
result = process.waitForFinished(1000);
pseudoname = process.readAllStandardOutput().trimmed();
}
- else if ( QFile::exists("/etc/debian_version") ) {
+ else if ( TQFile::exists("/etc/debian_version") ) {
dist = "Debian";
process.start("cat /etc/debian_version");
@@ -213,7 +213,7 @@ QString UiGuiSystemInfo::getOperatingSystem() {
rev = "";
}
- if ( QFile::exists("/etc/UnitedLinux-release") ) {
+ if ( TQFile::exists("/etc/UnitedLinux-release") ) {
process.start("sh -c \"cat /etc/UnitedLinux-release | tr '\\n' ' ' | sed s/VERSION.*//\"");
result = process.waitForFinished(1000);
dist += process.readAllStandardOutput().trimmed();
diff --git a/src/UiGuiSystemInfo.h b/src/UiGuiSystemInfo.h
index 3ed56ca..62f432f 100755
--- a/src/UiGuiSystemInfo.h
+++ b/src/UiGuiSystemInfo.h
@@ -20,13 +20,13 @@
#ifndef UIGUISYSTEMINFO_H
#define UIGUISYSTEMINFO_H
-class QString;
+class TQString;
class UiGuiSystemInfo
{
public:
- static QString getOperatingSystem();
+ static TQString getOperatingSystem();
private:
UiGuiSystemInfo();
diff --git a/src/UiGuiVersion.cpp b/src/UiGuiVersion.cpp
index 8ddcdd8..9564e4e 100755
--- a/src/UiGuiVersion.cpp
+++ b/src/UiGuiVersion.cpp
@@ -19,8 +19,8 @@
#include "UiGuiVersion.h"
-#include <tqstring.h>
-#include <tqstringlist.h>
+#include <tntqstring.h>
+#include <tntqstringlist.h>
#include <tqdate.h>
namespace UiGuiVersion {
@@ -28,15 +28,15 @@ namespace UiGuiVersion {
\brief Returns the build date as a localized string, e.g. "9. Februar 2009". If
there was some kind of error, the returned string is empty.
*/
-QString getBuildDate() {
- QStringList monthNames;
- QString buildDateString = "";
+TQString getBuildDate() {
+ TQStringList monthNames;
+ TQString buildDateString = "";
monthNames << "Jan" << "Feb" << "Mar" << "Apr" << "May" << "Jun" << "Jul" << "Aug" << "Sep" << "Oct" << "Nov" << "Dez";
- QStringList buildDateStringList = QString(__DATE__).simplified().split(' '); // __DATE__ returns eg "Feb 4 2009"
+ TQStringList buildDateStringList = TQString(__DATE__).simplified().split(' '); // __DATE__ returns eg "Feb 4 2009"
if ( buildDateStringList.count() == 3 ) {
- QDate buildDate(buildDateStringList.last().toInt(), monthNames.indexOf( buildDateStringList.first() )+1, buildDateStringList.at(1).toInt());
+ TQDate buildDate(buildDateStringList.last().toInt(), monthNames.indexOf( buildDateStringList.first() )+1, buildDateStringList.at(1).toInt());
buildDateString = buildDate.toString("d. MMMM yyyy");
}
@@ -48,9 +48,9 @@ QString getBuildDate() {
\brief Returns the revision number, that the current build is based on, as string. If
there was some kind of error, the returned string is empty.
*/
-QString getBuildRevision() {
- QString buildRevision = "";
- QStringList buildRevisionStringList = QString(PROGRAM_REVISION).simplified().split(' ');
+TQString getBuildRevision() {
+ TQString buildRevision = "";
+ TQStringList buildRevisionStringList = TQString(PROGRAM_REVISION).simplified().split(' ');
if ( buildRevisionStringList.count() == 3 ) {
buildRevision = buildRevisionStringList.at(1); // PROGRAM_REVISION is eg "$Revision: 907 $"
diff --git a/src/UiGuiVersion.h b/src/UiGuiVersion.h
index 696313f..630702c 100755
--- a/src/UiGuiVersion.h
+++ b/src/UiGuiVersion.h
@@ -20,7 +20,7 @@
#ifndef UIGUIVERSION_H
#define UIGUIVERSION_H
-class QString;
+class TQString;
// Define the version number here. Update this as the last file before a release.
#define PROGRAM_VERSION 1.2.0
@@ -31,8 +31,8 @@ class QString;
namespace UiGuiVersion {
- QString getBuildDate();
- QString getBuildRevision();
+ TQString getBuildDate();
+ TQString getBuildRevision();
}
diff --git a/src/UpdateCheckDialog.cpp b/src/UpdateCheckDialog.cpp
index 9a352a7..51f34d4 100755
--- a/src/UpdateCheckDialog.cpp
+++ b/src/UpdateCheckDialog.cpp
@@ -23,12 +23,12 @@
#include "UiGuiSettings.h"
#include "UiGuiVersion.h"
-#include <tqmessagebox.h>
+#include <tntqmessagebox.h>
#include <tqdesktopservices.h>
#include <tqnetworkaccessmanager.h>
-#include <tqtimer.h>
+#include <tntqtimer.h>
#include <tqdate.h>
-#include <tqurl.h>
+#include <tntqurl.h>
#include <tqregexpvalidator.h>
#include <tqnetworkrequest.h>
#include <tqnetworkreply.h>
@@ -44,26 +44,26 @@
/*!
\brief Initializes member variables and stores the version of UiGui and a pointer to the _settings object.
*/
-UpdateCheckDialog::UpdateCheckDialog(QSharedPointer<UiGuiSettings> settings, QWidget *parent) : QDialog(parent),
+UpdateCheckDialog::UpdateCheckDialog(TQSharedPointer<UiGuiSettings> settings, TQWidget *parent) : TQDialog(parent),
_manualUpdateRequested(false),
_currentNetworkReply(NULL),
- _roleOfClickedButton(QDialogButtonBox::InvalidRole)
+ _roleOfClickedButton(TQDialogButtonBox::InvalidRole)
{
_updateCheckDialogForm = new Ui::UpdateCheckDialog();
_updateCheckDialogForm->setupUi(this);
// Create object for _networkAccessManager request and connect it with the request return handler.
- _networkAccessManager = new QNetworkAccessManager(this);
- connect( _networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(checkResultsOfFetchedPadXMLFile(QNetworkReply*)) );
+ _networkAccessManager = new TQNetworkAccessManager(this);
+ connect( _networkAccessManager, SIGNAL(finished(TQNetworkReply*)), this, SLOT(checkResultsOfFetchedPadXMLFile(TQNetworkReply*)) );
// Create a timer object used for the progress bar.
- _updateCheckProgressTimer = new QTimer(this);
+ _updateCheckProgressTimer = new TQTimer(this);
_updateCheckProgressTimer->setInterval(5);
connect( _updateCheckProgressTimer, SIGNAL(timeout()), this, SLOT(updateUpdateCheckProgressBar()) );
_updateCheckProgressCounter = 0;
// Connect the dialogs buttonbox with a button click handler.
- connect( _updateCheckDialogForm->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(handleUpdateCheckDialogButtonClicked(QAbstractButton*)) );
+ connect( _updateCheckDialogForm->buttonBox, SIGNAL(clicked(TQAbstractButton*)), this, SLOT(handleUpdateCheckDialogButtonClicked(TQAbstractButton*)) );
settings->registerObjectSlot(this, "initProxySettings()", "ProxyEnabled");
settings->registerObjectSlot(this, "initProxySettings()", "ProxyHostName");
@@ -84,7 +84,7 @@ UpdateCheckDialog::UpdateCheckDialog(QSharedPointer<UiGuiSettings> settings, QWi
\brief On destroy cancels any currently running network request.
*/
UpdateCheckDialog::~UpdateCheckDialog() {
- disconnect( _networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(checkResultsOfFetchedPadXMLFile(QNetworkReply*)) );
+ disconnect( _networkAccessManager, SIGNAL(finished(TQNetworkReply*)), this, SLOT(checkResultsOfFetchedPadXMLFile(TQNetworkReply*)) );
if (_currentNetworkReply != NULL)
_currentNetworkReply->abort();
}
@@ -121,7 +121,7 @@ void UpdateCheckDialog::checkForUpdate() {
void UpdateCheckDialog::getPadXMLFile() {
//_networkAccessManager->setHost("universalindent.sourceforge.net");
//_networkAccessManager->get("/universalindentgui_pad.xml");
- _currentNetworkReply = _networkAccessManager->get(QNetworkRequest(QUrl("http://universalindent.sourceforge.net/universalindentgui_pad.xml")));
+ _currentNetworkReply = _networkAccessManager->get(TQNetworkRequest(TQUrl("http://universalindent.sourceforge.net/universalindentgui_pad.xml")));
}
@@ -133,15 +133,15 @@ void UpdateCheckDialog::getPadXMLFile() {
download page if a newer version exists. In case of an error during update
check, a message box with the error will be displayed.
*/
-void UpdateCheckDialog::checkResultsOfFetchedPadXMLFile(QNetworkReply *networkReply) {
+void UpdateCheckDialog::checkResultsOfFetchedPadXMLFile(TQNetworkReply *networkReply) {
Q_ASSERT(_currentNetworkReply == networkReply);
// Stop the progress bar timer.
_updateCheckProgressTimer->stop();
- if ( networkReply->error() == QNetworkReply::NoError ) {
+ if ( networkReply->error() == TQNetworkReply::NoError ) {
// Try to find the version string.
- QString returnedString = networkReply->readAll();
+ TQString returnedString = networkReply->readAll();
int leftPosition = returnedString.indexOf("<Program_Version>");
int rightPosition = returnedString.indexOf("</Program_Version>");
@@ -160,24 +160,24 @@ void UpdateCheckDialog::checkResultsOfFetchedPadXMLFile(QNetworkReply *networkRe
showNewVersionAvailableDialog(returnedString);
// If yes clicked, open the download url in the default browser.
- if ( _roleOfClickedButton == QDialogButtonBox::YesRole ) {
- QDesktopServices::openUrl( QUrl("_networkAccessManager://sourceforge.net/project/showfiles.php?group_id=167482") );
+ if ( _roleOfClickedButton == TQDialogButtonBox::YesRole ) {
+ TQDesktopServices::openUrl( TQUrl("_networkAccessManager://sourceforge.net/project/showfiles.php?group_id=167482") );
}
}
else if ( _manualUpdateRequested ) {
showNoNewVersionAvailableDialog();
}
// Set last update check date.
- _settings->setValueByName("LastUpdateCheck", QDate::currentDate());
+ _settings->setValueByName("LastUpdateCheck", TQDate::currentDate());
}
// In the returned string, the version string could not be found.
else {
- QMessageBox::warning(this, tr("Update check error"), tr("There was an error while trying to check for an update! The retrieved file did not contain expected content.") );
+ TQMessageBox::warning(this, tr("Update check error"), tr("There was an error while trying to check for an update! The retrieved file did not contain expected content.") );
}
}
// If there was some error while trying to retrieve the update info from server and not cancel was pressed.
- else if ( _roleOfClickedButton != QDialogButtonBox::RejectRole ) {
- QMessageBox::warning(this, tr("Update check error"), tr("There was an error while trying to check for an update! Error was : %1").arg(networkReply->errorString()) );
+ else if ( _roleOfClickedButton != TQDialogButtonBox::RejectRole ) {
+ TQMessageBox::warning(this, tr("Update check error"), tr("There was an error while trying to check for an update! Error was : %1").arg(networkReply->errorString()) );
hide();
}
_manualUpdateRequested = false;
@@ -203,7 +203,7 @@ void UpdateCheckDialog::showCheckingForUpdateDialog() {
_updateCheckDialogForm->progressBar->show();
setWindowTitle( tr("Checking for update...") );
_updateCheckDialogForm->label->setText( tr("Checking whether a newer version is available") );
- _updateCheckDialogForm->buttonBox->setStandardButtons(QDialogButtonBox::Cancel);
+ _updateCheckDialogForm->buttonBox->setStandardButtons(TQDialogButtonBox::Cancel);
show();
}
@@ -211,11 +211,11 @@ void UpdateCheckDialog::showCheckingForUpdateDialog() {
/*!
\brief Displays the dialog with info about the new available version.
*/
-void UpdateCheckDialog::showNewVersionAvailableDialog(QString newVersion) {
+void UpdateCheckDialog::showNewVersionAvailableDialog(TQString newVersion) {
_updateCheckDialogForm->progressBar->hide();
setWindowTitle( tr("Update available") );
_updateCheckDialogForm->label->setText( tr("A newer version of UniversalIndentGUI is available.\nYour version is %1. New version is %2.\nDo you want to go to the download website?").arg(PROGRAM_VERSION_STRING).arg(newVersion) );
- _updateCheckDialogForm->buttonBox->setStandardButtons(QDialogButtonBox::No|QDialogButtonBox::NoButton|QDialogButtonBox::Yes);
+ _updateCheckDialogForm->buttonBox->setStandardButtons(TQDialogButtonBox::No|TQDialogButtonBox::NoButton|TQDialogButtonBox::Yes);
exec();
}
@@ -227,7 +227,7 @@ void UpdateCheckDialog::showNoNewVersionAvailableDialog() {
_updateCheckDialogForm->progressBar->hide();
setWindowTitle( tr("No new update available") );
_updateCheckDialogForm->label->setText( tr("You already have the latest version of UniversalIndentGUI.") );
- _updateCheckDialogForm->buttonBox->setStandardButtons(QDialogButtonBox::Ok);
+ _updateCheckDialogForm->buttonBox->setStandardButtons(TQDialogButtonBox::Ok);
exec();
}
@@ -241,10 +241,10 @@ void UpdateCheckDialog::showNoNewVersionAvailableDialog() {
In any case if a button is clicked, the dialog box will be closed.
*/
-void UpdateCheckDialog::handleUpdateCheckDialogButtonClicked(QAbstractButton *clickedButton) {
+void UpdateCheckDialog::handleUpdateCheckDialogButtonClicked(TQAbstractButton *clickedButton) {
_roleOfClickedButton = _updateCheckDialogForm->buttonBox->buttonRole(clickedButton);
- if ( _roleOfClickedButton == QDialogButtonBox::RejectRole ) {
+ if ( _roleOfClickedButton == TQDialogButtonBox::RejectRole ) {
// Abort the _networkAccessManager request.
_currentNetworkReply->abort();
// Stop the progress bar timer.
@@ -287,15 +287,15 @@ void UpdateCheckDialog::updateUpdateCheckProgressBar() {
Thus for example 12.5.170 will result in 12005170.
*/
-int UpdateCheckDialog::convertVersionStringToNumber(QString versionString) {
+int UpdateCheckDialog::convertVersionStringToNumber(TQString versionString) {
int versionInteger = 0;
int pos = 0;
- QRegExp regEx("\\d{1,3}.\\d{1,3}.\\d{1,3}");
- QRegExpValidator validator(regEx, NULL);
+ TQRegExp regEx("\\d{1,3}.\\d{1,3}.\\d{1,3}");
+ TQRegExpValidator validator(regEx, NULL);
- if ( validator.validate(versionString, pos) == QValidator::Acceptable ) {
- QStringList versionNumberStringList = versionString.split(".");
+ if ( validator.validate(versionString, pos) == TQValidator::Acceptable ) {
+ TQStringList versionNumberStringList = versionString.split(".");
versionInteger = versionNumberStringList.at(0).toInt() * 1000000;
versionInteger += versionNumberStringList.at(1).toInt() * 1000;
versionInteger += versionNumberStringList.at(2).toInt();
@@ -310,13 +310,13 @@ int UpdateCheckDialog::convertVersionStringToNumber(QString versionString) {
void UpdateCheckDialog::initProxySettings()
{
if ( _settings->getValueByName("ProxyEnabled") == true ) {
- QString proxyHostName = _settings->getValueByName("ProxyHostName").toString();
+ TQString proxyHostName = _settings->getValueByName("ProxyHostName").toString();
int proxyPort = _settings->getValueByName("ProxyPort").toInt();
- QString proxyUserName = _settings->getValueByName("ProxyUserName").toString();
- QString proxyPassword = _settings->getValueByName("ProxyPassword").toString();
- _networkAccessManager->setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, proxyHostName, proxyPort, proxyUserName, proxyPassword));
+ TQString proxyUserName = _settings->getValueByName("ProxyUserName").toString();
+ TQString proxyPassword = _settings->getValueByName("ProxyPassword").toString();
+ _networkAccessManager->setProxy(TQNetworkProxy(TQNetworkProxy::Socks5Proxy, proxyHostName, proxyPort, proxyUserName, proxyPassword));
}
else {
- _networkAccessManager->setProxy(QNetworkProxy());
+ _networkAccessManager->setProxy(TQNetworkProxy());
}
}
diff --git a/src/UpdateCheckDialog.h b/src/UpdateCheckDialog.h
index 85082cd..07ae09c 100755
--- a/src/UpdateCheckDialog.h
+++ b/src/UpdateCheckDialog.h
@@ -20,7 +20,7 @@
#ifndef UPDATECHECKDIALOG_H
#define UPDATECHECKDIALOG_H
-#include <tqdialog.h>
+#include <tntqdialog.h>
#include <tqdialogbuttonbox.h>
class UiGuiSettings;
@@ -28,18 +28,18 @@ namespace Ui {
class UpdateCheckDialog;
}
-class QTimer;
-class QDesktopServices;
-class QNetworkAccessManager;
-class QNetworkReply;
+class TQTimer;
+class TQDesktopServices;
+class TQNetworkAccessManager;
+class TQNetworkReply;
-class UpdateCheckDialog : public QDialog
+class UpdateCheckDialog : public TQDialog
{
Q_OBJECT
public:
- UpdateCheckDialog(QSharedPointer<UiGuiSettings> settings, QWidget *parent = NULL);
+ UpdateCheckDialog(TQSharedPointer<UiGuiSettings> settings, TQWidget *parent = NULL);
~UpdateCheckDialog();
public slots:
@@ -47,8 +47,8 @@ public slots:
void checkForUpdate();
private slots:
- void checkResultsOfFetchedPadXMLFile(QNetworkReply *networkReply);
- void handleUpdateCheckDialogButtonClicked(QAbstractButton *clickedButton);
+ void checkResultsOfFetchedPadXMLFile(TQNetworkReply *networkReply);
+ void handleUpdateCheckDialogButtonClicked(TQAbstractButton *clickedButton);
void updateUpdateCheckProgressBar();
void initProxySettings();
@@ -57,16 +57,16 @@ private:
void getPadXMLFile();
void showCheckingForUpdateDialog();
- void showNewVersionAvailableDialog(QString newVersion);
+ void showNewVersionAvailableDialog(TQString newVersion);
void showNoNewVersionAvailableDialog();
- int convertVersionStringToNumber(QString versionString);
+ int convertVersionStringToNumber(TQString versionString);
- QSharedPointer<UiGuiSettings> _settings;
+ TQSharedPointer<UiGuiSettings> _settings;
bool _manualUpdateRequested;
- QNetworkAccessManager *_networkAccessManager;
- QNetworkReply *_currentNetworkReply;
- QDialogButtonBox::ButtonRole _roleOfClickedButton;
- QTimer *_updateCheckProgressTimer;
+ TQNetworkAccessManager *_networkAccessManager;
+ TQNetworkReply *_currentNetworkReply;
+ TQDialogButtonBox::ButtonRole _roleOfClickedButton;
+ TQTimer *_updateCheckProgressTimer;
int _updateCheckProgressCounter;
};
diff --git a/src/UpdateCheckDialog.ui b/src/UpdateCheckDialog.ui
index bb165eb..ebfc8bb 100755
--- a/src/UpdateCheckDialog.ui
+++ b/src/UpdateCheckDialog.ui
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>UpdateCheckDialog</class>
- <widget class="QDialog" name="UpdateCheckDialog">
+ <widget class="TQDialog" name="UpdateCheckDialog">
<property name="windowModality">
- <enum>Qt::WindowModal</enum>
+ <enum>TQt::WindowModal</enum>
</property>
<property name="geometry">
<rect>
@@ -16,16 +16,16 @@
<property name="windowTitle">
<string>Checking for update...</string>
</property>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<item>
- <widget class="QLabel" name="label">
+ <widget class="TQLabel" name="label">
<property name="text">
<string>Checking whether a newer version is available</string>
</property>
</widget>
</item>
<item>
- <widget class="QProgressBar" name="progressBar">
+ <widget class="TQProgressBar" name="progressBar">
<property name="value">
<number>0</number>
</property>
@@ -35,9 +35,9 @@
</widget>
</item>
<item>
- <widget class="QDialogButtonBox" name="buttonBox">
+ <widget class="TQDialogButtonBox" name="buttonBox">
<property name="standardButtons">
- <set>QDialogButtonBox::Cancel</set>
+ <set>TQDialogButtonBox::Cancel</set>
</property>
<property name="centerButtons">
<bool>true</bool>
diff --git a/src/debugging/TSLogger.cpp b/src/debugging/TSLogger.cpp
index a13113e..b0f280a 100755
--- a/src/debugging/TSLogger.cpp
+++ b/src/debugging/TSLogger.cpp
@@ -22,13 +22,13 @@
#include "SettingsPaths.h"
-#include <tqdatetime.h>
-#include <tqfile.h>
-#include <tqfileinfo.h>
-#include <tqurl.h>
-#include <tqtextstream.h>
+#include <tntqdatetime.h>
+#include <tntqfile.h>
+#include <tntqfileinfo.h>
+#include <tntqurl.h>
+#include <tntqtextstream.h>
#include <tqdesktopservices.h>
-#include <tqmessagebox.h>
+#include <tntqmessagebox.h>
#include <ctime>
@@ -65,9 +65,9 @@ TSLogger* TSLogger::getInstance(int verboseLevel) {
*/
TSLogger* TSLogger::getInstance() {
#ifdef _DEBUG
- return TSLogger::getInstance(QtDebugMsg);
+ return TSLogger::getInstance(TQtDebugMsg);
#else
- return TSLogger::getInstance(QtWarningMsg);
+ return TSLogger::getInstance(TQtWarningMsg);
#endif
}
@@ -76,13 +76,13 @@ TSLogger* TSLogger::getInstance() {
\brief Initializes the dialog and sets the path to the log file in the systems temporary directory.
Sets the default verbose level to warning level.
*/
-TSLogger::TSLogger(int verboseLevel) : QDialog() {
+TSLogger::TSLogger(int verboseLevel) : TQDialog() {
_TSLoggerDialogForm = new Ui::TSLoggerDialog();
_TSLoggerDialogForm->setupUi(this);
#ifdef _DEBUG
- _verboseLevel = QtDebugMsg;
+ _verboseLevel = TQtDebugMsg;
#else
- _verboseLevel = QtMsgType(verboseLevel);
+ _verboseLevel = TQtMsgType(verboseLevel);
#endif
_logFileInitState = NOTINITIALZED;
@@ -90,7 +90,7 @@ TSLogger::TSLogger(int verboseLevel) : QDialog() {
connect( _TSLoggerDialogForm->openLogFileFolderToolButton, SIGNAL(clicked()), this, SLOT(openLogFileFolder()) );
// Make the main application not to wait for the logging window to close.
- setAttribute(Qt::WA_QuitOnClose, false);
+ setAttribute(TQt::WA_QuitOnClose, false);
}
@@ -99,15 +99,15 @@ TSLogger::TSLogger(int verboseLevel) : QDialog() {
Only messages whos \a type have a higher priority than the set verbose level are logged.
*/
-void TSLogger::messageHandler(QtMsgType type, const char *msg) {
+void TSLogger::messageHandler(TQtMsgType type, const char *msg) {
if ( _instance == NULL )
_instance = TSLogger::getInstance();
/*
- QMessageBox messageBox;
- QString messageBoxText = QString::fromUtf8( msg );
+ TQMessageBox messageBox;
+ TQString messageBoxText = TQString::fromUtf8( msg );
messageBox.setText( messageBoxText );
- messageBox.setWindowModality( Qt::ApplicationModal );
+ messageBox.setWindowModality( TQt::ApplicationModal );
messageBox.exec();
*/
@@ -116,22 +116,22 @@ void TSLogger::messageHandler(QtMsgType type, const char *msg) {
return;
// Init log message with prepended date and time.
- QString message = QDateTime::currentDateTime().toString();
+ TQString message = TQDateTime::currentDateTime().toString();
- // Depending on the QtMsgType prepend a different colored Debug, Warning, Critical or Fatal.
+ // Depending on the TQtMsgType prepend a different colored Debug, Warning, Critical or Fatal.
switch (type) {
- case QtDebugMsg :
+ case TQtDebugMsg :
message += " <span style=\"font-weight:bold; color:black;\">Debug:</span> ";
break;
- case QtWarningMsg :
+ case TQtWarningMsg :
message += " <span style=\"font-weight:bold; color:gold;\">Warning:</span> ";
break;
- case QtCriticalMsg :
+ case TQtCriticalMsg :
message += "<span style=\"font-weight:bold; color:red;\">Critical:</span> ";
break;
- case QtFatalMsg :
+ case TQtFatalMsg :
message += " <span style=\"font-weight:bold; color:#D60000;\">Fatal:</span> ";
- // This one is no Qt message type, but can be used to send info messages to the log
+ // This one is no TQt message type, but can be used to send info messages to the log
// by calling TSLogger::messageHandler() directly.
case TSLoggerInfoMsg :
message += " <span style=\"font-weight:bold; color:darkgray;\">Info:</span> ";
@@ -139,7 +139,7 @@ void TSLogger::messageHandler(QtMsgType type, const char *msg) {
}
// Append the to UTF-8 back converted message parameter.
- message += QString::fromUtf8( msg ) + "<br/>\n";
+ message += TQString::fromUtf8( msg ) + "<br/>\n";
// Write the message to the log windows text edit.
_instance->_TSLoggerDialogForm->logTextEdit->append( message );
@@ -148,7 +148,7 @@ void TSLogger::messageHandler(QtMsgType type, const char *msg) {
_instance->writeToLogFile( message );
// In case of a fatal error abort the application.
- if ( type == QtFatalMsg )
+ if ( type == TQtFatalMsg )
abort();
}
@@ -159,11 +159,11 @@ void TSLogger::messageHandler(QtMsgType type, const char *msg) {
*/
void TSLogger::setVerboseLevel(int level) {
if ( level < 0 )
- _verboseLevel = QtDebugMsg;
+ _verboseLevel = TQtDebugMsg;
if ( level > 3 )
- _verboseLevel = QtFatalMsg;
+ _verboseLevel = TQtFatalMsg;
else
- _verboseLevel = QtMsgType(level);
+ _verboseLevel = TQtMsgType(level);
}
@@ -182,29 +182,29 @@ void TSLogger::deleteInstance() {
\brief Opens the folder that contains the created log file with the name "UiGUI_log.html".
*/
void TSLogger::openLogFileFolder() {
- QDesktopServices::openUrl( QFileInfo( _logFile ).absolutePath() );
+ TQDesktopServices::openUrl( TQFileInfo( _logFile ).absolutePath() );
}
/*!
\brief Writes the \a message to the used log file.
*/
-void TSLogger::writeToLogFile(const QString &message) {
+void TSLogger::writeToLogFile(const TQString &message) {
// If the file where all logging messages should go to isn't initilized yet, do that now.
if ( _logFileInitState == NOTINITIALZED ) {
_logFileInitState = INITIALIZING;
- // On different systems it may be that "QDir::tempPath()" ends with a "/" or not. So check this.
+ // On different systems it may be that "TQDir::tempPath()" ends with a "/" or not. So check this.
// Remove any trailing slashes.
- QString tempPath = QFileInfo( SettingsPaths::getTempPath() ).absolutePath();
+ TQString tempPath = TQFileInfo( SettingsPaths::getTempPath() ).absolutePath();
while ( tempPath.right(1) == "/" ) {
tempPath.chop(1);
}
// To make the temporary log file invulnerable against file symbolic link hacks
// append the current date and time up to milliseconds to its name and a random character.
- QString logFileName = "UiGUI_log_" + QDateTime::currentDateTime().toString("yyyyMMdd");
- logFileName += "-" + QDateTime::currentDateTime().toString("hhmmsszzz");
+ TQString logFileName = "UiGUI_log_" + TQDateTime::currentDateTime().toString("yyyyMMdd");
+ logFileName += "-" + TQDateTime::currentDateTime().toString("hhmmsszzz");
// By random decide whether to append a number or an upper or lower case character.
qsrand( time(NULL) );
unsigned char randomChar;
@@ -222,7 +222,7 @@ void TSLogger::writeToLogFile(const QString &message) {
randomChar = qrand() % 26 + 'a';
break;
}
- logFileName += "_" + QString(randomChar) + ".html";
+ logFileName += "_" + TQString(randomChar) + ".html";
_logFile.setFileName( tempPath + "/" + logFileName );
@@ -238,8 +238,8 @@ void TSLogger::writeToLogFile(const QString &message) {
// If the logging file is initialzed, write all messages contained in the message queue into the file.
if ( _logFileInitState == INITIALZED ) {
// Write/append the log message to the log file.
- if ( _logFile.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append) ) {
- QTextStream out(&_logFile);
+ if ( _logFile.open(TQIODevice::WriteOnly | TQIODevice::Text | TQIODevice::Append) ) {
+ TQTextStream out(&_logFile);
while ( !_messageQueue.isEmpty() ) {
out << _messageQueue.takeFirst() << "\n";
diff --git a/src/debugging/TSLogger.h b/src/debugging/TSLogger.h
index 97268f7..39abcaa 100755
--- a/src/debugging/TSLogger.h
+++ b/src/debugging/TSLogger.h
@@ -20,8 +20,8 @@
#ifndef TSLogger_H
#define TSLogger_H
-#include <tqdialog.h>
-#include <tqfile.h>
+#include <tntqdialog.h>
+#include <tntqfile.h>
namespace Ui {
class TSLoggerDialog;
@@ -29,16 +29,16 @@ namespace Ui {
namespace tschweitzer { namespace debugging {
-#define TSLoggerInfoMsg QtMsgType(4)
+#define TSLoggerInfoMsg TQtMsgType(4)
-class TSLogger : public QDialog
+class TSLogger : public TQDialog
{
Q_OBJECT
public:
static TSLogger* getInstance(int verboseLevel);
static TSLogger* getInstance();
- static void messageHandler(QtMsgType type, const char *msg);
+ static void messageHandler(TQtMsgType type, const char *msg);
static void deleteInstance();
void setVerboseLevel(int level);
@@ -50,12 +50,12 @@ private:
enum LogFileInitState { NOTINITIALZED, INITIALIZING, INITIALZED } _logFileInitState;
TSLogger(int verboseLevel);
- void writeToLogFile(const QString &message);
+ void writeToLogFile(const TQString &message);
static TSLogger* _instance;
- QtMsgType _verboseLevel;
- QFile _logFile;
- QStringList _messageQueue;
+ TQtMsgType _verboseLevel;
+ TQFile _logFile;
+ TQStringList _messageQueue;
};
}} // namespace tschweitzer::debugging
diff --git a/src/debugging/TSLoggerDialog.ui b/src/debugging/TSLoggerDialog.ui
index 3a83146..1956229 100755
--- a/src/debugging/TSLoggerDialog.ui
+++ b/src/debugging/TSLoggerDialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TSLoggerDialog</class>
- <widget class="QDialog" name="TSLoggerDialog">
+ <widget class="TQDialog" name="TSLoggerDialog">
<property name="geometry">
<rect>
<x>0</x>
@@ -17,25 +17,25 @@
<iconset resource="../resources/Icons.qrc">
<normaloff>:/mainWindow/document-properties.png</normaloff>:/mainWindow/document-properties.png</iconset>
</property>
- <layout class="QVBoxLayout">
+ <layout class="TQVBoxLayout">
<item>
- <widget class="QLabel" name="label">
+ <widget class="TQLabel" name="label">
<property name="text">
<string>Logged messages</string>
</property>
</widget>
</item>
<item>
- <widget class="QTextEdit" name="logTextEdit">
+ <widget class="TQTextEdit" name="logTextEdit">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="TQHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QToolButton" name="cleanUpToolButton">
+ <widget class="TQToolButton" name="cleanUpToolButton">
<property name="toolTip">
<string>Clear log</string>
</property>
@@ -49,7 +49,7 @@
</widget>
</item>
<item>
- <widget class="QToolButton" name="openLogFileFolderToolButton">
+ <widget class="TQToolButton" name="openLogFileFolderToolButton">
<property name="toolTip">
<string>Open folder containing log file.</string>
</property>
@@ -65,7 +65,7 @@
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <enum>TQt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
@@ -76,9 +76,9 @@
</spacer>
</item>
<item>
- <widget class="QDialogButtonBox" name="buttonBox">
+ <widget class="TQDialogButtonBox" name="buttonBox">
<property name="standardButtons">
- <set>QDialogButtonBox::Close</set>
+ <set>TQDialogButtonBox::Close</set>
</property>
</widget>
</item>
@@ -108,7 +108,7 @@
</connection>
<connection>
<sender>buttonBox</sender>
- <signal>clicked(QAbstractButton*)</signal>
+ <signal>clicked(TQAbstractButton*)</signal>
<receiver>TSLoggerDialog</receiver>
<slot>close()</slot>
<hints>
diff --git a/src/main.cpp b/src/main.cpp
index 77e3444..5a1204d 100755
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -28,8 +28,8 @@
#include "IndentHandler.h"
#include "SettingsPaths.h"
-#include <tqapplication.h>
-#include <tqtextcodec.h>
+#include <tntqapplication.h>
+#include <tntqtextcodec.h>
#include <tqdebug.h>
#include <string>
@@ -129,7 +129,7 @@ using namespace tschweitzer::debugging;
-v --verbose needs a following parameter defining the verbose level as a number from 0 to 3.
*/
int main(int argc, char *argv[]) {
- QString file2OpenOnStart = "";
+ TQString file2OpenOnStart = "";
int verboseLevel = 1;
bool startAsPlugin = false;
bool startAsServer = false;
@@ -143,7 +143,7 @@ int main(int argc, char *argv[]) {
// Filter out -psn_0_118813 and similar parameters.
std::vector<char*> argList;
for ( int i = 0; i < argc; i++ ) {
- QString argString(argv[i]);
+ TQString argString(argv[i]);
if ( argString.startsWith("-psn_") == false ) {
argList.push_back(argv[i]);
@@ -219,15 +219,15 @@ int main(int argc, char *argv[]) {
return returnValue;
}
- QApplication app(argc, argv);
+ TQApplication app(argc, argv);
UiGuiIndentServer server;
MainWindow *mainWindow = NULL;
IndentHandler *indentHandler = NULL;
// Init and install the logger function.
- // Setting UTF-8 as default 8-Bit encoding to ensure that qDebug does no false string conversion.
- QTextCodec::setCodecForCStrings( QTextCodec::codecForName("UTF-8") );
- QTextCodec::setCodecForLocale( QTextCodec::codecForName("UTF-8") );
+ // Setting UTF-8 as default 8-Bit encoding to ensure that tqDebug does no false string conversion.
+ TQTextCodec::setCodecForCStrings( TQTextCodec::codecForName("UTF-8") );
+ TQTextCodec::setCodecForLocale( TQTextCodec::codecForName("UTF-8") );
// Force creation of an TSLogger instance here, to avoid recursion with SettingsPaths init function.
#ifdef _DEBUG
TSLogger::getInstance(0);
@@ -235,13 +235,13 @@ int main(int argc, char *argv[]) {
TSLogger::getInstance(verboseLevel);
#endif
qInstallMsgHandler( TSLogger::messageHandler );
- TSLogger::messageHandler( TSLoggerInfoMsg, QString("Starting UiGUI Version %1 %2").arg(PROGRAM_VERSION_STRING).arg(PROGRAM_REVISION).toAscii() );
- TSLogger::messageHandler( TSLoggerInfoMsg, QString("Running on %1").arg(UiGuiSystemInfo::getOperatingSystem()).toAscii() );
+ TSLogger::messageHandler( TSLoggerInfoMsg, TQString("Starting UiGUI Version %1 %2").arg(PROGRAM_VERSION_STRING).arg(PROGRAM_REVISION).toAscii() );
+ TSLogger::messageHandler( TSLoggerInfoMsg, TQString("Running on %1").arg(UiGuiSystemInfo::getOperatingSystem()).toAscii() );
// Set default values for all by UniversalIndentGUI used settings objects.
- QCoreApplication::setOrganizationName("UniversalIndentGUI");
- QCoreApplication::setOrganizationDomain("universalindent.sf.net");
- QCoreApplication::setApplicationName("UniversalIndentGUI");
+ TQCoreApplication::setOrganizationName("UniversalIndentGUI");
+ TQCoreApplication::setOrganizationDomain("universalindent.sf.net");
+ TQCoreApplication::setApplicationName("UniversalIndentGUI");
// Start normal with full gui and without server.
if ( !startAsPlugin && !startAsServer ) {