diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-03 01:36:58 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-03 01:36:58 +0000 |
commit | d9d0ac84a2b1609ff81b399b81842a15704cbefd (patch) | |
tree | 58c783db373c4633201e5a9716901599c1afad92 | |
parent | 63f270d62c4541f1379f0f82f5255a34e5037e00 (diff) | |
download | ksquirrel-d9d0ac84a2b1609ff81b399b81842a15704cbefd.tar.gz ksquirrel-d9d0ac84a2b1609ff81b399b81842a15704cbefd.zip |
TQt4 port ksquirrel
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ksquirrel@1239132 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
214 files changed, 4995 insertions, 4951 deletions
diff --git a/ksquirrel/imageedit/sq_bcglabel.cpp b/ksquirrel/imageedit/sq_bcglabel.cpp index d963976..968dbd9 100644 --- a/ksquirrel/imageedit/sq_bcglabel.cpp +++ b/ksquirrel/imageedit/sq_bcglabel.cpp @@ -17,11 +17,11 @@ #include "sq_bcglabel.h" -SQ_BCGLabel::SQ_BCGLabel(QWidget *parent, const char *name, WFlags f) : QLabel(parent, name, f | Qt::WNoAutoErase) +SQ_BCGLabel::SQ_BCGLabel(TQWidget *tqparent, const char *name, WFlags f) : TQLabel(tqparent, name, f | TQt::WNoAutoErase) { setScaledContents(false); - setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); + tqsetAlignment(TQt::AlignHCenter | TQt::AlignVCenter); } SQ_BCGLabel::~SQ_BCGLabel() diff --git a/ksquirrel/imageedit/sq_bcglabel.h b/ksquirrel/imageedit/sq_bcglabel.h index dd86bc7..7c9bc86 100644 --- a/ksquirrel/imageedit/sq_bcglabel.h +++ b/ksquirrel/imageedit/sq_bcglabel.h @@ -18,16 +18,16 @@ #ifndef SQ_BCGLABEL_H #define SQ_BCGLABEL_H -#include <qlabel.h> +#include <tqlabel.h> /** *@author Baryshev Dmitry */ -class SQ_BCGLabel : public QLabel +class SQ_BCGLabel : public TQLabel { public: - SQ_BCGLabel(QWidget *parent, const char *name = 0, WFlags f = 0); + SQ_BCGLabel(TQWidget *tqparent, const char *name = 0, WFlags f = 0); ~SQ_BCGLabel(); }; diff --git a/ksquirrel/imageedit/sq_converter.cpp b/ksquirrel/imageedit/sq_converter.cpp index 7132332..c14d060 100644 --- a/ksquirrel/imageedit/sq_converter.cpp +++ b/ksquirrel/imageedit/sq_converter.cpp @@ -23,8 +23,8 @@ #include <string.h> #include <stdlib.h> -#include <qapplication.h> -#include <qfile.h> +#include <tqapplication.h> +#include <tqfile.h> #include <kmessagebox.h> #include <kstringhandler.h> @@ -44,7 +44,7 @@ SQ_Converter * SQ_Converter::m_sing = 0; -SQ_Converter::SQ_Converter(QObject *parent) : QObject(parent) +SQ_Converter::SQ_Converter(TQObject *tqparent) : TQObject(tqparent) { m_sing = this; @@ -89,20 +89,20 @@ void SQ_Converter::slotStartEdit() startEditPrivate(); } -QString SQ_Converter::adjustFileName(const QString &globalprefix, const QString &name1, int replace, QString putto, bool paged, int page) +TQString SQ_Converter::adjustFileName(const TQString &globalprefix, const TQString &name1, int tqreplace, TQString putto, bool paged, int page) { - QFileInfo ff(name1); - QString name = ff.dirPath() + '/' + (replace == 0 ? globalprefix : (replace == 2 ? QString::null : globalprefix)) + ff.fileName(); - ff = QFileInfo(name); + TQFileInfo ff(name1); + TQString name = ff.dirPath() + '/' + (tqreplace == 0 ? globalprefix : (tqreplace == 2 ? TQString() : globalprefix)) + ff.fileName(); + ff = TQFileInfo(name); - QString result, inner, filter = lw->filter; - QString ext = ff.extension(false); - QString prefix, suffix, name2 = name; - QString spage = QString::fromLatin1("page_%1.").arg((QString::fromLatin1("%1").arg(page)).rightJustify(3, '0')); + TQString result, inner, filter = lw->filter; + TQString ext = ff.extension(false); + TQString prefix, suffix, name2 = name; + TQString spage = TQString::tqfromLatin1("page_%1.").tqarg((TQString::tqfromLatin1("%1").tqarg(page)).rightJustify(3, '0')); if(!putto.isEmpty()) { - if(QFile::exists(putto)) + if(TQFile::exists(putto)) name2 = putto + '/' + ff.fileName(); } @@ -110,18 +110,18 @@ QString SQ_Converter::adjustFileName(const QString &globalprefix, const QString prefix.truncate(name2.length() - ext.length()); - suffix = (SQ_LibraryHandler::instance()->knownExtension(QString::fromLatin1("*.") + ext)) - ? QString(lw->codec->extension(32)) : ext; + suffix = (SQ_LibraryHandler::instance()->knownExtension(TQString::tqfromLatin1("*.") + ext)) + ? TQString(lw->codec->extension(32)) : ext; - if(replace == 0 || replace == 2) + if(tqreplace == 0 || tqreplace == 2) result = (!paged) ? (prefix + inner + suffix) : (prefix + spage + inner + suffix); else { result = (!paged) ? (prefix + inner + suffix) : (prefix + spage + inner + suffix); - if(QFile::exists(result)) + if(TQFile::exists(result)) { - inner = QString::fromLatin1("1."); + inner = TQString::tqfromLatin1("1."); result = (!paged) ? (prefix + inner + suffix) : (prefix + spage + inner + suffix); } } @@ -138,12 +138,12 @@ void SQ_Converter::errorjmp(jmp_buf jmp, const int code) void SQ_Converter::decodingCycle() { int i, j; - QString name; + TQString name; jmp_buf jmp; RGBA *scan; int errors, gerrors = 0, current; - QString putto; - int replace = imageopt.where_to_put; + TQString putto; + int tqreplace = imageopt.where_to_put; bool brk; SQ_Config::instance()->setGroup("Edit tools"); @@ -167,18 +167,18 @@ void SQ_Converter::decodingCycle() tempfile->close(); - QStringList::iterator last_it = files.fromLast(); - QStringList::iterator itEnd = files.end(); + TQStringList::iterator last_it = files.fromLast(); + TQStringList::iterator itEnd = files.end(); convert->startConvertion(files.count()); putto = imageopt.putto; - for(QStringList::iterator it = files.begin();it != itEnd;++it) + for(TQStringList::iterator it = files.begin();it != itEnd;++it) { currentFile = *it; last = (it == last_it); - QFileInfo ff(*it); + TQFileInfo ff(*it); emit convertText(special_action + ' ' + KStringHandler::rsqueeze(ff.fileName()) + "... ", false); @@ -194,7 +194,7 @@ void SQ_Converter::decodingCycle() continue; } - name = QFile::encodeName(*it); + name = TQFile::encodeName(*it); i = lr->codec->read_init(name.ascii()); @@ -229,9 +229,9 @@ void SQ_Converter::decodingCycle() if(i == SQE_NOTOK || brk) { if(current == 1) - name = adjustFileName(prefix, *it, replace, putto); + name = adjustFileName(prefix, *it, tqreplace, putto); else - name = adjustFileName(prefix, *it, replace, putto, true, current); + name = adjustFileName(prefix, *it, tqreplace, putto, true, current); lastFrame = last; @@ -242,11 +242,11 @@ void SQ_Converter::decodingCycle() i = SQE_OK; - if(replace == 2) + if(tqreplace == 2) { - emit convertText(i18n("Removing") + KStringHandler::rsqueeze(ff.fileName()) + QString("... "), false); + emit convertText(i18n("Removing") + KStringHandler::rsqueeze(ff.fileName()) + TQString("... "), false); - bool b = QFile::remove(*it); + bool b = TQFile::remove(*it); emit convertText(b ? SQ_ErrorString::instance()->stringSN(SQE_OK) : err_failed, true); emit oneFileProcessed(); @@ -262,7 +262,7 @@ void SQ_Converter::decodingCycle() if(current) { - name = adjustFileName(prefix, *it, replace, putto, true, current); + name = adjustFileName(prefix, *it, tqreplace, putto, true, current); lastFrame = false; @@ -326,7 +326,7 @@ void SQ_Converter::decodingCycle() emit done(false); } -int SQ_Converter::manipAndWriteDecodedImage(const QString &name, fmt_image *im) +int SQ_Converter::manipAndWriteDecodedImage(const TQString &name, fmt_image *im) { int passes = opt.interlaced ? lw->opt.passes : 1; int s, j, err; @@ -337,7 +337,7 @@ int SQ_Converter::manipAndWriteDecodedImage(const QString &name, fmt_image *im) if(!scan) return SQE_W_NOMEMORY; - err = lw->codec->write_init(name, *im, opt); + err = lw->codec->write_init(name.ascii(), *im, opt); if(err != SQE_OK) goto error_exit; @@ -379,10 +379,10 @@ int SQ_Converter::manipAndWriteDecodedImage(const QString &name, fmt_image *im) return err; } -int SQ_Converter::copyFile(const QString &src, const QString &dst) const +int SQ_Converter::copyFile(const TQString &src, const TQString &dst) const { - QFile f_src(src), f_dst(dst); - Q_LONG read; + TQFile f_src(src), f_dst(dst); + TQ_LONG read; char data[4096]; if(!f_src.open(IO_ReadOnly)) @@ -425,10 +425,10 @@ void SQ_Converter::startEditPrivate() convert = new SQ_ImageConvert(KSquirrel::app()); convert->setCaption(i18n("Convert 1 file", "Convert %n files", files.count())); - connect(convert, SIGNAL(convert(SQ_ImageOptions*, SQ_ImageConvertOptions*)), this, SLOT(slotStartConvert(SQ_ImageOptions*, SQ_ImageConvertOptions*))); - connect(this, SIGNAL(convertText(const QString &, bool)), convert, SLOT(slotDebugText(const QString &, bool))); - connect(this, SIGNAL(oneFileProcessed()), convert, SLOT(slotOneProcessed())); - connect(this, SIGNAL(done(bool)), convert, SLOT(slotDone(bool))); + connect(convert, TQT_SIGNAL(convert(SQ_ImageOptions*, SQ_ImageConvertOptions*)), this, TQT_SLOT(slotStartConvert(SQ_ImageOptions*, SQ_ImageConvertOptions*))); + connect(this, TQT_SIGNAL(convertText(const TQString &, bool)), convert, TQT_SLOT(slotDebugText(const TQString &, bool))); + connect(this, TQT_SIGNAL(oneFileProcessed()), convert, TQT_SLOT(slotOneProcessed())); + connect(this, TQT_SIGNAL(done(bool)), convert, TQT_SLOT(slotDone(bool))); convert->exec(); } diff --git a/ksquirrel/imageedit/sq_converter.h b/ksquirrel/imageedit/sq_converter.h index 4781619..f0a8de1 100644 --- a/ksquirrel/imageedit/sq_converter.h +++ b/ksquirrel/imageedit/sq_converter.h @@ -18,8 +18,8 @@ #ifndef SQ_CONVERTER_H #define SQ_CONVERTER_H -#include <qobject.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstringlist.h> #include <sstream> #include <csetjmp> @@ -44,12 +44,13 @@ class SQ_ImageConvertOptions; * appropriate edit tool. */ -class SQ_Converter : public QObject +class SQ_Converter : public TQObject { Q_OBJECT + TQ_OBJECT public: - SQ_Converter(QObject *parent); + SQ_Converter(TQObject *tqparent); ~SQ_Converter(); public: @@ -66,7 +67,7 @@ class SQ_Converter : public QObject * Do something with decoded image(manipDecodedImage()) and write it * on disk. */ - int manipAndWriteDecodedImage(const QString &name, fmt_image *im); + int manipAndWriteDecodedImage(const TQString &name, fmt_image *im); /* * Main decoding loop. @@ -76,20 +77,20 @@ class SQ_Converter : public QObject /* * Determine file name. In this file SQ_Converter will save new image. */ - QString adjustFileName(const QString &globalprefix, const QString &name, int replace, - QString putto, bool paged = false, int page = 0); + TQString adjustFileName(const TQString &globalprefix, const TQString &name, int tqreplace, + TQString putto, bool paged = false, int page = 0); void determineNextScan(const fmt_image &im, RGBA *scan, int y); /* * Copy file :-) */ - int copyFile(const QString &src, const QString &dst) const; + int copyFile(const TQString &src, const TQString &dst) const; void errorjmp(jmp_buf jmp, const int code); signals: - void convertText(const QString &, bool); + void convertText(const TQString &, bool); void oneFileProcessed(); void done(bool allok); @@ -98,15 +99,15 @@ class SQ_Converter : public QObject void slotStartConvert(SQ_ImageOptions*, SQ_ImageConvertOptions*); protected: - QStringList files; - QString err_internal, err_failed; - QString currentFile; + TQStringList files; + TQString err_internal, err_failed; + TQString currentFile; int error_code, current_page; SQ_ImageOptions imageopt; fmt_writeoptions opt; SQ_LIBRARY *lr, *lw, *altw; RGBA *image; - QString special_action, prefix; + TQString special_action, prefix; bool multi, last, lastFrame; KTempFile *tempfile; fmt_image *im; diff --git a/ksquirrel/imageedit/sq_imagebcg.ui b/ksquirrel/imageedit/sq_imagebcg.ui index f2959b4..e291d2e 100644 --- a/ksquirrel/imageedit/sq_imagebcg.ui +++ b/ksquirrel/imageedit/sq_imagebcg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ImageBCG</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ImageBCG</cstring> </property> @@ -22,14 +22,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="1" column="0" rowspan="3" colspan="1"> + <widget class="TQWidgetStack" row="1" column="0" rowspan="3" colspan="1"> <property name="name"> <cstring>widgetStackParams</cstring> </property> <property name="frameShape"> <enum>GroupBoxPanel</enum> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -43,7 +43,7 @@ <property name="margin"> <number>4</number> </property> - <widget class="QSpinBox" row="2" column="0"> + <widget class="TQSpinBox" row="2" column="0"> <property name="name"> <cstring>spinB</cstring> </property> @@ -54,7 +54,7 @@ <number>-255</number> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>pushResetG</cstring> </property> @@ -68,7 +68,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>pushResetC</cstring> </property> @@ -87,7 +87,7 @@ <cstring>spinG</cstring> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>spinC</cstring> </property> @@ -98,7 +98,7 @@ <number>-255</number> </property> </widget> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushResetB</cstring> </property> @@ -112,9 +112,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -125,7 +125,7 @@ <cstring>sQ_LabelB</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderB</cstring> </property> @@ -150,9 +150,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -163,7 +163,7 @@ <cstring>sQ_LabelC</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderC</cstring> </property> @@ -188,9 +188,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="2"> + <widget class="TQLayoutWidget" row="1" column="2"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -201,7 +201,7 @@ <cstring>sQ_LabelG</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderG</cstring> </property> @@ -231,7 +231,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -245,7 +245,7 @@ <property name="margin"> <number>4</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushResetRed</cstring> </property> @@ -259,7 +259,7 @@ <bool>true</bool> </property> </widget> - <widget class="QSpinBox" row="2" column="0"> + <widget class="TQSpinBox" row="2" column="0"> <property name="name"> <cstring>spinRed</cstring> </property> @@ -270,7 +270,7 @@ <number>-255</number> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>spinGreen</cstring> </property> @@ -281,7 +281,7 @@ <number>-255</number> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>pushResetGreen</cstring> </property> @@ -295,7 +295,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>pushResetBlue</cstring> </property> @@ -309,7 +309,7 @@ <bool>true</bool> </property> </widget> - <widget class="QSpinBox" row="2" column="2"> + <widget class="TQSpinBox" row="2" column="2"> <property name="name"> <cstring>spinBlue</cstring> </property> @@ -320,9 +320,9 @@ <number>-255</number> </property> </widget> - <widget class="QLayoutWidget" row="1" column="2"> + <widget class="TQLayoutWidget" row="1" column="2"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -333,7 +333,7 @@ <cstring>sQ_LabelBlue</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderBlue</cstring> </property> @@ -355,9 +355,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -368,7 +368,7 @@ <cstring>sQ_LabelGreen</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderGreen</cstring> </property> @@ -390,9 +390,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -403,7 +403,7 @@ <cstring>sQ_LabelRed</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderRed</cstring> </property> @@ -428,7 +428,7 @@ </grid> </widget> </widget> - <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -453,7 +453,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QPushButton" row="0" column="4"> + <widget class="TQPushButton" row="0" column="4"> <property name="name"> <cstring>push2</cstring> </property> @@ -467,7 +467,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>push1</cstring> </property> @@ -491,7 +491,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -508,18 +508,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>text</cstring> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignCenter</set> </property> </widget> @@ -535,16 +535,16 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="5" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> @@ -560,14 +560,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>249</width> <height>21</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushGO</cstring> </property> @@ -578,7 +578,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -615,16 +615,16 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="2" column="1"> + <widget class="TQLayoutWidget" row="2" column="1"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <grid> <property name="name"> @@ -640,14 +640,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -665,7 +665,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -684,14 +684,14 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>160</width> <height>160</height> </size> </property> </widget> - <widget class="QLabel" row="0" column="3" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="3" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -709,7 +709,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -728,7 +728,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>160</width> <height>160</height> @@ -938,8 +938,8 @@ </tabstops> <includes> <include location="local" impldecl="in declaration">sq_imageedit.h</include> - <include location="global" impldecl="in declaration">qimage.h</include> - <include location="global" impldecl="in declaration">qstringlist.h</include> + <include location="global" impldecl="in declaration">tqimage.h</include> + <include location="global" impldecl="in declaration">tqstringlist.h</include> <include location="local" impldecl="in implementation">sq_iconloader.h</include> <include location="global" impldecl="in implementation">kstandarddirs.h</include> <include location="local" impldecl="in implementation">sq_config.h</include> @@ -950,14 +950,14 @@ </includes> <variables> <variable access="private">int id;</variable> - <variable access="private">QImage sample, sample_saved;</variable> + <variable access="private">TQImage sample, sample_saved;</variable> <variable access="private">QStringList strings;</variable> <variable access="private">static SQ_ImageBCG *m_inst;</variable> </variables> -<signals> +<Q_SIGNALS> <signal>bcg(SQ_ImageBCGOptions*)</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="private" specifier="non virtual">slotResetG()</slot> <slot access="private" specifier="non virtual">slotResetC()</slot> <slot access="private" specifier="non virtual">slotResetB()</slot> @@ -973,16 +973,16 @@ <slot access="private" specifier="non virtual">slotGChanged( int v )</slot> <slot access="private" specifier="non virtual">slotGSpinChanged( double v )</slot> <slot access="private" specifier="non virtual">slotPush()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> <function access="private" specifier="non virtual" returnType="int">RGB2Y( int r, int g, int b )</function> - <function access="private" specifier="non virtual">assignNewImage( const QImage & im )</function> + <function access="private" specifier="non virtual">assignNewImage( const TQImage & im )</function> <function access="private" specifier="non virtual">changeImage( int b, int c, int g1, int red, int green, int blue )</function> - <function specifier="non virtual">setPreviewImage( const QImage & im )</function> + <function specifier="non virtual">setPreviewImage( const TQImage & im )</function> <function specifier="static" returnType="SQ_ImageBCG *">instance()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>sq_label.h</includehint> diff --git a/ksquirrel/imageedit/sq_imagebcg.ui.h b/ksquirrel/imageedit/sq_imagebcg.ui.h index 7d80c6f..3d0913d 100644 --- a/ksquirrel/imageedit/sq_imagebcg.ui.h +++ b/ksquirrel/imageedit/sq_imagebcg.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -13,7 +13,7 @@ void SQ_ImageBCG::init() { m_inst = this; - QPixmap p = QPixmap::fromMimeSource(locate("data", "images/imageedit/reset_value.png")); + TQPixmap p = TQPixmap::fromMimeSource(locate("data", "images/imageedit/reset_value.png")); sQ_LabelB->setSingle(true); sQ_LabelC->setSingle(true); @@ -32,21 +32,21 @@ void SQ_ImageBCG::init() pushResetGreen->setPixmap(p); pushResetBlue->setPixmap(p); - strings.append(QString("<b>") + tr2i18n("Brightness") + ", " + tr2i18n("Contrast") + ", " + tr2i18n("Gamma") + "</b>"); - strings.append(QString("<b>") + tr2i18n("Red") + ", " + tr2i18n("Green") + ", " + tr2i18n("Blue") + "</b>"); + strings.append(TQString("<b>") + tr2i18n("Brightness") + ", " + tr2i18n("Contrast") + ", " + tr2i18n("Gamma") + "</b>"); + strings.append(TQString("<b>") + tr2i18n("Red") + ", " + tr2i18n("Green") + ", " + tr2i18n("Blue") + "</b>"); id = 0; widgetStackParams->raiseWidget(id); text->setText(strings[id]); - QPixmap tool1 = QPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton.png")); - QPixmap tool2 = QPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton2.png")); + TQPixmap tool1 = TQPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton.png")); + TQPixmap tool2 = TQPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton2.png")); push1->setPixmap(tool1); push2->setPixmap(tool2); spinG->setRange(0, 6.0, 0.01, 2); spinG->setValue(1.0); - connect(spinG, SIGNAL(valueChanged(int)), spinG, SLOT(slotValueChanged(int))); + connect(spinG, TQT_SIGNAL(valueChanged(int)), spinG, TQT_SLOT(slotValueChanged(int))); } void SQ_ImageBCG::slotResetG() @@ -177,9 +177,9 @@ void SQ_ImageBCG::slotGSpinChanged(double v) changeImage(sliderB->value(), sliderC->value(), val, sliderRed->value(), sliderGreen->value(), sliderBlue->value()); } -void SQ_ImageBCG::assignNewImage(const QImage &im) +void SQ_ImageBCG::assignNewImage(const TQImage &im) { - QPixmap p; + TQPixmap p; p.convertFromImage(im); pixmap1->setPixmap(p); } @@ -219,14 +219,14 @@ void SQ_ImageBCG::slotPush() text->setText(strings[id]); } -void SQ_ImageBCG::setPreviewImage(const QImage &im) +void SQ_ImageBCG::setPreviewImage(const TQImage &im) { if(im.isNull()) return; sample = im.copy(); sample_saved = sample.copy(); - QPixmap p; + TQPixmap p; p.convertFromImage(sample_saved); pixmap->setPixmap(p); diff --git a/ksquirrel/imageedit/sq_imageconvert.ui b/ksquirrel/imageedit/sq_imageconvert.ui index 732b953..1ec4728 100644 --- a/ksquirrel/imageedit/sq_imageconvert.ui +++ b/ksquirrel/imageedit/sq_imageconvert.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ImageConvert</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ImageConvert</cstring> </property> @@ -22,9 +22,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -40,14 +40,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>237</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushConvert</cstring> </property> @@ -58,7 +58,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -85,11 +85,11 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QWidgetStack" row="0" column="0"> + <widget class="TQWidgetStack" row="0" column="0"> <property name="name"> <cstring>widgetStack</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -103,7 +103,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox" row="0" column="1"> + <widget class="TQGroupBox" row="0" column="1"> <property name="name"> <cstring>groupBoxActions</cstring> </property> @@ -128,7 +128,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushOptions</cstring> </property> @@ -149,14 +149,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>26</width> <height>155</height> </size> </property> </spacer> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>pushWriteOptions</cstring> </property> @@ -175,7 +175,7 @@ </widget> </grid> </widget> - <widget class="QListView" row="0" column="0"> + <widget class="TQListView" row="0" column="0"> <column> <property name="text"> <string>col1</string> @@ -210,7 +210,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -224,7 +224,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTextEdit" row="0" column="0"> + <widget class="TQTextEdit" row="0" column="0"> <property name="name"> <cstring>textResult</cstring> </property> @@ -277,9 +277,9 @@ </connection> <connection> <sender>tableLib</sender> - <signal>currentChanged(QListViewItem*)</signal> + <signal>currentChanged(TQListViewItem*)</signal> <receiver>SQ_ImageConvert</receiver> - <slot>slotCurrentLibraryChanged(QListViewItem*)</slot> + <slot>slotCurrentLibraryChanged(TQListViewItem*)</slot> </connection> </connections> <tabstops> @@ -295,12 +295,12 @@ <include location="global" impldecl="in implementation">ksquirrel-libs/fmt_defs.h</include> <include location="local" impldecl="in declaration">sq_imageedit.h</include> <include location="local" impldecl="in implementation">sq_libraryhandler.h</include> - <include location="global" impldecl="in implementation">qfileinfo.h</include> - <include location="global" impldecl="in implementation">qheader.h</include> + <include location="global" impldecl="in implementation">tqfileinfo.h</include> + <include location="global" impldecl="in implementation">tqheader.h</include> <include location="local" impldecl="in implementation">sq_writeoption.h</include> <include location="local" impldecl="in implementation">sq_iconloader.h</include> - <include location="global" impldecl="in implementation">qapplication.h</include> - <include location="global" impldecl="in implementation">qcheckbox.h</include> + <include location="global" impldecl="in implementation">tqapplication.h</include> + <include location="global" impldecl="in implementation">tqcheckbox.h</include> <include location="local" impldecl="in implementation">sq_imageeditoptions.h</include> <include location="local" impldecl="in implementation">sq_config.h</include> <include location="global" impldecl="in implementation">kstandarddirs.h</include> @@ -317,28 +317,28 @@ <variable access="private">int paragraph;</variable> <variable access="private">bool done;</variable> </variables> -<signals> +<Q_SIGNALS> <signal>convert(SQ_ImageOptions*, SQ_ImageConvertOptions*)</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot>slotShowExtWrapper( bool show )</slot> <slot access="private">createExtension()</slot> - <slot access="private">slotDebugText( const QString & text, bool bold )</slot> + <slot access="private">slotDebugText( const TQString & text, bool bold )</slot> <slot access="private">slotStartConvert()</slot> <slot access="private">slotOneProcessed()</slot> - <slot access="private">slotCurrentLibraryChanged( QListViewItem * i )</slot> + <slot access="private">slotCurrentLibraryChanged( TQListViewItem * i )</slot> <slot access="private">slotOptions()</slot> <slot access="private">slotDone( bool close )</slot> <slot access="private">slotReject()</slot> -</slots> +</Q_SLOTS> <functions> <function>init()</function> <function access="private">initLibs()</function> <function>startConvertion( int count )</function> <function>fillWriteOptions( fmt_writeoptions * opt, const fmt_writeoptionsabs & opt2 )</function> - <function access="protected">closeEvent( QCloseEvent * e )</function> + <function access="protected">closeEvent( TQCloseEvent * e )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kprogress.h</includehint> </includehints> diff --git a/ksquirrel/imageedit/sq_imageconvert.ui.h b/ksquirrel/imageedit/sq_imageconvert.ui.h index 7acaa20..7bad63c 100644 --- a/ksquirrel/imageedit/sq_imageconvert.ui.h +++ b/ksquirrel/imageedit/sq_imageconvert.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -15,12 +15,12 @@ void SQ_ImageConvert::init() initLibs(); - pushWriteOptions->setPixmap(QPixmap(locate("data", "images/imageedit/resize_toolbutton2.png"))); + pushWriteOptions->setPixmap(TQPixmap(locate("data", "images/imageedit/resize_toolbutton2.png"))); pushOptions->setPixmap(SQ_IconLoader::instance()->loadIcon("configure", KIcon::Desktop, KIcon::SizeSmall)); SQ_Config::instance()->setGroup("Image edit options"); - imageopt.putto = SQ_Config::instance()->readEntry("convert_putto", QString::null); + imageopt.putto = SQ_Config::instance()->readEntry("convert_putto", TQString()); imageopt.where_to_put = SQ_Config::instance()->readNumEntry("convert_where_to_put", 0); imageopt.close = SQ_Config::instance()->readBoolEntry("convert_close", true); @@ -29,17 +29,17 @@ void SQ_ImageConvert::init() void SQ_ImageConvert::initLibs() { - QListViewItem *first; + TQListViewItem *first; - QValueVector<SQ_LIBRARY>::iterator itEnd = SQ_LibraryHandler::instance()->end(); + TQValueVector<SQ_LIBRARY>::iterator itEnd = SQ_LibraryHandler::instance()->end(); - for(QValueVector<SQ_LIBRARY>::iterator it = SQ_LibraryHandler::instance()->begin(); + for(TQValueVector<SQ_LIBRARY>::iterator it = SQ_LibraryHandler::instance()->begin(); it != itEnd;++it) { if((*it).writestatic) { - QFileInfo libfileinfo((*it).libpath); - QListViewItem *item = new QListViewItem(tableLib, QString::null, QString((*it).quickinfo)); + TQFileInfo libfileinfo((*it).libpath); + TQListViewItem *item = new TQListViewItem(tableLib, TQString(), TQString((*it).quickinfo)); item->setPixmap(0, (*it).mime); @@ -69,7 +69,7 @@ void SQ_ImageConvert::createExtension() setOrientation(Qt::Horizontal); } -void SQ_ImageConvert::slotDebugText(const QString &text, bool bold) +void SQ_ImageConvert::slotDebugText(const TQString &text, bool bold) { textResult->setBold(bold); textResult->insertAt(text, paragraph, textResult->paragraphLength(paragraph)); @@ -85,9 +85,9 @@ void SQ_ImageConvert::slotStartConvert() widgetStack->raiseWidget(1); showExtension(false); - qApp->processEvents(); + tqApp->processEvents(); - QListViewItem *i = tableLib->selectedItem(); + TQListViewItem *i = tableLib->selectedItem(); if(!i) return; @@ -112,12 +112,12 @@ void SQ_ImageConvert::slotOneProcessed() paragraph++; } -void SQ_ImageConvert::slotCurrentLibraryChanged( QListViewItem * i) +void SQ_ImageConvert::slotCurrentLibraryChanged( TQListViewItem * i) { if(!i) return; - QString name = i->text(1); + TQString name = i->text(1); SQ_LIBRARY *l = SQ_LibraryHandler::instance()->libraryByName(name); @@ -182,7 +182,7 @@ void SQ_ImageConvert::slotOptions() SQ_ImageEditOptions o(this); // SQ_ImageEditOptions will write needed KConfig entries, if - // exec() will return QDialog::Accepted + // exec() will return TQDialog::Accepted o.setConfigPrefix("convert"); o.exec(&imageopt); @@ -202,13 +202,13 @@ void SQ_ImageConvert::slotReject() reject(); } -void SQ_ImageConvert::closeEvent(QCloseEvent *e) +void SQ_ImageConvert::closeEvent(TQCloseEvent *e) { if(done) e->accept(); else { e->ignore(); - QWhatsThis::display(SQ_ErrorString::instance()->string(SQE_NOTFINISHED)); + TQWhatsThis::display(SQ_ErrorString::instance()->string(SQE_NOTFINISHED)); } } diff --git a/ksquirrel/imageedit/sq_imageedit.h b/ksquirrel/imageedit/sq_imageedit.h index acece00..a93e26b 100644 --- a/ksquirrel/imageedit/sq_imageedit.h +++ b/ksquirrel/imageedit/sq_imageedit.h @@ -18,14 +18,14 @@ #ifndef SQ_IMAGEEDIT_H #define SQ_IMAGEEDIT_H -#include <qfont.h> -#include <qcolor.h> +#include <tqfont.h> +#include <tqcolor.h> #include "fmt_filters.h" struct SQ_ImageOptions { - QString putto; + TQString putto; int where_to_put; bool close; }; @@ -38,7 +38,7 @@ struct SQ_ImageBCGOptions struct SQ_ImageConvertOptions { - QString libname; + TQString libname; }; struct SQ_ImageFilterOptions diff --git a/ksquirrel/imageedit/sq_imageeditoptions.ui b/ksquirrel/imageedit/sq_imageeditoptions.ui index 25c7e58..6bf32c2 100644 --- a/ksquirrel/imageedit/sq_imageeditoptions.ui +++ b/ksquirrel/imageedit/sq_imageeditoptions.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ImageEditOptions</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ImageEditOptions</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQButtonGroup" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -39,7 +39,7 @@ <property name="spacing"> <number>2</number> </property> - <widget class="QRadioButton" row="3" column="0"> + <widget class="TQRadioButton" row="3" column="0"> <property name="name"> <cstring>radioPutHere</cstring> </property> @@ -50,7 +50,7 @@ <number>3</number> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioReplace</cstring> </property> @@ -69,7 +69,7 @@ <bool>false</bool> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioCurrentDir</cstring> </property> @@ -80,7 +80,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioCurrentDir_2</cstring> </property> @@ -93,7 +93,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>checkClose</cstring> </property> @@ -111,14 +111,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QPushButton" row="4" column="1"> + <widget class="TQPushButton" row="4" column="1"> <property name="name"> <cstring>pushOK</cstring> </property> @@ -129,7 +129,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="4" column="2"> + <widget class="TQPushButton" row="4" column="2"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -147,7 +147,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>260</width> <height>16</height> @@ -212,14 +212,14 @@ </forwards> <variables> <variable access="private">int index;</variable> - <variable access="private">QString putto, prefix;</variable> + <variable access="private">TQString putto, prefix;</variable> </variables> <functions> <function access="private" specifier="non virtual">init()</function> <function returnType="int">exec( SQ_ImageOptions * o )</function> - <function>setConfigPrefix( const QString & pr )</function> + <function>setConfigPrefix( const TQString & pr )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kurlrequester.h</includehint> <includehint>klineedit.h</includehint> diff --git a/ksquirrel/imageedit/sq_imageeditoptions.ui.h b/ksquirrel/imageedit/sq_imageeditoptions.ui.h index 5d73d15..cb39e41 100644 --- a/ksquirrel/imageedit/sq_imageeditoptions.ui.h +++ b/ksquirrel/imageedit/sq_imageeditoptions.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -17,7 +17,7 @@ int SQ_ImageEditOptions::exec(SQ_ImageOptions *o) { kurl->setURL(o->putto); - QButton *b = buttonGroup1->find(o->where_to_put); + TQButton *b = buttonGroup1->tqfind(o->where_to_put); if(b) b->animateClick(); @@ -29,11 +29,11 @@ int SQ_ImageEditOptions::exec(SQ_ImageOptions *o) checkClose->setChecked(o->close); - int result = QDialog::exec(); + int result = TQDialog::exec(); - if(result == QDialog::Accepted) + if(result == TQDialog::Accepted) { - o->putto = (kurl->isEnabled()) ? kurl->url() : QString::null; + o->putto = (kurl->isEnabled()) ? kurl->url() : TQString(); o->where_to_put = buttonGroup1->selectedId(); o->close = checkClose->isChecked(); @@ -46,7 +46,7 @@ int SQ_ImageEditOptions::exec(SQ_ImageOptions *o) return result; } -void SQ_ImageEditOptions::setConfigPrefix( const QString &pr ) +void SQ_ImageEditOptions::setConfigPrefix( const TQString &pr ) { prefix = pr; } diff --git a/ksquirrel/imageedit/sq_imagefilter.ui b/ksquirrel/imageedit/sq_imagefilter.ui index 57e169d..146796c 100644 --- a/ksquirrel/imageedit/sq_imagefilter.ui +++ b/ksquirrel/imageedit/sq_imagefilter.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ImageFilter</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ImageFilter</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="0" column="1" rowspan="1" colspan="2"> + <widget class="TQWidgetStack" row="0" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>widgetStackFilters</cstring> </property> @@ -37,7 +37,7 @@ <property name="frameShape"> <enum>GroupBoxPanel</enum> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>blendWidget</cstring> </property> @@ -48,7 +48,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -82,7 +82,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>40</height> @@ -99,7 +99,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -120,7 +120,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -145,7 +145,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -166,7 +166,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>45</height> @@ -183,7 +183,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -194,7 +194,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -207,7 +207,7 @@ <property name="text"> <string>There are no special options available for this filter. Just click "Filter".</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -221,7 +221,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>26</height> @@ -230,7 +230,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -251,7 +251,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>30</height> @@ -268,7 +268,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -289,7 +289,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>30</height> @@ -314,7 +314,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -325,7 +325,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -338,7 +338,7 @@ <property name="text"> <string>There are no special options available for this filter. Just click "Filter".</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -352,7 +352,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>14</height> @@ -361,7 +361,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -390,14 +390,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>10</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -423,7 +423,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -452,7 +452,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>10</width> <height>11</height> @@ -467,7 +467,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_4_2</cstring> </property> @@ -483,7 +483,7 @@ <string>Color 1:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_4_3</cstring> </property> @@ -493,7 +493,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -514,7 +514,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>25</height> @@ -531,7 +531,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -552,14 +552,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>14</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_2_2</cstring> </property> @@ -572,13 +572,13 @@ <property name="text"> <string>There are no special options available for this filter. Just click "Filter".</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -589,7 +589,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupNoise</cstring> </property> @@ -609,7 +609,7 @@ <property name="spacing"> <number>2</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton1</cstring> </property> @@ -617,7 +617,7 @@ <string>Uniform</string> </property> </widget> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>radioButton1_4</cstring> </property> @@ -628,7 +628,7 @@ <number>3</number> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioButton1_3</cstring> </property> @@ -636,7 +636,7 @@ <string>Multiplicative Gaussian</string> </property> </widget> - <widget class="QRadioButton" row="2" column="1"> + <widget class="TQRadioButton" row="2" column="1"> <property name="name"> <cstring>radioButton1_6</cstring> </property> @@ -647,7 +647,7 @@ <number>5</number> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton1_2</cstring> </property> @@ -658,7 +658,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton" row="1" column="1"> + <widget class="TQRadioButton" row="1" column="1"> <property name="name"> <cstring>radioButton1_5</cstring> </property> @@ -673,7 +673,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -694,7 +694,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>35</height> @@ -711,7 +711,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -722,7 +722,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>shadeColor</cstring> </property> @@ -740,7 +740,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>10</height> @@ -765,7 +765,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -786,7 +786,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>10</height> @@ -811,7 +811,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -832,7 +832,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>60</height> @@ -849,7 +849,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -870,7 +870,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>35</height> @@ -887,7 +887,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -898,7 +898,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupSwapRGB</cstring> </property> @@ -915,7 +915,7 @@ <property name="spacing"> <number>2</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton7</cstring> </property> @@ -923,7 +923,7 @@ <string>GBR</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton8</cstring> </property> @@ -943,7 +943,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>41</height> @@ -952,7 +952,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -973,7 +973,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>25</height> @@ -990,7 +990,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -1011,7 +1011,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>75</height> @@ -1028,7 +1028,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -1039,7 +1039,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_2_2_2</cstring> </property> @@ -1052,7 +1052,7 @@ <property name="text"> <string>There are no special options available for this filter. Just click "Filter".</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -1066,7 +1066,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>113</height> @@ -1075,7 +1075,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -1104,7 +1104,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>71</height> @@ -1124,16 +1124,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -1149,14 +1149,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>285</width> <height>16</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushFilter</cstring> </property> @@ -1167,7 +1167,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -1194,7 +1194,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QListBox" row="0" column="0" rowspan="4" colspan="1"> + <widget class="TQListBox" row="0" column="0" rowspan="4" colspan="1"> <item> <property name="text"> <string>Blend</string> @@ -1316,7 +1316,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -1333,16 +1333,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="2" column="1" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <grid> <property name="name"> @@ -1360,14 +1360,14 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>160</width> <height>160</height> </size> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -1385,7 +1385,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -1402,7 +1402,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -1421,7 +1421,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>160</width> <height>160</height> @@ -1438,14 +1438,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="3" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="3" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -1506,20 +1506,20 @@ </tabstops> <includes> <include location="local" impldecl="in declaration">sq_imageedit.h</include> - <include location="global" impldecl="in declaration">qimage.h</include> + <include location="global" impldecl="in declaration">tqimage.h</include> <include location="local" impldecl="in implementation">sq_iconloader.h</include> <include location="local" impldecl="in implementation">sq_config.h</include> <include location="local" impldecl="in implementation">fmt_filters.h</include> <include location="local" impldecl="in implementation">sq_imagefilter.ui.h</include> </includes> <variables> - <variable access="private">QImage sample, sample_saved;</variable> + <variable access="private">TQImage sample, sample_saved;</variable> <variable access="private">static SQ_ImageFilter *m_inst;</variable> </variables> -<signals> +<Q_SIGNALS> <signal>filter(SQ_ImageFilterOptions*)</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="private" specifier="non virtual">slotStartFiltering()</slot> <slot access="private" specifier="non virtual">slotShowPage()</slot> <slot access="private" specifier="non virtual">swapRGB()</slot> @@ -1540,11 +1540,11 @@ <slot access="private" specifier="non virtual">emboss()</slot> <slot access="private" specifier="non virtual">sharpen()</slot> <slot access="private" specifier="non virtual">oil()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> - <function specifier="non virtual">setPreviewImage( const QImage & im )</function> - <function access="private" specifier="non virtual">assignNewImage( const QImage & im )</function> + <function specifier="non virtual">setPreviewImage( const TQImage & im )</function> + <function access="private" specifier="non virtual">assignNewImage( const TQImage & im )</function> <function access="private" specifier="non virtual">negative()</function> <function access="private" specifier="non virtual">togray()</function> <function access="private" specifier="non virtual">equalize()</function> @@ -1552,7 +1552,7 @@ <function access="private" specifier="non virtual">hackConnect()</function> <function specifier="static" returnType="SQ_ImageFilter *">instance()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>knuminput.h</includehint> diff --git a/ksquirrel/imageedit/sq_imagefilter.ui.h b/ksquirrel/imageedit/sq_imagefilter.ui.h index d39f35f..c5ffc3d 100644 --- a/ksquirrel/imageedit/sq_imagefilter.ui.h +++ b/ksquirrel/imageedit/sq_imagefilter.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -41,7 +41,7 @@ void SQ_ImageFilter::init() buttonGroupSwapRGB->setButton(SQ_Config::instance()->readNumEntry("filter_swapRGB", 0)); // blend - QColor c; + TQColor c; c.setNamedColor(SQ_Config::instance()->readEntry("filter_blend_color", "#00ff00")); pushBlendColor->setColor(c); blendOpacity->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_blend_opacity", 0.5)); @@ -152,7 +152,7 @@ void SQ_ImageFilter::slotStartFiltering() { case F::fblend: { - QColor c = pushBlendColor->color(); + TQColor c = pushBlendColor->color(); opt.rgb1 = fmt_filters::rgb(c.red(), c.green(), c.blue()); opt._float = blendOpacity->value(); } @@ -165,14 +165,14 @@ void SQ_ImageFilter::slotStartFiltering() case F::fequalize: break; case F::ffade: { - QColor c = fadeColor->color(); + TQColor c = fadeColor->color(); opt.rgb1 = fmt_filters::rgb(c.red(), c.green(), c.blue()); opt._float = (float)fadeValue->value(); } break; case F::fflatten: { - QColor c = flattenColor1->color(); + TQColor c = flattenColor1->color(); opt.rgb1 = fmt_filters::rgb(c.red(), c.green(), c.blue()); c = flattenColor2->color(); opt.rgb2 = fmt_filters::rgb(c.red(), c.green(), c.blue()); @@ -229,14 +229,14 @@ void SQ_ImageFilter::slotShowPage() } } -void SQ_ImageFilter::setPreviewImage(const QImage &im) +void SQ_ImageFilter::setPreviewImage(const TQImage &im) { if(im.isNull()) return; sample = im.copy(); sample_saved = sample.copy(); - QPixmap p; + TQPixmap p; p.convertFromImage(sample_saved); pixmap->setPixmap(p); @@ -245,9 +245,9 @@ void SQ_ImageFilter::setPreviewImage(const QImage &im) slotShowPage(); } -void SQ_ImageFilter::assignNewImage(const QImage &im) +void SQ_ImageFilter::assignNewImage(const TQImage &im) { - QPixmap p; + TQPixmap p; p.convertFromImage(im); pixmap1->setPixmap(p); } @@ -294,7 +294,7 @@ void SQ_ImageFilter::blend() fmt_filters::image im(sample.bits(), sample.width(), sample.height()); - QColor c = pushBlendColor->color(); + TQColor c = pushBlendColor->color(); fmt_filters::rgb rgb(c.red(), c.green(), c.blue()); @@ -312,7 +312,7 @@ void SQ_ImageFilter::fade() fmt_filters::image im(sample.bits(), sample.width(), sample.height()); - QColor c = fadeColor->color(); + TQColor c = fadeColor->color(); fmt_filters::fade(im, fmt_filters::rgb(c.red(), c.green(), c.blue()), fadeValue->value()); @@ -440,8 +440,8 @@ void SQ_ImageFilter::flatten() fmt_filters::image im(sample.bits(), sample.width(), sample.height()); - QColor c1 = flattenColor1->color(); - QColor c2 = flattenColor2->color(); + TQColor c1 = flattenColor1->color(); + TQColor c2 = flattenColor2->color(); fmt_filters::flatten(im, fmt_filters::rgb(c1.red(), c1.green(), c1.blue()), fmt_filters::rgb(c2.red(), c2.green(), c2.blue())); @@ -576,32 +576,32 @@ void SQ_ImageFilter::oil() void SQ_ImageFilter::hackConnect() { - connect( blendOpacity, SIGNAL( valueChanged(double) ), this, SLOT( blend() ) ); - connect( pushBlendColor, SIGNAL( changed(const QColor&) ), this, SLOT( blend() ) ); - connect( blurRadius, SIGNAL( valueChanged(double) ), this, SLOT( blur() ) ); - connect( blurSigma, SIGNAL( valueChanged(double) ), this, SLOT( blur() ) ); - connect( desaturateValue, SIGNAL( valueChanged(double) ), this, SLOT( desaturate() ) ); - connect( edgeRadius, SIGNAL( valueChanged(int) ), this, SLOT( edge() ) ); - connect( embossRadius, SIGNAL( valueChanged(double) ), this, SLOT( emboss() ) ); - connect( embossSigma, SIGNAL( valueChanged(double) ), this, SLOT( emboss() ) ); - connect( fadeColor, SIGNAL( changed(const QColor&) ), this, SLOT( fade() ) ); - connect( fadeValue, SIGNAL( valueChanged(double) ), this, SLOT( fade() ) ); - connect( flattenColor1, SIGNAL( changed(const QColor&) ), this, SLOT( flatten() ) ); - connect( flattenColor2, SIGNAL( changed(const QColor&) ), this, SLOT( flatten() ) ); - connect( implodeFactor, SIGNAL( valueChanged(double) ), this, SLOT( implode() ) ); - connect( buttonGroupNoise, SIGNAL( clicked(int) ), this, SLOT( noise() ) ); - connect( oilRadius, SIGNAL( valueChanged(int) ), this, SLOT( oil() ) ); - connect( shadeAzim, SIGNAL( valueChanged(double) ), this, SLOT( shade() ) ); - connect( shadeColor, SIGNAL( toggled(bool) ), this, SLOT( shade() ) ); - connect( shadeElev, SIGNAL( valueChanged(double) ), this, SLOT( shade() ) ); - connect( sharpenRadius, SIGNAL( valueChanged(double) ), this, SLOT( sharpen() ) ); - connect( sharpenSigma, SIGNAL( valueChanged(double) ), this, SLOT( sharpen() ) ); - connect( solarizeValue, SIGNAL( valueChanged(double) ), this, SLOT( solarize() ) ); - connect( spreadValue, SIGNAL( valueChanged(int) ), this, SLOT( spread() ) ); - connect( buttonGroupSwapRGB, SIGNAL( clicked(int) ), this, SLOT( swapRGB() ) ); - connect( swirlAngle, SIGNAL( valueChanged(double) ), this, SLOT( swirl() ) ); - connect( thresholdValue, SIGNAL( valueChanged(int) ), this, SLOT( threshold() ) ); - connect( thresholdRE, SIGNAL( valueChanged(int) ), this, SLOT( redeye() ) ); + connect( blendOpacity, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( blend() ) ); + connect( pushBlendColor, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( blend() ) ); + connect( blurRadius, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( blur() ) ); + connect( blurSigma, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( blur() ) ); + connect( desaturateValue, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( desaturate() ) ); + connect( edgeRadius, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( edge() ) ); + connect( embossRadius, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( emboss() ) ); + connect( embossSigma, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( emboss() ) ); + connect( fadeColor, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( fade() ) ); + connect( fadeValue, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( fade() ) ); + connect( flattenColor1, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( flatten() ) ); + connect( flattenColor2, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( flatten() ) ); + connect( implodeFactor, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( implode() ) ); + connect( buttonGroupNoise, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( noise() ) ); + connect( oilRadius, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( oil() ) ); + connect( shadeAzim, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( shade() ) ); + connect( shadeColor, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( shade() ) ); + connect( shadeElev, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( shade() ) ); + connect( sharpenRadius, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( sharpen() ) ); + connect( sharpenSigma, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( sharpen() ) ); + connect( solarizeValue, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( solarize() ) ); + connect( spreadValue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( spread() ) ); + connect( buttonGroupSwapRGB, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( swapRGB() ) ); + connect( swirlAngle, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( swirl() ) ); + connect( thresholdValue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( threshold() ) ); + connect( thresholdRE, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( redeye() ) ); } SQ_ImageFilter* SQ_ImageFilter::instance() diff --git a/ksquirrel/imageedit/sq_label.cpp b/ksquirrel/imageedit/sq_label.cpp index 4d9b14a..70ecff8 100644 --- a/ksquirrel/imageedit/sq_label.cpp +++ b/ksquirrel/imageedit/sq_label.cpp @@ -15,26 +15,26 @@ * * ***************************************************************************/ -#include <qpainter.h> +#include <tqpainter.h> #include "sq_label.h" #define MARGIN 15 -SQ_Label::SQ_Label(QWidget *parent, const char *name) : QWidget(parent, name), single(false) +SQ_Label::SQ_Label(TQWidget *tqparent, const char *name) : TQWidget(tqparent, name), single(false) {} SQ_Label::~SQ_Label() {} -void SQ_Label::paintEvent(QPaintEvent *) +void SQ_Label::paintEvent(TQPaintEvent *) { if((single && ltext.isEmpty() && rtext.isEmpty()) || (!single && ltext.isEmpty())) return; - QPainter paint(this); + TQPainter paint(this); - QFont font = paint.font(); + TQFont font = paint.font(); font.setBold(true); font.setPointSize(10); paint.setFont(font); @@ -57,7 +57,7 @@ void SQ_Label::paintEvent(QPaintEvent *) } } -void SQ_Label::setText(const QString <, const QString &rt) +void SQ_Label::setText(const TQString <, const TQString &rt) { ltext = lt; rtext = rt; @@ -65,7 +65,7 @@ void SQ_Label::setText(const QString <, const QString &rt) update(); } -void SQ_Label::setText(const QString <) +void SQ_Label::setText(const TQString <) { ltext = lt; diff --git a/ksquirrel/imageedit/sq_label.h b/ksquirrel/imageedit/sq_label.h index 7b54753..a1fed65 100644 --- a/ksquirrel/imageedit/sq_label.h +++ b/ksquirrel/imageedit/sq_label.h @@ -18,23 +18,23 @@ #ifndef SQ_LABEL_H #define SQ_LABEL_H -#include <qwidget.h> +#include <tqwidget.h> -class SQ_Label : public QWidget +class SQ_Label : public TQWidget { public: - SQ_Label(QWidget *parent = 0, const char *name = 0); + SQ_Label(TQWidget *tqparent = 0, const char *name = 0); ~SQ_Label(); - void setText(const QString <, const QString &rt); - void setText(const QString <); + void setText(const TQString <, const TQString &rt); + void setText(const TQString <); void setSingle(bool s); protected: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); private: - QString ltext, rtext; + TQString ltext, rtext; bool single; }; diff --git a/ksquirrel/imageedit/sq_writeoption.ui b/ksquirrel/imageedit/sq_writeoption.ui index 38c8131..bdd71fa 100644 --- a/ksquirrel/imageedit/sq_writeoption.ui +++ b/ksquirrel/imageedit/sq_writeoption.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_WriteOption</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>SQ_WriteOption</cstring> </property> @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>250</width> <height>0</height> @@ -33,11 +33,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="0" column="0"> + <widget class="TQWidgetStack" row="0" column="0"> <property name="name"> <cstring>widgetStack</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -54,7 +54,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -75,14 +75,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>10</height> </size> </property> </spacer> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>checkRLE</cstring> </property> @@ -98,7 +98,7 @@ <string>Compression level</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkInterlaced</cstring> </property> @@ -110,7 +110,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -127,7 +127,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -138,14 +138,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string><i>No special options available for this format</i></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop|AlignHCenter</set> </property> <property name="indent"> @@ -161,7 +161,7 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/ksquirrel/ksquirrel-libs-configurator/klc.cpp b/ksquirrel/ksquirrel-libs-configurator/klc.cpp index 79fa63b..f510128 100644 --- a/ksquirrel/ksquirrel-libs-configurator/klc.cpp +++ b/ksquirrel/ksquirrel-libs-configurator/klc.cpp @@ -11,75 +11,75 @@ #include "klc.h" -#include <qvariant.h> +#include <tqvariant.h> #include <kdirlister.h> #include <kio/job.h> -#include <qheader.h> -#include <qtimer.h> +#include <tqheader.h> +#include <tqtimer.h> #include <kio/netaccess.h> #include <kapplication.h> #include <dcopclient.h> -#include <qpushbutton.h> -#include <qlistview.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqpushbutton.h> +#include <tqlistview.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include "./klc.ui.h" /* - * Constructs a KLC as a child of 'parent', with the + * Constructs a KLC as a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. */ -KLC::KLC( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +KLC::KLC( TQWidget* tqparent, const char* name, WFlags fl ) + : TQWidget( tqparent, name, fl ) { if ( !name ) setName( "KLC" ); - KLCLayout = new QGridLayout( this, 1, 1, 11, 6, "KLCLayout"); + KLCLayout = new TQGridLayout( this, 1, 1, 11, 6, "KLCLayout"); - layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); - spacer1 = new QSpacerItem( 371, 26, QSizePolicy::Expanding, QSizePolicy::Minimum ); - layout1->addItem( spacer1 ); + tqlayout1 = new TQHBoxLayout( 0, 0, 6, "tqlayout1"); + spacer1 = new TQSpacerItem( 371, 26, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); + tqlayout1->addItem( spacer1 ); - pushApply = new QPushButton( this, "pushApply" ); - layout1->addWidget( pushApply ); + pushApply = new TQPushButton( this, "pushApply" ); + tqlayout1->addWidget( pushApply ); - pushClose = new QPushButton( this, "pushClose" ); - layout1->addWidget( pushClose ); + pushClose = new TQPushButton( this, "pushClose" ); + tqlayout1->addWidget( pushClose ); - KLCLayout->addMultiCellLayout( layout1, 2, 2, 0, 1 ); + KLCLayout->addMultiCellLayout( tqlayout1, 2, 2, 0, 1 ); - listDisabled = new QListView( this, "listDisabled" ); + listDisabled = new TQListView( this, "listDisabled" ); listDisabled->addColumn( tr2i18n( "..." ) ); listDisabled->setEnabled( FALSE ); listDisabled->setAllColumnsShowFocus( TRUE ); - listDisabled->setResizeMode( QListView::AllColumns ); + listDisabled->setResizeMode( TQListView::AllColumns ); KLCLayout->addWidget( listDisabled, 1, 1 ); - textLabel1_2 = new QLabel( this, "textLabel1_2" ); + textLabel1_2 = new TQLabel( this, "textLabel1_2" ); KLCLayout->addWidget( textLabel1_2, 0, 1 ); - textLabel1 = new QLabel( this, "textLabel1" ); + textLabel1 = new TQLabel( this, "textLabel1" ); KLCLayout->addWidget( textLabel1, 0, 0 ); - listEnabled = new QListView( this, "listEnabled" ); + listEnabled = new TQListView( this, "listEnabled" ); listEnabled->addColumn( tr2i18n( "..." ) ); listEnabled->setEnabled( FALSE ); listEnabled->setAllColumnsShowFocus( TRUE ); - listEnabled->setResizeMode( QListView::AllColumns ); + listEnabled->setResizeMode( TQListView::AllColumns ); KLCLayout->addWidget( listEnabled, 1, 0 ); languageChange(); - resize( QSize(586, 425).expandedTo(minimumSizeHint()) ); + resize( TQSize(586, 425).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections - connect( pushApply, SIGNAL( clicked() ), this, SLOT( slotApply() ) ); - connect( pushClose, SIGNAL( clicked() ), this, SLOT( close() ) ); + connect( pushApply, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotApply() ) ); + connect( pushClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( close() ) ); // tab order setTabOrder( listEnabled, listDisabled ); @@ -94,7 +94,7 @@ KLC::KLC( QWidget* parent, const char* name, WFlags fl ) KLC::~KLC() { destroy(); - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /* diff --git a/ksquirrel/ksquirrel-libs-configurator/klc.ui b/ksquirrel/ksquirrel-libs-configurator/klc.ui index 1182396..34c0a55 100644 --- a/ksquirrel/ksquirrel-libs-configurator/klc.ui +++ b/ksquirrel/ksquirrel-libs-configurator/klc.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KLC</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KLC</cstring> </property> @@ -19,9 +19,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -37,14 +37,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>371</width> <height>26</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushApply</cstring> </property> @@ -52,7 +52,7 @@ <string>Apply</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushClose</cstring> </property> @@ -62,7 +62,7 @@ </widget> </hbox> </widget> - <widget class="QListView" row="1" column="1"> + <widget class="TQListView" row="1" column="1"> <column> <property name="text"> <string>...</string> @@ -87,7 +87,7 @@ <enum>AllColumns</enum> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -95,7 +95,7 @@ <string><b>Select codecs to enable:</b></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -103,7 +103,7 @@ <string><b>Select codecs to disable:</b></string> </property> </widget> - <widget class="QListView" row="1" column="0"> + <widget class="TQListView" row="1" column="0"> <column> <property name="text"> <string>...</string> @@ -155,8 +155,8 @@ <include location="global" impldecl="in declaration">kurl.h</include> <include location="global" impldecl="in implementation">kdirlister.h</include> <include location="global" impldecl="in implementation">kio/job.h</include> - <include location="global" impldecl="in implementation">qheader.h</include> - <include location="global" impldecl="in implementation">qtimer.h</include> + <include location="global" impldecl="in implementation">tqheader.h</include> + <include location="global" impldecl="in implementation">tqtimer.h</include> <include location="global" impldecl="in implementation">kio/netaccess.h</include> <include location="global" impldecl="in implementation">kapplication.h</include> <include location="global" impldecl="in implementation">dcopclient.h</include> @@ -172,19 +172,19 @@ <variable access="private">QString backupDir;</variable> <variable access="private">bool changed;</variable> </variables> -<slots> +<Q_SLOTS> <slot access="private">slotLoad()</slot> <slot access="private">slotApply()</slot> <slot access="private">slotCompleted( const KURL & u )</slot> <slot access="private">slotNewItems( const KFileItemList & list )</slot> <slot access="private">slotDeleteItem( KFileItem * fi )</slot> <slot access="private">slotDelResult( KIO::Job * job )</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> <function access="private" specifier="non virtual">destroy()</function> <function access="private" specifier="non virtual">moveCodecs( bool e2d )</function> - <function access="protected">closeEvent( QCloseEvent * ev )</function> + <function access="protected">closeEvent( TQCloseEvent * ev )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/ksquirrel-libs-configurator/klc.ui.h b/ksquirrel/ksquirrel-libs-configurator/klc.ui.h index 46b1bb3..68df556 100644 --- a/ksquirrel/ksquirrel-libs-configurator/klc.ui.h +++ b/ksquirrel/ksquirrel-libs-configurator/klc.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). @@ -21,9 +21,9 @@ void KLC::init() listDisabled->header()->hide(); lister = new KDirLister; - connect(lister, SIGNAL(completed(const KURL &)), this, SLOT(slotCompleted(const KURL &))); - connect(lister, SIGNAL(deleteItem(KFileItem *)), this, SLOT(slotDeleteItem(KFileItem *))); - connect(lister, SIGNAL(newItems(const KFileItemList &)), this, SLOT(slotNewItems(const KFileItemList &))); + connect(lister, TQT_SIGNAL(completed(const KURL &)), this, TQT_SLOT(slotCompleted(const KURL &))); + connect(lister, TQT_SIGNAL(deleteItem(KFileItem *)), this, TQT_SLOT(slotDeleteItem(KFileItem *))); + connect(lister, TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(slotNewItems(const KFileItemList &))); base = KURL::fromPathOrURL(SQ_KLIBS); @@ -34,7 +34,7 @@ void KLC::init() KIO::NetAccess::mkdir(backup, this); - QTimer::singleShot(0, this, SLOT(slotLoad())); + TQTimer::singleShot(0, this, TQT_SLOT(slotLoad())); } void KLC::slotLoad() @@ -61,10 +61,10 @@ void KLC::moveCodecs(bool e2d) KURL::List list; KURL codec; - QListViewItemIterator it(e2d ? listEnabled : listDisabled); - QCheckListItem *li; + TQListViewItemIterator it(e2d ? listEnabled : listDisabled); + TQCheckListItem *li; - while((li = static_cast<QCheckListItem *>(it.current()))) + while((li = static_cast<TQCheckListItem *>(it.current()))) { if(li->isOn()) { @@ -78,7 +78,7 @@ void KLC::moveCodecs(bool e2d) KIO::Job *job = KIO::move(list, e2d ? backup : base); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotDelResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotDelResult(KIO::Job *))); } void KLC::slotCompleted(const KURL &u) @@ -99,12 +99,12 @@ void KLC::slotNewItems(const KFileItemList &list) { KFileItemListIterator it(list); KFileItem *fi; - QString soname = QString::fromLatin1(".so.%1").arg(SQ_KL_VER); + TQString soname = TQString::tqfromLatin1(".so.%1").tqarg(SQ_KL_VER); while((fi = it.current())) { if(fi->isFile() && fi->name().endsWith(soname)) - new QCheckListItem(fi->url().directory().startsWith(backupDir) ? listDisabled:listEnabled, fi->name(), QCheckListItem::CheckBox); + new TQCheckListItem(fi->url().directory().startsWith(backupDir) ? listDisabled:listEnabled, fi->name(), TQCheckListItem::CheckBox); ++it; } @@ -112,13 +112,13 @@ void KLC::slotNewItems(const KFileItemList &list) void KLC::slotDeleteItem(KFileItem *fi) { - QListView *l = fi->url().directory().startsWith(backupDir) ? listDisabled:listEnabled; + TQListView *l = fi->url().directory().startsWith(backupDir) ? listDisabled:listEnabled; - QListViewItemIterator it(l); - QCheckListItem *li; - QListViewItem *li2; + TQListViewItemIterator it(l); + TQCheckListItem *li; + TQListViewItem *li2; - while((li = static_cast<QCheckListItem *>(it.current()))) + while((li = static_cast<TQCheckListItem *>(it.current()))) { if(li->text() == fi->name()) { @@ -145,9 +145,9 @@ void KLC::slotDelResult(KIO::Job *job) job->showErrorDialog(this); } -void KLC::closeEvent(QCloseEvent *ev) +void KLC::closeEvent(TQCloseEvent *ev) { - QString data; + TQString data; if(changed) kapp->dcopClient()->send("ksquirrel", "ksquirrel", "reload_codecs()", data); diff --git a/ksquirrel/ksquirrel-libs-configurator/main.cpp b/ksquirrel/ksquirrel-libs-configurator/main.cpp index 241ec3b..67c5cdd 100644 --- a/ksquirrel/ksquirrel-libs-configurator/main.cpp +++ b/ksquirrel/ksquirrel-libs-configurator/main.cpp @@ -30,7 +30,7 @@ static KCmdLineOptions options[] = int main(int argc, char *argv[]) { - const QCString App = "ksquirrel-libs-configurator"; + const TQCString App = "ksquirrel-libs-configurator"; KAboutData aboutData( "ksquirrel-libs-configurator", @@ -39,7 +39,7 @@ int main(int argc, char *argv[]) I18N_NOOP("ksquirrel-libs-configurator"), KAboutData::License_GPL, "(c) 2007 Baryshev Dmitry", - QString::null, + TQString(), "http://ksquirrel.sourceforge.net", diff --git a/ksquirrel/ksquirrel.cpp b/ksquirrel/ksquirrel.cpp index 216c02b..4076452 100644 --- a/ksquirrel/ksquirrel.cpp +++ b/ksquirrel/ksquirrel.cpp @@ -19,22 +19,22 @@ #include "config.h" #endif -#include <qapplication.h> -#include <qeventloop.h> -#include <qpixmap.h> -#include <qcolor.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qvaluevector.h> -#include <qvaluelist.h> -#include <qcursor.h> -#include <qpainter.h> -#include <qfile.h> -#include <qtoolbutton.h> -#include <qfileinfo.h> -#include <qtimer.h> -#include <qstylesheet.h> -#include <qwidgetstack.h> +#include <tqapplication.h> +#include <tqeventloop.h> +#include <tqpixmap.h> +#include <tqcolor.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqvaluevector.h> +#include <tqvaluelist.h> +#include <tqcursor.h> +#include <tqpainter.h> +#include <tqfile.h> +#include <tqtoolbutton.h> +#include <tqfileinfo.h> +#include <tqtimer.h> +#include <tqstylesheet.h> +#include <tqwidgetstack.h> #include <kapplication.h> #include <khelpmenu.h> @@ -124,8 +124,8 @@ static const int menuParam = 100000; KSquirrel * KSquirrel::m_instance = 0; -KSquirrel::KSquirrel(QWidget *parent, const char *name) - : KMainWindow (parent, name), DCOPObject(name) +KSquirrel::KSquirrel(TQWidget *tqparent, const char *name) + : KMainWindow (tqparent, name), DCOPObject(name) { // singleton setup m_instance = this; @@ -142,13 +142,13 @@ KSquirrel::KSquirrel(QWidget *parent, const char *name) // create KConfig instance. // It will help us to read and write config entries - kconf = new SQ_Config(this); + kconf = new SQ_Config(TQT_TQOBJECT(this)); old_id = 0; kconf->setGroup("Thumbnails"); - thumbSize = new SQ_ThumbnailSize(this, static_cast<SQ_ThumbnailSize::Size>(kconf->readNumEntry("size", + thumbSize = new SQ_ThumbnailSize(TQT_TQOBJECT(this), static_cast<SQ_ThumbnailSize::Size>(kconf->readNumEntry("size", SQ_ThumbnailSize::Large))); thumbSize->setExtended(kconf->readBoolEntry("extended", false)); @@ -178,13 +178,13 @@ KSquirrel::~KSquirrel() */ void KSquirrel::handlePositionSize() { - QPoint p_def(0,0); - QSize sz_def(800, 600); + TQPoint p_def(0,0); + TQSize sz_def(800, 600); kconf->setGroup("Interface"); - QPoint p = SQ_Config::instance()->readPointEntry("pos", &p_def); - QSize sz = SQ_Config::instance()->readSizeEntry("size", &sz_def); + TQPoint p = SQ_Config::instance()->readPointEntry("pos", &p_def); + TQSize sz = SQ_Config::instance()->readSizeEntry("size", &sz_def); resize(sz); move(p); @@ -208,7 +208,7 @@ void KSquirrel::slotOptions() old_marks = kconf->readBoolEntry("marks", true); // if user clicked "OK", apply new settings - if(optd.start() == QDialog::Accepted) + if(optd.start() == TQDialog::Accepted) { applyDefaultSettings(); @@ -225,9 +225,9 @@ void KSquirrel::slotOptions() } } -bool KSquirrel::eventFilter(QObject *o, QEvent *e) +bool KSquirrel::eventFilter(TQObject *o, TQEvent *e) { - if(o == mainPage && e->type() == QEvent::Show) + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(mainPage) && e->type() == TQEvent::Show) { // delayed init, hehe... if(waitForShow) @@ -248,7 +248,7 @@ bool KSquirrel::eventFilter(QObject *o, QEvent *e) if(SQ_HLOptions::instance()->have_mountview) { sideBar->addWidget(new SQ_MountView, i18n("Mount points"), "blockdevice"); - connect(SQ_MountView::instance(), SIGNAL(path(const QString &)), pWidgetStack, SLOT(setURLForCurrent(const QString &))); + connect(SQ_MountView::instance(), TQT_SIGNAL(path(const TQString &)), pWidgetStack, TQT_SLOT(setURLForCurrent(const TQString &))); } if(SQ_HLOptions::instance()->have_categories) @@ -265,7 +265,7 @@ bool KSquirrel::eventFilter(QObject *o, QEvent *e) // restore opened page in sidebar int pg = kconf->readNumEntry("last page", -1); - QPushButton *b = sideBar->multiBar()->tab(pg); + TQPushButton *b = sideBar->multiBar()->tab(pg); if(pg >= 0 && !b) { @@ -287,7 +287,7 @@ bool KSquirrel::eventFilter(QObject *o, QEvent *e) /* * Catches close events. */ -void KSquirrel::closeEvent(QCloseEvent *ev) +void KSquirrel::closeEvent(TQCloseEvent *ev) { kconf->setGroup("Main"); @@ -351,13 +351,13 @@ void KSquirrel::createLocationToolbar(KToolBar *pTLocation) // some additional setup pTLocation->setFullSize(); - pTLocation->insertButton("button_cancel", 0, SIGNAL(clicked()), pCurrentURL, SLOT(clearHistory()), true, i18n("Clear history")); - pTLocation->insertButton("locationbar_erase", 1, SIGNAL(clicked()), pCurrentURL, SLOT(clearEdit()), true, i18n("Clear address")); - pTLocation->insertWidget(2, 10, new QLabel("URL:", pTLocation, "kde toolbar widget")); + pTLocation->insertButton("button_cancel", 0, TQT_SIGNAL(clicked()), TQT_TQOBJECT(pCurrentURL), TQT_SLOT(clearHistory()), true, i18n("Clear history")); + pTLocation->insertButton("locationbar_erase", 1, TQT_SIGNAL(clicked()), TQT_TQOBJECT(pCurrentURL), TQT_SLOT(clearEdit()), true, i18n("Clear address")); + pTLocation->insertWidget(2, 10, new TQLabel("URL:", pTLocation, "kde toolbar widget")); pTLocation->setItemAutoSized(2); pTLocation->insertWidget(3, 10, pCurrentURL); pTLocation->setItemAutoSized(3); - pTLocation->insertButton("goto", 4, SIGNAL(clicked()), this, SLOT(slotGo()), true, i18n("Go!")); + pTLocation->insertButton("goto", 4, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotGo()), true, i18n("Go!")); kconf->setGroup("History"); @@ -373,19 +373,19 @@ void KSquirrel::createLocationToolbar(KToolBar *pTLocation) // Create menu with filters void KSquirrel::initFilterMenu() { - QString ext, tmp; + TQString ext, tmp; unsigned int i = menuParam; - QString last; + TQString last; kconf->setGroup("Filters"); - // create QStringLists with names and extensions + // create TQStringLists with names and extensions // of custom filters if(!sqFiltersName) { - sqFiltersName = new QStringList(kconf->readListEntry("items")); - sqFiltersExt = new QStringList(kconf->readListEntry("extensions")); + sqFiltersName = new TQStringList(kconf->readListEntry("items")); + sqFiltersExt = new TQStringList(kconf->readListEntry("extensions")); // last used filter last = kconf->readEntry("last", "*"); @@ -393,13 +393,13 @@ void KSquirrel::initFilterMenu() // allow user to check/uncheck menuitems actionFilterMenu->setCheckable(true); } - else // if QStringLists already exist + else // if TQStringLists already exist last = pWidgetStack->nameFilter(); actionFilterMenu->clear(); int id, Id = old_id; bool both = kconf->readBoolEntry("menuitem both", true); - QStringList quickInfo; + TQStringList quickInfo; // Get extensions and names of libraries' filters libhandler->allFilters(libFilters, quickInfo); @@ -407,7 +407,7 @@ void KSquirrel::initFilterMenu() actionFilterMenu->insertTitle(i18n("Libraries' filters")); // insert libraries' filters to menu - for(QValueList<QString>::iterator it = libFilters.begin(), it1 = quickInfo.begin(); + for(TQValueList<TQString>::iterator it = libFilters.begin(), it1 = quickInfo.begin(); it != libFilters.end();++it, ++it1) { // show both name and extension ? @@ -423,7 +423,7 @@ void KSquirrel::initFilterMenu() } // all filters' extension in one string - QString allF = libhandler->allFiltersString(); + TQString allF = libhandler->allFiltersString(); libFilters.append(allF); @@ -433,9 +433,9 @@ void KSquirrel::initFilterMenu() if(last == allF && !last.isEmpty()) Id = id; - QValueList<QString>::iterator nEND = sqFiltersName->end(); - QValueList<QString>::iterator it_name = sqFiltersName->begin(); - QValueList<QString>::iterator it_ext = sqFiltersExt->begin(); + TQValueList<TQString>::iterator nEND = sqFiltersName->end(); + TQValueList<TQString>::iterator it_name = sqFiltersName->begin(); + TQValueList<TQString>::iterator it_ext = sqFiltersExt->begin(); actionFilterMenu->insertTitle(i18n("User's filters")); i = 0; @@ -455,8 +455,8 @@ void KSquirrel::initFilterMenu() actionFilterMenu->setItemParameter(id, i++); } - disconnect(actionFilterMenu, SIGNAL(activated(int)), 0, 0); - connect(actionFilterMenu, SIGNAL(activated(int)), this, SLOT(slotSetFilter(int))); + disconnect(actionFilterMenu, TQT_SIGNAL(activated(int)), 0, 0); + connect(actionFilterMenu, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetFilter(int))); // finally, set current filter setFilter(last, Id); @@ -470,7 +470,7 @@ void KSquirrel::slotGo() // Set filter for a filemanager and check appropriate // menuitem (by 'id') -void KSquirrel::setFilter(const QString &f, const int id) +void KSquirrel::setFilter(const TQString &f, const int id) { if(pWidgetStack->nameFilter() != f) pWidgetStack->setNameFilter(f); @@ -489,7 +489,7 @@ void KSquirrel::slotSetFilter(int id) // new item's index int index = actionFilterMenu->itemParameter(id); - QString filt; + TQString filt; // Is it libraries' filter or custom ? if(index >= menuParam) @@ -513,8 +513,8 @@ void KSquirrel::createWidgets(int createFirst) // check if location toolbar should be separated m_urlbox = kconf->readBoolEntry("has_url", false); - // main QVBox - mainPage = new QVBox(this, QString::fromLatin1("SQ_BROWSER_VBOX")); + // main TQVBox + mainPage = new TQVBox(this, TQString::tqfromLatin1("SQ_BROWSER_VBOX")); mainPage->resize(size()); SQ_SplashScreen::advance(); @@ -526,18 +526,18 @@ void KSquirrel::createWidgets(int createFirst) tools = new KToolBar(mainPage); // location toolbar - pTLocation = new KToolBar(mainPage, QString::fromLatin1("Location toolbar")); - pTLocation->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum); + pTLocation = new KToolBar(mainPage, TQString::tqfromLatin1("Location toolbar")); + pTLocation->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum); // main splitter - mainView = new QSplitter(QSplitter::Horizontal, mainPage); Q_ASSERT(mainView); + mainView = new TQSplitter(Qt::Horizontal, mainPage); Q_ASSERT(mainView); KStatusBar *s = new KStatusBar(mainPage); createLocationToolbar(pTLocation); createStatusBar(s); - new SQ_NavigatorDropMenu(this); + new SQ_NavigatorDropMenu(TQT_TQOBJECT(this)); sideBar = new SQ_MultiBar(mainView); @@ -547,7 +547,7 @@ void KSquirrel::createWidgets(int createFirst) pWidgetStack = new SQ_WidgetStack(mainView, createFirst); kconf->setGroup("Interface"); - QValueList<int> sz = SQ_Config::instance()->readIntListEntry("splitter"); + TQValueList<int> sz = SQ_Config::instance()->readIntListEntry("splitter"); if(sz.count() != 2) { @@ -567,15 +567,15 @@ void KSquirrel::createWidgets(int createFirst) sideBar->addWidget(ptree, i18n("Folder tree"), "view_tree"); sideBar->updateLayout(); - connect(ptree, SIGNAL(urlAdded(const KURL &)), pWidgetStack->diroperator(), SLOT(urlAdded(const KURL &))); - connect(ptree, SIGNAL(urlRemoved(const KURL &)), pWidgetStack->diroperator(), SLOT(urlRemoved(const KURL &))); - connect(pWidgetStack->diroperator(), SIGNAL(urlEntered(const KURL &)), ptree, SLOT(slotClearChecked())); - connect(pWidgetStack, SIGNAL(newLastURL(const QString &)), pWidgetStack->action("dirop_repeat"), SLOT(setText(const QString &))); - connect(SQ_PreviewWidget::instance(), SIGNAL(first()), pWidgetStack, SLOT(slotSelectFirstFile())); - connect(SQ_PreviewWidget::instance(), SIGNAL(last()), pWidgetStack, SLOT(slotSelectLastFile())); - connect(SQ_PreviewWidget::instance(), SIGNAL(next()), this, SLOT(slotPreviewWidgetNext())); - connect(SQ_PreviewWidget::instance(), SIGNAL(previous()), this, SLOT(slotPreviewWidgetPrevious())); - connect(SQ_PreviewWidget::instance(), SIGNAL(execute()), this, SLOT(slotPreviewWidgetExecute())); + connect(ptree, TQT_SIGNAL(urlAdded(const KURL &)), pWidgetStack->diroperator(), TQT_SLOT(urlAdded(const KURL &))); + connect(ptree, TQT_SIGNAL(urlRemoved(const KURL &)), pWidgetStack->diroperator(), TQT_SLOT(urlRemoved(const KURL &))); + connect(pWidgetStack->diroperator(), TQT_SIGNAL(urlEntered(const KURL &)), ptree, TQT_SLOT(slotClearChecked())); + connect(pWidgetStack, TQT_SIGNAL(newLastURL(const TQString &)), pWidgetStack->action("dirop_repeat"), TQT_SLOT(setText(const TQString &))); + connect(SQ_PreviewWidget::instance(), TQT_SIGNAL(first()), pWidgetStack, TQT_SLOT(slotSelectFirstFile())); + connect(SQ_PreviewWidget::instance(), TQT_SIGNAL(last()), pWidgetStack, TQT_SLOT(slotSelectLastFile())); + connect(SQ_PreviewWidget::instance(), TQT_SIGNAL(next()), TQT_TQOBJECT(this), TQT_SLOT(slotPreviewWidgetNext())); + connect(SQ_PreviewWidget::instance(), TQT_SIGNAL(previous()), TQT_TQOBJECT(this), TQT_SLOT(slotPreviewWidgetPrevious())); + connect(SQ_PreviewWidget::instance(), TQT_SIGNAL(execute()), TQT_TQOBJECT(this), TQT_SLOT(slotPreviewWidgetExecute())); pWidgetStack->init(); @@ -584,8 +584,8 @@ void KSquirrel::createWidgets(int createFirst) mainPage->setStretchFactor(mainView, 1); // connect signals from location toolbar - connect(pCurrentURL, SIGNAL(returnPressed(const QString&)), pWidgetStack, SLOT(setURLForCurrent(const QString&))); - connect(pCurrentURL, SIGNAL(activated(const QString&)), pWidgetStack, SLOT(setURLForCurrent(const QString&))); + connect(pCurrentURL, TQT_SIGNAL(returnPressed(const TQString&)), pWidgetStack, TQT_SLOT(setURLForCurrent(const TQString&))); + connect(pCurrentURL, TQT_SIGNAL(activated(const TQString&)), pWidgetStack, TQT_SLOT(setURLForCurrent(const TQString&))); gl_view = new SQ_GLView; @@ -611,11 +611,11 @@ void KSquirrel::createWidgets(int createFirst) } // connect signals from widgets - connect(pAURL, SIGNAL(toggled(bool)), pTLocation, SLOT(setShown(bool))); - connect(pASelectGroup, SIGNAL(activated()), pWidgetStack, SLOT(slotSelectGroup())); - connect(pADeselectGroup, SIGNAL(activated()), pWidgetStack, SLOT(slotDeselectGroup())); - connect(pASelectAll, SIGNAL(activated()), pWidgetStack, SLOT(slotSelectAll())); - connect(pADeselectAll, SIGNAL(activated()), pWidgetStack, SLOT(slotDeselectAll())); + connect(pAURL, TQT_SIGNAL(toggled(bool)), pTLocation, TQT_SLOT(setShown(bool))); + connect(pASelectGroup, TQT_SIGNAL(activated()), pWidgetStack, TQT_SLOT(slotSelectGroup())); + connect(pADeselectGroup, TQT_SIGNAL(activated()), pWidgetStack, TQT_SLOT(slotDeselectGroup())); + connect(pASelectAll, TQT_SIGNAL(activated()), pWidgetStack, TQT_SLOT(slotSelectAll())); + connect(pADeselectAll, TQT_SIGNAL(activated()), pWidgetStack, TQT_SLOT(slotDeselectAll())); SQ_SplashScreen::advance(); @@ -624,29 +624,29 @@ void KSquirrel::createWidgets(int createFirst) #endif } -// Create statusbar and all needed QLabels +// Create statusbar and all needed TQLabels void KSquirrel::createStatusBar(KStatusBar *bar) { sbar = bar; - sbar->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + sbar->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); sbar->setSizeGripEnabled(true); sbar->show(); // directory information (for example "3 dirs, 12 files") - dirInfo = new QLabel(QString::null, sbar, "dirInfo"); + dirInfo = new TQLabel(TQString(), sbar, "dirInfo"); - QHBox *vb = new QHBox(sbar); + TQHBox *vb = new TQHBox(sbar); // mime icon of current file - fileIcon = new QLabel(QString::null, vb, "fileIcon"); + fileIcon = new TQLabel(TQString(), vb, "fileIcon"); fileIcon->setScaledContents(false); // name of current file - fileName = new KSqueezedTextLabel(QString::fromLatin1("----"), vb, "fileName"); - fileName->setTextFormat(Qt::RichText); - fileName->setAlignment(Qt::AlignAuto | Qt::AlignVCenter | Qt::ExpandTabs); + fileName = new KSqueezedTextLabel(TQString::tqfromLatin1("----"), vb, "fileName"); + fileName->setTextFormat(TQt::RichText); + fileName->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter | TQt::ExpandTabs); - diskSpace = new QLabel(QString::null, sbar, "diskSpace"); + diskSpace = new TQLabel(TQString(), sbar, "diskSpace"); // insert pointers to map, now it is possible // to call KSquirrel::sbarWidget(name) @@ -655,15 +655,15 @@ void KSquirrel::createStatusBar(KStatusBar *bar) sbarwidgets["fileName"] = fileName; sbarwidgets["diskSpace"] = diskSpace; - // finally, add QLabels to statusbar + // finally, add TQLabels to statusbar sbar->addWidget(dirInfo, 0, true); sbar->addWidget(vb, 1, true); - QToolButton *fireDisk = new QToolButton(sbar, "reload disk size"); + TQToolButton *fireDisk = new TQToolButton(sbar, "reload disk size"); fireDisk->setIconSet(SQ_IconLoader::instance()->loadIcon("reload", KIcon::Desktop, KIcon::SizeSmall)); fireDisk->setTextLabel(i18n("Reload")); fireDisk->setUsesTextLabel(false); - connect(fireDisk, SIGNAL(clicked()), this, SLOT(slotFireDisk())); + connect(fireDisk, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotFireDisk())); diskProg = new SQ_Progress(sbar, "SQ_Progress [disk space]"); diskProg->setFixedWidth(150); @@ -788,42 +788,42 @@ void KSquirrel::createToolbar(KToolBar *tools) void KSquirrel::createActions() { pAThumbs = new KActionMenu(i18n("Thumbnail size"), "thumbnail"); - pAExit = KStdAction::quit(this, SLOT(slotClose()), actionCollection(), "SQ close"); - pAConfigure = KStdAction::preferences(this, SLOT(slotOptions()), actionCollection(), "SQ Configure"); - pAGLView = new KAction(i18n("Image window"), "raise", CTRL+Qt::Key_I, this, SLOT(raiseGLWidget()), actionCollection(), "SQ gl view widget"); - pARescan = KStdAction::redisplay(this, SLOT(slotRescan()), actionCollection(), "SQ rescan libraries"); + pAExit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotClose()), actionCollection(), "SQ close"); + pAConfigure = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotOptions()), actionCollection(), "SQ Configure"); + pAGLView = new KAction(i18n("Image window"), "raise", CTRL+TQt::Key_I, TQT_TQOBJECT(this), TQT_SLOT(raiseGLWidget()), actionCollection(), "SQ gl view widget"); + pARescan = KStdAction::redisplay(TQT_TQOBJECT(this), TQT_SLOT(slotRescan()), actionCollection(), "SQ rescan libraries"); pARescan->setText(i18n("Reload codecs from disk")); - pAExtTools = new KAction(i18n("Configure external tools..."), "launch", 0, this, SLOT(slotExtTools()), actionCollection(), "SQ external tools"); - pAFilters = new KAction(i18n("Configure filters..."), "filefind", 0, this, SLOT(slotFilters()), actionCollection(), "SQ filters"); - pAGotoTray = new KAction(i18n("Go to tray"), "background", CTRL+Qt::Key_T, this, SLOT(slotGotoTray()), actionCollection(), "SQ goto tray"); - pAOpenAndSet = new KAction(i18n("Open file and change directory"), "fileopen", CTRL+ALT+Qt::Key_O, this, SLOT(slotOpenFileAndSet()), actionCollection(), "SQ open and set"); - pAOpen = new KAction(i18n("Open file"), "fileopen", CTRL+Qt::Key_O, this, SLOT(slotOpenFile()), actionCollection(), "SQ open file"); - pATCMaster = new KAction(i18n("Thumbnail cache manager..."), "cache", 0, this, SLOT(slotTCMaster()), actionCollection(), "SQ TC Master"); + pAExtTools = new KAction(i18n("Configure external tools..."), "launch", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExtTools()), actionCollection(), "SQ external tools"); + pAFilters = new KAction(i18n("Configure filters..."), "filetqfind", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFilters()), actionCollection(), "SQ filters"); + pAGotoTray = new KAction(i18n("Go to tray"), "background", CTRL+TQt::Key_T, TQT_TQOBJECT(this), TQT_SLOT(slotGotoTray()), actionCollection(), "SQ goto tray"); + pAOpenAndSet = new KAction(i18n("Open file and change directory"), "fileopen", CTRL+ALT+TQt::Key_O, TQT_TQOBJECT(this), TQT_SLOT(slotOpenFileAndSet()), actionCollection(), "SQ open and set"); + pAOpen = new KAction(i18n("Open file"), "fileopen", CTRL+TQt::Key_O, TQT_TQOBJECT(this), TQT_SLOT(slotOpenFile()), actionCollection(), "SQ open file"); + pATCMaster = new KAction(i18n("Thumbnail cache manager..."), "cache", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTCMaster()), actionCollection(), "SQ TC Master"); pASelectAll = KStdAction::selectAll(0, 0, actionCollection(), "SQ Select All"); pADeselectAll = KStdAction::deselect(0, 0, actionCollection(), "SQ Deselect All"); - pARaiseListView = new KRadioAction(i18n("List"), "view_multicolumn", 0, this, SLOT(slotRaiseListView()), actionCollection(), "SQ raise list view"); - pARaiseIconView = new KRadioAction(i18n("Icons"), "view_icon", 0, this, SLOT(slotRaiseIconView()), actionCollection(), "SQ raise icon view"); - pARaiseDetailView = new KRadioAction(i18n("Details"), "view_detailed", 0, this, SLOT(slotRaiseDetailView()), actionCollection(), "SQ raise detailed view"); - pARaiseThumbView = new KRadioAction(i18n("Thumbnails"), "view_icon", 0, this, SLOT(slotRaiseThumbView()), actionCollection(), "SQ raise thumbs view"); + pARaiseListView = new KRadioAction(i18n("List"), "view_multicolumn", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRaiseListView()), actionCollection(), "SQ raise list view"); + pARaiseIconView = new KRadioAction(i18n("Icons"), "view_icon", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRaiseIconView()), actionCollection(), "SQ raise icon view"); + pARaiseDetailView = new KRadioAction(i18n("Details"), "view_detailed", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRaiseDetailView()), actionCollection(), "SQ raise detailed view"); + pARaiseThumbView = new KRadioAction(i18n("Thumbnails"), "view_icon", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRaiseThumbView()), actionCollection(), "SQ raise thumbs view"); - pAURL = new KToggleAction(i18n("Show URL box"), "history", CTRL+Qt::Key_U, 0, 0, actionCollection(), "SQ toggle url box"); + pAURL = new KToggleAction(i18n("Show URL box"), "history", CTRL+TQt::Key_U, 0, 0, actionCollection(), "SQ toggle url box"); - pASlideShow = new KAction(i18n("Slideshow"), "folder_video", CTRL+Qt::Key_S, this, SLOT(slotSlideShowStart()), actionCollection(), "SQ Slideshow"); - pASlideShowDialog = new KAction(i18n("Slideshow advanced"), 0, CTRL+ALT+Qt::Key_S, this, SLOT(slotSlideShowDialog()), actionCollection(), "SQ SlideShow Dialog"); - pARename = new KAction(i18n("Rename"), "file_move", Qt::Key_F2, this, SLOT(slotRename()), actionCollection(), "SQ Rename"); - pAPluginsInfo = new KAction(i18n("Codec information..."), "info", 0, this, SLOT(slotPluginsInfo()), actionCollection(), "SQ Plugins Info"); - pAPluginsDel = new KAction(i18n("Codec manager..."), 0, 0, this, SLOT(slotPluginsDel()), actionCollection(), "SQ Plugins Deleter"); - pAGLInfo = new KAction(i18n("OpenGL information..."), 0, 0, this, SLOT(slotGLInfo()), actionCollection(), "SQ OpenGL Info"); + pASlideShow = new KAction(i18n("Slideshow"), "folder_video", CTRL+TQt::Key_S, TQT_TQOBJECT(this), TQT_SLOT(slotSlideShowStart()), actionCollection(), "SQ Slideshow"); + pASlideShowDialog = new KAction(i18n("Slideshow advanced"), 0, CTRL+ALT+TQt::Key_S, TQT_TQOBJECT(this), TQT_SLOT(slotSlideShowDialog()), actionCollection(), "SQ SlideShow Dialog"); + pARename = new KAction(i18n("Rename"), "file_move", TQt::Key_F2, TQT_TQOBJECT(this), TQT_SLOT(slotRename()), actionCollection(), "SQ Rename"); + pAPluginsInfo = new KAction(i18n("Codec information..."), "info", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPluginsInfo()), actionCollection(), "SQ Plugins Info"); + pAPluginsDel = new KAction(i18n("Codec manager..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotPluginsDel()), actionCollection(), "SQ Plugins Deleter"); + pAGLInfo = new KAction(i18n("OpenGL information..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotGLInfo()), actionCollection(), "SQ OpenGL Info"); - pAThumb1 = new KRadioAction(i18n("Medium thumbnails"), locate("data", "images/thumbs/thumbs_medium.png"), 0, this, SLOT(slotThumbsMedium()), actionCollection(), "SQ thumbs1"); - pAThumb2 = new KRadioAction(i18n("Large thumbnails"), locate("data", "images/thumbs/thumbs_large.png"), 0, this, SLOT(slotThumbsLarge()), actionCollection(), "SQ thumbs2"); - pAThumb3 = new KRadioAction(i18n("Huge thumbnails"), locate("data", "images/thumbs/thumbs_huge.png"), 0, this, SLOT(slotThumbsHuge()), actionCollection(), "SQ thumbs3"); + pAThumb1 = new KRadioAction(i18n("Medium thumbnails"), locate("data", "images/thumbs/thumbs_medium.png"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotThumbsMedium()), actionCollection(), "SQ thumbs1"); + pAThumb2 = new KRadioAction(i18n("Large thumbnails"), locate("data", "images/thumbs/thumbs_large.png"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotThumbsLarge()), actionCollection(), "SQ thumbs2"); + pAThumb3 = new KRadioAction(i18n("Huge thumbnails"), locate("data", "images/thumbs/thumbs_huge.png"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotThumbsHuge()), actionCollection(), "SQ thumbs3"); - pASelectGroup = new KAction(i18n("Select group"), "viewmag+", CTRL+Qt::Key_Plus, 0, 0, actionCollection(), "SQ Select Group"); - pADeselectGroup = new KAction(i18n("Deselect group"), "viewmag-", CTRL+Qt::Key_Minus, 0, 0, actionCollection(), "SQ Deselect Group"); + pASelectGroup = new KAction(i18n("Select group"), "viewmag+", CTRL+TQt::Key_Plus, 0, 0, actionCollection(), "SQ Select Group"); + pADeselectGroup = new KAction(i18n("Deselect group"), "viewmag-", CTRL+TQt::Key_Minus, 0, 0, actionCollection(), "SQ Deselect Group"); - const QString thumbs_size__ = QString::fromLatin1("thumbs_size__"); + const TQString thumbs_size__ = TQString::tqfromLatin1("thumbs_size__"); pAThumb1->setExclusiveGroup(thumbs_size__); pAThumb2->setExclusiveGroup(thumbs_size__); pAThumb3->setExclusiveGroup(thumbs_size__); @@ -841,15 +841,15 @@ void KSquirrel::createActions() pAThumbs->insert(pAThumb3); pAThumbs->insert(new KActionSeparator(actionCollection())); - pAThumbsE = new KToggleAction(i18n("Extended thumbnails"), "", CTRL+Qt::Key_E, 0, 0, actionCollection(), "SQ Extended thumbs"); + pAThumbsE = new KToggleAction(i18n("Extended thumbnails"), "", CTRL+TQt::Key_E, 0, 0, actionCollection(), "SQ Extended thumbs"); kconf->setGroup("Thumbnails"); pAThumbsE->setChecked(kconf->readBoolEntry("extended", false)); - connect(pAThumbsE, SIGNAL(toggled(bool)), this, SLOT(slotExtendedToggled(bool))); + connect(pAThumbsE, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotExtendedToggled(bool))); pAThumbs->insert(pAThumbsE); pAThumbs->setDelayed(false); - QString raise_some_widget_from_stack = QString::fromLatin1("raise_some_widget_from_stack"); + TQString raise_some_widget_from_stack = TQString::tqfromLatin1("raise_some_widget_from_stack"); pARaiseListView->setExclusiveGroup(raise_some_widget_from_stack); pARaiseIconView->setExclusiveGroup(raise_some_widget_from_stack); pARaiseDetailView->setExclusiveGroup(raise_some_widget_from_stack); @@ -876,7 +876,7 @@ void KSquirrel::initExternalTools() { // create SQ_ExternalTool and create new // popup menu with tools - extool = new SQ_ExternalTool(this); + extool = new SQ_ExternalTool(TQT_TQOBJECT(this)); extool->newPopupMenu(); } @@ -885,7 +885,7 @@ void KSquirrel::slotFilters() { SQ_Filters f(this); - if(f.start() != QDialog::Accepted) return; + if(f.start() != TQDialog::Accepted) return; // Recreate menu with filters initFilterMenu(); @@ -898,7 +898,7 @@ void KSquirrel::slotExtTools() // If user clicked "OK", recreate menu with // tools - if(etd.start() == QDialog::Accepted) + if(etd.start() == TQDialog::Accepted) extool->newPopupMenu(); } @@ -925,7 +925,7 @@ void KSquirrel::closeGLWidget() if(m_demo) { finalActions(); - qApp->quit(); + tqApp->quit(); } else { @@ -940,7 +940,7 @@ void KSquirrel::closeGLWidget() void KSquirrel::initBookmarks() { // locate bookmarks file - QString file = locate("data", "kfile/bookmarks.xml"); + TQString file = locate("data", "kfile/bookmarks.xml"); if(file.isEmpty()) file = locateLocal("data", "kfile/bookmarks.xml"); @@ -955,7 +955,7 @@ void KSquirrel::initBookmarks() bookmarks = new KActionMenu(i18n("&Bookmarks"), "bookmark", actionCollection(), "bookmarks"); bookmarkMenu = new KBookmarkMenu(bmanager, bookmarkOwner, bookmarks->popupMenu(), actionCollection(), true); - connect(bookmarkOwner, SIGNAL(openURL(const KURL&)), pWidgetStack, SLOT(setURLForCurrent(const KURL&))); + connect(bookmarkOwner, TQT_SIGNAL(openURL(const KURL&)), pWidgetStack, TQT_SLOT(setURLForCurrent(const KURL&))); bookmarkOwner->setURL(pWidgetStack->diroperator()->url()); } @@ -1136,15 +1136,15 @@ void KSquirrel::slotRescan() // Create a final splash screen, if needed (if pixmap cache is not empty) void KSquirrel::createPostSplash() { - QColor cc(255,255,255); - QHBox *hbox = new QHBox(0, 0, Qt::WStyle_StaysOnTop | Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WX11BypassWM); - hbox->setFrameShape(QFrame::Box); + TQColor cc(255,255,255); + TQHBox *hbox = new TQHBox(0, 0, TQt::WStyle_StaysOnTop | TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WX11BypassWM); + hbox->setFrameShape(TQFrame::Box); - QLabel *pp = new QLabel(hbox); - pp->setPalette(QPalette(cc, cc)); - pp->setAlignment(Qt::AlignCenter); + TQLabel *pp = new TQLabel(hbox); + pp->setPalette(TQPalette(cc, cc)); + pp->tqsetAlignment(TQt::AlignCenter); - QPixmap todo = QPixmap::fromMimeSource(locate("data", "images/tray.png")); + TQPixmap todo = TQPixmap::fromMimeSource(locate("data", "images/tray.png")); if(todo.isNull()) todo = SQ_IconLoader::instance()->loadIcon("ksquirrel", KIcon::Desktop, 16); @@ -1152,14 +1152,14 @@ void KSquirrel::createPostSplash() pp->setPixmap(todo); pp->setFixedWidth(18); - QLabel *l = new QLabel(i18n(" writing settings and thumbnails... "), hbox); - l->setPalette(QPalette(cc, cc)); - l->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); + TQLabel *l = new TQLabel(i18n(" writing settings and thumbnails... "), hbox); + l->setPalette(TQPalette(cc, cc)); + l->tqsetAlignment(TQt::AlignLeft | TQt::AlignVCenter); hbox->setStretchFactor(pp, 0); hbox->setStretchFactor(l, 1); - QRect rc = KGlobalSettings::splashScreenDesktopGeometry(); + TQRect rc = KGlobalSettings::splashScreenDesktopGeometry(); int w = 200, h = 20; hbox->setGeometry(rc.center().x() - w/2, rc.center().y() - h/2, w, h); @@ -1202,7 +1202,7 @@ void KSquirrel::finalActions() if(create_splash) { createPostSplash(); - KApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers); + KApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); } // write config file to disk (it is currently in memory cache) @@ -1229,40 +1229,40 @@ void KSquirrel::enableThumbsMenu(bool enable) */ void KSquirrel::preCreate() { - new SQ_IconLoader(this); - new SQ_PixmapCache(this); - new SQ_ArchiveHandler(this); - new SQ_ImageLoader(this); - new SQ_DragProvider(this); + new SQ_IconLoader(TQT_TQOBJECT(this)); + new SQ_PixmapCache(TQT_TQOBJECT(this)); + new SQ_ArchiveHandler(TQT_TQOBJECT(this)); + new SQ_ImageLoader(TQT_TQOBJECT(this)); + new SQ_DragProvider(TQT_TQOBJECT(this)); - libhandler = new SQ_LibraryHandler(this); + libhandler = new SQ_LibraryHandler(TQT_TQOBJECT(this)); initExternalTools(); - new SQ_ErrorString(this); - new SQ_ThumbnailsUnused(this); - new SQ_Converter(this); + new SQ_ErrorString(TQT_TQOBJECT(this)); + new SQ_ThumbnailsUnused(TQT_TQOBJECT(this)); + new SQ_Converter(TQT_TQOBJECT(this)); - listingDialog = new SQ_SlideShowListing(this, "SlideShow Listing", true, Qt::WStyle_Customize | Qt::WStyle_NoBorder); - connect(listingDialog, SIGNAL(kill()), this, SLOT(slotSlideShowListingKill())); + listingDialog = new SQ_SlideShowListing(this, "SlideShow Listing", true, TQt::WStyle_Customize | TQt::WStyle_NoBorder); + connect(listingDialog, TQT_SIGNAL(kill()), TQT_TQOBJECT(this), TQT_SLOT(slotSlideShowListingKill())); slideShowItems.setAutoDelete(true); - down = new SQ_Downloader(this); + down = new SQ_Downloader(TQT_TQOBJECT(this)); - connect(down, SIGNAL(result(const KURL &)), this, SLOT(slotDownloaderResult(const KURL &))); + connect(down, TQT_SIGNAL(result(const KURL &)), TQT_TQOBJECT(this), TQT_SLOT(slotDownloaderResult(const KURL &))); SQ_SlideShowWidget *sls = new SQ_SlideShowWidget(0, "ksquirrel-slideshow"); - connect(sls, SIGNAL(stopSlideShow()), this, SLOT(slotStopSlideShow())); - connect(sls, SIGNAL(pause()), this, SLOT(slotPauseSlideShow())); - connect(sls, SIGNAL(next()), this, SLOT(slotNextSlideShow())); - connect(sls, SIGNAL(previous()), this, SLOT(slotPreviousSlideShow())); + connect(sls, TQT_SIGNAL(stopSlideShow()), TQT_TQOBJECT(this), TQT_SLOT(slotStopSlideShow())); + connect(sls, TQT_SIGNAL(pause()), TQT_TQOBJECT(this), TQT_SLOT(slotPauseSlideShow())); + connect(sls, TQT_SIGNAL(next()), TQT_TQOBJECT(this), TQT_SLOT(slotNextSlideShow())); + connect(sls, TQT_SIGNAL(previous()), TQT_TQOBJECT(this), TQT_SLOT(slotPreviousSlideShow())); // timer for slideshow - slideShowTimer = new QTimer(this); - timerShowListing = new QTimer(this); - connect(timerShowListing, SIGNAL(timeout()), listingDialog, SLOT(show())); + slideShowTimer = new TQTimer(this); + timerShowListing = new TQTimer(this); + connect(timerShowListing, TQT_SIGNAL(timeout()), listingDialog, TQT_SLOT(show())); SQ_SplashScreen::advance(); @@ -1291,9 +1291,9 @@ void KSquirrel::preCreate() // at first try to stat as local url KURL url; - if(QDir::isRelativePath(SQ_HLOptions::instance()->param)) + if(TQDir::isRelativePath(SQ_HLOptions::instance()->param)) { - url = KURL::fromPathOrURL(QDir::currentDirPath()); + url = KURL::fromPathOrURL(TQDir::currentDirPath()); url.addPath(SQ_HLOptions::instance()->param); } else @@ -1303,7 +1303,7 @@ void KSquirrel::preCreate() KIO::StatJob *job = KIO::stat(url, false); job->setSide(true); job->setDetails(0); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotStatResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotStatResult(KIO::Job *))); } else continueLoading(); @@ -1367,13 +1367,13 @@ void KSquirrel::slotStatResult(KIO::Job *_job) KIO::StatJob *job2 = KIO::stat(url, false); job2->setSide(true); job2->setDetails(0); - connect(job2, SIGNAL(result(KIO::Job *)), this, SLOT(slotStatResult(KIO::Job *))); + connect(job2, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotStatResult(KIO::Job *))); } else continueLoading(); } -void KSquirrel::resizeEvent(QResizeEvent *e) +void KSquirrel::resizeEvent(TQResizeEvent *e) { if(mainPage) mainPage->resize(e->size()); @@ -1400,14 +1400,14 @@ void KSquirrel::continueLoading() // in demo mode may be invisible if(mainPage->isVisible()) { - QEvent e(QEvent::Show); - eventFilter(mainPage, &e); + TQEvent e(TQEvent::Show); + eventFilter(TQT_TQOBJECT(mainPage), &e); } tray = new KSystemTray(this); - tray->setPixmap(QPixmap(locate("data", "images/tray.png"))); + tray->setPixmap(TQPixmap(locate("data", "images/tray.png"))); - connect(tray, SIGNAL(quitSelected()), this, SLOT(slotTrayQuit())); + connect(tray, TQT_SIGNAL(quitSelected()), TQT_TQOBJECT(this), TQT_SLOT(slotTrayQuit())); SQ_SplashScreen::advance(); SQ_SplashScreen::finish(); @@ -1432,11 +1432,11 @@ void KSquirrel::continueLoading() if(kapp->isRestored()) slotGotoTray(); - connect(kapp, SIGNAL(saveYourself()), this, SLOT(slotSaveYourself())); + connect(kapp, TQT_SIGNAL(saveYourself()), TQT_TQOBJECT(this), TQT_SLOT(slotSaveYourself())); } // Set caption to main window or to image window -void KSquirrel::setCaption(const QString &cap) +void KSquirrel::setCaption(const TQString &cap) { #if 0 KMainWindow::setCaption(cap); @@ -1494,7 +1494,7 @@ void KSquirrel::slotOpenFileAndSet() void KSquirrel::slotAnimatedClicked() { // invoke default browser - kapp->invokeBrowser(QString::fromLatin1("http://ksquirrel.sourceforge.net/")); + kapp->invokeBrowser(TQString::tqfromLatin1("http://ksquirrel.sourceforge.net/")); } // Create SQ_ThumbnailCacheMaster, which can do something with thumbnails @@ -1507,17 +1507,17 @@ void KSquirrel::slotTCMaster() } // Return a pointer to widget in statusbar by name -QLabel* KSquirrel::sbarWidget(const QString &name) +TQLabel* KSquirrel::sbarWidget(const TQString &name) { return sbarwidgets[name]; } -// Convert QByteArray to QString -QString KSquirrel::getArg(const QByteArray &data) +// Convert TQByteArray to TQString +TQString KSquirrel::getArg(const TQByteArray &data) { - QDataStream args(data, IO_ReadOnly); + TQDataStream args(data, IO_ReadOnly); - QString arg; + TQString arg; args >> arg; @@ -1525,9 +1525,9 @@ QString KSquirrel::getArg(const QByteArray &data) } // Process incoming DCOP messages -bool KSquirrel::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData) +bool KSquirrel::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData) { - if(fun == "control(QString)") + if(fun == "control(TQString)") { // Yes, user wants to call our "control" method control(getArg(data)); @@ -1536,7 +1536,7 @@ bool KSquirrel::process(const QCString &fun, const QByteArray &data, QCString& r return true; } - else if(fun == "navigator(QString)") + else if(fun == "navigator(TQString)") { navigatorSend(getArg(data)); @@ -1569,16 +1569,16 @@ bool KSquirrel::process(const QCString &fun, const QByteArray &data, QCString& r return true; } // load specified image - else if(fun == "load(QString)") + else if(fun == "load(TQString)") { - QString arg = getArg(data); + TQString arg = getArg(data); KURL url = KURL::fromPathOrURL(arg); KIO::StatJob *job = KIO::stat(url, false); job->setSide(true); job->setDetails(0); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotDCOPStatResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotDCOPStatResult(KIO::Job *))); replyType = "void"; @@ -1667,9 +1667,9 @@ QCStringList KSquirrel::functions() { QCStringList result = DCOPObject::functions(); - result << "void control(QString)"; - result << "void navigator(QString)"; - result << "void load(QString)"; + result << "void control(TQString)"; + result << "void navigator(TQString)"; + result << "void load(TQString)"; result << "void activate()"; result << "void activate_image_window()"; result << "void reload_codecs()"; @@ -1702,7 +1702,7 @@ void KSquirrel::printDCOP() std::cerr << "******************************" << std::endl; } -void KSquirrel::navigatorSend(const QString &command) +void KSquirrel::navigatorSend(const TQString &command) { if(command == "next") pWidgetStack->moveTo(SQ_WidgetStack::Next, 0, false); @@ -1735,20 +1735,20 @@ void KSquirrel::navigatorSend(const QString &command) // what he wants to do. // // The main idea is that SQ_GLWidget already has all needed actions, -// located in keyPressEvent() handler. Let's construct QKeyEvent and send +// located in keyPressEvent() handler. Let's construct TQKeyEvent and send // it to SQ_GLWidget - SQ_GLWidget will catch this event and will do what // user wants. // -void KSquirrel::control(const QString &command) +void KSquirrel::control(const TQString &command) { - QMap<QString, int>::iterator it = messages.find(command); + TQMap<TQString, int>::iterator it = messages.tqfind(command); // known action if(it != messages.end()) { int id = it.data(); - KAction *a = SQ_GLWidget::window()->actionCollection()->action(QString::fromLatin1("action_%1").arg(id)); + KAction *a = SQ_GLWidget::window()->actionCollection()->action(TQString::tqfromLatin1("action_%1").tqarg(id)); if(a) a->activate(); } @@ -1757,7 +1757,7 @@ void KSquirrel::control(const QString &command) std::cerr << "List of available DCOP parameters for control() method:" << std::endl; std::cerr << "*****************************" << std::endl; - for(QMap<QString, int>::iterator it = messages.begin();it != messages.end();++it) + for(TQMap<TQString, int>::iterator it = messages.begin();it != messages.end();++it) { std::cerr << it.key() << std::endl; } @@ -1768,38 +1768,38 @@ void KSquirrel::control(const QString &command) void KSquirrel::fillMessages() { - messages.insert("image_next", Qt::Key_PageDown); - messages.insert("image_previous", Qt::Key_PageUp); - messages.insert("image_first", Qt::Key_Home); - messages.insert("image_last", Qt::Key_End); - messages.insert("image_reset", Qt::Key_R); - messages.insert("image_information", Qt::Key_I); - messages.insert("image_delete", Qt::Key_Delete); - - messages.insert("image_animation_toggle", Qt::Key_A); - - messages.insert("image_page_first", Qt::Key_F1); - messages.insert("image_page_last", Qt::Key_F4); - messages.insert("image_page_next", Qt::Key_F3); - messages.insert("image_page_previous", Qt::Key_F2); - - messages.insert("image_window_fullscreen", Qt::Key_F); - messages.insert("image_window_quickbrowser", Qt::Key_Q); - messages.insert("image_window_close", Qt::Key_X); - messages.insert("image_window_help", Qt::Key_Slash); - - messages.insert("zoom_plus", Qt::Key_Plus); - messages.insert("zoom_minus", Qt::Key_Minus); - messages.insert("zoom_1", Qt::Key_1); - messages.insert("zoom_2", Qt::Key_2); - messages.insert("zoom_3", Qt::Key_3); - messages.insert("zoom_4", Qt::Key_4); - messages.insert("zoom_5", Qt::Key_5); - messages.insert("zoom_6", Qt::Key_6); - messages.insert("zoom_7", Qt::Key_7); - messages.insert("zoom_8", Qt::Key_8); - messages.insert("zoom_9", Qt::Key_9); - messages.insert("zoom_10", Qt::Key_0); + messages.insert("image_next", TQt::Key_PageDown); + messages.insert("image_previous", TQt::Key_PageUp); + messages.insert("image_first", TQt::Key_Home); + messages.insert("image_last", TQt::Key_End); + messages.insert("image_reset", TQt::Key_R); + messages.insert("image_information", TQt::Key_I); + messages.insert("image_delete", TQt::Key_Delete); + + messages.insert("image_animation_toggle", TQt::Key_A); + + messages.insert("image_page_first", TQt::Key_F1); + messages.insert("image_page_last", TQt::Key_F4); + messages.insert("image_page_next", TQt::Key_F3); + messages.insert("image_page_previous", TQt::Key_F2); + + messages.insert("image_window_fullscreen", TQt::Key_F); + messages.insert("image_window_quickbrowser", TQt::Key_Q); + messages.insert("image_window_close", TQt::Key_X); + messages.insert("image_window_help", TQt::Key_Slash); + + messages.insert("zoom_plus", TQt::Key_Plus); + messages.insert("zoom_minus", TQt::Key_Minus); + messages.insert("zoom_1", TQt::Key_1); + messages.insert("zoom_2", TQt::Key_2); + messages.insert("zoom_3", TQt::Key_3); + messages.insert("zoom_4", TQt::Key_4); + messages.insert("zoom_5", TQt::Key_5); + messages.insert("zoom_6", TQt::Key_6); + messages.insert("zoom_7", TQt::Key_7); + messages.insert("zoom_8", TQt::Key_8); + messages.insert("zoom_9", TQt::Key_9); + messages.insert("zoom_10", TQt::Key_0); } // Start/stop slideshow @@ -1816,10 +1816,10 @@ void KSquirrel::slotSlideShowStart() listing = recurs ? KIO::listRecursive(slideShowDir, false, false) : KIO::listDir(slideShowDir, false, false); - connect(listing, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), - this, SLOT(slotSlideShowEntries(KIO::Job *, const KIO::UDSEntryList &))); + connect(listing, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), + TQT_TQOBJECT(this), TQT_SLOT(slotSlideShowEntries(KIO::Job *, const KIO::UDSEntryList &))); - connect(listing, SIGNAL(result(KIO::Job *)), this, SLOT(slotSlideShowJobResult(KIO::Job *))); + connect(listing, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotSlideShowJobResult(KIO::Job *))); timerShowListing->start(1000, true); } @@ -1829,7 +1829,7 @@ void KSquirrel::slotSlideShowListingKill() if(listing) listing->kill(); slideShowItems.clear(); - listingDialog->setFile(0, QString::null); + listingDialog->setFile(0, TQString()); listingDialog->hide(); } @@ -1838,7 +1838,7 @@ void KSquirrel::slotSlideShowEntries(KIO::Job *, const KIO::UDSEntryList &list) KIO::UDSEntryListConstIterator itEnd = list.end(); KURL url = KURL::fromPathOrURL(slideShowDir); - QString sfile; + TQString sfile; // go through list of KIO::UDSEntrys for(KIO::UDSEntryListConstIterator it = list.begin(); it != itEnd; ++it) @@ -1861,7 +1861,7 @@ void KSquirrel::slotSlideShowEntries(KIO::Job *, const KIO::UDSEntryList &list) void KSquirrel::slotSlideShowJobResult(KIO::Job *job) { - listingDialog->setFile(0, QString::null); + listingDialog->setFile(0, TQString()); listingDialog->hide(); timerShowListing->stop(); @@ -1876,7 +1876,7 @@ void KSquirrel::slotSlideShowDialog() { SQ_SlideShow s(this); - if(s.exec(slideShowDir) == QDialog::Accepted) + if(s.exec(slideShowDir) == TQDialog::Accepted) slotSlideShowStart(); } @@ -1889,8 +1889,8 @@ void KSquirrel::slideShowPrivate() slideShowInit = true; slideShowDirection = KSquirrel::Default; - disconnect(slideShowTimer, SIGNAL(timeout()), 0, 0); - connect(slideShowTimer, SIGNAL(timeout()), this, SLOT(slotSlideShowNextImage())); + disconnect(slideShowTimer, TQT_SIGNAL(timeout()), 0, 0); + connect(slideShowTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotSlideShowNextImage())); kconf->setGroup("Slideshow"); @@ -1917,7 +1917,7 @@ void KSquirrel::slideShowPrivate() // start! SQ_SlideShowWidget::instance()->beginSlideShow(slideShowTotal); - QTimer::singleShot(1, this, SLOT(slideShowDetermine())); + TQTimer::singleShot(1, TQT_TQOBJECT(this), TQT_SLOT(slideShowDetermine())); } void KSquirrel::slotDownloaderResult(const KURL &u) @@ -1956,8 +1956,8 @@ void KSquirrel::slideShowDetermine() if(!slideShowRepeat) { // nice hack to make final delay - disconnect(slideShowTimer, SIGNAL(timeout()), 0, 0); - connect(slideShowTimer, SIGNAL(timeout()), this, SLOT(slotStopSlideShow())); + disconnect(slideShowTimer, TQT_SIGNAL(timeout()), 0, 0); + connect(slideShowTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotStopSlideShow())); slideShowTimer->start(slideShowDelay, true); return; } @@ -2053,7 +2053,7 @@ void KSquirrel::slotStopSlideShow() // reset values slideShowStop = true; slideShowTimer->stop(); - slideShowDir = QString::null; + slideShowDir = TQString(); slideShowPaused = false; slideShowItems.clear(); slideShowDirection = KSquirrel::Default; @@ -2123,7 +2123,7 @@ void KSquirrel::configAnime(bool init) // show animated logo in toolbar if needed if(!kconf->readBoolEntry("anime_dont", false) && (init || (!init && !anim))) { - tools->insertAnimatedWidget(1000, this, SLOT(slotAnimatedClicked()), locate("data", "images/anime.png")); + tools->insertAnimatedWidget(1000, TQT_TQOBJECT(this), TQT_SLOT(slotAnimatedClicked()), locate("data", "images/anime.png")); tools->alignItemRight(1000); tools->animatedWidget(1000)->start(); } @@ -2156,10 +2156,10 @@ void KSquirrel::slotRename() renameSrcURL = items->first()->url(); - QString filename = QStyleSheet::escape(renameSrcURL.filename()); + TQString filename = TQStyleSheet::escape(renameSrcURL.filename()); - QString mNewFilename = KInputDialog::getText(i18n("Renaming File"), - i18n("<p>Rename file <b>%1</b> to:</p>").arg(filename), + TQString mNewFilename = KInputDialog::getText(i18n("Renaming File"), + i18n("<p>Rename file <b>%1</b> to:</p>").tqarg(filename), renameSrcURL.filename(), &ok, this); if(!ok) return; @@ -2168,7 +2168,7 @@ void KSquirrel::slotRename() renameDestURL.setFileName(mNewFilename); KIO::Job *job = KIO::move(renameSrcURL, renameDestURL); - connect(job, SIGNAL(result(KIO::Job*)), this, SLOT(slotRenameResult(KIO::Job*))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_TQOBJECT(this), TQT_SLOT(slotRenameResult(KIO::Job*))); } void KSquirrel::slotRenameResult(KIO::Job *job) diff --git a/ksquirrel/ksquirrel.h b/ksquirrel/ksquirrel.h index 58c542b..9300946 100644 --- a/ksquirrel/ksquirrel.h +++ b/ksquirrel/ksquirrel.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qstringlist.h> -#include <qmap.h> +#include <tqstringlist.h> +#include <tqmap.h> #include <kmainwindow.h> #include <dcopobject.h> @@ -32,13 +32,13 @@ // forward declarations -template <class T> class QValueVector; -class QLabel; -class QWidgetStack; -class QHBox; -class QVBox; -class QTimer; -class QSplitter; +template <class T> class TQValueVector; +class TQLabel; +class TQWidgetStack; +class TQHBox; +class TQVBox; +class TQTimer; +class TQSplitter; namespace KIO { class Job; } @@ -78,12 +78,13 @@ class SQ_SlideShowListing; class KSquirrel : public KMainWindow, public DCOPObject { Q_OBJECT + TQ_OBJECT public: /* * Constructor & destructor */ - KSquirrel(QWidget *parent, const char *name); + KSquirrel(TQWidget *tqparent, const char *name); ~KSquirrel(); SQ_Progress* diskProgress(); @@ -126,7 +127,7 @@ class KSquirrel : public KMainWindow, public DCOPObject * will be set to it, and to KSquirrel's main window * otherwise. Called from SQ_GLWidget. */ - void setCaption(const QString &cap); + void setCaption(const TQString &cap); void saveLayout(); @@ -149,9 +150,9 @@ class KSquirrel : public KMainWindow, public DCOPObject /* * Get pointer to a widget, located in status bar. * All pointers to statusbar widgets are saved in - * 'sbarwidgets' object (QMap). + * 'sbarwidgets' object (TQMap). */ - QLabel* sbarWidget(const QString &name); + TQLabel* sbarWidget(const TQString &name); /* * DCOP methods @@ -165,7 +166,7 @@ class KSquirrel : public KMainWindow, public DCOPObject /* * Process incoming DCOP message */ - bool process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData); + bool process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData); bool separateImageWindow() const; @@ -173,8 +174,8 @@ class KSquirrel : public KMainWindow, public DCOPObject * Names and extensions of name filters for * file manager. */ - QStringList* filtersNames() const; - QStringList* filtersExtensions() const; + TQStringList* filtersNames() const; + TQStringList* filtersExtensions() const; static KSquirrel* app() { return m_instance; } @@ -182,9 +183,9 @@ class KSquirrel : public KMainWindow, public DCOPObject /* * Catch some events and do specific actions. */ - virtual bool eventFilter(QObject *o, QEvent *e); - virtual void closeEvent(QCloseEvent *e); - virtual void resizeEvent(QResizeEvent *e); + virtual bool eventFilter(TQObject *o, TQEvent *e); + virtual void closeEvent(TQCloseEvent *e); + virtual void resizeEvent(TQResizeEvent *e); /* * Internal methods @@ -234,7 +235,7 @@ class KSquirrel : public KMainWindow, public DCOPObject void preCreate(); /* - * Create QStrinLists, containing filters and filters' names (if needed) + * Create TQStrinLists, containing filters and filters' names (if needed) * and fill popup menu with new filters. */ void initFilterMenu(); @@ -294,7 +295,7 @@ class KSquirrel : public KMainWindow, public DCOPObject * Set filter for a filemanager to 'f' and check * appropriate menu item */ - void setFilter(const QString &f, const int id); + void setFilter(const TQString &f, const int id); /* * Fill 'messages' map with values. 'messages' map is used @@ -312,7 +313,7 @@ class KSquirrel : public KMainWindow, public DCOPObject * key sequence and send this sequence to SQ_GLWidget. * * The main idea is that KSquirrel will find needed key sequence - * by its name (in 'messages' map), costruct QKeyEvent and send to + * by its name (in 'messages' map), costruct TQKeyEvent and send to * SQ_GLWidget. SQ_GLWidget already has keyEvent() handler, so it will * do what DCOP client wants. * @@ -321,29 +322,29 @@ class KSquirrel : public KMainWindow, public DCOPObject * $ dcop ksquirrel ksquirrel control image_next * * will call KSquirrel::control("image_next"), which will - * construct QKeyEvent(QEvent::KeyPress, Qt::Key_PageDown, - * Qt::Key_PageDown, Qt::NoButton) + * construct TQKeyEvent(TQEvent::KeyPress, TQt::Key_PageDown, + * TQt::Key_PageDown, Qt::NoButton) * and send it to SQ_GLWidget. SQ_GLWidget will catch keypress event, * and load next image in the current directory. */ - void control(const QString &command); + void control(const TQString &command); /* * Send a message to navigator from incoming DCOP message */ - void navigatorSend(const QString &command); + void navigatorSend(const TQString &command); /* - * Get QString argument from incoming QByteArray. + * Get TQString argument from incoming TQByteArray. */ - QString getArg(const QByteArray &data); + TQString getArg(const TQByteArray &data); signals: /* * emitted, when user chages thumbails' size (from menu). */ - void thumbSizeChanged(const QString&); + void thumbSizeChanged(const TQString&); void resetToolTip(); @@ -610,39 +611,39 @@ class KSquirrel : public KMainWindow, public DCOPObject KStatusBar *sbar; // contains paths of found libraries - QStringList strlibFound; + TQStringList strlibFound; // sizes for mainSplitter - QValueList<int> mainSizes; + TQValueList<int> mainSizes; // libraries' filters - QStringList libFilters; + TQStringList libFilters; - // QMap, which contains pointers to statusbar widgets. + // TQMap, which contains pointers to statusbar widgets. // I can get a pointer by widget's name. // // For example: // // KSquirrel::app()->sbarWidget("fileName")->setText("Filename.txt"); // - QMap<QString, QLabel*> sbarwidgets; + TQMap<TQString, TQLabel*> sbarwidgets; - // QLabels for statusbar - QLabel *dirInfo, *fileIcon, *fileName, *diskSpace; + // TQLabels for statusbar + TQLabel *dirInfo, *fileIcon, *fileName, *diskSpace; - // QMap, which contains available DCOP + // TQMap, which contains available DCOP // parameters (such as "image_next", "image_prev") // and its appropriate key sequences. // - // For example, "image_next" is mapped to Qt::Key_PageDown - // "image_prev" - to "Qt::Key_PageUp" - QMap<QString, int> messages; + // For example, "image_next" is mapped to TQt::Key_PageDown + // "image_prev" - to "TQt::Key_PageUp" + TQMap<TQString, int> messages; // combobox with history urls KHistoryCombo *pCurrentURL; // filters' names and extensions - QStringList *sqFiltersName, *sqFiltersExt; + TQStringList *sqFiltersName, *sqFiltersExt; // "Configure KSquirrel" KAction *pAConfigure, @@ -667,7 +668,7 @@ class KSquirrel : public KMainWindow, public DCOPObject // Directory for slideshow. // KSquirrel will use it to load file names. - QString slideShowDir; + TQString slideShowDir; bool slideShowInit; @@ -684,7 +685,7 @@ class KSquirrel : public KMainWindow, public DCOPObject KURL slideShowName; // timers for slideshow - QTimer *slideShowTimer, *timerShowListing; + TQTimer *slideShowTimer, *timerShowListing; // is slideshow stopped ? bool slideShowStop; @@ -707,7 +708,7 @@ class KSquirrel : public KMainWindow, public DCOPObject // external tools SQ_ExternalTool *extool; - QSplitter *mainView; + TQSplitter *mainView; // file tree SQ_TreeView *ptree; @@ -744,7 +745,7 @@ class KSquirrel : public KMainWindow, public DCOPObject int old_id; bool old_disable, m_urlbox, old_marks, old_calc, m_intray, waitForShow; SQ_Downloader *down; - QVBox *mainPage; + TQVBox *mainPage; bool statStage; }; @@ -762,13 +763,13 @@ KHistoryCombo* KSquirrel::historyCombo() } inline -QStringList* KSquirrel::filtersNames() const +TQStringList* KSquirrel::filtersNames() const { return sqFiltersName; } inline -QStringList* KSquirrel::filtersExtensions() const +TQStringList* KSquirrel::filtersExtensions() const { return sqFiltersExt; } diff --git a/ksquirrel/ksquirrelpart/ksquirrelpart.cpp b/ksquirrel/ksquirrelpart/ksquirrelpart.cpp index ba39715..8be24cc 100644 --- a/ksquirrel/ksquirrelpart/ksquirrelpart.cpp +++ b/ksquirrel/ksquirrelpart/ksquirrelpart.cpp @@ -38,9 +38,9 @@ typedef KParts::GenericFactory<KSquirrelPart> KSquirrelFactory; K_EXPORT_COMPONENT_FACTORY(libksquirrelpart, KSquirrelFactory) -KSquirrelPart::KSquirrelPart(QWidget *parentWidget, const char *, - QObject* parent, const char *name, - const QStringList &) : KParts::ReadOnlyPart(parent, name) +KSquirrelPart::KSquirrelPart(TQWidget *tqparentWidget, const char *, + TQObject* tqparent, const char *name, + const TQStringList &) : KParts::ReadOnlyPart(tqparent, name) { kdDebug() << "+KSquirrelPart" << endl; @@ -48,11 +48,11 @@ KSquirrelPart::KSquirrelPart(QWidget *parentWidget, const char *, ext = new KSquirrelPartBrowserExtension(this); - KGlobal::dirs()->addResourceType("data", KStandardDirs::kde_default("data") + QString::fromLatin1("ksquirrel")); + KGlobal::dirs()->addResourceType("data", KStandardDirs::kde_default("data") + TQString::tqfromLatin1("ksquirrel")); KGlobal::locale()->setActiveCatalogue(KSquirrelFactory::instance()->instanceName()); if(!SQ_ErrorString::instance()) - new SQ_ErrorString(parentWidget); + new SQ_ErrorString(TQT_TQOBJECT(tqparentWidget)); if(!SQ_Config::instance()) new SQ_Config; @@ -72,93 +72,93 @@ KSquirrelPart::KSquirrelPart(QWidget *parentWidget, const char *, new SQ_DirOperator; - gl = new SQ_GLWidget(parentWidget, "ksquirrelpart-opengl-widget"); + gl = new SQ_GLWidget(tqparentWidget, "ksquirrelpart-opengl-widget"); gl->glInitA(); - connect(gl, SIGNAL(message(const QString &)), this, SIGNAL(setStatusBarText(const QString&))); + connect(gl, TQT_SIGNAL(message(const TQString &)), this, TQT_SIGNAL(setStatusBarText(const TQString&))); setWidget(gl); KAction *a; - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_Plus)); - new KAction(i18n("Zoom +"), "viewmag+", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart zoom in"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_Plus)); + new KAction(i18n("Zoom +"), "viewmag+", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart zoom in"); - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_Minus)); - new KAction(i18n("Zoom -"), "viewmag-", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart zoom out"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_Minus)); + new KAction(i18n("Zoom -"), "viewmag-", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart zoom out"); - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_P)); - new KAction(i18n("Properties"), "image", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart properties"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_P)); + new KAction(i18n("Properties"), "image", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart properties"); - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_R)); - new KAction(i18n("Normalize"), "rebuild", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart normalize"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_R)); + new KAction(i18n("Normalize"), "rebuild", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart normalize"); // colorize & filters - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_D)); - new KAction(i18n("Color balance..."), "colorize", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart colorbalance"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_D)); + new KAction(i18n("Color balance..."), "colorize", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart colorbalance"); - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_U)); - new KAction(i18n("Apply filter..."), "effect", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart filter"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_U)); + new KAction(i18n("Apply filter..."), "effect", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart filter"); // rotate - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_Left+CTRL)); - new KAction(i18n("Rotate left"), "rotate_ccw", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart rotateleft"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_Left+CTRL)); + new KAction(i18n("Rotate left"), "rotate_ccw", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart rotateleft"); - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_Right+CTRL)); - new KAction(i18n("Rotate right"), "rotate_cw", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart rotateright"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_Right+CTRL)); + new KAction(i18n("Rotate right"), "rotate_cw", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart rotateright"); // copy/move - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_F5)); - new KAction(i18n("Copy to..."), "editcopy", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart copyto"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_F5)); + new KAction(i18n("Copy to..."), "editcopy", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart copyto"); - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_F7)); - new KAction(i18n("Move to..."), "editcut", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart moveto"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_F7)); + new KAction(i18n("Move to..."), "editcut", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart moveto"); - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_F6)); - new KAction(i18n("Copy to last folder"), "", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart copy"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_F6)); + new KAction(i18n("Copy to last folder"), "", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart copy"); - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_F8)); - new KAction(i18n("Move to last folder"), "", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart move"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_F8)); + new KAction(i18n("Move to last folder"), "", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart move"); - a = gl->actionCollection()->action(QString("action_%1").arg(Qt::Key_S)); - new KAction(i18n("Save As..."), "filesaveas", 0, a, SLOT(activate()), actionCollection(), "ksquirrelpart saveas"); + a = gl->actionCollection()->action(TQString("action_%1").tqarg(TQt::Key_S)); + new KAction(i18n("Save As..."), "filesaveas", 0, a, TQT_SLOT(activate()), actionCollection(), "ksquirrelpart saveas"); sa = new KSelectAction(i18n("Zoom"), 0, actionCollection(), "ksquirrelpart zoom"); sa->setEditable(true); - QStringList zooms; - zooms << QString::number(10) + '%'; - zooms << QString::number(25) + '%'; - zooms << QString::number(33) + '%'; - zooms << QString::number(50) + '%'; - zooms << QString::number(75) + '%'; - zooms << QString::number(100) + '%'; - zooms << QString::number(150) + '%'; - zooms << QString::number(200) + '%'; - zooms << QString::number(250) + '%'; - zooms << QString::number(300) + '%'; - zooms << QString::number(350) + '%'; - zooms << QString::number(400) + '%'; - zooms << QString::number(450) + '%'; - zooms << QString::number(500) + '%'; - zooms << QString::number(600) + '%'; - zooms << QString::number(700) + '%'; - zooms << QString::number(800) + '%'; - zooms << QString::number(900) + '%'; - zooms << QString::number(1000) + '%'; + TQStringList zooms; + zooms << TQString::number(10) + '%'; + zooms << TQString::number(25) + '%'; + zooms << TQString::number(33) + '%'; + zooms << TQString::number(50) + '%'; + zooms << TQString::number(75) + '%'; + zooms << TQString::number(100) + '%'; + zooms << TQString::number(150) + '%'; + zooms << TQString::number(200) + '%'; + zooms << TQString::number(250) + '%'; + zooms << TQString::number(300) + '%'; + zooms << TQString::number(350) + '%'; + zooms << TQString::number(400) + '%'; + zooms << TQString::number(450) + '%'; + zooms << TQString::number(500) + '%'; + zooms << TQString::number(600) + '%'; + zooms << TQString::number(700) + '%'; + zooms << TQString::number(800) + '%'; + zooms << TQString::number(900) + '%'; + zooms << TQString::number(1000) + '%'; sa->setItems(zooms); sa->setCurrentItem(5); - connect(sa, SIGNAL(activated(int)), this, SLOT(slotZoom())); + connect(sa, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotZoom())); - QString group = "selection_group"; + TQString group = "selection_group"; - ar = new KToggleAction(i18n("Rectangle"), "rectangle", KShortcut(Qt::Key_R+CTRL), 0, 0, actionCollection(), "ksquirrelpart rectangle"); + ar = new KToggleAction(i18n("Rectangle"), "rectangle", KShortcut(TQt::Key_R+CTRL), 0, 0, actionCollection(), "ksquirrelpart rectangle"); ar->setExclusiveGroup(group); - connect(ar, SIGNAL(toggled(bool)), this, SLOT(slotSelectionRect(bool))); + connect(ar, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSelectionRect(bool))); - ae = new KToggleAction(i18n("Ellipse"), "circle", KShortcut(Qt::Key_E+CTRL), 0, 0, actionCollection(), "ksquirrelpart ellipse"); + ae = new KToggleAction(i18n("Ellipse"), "circle", KShortcut(TQt::Key_E+CTRL), 0, 0, actionCollection(), "ksquirrelpart ellipse"); ae->setExclusiveGroup(group); - connect(ae, SIGNAL(toggled(bool)), this, SLOT(slotSelectionEllipse(bool))); + connect(ae, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSelectionEllipse(bool))); setXMLFile("ksquirrelpart/ksquirrelpart.rc"); } @@ -172,7 +172,7 @@ void KSquirrelPart::slotZoom() { bool ok; - int z = sa->currentText().replace(QChar('%'), "").toInt(&ok); + int z = sa->currentText().tqreplace(TQChar('%'), "").toInt(&ok); if(ok) gl->zoom((float)z / 100.0f); @@ -226,9 +226,9 @@ bool KSquirrelPart::openFile() return true; } -void KSquirrelPart::setKonquerorWindowCaption(const KURL &, const QString &filename) +void KSquirrelPart::setKonquerorWindowCaption(const KURL &, const TQString &filename) { - QString caption = QString("%1").arg(filename); + TQString caption = TQString("%1").tqarg(filename); emit setWindowCaption(caption); } diff --git a/ksquirrel/ksquirrelpart/ksquirrelpart.h b/ksquirrel/ksquirrelpart/ksquirrelpart.h index 27f74c8..d9d254c 100644 --- a/ksquirrel/ksquirrelpart/ksquirrelpart.h +++ b/ksquirrel/ksquirrelpart/ksquirrelpart.h @@ -31,6 +31,7 @@ class KSquirrelPart; class KSquirrelPartBrowserExtension: public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: KSquirrelPartBrowserExtension(KSquirrelPart* viewPart, const char *name = 0); @@ -48,14 +49,15 @@ class KSquirrelPartBrowserExtension: public KParts::BrowserExtension class KSquirrelPart : public KParts::ReadOnlyPart { Q_OBJECT + TQ_OBJECT public: - KSquirrelPart(QWidget*, const char*, QObject*, const char*, const QStringList &); + KSquirrelPart(TQWidget*, const char*, TQObject*, const char*, const TQStringList &); virtual ~KSquirrelPart(); static KAboutData* createAboutData(); - QString filePath(); + TQString filePath(); void print(); @@ -64,7 +66,7 @@ class KSquirrelPart : public KParts::ReadOnlyPart protected slots: virtual bool openFile(); - virtual void setKonquerorWindowCaption(const KURL &url, const QString &filename); + virtual void setKonquerorWindowCaption(const KURL &url, const TQString &filename); private slots: void slotSelectionRect(bool); @@ -79,7 +81,7 @@ class KSquirrelPart : public KParts::ReadOnlyPart }; inline -QString KSquirrelPart::filePath() +TQString KSquirrelPart::filePath() { return m_file; } diff --git a/ksquirrel/ksquirrelpart/sq_bcglabel.cpp b/ksquirrel/ksquirrelpart/sq_bcglabel.cpp index d963976..968dbd9 100644 --- a/ksquirrel/ksquirrelpart/sq_bcglabel.cpp +++ b/ksquirrel/ksquirrelpart/sq_bcglabel.cpp @@ -17,11 +17,11 @@ #include "sq_bcglabel.h" -SQ_BCGLabel::SQ_BCGLabel(QWidget *parent, const char *name, WFlags f) : QLabel(parent, name, f | Qt::WNoAutoErase) +SQ_BCGLabel::SQ_BCGLabel(TQWidget *tqparent, const char *name, WFlags f) : TQLabel(tqparent, name, f | TQt::WNoAutoErase) { setScaledContents(false); - setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); + tqsetAlignment(TQt::AlignHCenter | TQt::AlignVCenter); } SQ_BCGLabel::~SQ_BCGLabel() diff --git a/ksquirrel/ksquirrelpart/sq_bcglabel.h b/ksquirrel/ksquirrelpart/sq_bcglabel.h index dd86bc7..7c9bc86 100644 --- a/ksquirrel/ksquirrelpart/sq_bcglabel.h +++ b/ksquirrel/ksquirrelpart/sq_bcglabel.h @@ -18,16 +18,16 @@ #ifndef SQ_BCGLABEL_H #define SQ_BCGLABEL_H -#include <qlabel.h> +#include <tqlabel.h> /** *@author Baryshev Dmitry */ -class SQ_BCGLabel : public QLabel +class SQ_BCGLabel : public TQLabel { public: - SQ_BCGLabel(QWidget *parent, const char *name = 0, WFlags f = 0); + SQ_BCGLabel(TQWidget *tqparent, const char *name = 0, WFlags f = 0); ~SQ_BCGLabel(); }; diff --git a/ksquirrel/ksquirrelpart/sq_codecsettingsskeleton.ui b/ksquirrel/ksquirrelpart/sq_codecsettingsskeleton.ui index 5ef812c..8a5a677 100644 --- a/ksquirrel/ksquirrelpart/sq_codecsettingsskeleton.ui +++ b/ksquirrel/ksquirrelpart/sq_codecsettingsskeleton.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_CodecSettingsSkeleton</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_CodecSettingsSkeleton</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>codecIcon</cstring> </property> @@ -34,7 +34,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>16</width> <height>16</height> @@ -64,7 +64,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>codecName</cstring> </property> @@ -77,7 +77,7 @@ <string></string> </property> </widget> - <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox</cstring> </property> @@ -99,9 +99,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -117,14 +117,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushApply</cstring> </property> @@ -132,7 +132,7 @@ <string>Apply</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushOK</cstring> </property> @@ -143,7 +143,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -182,36 +182,36 @@ </tabstops> <includes> <include location="global" impldecl="in declaration">ksquirrel-libs/settings.h</include> - <include location="global" impldecl="in implementation">qcheckbox.h</include> - <include location="global" impldecl="in implementation">qmessagebox.h</include> - <include location="global" impldecl="in implementation">qobjectlist.h</include> - <include location="global" impldecl="in implementation">qbuttongroup.h</include> - <include location="global" impldecl="in implementation">qslider.h</include> + <include location="global" impldecl="in implementation">tqcheckbox.h</include> + <include location="global" impldecl="in implementation">tqmessagebox.h</include> + <include location="global" impldecl="in implementation">tqobjectlist.h</include> + <include location="global" impldecl="in implementation">tqbuttongroup.h</include> + <include location="global" impldecl="in implementation">tqslider.h</include> <include location="global" impldecl="in implementation">kurlrequester.h</include> <include location="global" impldecl="in implementation">knuminput.h</include> - <include location="global" impldecl="in implementation">qwidgetfactory.h</include> - <include location="global" impldecl="in implementation">qspinbox.h</include> - <include location="global" impldecl="in implementation">qtextedit.h</include> + <include location="global" impldecl="in implementation">tqwidgetfactory.h</include> + <include location="global" impldecl="in implementation">tqspinbox.h</include> + <include location="global" impldecl="in implementation">tqtextedit.h</include> <include location="global" impldecl="in implementation">kurl.h</include> <include location="global" impldecl="in implementation">kcolorbutton.h</include> <include location="local" impldecl="in implementation">sq_codecsettingsskeleton.ui.h</include> </includes> <variables> - <variable access="private">QWidget *w;</variable> + <variable access="private">TQWidget *w;</variable> <variable access="private">fmt_settings *sett;</variable> </variables> -<signals> +<Q_SIGNALS> <signal>apply();</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="private" specifier="non virtual">slotApply()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> - <function specifier="non virtual">addSettingsWidget( const QString & path )</function> + <function specifier="non virtual">addSettingsWidget( const TQString & path )</function> <function access="private" specifier="non virtual">recursivelyReadWrite( fmt_settings & settings, bool r )</function> <function returnType="int">exec( fmt_settings & settings )</function> - <function specifier="non virtual">setCodecInfo( const QPixmap & pixmap, const QString & text )</function> + <function specifier="non virtual">setCodecInfo( const TQPixmap & pixmap, const TQString & text )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/ksquirrelpart/sq_codecsettingsskeleton.ui.h b/ksquirrel/ksquirrelpart/sq_codecsettingsskeleton.ui.h index 1ea9d6b..5c6433b 100644 --- a/ksquirrel/ksquirrelpart/sq_codecsettingsskeleton.ui.h +++ b/ksquirrel/ksquirrelpart/sq_codecsettingsskeleton.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -13,29 +13,29 @@ void SQ_CodecSettingsSkeleton::init() sett = 0; } -void SQ_CodecSettingsSkeleton::addSettingsWidget(const QString &path) +void SQ_CodecSettingsSkeleton::addSettingsWidget(const TQString &path) { - w = QWidgetFactory::create(path, 0, this, "skeleton_settings"); - QWidget *fake; + w = TQWidgetFactory::create(path, 0, this, "skeleton_settings"); + TQWidget *fake; if(w) - fake = w; + fake = TQT_TQWIDGET(w); else { pushApply->setEnabled(false); pushOK->setEnabled(false); - QTextEdit *t = new QTextEdit(i18n("Error loading widget from <b>%1</b>. Please check your installation or contact <a href=\"mailto:[email protected]\">[email protected]</a>").arg(path), QString::null, groupBox); + TQTextEdit *t = new TQTextEdit(i18n("Error loading widget from <b>%1</b>. Please check your installation or contact <a href=\"mailto:[email protected]\">[email protected]</a>").tqarg(path), TQString(), groupBox); t->setReadOnly(true); fake = t; } - fake->reparent(groupBox, QPoint(0,0), true); + fake->reparent(groupBox, TQPoint(0,0), true); - QGridLayout *grid = new QGridLayout(groupBox, 1, 1, 11, 6); + TQGridLayout *grid = new TQGridLayout(groupBox, 1, 1, 11, 6); grid->addMultiCellWidget(fake, 1, 1, 0, 3); - QSpacerItem *spacer = new QSpacerItem(15, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); + TQSpacerItem *spacer = new TQSpacerItem(15, 1, TQSizePolicy::Minimum, TQSizePolicy::Expanding); grid->addItem(spacer, 2, 1); } @@ -44,16 +44,16 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool if(!w) return; - QObjectList *ch = const_cast<QObjectList *>(w->children()); + TQObjectList ch = w->childrenListObject(); fmt_settings::iterator t; - for(QObjectList::iterator it = ch->begin();it != ch->end();++it) + for(TQObjectList::iterator it = ch.begin();it != ch.end();++it) { t = settings.find((*it)->name()); - if((*it)->inherits("QCheckBox")) + if((*it)->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) { - QCheckBox *c = dynamic_cast<QCheckBox *>(*it); + TQCheckBox *c = dynamic_cast<TQCheckBox *>(*it); if(c && t != settings.end()) { @@ -63,9 +63,9 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool (*t).second.bVal = c->isChecked(); } } - else if((*it)->inherits("QButtonGroup")) + else if((*it)->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING)) { - QButtonGroup *c = dynamic_cast<QButtonGroup *>(*it); + TQButtonGroup *c = dynamic_cast<TQButtonGroup *>(*it); if(c && t != settings.end()) { @@ -75,9 +75,9 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool (*t).second.iVal = c->selectedId(); } } - else if((*it)->inherits("QSlider")) + else if((*it)->inherits(TQSLIDER_OBJECT_NAME_STRING)) { - QSlider *c = dynamic_cast<QSlider *>(*it); + TQSlider *c = dynamic_cast<TQSlider *>(*it); if(c && t != settings.end()) { @@ -114,10 +114,10 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool (*t).second.dVal = d->value(); } } - // QSpinBox should be checked after KDoubleSpinBox ! - else if((*it)->inherits("QSpinBox")) + // TQSpinBox should be checked after KDoubleSpinBox ! + else if((*it)->inherits(TQSPINBOX_OBJECT_NAME_STRING)) { - QSpinBox *c = dynamic_cast<QSpinBox *>(*it); + TQSpinBox *c = dynamic_cast<TQSpinBox *>(*it); if(c && t != settings.end()) { @@ -134,9 +134,9 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool if(c && t != settings.end()) { if(r) - c->setColor(QColor((*t).second.sVal)); + c->setColor(TQColor(TQString((*t).second.sVal))); else - (*t).second.sVal = c->color().name().ascii(); + (*t).second.sVal = TQString(c->color().name()).ascii(); } } } @@ -149,16 +149,16 @@ int SQ_CodecSettingsSkeleton::exec(fmt_settings &settings) sett = &settings; - int result = QDialog::exec(); + int result = TQDialog::exec(); // save settings - if(result == QDialog::Accepted) + if(result == TQDialog::Accepted) recursivelyReadWrite(settings, false); return result; } -void SQ_CodecSettingsSkeleton::setCodecInfo( const QPixmap &pixmap, const QString &text ) +void SQ_CodecSettingsSkeleton::setCodecInfo( const TQPixmap &pixmap, const TQString &text ) { codecIcon->setPixmap(pixmap); codecName->setText(text); diff --git a/ksquirrel/ksquirrelpart/sq_config.cpp b/ksquirrel/ksquirrelpart/sq_config.cpp index 960c1af..9cc2b82 100644 --- a/ksquirrel/ksquirrelpart/sq_config.cpp +++ b/ksquirrel/ksquirrelpart/sq_config.cpp @@ -23,7 +23,7 @@ SQ_Config * SQ_Config::m_instance = 0; -SQ_Config::SQ_Config(QObject *parent) : QObject(parent) +SQ_Config::SQ_Config(TQObject *tqparent) : TQObject(tqparent) { m_instance = this; diff --git a/ksquirrel/ksquirrelpart/sq_config.h b/ksquirrel/ksquirrelpart/sq_config.h index 6f2a662..4415d18 100644 --- a/ksquirrel/ksquirrelpart/sq_config.h +++ b/ksquirrel/ksquirrelpart/sq_config.h @@ -18,7 +18,7 @@ #ifndef SQ_CONFIG_H #define SQ_CONFIG_H -#include <qobject.h> +#include <tqobject.h> #include <kconfig.h> class KConfig; @@ -27,38 +27,38 @@ class KConfig; * Class for reading/writing config file */ -class SQ_Config : public QObject +class SQ_Config : public TQObject { public: - SQ_Config(QObject *parent = 0); + SQ_Config(TQObject *tqparent = 0); ~SQ_Config(); static SQ_Config* instance() { return m_instance; } void sync(); - void setGroup(const QString &group); - bool hasGroup(const QString &group) const; - bool deleteGroup( const QString& group, bool bDeep = true, bool bGlobal = false ); - QString readEntry(const QString& pKey, const QString& aDefault = QString::null ) const; - QStringList readListEntry( const QString& pKey, char sep = ',' ) const; - int readNumEntry( const QString& pKey, int nDefault = 0 ) const; - bool readBoolEntry( const QString& pKey, bool bDefault = false ) const; - QRect readRectEntry( const QString& pKey, const QRect* pDefault = 0L ) const; - QPoint readPointEntry( const QString& pKey, const QPoint* pDefault = 0L ) const; - QSize readSizeEntry( const QString& pKey, const QSize* pDefault = 0L ) const; - double readDoubleNumEntry( const QString& pKey, double nDefault = 0.0 ) const; - QValueList<int> readIntListEntry( const QString& pKey ) const; - - void writeEntry( const QString& pKey, const QString& pValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, const QStringList &rValue, char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, int nValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, bool bValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, const QRect& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, const QPoint& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, const QSize& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, double nValue, bool bPersistent = true, bool bGlobal = false, char format = 'g', int precision = 6, bool bNLS = false ); - void writeEntry( const QString& pKey, const QValueList<int>& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void setGroup(const TQString &group); + bool hasGroup(const TQString &group) const; + bool deleteGroup( const TQString& group, bool bDeep = true, bool bGlobal = false ); + TQString readEntry(const TQString& pKey, const TQString& aDefault = TQString() ) const; + TQStringList readListEntry( const TQString& pKey, char sep = ',' ) const; + int readNumEntry( const TQString& pKey, int nDefault = 0 ) const; + bool readBoolEntry( const TQString& pKey, bool bDefault = false ) const; + TQRect readRectEntry( const TQString& pKey, const TQRect* pDefault = 0L ) const; + TQPoint readPointEntry( const TQString& pKey, const TQPoint* pDefault = 0L ) const; + TQSize readSizeEntry( const TQString& pKey, const TQSize* pDefault = 0L ) const; + double readDoubleNumEntry( const TQString& pKey, double nDefault = 0.0 ) const; + TQValueList<int> readIntListEntry( const TQString& pKey ) const; + + void writeEntry( const TQString& pKey, const TQString& pValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQStringList &rValue, char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, int nValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, bool bValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQRect& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQPoint& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQSize& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, double nValue, bool bPersistent = true, bool bGlobal = false, char format = 'g', int precision = 6, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQValueList<int>& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); private: KConfig *kconf; @@ -69,68 +69,68 @@ inline void SQ_Config::sync() { kconf->sync(); } inline -void SQ_Config::setGroup(const QString &group) { kconf->setGroup(group) ; } +void SQ_Config::setGroup(const TQString &group) { kconf->setGroup(group) ; } inline -bool SQ_Config::hasGroup(const QString &group) const { return kconf->hasGroup(group) ; } +bool SQ_Config::hasGroup(const TQString &group) const { return kconf->hasGroup(group) ; } inline -bool SQ_Config::deleteGroup(const QString& group, bool bDeep, bool bGlobal) { return kconf->deleteGroup(group, bDeep, bGlobal) ; } +bool SQ_Config::deleteGroup(const TQString& group, bool bDeep, bool bGlobal) { return kconf->deleteGroup(group, bDeep, bGlobal) ; } inline -QString SQ_Config::readEntry(const QString& pKey, const QString& aDefault) const { return kconf->readEntry(pKey, aDefault) ; } +TQString SQ_Config::readEntry(const TQString& pKey, const TQString& aDefault) const { return kconf->readEntry(pKey, aDefault) ; } inline -QStringList SQ_Config::readListEntry(const QString& pKey, char sep) const { return kconf->readListEntry(pKey, sep) ; } +TQStringList SQ_Config::readListEntry(const TQString& pKey, char sep) const { return kconf->readListEntry(pKey, sep) ; } inline -int SQ_Config::readNumEntry(const QString& pKey, int nDefault) const { return kconf->readNumEntry(pKey, nDefault) ; } +int SQ_Config::readNumEntry(const TQString& pKey, int nDefault) const { return kconf->readNumEntry(pKey, nDefault) ; } inline -bool SQ_Config::readBoolEntry(const QString& pKey, bool bDefault) const { return kconf->readBoolEntry(pKey, bDefault ) ; } +bool SQ_Config::readBoolEntry(const TQString& pKey, bool bDefault) const { return kconf->readBoolEntry(pKey, bDefault ) ; } inline -QRect SQ_Config::readRectEntry(const QString& pKey, const QRect* pDefault) const { return kconf->readRectEntry(pKey, pDefault) ; } +TQRect SQ_Config::readRectEntry(const TQString& pKey, const TQRect* pDefault) const { return kconf->readRectEntry(pKey, pDefault) ; } inline -QPoint SQ_Config::readPointEntry(const QString& pKey, const QPoint* pDefault) const { return kconf->readPointEntry(pKey, pDefault) ; } +TQPoint SQ_Config::readPointEntry(const TQString& pKey, const TQPoint* pDefault) const { return kconf->readPointEntry(pKey, pDefault) ; } inline -QSize SQ_Config::readSizeEntry(const QString& pKey, const QSize* pDefault) const { return kconf->readSizeEntry(pKey, pDefault) ; } +TQSize SQ_Config::readSizeEntry(const TQString& pKey, const TQSize* pDefault) const { return kconf->readSizeEntry(pKey, pDefault) ; } inline -double SQ_Config::readDoubleNumEntry(const QString& pKey, double nDefault) const { return kconf->readDoubleNumEntry(pKey, nDefault); } +double SQ_Config::readDoubleNumEntry(const TQString& pKey, double nDefault) const { return kconf->readDoubleNumEntry(pKey, nDefault); } inline -QValueList<int> SQ_Config::readIntListEntry( const QString& pKey ) const { return kconf->readIntListEntry(pKey); } +TQValueList<int> SQ_Config::readIntListEntry( const TQString& pKey ) const { return kconf->readIntListEntry(pKey); } /**********************************************/ inline -void SQ_Config::writeEntry(const QString& pKey, const QString& pValue, bool bPersistent, bool bGlobal, bool bNLS) { kconf->writeEntry( pKey, pValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQString& pValue, bool bPersistent, bool bGlobal, bool bNLS) { kconf->writeEntry( pKey, pValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, const QStringList &rValue, char sep, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, sep, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQStringList &rValue, char sep, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, sep, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, int nValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, nValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, int nValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, nValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, bool bValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, bValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, bool bValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, bValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, const QRect& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQRect& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, const QPoint& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQPoint& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, const QSize& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey,rValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQSize& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey,rValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry( const QString& pKey, double nValue, bool bPersistent, bool bGlobal, char format, int precision, bool bNLS) { kconf->writeEntry(pKey, nValue, bPersistent, bGlobal, format, precision, bNLS); } +void SQ_Config::writeEntry( const TQString& pKey, double nValue, bool bPersistent, bool bGlobal, char format, int precision, bool bNLS) { kconf->writeEntry(pKey, nValue, bPersistent, bGlobal, format, precision, bNLS); } inline -void SQ_Config::writeEntry( const QString& pKey, const QValueList<int>& rValue, bool bPersistent, bool bGlobal, bool bNLS) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS); } +void SQ_Config::writeEntry( const TQString& pKey, const TQValueList<int>& rValue, bool bPersistent, bool bGlobal, bool bNLS) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS); } #endif diff --git a/ksquirrel/ksquirrelpart/sq_diroperator.cpp b/ksquirrel/ksquirrelpart/sq_diroperator.cpp index bfaec38..129180f 100644 --- a/ksquirrel/ksquirrelpart/sq_diroperator.cpp +++ b/ksquirrel/ksquirrelpart/sq_diroperator.cpp @@ -25,14 +25,14 @@ SQ_DirOperator * SQ_DirOperator::m_inst = 0; -SQ_DirOperator::SQ_DirOperator(QObject *parent) : QObject(parent) +SQ_DirOperator::SQ_DirOperator(TQObject *tqparent) : TQObject(tqparent) { m_inst = this; down = new SQ_Downloader(this, "SQ_Downloader [dirop]"); - connect(down, SIGNAL(result(const KURL &)), this, SLOT(slotDownloaderResult(const KURL &))); - connect(down, SIGNAL(percents(int)), this, SLOT(slotDownloadPercents(int))); + connect(down, TQT_SIGNAL(result(const KURL &)), this, TQT_SLOT(slotDownloaderResult(const KURL &))); + connect(down, TQT_SIGNAL(percents(int)), this, TQT_SLOT(slotDownloadPercents(int))); } SQ_DirOperator::~SQ_DirOperator() @@ -64,7 +64,7 @@ void SQ_DirOperator::slotDownloaderResult(const KURL &url) void SQ_DirOperator::executePrivate(KFileItem *fi) { - QString fullpath = fi->url().path(); + TQString fullpath = fi->url().path(); if(SQ_LibraryHandler::instance()->libraryForFile(fullpath)) SQ_GLWidget::window()->startDecoding(fullpath); @@ -75,12 +75,12 @@ void SQ_DirOperator::slotDownloadPercents(int p) SQ_GLWidget::window()->setDownloadPercents(p); } -void SQ_DirOperator::del(const KURL &u, QWidget *parent) +void SQ_DirOperator::del(const KURL &u, TQWidget *tqparent) { KURL::List list; list.append(u); - KonqOperations::del(parent, KonqOperations::DEL, list); + KonqOperations::del(tqparent, KonqOperations::DEL, list); } #include "sq_diroperator.moc" diff --git a/ksquirrel/ksquirrelpart/sq_diroperator.h b/ksquirrel/ksquirrelpart/sq_diroperator.h index 0e1aa57..2c2106c 100644 --- a/ksquirrel/ksquirrelpart/sq_diroperator.h +++ b/ksquirrel/ksquirrelpart/sq_diroperator.h @@ -20,25 +20,26 @@ #include <kfileitem.h> -#include <qobject.h> +#include <tqobject.h> class SQ_Downloader; class KURL; -class SQ_DirOperator : public QObject +class SQ_DirOperator : public TQObject { Q_OBJECT + TQ_OBJECT public: - SQ_DirOperator(QObject *parent = 0); + SQ_DirOperator(TQObject *tqparent = 0); ~SQ_DirOperator(); static SQ_DirOperator* instance() { return m_inst; } void execute(KFileItem *item); - void del(const KURL &u, QWidget *parent = 0); + void del(const KURL &u, TQWidget *tqparent = 0); private: void executePrivate(KFileItem *); diff --git a/ksquirrel/ksquirrelpart/sq_downloader.cpp b/ksquirrel/ksquirrelpart/sq_downloader.cpp index 290a1d8..07759dc 100644 --- a/ksquirrel/ksquirrelpart/sq_downloader.cpp +++ b/ksquirrel/ksquirrelpart/sq_downloader.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qfile.h> +#include <tqfile.h> #include <kio/job.h> #include <kfileitem.h> @@ -30,7 +30,7 @@ #define SQ_PREDOWNLOAD_SIZE 50 -SQ_Downloader::SQ_Downloader(QObject *parent, const char *name) : QObject(parent, name), job(0), m_error(false) +SQ_Downloader::SQ_Downloader(TQObject *tqparent, const char *name) : TQObject(tqparent, name), job(0), m_error(false) { tmp = new KTempFile; tmp->setAutoDelete(true); @@ -50,7 +50,7 @@ void SQ_Downloader::start(KFileItem *fi) mURL = fi->url(); emitPercents = false; - startTime = QTime::currentTime(); + startTime = TQTime::currentTime(); size = 0; totalSize = fi->size(); @@ -66,15 +66,15 @@ void SQ_Downloader::start(KFileItem *fi) continueDownload = false; - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotDataResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotDataResult(KIO::Job *))); } -void SQ_Downloader::slotData(KIO::Job *job, const QByteArray &ba) +void SQ_Downloader::slotData(KIO::Job *job, const TQByteArray &ba) { size += ba.size(); - QFile f(tmp->name()); + TQFile f(tmp->name()); if(f.open(IO_WriteOnly | IO_Append)) { @@ -82,7 +82,7 @@ void SQ_Downloader::slotData(KIO::Job *job, const QByteArray &ba) f.close(); } - if(emitPercents || startTime.msecsTo(QTime::currentTime()) > 1000) + if(emitPercents || startTime.msecsTo(TQTime::currentTime()) > 1000) { emit percents(size); emitPercents = true; @@ -129,7 +129,7 @@ void SQ_Downloader::slotDataResult(KIO::Job *cpjob) void SQ_Downloader::clean() { - QFile f(tmp->name()); + TQFile f(tmp->name()); if(f.open(IO_WriteOnly)) f.close(); diff --git a/ksquirrel/ksquirrelpart/sq_downloader.h b/ksquirrel/ksquirrelpart/sq_downloader.h index a51649f..949af80 100644 --- a/ksquirrel/ksquirrelpart/sq_downloader.h +++ b/ksquirrel/ksquirrelpart/sq_downloader.h @@ -18,8 +18,8 @@ #ifndef SQ_DOWNLOADER_H #define SQ_DOWNLOADER_H -#include <qobject.h> -#include <qdatetime.h> +#include <tqobject.h> +#include <tqdatetime.h> #include <kurl.h> @@ -28,12 +28,13 @@ class KTempFile; namespace KIO { class Job; } -class SQ_Downloader : public QObject +class SQ_Downloader : public TQObject { Q_OBJECT + TQ_OBJECT public: - SQ_Downloader(QObject *parent = 0, const char *name = 0); + SQ_Downloader(TQObject *tqparent = 0, const char *name = 0); ~SQ_Downloader(); void start(KFileItem *fi); @@ -49,7 +50,7 @@ class SQ_Downloader : public QObject void percents(int); private slots: - void slotData(KIO::Job *job, const QByteArray &data); + void slotData(KIO::Job *job, const TQByteArray &data); void slotDataResult(KIO::Job *); private: @@ -60,7 +61,7 @@ class SQ_Downloader : public QObject bool continueDownload; bool nomime; bool m_error, m_lightmode; - QTime startTime; + TQTime startTime; bool emitPercents; }; diff --git a/ksquirrel/ksquirrelpart/sq_errorstring.cpp b/ksquirrel/ksquirrelpart/sq_errorstring.cpp index daa6b20..dcbdb90 100644 --- a/ksquirrel/ksquirrelpart/sq_errorstring.cpp +++ b/ksquirrel/ksquirrelpart/sq_errorstring.cpp @@ -25,12 +25,12 @@ SQ_ErrorString * SQ_ErrorString::m_instance = 0; -SQ_ErrorString::SQ_ErrorString(QObject *parent) : QObject(parent) +SQ_ErrorString::SQ_ErrorString(TQObject *tqparent) : TQObject(tqparent) { m_instance = this; // fill map with translated messages - messages.insert(SQE_OK, QString::fromLatin1("OK")); + messages.insert(SQE_OK, TQString::tqfromLatin1("OK")); messages.insert(SQE_R_NOFILE, i18n("cannot open file for reading")); messages.insert(SQE_R_BADFILE, i18n("file corrupted")); messages.insert(SQE_R_NOMEMORY, i18n("no memory")); @@ -47,12 +47,12 @@ SQ_ErrorString::~SQ_ErrorString() {} // Get string by error code. -QString SQ_ErrorString::string(const int code) +TQString SQ_ErrorString::string(const int code) { return messages[code]; } -QString SQ_ErrorString::stringSN(const int code) +TQString SQ_ErrorString::stringSN(const int code) { return messages[code] + '\n'; } diff --git a/ksquirrel/ksquirrelpart/sq_errorstring.h b/ksquirrel/ksquirrelpart/sq_errorstring.h index b1c4838..469fe47 100644 --- a/ksquirrel/ksquirrelpart/sq_errorstring.h +++ b/ksquirrel/ksquirrelpart/sq_errorstring.h @@ -18,8 +18,8 @@ #ifndef SQ_ERRORSTRING_H #define SQ_ERRORSTRING_H -#include <qmap.h> -#include <qobject.h> +#include <tqmap.h> +#include <tqobject.h> #include <klocale.h> @@ -30,26 +30,26 @@ * error code. */ -class SQ_ErrorString : public QObject +class SQ_ErrorString : public TQObject { public: - SQ_ErrorString(QObject *parent = 0); + SQ_ErrorString(TQObject *tqparent = 0); ~SQ_ErrorString(); /* * Get string representation of error. */ - QString string(const int code); + TQString string(const int code); /* * string() + "\n" */ - QString stringSN(const int code); + TQString stringSN(const int code); static SQ_ErrorString* instance() { return m_instance; } private: - QMap<int, QString> messages; + TQMap<int, TQString> messages; static SQ_ErrorString *m_instance; }; diff --git a/ksquirrel/ksquirrelpart/sq_externaltool.cpp b/ksquirrel/ksquirrelpart/sq_externaltool.cpp index aa349ed..aa93578 100644 --- a/ksquirrel/ksquirrelpart/sq_externaltool.cpp +++ b/ksquirrel/ksquirrelpart/sq_externaltool.cpp @@ -19,7 +19,7 @@ #include "config.h" #endif -#include <qfile.h> +#include <tqfile.h> #include <kstringhandler.h> #include <klocale.h> @@ -38,30 +38,30 @@ SQ_ExternalTool * SQ_ExternalTool::m_instance = 0; Tool::Tool() {} -Tool::Tool(const QString &pix, const QString &nam, const QString &com) +Tool::Tool(const TQString &pix, const TQString &nam, const TQString &com) { icon = pix; name = nam; command = com; } -SQ_ExternalTool::SQ_ExternalTool(QObject *parent) : QObject(parent), QValueVector<Tool>() +SQ_ExternalTool::SQ_ExternalTool(TQObject *tqparent) : TQObject(tqparent), TQValueVector<Tool>() { m_instance = this; menu = new SQ_PopupMenu(0, "External tools"); - connect(menu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowMenu())); - connect(menu, SIGNAL(activated(int)), this, SLOT(slotActivateTool(int))); + connect(menu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShowMenu())); + connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivateTool(int))); - QString str, tmp; + TQString str, tmp; SQ_Config::instance()->setGroup("External tools"); - QStringList names = SQ_Config::instance()->readListEntry("names"); - QStringList commands = SQ_Config::instance()->readListEntry("commands"); - QStringList icons = SQ_Config::instance()->readListEntry("icons"); + TQStringList names = SQ_Config::instance()->readListEntry("names"); + TQStringList commands = SQ_Config::instance()->readListEntry("commands"); + TQStringList icons = SQ_Config::instance()->readListEntry("icons"); - for(QStringList::iterator it_n = names.begin(),it_c = commands.begin(),it_i = icons.begin(); + for(TQStringList::iterator it_n = names.begin(),it_c = commands.begin(),it_i = icons.begin(); it_n != names.end() || it_c != commands.end() || it_i != icons.end(); ++it_n, ++it_c, ++it_i) { @@ -74,17 +74,17 @@ SQ_ExternalTool::~SQ_ExternalTool() delete menu; } -QString SQ_ExternalTool::toolPixmap(const int i) +TQString SQ_ExternalTool::toolPixmap(const int i) { return (*this)[i].icon; } -QString SQ_ExternalTool::toolName(const int i) +TQString SQ_ExternalTool::toolName(const int i) { return (*this)[i].name; } -QString SQ_ExternalTool::toolCommand(const int i) +TQString SQ_ExternalTool::toolCommand(const int i) { return (*this)[i].command; } @@ -127,15 +127,15 @@ void SQ_ExternalTool::writeEntries() // no tools ? if(!count()) return; - QString num; + TQString num; // delete old group with old items SQ_Config::instance()->deleteGroup("External tools"); SQ_Config::instance()->setGroup("External tools"); - QStringList names, icons, commands; + TQStringList names, icons, commands; // write items in config file - for(QValueVector<Tool>::iterator it = begin();it != end();++it) + for(TQValueVector<Tool>::iterator it = begin();it != end();++it) { names.append((*it).name); icons.append((*it).icon); @@ -168,10 +168,10 @@ void SQ_ExternalTool::slotAboutToShowMenu() } // make title shorter - QString file = KStringHandler::rsqueeze(item->name(), 30); + TQString file = KStringHandler::rsqueeze(item->name(), 30); // finally, change title - QString final = (items.count() == 1 || items.count() == 0) ? file : (file + QString::fromLatin1(" (+%1)").arg(items.count()-1)); + TQString final = (items.count() == 1 || items.count() == 0) ? file : (file + TQString::tqfromLatin1(" (+%1)").tqarg(items.count()-1)); menu->changeTitle(final); } @@ -199,10 +199,10 @@ void SQ_ExternalTool::slotActivateTool(int id) // get appropriate tool Tool *tool = &at(index); - QString comm = tool->command; + TQString comm = tool->command; - int per_f = comm.contains("%f"); - int per_F = comm.contains("%F"); + int per_f = comm.tqcontains("%f"); + int per_F = comm.tqcontains("%F"); // %f = single file // %F = multiple files @@ -219,12 +219,12 @@ void SQ_ExternalTool::slotActivateTool(int id) else if(per_f) { KURL u = list.first(); - comm.replace("%f", KShellProcess::quote(u.isLocalFile() ? u.path() : u.prettyURL())); + comm.tqreplace("%f", KShellProcess::quote(u.isLocalFile() ? u.path() : u.prettyURL())); proc << comm; } else { - QString files; + TQString files; KURL::List::iterator itEnd = list.end(); @@ -234,7 +234,7 @@ void SQ_ExternalTool::slotActivateTool(int id) files.append(" "); } - comm.replace("%F", files); + comm.tqreplace("%F", files); proc << comm; } diff --git a/ksquirrel/ksquirrelpart/sq_externaltool.h b/ksquirrel/ksquirrelpart/sq_externaltool.h index 3b1bc0a..a2c0e8a 100644 --- a/ksquirrel/ksquirrelpart/sq_externaltool.h +++ b/ksquirrel/ksquirrelpart/sq_externaltool.h @@ -18,9 +18,9 @@ #ifndef SQ_EXTERNALTOOL_H #define SQ_EXTERNALTOOL_H -#include <qstring.h> -#include <qobject.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqvaluevector.h> #include <kfileitem.h> @@ -29,10 +29,10 @@ class SQ_PopupMenu; struct Tool { Tool(); - Tool(const QString &, const QString &, const QString &); + Tool(const TQString &, const TQString &, const TQString &); - QString name, command; - QString icon; + TQString name, command; + TQString icon; }; /* @@ -40,20 +40,21 @@ struct Tool * in memory, and create popup menu where external tools been inserted. */ -class SQ_ExternalTool : public QObject, public QValueVector<Tool> +class SQ_ExternalTool : public TQObject, public TQValueVector<Tool> { Q_OBJECT + TQ_OBJECT public: - SQ_ExternalTool(QObject *parent = 0); + SQ_ExternalTool(TQObject *tqparent = 0); ~SQ_ExternalTool(); /* * Get pixmap, name or command of external tool. */ - QString toolPixmap(const int i); - QString toolName(const int i); - QString toolCommand(const int i); + TQString toolPixmap(const int i); + TQString toolName(const int i); + TQString toolCommand(const int i); void setItems(const KFileItemList &); @@ -68,7 +69,7 @@ class SQ_ExternalTool : public QObject, public QValueVector<Tool> SQ_PopupMenu* constPopupMenu() const; /* - * Write tools to config file as QStringLists + * Write tools to config file as TQStringLists */ void writeEntries(); diff --git a/ksquirrel/ksquirrelpart/sq_filedialog.cpp b/ksquirrel/ksquirrelpart/sq_filedialog.cpp index ce0eb47..6e8fb82 100644 --- a/ksquirrel/ksquirrelpart/sq_filedialog.cpp +++ b/ksquirrel/ksquirrelpart/sq_filedialog.cpp @@ -19,8 +19,8 @@ #include "sq_filedialog.h" -SQ_FileDialog::SQ_FileDialog(const QString &path, QWidget *parent) - : KFileDialog(path, QString::null, parent, "select_a_file", true) +SQ_FileDialog::SQ_FileDialog(const TQString &path, TQWidget *tqparent) + : KFileDialog(path, TQString(), tqparent, "select_a_file", true) {} SQ_FileDialog::~SQ_FileDialog() @@ -33,12 +33,12 @@ void SQ_FileDialog::updateCombo(bool enable) slotFilterChanged(); } -QString SQ_FileDialog::nameFilter() const +TQString SQ_FileDialog::nameFilter() const { return filterWidget->currentText(); } -void SQ_FileDialog::setCurrentFilter(const QString &f) +void SQ_FileDialog::setCurrentFilter(const TQString &f) { filterWidget->setCurrentFilter(f); } diff --git a/ksquirrel/ksquirrelpart/sq_filedialog.h b/ksquirrel/ksquirrelpart/sq_filedialog.h index 205b200..3c68956 100644 --- a/ksquirrel/ksquirrelpart/sq_filedialog.h +++ b/ksquirrel/ksquirrelpart/sq_filedialog.h @@ -27,13 +27,13 @@ class SQ_FileDialog : public KFileDialog { public: - SQ_FileDialog(const QString &path, QWidget *parent); + SQ_FileDialog(const TQString &path, TQWidget *tqparent); ~SQ_FileDialog(); - QString nameFilter() const; + TQString nameFilter() const; void updateCombo(bool enable); - void setCurrentFilter(const QString &); + void setCurrentFilter(const TQString &); }; #endif diff --git a/ksquirrel/ksquirrelpart/sq_glparts.cpp b/ksquirrel/ksquirrelpart/sq_glparts.cpp index 34a523d..ec55d89 100644 --- a/ksquirrel/ksquirrelpart/sq_glparts.cpp +++ b/ksquirrel/ksquirrelpart/sq_glparts.cpp @@ -196,20 +196,20 @@ void Tab::empty() sx = sy = sw = sh = 0; elapsed = 0; - wm = QWMatrix(); + wm = TQWMatrix(); glselection = -1; - srect = QRect(); + srect = TQRect(); manualBlocked = false; isflippedV = isflippedH = false; broken = false; m_original = KURL(); - File = QString::null; - m_File = QString::null; - quickImageInfo = QString::null; - fmt_ext = QString::null; + File = TQString(); + m_File = TQString(); + quickImageInfo = TQString(); + fmt_ext = TQString(); } void Tab::nullMatrix() diff --git a/ksquirrel/ksquirrelpart/sq_glparts.h b/ksquirrel/ksquirrelpart/sq_glparts.h index 3405f33..24c538c 100644 --- a/ksquirrel/ksquirrelpart/sq_glparts.h +++ b/ksquirrel/ksquirrelpart/sq_glparts.h @@ -18,10 +18,10 @@ #ifndef SQ_GLPARTS_H #define SQ_GLPARTS_H -#include <qgl.h> +#include <tqgl.h> -#include <qwmatrix.h> -#include <qrect.h> +#include <tqwmatrix.h> +#include <tqrect.h> #include <kurl.h> @@ -123,11 +123,11 @@ struct Tab GLfloat curangle; KURL m_original; - QString File, m_File, quickImageInfo; - QString fmt_ext; + TQString File, m_File, quickImageInfo; + TQString fmt_ext; - QWMatrix wm; - QRect srect; + TQWMatrix wm; + TQRect srect; int orient; int current; diff --git a/ksquirrel/ksquirrelpart/sq_glselectionpainter.cpp b/ksquirrel/ksquirrelpart/sq_glselectionpainter.cpp index 3d60389..9594f28 100644 --- a/ksquirrel/ksquirrelpart/sq_glselectionpainter.cpp +++ b/ksquirrel/ksquirrelpart/sq_glselectionpainter.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include <qbitmap.h> -#include <qpainter.h> +#include <tqbitmap.h> +#include <tqpainter.h> #include <cmath> @@ -63,10 +63,10 @@ void SQ_GLSelectionPainter::move(int x, int y) { hackXY(x, y); - int X = QMAX(x, xmoveold); - int Y = QMIN(y, ymoveold); - int Xmin = QMIN(x, xmoveold); - int Ymin = QMAX(y, ymoveold); + int X = TQMAX(x, xmoveold); + int Y = TQMIN(y, ymoveold); + int Xmin = TQMIN(x, xmoveold); + int Ymin = TQMAX(y, ymoveold); sx = Xmin; sy = Ymin; diff --git a/ksquirrel/ksquirrelpart/sq_glselectionpainter.h b/ksquirrel/ksquirrelpart/sq_glselectionpainter.h index 59a6ce2..19cec2c 100644 --- a/ksquirrel/ksquirrelpart/sq_glselectionpainter.h +++ b/ksquirrel/ksquirrelpart/sq_glselectionpainter.h @@ -18,8 +18,8 @@ #ifndef SQ_GLSELECTIONPAINTER_H #define SQ_GLSELECTIONPAINTER_H -#include <qrect.h> -#include <qpoint.h> +#include <tqrect.h> +#include <tqpoint.h> class SQ_GLWidget; @@ -41,7 +41,7 @@ class SQ_GLSelectionPainter void setSourceSize(int, int); - QPoint center() const; + TQPoint center() const; void draw(); @@ -60,14 +60,14 @@ class SQ_GLSelectionPainter void begin(Type tp, int x, int y, bool U = true); void move(int x, int y); - void setGeometry(const QRect &rc); + void setGeometry(const TQRect &rc); void end(); /* - * Selected rectangle geometry + * Selected rectangle tqgeometry */ - QPoint pos() const; - QSize size() const; + TQPoint pos() const; + TQSize size() const; private: void drawEllipse(float xradius, float yradius); @@ -86,15 +86,15 @@ class SQ_GLSelectionPainter }; inline -QPoint SQ_GLSelectionPainter::pos() const +TQPoint SQ_GLSelectionPainter::pos() const { - return valid() ? QPoint(sourcew/2 + sx, sourceh/2 - sy) : QPoint(); + return valid() ? TQPoint(sourcew/2 + sx, sourceh/2 - sy) : TQPoint(); } inline -QSize SQ_GLSelectionPainter::size() const +TQSize SQ_GLSelectionPainter::size() const { - return valid() ? QSize(sw, sh) : QSize(); + return valid() ? TQSize(sw, sh) : TQSize(); } inline @@ -104,7 +104,7 @@ int SQ_GLSelectionPainter::type() const } inline -void SQ_GLSelectionPainter::setGeometry(const QRect &rc) +void SQ_GLSelectionPainter::setGeometry(const TQRect &rc) { int X = rc.x(), Y = rc.y(); @@ -136,9 +136,9 @@ bool SQ_GLSelectionPainter::valid() const } inline -QPoint SQ_GLSelectionPainter::center() const +TQPoint SQ_GLSelectionPainter::center() const { - return QPoint(sx + sw/2, sy - sh/2); + return TQPoint(sx + sw/2, sy - sh/2); } inline diff --git a/ksquirrel/ksquirrelpart/sq_glu.h b/ksquirrel/ksquirrelpart/sq_glu.h index 9128d12..7da7a80 100644 --- a/ksquirrel/ksquirrelpart/sq_glu.h +++ b/ksquirrel/ksquirrelpart/sq_glu.h @@ -35,7 +35,7 @@ * in original GLU library - gluLookAt(). It would be better to place it * in standalone namespace, and remove -lGLU dependency at all. * - * Note: Now KSquirrel doesn't use GLU, but Qt's QGLWidget still + * Note: Now KSquirrel doesn't use GLU, but TQt's TQGLWidget still * depends on <GL/glu.h> */ diff --git a/ksquirrel/ksquirrelpart/sq_glview.cpp b/ksquirrel/ksquirrelpart/sq_glview.cpp index 7d8fbe1..3bdadbc 100644 --- a/ksquirrel/ksquirrelpart/sq_glview.cpp +++ b/ksquirrel/ksquirrelpart/sq_glview.cpp @@ -23,7 +23,7 @@ SQ_GLView * SQ_GLView::m_inst = 0; /***************************************/ -SQ_TextSetter::SQ_TextSetter(QObject *parent) : QObject(parent) +SQ_TextSetter::SQ_TextSetter(TQObject *tqparent) : TQObject(tqparent) { dest = "---"; } @@ -31,7 +31,7 @@ SQ_TextSetter::SQ_TextSetter(QObject *parent) : QObject(parent) SQ_TextSetter::~SQ_TextSetter() {} -void SQ_TextSetter::setText(const QString &s) +void SQ_TextSetter::setText(const TQString &s) { dest = s; @@ -40,7 +40,7 @@ void SQ_TextSetter::setText(const QString &s) /***************************************/ -SQ_GLView::SQ_GLView() : QObject() +SQ_GLView::SQ_GLView() : TQObject() { m_inst = this; @@ -56,15 +56,15 @@ SQ_GLView::SQ_GLView() : QObject() SQ_Setters::iterator itEnd = map.end(); for(SQ_Setters::iterator it = map.begin();it != itEnd;++it) - connect(it.data(), SIGNAL(changed()), this, SLOT(slotChanged())); + connect(it.data(), TQT_SIGNAL(changed()), this, TQT_SLOT(slotChanged())); } SQ_GLView::~SQ_GLView() {} -SQ_TextSetter* SQ_GLView::sbarWidget(const QString &name) +SQ_TextSetter* SQ_GLView::sbarWidget(const TQString &name) { - SQ_Setters::iterator it = map.find(name); + SQ_Setters::iterator it = map.tqfind(name); return (it == map.end() ? tmp : it.data()); } @@ -85,9 +85,9 @@ void SQ_GLView::resetStatusBar() void SQ_GLView::slotChanged() { - QString result; + TQString result; - static const QString &line = KGlobal::staticQString(" | "); + static const TQString &line = KGlobal::staticQString(" | "); result.append(map["SBDecoded"]->text()); result.append(line); diff --git a/ksquirrel/ksquirrelpart/sq_glview.h b/ksquirrel/ksquirrelpart/sq_glview.h index 578b6af..6f06a38 100644 --- a/ksquirrel/ksquirrelpart/sq_glview.h +++ b/ksquirrel/ksquirrelpart/sq_glview.h @@ -18,53 +18,55 @@ #ifndef SQ_GLVIEW_H #define SQ_GLVIEW_H -#include <qobject.h> -#include <qmap.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqmap.h> +#include <tqstring.h> -class SQ_TextSetter : public QObject +class SQ_TextSetter : public TQObject { Q_OBJECT + TQ_OBJECT public: - SQ_TextSetter(QObject *parent = 0); + SQ_TextSetter(TQObject *tqparent = 0); ~SQ_TextSetter(); - void setText(const QString &); + void setText(const TQString &); - QString text() const; + TQString text() const; signals: void changed(); private: - QString dest; + TQString dest; }; inline -QString SQ_TextSetter::text() const +TQString SQ_TextSetter::text() const { return dest; } /***********************************************/ -class SQ_GLView : public QObject +class SQ_GLView : public TQObject { Q_OBJECT + TQ_OBJECT public: SQ_GLView(); ~SQ_GLView(); - SQ_TextSetter* sbarWidget(const QString &); + SQ_TextSetter* sbarWidget(const TQString &); void resetStatusBar(); static SQ_GLView* window() { return m_inst; } signals: - void message(const QString &); + void message(const TQString &); private slots: void slotChanged(); @@ -72,7 +74,7 @@ class SQ_GLView : public QObject private: static SQ_GLView *m_inst; - typedef QMap<QString, SQ_TextSetter*> SQ_Setters; + typedef TQMap<TQString, SQ_TextSetter*> SQ_Setters; SQ_Setters map; SQ_TextSetter *tmp; diff --git a/ksquirrel/ksquirrelpart/sq_glwidget.cpp b/ksquirrel/ksquirrelpart/sq_glwidget.cpp index 79e5108..5c2fa4c 100644 --- a/ksquirrel/ksquirrelpart/sq_glwidget.cpp +++ b/ksquirrel/ksquirrelpart/sq_glwidget.cpp @@ -19,15 +19,15 @@ #include "config.h" #endif -#include <qeventloop.h> -#include <qstringlist.h> -#include <qfileinfo.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qdatetime.h> -#include <qslider.h> -#include <qlabel.h> +#include <tqeventloop.h> +#include <tqstringlist.h> +#include <tqfileinfo.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqdatetime.h> +#include <tqslider.h> +#include <tqlabel.h> #include <kapplication.h> #include <kaction.h> @@ -105,7 +105,7 @@ static const float SQ_ONSCREEN_LAYER = 10000.0; /* ***************************************************************************************** */ -SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, name) +SQ_GLWidget::SQ_GLWidget(TQWidget *tqparent, const char *name) : TQGLWidget(tqparent, name) { kdDebug() << "+SQ_GLWidget" << endl; @@ -113,7 +113,7 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, m_instance = this; #ifdef KSQUIRREL_PART - connect(&t_glv, SIGNAL(message(const QString &)), this, SIGNAL(message(const QString &))); + connect(&t_glv, TQT_SIGNAL(message(const TQString &)), this, TQT_SIGNAL(message(const TQString &))); #endif zoomMenu = 0; @@ -121,18 +121,18 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, images = 0; parts_broken = 0; - ac = new KActionCollection(this, this, "GLWidget actionCollection"); + ac = new KActionCollection(this, TQT_TQOBJECT(this), "GLWidget actionCollection"); changed = blocked = decoded = reset_mode = false; movetype = -1; buffer = new RGBA [512 * 512]; zoomFactor = 1.0; old_id = -1; - menu = new QPopupMenu(this); + menu = new TQPopupMenu(this); hackResizeGL = false; lastCopy = KURL::fromPathOrURL("/"); oldZoom = -1; - percentsLabel = new QLabel(this); + percentsLabel = new TQLabel(this); percentsLabel->move(4, 4); percentsLabel->hide(); @@ -147,11 +147,11 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, linear = SQ_Config::instance()->readBoolEntry("zoom_nice", true); // load background for transparent image - BGquads = QImage(locate("data", "images/checker.png")); + BGquads = TQImage(locate("data", "images/checker.png")); if(BGquads.isNull()) { - BGquads = QImage(32, 32, 32); + BGquads = TQImage(32, 32, 32); BGquads.setAlphaBuffer(true); BGquads.fill(0); } @@ -165,7 +165,7 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, // load cursors setCursor(KCursor::arrowCursor()); - setFocusPolicy(QWidget::WheelFocus); + setFocusPolicy(TQ_WheelFocus); setAcceptDrops(true); // popup menu with image pages @@ -189,25 +189,25 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, KCursor::setHideCursorDelay(2500); #ifndef KSQUIRREL_PART - timer_prev = new QTimer(this); - timer_next = new QTimer(this); + timer_prev = new TQTimer(this); + timer_next = new TQTimer(this); Q_CHECK_PTR(timer_prev); Q_CHECK_PTR(timer_next); - connect(timer_prev, SIGNAL(timeout()), SQ_WidgetStack::instance(), SLOT(emitPreviousSelected())); - connect(timer_next, SIGNAL(timeout()), SQ_WidgetStack::instance(), SLOT(emitNextSelected())); + connect(timer_prev, TQT_SIGNAL(timeout()), SQ_WidgetStack::instance(), TQT_SLOT(emitPreviousSelected())); + connect(timer_next, TQT_SIGNAL(timeout()), SQ_WidgetStack::instance(), TQT_SLOT(emitNextSelected())); #endif - timer_anim = new QTimer(this); + timer_anim = new TQTimer(this); Q_CHECK_PTR(timer_anim); - connect(timer_anim, SIGNAL(timeout()), this, SLOT(slotAnimateNext())); + connect(timer_anim, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAnimateNext())); - connect(images, SIGNAL(activated(int)), this, SLOT(slotSetCurrentImage(int))); - connect(images, SIGNAL(aboutToHide()), this, SLOT(slotImagesHidden())); - connect(images, SIGNAL(aboutToShow()), this, SLOT(slotImagesShown())); + connect(images, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetCurrentImage(int))); + connect(images, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(slotImagesHidden())); + connect(images, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotImagesShown())); gls = new SQ_GLSelectionPainter(this); } @@ -229,7 +229,7 @@ SQ_GLWidget::~SQ_GLWidget() delete tmp; } -// Initialize OpenGL context. Used internally by QGLWidget. +// Initialize OpenGL context. Used internally by TQGLWidget. void SQ_GLWidget::initializeGL() { setClearColor(); @@ -253,7 +253,7 @@ void SQ_GLWidget::initializeGL() initMarks(); } -// Resize OpenGL context. Used internally by QGLWidget. +// Resize OpenGL context. Used internally by TQGLWidget. void SQ_GLWidget::resizeGL(int width, int height) { gls->setSourceSize(width, height); @@ -321,7 +321,7 @@ void SQ_GLWidget::draw_background(void *bits, unsigned int *tex, int dim, GLfloa glEnd(); } -// Redraw OpenGL context. Used internally by QGLWidget. +// Redraw OpenGL context. Used internally by TQGLWidget. void SQ_GLWidget::paintGL() { int z; @@ -333,7 +333,7 @@ void SQ_GLWidget::paintGL() { matrix_push(); matrix_pure_reset(); - QPoint p = gls->center(); + TQPoint p = gls->center(); // move to selection center MATRIX_X = p.x(); @@ -484,17 +484,17 @@ void SQ_GLWidget::paintGL() */ void SQ_GLWidget::matrixChanged() { - QString str; + TQString str; float m = getZoom(); float fzoom = m * 100.0; float z = (m < 1.0) ? 1.0/m : m; // construct zoom - str = QString::fromLatin1("%1% [%2:%3]") - .arg(fzoom, 0, 'f', 1) - .arg((m < 1.0)?1.0:z, 0, 'f', 1) - .arg((m > 1.0)?1.0:z, 0, 'f', 1); + str = TQString::tqfromLatin1("%1% [%2:%3]") + .tqarg(fzoom, 0, 'f', 1) + .tqarg((m < 1.0)?1.0:z, 0, 'f', 1) + .tqarg((m > 1.0)?1.0:z, 0, 'f', 1); #ifndef KSQUIRREL_PART SQ_GLView::window()->sbarWidget("SBGLZoom")->setText(str); @@ -503,10 +503,10 @@ void SQ_GLWidget::matrixChanged() #endif // construct rotation angle - str = QString::fromLatin1("%1%2 %3 deg") - .arg((tab->isflippedV)?"V":"") - .arg((tab->isflippedH)?"H":"") - .arg(tab->curangle, 0, 'f', 1); + str = TQString::tqfromLatin1("%1%2 %3 deg") + .tqarg((tab->isflippedV)?"V":"") + .tqarg((tab->isflippedH)?"H":"") + .tqarg(tab->curangle, 0, 'f', 1); #ifndef KSQUIRREL_PART SQ_GLView::window()->sbarWidget("SBGLAngle")->setText(str); @@ -519,7 +519,7 @@ void SQ_GLWidget::matrixChanged() * Mouse wheel event. Let's load next/previous image, or * zoom in/zoom out (depends on settings). */ -void SQ_GLWidget::wheelEvent(QWheelEvent *e) +void SQ_GLWidget::wheelEvent(TQWheelEvent *e) { if(e->delta() < 0 && e->state() == Qt::NoButton) { @@ -548,18 +548,18 @@ void SQ_GLWidget::wheelEvent(QWheelEvent *e) } // some special bindings: // if CTRL key is pressed, zoom 2x or 0.5x - else if(e->delta() < 0 && e->state() == Qt::ControlButton) + else if(e->delta() < 0 && e->state() == TQt::ControlButton) matrix_zoom(2.0); - else if(e->delta() > 0 && e->state() == Qt::ControlButton) + else if(e->delta() > 0 && e->state() == TQt::ControlButton) matrix_zoom(0.5f); - else if(e->delta() < 0 && e->state() == Qt::ShiftButton) + else if(e->delta() < 0 && e->state() == TQt::ShiftButton) slotZoomPlus(); - else if(e->delta() > 0 && e->state() == Qt::ShiftButton) + else if(e->delta() > 0 && e->state() == TQt::ShiftButton) slotZoomMinus(); } // User pressed mouse button down. -void SQ_GLWidget::mousePressEvent(QMouseEvent *e) +void SQ_GLWidget::mousePressEvent(TQMouseEvent *e) { setFocus(); @@ -567,7 +567,7 @@ void SQ_GLWidget::mousePressEvent(QMouseEvent *e) if(e->button() == Qt::LeftButton && e->state() == Qt::NoButton && tab->glselection == -1) { #ifndef KSQUIRREL_PART - QTime t = QTime::currentTime(); + TQTime t = TQTime::currentTime(); SQ_Config::instance()->setGroup("GL view"); int dc = SQ_Config::instance()->readNumEntry("double_click", 0); @@ -593,7 +593,7 @@ void SQ_GLWidget::mousePressEvent(QMouseEvent *e) movetype = 1; } // left button + SHIFT, let's start drawing zoom frame - else if(e->button() == Qt::LeftButton && (e->state() == Qt::ShiftButton || tab->glselection != -1)) + else if(e->button() == Qt::LeftButton && (e->state() == TQt::ShiftButton || tab->glselection != -1)) { // stop animation! stopAnimation(); @@ -610,14 +610,14 @@ void SQ_GLWidget::mousePressEvent(QMouseEvent *e) } // right button - show context menu else if(e->button() == Qt::RightButton) - menu->popup(QCursor::pos()); + menu->popup(TQCursor::pos()); // middle button - toggle fullscreen state else if(e->button() == Qt::MidButton) toggleFullScreen(); } // User moved mouse. -void SQ_GLWidget::mouseMoveEvent(QMouseEvent *e) +void SQ_GLWidget::mouseMoveEvent(TQMouseEvent *e) { // user didn't press any mouse button before ? if(movetype == -1 && fullscreen()) @@ -657,7 +657,7 @@ void SQ_GLWidget::mouseMoveEvent(QMouseEvent *e) } // User released some mouse button. -void SQ_GLWidget::mouseReleaseEvent(QMouseEvent *) +void SQ_GLWidget::mouseReleaseEvent(TQMouseEvent *) { if(movetype == -1) return; @@ -670,14 +670,14 @@ void SQ_GLWidget::mouseReleaseEvent(QMouseEvent *) { setCursor(KCursor::arrowCursor()); - QSize sz = gls->size(); - QPoint pt = gls->pos(); - QRect lastRect(pt.x(), pt.y(), sz.width(), sz.height()); + TQSize sz = gls->size(); + TQPoint pt = gls->pos(); + TQRect lastRect(pt.x(), pt.y(), sz.width(), sz.height()); gls->end(); - QPoint lastC = lastRect.center(); - QPoint O(width() / 2, height() / 2); + TQPoint lastC = lastRect.center(); + TQPoint O(width() / 2, height() / 2); if(lastRect.width() > 2 && lastRect.height() > 2) { @@ -713,7 +713,7 @@ void SQ_GLWidget::mouseReleaseEvent(QMouseEvent *) * Zoom to 'r'. Will be called after somebody used right mouse button * to select zoom region. */ -bool SQ_GLWidget::zoomRect(const QRect &r) +bool SQ_GLWidget::zoomRect(const TQRect &r) { // calculate zoom factor float factor = 1.0; @@ -1204,7 +1204,7 @@ bool SQ_GLWidget::showFrames(int i, Parts *p, bool swap) void SQ_GLWidget::setupBits(Parts *p, RGBA *_buffer, int y, int x) { - QPair<int, int> pair = SQ_GLWidget::calcRealDimensions(*p, y, x); + TQPair<int, int> pair = SQ_GLWidget::calcRealDimensions(*p, y, x); int offs = p->realw * pair.second + pair.first; RGBA *orig = p->buffer->data() + offs; @@ -1219,7 +1219,7 @@ void SQ_GLWidget::setupBits(Parts *p, RGBA *_buffer, int y, int x) /* * Start decoding given image. We can call it from anywhere. */ -void SQ_GLWidget::startDecoding(const QString &file) +void SQ_GLWidget::startDecoding(const TQString &file) { #ifndef KSQUIRREL_PART if(SQ_PreviewWidget::instance()->cancel()) @@ -1240,10 +1240,10 @@ void SQ_GLWidget::startDecoding(const QString &file) images->clear(); tab->m_File = file; // original name - tab->File = QFile::encodeName(tab->m_File); // translated name + tab->File = TQFile::encodeName(tab->m_File); // translated name tab->m_original = m_original; - QFileInfo fm(file); + TQFileInfo fm(file); tab->fmt_ext = fm.extension(false); tab->fmt_size = fm.size(); @@ -1253,7 +1253,7 @@ void SQ_GLWidget::startDecoding(const QString &file) #endif if(m_expected.isEmpty()) - KApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers); + KApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); decode(); } @@ -1264,7 +1264,7 @@ void SQ_GLWidget::startDecoding(const QString &file) */ bool SQ_GLWidget::prepare() { - QString status; + TQString status; tab = &tmptab; @@ -1273,7 +1273,7 @@ bool SQ_GLWidget::prepare() if(!m_lib) { - KMessageBox::error(this, i18n("Codec for %1 format not found").arg(tab->fmt_ext)); + KMessageBox::error(this, i18n("Codec for %1 format not found").tqarg(tab->fmt_ext)); reset_mode = false; tab = tabold; return false; @@ -1378,7 +1378,7 @@ bool SQ_GLWidget::prepare() SQ_GLView::window()->addPage(KStringHandler::csqueeze(tab->m_original.fileName(), SQ_TAB_TEXT_LENGTH)); SQ_GLView::window()->tabbar()->setCurrentTab(SQ_GLView::window()->tabbar()->tabAt(lastId)); - // QTabBar::show will emit selected(int), + // TQTabBar::show will emit selected(int), // we don't want it emit tabCountChanged(); SQ_GLView::window()->tabbar()->blockSignals(false); @@ -1393,7 +1393,7 @@ bool SQ_GLWidget::prepare() tab->codeK = tab->lib->codec; // start decoding! - i = tab->codeK->read_init(tab->File); + i = tab->codeK->read_init(tab->File.ascii()); // oops, error... if(i != SQE_OK) @@ -1423,8 +1423,8 @@ void SQ_GLWidget::decode() #ifdef SQ_HAVE_KEXIF KExifData d; d.readFromFile(tab->m_File); - tab->orient = d.getImageOrientation(); - tab->wm = SQ_Utils::exifGetMatrix(QString::null, tab->orient); + tab->orient = d.getImageQt::Orientation(); + tab->wm = SQ_Utils::exifGetMatrix(TQString(), tab->orient); tab->rotate = (tab->orient == KExifData::ROT_90_HFLIP || tab->orient == KExifData::ROT_90 || tab->orient == KExifData::ROT_90_VFLIP || tab->orient == KExifData::ROT_270); @@ -1475,7 +1475,7 @@ void SQ_GLWidget::decode() // absolute evil, but should do... if(notexpected) - KApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers); + KApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); i = tab->codeK->read_next(); @@ -1498,7 +1498,7 @@ void SQ_GLWidget::decode() // find tile size SQ_GLWidget::findCloserTiles(im->w, im->h, pp.tilesx, pp.tilesy); - QPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp); + TQPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp); pp.realw = pair.first; pp.realh = pair.second; @@ -1515,7 +1515,7 @@ void SQ_GLWidget::decode() { KMessageBox::error(this, i18n("Memory allocation failed for %1 of memory") - .arg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA)))); + .tqarg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA)))); decodeFailedOn0(SQE_R_NOMEMORY); return; @@ -1598,7 +1598,7 @@ void SQ_GLWidget::decode() } } - id = images->insertItem(QString::fromLatin1("#%1 [%2x%3@%4]").arg(tab->current+1).arg(im->w).arg(im->h).arg(im->bpp)); + id = images->insertItem(TQString::tqfromLatin1("#%1 [%2x%3@%4]").tqarg(tab->current+1).tqarg(im->w).tqarg(im->h).tqarg(im->bpp)); images->setItemParameter(id, tab->current); @@ -1641,21 +1641,21 @@ void SQ_GLWidget::decode() images->setItemChecked(first_id, true); if(tab->finfo.animated) - QTimer::singleShot(tab->finfo.image[tab->current].delay, this, SLOT(slotAnimateNext())); + TQTimer::singleShot(tab->finfo.image[tab->current].delay, this, TQT_SLOT(slotAnimateNext())); } /* * Palette changed. Let's update tickmarks and background color. */ -void SQ_GLWidget::paletteChange(const QPalette &oldPalette) +void SQ_GLWidget::paletteChange(const TQPalette &oldPalette) { - QGLWidget::paletteChange(oldPalette); + TQGLWidget::paletteChange(oldPalette); SQ_Config::instance()->setGroup("GL view"); if(SQ_Config::instance()->readNumEntry("GL view background type", 1) == 0) { - QColor color = colorGroup().color(QColorGroup::Base); + TQColor color = tqcolorGroup().color(TQColorGroup::Base); qglClearColor(color); updateGL(); } @@ -1699,7 +1699,7 @@ void SQ_GLWidget::slotPrev() void SQ_GLWidget::slotZoomMenu() { - zoomMenu->exec(QCursor::pos()); + zoomMenu->exec(TQCursor::pos()); } void SQ_GLWidget::slotAnimateNext() @@ -1896,7 +1896,7 @@ void SQ_GLWidget::useBrokenImage(const int err_index) #ifndef KSQUIRREL_PART // show error message instead of file name SQ_GLView::window()->sbarWidget("SBFile")->setText(SQ_ErrorString::instance()->string(err_index)); - KSquirrel::app()->setCaption(QString::null); + KSquirrel::app()->setCaption(TQString()); #else t_glv.sbarWidget("SBFile")->setText(SQ_ErrorString::instance()->string(err_index)); #endif diff --git a/ksquirrel/ksquirrelpart/sq_glwidget.h b/ksquirrel/ksquirrelpart/sq_glwidget.h index 550a1a5..2c9ee58 100644 --- a/ksquirrel/ksquirrelpart/sq_glwidget.h +++ b/ksquirrel/ksquirrelpart/sq_glwidget.h @@ -19,10 +19,10 @@ #ifndef SQ_GLWIDGET_H #define SQ_GLWIDGET_H -#include <qimage.h> -#include <qrect.h> -#include <qpair.h> -#include <qdatetime.h> +#include <tqimage.h> +#include <tqrect.h> +#include <tqpair.h> +#include <tqdatetime.h> #include <kurl.h> @@ -57,10 +57,10 @@ class KTempFile; namespace KIO { class Job; } -class QTimer; -class QPopupMenu; -class QSlider; -class QLabel; +class TQTimer; +class TQPopupMenu; +class TQSlider; +class TQLabel; class SQ_ToolButtonPopup; class SQ_ToolButton; @@ -121,12 +121,13 @@ class SQ_ToolBar; * */ -class SQ_GLWidget : public QGLWidget +class SQ_GLWidget : public TQGLWidget { Q_OBJECT + TQ_OBJECT public: - SQ_GLWidget(QWidget *parent = 0, const char *name = 0); + SQ_GLWidget(TQWidget *tqparent = 0, const char *name = 0); ~SQ_GLWidget(); void setDownloadPercents(int); @@ -135,12 +136,12 @@ class SQ_GLWidget : public QGLWidget void setExpectedURL(const KURL &u); - QString originalURL() const; + TQString originalURL() const; /* * Start decoding given image. We can call it from anywhere. */ - void startDecoding(const QString &file); + void startDecoding(const TQString &file); void startDecoding(const KURL &url); void zoom(GLfloat); @@ -197,7 +198,7 @@ class SQ_GLWidget : public QGLWidget /* * Direct call to glInit(); */ - void glInitA() { QGLWidget::glInit(); } + void glInitA() { TQGLWidget::glInit(); } /* * Start animation, if loaded image is animated. @@ -233,7 +234,7 @@ class SQ_GLWidget : public QGLWidget /* * Next three methods should be reimplemented in - * every QGLWidget's subclass. + * every TQGLWidget's subclass. */ void initializeGL(); void paintGL(); @@ -243,12 +244,12 @@ class SQ_GLWidget : public QGLWidget * Mouse wheel event. Let's load next/previous image, or * zoom in/zoom out (depends on settings). */ - void wheelEvent(QWheelEvent *); + void wheelEvent(TQWheelEvent *); /* * Palette changed. Let's update tickmarks and background color. */ - void paletteChange(const QPalette &oldPalette); + void paletteChange(const TQPalette &oldPalette); /* * Accept drag-and-drop events. We can drop some images @@ -256,20 +257,20 @@ class SQ_GLWidget : public QGLWidget * * TODO: find first supported image and decode it ? */ - void dragEnterEvent(QDragEnterEvent *); - void dropEvent(QDropEvent *); + void dragEnterEvent(TQDragEnterEvent *); + void dropEvent(TQDropEvent *); /* * Mouse events. */ - void mousePressEvent(QMouseEvent *); - void mouseReleaseEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); + void mousePressEvent(TQMouseEvent *); + void mouseReleaseEvent(TQMouseEvent *); + void mouseMoveEvent(TQMouseEvent *); private: void copyURL(); - QImage generatePreview(); + TQImage generatePreview(); bool calcSelection(); @@ -415,7 +416,7 @@ class SQ_GLWidget : public QGLWidget * Find best tile's width and height for given width and height. */ static void findCloserTiles(int w, int h, std::vector<int> &x, std::vector<int> &y); - static QPair<int, int> calcRealDimensions(Parts &, int y = -1, int x = -1); + static TQPair<int, int> calcRealDimensions(Parts &, int y = -1, int x = -1); /* * Prepare decoding. It will find proper library for decoding, @@ -427,7 +428,7 @@ class SQ_GLWidget : public QGLWidget * Zoom to 'r'. Will be called after somebody used mouse button * to select zoom region. Return true, if zoomed. */ - bool zoomRect(const QRect &r); + bool zoomRect(const TQRect &r); /* * Bind textures, draw them and create GL lists. @@ -457,7 +458,7 @@ class SQ_GLWidget : public QGLWidget signals: void tabCountChanged(); - void message(const QString &); + void message(const TQString &); public slots: void slotPrint(); @@ -528,7 +529,7 @@ class SQ_GLWidget : public QGLWidget SQ_ToolButtonPopup *pAToolZoom, *pAToolImages; KActionCollection *ac, *acMain; - QPopupMenu *menu, *menuFile, *menuImage; + TQPopupMenu *menu, *menuFile, *menuImage; int id_saveas, id_settings, id_f5, id_f6, id_f7, id_f8, id_del, id_prop; @@ -539,12 +540,12 @@ class SQ_GLWidget : public QGLWidget // popup menu with image pages *images; - QImage BGpixmap, BGquads; + TQImage BGpixmap, BGquads; - QTimer *timer_prev, *timer_next; - QTimer *timer_anim; + TQTimer *timer_prev, *timer_next; + TQTimer *timer_anim; - QImage mm[4]; + TQImage mm[4]; fmt_image image_broken; SQ_GLSelectionPainter *gls; @@ -560,18 +561,18 @@ class SQ_GLWidget : public QGLWidget changed, marks, linear; float zoomFactor, oldZoom; RGBA *buffer; - QSlider *slider_zoom; + TQSlider *slider_zoom; KTempFile *tmp; KURL lastCopy, m_expected, m_original; - QTime clickTime, started; + TQTime clickTime, started; std::vector<Tab> tabs; Tab *tab, *tabold; Tab tmptab, taborig; bool hackResizeGL, bindChecker; - QLabel *percentsLabel; + TQLabel *percentsLabel; #ifdef KSQUIRREL_PART SQ_GLView t_glv; @@ -605,7 +606,7 @@ void SQ_GLWidget::setOriginalURL(const KURL &u) } inline -QString SQ_GLWidget::originalURL() const +TQString SQ_GLWidget::originalURL() const { return tab->m_original.isLocalFile() ? tab->m_original.path() : tab->m_original.prettyURL(); } diff --git a/ksquirrel/ksquirrelpart/sq_glwidget_helpers.cpp b/ksquirrel/ksquirrelpart/sq_glwidget_helpers.cpp index bad2d89..f501478 100644 --- a/ksquirrel/ksquirrelpart/sq_glwidget_helpers.cpp +++ b/ksquirrel/ksquirrelpart/sq_glwidget_helpers.cpp @@ -19,10 +19,10 @@ #include "config.h" #endif -#include <qwmatrix.h> -#include <qrect.h> -#include <qpoint.h> -#include <qpointarray.h> +#include <tqwmatrix.h> +#include <tqrect.h> +#include <tqpoint.h> +#include <tqpointarray.h> #include <algorithm> @@ -36,8 +36,8 @@ #include "sq_glwidget_helpers.h" -SQ_ToolButtonPopup::SQ_ToolButtonPopup(const QPixmap &pix, const QString &textLabel, KToolBar *parent) - : KToolBarButton(pix, -1, parent, 0, textLabel) +SQ_ToolButtonPopup::SQ_ToolButtonPopup(const TQPixmap &pix, const TQString &textLabel, KToolBar *tqparent) + : KToolBarButton(pix, -1, tqparent, 0, textLabel) { setFixedWidth(SQ_ToolButton::fixedWidth()); } @@ -45,9 +45,9 @@ SQ_ToolButtonPopup::SQ_ToolButtonPopup(const QPixmap &pix, const QString &textLa SQ_ToolButtonPopup::~SQ_ToolButtonPopup() {} -SQ_ToolButton::SQ_ToolButton(const QIconSet &iconSet, const QString &textLabel, - QObject *receiver, const char *slot, KToolBar *parent, const char *name) - : QToolButton(iconSet, textLabel, QString::null, receiver, slot, parent, name) +SQ_ToolButton::SQ_ToolButton(const TQIconSet &iconSet, const TQString &textLabel, + TQObject *receiver, const char *slot, KToolBar *tqparent, const char *name) + : TQToolButton(iconSet, textLabel, TQString(), receiver, slot, tqparent, name) { setFixedWidth(SQ_ToolButton::fixedWidth()); } @@ -74,7 +74,7 @@ int SQ_GLHelpers::roundAngle(int curangle) return curangle; } -void SQ_GLHelpers::subRotation(QWMatrix &wm, int curangle, int orient) +void SQ_GLHelpers::subRotation(TQWMatrix &wm, int curangle, int orient) { curangle = SQ_GLHelpers::roundAngle(curangle); @@ -106,9 +106,9 @@ void SQ_GLHelpers::subRotation(QWMatrix &wm, int curangle, int orient) } } -bool SQ_GLHelpers::normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int h, const QWMatrix &matr, int curangle, int orient) +bool SQ_GLHelpers::normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int h, const TQWMatrix &matr, int curangle, int orient) { - QWMatrix wm = matr; + TQWMatrix wm = matr; SQ_GLHelpers::subRotation(wm, curangle, orient); @@ -117,7 +117,7 @@ bool SQ_GLHelpers::normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int ax = -w/2 + sx; int ay = h/2 - sy; - QPointArray pa(4), pb; + TQPointArray pa(4), pb; pa.setPoint(0, ax, ay-sh); pa.setPoint(1, ax+sw, ay-sh); diff --git a/ksquirrel/ksquirrelpart/sq_glwidget_helpers.h b/ksquirrel/ksquirrelpart/sq_glwidget_helpers.h index a9a224a..12dacfa 100644 --- a/ksquirrel/ksquirrelpart/sq_glwidget_helpers.h +++ b/ksquirrel/ksquirrelpart/sq_glwidget_helpers.h @@ -20,7 +20,7 @@ #include <ktoolbarbutton.h> -class QWMatrix; +class TQWMatrix; class KToolBar; @@ -29,15 +29,15 @@ struct RGBA; class SQ_ToolButtonPopup : public KToolBarButton { public: - SQ_ToolButtonPopup(const QPixmap &pix, const QString &textLabel, KToolBar *parent); + SQ_ToolButtonPopup(const TQPixmap &pix, const TQString &textLabel, KToolBar *tqparent); ~SQ_ToolButtonPopup(); }; -class SQ_ToolButton : public QToolButton +class SQ_ToolButton : public TQToolButton { public: - SQ_ToolButton(const QIconSet &iconSet, const QString &textLabel, QObject *receiver, - const char *slot, KToolBar *parent, const char *name = 0); + SQ_ToolButton(const TQIconSet &iconSet, const TQString &textLabel, TQObject *receiver, + const char *slot, KToolBar *tqparent, const char *name = 0); ~SQ_ToolButton(); static int fixedWidth(); @@ -61,14 +61,14 @@ namespace SQ_GLHelpers int roundAngle(int ang); - void subRotation(QWMatrix &wm, int curangle, int orient); + void subRotation(TQWMatrix &wm, int curangle, int orient); /* * normalize selection rectangle * sx,sy are X and Y coordinates - * sw x sh is a selection geometry + * sw x sh is a selection tqgeometry */ - bool normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int h, const QWMatrix&, int curangle, int orient); + bool normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int h, const TQWMatrix&, int curangle, int orient); } #endif diff --git a/ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp b/ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp index 3926166..3a212cb 100644 --- a/ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp +++ b/ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp @@ -19,13 +19,13 @@ #include "config.h" #endif -#include <qclipboard.h> -#include <qslider.h> -#include <qdragobject.h> -#include <qtimer.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <tqclipboard.h> +#include <tqslider.h> +#include <tqdragobject.h> +#include <tqtimer.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqpaintdevicemetrics.h> #include <kapplication.h> #include <kaction.h> @@ -78,34 +78,34 @@ // Create actions void SQ_GLWidget::createActions() { - pASelectionRect = new KToggleAction(i18n("Rectangle"), QPixmap(locate("data", "images/actions/glselection_rect.png")), 0, this, SLOT(slotSelectionRect()), ac, "SQ Selection Rect"); - pASelectionEllipse = new KToggleAction(i18n("Ellipse"), QPixmap(locate("data", "images/actions/glselection_ellipse.png")), 0, this, SLOT(slotSelectionEllipse()), ac, "SQ Selection Ellipse"); - pASelectionClear = new KAction(i18n("Clear"), 0, 0, this, SLOT(slotSelectionClear()), ac, "SQ Selection Clear"); + pASelectionRect = new KToggleAction(i18n("Rectangle"), TQPixmap(locate("data", "images/actions/glselection_rect.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectionRect()), ac, "SQ Selection Rect"); + pASelectionEllipse = new KToggleAction(i18n("Ellipse"), TQPixmap(locate("data", "images/actions/glselection_ellipse.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectionEllipse()), ac, "SQ Selection Ellipse"); + pASelectionClear = new KAction(i18n("Clear"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectionClear()), ac, "SQ Selection Clear"); - pAZoomW = new KToggleAction(i18n("Fit width"), QPixmap(locate("data", "images/actions/zoomW.png")), 0, this, SLOT(slotZoomW()), ac, "SQ ZoomW"); - pAZoomH = new KToggleAction(i18n("Fit height"), QPixmap(locate("data", "images/actions/zoomH.png")), 0, this, SLOT(slotZoomH()), ac, "SQ ZoomH"); - pAZoomWH = new KToggleAction(i18n("Fit image"), QPixmap(locate("data", "images/actions/zoomWH.png")), 0, this, SLOT(slotZoomWH()), ac, "SQ ZoomWH"); - pAZoom100 = new KToggleAction(i18n("Zoom 100%"), QPixmap(locate("data", "images/actions/zoom100.png")), 0, this, SLOT(slotZoom100()), ac, "SQ Zoom100"); - pAZoomLast = new KToggleAction(i18n("Leave previous zoom"), QPixmap(locate("data", "images/actions/zoomlast.png")), 0, this, SLOT(slotZoomLast()), ac, "SQ ZoomLast"); - pAIfLess = new KToggleAction(i18n("Ignore, if image is smaller than window"), QPixmap(locate("data", "images/actions/ifless.png")), 0, 0, 0, ac, "if less"); + pAZoomW = new KToggleAction(i18n("Fit width"), TQPixmap(locate("data", "images/actions/zoomW.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomW()), ac, "SQ ZoomW"); + pAZoomH = new KToggleAction(i18n("Fit height"), TQPixmap(locate("data", "images/actions/zoomH.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomH()), ac, "SQ ZoomH"); + pAZoomWH = new KToggleAction(i18n("Fit image"), TQPixmap(locate("data", "images/actions/zoomWH.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomWH()), ac, "SQ ZoomWH"); + pAZoom100 = new KToggleAction(i18n("Zoom 100%"), TQPixmap(locate("data", "images/actions/zoom100.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoom100()), ac, "SQ Zoom100"); + pAZoomLast = new KToggleAction(i18n("Leave previous zoom"), TQPixmap(locate("data", "images/actions/zoomlast.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomLast()), ac, "SQ ZoomLast"); + pAIfLess = new KToggleAction(i18n("Ignore, if image is smaller than window"), TQPixmap(locate("data", "images/actions/ifless.png")), 0, 0, 0, ac, "if less"); - pAFull = new KToggleAction(QString::null, 0, 0, 0, ac, "SQ GL Full"); + pAFull = new KToggleAction(TQString(), 0, 0, 0, ac, "SQ GL Full"); - QString squirrel_zoom_actions = QString::fromLatin1("squirrel_zoom_actions"); + TQString squirrel_zoom_actions = TQString::tqfromLatin1("squirrel_zoom_actions"); pAZoomW->setExclusiveGroup(squirrel_zoom_actions); pAZoomH->setExclusiveGroup(squirrel_zoom_actions); pAZoomWH->setExclusiveGroup(squirrel_zoom_actions); pAZoom100->setExclusiveGroup(squirrel_zoom_actions); pAZoomLast->setExclusiveGroup(squirrel_zoom_actions); - QString squirrel_selection_type = QString::fromLatin1("squirrel_selection_type"); + TQString squirrel_selection_type = TQString::tqfromLatin1("squirrel_selection_type"); pASelectionEllipse->setExclusiveGroup(squirrel_selection_type); pASelectionRect->setExclusiveGroup(squirrel_selection_type); - connect(pAIfLess, SIGNAL(toggled(bool)), this, SLOT(slotZoomIfLess())); + connect(pAIfLess, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotZoomIfLess())); #ifndef KSQUIRREL_PART - connect(pAFull, SIGNAL(toggled(bool)), KSquirrel::app(), SLOT(slotFullScreen(bool))); + connect(pAFull, TQT_SIGNAL(toggled(bool)), KSquirrel::app(), TQT_SLOT(slotFullScreen(bool))); #endif SQ_Config::instance()->setGroup("GL view"); @@ -155,54 +155,54 @@ void SQ_GLWidget::createToolbar() } /* - * We will create QToolButtons and put them in toolbar. + * We will create TQToolButtons and put them in toolbar. * Of course, we can just KAction::plug(), BUT plugged KActions * will produce buttons, which cann't be clicked twise! I think * plugged KActions will treat our attempt as double-click, not two single-clicks. - * On the other hand, we can click QToolButton as frequently as we want. + * On the other hand, we can click TQToolButton as frequently as we want. * * Plugged KActions also don't know about autorepeat :( */ - new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_first.png")), i18n("Go to first image"), this, SLOT(slotFirst()), toolbar); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_prev.png")), i18n("Previous image"), this, SLOT(slotPrev()), toolbar); + new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_first.png")), i18n("Go to first image"), TQT_TQOBJECT(this), TQT_SLOT(slotFirst()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_prev.png")), i18n("Previous image"), TQT_TQOBJECT(this), TQT_SLOT(slotPrev()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_next.png")), i18n("Next image"), this, SLOT(slotNext()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_next.png")), i18n("Next image"), TQT_TQOBJECT(this), TQT_SLOT(slotNext()), toolbar); pATool->setAutoRepeat(true); - new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_last.png")), i18n("Go to last image"), this, SLOT(slotLast()), toolbar); + new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_last.png")), i18n("Go to last image"), TQT_TQOBJECT(this), TQT_SLOT(slotLast()), toolbar); // some toolbuttons need autorepeat... - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/zoom+.png")), i18n("Zoom +"), this, SLOT(slotZoomPlus()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/zoom+.png")), i18n("Zoom +"), TQT_TQOBJECT(this), TQT_SLOT(slotZoomPlus()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/zoom-.png")), i18n("Zoom -"), this, SLOT(slotZoomMinus()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/zoom-.png")), i18n("Zoom -"), TQT_TQOBJECT(this), TQT_SLOT(slotZoomMinus()), toolbar); pATool->setAutoRepeat(true); - pAToolZoom = new SQ_ToolButtonPopup(QPixmap(locate("data", "images/actions/zoom_template.png")), i18n("Zoom"), toolbar); + pAToolZoom = new SQ_ToolButtonPopup(TQPixmap(locate("data", "images/actions/zoom_template.png")), i18n("Zoom"), toolbar); pAToolZoom->setPopup(zoomMenu); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/rotateL.png")), i18n("Rotate left"), this, SLOT(slotRotateLeft()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/rotateL.png")), i18n("Rotate left"), TQT_TQOBJECT(this), TQT_SLOT(slotRotateLeft()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/rotateR.png")), i18n("Rotate right"), this, SLOT(slotRotateRight()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/rotateR.png")), i18n("Rotate right"), TQT_TQOBJECT(this), TQT_SLOT(slotRotateRight()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/flipV.png")), i18n("Flip vertically"), this, SLOT(slotFlipV()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/flipV.png")), i18n("Flip vertically"), TQT_TQOBJECT(this), TQT_SLOT(slotFlipV()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/flipH.png")), i18n("Flip horizontally"), this, SLOT(slotFlipH()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/flipH.png")), i18n("Flip horizontally"), TQT_TQOBJECT(this), TQT_SLOT(slotFlipH()), toolbar); pATool->setAutoRepeat(true); - new SQ_ToolButton(QPixmap(locate("data", "images/actions/reload.png")), i18n("Normalize"), this, SLOT(slotMatrixReset()), toolbar); + new SQ_ToolButton(TQPixmap(locate("data", "images/actions/reload.png")), i18n("Normalize"), TQT_TQOBJECT(this), TQT_SLOT(slotMatrixReset()), toolbar); - pAToolFull = new SQ_ToolButton(QPixmap(locate("data", "images/actions/fullscreen.png")), i18n("Fullscreen"), pAFull, SLOT(activate()), toolbar); + pAToolFull = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/fullscreen.png")), i18n("Fullscreen"), pAFull, TQT_SLOT(activate()), toolbar); pAToolFull->setToggleButton(true); - pAToolImages = new SQ_ToolButtonPopup(QPixmap(locate("data", "images/actions/images.png")), i18n("Select image"), toolbar); + pAToolImages = new SQ_ToolButtonPopup(TQPixmap(locate("data", "images/actions/images.png")), i18n("Select image"), toolbar); pAToolImages->setPopup(images); - SQ_ToolButtonPopup *pAToolSel = new SQ_ToolButtonPopup(QPixmap(locate("data", "images/actions/glselection.png")), i18n("Selection"), toolbar); + SQ_ToolButtonPopup *pAToolSel = new SQ_ToolButtonPopup(TQPixmap(locate("data", "images/actions/glselection.png")), i18n("Selection"), toolbar); pAToolSel->setPopup(selectionMenu); - pAToolQuick = new SQ_ToolButton(QPixmap(locate("data", "images/actions/configure.png")), i18n("Codec settings"), this, SLOT(slotShowCodecSettings()), toolbar); + pAToolQuick = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/configure.png")), i18n("Codec settings"), TQT_TQOBJECT(this), TQT_SLOT(slotShowCodecSettings()), toolbar); pAToolQuick->setEnabled(false); - pAToolProp = new SQ_ToolButton(QPixmap(locate("data", "images/actions/prop.png")), i18n("Image Properties"), this, SLOT(slotProperties()), toolbar); - pAToolPrint = new SQ_ToolButton(QPixmap(locate("data", "images/actions/print.png")), i18n("Print"), this, SLOT(slotPrint()), toolbar); - new SQ_ToolButton(QPixmap(locate("data", "images/actions/shownav.png")), i18n("Show navigator"), this, SLOT(slotShowNav()), toolbar); + pAToolProp = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/prop.png")), i18n("Image Properties"), TQT_TQOBJECT(this), TQT_SLOT(slotProperties()), toolbar); + pAToolPrint = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/print.png")), i18n("Print"), TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), toolbar); + new SQ_ToolButton(TQPixmap(locate("data", "images/actions/shownav.png")), i18n("Show navigator"), TQT_TQOBJECT(this), TQT_SLOT(slotShowNav()), toolbar); - slider_zoom = new QSlider(1, 38, 2, 19, Qt::Horizontal, toolbar); - slider_zoom->setTickmarks(QSlider::Below); + slider_zoom = new TQSlider(1, 38, 2, 19, Qt::Horizontal, toolbar); + slider_zoom->setTickmarks(TQSlider::Below); slider_zoom->setTickInterval(19); - connect(slider_zoom, SIGNAL(valueChanged(int)), this, SLOT(slotSetZoomPercents(int))); + connect(slider_zoom, TQT_SIGNAL(valueChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetZoomPercents(int))); toolbar->insertWidget(1000, 0, slider_zoom); toolbar->setItemAutoSized(1000); toolbar->alignItemRight(1000); @@ -220,33 +220,33 @@ void SQ_GLWidget::slotProperties() stopAnimation(); const int real_size = tab->finfo.image[tab->current].w * tab->finfo.image[tab->current].h * sizeof(RGBA); - QString sz = KIO::convertSize(real_size); - QStringList list; + TQString sz = KIO::convertSize(real_size); + TQStringList list; - QValueVector<QPair<QString,QString> > meta; + TQValueVector<TQPair<TQString,TQString> > meta; if(!tab->finfo.meta.empty()) { for(std::vector<fmt_metaentry>::iterator it = tab->finfo.meta.begin();it != tab->finfo.meta.end();++it) { - meta.append(QPair<QString,QString>((*it).group, (*it).data)); + meta.append(TQPair<TQString,TQString>((*it).group, (*it).data)); } } // save tab->current image parameters and some additioanl information // in list list << tab->quickImageInfo - << QString::fromLatin1("%1x%2").arg(tab->finfo.image[tab->current].w).arg(tab->finfo.image[tab->current].h) - << QString::fromLatin1("%1").arg(tab->finfo.image[tab->current].bpp) + << TQString::tqfromLatin1("%1x%2").tqarg(tab->finfo.image[tab->current].w).tqarg(tab->finfo.image[tab->current].h) + << TQString::tqfromLatin1("%1").tqarg(tab->finfo.image[tab->current].bpp) << tab->finfo.image[tab->current].colorspace << tab->finfo.image[tab->current].compression << sz - << QString::fromLatin1("%1").arg((double)real_size / tab->fmt_size, 0, 'f', 2) + << TQString::tqfromLatin1("%1").tqarg((double)real_size / tab->fmt_size, 0, 'f', 2) << ((tab->finfo.image[tab->current].interlaced) ? i18n("yes") : i18n("no")) - << QString::fromLatin1("%1").arg(errors) - << QString::fromLatin1("%1").arg(tab->finfo.image.size()) - << QString::fromLatin1("#%1").arg(tab->current+1) - << QString::fromLatin1("%1").arg(tab->finfo.image[tab->current].delay); + << TQString::tqfromLatin1("%1").tqarg(errors) + << TQString::tqfromLatin1("%1").tqarg(tab->finfo.image.size()) + << TQString::tqfromLatin1("#%1").tqarg(tab->current+1) + << TQString::tqfromLatin1("%1").tqarg(tab->finfo.image[tab->current].delay); // create dialog and setup it SQ_ImageProperties prop(this); @@ -304,7 +304,7 @@ void SQ_GLWidget::findCloserTiles(int w, int h, std::vector<int> &x, std::vector } } -QPair<int, int> SQ_GLWidget::calcRealDimensions(Parts &p, int y, int x) +TQPair<int, int> SQ_GLWidget::calcRealDimensions(Parts &p, int y, int x) { int rw = 0, rh = 0; int toy = y == -1 ? p.tilesy.size() : y; @@ -320,7 +320,7 @@ QPair<int, int> SQ_GLWidget::calcRealDimensions(Parts &p, int y, int x) for(std::vector<int>::iterator it = p.tilesy.begin();it != itEnd && toy--;++it) rh += (*it); - return QPair<int, int>(rw, rh); + return TQPair<int, int>(rw, rh); } void SQ_GLWidget::slotShowCodecSettings() @@ -335,13 +335,13 @@ void SQ_GLWidget::slotShowCodecSettings() SQ_CodecSettingsSkeleton skel(this); - connect(&skel, SIGNAL(apply()), this, SLOT(slotApplyCodecSettings())); + connect(&skel, TQT_SIGNAL(apply()), TQT_TQOBJECT(this), TQT_SLOT(slotApplyCodecSettings())); skel.addSettingsWidget(tab->lib->config); skel.setCodecInfo(tab->lib->mime, tab->lib->quickinfo); skel.adjustSize(); - if(skel.exec(tab->lib->settings) == QDialog::Accepted) + if(skel.exec(tab->lib->settings) == TQDialog::Accepted) tab->lib->codec->set_settings(tab->lib->settings); } @@ -352,7 +352,7 @@ void SQ_GLWidget::slotApplyCodecSettings() // new settings are already set by SQ_CodecSettingsSkeleton tab->lib->codec->set_settings(tab->lib->settings); m_original = tab->m_original; - startDecoding(QString(tab->m_File)); + startDecoding(TQString(tab->m_File)); } } @@ -392,7 +392,7 @@ void SQ_GLWidget::slotImagesShown() void SQ_GLWidget::slotShowImages() { - images->exec(QCursor::pos()); + images->exec(TQCursor::pos()); } void SQ_GLWidget::slotImagesHidden() @@ -422,7 +422,7 @@ void SQ_GLWidget::showExternalTools() SQ_ExternalTool::instance()->setItems(items); } - SQ_ExternalTool::instance()->constPopupMenu()->exec(QCursor::pos()); + SQ_ExternalTool::instance()->constPopupMenu()->exec(TQCursor::pos()); SQ_ExternalTool::instance()->constPopupMenu()->setEnabled(v_ogorogde_buzina_a_v_kieve_dzyadka); } @@ -457,8 +457,8 @@ void SQ_GLWidget::saveAs() return; SQ_Config::instance()->setGroup("GL view"); - QString lastPath = SQ_Config::instance()->readEntry("saveasPath"); - QString lastFilt = SQ_Config::instance()->readEntry("saveasFilter"); + TQString lastPath = SQ_Config::instance()->readEntry("saveasPath"); + TQString lastFilt = SQ_Config::instance()->readEntry("saveasFilter"); if(lastPath.isEmpty()) { @@ -476,7 +476,7 @@ void SQ_GLWidget::saveAs() d.setCurrentFilter(lastFilt); d.updateCombo(false); - if(d.exec() == QDialog::Rejected || d.selectedURL().isEmpty()) + if(d.exec() == TQDialog::Rejected || d.selectedURL().isEmpty()) return; KURL url = d.selectedURL(); @@ -487,13 +487,13 @@ void SQ_GLWidget::saveAs() SQ_Config::instance()->writeEntry("saveasPath", u.prettyURL()); SQ_Config::instance()->writeEntry("saveasFilter", d.nameFilter()); - QString path = url.isLocalFile() ? url.path() : tmp->name(); + TQString path = url.isLocalFile() ? url.path() : tmp->name(); SQ_LIBRARY *wlib = SQ_LibraryHandler::instance()->libraryByName(d.nameFilter()); if(!wlib || !wlib->writestatic) { - KMessageBox::error(this, i18n("Sorry, could not perform write operation\nfor codec \"%1\"").arg(d.nameFilter())); + KMessageBox::error(this, i18n("Sorry, could not perform write operation\nfor codec \"%1\"").tqarg(d.nameFilter())); return; } @@ -504,7 +504,7 @@ void SQ_GLWidget::saveAs() fmt_image im = tab->finfo.image[tab->current]; /* - * The easiest way to rotate image is to use QImage + QImage::xForm(), + * The easiest way to rotate image is to use TQImage + TQImage::xForm(), * but this method is VERY memory inefficient. We will use our own tranformation * routins... Yes, they will be a little bit slower, but they require only * one scaline in stack. @@ -558,7 +558,7 @@ void SQ_GLWidget::saveAs() opt.compression_scheme = (wlib->opt.compression_scheme & CompressionNo) ? CompressionNo : CompressionInternal; opt.compression_level = wlib->opt.compression_def; - int err = wlib->codec->write_init(QString(QFile::encodeName(path)), im2, opt); + int err = wlib->codec->write_init(TQString(TQFile::encodeName(path)).ascii(), im2, opt); if(err != SQE_OK) { @@ -605,7 +605,7 @@ void SQ_GLWidget::saveAs() // src dst perm overwrite resume progress KIO::Job *j = KIO::file_copy(path, url, -1, true, false, false); - connect(j, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyResult(KIO::Job *))); + connect(j, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyResult(KIO::Job *))); } } @@ -615,7 +615,7 @@ void SQ_GLWidget::slotCopyResult(KIO::Job *job) { if(KMessageBox::questionYesNoCancel(this, job->errorString() + '\n' + i18n("Try another location?")) == KMessageBox::Yes) { - SQ_FileDialog d(QString::null, this); + SQ_FileDialog d(TQString(), this); // set filter: writable codecs without *.* d.setFilter(SQ_LibraryHandler::instance()->allFiltersFileDialogString(false, false)); @@ -624,11 +624,11 @@ void SQ_GLWidget::slotCopyResult(KIO::Job *job) int result = d.exec(); - if(result == QDialog::Rejected || d.selectedURL().isEmpty()) + if(result == TQDialog::Rejected || d.selectedURL().isEmpty()) return; KIO::Job *j = KIO::file_copy(tmp->name(), d.selectedURL(), -1, true, false, false); - connect(j, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyResult(KIO::Job *))); + connect(j, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyResult(KIO::Job *))); } } } @@ -638,15 +638,15 @@ void SQ_GLWidget::toClipboard() if(!decoded || tab->broken) return; - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); im = im.swapRGB(); // image doesn't have extra regions if(tab->parts[tab->current].realw == tab->parts[tab->current].w && tab->parts[tab->current].realh == tab->parts[tab->current].h) - KApplication::clipboard()->setImage(im, QClipboard::Clipboard); + KApplication::tqclipboard()->setImage(im, TQClipboard::Clipboard); else - KApplication::clipboard()->setImage(im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h), QClipboard::Clipboard); + KApplication::tqclipboard()->setImage(im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h), TQClipboard::Clipboard); } void SQ_GLWidget::bcg() @@ -659,7 +659,7 @@ void SQ_GLWidget::bcg() _bcg.setPreviewImage(generatePreview()); - connect(&_bcg, SIGNAL(bcg(SQ_ImageBCGOptions *)), this, SLOT(slotBCG(SQ_ImageBCGOptions *))); + connect(&_bcg, TQT_SIGNAL(bcg(SQ_ImageBCGOptions *)), TQT_TQOBJECT(this), TQT_SLOT(slotBCG(SQ_ImageBCGOptions *))); _bcg.exec(); @@ -677,7 +677,7 @@ void SQ_GLWidget::filter() flt.setPreviewImage(generatePreview()); - connect(&flt, SIGNAL(filter(SQ_ImageFilterOptions *)), this, SLOT(slotFilter(SQ_ImageFilterOptions *))); + connect(&flt, TQT_SIGNAL(filter(SQ_ImageFilterOptions *)), TQT_TQOBJECT(this), TQT_SLOT(slotFilter(SQ_ImageFilterOptions *))); flt.exec(); @@ -687,8 +687,8 @@ void SQ_GLWidget::filter() void SQ_GLWidget::slotFilter(SQ_ImageFilterOptions *filtopt) { - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); - QImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im; + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); + TQImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im; fmt_filters::image image = gls->valid() ? fmt_filters::image((unsigned char *)img.bits(), img.width(), img.height()) @@ -731,8 +731,8 @@ void SQ_GLWidget::slotFilter(SQ_ImageFilterOptions *filtopt) void SQ_GLWidget::slotBCG(SQ_ImageBCGOptions *bcgopt) { - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); - QImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im; + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); + TQImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im; fmt_filters::image image = gls->valid() ? fmt_filters::image((unsigned char *)img.bits(), img.width(), img.height()) @@ -758,8 +758,8 @@ void SQ_GLWidget::slotBCG(SQ_ImageBCGOptions *bcgopt) bool SQ_GLWidget::calcSelection() { - QSize sz = gls->size(); - QPoint pt = gls->pos(); + TQSize sz = gls->size(); + TQPoint pt = gls->pos(); float z = getZoom(); float x = pt.x(), y = pt.y(), w = sz.width(), h = sz.height(); @@ -788,7 +788,7 @@ bool SQ_GLWidget::calcSelection() (int)tab->curangle, tab->orient)) { - tab->srect = QRect(pt, sz); + tab->srect = TQRect(pt, sz); tab->sx = sx; tab->sy = sy; tab->sw = sw; @@ -801,10 +801,10 @@ bool SQ_GLWidget::calcSelection() return true; } -QImage SQ_GLWidget::generatePreview() +TQImage SQ_GLWidget::generatePreview() { - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); - QImage img, ret; + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); + TQImage img, ret; if(gls->valid() && calcSelection()) img = im.copy(tab->sx, tab->sy, tab->sw, tab->sh); @@ -818,7 +818,7 @@ QImage SQ_GLWidget::generatePreview() ret = SQ_Utils::scaleImage((unsigned char *)img.bits(), img.width(), img.height(), 160).swapRGB(); - SQ_Utils::exifRotate(QString::null, ret, tab->orient); + SQ_Utils::exifRotate(TQString(), ret, tab->orient); return ret; } @@ -844,16 +844,16 @@ void SQ_GLWidget::slotShowNav() void SQ_GLWidget::initAccelsAndMenu() { - QPopupMenu *menuRotate = new QPopupMenu(menu); - QPopupMenu *menuZoom = new QPopupMenu(menu); - QPopupMenu *menuMove = new QPopupMenu(menu); + TQPopupMenu *menuRotate = new TQPopupMenu(menu); + TQPopupMenu *menuZoom = new TQPopupMenu(menu); + TQPopupMenu *menuMove = new TQPopupMenu(menu); #ifndef KSQUIRREL_PART - QPopupMenu *menuWindow = new QPopupMenu(menu); + TQPopupMenu *menuWindow = new TQPopupMenu(menu); #endif - menuImage = new QPopupMenu(menu); - menuFile = new QPopupMenu(menu); + menuImage = new TQPopupMenu(menu); + menuFile = new TQPopupMenu(menu); menu->insertItem(SQ_IconLoader::instance()->loadIcon("icons", KIcon::Desktop, KIcon::SizeSmall), i18n("File"), menuFile); menu->insertItem(SQ_IconLoader::instance()->loadIcon("view_orientation", KIcon::Desktop, KIcon::SizeSmall), i18n("Rotate"), menuRotate); @@ -867,192 +867,192 @@ void SQ_GLWidget::initAccelsAndMenu() menu->insertItem(i18n("Image"), menuImage); #define SQ_ADD_KACTION(b) \ - (new KAction(QString::null, b, this, SLOT(slotAccelActivated()), ac, QString::fromLatin1("action_%1").arg(b))) + (new KAction(TQString(), b, TQT_TQOBJECT(this), TQT_SLOT(slotAccelActivated()), ac, TQString::tqfromLatin1("action_%1").tqarg(b))) - id_saveas = menuFile->insertItem(SQ_IconLoader::instance()->loadIcon("filesaveas", KIcon::Desktop, KIcon::SizeSmall), i18n("Save As...") + "\tS", SQ_ADD_KACTION(Qt::Key_S), SLOT(activate())); + id_saveas = menuFile->insertItem(SQ_IconLoader::instance()->loadIcon("filesaveas", KIcon::Desktop, KIcon::SizeSmall), i18n("Save As...") + "\tS", SQ_ADD_KACTION(TQt::Key_S), TQT_SLOT(activate())); #ifndef KSQUIRREL_PART menuFile->insertSeparator(); - menuFile->insertItem(QPixmap(locate("data", "images/menu/next16.png")), i18n("Next") + "\tPageDown", SQ_ADD_KACTION(Qt::Key_PageDown), SLOT(activate())); - menuFile->insertItem(QPixmap(locate("data", "images/menu/prev16.png")), i18n("Previous") + "\tPageUp", SQ_ADD_KACTION(Qt::Key_PageUp), SLOT(activate())); - menuFile->insertItem(QPixmap(locate("data", "images/menu/first16.png")), i18n("First") + "\tHome", SQ_ADD_KACTION(Qt::Key_Home), SLOT(activate())); - menuFile->insertItem(QPixmap(locate("data", "images/menu/last16.png")), i18n("Last") + "\tEnd", SQ_ADD_KACTION(Qt::Key_End), SLOT(activate())); + menuFile->insertItem(TQPixmap(locate("data", "images/menu/next16.png")), i18n("Next") + "\tPageDown", SQ_ADD_KACTION(TQt::Key_PageDown), TQT_SLOT(activate())); + menuFile->insertItem(TQPixmap(locate("data", "images/menu/prev16.png")), i18n("Previous") + "\tPageUp", SQ_ADD_KACTION(TQt::Key_PageUp), TQT_SLOT(activate())); + menuFile->insertItem(TQPixmap(locate("data", "images/menu/first16.png")), i18n("First") + "\tHome", SQ_ADD_KACTION(TQt::Key_Home), TQT_SLOT(activate())); + menuFile->insertItem(TQPixmap(locate("data", "images/menu/last16.png")), i18n("Last") + "\tEnd", SQ_ADD_KACTION(TQt::Key_End), TQT_SLOT(activate())); #endif menuFile->insertSeparator(); - id_f5 = menuFile->insertItem(i18n("Copy to...") + "\tF5", SQ_ADD_KACTION(Qt::Key_F5), SLOT(activate())); - id_f6 = menuFile->insertItem(i18n("Move to...") + "\tF6", SQ_ADD_KACTION(Qt::Key_F7), SLOT(activate())); - id_f7 = menuFile->insertItem(i18n("Copy to last folder") + "\tF7", SQ_ADD_KACTION(Qt::Key_F6), SLOT(activate())); - id_f8 = menuFile->insertItem(i18n("Move to last folder") + "\tF8", SQ_ADD_KACTION(Qt::Key_F8), SLOT(activate())); + id_f5 = menuFile->insertItem(i18n("Copy to...") + "\tF5", SQ_ADD_KACTION(TQt::Key_F5), TQT_SLOT(activate())); + id_f6 = menuFile->insertItem(i18n("Move to...") + "\tF6", SQ_ADD_KACTION(TQt::Key_F7), TQT_SLOT(activate())); + id_f7 = menuFile->insertItem(i18n("Copy to last folder") + "\tF7", SQ_ADD_KACTION(TQt::Key_F6), TQT_SLOT(activate())); + id_f8 = menuFile->insertItem(i18n("Move to last folder") + "\tF8", SQ_ADD_KACTION(TQt::Key_F8), TQT_SLOT(activate())); menuFile->insertSeparator(); - id_del = menuFile->insertItem(i18n("Delete") + "\tDelete", SQ_ADD_KACTION(Qt::Key_Delete), SLOT(activate())); + id_del = menuFile->insertItem(i18n("Delete") + "\tDelete", SQ_ADD_KACTION(TQt::Key_Delete), TQT_SLOT(activate())); - menuRotate->insertItem(QPixmap(locate("data", "images/menu/rotateLeft16.png")), i18n("Rotate left") + "\tCtrl+Left", SQ_ADD_KACTION(Qt::Key_Left+CTRL), SLOT(activate())); - menuRotate->insertItem(QPixmap(locate("data", "images/menu/rotateRight16.png")), i18n("Rotate right") + "\tCtrl+Right", SQ_ADD_KACTION(Qt::Key_Right+CTRL), SLOT(activate())); + menuRotate->insertItem(TQPixmap(locate("data", "images/menu/rotateLeft16.png")), i18n("Rotate left") + "\tCtrl+Left", SQ_ADD_KACTION(TQt::Key_Left+CTRL), TQT_SLOT(activate())); + menuRotate->insertItem(TQPixmap(locate("data", "images/menu/rotateRight16.png")), i18n("Rotate right") + "\tCtrl+Right", SQ_ADD_KACTION(TQt::Key_Right+CTRL), TQT_SLOT(activate())); menuRotate->insertSeparator(); - menuRotate->insertItem(QPixmap(locate("data", "images/menu/18016.png")), i18n("Rotate 180'") + "\tCtrl+Up", SQ_ADD_KACTION(Qt::Key_Up+CTRL), SLOT(activate())); + menuRotate->insertItem(TQPixmap(locate("data", "images/menu/18016.png")), i18n("Rotate 180'") + "\tCtrl+Up", SQ_ADD_KACTION(TQt::Key_Up+CTRL), TQT_SLOT(activate())); menuRotate->insertSeparator(); - menuRotate->insertItem(i18n("Rotate 1' left") + "\tAlt+Left", SQ_ADD_KACTION(Qt::Key_Left+ALT), SLOT(activate())); - menuRotate->insertItem(i18n("Rotate 1' right") + "\tAlt+Right", SQ_ADD_KACTION(Qt::Key_Right+ALT), SLOT(activate())); + menuRotate->insertItem(i18n("Rotate 1' left") + "\tAlt+Left", SQ_ADD_KACTION(TQt::Key_Left+ALT), TQT_SLOT(activate())); + menuRotate->insertItem(i18n("Rotate 1' right") + "\tAlt+Right", SQ_ADD_KACTION(TQt::Key_Right+ALT), TQT_SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom+16.png")), i18n("Zoom +") + "\t+", SQ_ADD_KACTION(Qt::Key_Plus), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom-16.png")), i18n("Zoom -") + "\t-", SQ_ADD_KACTION(Qt::Key_Minus), SLOT(activate())); - menuZoom->insertItem(i18n("Zoom 2x") + "\tCtrl++", SQ_ADD_KACTION(Qt::Key_Plus+CTRL), SLOT(activate())); - menuZoom->insertItem(i18n("Zoom 1/2x") + "\tCtrl+-", SQ_ADD_KACTION(Qt::Key_Minus+CTRL), SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom+16.png")), i18n("Zoom +") + "\t+", SQ_ADD_KACTION(TQt::Key_Plus), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom-16.png")), i18n("Zoom -") + "\t-", SQ_ADD_KACTION(TQt::Key_Minus), TQT_SLOT(activate())); + menuZoom->insertItem(i18n("Zoom 2x") + "\tCtrl++", SQ_ADD_KACTION(TQt::Key_Plus+CTRL), TQT_SLOT(activate())); + menuZoom->insertItem(i18n("Zoom 1/2x") + "\tCtrl+-", SQ_ADD_KACTION(TQt::Key_Minus+CTRL), TQT_SLOT(activate())); menuZoom->insertSeparator(); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom10016.png")), QString::fromLatin1("100%") + "\t1", SQ_ADD_KACTION(Qt::Key_1), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom20016.png")), QString::fromLatin1("200%") + "\t2", SQ_ADD_KACTION(Qt::Key_2), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom30016.png")), QString::fromLatin1("300%") + "\t3", SQ_ADD_KACTION(Qt::Key_3), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom50016.png")), QString::fromLatin1("500%") + "\t5", SQ_ADD_KACTION(Qt::Key_5), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom70016.png")), QString::fromLatin1("700%") + "\t7", SQ_ADD_KACTION(Qt::Key_7), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom90016.png")), QString::fromLatin1("900%") + "\t9", SQ_ADD_KACTION(Qt::Key_9), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom100016.png")), QString::fromLatin1("1000%") + "\t0", SQ_ADD_KACTION(Qt::Key_0), SLOT(activate())); - - menuMove->insertItem(QPixmap(locate("data", "images/menu/moveLeft16.png")), i18n("Move left") + "\tRight", SQ_ADD_KACTION(Qt::Key_Right), SLOT(activate())); - menuMove->insertItem(QPixmap(locate("data", "images/menu/moveRight16.png")), i18n("Move right") + "\tLeft", SQ_ADD_KACTION(Qt::Key_Left), SLOT(activate())); - menuMove->insertItem(QPixmap(locate("data", "images/menu/moveUp16.png")), i18n("Move up") + "\tDown", SQ_ADD_KACTION(Qt::Key_Down), SLOT(activate())); - menuMove->insertItem(QPixmap(locate("data", "images/menu/moveDown16.png")), i18n("Move down") + "\tUp", SQ_ADD_KACTION(Qt::Key_Up), SLOT(activate())); - - menuImage->insertItem(QPixmap(locate("data", "images/menu/animate16.png")), i18n("Start/stop animation") + "\tA", SQ_ADD_KACTION(Qt::Key_A), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/background16.png")), i18n("Hide/show background") + "\tB", SQ_ADD_KACTION(Qt::Key_B), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/tickmarks16.png")), i18n("Hide/show tickmarks") + "\tK", SQ_ADD_KACTION(Qt::Key_K), SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom10016.png")), TQString::tqfromLatin1("100%") + "\t1", SQ_ADD_KACTION(TQt::Key_1), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom20016.png")), TQString::tqfromLatin1("200%") + "\t2", SQ_ADD_KACTION(TQt::Key_2), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom30016.png")), TQString::tqfromLatin1("300%") + "\t3", SQ_ADD_KACTION(TQt::Key_3), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom50016.png")), TQString::tqfromLatin1("500%") + "\t5", SQ_ADD_KACTION(TQt::Key_5), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom70016.png")), TQString::tqfromLatin1("700%") + "\t7", SQ_ADD_KACTION(TQt::Key_7), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom90016.png")), TQString::tqfromLatin1("900%") + "\t9", SQ_ADD_KACTION(TQt::Key_9), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom100016.png")), TQString::tqfromLatin1("1000%") + "\t0", SQ_ADD_KACTION(TQt::Key_0), TQT_SLOT(activate())); + + menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveLeft16.png")), i18n("Move left") + "\tRight", SQ_ADD_KACTION(TQt::Key_Right), TQT_SLOT(activate())); + menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveRight16.png")), i18n("Move right") + "\tLeft", SQ_ADD_KACTION(TQt::Key_Left), TQT_SLOT(activate())); + menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveUp16.png")), i18n("Move up") + "\tDown", SQ_ADD_KACTION(TQt::Key_Down), TQT_SLOT(activate())); + menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveDown16.png")), i18n("Move down") + "\tUp", SQ_ADD_KACTION(TQt::Key_Up), TQT_SLOT(activate())); + + menuImage->insertItem(TQPixmap(locate("data", "images/menu/animate16.png")), i18n("Start/stop animation") + "\tA", SQ_ADD_KACTION(TQt::Key_A), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/background16.png")), i18n("Hide/show background") + "\tB", SQ_ADD_KACTION(TQt::Key_B), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/tickmarks16.png")), i18n("Hide/show tickmarks") + "\tK", SQ_ADD_KACTION(TQt::Key_K), TQT_SLOT(activate())); menuImage->insertSeparator(); - menuImage->insertItem(QPixmap(locate("data", "images/menu/flipV16.png")), i18n("Flip vertically") + "\tV", SQ_ADD_KACTION(Qt::Key_V), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/flipH16.png")), i18n("Flip horizontally") + "\tH", SQ_ADD_KACTION(Qt::Key_H), SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/flipV16.png")), i18n("Flip vertically") + "\tV", SQ_ADD_KACTION(TQt::Key_V), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/flipH16.png")), i18n("Flip horizontally") + "\tH", SQ_ADD_KACTION(TQt::Key_H), TQT_SLOT(activate())); menuImage->insertSeparator(); - menuImage->insertItem(QPixmap(locate("data", "images/menu/page116.png")), i18n("First page") + "\tF1", SQ_ADD_KACTION(Qt::Key_F1), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/page216.png")), i18n("Previous page") + "\tF2", SQ_ADD_KACTION(Qt::Key_F2), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/page316.png")), i18n("Next page") + "\tF3", SQ_ADD_KACTION(Qt::Key_F3), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/page416.png")), i18n("Last page") + "\tF4", SQ_ADD_KACTION(Qt::Key_F4), SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/page116.png")), i18n("First page") + "\tF1", SQ_ADD_KACTION(TQt::Key_F1), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/page216.png")), i18n("Previous page") + "\tF2", SQ_ADD_KACTION(TQt::Key_F2), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/page316.png")), i18n("Next page") + "\tF3", SQ_ADD_KACTION(TQt::Key_F3), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/page416.png")), i18n("Last page") + "\tF4", SQ_ADD_KACTION(TQt::Key_F4), TQT_SLOT(activate())); menuImage->insertSeparator(); - menuImage->insertItem(i18n("Copy file url") + "\tF9", SQ_ADD_KACTION(Qt::Key_F9), SLOT(activate())); - menuImage->insertItem(i18n("To clipboard") + "\tQ", SQ_ADD_KACTION(Qt::Key_Q), SLOT(activate())); - menuImage->insertItem(i18n("Print") + "\tCtrl+P", SQ_ADD_KACTION(Qt::Key_P+CTRL), SLOT(activate())); + menuImage->insertItem(i18n("Copy file url") + "\tF9", SQ_ADD_KACTION(TQt::Key_F9), TQT_SLOT(activate())); + menuImage->insertItem(i18n("To clipboard") + "\tQ", SQ_ADD_KACTION(TQt::Key_Q), TQT_SLOT(activate())); + menuImage->insertItem(i18n("Print") + "\tCtrl+P", SQ_ADD_KACTION(TQt::Key_P+CTRL), TQT_SLOT(activate())); menuImage->insertSeparator(); - id_settings = menuImage->insertItem(SQ_IconLoader::instance()->loadIcon("configure", KIcon::Desktop, KIcon::SizeSmall), i18n("Codec settings") + "\tC", SQ_ADD_KACTION(Qt::Key_C), SLOT(activate())); + id_settings = menuImage->insertItem(SQ_IconLoader::instance()->loadIcon("configure", KIcon::Desktop, KIcon::SizeSmall), i18n("Codec settings") + "\tC", SQ_ADD_KACTION(TQt::Key_C), TQT_SLOT(activate())); menuImage->setItemEnabled(id_settings, false); menuImage->insertSeparator(); - menuImage->insertItem(i18n("Color balance...") + "\tD", SQ_ADD_KACTION(Qt::Key_D), SLOT(activate())); - menuImage->insertItem(i18n("Apply filter...") + "\tU", SQ_ADD_KACTION(Qt::Key_U), SLOT(activate())); + menuImage->insertItem(i18n("Color balance...") + "\tD", SQ_ADD_KACTION(TQt::Key_D), TQT_SLOT(activate())); + menuImage->insertItem(i18n("Apply filter...") + "\tU", SQ_ADD_KACTION(TQt::Key_U), TQT_SLOT(activate())); - menuImage->insertItem(i18n("Crop") + "\tY", SQ_ADD_KACTION(Qt::Key_Y), SLOT(activate())); + menuImage->insertItem(i18n("Crop") + "\tY", SQ_ADD_KACTION(TQt::Key_Y), TQT_SLOT(activate())); #ifndef KSQUIRREL_PART - menuWindow->insertItem(QPixmap(locate("data", "images/menu/fullscreen16.png")), i18n("Fullscreen") + "\tF", SQ_ADD_KACTION(Qt::Key_F), SLOT(activate())); + menuWindow->insertItem(TQPixmap(locate("data", "images/menu/fullscreen16.png")), i18n("Fullscreen") + "\tF", SQ_ADD_KACTION(TQt::Key_F), TQT_SLOT(activate())); menuWindow->insertSeparator(); - menuWindow->insertItem(i18n("Previous tab") + "\tShift+Left", SQ_ADD_KACTION(Qt::Key_Left+SHIFT), SLOT(activate())); - menuWindow->insertItem(i18n("Next tab") + "\tShift+Right", SQ_ADD_KACTION(Qt::Key_Right+SHIFT), SLOT(activate())); + menuWindow->insertItem(i18n("Previous tab") + "\tShift+Left", SQ_ADD_KACTION(TQt::Key_Left+SHIFT), TQT_SLOT(activate())); + menuWindow->insertItem(i18n("Next tab") + "\tShift+Right", SQ_ADD_KACTION(TQt::Key_Right+SHIFT), TQT_SLOT(activate())); menuWindow->insertSeparator(); - menuWindow->insertItem(i18n("Close tab") + "\tW", SQ_ADD_KACTION(Qt::Key_W), SLOT(activate())); + menuWindow->insertItem(i18n("Close tab") + "\tW", SQ_ADD_KACTION(TQt::Key_W), TQT_SLOT(activate())); - menuWindow->insertItem(i18n("Close all tabs") + "\tCtrl+W", SQ_ADD_KACTION(Qt::Key_W+CTRL), SLOT(activate())); + menuWindow->insertItem(i18n("Close all tabs") + "\tCtrl+W", SQ_ADD_KACTION(TQt::Key_W+CTRL), TQT_SLOT(activate())); #endif menu->insertSeparator(); - menu->insertItem(QPixmap(locate("data", "images/menu/reset16.png")), i18n("Reset") + "\tR", SQ_ADD_KACTION(Qt::Key_R), SLOT(activate())); - id_prop = menu->insertItem(QPixmap(locate("data", "images/menu/prop16.png")), i18n("Properties") + "\tP", SQ_ADD_KACTION(Qt::Key_P), SLOT(activate())); + menu->insertItem(TQPixmap(locate("data", "images/menu/reset16.png")), i18n("Reset") + "\tR", SQ_ADD_KACTION(TQt::Key_R), TQT_SLOT(activate())); + id_prop = menu->insertItem(TQPixmap(locate("data", "images/menu/prop16.png")), i18n("Properties") + "\tP", SQ_ADD_KACTION(TQt::Key_P), TQT_SLOT(activate())); menu->insertSeparator(); - menu->insertItem(i18n("Hotkeys") + "\t/", SQ_ADD_KACTION(Qt::Key_Slash), SLOT(activate())); + menu->insertItem(i18n("Hotkeys") + "\t/", SQ_ADD_KACTION(TQt::Key_Slash), TQT_SLOT(activate())); #ifndef KSQUIRREL_PART menu->insertSeparator(); - menu->insertItem(QPixmap(locate("data", "images/menu/close16.png")), i18n("Close") + "\tX", SQ_ADD_KACTION(Qt::Key_X), SLOT(activate())); + menu->insertItem(TQPixmap(locate("data", "images/menu/close16.png")), i18n("Close") + "\tX", SQ_ADD_KACTION(TQt::Key_X), TQT_SLOT(activate())); #endif - SQ_ADD_KACTION(Qt::Key_Down+CTRL); - SQ_ADD_KACTION(Qt::Key_Equal); - SQ_ADD_KACTION(Qt::Key_Equal+CTRL); - SQ_ADD_KACTION(Qt::Key_N); - SQ_ADD_KACTION(Qt::Key_Space); - SQ_ADD_KACTION(Qt::Key_BackSpace); - SQ_ADD_KACTION(Qt::Key_Escape); - SQ_ADD_KACTION(Qt::Key_Return); - SQ_ADD_KACTION(Qt::Key_Enter); - SQ_ADD_KACTION(Qt::Key_Z); - SQ_ADD_KACTION(Qt::Key_I); - SQ_ADD_KACTION(Qt::Key_E); + SQ_ADD_KACTION(TQt::Key_Down+CTRL); + SQ_ADD_KACTION(TQt::Key_Equal); + SQ_ADD_KACTION(TQt::Key_Equal+CTRL); + SQ_ADD_KACTION(TQt::Key_N); + SQ_ADD_KACTION(TQt::Key_Space); + SQ_ADD_KACTION(TQt::Key_BackSpace); + SQ_ADD_KACTION(TQt::Key_Escape); + SQ_ADD_KACTION(TQt::Key_Return); + SQ_ADD_KACTION(TQt::Key_Enter); + SQ_ADD_KACTION(TQt::Key_Z); + SQ_ADD_KACTION(TQt::Key_I); + SQ_ADD_KACTION(TQt::Key_E); #ifndef KSQUIRREL_PART - SQ_ADD_KACTION(Qt::Key_R+CTRL); - SQ_ADD_KACTION(Qt::Key_E+CTRL); - SQ_ADD_KACTION(Qt::Key_C+CTRL); + SQ_ADD_KACTION(TQt::Key_R+CTRL); + SQ_ADD_KACTION(TQt::Key_E+CTRL); + SQ_ADD_KACTION(TQt::Key_C+CTRL); #endif - SQ_ADD_KACTION(Qt::Key_Menu); - SQ_ADD_KACTION(Qt::Key_M); - SQ_ADD_KACTION(Qt::Key_4); - SQ_ADD_KACTION(Qt::Key_6); - SQ_ADD_KACTION(Qt::Key_8); - SQ_ADD_KACTION(Qt::Key_Comma); - SQ_ADD_KACTION(Qt::Key_Period); - SQ_ADD_KACTION(Qt::Key_Asterisk); - SQ_ADD_KACTION(Qt::Key_L); + SQ_ADD_KACTION(TQt::Key_Menu); + SQ_ADD_KACTION(TQt::Key_M); + SQ_ADD_KACTION(TQt::Key_4); + SQ_ADD_KACTION(TQt::Key_6); + SQ_ADD_KACTION(TQt::Key_8); + SQ_ADD_KACTION(TQt::Key_Comma); + SQ_ADD_KACTION(TQt::Key_Period); + SQ_ADD_KACTION(TQt::Key_Asterisk); + SQ_ADD_KACTION(TQt::Key_L); } void SQ_GLWidget::slotAccelActivated() { - KAction *accel = static_cast<KAction *>(const_cast<QObject *>(sender())); + KAction *accel = static_cast<KAction *>(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME *>(sender()))); KShortcut ks = accel->shortcut(); - if(!ks.compare(Qt::Key_Left)) matrix_move(movefactor, 0); - else if(!ks.compare(Qt::Key_Right)) matrix_move(-movefactor, 0); - else if(!ks.compare(Qt::Key_Up)) matrix_move(0, -movefactor); - else if(!ks.compare(Qt::Key_Down)) matrix_move(0, movefactor); - else if(!ks.compare(Qt::Key_Equal) || - !ks.compare(Qt::Key_Plus)) slotZoomPlus(); - else if(!ks.compare(Qt::Key_Minus)) slotZoomMinus(); - else if(!ks.compare(Qt::Key_Equal+CTRL) || - !ks.compare(Qt::Key_Plus+CTRL)) matrix_zoom(2.0f); - else if(!ks.compare(Qt::Key_Minus+CTRL)) matrix_zoom(0.5f); - else if(!ks.compare(Qt::Key_Q)) toClipboard(); - else if(!ks.compare(Qt::Key_V)) slotFlipV(); - else if(!ks.compare(Qt::Key_H)) slotFlipH(); - else if(!ks.compare(Qt::Key_Left+CTRL)) slotRotateLeft(); - else if(!ks.compare(Qt::Key_Right+CTRL)) slotRotateRight(); - else if(!ks.compare(Qt::Key_R)) slotMatrixReset(); - else if(!ks.compare(Qt::Key_Up+CTRL)) matrix_rotate(180.0f); - else if(!ks.compare(Qt::Key_Down+CTRL)) matrix_rotate(-180.0f); - else if(!ks.compare(Qt::Key_Left+ALT)) matrix_rotate(-1.0f); - else if(!ks.compare(Qt::Key_Right+ALT)) matrix_rotate(1.0f); + if(!ks.compare(TQt::Key_Left)) matrix_move(movefactor, 0); + else if(!ks.compare(TQt::Key_Right)) matrix_move(-movefactor, 0); + else if(!ks.compare(TQt::Key_Up)) matrix_move(0, -movefactor); + else if(!ks.compare(TQt::Key_Down)) matrix_move(0, movefactor); + else if(!ks.compare(TQt::Key_Equal) || + !ks.compare(TQt::Key_Plus)) slotZoomPlus(); + else if(!ks.compare(TQt::Key_Minus)) slotZoomMinus(); + else if(!ks.compare(TQt::Key_Equal+CTRL) || + !ks.compare(TQt::Key_Plus+CTRL)) matrix_zoom(2.0f); + else if(!ks.compare(TQt::Key_Minus+CTRL)) matrix_zoom(0.5f); + else if(!ks.compare(TQt::Key_Q)) toClipboard(); + else if(!ks.compare(TQt::Key_V)) slotFlipV(); + else if(!ks.compare(TQt::Key_H)) slotFlipH(); + else if(!ks.compare(TQt::Key_Left+CTRL)) slotRotateLeft(); + else if(!ks.compare(TQt::Key_Right+CTRL)) slotRotateRight(); + else if(!ks.compare(TQt::Key_R)) slotMatrixReset(); + else if(!ks.compare(TQt::Key_Up+CTRL)) matrix_rotate(180.0f); + else if(!ks.compare(TQt::Key_Down+CTRL)) matrix_rotate(-180.0f); + else if(!ks.compare(TQt::Key_Left+ALT)) matrix_rotate(-1.0f); + else if(!ks.compare(TQt::Key_Right+ALT)) matrix_rotate(1.0f); #ifndef KSQUIRREL_PART - else if(!ks.compare(Qt::Key_Left+SHIFT)) SQ_GLView::window()->leftTab(); - else if(!ks.compare(Qt::Key_Right+SHIFT)) SQ_GLView::window()->rightTab(); - else if(!ks.compare(Qt::Key_W)) slotCloseRequest(SQ_GLView::window()->tabbar()->indexOf(SQ_GLView::window()->tabbar()->currentTab())); - else if(!ks.compare(Qt::Key_W+CTRL)) closeAllTabsFull(); + else if(!ks.compare(TQt::Key_Left+SHIFT)) SQ_GLView::window()->leftTab(); + else if(!ks.compare(TQt::Key_Right+SHIFT)) SQ_GLView::window()->rightTab(); + else if(!ks.compare(TQt::Key_W)) slotCloseRequest(SQ_GLView::window()->tabbar()->indexOf(SQ_GLView::window()->tabbar()->currentTab())); + else if(!ks.compare(TQt::Key_W+CTRL)) closeAllTabsFull(); #else - else if(!ks.compare(Qt::Key_W)) closeAllTabsFull(); + else if(!ks.compare(TQt::Key_W)) closeAllTabsFull(); #endif - else if(!ks.compare(Qt::Key_N)) updateFilter(!linear); - else if(!ks.compare(Qt::Key_P)) slotProperties(); - else if(!ks.compare(Qt::Key_C)) slotShowCodecSettings(); + else if(!ks.compare(TQt::Key_N)) updateFilter(!linear); + else if(!ks.compare(TQt::Key_P)) slotProperties(); + else if(!ks.compare(TQt::Key_C)) slotShowCodecSettings(); #ifndef KSQUIRREL_PART - else if(!ks.compare(Qt::Key_PageDown) || - !ks.compare(Qt::Key_Space)) slotNext(); - else if(!ks.compare(Qt::Key_PageUp) || - !ks.compare(Qt::Key_BackSpace)) slotPrev(); - else if(!ks.compare(Qt::Key_X) || - !ks.compare(Qt::Key_Escape) || - !ks.compare(Qt::Key_Return) || - !ks.compare(Qt::Key_Enter)) KSquirrel::app()->closeGLWidget(); - else if(!ks.compare(Qt::Key_Home)) slotFirst(); - else if(!ks.compare(Qt::Key_End)) slotLast(); - else if(!ks.compare(Qt::Key_F)) toggleFullScreen(); + else if(!ks.compare(TQt::Key_PageDown) || + !ks.compare(TQt::Key_Space)) slotNext(); + else if(!ks.compare(TQt::Key_PageUp) || + !ks.compare(TQt::Key_BackSpace)) slotPrev(); + else if(!ks.compare(TQt::Key_X) || + !ks.compare(TQt::Key_Escape) || + !ks.compare(TQt::Key_Return) || + !ks.compare(TQt::Key_Enter)) KSquirrel::app()->closeGLWidget(); + else if(!ks.compare(TQt::Key_Home)) slotFirst(); + else if(!ks.compare(TQt::Key_End)) slotLast(); + else if(!ks.compare(TQt::Key_F)) toggleFullScreen(); #endif - else if(!ks.compare(Qt::Key_Z)) slotZoomMenu(); - else if(!ks.compare(Qt::Key_S)) saveAs(); - else if(!ks.compare(Qt::Key_A)) slotToggleAnimate(); - else if(!ks.compare(Qt::Key_I)) slotShowImages(); - else if(!ks.compare(Qt::Key_F1)) jumpToImage(false); - else if(!ks.compare(Qt::Key_F2)) prevImage(); - else if(!ks.compare(Qt::Key_F3)) nextImage(); - else if(!ks.compare(Qt::Key_F4)) jumpToImage(true); - else if(!ks.compare(Qt::Key_F5) || !ks.compare(Qt::Key_F6)) + else if(!ks.compare(TQt::Key_Z)) slotZoomMenu(); + else if(!ks.compare(TQt::Key_S)) saveAs(); + else if(!ks.compare(TQt::Key_A)) slotToggleAnimate(); + else if(!ks.compare(TQt::Key_I)) slotShowImages(); + else if(!ks.compare(TQt::Key_F1)) jumpToImage(false); + else if(!ks.compare(TQt::Key_F2)) prevImage(); + else if(!ks.compare(TQt::Key_F3)) nextImage(); + else if(!ks.compare(TQt::Key_F4)) jumpToImage(true); + else if(!ks.compare(TQt::Key_F5) || !ks.compare(TQt::Key_F6)) { // select a directory KURL url = KFileDialog::getExistingURL(lastCopy.prettyURL(), this); @@ -1063,49 +1063,49 @@ void SQ_GLWidget::slotAccelActivated() lastCopy = url; KIO::Job *job; - if(!ks.compare(Qt::Key_F5)) + if(!ks.compare(TQt::Key_F5)) job = KIO::copy(tab->m_original, url); else job = KIO::move(tab->m_original, url); job->setWindow(this); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyJobResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyJobResult(KIO::Job *))); } - else if(!ks.compare(Qt::Key_F7) || !ks.compare(Qt::Key_F8)) + else if(!ks.compare(TQt::Key_F7) || !ks.compare(TQt::Key_F8)) { KIO::Job *job; - if(!ks.compare(Qt::Key_F6)) + if(!ks.compare(TQt::Key_F6)) job = KIO::copy(tab->m_original, lastCopy); else job = KIO::move(tab->m_original, lastCopy); job->setWindow(this); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyJobResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyJobResult(KIO::Job *))); } - else if(!ks.compare(Qt::Key_F9)) copyURL(); - else if(!ks.compare(Qt::Key_Slash)) slotShowHelp(); - else if(!ks.compare(Qt::Key_B)) toggleDrawingBackground(); - else if(!ks.compare(Qt::Key_K)) toogleTickmarks(); - else if(!ks.compare(Qt::Key_E)) showExternalTools(); - else if(!ks.compare(Qt::Key_Delete)) deleteWrapper(); - else if(!ks.compare(Qt::Key_D)) bcg(); - else if(!ks.compare(Qt::Key_U)) filter(); - else if(!ks.compare(Qt::Key_Y)) crop(); + else if(!ks.compare(TQt::Key_F9)) copyURL(); + else if(!ks.compare(TQt::Key_Slash)) slotShowHelp(); + else if(!ks.compare(TQt::Key_B)) toggleDrawingBackground(); + else if(!ks.compare(TQt::Key_K)) toogleTickmarks(); + else if(!ks.compare(TQt::Key_E)) showExternalTools(); + else if(!ks.compare(TQt::Key_Delete)) deleteWrapper(); + else if(!ks.compare(TQt::Key_D)) bcg(); + else if(!ks.compare(TQt::Key_U)) filter(); + else if(!ks.compare(TQt::Key_Y)) crop(); #ifndef KSQUIRREL_PART - else if(!ks.compare(Qt::Key_R+CTRL)) slotSelectionRect(); - else if(!ks.compare(Qt::Key_E+CTRL)) slotSelectionEllipse(); - else if(!ks.compare(Qt::Key_C+CTRL)) slotSelectionClear(); + else if(!ks.compare(TQt::Key_R+CTRL)) slotSelectionRect(); + else if(!ks.compare(TQt::Key_E+CTRL)) slotSelectionEllipse(); + else if(!ks.compare(TQt::Key_C+CTRL)) slotSelectionClear(); #endif - else if(!ks.compare(Qt::Key_P+CTRL)) slotPrint(); - else if(!ks.compare(Qt::Key_Menu) || - !ks.compare(Qt::Key_M)) menu->exec(QCursor::pos()); - else if(!ks.compare(Qt::Key_Comma)) slotZoomW(); - else if(!ks.compare(Qt::Key_Period)) slotZoomH(); - else if(!ks.compare(Qt::Key_Asterisk)) slotZoomWH(); - else if(!ks.compare(Qt::Key_L)) + else if(!ks.compare(TQt::Key_P+CTRL)) slotPrint(); + else if(!ks.compare(TQt::Key_Menu) || + !ks.compare(TQt::Key_M)) menu->exec(TQCursor::pos()); + else if(!ks.compare(TQt::Key_Comma)) slotZoomW(); + else if(!ks.compare(TQt::Key_Period)) slotZoomH(); + else if(!ks.compare(TQt::Key_Asterisk)) slotZoomWH(); + else if(!ks.compare(TQt::Key_L)) { bool b = pAIfLess->isChecked(); pAIfLess->setChecked(!b); @@ -1115,16 +1115,16 @@ void SQ_GLWidget::slotAccelActivated() { int val = -1; - if(!ks.compare(Qt::Key_1)) val = 1; - else if(!ks.compare(Qt::Key_2)) val = 2; - else if(!ks.compare(Qt::Key_3)) val = 3; - else if(!ks.compare(Qt::Key_4)) val = 4; - else if(!ks.compare(Qt::Key_5)) val = 5; - else if(!ks.compare(Qt::Key_6)) val = 6; - else if(!ks.compare(Qt::Key_7)) val = 7; - else if(!ks.compare(Qt::Key_8)) val = 8; - else if(!ks.compare(Qt::Key_9)) val = 9; - else if(!ks.compare(Qt::Key_0)) val = 10; + if(!ks.compare(TQt::Key_1)) val = 1; + else if(!ks.compare(TQt::Key_2)) val = 2; + else if(!ks.compare(TQt::Key_3)) val = 3; + else if(!ks.compare(TQt::Key_4)) val = 4; + else if(!ks.compare(TQt::Key_5)) val = 5; + else if(!ks.compare(TQt::Key_6)) val = 6; + else if(!ks.compare(TQt::Key_7)) val = 7; + else if(!ks.compare(TQt::Key_8)) val = 8; + else if(!ks.compare(TQt::Key_9)) val = 9; + else if(!ks.compare(TQt::Key_0)) val = 10; if(val != -1) { @@ -1214,7 +1214,7 @@ void SQ_GLWidget::crop() memoryPart *pt; SQ_GLWidget::findCloserTiles(tab->sw, tab->sh, pp.tilesx, pp.tilesy); - QPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp); + TQPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp); pp.realw = pair.first; pp.realh = pair.second; pp.w = tab->sw; @@ -1224,7 +1224,7 @@ void SQ_GLWidget::crop() { KMessageBox::error(this, i18n("Memory allocation failed for %1 of memory") - .arg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA)))); + .tqarg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA)))); return; } @@ -1291,7 +1291,7 @@ void SQ_GLWidget::slotChangeTab(int id) if(id == -1) { SQ_GLView::window()->resetStatusBar(); - KSquirrel::app()->setCaption(QString::null); + KSquirrel::app()->setCaption(TQString()); decoded = false; changeSlider(1.0); } @@ -1312,7 +1312,7 @@ void SQ_GLWidget::slotChangeTab(int id) for(;it != itEnd;++it, ++i) { - mid = images->insertItem(QString::fromLatin1("#%1 [%2x%3@%4]").arg(i+1).arg((*it).w).arg((*it).h).arg((*it).bpp)); + mid = images->insertItem(TQString::tqfromLatin1("#%1 [%2x%3@%4]").tqarg(i+1).tqarg((*it).w).tqarg((*it).h).tqarg((*it).bpp)); images->setItemParameter(mid, i); if(i == tab->current) @@ -1388,9 +1388,9 @@ void SQ_GLWidget::slotCloseRequest(int index) SQ_GLView::window()->tabbar()->blockSignals(false); // workaround bug in KTabBar - QMouseEvent ev(QEvent::MouseMove, - QCursor::pos(), - SQ_GLView::window()->tabbar()->mapFromGlobal(QCursor::pos()), + TQMouseEvent ev(TQEvent::MouseMove, + TQCursor::pos(), + SQ_GLView::window()->tabbar()->mapFromGlobal(TQCursor::pos()), Qt::NoButton, Qt::NoButton); @@ -1416,7 +1416,7 @@ void SQ_GLWidget::slotCloseRequest(int index) void SQ_GLWidget::initBrokenImage() { memoryPart *pt; - QImage broken = QPixmap(file_broken_xpm).convertToImage().swapRGB(); + TQImage broken = TQPixmap(file_broken_xpm).convertToImage().swapRGB(); broken.setAlphaBuffer(true); parts_broken = new Parts; @@ -1452,14 +1452,14 @@ void SQ_GLWidget::initBrokenImage() } // Accept drop events. -void SQ_GLWidget::dropEvent(QDropEvent *e) +void SQ_GLWidget::dropEvent(TQDropEvent *e) { - QStringList files; + TQStringList files; - if(QUriDrag::decodeLocalFiles(e, files)) + if(TQUriDrag::decodeLocalFiles(e, files)) { // go through array and find first supported image format - for(QStringList::iterator it = files.begin();it != files.end();++it) + for(TQStringList::iterator it = files.begin();it != files.end();++it) { if(SQ_LibraryHandler::instance()->libraryForFile(*it)) { @@ -1474,9 +1474,9 @@ void SQ_GLWidget::dropEvent(QDropEvent *e) } // Accept drag events. -void SQ_GLWidget::dragEnterEvent(QDragEnterEvent *e) +void SQ_GLWidget::dragEnterEvent(TQDragEnterEvent *e) { - e->accept(QUriDrag::canDecode(e)); + e->accept(TQUriDrag::canDecode(e)); } /* @@ -1484,8 +1484,8 @@ void SQ_GLWidget::dragEnterEvent(QDragEnterEvent *e) */ void SQ_GLWidget::setClearColor() { - QColor color; - QString path; + TQColor color; + TQString path; SQ_Config::instance()->setGroup("GL view"); @@ -1493,7 +1493,7 @@ void SQ_GLWidget::setClearColor() { // system color case 0: - color = colorGroup().color(QColorGroup::Base); + color = tqcolorGroup().color(TQColorGroup::Base); break; // custom color @@ -1601,10 +1601,10 @@ void SQ_GLWidget::toggleDrawingBackground() void SQ_GLWidget::createMarks() { - mm[0] = QImage(locate("data", "images/marks/mark_1.png")); - mm[1] = QImage(locate("data", "images/marks/mark_2.png")); - mm[2] = QImage(locate("data", "images/marks/mark_3.png")); - mm[3] = QImage(locate("data", "images/marks/mark_4.png")); + mm[0] = TQImage(locate("data", "images/marks/mark_1.png")); + mm[1] = TQImage(locate("data", "images/marks/mark_2.png")); + mm[2] = TQImage(locate("data", "images/marks/mark_3.png")); + mm[3] = TQImage(locate("data", "images/marks/mark_4.png")); marks = (mm[0].isNull() || mm[1].isNull() || mm[2].isNull() || mm[3].isNull()) ? false : true; @@ -1623,10 +1623,10 @@ void SQ_GLWidget::createMarks() */ void SQ_GLWidget::updateCurrentFileInfo() { - QString status = QString::fromLatin1("%1x%2@%3") - .arg(tab->finfo.image[tab->current].w) - .arg(tab->finfo.image[tab->current].h) - .arg(tab->finfo.image[tab->current].bpp); + TQString status = TQString::tqfromLatin1("%1x%2@%3") + .tqarg(tab->finfo.image[tab->current].w) + .tqarg(tab->finfo.image[tab->current].h) + .tqarg(tab->finfo.image[tab->current].bpp); #ifndef KSQUIRREL_PART SQ_GLView::window()->sbarWidget("SBDecoded")->setText(status); @@ -1667,7 +1667,7 @@ void SQ_GLWidget::calcFrameLabelWidth() #ifndef KSQUIRREL_PART SQ_GLView::window()->sbarWidget("SBFrame")->setFixedWidth( SQ_GLView::window()->sbarWidget("SBFrame")->fontMetrics() - .boundingRect(QString::fromLatin1("0%1/0%2").arg(tab->total).arg(tab->total)).width()); + .boundingRect(TQString::tqfromLatin1("0%1/0%2").tqarg(tab->total).tqarg(tab->total)).width()); #endif } @@ -1680,9 +1680,9 @@ void SQ_GLWidget::calcFrameLabelWidth() void SQ_GLWidget::frameChanged() { #ifndef KSQUIRREL_PART - SQ_GLView::window()->sbarWidget("SBFrame")->setText(QString::fromLatin1("%1/%2").arg(tab->current+1).arg(tab->total)); + SQ_GLView::window()->sbarWidget("SBFrame")->setText(TQString::tqfromLatin1("%1/%2").tqarg(tab->current+1).tqarg(tab->total)); #else - t_glv.sbarWidget("SBFrame")->setText(QString::fromLatin1("%1/%2").arg(tab->current+1).arg(tab->total)); + t_glv.sbarWidget("SBFrame")->setText(TQString::tqfromLatin1("%1/%2").tqarg(tab->current+1).tqarg(tab->total)); #endif } @@ -1705,7 +1705,7 @@ void SQ_GLWidget::closeAllTabsFull() SQ_GLView::window()->resetStatusBar(); SQ_GLView::window()->tabbar()->hide(); - KSquirrel::app()->setCaption(QString::null); + KSquirrel::app()->setCaption(TQString()); #endif decoded = false; @@ -1727,17 +1727,17 @@ void SQ_GLWidget::slotPrint() if(!decoded || tab->broken) return; - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); - QImage img; + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); + TQImage img; if(gls->valid() && calcSelection()) - img = im.copy(tab->sx, tab->sy, tab->sw, tab->sh).swapRGB(); + img = TQImage(im.copy(tab->sx, tab->sy, tab->sw, tab->sh)).swapRGB(); else { if(tab->parts[tab->current].realw == tab->parts[tab->current].w && tab->parts[tab->current].realh == tab->parts[tab->current].h) img = im.swapRGB(); else - img = im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h).swapRGB(); + img = TQImage(im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h)).swapRGB(); } img.setAlphaBuffer(true); @@ -1748,20 +1748,20 @@ void SQ_GLWidget::slotPrint() if(printer.setup(this)) { - QPainter p(&printer); + TQPainter p(&printer); - QPaintDeviceMetrics mt(&printer); + TQPaintDeviceMetrics mt(&printer); - QSize sz(img.width(), img.height()); + TQSize sz(img.width(), img.height()); if(img.width() > mt.width() || img.height() > mt.height()) - sz.scale(mt.width(), mt.height(), QSize::ScaleMin); + sz.tqscale(mt.width(), mt.height(), TQSize::ScaleMin); int cp = printer.numCopies(); for(int i = 0;i < cp;i++) { - p.drawImage(QRect((mt.width()-sz.width())/2, (mt.height()-sz.height())/2, sz.width(), sz.height()), img); + p.drawImage(TQRect((mt.width()-sz.width())/2, (mt.height()-sz.height())/2, sz.width(), sz.height()), img); if(i < cp-1) printer.newPage(); @@ -1774,5 +1774,5 @@ void SQ_GLWidget::copyURL() if(!decoded || tab->broken) return; - QApplication::clipboard()->setText(tab->m_original.prettyURL()); + TQApplication::tqclipboard()->setText(tab->m_original.prettyURL()); } diff --git a/ksquirrel/ksquirrelpart/sq_helpwidget.ui b/ksquirrel/ksquirrelpart/sq_helpwidget.ui index 8f92708..1902366 100644 --- a/ksquirrel/ksquirrelpart/sq_helpwidget.ui +++ b/ksquirrel/ksquirrelpart/sq_helpwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_HelpWidget</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_HelpWidget</cstring> </property> @@ -33,11 +33,11 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QWidgetStack" row="1" column="0"> + <widget class="TQWidgetStack" row="1" column="0"> <property name="name"> <cstring>widgetStack1</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -48,20 +48,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><b><p align=right>Esc,X,Return</p></b></td><td>close</td></tr><tr><td><b><p align=right>Middle click, F</p></b></td><td>fullscreen</td></tr><tr><td><b><p align=right>Z</p></b></td><td>show 'Zoom' menu</td></tr><tr><td><b><p align=right>/</p></b></td><td>show this help</td></tr><tr><td><b><p align=right>Right click, M, ContextMenu</p></b></td><td>show context menu</td></tr><tr><td><b><p align=right>N</p></b></td><td>toggle filter</td></tr><tr><td><b><p align=right>Shift + Left button</p></b></td><td>select a region</td></tr><tr><td><b><p align=right>Shift + Left</p></b></td><td>previous tab</td></tr><tr><td><b><p align=right>Shift + Right</p></b></td><td>next tab</td></tr><tr><td><b><p align=right>W</p></b></td><td>close tab</td></tr></table></p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -72,20 +72,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><b><p align=right>Space, Page Down</p></b></td><td>next image</td></tr><tr><td><b><p align=right>Backspace, Page Up</p></b></td><td>previous image</td></tr><tr><td><b><p align=right>Home</p></b></td><td>first image</td></tr><tr><td><b><p align=right>End</p></b></td><td>last image</td></tr></table></p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -96,20 +96,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><b><p align=right>Left, Right, Up, Down</p></b></td><td>move the image</td></tr><tr><td><b><p align=right>Ctrl + Left</p></b></td><td>rotate left</td></tr><tr><td><b><p align=right>Ctrl + Right</p></b></td><td>rotate right</td></tr><tr><td><b><p align=right>Ctrl + Up/Down</p></b></td><td>rotate for 180 degrees up/down</td></tr><tr><td><b><p align=right>Alt + Left/Right</p></b></td><td>rotate for 1 degree left/right</td></tr></table</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -120,20 +120,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><b><p align=right>+/-</p></b></td><td>zoom Nx</td></tr><tr><td><b><p align=right>Ctrl + +/-</p></b></td><td>zoom 2x/0.5x</td></tr><tr><td><b><p align=right>Scroll</p></b></td><td>load next/prev file OR zoom+/zoom-</td></tr><tr><td><b><p align=right>Shift + Scroll</p></b></td><td>zoom+/zoom-</td></tr><tr><td><b><p align=right>Ctrl + Scroll</p></b></td><td>zoom+ 2x/zoom- 2x</td></tr><tr><td><b><p align=right>1..9</p></b></td><td>zoom 1..9x</td></tr><tr><td><b><p align=right>0</p></b></td><td>zoom 10x</td></tr><tr><td><b><p align=right>comma</p></b></td><td>fit width</td></tr><tr><td><b><p align=right>period</p></b></td><td>fit height</td></tr><tr><td><b><p align=right>*</p></b></td><td>fit image</td></tr></table</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -147,21 +147,21 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><p align=right><b>S</b></p></td><td>save as</td></tr><tr><td><p align=right><b>V</b></p></td><td>flip vertically</td></tr><tr><td><p align=right><b>H</b></p></td><td>flip horizontally</td></tr><tr><td><p align=right><b>R</b></p></td><td>reset</td></tr><tr><td><p align=right><b>P</b></p></td><td>image properties</td></tr><tr><td><p align=right><b>C</b></p></td><td>codec settings</td></tr><tr><td><p align=right><b>L</b></p></td><td>ignore zoom if image is smaller than window</td></tr><tr><td><p align=right><b>I</b></p></td><td>menu with images</td></tr><tr><td><p align=right><b>A</b></p></td><td>stop/start animation</td></tr><tr><td><p align=right><b>B</b></p></td><td>toggle drawing background for transparent images</td></tr><tr><td><p align=right><b>K</b></p></td><td>toggle drawing tickmarks</td></tr><tr><td><p align=right><b>E</b></p></td><td>show menu with external tools</td></tr><tr><td><p align=right><b>Y</b></p></td><td>crop</td></tr><tr><td><p align=right><b>F1</b></p></td><td>first image in multi-paged image</td></tr><tr><td><p align=right><b>F2</b></p></td><td>previous</td></tr><tr><td><p align=right><b>F3</b></p></td><td>next</td></tr><tr><td><p align=right><b>F4</b></p></td><td>last</td></tr></table></p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> </widget> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup</cstring> </property> @@ -181,7 +181,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushButton3</cstring> </property> @@ -204,7 +204,7 @@ <number>0</number> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>pushButton3_2</cstring> </property> @@ -224,7 +224,7 @@ <number>1</number> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>pushButton3_3</cstring> </property> @@ -244,7 +244,7 @@ <number>2</number> </property> </widget> - <widget class="QPushButton" row="0" column="4"> + <widget class="TQPushButton" row="0" column="4"> <property name="name"> <cstring>pushButton3_5</cstring> </property> @@ -264,7 +264,7 @@ <number>4</number> </property> </widget> - <widget class="QPushButton" row="0" column="3"> + <widget class="TQPushButton" row="0" column="3"> <property name="name"> <cstring>pushButton3_4</cstring> </property> @@ -296,7 +296,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> @@ -321,14 +321,14 @@ <tabstop>pushButton3_4</tabstop> </tabstops> <includes> - <include location="global" impldecl="in implementation">qtooltip.h</include> + <include location="global" impldecl="in implementation">tqtooltip.h</include> <include location="local" impldecl="in implementation">sq_config.h</include> <include location="local" impldecl="in implementation">sq_helpwidget.ui.h</include> </includes> <functions> <function access="private" specifier="non virtual">init()</function> <function access="private" specifier="non virtual">destroy()</function> - <function returnType="bool">event( QEvent * e )</function> + <function returnType="bool">event( TQEvent * e )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/ksquirrelpart/sq_helpwidget.ui.h b/ksquirrel/ksquirrelpart/sq_helpwidget.ui.h index 844f327..c0f2673 100644 --- a/ksquirrel/ksquirrelpart/sq_helpwidget.ui.h +++ b/ksquirrel/ksquirrelpart/sq_helpwidget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). @@ -17,7 +17,7 @@ void SQ_HelpWidget::init() { - setPalette(QToolTip::palette()); + setPalette(TQToolTip::palette()); SQ_Config::instance()->setGroup("GL view"); int pg = SQ_Config::instance()->readNumEntry("help_id", 0); @@ -32,14 +32,14 @@ void SQ_HelpWidget::destroy() SQ_Config::instance()->writeEntry("help_id", buttonGroup->selectedId()); } -bool SQ_HelpWidget::event(QEvent *e) +bool SQ_HelpWidget::event(TQEvent *e) { - if(e->type() == QEvent::WindowDeactivate - || e->type() == QEvent::MouseButtonPress - || e->type() == QEvent::KeyPress) + if(e->type() == TQEvent::WindowDeactivate + || e->type() == TQEvent::MouseButtonPress + || e->type() == TQEvent::KeyPress) { reject(); } - return QDialog::event(e); + return TQDialog::event(e); } diff --git a/ksquirrel/ksquirrelpart/sq_iconloader.cpp b/ksquirrel/ksquirrelpart/sq_iconloader.cpp index 698160f..91feec2 100644 --- a/ksquirrel/ksquirrelpart/sq_iconloader.cpp +++ b/ksquirrel/ksquirrelpart/sq_iconloader.cpp @@ -27,7 +27,7 @@ SQ_IconLoader * SQ_IconLoader::m_instance = 0; -SQ_IconLoader::SQ_IconLoader(QObject *parent) : QObject(parent) +SQ_IconLoader::SQ_IconLoader(TQObject *tqparent) : TQObject(tqparent) { m_instance = this; @@ -37,10 +37,10 @@ SQ_IconLoader::SQ_IconLoader(QObject *parent) : QObject(parent) SQ_IconLoader::~SQ_IconLoader() {} -QPixmap SQ_IconLoader::loadIcon(const QString& name, KIcon::Group group, int size) const +TQPixmap SQ_IconLoader::loadIcon(const TQString& name, KIcon::Group group, int size) const { // try to load from installed icon theme - QPixmap p = KGlobal::iconLoader()->loadIcon(name, group, size, KIcon::DefaultState, 0, true); + TQPixmap p = KGlobal::iconLoader()->loadIcon(name, group, size, KIcon::DefaultState, 0, true); // requested pixmap not found, let's // try to find it in our pixmaps @@ -72,11 +72,11 @@ QPixmap SQ_IconLoader::loadIcon(const QString& name, KIcon::Group group, int siz */ void SQ_IconLoader::fillPixmaps() { - pixmap_up = QPixmap(xpm_up); - pixmap_down = QPixmap(xpm_down); - pixmap_display = QPixmap(xpm_display); - pixmap_folder = QPixmap(xpm_folder); - pixmap_images = QPixmap(xpm_images); - pixmap_binary = QPixmap(xpm_binary); - pixmap_edit = QPixmap(xpm_edit); + pixmap_up = TQPixmap(xpm_up); + pixmap_down = TQPixmap(xpm_down); + pixmap_display = TQPixmap(xpm_display); + pixmap_folder = TQPixmap(xpm_folder); + pixmap_images = TQPixmap(xpm_images); + pixmap_binary = TQPixmap(xpm_binary); + pixmap_edit = TQPixmap(xpm_edit); } diff --git a/ksquirrel/ksquirrelpart/sq_iconloader.h b/ksquirrel/ksquirrelpart/sq_iconloader.h index 164d918..2c40530 100644 --- a/ksquirrel/ksquirrelpart/sq_iconloader.h +++ b/ksquirrel/ksquirrelpart/sq_iconloader.h @@ -18,8 +18,8 @@ #ifndef SQ_ICONLOADER_H #define SQ_ICONLOADER_H -#include <qobject.h> -#include <qpixmap.h> +#include <tqobject.h> +#include <tqpixmap.h> #include <kicontheme.h> @@ -29,13 +29,13 @@ * instead. */ -class SQ_IconLoader : public QObject +class SQ_IconLoader : public TQObject { public: - SQ_IconLoader(QObject *parent = 0); + SQ_IconLoader(TQObject *tqparent = 0); ~SQ_IconLoader(); - QPixmap loadIcon(const QString &name, KIcon::Group group = KIcon::Desktop, int size = 16) const; + TQPixmap loadIcon(const TQString &name, KIcon::Group group = KIcon::Desktop, int size = 16) const; private: static SQ_IconLoader *m_instance; @@ -49,7 +49,7 @@ class SQ_IconLoader : public QObject static SQ_IconLoader* instance() { return m_instance; } private: - QPixmap pixmap_up, pixmap_down, + TQPixmap pixmap_up, pixmap_down, pixmap_display, pixmap_folder, pixmap_images, pixmap_binary, pixmap_edit; diff --git a/ksquirrel/ksquirrelpart/sq_imagebcg.ui b/ksquirrel/ksquirrelpart/sq_imagebcg.ui index f2959b4..e291d2e 100644 --- a/ksquirrel/ksquirrelpart/sq_imagebcg.ui +++ b/ksquirrel/ksquirrelpart/sq_imagebcg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ImageBCG</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ImageBCG</cstring> </property> @@ -22,14 +22,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="1" column="0" rowspan="3" colspan="1"> + <widget class="TQWidgetStack" row="1" column="0" rowspan="3" colspan="1"> <property name="name"> <cstring>widgetStackParams</cstring> </property> <property name="frameShape"> <enum>GroupBoxPanel</enum> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -43,7 +43,7 @@ <property name="margin"> <number>4</number> </property> - <widget class="QSpinBox" row="2" column="0"> + <widget class="TQSpinBox" row="2" column="0"> <property name="name"> <cstring>spinB</cstring> </property> @@ -54,7 +54,7 @@ <number>-255</number> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>pushResetG</cstring> </property> @@ -68,7 +68,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>pushResetC</cstring> </property> @@ -87,7 +87,7 @@ <cstring>spinG</cstring> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>spinC</cstring> </property> @@ -98,7 +98,7 @@ <number>-255</number> </property> </widget> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushResetB</cstring> </property> @@ -112,9 +112,9 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -125,7 +125,7 @@ <cstring>sQ_LabelB</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderB</cstring> </property> @@ -150,9 +150,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -163,7 +163,7 @@ <cstring>sQ_LabelC</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderC</cstring> </property> @@ -188,9 +188,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="2"> + <widget class="TQLayoutWidget" row="1" column="2"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -201,7 +201,7 @@ <cstring>sQ_LabelG</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderG</cstring> </property> @@ -231,7 +231,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -245,7 +245,7 @@ <property name="margin"> <number>4</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushResetRed</cstring> </property> @@ -259,7 +259,7 @@ <bool>true</bool> </property> </widget> - <widget class="QSpinBox" row="2" column="0"> + <widget class="TQSpinBox" row="2" column="0"> <property name="name"> <cstring>spinRed</cstring> </property> @@ -270,7 +270,7 @@ <number>-255</number> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>spinGreen</cstring> </property> @@ -281,7 +281,7 @@ <number>-255</number> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>pushResetGreen</cstring> </property> @@ -295,7 +295,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>pushResetBlue</cstring> </property> @@ -309,7 +309,7 @@ <bool>true</bool> </property> </widget> - <widget class="QSpinBox" row="2" column="2"> + <widget class="TQSpinBox" row="2" column="2"> <property name="name"> <cstring>spinBlue</cstring> </property> @@ -320,9 +320,9 @@ <number>-255</number> </property> </widget> - <widget class="QLayoutWidget" row="1" column="2"> + <widget class="TQLayoutWidget" row="1" column="2"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -333,7 +333,7 @@ <cstring>sQ_LabelBlue</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderBlue</cstring> </property> @@ -355,9 +355,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -368,7 +368,7 @@ <cstring>sQ_LabelGreen</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderGreen</cstring> </property> @@ -390,9 +390,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -403,7 +403,7 @@ <cstring>sQ_LabelRed</cstring> </property> </widget> - <widget class="QSlider"> + <widget class="TQSlider"> <property name="name"> <cstring>sliderRed</cstring> </property> @@ -428,7 +428,7 @@ </grid> </widget> </widget> - <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -453,7 +453,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QPushButton" row="0" column="4"> + <widget class="TQPushButton" row="0" column="4"> <property name="name"> <cstring>push2</cstring> </property> @@ -467,7 +467,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>push1</cstring> </property> @@ -491,7 +491,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -508,18 +508,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>text</cstring> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignCenter</set> </property> </widget> @@ -535,16 +535,16 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="5" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> @@ -560,14 +560,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>249</width> <height>21</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushGO</cstring> </property> @@ -578,7 +578,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -615,16 +615,16 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="2" column="1"> + <widget class="TQLayoutWidget" row="2" column="1"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <grid> <property name="name"> @@ -640,14 +640,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="1" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -665,7 +665,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -684,14 +684,14 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>160</width> <height>160</height> </size> </property> </widget> - <widget class="QLabel" row="0" column="3" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="3" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -709,7 +709,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -728,7 +728,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>160</width> <height>160</height> @@ -938,8 +938,8 @@ </tabstops> <includes> <include location="local" impldecl="in declaration">sq_imageedit.h</include> - <include location="global" impldecl="in declaration">qimage.h</include> - <include location="global" impldecl="in declaration">qstringlist.h</include> + <include location="global" impldecl="in declaration">tqimage.h</include> + <include location="global" impldecl="in declaration">tqstringlist.h</include> <include location="local" impldecl="in implementation">sq_iconloader.h</include> <include location="global" impldecl="in implementation">kstandarddirs.h</include> <include location="local" impldecl="in implementation">sq_config.h</include> @@ -950,14 +950,14 @@ </includes> <variables> <variable access="private">int id;</variable> - <variable access="private">QImage sample, sample_saved;</variable> + <variable access="private">TQImage sample, sample_saved;</variable> <variable access="private">QStringList strings;</variable> <variable access="private">static SQ_ImageBCG *m_inst;</variable> </variables> -<signals> +<Q_SIGNALS> <signal>bcg(SQ_ImageBCGOptions*)</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="private" specifier="non virtual">slotResetG()</slot> <slot access="private" specifier="non virtual">slotResetC()</slot> <slot access="private" specifier="non virtual">slotResetB()</slot> @@ -973,16 +973,16 @@ <slot access="private" specifier="non virtual">slotGChanged( int v )</slot> <slot access="private" specifier="non virtual">slotGSpinChanged( double v )</slot> <slot access="private" specifier="non virtual">slotPush()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> <function access="private" specifier="non virtual" returnType="int">RGB2Y( int r, int g, int b )</function> - <function access="private" specifier="non virtual">assignNewImage( const QImage & im )</function> + <function access="private" specifier="non virtual">assignNewImage( const TQImage & im )</function> <function access="private" specifier="non virtual">changeImage( int b, int c, int g1, int red, int green, int blue )</function> - <function specifier="non virtual">setPreviewImage( const QImage & im )</function> + <function specifier="non virtual">setPreviewImage( const TQImage & im )</function> <function specifier="static" returnType="SQ_ImageBCG *">instance()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>sq_label.h</includehint> diff --git a/ksquirrel/ksquirrelpart/sq_imagebcg.ui.h b/ksquirrel/ksquirrelpart/sq_imagebcg.ui.h index 7d80c6f..3d0913d 100644 --- a/ksquirrel/ksquirrelpart/sq_imagebcg.ui.h +++ b/ksquirrel/ksquirrelpart/sq_imagebcg.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -13,7 +13,7 @@ void SQ_ImageBCG::init() { m_inst = this; - QPixmap p = QPixmap::fromMimeSource(locate("data", "images/imageedit/reset_value.png")); + TQPixmap p = TQPixmap::fromMimeSource(locate("data", "images/imageedit/reset_value.png")); sQ_LabelB->setSingle(true); sQ_LabelC->setSingle(true); @@ -32,21 +32,21 @@ void SQ_ImageBCG::init() pushResetGreen->setPixmap(p); pushResetBlue->setPixmap(p); - strings.append(QString("<b>") + tr2i18n("Brightness") + ", " + tr2i18n("Contrast") + ", " + tr2i18n("Gamma") + "</b>"); - strings.append(QString("<b>") + tr2i18n("Red") + ", " + tr2i18n("Green") + ", " + tr2i18n("Blue") + "</b>"); + strings.append(TQString("<b>") + tr2i18n("Brightness") + ", " + tr2i18n("Contrast") + ", " + tr2i18n("Gamma") + "</b>"); + strings.append(TQString("<b>") + tr2i18n("Red") + ", " + tr2i18n("Green") + ", " + tr2i18n("Blue") + "</b>"); id = 0; widgetStackParams->raiseWidget(id); text->setText(strings[id]); - QPixmap tool1 = QPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton.png")); - QPixmap tool2 = QPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton2.png")); + TQPixmap tool1 = TQPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton.png")); + TQPixmap tool2 = TQPixmap::fromMimeSource(locate("data", "images/imageedit/resize_toolbutton2.png")); push1->setPixmap(tool1); push2->setPixmap(tool2); spinG->setRange(0, 6.0, 0.01, 2); spinG->setValue(1.0); - connect(spinG, SIGNAL(valueChanged(int)), spinG, SLOT(slotValueChanged(int))); + connect(spinG, TQT_SIGNAL(valueChanged(int)), spinG, TQT_SLOT(slotValueChanged(int))); } void SQ_ImageBCG::slotResetG() @@ -177,9 +177,9 @@ void SQ_ImageBCG::slotGSpinChanged(double v) changeImage(sliderB->value(), sliderC->value(), val, sliderRed->value(), sliderGreen->value(), sliderBlue->value()); } -void SQ_ImageBCG::assignNewImage(const QImage &im) +void SQ_ImageBCG::assignNewImage(const TQImage &im) { - QPixmap p; + TQPixmap p; p.convertFromImage(im); pixmap1->setPixmap(p); } @@ -219,14 +219,14 @@ void SQ_ImageBCG::slotPush() text->setText(strings[id]); } -void SQ_ImageBCG::setPreviewImage(const QImage &im) +void SQ_ImageBCG::setPreviewImage(const TQImage &im) { if(im.isNull()) return; sample = im.copy(); sample_saved = sample.copy(); - QPixmap p; + TQPixmap p; p.convertFromImage(sample_saved); pixmap->setPixmap(p); diff --git a/ksquirrel/ksquirrelpart/sq_imageedit.h b/ksquirrel/ksquirrelpart/sq_imageedit.h index acece00..a93e26b 100644 --- a/ksquirrel/ksquirrelpart/sq_imageedit.h +++ b/ksquirrel/ksquirrelpart/sq_imageedit.h @@ -18,14 +18,14 @@ #ifndef SQ_IMAGEEDIT_H #define SQ_IMAGEEDIT_H -#include <qfont.h> -#include <qcolor.h> +#include <tqfont.h> +#include <tqcolor.h> #include "fmt_filters.h" struct SQ_ImageOptions { - QString putto; + TQString putto; int where_to_put; bool close; }; @@ -38,7 +38,7 @@ struct SQ_ImageBCGOptions struct SQ_ImageConvertOptions { - QString libname; + TQString libname; }; struct SQ_ImageFilterOptions diff --git a/ksquirrel/ksquirrelpart/sq_imagefilter.ui b/ksquirrel/ksquirrelpart/sq_imagefilter.ui index 57e169d..146796c 100644 --- a/ksquirrel/ksquirrelpart/sq_imagefilter.ui +++ b/ksquirrel/ksquirrelpart/sq_imagefilter.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ImageFilter</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ImageFilter</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QWidgetStack" row="0" column="1" rowspan="1" colspan="2"> + <widget class="TQWidgetStack" row="0" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>widgetStackFilters</cstring> </property> @@ -37,7 +37,7 @@ <property name="frameShape"> <enum>GroupBoxPanel</enum> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>blendWidget</cstring> </property> @@ -48,7 +48,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -82,7 +82,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>40</height> @@ -99,7 +99,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -120,7 +120,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -145,7 +145,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -166,7 +166,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>45</height> @@ -183,7 +183,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -194,7 +194,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -207,7 +207,7 @@ <property name="text"> <string>There are no special options available for this filter. Just click "Filter".</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -221,7 +221,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>26</height> @@ -230,7 +230,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -251,7 +251,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>30</height> @@ -268,7 +268,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -289,7 +289,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>30</height> @@ -314,7 +314,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -325,7 +325,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -338,7 +338,7 @@ <property name="text"> <string>There are no special options available for this filter. Just click "Filter".</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -352,7 +352,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>14</height> @@ -361,7 +361,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -390,14 +390,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>10</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -423,7 +423,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -452,7 +452,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>10</width> <height>11</height> @@ -467,7 +467,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_4_2</cstring> </property> @@ -483,7 +483,7 @@ <string>Color 1:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_4_3</cstring> </property> @@ -493,7 +493,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -514,7 +514,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>25</height> @@ -531,7 +531,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -552,14 +552,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>14</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_2_2</cstring> </property> @@ -572,13 +572,13 @@ <property name="text"> <string>There are no special options available for this filter. Just click "Filter".</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -589,7 +589,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupNoise</cstring> </property> @@ -609,7 +609,7 @@ <property name="spacing"> <number>2</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton1</cstring> </property> @@ -617,7 +617,7 @@ <string>Uniform</string> </property> </widget> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>radioButton1_4</cstring> </property> @@ -628,7 +628,7 @@ <number>3</number> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioButton1_3</cstring> </property> @@ -636,7 +636,7 @@ <string>Multiplicative Gaussian</string> </property> </widget> - <widget class="QRadioButton" row="2" column="1"> + <widget class="TQRadioButton" row="2" column="1"> <property name="name"> <cstring>radioButton1_6</cstring> </property> @@ -647,7 +647,7 @@ <number>5</number> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton1_2</cstring> </property> @@ -658,7 +658,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton" row="1" column="1"> + <widget class="TQRadioButton" row="1" column="1"> <property name="name"> <cstring>radioButton1_5</cstring> </property> @@ -673,7 +673,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -694,7 +694,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>35</height> @@ -711,7 +711,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -722,7 +722,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>shadeColor</cstring> </property> @@ -740,7 +740,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>10</height> @@ -765,7 +765,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -786,7 +786,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>10</height> @@ -811,7 +811,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -832,7 +832,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>60</height> @@ -849,7 +849,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -870,7 +870,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>35</height> @@ -887,7 +887,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -898,7 +898,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupSwapRGB</cstring> </property> @@ -915,7 +915,7 @@ <property name="spacing"> <number>2</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton7</cstring> </property> @@ -923,7 +923,7 @@ <string>GBR</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton8</cstring> </property> @@ -943,7 +943,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>41</height> @@ -952,7 +952,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -973,7 +973,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>25</height> @@ -990,7 +990,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -1011,7 +1011,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>75</height> @@ -1028,7 +1028,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -1039,7 +1039,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_2_2_2</cstring> </property> @@ -1052,7 +1052,7 @@ <property name="text"> <string>There are no special options available for this filter. Just click "Filter".</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -1066,7 +1066,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>11</width> <height>113</height> @@ -1075,7 +1075,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -1104,7 +1104,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>71</height> @@ -1124,16 +1124,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -1149,14 +1149,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>285</width> <height>16</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushFilter</cstring> </property> @@ -1167,7 +1167,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -1194,7 +1194,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QListBox" row="0" column="0" rowspan="4" colspan="1"> + <widget class="TQListBox" row="0" column="0" rowspan="4" colspan="1"> <item> <property name="text"> <string>Blend</string> @@ -1316,7 +1316,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -1333,16 +1333,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="2" column="1" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <grid> <property name="name"> @@ -1360,14 +1360,14 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>160</width> <height>160</height> </size> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -1385,7 +1385,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -1402,7 +1402,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> @@ -1421,7 +1421,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>160</width> <height>160</height> @@ -1438,14 +1438,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>1</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="3" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="3" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -1506,20 +1506,20 @@ </tabstops> <includes> <include location="local" impldecl="in declaration">sq_imageedit.h</include> - <include location="global" impldecl="in declaration">qimage.h</include> + <include location="global" impldecl="in declaration">tqimage.h</include> <include location="local" impldecl="in implementation">sq_iconloader.h</include> <include location="local" impldecl="in implementation">sq_config.h</include> <include location="local" impldecl="in implementation">fmt_filters.h</include> <include location="local" impldecl="in implementation">sq_imagefilter.ui.h</include> </includes> <variables> - <variable access="private">QImage sample, sample_saved;</variable> + <variable access="private">TQImage sample, sample_saved;</variable> <variable access="private">static SQ_ImageFilter *m_inst;</variable> </variables> -<signals> +<Q_SIGNALS> <signal>filter(SQ_ImageFilterOptions*)</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="private" specifier="non virtual">slotStartFiltering()</slot> <slot access="private" specifier="non virtual">slotShowPage()</slot> <slot access="private" specifier="non virtual">swapRGB()</slot> @@ -1540,11 +1540,11 @@ <slot access="private" specifier="non virtual">emboss()</slot> <slot access="private" specifier="non virtual">sharpen()</slot> <slot access="private" specifier="non virtual">oil()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> - <function specifier="non virtual">setPreviewImage( const QImage & im )</function> - <function access="private" specifier="non virtual">assignNewImage( const QImage & im )</function> + <function specifier="non virtual">setPreviewImage( const TQImage & im )</function> + <function access="private" specifier="non virtual">assignNewImage( const TQImage & im )</function> <function access="private" specifier="non virtual">negative()</function> <function access="private" specifier="non virtual">togray()</function> <function access="private" specifier="non virtual">equalize()</function> @@ -1552,7 +1552,7 @@ <function access="private" specifier="non virtual">hackConnect()</function> <function specifier="static" returnType="SQ_ImageFilter *">instance()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kcolorbutton.h</includehint> <includehint>knuminput.h</includehint> diff --git a/ksquirrel/ksquirrelpart/sq_imagefilter.ui.h b/ksquirrel/ksquirrelpart/sq_imagefilter.ui.h index d39f35f..c5ffc3d 100644 --- a/ksquirrel/ksquirrelpart/sq_imagefilter.ui.h +++ b/ksquirrel/ksquirrelpart/sq_imagefilter.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -41,7 +41,7 @@ void SQ_ImageFilter::init() buttonGroupSwapRGB->setButton(SQ_Config::instance()->readNumEntry("filter_swapRGB", 0)); // blend - QColor c; + TQColor c; c.setNamedColor(SQ_Config::instance()->readEntry("filter_blend_color", "#00ff00")); pushBlendColor->setColor(c); blendOpacity->setValue(SQ_Config::instance()->readDoubleNumEntry("filter_blend_opacity", 0.5)); @@ -152,7 +152,7 @@ void SQ_ImageFilter::slotStartFiltering() { case F::fblend: { - QColor c = pushBlendColor->color(); + TQColor c = pushBlendColor->color(); opt.rgb1 = fmt_filters::rgb(c.red(), c.green(), c.blue()); opt._float = blendOpacity->value(); } @@ -165,14 +165,14 @@ void SQ_ImageFilter::slotStartFiltering() case F::fequalize: break; case F::ffade: { - QColor c = fadeColor->color(); + TQColor c = fadeColor->color(); opt.rgb1 = fmt_filters::rgb(c.red(), c.green(), c.blue()); opt._float = (float)fadeValue->value(); } break; case F::fflatten: { - QColor c = flattenColor1->color(); + TQColor c = flattenColor1->color(); opt.rgb1 = fmt_filters::rgb(c.red(), c.green(), c.blue()); c = flattenColor2->color(); opt.rgb2 = fmt_filters::rgb(c.red(), c.green(), c.blue()); @@ -229,14 +229,14 @@ void SQ_ImageFilter::slotShowPage() } } -void SQ_ImageFilter::setPreviewImage(const QImage &im) +void SQ_ImageFilter::setPreviewImage(const TQImage &im) { if(im.isNull()) return; sample = im.copy(); sample_saved = sample.copy(); - QPixmap p; + TQPixmap p; p.convertFromImage(sample_saved); pixmap->setPixmap(p); @@ -245,9 +245,9 @@ void SQ_ImageFilter::setPreviewImage(const QImage &im) slotShowPage(); } -void SQ_ImageFilter::assignNewImage(const QImage &im) +void SQ_ImageFilter::assignNewImage(const TQImage &im) { - QPixmap p; + TQPixmap p; p.convertFromImage(im); pixmap1->setPixmap(p); } @@ -294,7 +294,7 @@ void SQ_ImageFilter::blend() fmt_filters::image im(sample.bits(), sample.width(), sample.height()); - QColor c = pushBlendColor->color(); + TQColor c = pushBlendColor->color(); fmt_filters::rgb rgb(c.red(), c.green(), c.blue()); @@ -312,7 +312,7 @@ void SQ_ImageFilter::fade() fmt_filters::image im(sample.bits(), sample.width(), sample.height()); - QColor c = fadeColor->color(); + TQColor c = fadeColor->color(); fmt_filters::fade(im, fmt_filters::rgb(c.red(), c.green(), c.blue()), fadeValue->value()); @@ -440,8 +440,8 @@ void SQ_ImageFilter::flatten() fmt_filters::image im(sample.bits(), sample.width(), sample.height()); - QColor c1 = flattenColor1->color(); - QColor c2 = flattenColor2->color(); + TQColor c1 = flattenColor1->color(); + TQColor c2 = flattenColor2->color(); fmt_filters::flatten(im, fmt_filters::rgb(c1.red(), c1.green(), c1.blue()), fmt_filters::rgb(c2.red(), c2.green(), c2.blue())); @@ -576,32 +576,32 @@ void SQ_ImageFilter::oil() void SQ_ImageFilter::hackConnect() { - connect( blendOpacity, SIGNAL( valueChanged(double) ), this, SLOT( blend() ) ); - connect( pushBlendColor, SIGNAL( changed(const QColor&) ), this, SLOT( blend() ) ); - connect( blurRadius, SIGNAL( valueChanged(double) ), this, SLOT( blur() ) ); - connect( blurSigma, SIGNAL( valueChanged(double) ), this, SLOT( blur() ) ); - connect( desaturateValue, SIGNAL( valueChanged(double) ), this, SLOT( desaturate() ) ); - connect( edgeRadius, SIGNAL( valueChanged(int) ), this, SLOT( edge() ) ); - connect( embossRadius, SIGNAL( valueChanged(double) ), this, SLOT( emboss() ) ); - connect( embossSigma, SIGNAL( valueChanged(double) ), this, SLOT( emboss() ) ); - connect( fadeColor, SIGNAL( changed(const QColor&) ), this, SLOT( fade() ) ); - connect( fadeValue, SIGNAL( valueChanged(double) ), this, SLOT( fade() ) ); - connect( flattenColor1, SIGNAL( changed(const QColor&) ), this, SLOT( flatten() ) ); - connect( flattenColor2, SIGNAL( changed(const QColor&) ), this, SLOT( flatten() ) ); - connect( implodeFactor, SIGNAL( valueChanged(double) ), this, SLOT( implode() ) ); - connect( buttonGroupNoise, SIGNAL( clicked(int) ), this, SLOT( noise() ) ); - connect( oilRadius, SIGNAL( valueChanged(int) ), this, SLOT( oil() ) ); - connect( shadeAzim, SIGNAL( valueChanged(double) ), this, SLOT( shade() ) ); - connect( shadeColor, SIGNAL( toggled(bool) ), this, SLOT( shade() ) ); - connect( shadeElev, SIGNAL( valueChanged(double) ), this, SLOT( shade() ) ); - connect( sharpenRadius, SIGNAL( valueChanged(double) ), this, SLOT( sharpen() ) ); - connect( sharpenSigma, SIGNAL( valueChanged(double) ), this, SLOT( sharpen() ) ); - connect( solarizeValue, SIGNAL( valueChanged(double) ), this, SLOT( solarize() ) ); - connect( spreadValue, SIGNAL( valueChanged(int) ), this, SLOT( spread() ) ); - connect( buttonGroupSwapRGB, SIGNAL( clicked(int) ), this, SLOT( swapRGB() ) ); - connect( swirlAngle, SIGNAL( valueChanged(double) ), this, SLOT( swirl() ) ); - connect( thresholdValue, SIGNAL( valueChanged(int) ), this, SLOT( threshold() ) ); - connect( thresholdRE, SIGNAL( valueChanged(int) ), this, SLOT( redeye() ) ); + connect( blendOpacity, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( blend() ) ); + connect( pushBlendColor, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( blend() ) ); + connect( blurRadius, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( blur() ) ); + connect( blurSigma, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( blur() ) ); + connect( desaturateValue, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( desaturate() ) ); + connect( edgeRadius, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( edge() ) ); + connect( embossRadius, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( emboss() ) ); + connect( embossSigma, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( emboss() ) ); + connect( fadeColor, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( fade() ) ); + connect( fadeValue, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( fade() ) ); + connect( flattenColor1, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( flatten() ) ); + connect( flattenColor2, TQT_SIGNAL( changed(const TQColor&) ), this, TQT_SLOT( flatten() ) ); + connect( implodeFactor, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( implode() ) ); + connect( buttonGroupNoise, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( noise() ) ); + connect( oilRadius, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( oil() ) ); + connect( shadeAzim, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( shade() ) ); + connect( shadeColor, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( shade() ) ); + connect( shadeElev, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( shade() ) ); + connect( sharpenRadius, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( sharpen() ) ); + connect( sharpenSigma, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( sharpen() ) ); + connect( solarizeValue, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( solarize() ) ); + connect( spreadValue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( spread() ) ); + connect( buttonGroupSwapRGB, TQT_SIGNAL( clicked(int) ), this, TQT_SLOT( swapRGB() ) ); + connect( swirlAngle, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( swirl() ) ); + connect( thresholdValue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( threshold() ) ); + connect( thresholdRE, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( redeye() ) ); } SQ_ImageFilter* SQ_ImageFilter::instance() diff --git a/ksquirrel/ksquirrelpart/sq_imageproperties.ui b/ksquirrel/ksquirrelpart/sq_imageproperties.ui index 80e92fd..6f445f4 100644 --- a/ksquirrel/ksquirrelpart/sq_imageproperties.ui +++ b/ksquirrel/ksquirrelpart/sq_imageproperties.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ImageProperties</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ImageProperties</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>pushButton1</cstring> </property> @@ -49,18 +49,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>470</width> <height>20</height> </size> </property> </spacer> - <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQTabWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -81,14 +81,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> </size> </property> </spacer> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -102,7 +102,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -118,7 +118,7 @@ <string>Owner:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel5_2</cstring> </property> @@ -134,7 +134,7 @@ <string>Group:</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textOwner</cstring> </property> @@ -142,7 +142,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel27_2</cstring> </property> @@ -157,11 +157,11 @@ <property name="text"> <string>Permissions:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textPermissions</cstring> </property> @@ -177,7 +177,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textGroup</cstring> </property> @@ -187,7 +187,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="1" column="1"> + <widget class="TQGroupBox" row="1" column="1"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -204,7 +204,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -219,11 +219,11 @@ <property name="text"> <string>Created:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -238,11 +238,11 @@ <property name="text"> <string>Last read:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3_2_2</cstring> </property> @@ -257,11 +257,11 @@ <property name="text"> <string>Last modified:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textCreated</cstring> </property> @@ -277,7 +277,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLastRead</cstring> </property> @@ -293,7 +293,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textLastMod</cstring> </property> @@ -311,7 +311,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -325,7 +325,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -341,7 +341,7 @@ <string>File:</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textSize</cstring> </property> @@ -357,7 +357,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -373,7 +373,7 @@ <string>Directory:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3_3</cstring> </property> @@ -389,7 +389,7 @@ <string>Size:</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>lineDirectory</cstring> </property> @@ -397,7 +397,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>lineFile</cstring> </property> @@ -409,7 +409,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -420,45 +420,45 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel6_2_2_2</cstring> </property> <property name="text"> <string>Type:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel11_2_2_2</cstring> </property> <property name="text"> <string>Number of frames:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2_2_3</cstring> </property> @@ -473,11 +473,11 @@ <property name="text"> <string>Current frame</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2_2_4</cstring> </property> @@ -492,66 +492,66 @@ <property name="text"> <string>Delay:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel7_2_2_2</cstring> </property> <property name="text"> <string>Dimensions:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel8_2_2_2</cstring> </property> <property name="text"> <string>Bits per pixel:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel9_2_2_2</cstring> </property> <property name="text"> <string>Color space:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel10_2_2_2</cstring> </property> <property name="text"> <string>Compression:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel21_2_2_2</cstring> </property> <property name="text"> <string>Uncompressed size:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2</cstring> </property> @@ -566,11 +566,11 @@ <property name="text"> <string>Compression ratio:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2_2</cstring> </property> @@ -585,11 +585,11 @@ <property name="text"> <string>Interlaced:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2_2_2</cstring> </property> @@ -602,9 +602,9 @@ </sizepolicy> </property> <property name="text"> - <string>Status:</string> + <string>tqStatus:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> @@ -618,7 +618,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>210</width> <height>16</height> @@ -627,15 +627,15 @@ </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textType</cstring> </property> @@ -651,7 +651,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textFrames</cstring> </property> @@ -667,7 +667,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textFrame</cstring> </property> @@ -675,7 +675,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textDelay</cstring> </property> @@ -683,7 +683,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textDimensions</cstring> </property> @@ -699,7 +699,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textBpp</cstring> </property> @@ -715,7 +715,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textColorModel</cstring> </property> @@ -731,7 +731,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textCompression</cstring> </property> @@ -747,7 +747,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textUncompressed</cstring> </property> @@ -763,7 +763,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textRatio</cstring> </property> @@ -779,7 +779,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textInterlaced</cstring> </property> @@ -787,15 +787,15 @@ <string></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textStatusIcon</cstring> </property> @@ -811,9 +811,9 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> - <cstring>textStatus</cstring> + <cstring>texttqStatus</cstring> </property> <property name="text"> <string></string> @@ -831,7 +831,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>205</width> <height>16</height> @@ -844,7 +844,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -855,7 +855,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListView" row="0" column="0"> + <widget class="TQListView" row="0" column="0"> <column> <property name="text"> <string>Group</string> @@ -899,9 +899,9 @@ </connection> <connection> <sender>listMeta</sender> - <signal>contextMenuRequested(QListViewItem*,const QPoint&,int)</signal> + <signal>contextMenuRequested(TQListViewItem*,const TQPoint&,int)</signal> <receiver>SQ_ImageProperties</receiver> - <slot>slotContextMenu(QListViewItem*,const QPoint&,int)</slot> + <slot>slotContextMenu(TQListViewItem*,const TQPoint&,int)</slot> </connection> </connections> <tabstops> @@ -912,24 +912,24 @@ <tabstop>pushButton1</tabstop> </tabstops> <includes> - <include location="global" impldecl="in declaration">qvaluevector.h</include> - <include location="global" impldecl="in declaration">qvariant.h</include> - <include location="global" impldecl="in declaration">qpair.h</include> - <include location="global" impldecl="in declaration">qpixmap.h</include> + <include location="global" impldecl="in declaration">tqvaluevector.h</include> + <include location="global" impldecl="in declaration">tqvariant.h</include> + <include location="global" impldecl="in declaration">tqpair.h</include> + <include location="global" impldecl="in declaration">tqpixmap.h</include> <include location="global" impldecl="in declaration">kurl.h</include> <include location="global" impldecl="in declaration">kio/job.h</include> <include location="global" impldecl="in declaration">kfileitem.h</include> - <include location="global" impldecl="in implementation">qstringlist.h</include> - <include location="global" impldecl="in implementation">qfileinfo.h</include> + <include location="global" impldecl="in implementation">tqstringlist.h</include> + <include location="global" impldecl="in implementation">tqfileinfo.h</include> <include location="global" impldecl="in implementation">kio/global.h</include> <include location="global" impldecl="in implementation">kpopupmenu.h</include> <include location="global" impldecl="in implementation">kstdaction.h</include> <include location="global" impldecl="in implementation">kaction.h</include> - <include location="global" impldecl="in implementation">qapplication.h</include> - <include location="global" impldecl="in implementation">qclipboard.h</include> - <include location="global" impldecl="in implementation">qdir.h</include> + <include location="global" impldecl="in implementation">tqapplication.h</include> + <include location="global" impldecl="in implementation">tqclipboard.h</include> + <include location="global" impldecl="in implementation">tqdir.h</include> <include location="local" impldecl="in implementation">sq_iconloader.h</include> - <include location="global" impldecl="in implementation">qbuttongroup.h</include> + <include location="global" impldecl="in implementation">tqbuttongroup.h</include> <include location="global" impldecl="in implementation">klocale.h</include> <include location="local" impldecl="in implementation">sq_imageproperties.ui.h</include> </includes> @@ -943,27 +943,27 @@ <variable access="private">QWidget *kew;</variable> <variable access="private">QPixmap ok, error;</variable> <variable access="private">KPopupMenu *menu;</variable> - <variable access="private">QListViewItem *data;</variable> + <variable access="private">TQListViewItem *data;</variable> <variable access="private">int z, exifMode;</variable> <variable access="private">KAction *copy, *copyentry, *copyall;</variable> - <variable access="private">QString file;</variable> + <variable access="private">TQString file;</variable> </variables> -<slots> - <slot access="private">slotContextMenu( QListViewItem * item, const QPoint & p, int z1 )</slot> +<Q_SLOTS> + <slot access="private">slotContextMenu( TQListViewItem * item, const TQPoint & p, int z1 )</slot> <slot access="private">slotCopyString()</slot> <slot access="private">slotCopyAll()</slot> <slot access="private">slotCopyEntry()</slot> <slot access="private" specifier="non virtual">slotModeClicked( int id )</slot> <slot access="private">slotStatResult( KIO::Job * job )</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> <function access="private" specifier="non virtual">destroy()</function> - <function>setParams( QStringList & l )</function> + <function>setParams( TQStringList & l )</function> <function specifier="non virtual">setURL( const KURL & _url )</function> <function access="private">setFileParams()</function> - <function>setMetaInfo( QValueVector<QPair<QString, QString> > meta )</function> - <function specifier="non virtual">setFile( const QString & _file )</function> + <function>setMetaInfo( TQValueVector<TQPair<TQString, TQString> > meta )</function> + <function specifier="non virtual">setFile( const TQString & _file )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/ksquirrelpart/sq_imageproperties.ui.h b/ksquirrel/ksquirrelpart/sq_imageproperties.ui.h index b597b84..35726d7 100644 --- a/ksquirrel/ksquirrelpart/sq_imageproperties.ui.h +++ b/ksquirrel/ksquirrelpart/sq_imageproperties.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -18,16 +18,16 @@ #ifdef SQ_HAVE_KEXIF #include <libkexif/kexifwidget.h> #include <libkexif/kexifdata.h> -#include <qobjectlist.h> +#include <tqobjectlist.h> #include "sq_config.h" #endif void SQ_ImageProperties::init() { menu = new KPopupMenu; - copy = KStdAction::copy(this, SLOT(slotCopyString()), 0); - copyentry = new KAction(i18n("Copy entry"), 0, this, SLOT(slotCopyEntry()), 0); - copyall = new KAction(i18n("Copy all entries"), 0, this, SLOT(slotCopyAll()), 0); + copy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopyString()), 0); + copyentry = new KAction(i18n("Copy entry"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotCopyEntry()), 0); + copyall = new KAction(i18n("Copy all entries"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotCopyAll()), 0); copyentry->setIcon(copy->icon()); copyall->setIcon(copy->icon()); @@ -53,11 +53,11 @@ void SQ_ImageProperties::destroy() delete menu; } -void SQ_ImageProperties::setParams(QStringList &l) +void SQ_ImageProperties::setParams(TQStringList &l) { setFileParams(); - QStringList::Iterator it = l.begin(); + TQStringList::Iterator it = l.begin(); textType->setText(*it); ++it; textDimensions->setText(*it); ++it; textBpp->setText(*it); ++it; @@ -69,11 +69,11 @@ void SQ_ImageProperties::setParams(QStringList &l) int errors = (*it).toInt(); ++it; textFrames->setText(*it); ++it; textFrame->setText(*it); ++it; - QString s = QString::fromLatin1("%1").arg(i18n("1 error", "%n errors", errors)); - textStatus->setText((errors)?s:QString::null); + TQString s = TQString::tqfromLatin1("%1").tqarg(i18n("1 error", "%n errors", errors)); + texttqStatus->setText((errors)?s:TQString()); textStatusIcon->setPixmap((errors)?error:ok); - s = QString::fromLatin1("%1%2").arg(*it).arg(i18n(" ms.")); + s = TQString::tqfromLatin1("%1%2").tqarg(*it).tqarg(i18n(" ms.")); textDelay->setText(s); } @@ -85,43 +85,43 @@ void SQ_ImageProperties::setURL(const KURL &_url) void SQ_ImageProperties::setFileParams() { KIO::Job *stjob = KIO::stat(url, false); - connect(stjob, SIGNAL(result(KIO::Job *)), this, SLOT(slotStatResult(KIO::Job *))); + connect(stjob, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotStatResult(KIO::Job *))); #ifdef SQ_HAVE_KEXIF SQ_Config::instance()->setGroup("GL view"); exifMode = SQ_Config::instance()->readNumEntry("exifmode", 0); - QWidget *tabWidgetEXIF = new QWidget(tabWidget, "tabWidgetEXIF"); + TQWidget *tabWidgetEXIF = new TQWidget(tabWidget, "tabWidgetEXIF"); tabWidget->addTab(tabWidgetEXIF, i18n("EXIF")); - QGridLayout *pageLayout6 = new QGridLayout(tabWidgetEXIF, 2, 1, 11, 6, "tabWidgetEXIFLayout"); + TQGridLayout *pageLayout6 = new TQGridLayout(tabWidgetEXIF, 2, 1, 11, 6, "tabWidgetEXIFLayout"); - QButtonGroup *gr = new QButtonGroup(tabWidgetEXIF, "EXIF mode"); - gr->setFrameShape(QFrame::NoFrame); + TQButtonGroup *gr = new TQButtonGroup(tabWidgetEXIF, "EXIF mode"); + gr->setFrameShape(TQFrame::NoFrame); gr->setExclusive(true); - connect(gr, SIGNAL(clicked(int)), this, SLOT(slotModeClicked(int))); + connect(gr, TQT_SIGNAL(clicked(int)), TQT_TQOBJECT(this), TQT_SLOT(slotModeClicked(int))); - QGridLayout *pageLayoutGR = new QGridLayout(gr, 1, 3, 0, -1, "tabWidgetEXIFGRLayout"); + TQGridLayout *pageLayoutGR = new TQGridLayout(gr, 1, 3, 0, -1, "tabWidgetEXIFGRLayout"); - QPushButton *mode1 = new QPushButton(i18n("Simple"), gr, "mode1"); + TQPushButton *mode1 = new TQPushButton(i18n("Simple"), gr, "mode1"); mode1->setToggleButton(true); - QPushButton *mode2 = new QPushButton(i18n("Full"), gr, "mode2"); + TQPushButton *mode2 = new TQPushButton(i18n("Full"), gr, "mode2"); mode2->setToggleButton(true); - QSpacerItem *spacer = new QSpacerItem(15, 1, QSizePolicy::Expanding, QSizePolicy::Minimum); + TQSpacerItem *spacer = new TQSpacerItem(15, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum); // create KEXIF widget and load metadata from file KExifWidget *kew1 = new KExifWidget(tabWidgetEXIF); kew1->loadFile(file); // hack to workaround poor libkexif API - QObjectList *ch = const_cast<QObjectList *>(kew1->children()); - for(QObjectList::iterator it = ch->begin();it != ch->end();++it) + TQObjectList *ch = const_cast<TQObjectList *>(kew1->tqchildren()); + for(TQObjectList::iterator it = ch->begin();it != ch->end();++it) { - if((*it)->inherits("QListView")) + if((*it)->inherits(TQLISTVIEW_OBJECT_NAME_STRING)) { - QListView *l = dynamic_cast<QListView *>(*it); - QWidget *w = tabWidget->page(3); + TQListView *l = dynamic_cast<TQListView *>(*it); + TQWidget *w = tabWidget->page(3); if(l && w && !l->childCount()) tabWidget->changeTab(w, i18n("EXIF (no)")); @@ -142,7 +142,7 @@ void SQ_ImageProperties::setFileParams() kew1->setMode(KExifWidget::SIMPLE); } - // finally, add all widgets to layouts + // finally, add all widgets to tqlayouts pageLayoutGR->addWidget(mode1, 0, 0); pageLayoutGR->addWidget(mode2, 0, 1); pageLayoutGR->addItem(spacer, 0, 2); @@ -153,18 +153,18 @@ void SQ_ImageProperties::setFileParams() #endif } -void SQ_ImageProperties::setMetaInfo(QValueVector<QPair<QString,QString> > meta ) +void SQ_ImageProperties::setMetaInfo(TQValueVector<TQPair<TQString,TQString> > meta ) { - QListViewItem *after = 0, *item; + TQListViewItem *after = 0, *item; - QValueVector<QPair<QString,QString> >::iterator itEnd = meta.end(); + TQValueVector<TQPair<TQString,TQString> >::iterator itEnd = meta.end(); - for(QValueVector<QPair<QString,QString> >::iterator it = meta.begin();it != itEnd;++it) + for(TQValueVector<TQPair<TQString,TQString> >::iterator it = meta.begin();it != itEnd;++it) { if(after) - item = new QListViewItem(listMeta, after, (*it).first+QString::fromLatin1(" "), (*it).second.replace(QChar('\n'), QChar(' '))); + item = new TQListViewItem(listMeta, after, (*it).first+TQString::tqfromLatin1(" "), (*it).second.tqreplace(TQChar('\n'), TQChar(' '))); else - after = item = new QListViewItem(listMeta, (*it).first+QString::fromLatin1(" "), (*it).second.replace(QChar('\n'), QChar(' '))); + after = item = new TQListViewItem(listMeta, (*it).first+TQString::tqfromLatin1(" "), (*it).second.tqreplace(TQChar('\n'), TQChar(' '))); listMeta->insertItem(item); } @@ -173,14 +173,14 @@ void SQ_ImageProperties::setMetaInfo(QValueVector<QPair<QString,QString> > meta { listMeta->header()->hide(); - QWidget *w = tabWidget->page(2); + TQWidget *w = tabWidget->page(2); if(w) tabWidget->changeTab(w, i18n("Metadata (no)")); } } -void SQ_ImageProperties::slotContextMenu( QListViewItem *item, const QPoint &p, int z1 ) +void SQ_ImageProperties::slotContextMenu( TQListViewItem *item, const TQPoint &p, int z1 ) { if(item) { @@ -192,7 +192,7 @@ void SQ_ImageProperties::slotContextMenu( QListViewItem *item, const QPoint &p, void SQ_ImageProperties::slotCopyString() { - QApplication::clipboard()->setText(data->text(z), QClipboard::Clipboard); + TQApplication::tqclipboard()->setText(data->text(z), TQClipboard::Clipboard); } void SQ_ImageProperties::slotCopyAll() @@ -200,15 +200,15 @@ void SQ_ImageProperties::slotCopyAll() if(!data) return; - QString app; - QListViewItem *item = listMeta->firstChild(); + TQString app; + TQListViewItem *item = listMeta->firstChild(); for(;item;item = item->itemBelow()) { app.append(item->text(0) + "\n" + item->text(1) + "\n"); } - QApplication::clipboard()->setText(app, QClipboard::Clipboard); + TQApplication::tqclipboard()->setText(app, TQClipboard::Clipboard); } void SQ_ImageProperties::slotCopyEntry() @@ -216,9 +216,9 @@ void SQ_ImageProperties::slotCopyEntry() if(!data) return; - QString app = data->text(0) + "\n" + data->text(1) + "\n"; + TQString app = data->text(0) + "\n" + data->text(1) + "\n"; - QApplication::clipboard()->setText(app, QClipboard::Clipboard); + TQApplication::tqclipboard()->setText(app, TQClipboard::Clipboard); } void SQ_ImageProperties::slotModeClicked(int id) @@ -243,11 +243,11 @@ void SQ_ImageProperties::slotStatResult(KIO::Job *job) lineFile->setText(fi.name()); textSize->setText(KIO::convertSize(fi.size())); - textOwner->setText(QString("%1").arg(fi.user())); - textGroup->setText(QString("%1").arg(fi.group())); + textOwner->setText(TQString("%1").tqarg(fi.user())); + textGroup->setText(TQString("%1").tqarg(fi.group())); textPermissions->setText(fi.permissionsString()); - QDateTime abs; + TQDateTime abs; abs.setTime_t(fi.time(KIO::UDS_CREATION_TIME)); textCreated->setText(abs.toString("dd/MM/yyyy hh:mm:ss")); abs.setTime_t(fi.time(KIO::UDS_ACCESS_TIME)); @@ -258,7 +258,7 @@ void SQ_ImageProperties::slotStatResult(KIO::Job *job) } // set local file for KEXIF -void SQ_ImageProperties::setFile(const QString &_file) +void SQ_ImageProperties::setFile(const TQString &_file) { file = _file; } diff --git a/ksquirrel/ksquirrelpart/sq_label.cpp b/ksquirrel/ksquirrelpart/sq_label.cpp index 4d9b14a..70ecff8 100644 --- a/ksquirrel/ksquirrelpart/sq_label.cpp +++ b/ksquirrel/ksquirrelpart/sq_label.cpp @@ -15,26 +15,26 @@ * * ***************************************************************************/ -#include <qpainter.h> +#include <tqpainter.h> #include "sq_label.h" #define MARGIN 15 -SQ_Label::SQ_Label(QWidget *parent, const char *name) : QWidget(parent, name), single(false) +SQ_Label::SQ_Label(TQWidget *tqparent, const char *name) : TQWidget(tqparent, name), single(false) {} SQ_Label::~SQ_Label() {} -void SQ_Label::paintEvent(QPaintEvent *) +void SQ_Label::paintEvent(TQPaintEvent *) { if((single && ltext.isEmpty() && rtext.isEmpty()) || (!single && ltext.isEmpty())) return; - QPainter paint(this); + TQPainter paint(this); - QFont font = paint.font(); + TQFont font = paint.font(); font.setBold(true); font.setPointSize(10); paint.setFont(font); @@ -57,7 +57,7 @@ void SQ_Label::paintEvent(QPaintEvent *) } } -void SQ_Label::setText(const QString <, const QString &rt) +void SQ_Label::setText(const TQString <, const TQString &rt) { ltext = lt; rtext = rt; @@ -65,7 +65,7 @@ void SQ_Label::setText(const QString <, const QString &rt) update(); } -void SQ_Label::setText(const QString <) +void SQ_Label::setText(const TQString <) { ltext = lt; diff --git a/ksquirrel/ksquirrelpart/sq_label.h b/ksquirrel/ksquirrelpart/sq_label.h index 7b54753..a1fed65 100644 --- a/ksquirrel/ksquirrelpart/sq_label.h +++ b/ksquirrel/ksquirrelpart/sq_label.h @@ -18,23 +18,23 @@ #ifndef SQ_LABEL_H #define SQ_LABEL_H -#include <qwidget.h> +#include <tqwidget.h> -class SQ_Label : public QWidget +class SQ_Label : public TQWidget { public: - SQ_Label(QWidget *parent = 0, const char *name = 0); + SQ_Label(TQWidget *tqparent = 0, const char *name = 0); ~SQ_Label(); - void setText(const QString <, const QString &rt); - void setText(const QString <); + void setText(const TQString <, const TQString &rt); + void setText(const TQString <); void setSingle(bool s); protected: - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); private: - QString ltext, rtext; + TQString ltext, rtext; bool single; }; diff --git a/ksquirrel/ksquirrelpart/sq_library.h b/ksquirrel/ksquirrelpart/sq_library.h index ac1dff3..cf350d6 100644 --- a/ksquirrel/ksquirrelpart/sq_library.h +++ b/ksquirrel/ksquirrelpart/sq_library.h @@ -18,14 +18,14 @@ #ifndef SQ_LIBRARY_H #define SQ_LIBRARY_H -#include <qstring.h> -#include <qregexp.h> -#include <qpixmap.h> +#include <tqstring.h> +#include <tqregexp.h> +#include <tqpixmap.h> #include <ksquirrel-libs/fmt_defs.h> #include <ksquirrel-libs/settings.h> -class QLibrary; +class TQLibrary; class KTempFile; @@ -45,34 +45,34 @@ struct SQ_LIBRARY {} // pointer to library - QLibrary *lib; + TQLibrary *lib; // path to a library on disk - QString libpath; + TQString libpath; // converted regular expression - QRegExp regexp; + TQRegExp regexp; // filter for a filemanager - QString filter; + TQString filter; // path to config file (.ui) - QString config; + TQString config; fmt_settings settings; // regular expression as string - QString regexp_str; + TQString regexp_str; - QString mimetype; + TQString mimetype; bool mime_multi; // information on codec - QString quickinfo; + TQString quickinfo; // codec's version - QString version; + TQString version; // pointer to a codec fmt_codec_base *codec, *codec_il; @@ -82,7 +82,7 @@ struct SQ_LIBRARY fmt_codec_base* (*codec_create)(); void (*codec_destroy)(fmt_codec_base*); - QPixmap mime; + TQPixmap mime; // options for writers. fmt_writeoptionsabs opt; diff --git a/ksquirrel/ksquirrelpart/sq_libraryhandler.cpp b/ksquirrel/ksquirrelpart/sq_libraryhandler.cpp index 0e10424..a86a7e5 100644 --- a/ksquirrel/ksquirrelpart/sq_libraryhandler.cpp +++ b/ksquirrel/ksquirrelpart/sq_libraryhandler.cpp @@ -19,11 +19,11 @@ #include "config.h" #endif -#include <qlibrary.h> -#include <qfileinfo.h> -#include <qstringlist.h> -#include <qfile.h> -#include <qdir.h> +#include <tqlibrary.h> +#include <tqfileinfo.h> +#include <tqstringlist.h> +#include <tqfile.h> +#include <tqdir.h> #include <kstringhandler.h> #include <ktempfile.h> @@ -46,8 +46,8 @@ static const int buffer_size = 10; SQ_LibraryHandler * SQ_LibraryHandler::m_instance = 0; // SQ_LibraryHandler -SQ_LibraryHandler::SQ_LibraryHandler(QObject *parent) - : QObject(parent), QValueVector<SQ_LIBRARY>() +SQ_LibraryHandler::SQ_LibraryHandler(TQObject *tqparent) + : TQObject(tqparent), TQValueVector<SQ_LIBRARY>() { m_instance = this; @@ -84,7 +84,7 @@ SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const KURL &url) { if((*it).mime_multi) { - if((*it).mimetype.find(mime->name()) != -1) + if((*it).mimetype.tqfind(mime->name()) != -1) { l = &(*it); break; @@ -108,7 +108,7 @@ SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const KURL &url) return l; } -SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const QString &path) +SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const TQString &path) { KURL u; u.setPath(path); @@ -119,9 +119,9 @@ SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const QString &path) /* * Get all filters as one string. */ -QString SQ_LibraryHandler::allFiltersString() const +TQString SQ_LibraryHandler::allFiltersString() const { - QString ret; + TQString ret; const_iterator itEnd = end(); @@ -135,9 +135,9 @@ QString SQ_LibraryHandler::allFiltersString() const return ret; } -QString SQ_LibraryHandler::allFiltersFileDialogString(bool r, bool allfiles) const +TQString SQ_LibraryHandler::allFiltersFileDialogString(bool r, bool allfiles) const { - QString ret; + TQString ret; const_iterator itEnd = end(); @@ -159,7 +159,7 @@ QString SQ_LibraryHandler::allFiltersFileDialogString(bool r, bool allfiles) con * Fill 'filters' with all found filters, and * 'quick' with appropriate information. */ -void SQ_LibraryHandler::allFilters(QStringList &filters, QStringList &quick) const +void SQ_LibraryHandler::allFilters(TQStringList &filters, TQStringList &quick) const { // clear rubbish filters.clear(); @@ -171,7 +171,7 @@ void SQ_LibraryHandler::allFilters(QStringList &filters, QStringList &quick) con const_iterator itEnd = end(); - // go through array and fill QStringLists + // go through array and fill TQStringLists for(const_iterator it = begin();it != itEnd;++it) if(!(*it).filter.isEmpty()) { @@ -180,7 +180,7 @@ void SQ_LibraryHandler::allFilters(QStringList &filters, QStringList &quick) con } } -void SQ_LibraryHandler::allWritableFilters(QStringList &filters, QStringList &quick) const +void SQ_LibraryHandler::allWritableFilters(TQStringList &filters, TQStringList &quick) const { // clear rubbish filters.clear(); @@ -192,7 +192,7 @@ void SQ_LibraryHandler::allWritableFilters(QStringList &filters, QStringList &qu const_iterator itEnd = end(); - // go through array and fill QStringLists + // go through array and fill TQStringLists for(const_iterator it = begin();it != itEnd;++it) if((*it).writestatic && !(*it).filter.isEmpty()) { @@ -228,32 +228,32 @@ void SQ_LibraryHandler::clear() (*it).lib = 0; } - QValueVector<SQ_LIBRARY>::clear(); + TQValueVector<SQ_LIBRARY>::clear(); } /* * Add new libraries. */ -void SQ_LibraryHandler::add(QStringList &foundLibraries) +void SQ_LibraryHandler::add(TQStringList &foundLibraries) { codec_options o; - QStringList::iterator itEnd = foundLibraries.end(); + TQStringList::iterator itEnd = foundLibraries.end(); - for(QStringList::iterator it = foundLibraries.begin();it != itEnd;++it) + for(TQStringList::iterator it = foundLibraries.begin();it != itEnd;++it) { - QFileInfo ff(*it); + TQFileInfo ff(*it); SQ_LIBRARY libtmp; - // create QLibrary object - libtmp.lib = new QLibrary(*it); + // create TQLibrary object + libtmp.lib = new TQLibrary(*it); libtmp.libpath = *it; libtmp.lib->load(); // resolve create() and destroy() functions - libtmp.codec_create = (fmt_codec_base*(*)())(libtmp.lib)->resolve(QString::fromLatin1("codec_create")); - libtmp.codec_destroy = (void (*)(fmt_codec_base*))(libtmp.lib)->resolve(QString::fromLatin1("codec_destroy")); + libtmp.codec_create = (fmt_codec_base*(*)())(libtmp.lib)->resolve(TQString::tqfromLatin1("codec_create")); + libtmp.codec_destroy = (void (*)(fmt_codec_base*))(libtmp.lib)->resolve(TQString::tqfromLatin1("codec_destroy")); // couldn't resolve - corrupted library ? if(!libtmp.codec_create || !libtmp.codec_destroy) @@ -269,14 +269,14 @@ void SQ_LibraryHandler::add(QStringList &foundLibraries) // read options codeK->options(&o); - QString q = o.name; + TQString q = o.name; // Yet unknown library ? if(!alreadyInMap(q)) { - libtmp.mime = QPixmap(reinterpret_cast<const char **>(o.pixmap)); + libtmp.mime = TQPixmap(reinterpret_cast<const char **>(o.pixmap)); libtmp.mimetype = o.mimetype; - libtmp.mime_multi = libtmp.mimetype.find(';') != -1; + libtmp.mime_multi = libtmp.mimetype.tqfind(';') != -1; libtmp.quickinfo = q; libtmp.filter = o.filter; libtmp.version = o.version; @@ -298,12 +298,12 @@ void SQ_LibraryHandler::add(QStringList &foundLibraries) libtmp.tmp = new KTempFile; libtmp.tmp->setAutoDelete(true); libtmp.tmp->close(); - codeK->settempfile(libtmp.tmp->name()); + codeK->settempfile(libtmp.tmp->name().ascii()); libtmp.tmp_il = new KTempFile; libtmp.tmp_il->setAutoDelete(true); libtmp.tmp_il->close(); - libtmp.codec_il->settempfile(libtmp.tmp_il->name()); + libtmp.codec_il->settempfile(libtmp.tmp_il->name().ascii()); } if(libtmp.writestatic) @@ -335,11 +335,11 @@ void SQ_LibraryHandler::add(QStringList &foundLibraries) /* * Is library named 'quick' already been handled ? */ -bool SQ_LibraryHandler::alreadyInMap(const QString &quick) const +bool SQ_LibraryHandler::alreadyInMap(const TQString &quick) const { const_iterator itEnd = end(); - // go through array and find 'quick' + // go through array and tqfind 'quick' for(const_iterator it = begin();it != itEnd;++it) if((*it).quickinfo == quick) return true; @@ -361,7 +361,7 @@ void SQ_LibraryHandler::dump() const for(const_iterator it = begin();it != itEnd;++it) { std::cerr << std::setw(30) - << KStringHandler::csqueeze(QFileInfo((*it).libpath).fileName(), 30) + << KStringHandler::csqueeze(TQFileInfo((*it).libpath).fileName(), 30) << std::setw(0) << " [" << KStringHandler::rsqueeze((*it).quickinfo, 45) @@ -373,14 +373,14 @@ void SQ_LibraryHandler::dump() const /* * Does any of found libraries handle given extension ? */ -bool SQ_LibraryHandler::knownExtension(const QString &ext) +bool SQ_LibraryHandler::knownExtension(const TQString &ext) { iterator itEnd = end(); // go through array and compare extensions for(iterator it = begin();it != itEnd;++it) { - if((*it).filter.contains(ext, false)) + if((*it).filter.tqcontains(ext, false)) return true; } @@ -393,7 +393,7 @@ bool SQ_LibraryHandler::knownExtension(const QString &ext) * * Name is a string, returned by fmt_quickinfo() */ -SQ_LIBRARY* SQ_LibraryHandler::libraryByName(const QString &name) +SQ_LIBRARY* SQ_LibraryHandler::libraryByName(const TQString &name) { SQ_LIBRARY *l; @@ -421,7 +421,7 @@ void SQ_LibraryHandler::writeSettings(SQ_LIBRARY *lib) fmt_settings::iterator itEnd = lib->settings.end(); - QString k; + TQString k; for(fmt_settings::iterator it = lib->settings.begin();it != itEnd;++it) { @@ -456,7 +456,7 @@ void SQ_LibraryHandler::readSettings(SQ_LIBRARY *lib) if(lib->config.isEmpty()) return; - QMap<QString, QString> map = kconf->entryMap(lib->quickinfo); + TQMap<TQString, TQString> map = kconf->entryMap(lib->quickinfo); if(!map.size()) { @@ -465,27 +465,27 @@ void SQ_LibraryHandler::readSettings(SQ_LIBRARY *lib) return; } - QMap<QString, QString>::iterator mapEnd = map.end(); + TQMap<TQString, TQString>::iterator mapEnd = map.end(); fmt_settings &sett = lib->settings; - QString d, k; + TQString d, k; settings_value val; - for(QMap<QString, QString>::iterator mapIt = map.begin();mapIt != mapEnd;++mapIt) + for(TQMap<TQString, TQString>::iterator mapIt = map.begin();mapIt != mapEnd;++mapIt) { k = mapIt.key(); d = mapIt.data(); - if(k.startsWith(QChar('i'))) + if(k.startsWith(TQChar('i'))) { val.type = settings_value::v_int; val.iVal = d.toInt(); } - else if(k.startsWith(QChar('d'))) + else if(k.startsWith(TQChar('d'))) { val.type = settings_value::v_double; val.dVal = d.toDouble(); } - else if(k.startsWith(QChar('b'))) + else if(k.startsWith(TQChar('b'))) { val.type = settings_value::v_bool; val.bVal = (d == "true"); @@ -511,16 +511,16 @@ void SQ_LibraryHandler::reload() void SQ_LibraryHandler::load() { - QStringList libs; + TQStringList libs; - QDir dir(SQ_KLIBS, QString::null, QDir::Unsorted, QDir::Files); + TQDir dir(SQ_KLIBS, TQString(), TQDir::Unsorted, TQDir::Files); - const QFileInfoList *list = dir.entryInfoList(); + const TQFileInfoList *list = dir.entryInfoList(); if(list) { - QFileInfoListIterator it(*list); - QFileInfo *fi; + TQFileInfoListIterator it(*list); + TQFileInfo *fi; while((fi = it.current()) != 0) { @@ -533,7 +533,7 @@ void SQ_LibraryHandler::load() add(libs); } -SQ_LibraryHandler::Support SQ_LibraryHandler::maybeSupported(const KURL &u, const QString &mime) const +SQ_LibraryHandler::Support SQ_LibraryHandler::maybeSupported(const KURL &u, const TQString &mime) const { const_iterator itEnd = constEnd(); @@ -541,7 +541,7 @@ SQ_LibraryHandler::Support SQ_LibraryHandler::maybeSupported(const KURL &u, cons bool treat = SQ_Config::instance()->readBoolEntry("treat", true); // we can determine mimetype by hand or use "mime" - QString mimeDet = mime.isEmpty() ? KMimeType::findByURL(u)->name() : mime; + TQString mimeDet = mime.isEmpty() ? KMimeType::findByURL(u)->name() : mime; // mimetype by magic is not determined automatically // for non-local urls - we may support this file type or may not @@ -554,10 +554,10 @@ SQ_LibraryHandler::Support SQ_LibraryHandler::maybeSupported(const KURL &u, cons { if((*it).mime_multi) { - if((*it).mimetype.find(mimeDet, 0, false) != -1) + if((*it).mimetype.tqfind(mimeDet, 0, false) != -1) return SQ_LibraryHandler::Yes; } - else if((*it).mimetype == mimeDet) // don't waste CPU time with find() + else if((*it).mimetype == mimeDet) // don't waste CPU time with tqfind() return SQ_LibraryHandler::Yes; } diff --git a/ksquirrel/ksquirrelpart/sq_libraryhandler.h b/ksquirrel/ksquirrelpart/sq_libraryhandler.h index a3f34bf..05bd4c9 100644 --- a/ksquirrel/ksquirrelpart/sq_libraryhandler.h +++ b/ksquirrel/ksquirrelpart/sq_libraryhandler.h @@ -18,13 +18,13 @@ #ifndef SQ_LIBRARY_HANDLER_H #define SQ_LIBRARY_HANDLER_H -#include <qvaluevector.h> -#include <qdatetime.h> -#include <qobject.h> +#include <tqvaluevector.h> +#include <tqdatetime.h> +#include <tqobject.h> #include "sq_library.h" -class QStringList; +class TQStringList; class KConfig; class KURL; @@ -34,10 +34,10 @@ class KURL; * in library loading mechanizm. */ -class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> +class SQ_LibraryHandler : public TQObject, public TQValueVector<SQ_LIBRARY> { public: - SQ_LibraryHandler(QObject *parent = 0); + SQ_LibraryHandler(TQObject *tqparent = 0); ~SQ_LibraryHandler(); enum Support { Maybe = 0, Yes, No }; @@ -49,14 +49,14 @@ class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> void sync(); - Support maybeSupported(const KURL &, const QString& = QString::null) const; + Support maybeSupported(const KURL &, const TQString& = TQString()) const; /* * Find appropriate SQ_LIBRARY by filename. If * not found, return NULL. */ SQ_LIBRARY* libraryForFile(const KURL &); - SQ_LIBRARY* libraryForFile(const QString &); + SQ_LIBRARY* libraryForFile(const TQString &); /* * Find appropriate SQ_LIBRARY by its name. If @@ -64,32 +64,32 @@ class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> * * Name is a string, returned by fmt_quickinfo() */ - SQ_LIBRARY* libraryByName(const QString &name); + SQ_LIBRARY* libraryByName(const TQString &name); /* * Does any of found libraries handle given extension ? */ - bool knownExtension(const QString &ext); + bool knownExtension(const TQString &ext); /* * Fill 'filters' with all found filters, and * 'quick' with appropriate information. */ - void allFilters(QStringList &filters, QStringList &quick) const; + void allFilters(TQStringList &filters, TQStringList &quick) const; - void allWritableFilters(QStringList &filters, QStringList &quick) const; + void allWritableFilters(TQStringList &filters, TQStringList &quick) const; /* * Get all filters as one string. */ - QString allFiltersString() const; + TQString allFiltersString() const; /* * Filters as one string suitable for KFileDialogs. * If r == true, return readable codecs * If allfiles == true, append *.* to result */ - QString allFiltersFileDialogString(bool r, bool allfiles = true) const; + TQString allFiltersFileDialogString(bool r, bool allfiles = true) const; /* * Remove and unload all libraries. @@ -105,7 +105,7 @@ class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> private: - void add(QStringList &foundLibraries); + void add(TQStringList &foundLibraries); /* * Load libraries from disk. @@ -114,7 +114,7 @@ class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> /* * Is library with name 'quick' already been handled ? */ - bool alreadyInMap(const QString &quick) const; + bool alreadyInMap(const TQString &quick) const; void writeSettings(SQ_LIBRARY *lib); void readSettings(SQ_LIBRARY *lib); diff --git a/ksquirrel/ksquirrelpart/sq_popupmenu.cpp b/ksquirrel/ksquirrelpart/sq_popupmenu.cpp index 2bb037e..0dafd91 100644 --- a/ksquirrel/ksquirrelpart/sq_popupmenu.cpp +++ b/ksquirrel/ksquirrelpart/sq_popupmenu.cpp @@ -21,19 +21,19 @@ #include "sq_popupmenu.h" -SQ_PopupMenu::SQ_PopupMenu(QWidget *parent, const char *name) - : KPopupMenu(parent, name), title(0) +SQ_PopupMenu::SQ_PopupMenu(TQWidget *tqparent, const char *name) + : KPopupMenu(tqparent, name), title(0) {} SQ_PopupMenu::~SQ_PopupMenu() {} -void SQ_PopupMenu::insertTitle(const QString &t) +void SQ_PopupMenu::insertTitle(const TQString &t) { title = KPopupMenu::insertTitle(t); } -void SQ_PopupMenu::changeTitle(const QString &t) +void SQ_PopupMenu::changeTitle(const TQString &t) { KPopupMenu::changeTitle(title, t); } diff --git a/ksquirrel/ksquirrelpart/sq_popupmenu.h b/ksquirrel/ksquirrelpart/sq_popupmenu.h index c6aaaad..0714d64 100644 --- a/ksquirrel/ksquirrelpart/sq_popupmenu.h +++ b/ksquirrel/ksquirrelpart/sq_popupmenu.h @@ -27,11 +27,11 @@ class SQ_PopupMenu : public KPopupMenu { public: - SQ_PopupMenu(QWidget *parent = 0, const char *name = 0); + SQ_PopupMenu(TQWidget *tqparent = 0, const char *name = 0); ~SQ_PopupMenu(); - void insertTitle(const QString &t); - void changeTitle(const QString &t); + void insertTitle(const TQString &t); + void changeTitle(const TQString &t); private: int title; diff --git a/ksquirrel/ksquirrelpart/sq_utils.cpp b/ksquirrel/ksquirrelpart/sq_utils.cpp index dc224c6..2cfadaf 100644 --- a/ksquirrel/ksquirrelpart/sq_utils.cpp +++ b/ksquirrel/ksquirrelpart/sq_utils.cpp @@ -19,7 +19,7 @@ #include "config.h" #endif -#include <qstring.h> +#include <tqstring.h> #include <ksquirrel-libs/fmt_defs.h> @@ -37,16 +37,16 @@ #include <libkexif/kexifdata.h> #endif -void SQ_Utils::exifRotate(const QString &file, QImage &im, int o) +void SQ_Utils::exifRotate(const TQString &file, TQImage &im, int o) { #ifdef SQ_HAVE_KEXIF im = im.xForm(SQ_Utils::exifGetMatrix(file, o)); #endif } -QWMatrix SQ_Utils::exifGetMatrix(const QString &file, int o) +TQWMatrix SQ_Utils::exifGetMatrix(const TQString &file, int o) { - QWMatrix matrix; + TQWMatrix matrix; #ifdef SQ_HAVE_KEXIF int O; @@ -55,7 +55,7 @@ QWMatrix SQ_Utils::exifGetMatrix(const QString &file, int o) { KExifData data; data.readFromFile(file); - O = data.getImageOrientation(); + O = data.getImageQt::Orientation(); } else O = o; @@ -79,20 +79,20 @@ QWMatrix SQ_Utils::exifGetMatrix(const QString &file, int o) return matrix; } -QImage SQ_Utils::scaleImage(unsigned char *im, int w, int h, int fitwithin) +TQImage SQ_Utils::scaleImage(unsigned char *im, int w, int h, int fitwithin) { if(w <= fitwithin && h <= fitwithin) { - QImage scaled(im, w, h, 32, 0, 0, QImage::LittleEndian); + TQImage scaled(im, w, h, 32, 0, 0, TQImage::LittleEndian); scaled.setAlphaBuffer(true); return scaled.copy(); } - QImage orig(im, w, h, 32, 0, 0, QImage::LittleEndian); + TQImage orig(im, w, h, 32, 0, 0, TQImage::LittleEndian); orig.setAlphaBuffer(true); // return scaled image - return SQ_Utils::scale(orig, fitwithin, fitwithin, SQ_Utils::SMOOTH_FAST, QImage::ScaleMin); + return SQ_Utils::scale(orig, fitwithin, fitwithin, SQ_Utils::SMOOTH_FAST, TQ_ScaleMin); } #ifndef KSQUIRREL_PART @@ -108,18 +108,18 @@ bool SQ_Utils::loadThumbnail(const KURL &pixPath, SQ_Thumbnail &t) { KExifData data; data.readFromFile(pixPath.path()); - QImage im = data.getThumbnail(); + TQImage im = data.getThumbnail(); if(!im.isNull()) { - SQ_Utils::exifRotate(QString::null, im, data.getImageOrientation()); + SQ_Utils::exifRotate(TQString(), im, data.getImageQt::Orientation()); th = true; t.w = 0; t.h = 0; t.mime = lib->mime; - QString w, h; + TQString w, h; w = im.text("Thumb::Image::Width"); h = im.text("Thumb::Image::Height"); t.w = w.toInt(); diff --git a/ksquirrel/ksquirrelpart/sq_utils.h b/ksquirrel/ksquirrelpart/sq_utils.h index 6bffac9..706aca4 100644 --- a/ksquirrel/ksquirrelpart/sq_utils.h +++ b/ksquirrel/ksquirrelpart/sq_utils.h @@ -18,12 +18,12 @@ #ifndef SQ_UTILS_H #define SQ_UTILS_H -#include <qimage.h> -#include <qwmatrix.h> +#include <tqimage.h> +#include <tqwmatrix.h> class KURL; -class QString; +class TQString; class SQ_Thumbnail; @@ -37,13 +37,13 @@ namespace SQ_Utils { enum SmoothAlgorithm { SMOOTH_NONE, SMOOTH_FAST, SMOOTH_NORMAL, SMOOTH_BEST }; - QImage scale(const QImage& image, int width, int height, - SmoothAlgorithm alg, QImage::ScaleMode mode = QImage::ScaleFree, double blur = 1.0); + TQImage scale(const TQImage& image, int width, int height, + SmoothAlgorithm alg, TQ_ScaleMode mode = TQ_ScaleFree, double blur = 1.0); /* * Scale given image to fit it within 'fitwithin' */ - QImage scaleImage(unsigned char *im, int w, int h, int fitwithin); + TQImage scaleImage(unsigned char *im, int w, int h, int fitwithin); #ifndef KSQUIRREL_PART /* @@ -55,9 +55,9 @@ namespace SQ_Utils /* * determine EXIF rotation and rotate image if needed */ - void exifRotate(const QString &file, QImage &i, int o = -1); + void exifRotate(const TQString &file, TQImage &i, int o = -1); - QWMatrix exifGetMatrix(const QString &file, int o = -1); + TQWMatrix exifGetMatrix(const TQString &file, int o = -1); }; #endif diff --git a/ksquirrel/ksquirrelpart/sq_utils_scale.cpp b/ksquirrel/ksquirrelpart/sq_utils_scale.cpp index d2742d1..f484223 100644 --- a/ksquirrel/ksquirrelpart/sq_utils_scale.cpp +++ b/ksquirrel/ksquirrelpart/sq_utils_scale.cpp @@ -6,7 +6,7 @@ // ImageMagick code begin // ---------------------- -// This code is ImageMagick's resize code, adapted for QImage, with +// This code is ImageMagick's resize code, adapted for TQImage, with // fastfloat class added as an optimization. // The original license text follows. @@ -71,8 +71,8 @@ #endif #endif -#include <qimage.h> -#include <qcolor.h> +#include <tqimage.h> +#include <tqcolor.h> #include <kdeversion.h> #include <kcpuinfo.h> @@ -85,8 +85,8 @@ // everything in namespace namespace SQ_Utils { -#define Max QMAX -#define Min QMIN +#define Max TQMAX +#define Min TQMIN // mustn't be less than used precision (i.e. 1/fastfloat::RATIO) #define MagickEpsilon 0.0002 @@ -422,7 +422,7 @@ static fastfloat Triangle(const fastfloat x,const fastfloat) return(0.0); } -static void HorizontalFilter(const QImage& source,QImage& destination, +static void HorizontalFilter(const TQImage& source,TQImage& destination, const fastfloat x_factor,const fastfloat blur, ContributionInfo *contribution, Filter filter, fastfloat filtersupport) { @@ -491,23 +491,23 @@ static void HorizontalFilter(const QImage& source,QImage& destination, { int px = contribution[i].pixel; int py = y; - QRgb p = reinterpret_cast< QRgb* >( source.jumpTable()[ py ])[ px ]; - red+=contribution[i].weight*qRed(p); - green+=contribution[i].weight*qGreen(p); - blue+=contribution[i].weight*qBlue(p); - alpha+=contribution[i].weight*qAlpha(p); + TQRgb p = reinterpret_cast< TQRgb* >( const_cast<TQImage&>(source).jumpTable()[ py ])[ px ]; + red+=contribution[i].weight*tqRed(p); + green+=contribution[i].weight*tqGreen(p); + blue+=contribution[i].weight*tqBlue(p); + alpha+=contribution[i].weight*tqAlpha(p); } - QRgb pix = qRgba( + TQRgb pix = tqRgba( fasttolong( red < 0 ? 0 : red > 255 ? 255 : red + 0.5 ), fasttolong( green < 0 ? 0 : green > 255 ? 255 : green + 0.5 ), fasttolong( blue < 0 ? 0 : blue > 255 ? 255 : blue + 0.5 ), fasttolong( alpha < 0 ? 0 : alpha > 255 ? 255 : alpha + 0.5 )); - reinterpret_cast< QRgb* >( destination.jumpTable()[ y ])[ x ] = pix; + reinterpret_cast< TQRgb* >( destination.jumpTable()[ y ])[ x ] = pix; } } } -static void VerticalFilter(const QImage& source,QImage& destination, +static void VerticalFilter(const TQImage& source,TQImage& destination, const fastfloat y_factor,const fastfloat blur, ContributionInfo *contribution, Filter filter, fastfloat filtersupport ) { @@ -576,23 +576,23 @@ static void VerticalFilter(const QImage& source,QImage& destination, { int px = x; int py = contribution[i].pixel; - QRgb p = reinterpret_cast< QRgb* >( source.jumpTable()[ py ])[ px ]; - red+=contribution[i].weight*qRed(p); - green+=contribution[i].weight*qGreen(p); - blue+=contribution[i].weight*qBlue(p); - alpha+=contribution[i].weight*qAlpha(p); + TQRgb p = reinterpret_cast< TQRgb* >( const_cast<TQImage&>(source).jumpTable()[ py ])[ px ]; + red+=contribution[i].weight*tqRed(p); + green+=contribution[i].weight*tqGreen(p); + blue+=contribution[i].weight*tqBlue(p); + alpha+=contribution[i].weight*tqAlpha(p); } - QRgb pix = qRgba( + TQRgb pix = tqRgba( fasttolong( red < 0 ? 0 : red > 255 ? 255 : red + 0.5 ), fasttolong( green < 0 ? 0 : green > 255 ? 255 : green + 0.5 ), fasttolong( blue < 0 ? 0 : blue > 255 ? 255 : blue + 0.5 ), fasttolong( alpha < 0 ? 0 : alpha > 255 ? 255 : alpha + 0.5 )); - reinterpret_cast< QRgb* >( destination.jumpTable()[ y ])[ x ] = pix; + reinterpret_cast< TQRgb* >( destination.jumpTable()[ y ])[ x ] = pix; } } } -static QImage ResizeImage(const QImage& image,const int columns, +static TQImage ResizeImage(const TQImage& image,const int columns, const int rows, Filter filter, fastfloat filtersupport, double blur) { ContributionInfo @@ -610,7 +610,7 @@ static QImage ResizeImage(const QImage& image,const int columns, */ if ((columns == image.width()) && (rows == image.height()) && (blur == 1.0)) return image.copy(); - QImage resize_image( columns, rows, 32 ); + TQImage resize_image( columns, rows, 32 ); resize_image.setAlphaBuffer( image.hasAlphaBuffer()); /* Allocate filter contribution info. @@ -637,7 +637,7 @@ static QImage ResizeImage(const QImage& image,const int columns, if (((fastfloat) columns*(image.height()+rows)) > ((fastfloat) rows*(image.width()+columns))) { - QImage source_image( columns, image.height(), 32 ); + TQImage source_image( columns, image.height(), 32 ); source_image.setAlphaBuffer( image.hasAlphaBuffer()); HorizontalFilter(image,source_image,x_factor,blur, contribution,filter,filtersupport); @@ -646,7 +646,7 @@ static QImage ResizeImage(const QImage& image,const int columns, } else { - QImage source_image( image.width(), rows, 32 ); + TQImage source_image( image.width(), rows, 32 ); source_image.setAlphaBuffer( image.hasAlphaBuffer()); VerticalFilter(image,source_image,y_factor,blur, contribution,filter,filtersupport); @@ -723,7 +723,7 @@ static QImage ResizeImage(const QImage& image,const int columns, % % */ -QImage SampleImage(const QImage& image,const int columns, +TQImage SampleImage(const TQImage& image,const int columns, const int rows) { int @@ -755,7 +755,7 @@ QImage SampleImage(const QImage& image,const int columns, // 32bit like the ImageMagick original. This avoids the relatively // expensive conversion. const int d = image.depth() / 8; - QImage sample_image( columns, rows, image.depth()); + TQImage sample_image( columns, rows, image.depth()); sample_image.setAlphaBuffer( image.hasAlphaBuffer()); /* Allocate scan line buffer and column offset buffers. @@ -768,7 +768,7 @@ QImage SampleImage(const QImage& image,const int columns, */ // In the following several code 0.5 needs to be added, otherwise the image // would be moved by half a pixel to bottom-right, just like -// with Qt's QImage::scale() +// with TQt's TQImage::scale() for (x=0; x < (long) sample_image.width(); x++) { x_offset[x]=int((x+0.5)*image.width()/sample_image.width()); @@ -807,7 +807,7 @@ QImage SampleImage(const QImage& image,const int columns, case 4: // 32bit for (x=0; x < (long) sample_image.width(); x++) { - *(QRgb*)q=((QRgb*)pixels)[ x_offset[x] ]; + *(TQRgb*)q=((TQRgb*)pixels)[ x_offset[x] ]; q += d; } break; @@ -847,11 +847,11 @@ QImage SampleImage(const QImage& image,const int columns, /** * This is the normal smoothscale method, based on Imlib2's smoothscale. * - * Originally I took the algorithm used in NetPBM and Qt and added MMX/3dnow - * optimizations. It ran in about 1/2 the time as Qt. Then I ported Imlib's + * Originally I took the algorithm used in NetPBM and TQt and added MMX/3dnow + * optimizations. It ran in about 1/2 the time as TQt. Then I ported Imlib's * C algorithm and it ran at about the same speed as my MMX optimized one... * Finally I ported Imlib's MMX version and it ran in less than half the - * time as my MMX algorithm, (taking only a quarter of the time Qt does). + * time as my MMX algorithm, (taking only a quarter of the time TQt does). * * Changes include formatting, namespaces and other C++'ings, removal of old * #ifdef'ed code, and removal of unneeded border calculation code. @@ -932,7 +932,7 @@ namespace MImageScale{ int* mimageCalcXPoints(int sw, int dw); int* mimageCalcApoints(int s, int d, int up); MImageScaleInfo* mimageFreeScaleInfo(MImageScaleInfo *isi); - MImageScaleInfo *mimageCalcScaleInfo(QImage &img, int sw, int sh, + MImageScaleInfo *mimageCalcScaleInfo(TQImage &img, int sw, int sh, int dw, int dh, char aa, int sow); void mimageSampleRGBA(MImageScaleInfo *isi, unsigned int *dest, int dxx, int dyy, int dx, int dy, int dw, int dh, int dow); @@ -942,7 +942,7 @@ namespace MImageScale{ void mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, int dxx, int dyy, int dx, int dy, int dw, int dh, int dow, int sow); - QImage smoothScale(const QImage& img, int dw, int dh); + TQImage smoothScale(const TQImage& img, int dw, int dh); } #ifdef HAVE_X86_MMX @@ -956,14 +956,14 @@ extern "C" { using namespace MImageScale; -QImage MImageScale::smoothScale(const QImage& image, int dw, int dh) +TQImage MImageScale::smoothScale(const TQImage& image, int dw, int dh) { - QImage img = image.depth() < 32 ? image.convertDepth( 32 ) : image; + TQImage img = image.depth() < 32 ? image.convertDepth( 32 ) : image; int w = img.width(); int h = img.height(); int sow = img.bytesPerLine(); - // handle CroppedQImage + // handle CroppedTQImage if( img.height() > 1 && sow != img.scanLine( 1 ) - img.scanLine( 0 )) sow = img.scanLine( 1 ) - img.scanLine( 0 ); sow = sow / ( img.depth() / 8 ); @@ -971,9 +971,9 @@ QImage MImageScale::smoothScale(const QImage& image, int dw, int dh) MImageScaleInfo *scaleinfo = mimageCalcScaleInfo(img, w, h, dw, dh, true, sow); if(!scaleinfo) - return QImage(); + return TQImage(); - QImage buffer(dw, dh, 32); + TQImage buffer(dw, dh, 32); buffer.setAlphaBuffer(img.hasAlphaBuffer()); #ifdef HAVE_X86_MMX @@ -1138,7 +1138,7 @@ MImageScaleInfo* MImageScale::mimageFreeScaleInfo(MImageScaleInfo *isi) return(NULL); } -MImageScaleInfo* MImageScale::mimageCalcScaleInfo(QImage &img, int sw, int sh, +MImageScaleInfo* MImageScale::mimageCalcScaleInfo(TQImage &img, int sw, int sh, int dw, int dh, char aa, int sow) { MImageScaleInfo *isi; @@ -1249,7 +1249,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, g = ((gg * YAP) + (g * INV_YAP)) >> 16; b = ((bb * YAP) + (b * INV_YAP)) >> 16; a = ((aa * YAP) + (a * INV_YAP)) >> 16; - *dptr++ = qRgba(r, g, b, a); + *dptr++ = tqRgba(r, g, b, a); } else{ pix = ypoints[dyy + y] + xpoints[x]; @@ -1266,7 +1266,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, g >>= 8; b >>= 8; a >>= 8; - *dptr++ = qRgba(r, g, b, a); + *dptr++ = tqRgba(r, g, b, a); } } } @@ -1290,7 +1290,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, g >>= 8; b >>= 8; a >>= 8; - *dptr++ = qRgba(r, g, b, a); + *dptr++ = tqRgba(r, g, b, a); } else *dptr++ = sptr[xpoints[x] ]; @@ -1367,7 +1367,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, b >>= 4; a >>= 4; } - *dptr = qRgba(r, g, b, a); + *dptr = tqRgba(r, g, b, a); dptr++; } } @@ -1441,7 +1441,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, b >>= 4; a >>= 4; } - *dptr = qRgba(r, g, b, a); + *dptr = tqRgba(r, g, b, a); dptr++; } } @@ -1605,7 +1605,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, r = ((rr * YAP) + (r * INV_YAP)) >> 16; g = ((gg * YAP) + (g * INV_YAP)) >> 16; b = ((bb * YAP) + (b * INV_YAP)) >> 16; - *dptr++ = qRgba(r, g, b, 0xff); + *dptr++ = tqRgba(r, g, b, 0xff); } else{ pix = ypoints[dyy + y] + xpoints[x]; @@ -1619,7 +1619,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, r >>= 8; g >>= 8; b >>= 8; - *dptr++ = qRgba(r, g, b, 0xff); + *dptr++ = tqRgba(r, g, b, 0xff); } } } @@ -1640,7 +1640,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, r >>= 8; g >>= 8; b >>= 8; - *dptr++ = qRgba(r, g, b, 0xff); + *dptr++ = tqRgba(r, g, b, 0xff); } else *dptr++ = sptr[xpoints[x] ]; @@ -1708,7 +1708,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, g >>= 4; b >>= 4; } - *dptr = qRgba(r, g, b, 0xff); + *dptr = tqRgba(r, g, b, 0xff); dptr++; } } @@ -1773,7 +1773,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, g >>= 4; b >>= 4; } - *dptr = qRgba(r, g, b, 0xff); + *dptr = tqRgba(r, g, b, 0xff); dptr++; } } @@ -1877,14 +1877,14 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, // Imlib2/Mosfet code end -QImage scale(const QImage& image, int width, int height, - SmoothAlgorithm alg, QImage::ScaleMode mode, double blur ) +TQImage scale(const TQImage& image, int width, int height, + SmoothAlgorithm alg, TQ_ScaleMode mode, double blur ) { if( image.isNull()) return image.copy(); - QSize newSize( image.size() ); - newSize.scale( QSize( width, height ), (QSize::ScaleMode)mode ); // ### remove cast in Qt 4.0 - newSize = newSize.expandedTo( QSize( 1, 1 )); // make sure it doesn't become null + TQSize newSize( image.size() ); + newSize.tqscale( TQSize( width, height ), (TQSize::ScaleMode)mode ); // ### remove cast in TQt 4.0 + newSize = newSize.expandedTo( TQSize( 1, 1 )); // make sure it doesn't become null if ( newSize == image.size() ) return image.copy(); @@ -1926,7 +1926,7 @@ QImage scale(const QImage& image, int width, int height, } return ResizeImage( image.convertDepth( 32 ), width, height, filter, filtersupport, blur ); - // unlike Qt's smoothScale() this function introduces new colors to grayscale images ... oh well + // unlike TQt's smoothScale() this function introduces new colors to grayscale images ... oh well } diff --git a/ksquirrel/main.cpp b/ksquirrel/main.cpp index b3ca621..3c1a2b5 100644 --- a/ksquirrel/main.cpp +++ b/ksquirrel/main.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qgl.h> -#include <qdir.h> -#include <qfile.h> +#include <tqgl.h> +#include <tqdir.h> +#include <tqfile.h> #include <kapplication.h> #include <kcmdlineargs.h> @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) { KSquirrel *SQ; SQ_HLOptions *high; - const QCString App = "ksquirrel"; + const TQCString App = "ksquirrel"; KAboutData aboutData( "ksquirrel", @@ -68,18 +68,18 @@ int main(int argc, char *argv[]) I18N_NOOP("KSquirrel - image viewer for KDE"), KAboutData::License_GPL, "(c) 2003-2007 Baryshev Dmitry", - QString::null, + TQString(), "http://ksquirrel.sourceforge.net", // setup 'About' dialog - aboutData.addAuthor("Dmitry Baryshev aka Krasu", "Author", "[email protected]", QString::null); - aboutData.addCredit("Andrey Rahmatullin aka wrar", I18N_NOOP("Bug reports, patches"), "[email protected]", QString::null); - aboutData.addCredit("SeaJey", I18N_NOOP("Testing"), "[email protected]", QString::null); - aboutData.addCredit("JaguarWan", I18N_NOOP("Bug reports"), "[email protected]", QString::null); + aboutData.addAuthor("Dmitry Baryshev aka Krasu", "Author", "[email protected]", TQString()); + aboutData.addCredit("Andrey Rahmatullin aka wrar", I18N_NOOP("Bug reports, patches"), "[email protected]", TQString()); + aboutData.addCredit("SeaJey", I18N_NOOP("Testing"), "[email protected]", TQString()); + aboutData.addCredit("JaguarWan", I18N_NOOP("Bug reports"), "[email protected]", TQString()); aboutData.addCredit("NightGoblin", I18N_NOOP("Translation help"), 0, "http://nightgoblin.info"); aboutData.addCredit(I18N_NOOP("TiamaT"), I18N_NOOP("Initial artwork for edit tools"), "[email protected]", "http://www.livejournal.com/users/tiamatik/"); - aboutData.addCredit(I18N_NOOP("Fera"), I18N_NOOP("Great artwork for edit tools"), "[email protected]", QString::null); + aboutData.addCredit(I18N_NOOP("Fera"), I18N_NOOP("Great artwork for edit tools"), "[email protected]", TQString()); aboutData.addCredit(I18N_NOOP("OpenGL forum at"), 0, 0, "http://opengl.org"); aboutData.addCredit(I18N_NOOP("GameDev forum at"), 0, 0, "http://gamedev.ru"); @@ -92,7 +92,7 @@ int main(int argc, char *argv[]) high = new SQ_HLOptions; if(sq_args->count()) - high->param = QFile::decodeName(sq_args->arg(0)); + high->param = TQFile::decodeName(sq_args->arg(0)); high->showLibsAndExit = sq_args->isSet("l"); bool printDCOP = sq_args->isSet("d"); @@ -104,7 +104,7 @@ int main(int argc, char *argv[]) KApplication a; - if(!QGLFormat::hasOpenGL()) + if(!TQGLFormat::hasOpenGL()) { qWarning("KSquirrel: this system has no OpenGL support. Exiting." ); exit(1); @@ -121,13 +121,13 @@ int main(int argc, char *argv[]) if(reg && !high->param.isEmpty()) { // Yes, it is registered. Let's send a message to it. - QCString replyType; - QByteArray data, replyData; - QDataStream dataStream(data, IO_WriteOnly); + TQCString replyType; + TQByteArray data, replyData; + TQDataStream dataStream(data, IO_WriteOnly); dataStream << high->param; - if(!a.dcopClient()->call(App, App, "load(QString)", data, replyType, replyData)) + if(!a.dcopClient()->call(App, App, "load(TQString)", data, replyType, replyData)) qDebug("\nUnable to send data to old instance of KSquirrel: exiting.\n"); sq_args->clear(); @@ -138,7 +138,7 @@ int main(int argc, char *argv[]) // If registered, but no url was specified in command line else if(reg) { - QString data; + TQString data; if(!a.dcopClient()->send(App, App, "activate()", data)) qDebug("\nUnable to send data to old instance of KSquirrel: exiting.\n"); @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) } } - KGlobal::dirs()->addResourceType("data", KStandardDirs::kde_default("data") + QString::fromLatin1("ksquirrel")); + KGlobal::dirs()->addResourceType("data", KStandardDirs::kde_default("data") + TQString::tqfromLatin1("ksquirrel")); SQ_SplashScreen *splash = 0; diff --git a/ksquirrel/sidebar/sq_categoriesview.cpp b/ksquirrel/sidebar/sq_categoriesview.cpp index 042e696..bc0c4b5 100644 --- a/ksquirrel/sidebar/sq_categoriesview.cpp +++ b/ksquirrel/sidebar/sq_categoriesview.cpp @@ -19,8 +19,8 @@ #include "config.h" #endif -#include <qfile.h> -#include <qheader.h> +#include <tqfile.h> +#include <tqheader.h> #include <kio/job.h> #include <ktoolbar.h> @@ -51,16 +51,16 @@ SQ_CategoriesBox * SQ_CategoriesBox::sing = 0; /* *************************************************************************************** */ -SQ_CategoriesViewBranch::SQ_CategoriesViewBranch(KFileTreeView *parent, const KURL &url, const QString &name, const QPixmap &pix) - : KFileTreeBranch(parent, url, name, pix) +SQ_CategoriesViewBranch::SQ_CategoriesViewBranch(KFileTreeView *tqparent, const KURL &url, const TQString &name, const TQPixmap &pix) + : KFileTreeBranch(tqparent, url, name, pix) {} SQ_CategoriesViewBranch::~SQ_CategoriesViewBranch() {} -KFileTreeViewItem* SQ_CategoriesViewBranch::createTreeViewItem(KFileTreeViewItem *parent, KFileItem *fileItem) +KFileTreeViewItem* SQ_CategoriesViewBranch::createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem) { - KFileTreeViewItem *i = KFileTreeBranch::createTreeViewItem(parent, fileItem); + KFileTreeViewItem *i = KFileTreeBranch::createTreeViewItem(tqparent, fileItem); /* * In storage there are files with MD5 sum appended to their names. @@ -68,8 +68,8 @@ KFileTreeViewItem* SQ_CategoriesViewBranch::createTreeViewItem(KFileTreeViewItem */ if(i) { - QString n = i->fileItem()->name(); - int ind = n.findRev('.'); + TQString n = i->fileItem()->name(); + int ind = n.tqfindRev('.'); // OOPS if(ind != -1) @@ -83,7 +83,7 @@ KFileTreeViewItem* SQ_CategoriesViewBranch::createTreeViewItem(KFileTreeViewItem /* *************************************************************************************** */ -SQ_CategoriesView::SQ_CategoriesView(QWidget *parent, const char *name) : KFileTreeView(parent, name) +SQ_CategoriesView::SQ_CategoriesView(TQWidget *tqparent, const char *name) : KFileTreeView(tqparent, name) { setAcceptDrops(true); @@ -105,10 +105,10 @@ SQ_CategoriesView::SQ_CategoriesView(QWidget *parent, const char *name) : KFileT menu = new SQ_TreeViewMenu(this); - connect(this, SIGNAL(spacePressed(QListViewItem*)), this, SIGNAL(executed(QListViewItem*))); - connect(this, SIGNAL(returnPressed(QListViewItem*)), this, SIGNAL(executed(QListViewItem*))); - connect(this, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemExecuted(QListViewItem*))); - connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(spacePressed(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SIGNAL(executed(TQListViewItem*))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(returnPressed(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SIGNAL(executed(TQListViewItem*))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(executed(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(slotItemExecuted(TQListViewItem*))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), TQT_TQOBJECT(this), TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&))); } SQ_CategoriesView::~SQ_CategoriesView() @@ -116,7 +116,7 @@ SQ_CategoriesView::~SQ_CategoriesView() delete m_dir; } -void SQ_CategoriesView::slotContextMenu(KListView *, QListViewItem *item, const QPoint &p) +void SQ_CategoriesView::slotContextMenu(KListView *, TQListViewItem *item, const TQPoint &p) { if(item) { @@ -127,7 +127,7 @@ void SQ_CategoriesView::slotContextMenu(KListView *, QListViewItem *item, const } } -void SQ_CategoriesView::slotItemExecuted(QListViewItem *item) +void SQ_CategoriesView::slotItemExecuted(TQListViewItem *item) { if(!item) return; @@ -151,7 +151,7 @@ void SQ_CategoriesView::slotItemExecuted(QListViewItem *item) /* ************************************************************** */ -SQ_CategoriesBox::SQ_CategoriesBox(QWidget *parent, const char *name) : QVBox(parent, name) +SQ_CategoriesBox::SQ_CategoriesBox(TQWidget *tqparent, const char *name) : TQVBox(tqparent, name) { sing = this; @@ -160,26 +160,26 @@ SQ_CategoriesBox::SQ_CategoriesBox(QWidget *parent, const char *name) : QVBox(pa view = new SQ_CategoriesView(this); toolbar = new KToolBar(this); - connect(view, SIGNAL(dropped(QDropEvent*, QListViewItem*, QListViewItem*)), this, SLOT(slotDropped(QDropEvent*, QListViewItem*, QListViewItem*))); + connect(view, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*, TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*))); menu = new SQ_CategoryBrowserMenu(view->dir()->root(), 0, "Categories menu"); toolbar->setIconSize(KIcon::SizeSmall); - toolbar->insertButton("folder_new", 0, SIGNAL(clicked()), this, SLOT(slotNewCategory()), true, i18n("New category")); - toolbar->insertButton("edittrash", 0, SIGNAL(clicked()), this, SLOT(slotDeleteItem()), true, i18n("Delete")); - toolbar->insertButton("info", 0, SIGNAL(clicked()), this, SLOT(slotItemProperties()), true, i18n("Properties")); - toolbar->insertButton("bookmark_add", 0, SIGNAL(clicked()), this, SLOT(slotDefaultCategories()), true, i18n("Create default categories")); + toolbar->insertButton("folder_new", 0, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotNewCategory()), true, i18n("New category")); + toolbar->insertButton("edittrash", 0, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotDeleteItem()), true, i18n("Delete")); + toolbar->insertButton("info", 0, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotItemProperties()), true, i18n("Properties")); + toolbar->insertButton("bookmark_add", 0, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotDefaultCategories()), true, i18n("Create default categories")); - view->popupMenu()->reconnect(SQ_TreeViewMenu::New, this, SLOT(slotNewCategory())); - view->popupMenu()->reconnect(SQ_TreeViewMenu::Delete, this, SLOT(slotDeleteItem())); - view->popupMenu()->reconnect(SQ_TreeViewMenu::Properties, this, SLOT(slotItemProperties())); + view->popupMenu()->reconnect(SQ_TreeViewMenu::New, TQT_TQOBJECT(this), TQT_SLOT(slotNewCategory())); + view->popupMenu()->reconnect(SQ_TreeViewMenu::Delete, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteItem())); + view->popupMenu()->reconnect(SQ_TreeViewMenu::Properties, TQT_TQOBJECT(this), TQT_SLOT(slotItemProperties())); } SQ_CategoriesBox::~SQ_CategoriesBox() {} -void SQ_CategoriesBox::addToCategory(const QString &path) +void SQ_CategoriesBox::addToCategory(const TQString &path) { KFileItemList *selected = const_cast<KFileItemList *>(SQ_WidgetStack::instance()->selectedItems()); @@ -192,7 +192,7 @@ void SQ_CategoriesBox::addToCategory(const QString &path) while(item) { if(item->isFile()) - SQ_StorageFile::writeStorageFile(path + QDir::separator() + item->name(), item->url().path()); + SQ_StorageFile::writeStorageFile(path + TQDir::separator() + item->name(), item->url().path()); item = selected->next(); } @@ -204,11 +204,11 @@ void SQ_CategoriesBox::slotDefaultCategories() i18n("This will create default categories: Concerts, Pets, Home, Friends, Free time, Travelling and Nature. Continue?"), i18n("Create default categories")) == KMessageBox::Yes) { - QStringList list; + TQStringList list; list << "Concerts" << "Pets" << "Home" << "Friends" << "Free time" << "Traveling" << "Nature"; - for(QStringList::iterator it = list.begin();it != list.end();++it) + for(TQStringList::iterator it = list.begin();it != list.end();++it) view->dir()->mkdir(*it); } } @@ -222,22 +222,22 @@ void SQ_CategoriesBox::slotNewCategory() if(!cur) return; if(!cur->isDir()) - cur = static_cast<KFileTreeViewItem *>(cur->parent()); + cur = static_cast<KFileTreeViewItem *>(cur->tqparent()); if(!cur) return; - QString tmp = KInputDialog::getText(i18n("New Category"), i18n("Create new category:"), + TQString tmp = KInputDialog::getText(i18n("New Category"), i18n("Create new category:"), lastdir, &ok, this); if(ok) { lastdir = tmp; - KIO::mkdir(cur->path() + QDir::separator() + lastdir); + KIO::mkdir(cur->path() + TQDir::separator() + lastdir); } } -void SQ_CategoriesBox::slotDropped(QDropEvent *e, QListViewItem *parent, QListViewItem *item) +void SQ_CategoriesBox::slotDropped(TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *item) { - if(!item) item = parent; + if(!item) item = tqparent; KFileTreeViewItem *cur = static_cast<KFileTreeViewItem *>(item); @@ -245,21 +245,21 @@ void SQ_CategoriesBox::slotDropped(QDropEvent *e, QListViewItem *parent, QListVi KURL::List list; KURLDrag::decode(e, list); - QString path = cur->path(); + TQString path = cur->path(); if(list.first().path().startsWith(view->dir()->root())) KIO::move(list, cur->url()); else { KURL::List::iterator itEnd = list.end(); - QString mimeDet; + TQString mimeDet; for(KURL::List::iterator it = list.begin(); it != itEnd;++it) { mimeDet = KMimeType::findByURL(*it)->name(); if(mimeDet != "inode/directory") - SQ_StorageFile::writeStorageFile(path + QDir::separator() + (*it).fileName(), (*it)); + SQ_StorageFile::writeStorageFile(path + TQDir::separator() + (*it).fileName(), (*it)); } } } @@ -276,7 +276,7 @@ void SQ_CategoriesBox::slotDeleteItem() if(cur->url().equals(root, true)) return; - QListViewItem *next = cur->itemBelow(); + TQListViewItem *next = cur->itemBelow(); if(!next) next = cur->itemAbove(); if(next) @@ -285,7 +285,7 @@ void SQ_CategoriesBox::slotDeleteItem() view->setSelected(next, true); } - QString tmp = cur->path(); + TQString tmp = cur->path(); // remove this item manually delete cur; diff --git a/ksquirrel/sidebar/sq_categoriesview.h b/ksquirrel/sidebar/sq_categoriesview.h index b803dbb..177dc8f 100644 --- a/ksquirrel/sidebar/sq_categoriesview.h +++ b/ksquirrel/sidebar/sq_categoriesview.h @@ -18,7 +18,7 @@ #ifndef SQ_CATEGORIESVIEW_H #define SQ_CATEGORIESVIEW_H -#include <qvbox.h> +#include <tqvbox.h> #include <kfiletreeview.h> #include <kfiletreebranch.h> @@ -38,11 +38,11 @@ class SQ_Dir; class SQ_CategoriesViewBranch : public KFileTreeBranch { public: - SQ_CategoriesViewBranch(KFileTreeView*, const KURL &url, const QString &name, const QPixmap &pix); + SQ_CategoriesViewBranch(KFileTreeView*, const KURL &url, const TQString &name, const TQPixmap &pix); ~SQ_CategoriesViewBranch(); protected: - virtual KFileTreeViewItem *createTreeViewItem(KFileTreeViewItem *parent, KFileItem *fileItem); + virtual KFileTreeViewItem *createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem); }; /* *************************************************** */ @@ -50,9 +50,10 @@ class SQ_CategoriesViewBranch : public KFileTreeBranch class SQ_CategoriesView : public KFileTreeView { Q_OBJECT + TQ_OBJECT public: - SQ_CategoriesView(QWidget *parent = 0, const char *name = 0); + SQ_CategoriesView(TQWidget *tqparent = 0, const char *name = 0); ~SQ_CategoriesView(); SQ_TreeViewMenu *popupMenu() const; @@ -60,8 +61,8 @@ class SQ_CategoriesView : public KFileTreeView SQ_Dir* dir(); private slots: - void slotItemExecuted(QListViewItem *item); - void slotContextMenu(KListView *, QListViewItem *i, const QPoint &p); + void slotItemExecuted(TQListViewItem *item); + void slotContextMenu(KListView *, TQListViewItem *i, const TQPoint &p); private: KFileTreeBranch *root; @@ -84,12 +85,13 @@ SQ_Dir* SQ_CategoriesView::dir() /* *************************************************** */ -class SQ_CategoriesBox : public QVBox +class SQ_CategoriesBox : public TQVBox { Q_OBJECT + TQ_OBJECT public: - SQ_CategoriesBox(QWidget *parent = 0, const char *name = 0); + SQ_CategoriesBox(TQWidget *tqparent = 0, const char *name = 0); ~SQ_CategoriesBox(); /* @@ -100,7 +102,7 @@ class SQ_CategoriesBox : public QVBox /* * Add selected files to some category */ - void addToCategory(const QString &); + void addToCategory(const TQString &); static SQ_CategoriesBox* instance() { return sing; }; @@ -109,12 +111,12 @@ class SQ_CategoriesBox : public QVBox void slotDefaultCategories(); void slotDeleteItem(); void slotItemProperties(); - void slotDropped(QDropEvent *, QListViewItem *, QListViewItem *); + void slotDropped(TQDropEvent *, TQListViewItem *, TQListViewItem *); private: SQ_CategoriesView *view; KToolBar *toolbar; - QString lastdir, copypath; + TQString lastdir, copypath; SQ_CategoryBrowserMenu *menu; static SQ_CategoriesBox *sing; diff --git a/ksquirrel/sidebar/sq_categorybrowsermenu.cpp b/ksquirrel/sidebar/sq_categorybrowsermenu.cpp index da384dd..a8884a1 100644 --- a/ksquirrel/sidebar/sq_categorybrowsermenu.cpp +++ b/ksquirrel/sidebar/sq_categorybrowsermenu.cpp @@ -32,8 +32,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "config.h" #endif -#include <qpixmap.h> -#include <qdir.h> +#include <tqpixmap.h> +#include <tqdir.h> #include <kglobal.h> #include <kconfig.h> @@ -59,32 +59,32 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define CICON(a) (*_icons)[a] -QMap<QString, QPixmap> *SQ_CategoryBrowserMenu::_icons = 0; +TQMap<TQString, TQPixmap> *SQ_CategoryBrowserMenu::_icons = 0; -SQ_CategoryBrowserMenu::SQ_CategoryBrowserMenu(QString path, QWidget *parent, const char *name, int startid) - : KPanelMenu(path, parent, name) +SQ_CategoryBrowserMenu::SQ_CategoryBrowserMenu(TQString path, TQWidget *tqparent, const char *name, int startid) + : KPanelMenu(path, tqparent, name) , _mimecheckTimer(0) , _startid(startid) , _dirty(false) { _subMenus.setAutoDelete(true); - _lastpress = QPoint(-1, -1); + _lastpress = TQPoint(-1, -1); setAcceptDrops(true); // Should depend on permissions of path. // we are not interested for dirty events on files inside the // directory (see slotClearIfNeeded) - connect( &_dirWatch, SIGNAL(dirty(const QString&)), - this, SLOT(slotClearIfNeeded(const QString&)) ); - connect( &_dirWatch, SIGNAL(created(const QString&)), - this, SLOT(slotClear()) ); - connect( &_dirWatch, SIGNAL(deleted(const QString&)), - this, SLOT(slotClear()) ); + connect( &_dirWatch, TQT_SIGNAL(dirty(const TQString&)), + this, TQT_SLOT(slotClearIfNeeded(const TQString&)) ); + connect( &_dirWatch, TQT_SIGNAL(created(const TQString&)), + this, TQT_SLOT(slotClear()) ); + connect( &_dirWatch, TQT_SIGNAL(deleted(const TQString&)), + this, TQT_SLOT(slotClear()) ); } SQ_CategoryBrowserMenu::~SQ_CategoryBrowserMenu() {} -void SQ_CategoryBrowserMenu::slotClearIfNeeded(const QString& p) +void SQ_CategoryBrowserMenu::slotClearIfNeeded(const TQString& p) { if (p == path()) slotClear(); @@ -93,7 +93,7 @@ void SQ_CategoryBrowserMenu::slotClearIfNeeded(const QString& p) void SQ_CategoryBrowserMenu::initialize() { - _lastpress = QPoint(-1, -1); + _lastpress = TQPoint(-1, -1); // don't change menu if already visible if (isVisible()) @@ -126,11 +126,11 @@ void SQ_CategoryBrowserMenu::initialize() _filemap.clear(); _mimemap.clear(); - int filter = QDir::Dirs | QDir::Files; + int filter = TQDir::Dirs | TQDir::Files; if(_showhidden) - filter |= QDir::Hidden; + filter |= TQDir::Hidden; - QDir dir(path(), QString::null, QDir::DirsFirst | QDir::Name | QDir::IgnoreCase, filter); + TQDir dir(path(), TQString(), TQDir::DirsFirst | TQDir::Name | TQDir::IgnoreCase, filter); // does the directory exist? if (!dir.exists()) { @@ -139,7 +139,7 @@ void SQ_CategoryBrowserMenu::initialize() } // get entry list - const QFileInfoList *list = dir.entryInfoList(); + const TQFileInfoList *list = dir.entryInfoList(); // no list -> read error if (!list) { @@ -164,7 +164,7 @@ void SQ_CategoryBrowserMenu::initialize() if(dir.root() != path()) { insertTitle(path().right(path().length() - dir.root().length())); - insertItem(CICON("bookmark_add"), i18n("Add here"), this, SLOT(slotAddToCategory())); + insertItem(CICON("bookmark_add"), i18n("Add here"), this, TQT_SLOT(slotAddToCategory())); } } @@ -174,7 +174,7 @@ void SQ_CategoryBrowserMenu::initialize() int run_id = _startid; // get list iterator - QFileInfoListIterator it(*list); + TQFileInfoListIterator it(*list); // jump to startid it += _startid; @@ -185,20 +185,20 @@ void SQ_CategoryBrowserMenu::initialize() // bump id run_id++; - QFileInfo *fi = it.current(); + TQFileInfo *fi = it.current(); // handle directories if (fi->isDir()) { - QString name = fi->fileName(); + TQString name = fi->fileName(); // ignore . and .. entries if (name == "." || name == "..") continue; - QPixmap icon; - QString path = fi->absFilePath(); + TQPixmap icon; + TQString path = fi->absFilePath(); // parse .directory if it does exist - if (QFile::exists(path + "/.directory")) { + if (TQFile::exists(path + "/.directory")) { KSimpleConfig c(path + "/.directory", true); c.setDesktopGroup(); @@ -234,14 +234,14 @@ void SQ_CategoryBrowserMenu::initialize() // handle files else if(fi->isFile()) { - QString name = fi->fileName(); - QString title = KIO::decodeFileName(name); + TQString name = fi->fileName(); + TQString title = KIO::decodeFileName(name); // ignore .directory and .order files if (name == ".directory" || name == ".order") continue; - QPixmap icon; - QString path = fi->absFilePath(); + TQPixmap icon; + TQString path = fi->absFilePath(); bool mimecheck = false; @@ -252,13 +252,13 @@ void SQ_CategoryBrowserMenu::initialize() c.setDesktopGroup(); title = c.readEntry("Name", title); - QString s = c.readEntry("Icon"); - if(!_icons->contains(s)) { + TQString s = c.readEntry("Icon"); + if(!_icons->tqcontains(s)) { icon = KGlobal::iconLoader()->loadIcon(s, KIcon::Small, KIcon::SizeSmall, KIcon::DefaultState, 0, true); if(icon.isNull()) { - QString type = c.readEntry("Type", "Application"); + TQString type = c.readEntry("Type", "Application"); if (type == "Directory") icon = CICON("folder"); else if (type == "Mimetype") @@ -323,7 +323,7 @@ void SQ_CategoryBrowserMenu::initialize() adjustSize(); - QString dirname = path(); + TQString dirname = path(); int maxlen = contentsRect().width() - 40; if(item_count == 0) @@ -340,18 +340,18 @@ void SQ_CategoryBrowserMenu::initialize() if(_mimemap.count() > 0) { if(!_mimecheckTimer) - _mimecheckTimer = new QTimer(this); + _mimecheckTimer = new TQTimer(this); - connect(_mimecheckTimer, SIGNAL(timeout()), SLOT(slotMimeCheck())); + connect(_mimecheckTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotMimeCheck())); _mimecheckTimer->start(0); } } -void SQ_CategoryBrowserMenu::append(const QPixmap &pixmap, const QString &title, const QString &file, bool mimecheck) +void SQ_CategoryBrowserMenu::append(const TQPixmap &pixmap, const TQString &title, const TQString &file, bool mimecheck) { // avoid &'s being converted to accelerators - QString newTitle = title; - newTitle.replace("&", "&&"); + TQString newTitle = title; + newTitle.tqreplace("&", "&&"); newTitle = KStringHandler::cEmSqueeze( newTitle, fontMetrics(), 20 ); // insert menu item @@ -365,11 +365,11 @@ void SQ_CategoryBrowserMenu::append(const QPixmap &pixmap, const QString &title, _mimemap.insert(id, true); } -void SQ_CategoryBrowserMenu::append(const QPixmap &pixmap, const QString &title, SQ_CategoryBrowserMenu *subMenu) +void SQ_CategoryBrowserMenu::append(const TQPixmap &pixmap, const TQString &title, SQ_CategoryBrowserMenu *subMenu) { // avoid &'s being converted to accelerators - QString newTitle = title; - newTitle.replace("&", "&&"); + TQString newTitle = title; + newTitle.tqreplace("&", "&&"); newTitle = KStringHandler::cEmSqueeze( newTitle, fontMetrics(), 20 ); // insert submenu @@ -378,28 +378,28 @@ void SQ_CategoryBrowserMenu::append(const QPixmap &pixmap, const QString &title, _subMenus.append(subMenu); } -void SQ_CategoryBrowserMenu::mousePressEvent(QMouseEvent *e) +void SQ_CategoryBrowserMenu::mousePressEvent(TQMouseEvent *e) { - QPopupMenu::mousePressEvent(e); + TQPopupMenu::mousePressEvent(e); _lastpress = e->pos(); } -void SQ_CategoryBrowserMenu::mouseMoveEvent(QMouseEvent *e) +void SQ_CategoryBrowserMenu::mouseMoveEvent(TQMouseEvent *e) { - QPopupMenu::mouseMoveEvent(e); + TQPopupMenu::mouseMoveEvent(e); - if (!(e->state() & LeftButton)) return; - if(_lastpress == QPoint(-1, -1)) return; + if (!(e->state() & Qt::LeftButton)) return; + if(_lastpress == TQPoint(-1, -1)) return; // DND delay if((_lastpress - e->pos()).manhattanLength() < 12) return; // get id int id = idAt(_lastpress); - if(!_filemap.contains(id)) return; + if(!_filemap.tqcontains(id)) return; // reset _lastpress - _lastpress = QPoint(-1, -1); + _lastpress = TQPoint(-1, -1); // start drag KURL url; @@ -410,16 +410,16 @@ void SQ_CategoryBrowserMenu::mouseMoveEvent(QMouseEvent *e) d->drag(); } -void SQ_CategoryBrowserMenu::dragEnterEvent( QDragEnterEvent *ev ) +void SQ_CategoryBrowserMenu::dragEnterEvent( TQDragEnterEvent *ev ) { if (KURLDrag::canDecode(ev)) ev->accept(rect()); KPanelMenu::dragEnterEvent(ev); } -void SQ_CategoryBrowserMenu::dropEvent( QDropEvent *ev ) +void SQ_CategoryBrowserMenu::dropEvent( TQDropEvent *ev ) { - KFileItem item( path(), QString::fromLatin1( "inode/directory" ), KFileItem::Unknown ); + KFileItem item( path(), TQString::tqfromLatin1( "inode/directory" ), KFileItem::Unknown ); KonqOperations::doDrop( &item, path(), ev, this ); KPanelMenu::dropEvent(ev); // ### TODO: Update list @@ -429,12 +429,12 @@ void SQ_CategoryBrowserMenu::slotExec(int id) { kapp->propagateSessionManager(); - if(!_filemap.contains(id)) return; + if(!_filemap.tqcontains(id)) return; KURL url; url.setPath(path() + '/' + _filemap[id]); new KRun(url, 0, true); // will delete itself - _lastpress = QPoint(-1, -1); + _lastpress = TQPoint(-1, -1); } void SQ_CategoryBrowserMenu::slotAddToCategory() @@ -445,7 +445,7 @@ void SQ_CategoryBrowserMenu::slotAddToCategory() void SQ_CategoryBrowserMenu::slotMimeCheck() { // get the first map entry - QMap<int, bool>::Iterator it = _mimemap.begin(); + TQMap<int, bool>::Iterator it = _mimemap.begin(); // no mime types left to check -> stop timer if(it == _mimemap.end()) { @@ -454,7 +454,7 @@ void SQ_CategoryBrowserMenu::slotMimeCheck() } int id = it.key(); - QString file = _filemap[id]; + TQString file = _filemap[id]; _mimemap.remove(it); @@ -462,23 +462,21 @@ void SQ_CategoryBrowserMenu::slotMimeCheck() url.setPath( path() + '/' + file ); // KMimeType::Ptr mt = KMimeType::findByURL(url, 0, true, false); -// QString icon(mt->icon(url, true)); - QString icon = KMimeType::iconForURL( url ); +// TQString icon(mt->icon(url, true)); + TQString icon = KMimeType::iconForURL( url ); // kdDebug() << url.url() << ": " << icon << endl; file = KStringHandler::cEmSqueeze( file, fontMetrics(), 20 ); - file.replace("&", "&&"); - if(!_icons->contains(icon)) { - QPixmap pm = SmallIcon(icon); -#if ( QT_VERSION >= 0x030200 ) + file.tqreplace("&", "&&"); + if(!_icons->tqcontains(icon)) { + TQPixmap pm = SmallIcon(icon); if( pm.height() > 16 ) { - QPixmap cropped( 16, 16 ); + TQPixmap cropped( 16, 16 ); copyBlt( &cropped, 0, 0, &pm, 0, 0, 16, 16 ); pm = cropped; } -#endif _icons->insert(icon, pm); changeItem(id, pm, file); } @@ -507,7 +505,7 @@ void SQ_CategoryBrowserMenu::initIconMap() // kdDebug() << "SQ_CategoryBrowserMenu::initIconMap" << endl; - _icons = new QMap<QString, QPixmap>; + _icons = new TQMap<TQString, TQPixmap>; _icons->insert("folder", SmallIcon("folder")); _icons->insert("unknown", SmallIcon("mime_empty")); diff --git a/ksquirrel/sidebar/sq_categorybrowsermenu.h b/ksquirrel/sidebar/sq_categorybrowsermenu.h index d639053..8045875 100644 --- a/ksquirrel/sidebar/sq_categorybrowsermenu.h +++ b/ksquirrel/sidebar/sq_categorybrowsermenu.h @@ -31,21 +31,22 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef __browser_mnu_h__ #define __browser_mnu_h__ -#include <qmap.h> -#include <qptrlist.h> +#include <tqmap.h> +#include <tqptrlist.h> #include <kpanelmenu.h> #include <kdirwatch.h> class SQ_CategoryBrowserMenu : public KPanelMenu { Q_OBJECT + TQ_OBJECT public: - SQ_CategoryBrowserMenu(QString path, QWidget *parent = 0, const char *name = 0, int startid = 0); + SQ_CategoryBrowserMenu(TQString path, TQWidget *tqparent = 0, const char *name = 0, int startid = 0); ~SQ_CategoryBrowserMenu(); - void append(const QPixmap &pixmap, const QString &title, const QString &filename, bool mimecheck); - void append(const QPixmap &pixmap, const QString &title, SQ_CategoryBrowserMenu *subMenu); + void append(const TQPixmap &pixmap, const TQString &title, const TQString &filename, bool mimecheck); + void append(const TQPixmap &pixmap, const TQString &title, SQ_CategoryBrowserMenu *subMenu); public slots: void initialize(); @@ -54,29 +55,29 @@ class SQ_CategoryBrowserMenu : public KPanelMenu void slotExec(int id); void slotAddToCategory(); void slotMimeCheck(); - void slotClearIfNeeded(const QString&); + void slotClearIfNeeded(const TQString&); void slotClear(); protected: - void mousePressEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); - void dropEvent(QDropEvent *ev); - void dragEnterEvent(QDragEnterEvent *ev); + void mousePressEvent(TQMouseEvent *); + void mouseMoveEvent(TQMouseEvent *); + void dropEvent(TQDropEvent *ev); + void dragEnterEvent(TQDragEnterEvent *ev); void initIconMap(); - QPoint _lastpress; - QMap<int, QString> _filemap; - QMap<int, bool> _mimemap; - QTimer *_mimecheckTimer; + TQPoint _lastpress; + TQMap<int, TQString> _filemap; + TQMap<int, bool> _mimemap; + TQTimer *_mimecheckTimer; KDirWatch _dirWatch; - QPtrList<SQ_CategoryBrowserMenu> _subMenus; + TQPtrList<SQ_CategoryBrowserMenu> _subMenus; int _startid; bool _showhidden; int _maxentries; bool _dirty; - static QMap<QString, QPixmap> *_icons; + static TQMap<TQString, TQPixmap> *_icons; }; #endif diff --git a/ksquirrel/sidebar/sq_directorybasket.cpp b/ksquirrel/sidebar/sq_directorybasket.cpp index 0a3c2b2..d14ef1a 100644 --- a/ksquirrel/sidebar/sq_directorybasket.cpp +++ b/ksquirrel/sidebar/sq_directorybasket.cpp @@ -15,11 +15,11 @@ * * ***************************************************************************/ -#include <qvaluevector.h> -#include <qstringlist.h> -#include <qheader.h> -#include <qcursor.h> -#include <qtimer.h> +#include <tqvaluevector.h> +#include <tqstringlist.h> +#include <tqheader.h> +#include <tqcursor.h> +#include <tqtimer.h> #include <kglobal.h> #include <klocale.h> @@ -48,10 +48,10 @@ SQ_DirectoryBasket * SQ_DirectoryBasket::m_inst = 0; /* ******************************************************************************* */ -SQ_DBMenu::SQ_DBMenu(QWidget *parent, const char *name) : SQ_TreeViewMenu(parent, name), item(0) +SQ_DBMenu::SQ_DBMenu(TQWidget *tqparent, const char *name) : SQ_TreeViewMenu(tqparent, name), item(0) { insertSeparator(); - id_icon = insertItem(i18n("Change icon"), this, SLOT(slotChangeIcon())); + id_icon = insertItem(i18n("Change icon"), TQT_TQOBJECT(this), TQT_SLOT(slotChangeIcon())); } SQ_DBMenu::~SQ_DBMenu() @@ -61,7 +61,7 @@ void SQ_DBMenu::slotChangeIcon() { KIconDialog dialog(KGlobal::iconLoader()); dialog.setup(KIcon::Desktop, KIcon::MimeType, true, KIcon::SizeSmall); - QString result = dialog.openDialog(); + TQString result = dialog.openDialog(); if(!result.isEmpty() && item) { @@ -85,11 +85,11 @@ void SQ_DBMenu::slotDirectoryRename() { if(item) { - QString renameSrc = item->text(0); + TQString renameSrc = item->text(0); bool ok; - QString mNewFilename = KInputDialog::getText(i18n("Rename Folder"), - i18n("<p>Rename item <b>%1</b> to:</p>").arg(renameSrc), + TQString mNewFilename = KInputDialog::getText(i18n("Rename Folder"), + i18n("<p>Rename item <b>%1</b> to:</p>").tqarg(renameSrc), renameSrc, &ok, KSquirrel::app()); if(ok) @@ -112,18 +112,18 @@ void SQ_DBMenu::slotDirectoryDelete() { KIO::Job *job = KIO::del(item->KFileTreeViewItem::url()); - connect(job, SIGNAL(result(KIO::Job*)), this, SLOT(slotDirectoryResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_TQOBJECT(this), TQT_SLOT(slotDirectoryResult(KIO::Job *))); } } /* ******************************************************************************* */ -SQ_DirectoryItem::SQ_DirectoryItem(KFileTreeViewItem *parentItem, KFileItem *fileItem, KFileTreeBranch *parentBranch) - : KFileTreeViewItem(parentItem, fileItem, parentBranch), m_index(0) +SQ_DirectoryItem::SQ_DirectoryItem(KFileTreeViewItem *tqparentItem, KFileItem *fileItem, KFileTreeBranch *tqparentBranch) + : KFileTreeViewItem(tqparentItem, fileItem, tqparentBranch), m_index(0) {} -SQ_DirectoryItem::SQ_DirectoryItem(KFileTreeView *parent, KFileItem *fileItem, KFileTreeBranch *parentBranch) - : KFileTreeViewItem(parent, fileItem, parentBranch), m_index(0) +SQ_DirectoryItem::SQ_DirectoryItem(KFileTreeView *tqparent, KFileItem *fileItem, KFileTreeBranch *tqparentBranch) + : KFileTreeViewItem(tqparent, fileItem, tqparentBranch), m_index(0) {} SQ_DirectoryItem::~SQ_DirectoryItem() @@ -131,35 +131,35 @@ SQ_DirectoryItem::~SQ_DirectoryItem() /* ******************************************************************************* */ -SQ_DirectoryBasketBranch::SQ_DirectoryBasketBranch(KFileTreeView *parent, const KURL &url, const QString &name, const QPixmap &pix) - : KFileTreeBranch(parent, url, name, pix) +SQ_DirectoryBasketBranch::SQ_DirectoryBasketBranch(KFileTreeView *tqparent, const KURL &url, const TQString &name, const TQPixmap &pix) + : KFileTreeBranch(tqparent, url, name, pix) {} SQ_DirectoryBasketBranch::~SQ_DirectoryBasketBranch() {} -KFileTreeViewItem* SQ_DirectoryBasketBranch::createTreeViewItem(KFileTreeViewItem *parent, KFileItem *fileItem) +KFileTreeViewItem* SQ_DirectoryBasketBranch::createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem) { - if(!parent || !fileItem) + if(!tqparent || !fileItem) return 0; // hehe... fileItem->setMimeType("inode/directory"); - SQ_DirectoryItem *i = new SQ_DirectoryItem(parent, fileItem, this); + SQ_DirectoryItem *i = new SQ_DirectoryItem(tqparent, fileItem, this); if(i) { // inpath = "<URL><name><index>" - QStringList list = QStringList::split(QChar('\n'), SQ_StorageFile::readStorageFileAsString(i->path()), true); + TQStringList list = TQStringList::split(TQChar('\n'), SQ_StorageFile::readStorageFileAsString(i->path()), true); if(list.count() < 4) return i; - QStringList::iterator it = list.begin(); + TQStringList::iterator it = list.begin(); bool ok; - QString name, icon; + TQString name, icon; // get url KURL inpath = KURL::fromPathOrURL(*it); @@ -200,19 +200,19 @@ KFileTreeViewItem* SQ_DirectoryBasketBranch::createTreeViewItem(KFileTreeViewIte /* ******************************************************************************* */ -SQ_DirectoryBasket::SQ_DirectoryBasket(QWidget *parent, const char *name) : KFileTreeView(parent, name) +SQ_DirectoryBasket::SQ_DirectoryBasket(TQWidget *tqparent, const char *name) : KFileTreeView(tqparent, name) { m_inst = this; - progressAdd = new KProgress(0, "progress add", Qt::WStyle_StaysOnTop | Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WX11BypassWM); + progressAdd = new KProgress(0, "progress add", TQt::WStyle_StaysOnTop | TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WX11BypassWM); menu = new SQ_DBMenu(this); - timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(slotSortReal())); + timer = new TQTimer(this); + connect(timer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotSortReal())); - timerAdd = new QTimer(this); - connect(timerAdd, SIGNAL(timeout()), this, SLOT(slotDelayedShowAdd())); + timerAdd = new TQTimer(this); + connect(timerAdd, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotDelayedShowAdd())); setSorting(-1); setAcceptDrops(true); @@ -220,7 +220,7 @@ SQ_DirectoryBasket::SQ_DirectoryBasket(QWidget *parent, const char *name) : KFil dir = new SQ_Dir(SQ_Dir::DirectoryBasket); // create custom branch - root = new SQ_DirectoryBasketBranch(this, dir->root(), QString::null, + root = new SQ_DirectoryBasketBranch(this, dir->root(), TQString(), SQ_IconLoader::instance()->loadIcon("folder", KIcon::Desktop, KIcon::SizeSmall)); // some hacks to create our SQ_TreeViewItem as root item @@ -237,7 +237,7 @@ SQ_DirectoryBasket::SQ_DirectoryBasket(QWidget *parent, const char *name) : KFil addBranch(root); - disconnect(root, SIGNAL(refreshItems(const KFileItemList &)), 0, 0); + disconnect(root, TQT_SIGNAL(refreshItems(const KFileItemList &)), 0, 0); header()->hide(); addColumn(i18n("File")); @@ -246,35 +246,35 @@ SQ_DirectoryBasket::SQ_DirectoryBasket(QWidget *parent, const char *name) : KFil root->setOpen(true); setRootIsDecorated(false); - menu->reconnect(SQ_TreeViewMenu::New, this, SLOT(slotNewDirectory())); + menu->reconnect(SQ_TreeViewMenu::New, TQT_TQOBJECT(this), TQT_SLOT(slotNewDirectory())); - connect(this, SIGNAL(spacePressed(QListViewItem*)), this, SIGNAL(executed(QListViewItem*))); - connect(this, SIGNAL(returnPressed(QListViewItem*)), this, SIGNAL(executed(QListViewItem*))); - connect(this, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemExecuted(QListViewItem*))); - connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&))); - connect(this, SIGNAL(dropped(QDropEvent*, QListViewItem*, QListViewItem*)), this, SLOT(slotDropped(QDropEvent*, QListViewItem*, QListViewItem*))); - connect(this, SIGNAL(itemRenamed(QListViewItem *, int, const QString &)), this, SLOT(slotItemRenamedMy(QListViewItem *, int, const QString &))); - connect(this, SIGNAL(itemAdded(QListViewItem *)), this, SLOT(slotSort())); - connect(this, SIGNAL(moved()), this, SLOT(slotReindex())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(spacePressed(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SIGNAL(executed(TQListViewItem*))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(returnPressed(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SIGNAL(executed(TQListViewItem*))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(executed(TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(slotItemExecuted(TQListViewItem*))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), TQT_TQOBJECT(this), TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*, TQListViewItem*)), TQT_TQOBJECT(this), TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(itemRenamed(TQListViewItem *, int, const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotItemRenamedMy(TQListViewItem *, int, const TQString &))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(itemAdded(TQListViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotSort())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(moved()), TQT_TQOBJECT(this), TQT_SLOT(slotReindex())); } SQ_DirectoryBasket::~SQ_DirectoryBasket() { SQ_DirectoryItem *item = static_cast<SQ_DirectoryItem *>(root->root()->firstChild()); - static const QString &nl = KGlobal::staticQString("\n"); + static const TQString &nl = KGlobal::staticQString("\n"); if(item) { - QString url; + TQString url; int index = 0; do { - url = item->url().prettyURL() + nl + item->name() + nl + item->icon() + nl + QString::number(index); + url = item->url().prettyURL() + nl + item->name() + nl + item->icon() + nl + TQString::number(index); SQ_StorageFile::writeStorageFileAsString( - dir->root() + QDir::separator() + item->url().fileName(), + dir->root() + TQDir::separator() + item->url().fileName(), item->url(), url); ++index; @@ -288,26 +288,26 @@ SQ_DirectoryBasket::~SQ_DirectoryBasket() void SQ_DirectoryBasket::slotNewDirectory() { - static const QString &nl = KGlobal::staticQString("\n"); + static const TQString &nl = KGlobal::staticQString("\n"); - KURL url = KFileDialog::getExistingURL(QString::null, KSquirrel::app()); + KURL url = KFileDialog::getExistingURL(TQString(), KSquirrel::app()); if(url.isEmpty()) return; SQ_StorageFile::writeStorageFileAsString( - dir->root() + QDir::separator() + url.fileName(), + dir->root() + TQDir::separator() + url.fileName(), url, - (url.prettyURL() + nl + nl + nl + QString::number(root->root()->childCount()))); + (url.prettyURL() + nl + nl + nl + TQString::number(root->root()->childCount()))); } -void SQ_DirectoryBasket::slotDropped(QDropEvent *e, QListViewItem *_parent, QListViewItem *_item) +void SQ_DirectoryBasket::slotDropped(TQDropEvent *e, TQListViewItem *_parent, TQListViewItem *_item) { if(!_parent) return; if(!_item) _item = _parent; SQ_DirectoryItem *item = static_cast<SQ_DirectoryItem *>(_item); - SQ_DirectoryItem *parent = static_cast<SQ_DirectoryItem *>(_parent); + SQ_DirectoryItem *tqparent = static_cast<SQ_DirectoryItem *>(_parent); KURL::List list; KURLDrag::decode(e, list); @@ -329,9 +329,9 @@ void SQ_DirectoryBasket::slotDropped(QDropEvent *e, QListViewItem *_parent, QLis if(it) { if(it != root->root()) - moveItem(tomove, parent, it); + moveItem(tomove, tqparent, it); else - moveItem(tomove, parent, 0); + moveItem(tomove, tqparent, 0); emit moved(); @@ -365,11 +365,11 @@ void SQ_DirectoryBasket::slotDropped(QDropEvent *e, QListViewItem *_parent, QLis else { SQ_NavigatorDropMenu::instance()->setupFiles(list, item->url()); - SQ_NavigatorDropMenu::instance()->exec(QCursor::pos(), true); + SQ_NavigatorDropMenu::instance()->exec(TQCursor::pos(), true); } } -void SQ_DirectoryBasket::slotItemExecuted(QListViewItem *item) +void SQ_DirectoryBasket::slotItemExecuted(TQListViewItem *item) { if(!item) return; @@ -388,7 +388,7 @@ void SQ_DirectoryBasket::slotItemExecuted(QListViewItem *item) } } -void SQ_DirectoryBasket::slotContextMenu(KListView *, QListViewItem *item, const QPoint &p) +void SQ_DirectoryBasket::slotContextMenu(KListView *, TQListViewItem *item, const TQPoint &p) { if(item) { @@ -406,20 +406,20 @@ void SQ_DirectoryBasket::slotContextMenu(KListView *, QListViewItem *item, const void SQ_DirectoryBasket::add(const KFileItemList &list) { - static const QString &nl = KGlobal::staticQString("\n"); + static const TQString &nl = KGlobal::staticQString("\n"); KFileItemListIterator it(list); KFileItem *fi; - QString url; + TQString url; while((fi = it.current())) { if(fi->isDir()) { - url = fi->url().prettyURL() + nl + nl + nl + QString::number(root->root()->childCount()); + url = fi->url().prettyURL() + nl + nl + nl + TQString::number(root->root()->childCount()); SQ_StorageFile::writeStorageFileAsString( - dir->root() + QDir::separator() + fi->url().fileName(), + dir->root() + TQDir::separator() + fi->url().fileName(), fi->url(), url); } @@ -440,7 +440,7 @@ void SQ_DirectoryBasket::slotSortReal() struct SortableItem { - SortableItem(QListViewItem *i, int ind) : item(i), index(ind) + SortableItem(TQListViewItem *i, int ind) : item(i), index(ind) {} SortableItem() : item(0), index(0) @@ -451,16 +451,16 @@ struct SortableItem return index > i.index; } - QListViewItem *item; + TQListViewItem *item; int index; }; void SQ_DirectoryBasket::sort() { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); SQ_DirectoryItem *item; - QValueVector<SortableItem> items; + TQValueVector<SortableItem> items; int i = 0; ++it; @@ -499,7 +499,7 @@ void SQ_DirectoryBasket::slotReindex() } } -void SQ_DirectoryBasket::slotItemRenamedMy(QListViewItem *_item, int, const QString &name) +void SQ_DirectoryBasket::slotItemRenamedMy(TQListViewItem *_item, int, const TQString &name) { SQ_DirectoryItem *item = static_cast<SQ_DirectoryItem *>(_item); @@ -511,7 +511,7 @@ void SQ_DirectoryBasket::slotDelayedShowAdd() { int w = 200, h = 32; - QRect rc = KGlobalSettings::splashScreenDesktopGeometry(); + TQRect rc = KGlobalSettings::splashScreenDesktopGeometry(); progressAdd->setGeometry(rc.center().x() - w/2, rc.center().y() - h/2, w, h); progressAdd->show(); diff --git a/ksquirrel/sidebar/sq_directorybasket.h b/ksquirrel/sidebar/sq_directorybasket.h index eaf2fce..6fb4a19 100644 --- a/ksquirrel/sidebar/sq_directorybasket.h +++ b/ksquirrel/sidebar/sq_directorybasket.h @@ -23,7 +23,7 @@ #include "sq_treeviewmenu.h" -class QTimer; +class TQTimer; class KProgress; @@ -35,9 +35,10 @@ class SQ_Dir; class SQ_DBMenu : public SQ_TreeViewMenu { Q_OBJECT + TQ_OBJECT public: - SQ_DBMenu(QWidget *parent = 0, const char *name = 0); + SQ_DBMenu(TQWidget *tqparent = 0, const char *name = 0); ~SQ_DBMenu(); virtual void updateDirActions(bool, bool isroot = false); @@ -64,8 +65,8 @@ void SQ_DBMenu::setItem(SQ_DirectoryItem *i) class SQ_DirectoryItem : public KFileTreeViewItem { public: - SQ_DirectoryItem(KFileTreeViewItem *parentItem, KFileItem *fileItem, KFileTreeBranch *parentBranch); - SQ_DirectoryItem(KFileTreeView *parent, KFileItem *fileItem, KFileTreeBranch *parentBranch); + SQ_DirectoryItem(KFileTreeViewItem *tqparentItem, KFileItem *fileItem, KFileTreeBranch *tqparentBranch); + SQ_DirectoryItem(KFileTreeView *tqparent, KFileItem *fileItem, KFileTreeBranch *tqparentBranch); ~SQ_DirectoryItem(); int index() const; @@ -74,17 +75,17 @@ class SQ_DirectoryItem : public KFileTreeViewItem KURL url() const; void setURL(const KURL &u); - QString name() const; - void setName(const QString &n); + TQString name() const; + void setName(const TQString &n); - QString icon() const; - void setIcon(const QString &n); + TQString icon() const; + void setIcon(const TQString &n); bool hasName() const; private: int m_index; - QString m_name, m_icon; + TQString m_name, m_icon; KURL m_url; }; @@ -113,25 +114,25 @@ void SQ_DirectoryItem::setIndex(int ind) } inline -QString SQ_DirectoryItem::name() const +TQString SQ_DirectoryItem::name() const { return m_name; } inline -void SQ_DirectoryItem::setName(const QString &n) +void SQ_DirectoryItem::setName(const TQString &n) { m_name = n; } inline -QString SQ_DirectoryItem::icon() const +TQString SQ_DirectoryItem::icon() const { return m_icon; } inline -void SQ_DirectoryItem::setIcon(const QString &n) +void SQ_DirectoryItem::setIcon(const TQString &n) { m_icon = n; } @@ -147,19 +148,20 @@ bool SQ_DirectoryItem::hasName() const class SQ_DirectoryBasketBranch : public KFileTreeBranch { public: - SQ_DirectoryBasketBranch(KFileTreeView*, const KURL &url, const QString &name, const QPixmap &pix); + SQ_DirectoryBasketBranch(KFileTreeView*, const KURL &url, const TQString &name, const TQPixmap &pix); ~SQ_DirectoryBasketBranch(); protected: - virtual KFileTreeViewItem *createTreeViewItem(KFileTreeViewItem *parent, KFileItem *fileItem); + virtual KFileTreeViewItem *createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem); }; class SQ_DirectoryBasket : public KFileTreeView { Q_OBJECT + TQ_OBJECT public: - SQ_DirectoryBasket(QWidget *parent = 0, const char *name = 0); + SQ_DirectoryBasket(TQWidget *tqparent = 0, const char *name = 0); ~SQ_DirectoryBasket(); void add(const KFileItemList &list); @@ -170,20 +172,20 @@ class SQ_DirectoryBasket : public KFileTreeView void sort(); private slots: - void slotDropped(QDropEvent *, QListViewItem *, QListViewItem *); - void slotItemExecuted(QListViewItem *item); - void slotContextMenu(KListView *, QListViewItem *item, const QPoint &p); + void slotDropped(TQDropEvent *, TQListViewItem *, TQListViewItem *); + void slotItemExecuted(TQListViewItem *item); + void slotContextMenu(KListView *, TQListViewItem *item, const TQPoint &p); void slotNewDirectory(); void slotSortReal(); void slotSort(); void slotReindex(); - void slotItemRenamedMy(QListViewItem *, int, const QString &); + void slotItemRenamedMy(TQListViewItem *, int, const TQString &); void slotDelayedShowAdd(); private: KFileTreeBranch *root; SQ_Dir *dir; - QTimer *timer, *timerAdd; + TQTimer *timer, *timerAdd; SQ_DBMenu *menu; KProgress *progressAdd; diff --git a/ksquirrel/sidebar/sq_imagebasket.cpp b/ksquirrel/sidebar/sq_imagebasket.cpp index 9d4e6de..815721e 100644 --- a/ksquirrel/sidebar/sq_imagebasket.cpp +++ b/ksquirrel/sidebar/sq_imagebasket.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qfile.h> +#include <tqfile.h> #include <kmdcodec.h> #include <kfileview.h> @@ -38,24 +38,24 @@ SQ_ImageBasket * SQ_ImageBasket::m_inst; -SQ_ImageBasket::SQ_ImageBasket(QWidget *parent, const char *name) : KDirOperator((dir = new SQ_Dir(SQ_Dir::Basket))->root(), parent, name) +SQ_ImageBasket::SQ_ImageBasket(TQWidget *tqparent, const char *name) : KDirOperator((dir = new SQ_Dir(SQ_Dir::Basket))->root(), tqparent, name) { m_inst = this; - connect(this, SIGNAL(dropped(const KFileItem *, QDropEvent*, const KURL::List&)), - this, SLOT(slotDropped(const KFileItem *, QDropEvent*, const KURL::List&))); + connect(this, TQT_SIGNAL(dropped(const KFileItem *, TQDropEvent*, const KURL::List&)), + this, TQT_SLOT(slotDropped(const KFileItem *, TQDropEvent*, const KURL::List&))); - disconnect(dirLister(), SIGNAL(refreshItems(const KFileItemList &)), 0, 0); + disconnect(dirLister(), TQT_SIGNAL(refreshItems(const KFileItemList &)), 0, 0); // redirect "Properties" dialog disconnect(actionCollection()->action("properties"), 0, 0, 0); - connect(actionCollection()->action("properties"), SIGNAL(activated()), this, SLOT(slotBasketProperties())); + connect(actionCollection()->action("properties"), TQT_SIGNAL(activated()), this, TQT_SLOT(slotBasketProperties())); - disconnect(dirLister(), SIGNAL(newItems(const KFileItemList &)), 0, 0); - connect(dirLister(), SIGNAL(newItems(const KFileItemList &)), this, SLOT(insertNewFiles(const KFileItemList &))); + disconnect(dirLister(), TQT_SIGNAL(newItems(const KFileItemList &)), 0, 0); + connect(dirLister(), TQT_SIGNAL(newItems(const KFileItemList &)), this, TQT_SLOT(insertNewFiles(const KFileItemList &))); - connect(this, SIGNAL(viewChanged(KFileView *)), this, SLOT(slotViewChanged(KFileView *))); - connect(this, SIGNAL(fileSelected(const KFileItem *)), this, SLOT(slotExecuted(const KFileItem *))); + connect(this, TQT_SIGNAL(viewChanged(KFileView *)), this, TQT_SLOT(slotViewChanged(KFileView *))); + connect(this, TQT_SIGNAL(fileSelected(const KFileItem *)), this, TQT_SLOT(slotExecuted(const KFileItem *))); setView(KFile::Simple); setMode(KFile::Files); @@ -65,14 +65,14 @@ SQ_ImageBasket::SQ_ImageBasket(QWidget *parent, const char *name) : KDirOperator SQ_Config::instance()->setGroup("Fileview"); int sorting = 0; - if(SQ_Config::instance()->readBoolEntry("basket_sorting_name", true)) sorting |= QDir::Name; - if(SQ_Config::instance()->readBoolEntry("basket_sorting_time", false)) sorting |= QDir::Time; - if(SQ_Config::instance()->readBoolEntry("basket_sorting_size", false)) sorting |= QDir::Size; - if(SQ_Config::instance()->readBoolEntry("basket_sorting_dirs", true)) sorting |= QDir::DirsFirst; - if(SQ_Config::instance()->readBoolEntry("basket_sorting_reverse", false)) sorting |= QDir::Reversed; - if(SQ_Config::instance()->readBoolEntry("basket_sorting_ignore", false)) sorting |= QDir::IgnoreCase; + if(SQ_Config::instance()->readBoolEntry("basket_sorting_name", true)) sorting |= TQDir::Name; + if(SQ_Config::instance()->readBoolEntry("basket_sorting_time", false)) sorting |= TQDir::Time; + if(SQ_Config::instance()->readBoolEntry("basket_sorting_size", false)) sorting |= TQDir::Size; + if(SQ_Config::instance()->readBoolEntry("basket_sorting_dirs", true)) sorting |= TQDir::DirsFirst; + if(SQ_Config::instance()->readBoolEntry("basket_sorting_reverse", false)) sorting |= TQDir::Reversed; + if(SQ_Config::instance()->readBoolEntry("basket_sorting_ignore", false)) sorting |= TQDir::IgnoreCase; - setSorting(static_cast<QDir::SortSpec>(sorting)); + setSorting(static_cast<TQDir::SortSpec>(sorting)); } SQ_ImageBasket::~SQ_ImageBasket() @@ -82,7 +82,7 @@ SQ_ImageBasket::~SQ_ImageBasket() void SQ_ImageBasket::insertNewFiles(const KFileItemList &list) { - QString n; + TQString n; int ind; KFileItemListIterator it(list); KFileItem *tmp; @@ -90,7 +90,7 @@ void SQ_ImageBasket::insertNewFiles(const KFileItemList &list) for(; (tmp = it.current()); ++it) { n = tmp->name(); - ind = n.findRev('.'); + ind = n.tqfindRev('.'); // OOPS if(ind != -1) @@ -100,8 +100,8 @@ void SQ_ImageBasket::insertNewFiles(const KFileItemList &list) (void)tmp->mimetype(); tmp->setName(n); - QStringList list = QStringList::split(QChar('\n'), SQ_StorageFile::readStorageFileAsString(tmp->url().path()), true); - QStringList::iterator it = list.begin(); + TQStringList list = TQStringList::split(TQChar('\n'), SQ_StorageFile::readStorageFileAsString(tmp->url().path()), true); + TQStringList::iterator it = list.begin(); if(list.count() > 1) { @@ -111,15 +111,15 @@ void SQ_ImageBasket::insertNewFiles(const KFileItemList &list) else { KURL url = KURL::fromPathOrURL(*it); - QString mime = KMimeType::findByURL(url)->name(); + TQString mime = KMimeType::findByURL(url)->name(); tmp->setMimeType(mime); - static const QString &nl = KGlobal::staticQString("\n"); + static const TQString &nl = KGlobal::staticQString("\n"); - QString inurl = url.prettyURL() + nl + mime; + TQString inurl = url.prettyURL() + nl + mime; SQ_StorageFile::writeStorageFileAsString( - dir->root() + QDir::separator() + url.fileName(), + dir->root() + TQDir::separator() + url.fileName(), url, inurl); } } @@ -130,33 +130,33 @@ void SQ_ImageBasket::insertNewFiles(const KFileItemList &list) void SQ_ImageBasket::add(const KFileItemList &list) { KFileItem *tmp; - static const QString &nl = KGlobal::staticQString("\n"); + static const TQString &nl = KGlobal::staticQString("\n"); for(KFileItemListIterator it(list); (tmp = it.current()); ++it) { if(tmp->isFile()) { - QString inurl = tmp->url().prettyURL() + nl + tmp->mimetype(); + TQString inurl = tmp->url().prettyURL() + nl + tmp->mimetype(); SQ_StorageFile::writeStorageFileAsString( - dir->root() + QDir::separator() + tmp->name(), + dir->root() + TQDir::separator() + tmp->name(), tmp->url(), inurl); } } } -void SQ_ImageBasket::slotDropped(const KFileItem *, QDropEvent*, const KURL::List &list) +void SQ_ImageBasket::slotDropped(const KFileItem *, TQDropEvent*, const KURL::List &list) { - QString name; + TQString name; KURL::List::const_iterator itEnd = list.end(); - static const QString &nl = KGlobal::staticQString("\n"); + static const TQString &nl = KGlobal::staticQString("\n"); for(KURL::List::const_iterator it = list.begin();it != itEnd;++it) { - QString inurl = (*it).prettyURL() + nl + KMimeType::findByURL(*it)->name(); + TQString inurl = (*it).prettyURL() + nl + KMimeType::findByURL(*it)->name(); SQ_StorageFile::writeStorageFileAsString( - dir->root() + QDir::separator() + (*it).fileName(), + dir->root() + TQDir::separator() + (*it).fileName(), *it, inurl); } } @@ -226,7 +226,7 @@ void SQ_ImageBasket::slotSync() path = SQ_StorageFile::readStorageFile(item->url().path()); if(!KIO::NetAccess::stat(path, entry, KSquirrel::app())) - QFile::remove(item->url().path()); + TQFile::remove(item->url().path()); } } } @@ -262,13 +262,13 @@ void SQ_ImageBasket::slotExecuted(const KFileItem *fi) SQ_WidgetStack::instance()->diroperator()->execute(&f); } -void SQ_ImageBasket::activatedMenu(const KFileItem *, const QPoint &pos) +void SQ_ImageBasket::activatedMenu(const KFileItem *, const TQPoint &pos) { setupMenu(KDirOperator::AllActions ^ KDirOperator::NavActions ^ KDirOperator::ViewActions); updateSelectionDependentActions(); KActionMenu *pADirOperatorMenu = dynamic_cast<KActionMenu *>(actionCollection()->action("popupMenu")); - pADirOperatorMenu->popupMenu()->insertItem(i18n("Synchronize"), this, SLOT(slotSync()), 0, -1, 0); + pADirOperatorMenu->popupMenu()->insertItem(i18n("Synchronize"), this, TQT_SLOT(slotSync()), 0, -1, 0); pADirOperatorMenu->popupMenu()->insertSeparator(1); pADirOperatorMenu->popup(pos); @@ -276,13 +276,13 @@ void SQ_ImageBasket::activatedMenu(const KFileItem *, const QPoint &pos) void SQ_ImageBasket::saveConfig() { - QDir::SortSpec sort = sorting(); + TQDir::SortSpec sort = sorting(); SQ_Config::instance()->writeEntry("basket_sorting_name", KFile::isSortByName(sort)); SQ_Config::instance()->writeEntry("basket_sorting_time", KFile::isSortByDate(sort)); SQ_Config::instance()->writeEntry("basket_sorting_size", KFile::isSortBySize(sort)); SQ_Config::instance()->writeEntry("basket_sorting_dirs", KFile::isSortDirsFirst(sort)); - SQ_Config::instance()->writeEntry("basket_sorting_reverse", (sort & QDir::Reversed) == QDir::Reversed); + SQ_Config::instance()->writeEntry("basket_sorting_reverse", (sort & TQDir::Reversed) == TQDir::Reversed); SQ_Config::instance()->writeEntry("basket_sorting_ignore", KFile::isSortCaseInsensitive(sort)); SQ_Config::instance()->writeEntry("show hidden", showHiddenFiles()); diff --git a/ksquirrel/sidebar/sq_imagebasket.h b/ksquirrel/sidebar/sq_imagebasket.h index 885c711..d6882b0 100644 --- a/ksquirrel/sidebar/sq_imagebasket.h +++ b/ksquirrel/sidebar/sq_imagebasket.h @@ -29,9 +29,10 @@ class SQ_Dir; class SQ_ImageBasket : public KDirOperator { Q_OBJECT + TQ_OBJECT public: - SQ_ImageBasket(QWidget *parent = 0, const char *name = 0); + SQ_ImageBasket(TQWidget *tqparent = 0, const char *name = 0); ~SQ_ImageBasket(); void add(const KFileItemList &); @@ -45,13 +46,13 @@ class SQ_ImageBasket : public KDirOperator private slots: // coming from KDirOperator void insertNewFiles(const KFileItemList &); - void slotDropped(const KFileItem *, QDropEvent*, const KURL::List&); + void slotDropped(const KFileItem *, TQDropEvent*, const KURL::List&); void slotBasketProperties(); void slotSync(); void slotViewChanged(KFileView *); void slotExecuted(const KFileItem *fi); - void activatedMenu(const KFileItem *, const QPoint &pos); + void activatedMenu(const KFileItem *, const TQPoint &pos); private: SQ_Dir *dir; diff --git a/ksquirrel/sidebar/sq_mountview.cpp b/ksquirrel/sidebar/sq_mountview.cpp index be04839..6d29dc7 100644 --- a/ksquirrel/sidebar/sq_mountview.cpp +++ b/ksquirrel/sidebar/sq_mountview.cpp @@ -34,30 +34,30 @@ SQ_MountView * SQ_MountView::m_inst = 0; -SQ_MountView::SQ_MountView(QWidget *parent, const char *name) : KListView(parent, name), m_columns(-1) +SQ_MountView::SQ_MountView(TQWidget *tqparent, const char *name) : KListView(tqparent, name), m_columns(-1) { m_inst = this; popup = new KPopupMenu; id_mount = popup->insertItem(SQ_IconLoader::instance()->loadIcon("hdd_mount", KIcon::Desktop, KIcon::SizeSmall), - i18n("Mount"), this, SLOT(slotMount())); + i18n("Mount"), this, TQT_SLOT(slotMount())); id_unmount = popup->insertItem(SQ_IconLoader::instance()->loadIcon("hdd_unmount", KIcon::Desktop, KIcon::SizeSmall), - i18n("Unmount"), this, SLOT(slotUnmount())); + i18n("Unmount"), this, TQT_SLOT(slotUnmount())); popup->insertItem(SQ_IconLoader::instance()->loadIcon("reload", KIcon::Desktop, KIcon::SizeSmall), - i18n("Refresh"), this, SLOT(slotRefresh())); + i18n("Refresh"), this, TQT_SLOT(slotRefresh())); popup->insertSeparator(); popup->insertItem(i18n("Cancel")); - connect(this, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)), - this, SLOT(slotContextMenu(KListView *, QListViewItem *, const QPoint &))); + connect(this, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), + this, TQT_SLOT(slotContextMenu(KListView *, TQListViewItem *, const TQPoint &))); setAcceptDrops(false); - connect(this, SIGNAL(returnPressed(QListViewItem*)), this, SLOT(slotExecuted(QListViewItem *))); - connect(this, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotExecuted(QListViewItem *))); + connect(this, TQT_SIGNAL(returnPressed(TQListViewItem*)), this, TQT_SLOT(slotExecuted(TQListViewItem *))); + connect(this, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotExecuted(TQListViewItem *))); setShowSortIndicator(true); setAllColumnsShowFocus(true); - setSelectionMode(QListView::Single); + setSelectionMode(TQListView::Single); setItemsMovable(false); // "Name" column will always exist @@ -69,7 +69,7 @@ SQ_MountView::SQ_MountView(QWidget *parent, const char *name) : KListView(parent SQ_MountView::~SQ_MountView() {} -void SQ_MountView::slotExecuted(QListViewItem *i) +void SQ_MountView::slotExecuted(TQListViewItem *i) { SQ_MountViewItem *mvi = static_cast<SQ_MountViewItem *>(i); @@ -81,8 +81,8 @@ void SQ_MountView::slotExecuted(QListViewItem *i) else { mountItem = mvi; - KAutoMount *mounter = new KAutoMount(false, QString::null, mvi->device(), QString::null, QString::null, false); - connect(mounter, SIGNAL(finished()), this, SLOT(slotMountFinished())); + KAutoMount *mounter = new KAutoMount(false, TQString(), mvi->device(), TQString(), TQString(), false); + connect(mounter, TQT_SIGNAL(finished()), this, TQT_SLOT(slotMountFinished())); } } @@ -111,12 +111,12 @@ void SQ_MountView::reload(bool current) { colum = 1; - if(mounted.find((*it)->mountPoint()) == mounted.end()) + if(mounted.tqfind((*it)->mountPoint()) == mounted.end()) { mounted.append((*it)->mountPoint()); // filter out /proc, swap etc. - if(!(*it)->mountedFrom().startsWith(QChar('/')) || !(*it)->mountPoint().startsWith(QChar('/'))) + if(!(*it)->mountedFrom().startsWith(TQChar('/')) || !(*it)->mountPoint().startsWith(TQChar('/'))) continue; fi = new SQ_MountViewItem(this, (*it)->mountPoint()); @@ -130,14 +130,14 @@ void SQ_MountView::reload(bool current) fi->setText(colum++, (*it)->mountType()); if(m_columns & OPT_COL_OPTIONS) - fi->setText(colum, (*it)->mountOptions().join(QString::fromLatin1(", "))); + fi->setText(colum, (*it)->mountOptions().join(TQString::tqfromLatin1(", "))); } } } -bool SQ_MountView::exists(const QString &name) +bool SQ_MountView::exists(const TQString &name) { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); while(it.current()) { @@ -195,7 +195,7 @@ void SQ_MountView::setupColumns() setColumns(p); } -void SQ_MountView::slotContextMenu(KListView *, QListViewItem *i, const QPoint &p) +void SQ_MountView::slotContextMenu(KListView *, TQListViewItem *i, const TQPoint &p) { SQ_MountViewItem *mvi = static_cast<SQ_MountViewItem *>(i); @@ -211,8 +211,8 @@ void SQ_MountView::slotUnmount() { if(citem) { - KAutoUnmount *mounter = new KAutoUnmount(citem->text(0), QString::null); - connect(mounter, SIGNAL(finished()), this, SLOT(slotUnmountFinished())); + KAutoUnmount *mounter = new KAutoUnmount(citem->text(0), TQString()); + connect(mounter, TQT_SIGNAL(finished()), this, TQT_SLOT(slotUnmountFinished())); } } @@ -220,9 +220,9 @@ void SQ_MountView::slotMount() { if(citem) { - KAutoMount *mounter = new KAutoMount(false, QString::null, citem->device(), QString::null, QString::null, false); - connect(mounter, SIGNAL(finished()), this, SLOT(slotMountFinished2())); -// connect(mounter, SIGNAL(error()), this, SLOT(slotMountError())); + KAutoMount *mounter = new KAutoMount(false, TQString(), citem->device(), TQString(), TQString(), false); + connect(mounter, TQT_SIGNAL(finished()), this, TQT_SLOT(slotMountFinished2())); +// connect(mounter, TQT_SIGNAL(error()), this, TQT_SLOT(slotMountError())); } } diff --git a/ksquirrel/sidebar/sq_mountview.h b/ksquirrel/sidebar/sq_mountview.h index 689ac7d..e6d5b2b 100644 --- a/ksquirrel/sidebar/sq_mountview.h +++ b/ksquirrel/sidebar/sq_mountview.h @@ -18,7 +18,7 @@ #ifndef SQ_MOUNTVIEW_H #define SQ_MOUNTVIEW_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <klistview.h> @@ -33,9 +33,10 @@ class SQ_MountViewItem; class SQ_MountView : public KListView { Q_OBJECT + TQ_OBJECT public: - SQ_MountView(QWidget *parent = 0, const char *name = 0); + SQ_MountView(TQWidget *tqparent = 0, const char *name = 0); ~SQ_MountView(); enum { OPT_COL_MOUNTPOINT = 1, OPT_COL_DEVICE = 2, OPT_COL_FSTYPE = 4, OPT_COL_OPTIONS = 8 }; @@ -48,15 +49,15 @@ class SQ_MountView : public KListView private: void setColumns(int cols); - bool exists(const QString &); + bool exists(const TQString &); private slots: - void slotContextMenu(KListView *, QListViewItem *i, const QPoint &p); + void slotContextMenu(KListView *, TQListViewItem *i, const TQPoint &p); /* * Item executed. We should emit path() signal. */ - void slotExecuted(QListViewItem *i); + void slotExecuted(TQListViewItem *i); // for context menu void slotRefresh(); @@ -68,12 +69,12 @@ class SQ_MountView : public KListView void slotMountError(); signals: - void path(const QString &); + void path(const TQString &); private: int m_columns; SQ_MountViewItem *mountItem, *citem; - QStringList mounted; + TQStringList mounted; KPopupMenu *popup; int id_mount, id_unmount; diff --git a/ksquirrel/sidebar/sq_mountviewitem.cpp b/ksquirrel/sidebar/sq_mountviewitem.cpp index 30b501d..261f784 100644 --- a/ksquirrel/sidebar/sq_mountviewitem.cpp +++ b/ksquirrel/sidebar/sq_mountviewitem.cpp @@ -19,13 +19,13 @@ #include "config.h" #endif -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "sq_mountviewitem.h" #include "sq_iconloader.h" -SQ_MountViewItem::SQ_MountViewItem(KListView *parent, const QString &mpoint) - : KListViewItem(parent, mpoint), m_mounted(false) +SQ_MountViewItem::SQ_MountViewItem(KListView *tqparent, const TQString &mpoint) + : KListViewItem(tqparent, mpoint), m_mounted(false) {} SQ_MountViewItem::~SQ_MountViewItem() @@ -34,7 +34,7 @@ SQ_MountViewItem::~SQ_MountViewItem() void SQ_MountViewItem::setMounted(bool b) { m_mounted = b; - QFileInfo inf(text(0)); + TQFileInfo inf(text(0)); if(m_mounted) setPixmap(0, inf.isReadable() ? SQ_IconLoader::instance()->loadIcon("folder", KIcon::Desktop, KIcon::SizeMedium) diff --git a/ksquirrel/sidebar/sq_mountviewitem.h b/ksquirrel/sidebar/sq_mountviewitem.h index 10b625f..9817a46 100644 --- a/ksquirrel/sidebar/sq_mountviewitem.h +++ b/ksquirrel/sidebar/sq_mountviewitem.h @@ -23,18 +23,18 @@ class SQ_MountViewItem : public KListViewItem { public: - SQ_MountViewItem(KListView *parent, const QString &mpoint); + SQ_MountViewItem(KListView *tqparent, const TQString &mpoint); ~SQ_MountViewItem(); bool mounted() const; void setMounted(bool b); - QString device() const; - void setDevice(const QString &dev); + TQString device() const; + void setDevice(const TQString &dev); private: bool m_mounted; - QString m_device; + TQString m_device; }; inline @@ -44,13 +44,13 @@ bool SQ_MountViewItem::mounted() const } inline -QString SQ_MountViewItem::device() const +TQString SQ_MountViewItem::device() const { return m_device; } inline -void SQ_MountViewItem::setDevice(const QString &dev) +void SQ_MountViewItem::setDevice(const TQString &dev) { m_device = dev; } diff --git a/ksquirrel/sidebar/sq_multibar.cpp b/ksquirrel/sidebar/sq_multibar.cpp index 2074399..3f1ba27 100644 --- a/ksquirrel/sidebar/sq_multibar.cpp +++ b/ksquirrel/sidebar/sq_multibar.cpp @@ -19,9 +19,9 @@ #include "config.h" #endif -#include <qwidgetstack.h> -#include <qsignalmapper.h> -#include <qsplitter.h> +#include <tqwidgetstack.h> +#include <tqsignalmapper.h> +#include <tqsplitter.h> #include <kmultitabbar.h> #include <kglobal.h> @@ -34,7 +34,7 @@ SQ_MultiBar * SQ_MultiBar::m_inst = 0; -SQ_MultiBar::SQ_MultiBar(QWidget *parent, const char *name) : QHBox(parent, name) +SQ_MultiBar::SQ_MultiBar(TQWidget *tqparent, const char *name) : TQHBox(tqparent, name) { m_inst = this; m_id = 0; @@ -43,9 +43,9 @@ SQ_MultiBar::SQ_MultiBar(QWidget *parent, const char *name) : QHBox(parent, name SQ_Config::instance()->setGroup("Interface"); m_width = SQ_Config::instance()->readNumEntry("splitter", 220); - mapper = new QSignalMapper(this); + mapper = new TQSignalMapper(TQT_TQOBJECT(this)); - connect(mapper, SIGNAL(mapped(int)), this, SLOT(raiseWidget(int))); + connect(mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(raiseWidget(int))); mt = new KMultiTabBar(KMultiTabBar::Vertical, this); @@ -56,15 +56,15 @@ SQ_MultiBar::SQ_MultiBar(QWidget *parent, const char *name) : QHBox(parent, name setSpacing(0); - QSplitter *ts = new QSplitter(Qt::Vertical, this); + TQSplitter *ts = new TQSplitter(Qt::Vertical, this); ts->setOpaqueResize(false); - // QWigdetStack will contain all widgets - stack = new QWidgetStack(ts); + // TQWigdetStack will contain all widgets + stack = new TQWidgetStack(ts); new SQ_PreviewWidget(ts); - QValueList<int> sz; + TQValueList<int> sz; sz.append(5500); sz.append(4500); ts->setSizes(sz); @@ -73,7 +73,7 @@ SQ_MultiBar::SQ_MultiBar(QWidget *parent, const char *name) : QHBox(parent, name SQ_MultiBar::~SQ_MultiBar() {} -void SQ_MultiBar::addWidget(QWidget *new_w, const QString &text, const QString &icon) +void SQ_MultiBar::addWidget(TQWidget *new_w, const TQString &text, const TQString &icon) { // add widget to stack stack->addWidget(new_w, m_id); @@ -82,10 +82,10 @@ void SQ_MultiBar::addWidget(QWidget *new_w, const QString &text, const QString & mt->appendTab(KGlobal::iconLoader()->loadIcon(icon, KIcon::Desktop, 22), m_id, text); // since we cann't determine which tab was clicked, - // we should use QSignalMapper to determine it. - mapper->setMapping(mt->tab(m_id), m_id); + // we should use TQSignalMapper to determine it. + mapper->setMapping(TQT_TQOBJECT(mt->tab(m_id)), m_id); - connect(mt->tab(m_id), SIGNAL(clicked()), mapper, SLOT(map())); + connect(mt->tab(m_id), TQT_SIGNAL(clicked()), mapper, TQT_SLOT(map())); m_id++; } @@ -102,8 +102,8 @@ void SQ_MultiBar::raiseWidget(int id) m_selected = id; - setMinimumSize(QSize(0, 0)); - setMaximumSize(QSize(10000, 10000)); + setMinimumSize(TQSize(0, 0)); + setMaximumSize(TQSize(10000, 10000)); stack->raiseWidget(id); stack->resize(m_width, stack->height()); stack->show(); @@ -126,7 +126,7 @@ void SQ_MultiBar::raiseWidget(int id) void SQ_MultiBar::updateLayout() { - setFixedWidth(mt->sizeHint().width()); + setFixedWidth(mt->tqsizeHint().width()); stack->hide(); } diff --git a/ksquirrel/sidebar/sq_multibar.h b/ksquirrel/sidebar/sq_multibar.h index a93c8fa..22fabee 100644 --- a/ksquirrel/sidebar/sq_multibar.h +++ b/ksquirrel/sidebar/sq_multibar.h @@ -18,12 +18,12 @@ #ifndef SQ_MULTIBAR_H #define SQ_MULTIBAR_H -#include <qhbox.h> +#include <tqhbox.h> class KMultiTabBar; -class QWidgetStack; -class QSignalMapper; +class TQWidgetStack; +class TQSignalMapper; /* * Konqueror-like sidebar. @@ -33,7 +33,7 @@ class QSignalMapper; * | | | * | | | * +------------------------+ | - * | 1 | | +----> QWidgetStack, contains all widgets + * | 1 | | +----> TQWidgetStack, contains all widgets * |---| | * | 2 | | * |---| | @@ -53,19 +53,20 @@ class QSignalMapper; * */ -class SQ_MultiBar : public QHBox +class SQ_MultiBar : public TQHBox { Q_OBJECT + TQ_OBJECT public: - SQ_MultiBar(QWidget *parent = 0, const char *name = 0); + SQ_MultiBar(TQWidget *tqparent = 0, const char *name = 0); ~SQ_MultiBar(); /* * Add new widget with text label 'text' and icon 'icon'. SQ_MultiBar * will use SQ_IconLoader to load given icon. */ - void addWidget(QWidget *new_w, const QString &text, const QString &icon); + void addWidget(TQWidget *new_w, const TQString &text, const TQString &icon); /* * Current page index. 0 means first page. @@ -88,9 +89,9 @@ class SQ_MultiBar : public QHBox private: KMultiTabBar *mt; - QWidgetStack *stack; + TQWidgetStack *stack; int m_id, m_selected, m_width; - QSignalMapper *mapper; + TQSignalMapper *mapper; static SQ_MultiBar *m_inst; }; diff --git a/ksquirrel/sidebar/sq_previewwidget.cpp b/ksquirrel/sidebar/sq_previewwidget.cpp index 8168fce..1c85a93 100644 --- a/ksquirrel/sidebar/sq_previewwidget.cpp +++ b/ksquirrel/sidebar/sq_previewwidget.cpp @@ -19,9 +19,9 @@ #include "config.h" #endif -#include <qsize.h> -#include <qimage.h> -#include <qpainter.h> +#include <tqsize.h> +#include <tqimage.h> +#include <tqpainter.h> #include <klocale.h> #include <kfileitem.h> @@ -48,32 +48,32 @@ SQ_PreviewWidget * SQ_PreviewWidget::m_inst = 0; -SQ_PreviewWidget::SQ_PreviewWidget(QWidget *parent, const char *name) - : QWidget(parent, name, Qt::WNoAutoErase), all(0), small(0), m_ignore(true) +SQ_PreviewWidget::SQ_PreviewWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name, TQt::WNoAutoErase), all(0), small(0), m_ignore(true) { m_inst = this; rereadColor(); - down = new SQ_Downloader(this); - connect(down, SIGNAL(result(const KURL &)), this, SLOT(slotDownloadResult(const KURL &))); - connect(down, SIGNAL(percents(int)), this, SLOT(slotDownloadPercents(int))); + down = new SQ_Downloader(TQT_TQOBJECT(this)); + connect(down, TQT_SIGNAL(result(const KURL &)), TQT_TQOBJECT(this), TQT_SLOT(slotDownloadResult(const KURL &))); + connect(down, TQT_SIGNAL(percents(int)), TQT_TQOBJECT(this), TQT_SLOT(slotDownloadPercents(int))); popup = new KPopupMenu; - popup->insertItem(i18n("Background color..."), this, SLOT(slotBackground())); - popup->insertItem(i18n("Text color..."), this, SLOT(slotText())); + popup->insertItem(i18n("Background color..."), TQT_TQOBJECT(this), TQT_SLOT(slotBackground())); + popup->insertItem(i18n("Text color..."), TQT_TQOBJECT(this), TQT_SLOT(slotText())); popup->insertSeparator(); - popup->insertItem(i18n("Go to first image")+"\tHome", this, SIGNAL(first())); - popup->insertItem(i18n("Next image")+"\tSpace", this, SIGNAL(next())); - popup->insertItem(i18n("Previous image")+"\tBackSpace", this, SIGNAL(previous())); - popup->insertItem(i18n("Go to last image")+"\tEnd", this, SIGNAL(last())); + popup->insertItem(i18n("Go to first image")+"\tHome", TQT_TQOBJECT(this), TQT_SIGNAL(first())); + popup->insertItem(i18n("Next image")+"\tSpace", TQT_TQOBJECT(this), TQT_SIGNAL(next())); + popup->insertItem(i18n("Previous image")+"\tBackSpace", TQT_TQOBJECT(this), TQT_SIGNAL(previous())); + popup->insertItem(i18n("Go to last image")+"\tEnd", TQT_TQOBJECT(this), TQT_SIGNAL(last())); popup->insertSeparator(); - popup->insertItem(i18n("Execute")+"\tEnter", this, SIGNAL(execute())); + popup->insertItem(i18n("Execute")+"\tEnter", TQT_TQOBJECT(this), TQT_SIGNAL(execute())); multi_pix = SQ_IconLoader::instance()->loadIcon("kmultiple", KIcon::Desktop, KIcon::SizeSmall); setMinimumHeight(20); - setFocusPolicy(QWidget::WheelFocus); + setFocusPolicy(TQ_WheelFocus); } SQ_PreviewWidget::~SQ_PreviewWidget() @@ -90,7 +90,7 @@ void SQ_PreviewWidget::load(const KURL &_url) if(!percentString.isEmpty()) { - percentString = QString::null; + percentString = TQString(); update(); } @@ -121,14 +121,14 @@ void SQ_PreviewWidget::fitAndConvert() pixmap.convertFromImage(small?*small:*all); } -void SQ_PreviewWidget::resizeEvent(QResizeEvent *) +void SQ_PreviewWidget::resizeEvent(TQResizeEvent *) { fitAndConvert(); } -void SQ_PreviewWidget::paintEvent(QPaintEvent *) +void SQ_PreviewWidget::paintEvent(TQPaintEvent *) { - QPainter p(this); + TQPainter p(this); p.fillRect(rect(), color); @@ -136,11 +136,11 @@ void SQ_PreviewWidget::paintEvent(QPaintEvent *) if(!percentString.isEmpty()) { - QFont fnt = p.font(); + TQFont fnt = p.font(); fnt.setBold(true); p.setFont(fnt); p.setPen(colorText); - p.drawText(x, 4, width(), height(), Qt::AlignLeft, percentString); + p.drawText(x, 4, width(), height(), TQt::AlignLeft, percentString); } if(!m_ignore && !pixmap.isNull()) @@ -155,11 +155,11 @@ void SQ_PreviewWidget::paintEvent(QPaintEvent *) if(dim) { - QFont fnt = p.font(); + TQFont fnt = p.font(); fnt.setBold(true); p.setFont(fnt); p.setPen(colorText); - p.drawText(x, 4, width(), height(), Qt::AlignLeft, dimstring); + p.drawText(x, 4, width(), height(), TQt::AlignLeft, dimstring); } } } @@ -179,9 +179,9 @@ bool SQ_PreviewWidget::fit() if(all->width() > width() || all->height() > height()) { - small = new QImage(); + small = new TQImage(); - *small = SQ_Utils::scale(*all, width(), height(), SQ_Utils::SMOOTH_FAST, QImage::ScaleMin); + *small = SQ_Utils::scale(*all, width(), height(), SQ_Utils::SMOOTH_FAST, TQ_ScaleMin); } return true; @@ -217,7 +217,7 @@ void SQ_PreviewWidget::slotBackground() dlg.setColor(color); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) { color = dlg.color(); saveValues(); @@ -231,7 +231,7 @@ void SQ_PreviewWidget::slotText() dlg.setColor(colorText); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) { colorText = dlg.color(); saveValues(); @@ -239,7 +239,7 @@ void SQ_PreviewWidget::slotText() } } -void SQ_PreviewWidget::mousePressEvent(QMouseEvent *e) +void SQ_PreviewWidget::mousePressEvent(TQMouseEvent *e) { e->accept(); @@ -258,8 +258,8 @@ void SQ_PreviewWidget::loadPending() void SQ_PreviewWidget::slotDownloadResult(const KURL &url) { - percentString = QString::null; - QString path = url.path(); + percentString = TQString(); + TQString path = url.path(); fmt_info *finfo; RGBA *bits; @@ -276,11 +276,11 @@ void SQ_PreviewWidget::slotDownloadResult(const KURL &url) delete small; delete all; all = small = 0; - pixmap = QPixmap(); + pixmap = TQPixmap(); int w = finfo->image[0].w; int h = finfo->image[0].h; - dimstring = QString::fromLatin1("%1x%2").arg(w).arg(h); + dimstring = TQString::tqfromLatin1("%1x%2").tqarg(w).tqarg(h); const int wh = w * h; unsigned char t; @@ -292,21 +292,21 @@ void SQ_PreviewWidget::slotDownloadResult(const KURL &url) (bits+i)->b = t; } - all = new QImage((uchar *)bits, w, h, 32, 0, 0, QImage::LittleEndian); + all = new TQImage((uchar *)bits, w, h, 32, 0, 0, TQImage::LittleEndian); all->setAlphaBuffer(true); #ifdef SQ_HAVE_KEXIF KExifData data; data.readFromFile(path); - int O = data.getImageOrientation(); + int O = data.getImageQt::Orientation(); if(O != KExifData::UNSPECIFIED && O != KExifData::NORMAL) { // copy original image - QImage img = *all; + TQImage img = *all; // rotate image - SQ_Utils::exifRotate(QString::null, img, O); + SQ_Utils::exifRotate(TQString(), img, O); // transfer back *all = img; @@ -323,25 +323,25 @@ void SQ_PreviewWidget::slotDownloadResult(const KURL &url) update(); } -void SQ_PreviewWidget::keyPressEvent(QKeyEvent *e) +void SQ_PreviewWidget::keyPressEvent(TQKeyEvent *e) { e->accept(); int key = e->key(); - if(key == Qt::Key_PageDown || key == Qt::Key_Space) + if(key == TQt::Key_PageDown || key == TQt::Key_Space) emit next(); - else if(key == Qt::Key_PageUp || key == Qt::Key_BackSpace) + else if(key == TQt::Key_PageUp || key == TQt::Key_BackSpace) emit previous(); - else if(key == Qt::Key_Return || key == Qt::Key_Enter) + else if(key == TQt::Key_Return || key == TQt::Key_Enter) emit execute(); - else if(key == Qt::Key_Home) + else if(key == TQt::Key_Home) emit first(); - else if(key == Qt::Key_End) + else if(key == TQt::Key_End) emit last(); } -void SQ_PreviewWidget::wheelEvent(QWheelEvent *e) +void SQ_PreviewWidget::wheelEvent(TQWheelEvent *e) { if(e->delta() < 0) emit next(); @@ -349,7 +349,7 @@ void SQ_PreviewWidget::wheelEvent(QWheelEvent *e) emit previous(); } -void SQ_PreviewWidget::mouseDoubleClickEvent(QMouseEvent *e) +void SQ_PreviewWidget::mouseDoubleClickEvent(TQMouseEvent *e) { e->accept(); emit execute(); diff --git a/ksquirrel/sidebar/sq_previewwidget.h b/ksquirrel/sidebar/sq_previewwidget.h index 432ae9d..c79ce1f 100644 --- a/ksquirrel/sidebar/sq_previewwidget.h +++ b/ksquirrel/sidebar/sq_previewwidget.h @@ -18,11 +18,11 @@ #ifndef SQ_PREVIEWWIDGET_H #define SQ_PREVIEWWIDGET_H -#include <qwidget.h> -#include <qpixmap.h> -#include <qcolor.h> -#include <qwmatrix.h> -#include <qimage.h> +#include <tqwidget.h> +#include <tqpixmap.h> +#include <tqcolor.h> +#include <tqwmatrix.h> +#include <tqimage.h> #include <kurl.h> @@ -34,12 +34,13 @@ class SQ_Downloader; *@author Baryshev Dmitry */ -class SQ_PreviewWidget : public QWidget +class SQ_PreviewWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SQ_PreviewWidget(QWidget *parent = 0, const char *name = 0); + SQ_PreviewWidget(TQWidget *tqparent = 0, const char *name = 0); ~SQ_PreviewWidget(); void rereadColor(); @@ -75,30 +76,30 @@ class SQ_PreviewWidget : public QWidget void slotDownloadPercents(int); protected: - virtual void resizeEvent(QResizeEvent *); - virtual void paintEvent(QPaintEvent *); - virtual void mousePressEvent(QMouseEvent *e); - virtual void keyPressEvent(QKeyEvent *e); - virtual void wheelEvent(QWheelEvent *e); - virtual void mouseDoubleClickEvent(QMouseEvent *e); + virtual void resizeEvent(TQResizeEvent *); + virtual void paintEvent(TQPaintEvent *); + virtual void mousePressEvent(TQMouseEvent *e); + virtual void keyPressEvent(TQKeyEvent *e); + virtual void wheelEvent(TQWheelEvent *e); + virtual void mouseDoubleClickEvent(TQMouseEvent *e); private: bool fit(); void fitAndConvert(); private: - QImage *all, *small; - QPixmap pixmap; + TQImage *all, *small; + TQPixmap pixmap; bool m_ignore, m_forceignore, m_cancel; - QColor color, colorText; + TQColor color, colorText; KPopupMenu *popup; KURL pending, m_url; int m_delay; - QWMatrix matrix; + TQWMatrix matrix; SQ_Downloader *down; bool multi; - QPixmap multi_pix; - QString dimstring, percentString; + TQPixmap multi_pix; + TQString dimstring, percentString; bool dim; static SQ_PreviewWidget *m_inst; diff --git a/ksquirrel/sidebar/sq_storagefile.cpp b/ksquirrel/sidebar/sq_storagefile.cpp index 9fb921f..daede70 100644 --- a/ksquirrel/sidebar/sq_storagefile.cpp +++ b/ksquirrel/sidebar/sq_storagefile.cpp @@ -15,40 +15,40 @@ * * ***************************************************************************/ -#include <qfile.h> -#include <qstring.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqstring.h> #include <kmdcodec.h> #include "sq_storagefile.h" -void SQ_StorageFile::writeStorageFile(const QString &path, const KURL &inpath, KURL w) +void SQ_StorageFile::writeStorageFile(const TQString &path, const KURL &inpath, KURL w) { SQ_StorageFile::writeStorageFileAsString(path, inpath, w.prettyURL()); } -void SQ_StorageFile::writeStorageFileAsString(const QString &path, const KURL &inpath, QString content) +void SQ_StorageFile::writeStorageFileAsString(const TQString &path, const KURL &inpath, TQString content) { if(content.isEmpty()) content = inpath.prettyURL(); - KMD5 md5(QFile::encodeName(inpath.prettyURL())); - QFile file(path + QString::fromLatin1(".") + QString(md5.hexDigest())); + KMD5 md5(TQFile::encodeName(inpath.prettyURL()).data()); + TQFile file(path + TQString::tqfromLatin1(".") + TQString(md5.hexDigest())); if(file.open(IO_WriteOnly)) { - QString k = content.utf8(); + TQString k = content.utf8(); file.writeBlock(k, k.length()); file.close(); } } -KURL SQ_StorageFile::readStorageFile(const QString &path) +KURL SQ_StorageFile::readStorageFile(const TQString &path) { - QString n = SQ_StorageFile::readStorageFileAsString(path); + TQString n = SQ_StorageFile::readStorageFileAsString(path); - int ind = n.find('\n'); + int ind = n.tqfind('\n'); if(ind != -1) n.truncate(ind); @@ -56,20 +56,20 @@ KURL SQ_StorageFile::readStorageFile(const QString &path) return KURL::fromPathOrURL(n); } -QString SQ_StorageFile::readStorageFileAsString(const QString &path) +TQString SQ_StorageFile::readStorageFileAsString(const TQString &path) { - QFile file(path); - QString str; + TQFile file(path); + TQString str; if(file.open(IO_ReadOnly)) { - QByteArray ba = file.readAll(); + TQByteArray ba = file.readAll(); if(file.status() == IO_Ok) { - QString k; + TQString k; str.append(ba); - str = QString::fromUtf8(str); + str = TQString::fromUtf8(str); } } diff --git a/ksquirrel/sidebar/sq_storagefile.h b/ksquirrel/sidebar/sq_storagefile.h index e72abd9..6e0b8c4 100644 --- a/ksquirrel/sidebar/sq_storagefile.h +++ b/ksquirrel/sidebar/sq_storagefile.h @@ -18,17 +18,17 @@ #ifndef SQ_STORAGEFILE_H #define SQ_STORAGEFILE_H -#include <qstring.h> +#include <tqstring.h> #include <kurl.h> namespace SQ_StorageFile { - void writeStorageFile(const QString &path, const KURL &inpath, KURL w = KURL()); - void writeStorageFileAsString(const QString &path, const KURL &inpath, QString content = QString::null); + void writeStorageFile(const TQString &path, const KURL &inpath, KURL w = KURL()); + void writeStorageFileAsString(const TQString &path, const KURL &inpath, TQString content = TQString()); - KURL readStorageFile(const QString &path); - QString readStorageFileAsString(const QString &path); + KURL readStorageFile(const TQString &path); + TQString readStorageFileAsString(const TQString &path); }; #endif diff --git a/ksquirrel/sidebar/sq_threaddirlister.cpp b/ksquirrel/sidebar/sq_threaddirlister.cpp index 5b825e2..7a3fa38 100644 --- a/ksquirrel/sidebar/sq_threaddirlister.cpp +++ b/ksquirrel/sidebar/sq_threaddirlister.cpp @@ -19,20 +19,20 @@ #include "config.h" #endif -#include <qfile.h> -#include <qdir.h> -#include <qobject.h> -#include <qfileinfo.h> -#include <qdatetime.h> -#include <qapplication.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqobject.h> +#include <tqfileinfo.h> +#include <tqdatetime.h> +#include <tqapplication.h> #include <kconfig.h> #include <kglobal.h> #include "sq_threaddirlister.h" -SQ_ThreadDirLister::SQ_ThreadDirLister(QObject *o) - : QThread(), obj(o) +SQ_ThreadDirLister::SQ_ThreadDirLister(TQObject *o) + : TQThread(), obj(o) { cache = new KConfig("ksquirrel-tree-cache"); dir = 0; @@ -47,15 +47,15 @@ SQ_ThreadDirLister::~SQ_ThreadDirLister() void SQ_ThreadDirLister::run() { KURL url; - QString path, name, filepath; + TQString path, name, filepath; dirent *file; int count_files, count_dirs; - QDateTime dt, dt_def; - QFileInfo fi; + TQDateTime dt, dt_def; + TQFileInfo fi; bool b_read; - static const QString &dot = KGlobal::staticQString("."); - static const QString &dotdot = KGlobal::staticQString(".."); + static const TQString &dot = KGlobal::staticQString("."); + static const TQString &dotdot = KGlobal::staticQString(".."); while(true) { @@ -90,18 +90,18 @@ void SQ_ThreadDirLister::run() if(b_read) { - dir = opendir(QFile::encodeName(path)); + dir = opendir(TQFile::encodeName(path)); dt = fi.lastModified(); // save directory last modified time if(dir) { while((file = readdir(dir))) { - name = QFile::decodeName(file->d_name); + name = TQFile::decodeName(file->d_name); if(name != dot && name != dotdot) { - filepath = path + QDir::separator() + name; + filepath = path + TQDir::separator() + name; fi.setFile(filepath); @@ -131,7 +131,7 @@ void SQ_ThreadDirLister::run() cache->writeEntry("count_dirs", count_dirs); } - QApplication::postEvent(obj, new SQ_ItemsEvent(url, count_files, count_dirs)); + TQApplication::postEvent(obj, new SQ_ItemsEvent(url, count_files, count_dirs)); }// while } diff --git a/ksquirrel/sidebar/sq_threaddirlister.h b/ksquirrel/sidebar/sq_threaddirlister.h index 036129d..a3ad325 100644 --- a/ksquirrel/sidebar/sq_threaddirlister.h +++ b/ksquirrel/sidebar/sq_threaddirlister.h @@ -19,28 +19,28 @@ #ifndef SQ_THREADDIRLISTER_H #define SQ_THREADDIRLISTER_H -#include <qthread.h> -#include <qevent.h> -#include <qmutex.h> +#include <tqthread.h> +#include <tqevent.h> +#include <tqmutex.h> #include <kurl.h> #include <sys/types.h> #include <dirent.h> -class QObject; +class TQObject; class KConfig; /********************************************************/ -#define SQ_ItemsEventId (QEvent::User + 1) +#define SQ_ItemsEventId (TQEvent::User + 1) -class SQ_ItemsEvent : public QCustomEvent +class SQ_ItemsEvent : public TQCustomEvent { public: - SQ_ItemsEvent(const KURL &parent, int c1, int c2) - : QCustomEvent(SQ_ItemsEventId), m_files(c1), m_dirs(c2), m_url(parent) + SQ_ItemsEvent(const KURL &tqparent, int c1, int c2) + : TQCustomEvent(SQ_ItemsEventId), m_files(c1), m_dirs(c2), m_url(tqparent) {} int files() const; @@ -80,10 +80,10 @@ int SQ_ItemsEvent::dirs() const * calculated count. This function is threaded * due to perfomance reason. */ -class SQ_ThreadDirLister : public QThread +class SQ_ThreadDirLister : public TQThread { public: - SQ_ThreadDirLister(QObject *o); + SQ_ThreadDirLister(TQObject *o); ~SQ_ThreadDirLister(); void appendURL(const KURL &url); @@ -107,8 +107,8 @@ class SQ_ThreadDirLister : public QThread KURL::List todo; // this object will recieve our events - QObject *obj; - QMutex mutex; + TQObject *obj; + TQMutex mutex; KConfig *cache; DIR *dir; }; @@ -122,7 +122,7 @@ void SQ_ThreadDirLister::appendURL(const KURL &url) inline bool SQ_ThreadDirLister::hasURL(const KURL &url) { - return todo.find(url) != todo.end(); + return todo.tqfind(url) != todo.end(); } inline @@ -147,7 +147,7 @@ inline void SQ_ThreadDirLister::waitMutex() { while(!mutex.tryLock()) - QThread::msleep(1); + TQThread::msleep(1); } #endif diff --git a/ksquirrel/sidebar/sq_treeview.cpp b/ksquirrel/sidebar/sq_treeview.cpp index f622384..2a84f49 100644 --- a/ksquirrel/sidebar/sq_treeview.cpp +++ b/ksquirrel/sidebar/sq_treeview.cpp @@ -19,10 +19,10 @@ #include "config.h" #endif -#include <qdir.h> -#include <qheader.h> -#include <qtimer.h> -#include <qcursor.h> +#include <tqdir.h> +#include <tqheader.h> +#include <tqtimer.h> +#include <tqcursor.h> #include <klocale.h> #include <kurldrag.h> @@ -45,57 +45,57 @@ SQ_TreeView * SQ_TreeView::m_instance = 0; -SQ_FileTreeViewBranch::SQ_FileTreeViewBranch(KFileTreeView *parent, const KURL &url, - const QString &name, const QPixmap &pix) : KFileTreeBranch(parent, url, name, pix) +SQ_FileTreeViewBranch::SQ_FileTreeViewBranch(KFileTreeView *tqparent, const KURL &url, + const TQString &name, const TQPixmap &pix) : KFileTreeBranch(tqparent, url, name, pix) {} SQ_FileTreeViewBranch::~SQ_FileTreeViewBranch() {} -KFileTreeViewItem* SQ_FileTreeViewBranch::createTreeViewItem(KFileTreeViewItem *parent, KFileItem *fileItem) +KFileTreeViewItem* SQ_FileTreeViewBranch::createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem) { KFileTreeViewItem *tvi = 0; - if(parent && fileItem) - tvi = new SQ_TreeViewItem(parent, fileItem, this); + if(tqparent && fileItem) + tvi = new SQ_TreeViewItem(tqparent, fileItem, this); return tvi; } /******************************************************************************************************/ -SQ_TreeView::SQ_TreeView(QWidget *parent, const char *name) : KFileTreeView(parent, name) +SQ_TreeView::SQ_TreeView(TQWidget *tqparent, const char *name) : KFileTreeView(tqparent, name) { m_instance = this; itemToBeOpened = 0; - m_animTimer = new QTimer(this); - scanTimer = new QTimer(this); + m_animTimer = new TQTimer(this); + scanTimer = new TQTimer(this); m_ignoreClick = false; - connect(m_animTimer, SIGNAL(timeout()), this, SLOT(slotAnimation())); - connect(scanTimer, SIGNAL(timeout()), this, SLOT(slotDelayedScan())); + connect(m_animTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAnimation())); + connect(scanTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDelayedScan())); dw = 0; m_recurs = No; - lister = new SQ_ThreadDirLister(this); + lister = new SQ_ThreadDirLister(TQT_TQOBJECT(this)); setupRecursion(); - setFrameShape(QFrame::NoFrame); + setFrameShape(TQFrame::NoFrame); addColumn("Name"); addColumn("Check"); header()->hide(); header()->moveSection(1, 0); - setColumnWidthMode(1, QListView::Manual); + setColumnWidthMode(1, TQListView::Manual); setColumnWidth(1, 18); - root = new SQ_FileTreeViewBranch(this, QDir::rootDirPath(), QString::null, + root = new SQ_FileTreeViewBranch(this, TQDir::rootDirPath(), TQString(), SQ_IconLoader::instance()->loadIcon("folder_red", KIcon::Desktop, KIcon::SizeSmall)); // some hacks to create our SQ_TreeViewItem as root item SQ_TreeViewItem *ritem = new SQ_TreeViewItem(this, - new KFileItem(QDir::rootDirPath(), + new KFileItem(TQDir::rootDirPath(), "inode/directory", S_IFDIR), root); @@ -119,14 +119,14 @@ SQ_TreeView::SQ_TreeView(QWidget *parent, const char *name) : KFileTreeView(pare // connect signals // Space and Return will open item - connect(this, SIGNAL(spacePressed(QListViewItem*)), this, SIGNAL(executed(QListViewItem*))); - connect(this, SIGNAL(returnPressed(QListViewItem*)), this, SIGNAL(executed(QListViewItem*))); - connect(this, SIGNAL(currentChanged(QListViewItem *)), this, SLOT(slotCurrentChanged(QListViewItem*))); + connect(this, TQT_SIGNAL(spacePressed(TQListViewItem*)), this, TQT_SIGNAL(executed(TQListViewItem*))); + connect(this, TQT_SIGNAL(returnPressed(TQListViewItem*)), this, TQT_SIGNAL(executed(TQListViewItem*))); + connect(this, TQT_SIGNAL(currentChanged(TQListViewItem *)), this, TQT_SLOT(slotCurrentChanged(TQListViewItem*))); - connect(this, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemExecuted(QListViewItem*))); - connect(this, SIGNAL(newURL(const KURL&)), this, SLOT(slotNewURL(const KURL&))); - connect(root, SIGNAL(populateFinished(KFileTreeViewItem *)), this, SLOT(slotOpened(KFileTreeViewItem *))); - connect(root, SIGNAL(deleteItem(KFileItem *)), this, SLOT(slotDeleteItemMy(KFileItem *))); + connect(this, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotItemExecuted(TQListViewItem*))); + connect(this, TQT_SIGNAL(newURL(const KURL&)), this, TQT_SLOT(slotNewURL(const KURL&))); + connect(root, TQT_SIGNAL(populateFinished(KFileTreeViewItem *)), this, TQT_SLOT(slotOpened(KFileTreeViewItem *))); + connect(root, TQT_SIGNAL(deleteItem(KFileItem *)), this, TQT_SLOT(slotDeleteItemMy(KFileItem *))); setCurrentItem(root->root()); root->setChildRecurse(false); @@ -140,18 +140,18 @@ SQ_TreeView::SQ_TreeView(QWidget *parent, const char *name) : KFileTreeView(pare setAcceptDrops(true); - connect(this, SIGNAL(dropped(QDropEvent *, QListViewItem *, QListViewItem *)), - this, SLOT(slotDropped(QDropEvent *, QListViewItem *, QListViewItem *))); + connect(this, TQT_SIGNAL(dropped(TQDropEvent *, TQListViewItem *, TQListViewItem *)), + this, TQT_SLOT(slotDropped(TQDropEvent *, TQListViewItem *, TQListViewItem *))); - connect(this, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)), - this, SLOT(slotContextMenu(KListView *, QListViewItem *, const QPoint &))); + connect(this, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)), + this, TQT_SLOT(slotContextMenu(KListView *, TQListViewItem *, const TQPoint &))); menu = new SQ_TreeViewMenu(this); if(SQ_HLOptions::instance()->have_directorybasket) { menu->insertSeparator(); - menu->insertItem(i18n("Add to Folder Basket"), this, SLOT(slotAddToFolderBasket())); + menu->insertItem(i18n("Add to Folder Basket"), this, TQT_SLOT(slotAddToFolderBasket())); } } @@ -163,7 +163,7 @@ SQ_TreeView::~SQ_TreeView() delete lister; } -void SQ_TreeView::slotCurrentChanged(QListViewItem *item) +void SQ_TreeView::slotCurrentChanged(TQListViewItem *item) { SQ_TreeViewItem *tvi = static_cast<SQ_TreeViewItem *>(item); @@ -176,7 +176,7 @@ void SQ_TreeView::setRecursion(int b) if(m_recurs == b) return; - QListViewItemIterator it(this); + TQListViewItemIterator it(this); SQ_TreeViewItem *tvi; // ignore root item @@ -185,8 +185,8 @@ void SQ_TreeView::setRecursion(int b) // turn recursion on if(m_recurs == No && b) { - dw = new KDirWatch(this); - connect(dw, SIGNAL(dirty(const QString &)), this, SLOT(slotDirty(const QString &))); + dw = new KDirWatch(TQT_TQOBJECT(this)); + connect(dw, TQT_SIGNAL(dirty(const TQString &)), this, TQT_SLOT(slotDirty(const TQString &))); dw->blockSignals(true); lister->lock(); @@ -239,7 +239,7 @@ void SQ_TreeView::setRecursion(int b) void SQ_TreeView::slotClearChecked() { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); SQ_TreeViewItem *tvi; while(it.current()) @@ -256,7 +256,7 @@ void SQ_TreeView::slotClearChecked() /* * Item executed. Let's pass its url to SQ_WidgetStack (if needed). */ -void SQ_TreeView::slotItemExecuted(QListViewItem *item) +void SQ_TreeView::slotItemExecuted(TQListViewItem *item) { if(!item) return; @@ -328,7 +328,7 @@ void SQ_TreeView::slotNewURL(const KURL &url) KURL last = k; - QString s; + TQString s; // divide url to paths. // for example, "/home/krasu/1/2" will be divided to @@ -382,7 +382,7 @@ bool SQ_TreeView::doSearch() return false; } - QStringList::iterator it = paths.begin(); + TQStringList::iterator it = paths.begin(); KFileTreeViewItem *found = findItem(root, *it); @@ -409,7 +409,7 @@ bool SQ_TreeView::doSearch() /* * On show event load saved url, if any. See emitNewURL(). */ -void SQ_TreeView::showEvent(QShowEvent *) +void SQ_TreeView::showEvent(TQShowEvent *) { // if pending url is valid if(!pendingURL.isEmpty()) @@ -453,7 +453,7 @@ void SQ_TreeView::slotDelayedScan() lister->start(); } -void SQ_TreeView::customEvent(QCustomEvent *e) +void SQ_TreeView::customEvent(TQCustomEvent *e) { if(!e || e->type() != SQ_ItemsEventId) return; @@ -494,7 +494,7 @@ void SQ_TreeView::stopAnimation(KFileTreeViewItem *item) if(!item) return; - int f = m_mapFolders.find(item); + int f = m_mapFolders.tqfind(item); if(f != -1) { @@ -505,7 +505,7 @@ void SQ_TreeView::stopAnimation(KFileTreeViewItem *item) m_animTimer->stop(); } -void SQ_TreeView::viewportResizeEvent(QResizeEvent *) +void SQ_TreeView::viewportResizeEvent(TQResizeEvent *) { setColumnWidth(0, viewport()->width() - columnWidth(1)); triggerUpdate(); @@ -516,26 +516,26 @@ void SQ_TreeView::clearSelection() if(!m_ignoreClick) KFileTreeView::clearSelection(); } -void SQ_TreeView::setSelected(QListViewItem *item, bool selected) +void SQ_TreeView::setSelected(TQListViewItem *item, bool selected) { if(!m_ignoreClick) KFileTreeView::setSelected(item, selected); } -void SQ_TreeView::setCurrentItem(QListViewItem *item) +void SQ_TreeView::setCurrentItem(TQListViewItem *item) { if(!m_ignoreClick) KFileTreeView::setCurrentItem(item); } -void SQ_TreeView::setOpen(QListViewItem *item, bool open) +void SQ_TreeView::setOpen(TQListViewItem *item, bool open) { if(!m_ignoreClick) KFileTreeView::setOpen(item, open); } -void SQ_TreeView::contentsMousePressEvent(QMouseEvent *e) +void SQ_TreeView::contentsMousePressEvent(TQMouseEvent *e) { - QListViewItem *item; + TQListViewItem *item; - QPoint point = e->pos(); + TQPoint point = e->pos(); point.setY(point.y() - contentsY()); if(header()->sectionAt(point.x()) && (item = itemAt(point))) @@ -550,21 +550,21 @@ void SQ_TreeView::contentsMousePressEvent(QMouseEvent *e) toggle(m, true); else { - QListViewItemIterator it(this); + TQListViewItemIterator it(this); - // toggle parent item - if(state == Qt::ShiftButton) toggle(m, true); - else if(state == Qt::ControlButton) toggle(m, false, true); - else if(state == Qt::AltButton) toggle(m, false, false); + // toggle tqparent item + if(state == TQt::ShiftButton) toggle(m, true); + else if(state == TQt::ControlButton) toggle(m, false, true); + else if(state == TQt::AltButton) toggle(m, false, false); SQ_TreeViewItem *tvi = static_cast<SQ_TreeViewItem *>(m->firstChild()); // toggle all child items while(tvi) { - if(state == Qt::ShiftButton) toggle(tvi, false, m->checked()); - else if(state == Qt::ControlButton) toggle(tvi, false, true); - else if(state == Qt::AltButton) toggle(tvi, false, false); + if(state == TQt::ShiftButton) toggle(tvi, false, m->checked()); + else if(state == TQt::ControlButton) toggle(tvi, false, true); + else if(state == TQt::AltButton) toggle(tvi, false, false); tvi = static_cast<SQ_TreeViewItem *>(tvi->nextSibling()); } @@ -579,7 +579,7 @@ void SQ_TreeView::contentsMousePressEvent(QMouseEvent *e) m_ignoreClick = false; } -void SQ_TreeView::contentsMouseDoubleClickEvent(QMouseEvent *e) +void SQ_TreeView::contentsMouseDoubleClickEvent(TQMouseEvent *e) { if(header()->sectionAt(e->x())) m_ignoreClick = true; @@ -609,9 +609,9 @@ void SQ_TreeView::toggle(SQ_TreeViewItem *item, bool togg, bool set) emit urlRemoved(item->url()); } -void SQ_TreeView::slotDropped(QDropEvent *e, QListViewItem *parent, QListViewItem *item) +void SQ_TreeView::slotDropped(TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *item) { - if(!item) item = parent; + if(!item) item = tqparent; KFileTreeViewItem *cur = static_cast<KFileTreeViewItem *>(item); @@ -621,10 +621,10 @@ void SQ_TreeView::slotDropped(QDropEvent *e, QListViewItem *parent, QListViewIte KURLDrag::decode(e, list); SQ_NavigatorDropMenu::instance()->setupFiles(list, cur->url()); - SQ_NavigatorDropMenu::instance()->exec(QCursor::pos(), true); + SQ_NavigatorDropMenu::instance()->exec(TQCursor::pos(), true); } -void SQ_TreeView::slotContextMenu(KListView *, QListViewItem *item, const QPoint &point) +void SQ_TreeView::slotContextMenu(KListView *, TQListViewItem *item, const TQPoint &point) { if(item) { @@ -635,7 +635,7 @@ void SQ_TreeView::slotContextMenu(KListView *, QListViewItem *item, const QPoint } } -void SQ_TreeView::slotDirty(const QString &path) +void SQ_TreeView::slotDirty(const TQString &path) { KURL url; url.setPath(path); diff --git a/ksquirrel/sidebar/sq_treeview.h b/ksquirrel/sidebar/sq_treeview.h index 92043dc..e12ebdb 100644 --- a/ksquirrel/sidebar/sq_treeview.h +++ b/ksquirrel/sidebar/sq_treeview.h @@ -18,7 +18,7 @@ #ifndef SQ_TREEVIEW_H #define SQ_TREEVIEW_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <kfiletreeview.h> #include <kurl.h> @@ -36,11 +36,11 @@ class SQ_TreeViewMenu; class SQ_FileTreeViewBranch : public KFileTreeBranch { public: - SQ_FileTreeViewBranch(KFileTreeView*, const KURL &url, const QString &name, const QPixmap &pix); + SQ_FileTreeViewBranch(KFileTreeView*, const KURL &url, const TQString &name, const TQPixmap &pix); ~SQ_FileTreeViewBranch(); protected: - virtual KFileTreeViewItem *createTreeViewItem(KFileTreeViewItem *parent, KFileItem *fileItem); + virtual KFileTreeViewItem *createTreeViewItem(KFileTreeViewItem *tqparent, KFileItem *fileItem); }; /* @@ -50,9 +50,10 @@ class SQ_FileTreeViewBranch : public KFileTreeBranch class SQ_TreeView : public KFileTreeView { Q_OBJECT + TQ_OBJECT public: - SQ_TreeView(QWidget *parent = 0, const char *name = 0); + SQ_TreeView(TQWidget *tqparent = 0, const char *name = 0); ~SQ_TreeView(); enum Recursion { No = 0, Files, Dirs, FilesDirs }; @@ -80,24 +81,24 @@ class SQ_TreeView : public KFileTreeView void emitNewURL(const KURL &url); virtual void clearSelection(); - virtual void setSelected(QListViewItem *item, bool selected); - virtual void setCurrentItem(QListViewItem *item); - virtual void setOpen(QListViewItem *item, bool open); + virtual void setSelected(TQListViewItem *item, bool selected); + virtual void setCurrentItem(TQListViewItem *item); + virtual void setOpen(TQListViewItem *item, bool open); static SQ_TreeView* instance() { return m_instance; } protected: - virtual void customEvent(QCustomEvent *e); + virtual void customEvent(TQCustomEvent *e); virtual void startAnimation(KFileTreeViewItem* item, const char*, uint); virtual void stopAnimation(KFileTreeViewItem* item); - virtual void viewportResizeEvent(QResizeEvent *); - virtual void contentsMousePressEvent(QMouseEvent *e); - virtual void contentsMouseDoubleClickEvent(QMouseEvent *e); + virtual void viewportResizeEvent(TQResizeEvent *); + virtual void contentsMousePressEvent(TQMouseEvent *e); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent *e); /* * On show event load saved url, if any. See emitNewURL(). */ - virtual void showEvent(QShowEvent *); + virtual void showEvent(TQShowEvent *); private: void toggle(SQ_TreeViewItem *, bool, bool = false); @@ -120,16 +121,16 @@ class SQ_TreeView : public KFileTreeView */ void slotNewURL(const KURL &url); - void slotCurrentChanged(QListViewItem *); + void slotCurrentChanged(TQListViewItem *); void slotAddToFolderBasket(); void slotClearChecked(); - void slotDirty(const QString &); + void slotDirty(const TQString &); void slotDeleteItemMy(KFileItem *); /* * Item executed. Let's pass its url to SQ_WidgetStack (if needed). */ - void slotItemExecuted(QListViewItem*); + void slotItemExecuted(TQListViewItem*); /* * New item is opened. Try to continue loading url. @@ -140,8 +141,8 @@ class SQ_TreeView : public KFileTreeView void slotDelayedScan(); void slotAnimation(); - void slotDropped(QDropEvent *, QListViewItem *, QListViewItem *); - void slotContextMenu(KListView *, QListViewItem *, const QPoint &); + void slotDropped(TQDropEvent *, TQListViewItem *, TQListViewItem *); + void slotContextMenu(KListView *, TQListViewItem *, const TQPoint &); signals: void newURL(const KURL &url); @@ -156,11 +157,11 @@ class SQ_TreeView : public KFileTreeView private: SQ_FileTreeViewBranch *root; - QStringList paths; + TQStringList paths; KURL pendingURL, cURL; SQ_ThreadDirLister *lister; KFileTreeViewItemList m_mapFolders; - QTimer *m_animTimer, *scanTimer; + TQTimer *m_animTimer, *scanTimer; bool m_ignoreClick; int m_recurs; SQ_TreeViewMenu *menu; diff --git a/ksquirrel/sidebar/sq_treeviewitem.cpp b/ksquirrel/sidebar/sq_treeviewitem.cpp index 9f6508c..2339ae9 100644 --- a/ksquirrel/sidebar/sq_treeviewitem.cpp +++ b/ksquirrel/sidebar/sq_treeviewitem.cpp @@ -19,27 +19,27 @@ #include "config.h" #endif -#include <qpainter.h> +#include <tqpainter.h> #include "sq_treeviewitem.h" -SQ_TreeViewItem::SQ_TreeViewItem(KFileTreeViewItem *parentItem, KFileItem *fileItem, KFileTreeBranch *parentBranch) - : KFileTreeViewItem(parentItem, fileItem, parentBranch), +SQ_TreeViewItem::SQ_TreeViewItem(KFileTreeViewItem *tqparentItem, KFileItem *fileItem, KFileTreeBranch *tqparentBranch) + : KFileTreeViewItem(tqparentItem, fileItem, tqparentBranch), m_checked(false), count_files(0), count_dirs(0), use_c1(false), use_c2(false) {} -SQ_TreeViewItem::SQ_TreeViewItem(KFileTreeView *parent, KFileItem *fileItem, KFileTreeBranch *parentBranch) - : KFileTreeViewItem(parent, fileItem, parentBranch), +SQ_TreeViewItem::SQ_TreeViewItem(KFileTreeView *tqparent, KFileItem *fileItem, KFileTreeBranch *tqparentBranch) + : KFileTreeViewItem(tqparent, fileItem, tqparentBranch), m_checked(false), count_files(0), count_dirs(0), use_c1(false), use_c2(false) {} SQ_TreeViewItem::~SQ_TreeViewItem() {} -void SQ_TreeViewItem::paintFocus(QPainter *, const QColorGroup &, const QRect &) +void SQ_TreeViewItem::paintFocus(TQPainter *, const TQColorGroup &, const TQRect &) {} -void SQ_TreeViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void SQ_TreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { KListView *klv = static_cast<KListView *>(listView()); @@ -62,24 +62,24 @@ void SQ_TreeViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, } else // file name and pixmap { - QColorGroup cc = cg; + TQColorGroup cc = cg; if(m_checked) { - if(klv->viewport()->backgroundMode() == Qt::FixedColor) - cc.setColor(QColorGroup::Background, cg.highlight()); + if(klv->viewport()->backgroundMode() == TQt::FixedColor) + cc.setColor(TQColorGroup::Background, cg.highlight()); else - cc.setColor(QColorGroup::Base, cg.highlight()); + cc.setColor(TQColorGroup::Base, cg.highlight()); } else if(isAlternate()) { - if(klv->viewport()->backgroundMode() == Qt::FixedColor) - cc.setColor(QColorGroup::Background, klv->alternateBackground()); + if(klv->viewport()->backgroundMode() == TQt::FixedColor) + cc.setColor(TQColorGroup::Background, klv->alternateBackground()); else - cc.setColor(QColorGroup::Base, klv->alternateBackground()); + cc.setColor(TQColorGroup::Base, klv->alternateBackground()); } - QListViewItem::paintCell(p, cc, column, width, alignment); + TQListViewItem::paintCell(p, cc, column, width, tqalignment); } } @@ -91,16 +91,16 @@ void SQ_TreeViewItem::setCount(int c1, int c2) setText(0, fileItem()->name()); } -void SQ_TreeViewItem::setText(int column, const QString &text) +void SQ_TreeViewItem::setText(int column, const TQString &text) { - QString s; + TQString s; if(use_c1 && use_c2) // files + dirs: show these two values anyway - s = QString::fromLatin1(" [%1/%2]").arg(count_dirs).arg(count_files); + s = TQString::tqfromLatin1(" [%1/%2]").tqarg(count_dirs).tqarg(count_files); else if(use_c1 && count_files) // files, file count is > 0 - s = QString::fromLatin1(" [%1]").arg(count_files); + s = TQString::tqfromLatin1(" [%1]").tqarg(count_files); else if(use_c2 && count_dirs) // dirs, dir count is > 0 - s = QString::fromLatin1(" [%1]").arg(count_dirs); + s = TQString::tqfromLatin1(" [%1]").tqarg(count_dirs); KFileTreeViewItem::setText(column, text + s); } diff --git a/ksquirrel/sidebar/sq_treeviewitem.h b/ksquirrel/sidebar/sq_treeviewitem.h index 7f9494f..26cb0c5 100644 --- a/ksquirrel/sidebar/sq_treeviewitem.h +++ b/ksquirrel/sidebar/sq_treeviewitem.h @@ -25,8 +25,8 @@ class KFileTreeBranch; class SQ_TreeViewItem : public KFileTreeViewItem { public: - SQ_TreeViewItem(KFileTreeViewItem *parentItem, KFileItem *fileItem, KFileTreeBranch *parentBranch); - SQ_TreeViewItem(KFileTreeView *parent, KFileItem *fileItem, KFileTreeBranch *parentBranch); + SQ_TreeViewItem(KFileTreeViewItem *tqparentItem, KFileItem *fileItem, KFileTreeBranch *tqparentBranch); + SQ_TreeViewItem(KFileTreeView *tqparent, KFileItem *fileItem, KFileTreeBranch *tqparentBranch); ~SQ_TreeViewItem(); bool checked() const; @@ -38,11 +38,11 @@ class SQ_TreeViewItem : public KFileTreeViewItem void setCount(int c1, int c2); void setParams(bool _use_c1, bool _use_c2); - virtual void paintFocus(QPainter *, const QColorGroup &, const QRect &); - virtual void setText(int column, const QString &text); + virtual void paintFocus(TQPainter *, const TQColorGroup &, const TQRect &); + virtual void setText(int column, const TQString &text); protected: - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); private: bool m_checked; @@ -67,7 +67,7 @@ inline void SQ_TreeViewItem::setChecked(bool c) { m_checked = c; - repaint(); + tqrepaint(); } inline diff --git a/ksquirrel/sidebar/sq_treeviewmenu.cpp b/ksquirrel/sidebar/sq_treeviewmenu.cpp index 120a0b3..2413d4c 100644 --- a/ksquirrel/sidebar/sq_treeviewmenu.cpp +++ b/ksquirrel/sidebar/sq_treeviewmenu.cpp @@ -1,6 +1,6 @@ -#include <qpoint.h> -#include <qwidget.h> -#include <qstylesheet.h> +#include <tqpoint.h> +#include <tqwidget.h> +#include <tqstylesheet.h> #include <klocale.h> #include <kurl.h> @@ -13,21 +13,21 @@ #include "ksquirrel.h" #include "sq_iconloader.h" -SQ_TreeViewMenu::SQ_TreeViewMenu(QWidget *parent, const char *name) : KPopupMenu(parent, name) +SQ_TreeViewMenu::SQ_TreeViewMenu(TQWidget *tqparent, const char *name) : KPopupMenu(tqparent, name) { - id_new = insertItem(SQ_IconLoader::instance()->loadIcon("folder_new", KIcon::Desktop, KIcon::SizeSmall), i18n("New folder..."), this, SLOT(slotDirectoryNew())); + id_new = insertItem(SQ_IconLoader::instance()->loadIcon("folder_new", KIcon::Desktop, KIcon::SizeSmall), i18n("New folder..."), this, TQT_SLOT(slotDirectoryNew())); insertSeparator(); - id_rename = insertItem(i18n("Rename"), this, SLOT(slotDirectoryRename())); - id_clear = insertItem(i18n("Clear contents"), this, SLOT(slotDirectoryClear())); - id_delete = insertItem(SQ_IconLoader::instance()->loadIcon("editdelete", KIcon::Desktop, KIcon::SizeSmall), i18n("Delete"), this, SLOT(slotDirectoryDelete())); + id_rename = insertItem(i18n("Rename"), this, TQT_SLOT(slotDirectoryRename())); + id_clear = insertItem(i18n("Clear contents"), this, TQT_SLOT(slotDirectoryClear())); + id_delete = insertItem(SQ_IconLoader::instance()->loadIcon("editdelete", KIcon::Desktop, KIcon::SizeSmall), i18n("Delete"), this, TQT_SLOT(slotDirectoryDelete())); insertSeparator(); - id_prop = insertItem(i18n("Properties"), this, SLOT(slotDirectoryProperties())); + id_prop = insertItem(i18n("Properties"), this, TQT_SLOT(slotDirectoryProperties())); } SQ_TreeViewMenu::~SQ_TreeViewMenu() {} -void SQ_TreeViewMenu::reconnect(Element elem, QObject *receiver, const char *member) +void SQ_TreeViewMenu::reconnect(Element elem, TQObject *receiver, const char *member) { int id; @@ -61,9 +61,9 @@ void SQ_TreeViewMenu::slotDirectoryNew() { bool ok; - QString mNewFilename = KInputDialog::getText(i18n("Create Subfolder"), - i18n("<p>Create new folder in <b>%1</b>:</p>").arg(QStyleSheet::escape(m_url.filename())), - QString::null, &ok, KSquirrel::app()); + TQString mNewFilename = KInputDialog::getText(i18n("Create Subfolder"), + i18n("<p>Create new folder in <b>%1</b>:</p>").tqarg(TQStyleSheet::escape(m_url.filename())), + TQString(), &ok, KSquirrel::app()); if(ok) { @@ -71,7 +71,7 @@ void SQ_TreeViewMenu::slotDirectoryNew() dstURL.addPath(mNewFilename); KIO::Job *job = KIO::mkdir(dstURL); - connect(job, SIGNAL(result(KIO::Job*)), this, SLOT(slotDirectoryResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotDirectoryResult(KIO::Job *))); } } } @@ -83,10 +83,10 @@ void SQ_TreeViewMenu::slotDirectoryRename() KURL renameSrcURL = m_url; bool ok; - QString filename = QStyleSheet::escape(renameSrcURL.filename()); + TQString filename = TQStyleSheet::escape(renameSrcURL.filename()); - QString mNewFilename = KInputDialog::getText(i18n("Rename Folder"), - i18n("<p>Rename folder <b>%1</b> to:</p>").arg(filename), + TQString mNewFilename = KInputDialog::getText(i18n("Rename Folder"), + i18n("<p>Rename folder <b>%1</b> to:</p>").tqarg(filename), renameSrcURL.filename(), &ok, KSquirrel::app()); if(ok) @@ -96,7 +96,7 @@ void SQ_TreeViewMenu::slotDirectoryRename() KIO::Job *job = KIO::rename(renameSrcURL, renameDstURL, true); - connect(job, SIGNAL(result(KIO::Job*)), this, SLOT(slotDirectoryResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotDirectoryResult(KIO::Job *))); } } } @@ -105,15 +105,15 @@ void SQ_TreeViewMenu::slotDirectoryDelete() { if(!m_url.isEmpty()) { - QString dir = QStyleSheet::escape(m_url.path()); + TQString dir = TQStyleSheet::escape(m_url.path()); if(KMessageBox::questionYesNo(KSquirrel::app(), - "<qt>" + i18n("Are you sure you want to delete <b>%1</b>?").arg(dir) + "</qt>") == KMessageBox::No) + "<qt>" + i18n("Are you sure you want to delete <b>%1</b>?").tqarg(dir) + "</qt>") == KMessageBox::No) return; KIO::Job *job = KIO::del(m_url); - connect(job, SIGNAL(result(KIO::Job*)), this, SLOT(slotDirectoryResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotDirectoryResult(KIO::Job *))); } } @@ -124,24 +124,24 @@ void SQ_TreeViewMenu::slotDirectoryClear() urlstodel.clear(); if(KMessageBox::questionYesNo(KSquirrel::app(), - "<qt>" + i18n("Are you sure you want to delete contents of <b>%1</b>?").arg(m_url.path()) + "</qt>") == KMessageBox::No) + "<qt>" + i18n("Are you sure you want to delete contents of <b>%1</b>?").tqarg(m_url.path()) + "</qt>") == KMessageBox::No) return; KIO::Job *job = KIO::listDir(m_url, false, true); - connect(job, SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), this, SLOT(slotEntries(KIO::Job *, const KIO::UDSEntryList &))); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotListResult(KIO::Job *))); + connect(job, TQT_SIGNAL(entries(KIO::Job *, const KIO::UDSEntryList &)), this, TQT_SLOT(slotEntries(KIO::Job *, const KIO::UDSEntryList &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotListResult(KIO::Job *))); } } void SQ_TreeViewMenu::slotEntries(KIO::Job *, const KIO::UDSEntryList &list) { KIO::UDSEntryListConstIterator itEnd = list.end(); - QString suff; + TQString suff; KURL u; - static const QString &dot = KGlobal::staticQString("."); - static const QString &dotdot = KGlobal::staticQString(".."); + static const TQString &dot = KGlobal::staticQString("."); + static const TQString &dotdot = KGlobal::staticQString(".."); // go through list of KIO::UDSEntrys for(KIO::UDSEntryListConstIterator it = list.begin(); it != itEnd; ++it) @@ -177,7 +177,7 @@ void SQ_TreeViewMenu::slotListResult(KIO::Job *job) else if(!urlstodel.isEmpty()) { KIO::Job *job = KIO::del(urlstodel); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotDirectoryResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotDirectoryResult(KIO::Job *))); } } diff --git a/ksquirrel/sidebar/sq_treeviewmenu.h b/ksquirrel/sidebar/sq_treeviewmenu.h index 943d5dc..de01cad 100644 --- a/ksquirrel/sidebar/sq_treeviewmenu.h +++ b/ksquirrel/sidebar/sq_treeviewmenu.h @@ -4,16 +4,17 @@ #include <kpopupmenu.h> #include <kurl.h> -class QPoint; +class TQPoint; namespace KIO { class Job; } class SQ_TreeViewMenu : public KPopupMenu { Q_OBJECT + TQ_OBJECT public: - SQ_TreeViewMenu(QWidget *parent = 0, const char *name = 0); + SQ_TreeViewMenu(TQWidget *tqparent = 0, const char *name = 0); virtual ~SQ_TreeViewMenu(); enum Element { New, Rename, Delete, Properties, Clear }; @@ -21,7 +22,7 @@ class SQ_TreeViewMenu : public KPopupMenu void setURL(const KURL &_url); KURL url() const; - void reconnect(Element, QObject *receiver, const char *member); + void reconnect(Element, TQObject *receiver, const char *member); virtual void updateDirActions(bool isdir, bool isroot = false); protected slots: diff --git a/ksquirrel/sq_archivehandler.cpp b/ksquirrel/sq_archivehandler.cpp index 3c0fdfd..d29a40d 100644 --- a/ksquirrel/sq_archivehandler.cpp +++ b/ksquirrel/sq_archivehandler.cpp @@ -21,8 +21,8 @@ SQ_ArchiveHandler * SQ_ArchiveHandler::m_instance = 0; -SQ_ArchiveHandler::SQ_ArchiveHandler(QObject * parent, const char *name) - : QObject(parent, name), QMap<QString, QString>() +SQ_ArchiveHandler::SQ_ArchiveHandler(TQObject * tqparent, const char *name) + : TQObject(tqparent, name), TQMap<TQString, TQString>() { m_instance = this; @@ -76,21 +76,21 @@ void SQ_ArchiveHandler::fillProtocols() * For example findProtocolByMime(""application/x-tgz"") will * return "tar". */ -QString SQ_ArchiveHandler::findProtocolByMime(const QString &mime) +TQString SQ_ArchiveHandler::findProtocolByMime(const TQString &mime) { // find protocol - QMap<QString, QString>::iterator it = find(mime); + TQMap<TQString, TQString>::iterator it = tqfind(mime); // return protocol number, if found, and -1 otherwise - return (it == end() ? QString::null : it.data()); + return (it == end() ? TQString() : it.data()); } /* * Find protocol name by KFileItem's mimetype. */ -QString SQ_ArchiveHandler::findProtocolByFile(KFileItem *item) +TQString SQ_ArchiveHandler::findProtocolByFile(KFileItem *item) { - return item ? findProtocolByMime(item->mimetype()) : QString::null; + return item ? findProtocolByMime(item->mimetype()) : TQString(); } void SQ_ArchiveHandler::tryUnpack(KFileItem *item) @@ -98,9 +98,9 @@ void SQ_ArchiveHandler::tryUnpack(KFileItem *item) if(item) tryUnpack(item->url(), item->mimetype()); } -void SQ_ArchiveHandler::tryUnpack(const KURL &url, const QString &mime) +void SQ_ArchiveHandler::tryUnpack(const KURL &url, const TQString &mime) { - QString prot = findProtocolByMime(mime); + TQString prot = findProtocolByMime(mime); if(!prot.isEmpty()) { diff --git a/ksquirrel/sq_archivehandler.h b/ksquirrel/sq_archivehandler.h index 8b2d3c5..5ee0d6a 100644 --- a/ksquirrel/sq_archivehandler.h +++ b/ksquirrel/sq_archivehandler.h @@ -9,9 +9,9 @@ #ifndef SQ_ARCHIVEHANDLER_H #define SQ_ARCHIVEHANDLER_H -#include <qobject.h> -#include <qstring.h> -#include <qmap.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqmap.h> // forward declarations class KFileItem; @@ -23,12 +23,13 @@ class KURL; * Helper class for archive extracting via kio-slaves (since 0.7.1). */ -class SQ_ArchiveHandler : public QObject, QMap<QString, QString> +class SQ_ArchiveHandler : public TQObject, TQMap<TQString, TQString> { Q_OBJECT + TQ_OBJECT public: - SQ_ArchiveHandler(QObject *parent = 0, const char *name = 0); + SQ_ArchiveHandler(TQObject *tqparent = 0, const char *name = 0); ~SQ_ArchiveHandler(); /* @@ -37,19 +38,19 @@ class SQ_ArchiveHandler : public QObject, QMap<QString, QString> * For example findProtocolByMime(""application/x-tgz"") will * return "tar". */ - QString findProtocolByMime(const QString &mime); + TQString findProtocolByMime(const TQString &mime); /* * Find protocol name by KFileItem's mimetype. */ - QString findProtocolByFile(KFileItem *item); + TQString findProtocolByFile(KFileItem *item); /* * Determine mimetype and emit unpack() signal */ void tryUnpack(KFileItem *); - void tryUnpack(const KURL &, const QString &mime); + void tryUnpack(const KURL &, const TQString &mime); static SQ_ArchiveHandler* instance() { return m_instance; } diff --git a/ksquirrel/sq_bookmarkowner.cpp b/ksquirrel/sq_bookmarkowner.cpp index f7b7316..83d544a 100644 --- a/ksquirrel/sq_bookmarkowner.cpp +++ b/ksquirrel/sq_bookmarkowner.cpp @@ -23,7 +23,7 @@ SQ_BookmarkOwner * SQ_BookmarkOwner::m_instance = 0; -SQ_BookmarkOwner::SQ_BookmarkOwner(QWidget *parent) : QObject(parent) +SQ_BookmarkOwner::SQ_BookmarkOwner(TQWidget *tqparent) : TQObject(tqparent) { m_instance = this; } @@ -35,7 +35,7 @@ SQ_BookmarkOwner::~SQ_BookmarkOwner() * User selected some bookmark. It will emit 'openURL' signal, * and SQ_WidgetStack will catch it. */ -void SQ_BookmarkOwner::openBookmarkURL(const QString &url) +void SQ_BookmarkOwner::openBookmarkURL(const TQString &url) { KURL u = KURL::fromPathOrURL(url); @@ -46,7 +46,7 @@ void SQ_BookmarkOwner::openBookmarkURL(const QString &url) * Current url. If user selected "Add bookmark", this * url will be added to bookmarks. See also KBookmarkOwner::setURL() */ -QString SQ_BookmarkOwner::currentURL() const +TQString SQ_BookmarkOwner::currentURL() const { return URL.prettyURL(); } diff --git a/ksquirrel/sq_bookmarkowner.h b/ksquirrel/sq_bookmarkowner.h index 4e5ab96..7c9894f 100644 --- a/ksquirrel/sq_bookmarkowner.h +++ b/ksquirrel/sq_bookmarkowner.h @@ -21,33 +21,34 @@ #include <kbookmarkmanager.h> #include <kurl.h> -#include <qobject.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqwidget.h> /* * Class for managing bookmarks. It used in main class (KSquirrel::initBookmarks()) * and in SQ_WidgetStack to store and manage bookmarks. */ -class SQ_BookmarkOwner : public QObject, public KBookmarkOwner +class SQ_BookmarkOwner : public TQObject, public KBookmarkOwner { Q_OBJECT + TQ_OBJECT public: - SQ_BookmarkOwner(QWidget *parent = 0); + SQ_BookmarkOwner(TQWidget *tqparent = 0); virtual ~SQ_BookmarkOwner(); /* * User selected some bookmark. It will emit 'openURL' signal, * and SQ_WidgetStack will catch it. */ - virtual void openBookmarkURL(const QString &); + virtual void openBookmarkURL(const TQString &); /* * Current url. If user selected "Add bookmark", this * url will be added to bookmarks. See also SQ_BookmarkOwner::setURL() */ - virtual QString currentURL() const; + virtual TQString currentURL() const; static SQ_BookmarkOwner* instance() { return m_instance; } diff --git a/ksquirrel/sq_codecsettingsskeleton.ui b/ksquirrel/sq_codecsettingsskeleton.ui index 5ef812c..8a5a677 100644 --- a/ksquirrel/sq_codecsettingsskeleton.ui +++ b/ksquirrel/sq_codecsettingsskeleton.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_CodecSettingsSkeleton</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_CodecSettingsSkeleton</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>codecIcon</cstring> </property> @@ -34,7 +34,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>16</width> <height>16</height> @@ -64,7 +64,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>codecName</cstring> </property> @@ -77,7 +77,7 @@ <string></string> </property> </widget> - <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox</cstring> </property> @@ -99,9 +99,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -117,14 +117,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushApply</cstring> </property> @@ -132,7 +132,7 @@ <string>Apply</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushOK</cstring> </property> @@ -143,7 +143,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -182,36 +182,36 @@ </tabstops> <includes> <include location="global" impldecl="in declaration">ksquirrel-libs/settings.h</include> - <include location="global" impldecl="in implementation">qcheckbox.h</include> - <include location="global" impldecl="in implementation">qmessagebox.h</include> - <include location="global" impldecl="in implementation">qobjectlist.h</include> - <include location="global" impldecl="in implementation">qbuttongroup.h</include> - <include location="global" impldecl="in implementation">qslider.h</include> + <include location="global" impldecl="in implementation">tqcheckbox.h</include> + <include location="global" impldecl="in implementation">tqmessagebox.h</include> + <include location="global" impldecl="in implementation">tqobjectlist.h</include> + <include location="global" impldecl="in implementation">tqbuttongroup.h</include> + <include location="global" impldecl="in implementation">tqslider.h</include> <include location="global" impldecl="in implementation">kurlrequester.h</include> <include location="global" impldecl="in implementation">knuminput.h</include> - <include location="global" impldecl="in implementation">qwidgetfactory.h</include> - <include location="global" impldecl="in implementation">qspinbox.h</include> - <include location="global" impldecl="in implementation">qtextedit.h</include> + <include location="global" impldecl="in implementation">tqwidgetfactory.h</include> + <include location="global" impldecl="in implementation">tqspinbox.h</include> + <include location="global" impldecl="in implementation">tqtextedit.h</include> <include location="global" impldecl="in implementation">kurl.h</include> <include location="global" impldecl="in implementation">kcolorbutton.h</include> <include location="local" impldecl="in implementation">sq_codecsettingsskeleton.ui.h</include> </includes> <variables> - <variable access="private">QWidget *w;</variable> + <variable access="private">TQWidget *w;</variable> <variable access="private">fmt_settings *sett;</variable> </variables> -<signals> +<Q_SIGNALS> <signal>apply();</signal> -</signals> -<slots> +</Q_SIGNALS> +<Q_SLOTS> <slot access="private" specifier="non virtual">slotApply()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> - <function specifier="non virtual">addSettingsWidget( const QString & path )</function> + <function specifier="non virtual">addSettingsWidget( const TQString & path )</function> <function access="private" specifier="non virtual">recursivelyReadWrite( fmt_settings & settings, bool r )</function> <function returnType="int">exec( fmt_settings & settings )</function> - <function specifier="non virtual">setCodecInfo( const QPixmap & pixmap, const QString & text )</function> + <function specifier="non virtual">setCodecInfo( const TQPixmap & pixmap, const TQString & text )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_codecsettingsskeleton.ui.h b/ksquirrel/sq_codecsettingsskeleton.ui.h index 1ea9d6b..417ef55 100644 --- a/ksquirrel/sq_codecsettingsskeleton.ui.h +++ b/ksquirrel/sq_codecsettingsskeleton.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -13,10 +13,10 @@ void SQ_CodecSettingsSkeleton::init() sett = 0; } -void SQ_CodecSettingsSkeleton::addSettingsWidget(const QString &path) +void SQ_CodecSettingsSkeleton::addSettingsWidget(const TQString &path) { - w = QWidgetFactory::create(path, 0, this, "skeleton_settings"); - QWidget *fake; + w = TQWidgetFactory::create(path, 0, this, "skeleton_settings"); + TQWidget *fake; if(w) fake = w; @@ -25,17 +25,17 @@ void SQ_CodecSettingsSkeleton::addSettingsWidget(const QString &path) pushApply->setEnabled(false); pushOK->setEnabled(false); - QTextEdit *t = new QTextEdit(i18n("Error loading widget from <b>%1</b>. Please check your installation or contact <a href=\"mailto:[email protected]\">[email protected]</a>").arg(path), QString::null, groupBox); + TQTextEdit *t = new TQTextEdit(i18n("Error loading widget from <b>%1</b>. Please check your installation or contact <a href=\"mailto:[email protected]\">[email protected]</a>").tqarg(path), TQString(), groupBox); t->setReadOnly(true); fake = t; } - fake->reparent(groupBox, QPoint(0,0), true); + fake->reparent(groupBox, TQPoint(0,0), true); - QGridLayout *grid = new QGridLayout(groupBox, 1, 1, 11, 6); + TQGridLayout *grid = new TQGridLayout(groupBox, 1, 1, 11, 6); grid->addMultiCellWidget(fake, 1, 1, 0, 3); - QSpacerItem *spacer = new QSpacerItem(15, 1, QSizePolicy::Minimum, QSizePolicy::Expanding); + TQSpacerItem *spacer = new TQSpacerItem(15, 1, TQSizePolicy::Minimum, TQSizePolicy::Expanding); grid->addItem(spacer, 2, 1); } @@ -44,16 +44,16 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool if(!w) return; - QObjectList *ch = const_cast<QObjectList *>(w->children()); + TQObjectList ch = w->childrenListObject(); fmt_settings::iterator t; - for(QObjectList::iterator it = ch->begin();it != ch->end();++it) + for(TQObjectList::iterator it = ch.begin();it != ch.end();++it) { t = settings.find((*it)->name()); - if((*it)->inherits("QCheckBox")) + if((*it)->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) { - QCheckBox *c = dynamic_cast<QCheckBox *>(*it); + TQCheckBox *c = dynamic_cast<TQCheckBox *>(*it); if(c && t != settings.end()) { @@ -63,9 +63,9 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool (*t).second.bVal = c->isChecked(); } } - else if((*it)->inherits("QButtonGroup")) + else if((*it)->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING)) { - QButtonGroup *c = dynamic_cast<QButtonGroup *>(*it); + TQButtonGroup *c = dynamic_cast<TQButtonGroup *>(*it); if(c && t != settings.end()) { @@ -75,9 +75,9 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool (*t).second.iVal = c->selectedId(); } } - else if((*it)->inherits("QSlider")) + else if((*it)->inherits(TQSLIDER_OBJECT_NAME_STRING)) { - QSlider *c = dynamic_cast<QSlider *>(*it); + TQSlider *c = dynamic_cast<TQSlider *>(*it); if(c && t != settings.end()) { @@ -114,10 +114,10 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool (*t).second.dVal = d->value(); } } - // QSpinBox should be checked after KDoubleSpinBox ! - else if((*it)->inherits("QSpinBox")) + // TQSpinBox should be checked after KDoubleSpinBox ! + else if((*it)->inherits(TQSPINBOX_OBJECT_NAME_STRING)) { - QSpinBox *c = dynamic_cast<QSpinBox *>(*it); + TQSpinBox *c = dynamic_cast<TQSpinBox *>(*it); if(c && t != settings.end()) { @@ -134,9 +134,9 @@ void SQ_CodecSettingsSkeleton::recursivelyReadWrite(fmt_settings &settings, bool if(c && t != settings.end()) { if(r) - c->setColor(QColor((*t).second.sVal)); + c->setColor(TQColor(TQString((*t).second.sVal))); else - (*t).second.sVal = c->color().name().ascii(); + (*t).second.sVal = TQString(c->color().name()).ascii(); } } } @@ -149,16 +149,16 @@ int SQ_CodecSettingsSkeleton::exec(fmt_settings &settings) sett = &settings; - int result = QDialog::exec(); + int result = TQDialog::exec(); // save settings - if(result == QDialog::Accepted) + if(result == TQDialog::Accepted) recursivelyReadWrite(settings, false); return result; } -void SQ_CodecSettingsSkeleton::setCodecInfo( const QPixmap &pixmap, const QString &text ) +void SQ_CodecSettingsSkeleton::setCodecInfo( const TQPixmap &pixmap, const TQString &text ) { codecIcon->setPixmap(pixmap); codecName->setText(text); diff --git a/ksquirrel/sq_config.cpp b/ksquirrel/sq_config.cpp index 960c1af..9cc2b82 100644 --- a/ksquirrel/sq_config.cpp +++ b/ksquirrel/sq_config.cpp @@ -23,7 +23,7 @@ SQ_Config * SQ_Config::m_instance = 0; -SQ_Config::SQ_Config(QObject *parent) : QObject(parent) +SQ_Config::SQ_Config(TQObject *tqparent) : TQObject(tqparent) { m_instance = this; diff --git a/ksquirrel/sq_config.h b/ksquirrel/sq_config.h index 6f2a662..4415d18 100644 --- a/ksquirrel/sq_config.h +++ b/ksquirrel/sq_config.h @@ -18,7 +18,7 @@ #ifndef SQ_CONFIG_H #define SQ_CONFIG_H -#include <qobject.h> +#include <tqobject.h> #include <kconfig.h> class KConfig; @@ -27,38 +27,38 @@ class KConfig; * Class for reading/writing config file */ -class SQ_Config : public QObject +class SQ_Config : public TQObject { public: - SQ_Config(QObject *parent = 0); + SQ_Config(TQObject *tqparent = 0); ~SQ_Config(); static SQ_Config* instance() { return m_instance; } void sync(); - void setGroup(const QString &group); - bool hasGroup(const QString &group) const; - bool deleteGroup( const QString& group, bool bDeep = true, bool bGlobal = false ); - QString readEntry(const QString& pKey, const QString& aDefault = QString::null ) const; - QStringList readListEntry( const QString& pKey, char sep = ',' ) const; - int readNumEntry( const QString& pKey, int nDefault = 0 ) const; - bool readBoolEntry( const QString& pKey, bool bDefault = false ) const; - QRect readRectEntry( const QString& pKey, const QRect* pDefault = 0L ) const; - QPoint readPointEntry( const QString& pKey, const QPoint* pDefault = 0L ) const; - QSize readSizeEntry( const QString& pKey, const QSize* pDefault = 0L ) const; - double readDoubleNumEntry( const QString& pKey, double nDefault = 0.0 ) const; - QValueList<int> readIntListEntry( const QString& pKey ) const; - - void writeEntry( const QString& pKey, const QString& pValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, const QStringList &rValue, char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, int nValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, bool bValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, const QRect& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, const QPoint& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, const QSize& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); - void writeEntry( const QString& pKey, double nValue, bool bPersistent = true, bool bGlobal = false, char format = 'g', int precision = 6, bool bNLS = false ); - void writeEntry( const QString& pKey, const QValueList<int>& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void setGroup(const TQString &group); + bool hasGroup(const TQString &group) const; + bool deleteGroup( const TQString& group, bool bDeep = true, bool bGlobal = false ); + TQString readEntry(const TQString& pKey, const TQString& aDefault = TQString() ) const; + TQStringList readListEntry( const TQString& pKey, char sep = ',' ) const; + int readNumEntry( const TQString& pKey, int nDefault = 0 ) const; + bool readBoolEntry( const TQString& pKey, bool bDefault = false ) const; + TQRect readRectEntry( const TQString& pKey, const TQRect* pDefault = 0L ) const; + TQPoint readPointEntry( const TQString& pKey, const TQPoint* pDefault = 0L ) const; + TQSize readSizeEntry( const TQString& pKey, const TQSize* pDefault = 0L ) const; + double readDoubleNumEntry( const TQString& pKey, double nDefault = 0.0 ) const; + TQValueList<int> readIntListEntry( const TQString& pKey ) const; + + void writeEntry( const TQString& pKey, const TQString& pValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQStringList &rValue, char sep = ',', bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, int nValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, bool bValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQRect& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQPoint& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQSize& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); + void writeEntry( const TQString& pKey, double nValue, bool bPersistent = true, bool bGlobal = false, char format = 'g', int precision = 6, bool bNLS = false ); + void writeEntry( const TQString& pKey, const TQValueList<int>& rValue, bool bPersistent = true, bool bGlobal = false, bool bNLS = false ); private: KConfig *kconf; @@ -69,68 +69,68 @@ inline void SQ_Config::sync() { kconf->sync(); } inline -void SQ_Config::setGroup(const QString &group) { kconf->setGroup(group) ; } +void SQ_Config::setGroup(const TQString &group) { kconf->setGroup(group) ; } inline -bool SQ_Config::hasGroup(const QString &group) const { return kconf->hasGroup(group) ; } +bool SQ_Config::hasGroup(const TQString &group) const { return kconf->hasGroup(group) ; } inline -bool SQ_Config::deleteGroup(const QString& group, bool bDeep, bool bGlobal) { return kconf->deleteGroup(group, bDeep, bGlobal) ; } +bool SQ_Config::deleteGroup(const TQString& group, bool bDeep, bool bGlobal) { return kconf->deleteGroup(group, bDeep, bGlobal) ; } inline -QString SQ_Config::readEntry(const QString& pKey, const QString& aDefault) const { return kconf->readEntry(pKey, aDefault) ; } +TQString SQ_Config::readEntry(const TQString& pKey, const TQString& aDefault) const { return kconf->readEntry(pKey, aDefault) ; } inline -QStringList SQ_Config::readListEntry(const QString& pKey, char sep) const { return kconf->readListEntry(pKey, sep) ; } +TQStringList SQ_Config::readListEntry(const TQString& pKey, char sep) const { return kconf->readListEntry(pKey, sep) ; } inline -int SQ_Config::readNumEntry(const QString& pKey, int nDefault) const { return kconf->readNumEntry(pKey, nDefault) ; } +int SQ_Config::readNumEntry(const TQString& pKey, int nDefault) const { return kconf->readNumEntry(pKey, nDefault) ; } inline -bool SQ_Config::readBoolEntry(const QString& pKey, bool bDefault) const { return kconf->readBoolEntry(pKey, bDefault ) ; } +bool SQ_Config::readBoolEntry(const TQString& pKey, bool bDefault) const { return kconf->readBoolEntry(pKey, bDefault ) ; } inline -QRect SQ_Config::readRectEntry(const QString& pKey, const QRect* pDefault) const { return kconf->readRectEntry(pKey, pDefault) ; } +TQRect SQ_Config::readRectEntry(const TQString& pKey, const TQRect* pDefault) const { return kconf->readRectEntry(pKey, pDefault) ; } inline -QPoint SQ_Config::readPointEntry(const QString& pKey, const QPoint* pDefault) const { return kconf->readPointEntry(pKey, pDefault) ; } +TQPoint SQ_Config::readPointEntry(const TQString& pKey, const TQPoint* pDefault) const { return kconf->readPointEntry(pKey, pDefault) ; } inline -QSize SQ_Config::readSizeEntry(const QString& pKey, const QSize* pDefault) const { return kconf->readSizeEntry(pKey, pDefault) ; } +TQSize SQ_Config::readSizeEntry(const TQString& pKey, const TQSize* pDefault) const { return kconf->readSizeEntry(pKey, pDefault) ; } inline -double SQ_Config::readDoubleNumEntry(const QString& pKey, double nDefault) const { return kconf->readDoubleNumEntry(pKey, nDefault); } +double SQ_Config::readDoubleNumEntry(const TQString& pKey, double nDefault) const { return kconf->readDoubleNumEntry(pKey, nDefault); } inline -QValueList<int> SQ_Config::readIntListEntry( const QString& pKey ) const { return kconf->readIntListEntry(pKey); } +TQValueList<int> SQ_Config::readIntListEntry( const TQString& pKey ) const { return kconf->readIntListEntry(pKey); } /**********************************************/ inline -void SQ_Config::writeEntry(const QString& pKey, const QString& pValue, bool bPersistent, bool bGlobal, bool bNLS) { kconf->writeEntry( pKey, pValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQString& pValue, bool bPersistent, bool bGlobal, bool bNLS) { kconf->writeEntry( pKey, pValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, const QStringList &rValue, char sep, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, sep, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQStringList &rValue, char sep, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, sep, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, int nValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, nValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, int nValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, nValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, bool bValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, bValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, bool bValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, bValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, const QRect& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQRect& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, const QPoint& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQPoint& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry(const QString& pKey, const QSize& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey,rValue, bPersistent, bGlobal, bNLS ) ; } +void SQ_Config::writeEntry(const TQString& pKey, const TQSize& rValue, bool bPersistent, bool bGlobal, bool bNLS ) { kconf->writeEntry(pKey,rValue, bPersistent, bGlobal, bNLS ) ; } inline -void SQ_Config::writeEntry( const QString& pKey, double nValue, bool bPersistent, bool bGlobal, char format, int precision, bool bNLS) { kconf->writeEntry(pKey, nValue, bPersistent, bGlobal, format, precision, bNLS); } +void SQ_Config::writeEntry( const TQString& pKey, double nValue, bool bPersistent, bool bGlobal, char format, int precision, bool bNLS) { kconf->writeEntry(pKey, nValue, bPersistent, bGlobal, format, precision, bNLS); } inline -void SQ_Config::writeEntry( const QString& pKey, const QValueList<int>& rValue, bool bPersistent, bool bGlobal, bool bNLS) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS); } +void SQ_Config::writeEntry( const TQString& pKey, const TQValueList<int>& rValue, bool bPersistent, bool bGlobal, bool bNLS) { kconf->writeEntry(pKey, rValue, bPersistent, bGlobal, bNLS); } #endif diff --git a/ksquirrel/sq_dir.cpp b/ksquirrel/sq_dir.cpp index 4f0064a..5683743 100644 --- a/ksquirrel/sq_dir.cpp +++ b/ksquirrel/sq_dir.cpp @@ -19,20 +19,20 @@ #include "config.h" #endif -#include <qstringlist.h> -#include <qfile.h> -#include <qdatetime.h> -#include <qfileinfo.h> +#include <tqstringlist.h> +#include <tqfile.h> +#include <tqdatetime.h> +#include <tqfileinfo.h> #include <kurl.h> #include "sq_dir.h" #include "sq_thumbnailinfo.h" -SQ_Dir::SQ_Dir() : QDir() +SQ_Dir::SQ_Dir() : TQDir() {} -SQ_Dir::SQ_Dir(Prefix p) : QDir() +SQ_Dir::SQ_Dir(Prefix p) : TQDir() { switch(p) { @@ -58,17 +58,17 @@ SQ_Dir::~SQ_Dir() * mkdir("/mnt/win_c") will create * ~/.ksquirrel/thumbnails/mnt/win_c. */ -bool SQ_Dir::mkdir(const QString &relpath) +bool SQ_Dir::mkdir(const TQString &relpath) { - QStringList paths = QStringList::split('/', QDir::cleanDirPath(relpath)); + TQStringList paths = TQStringList::split('/', TQDir::cleanDirPath(relpath)); cd(m_root); // recursively create directories - for(QStringList::iterator it = paths.begin();it != paths.end();++it) + for(TQStringList::iterator it = paths.begin();it != paths.end();++it) { if(!exists(*it, false)) - if(!QDir::mkdir(*it)) + if(!TQDir::mkdir(*it)) return false; cd(*it); @@ -77,16 +77,16 @@ bool SQ_Dir::mkdir(const QString &relpath) return true; } -void SQ_Dir::setRoot(const QString &name) +void SQ_Dir::setRoot(const TQString &name) { - m_root = QDir::cleanDirPath(homeDirPath() + QDir::separator() + QString::fromLatin1(".ksquirrel")); - QDir::mkdir(m_root); + m_root = TQDir::cleanDirPath(homeDirPath() + TQDir::separator() + TQString::tqfromLatin1(".ksquirrel")); + TQDir::mkdir(m_root); - m_root = QDir::cleanDirPath(m_root + QDir::separator() + name); - QDir::mkdir(m_root); + m_root = TQDir::cleanDirPath(m_root + TQDir::separator() + name); + TQDir::mkdir(m_root); } -QString SQ_Dir::absPath(const KURL &relurl) +TQString SQ_Dir::absPath(const KURL &relurl) { - return m_root + QDir::separator() + relurl.path(); + return m_root + TQDir::separator() + relurl.path(); } diff --git a/ksquirrel/sq_dir.h b/ksquirrel/sq_dir.h index 20ca543..31cf151 100644 --- a/ksquirrel/sq_dir.h +++ b/ksquirrel/sq_dir.h @@ -18,7 +18,7 @@ #ifndef SQ_DIR_H #define SQ_DIR_H -#include <qdir.h> +#include <tqdir.h> #include <ctime> @@ -34,7 +34,7 @@ class KURL; * SQ_ThumbnailJob etc. */ -class SQ_Dir : public QDir +class SQ_Dir : public TQDir { public: enum Prefix { @@ -67,7 +67,7 @@ class SQ_Dir : public QDir * * Return true, if operation succeded. */ - bool mkdir(const QString &relpath); + bool mkdir(const TQString &relpath); /* * Get current root directory. @@ -75,7 +75,7 @@ class SQ_Dir : public QDir * For example, if prefix == Basket, it will * return "/home/krasu/.ksquirrel/basket". */ - virtual QString root() const; + virtual TQString root() const; /* * Get absolute path for relative path 'relpath'. @@ -83,20 +83,20 @@ class SQ_Dir : public QDir * Reimplemented in SQ_DirThumbs to handle MD5-encoded * urls. */ - virtual QString absPath(const KURL &relurl); + virtual TQString absPath(const KURL &relurl); private: /* * Internal, used by mkdir(). */ - virtual void setRoot(const QString &name); + virtual void setRoot(const TQString &name); protected: - QString m_root; + TQString m_root; }; inline -QString SQ_Dir::root() const +TQString SQ_Dir::root() const { return m_root; } diff --git a/ksquirrel/sq_diroperator.cpp b/ksquirrel/sq_diroperator.cpp index 95efef0..66587b8 100644 --- a/ksquirrel/sq_diroperator.cpp +++ b/ksquirrel/sq_diroperator.cpp @@ -19,12 +19,12 @@ #include "config.h" #endif -#include <qtimer.h> -#include <qlabel.h> -#include <qfileinfo.h> -#include <qapplication.h> -#include <qtooltip.h> -#include <qclipboard.h> +#include <tqtimer.h> +#include <tqlabel.h> +#include <tqfileinfo.h> +#include <tqapplication.h> +#include <tqtooltip.h> +#include <tqclipboard.h> #include <kapplication.h> #include <kstringhandler.h> @@ -67,8 +67,8 @@ static const int SQ_MAX_WORD_LENGTH = 50; -SQ_DirOperator::SQ_DirOperator(const KURL &url, ViewT type_, QWidget *parent, const char *name) - : KDirOperator(url, parent, name), type(type_) +SQ_DirOperator::SQ_DirOperator(const KURL &url, ViewT type_, TQWidget *tqparent, const char *name) + : KDirOperator(url, tqparent, name), type(type_) { usenew = false; @@ -77,19 +77,19 @@ SQ_DirOperator::SQ_DirOperator(const KURL &url, ViewT type_, QWidget *parent, co // create and insert new actions in context menu setupActionsMy(); - connect(this, SIGNAL(finishedLoading()), this, SLOT(slotFinishedLoading())); - connect(this, SIGNAL(updateInformation(int,int)), this, SLOT(slotUpdateInformation(int,int))); - connect(this, SIGNAL(urlEntered(const KURL&)), this, SLOT(slotUrlEntered(const KURL&))); - connect(this, SIGNAL(dropped(const KFileItem *, QDropEvent*, const KURL::List&)), - this, SLOT(slotDropped(const KFileItem *, QDropEvent*, const KURL::List&))); - connect(this, SIGNAL(fileSelected(const KFileItem *)), this, SLOT(slotExecutedConst(const KFileItem *))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(finishedLoading()), TQT_TQOBJECT(this), TQT_SLOT(slotFinishedLoading())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(updateInformation(int,int)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateInformation(int,int))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(urlEntered(const KURL&)), TQT_TQOBJECT(this), TQT_SLOT(slotUrlEntered(const KURL&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(dropped(const KFileItem *, TQDropEvent*, const KURL::List&)), + TQT_TQOBJECT(this), TQT_SLOT(slotDropped(const KFileItem *, TQDropEvent*, const KURL::List&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(fileSelected(const KFileItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotExecutedConst(const KFileItem *))); - connect(dirLister(), SIGNAL(deleteItem(KFileItem *)), this, SLOT(slotItemDeleted(KFileItem *))); - connect(dirLister(), SIGNAL(newItems(const KFileItemList &)), this, SLOT(slotNewItems(const KFileItemList &))); - connect(dirLister(), SIGNAL(refreshItems(const KFileItemList &)), this, SLOT(slotRefreshItems(const KFileItemList &))); + connect(dirLister(), TQT_SIGNAL(deleteItem(KFileItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotItemDeleted(KFileItem *))); + connect(dirLister(), TQT_SIGNAL(newItems(const KFileItemList &)), TQT_TQOBJECT(this), TQT_SLOT(slotNewItems(const KFileItemList &))); + connect(dirLister(), TQT_SIGNAL(refreshItems(const KFileItemList &)), TQT_TQOBJECT(this), TQT_SLOT(slotRefreshItems(const KFileItemList &))); - timer_preview = new QTimer(this); - connect(timer_preview, SIGNAL(timeout()), this, SLOT(slotPreview())); + timer_preview = new TQTimer(this); + connect(timer_preview, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotPreview())); setAcceptDrops(true); @@ -98,22 +98,22 @@ SQ_DirOperator::SQ_DirOperator(const KURL &url, ViewT type_, QWidget *parent, co fireDiskSize(url); - down = new SQ_Downloader(this, "SQ_Downloader [dirop]"); - connect(down, SIGNAL(result(const KURL &)), this, SLOT(slotDownloaderResult(const KURL &))); - connect(down, SIGNAL(percents(int)), this, SLOT(slotDownloadPercents(int))); + down = new SQ_Downloader(TQT_TQOBJECT(this), "SQ_Downloader [dirop]"); + connect(down, TQT_SIGNAL(result(const KURL &)), TQT_TQOBJECT(this), TQT_SLOT(slotDownloaderResult(const KURL &))); + connect(down, TQT_SIGNAL(percents(int)), TQT_TQOBJECT(this), TQT_SLOT(slotDownloadPercents(int))); - connect(SQ_ArchiveHandler::instance(), SIGNAL(unpack(const KURL &)), this, SLOT(slotSetURL(const KURL &))); + connect(SQ_ArchiveHandler::instance(), TQT_SIGNAL(unpack(const KURL &)), TQT_TQOBJECT(this), TQT_SLOT(slotSetURL(const KURL &))); // read sorting settings SQ_Config::instance()->setGroup("Fileview"); int sorting = 0; - if(SQ_Config::instance()->readBoolEntry("sorting_name", true)) sorting |= QDir::Name; - if(SQ_Config::instance()->readBoolEntry("sorting_time", false)) sorting |= QDir::Time; - if(SQ_Config::instance()->readBoolEntry("sorting_size", false)) sorting |= QDir::Size; - if(SQ_Config::instance()->readBoolEntry("sorting_dirs", true)) sorting |= QDir::DirsFirst; - if(SQ_Config::instance()->readBoolEntry("sorting_reverse", false)) sorting |= QDir::Reversed; - if(SQ_Config::instance()->readBoolEntry("sorting_ignore", false)) sorting |= QDir::IgnoreCase; + if(SQ_Config::instance()->readBoolEntry("sorting_name", true)) sorting |= TQDir::Name; + if(SQ_Config::instance()->readBoolEntry("sorting_time", false)) sorting |= TQDir::Time; + if(SQ_Config::instance()->readBoolEntry("sorting_size", false)) sorting |= TQDir::Size; + if(SQ_Config::instance()->readBoolEntry("sorting_dirs", true)) sorting |= TQDir::DirsFirst; + if(SQ_Config::instance()->readBoolEntry("sorting_reverse", false)) sorting |= TQDir::Reversed; + if(SQ_Config::instance()->readBoolEntry("sorting_ignore", false)) sorting |= TQDir::IgnoreCase; actionHidden = dynamic_cast<KToggleAction *>(actionCollection()->action("show hidden")); @@ -123,7 +123,7 @@ SQ_DirOperator::SQ_DirOperator(const KURL &url, ViewT type_, QWidget *parent, co actionHidden->activate(); } - setSorting(static_cast<QDir::SortSpec>(sorting)); + setSorting(static_cast<TQDir::SortSpec>(sorting)); setEnableDirHighlighting(true); } @@ -149,14 +149,14 @@ void SQ_DirOperator::fireDiskSize(const KURL &url) { KDiskFreeSp *sp = KDiskFreeSp::findUsageInfo(url.path()); - connect(sp, SIGNAL(foundMountPoint(const unsigned long&, + connect(sp, TQT_SIGNAL(foundMountPoint(const unsigned long&, const unsigned long&, const unsigned long&, - const QString&)), - this, SLOT(slotFoundMountPoint(const unsigned long&, + const TQString&)), + TQT_TQOBJECT(this), TQT_SLOT(slotFoundMountPoint(const unsigned long&, const unsigned long&, const unsigned long&, - const QString&))); + const TQString&))); } else { @@ -165,30 +165,30 @@ void SQ_DirOperator::fireDiskSize(const KURL &url) KSquirrel::app()->diskProgress()->setIndicator(0); KSquirrel::app()->diskProgress()->update(); KSquirrel::app()->sbarWidget("diskSpace")->setText(i18n("remote filesystem")); - QToolTip::remove(KSquirrel::app()->sbarWidget("diskSpace")); + TQToolTip::remove(KSquirrel::app()->sbarWidget("diskSpace")); } } void SQ_DirOperator::slotFoundMountPoint(const unsigned long &kbSize, const unsigned long &kbUsed, const unsigned long &kbAvail, - const QString &mount) + const TQString &mount) { // clear any previous drawing KSquirrel::app()->diskProgress()->flush(); KSquirrel::app()->diskProgress()->setTotalSteps(kbSize); KSquirrel::app()->diskProgress()->setIndicator(kbSize-kbAvail); // kbSize != kbAvail+kbUsed - KSquirrel::app()->sbarWidget("diskSpace")->setText(QString::fromLatin1("%1: %2/%3") - .arg(mount) - .arg(KIO::convertSizeFromKB(kbAvail)) - .arg(KIO::convertSizeFromKB(kbSize))); - - QToolTip::add(KSquirrel::app()->sbarWidget("diskSpace"), i18n("<table><tr><td>Mount point:</td><td>%1</td></tr><tr><td>Total size:</td><td>%2</td></tr><tr><td>Used:</td><td>%3</td></tr><tr><td>Available:</td><td>%4</td></tr></table>") - .arg(mount) - .arg(KIO::convertSizeFromKB(kbSize)) - .arg(KIO::convertSizeFromKB(kbUsed)) - .arg(KIO::convertSizeFromKB(kbAvail)) + KSquirrel::app()->sbarWidget("diskSpace")->setText(TQString::tqfromLatin1("%1: %2/%3") + .tqarg(mount) + .tqarg(KIO::convertSizeFromKB(kbAvail)) + .tqarg(KIO::convertSizeFromKB(kbSize))); + + TQToolTip::add(KSquirrel::app()->sbarWidget("diskSpace"), i18n("<table><tr><td>Mount point:</td><td>%1</td></tr><tr><td>Total size:</td><td>%2</td></tr><tr><td>Used:</td><td>%3</td></tr><tr><td>Available:</td><td>%4</td></tr></table>") + .tqarg(mount) + .tqarg(KIO::convertSizeFromKB(kbSize)) + .tqarg(KIO::convertSizeFromKB(kbUsed)) + .tqarg(KIO::convertSizeFromKB(kbAvail)) ); } @@ -238,10 +238,10 @@ void SQ_DirOperator::prepareView(ViewT t) SQ_FileDetailView *dv; fileview = dv = new SQ_FileDetailView(this, "detail view"); - connect(dv, SIGNAL(currentChanged(QListViewItem *)), this, SLOT(slotCurrentChanged(QListViewItem *))); - connect(dv, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); - connect(dv, SIGNAL(invokeBrowser()), this, SLOT(slotInvokeBrowser())); - connect(KSquirrel::app(), SIGNAL(resetToolTip()), dv, SLOT(slotResetToolTip())); + connect(dv, TQT_SIGNAL(currentChanged(TQListViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotCurrentChanged(TQListViewItem *))); + connect(dv, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectionChanged())); + connect(dv, TQT_SIGNAL(invokeBrowser()), TQT_TQOBJECT(this), TQT_SLOT(slotInvokeBrowser())); + connect(KSquirrel::app(), TQT_SIGNAL(resetToolTip()), dv, TQT_SLOT(slotResetToolTip())); } break; @@ -251,10 +251,10 @@ void SQ_DirOperator::prepareView(ViewT t) SQ_FileIconView *iv; fileview = iv = new SQ_FileIconView(this, (type == SQ_DirOperator::TypeIcons) ? "icon view":"list view"); - connect(iv, SIGNAL(currentChanged(QIconViewItem *)), this, SLOT(slotCurrentChanged(QIconViewItem *))); - connect(iv, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); - connect(iv, SIGNAL(invokeBrowser()), this, SLOT(slotInvokeBrowser())); - connect(KSquirrel::app(), SIGNAL(resetToolTip()), iv, SLOT(slotResetToolTip())); + connect(iv, TQT_SIGNAL(currentChanged(TQIconViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotCurrentChanged(TQIconViewItem *))); + connect(iv, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectionChanged())); + connect(iv, TQT_SIGNAL(invokeBrowser()), TQT_TQOBJECT(this), TQT_SLOT(slotInvokeBrowser())); + connect(KSquirrel::app(), TQT_SIGNAL(resetToolTip()), iv, TQT_SLOT(slotResetToolTip())); disableSpecificActions(iv); } @@ -265,11 +265,11 @@ void SQ_DirOperator::prepareView(ViewT t) SQ_FileThumbView *tv; fileview = tv = new SQ_FileThumbView(this, "thumb view"); - connect(tv, SIGNAL(currentChanged(QIconViewItem *)), this, SLOT(slotCurrentChanged(QIconViewItem *))); - connect(tv, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); - connect(tv, SIGNAL(invokeBrowser()), this, SLOT(slotInvokeBrowser())); - connect(dirLister(), SIGNAL(canceled()), tv, SLOT(stopThumbnailUpdate())); - connect(KSquirrel::app(), SIGNAL(resetToolTip()), tv, SLOT(slotResetToolTip())); + connect(tv, TQT_SIGNAL(currentChanged(TQIconViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotCurrentChanged(TQIconViewItem *))); + connect(tv, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectionChanged())); + connect(tv, TQT_SIGNAL(invokeBrowser()), TQT_TQOBJECT(this), TQT_SLOT(slotInvokeBrowser())); + connect(dirLister(), TQT_SIGNAL(canceled()), tv, TQT_SLOT(stopThumbnailUpdate())); + connect(KSquirrel::app(), TQT_SIGNAL(resetToolTip()), tv, TQT_SLOT(slotResetToolTip())); disableSpecificActions(tv); } @@ -277,20 +277,20 @@ void SQ_DirOperator::prepareView(ViewT t) } } -void SQ_DirOperator::slotCurrentChanged(QListViewItem *) +void SQ_DirOperator::slotCurrentChanged(TQListViewItem *) { timer_preview->start(SQ_PreviewWidget::instance()->delay(), true); } -void SQ_DirOperator::slotCurrentChanged(QIconViewItem *) +void SQ_DirOperator::slotCurrentChanged(TQIconViewItem *) { timer_preview->start(SQ_PreviewWidget::instance()->delay(), true); } void SQ_DirOperator::slotSelectionChanged() { - QString str = i18n("no files selected"); - QPixmap px; + TQString str = i18n("no files selected"); + TQPixmap px; KIO::filesize_t sz = static_cast<KIO::filesize_t>(0); int add = 0; KFileItem *fi = 0; @@ -319,10 +319,10 @@ void SQ_DirOperator::slotSelectionChanged() px = fi->pixmap(KIcon::SizeSmall); // costruct name and size - str = QString("%1 %2 %3") - .arg(KStringHandler::csqueeze(fi->name(), SQ_MAX_WORD_LENGTH)) - .arg(KIO::convertSize(fi->size())) - .arg(add > 1 ? QString("<b>[%1/%2]</b>").arg(KIO::convertSize(sz)).arg(add):""); + str = TQString("%1 %2 %3") + .tqarg(KStringHandler::csqueeze(fi->name(), SQ_MAX_WORD_LENGTH)) + .tqarg(KIO::convertSize(fi->size())) + .tqarg(add > 1 ? TQString("<b>[%1/%2]</b>").tqarg(KIO::convertSize(sz)).tqarg(add):""); } // update statusbar @@ -337,57 +337,57 @@ void SQ_DirOperator::setPreparedView() fileview->setOnlyDoubleClickSelectsFiles(true); } -void SQ_DirOperator::slotDropped(const KFileItem *i, QDropEvent*, const KURL::List &urls) +void SQ_DirOperator::slotDropped(const KFileItem *i, TQDropEvent*, const KURL::List &urls) { KURL u = i ? i->url() : url(); // setup and show popup menu with actions SQ_NavigatorDropMenu::instance()->setupFiles(urls, u); - SQ_NavigatorDropMenu::instance()->exec(QCursor::pos()); + SQ_NavigatorDropMenu::instance()->exec(TQCursor::pos()); } // Insert new actions in context menu. void SQ_DirOperator::setupActionsMy() { - new KAction(i18n("Edit file type"), 0, 0, this, SLOT(slotEditMime()), actionCollection(), "dirop_edit_mime"); + new KAction(i18n("Edit file type"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditMime()), actionCollection(), "dirop_edit_mime"); if(SQ_HLOptions::instance()->have_imagebasket) - new KAction(i18n("Add to Basket"), "folder_image", CTRL+Qt::Key_B, this, SLOT(slotAddToBasket()), actionCollection(), "dirop_tobasket"); + new KAction(i18n("Add to Basket"), "folder_image", CTRL+TQt::Key_B, TQT_TQOBJECT(this), TQT_SLOT(slotAddToBasket()), actionCollection(), "dirop_tobasket"); if(SQ_HLOptions::instance()->have_directorybasket) - new KAction(i18n("Add to Folder Basket"), "folder_image", CTRL+Qt::Key_D, this, SLOT(slotAddToDirectoryBasket()), actionCollection(), "dirop_todirbasket"); + new KAction(i18n("Add to Folder Basket"), "folder_image", CTRL+TQt::Key_D, TQT_TQOBJECT(this), TQT_SLOT(slotAddToDirectoryBasket()), actionCollection(), "dirop_todirbasket"); KActionMenu *file = new KActionMenu(i18n("File actions"), actionCollection(), "dirop_file_menu"); KAction *prop = actionCollection()->action("properties"); KAction *reload = actionCollection()->action("mkdir"); - if(reload && reload->shortcut().isNull()) reload->setShortcut(KShortcut(CTRL+Qt::Key_N)); + if(reload && reload->shortcut().isNull()) reload->setShortcut(KShortcut(CTRL+TQt::Key_N)); reload = actionCollection()->action("reload"); - connect(prop, SIGNAL(enabled(bool)), this, SLOT(slotEnableFileActions(bool))); + connect(prop, TQT_SIGNAL(enabled(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotEnableFileActions(bool))); KAction *sep = actionCollection()->action("separator"); - file->insert(new KAction(i18n("Copy"), "editcopy", KStdAccel::copy(), SQ_WidgetStack::instance(), SLOT(slotFileCopy()), actionCollection(), "dirop_copy")); - file->insert(new KAction(i18n("Cut"), "editcut", KStdAccel::cut(), SQ_WidgetStack::instance(), SLOT(slotFileCut()), actionCollection(), "dirop_cut")); - file->insert(new KAction(i18n("Paste"), "editpaste", KStdAccel::paste(), SQ_WidgetStack::instance(), SLOT(slotFilePaste()), actionCollection(), "dirop_paste")); + file->insert(new KAction(i18n("Copy"), "editcopy", KStdAccel::copy(), SQ_WidgetStack::instance(), TQT_SLOT(slotFileCopy()), actionCollection(), "dirop_copy")); + file->insert(new KAction(i18n("Cut"), "editcut", KStdAccel::cut(), SQ_WidgetStack::instance(), TQT_SLOT(slotFileCut()), actionCollection(), "dirop_cut")); + file->insert(new KAction(i18n("Paste"), "editpaste", KStdAccel::paste(), SQ_WidgetStack::instance(), TQT_SLOT(slotFilePaste()), actionCollection(), "dirop_paste")); file->insert(sep); - file->insert(new KAction(i18n("Copy to..."), 0, Qt::Key_F5, SQ_WidgetStack::instance(), SLOT(slotFileCopyTo()), actionCollection(), "dirop_copyto")); - file->insert(new KAction(i18n("Move to..."), 0, Qt::Key_F6, SQ_WidgetStack::instance(), SLOT(slotFileMoveTo()),actionCollection(), "dirop_cutto")); - file->insert(new KAction(i18n("Link to..."), 0, Qt::Key_F7, SQ_WidgetStack::instance(), SLOT(slotFileLinkTo()), actionCollection(), "dirop_linkto")); + file->insert(new KAction(i18n("Copy to..."), 0, TQt::Key_F5, SQ_WidgetStack::instance(), TQT_SLOT(slotFileCopyTo()), actionCollection(), "dirop_copyto")); + file->insert(new KAction(i18n("Move to..."), 0, TQt::Key_F6, SQ_WidgetStack::instance(), TQT_SLOT(slotFileMoveTo()),actionCollection(), "dirop_cutto")); + file->insert(new KAction(i18n("Link to..."), 0, TQt::Key_F7, SQ_WidgetStack::instance(), TQT_SLOT(slotFileLinkTo()), actionCollection(), "dirop_linkto")); file->insert(sep); - file->insert(new KAction(i18n("Run"), "launch", CTRL+Key_J, SQ_WidgetStack::instance(), SLOT(slotRunSeparately()), actionCollection(), "dirop_runsepar")); - file->insert(new KAction(i18n("Repeat (nothing to repeat)"), "down", Qt::Key_F10, KSquirrel::app(), SLOT(slotRepeat()), actionCollection(), "dirop_repeat")); - file->insert(new KAction(i18n("Convert..."), 0, CTRL+Qt::Key_K, SQ_Converter::instance(), SLOT(slotStartEdit()), actionCollection(), "dirop_convert")); + file->insert(new KAction(i18n("Run"), "launch", CTRL+Key_J, SQ_WidgetStack::instance(), TQT_SLOT(slotRunSeparately()), actionCollection(), "dirop_runsepar")); + file->insert(new KAction(i18n("Repeat (nothing to repeat)"), "down", TQt::Key_F10, TQT_TQOBJECT(KSquirrel::app()), TQT_SLOT(slotRepeat()), actionCollection(), "dirop_repeat")); + file->insert(new KAction(i18n("Convert..."), 0, CTRL+TQt::Key_K, SQ_Converter::instance(), TQT_SLOT(slotStartEdit()), actionCollection(), "dirop_convert")); file->insert(sep); - file->insert(new KAction(i18n("Recreate selected thumbnails"), "reload", CTRL+Qt::Key_R, SQ_WidgetStack::instance(), - SLOT(slotRecreateThumbnail()), actionCollection(), "dirop_recreate_thumbnails")); + file->insert(new KAction(i18n("Recreate selected thumbnails"), "reload", CTRL+TQt::Key_R, SQ_WidgetStack::instance(), + TQT_SLOT(slotRecreateThumbnail()), actionCollection(), "dirop_recreate_thumbnails")); file->insert(sep); - file->insert(new KAction(i18n("Copy file path"), 0, Qt::Key_F8, this, SLOT(slotCopyPath()), actionCollection(), "dirop_copypath")); - file->insert(new KAction(i18n("Copy file url"), 0, Qt::Key_F9, this, SLOT(slotCopyURL()), actionCollection(), "dirop_copyurl")); + file->insert(new KAction(i18n("Copy file path"), 0, TQt::Key_F8, TQT_TQOBJECT(this), TQT_SLOT(slotCopyPath()), actionCollection(), "dirop_copypath")); + file->insert(new KAction(i18n("Copy file url"), 0, TQt::Key_F9, TQT_TQOBJECT(this), TQT_SLOT(slotCopyURL()), actionCollection(), "dirop_copyurl")); - if(reload) reload->setShortcut(CTRL+Qt::Key_F5); + if(reload) reload->setShortcut(CTRL+TQt::Key_F5); } void SQ_DirOperator::slotEnableFileActions(bool e) @@ -419,7 +419,7 @@ void SQ_DirOperator::slotCopyPath() KFileItem *f = fileview->currentFileItem(); if(f) - QApplication::clipboard()->setText(f->url().path()); + TQApplication::tqclipboard()->setText(f->url().path()); } void SQ_DirOperator::slotCopyURL() @@ -427,7 +427,7 @@ void SQ_DirOperator::slotCopyURL() KFileItem *f = fileview->currentFileItem(); if(f) - QApplication::clipboard()->setText(f->url().prettyURL()); + TQApplication::tqclipboard()->setText(f->url().prettyURL()); } void SQ_DirOperator::slotEditMime() @@ -480,13 +480,13 @@ void SQ_DirOperator::slotFinishedLoading() usenew = true; } - // clear QLabels in statusbar, if current directory has + // clear TQLabels in statusbar, if current directory has // no files/directories if(!total) { lasturl = KURL(); usenew = false; - m_pending = QString::null; + m_pending = TQString(); KSquirrel::app()->sbarWidget("fileIcon")->clear(); KSquirrel::app()->sbarWidget("fileName")->clear(); return; @@ -494,7 +494,7 @@ void SQ_DirOperator::slotFinishedLoading() // setting current file directly doesn't work. let // events to be processed and only then set current file - QTimer::singleShot(0, this, SLOT(slotDelayedFinishedLoading())); + TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotDelayedFinishedLoading())); } void SQ_DirOperator::slotDelayedFinishedLoading() @@ -509,7 +509,7 @@ void SQ_DirOperator::slotDelayedFinishedLoading() setCurrentItem(fileview->currentFileItem()); } - m_pending = QString::null; + m_pending = TQString(); startOrNotThumbnailUpdate(); return; @@ -557,11 +557,11 @@ void SQ_DirOperator::slotUpdateInformation(int files, int dirs) SQ_Config::instance()->setGroup("Fileview"); - QString str = i18n("Total %1 in %2 (%3, %4)") - .arg(KIO::convertSize(totalSize)) - .arg(i18n("1 item", "%n items", total)) - .arg(i18n("1 folder", "%n folders", dirs)) - .arg(i18n("1 file", "%n files", files)); + TQString str = i18n("Total %1 in %2 (%3, %4)") + .tqarg(KIO::convertSize(totalSize)) + .tqarg(i18n("1 item", "%n items", total)) + .tqarg(i18n("1 folder", "%n folders", dirs)) + .tqarg(i18n("1 file", "%n files", files)); KSquirrel::app()->sbarWidget("dirInfo")->setText(str); } @@ -592,7 +592,7 @@ void SQ_DirOperator::setCurrentItem(KFileItem *item) * diroperator will catch it. Only diroperator, which manages SQ_FileThumbView * won't ignore this signal. See also SQ_WidgetStack::raiseWidget(). */ -void SQ_DirOperator::slotSetThumbSize(const QString &size) +void SQ_DirOperator::slotSetThumbSize(const TQString &size) { // for safety... if(type != SQ_DirOperator::TypeThumbs) @@ -625,7 +625,7 @@ void SQ_DirOperator::smartUpdate() oldSelected = *fileview->selectedItems(); oldCurrentItem = fileview->currentFileItem(); - // heh, 'items' now contains "..", we should remove it! + // heh, 'items' now tqcontains "..", we should remove it! removeCdUpItem(); // clear view and add items (see SQ_FileThumbView::insertItem() for more) @@ -726,7 +726,7 @@ void SQ_DirOperator::clearListers() void SQ_DirOperator::urlAdded(const KURL &_url) { // avoid duplications - if(listers.contains(_url) || _url.equals(url(), true)) + if(listers.tqcontains(_url) || _url.equals(url(), true)) return; KDirLister *lister = new KDirLister(true); @@ -734,13 +734,13 @@ void SQ_DirOperator::urlAdded(const KURL &_url) lister->setMainWindow(dirLister()->mainWindow()); // redirect all signals to dirLister() - nice hack - connect(lister, SIGNAL(refreshItems(const KFileItemList &)), dirLister(), SIGNAL(refreshItems(const KFileItemList &))); - connect(lister, SIGNAL(deleteItem(KFileItem *)), dirLister(), SIGNAL(deleteItem(KFileItem *))); - connect(lister, SIGNAL(newItems(const KFileItemList &)), dirLister(), SIGNAL(newItems(const KFileItemList &))); + connect(lister, TQT_SIGNAL(refreshItems(const KFileItemList &)), dirLister(), TQT_SIGNAL(refreshItems(const KFileItemList &))); + connect(lister, TQT_SIGNAL(deleteItem(KFileItem *)), dirLister(), TQT_SIGNAL(deleteItem(KFileItem *))); + connect(lister, TQT_SIGNAL(newItems(const KFileItemList &)), dirLister(), TQT_SIGNAL(newItems(const KFileItemList &))); - connect(lister, SIGNAL(started(const KURL &)), dirLister(), SIGNAL(started(const KURL &))); - connect(lister, SIGNAL(completed()), dirLister(), SIGNAL(completed())); - connect(lister, SIGNAL(canceled()), dirLister(), SIGNAL(canceled())); + connect(lister, TQT_SIGNAL(started(const KURL &)), dirLister(), TQT_SIGNAL(started(const KURL &))); + connect(lister, TQT_SIGNAL(completed()), dirLister(), TQT_SIGNAL(completed())); + connect(lister, TQT_SIGNAL(canceled()), dirLister(), TQT_SIGNAL(canceled())); // save this lister for us listers[_url] = lister; @@ -751,7 +751,7 @@ void SQ_DirOperator::urlAdded(const KURL &_url) void SQ_DirOperator::urlRemoved(const KURL &url) { // for safety - SQ_Listers::iterator it = listers.find(url); + SQ_Listers::iterator it = listers.tqfind(url); if(it == listers.end()) return; @@ -796,8 +796,8 @@ void SQ_DirOperator::urlRemoved(const KURL &url) void SQ_DirOperator::executePrivate(KFileItem *fi) { KURL url = fi->url(); - QString fullpath = url.path(); - QFileInfo fm(fullpath); + TQString fullpath = url.path(); + TQFileInfo fm(fullpath); // Ok, this file is image file. Let's try to load it if(SQ_LibraryHandler::instance()->libraryForFile(fullpath)) @@ -953,7 +953,7 @@ void SQ_DirOperator::stopPreview() timer_preview->stop(); } -void SQ_DirOperator::activatedMenu(const KFileItem *, const QPoint &pos) +void SQ_DirOperator::activatedMenu(const KFileItem *, const TQPoint &pos) { // remove "View" submenu, since we will insert our's one. setupMenu(KDirOperator::AllActions ^ KDirOperator::ViewActions); @@ -1014,13 +1014,13 @@ void SQ_DirOperator::calcTotalSize() void SQ_DirOperator::saveConfig() { - QDir::SortSpec sort = sorting(); + TQDir::SortSpec sort = sorting(); SQ_Config::instance()->writeEntry("sorting_name", KFile::isSortByName(sort)); SQ_Config::instance()->writeEntry("sorting_time", KFile::isSortByDate(sort)); SQ_Config::instance()->writeEntry("sorting_size", KFile::isSortBySize(sort)); SQ_Config::instance()->writeEntry("sorting_dirs", KFile::isSortDirsFirst(sort)); - SQ_Config::instance()->writeEntry("sorting_reverse", (sort & QDir::Reversed) == QDir::Reversed); + SQ_Config::instance()->writeEntry("sorting_reverse", (sort & TQDir::Reversed) == TQDir::Reversed); SQ_Config::instance()->writeEntry("sorting_ignore", KFile::isSortCaseInsensitive(sort)); SQ_Config::instance()->writeEntry("show hidden", showHiddenFiles()); diff --git a/ksquirrel/sq_diroperator.h b/ksquirrel/sq_diroperator.h index e466caa..fa607e2 100644 --- a/ksquirrel/sq_diroperator.h +++ b/ksquirrel/sq_diroperator.h @@ -18,13 +18,13 @@ #ifndef SQ_DIROPERATOR_H #define SQ_DIROPERATOR_H -#include <qmap.h> +#include <tqmap.h> #include <kdiroperator.h> -class QTimer; -class QListViewItem; -class QIconViewItem; +class TQTimer; +class TQListViewItem; +class TQIconViewItem; class KDirLister; class KFileIconView; @@ -35,6 +35,7 @@ class SQ_Downloader; class SQ_DirOperator : public KDirOperator { Q_OBJECT + TQ_OBJECT public: /* @@ -53,7 +54,7 @@ class SQ_DirOperator : public KDirOperator * View type is determined by 'type_'. */ SQ_DirOperator(const KURL &url = KURL(), ViewT type_ = SQ_DirOperator::TypeList, - QWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); ~SQ_DirOperator(); @@ -108,7 +109,7 @@ class SQ_DirOperator : public KDirOperator void stopPreview(); - void setPendingFile(const QString &p); + void setPendingFile(const TQString &p); void execute(KFileItem *item); @@ -120,7 +121,7 @@ class SQ_DirOperator : public KDirOperator /* * Reimplement createView() to create custom views. */ - virtual KFileView* createView(QWidget *parent, KFile::FileView view); + virtual KFileView* createView(TQWidget *tqparent, KFile::FileView view); private: void itemKill(KFileItem *); @@ -161,7 +162,7 @@ class SQ_DirOperator : public KDirOperator /* * Change thumbnail size. */ - void slotSetThumbSize(const QString&); + void slotSetThumbSize(const TQString&); private slots: @@ -177,7 +178,7 @@ class SQ_DirOperator : public KDirOperator * Since KDE 3.4 (or 3.5 ?) it is neccessary to reimplement this slot * to insert our own actions in context menu. */ - void activatedMenu(const KFileItem *, const QPoint &pos); + void activatedMenu(const KFileItem *, const TQPoint &pos); void slotDownloaderResult(const KURL &); @@ -194,7 +195,7 @@ class SQ_DirOperator : public KDirOperator void slotFoundMountPoint(const unsigned long&, const unsigned long&, const unsigned long&, - const QString&); + const TQString&); /* * Edit current item's mimetype (Konqueror-related action). @@ -203,7 +204,7 @@ class SQ_DirOperator : public KDirOperator void slotPreview(); - void slotDropped(const KFileItem *, QDropEvent*, const KURL::List&); + void slotDropped(const KFileItem *, TQDropEvent*, const KURL::List&); void slotAddToBasket(); void slotAddToDirectoryBasket(); @@ -228,11 +229,11 @@ class SQ_DirOperator : public KDirOperator void slotSelectionChanged(); - void slotCurrentChanged(QListViewItem *); - void slotCurrentChanged(QIconViewItem *); + void slotCurrentChanged(TQListViewItem *); + void slotCurrentChanged(TQIconViewItem *); private: - typedef QMap<KURL, KDirLister *> SQ_Listers; + typedef TQMap<KURL, KDirLister *> SQ_Listers; SQ_Listers listers; /* @@ -248,10 +249,10 @@ class SQ_DirOperator : public KDirOperator KToggleAction *actionHidden; ViewT type; - QTimer *timer_preview; + TQTimer *timer_preview; KURL lasturl; bool usenew; - QString m_pending; + TQString m_pending; KIO::filesize_t totalSize; KFileItemList oldSelected; KFileItem *oldCurrentItem; @@ -277,13 +278,13 @@ KFileView* SQ_DirOperator::preparedView() } inline -KFileView* SQ_DirOperator::createView(QWidget *, KFile::FileView) +KFileView* SQ_DirOperator::createView(TQWidget *, KFile::FileView) { return fileview; } inline -void SQ_DirOperator::setPendingFile(const QString &p) +void SQ_DirOperator::setPendingFile(const TQString &p) { m_pending = p; } diff --git a/ksquirrel/sq_dirthumbs.cpp b/ksquirrel/sq_dirthumbs.cpp index ddeed59..87c8b4c 100644 --- a/ksquirrel/sq_dirthumbs.cpp +++ b/ksquirrel/sq_dirthumbs.cpp @@ -24,9 +24,9 @@ #include <utime.h> #endif -#include <qimage.h> -#include <qfileinfo.h> -#include <qdatetime.h> +#include <tqimage.h> +#include <tqfileinfo.h> +#include <tqdatetime.h> #include <kurl.h> #include <kmdcodec.h> @@ -47,15 +47,15 @@ SQ_DirThumbs::~SQ_DirThumbs() */ void SQ_DirThumbs::saveThumbnail(const KURL &url, SQ_Thumbnail &thumb) { - QString ab = absPath(url); + TQString ab = absPath(url); if(!thumb.thumbnail.isNull() && needUpdate(ab, thumb.originalTime)) { // thumbnail standard tags - thumb.thumbnail.setText("Thumb::Image::Width", 0, QString::number(thumb.w)); - thumb.thumbnail.setText("Thumb::Image::Height", 0, QString::number(thumb.h)); + thumb.thumbnail.setText("Thumb::Image::Width", 0, TQString::number(thumb.w)); + thumb.thumbnail.setText("Thumb::Image::Height", 0, TQString::number(thumb.h)); thumb.thumbnail.setText("Thumb::URI", 0, url.prettyURL()); - thumb.thumbnail.setText("Thumb::MTime", 0, QString::number(thumb.originalTime)); + thumb.thumbnail.setText("Thumb::MTime", 0, TQString::number(thumb.originalTime)); thumb.thumbnail.setText("Software", 0, "KSquirrel"); thumb.thumbnail.save(ab, sqdirThumbFormat, sqdirThumbQuality); @@ -69,35 +69,35 @@ void SQ_DirThumbs::saveThumbnail(const KURL &url, SQ_Thumbnail &thumb) } } -QString SQ_DirThumbs::absPath(const KURL &relurl) +TQString SQ_DirThumbs::absPath(const KURL &relurl) { - KMD5 md5(QFile::encodeName(relurl.prettyURL())); + KMD5 md5(TQString(TQFile::encodeName(relurl.prettyURL()))); - QString ext = QString::fromLatin1(".%1").arg(sqdirThumbFormat); + TQString ext = TQString::tqfromLatin1(".%1").tqarg(sqdirThumbFormat); - return m_orig + QDir::separator() + QString(md5.hexDigest()) + ext.lower(); + return m_orig + TQDir::separator() + TQString(md5.hexDigest()) + ext.lower(); } void SQ_DirThumbs::setRoot() { - m_orig = QDir::cleanDirPath(homeDirPath() + QDir::separator() + QString::fromLatin1(".thumbnails")); - QDir::mkdir(m_orig); + m_orig = TQDir::cleanDirPath(homeDirPath() + TQDir::separator() + TQString::tqfromLatin1(".thumbnails")); + TQDir::mkdir(m_orig); - m_orig = QDir::cleanDirPath(m_orig + QDir::separator() + QString::fromLatin1("normal")); - QDir::mkdir(m_orig); + m_orig = TQDir::cleanDirPath(m_orig + TQDir::separator() + TQString::tqfromLatin1("normal")); + TQDir::mkdir(m_orig); } void SQ_DirThumbs::removeFile(const KURL &url) { // determine absolute path and remove file - QFile::remove(absPath(url)); + TQFile::remove(absPath(url)); } -bool SQ_DirThumbs::needUpdate(const QString &turl, time_t tm) +bool SQ_DirThumbs::needUpdate(const TQString &turl, time_t tm) { - QFileInfo fthumbpath(turl); + TQFileInfo fthumbpath(turl); - QDateTime dt_orig; + TQDateTime dt_orig; dt_orig.setTime_t(tm); return (dt_orig > fthumbpath.lastModified()); diff --git a/ksquirrel/sq_dirthumbs.h b/ksquirrel/sq_dirthumbs.h index 3967310..e59063f 100644 --- a/ksquirrel/sq_dirthumbs.h +++ b/ksquirrel/sq_dirthumbs.h @@ -28,7 +28,7 @@ class SQ_DirThumbs : public SQ_Dir SQ_DirThumbs(); ~SQ_DirThumbs(); - virtual QString absPath(const KURL &relurl); + virtual TQString absPath(const KURL &relurl); /* * Save thumbnail to storage. @@ -44,9 +44,9 @@ class SQ_DirThumbs : public SQ_Dir * Compare 'last modified' time of 'url' * and thumbnail time. */ - bool needUpdate(const QString &turl, time_t tm); + bool needUpdate(const TQString &turl, time_t tm); - virtual QString root() const; + virtual TQString root() const; private: /* @@ -58,11 +58,11 @@ class SQ_DirThumbs : public SQ_Dir /* * m_orig to save thumbnails */ - QString m_orig; + TQString m_orig; }; inline -QString SQ_DirThumbs::root() const +TQString SQ_DirThumbs::root() const { return m_orig; } diff --git a/ksquirrel/sq_downloader.cpp b/ksquirrel/sq_downloader.cpp index 290a1d8..07759dc 100644 --- a/ksquirrel/sq_downloader.cpp +++ b/ksquirrel/sq_downloader.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qfile.h> +#include <tqfile.h> #include <kio/job.h> #include <kfileitem.h> @@ -30,7 +30,7 @@ #define SQ_PREDOWNLOAD_SIZE 50 -SQ_Downloader::SQ_Downloader(QObject *parent, const char *name) : QObject(parent, name), job(0), m_error(false) +SQ_Downloader::SQ_Downloader(TQObject *tqparent, const char *name) : TQObject(tqparent, name), job(0), m_error(false) { tmp = new KTempFile; tmp->setAutoDelete(true); @@ -50,7 +50,7 @@ void SQ_Downloader::start(KFileItem *fi) mURL = fi->url(); emitPercents = false; - startTime = QTime::currentTime(); + startTime = TQTime::currentTime(); size = 0; totalSize = fi->size(); @@ -66,15 +66,15 @@ void SQ_Downloader::start(KFileItem *fi) continueDownload = false; - connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)), this, SLOT(slotData(KIO::Job *, const QByteArray &))); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotDataResult(KIO::Job *))); + connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotDataResult(KIO::Job *))); } -void SQ_Downloader::slotData(KIO::Job *job, const QByteArray &ba) +void SQ_Downloader::slotData(KIO::Job *job, const TQByteArray &ba) { size += ba.size(); - QFile f(tmp->name()); + TQFile f(tmp->name()); if(f.open(IO_WriteOnly | IO_Append)) { @@ -82,7 +82,7 @@ void SQ_Downloader::slotData(KIO::Job *job, const QByteArray &ba) f.close(); } - if(emitPercents || startTime.msecsTo(QTime::currentTime()) > 1000) + if(emitPercents || startTime.msecsTo(TQTime::currentTime()) > 1000) { emit percents(size); emitPercents = true; @@ -129,7 +129,7 @@ void SQ_Downloader::slotDataResult(KIO::Job *cpjob) void SQ_Downloader::clean() { - QFile f(tmp->name()); + TQFile f(tmp->name()); if(f.open(IO_WriteOnly)) f.close(); diff --git a/ksquirrel/sq_downloader.h b/ksquirrel/sq_downloader.h index a51649f..949af80 100644 --- a/ksquirrel/sq_downloader.h +++ b/ksquirrel/sq_downloader.h @@ -18,8 +18,8 @@ #ifndef SQ_DOWNLOADER_H #define SQ_DOWNLOADER_H -#include <qobject.h> -#include <qdatetime.h> +#include <tqobject.h> +#include <tqdatetime.h> #include <kurl.h> @@ -28,12 +28,13 @@ class KTempFile; namespace KIO { class Job; } -class SQ_Downloader : public QObject +class SQ_Downloader : public TQObject { Q_OBJECT + TQ_OBJECT public: - SQ_Downloader(QObject *parent = 0, const char *name = 0); + SQ_Downloader(TQObject *tqparent = 0, const char *name = 0); ~SQ_Downloader(); void start(KFileItem *fi); @@ -49,7 +50,7 @@ class SQ_Downloader : public QObject void percents(int); private slots: - void slotData(KIO::Job *job, const QByteArray &data); + void slotData(KIO::Job *job, const TQByteArray &data); void slotDataResult(KIO::Job *); private: @@ -60,7 +61,7 @@ class SQ_Downloader : public QObject bool continueDownload; bool nomime; bool m_error, m_lightmode; - QTime startTime; + TQTime startTime; bool emitPercents; }; diff --git a/ksquirrel/sq_dragprovider.cpp b/ksquirrel/sq_dragprovider.cpp index 84ed1e2..69ae6b3 100644 --- a/ksquirrel/sq_dragprovider.cpp +++ b/ksquirrel/sq_dragprovider.cpp @@ -15,14 +15,14 @@ * * ***************************************************************************/ -#include <qwidget.h> -#include <qdragobject.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qfontmetrics.h> -#include <qtooltip.h> -#include <qvaluevector.h> -#include <qsize.h> +#include <tqwidget.h> +#include <tqdragobject.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqfontmetrics.h> +#include <tqtooltip.h> +#include <tqvaluevector.h> +#include <tqsize.h> #include <kstringhandler.h> #include <kurldrag.h> @@ -40,7 +40,7 @@ SQ_DragProvider * SQ_DragProvider::m_inst = 0; -SQ_DragProvider::SQ_DragProvider(QObject *parent) : QObject(parent), source(0) +SQ_DragProvider::SQ_DragProvider(TQObject *tqparent) : TQObject(tqparent), source(0) { m_inst = this; } @@ -48,7 +48,7 @@ SQ_DragProvider::SQ_DragProvider(QObject *parent) : QObject(parent), source(0) SQ_DragProvider::~SQ_DragProvider() {} -void SQ_DragProvider::setParams(QWidget *_source, const KFileItemList &_files, SourceType tp) +void SQ_DragProvider::setParams(TQWidget *_source, const KFileItemList &_files, SourceType tp) { source = _source; files = _files; @@ -68,11 +68,11 @@ void SQ_DragProvider::start() KURL::List urls; KFileItem *fi; SQ_FileThumbViewItem *kfi; - QStringList names; + TQStringList names; int capas = type == Thumbnails ? 2 : 10; // 2 thumbnails or 10 file names int _capas = capas; - QValueVector<QPixmap> pixmaps; - QPixmap *pix; + TQValueVector<TQPixmap> pixmaps; + TQPixmap *pix; int pixw = 0, pixh = 0; const int margin = 2; @@ -101,8 +101,8 @@ void SQ_DragProvider::start() if(pixw > SQ_THUMB_SIZE) { - QSize sz(pixw, pixh); - sz.scale(SQ_THUMB_SIZE, SQ_THUMB_SIZE, QSize::ScaleMin); + TQSize sz(pixw, pixh); + sz.tqscale(SQ_THUMB_SIZE, SQ_THUMB_SIZE, TQSize::ScaleMin); pixw = sz.width(); pixh = sz.height(); } @@ -118,30 +118,30 @@ void SQ_DragProvider::start() ++it; } - QDragObject *drag = new KURLDrag(urls, source); - QPixmap dragIcon; + TQDragObject *drag = new KURLDrag(urls, source); + TQPixmap dragIcon; if(urls.count() > 1) dragIcon = SQ_IconLoader::instance()->loadIcon("kmultiple", KIcon::Desktop, KIcon::SizeSmall); else dragIcon = first->pixmap(KIcon::SizeSmall); - const int flags = Qt::AlignAuto|Qt::AlignVCenter|Qt::ShowPrefix; - QPixmap dragPixmap; - QString text; + const int flags = TQt::AlignAuto|TQt::AlignVCenter|TQt::ShowPrefix; + TQPixmap dragPixmap; + TQString text; // construct text if(type == Icons) { - QStringList::iterator sEnd = names.end(); - for(QStringList::iterator sit = names.begin();sit != sEnd;++sit) + TQStringList::iterator sEnd = names.end(); + for(TQStringList::iterator sit = names.begin();sit != sEnd;++sit) text = text + *sit + '\n'; } - text += QString::fromLatin1("%1 %2").arg(i18n("Total")).arg(i18n("1 file", "%n files", count)); + text += TQString::tqfromLatin1("%1 %2").tqarg(i18n("Total")).tqarg(i18n("1 file", "%n files", count)); - QFontMetrics ms(source->font()); - QRect r = ms.boundingRect(0, 0, 1, 1, flags, text); + TQFontMetrics ms(source->font()); + TQRect r = ms.boundingRect(0, 0, 1, 1, flags, text); // resize pixmap if(type == Icons) @@ -149,13 +149,13 @@ void SQ_DragProvider::start() else dragPixmap.resize(std::max(r.width(), pixw)+margin*2, r.height()+margin+(pixh+margin)*pixmaps.count()); - QPalette pal = QToolTip::palette(); - QPainter p; + TQPalette pal = TQToolTip::palette(); + TQPainter p; p.begin(&dragPixmap); // draw frame - p.setPen(QPen(pal.color(QPalette::Active, QColorGroup::Text))); - p.setBrush(QBrush(pal.color(QPalette::Active, QColorGroup::Background))); + p.setPen(TQPen(pal.color(TQPalette::Active, TQColorGroup::Text))); + p.setBrush(TQBrush(pal.color(TQPalette::Active, TQColorGroup::Background))); p.drawRect(dragPixmap.rect()); // draw file names @@ -164,11 +164,11 @@ void SQ_DragProvider::start() else // or thumbnails { int y = margin; - QValueVector<QPixmap>::iterator itEnd = pixmaps.end(); + TQValueVector<TQPixmap>::iterator itEnd = pixmaps.end(); - for(QValueVector<QPixmap>::iterator it = pixmaps.begin();it != itEnd;++it) + for(TQValueVector<TQPixmap>::iterator it = pixmaps.begin();it != itEnd;++it) { - p.drawPixmap(QRect((dragPixmap.width()-pixw)/2, y, pixw, pixh), *it); + p.drawPixmap(TQRect((dragPixmap.width()-pixw)/2, y, pixw, pixh), *it); y = y + pixh + margin; } @@ -178,6 +178,6 @@ void SQ_DragProvider::start() p.end(); // finally, setup drag object - drag->setPixmap(dragPixmap, QPoint(16, -16)); + drag->setPixmap(dragPixmap, TQPoint(16, -16)); drag->dragCopy(); } diff --git a/ksquirrel/sq_dragprovider.h b/ksquirrel/sq_dragprovider.h index 425e967..e8c5d17 100644 --- a/ksquirrel/sq_dragprovider.h +++ b/ksquirrel/sq_dragprovider.h @@ -18,11 +18,11 @@ #ifndef SQ_DRAGPROVIDER_H #define SQ_DRAGPROVIDER_H -#include <qobject.h> +#include <tqobject.h> #include <kfileitem.h> -class QWidget; +class TQWidget; /* * Class for making drag operations easier. @@ -31,18 +31,18 @@ class QWidget; * this class in startDrag() method. */ -class SQ_DragProvider : public QObject +class SQ_DragProvider : public TQObject { public: enum SourceType { Icons, Thumbnails }; - SQ_DragProvider(QObject *parent); + SQ_DragProvider(TQObject *tqparent); ~SQ_DragProvider(); /* * Set drag source (fileview), file list and fileview type. */ - void setParams(QWidget *_source, const KFileItemList &_files, SourceType tp); + void setParams(TQWidget *_source, const KFileItemList &_files, SourceType tp); /* * Start drag operation. @@ -52,7 +52,7 @@ class SQ_DragProvider : public QObject static SQ_DragProvider* instance() { return m_inst; } private: - QWidget *source; + TQWidget *source; KFileItemList files; SourceType type; diff --git a/ksquirrel/sq_errorstring.cpp b/ksquirrel/sq_errorstring.cpp index daa6b20..dcbdb90 100644 --- a/ksquirrel/sq_errorstring.cpp +++ b/ksquirrel/sq_errorstring.cpp @@ -25,12 +25,12 @@ SQ_ErrorString * SQ_ErrorString::m_instance = 0; -SQ_ErrorString::SQ_ErrorString(QObject *parent) : QObject(parent) +SQ_ErrorString::SQ_ErrorString(TQObject *tqparent) : TQObject(tqparent) { m_instance = this; // fill map with translated messages - messages.insert(SQE_OK, QString::fromLatin1("OK")); + messages.insert(SQE_OK, TQString::tqfromLatin1("OK")); messages.insert(SQE_R_NOFILE, i18n("cannot open file for reading")); messages.insert(SQE_R_BADFILE, i18n("file corrupted")); messages.insert(SQE_R_NOMEMORY, i18n("no memory")); @@ -47,12 +47,12 @@ SQ_ErrorString::~SQ_ErrorString() {} // Get string by error code. -QString SQ_ErrorString::string(const int code) +TQString SQ_ErrorString::string(const int code) { return messages[code]; } -QString SQ_ErrorString::stringSN(const int code) +TQString SQ_ErrorString::stringSN(const int code) { return messages[code] + '\n'; } diff --git a/ksquirrel/sq_errorstring.h b/ksquirrel/sq_errorstring.h index b1c4838..469fe47 100644 --- a/ksquirrel/sq_errorstring.h +++ b/ksquirrel/sq_errorstring.h @@ -18,8 +18,8 @@ #ifndef SQ_ERRORSTRING_H #define SQ_ERRORSTRING_H -#include <qmap.h> -#include <qobject.h> +#include <tqmap.h> +#include <tqobject.h> #include <klocale.h> @@ -30,26 +30,26 @@ * error code. */ -class SQ_ErrorString : public QObject +class SQ_ErrorString : public TQObject { public: - SQ_ErrorString(QObject *parent = 0); + SQ_ErrorString(TQObject *tqparent = 0); ~SQ_ErrorString(); /* * Get string representation of error. */ - QString string(const int code); + TQString string(const int code); /* * string() + "\n" */ - QString stringSN(const int code); + TQString stringSN(const int code); static SQ_ErrorString* instance() { return m_instance; } private: - QMap<int, QString> messages; + TQMap<int, TQString> messages; static SQ_ErrorString *m_instance; }; diff --git a/ksquirrel/sq_externaltool.cpp b/ksquirrel/sq_externaltool.cpp index aa349ed..aa93578 100644 --- a/ksquirrel/sq_externaltool.cpp +++ b/ksquirrel/sq_externaltool.cpp @@ -19,7 +19,7 @@ #include "config.h" #endif -#include <qfile.h> +#include <tqfile.h> #include <kstringhandler.h> #include <klocale.h> @@ -38,30 +38,30 @@ SQ_ExternalTool * SQ_ExternalTool::m_instance = 0; Tool::Tool() {} -Tool::Tool(const QString &pix, const QString &nam, const QString &com) +Tool::Tool(const TQString &pix, const TQString &nam, const TQString &com) { icon = pix; name = nam; command = com; } -SQ_ExternalTool::SQ_ExternalTool(QObject *parent) : QObject(parent), QValueVector<Tool>() +SQ_ExternalTool::SQ_ExternalTool(TQObject *tqparent) : TQObject(tqparent), TQValueVector<Tool>() { m_instance = this; menu = new SQ_PopupMenu(0, "External tools"); - connect(menu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowMenu())); - connect(menu, SIGNAL(activated(int)), this, SLOT(slotActivateTool(int))); + connect(menu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShowMenu())); + connect(menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivateTool(int))); - QString str, tmp; + TQString str, tmp; SQ_Config::instance()->setGroup("External tools"); - QStringList names = SQ_Config::instance()->readListEntry("names"); - QStringList commands = SQ_Config::instance()->readListEntry("commands"); - QStringList icons = SQ_Config::instance()->readListEntry("icons"); + TQStringList names = SQ_Config::instance()->readListEntry("names"); + TQStringList commands = SQ_Config::instance()->readListEntry("commands"); + TQStringList icons = SQ_Config::instance()->readListEntry("icons"); - for(QStringList::iterator it_n = names.begin(),it_c = commands.begin(),it_i = icons.begin(); + for(TQStringList::iterator it_n = names.begin(),it_c = commands.begin(),it_i = icons.begin(); it_n != names.end() || it_c != commands.end() || it_i != icons.end(); ++it_n, ++it_c, ++it_i) { @@ -74,17 +74,17 @@ SQ_ExternalTool::~SQ_ExternalTool() delete menu; } -QString SQ_ExternalTool::toolPixmap(const int i) +TQString SQ_ExternalTool::toolPixmap(const int i) { return (*this)[i].icon; } -QString SQ_ExternalTool::toolName(const int i) +TQString SQ_ExternalTool::toolName(const int i) { return (*this)[i].name; } -QString SQ_ExternalTool::toolCommand(const int i) +TQString SQ_ExternalTool::toolCommand(const int i) { return (*this)[i].command; } @@ -127,15 +127,15 @@ void SQ_ExternalTool::writeEntries() // no tools ? if(!count()) return; - QString num; + TQString num; // delete old group with old items SQ_Config::instance()->deleteGroup("External tools"); SQ_Config::instance()->setGroup("External tools"); - QStringList names, icons, commands; + TQStringList names, icons, commands; // write items in config file - for(QValueVector<Tool>::iterator it = begin();it != end();++it) + for(TQValueVector<Tool>::iterator it = begin();it != end();++it) { names.append((*it).name); icons.append((*it).icon); @@ -168,10 +168,10 @@ void SQ_ExternalTool::slotAboutToShowMenu() } // make title shorter - QString file = KStringHandler::rsqueeze(item->name(), 30); + TQString file = KStringHandler::rsqueeze(item->name(), 30); // finally, change title - QString final = (items.count() == 1 || items.count() == 0) ? file : (file + QString::fromLatin1(" (+%1)").arg(items.count()-1)); + TQString final = (items.count() == 1 || items.count() == 0) ? file : (file + TQString::tqfromLatin1(" (+%1)").tqarg(items.count()-1)); menu->changeTitle(final); } @@ -199,10 +199,10 @@ void SQ_ExternalTool::slotActivateTool(int id) // get appropriate tool Tool *tool = &at(index); - QString comm = tool->command; + TQString comm = tool->command; - int per_f = comm.contains("%f"); - int per_F = comm.contains("%F"); + int per_f = comm.tqcontains("%f"); + int per_F = comm.tqcontains("%F"); // %f = single file // %F = multiple files @@ -219,12 +219,12 @@ void SQ_ExternalTool::slotActivateTool(int id) else if(per_f) { KURL u = list.first(); - comm.replace("%f", KShellProcess::quote(u.isLocalFile() ? u.path() : u.prettyURL())); + comm.tqreplace("%f", KShellProcess::quote(u.isLocalFile() ? u.path() : u.prettyURL())); proc << comm; } else { - QString files; + TQString files; KURL::List::iterator itEnd = list.end(); @@ -234,7 +234,7 @@ void SQ_ExternalTool::slotActivateTool(int id) files.append(" "); } - comm.replace("%F", files); + comm.tqreplace("%F", files); proc << comm; } diff --git a/ksquirrel/sq_externaltool.h b/ksquirrel/sq_externaltool.h index 3b1bc0a..a2c0e8a 100644 --- a/ksquirrel/sq_externaltool.h +++ b/ksquirrel/sq_externaltool.h @@ -18,9 +18,9 @@ #ifndef SQ_EXTERNALTOOL_H #define SQ_EXTERNALTOOL_H -#include <qstring.h> -#include <qobject.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqvaluevector.h> #include <kfileitem.h> @@ -29,10 +29,10 @@ class SQ_PopupMenu; struct Tool { Tool(); - Tool(const QString &, const QString &, const QString &); + Tool(const TQString &, const TQString &, const TQString &); - QString name, command; - QString icon; + TQString name, command; + TQString icon; }; /* @@ -40,20 +40,21 @@ struct Tool * in memory, and create popup menu where external tools been inserted. */ -class SQ_ExternalTool : public QObject, public QValueVector<Tool> +class SQ_ExternalTool : public TQObject, public TQValueVector<Tool> { Q_OBJECT + TQ_OBJECT public: - SQ_ExternalTool(QObject *parent = 0); + SQ_ExternalTool(TQObject *tqparent = 0); ~SQ_ExternalTool(); /* * Get pixmap, name or command of external tool. */ - QString toolPixmap(const int i); - QString toolName(const int i); - QString toolCommand(const int i); + TQString toolPixmap(const int i); + TQString toolName(const int i); + TQString toolCommand(const int i); void setItems(const KFileItemList &); @@ -68,7 +69,7 @@ class SQ_ExternalTool : public QObject, public QValueVector<Tool> SQ_PopupMenu* constPopupMenu() const; /* - * Write tools to config file as QStringLists + * Write tools to config file as TQStringLists */ void writeEntries(); diff --git a/ksquirrel/sq_externaltools.ui b/ksquirrel/sq_externaltools.ui index 66881b9..92960ba 100644 --- a/ksquirrel/sq_externaltools.ui +++ b/ksquirrel/sq_externaltools.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ExternalTools</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ExternalTools</cstring> </property> @@ -32,14 +32,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>65</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton" row="3" column="2" rowspan="1" colspan="2"> + <widget class="TQPushButton" row="3" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -55,7 +55,7 @@ <string>Cancel</string> </property> </widget> - <widget class="QPushButton" row="3" column="1"> + <widget class="TQPushButton" row="3" column="1"> <property name="name"> <cstring>pushOK</cstring> </property> @@ -88,7 +88,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QListView" row="0" column="0" rowspan="2" colspan="3"> + <widget class="TQListView" row="0" column="0" rowspan="2" colspan="3"> <column> <property name="text"> <string>Pixmap</string> @@ -162,22 +162,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>130</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="0" column="3"> + <widget class="TQLayoutWidget" row="0" column="3"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -191,7 +191,7 @@ <property name="margin"> <number>5</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushNew</cstring> </property> @@ -205,7 +205,7 @@ <string>New tool</string> </property> </widget> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>pushDelete</cstring> </property> @@ -222,7 +222,7 @@ <string>Delete</string> </property> </widget> - <widget class="QPushButton" row="2" column="0"> + <widget class="TQPushButton" row="2" column="0"> <property name="name"> <cstring>pushClearAll</cstring> </property> @@ -238,7 +238,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -252,7 +252,7 @@ <property name="margin"> <number>5</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushToolUp</cstring> </property> @@ -267,7 +267,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> @@ -286,7 +286,7 @@ <string>Move tool up</string> </property> </widget> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>pushToolDown</cstring> </property> @@ -301,7 +301,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> @@ -322,7 +322,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3_2</cstring> </property> @@ -336,7 +336,7 @@ <property name="margin"> <number>5</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushHelp</cstring> </property> @@ -351,7 +351,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> @@ -385,9 +385,9 @@ </connection> <connection> <sender>listTools</sender> - <signal>rightButtonClicked(QListViewItem*,const QPoint&,int)</signal> + <signal>rightButtonClicked(TQListViewItem*,const TQPoint&,int)</signal> <receiver>SQ_ExternalTools</receiver> - <slot>slotToolRenameRequest(QListViewItem*,const QPoint&,int)</slot> + <slot>slotToolRenameRequest(TQListViewItem*,const TQPoint&,int)</slot> </connection> <connection> <sender>pushToolUp</sender> @@ -442,22 +442,22 @@ <include location="local" impldecl="in implementation">sq_config.h</include> <include location="global" impldecl="in implementation">kicondialog.h</include> <include location="local" impldecl="in implementation">sq_iconloader.h</include> - <include location="global" impldecl="in implementation">qwhatsthis.h</include> + <include location="global" impldecl="in implementation">tqwhatsthis.h</include> <include location="global" impldecl="in implementation">kglobal.h</include> <include location="global" impldecl="in implementation">kiconloader.h</include> <include location="local" impldecl="in implementation">sq_externaltools.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>slotNewTool()</slot> <slot>slotToolClear()</slot> <slot>slotToolUp()</slot> <slot>slotToolDown()</slot> <slot returnType="int">start()</slot> - <slot>slotToolRenameRequest( QListViewItem * item, const QPoint &, int pos )</slot> + <slot>slotToolRenameRequest( TQListViewItem * item, const TQPoint &, int pos )</slot> <slot>slotHelp()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_externaltools.ui.h b/ksquirrel/sq_externaltools.ui.h index b20a875..f2af6bc 100644 --- a/ksquirrel/sq_externaltools.ui.h +++ b/ksquirrel/sq_externaltools.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -11,14 +11,14 @@ void SQ_ExternalTools::init() { listTools->setSorting(-1); - QListViewItem *itemafter = 0L, *item; + TQListViewItem *itemafter = 0L, *item; - for(QValueVector<Tool>::iterator it = SQ_ExternalTool::instance()->begin();it != SQ_ExternalTool::instance()->end();++it) + for(TQValueVector<Tool>::iterator it = SQ_ExternalTool::instance()->begin();it != SQ_ExternalTool::instance()->end();++it) { if(itemafter) - item = new QListViewItem(listTools, itemafter, QString::null, (*it).name, (*it).command, (*it).icon); + item = new TQListViewItem(listTools, itemafter, TQString(), (*it).name, (*it).command, (*it).icon); else - item = new QListViewItem(listTools, QString::null, (*it).name, (*it).command, (*it).icon); + item = new TQListViewItem(listTools, TQString(), (*it).name, (*it).command, (*it).icon); item->setPixmap(0, SQ_IconLoader::instance()->loadIcon(item->text(3), KIcon::Desktop, 16)); itemafter = item; @@ -44,12 +44,12 @@ void SQ_ExternalTools::init() void SQ_ExternalTools::slotNewTool() { - QListViewItem *itemafter = listTools->lastItem(), *item; + TQListViewItem *itemafter = listTools->lastItem(), *item; if(itemafter) - item = new QListViewItem(listTools, itemafter, "", "Tool name", "tool_executable %f", ""); + item = new TQListViewItem(listTools, itemafter, "", "Tool name", "tool_executable %f", ""); else - item = new QListViewItem(listTools, "", "Tool name", "tool_executable %f", ""); + item = new TQListViewItem(listTools, "", "Tool name", "tool_executable %f", ""); item->setRenameEnabled(1, true); item->setRenameEnabled(2, true); @@ -60,7 +60,7 @@ void SQ_ExternalTools::slotNewTool() void SQ_ExternalTools::slotToolClear() { - QListViewItem *item = listTools->currentItem(); + TQListViewItem *item = listTools->currentItem(); if(!item) return; @@ -74,11 +74,11 @@ void SQ_ExternalTools::slotToolClear() void SQ_ExternalTools::slotToolUp() { - QListViewItem *item = listTools->currentItem(); + TQListViewItem *item = listTools->currentItem(); if(!item) return; - QListViewItem *itemafter = item->itemAbove(); + TQListViewItem *itemafter = item->itemAbove(); if(!itemafter) return; @@ -87,11 +87,11 @@ void SQ_ExternalTools::slotToolUp() void SQ_ExternalTools::slotToolDown() { - QListViewItem *item = listTools->currentItem(); + TQListViewItem *item = listTools->currentItem(); if(!item) return; - QListViewItem *itemafter = item->itemBelow(); + TQListViewItem *itemafter = item->itemBelow(); if(!itemafter) return; @@ -103,9 +103,9 @@ int SQ_ExternalTools::start() { int result = exec(); - if(result == QDialog::Accepted) + if(result == TQDialog::Accepted) { - QListViewItem *cur = listTools->firstChild(); + TQListViewItem *cur = listTools->firstChild(); SQ_ExternalTool::instance()->clear(); @@ -118,7 +118,7 @@ int SQ_ExternalTools::start() return result; } -void SQ_ExternalTools::slotToolRenameRequest( QListViewItem *item, const QPoint &, int pos ) +void SQ_ExternalTools::slotToolRenameRequest( TQListViewItem *item, const TQPoint &, int pos ) { if(!item || pos == -1) return; @@ -129,7 +129,7 @@ void SQ_ExternalTools::slotToolRenameRequest( QListViewItem *item, const QPoint { KIconDialog dialog(KGlobal::iconLoader()); dialog.setup(KIcon::Desktop, KIcon::Application, true, 16); - QString result = dialog.openDialog(); + TQString result = dialog.openDialog(); if(!result.isEmpty()) { @@ -141,5 +141,5 @@ void SQ_ExternalTools::slotToolRenameRequest( QListViewItem *item, const QPoint void SQ_ExternalTools::slotHelp() { - QWhatsThis::display(tr2i18n("<b>Command</b> can contain <ul><li>%f: one file<li>%F: multiple files</ul>")); + TQWhatsThis::display(tr2i18n("<b>Command</b> can contain <ul><li>%f: one file<li>%F: multiple files</ul>")); } diff --git a/ksquirrel/sq_filedetailview.cpp b/ksquirrel/sq_filedetailview.cpp index 37644bb..f1dfc58 100644 --- a/ksquirrel/sq_filedetailview.cpp +++ b/ksquirrel/sq_filedetailview.cpp @@ -19,8 +19,8 @@ #include "config.h" #endif -#include <qheader.h> -#include <qcursor.h> +#include <tqheader.h> +#include <tqcursor.h> #include <kpopupmenu.h> #include <kfileitem.h> @@ -35,18 +35,18 @@ #include "sq_diroperator.h" #include "sq_dragprovider.h" -SQ_FileListViewItem::SQ_FileListViewItem(QListView *parent, KFileItem *fi) : KFileListViewItem(parent, fi) +SQ_FileListViewItem::SQ_FileListViewItem(TQListView *tqparent, KFileItem *fi) : KFileListViewItem(tqparent, fi) {} -SQ_FileListViewItem::SQ_FileListViewItem(QListView *parent, const QString &text, const QPixmap &icon, KFileItem *fi) - : KFileListViewItem(parent, text, icon, fi) +SQ_FileListViewItem::SQ_FileListViewItem(TQListView *tqparent, const TQString &text, const TQPixmap &icon, KFileItem *fi) + : KFileListViewItem(tqparent, text, icon, fi) {} SQ_FileListViewItem::~SQ_FileListViewItem() {} -SQ_FileDetailView::SQ_FileDetailView(QWidget* parent, const char* name) - : KFileDetailView(parent, name) +SQ_FileDetailView::SQ_FileDetailView(TQWidget* tqparent, const char* name) + : KFileDetailView(tqparent, name) { // pixmap for directory item dirPix = SQ_IconLoader::instance()->loadIcon("folder", KIcon::Desktop, KIcon::SizeSmall); @@ -54,10 +54,10 @@ SQ_FileDetailView::SQ_FileDetailView(QWidget* parent, const char* name) toolTip = new KonqFileTip(this); slotResetToolTip(); - disconnect(this, SIGNAL(onViewport()), this, 0); - disconnect(this, SIGNAL(onItem(QListViewItem *)), this, 0); - connect(this, SIGNAL(onViewport()), this, SLOT(slotRemoveToolTip())); - connect(this, SIGNAL(onItem(QListViewItem *)), this, SLOT(slotShowToolTip(QListViewItem *))); + disconnect(this, TQT_SIGNAL(onViewport()), this, 0); + disconnect(this, TQT_SIGNAL(onItem(TQListViewItem *)), this, 0); + connect(this, TQT_SIGNAL(onViewport()), this, TQT_SLOT(slotRemoveToolTip())); + connect(this, TQT_SIGNAL(onItem(TQListViewItem *)), this, TQT_SLOT(slotShowToolTip(TQListViewItem *))); } SQ_FileDetailView::~SQ_FileDetailView() @@ -75,7 +75,7 @@ void SQ_FileDetailView::slotResetToolTip() } // Show extended tooltip for item under mouse cursor -void SQ_FileDetailView::slotShowToolTip(QListViewItem *item) +void SQ_FileDetailView::slotShowToolTip(TQListViewItem *item) { SQ_Config::instance()->setGroup("Fileview"); @@ -95,13 +95,13 @@ void SQ_FileDetailView::slotShowToolTip(QListViewItem *item) if(f) toolTip->setItem(f, fitem->rect(), fitem->pixmap(0)); } -bool SQ_FileDetailView::eventFilter(QObject *o, QEvent *e) +bool SQ_FileDetailView::eventFilter(TQObject *o, TQEvent *e) { - if(o == viewport() || o == this) + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) { int type = e->type(); - if(type == QEvent::Leave || type == QEvent::FocusOut || type == QEvent::Hide) + if(type == TQEvent::Leave || type == TQEvent::FocusOut || type == TQEvent::Hide) slotRemoveToolTip(); } @@ -144,11 +144,11 @@ void SQ_FileDetailView::insertItem(KFileItem *i) void SQ_FileDetailView::initItem(SQ_FileListViewItem *item, const KFileItem *i) { // determine current sorting type - QDir::SortSpec spec = KFileView::sorting(); + TQDir::SortSpec spec = KFileView::sorting(); - if(spec & QDir::Time) + if(spec & TQDir::Time) item->setKey(sortingKey(i->time(KIO::UDS_MODIFICATION_TIME), i->isDir(), spec)); - else if(spec & QDir::Size) + else if(spec & TQDir::Size) item->setKey(sortingKey(i->size(), i->isDir(), spec)); else item->setKey(sortingKey(i->text(), i->isDir(), spec)); @@ -158,13 +158,13 @@ void SQ_FileDetailView::initItem(SQ_FileListViewItem *item, const KFileItem *i) * On double click execute item or * invoke default browser in current url. */ -void SQ_FileDetailView::contentsMouseDoubleClickEvent(QMouseEvent *e) +void SQ_FileDetailView::contentsMouseDoubleClickEvent(TQMouseEvent *e) { - QPoint vp = contentsToViewport(e->pos()); + TQPoint vp = contentsToViewport(e->pos()); - QListViewItem *item = itemAt(vp); + TQListViewItem *item = itemAt(vp); - emit QListView::doubleClicked(item); + emit TQListView::doubleClicked(item); int col = item ? header()->mapToLogical(header()->cellAt(vp.x())) : -1; @@ -178,7 +178,7 @@ void SQ_FileDetailView::contentsMouseDoubleClickEvent(QMouseEvent *e) } // Accept dragging -void SQ_FileDetailView::dragEnterEvent(QDragEnterEvent *e) +void SQ_FileDetailView::dragEnterEvent(TQDragEnterEvent *e) { e->accept(true); } @@ -188,14 +188,14 @@ void SQ_FileDetailView::dragEnterEvent(QDragEnterEvent *e) */ void SQ_FileDetailView::insertCdUpItem(const KURL &base) { - static const QString &dirup = KGlobal::staticQString(".."); + static const TQString &dirup = KGlobal::staticQString(".."); KFileItem *fi = new KFileItem(base.upURL(), "inode/directory", S_IFDIR); SQ_FileListViewItem *item = new SQ_FileListViewItem(this, dirup, dirPix, fi); item->setSelectable(false); - item->setKey(sortingKey("..", true, QDir::Name|QDir::DirsFirst)); + item->setKey(sortingKey("..", true, TQDir::Name|TQDir::DirsFirst)); fi->setExtraData(this, item); } diff --git a/ksquirrel/sq_filedetailview.h b/ksquirrel/sq_filedetailview.h index fbdd869..baacaf8 100644 --- a/ksquirrel/sq_filedetailview.h +++ b/ksquirrel/sq_filedetailview.h @@ -32,24 +32,25 @@ class KonqFileTip; class SQ_FileListViewItem : public KFileListViewItem { public: - SQ_FileListViewItem(QListView *parent, KFileItem *fi); - SQ_FileListViewItem(QListView *parent, const QString &text, const QPixmap &icon, KFileItem *fi); + SQ_FileListViewItem(TQListView *tqparent, KFileItem *fi); + SQ_FileListViewItem(TQListView *tqparent, const TQString &text, const TQPixmap &icon, KFileItem *fi); ~SQ_FileListViewItem(); protected: /* * Reimplement paintFocus() to ignore painting focus. */ - virtual void paintFocus(QPainter *, const QColorGroup &, const QRect &) + virtual void paintFocus(TQPainter *, const TQColorGroup &, const TQRect &) {} }; class SQ_FileDetailView : public KFileDetailView { Q_OBJECT + TQ_OBJECT public: - SQ_FileDetailView(QWidget* parent, const char* name); + SQ_FileDetailView(TQWidget* tqparent, const char* name); ~SQ_FileDetailView(); /* @@ -76,18 +77,18 @@ class SQ_FileDetailView : public KFileDetailView virtual void startDrag(); - virtual bool eventFilter(QObject *o, QEvent *e); + virtual bool eventFilter(TQObject *o, TQEvent *e); /* * On double click execute item or * invoke default browser in current url. */ - virtual void contentsMouseDoubleClickEvent(QMouseEvent *e); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent *e); /* * Accept dragging. */ - virtual void dragEnterEvent(QDragEnterEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); signals: void invokeBrowser(); @@ -99,7 +100,7 @@ class SQ_FileDetailView : public KFileDetailView /* * Show extended tooltip for 'item'. */ - void slotShowToolTip(QListViewItem *item); + void slotShowToolTip(TQListViewItem *item); /* * Remove tootip and stop timer. @@ -107,7 +108,7 @@ class SQ_FileDetailView : public KFileDetailView void slotRemoveToolTip(); private: - QPixmap dirPix; + TQPixmap dirPix; /* * Tooltip for file item. diff --git a/ksquirrel/sq_filedialog.cpp b/ksquirrel/sq_filedialog.cpp index ce0eb47..6e8fb82 100644 --- a/ksquirrel/sq_filedialog.cpp +++ b/ksquirrel/sq_filedialog.cpp @@ -19,8 +19,8 @@ #include "sq_filedialog.h" -SQ_FileDialog::SQ_FileDialog(const QString &path, QWidget *parent) - : KFileDialog(path, QString::null, parent, "select_a_file", true) +SQ_FileDialog::SQ_FileDialog(const TQString &path, TQWidget *tqparent) + : KFileDialog(path, TQString(), tqparent, "select_a_file", true) {} SQ_FileDialog::~SQ_FileDialog() @@ -33,12 +33,12 @@ void SQ_FileDialog::updateCombo(bool enable) slotFilterChanged(); } -QString SQ_FileDialog::nameFilter() const +TQString SQ_FileDialog::nameFilter() const { return filterWidget->currentText(); } -void SQ_FileDialog::setCurrentFilter(const QString &f) +void SQ_FileDialog::setCurrentFilter(const TQString &f) { filterWidget->setCurrentFilter(f); } diff --git a/ksquirrel/sq_filedialog.h b/ksquirrel/sq_filedialog.h index 205b200..3c68956 100644 --- a/ksquirrel/sq_filedialog.h +++ b/ksquirrel/sq_filedialog.h @@ -27,13 +27,13 @@ class SQ_FileDialog : public KFileDialog { public: - SQ_FileDialog(const QString &path, QWidget *parent); + SQ_FileDialog(const TQString &path, TQWidget *tqparent); ~SQ_FileDialog(); - QString nameFilter() const; + TQString nameFilter() const; void updateCombo(bool enable); - void setCurrentFilter(const QString &); + void setCurrentFilter(const TQString &); }; #endif diff --git a/ksquirrel/sq_fileiconview.cpp b/ksquirrel/sq_fileiconview.cpp index f816dea..d556c49 100644 --- a/ksquirrel/sq_fileiconview.cpp +++ b/ksquirrel/sq_fileiconview.cpp @@ -19,10 +19,10 @@ #include "config.h" #endif -#include <qpoint.h> -#include <qdragobject.h> -#include <qfontmetrics.h> -#include <qpainter.h> +#include <tqpoint.h> +#include <tqdragobject.h> +#include <tqfontmetrics.h> +#include <tqpainter.h> #include "sq_config.h" #include "sq_iconloader.h" @@ -31,19 +31,19 @@ #include "sq_diroperator.h" #include "sq_dragprovider.h" -SQ_FileIconViewItem::SQ_FileIconViewItem(QIconView *parent, const QString &text, - const QPixmap &pixmap, KFileItem *fi) - : KFileIconViewItem(parent, text, pixmap, fi) +SQ_FileIconViewItem::SQ_FileIconViewItem(TQIconView *tqparent, const TQString &text, + const TQPixmap &pixmap, KFileItem *fi) + : KFileIconViewItem(tqparent, text, pixmap, fi) {} SQ_FileIconViewItem::~SQ_FileIconViewItem() {} -SQ_FileIconView::SQ_FileIconView(QWidget *parent, const char *name) : SQ_FileIconViewBase(parent, name) +SQ_FileIconView::SQ_FileIconView(TQWidget *tqparent, const char *name) : SQ_FileIconViewBase(tqparent, name) { - QString n = name; + TQString n = name; - setSorting(QDir::IgnoreCase); + setSorting(TQDir::IgnoreCase); dirPix = SQ_IconLoader::instance()->loadIcon("folder", KIcon::Desktop, (n == "icon view") ? KIcon::SizeMedium : KIcon::SizeSmall); @@ -57,7 +57,7 @@ void SQ_FileIconView::updateView(bool b) if(!b) return; - SQ_FileIconViewItem *item = static_cast<SQ_FileIconViewItem*>(QIconView::firstItem()); + SQ_FileIconViewItem *item = static_cast<SQ_FileIconViewItem*>(TQIconView::firstItem()); if(item) { @@ -85,7 +85,7 @@ void SQ_FileIconView::insertItem(KFileItem *i) // add new item setUpdatesEnabled(false); - item = new SQ_FileIconViewItem((QIconView*)this, i->text(), i->pixmap(iconSize()), i); + item = new SQ_FileIconViewItem((TQIconView*)this, i->text(), i->pixmap(iconSize()), i); initItemMy(item, i); setUpdatesEnabled(true); @@ -98,7 +98,7 @@ void SQ_FileIconView::insertItem(KFileItem *i) */ void SQ_FileIconView::insertCdUpItem(const KURL &base) { - static const QString &dirup = KGlobal::staticQString(".."); + static const TQString &dirup = KGlobal::staticQString(".."); KFileItem *fi = new KFileItem(base.upURL(), "inode/directory", S_IFDIR); diff --git a/ksquirrel/sq_fileiconview.h b/ksquirrel/sq_fileiconview.h index 06dd757..50fc0ef 100644 --- a/ksquirrel/sq_fileiconview.h +++ b/ksquirrel/sq_fileiconview.h @@ -20,9 +20,9 @@ #include "sq_fileiconviewbase.h" -#include <qwidget.h> +#include <tqwidget.h> -class QPoint; +class TQPoint; /* * SQ_FileIconView represents icon view and list view in filemanager. @@ -34,23 +34,24 @@ class QPoint; class SQ_FileIconViewItem : public KFileIconViewItem { public: - SQ_FileIconViewItem(QIconView *parent, const QString &text, const QPixmap &pixmap, KFileItem *fi); + SQ_FileIconViewItem(TQIconView *tqparent, const TQString &text, const TQPixmap &pixmap, KFileItem *fi); ~SQ_FileIconViewItem(); protected: /* * Reimplement paintFocus() to ignore painting focus. */ - virtual void paintFocus(QPainter *, const QColorGroup &) + virtual void paintFocus(TQPainter *, const TQColorGroup &) {} }; class SQ_FileIconView : public SQ_FileIconViewBase { Q_OBJECT + TQ_OBJECT public: - SQ_FileIconView(QWidget *parent = 0, const char *name = ""); + SQ_FileIconView(TQWidget *tqparent = 0, const char *name = ""); ~SQ_FileIconView(); /* @@ -83,7 +84,7 @@ class SQ_FileIconView : public SQ_FileIconViewBase virtual void startDrag(); private: - QPixmap dirPix; + TQPixmap dirPix; }; #endif diff --git a/ksquirrel/sq_fileiconviewbase.cpp b/ksquirrel/sq_fileiconviewbase.cpp index d8d93be..2f568ce 100644 --- a/ksquirrel/sq_fileiconviewbase.cpp +++ b/ksquirrel/sq_fileiconviewbase.cpp @@ -19,8 +19,8 @@ #include "config.h" #endif -#include <qdragobject.h> -#include <qcursor.h> +#include <tqdragobject.h> +#include <tqcursor.h> #include <kglobalsettings.h> #include <kaction.h> @@ -32,16 +32,16 @@ #include "sq_fileiconviewbase.h" #include "sq_config.h" -SQ_FileIconViewBase::SQ_FileIconViewBase(QWidget *parent, const char *name) - : KFileIconView(parent, name) +SQ_FileIconViewBase::SQ_FileIconViewBase(TQWidget *tqparent, const char *name) + : KFileIconView(tqparent, name) { toolTip = new KonqFileTip(this); slotResetToolTip(); - disconnect(this, SIGNAL(onViewport()), this, 0); - disconnect(this, SIGNAL(onItem(QIconViewItem *)), this, 0); - connect(this, SIGNAL(onViewport()), this, SLOT(slotRemoveToolTip())); - connect(this, SIGNAL(onItem(QIconViewItem *)), this, SLOT(slotShowToolTip(QIconViewItem *))); + disconnect(this, TQT_SIGNAL(onViewport()), this, 0); + disconnect(this, TQT_SIGNAL(onItem(TQIconViewItem *)), this, 0); + connect(this, TQT_SIGNAL(onViewport()), this, TQT_SLOT(slotRemoveToolTip())); + connect(this, TQT_SIGNAL(onItem(TQIconViewItem *)), this, TQT_SLOT(slotShowToolTip(TQIconViewItem *))); } SQ_FileIconViewBase::~SQ_FileIconViewBase() @@ -59,7 +59,7 @@ void SQ_FileIconViewBase::slotResetToolTip() } // Show extended tooltip for item under mouse cursor -void SQ_FileIconViewBase::slotShowToolTip(QIconViewItem *item) +void SQ_FileIconViewBase::slotShowToolTip(TQIconViewItem *item) { SQ_Config::instance()->setGroup("Fileview"); @@ -79,13 +79,13 @@ void SQ_FileIconViewBase::slotShowToolTip(QIconViewItem *item) if(f) toolTip->setItem(f, fitem->rect(), fitem->pixmap()); } -bool SQ_FileIconViewBase::eventFilter(QObject *o, QEvent *e) +bool SQ_FileIconViewBase::eventFilter(TQObject *o, TQEvent *e) { - if(o == viewport() || o == this) + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) { int type = e->type(); - if(type == QEvent::Leave || type == QEvent::FocusOut || type == QEvent::Hide) + if(type == TQEvent::Leave || type == TQEvent::FocusOut || type == TQEvent::Hide) slotRemoveToolTip(); } @@ -101,7 +101,7 @@ void SQ_FileIconViewBase::slotRemoveToolTip() } // Accept drag -void SQ_FileIconViewBase::dragEnterEvent(QDragEnterEvent *e) +void SQ_FileIconViewBase::dragEnterEvent(TQDragEnterEvent *e) { e->accept(true); } @@ -109,11 +109,11 @@ void SQ_FileIconViewBase::dragEnterEvent(QDragEnterEvent *e) /* * Handle double clicks. */ -void SQ_FileIconViewBase::contentsMouseDoubleClickEvent(QMouseEvent *e) +void SQ_FileIconViewBase::contentsMouseDoubleClickEvent(TQMouseEvent *e) { - QIconView::contentsMouseDoubleClickEvent(e); + TQIconView::contentsMouseDoubleClickEvent(e); - QIconViewItem *item = findItem(e->pos()); + TQIconViewItem *item = tqfindItem(e->pos()); // double click on item if(item) @@ -143,11 +143,11 @@ void SQ_FileIconViewBase::initItemMy(KFileIconViewItem *item, const KFileItem *i item->setText(i->text(), true, true); // determine current sorting type - QDir::SortSpec spec = KFileView::sorting(); + TQDir::SortSpec spec = KFileView::sorting(); - if(spec & QDir::Time) + if(spec & TQDir::Time) item->setKey(sortingKey((unsigned long)i->time(KIO::UDS_MODIFICATION_TIME), i->isDir(), spec)); - else if(spec & QDir::Size) + else if(spec & TQDir::Size) item->setKey(sortingKey(i->size(), i->isDir(), spec)); else item->setKey(sortingKey(i->text(), i->isDir(), spec)); diff --git a/ksquirrel/sq_fileiconviewbase.h b/ksquirrel/sq_fileiconviewbase.h index d8dbc5d..4111e39 100644 --- a/ksquirrel/sq_fileiconviewbase.h +++ b/ksquirrel/sq_fileiconviewbase.h @@ -30,9 +30,10 @@ class KonqFileTip; class SQ_FileIconViewBase : public KFileIconView { Q_OBJECT + TQ_OBJECT public: - SQ_FileIconViewBase(QWidget *parent = 0, const char *name = 0); + SQ_FileIconViewBase(TQWidget *tqparent = 0, const char *name = 0); virtual ~SQ_FileIconViewBase(); virtual void insertCdUpItem(const KURL &base) = 0; @@ -49,14 +50,14 @@ class SQ_FileIconViewBase : public KFileIconView /* * Accept dragging. */ - virtual void dragEnterEvent(QDragEnterEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); /* * Handle double clicks. */ - virtual void contentsMouseDoubleClickEvent(QMouseEvent *e); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent *e); - virtual bool eventFilter(QObject *o, QEvent *e); + virtual bool eventFilter(TQObject *o, TQEvent *e); void initItemMy(KFileIconViewItem *item, const KFileItem *i, bool upd = false); @@ -70,7 +71,7 @@ class SQ_FileIconViewBase : public KFileIconView /* * Show extended tooltip for 'item'. */ - void slotShowToolTip(QIconViewItem *item); + void slotShowToolTip(TQIconViewItem *item); /* * Remove tootip and stop timer. diff --git a/ksquirrel/sq_filethumbview.cpp b/ksquirrel/sq_filethumbview.cpp index 7d3423e..d30f86b 100644 --- a/ksquirrel/sq_filethumbview.cpp +++ b/ksquirrel/sq_filethumbview.cpp @@ -19,13 +19,13 @@ #include "config.h" #endif -#include <qpainter.h> -#include <qhbox.h> -#include <qtoolbar.h> -#include <qtoolbutton.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qapplication.h> +#include <tqpainter.h> +#include <tqhbox.h> +#include <tqtoolbar.h> +#include <tqtoolbutton.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqapplication.h> #include <kstandarddirs.h> #include <kstringhandler.h> @@ -49,16 +49,16 @@ #include "sq_filethumbviewitem.h" #include "sq_dragprovider.h" -SQ_FileThumbView::SQ_FileThumbView(QWidget *parent, const char *name) : SQ_FileIconViewBase(parent, name), isPending(false) +SQ_FileThumbView::SQ_FileThumbView(TQWidget *tqparent, const char *name) : SQ_FileIconViewBase(tqparent, name), isPending(false) { // create progress bar m_progressBox = new SQ_ProgressBox(this); - timerScroll = new QTimer(this); - connect(timerScroll, SIGNAL(timeout()), this, SLOT(slotDelayedContentsMoving())); + timerScroll = new TQTimer(this); + connect(timerScroll, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDelayedContentsMoving())); - timerAdd = new QTimer(this); - connect(timerAdd, SIGNAL(timeout()), this, SLOT(slotDelayedAddItems())); + timerAdd = new TQTimer(this); + connect(timerAdd, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDelayedAddItems())); // setup cache limit SQ_Config::instance()->setGroup("Thumbnails"); @@ -68,12 +68,12 @@ SQ_FileThumbView::SQ_FileThumbView(QWidget *parent, const char *name) : SQ_FileI m_rows = SQ_Config::instance()->readNumEntry("rows", 2); if(m_rows <= 0 || m_rows > 5) m_rows = 2; - setResizeMode(QIconView::Adjust); + setResizeMode(TQIconView::Adjust); // load "pending" pixmaps pending = SQ_IconLoader::instance()->loadIcon("clock", KIcon::Desktop, 32); - connect(this, SIGNAL(contentsMoving(int, int)), this, SLOT(slotContentsMoving(int, int))); + connect(this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotContentsMoving(int, int))); rebuildCachedPixmaps(); } @@ -104,11 +104,11 @@ void SQ_FileThumbView::insertItem(KFileItem *i) } else { - QPixmap mimeall = i->pixmap(SQ_ThumbnailSize::smallest()); - QPixmap thumbnail(pixelSize.width(), pixelSize.height()); - QPainter painter(&thumbnail); - painter.setBrush(colorGroup().base()); - painter.setPen(colorGroup().highlight()); + TQPixmap mimeall = i->pixmap(SQ_ThumbnailSize::smallest()); + TQPixmap thumbnail(pixelSize.width(), pixelSize.height()); + TQPainter painter(&thumbnail); + painter.setBrush(tqcolorGroup().base()); + painter.setPen(tqcolorGroup().highlight()); painter.drawRect(0, 0, pixelSize.width(), pixelSize.height()); painter.drawPixmap((pixelSize.width()-mimeall.width())/2, (pixelSize.height()-mimeall.height())/2, mimeall); item = new SQ_FileThumbViewItem(this, i->text(), thumbnail, i); @@ -133,22 +133,22 @@ void SQ_FileThumbView::setThumbnailPixmap(const KFileItem* fileItem, const SQ_Th if(!item) return; - QPixmap newpix; + TQPixmap newpix; // Extended thumbnail also have mime icon and dimensions if(SQ_ThumbnailSize::instance()->extended()) { - QSize sz = pixelSize;//SQ_ThumbnailSize::instance()->extendedSize(); + TQSize sz = pixelSize;//SQ_ThumbnailSize::instance()->extendedSize(); int W = sz.width(), H = sz.height(); // erase original pixmap newpix.resize(W, H); - QPainter painter; + TQPainter painter; painter.begin(&newpix); - painter.setPen(colorGroup().highlight()); - painter.setBrush(colorGroup().base()); + painter.setPen(tqcolorGroup().highlight()); + painter.setBrush(tqcolorGroup().base()); // draw bounding rect painter.drawRect(0, 0, W, H); @@ -157,15 +157,15 @@ void SQ_FileThumbView::setThumbnailPixmap(const KFileItem* fileItem, const SQ_Th painter.drawPixmap(W-t.mime.width()-5, H-t.mime.height()-4, t.mime); painter.drawLine(3, W-1, W-4, W-1); - QFont f = painter.font(); + TQFont f = painter.font(); f.setPixelSize(10); painter.setFont(f); int rest = H-W-2; - painter.setPen(colorGroup().text()); + painter.setPen(tqcolorGroup().text()); - if(t.w && t.h) painter.drawText(4, W+rest/2-12, 100, 12, 0, QString::fromLatin1("%1x%2").arg(t.w).arg(t.h)); + if(t.w && t.h) painter.drawText(4, W+rest/2-12, 100, 12, 0, TQString::tqfromLatin1("%1x%2").tqarg(t.w).tqarg(t.h)); painter.drawText(4, W+rest/2+1, 100, 12, 0, KIO::convertSize(fileItem->size())); painter.end(); @@ -174,11 +174,11 @@ void SQ_FileThumbView::setThumbnailPixmap(const KFileItem* fileItem, const SQ_Th { newpix.resize(pixelSize.width(), pixelSize.height()); - QPainter painter; + TQPainter painter; painter.begin(&newpix); - painter.setPen(colorGroup().highlight()); - painter.setBrush(colorGroup().base()); + painter.setPen(tqcolorGroup().highlight()); + painter.setBrush(tqcolorGroup().base()); // draw bounding rect painter.drawRect(0, 0, pixelSize.width(), pixelSize.height()); @@ -192,7 +192,7 @@ void SQ_FileThumbView::setThumbnailPixmap(const KFileItem* fileItem, const SQ_Th item->setListed(true); // update item - item->repaint(); + item->tqrepaint(); } void SQ_FileThumbView::startThumbnailUpdate() @@ -210,15 +210,15 @@ KFileItemList SQ_FileThumbView::itemsToUpdate(bool fromAll) // hehe, lazy mode KFileItemList list; - QRect rect(contentsX(), contentsY(), viewport()->width(), viewport()->height()); - QIconViewItem *first = fromAll ? firstItem() : findFirstVisibleItem(rect); - QIconViewItem *last = fromAll ? lastItem() : findLastVisibleItem(rect); + TQRect rect(contentsX(), contentsY(), viewport()->width(), viewport()->height()); + TQIconViewItem *first = fromAll ? firstItem() : tqfindFirstVisibleItem(rect); + TQIconViewItem *last = fromAll ? lastItem() : tqfindLastVisibleItem(rect); if(first && last) { SQ_FileThumbViewItem *tfi; - QIconViewItem *f = first; + TQIconViewItem *f = first; int yy; if(m_rows) @@ -255,7 +255,7 @@ KFileItemList SQ_FileThumbView::itemsToUpdate(bool fromAll) else last = last->nextItem(); - for(QIconViewItem *item = first;(item && item != last);item = item->nextItem()) + for(TQIconViewItem *item = first;(item && item != last);item = item->nextItem()) { tfi = dynamic_cast<SQ_FileThumbViewItem *>(item); @@ -313,10 +313,10 @@ void SQ_FileThumbView::doStartThumbnailUpdate(const KFileItemList &list) // create new job thumbJob = new SQ_ThumbnailLoadJob(list, this); - connect(thumbJob, SIGNAL(thumbnailLoaded(const KFileItem*, const SQ_Thumbnail &)), - this, SLOT(setThumbnailPixmap(const KFileItem*, const SQ_Thumbnail&))); + connect(thumbJob, TQT_SIGNAL(thumbnailLoaded(const KFileItem*, const SQ_Thumbnail &)), + this, TQT_SLOT(setThumbnailPixmap(const KFileItem*, const SQ_Thumbnail&))); - connect(thumbJob, SIGNAL(done()), SQ_WidgetStack::instance(), SLOT(thumbnailsUpdateEnded())); + connect(thumbJob, TQT_SIGNAL(done()), SQ_WidgetStack::instance(), TQT_SLOT(thumbnailsUpdateEnded())); // start! thumbJob->start(); @@ -378,7 +378,7 @@ void SQ_FileThumbView::slotDelayedAddItems() while((fi = it.current())) { - if(visItems.findRef(fi) == -1) + if(visItems.tqfindRef(fi) == -1) _newItems.removeRef(fi); // also does ++it else ++it; @@ -410,7 +410,7 @@ void SQ_FileThumbView::clearView() slotRemoveToolTip(); pixelSize = SQ_ThumbnailSize::instance()->extended() ? - SQ_ThumbnailSize::instance()->extendedSize() : QSize(SQ_ThumbnailSize::instance()->pixelSize()+2,SQ_ThumbnailSize::instance()->pixelSize()+2); + SQ_ThumbnailSize::instance()->extendedSize() : TQSize(SQ_ThumbnailSize::instance()->pixelSize()+2,SQ_ThumbnailSize::instance()->pixelSize()+2); // clear KFileIconView::clearView(); @@ -432,7 +432,7 @@ bool SQ_FileThumbView::updateRunning() const */ void SQ_FileThumbView::insertCdUpItem(const KURL &base) { - static const QString &dirup = KGlobal::staticQString(".."); + static const TQString &dirup = KGlobal::staticQString(".."); KFileItem *fi = new KFileItem(base.upURL(), "inode/directory", S_IFDIR); @@ -455,19 +455,19 @@ void SQ_FileThumbView::listingCompleted() void SQ_FileThumbView::rebuildPendingPixmap(bool dir) { - QPixmap pixmapDir; + TQPixmap pixmapDir; if(dir) pixmapDir = SQ_IconLoader::instance()->loadIcon("folder", KIcon::Desktop, 48); - QPixmap *p = dir ? &directoryCache : &pendingCache; - QPixmap *w = dir ? &pixmapDir : &pending; + TQPixmap *p = dir ? &directoryCache : &pendingCache; + TQPixmap *w = dir ? &pixmapDir : &pending; p->resize(pixelSize.width(), pixelSize.height()); - QPainter painter(p); - painter.setBrush(colorGroup().base()); - painter.setPen(colorGroup().highlight()); + TQPainter painter(p); + painter.setBrush(tqcolorGroup().base()); + painter.setPen(tqcolorGroup().highlight()); painter.drawRect(0, 0, pixelSize.width(), pixelSize.height()); painter.drawPixmap((pixelSize.width() - w->width())/2, (pixelSize.height() - w->height())/2, *w); } @@ -475,7 +475,7 @@ void SQ_FileThumbView::rebuildPendingPixmap(bool dir) void SQ_FileThumbView::rebuildCachedPixmaps() { pixelSize = SQ_ThumbnailSize::instance()->extended() ? - SQ_ThumbnailSize::instance()->extendedSize() : QSize(SQ_ThumbnailSize::instance()->pixelSize()+2,SQ_ThumbnailSize::instance()->pixelSize()+2); + SQ_ThumbnailSize::instance()->extendedSize() : TQSize(SQ_ThumbnailSize::instance()->pixelSize()+2,SQ_ThumbnailSize::instance()->pixelSize()+2); // rebuild "pending" thumbnail rebuildPendingPixmap(); @@ -494,7 +494,7 @@ void SQ_FileThumbView::itemsRemoved(const KFileItemList &l) thumbJob->itemsRemoved(l); } -void SQ_FileThumbView::showEvent(QShowEvent *e) +void SQ_FileThumbView::showEvent(TQShowEvent *e) { KFileIconView::showEvent(e); @@ -536,7 +536,7 @@ void SQ_FileThumbView::setLazy(bool l, int delay) } } -void SQ_FileThumbView::resizeEvent(QResizeEvent *e) +void SQ_FileThumbView::resizeEvent(TQResizeEvent *e) { KFileIconView::resizeEvent(e); diff --git a/ksquirrel/sq_filethumbview.h b/ksquirrel/sq_filethumbview.h index 25fe274..fa6ea59 100644 --- a/ksquirrel/sq_filethumbview.h +++ b/ksquirrel/sq_filethumbview.h @@ -18,15 +18,15 @@ #ifndef SQ_FILETHUMBVIEW_H #define SQ_FILETHUMBVIEW_H -#include <qguardedptr.h> -#include <qsize.h> +#include <tqguardedptr.h> +#include <tqsize.h> #include "sq_fileiconviewbase.h" #include "sq_thumbnailinfo.h" -class QHBox; -class QToolButton; -class QTimer; +class TQHBox; +class TQToolButton; +class TQTimer; class SQ_ProgressBox; class SQ_ThumbnailLoadJob; @@ -40,9 +40,10 @@ class SQ_FileThumbViewItem; class SQ_FileThumbView : public SQ_FileIconViewBase { Q_OBJECT + TQ_OBJECT public: - SQ_FileThumbView(QWidget *parent = 0, const char *name = ""); + SQ_FileThumbView(TQWidget *tqparent = 0, const char *name = ""); ~SQ_FileThumbView(); bool lazy() const; @@ -109,13 +110,13 @@ class SQ_FileThumbView : public SQ_FileIconViewBase SQ_ProgressBox* progressBox() const; protected: - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); virtual void startDrag(); /* * Show event. Let's start thumbnail job, if needed. */ - virtual void showEvent(QShowEvent *); + virtual void showEvent(TQShowEvent *); private: @@ -159,20 +160,20 @@ class SQ_FileThumbView : public SQ_FileIconViewBase /* * "Stop" button. */ - QToolButton *buttonStop; + TQToolButton *buttonStop; private: - QGuardedPtr<SQ_ThumbnailLoadJob> thumbJob; + TQGuardedPtr<SQ_ThumbnailLoadJob> thumbJob; /* * "Pending" thumbnail. */ - QPixmap pending; + TQPixmap pending; - QTimer *timerScroll, *timerAdd; + TQTimer *timerScroll, *timerAdd; - QPixmap directoryCache, pendingCache; - QSize pixelSize; + TQPixmap directoryCache, pendingCache; + TQSize pixelSize; KFileItemList newItems; bool newItemsAppend; diff --git a/ksquirrel/sq_filethumbviewitem.cpp b/ksquirrel/sq_filethumbviewitem.cpp index 5e31638..4d966cc 100644 --- a/ksquirrel/sq_filethumbviewitem.cpp +++ b/ksquirrel/sq_filethumbviewitem.cpp @@ -19,30 +19,30 @@ #include "config.h" #endif -#include <qstring.h> -#include <qpainter.h> +#include <tqstring.h> +#include <tqpainter.h> #include <kwordwrap.h> #include "sq_filethumbviewitem.h" -SQ_FileThumbViewItem::SQ_FileThumbViewItem(QIconView *parent, const QString &text, const QPixmap &pixmap, KFileItem *fi): - KFileIconViewItem(parent, text, pixmap, fi), m_listed(false) +SQ_FileThumbViewItem::SQ_FileThumbViewItem(TQIconView *tqparent, const TQString &text, const TQPixmap &pixmap, KFileItem *fi): + KFileIconViewItem(tqparent, text, pixmap, fi), m_listed(false) {} SQ_FileThumbViewItem::~SQ_FileThumbViewItem() {} -void SQ_FileThumbViewItem::paintItem(QPainter *p, const QColorGroup &cg) +void SQ_FileThumbViewItem::paintItem(TQPainter *p, const TQColorGroup &cg) { KIconViewItem::paintPixmap(p, cg); paintText(p, cg); } -void SQ_FileThumbViewItem::paintText(QPainter *p, const QColorGroup &cg) +void SQ_FileThumbViewItem::paintText(TQPainter *p, const TQColorGroup &cg) { - QRect rectText = textRect(false); - QRect rc = pixmapRect(false); + TQRect rectText = textRect(false); + TQRect rc = pixmapRect(false); rectText.setX(rc.x()); rectText.setWidth(rc.width()-2); @@ -50,11 +50,11 @@ void SQ_FileThumbViewItem::paintText(QPainter *p, const QColorGroup &cg) if(isSelected()) { p->fillRect(rectText, cg.highlight()); - p->setPen(QPen(cg.highlightedText())); + p->setPen(TQPen(cg.highlightedText())); } else { - if(iconView()->itemTextBackground() != NoBrush) + if(iconView()->itemTextBackground() != Qt::NoBrush) p->fillRect(rectText, iconView()->itemTextBackground()); p->setPen(cg.text()); @@ -63,5 +63,5 @@ void SQ_FileThumbViewItem::paintText(QPainter *p, const QColorGroup &cg) wordWrap()->drawText(p, textRect(false).x(), textRect(false).y(), AlignCenter); } -void SQ_FileThumbViewItem::paintFocus(QPainter *, const QColorGroup &) +void SQ_FileThumbViewItem::paintFocus(TQPainter *, const TQColorGroup &) {} diff --git a/ksquirrel/sq_filethumbviewitem.h b/ksquirrel/sq_filethumbviewitem.h index e5e4108..7e556de 100644 --- a/ksquirrel/sq_filethumbviewitem.h +++ b/ksquirrel/sq_filethumbviewitem.h @@ -18,7 +18,7 @@ #ifndef SQ_FILETHUMBVIEWITEM_H #define SQ_FILETHUMBVIEWITEM_H -#include <qpixmap.h> +#include <tqpixmap.h> #include <kfileiconview.h> @@ -30,7 +30,7 @@ class SQ_FileThumbViewItem : public KFileIconViewItem { public: - SQ_FileThumbViewItem(QIconView *parent, const QString &text, const QPixmap &pixmap, KFileItem *fi); + SQ_FileThumbViewItem(TQIconView *tqparent, const TQString &text, const TQPixmap &pixmap, KFileItem *fi); ~SQ_FileThumbViewItem(); bool listed() const; @@ -41,9 +41,9 @@ class SQ_FileThumbViewItem : public KFileIconViewItem /* * Painting routines. */ - virtual void paintItem(QPainter *p, const QColorGroup &cg); - virtual void paintFocus(QPainter *p, const QColorGroup &cg); - void paintText(QPainter *p, const QColorGroup &c); + virtual void paintItem(TQPainter *p, const TQColorGroup &cg); + virtual void paintFocus(TQPainter *p, const TQColorGroup &cg); + void paintText(TQPainter *p, const TQColorGroup &c); private: bool m_listed; diff --git a/ksquirrel/sq_filters.ui b/ksquirrel/sq_filters.ui index af8ce08..16d35cc 100644 --- a/ksquirrel/sq_filters.ui +++ b/ksquirrel/sq_filters.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_Filters</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_Filters</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="3" column="1"> + <widget class="TQPushButton" row="3" column="1"> <property name="name"> <cstring>pushOK</cstring> </property> @@ -41,7 +41,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="3" column="2" rowspan="1" colspan="2"> + <widget class="TQPushButton" row="3" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -67,7 +67,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>411</width> <height>20</height> @@ -88,15 +88,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="0" column="3"> + <widget class="TQLayoutWidget" row="0" column="3"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -110,7 +110,7 @@ <property name="margin"> <number>5</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushNew</cstring> </property> @@ -124,7 +124,7 @@ <string>New filter</string> </property> </widget> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>pushDelete</cstring> </property> @@ -141,7 +141,7 @@ <string>Delete</string> </property> </widget> - <widget class="QPushButton" row="2" column="0"> + <widget class="TQPushButton" row="2" column="0"> <property name="name"> <cstring>pushClearAll</cstring> </property> @@ -157,7 +157,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -171,7 +171,7 @@ <property name="margin"> <number>5</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushFilterUp</cstring> </property> @@ -186,7 +186,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> @@ -205,7 +205,7 @@ <string>Move filter up</string> </property> </widget> - <widget class="QPushButton" row="1" column="0"> + <widget class="TQPushButton" row="1" column="0"> <property name="name"> <cstring>pushFilterDown</cstring> </property> @@ -220,7 +220,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>22</width> <height>22</height> @@ -253,22 +253,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>145</height> </size> </property> </spacer> - <widget class="QLayoutWidget" row="0" column="0" rowspan="2" colspan="3"> + <widget class="TQLayoutWidget" row="0" column="0" rowspan="2" colspan="3"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListView" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQListView" row="0" column="0" rowspan="1" colspan="3"> <column> <property name="text"> <string>Name</string> @@ -319,7 +319,7 @@ <enum>Reject</enum> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>checkBoth</cstring> </property> @@ -346,9 +346,9 @@ </connection> <connection> <sender>listFilters</sender> - <signal>rightButtonClicked(QListViewItem*,const QPoint&,int)</signal> + <signal>rightButtonClicked(TQListViewItem*,const TQPoint&,int)</signal> <receiver>SQ_Filters</receiver> - <slot>slotFilterRenameRequest(QListViewItem*,const QPoint&,int)</slot> + <slot>slotFilterRenameRequest(TQListViewItem*,const TQPoint&,int)</slot> </connection> <connection> <sender>pushOK</sender> @@ -398,16 +398,16 @@ <include location="local" impldecl="in implementation">ksquirrel.h</include> <include location="local" impldecl="in implementation">sq_filters.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>slotNewFilter()</slot> <slot>slotFilterClear()</slot> <slot>slotFilterUp()</slot> <slot>slotFilterDown()</slot> <slot returnType="int">start()</slot> - <slot>slotFilterRenameRequest( QListViewItem * item, const QPoint &, int pos )</slot> -</slots> + <slot>slotFilterRenameRequest( TQListViewItem * item, const TQPoint &, int pos )</slot> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_filters.ui.h b/ksquirrel/sq_filters.ui.h index 286fecc..3edad81 100644 --- a/ksquirrel/sq_filters.ui.h +++ b/ksquirrel/sq_filters.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -11,18 +11,18 @@ void SQ_Filters::init() { listFilters->setSorting(-1); - QListViewItem *itemafter = 0L, *item; + TQListViewItem *itemafter = 0L, *item; - QValueList<QString>::iterator nEND = KSquirrel::app()->filtersNames()->end(); - QValueList<QString>::iterator it_name = KSquirrel::app()->filtersNames()->begin(); - QValueList<QString>::iterator it_ext = KSquirrel::app()->filtersExtensions()->begin(); + TQValueList<TQString>::iterator nEND = KSquirrel::app()->filtersNames()->end(); + TQValueList<TQString>::iterator it_name = KSquirrel::app()->filtersNames()->begin(); + TQValueList<TQString>::iterator it_ext = KSquirrel::app()->filtersExtensions()->begin(); for(;it_name != nEND;++it_name,++it_ext) { if(itemafter) - item = new QListViewItem(listFilters, itemafter, *it_name, *it_ext); + item = new TQListViewItem(listFilters, itemafter, *it_name, *it_ext); else - item = new QListViewItem(listFilters, *it_name, *it_ext); + item = new TQListViewItem(listFilters, *it_name, *it_ext); itemafter = item; @@ -50,12 +50,12 @@ void SQ_Filters::init() void SQ_Filters::slotNewFilter() { - QListViewItem *itemafter = listFilters->lastItem(), *item; + TQListViewItem *itemafter = listFilters->lastItem(), *item; if(itemafter) - item = new QListViewItem(listFilters, itemafter, i18n("Name"), "*."); + item = new TQListViewItem(listFilters, itemafter, i18n("Name"), "*."); else - item = new QListViewItem(listFilters, i18n("Name"), "*."); + item = new TQListViewItem(listFilters, i18n("Name"), "*."); item->setRenameEnabled(0, true); item->setRenameEnabled(1, true); @@ -67,7 +67,7 @@ void SQ_Filters::slotNewFilter() void SQ_Filters::slotFilterClear() { - QListViewItem *item = listFilters->currentItem(); + TQListViewItem *item = listFilters->currentItem(); if(!item) return; @@ -81,11 +81,11 @@ void SQ_Filters::slotFilterClear() void SQ_Filters::slotFilterUp() { - QListViewItem *item = listFilters->currentItem(); + TQListViewItem *item = listFilters->currentItem(); if(!item) return; - QListViewItem *itemafter = item->itemAbove(); + TQListViewItem *itemafter = item->itemAbove(); if(!itemafter) return; @@ -94,11 +94,11 @@ void SQ_Filters::slotFilterUp() void SQ_Filters::slotFilterDown() { - QListViewItem *item = listFilters->currentItem(); + TQListViewItem *item = listFilters->currentItem(); if(!item) return; - QListViewItem *itemafter = item->itemBelow(); + TQListViewItem *itemafter = item->itemBelow(); if(!itemafter) return; @@ -110,9 +110,9 @@ int SQ_Filters::start() { int result = exec(); - if(result == QDialog::Accepted) + if(result == TQDialog::Accepted) { - QListViewItem *cur = listFilters->firstChild(); + TQListViewItem *cur = listFilters->firstChild(); KSquirrel::app()->filtersNames()->clear(); KSquirrel::app()->filtersExtensions()->clear(); @@ -131,7 +131,7 @@ int SQ_Filters::start() } -void SQ_Filters::slotFilterRenameRequest( QListViewItem *item, const QPoint &, int pos ) +void SQ_Filters::slotFilterRenameRequest( TQListViewItem *item, const TQPoint &, int pos ) { if(item) item->startRename(((pos>=0)?pos:0)); diff --git a/ksquirrel/sq_glinfo.ui b/ksquirrel/sq_glinfo.ui index 5cc7261..4aadd44 100644 --- a/ksquirrel/sq_glinfo.ui +++ b/ksquirrel/sq_glinfo.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_GLInfo</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_GLInfo</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListView" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQListView" row="0" column="0" rowspan="1" colspan="2"> <column> <property name="text"> <string>Parameter</string> @@ -114,7 +114,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QPushButton" row="2" column="1"> + <widget class="TQPushButton" row="2" column="1"> <property name="name"> <cstring>pushClose</cstring> </property> @@ -132,7 +132,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>431</width> <height>21</height> @@ -155,11 +155,11 @@ </tabstops> <includes> <include location="global" impldecl="in implementation">GL/gl.h</include> - <include location="global" impldecl="in implementation">qmap.h</include> + <include location="global" impldecl="in implementation">tqmap.h</include> <include location="local" impldecl="in implementation">sq_glinfo.ui.h</include> </includes> <functions> <function access="private" specifier="non virtual">init()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_glinfo.ui.h b/ksquirrel/sq_glinfo.ui.h index 52b92f5..323dbbc 100644 --- a/ksquirrel/sq_glinfo.ui.h +++ b/ksquirrel/sq_glinfo.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). @@ -14,16 +14,16 @@ void SQ_GLInfo::init() { listGL->setSorting(-1); - QListViewItem *item; - QMap<QString, GLenum> v; + TQListViewItem *item; + TQMap<TQString, GLenum> v; v.insert("GL_VENDOR", GL_VENDOR); v.insert("GL_RENDERER", GL_RENDERER); v.insert("GL_VERSION", GL_VERSION); - for(QMap<QString, GLenum>::ConstIterator it = v.constBegin(); it != v.constEnd(); ++it) + for(TQMap<TQString, GLenum>::ConstIterator it = v.constBegin(); it != v.constEnd(); ++it) { - item = listGL->findItem(it.key().latin1(), 0); + item = listGL->tqfindItem(it.key().latin1(), 0); if(item) { diff --git a/ksquirrel/sq_glparts.cpp b/ksquirrel/sq_glparts.cpp index 34a523d..ec55d89 100644 --- a/ksquirrel/sq_glparts.cpp +++ b/ksquirrel/sq_glparts.cpp @@ -196,20 +196,20 @@ void Tab::empty() sx = sy = sw = sh = 0; elapsed = 0; - wm = QWMatrix(); + wm = TQWMatrix(); glselection = -1; - srect = QRect(); + srect = TQRect(); manualBlocked = false; isflippedV = isflippedH = false; broken = false; m_original = KURL(); - File = QString::null; - m_File = QString::null; - quickImageInfo = QString::null; - fmt_ext = QString::null; + File = TQString(); + m_File = TQString(); + quickImageInfo = TQString(); + fmt_ext = TQString(); } void Tab::nullMatrix() diff --git a/ksquirrel/sq_glparts.h b/ksquirrel/sq_glparts.h index 3405f33..24c538c 100644 --- a/ksquirrel/sq_glparts.h +++ b/ksquirrel/sq_glparts.h @@ -18,10 +18,10 @@ #ifndef SQ_GLPARTS_H #define SQ_GLPARTS_H -#include <qgl.h> +#include <tqgl.h> -#include <qwmatrix.h> -#include <qrect.h> +#include <tqwmatrix.h> +#include <tqrect.h> #include <kurl.h> @@ -123,11 +123,11 @@ struct Tab GLfloat curangle; KURL m_original; - QString File, m_File, quickImageInfo; - QString fmt_ext; + TQString File, m_File, quickImageInfo; + TQString fmt_ext; - QWMatrix wm; - QRect srect; + TQWMatrix wm; + TQRect srect; int orient; int current; diff --git a/ksquirrel/sq_glselectionpainter.cpp b/ksquirrel/sq_glselectionpainter.cpp index 3d60389..9594f28 100644 --- a/ksquirrel/sq_glselectionpainter.cpp +++ b/ksquirrel/sq_glselectionpainter.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include <qbitmap.h> -#include <qpainter.h> +#include <tqbitmap.h> +#include <tqpainter.h> #include <cmath> @@ -63,10 +63,10 @@ void SQ_GLSelectionPainter::move(int x, int y) { hackXY(x, y); - int X = QMAX(x, xmoveold); - int Y = QMIN(y, ymoveold); - int Xmin = QMIN(x, xmoveold); - int Ymin = QMAX(y, ymoveold); + int X = TQMAX(x, xmoveold); + int Y = TQMIN(y, ymoveold); + int Xmin = TQMIN(x, xmoveold); + int Ymin = TQMAX(y, ymoveold); sx = Xmin; sy = Ymin; diff --git a/ksquirrel/sq_glselectionpainter.h b/ksquirrel/sq_glselectionpainter.h index 59a6ce2..19cec2c 100644 --- a/ksquirrel/sq_glselectionpainter.h +++ b/ksquirrel/sq_glselectionpainter.h @@ -18,8 +18,8 @@ #ifndef SQ_GLSELECTIONPAINTER_H #define SQ_GLSELECTIONPAINTER_H -#include <qrect.h> -#include <qpoint.h> +#include <tqrect.h> +#include <tqpoint.h> class SQ_GLWidget; @@ -41,7 +41,7 @@ class SQ_GLSelectionPainter void setSourceSize(int, int); - QPoint center() const; + TQPoint center() const; void draw(); @@ -60,14 +60,14 @@ class SQ_GLSelectionPainter void begin(Type tp, int x, int y, bool U = true); void move(int x, int y); - void setGeometry(const QRect &rc); + void setGeometry(const TQRect &rc); void end(); /* - * Selected rectangle geometry + * Selected rectangle tqgeometry */ - QPoint pos() const; - QSize size() const; + TQPoint pos() const; + TQSize size() const; private: void drawEllipse(float xradius, float yradius); @@ -86,15 +86,15 @@ class SQ_GLSelectionPainter }; inline -QPoint SQ_GLSelectionPainter::pos() const +TQPoint SQ_GLSelectionPainter::pos() const { - return valid() ? QPoint(sourcew/2 + sx, sourceh/2 - sy) : QPoint(); + return valid() ? TQPoint(sourcew/2 + sx, sourceh/2 - sy) : TQPoint(); } inline -QSize SQ_GLSelectionPainter::size() const +TQSize SQ_GLSelectionPainter::size() const { - return valid() ? QSize(sw, sh) : QSize(); + return valid() ? TQSize(sw, sh) : TQSize(); } inline @@ -104,7 +104,7 @@ int SQ_GLSelectionPainter::type() const } inline -void SQ_GLSelectionPainter::setGeometry(const QRect &rc) +void SQ_GLSelectionPainter::setGeometry(const TQRect &rc) { int X = rc.x(), Y = rc.y(); @@ -136,9 +136,9 @@ bool SQ_GLSelectionPainter::valid() const } inline -QPoint SQ_GLSelectionPainter::center() const +TQPoint SQ_GLSelectionPainter::center() const { - return QPoint(sx + sw/2, sy - sh/2); + return TQPoint(sx + sw/2, sy - sh/2); } inline diff --git a/ksquirrel/sq_glu.h b/ksquirrel/sq_glu.h index 9128d12..7da7a80 100644 --- a/ksquirrel/sq_glu.h +++ b/ksquirrel/sq_glu.h @@ -35,7 +35,7 @@ * in original GLU library - gluLookAt(). It would be better to place it * in standalone namespace, and remove -lGLU dependency at all. * - * Note: Now KSquirrel doesn't use GLU, but Qt's QGLWidget still + * Note: Now KSquirrel doesn't use GLU, but TQt's TQGLWidget still * depends on <GL/glu.h> */ diff --git a/ksquirrel/sq_glview.cpp b/ksquirrel/sq_glview.cpp index 56f9645..18c1520 100644 --- a/ksquirrel/sq_glview.cpp +++ b/ksquirrel/sq_glview.cpp @@ -19,11 +19,11 @@ #include "config.h" #endif -#include <qlayout.h> -#include <qlabel.h> -#include <qtoolbutton.h> -#include <qtooltip.h> -#include <qhbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> +#include <tqhbox.h> #include <kaction.h> #include <kstatusbar.h> @@ -46,7 +46,7 @@ SQ_GLView * SQ_GLView::m_instance = 0; -SQ_GLView::SQ_GLView(QWidget *parent) : QVBox(parent, "ksquirrel-image-window") +SQ_GLView::SQ_GLView(TQWidget *tqparent) : TQVBox(tqparent, "ksquirrel-image-window") { m_instance = this; @@ -60,7 +60,7 @@ SQ_GLView::~SQ_GLView() void SQ_GLView::createContent() { - box = new QVBox(this); + box = new TQVBox(this); m_toolbar = new SQ_ToolBar(box); m_toolbar->setMouseTracking(true); @@ -75,7 +75,7 @@ void SQ_GLView::createContent() m_tabbar->setHoverCloseButton(m_tabsclose); m_tabbar->setHoverCloseButtonDelayed(false); m_tabbar->setMouseTracking(true); - m_tabbar->setFocusPolicy(QWidget::NoFocus); + m_tabbar->setFocusPolicy(TQ_NoFocus); box->setStretchFactor(m_toolbar, 1); @@ -85,39 +85,39 @@ void SQ_GLView::createContent() gl->glInitA(); gl->setFocus(); - connect(m_tabbar, SIGNAL(selected(int)), gl, SLOT(slotChangeTab(int))); - connect(m_tabbar, SIGNAL(closeRequest(int)), gl, SLOT(slotCloseRequest(int))); - connect(m_tabbar, SIGNAL(mouseMiddleClick(int)), gl, SLOT(slotCloseRequest(int))); - connect(gl, SIGNAL(tabCountChanged()), this, SLOT(slotTabCountChanged())); + connect(m_tabbar, TQT_SIGNAL(selected(int)), gl, TQT_SLOT(slotChangeTab(int))); + connect(m_tabbar, TQT_SIGNAL(closeRequest(int)), gl, TQT_SLOT(slotCloseRequest(int))); + connect(m_tabbar, TQT_SIGNAL(mouseMiddleClick(int)), gl, TQT_SLOT(slotCloseRequest(int))); + connect(gl, TQT_SIGNAL(tabCountChanged()), this, TQT_SLOT(slotTabCountChanged())); setStretchFactor(gl, 1); sbar = new KStatusBar(this); sbar->setMouseTracking(true); - // create QLabels, fill 'names' with pointers - QHBox *sqSBDecodedBox = new QHBox; + // create TQLabels, fill 'names' with pointers + TQHBox *sqSBDecodedBox = new TQHBox; sqSBDecodedBox->setSpacing(2); - QLabel *sqSBDecodedI = new QLabel(QString::null, sqSBDecodedBox, "SBDecodedI"); + TQLabel *sqSBDecodedI = new TQLabel(TQString(), sqSBDecodedBox, "SBDecodedI"); names.insert("SBDecodedI", sqSBDecodedI); - QLabel *sqSBDecoded = new QLabel(QString::null, sqSBDecodedBox, "SBDecoded"); + TQLabel *sqSBDecoded = new TQLabel(TQString(), sqSBDecodedBox, "SBDecoded"); names.insert("SBDecoded", sqSBDecoded); - QLabel *sqSBGLZoom = new QLabel(QString::null, 0, "SBGLZoom"); + TQLabel *sqSBGLZoom = new TQLabel(TQString(), 0, "SBGLZoom"); names.insert("SBGLZoom", sqSBGLZoom); - QLabel *sqSBGLAngle = new QLabel(QString::null, 0, "SBGLAngle"); + TQLabel *sqSBGLAngle = new TQLabel(TQString(), 0, "SBGLAngle"); names.insert("SBGLAngle", sqSBGLAngle); - QLabel *sqSBLoaded = new QLabel(QString::null, 0, "SBLoaded"); - QToolTip::add(sqSBLoaded, i18n("Loading time")); + TQLabel *sqSBLoaded = new TQLabel(TQString(), 0, "SBLoaded"); + TQToolTip::add(sqSBLoaded, i18n("Loading time")); names.insert("SBLoaded", sqSBLoaded); - QLabel *sqSBFrame = new QLabel(QString::null, 0, "SBFrame"); + TQLabel *sqSBFrame = new TQLabel(TQString(), 0, "SBFrame"); names.insert("SBFrame", sqSBFrame); - QLabel *sqSBFile = new KSqueezedTextLabel(QString::null, 0, "SBFile"); + TQLabel *sqSBFile = new KSqueezedTextLabel(TQString(), 0, "SBFile"); names.insert("SBFile", sqSBFile); - sqSBFrame->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter | Qt::ExpandTabs); - sqSBFile->setAlignment(Qt::AlignRight | Qt::AlignTop); - QFont font = sqSBFile->font(); + sqSBFrame->tqsetAlignment(TQt::AlignHCenter | TQt::AlignVCenter | TQt::ExpandTabs); + sqSBFile->tqsetAlignment(TQt::AlignRight | TQt::AlignTop); + TQFont font = sqSBFile->font(); font.setBold(true); sqSBFile->setFont(font); @@ -133,13 +133,13 @@ void SQ_GLView::createContent() sbar->setShown(SQ_Config::instance()->readBoolEntry("statusbar", true)); - // restore geometry from config file + // restore tqgeometry from config file restoreGeometry(); gl->matrixChanged(); } -void SQ_GLView::closeEvent(QCloseEvent *e) +void SQ_GLView::closeEvent(TQCloseEvent *e) { // ignore event e->ignore(); @@ -148,18 +148,18 @@ void SQ_GLView::closeEvent(QCloseEvent *e) KSquirrel::app()->closeGLWidget(); } -bool SQ_GLView::eventFilter(QObject *watched, QEvent *e) +bool SQ_GLView::eventFilter(TQObject *watched, TQEvent *e) { - if(watched == this) + if(TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(this)) { // stop animation, if SQ_GLView is hidden (animation becomes useless) - if(/*e->type() == QEvent::WindowDeactivate || */e->type() == QEvent::Hide) + if(/*e->type() == TQEvent::WindowDeactivate || */e->type() == TQEvent::Hide) { gl->stopAnimation(); return true; } // resume animation, if needed - else if(/*e->type() == QEvent::WindowActivate || */e->type() == QEvent::Show) + else if(/*e->type() == TQEvent::WindowActivate || */e->type() == TQEvent::Show) { if(!gl->manualBlocked()) gl->startAnimation(); @@ -167,10 +167,10 @@ bool SQ_GLView::eventFilter(QObject *watched, QEvent *e) return true; } else // call to default eventFilter() - return QVBox::eventFilter(watched, e); + return TQVBox::eventFilter(watched, e); } else - return QVBox::eventFilter(watched, e); + return TQVBox::eventFilter(watched, e); } void SQ_GLView::saveGeometry() @@ -181,13 +181,13 @@ void SQ_GLView::saveGeometry() void SQ_GLView::restoreGeometry() { - QPoint p_def(0,0); - QSize sz_def(660, 480); + TQPoint p_def(0,0); + TQSize sz_def(660, 480); SQ_Config::instance()->setGroup("GL view"); - QPoint p = SQ_Config::instance()->readPointEntry("pos", &p_def); - QSize sz = SQ_Config::instance()->readSizeEntry("size", &sz_def); + TQPoint p = SQ_Config::instance()->readPointEntry("pos", &p_def); + TQSize sz = SQ_Config::instance()->readSizeEntry("size", &sz_def); move(p); resize(sz); @@ -198,18 +198,18 @@ void SQ_GLView::restoreGeometry() */ void SQ_GLView::resetStatusBar() { - QString fl = QString::fromLatin1("----"); + TQString fl = TQString::tqfromLatin1("----"); names["SBGLZoom"]->setText(fl); names["SBGLAngle"]->setText(fl); names["SBLoaded"]->setText(fl); - names["SBDecodedI"]->setText(QString::fromLatin1("--")); - names["SBFile"]->setText(QString::fromLatin1("--------")); + names["SBDecodedI"]->setText(TQString::tqfromLatin1("--")); + names["SBFile"]->setText(TQString::tqfromLatin1("--------")); names["SBDecoded"]->setText(fl); - names["SBFrame"]->setText(QString::fromLatin1("0/0")); + names["SBFrame"]->setText(TQString::tqfromLatin1("0/0")); } -SQ_ToolBar::SQ_ToolBar(QWidget *parent) : KToolBar(parent) +SQ_ToolBar::SQ_ToolBar(TQWidget *tqparent) : KToolBar(tqparent) { setFixedHeight(SQ_ToolButton::fixedWidth() + 5); boxLayout()->setSpacing(0); @@ -219,14 +219,14 @@ SQ_ToolBar::SQ_ToolBar(QWidget *parent) : KToolBar(parent) SQ_ToolBar::~SQ_ToolBar() {} -void SQ_ToolBar::mouseReleaseEvent(QMouseEvent *e) +void SQ_ToolBar::mouseReleaseEvent(TQMouseEvent *e) { e->accept(); } -void SQ_GLView::addPage(const QString &label) +void SQ_GLView::addPage(const TQString &label) { - QTab *tab = new QTab(label); + TQTab *tab = new TQTab(label); m_tabbar->addTab(tab); @@ -267,10 +267,10 @@ void SQ_GLView::setupTabbar() cnt = m_tabbar->count(); for(int i = 0;i < cnt;i++) - m_tabbar->tabAt(i)->setIconSet(m_tabsclose ? SmallIcon("fileclose") : QPixmap()); + m_tabbar->tabAt(i)->setIconSet(m_tabsclose ? SmallIcon("fileclose") : TQPixmap()); m_tabbar->setHoverCloseButton(m_tabsclose); - m_tabbar->layoutTabs(); + m_tabbar->tqlayoutTabs(); } if(m_tabs == SQ_Config::instance()->readBoolEntry("tabs", false)) diff --git a/ksquirrel/sq_glview.h b/ksquirrel/sq_glview.h index a19fe7c..6841f04 100644 --- a/ksquirrel/sq_glview.h +++ b/ksquirrel/sq_glview.h @@ -18,8 +18,8 @@ #ifndef SQ_GLVIEW_H #define SQ_GLVIEW_H -#include <qvbox.h> -#include <qmap.h> +#include <tqvbox.h> +#include <tqmap.h> #include <ktoolbar.h> @@ -31,16 +31,16 @@ class SQ_Config; class KStatusBar; class KTabBar; -class QLabel; +class TQLabel; class SQ_ToolBar : public KToolBar { public: - SQ_ToolBar(QWidget *parent); + SQ_ToolBar(TQWidget *tqparent); ~SQ_ToolBar(); protected: - void mouseReleaseEvent(QMouseEvent *); + void mouseReleaseEvent(TQMouseEvent *); }; /* @@ -69,18 +69,19 @@ class SQ_ToolBar : public KToolBar * */ -class SQ_GLView : public QVBox +class SQ_GLView : public TQVBox { Q_OBJECT + TQ_OBJECT public: - SQ_GLView(QWidget *parent = 0); + SQ_GLView(TQWidget *tqparent = 0); ~SQ_GLView(); void leftTab(); void rightTab(); - void addPage(const QString &label); + void addPage(const TQString &label); void removePage(int); void removeTabs(); @@ -114,12 +115,12 @@ class SQ_GLView : public QVBox */ SQ_ToolBar* toolbar(); - QWidget* boxBar(); + TQWidget* boxBar(); /* * Get a pointer to a widget in statusbar by name. */ - QLabel* sbarWidget(const QString &name) const; + TQLabel* sbarWidget(const TQString &name) const; static SQ_GLView* window() { return m_instance; } @@ -133,7 +134,7 @@ class SQ_GLView : public QVBox * ignore close event. If current version is 'small', save all important * parameters to config file and accept close event (exit). */ - void closeEvent(QCloseEvent *e); + void closeEvent(TQCloseEvent *e); private: @@ -142,16 +143,16 @@ class SQ_GLView : public QVBox */ void createContent(); - virtual bool eventFilter(QObject *watched, QEvent *e); + virtual bool eventFilter(TQObject *watched, TQEvent *e); private: SQ_GLWidget *gl; KStatusBar *sbar; - QMap<QString, QLabel* > names; + TQMap<TQString, TQLabel* > names; SQ_ToolBar *m_toolbar; KTabBar *m_tabbar; bool m_tabs, m_tabsclose; - QVBox *box; + TQVBox *box; static SQ_GLView *m_instance; }; @@ -175,7 +176,7 @@ KStatusBar* SQ_GLView::statusbar() } inline -QLabel* SQ_GLView::sbarWidget(const QString &name) const +TQLabel* SQ_GLView::sbarWidget(const TQString &name) const { return names[name]; } @@ -193,7 +194,7 @@ bool SQ_GLView::tabsClose() const } inline -QWidget* SQ_GLView::boxBar() +TQWidget* SQ_GLView::boxBar() { return box; } diff --git a/ksquirrel/sq_glwidget.cpp b/ksquirrel/sq_glwidget.cpp index 79e5108..5c2fa4c 100644 --- a/ksquirrel/sq_glwidget.cpp +++ b/ksquirrel/sq_glwidget.cpp @@ -19,15 +19,15 @@ #include "config.h" #endif -#include <qeventloop.h> -#include <qstringlist.h> -#include <qfileinfo.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qdatetime.h> -#include <qslider.h> -#include <qlabel.h> +#include <tqeventloop.h> +#include <tqstringlist.h> +#include <tqfileinfo.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqdatetime.h> +#include <tqslider.h> +#include <tqlabel.h> #include <kapplication.h> #include <kaction.h> @@ -105,7 +105,7 @@ static const float SQ_ONSCREEN_LAYER = 10000.0; /* ***************************************************************************************** */ -SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, name) +SQ_GLWidget::SQ_GLWidget(TQWidget *tqparent, const char *name) : TQGLWidget(tqparent, name) { kdDebug() << "+SQ_GLWidget" << endl; @@ -113,7 +113,7 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, m_instance = this; #ifdef KSQUIRREL_PART - connect(&t_glv, SIGNAL(message(const QString &)), this, SIGNAL(message(const QString &))); + connect(&t_glv, TQT_SIGNAL(message(const TQString &)), this, TQT_SIGNAL(message(const TQString &))); #endif zoomMenu = 0; @@ -121,18 +121,18 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, images = 0; parts_broken = 0; - ac = new KActionCollection(this, this, "GLWidget actionCollection"); + ac = new KActionCollection(this, TQT_TQOBJECT(this), "GLWidget actionCollection"); changed = blocked = decoded = reset_mode = false; movetype = -1; buffer = new RGBA [512 * 512]; zoomFactor = 1.0; old_id = -1; - menu = new QPopupMenu(this); + menu = new TQPopupMenu(this); hackResizeGL = false; lastCopy = KURL::fromPathOrURL("/"); oldZoom = -1; - percentsLabel = new QLabel(this); + percentsLabel = new TQLabel(this); percentsLabel->move(4, 4); percentsLabel->hide(); @@ -147,11 +147,11 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, linear = SQ_Config::instance()->readBoolEntry("zoom_nice", true); // load background for transparent image - BGquads = QImage(locate("data", "images/checker.png")); + BGquads = TQImage(locate("data", "images/checker.png")); if(BGquads.isNull()) { - BGquads = QImage(32, 32, 32); + BGquads = TQImage(32, 32, 32); BGquads.setAlphaBuffer(true); BGquads.fill(0); } @@ -165,7 +165,7 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, // load cursors setCursor(KCursor::arrowCursor()); - setFocusPolicy(QWidget::WheelFocus); + setFocusPolicy(TQ_WheelFocus); setAcceptDrops(true); // popup menu with image pages @@ -189,25 +189,25 @@ SQ_GLWidget::SQ_GLWidget(QWidget *parent, const char *name) : QGLWidget(parent, KCursor::setHideCursorDelay(2500); #ifndef KSQUIRREL_PART - timer_prev = new QTimer(this); - timer_next = new QTimer(this); + timer_prev = new TQTimer(this); + timer_next = new TQTimer(this); Q_CHECK_PTR(timer_prev); Q_CHECK_PTR(timer_next); - connect(timer_prev, SIGNAL(timeout()), SQ_WidgetStack::instance(), SLOT(emitPreviousSelected())); - connect(timer_next, SIGNAL(timeout()), SQ_WidgetStack::instance(), SLOT(emitNextSelected())); + connect(timer_prev, TQT_SIGNAL(timeout()), SQ_WidgetStack::instance(), TQT_SLOT(emitPreviousSelected())); + connect(timer_next, TQT_SIGNAL(timeout()), SQ_WidgetStack::instance(), TQT_SLOT(emitNextSelected())); #endif - timer_anim = new QTimer(this); + timer_anim = new TQTimer(this); Q_CHECK_PTR(timer_anim); - connect(timer_anim, SIGNAL(timeout()), this, SLOT(slotAnimateNext())); + connect(timer_anim, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAnimateNext())); - connect(images, SIGNAL(activated(int)), this, SLOT(slotSetCurrentImage(int))); - connect(images, SIGNAL(aboutToHide()), this, SLOT(slotImagesHidden())); - connect(images, SIGNAL(aboutToShow()), this, SLOT(slotImagesShown())); + connect(images, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetCurrentImage(int))); + connect(images, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(slotImagesHidden())); + connect(images, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotImagesShown())); gls = new SQ_GLSelectionPainter(this); } @@ -229,7 +229,7 @@ SQ_GLWidget::~SQ_GLWidget() delete tmp; } -// Initialize OpenGL context. Used internally by QGLWidget. +// Initialize OpenGL context. Used internally by TQGLWidget. void SQ_GLWidget::initializeGL() { setClearColor(); @@ -253,7 +253,7 @@ void SQ_GLWidget::initializeGL() initMarks(); } -// Resize OpenGL context. Used internally by QGLWidget. +// Resize OpenGL context. Used internally by TQGLWidget. void SQ_GLWidget::resizeGL(int width, int height) { gls->setSourceSize(width, height); @@ -321,7 +321,7 @@ void SQ_GLWidget::draw_background(void *bits, unsigned int *tex, int dim, GLfloa glEnd(); } -// Redraw OpenGL context. Used internally by QGLWidget. +// Redraw OpenGL context. Used internally by TQGLWidget. void SQ_GLWidget::paintGL() { int z; @@ -333,7 +333,7 @@ void SQ_GLWidget::paintGL() { matrix_push(); matrix_pure_reset(); - QPoint p = gls->center(); + TQPoint p = gls->center(); // move to selection center MATRIX_X = p.x(); @@ -484,17 +484,17 @@ void SQ_GLWidget::paintGL() */ void SQ_GLWidget::matrixChanged() { - QString str; + TQString str; float m = getZoom(); float fzoom = m * 100.0; float z = (m < 1.0) ? 1.0/m : m; // construct zoom - str = QString::fromLatin1("%1% [%2:%3]") - .arg(fzoom, 0, 'f', 1) - .arg((m < 1.0)?1.0:z, 0, 'f', 1) - .arg((m > 1.0)?1.0:z, 0, 'f', 1); + str = TQString::tqfromLatin1("%1% [%2:%3]") + .tqarg(fzoom, 0, 'f', 1) + .tqarg((m < 1.0)?1.0:z, 0, 'f', 1) + .tqarg((m > 1.0)?1.0:z, 0, 'f', 1); #ifndef KSQUIRREL_PART SQ_GLView::window()->sbarWidget("SBGLZoom")->setText(str); @@ -503,10 +503,10 @@ void SQ_GLWidget::matrixChanged() #endif // construct rotation angle - str = QString::fromLatin1("%1%2 %3 deg") - .arg((tab->isflippedV)?"V":"") - .arg((tab->isflippedH)?"H":"") - .arg(tab->curangle, 0, 'f', 1); + str = TQString::tqfromLatin1("%1%2 %3 deg") + .tqarg((tab->isflippedV)?"V":"") + .tqarg((tab->isflippedH)?"H":"") + .tqarg(tab->curangle, 0, 'f', 1); #ifndef KSQUIRREL_PART SQ_GLView::window()->sbarWidget("SBGLAngle")->setText(str); @@ -519,7 +519,7 @@ void SQ_GLWidget::matrixChanged() * Mouse wheel event. Let's load next/previous image, or * zoom in/zoom out (depends on settings). */ -void SQ_GLWidget::wheelEvent(QWheelEvent *e) +void SQ_GLWidget::wheelEvent(TQWheelEvent *e) { if(e->delta() < 0 && e->state() == Qt::NoButton) { @@ -548,18 +548,18 @@ void SQ_GLWidget::wheelEvent(QWheelEvent *e) } // some special bindings: // if CTRL key is pressed, zoom 2x or 0.5x - else if(e->delta() < 0 && e->state() == Qt::ControlButton) + else if(e->delta() < 0 && e->state() == TQt::ControlButton) matrix_zoom(2.0); - else if(e->delta() > 0 && e->state() == Qt::ControlButton) + else if(e->delta() > 0 && e->state() == TQt::ControlButton) matrix_zoom(0.5f); - else if(e->delta() < 0 && e->state() == Qt::ShiftButton) + else if(e->delta() < 0 && e->state() == TQt::ShiftButton) slotZoomPlus(); - else if(e->delta() > 0 && e->state() == Qt::ShiftButton) + else if(e->delta() > 0 && e->state() == TQt::ShiftButton) slotZoomMinus(); } // User pressed mouse button down. -void SQ_GLWidget::mousePressEvent(QMouseEvent *e) +void SQ_GLWidget::mousePressEvent(TQMouseEvent *e) { setFocus(); @@ -567,7 +567,7 @@ void SQ_GLWidget::mousePressEvent(QMouseEvent *e) if(e->button() == Qt::LeftButton && e->state() == Qt::NoButton && tab->glselection == -1) { #ifndef KSQUIRREL_PART - QTime t = QTime::currentTime(); + TQTime t = TQTime::currentTime(); SQ_Config::instance()->setGroup("GL view"); int dc = SQ_Config::instance()->readNumEntry("double_click", 0); @@ -593,7 +593,7 @@ void SQ_GLWidget::mousePressEvent(QMouseEvent *e) movetype = 1; } // left button + SHIFT, let's start drawing zoom frame - else if(e->button() == Qt::LeftButton && (e->state() == Qt::ShiftButton || tab->glselection != -1)) + else if(e->button() == Qt::LeftButton && (e->state() == TQt::ShiftButton || tab->glselection != -1)) { // stop animation! stopAnimation(); @@ -610,14 +610,14 @@ void SQ_GLWidget::mousePressEvent(QMouseEvent *e) } // right button - show context menu else if(e->button() == Qt::RightButton) - menu->popup(QCursor::pos()); + menu->popup(TQCursor::pos()); // middle button - toggle fullscreen state else if(e->button() == Qt::MidButton) toggleFullScreen(); } // User moved mouse. -void SQ_GLWidget::mouseMoveEvent(QMouseEvent *e) +void SQ_GLWidget::mouseMoveEvent(TQMouseEvent *e) { // user didn't press any mouse button before ? if(movetype == -1 && fullscreen()) @@ -657,7 +657,7 @@ void SQ_GLWidget::mouseMoveEvent(QMouseEvent *e) } // User released some mouse button. -void SQ_GLWidget::mouseReleaseEvent(QMouseEvent *) +void SQ_GLWidget::mouseReleaseEvent(TQMouseEvent *) { if(movetype == -1) return; @@ -670,14 +670,14 @@ void SQ_GLWidget::mouseReleaseEvent(QMouseEvent *) { setCursor(KCursor::arrowCursor()); - QSize sz = gls->size(); - QPoint pt = gls->pos(); - QRect lastRect(pt.x(), pt.y(), sz.width(), sz.height()); + TQSize sz = gls->size(); + TQPoint pt = gls->pos(); + TQRect lastRect(pt.x(), pt.y(), sz.width(), sz.height()); gls->end(); - QPoint lastC = lastRect.center(); - QPoint O(width() / 2, height() / 2); + TQPoint lastC = lastRect.center(); + TQPoint O(width() / 2, height() / 2); if(lastRect.width() > 2 && lastRect.height() > 2) { @@ -713,7 +713,7 @@ void SQ_GLWidget::mouseReleaseEvent(QMouseEvent *) * Zoom to 'r'. Will be called after somebody used right mouse button * to select zoom region. */ -bool SQ_GLWidget::zoomRect(const QRect &r) +bool SQ_GLWidget::zoomRect(const TQRect &r) { // calculate zoom factor float factor = 1.0; @@ -1204,7 +1204,7 @@ bool SQ_GLWidget::showFrames(int i, Parts *p, bool swap) void SQ_GLWidget::setupBits(Parts *p, RGBA *_buffer, int y, int x) { - QPair<int, int> pair = SQ_GLWidget::calcRealDimensions(*p, y, x); + TQPair<int, int> pair = SQ_GLWidget::calcRealDimensions(*p, y, x); int offs = p->realw * pair.second + pair.first; RGBA *orig = p->buffer->data() + offs; @@ -1219,7 +1219,7 @@ void SQ_GLWidget::setupBits(Parts *p, RGBA *_buffer, int y, int x) /* * Start decoding given image. We can call it from anywhere. */ -void SQ_GLWidget::startDecoding(const QString &file) +void SQ_GLWidget::startDecoding(const TQString &file) { #ifndef KSQUIRREL_PART if(SQ_PreviewWidget::instance()->cancel()) @@ -1240,10 +1240,10 @@ void SQ_GLWidget::startDecoding(const QString &file) images->clear(); tab->m_File = file; // original name - tab->File = QFile::encodeName(tab->m_File); // translated name + tab->File = TQFile::encodeName(tab->m_File); // translated name tab->m_original = m_original; - QFileInfo fm(file); + TQFileInfo fm(file); tab->fmt_ext = fm.extension(false); tab->fmt_size = fm.size(); @@ -1253,7 +1253,7 @@ void SQ_GLWidget::startDecoding(const QString &file) #endif if(m_expected.isEmpty()) - KApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers); + KApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); decode(); } @@ -1264,7 +1264,7 @@ void SQ_GLWidget::startDecoding(const QString &file) */ bool SQ_GLWidget::prepare() { - QString status; + TQString status; tab = &tmptab; @@ -1273,7 +1273,7 @@ bool SQ_GLWidget::prepare() if(!m_lib) { - KMessageBox::error(this, i18n("Codec for %1 format not found").arg(tab->fmt_ext)); + KMessageBox::error(this, i18n("Codec for %1 format not found").tqarg(tab->fmt_ext)); reset_mode = false; tab = tabold; return false; @@ -1378,7 +1378,7 @@ bool SQ_GLWidget::prepare() SQ_GLView::window()->addPage(KStringHandler::csqueeze(tab->m_original.fileName(), SQ_TAB_TEXT_LENGTH)); SQ_GLView::window()->tabbar()->setCurrentTab(SQ_GLView::window()->tabbar()->tabAt(lastId)); - // QTabBar::show will emit selected(int), + // TQTabBar::show will emit selected(int), // we don't want it emit tabCountChanged(); SQ_GLView::window()->tabbar()->blockSignals(false); @@ -1393,7 +1393,7 @@ bool SQ_GLWidget::prepare() tab->codeK = tab->lib->codec; // start decoding! - i = tab->codeK->read_init(tab->File); + i = tab->codeK->read_init(tab->File.ascii()); // oops, error... if(i != SQE_OK) @@ -1423,8 +1423,8 @@ void SQ_GLWidget::decode() #ifdef SQ_HAVE_KEXIF KExifData d; d.readFromFile(tab->m_File); - tab->orient = d.getImageOrientation(); - tab->wm = SQ_Utils::exifGetMatrix(QString::null, tab->orient); + tab->orient = d.getImageQt::Orientation(); + tab->wm = SQ_Utils::exifGetMatrix(TQString(), tab->orient); tab->rotate = (tab->orient == KExifData::ROT_90_HFLIP || tab->orient == KExifData::ROT_90 || tab->orient == KExifData::ROT_90_VFLIP || tab->orient == KExifData::ROT_270); @@ -1475,7 +1475,7 @@ void SQ_GLWidget::decode() // absolute evil, but should do... if(notexpected) - KApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers); + KApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); i = tab->codeK->read_next(); @@ -1498,7 +1498,7 @@ void SQ_GLWidget::decode() // find tile size SQ_GLWidget::findCloserTiles(im->w, im->h, pp.tilesx, pp.tilesy); - QPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp); + TQPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp); pp.realw = pair.first; pp.realh = pair.second; @@ -1515,7 +1515,7 @@ void SQ_GLWidget::decode() { KMessageBox::error(this, i18n("Memory allocation failed for %1 of memory") - .arg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA)))); + .tqarg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA)))); decodeFailedOn0(SQE_R_NOMEMORY); return; @@ -1598,7 +1598,7 @@ void SQ_GLWidget::decode() } } - id = images->insertItem(QString::fromLatin1("#%1 [%2x%3@%4]").arg(tab->current+1).arg(im->w).arg(im->h).arg(im->bpp)); + id = images->insertItem(TQString::tqfromLatin1("#%1 [%2x%3@%4]").tqarg(tab->current+1).tqarg(im->w).tqarg(im->h).tqarg(im->bpp)); images->setItemParameter(id, tab->current); @@ -1641,21 +1641,21 @@ void SQ_GLWidget::decode() images->setItemChecked(first_id, true); if(tab->finfo.animated) - QTimer::singleShot(tab->finfo.image[tab->current].delay, this, SLOT(slotAnimateNext())); + TQTimer::singleShot(tab->finfo.image[tab->current].delay, this, TQT_SLOT(slotAnimateNext())); } /* * Palette changed. Let's update tickmarks and background color. */ -void SQ_GLWidget::paletteChange(const QPalette &oldPalette) +void SQ_GLWidget::paletteChange(const TQPalette &oldPalette) { - QGLWidget::paletteChange(oldPalette); + TQGLWidget::paletteChange(oldPalette); SQ_Config::instance()->setGroup("GL view"); if(SQ_Config::instance()->readNumEntry("GL view background type", 1) == 0) { - QColor color = colorGroup().color(QColorGroup::Base); + TQColor color = tqcolorGroup().color(TQColorGroup::Base); qglClearColor(color); updateGL(); } @@ -1699,7 +1699,7 @@ void SQ_GLWidget::slotPrev() void SQ_GLWidget::slotZoomMenu() { - zoomMenu->exec(QCursor::pos()); + zoomMenu->exec(TQCursor::pos()); } void SQ_GLWidget::slotAnimateNext() @@ -1896,7 +1896,7 @@ void SQ_GLWidget::useBrokenImage(const int err_index) #ifndef KSQUIRREL_PART // show error message instead of file name SQ_GLView::window()->sbarWidget("SBFile")->setText(SQ_ErrorString::instance()->string(err_index)); - KSquirrel::app()->setCaption(QString::null); + KSquirrel::app()->setCaption(TQString()); #else t_glv.sbarWidget("SBFile")->setText(SQ_ErrorString::instance()->string(err_index)); #endif diff --git a/ksquirrel/sq_glwidget.h b/ksquirrel/sq_glwidget.h index 550a1a5..2c9ee58 100644 --- a/ksquirrel/sq_glwidget.h +++ b/ksquirrel/sq_glwidget.h @@ -19,10 +19,10 @@ #ifndef SQ_GLWIDGET_H #define SQ_GLWIDGET_H -#include <qimage.h> -#include <qrect.h> -#include <qpair.h> -#include <qdatetime.h> +#include <tqimage.h> +#include <tqrect.h> +#include <tqpair.h> +#include <tqdatetime.h> #include <kurl.h> @@ -57,10 +57,10 @@ class KTempFile; namespace KIO { class Job; } -class QTimer; -class QPopupMenu; -class QSlider; -class QLabel; +class TQTimer; +class TQPopupMenu; +class TQSlider; +class TQLabel; class SQ_ToolButtonPopup; class SQ_ToolButton; @@ -121,12 +121,13 @@ class SQ_ToolBar; * */ -class SQ_GLWidget : public QGLWidget +class SQ_GLWidget : public TQGLWidget { Q_OBJECT + TQ_OBJECT public: - SQ_GLWidget(QWidget *parent = 0, const char *name = 0); + SQ_GLWidget(TQWidget *tqparent = 0, const char *name = 0); ~SQ_GLWidget(); void setDownloadPercents(int); @@ -135,12 +136,12 @@ class SQ_GLWidget : public QGLWidget void setExpectedURL(const KURL &u); - QString originalURL() const; + TQString originalURL() const; /* * Start decoding given image. We can call it from anywhere. */ - void startDecoding(const QString &file); + void startDecoding(const TQString &file); void startDecoding(const KURL &url); void zoom(GLfloat); @@ -197,7 +198,7 @@ class SQ_GLWidget : public QGLWidget /* * Direct call to glInit(); */ - void glInitA() { QGLWidget::glInit(); } + void glInitA() { TQGLWidget::glInit(); } /* * Start animation, if loaded image is animated. @@ -233,7 +234,7 @@ class SQ_GLWidget : public QGLWidget /* * Next three methods should be reimplemented in - * every QGLWidget's subclass. + * every TQGLWidget's subclass. */ void initializeGL(); void paintGL(); @@ -243,12 +244,12 @@ class SQ_GLWidget : public QGLWidget * Mouse wheel event. Let's load next/previous image, or * zoom in/zoom out (depends on settings). */ - void wheelEvent(QWheelEvent *); + void wheelEvent(TQWheelEvent *); /* * Palette changed. Let's update tickmarks and background color. */ - void paletteChange(const QPalette &oldPalette); + void paletteChange(const TQPalette &oldPalette); /* * Accept drag-and-drop events. We can drop some images @@ -256,20 +257,20 @@ class SQ_GLWidget : public QGLWidget * * TODO: find first supported image and decode it ? */ - void dragEnterEvent(QDragEnterEvent *); - void dropEvent(QDropEvent *); + void dragEnterEvent(TQDragEnterEvent *); + void dropEvent(TQDropEvent *); /* * Mouse events. */ - void mousePressEvent(QMouseEvent *); - void mouseReleaseEvent(QMouseEvent *); - void mouseMoveEvent(QMouseEvent *); + void mousePressEvent(TQMouseEvent *); + void mouseReleaseEvent(TQMouseEvent *); + void mouseMoveEvent(TQMouseEvent *); private: void copyURL(); - QImage generatePreview(); + TQImage generatePreview(); bool calcSelection(); @@ -415,7 +416,7 @@ class SQ_GLWidget : public QGLWidget * Find best tile's width and height for given width and height. */ static void findCloserTiles(int w, int h, std::vector<int> &x, std::vector<int> &y); - static QPair<int, int> calcRealDimensions(Parts &, int y = -1, int x = -1); + static TQPair<int, int> calcRealDimensions(Parts &, int y = -1, int x = -1); /* * Prepare decoding. It will find proper library for decoding, @@ -427,7 +428,7 @@ class SQ_GLWidget : public QGLWidget * Zoom to 'r'. Will be called after somebody used mouse button * to select zoom region. Return true, if zoomed. */ - bool zoomRect(const QRect &r); + bool zoomRect(const TQRect &r); /* * Bind textures, draw them and create GL lists. @@ -457,7 +458,7 @@ class SQ_GLWidget : public QGLWidget signals: void tabCountChanged(); - void message(const QString &); + void message(const TQString &); public slots: void slotPrint(); @@ -528,7 +529,7 @@ class SQ_GLWidget : public QGLWidget SQ_ToolButtonPopup *pAToolZoom, *pAToolImages; KActionCollection *ac, *acMain; - QPopupMenu *menu, *menuFile, *menuImage; + TQPopupMenu *menu, *menuFile, *menuImage; int id_saveas, id_settings, id_f5, id_f6, id_f7, id_f8, id_del, id_prop; @@ -539,12 +540,12 @@ class SQ_GLWidget : public QGLWidget // popup menu with image pages *images; - QImage BGpixmap, BGquads; + TQImage BGpixmap, BGquads; - QTimer *timer_prev, *timer_next; - QTimer *timer_anim; + TQTimer *timer_prev, *timer_next; + TQTimer *timer_anim; - QImage mm[4]; + TQImage mm[4]; fmt_image image_broken; SQ_GLSelectionPainter *gls; @@ -560,18 +561,18 @@ class SQ_GLWidget : public QGLWidget changed, marks, linear; float zoomFactor, oldZoom; RGBA *buffer; - QSlider *slider_zoom; + TQSlider *slider_zoom; KTempFile *tmp; KURL lastCopy, m_expected, m_original; - QTime clickTime, started; + TQTime clickTime, started; std::vector<Tab> tabs; Tab *tab, *tabold; Tab tmptab, taborig; bool hackResizeGL, bindChecker; - QLabel *percentsLabel; + TQLabel *percentsLabel; #ifdef KSQUIRREL_PART SQ_GLView t_glv; @@ -605,7 +606,7 @@ void SQ_GLWidget::setOriginalURL(const KURL &u) } inline -QString SQ_GLWidget::originalURL() const +TQString SQ_GLWidget::originalURL() const { return tab->m_original.isLocalFile() ? tab->m_original.path() : tab->m_original.prettyURL(); } diff --git a/ksquirrel/sq_glwidget_helpers.cpp b/ksquirrel/sq_glwidget_helpers.cpp index bad2d89..f501478 100644 --- a/ksquirrel/sq_glwidget_helpers.cpp +++ b/ksquirrel/sq_glwidget_helpers.cpp @@ -19,10 +19,10 @@ #include "config.h" #endif -#include <qwmatrix.h> -#include <qrect.h> -#include <qpoint.h> -#include <qpointarray.h> +#include <tqwmatrix.h> +#include <tqrect.h> +#include <tqpoint.h> +#include <tqpointarray.h> #include <algorithm> @@ -36,8 +36,8 @@ #include "sq_glwidget_helpers.h" -SQ_ToolButtonPopup::SQ_ToolButtonPopup(const QPixmap &pix, const QString &textLabel, KToolBar *parent) - : KToolBarButton(pix, -1, parent, 0, textLabel) +SQ_ToolButtonPopup::SQ_ToolButtonPopup(const TQPixmap &pix, const TQString &textLabel, KToolBar *tqparent) + : KToolBarButton(pix, -1, tqparent, 0, textLabel) { setFixedWidth(SQ_ToolButton::fixedWidth()); } @@ -45,9 +45,9 @@ SQ_ToolButtonPopup::SQ_ToolButtonPopup(const QPixmap &pix, const QString &textLa SQ_ToolButtonPopup::~SQ_ToolButtonPopup() {} -SQ_ToolButton::SQ_ToolButton(const QIconSet &iconSet, const QString &textLabel, - QObject *receiver, const char *slot, KToolBar *parent, const char *name) - : QToolButton(iconSet, textLabel, QString::null, receiver, slot, parent, name) +SQ_ToolButton::SQ_ToolButton(const TQIconSet &iconSet, const TQString &textLabel, + TQObject *receiver, const char *slot, KToolBar *tqparent, const char *name) + : TQToolButton(iconSet, textLabel, TQString(), receiver, slot, tqparent, name) { setFixedWidth(SQ_ToolButton::fixedWidth()); } @@ -74,7 +74,7 @@ int SQ_GLHelpers::roundAngle(int curangle) return curangle; } -void SQ_GLHelpers::subRotation(QWMatrix &wm, int curangle, int orient) +void SQ_GLHelpers::subRotation(TQWMatrix &wm, int curangle, int orient) { curangle = SQ_GLHelpers::roundAngle(curangle); @@ -106,9 +106,9 @@ void SQ_GLHelpers::subRotation(QWMatrix &wm, int curangle, int orient) } } -bool SQ_GLHelpers::normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int h, const QWMatrix &matr, int curangle, int orient) +bool SQ_GLHelpers::normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int h, const TQWMatrix &matr, int curangle, int orient) { - QWMatrix wm = matr; + TQWMatrix wm = matr; SQ_GLHelpers::subRotation(wm, curangle, orient); @@ -117,7 +117,7 @@ bool SQ_GLHelpers::normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int ax = -w/2 + sx; int ay = h/2 - sy; - QPointArray pa(4), pb; + TQPointArray pa(4), pb; pa.setPoint(0, ax, ay-sh); pa.setPoint(1, ax+sw, ay-sh); diff --git a/ksquirrel/sq_glwidget_helpers.h b/ksquirrel/sq_glwidget_helpers.h index a9a224a..12dacfa 100644 --- a/ksquirrel/sq_glwidget_helpers.h +++ b/ksquirrel/sq_glwidget_helpers.h @@ -20,7 +20,7 @@ #include <ktoolbarbutton.h> -class QWMatrix; +class TQWMatrix; class KToolBar; @@ -29,15 +29,15 @@ struct RGBA; class SQ_ToolButtonPopup : public KToolBarButton { public: - SQ_ToolButtonPopup(const QPixmap &pix, const QString &textLabel, KToolBar *parent); + SQ_ToolButtonPopup(const TQPixmap &pix, const TQString &textLabel, KToolBar *tqparent); ~SQ_ToolButtonPopup(); }; -class SQ_ToolButton : public QToolButton +class SQ_ToolButton : public TQToolButton { public: - SQ_ToolButton(const QIconSet &iconSet, const QString &textLabel, QObject *receiver, - const char *slot, KToolBar *parent, const char *name = 0); + SQ_ToolButton(const TQIconSet &iconSet, const TQString &textLabel, TQObject *receiver, + const char *slot, KToolBar *tqparent, const char *name = 0); ~SQ_ToolButton(); static int fixedWidth(); @@ -61,14 +61,14 @@ namespace SQ_GLHelpers int roundAngle(int ang); - void subRotation(QWMatrix &wm, int curangle, int orient); + void subRotation(TQWMatrix &wm, int curangle, int orient); /* * normalize selection rectangle * sx,sy are X and Y coordinates - * sw x sh is a selection geometry + * sw x sh is a selection tqgeometry */ - bool normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int h, const QWMatrix&, int curangle, int orient); + bool normalizeSelection(int &sx, int &sy, int &sw, int &sh, int w, int h, const TQWMatrix&, int curangle, int orient); } #endif diff --git a/ksquirrel/sq_glwidget_stuff.cpp b/ksquirrel/sq_glwidget_stuff.cpp index 3926166..3a212cb 100644 --- a/ksquirrel/sq_glwidget_stuff.cpp +++ b/ksquirrel/sq_glwidget_stuff.cpp @@ -19,13 +19,13 @@ #include "config.h" #endif -#include <qclipboard.h> -#include <qslider.h> -#include <qdragobject.h> -#include <qtimer.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <tqclipboard.h> +#include <tqslider.h> +#include <tqdragobject.h> +#include <tqtimer.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqpaintdevicemetrics.h> #include <kapplication.h> #include <kaction.h> @@ -78,34 +78,34 @@ // Create actions void SQ_GLWidget::createActions() { - pASelectionRect = new KToggleAction(i18n("Rectangle"), QPixmap(locate("data", "images/actions/glselection_rect.png")), 0, this, SLOT(slotSelectionRect()), ac, "SQ Selection Rect"); - pASelectionEllipse = new KToggleAction(i18n("Ellipse"), QPixmap(locate("data", "images/actions/glselection_ellipse.png")), 0, this, SLOT(slotSelectionEllipse()), ac, "SQ Selection Ellipse"); - pASelectionClear = new KAction(i18n("Clear"), 0, 0, this, SLOT(slotSelectionClear()), ac, "SQ Selection Clear"); + pASelectionRect = new KToggleAction(i18n("Rectangle"), TQPixmap(locate("data", "images/actions/glselection_rect.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectionRect()), ac, "SQ Selection Rect"); + pASelectionEllipse = new KToggleAction(i18n("Ellipse"), TQPixmap(locate("data", "images/actions/glselection_ellipse.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectionEllipse()), ac, "SQ Selection Ellipse"); + pASelectionClear = new KAction(i18n("Clear"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectionClear()), ac, "SQ Selection Clear"); - pAZoomW = new KToggleAction(i18n("Fit width"), QPixmap(locate("data", "images/actions/zoomW.png")), 0, this, SLOT(slotZoomW()), ac, "SQ ZoomW"); - pAZoomH = new KToggleAction(i18n("Fit height"), QPixmap(locate("data", "images/actions/zoomH.png")), 0, this, SLOT(slotZoomH()), ac, "SQ ZoomH"); - pAZoomWH = new KToggleAction(i18n("Fit image"), QPixmap(locate("data", "images/actions/zoomWH.png")), 0, this, SLOT(slotZoomWH()), ac, "SQ ZoomWH"); - pAZoom100 = new KToggleAction(i18n("Zoom 100%"), QPixmap(locate("data", "images/actions/zoom100.png")), 0, this, SLOT(slotZoom100()), ac, "SQ Zoom100"); - pAZoomLast = new KToggleAction(i18n("Leave previous zoom"), QPixmap(locate("data", "images/actions/zoomlast.png")), 0, this, SLOT(slotZoomLast()), ac, "SQ ZoomLast"); - pAIfLess = new KToggleAction(i18n("Ignore, if image is smaller than window"), QPixmap(locate("data", "images/actions/ifless.png")), 0, 0, 0, ac, "if less"); + pAZoomW = new KToggleAction(i18n("Fit width"), TQPixmap(locate("data", "images/actions/zoomW.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomW()), ac, "SQ ZoomW"); + pAZoomH = new KToggleAction(i18n("Fit height"), TQPixmap(locate("data", "images/actions/zoomH.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomH()), ac, "SQ ZoomH"); + pAZoomWH = new KToggleAction(i18n("Fit image"), TQPixmap(locate("data", "images/actions/zoomWH.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomWH()), ac, "SQ ZoomWH"); + pAZoom100 = new KToggleAction(i18n("Zoom 100%"), TQPixmap(locate("data", "images/actions/zoom100.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoom100()), ac, "SQ Zoom100"); + pAZoomLast = new KToggleAction(i18n("Leave previous zoom"), TQPixmap(locate("data", "images/actions/zoomlast.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomLast()), ac, "SQ ZoomLast"); + pAIfLess = new KToggleAction(i18n("Ignore, if image is smaller than window"), TQPixmap(locate("data", "images/actions/ifless.png")), 0, 0, 0, ac, "if less"); - pAFull = new KToggleAction(QString::null, 0, 0, 0, ac, "SQ GL Full"); + pAFull = new KToggleAction(TQString(), 0, 0, 0, ac, "SQ GL Full"); - QString squirrel_zoom_actions = QString::fromLatin1("squirrel_zoom_actions"); + TQString squirrel_zoom_actions = TQString::tqfromLatin1("squirrel_zoom_actions"); pAZoomW->setExclusiveGroup(squirrel_zoom_actions); pAZoomH->setExclusiveGroup(squirrel_zoom_actions); pAZoomWH->setExclusiveGroup(squirrel_zoom_actions); pAZoom100->setExclusiveGroup(squirrel_zoom_actions); pAZoomLast->setExclusiveGroup(squirrel_zoom_actions); - QString squirrel_selection_type = QString::fromLatin1("squirrel_selection_type"); + TQString squirrel_selection_type = TQString::tqfromLatin1("squirrel_selection_type"); pASelectionEllipse->setExclusiveGroup(squirrel_selection_type); pASelectionRect->setExclusiveGroup(squirrel_selection_type); - connect(pAIfLess, SIGNAL(toggled(bool)), this, SLOT(slotZoomIfLess())); + connect(pAIfLess, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotZoomIfLess())); #ifndef KSQUIRREL_PART - connect(pAFull, SIGNAL(toggled(bool)), KSquirrel::app(), SLOT(slotFullScreen(bool))); + connect(pAFull, TQT_SIGNAL(toggled(bool)), KSquirrel::app(), TQT_SLOT(slotFullScreen(bool))); #endif SQ_Config::instance()->setGroup("GL view"); @@ -155,54 +155,54 @@ void SQ_GLWidget::createToolbar() } /* - * We will create QToolButtons and put them in toolbar. + * We will create TQToolButtons and put them in toolbar. * Of course, we can just KAction::plug(), BUT plugged KActions * will produce buttons, which cann't be clicked twise! I think * plugged KActions will treat our attempt as double-click, not two single-clicks. - * On the other hand, we can click QToolButton as frequently as we want. + * On the other hand, we can click TQToolButton as frequently as we want. * * Plugged KActions also don't know about autorepeat :( */ - new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_first.png")), i18n("Go to first image"), this, SLOT(slotFirst()), toolbar); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_prev.png")), i18n("Previous image"), this, SLOT(slotPrev()), toolbar); + new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_first.png")), i18n("Go to first image"), TQT_TQOBJECT(this), TQT_SLOT(slotFirst()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_prev.png")), i18n("Previous image"), TQT_TQOBJECT(this), TQT_SLOT(slotPrev()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_next.png")), i18n("Next image"), this, SLOT(slotNext()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_next.png")), i18n("Next image"), TQT_TQOBJECT(this), TQT_SLOT(slotNext()), toolbar); pATool->setAutoRepeat(true); - new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_last.png")), i18n("Go to last image"), this, SLOT(slotLast()), toolbar); + new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_last.png")), i18n("Go to last image"), TQT_TQOBJECT(this), TQT_SLOT(slotLast()), toolbar); // some toolbuttons need autorepeat... - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/zoom+.png")), i18n("Zoom +"), this, SLOT(slotZoomPlus()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/zoom+.png")), i18n("Zoom +"), TQT_TQOBJECT(this), TQT_SLOT(slotZoomPlus()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/zoom-.png")), i18n("Zoom -"), this, SLOT(slotZoomMinus()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/zoom-.png")), i18n("Zoom -"), TQT_TQOBJECT(this), TQT_SLOT(slotZoomMinus()), toolbar); pATool->setAutoRepeat(true); - pAToolZoom = new SQ_ToolButtonPopup(QPixmap(locate("data", "images/actions/zoom_template.png")), i18n("Zoom"), toolbar); + pAToolZoom = new SQ_ToolButtonPopup(TQPixmap(locate("data", "images/actions/zoom_template.png")), i18n("Zoom"), toolbar); pAToolZoom->setPopup(zoomMenu); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/rotateL.png")), i18n("Rotate left"), this, SLOT(slotRotateLeft()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/rotateL.png")), i18n("Rotate left"), TQT_TQOBJECT(this), TQT_SLOT(slotRotateLeft()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/rotateR.png")), i18n("Rotate right"), this, SLOT(slotRotateRight()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/rotateR.png")), i18n("Rotate right"), TQT_TQOBJECT(this), TQT_SLOT(slotRotateRight()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/flipV.png")), i18n("Flip vertically"), this, SLOT(slotFlipV()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/flipV.png")), i18n("Flip vertically"), TQT_TQOBJECT(this), TQT_SLOT(slotFlipV()), toolbar); pATool->setAutoRepeat(true); - pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/flipH.png")), i18n("Flip horizontally"), this, SLOT(slotFlipH()), toolbar); + pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/flipH.png")), i18n("Flip horizontally"), TQT_TQOBJECT(this), TQT_SLOT(slotFlipH()), toolbar); pATool->setAutoRepeat(true); - new SQ_ToolButton(QPixmap(locate("data", "images/actions/reload.png")), i18n("Normalize"), this, SLOT(slotMatrixReset()), toolbar); + new SQ_ToolButton(TQPixmap(locate("data", "images/actions/reload.png")), i18n("Normalize"), TQT_TQOBJECT(this), TQT_SLOT(slotMatrixReset()), toolbar); - pAToolFull = new SQ_ToolButton(QPixmap(locate("data", "images/actions/fullscreen.png")), i18n("Fullscreen"), pAFull, SLOT(activate()), toolbar); + pAToolFull = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/fullscreen.png")), i18n("Fullscreen"), pAFull, TQT_SLOT(activate()), toolbar); pAToolFull->setToggleButton(true); - pAToolImages = new SQ_ToolButtonPopup(QPixmap(locate("data", "images/actions/images.png")), i18n("Select image"), toolbar); + pAToolImages = new SQ_ToolButtonPopup(TQPixmap(locate("data", "images/actions/images.png")), i18n("Select image"), toolbar); pAToolImages->setPopup(images); - SQ_ToolButtonPopup *pAToolSel = new SQ_ToolButtonPopup(QPixmap(locate("data", "images/actions/glselection.png")), i18n("Selection"), toolbar); + SQ_ToolButtonPopup *pAToolSel = new SQ_ToolButtonPopup(TQPixmap(locate("data", "images/actions/glselection.png")), i18n("Selection"), toolbar); pAToolSel->setPopup(selectionMenu); - pAToolQuick = new SQ_ToolButton(QPixmap(locate("data", "images/actions/configure.png")), i18n("Codec settings"), this, SLOT(slotShowCodecSettings()), toolbar); + pAToolQuick = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/configure.png")), i18n("Codec settings"), TQT_TQOBJECT(this), TQT_SLOT(slotShowCodecSettings()), toolbar); pAToolQuick->setEnabled(false); - pAToolProp = new SQ_ToolButton(QPixmap(locate("data", "images/actions/prop.png")), i18n("Image Properties"), this, SLOT(slotProperties()), toolbar); - pAToolPrint = new SQ_ToolButton(QPixmap(locate("data", "images/actions/print.png")), i18n("Print"), this, SLOT(slotPrint()), toolbar); - new SQ_ToolButton(QPixmap(locate("data", "images/actions/shownav.png")), i18n("Show navigator"), this, SLOT(slotShowNav()), toolbar); + pAToolProp = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/prop.png")), i18n("Image Properties"), TQT_TQOBJECT(this), TQT_SLOT(slotProperties()), toolbar); + pAToolPrint = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/print.png")), i18n("Print"), TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), toolbar); + new SQ_ToolButton(TQPixmap(locate("data", "images/actions/shownav.png")), i18n("Show navigator"), TQT_TQOBJECT(this), TQT_SLOT(slotShowNav()), toolbar); - slider_zoom = new QSlider(1, 38, 2, 19, Qt::Horizontal, toolbar); - slider_zoom->setTickmarks(QSlider::Below); + slider_zoom = new TQSlider(1, 38, 2, 19, Qt::Horizontal, toolbar); + slider_zoom->setTickmarks(TQSlider::Below); slider_zoom->setTickInterval(19); - connect(slider_zoom, SIGNAL(valueChanged(int)), this, SLOT(slotSetZoomPercents(int))); + connect(slider_zoom, TQT_SIGNAL(valueChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetZoomPercents(int))); toolbar->insertWidget(1000, 0, slider_zoom); toolbar->setItemAutoSized(1000); toolbar->alignItemRight(1000); @@ -220,33 +220,33 @@ void SQ_GLWidget::slotProperties() stopAnimation(); const int real_size = tab->finfo.image[tab->current].w * tab->finfo.image[tab->current].h * sizeof(RGBA); - QString sz = KIO::convertSize(real_size); - QStringList list; + TQString sz = KIO::convertSize(real_size); + TQStringList list; - QValueVector<QPair<QString,QString> > meta; + TQValueVector<TQPair<TQString,TQString> > meta; if(!tab->finfo.meta.empty()) { for(std::vector<fmt_metaentry>::iterator it = tab->finfo.meta.begin();it != tab->finfo.meta.end();++it) { - meta.append(QPair<QString,QString>((*it).group, (*it).data)); + meta.append(TQPair<TQString,TQString>((*it).group, (*it).data)); } } // save tab->current image parameters and some additioanl information // in list list << tab->quickImageInfo - << QString::fromLatin1("%1x%2").arg(tab->finfo.image[tab->current].w).arg(tab->finfo.image[tab->current].h) - << QString::fromLatin1("%1").arg(tab->finfo.image[tab->current].bpp) + << TQString::tqfromLatin1("%1x%2").tqarg(tab->finfo.image[tab->current].w).tqarg(tab->finfo.image[tab->current].h) + << TQString::tqfromLatin1("%1").tqarg(tab->finfo.image[tab->current].bpp) << tab->finfo.image[tab->current].colorspace << tab->finfo.image[tab->current].compression << sz - << QString::fromLatin1("%1").arg((double)real_size / tab->fmt_size, 0, 'f', 2) + << TQString::tqfromLatin1("%1").tqarg((double)real_size / tab->fmt_size, 0, 'f', 2) << ((tab->finfo.image[tab->current].interlaced) ? i18n("yes") : i18n("no")) - << QString::fromLatin1("%1").arg(errors) - << QString::fromLatin1("%1").arg(tab->finfo.image.size()) - << QString::fromLatin1("#%1").arg(tab->current+1) - << QString::fromLatin1("%1").arg(tab->finfo.image[tab->current].delay); + << TQString::tqfromLatin1("%1").tqarg(errors) + << TQString::tqfromLatin1("%1").tqarg(tab->finfo.image.size()) + << TQString::tqfromLatin1("#%1").tqarg(tab->current+1) + << TQString::tqfromLatin1("%1").tqarg(tab->finfo.image[tab->current].delay); // create dialog and setup it SQ_ImageProperties prop(this); @@ -304,7 +304,7 @@ void SQ_GLWidget::findCloserTiles(int w, int h, std::vector<int> &x, std::vector } } -QPair<int, int> SQ_GLWidget::calcRealDimensions(Parts &p, int y, int x) +TQPair<int, int> SQ_GLWidget::calcRealDimensions(Parts &p, int y, int x) { int rw = 0, rh = 0; int toy = y == -1 ? p.tilesy.size() : y; @@ -320,7 +320,7 @@ QPair<int, int> SQ_GLWidget::calcRealDimensions(Parts &p, int y, int x) for(std::vector<int>::iterator it = p.tilesy.begin();it != itEnd && toy--;++it) rh += (*it); - return QPair<int, int>(rw, rh); + return TQPair<int, int>(rw, rh); } void SQ_GLWidget::slotShowCodecSettings() @@ -335,13 +335,13 @@ void SQ_GLWidget::slotShowCodecSettings() SQ_CodecSettingsSkeleton skel(this); - connect(&skel, SIGNAL(apply()), this, SLOT(slotApplyCodecSettings())); + connect(&skel, TQT_SIGNAL(apply()), TQT_TQOBJECT(this), TQT_SLOT(slotApplyCodecSettings())); skel.addSettingsWidget(tab->lib->config); skel.setCodecInfo(tab->lib->mime, tab->lib->quickinfo); skel.adjustSize(); - if(skel.exec(tab->lib->settings) == QDialog::Accepted) + if(skel.exec(tab->lib->settings) == TQDialog::Accepted) tab->lib->codec->set_settings(tab->lib->settings); } @@ -352,7 +352,7 @@ void SQ_GLWidget::slotApplyCodecSettings() // new settings are already set by SQ_CodecSettingsSkeleton tab->lib->codec->set_settings(tab->lib->settings); m_original = tab->m_original; - startDecoding(QString(tab->m_File)); + startDecoding(TQString(tab->m_File)); } } @@ -392,7 +392,7 @@ void SQ_GLWidget::slotImagesShown() void SQ_GLWidget::slotShowImages() { - images->exec(QCursor::pos()); + images->exec(TQCursor::pos()); } void SQ_GLWidget::slotImagesHidden() @@ -422,7 +422,7 @@ void SQ_GLWidget::showExternalTools() SQ_ExternalTool::instance()->setItems(items); } - SQ_ExternalTool::instance()->constPopupMenu()->exec(QCursor::pos()); + SQ_ExternalTool::instance()->constPopupMenu()->exec(TQCursor::pos()); SQ_ExternalTool::instance()->constPopupMenu()->setEnabled(v_ogorogde_buzina_a_v_kieve_dzyadka); } @@ -457,8 +457,8 @@ void SQ_GLWidget::saveAs() return; SQ_Config::instance()->setGroup("GL view"); - QString lastPath = SQ_Config::instance()->readEntry("saveasPath"); - QString lastFilt = SQ_Config::instance()->readEntry("saveasFilter"); + TQString lastPath = SQ_Config::instance()->readEntry("saveasPath"); + TQString lastFilt = SQ_Config::instance()->readEntry("saveasFilter"); if(lastPath.isEmpty()) { @@ -476,7 +476,7 @@ void SQ_GLWidget::saveAs() d.setCurrentFilter(lastFilt); d.updateCombo(false); - if(d.exec() == QDialog::Rejected || d.selectedURL().isEmpty()) + if(d.exec() == TQDialog::Rejected || d.selectedURL().isEmpty()) return; KURL url = d.selectedURL(); @@ -487,13 +487,13 @@ void SQ_GLWidget::saveAs() SQ_Config::instance()->writeEntry("saveasPath", u.prettyURL()); SQ_Config::instance()->writeEntry("saveasFilter", d.nameFilter()); - QString path = url.isLocalFile() ? url.path() : tmp->name(); + TQString path = url.isLocalFile() ? url.path() : tmp->name(); SQ_LIBRARY *wlib = SQ_LibraryHandler::instance()->libraryByName(d.nameFilter()); if(!wlib || !wlib->writestatic) { - KMessageBox::error(this, i18n("Sorry, could not perform write operation\nfor codec \"%1\"").arg(d.nameFilter())); + KMessageBox::error(this, i18n("Sorry, could not perform write operation\nfor codec \"%1\"").tqarg(d.nameFilter())); return; } @@ -504,7 +504,7 @@ void SQ_GLWidget::saveAs() fmt_image im = tab->finfo.image[tab->current]; /* - * The easiest way to rotate image is to use QImage + QImage::xForm(), + * The easiest way to rotate image is to use TQImage + TQImage::xForm(), * but this method is VERY memory inefficient. We will use our own tranformation * routins... Yes, they will be a little bit slower, but they require only * one scaline in stack. @@ -558,7 +558,7 @@ void SQ_GLWidget::saveAs() opt.compression_scheme = (wlib->opt.compression_scheme & CompressionNo) ? CompressionNo : CompressionInternal; opt.compression_level = wlib->opt.compression_def; - int err = wlib->codec->write_init(QString(QFile::encodeName(path)), im2, opt); + int err = wlib->codec->write_init(TQString(TQFile::encodeName(path)).ascii(), im2, opt); if(err != SQE_OK) { @@ -605,7 +605,7 @@ void SQ_GLWidget::saveAs() // src dst perm overwrite resume progress KIO::Job *j = KIO::file_copy(path, url, -1, true, false, false); - connect(j, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyResult(KIO::Job *))); + connect(j, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyResult(KIO::Job *))); } } @@ -615,7 +615,7 @@ void SQ_GLWidget::slotCopyResult(KIO::Job *job) { if(KMessageBox::questionYesNoCancel(this, job->errorString() + '\n' + i18n("Try another location?")) == KMessageBox::Yes) { - SQ_FileDialog d(QString::null, this); + SQ_FileDialog d(TQString(), this); // set filter: writable codecs without *.* d.setFilter(SQ_LibraryHandler::instance()->allFiltersFileDialogString(false, false)); @@ -624,11 +624,11 @@ void SQ_GLWidget::slotCopyResult(KIO::Job *job) int result = d.exec(); - if(result == QDialog::Rejected || d.selectedURL().isEmpty()) + if(result == TQDialog::Rejected || d.selectedURL().isEmpty()) return; KIO::Job *j = KIO::file_copy(tmp->name(), d.selectedURL(), -1, true, false, false); - connect(j, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyResult(KIO::Job *))); + connect(j, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyResult(KIO::Job *))); } } } @@ -638,15 +638,15 @@ void SQ_GLWidget::toClipboard() if(!decoded || tab->broken) return; - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); im = im.swapRGB(); // image doesn't have extra regions if(tab->parts[tab->current].realw == tab->parts[tab->current].w && tab->parts[tab->current].realh == tab->parts[tab->current].h) - KApplication::clipboard()->setImage(im, QClipboard::Clipboard); + KApplication::tqclipboard()->setImage(im, TQClipboard::Clipboard); else - KApplication::clipboard()->setImage(im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h), QClipboard::Clipboard); + KApplication::tqclipboard()->setImage(im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h), TQClipboard::Clipboard); } void SQ_GLWidget::bcg() @@ -659,7 +659,7 @@ void SQ_GLWidget::bcg() _bcg.setPreviewImage(generatePreview()); - connect(&_bcg, SIGNAL(bcg(SQ_ImageBCGOptions *)), this, SLOT(slotBCG(SQ_ImageBCGOptions *))); + connect(&_bcg, TQT_SIGNAL(bcg(SQ_ImageBCGOptions *)), TQT_TQOBJECT(this), TQT_SLOT(slotBCG(SQ_ImageBCGOptions *))); _bcg.exec(); @@ -677,7 +677,7 @@ void SQ_GLWidget::filter() flt.setPreviewImage(generatePreview()); - connect(&flt, SIGNAL(filter(SQ_ImageFilterOptions *)), this, SLOT(slotFilter(SQ_ImageFilterOptions *))); + connect(&flt, TQT_SIGNAL(filter(SQ_ImageFilterOptions *)), TQT_TQOBJECT(this), TQT_SLOT(slotFilter(SQ_ImageFilterOptions *))); flt.exec(); @@ -687,8 +687,8 @@ void SQ_GLWidget::filter() void SQ_GLWidget::slotFilter(SQ_ImageFilterOptions *filtopt) { - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); - QImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im; + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); + TQImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im; fmt_filters::image image = gls->valid() ? fmt_filters::image((unsigned char *)img.bits(), img.width(), img.height()) @@ -731,8 +731,8 @@ void SQ_GLWidget::slotFilter(SQ_ImageFilterOptions *filtopt) void SQ_GLWidget::slotBCG(SQ_ImageBCGOptions *bcgopt) { - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); - QImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im; + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); + TQImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im; fmt_filters::image image = gls->valid() ? fmt_filters::image((unsigned char *)img.bits(), img.width(), img.height()) @@ -758,8 +758,8 @@ void SQ_GLWidget::slotBCG(SQ_ImageBCGOptions *bcgopt) bool SQ_GLWidget::calcSelection() { - QSize sz = gls->size(); - QPoint pt = gls->pos(); + TQSize sz = gls->size(); + TQPoint pt = gls->pos(); float z = getZoom(); float x = pt.x(), y = pt.y(), w = sz.width(), h = sz.height(); @@ -788,7 +788,7 @@ bool SQ_GLWidget::calcSelection() (int)tab->curangle, tab->orient)) { - tab->srect = QRect(pt, sz); + tab->srect = TQRect(pt, sz); tab->sx = sx; tab->sy = sy; tab->sw = sw; @@ -801,10 +801,10 @@ bool SQ_GLWidget::calcSelection() return true; } -QImage SQ_GLWidget::generatePreview() +TQImage SQ_GLWidget::generatePreview() { - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); - QImage img, ret; + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); + TQImage img, ret; if(gls->valid() && calcSelection()) img = im.copy(tab->sx, tab->sy, tab->sw, tab->sh); @@ -818,7 +818,7 @@ QImage SQ_GLWidget::generatePreview() ret = SQ_Utils::scaleImage((unsigned char *)img.bits(), img.width(), img.height(), 160).swapRGB(); - SQ_Utils::exifRotate(QString::null, ret, tab->orient); + SQ_Utils::exifRotate(TQString(), ret, tab->orient); return ret; } @@ -844,16 +844,16 @@ void SQ_GLWidget::slotShowNav() void SQ_GLWidget::initAccelsAndMenu() { - QPopupMenu *menuRotate = new QPopupMenu(menu); - QPopupMenu *menuZoom = new QPopupMenu(menu); - QPopupMenu *menuMove = new QPopupMenu(menu); + TQPopupMenu *menuRotate = new TQPopupMenu(menu); + TQPopupMenu *menuZoom = new TQPopupMenu(menu); + TQPopupMenu *menuMove = new TQPopupMenu(menu); #ifndef KSQUIRREL_PART - QPopupMenu *menuWindow = new QPopupMenu(menu); + TQPopupMenu *menuWindow = new TQPopupMenu(menu); #endif - menuImage = new QPopupMenu(menu); - menuFile = new QPopupMenu(menu); + menuImage = new TQPopupMenu(menu); + menuFile = new TQPopupMenu(menu); menu->insertItem(SQ_IconLoader::instance()->loadIcon("icons", KIcon::Desktop, KIcon::SizeSmall), i18n("File"), menuFile); menu->insertItem(SQ_IconLoader::instance()->loadIcon("view_orientation", KIcon::Desktop, KIcon::SizeSmall), i18n("Rotate"), menuRotate); @@ -867,192 +867,192 @@ void SQ_GLWidget::initAccelsAndMenu() menu->insertItem(i18n("Image"), menuImage); #define SQ_ADD_KACTION(b) \ - (new KAction(QString::null, b, this, SLOT(slotAccelActivated()), ac, QString::fromLatin1("action_%1").arg(b))) + (new KAction(TQString(), b, TQT_TQOBJECT(this), TQT_SLOT(slotAccelActivated()), ac, TQString::tqfromLatin1("action_%1").tqarg(b))) - id_saveas = menuFile->insertItem(SQ_IconLoader::instance()->loadIcon("filesaveas", KIcon::Desktop, KIcon::SizeSmall), i18n("Save As...") + "\tS", SQ_ADD_KACTION(Qt::Key_S), SLOT(activate())); + id_saveas = menuFile->insertItem(SQ_IconLoader::instance()->loadIcon("filesaveas", KIcon::Desktop, KIcon::SizeSmall), i18n("Save As...") + "\tS", SQ_ADD_KACTION(TQt::Key_S), TQT_SLOT(activate())); #ifndef KSQUIRREL_PART menuFile->insertSeparator(); - menuFile->insertItem(QPixmap(locate("data", "images/menu/next16.png")), i18n("Next") + "\tPageDown", SQ_ADD_KACTION(Qt::Key_PageDown), SLOT(activate())); - menuFile->insertItem(QPixmap(locate("data", "images/menu/prev16.png")), i18n("Previous") + "\tPageUp", SQ_ADD_KACTION(Qt::Key_PageUp), SLOT(activate())); - menuFile->insertItem(QPixmap(locate("data", "images/menu/first16.png")), i18n("First") + "\tHome", SQ_ADD_KACTION(Qt::Key_Home), SLOT(activate())); - menuFile->insertItem(QPixmap(locate("data", "images/menu/last16.png")), i18n("Last") + "\tEnd", SQ_ADD_KACTION(Qt::Key_End), SLOT(activate())); + menuFile->insertItem(TQPixmap(locate("data", "images/menu/next16.png")), i18n("Next") + "\tPageDown", SQ_ADD_KACTION(TQt::Key_PageDown), TQT_SLOT(activate())); + menuFile->insertItem(TQPixmap(locate("data", "images/menu/prev16.png")), i18n("Previous") + "\tPageUp", SQ_ADD_KACTION(TQt::Key_PageUp), TQT_SLOT(activate())); + menuFile->insertItem(TQPixmap(locate("data", "images/menu/first16.png")), i18n("First") + "\tHome", SQ_ADD_KACTION(TQt::Key_Home), TQT_SLOT(activate())); + menuFile->insertItem(TQPixmap(locate("data", "images/menu/last16.png")), i18n("Last") + "\tEnd", SQ_ADD_KACTION(TQt::Key_End), TQT_SLOT(activate())); #endif menuFile->insertSeparator(); - id_f5 = menuFile->insertItem(i18n("Copy to...") + "\tF5", SQ_ADD_KACTION(Qt::Key_F5), SLOT(activate())); - id_f6 = menuFile->insertItem(i18n("Move to...") + "\tF6", SQ_ADD_KACTION(Qt::Key_F7), SLOT(activate())); - id_f7 = menuFile->insertItem(i18n("Copy to last folder") + "\tF7", SQ_ADD_KACTION(Qt::Key_F6), SLOT(activate())); - id_f8 = menuFile->insertItem(i18n("Move to last folder") + "\tF8", SQ_ADD_KACTION(Qt::Key_F8), SLOT(activate())); + id_f5 = menuFile->insertItem(i18n("Copy to...") + "\tF5", SQ_ADD_KACTION(TQt::Key_F5), TQT_SLOT(activate())); + id_f6 = menuFile->insertItem(i18n("Move to...") + "\tF6", SQ_ADD_KACTION(TQt::Key_F7), TQT_SLOT(activate())); + id_f7 = menuFile->insertItem(i18n("Copy to last folder") + "\tF7", SQ_ADD_KACTION(TQt::Key_F6), TQT_SLOT(activate())); + id_f8 = menuFile->insertItem(i18n("Move to last folder") + "\tF8", SQ_ADD_KACTION(TQt::Key_F8), TQT_SLOT(activate())); menuFile->insertSeparator(); - id_del = menuFile->insertItem(i18n("Delete") + "\tDelete", SQ_ADD_KACTION(Qt::Key_Delete), SLOT(activate())); + id_del = menuFile->insertItem(i18n("Delete") + "\tDelete", SQ_ADD_KACTION(TQt::Key_Delete), TQT_SLOT(activate())); - menuRotate->insertItem(QPixmap(locate("data", "images/menu/rotateLeft16.png")), i18n("Rotate left") + "\tCtrl+Left", SQ_ADD_KACTION(Qt::Key_Left+CTRL), SLOT(activate())); - menuRotate->insertItem(QPixmap(locate("data", "images/menu/rotateRight16.png")), i18n("Rotate right") + "\tCtrl+Right", SQ_ADD_KACTION(Qt::Key_Right+CTRL), SLOT(activate())); + menuRotate->insertItem(TQPixmap(locate("data", "images/menu/rotateLeft16.png")), i18n("Rotate left") + "\tCtrl+Left", SQ_ADD_KACTION(TQt::Key_Left+CTRL), TQT_SLOT(activate())); + menuRotate->insertItem(TQPixmap(locate("data", "images/menu/rotateRight16.png")), i18n("Rotate right") + "\tCtrl+Right", SQ_ADD_KACTION(TQt::Key_Right+CTRL), TQT_SLOT(activate())); menuRotate->insertSeparator(); - menuRotate->insertItem(QPixmap(locate("data", "images/menu/18016.png")), i18n("Rotate 180'") + "\tCtrl+Up", SQ_ADD_KACTION(Qt::Key_Up+CTRL), SLOT(activate())); + menuRotate->insertItem(TQPixmap(locate("data", "images/menu/18016.png")), i18n("Rotate 180'") + "\tCtrl+Up", SQ_ADD_KACTION(TQt::Key_Up+CTRL), TQT_SLOT(activate())); menuRotate->insertSeparator(); - menuRotate->insertItem(i18n("Rotate 1' left") + "\tAlt+Left", SQ_ADD_KACTION(Qt::Key_Left+ALT), SLOT(activate())); - menuRotate->insertItem(i18n("Rotate 1' right") + "\tAlt+Right", SQ_ADD_KACTION(Qt::Key_Right+ALT), SLOT(activate())); + menuRotate->insertItem(i18n("Rotate 1' left") + "\tAlt+Left", SQ_ADD_KACTION(TQt::Key_Left+ALT), TQT_SLOT(activate())); + menuRotate->insertItem(i18n("Rotate 1' right") + "\tAlt+Right", SQ_ADD_KACTION(TQt::Key_Right+ALT), TQT_SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom+16.png")), i18n("Zoom +") + "\t+", SQ_ADD_KACTION(Qt::Key_Plus), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom-16.png")), i18n("Zoom -") + "\t-", SQ_ADD_KACTION(Qt::Key_Minus), SLOT(activate())); - menuZoom->insertItem(i18n("Zoom 2x") + "\tCtrl++", SQ_ADD_KACTION(Qt::Key_Plus+CTRL), SLOT(activate())); - menuZoom->insertItem(i18n("Zoom 1/2x") + "\tCtrl+-", SQ_ADD_KACTION(Qt::Key_Minus+CTRL), SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom+16.png")), i18n("Zoom +") + "\t+", SQ_ADD_KACTION(TQt::Key_Plus), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom-16.png")), i18n("Zoom -") + "\t-", SQ_ADD_KACTION(TQt::Key_Minus), TQT_SLOT(activate())); + menuZoom->insertItem(i18n("Zoom 2x") + "\tCtrl++", SQ_ADD_KACTION(TQt::Key_Plus+CTRL), TQT_SLOT(activate())); + menuZoom->insertItem(i18n("Zoom 1/2x") + "\tCtrl+-", SQ_ADD_KACTION(TQt::Key_Minus+CTRL), TQT_SLOT(activate())); menuZoom->insertSeparator(); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom10016.png")), QString::fromLatin1("100%") + "\t1", SQ_ADD_KACTION(Qt::Key_1), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom20016.png")), QString::fromLatin1("200%") + "\t2", SQ_ADD_KACTION(Qt::Key_2), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom30016.png")), QString::fromLatin1("300%") + "\t3", SQ_ADD_KACTION(Qt::Key_3), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom50016.png")), QString::fromLatin1("500%") + "\t5", SQ_ADD_KACTION(Qt::Key_5), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom70016.png")), QString::fromLatin1("700%") + "\t7", SQ_ADD_KACTION(Qt::Key_7), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom90016.png")), QString::fromLatin1("900%") + "\t9", SQ_ADD_KACTION(Qt::Key_9), SLOT(activate())); - menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom100016.png")), QString::fromLatin1("1000%") + "\t0", SQ_ADD_KACTION(Qt::Key_0), SLOT(activate())); - - menuMove->insertItem(QPixmap(locate("data", "images/menu/moveLeft16.png")), i18n("Move left") + "\tRight", SQ_ADD_KACTION(Qt::Key_Right), SLOT(activate())); - menuMove->insertItem(QPixmap(locate("data", "images/menu/moveRight16.png")), i18n("Move right") + "\tLeft", SQ_ADD_KACTION(Qt::Key_Left), SLOT(activate())); - menuMove->insertItem(QPixmap(locate("data", "images/menu/moveUp16.png")), i18n("Move up") + "\tDown", SQ_ADD_KACTION(Qt::Key_Down), SLOT(activate())); - menuMove->insertItem(QPixmap(locate("data", "images/menu/moveDown16.png")), i18n("Move down") + "\tUp", SQ_ADD_KACTION(Qt::Key_Up), SLOT(activate())); - - menuImage->insertItem(QPixmap(locate("data", "images/menu/animate16.png")), i18n("Start/stop animation") + "\tA", SQ_ADD_KACTION(Qt::Key_A), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/background16.png")), i18n("Hide/show background") + "\tB", SQ_ADD_KACTION(Qt::Key_B), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/tickmarks16.png")), i18n("Hide/show tickmarks") + "\tK", SQ_ADD_KACTION(Qt::Key_K), SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom10016.png")), TQString::tqfromLatin1("100%") + "\t1", SQ_ADD_KACTION(TQt::Key_1), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom20016.png")), TQString::tqfromLatin1("200%") + "\t2", SQ_ADD_KACTION(TQt::Key_2), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom30016.png")), TQString::tqfromLatin1("300%") + "\t3", SQ_ADD_KACTION(TQt::Key_3), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom50016.png")), TQString::tqfromLatin1("500%") + "\t5", SQ_ADD_KACTION(TQt::Key_5), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom70016.png")), TQString::tqfromLatin1("700%") + "\t7", SQ_ADD_KACTION(TQt::Key_7), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom90016.png")), TQString::tqfromLatin1("900%") + "\t9", SQ_ADD_KACTION(TQt::Key_9), TQT_SLOT(activate())); + menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom100016.png")), TQString::tqfromLatin1("1000%") + "\t0", SQ_ADD_KACTION(TQt::Key_0), TQT_SLOT(activate())); + + menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveLeft16.png")), i18n("Move left") + "\tRight", SQ_ADD_KACTION(TQt::Key_Right), TQT_SLOT(activate())); + menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveRight16.png")), i18n("Move right") + "\tLeft", SQ_ADD_KACTION(TQt::Key_Left), TQT_SLOT(activate())); + menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveUp16.png")), i18n("Move up") + "\tDown", SQ_ADD_KACTION(TQt::Key_Down), TQT_SLOT(activate())); + menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveDown16.png")), i18n("Move down") + "\tUp", SQ_ADD_KACTION(TQt::Key_Up), TQT_SLOT(activate())); + + menuImage->insertItem(TQPixmap(locate("data", "images/menu/animate16.png")), i18n("Start/stop animation") + "\tA", SQ_ADD_KACTION(TQt::Key_A), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/background16.png")), i18n("Hide/show background") + "\tB", SQ_ADD_KACTION(TQt::Key_B), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/tickmarks16.png")), i18n("Hide/show tickmarks") + "\tK", SQ_ADD_KACTION(TQt::Key_K), TQT_SLOT(activate())); menuImage->insertSeparator(); - menuImage->insertItem(QPixmap(locate("data", "images/menu/flipV16.png")), i18n("Flip vertically") + "\tV", SQ_ADD_KACTION(Qt::Key_V), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/flipH16.png")), i18n("Flip horizontally") + "\tH", SQ_ADD_KACTION(Qt::Key_H), SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/flipV16.png")), i18n("Flip vertically") + "\tV", SQ_ADD_KACTION(TQt::Key_V), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/flipH16.png")), i18n("Flip horizontally") + "\tH", SQ_ADD_KACTION(TQt::Key_H), TQT_SLOT(activate())); menuImage->insertSeparator(); - menuImage->insertItem(QPixmap(locate("data", "images/menu/page116.png")), i18n("First page") + "\tF1", SQ_ADD_KACTION(Qt::Key_F1), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/page216.png")), i18n("Previous page") + "\tF2", SQ_ADD_KACTION(Qt::Key_F2), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/page316.png")), i18n("Next page") + "\tF3", SQ_ADD_KACTION(Qt::Key_F3), SLOT(activate())); - menuImage->insertItem(QPixmap(locate("data", "images/menu/page416.png")), i18n("Last page") + "\tF4", SQ_ADD_KACTION(Qt::Key_F4), SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/page116.png")), i18n("First page") + "\tF1", SQ_ADD_KACTION(TQt::Key_F1), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/page216.png")), i18n("Previous page") + "\tF2", SQ_ADD_KACTION(TQt::Key_F2), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/page316.png")), i18n("Next page") + "\tF3", SQ_ADD_KACTION(TQt::Key_F3), TQT_SLOT(activate())); + menuImage->insertItem(TQPixmap(locate("data", "images/menu/page416.png")), i18n("Last page") + "\tF4", SQ_ADD_KACTION(TQt::Key_F4), TQT_SLOT(activate())); menuImage->insertSeparator(); - menuImage->insertItem(i18n("Copy file url") + "\tF9", SQ_ADD_KACTION(Qt::Key_F9), SLOT(activate())); - menuImage->insertItem(i18n("To clipboard") + "\tQ", SQ_ADD_KACTION(Qt::Key_Q), SLOT(activate())); - menuImage->insertItem(i18n("Print") + "\tCtrl+P", SQ_ADD_KACTION(Qt::Key_P+CTRL), SLOT(activate())); + menuImage->insertItem(i18n("Copy file url") + "\tF9", SQ_ADD_KACTION(TQt::Key_F9), TQT_SLOT(activate())); + menuImage->insertItem(i18n("To clipboard") + "\tQ", SQ_ADD_KACTION(TQt::Key_Q), TQT_SLOT(activate())); + menuImage->insertItem(i18n("Print") + "\tCtrl+P", SQ_ADD_KACTION(TQt::Key_P+CTRL), TQT_SLOT(activate())); menuImage->insertSeparator(); - id_settings = menuImage->insertItem(SQ_IconLoader::instance()->loadIcon("configure", KIcon::Desktop, KIcon::SizeSmall), i18n("Codec settings") + "\tC", SQ_ADD_KACTION(Qt::Key_C), SLOT(activate())); + id_settings = menuImage->insertItem(SQ_IconLoader::instance()->loadIcon("configure", KIcon::Desktop, KIcon::SizeSmall), i18n("Codec settings") + "\tC", SQ_ADD_KACTION(TQt::Key_C), TQT_SLOT(activate())); menuImage->setItemEnabled(id_settings, false); menuImage->insertSeparator(); - menuImage->insertItem(i18n("Color balance...") + "\tD", SQ_ADD_KACTION(Qt::Key_D), SLOT(activate())); - menuImage->insertItem(i18n("Apply filter...") + "\tU", SQ_ADD_KACTION(Qt::Key_U), SLOT(activate())); + menuImage->insertItem(i18n("Color balance...") + "\tD", SQ_ADD_KACTION(TQt::Key_D), TQT_SLOT(activate())); + menuImage->insertItem(i18n("Apply filter...") + "\tU", SQ_ADD_KACTION(TQt::Key_U), TQT_SLOT(activate())); - menuImage->insertItem(i18n("Crop") + "\tY", SQ_ADD_KACTION(Qt::Key_Y), SLOT(activate())); + menuImage->insertItem(i18n("Crop") + "\tY", SQ_ADD_KACTION(TQt::Key_Y), TQT_SLOT(activate())); #ifndef KSQUIRREL_PART - menuWindow->insertItem(QPixmap(locate("data", "images/menu/fullscreen16.png")), i18n("Fullscreen") + "\tF", SQ_ADD_KACTION(Qt::Key_F), SLOT(activate())); + menuWindow->insertItem(TQPixmap(locate("data", "images/menu/fullscreen16.png")), i18n("Fullscreen") + "\tF", SQ_ADD_KACTION(TQt::Key_F), TQT_SLOT(activate())); menuWindow->insertSeparator(); - menuWindow->insertItem(i18n("Previous tab") + "\tShift+Left", SQ_ADD_KACTION(Qt::Key_Left+SHIFT), SLOT(activate())); - menuWindow->insertItem(i18n("Next tab") + "\tShift+Right", SQ_ADD_KACTION(Qt::Key_Right+SHIFT), SLOT(activate())); + menuWindow->insertItem(i18n("Previous tab") + "\tShift+Left", SQ_ADD_KACTION(TQt::Key_Left+SHIFT), TQT_SLOT(activate())); + menuWindow->insertItem(i18n("Next tab") + "\tShift+Right", SQ_ADD_KACTION(TQt::Key_Right+SHIFT), TQT_SLOT(activate())); menuWindow->insertSeparator(); - menuWindow->insertItem(i18n("Close tab") + "\tW", SQ_ADD_KACTION(Qt::Key_W), SLOT(activate())); + menuWindow->insertItem(i18n("Close tab") + "\tW", SQ_ADD_KACTION(TQt::Key_W), TQT_SLOT(activate())); - menuWindow->insertItem(i18n("Close all tabs") + "\tCtrl+W", SQ_ADD_KACTION(Qt::Key_W+CTRL), SLOT(activate())); + menuWindow->insertItem(i18n("Close all tabs") + "\tCtrl+W", SQ_ADD_KACTION(TQt::Key_W+CTRL), TQT_SLOT(activate())); #endif menu->insertSeparator(); - menu->insertItem(QPixmap(locate("data", "images/menu/reset16.png")), i18n("Reset") + "\tR", SQ_ADD_KACTION(Qt::Key_R), SLOT(activate())); - id_prop = menu->insertItem(QPixmap(locate("data", "images/menu/prop16.png")), i18n("Properties") + "\tP", SQ_ADD_KACTION(Qt::Key_P), SLOT(activate())); + menu->insertItem(TQPixmap(locate("data", "images/menu/reset16.png")), i18n("Reset") + "\tR", SQ_ADD_KACTION(TQt::Key_R), TQT_SLOT(activate())); + id_prop = menu->insertItem(TQPixmap(locate("data", "images/menu/prop16.png")), i18n("Properties") + "\tP", SQ_ADD_KACTION(TQt::Key_P), TQT_SLOT(activate())); menu->insertSeparator(); - menu->insertItem(i18n("Hotkeys") + "\t/", SQ_ADD_KACTION(Qt::Key_Slash), SLOT(activate())); + menu->insertItem(i18n("Hotkeys") + "\t/", SQ_ADD_KACTION(TQt::Key_Slash), TQT_SLOT(activate())); #ifndef KSQUIRREL_PART menu->insertSeparator(); - menu->insertItem(QPixmap(locate("data", "images/menu/close16.png")), i18n("Close") + "\tX", SQ_ADD_KACTION(Qt::Key_X), SLOT(activate())); + menu->insertItem(TQPixmap(locate("data", "images/menu/close16.png")), i18n("Close") + "\tX", SQ_ADD_KACTION(TQt::Key_X), TQT_SLOT(activate())); #endif - SQ_ADD_KACTION(Qt::Key_Down+CTRL); - SQ_ADD_KACTION(Qt::Key_Equal); - SQ_ADD_KACTION(Qt::Key_Equal+CTRL); - SQ_ADD_KACTION(Qt::Key_N); - SQ_ADD_KACTION(Qt::Key_Space); - SQ_ADD_KACTION(Qt::Key_BackSpace); - SQ_ADD_KACTION(Qt::Key_Escape); - SQ_ADD_KACTION(Qt::Key_Return); - SQ_ADD_KACTION(Qt::Key_Enter); - SQ_ADD_KACTION(Qt::Key_Z); - SQ_ADD_KACTION(Qt::Key_I); - SQ_ADD_KACTION(Qt::Key_E); + SQ_ADD_KACTION(TQt::Key_Down+CTRL); + SQ_ADD_KACTION(TQt::Key_Equal); + SQ_ADD_KACTION(TQt::Key_Equal+CTRL); + SQ_ADD_KACTION(TQt::Key_N); + SQ_ADD_KACTION(TQt::Key_Space); + SQ_ADD_KACTION(TQt::Key_BackSpace); + SQ_ADD_KACTION(TQt::Key_Escape); + SQ_ADD_KACTION(TQt::Key_Return); + SQ_ADD_KACTION(TQt::Key_Enter); + SQ_ADD_KACTION(TQt::Key_Z); + SQ_ADD_KACTION(TQt::Key_I); + SQ_ADD_KACTION(TQt::Key_E); #ifndef KSQUIRREL_PART - SQ_ADD_KACTION(Qt::Key_R+CTRL); - SQ_ADD_KACTION(Qt::Key_E+CTRL); - SQ_ADD_KACTION(Qt::Key_C+CTRL); + SQ_ADD_KACTION(TQt::Key_R+CTRL); + SQ_ADD_KACTION(TQt::Key_E+CTRL); + SQ_ADD_KACTION(TQt::Key_C+CTRL); #endif - SQ_ADD_KACTION(Qt::Key_Menu); - SQ_ADD_KACTION(Qt::Key_M); - SQ_ADD_KACTION(Qt::Key_4); - SQ_ADD_KACTION(Qt::Key_6); - SQ_ADD_KACTION(Qt::Key_8); - SQ_ADD_KACTION(Qt::Key_Comma); - SQ_ADD_KACTION(Qt::Key_Period); - SQ_ADD_KACTION(Qt::Key_Asterisk); - SQ_ADD_KACTION(Qt::Key_L); + SQ_ADD_KACTION(TQt::Key_Menu); + SQ_ADD_KACTION(TQt::Key_M); + SQ_ADD_KACTION(TQt::Key_4); + SQ_ADD_KACTION(TQt::Key_6); + SQ_ADD_KACTION(TQt::Key_8); + SQ_ADD_KACTION(TQt::Key_Comma); + SQ_ADD_KACTION(TQt::Key_Period); + SQ_ADD_KACTION(TQt::Key_Asterisk); + SQ_ADD_KACTION(TQt::Key_L); } void SQ_GLWidget::slotAccelActivated() { - KAction *accel = static_cast<KAction *>(const_cast<QObject *>(sender())); + KAction *accel = static_cast<KAction *>(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME *>(sender()))); KShortcut ks = accel->shortcut(); - if(!ks.compare(Qt::Key_Left)) matrix_move(movefactor, 0); - else if(!ks.compare(Qt::Key_Right)) matrix_move(-movefactor, 0); - else if(!ks.compare(Qt::Key_Up)) matrix_move(0, -movefactor); - else if(!ks.compare(Qt::Key_Down)) matrix_move(0, movefactor); - else if(!ks.compare(Qt::Key_Equal) || - !ks.compare(Qt::Key_Plus)) slotZoomPlus(); - else if(!ks.compare(Qt::Key_Minus)) slotZoomMinus(); - else if(!ks.compare(Qt::Key_Equal+CTRL) || - !ks.compare(Qt::Key_Plus+CTRL)) matrix_zoom(2.0f); - else if(!ks.compare(Qt::Key_Minus+CTRL)) matrix_zoom(0.5f); - else if(!ks.compare(Qt::Key_Q)) toClipboard(); - else if(!ks.compare(Qt::Key_V)) slotFlipV(); - else if(!ks.compare(Qt::Key_H)) slotFlipH(); - else if(!ks.compare(Qt::Key_Left+CTRL)) slotRotateLeft(); - else if(!ks.compare(Qt::Key_Right+CTRL)) slotRotateRight(); - else if(!ks.compare(Qt::Key_R)) slotMatrixReset(); - else if(!ks.compare(Qt::Key_Up+CTRL)) matrix_rotate(180.0f); - else if(!ks.compare(Qt::Key_Down+CTRL)) matrix_rotate(-180.0f); - else if(!ks.compare(Qt::Key_Left+ALT)) matrix_rotate(-1.0f); - else if(!ks.compare(Qt::Key_Right+ALT)) matrix_rotate(1.0f); + if(!ks.compare(TQt::Key_Left)) matrix_move(movefactor, 0); + else if(!ks.compare(TQt::Key_Right)) matrix_move(-movefactor, 0); + else if(!ks.compare(TQt::Key_Up)) matrix_move(0, -movefactor); + else if(!ks.compare(TQt::Key_Down)) matrix_move(0, movefactor); + else if(!ks.compare(TQt::Key_Equal) || + !ks.compare(TQt::Key_Plus)) slotZoomPlus(); + else if(!ks.compare(TQt::Key_Minus)) slotZoomMinus(); + else if(!ks.compare(TQt::Key_Equal+CTRL) || + !ks.compare(TQt::Key_Plus+CTRL)) matrix_zoom(2.0f); + else if(!ks.compare(TQt::Key_Minus+CTRL)) matrix_zoom(0.5f); + else if(!ks.compare(TQt::Key_Q)) toClipboard(); + else if(!ks.compare(TQt::Key_V)) slotFlipV(); + else if(!ks.compare(TQt::Key_H)) slotFlipH(); + else if(!ks.compare(TQt::Key_Left+CTRL)) slotRotateLeft(); + else if(!ks.compare(TQt::Key_Right+CTRL)) slotRotateRight(); + else if(!ks.compare(TQt::Key_R)) slotMatrixReset(); + else if(!ks.compare(TQt::Key_Up+CTRL)) matrix_rotate(180.0f); + else if(!ks.compare(TQt::Key_Down+CTRL)) matrix_rotate(-180.0f); + else if(!ks.compare(TQt::Key_Left+ALT)) matrix_rotate(-1.0f); + else if(!ks.compare(TQt::Key_Right+ALT)) matrix_rotate(1.0f); #ifndef KSQUIRREL_PART - else if(!ks.compare(Qt::Key_Left+SHIFT)) SQ_GLView::window()->leftTab(); - else if(!ks.compare(Qt::Key_Right+SHIFT)) SQ_GLView::window()->rightTab(); - else if(!ks.compare(Qt::Key_W)) slotCloseRequest(SQ_GLView::window()->tabbar()->indexOf(SQ_GLView::window()->tabbar()->currentTab())); - else if(!ks.compare(Qt::Key_W+CTRL)) closeAllTabsFull(); + else if(!ks.compare(TQt::Key_Left+SHIFT)) SQ_GLView::window()->leftTab(); + else if(!ks.compare(TQt::Key_Right+SHIFT)) SQ_GLView::window()->rightTab(); + else if(!ks.compare(TQt::Key_W)) slotCloseRequest(SQ_GLView::window()->tabbar()->indexOf(SQ_GLView::window()->tabbar()->currentTab())); + else if(!ks.compare(TQt::Key_W+CTRL)) closeAllTabsFull(); #else - else if(!ks.compare(Qt::Key_W)) closeAllTabsFull(); + else if(!ks.compare(TQt::Key_W)) closeAllTabsFull(); #endif - else if(!ks.compare(Qt::Key_N)) updateFilter(!linear); - else if(!ks.compare(Qt::Key_P)) slotProperties(); - else if(!ks.compare(Qt::Key_C)) slotShowCodecSettings(); + else if(!ks.compare(TQt::Key_N)) updateFilter(!linear); + else if(!ks.compare(TQt::Key_P)) slotProperties(); + else if(!ks.compare(TQt::Key_C)) slotShowCodecSettings(); #ifndef KSQUIRREL_PART - else if(!ks.compare(Qt::Key_PageDown) || - !ks.compare(Qt::Key_Space)) slotNext(); - else if(!ks.compare(Qt::Key_PageUp) || - !ks.compare(Qt::Key_BackSpace)) slotPrev(); - else if(!ks.compare(Qt::Key_X) || - !ks.compare(Qt::Key_Escape) || - !ks.compare(Qt::Key_Return) || - !ks.compare(Qt::Key_Enter)) KSquirrel::app()->closeGLWidget(); - else if(!ks.compare(Qt::Key_Home)) slotFirst(); - else if(!ks.compare(Qt::Key_End)) slotLast(); - else if(!ks.compare(Qt::Key_F)) toggleFullScreen(); + else if(!ks.compare(TQt::Key_PageDown) || + !ks.compare(TQt::Key_Space)) slotNext(); + else if(!ks.compare(TQt::Key_PageUp) || + !ks.compare(TQt::Key_BackSpace)) slotPrev(); + else if(!ks.compare(TQt::Key_X) || + !ks.compare(TQt::Key_Escape) || + !ks.compare(TQt::Key_Return) || + !ks.compare(TQt::Key_Enter)) KSquirrel::app()->closeGLWidget(); + else if(!ks.compare(TQt::Key_Home)) slotFirst(); + else if(!ks.compare(TQt::Key_End)) slotLast(); + else if(!ks.compare(TQt::Key_F)) toggleFullScreen(); #endif - else if(!ks.compare(Qt::Key_Z)) slotZoomMenu(); - else if(!ks.compare(Qt::Key_S)) saveAs(); - else if(!ks.compare(Qt::Key_A)) slotToggleAnimate(); - else if(!ks.compare(Qt::Key_I)) slotShowImages(); - else if(!ks.compare(Qt::Key_F1)) jumpToImage(false); - else if(!ks.compare(Qt::Key_F2)) prevImage(); - else if(!ks.compare(Qt::Key_F3)) nextImage(); - else if(!ks.compare(Qt::Key_F4)) jumpToImage(true); - else if(!ks.compare(Qt::Key_F5) || !ks.compare(Qt::Key_F6)) + else if(!ks.compare(TQt::Key_Z)) slotZoomMenu(); + else if(!ks.compare(TQt::Key_S)) saveAs(); + else if(!ks.compare(TQt::Key_A)) slotToggleAnimate(); + else if(!ks.compare(TQt::Key_I)) slotShowImages(); + else if(!ks.compare(TQt::Key_F1)) jumpToImage(false); + else if(!ks.compare(TQt::Key_F2)) prevImage(); + else if(!ks.compare(TQt::Key_F3)) nextImage(); + else if(!ks.compare(TQt::Key_F4)) jumpToImage(true); + else if(!ks.compare(TQt::Key_F5) || !ks.compare(TQt::Key_F6)) { // select a directory KURL url = KFileDialog::getExistingURL(lastCopy.prettyURL(), this); @@ -1063,49 +1063,49 @@ void SQ_GLWidget::slotAccelActivated() lastCopy = url; KIO::Job *job; - if(!ks.compare(Qt::Key_F5)) + if(!ks.compare(TQt::Key_F5)) job = KIO::copy(tab->m_original, url); else job = KIO::move(tab->m_original, url); job->setWindow(this); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyJobResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyJobResult(KIO::Job *))); } - else if(!ks.compare(Qt::Key_F7) || !ks.compare(Qt::Key_F8)) + else if(!ks.compare(TQt::Key_F7) || !ks.compare(TQt::Key_F8)) { KIO::Job *job; - if(!ks.compare(Qt::Key_F6)) + if(!ks.compare(TQt::Key_F6)) job = KIO::copy(tab->m_original, lastCopy); else job = KIO::move(tab->m_original, lastCopy); job->setWindow(this); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyJobResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyJobResult(KIO::Job *))); } - else if(!ks.compare(Qt::Key_F9)) copyURL(); - else if(!ks.compare(Qt::Key_Slash)) slotShowHelp(); - else if(!ks.compare(Qt::Key_B)) toggleDrawingBackground(); - else if(!ks.compare(Qt::Key_K)) toogleTickmarks(); - else if(!ks.compare(Qt::Key_E)) showExternalTools(); - else if(!ks.compare(Qt::Key_Delete)) deleteWrapper(); - else if(!ks.compare(Qt::Key_D)) bcg(); - else if(!ks.compare(Qt::Key_U)) filter(); - else if(!ks.compare(Qt::Key_Y)) crop(); + else if(!ks.compare(TQt::Key_F9)) copyURL(); + else if(!ks.compare(TQt::Key_Slash)) slotShowHelp(); + else if(!ks.compare(TQt::Key_B)) toggleDrawingBackground(); + else if(!ks.compare(TQt::Key_K)) toogleTickmarks(); + else if(!ks.compare(TQt::Key_E)) showExternalTools(); + else if(!ks.compare(TQt::Key_Delete)) deleteWrapper(); + else if(!ks.compare(TQt::Key_D)) bcg(); + else if(!ks.compare(TQt::Key_U)) filter(); + else if(!ks.compare(TQt::Key_Y)) crop(); #ifndef KSQUIRREL_PART - else if(!ks.compare(Qt::Key_R+CTRL)) slotSelectionRect(); - else if(!ks.compare(Qt::Key_E+CTRL)) slotSelectionEllipse(); - else if(!ks.compare(Qt::Key_C+CTRL)) slotSelectionClear(); + else if(!ks.compare(TQt::Key_R+CTRL)) slotSelectionRect(); + else if(!ks.compare(TQt::Key_E+CTRL)) slotSelectionEllipse(); + else if(!ks.compare(TQt::Key_C+CTRL)) slotSelectionClear(); #endif - else if(!ks.compare(Qt::Key_P+CTRL)) slotPrint(); - else if(!ks.compare(Qt::Key_Menu) || - !ks.compare(Qt::Key_M)) menu->exec(QCursor::pos()); - else if(!ks.compare(Qt::Key_Comma)) slotZoomW(); - else if(!ks.compare(Qt::Key_Period)) slotZoomH(); - else if(!ks.compare(Qt::Key_Asterisk)) slotZoomWH(); - else if(!ks.compare(Qt::Key_L)) + else if(!ks.compare(TQt::Key_P+CTRL)) slotPrint(); + else if(!ks.compare(TQt::Key_Menu) || + !ks.compare(TQt::Key_M)) menu->exec(TQCursor::pos()); + else if(!ks.compare(TQt::Key_Comma)) slotZoomW(); + else if(!ks.compare(TQt::Key_Period)) slotZoomH(); + else if(!ks.compare(TQt::Key_Asterisk)) slotZoomWH(); + else if(!ks.compare(TQt::Key_L)) { bool b = pAIfLess->isChecked(); pAIfLess->setChecked(!b); @@ -1115,16 +1115,16 @@ void SQ_GLWidget::slotAccelActivated() { int val = -1; - if(!ks.compare(Qt::Key_1)) val = 1; - else if(!ks.compare(Qt::Key_2)) val = 2; - else if(!ks.compare(Qt::Key_3)) val = 3; - else if(!ks.compare(Qt::Key_4)) val = 4; - else if(!ks.compare(Qt::Key_5)) val = 5; - else if(!ks.compare(Qt::Key_6)) val = 6; - else if(!ks.compare(Qt::Key_7)) val = 7; - else if(!ks.compare(Qt::Key_8)) val = 8; - else if(!ks.compare(Qt::Key_9)) val = 9; - else if(!ks.compare(Qt::Key_0)) val = 10; + if(!ks.compare(TQt::Key_1)) val = 1; + else if(!ks.compare(TQt::Key_2)) val = 2; + else if(!ks.compare(TQt::Key_3)) val = 3; + else if(!ks.compare(TQt::Key_4)) val = 4; + else if(!ks.compare(TQt::Key_5)) val = 5; + else if(!ks.compare(TQt::Key_6)) val = 6; + else if(!ks.compare(TQt::Key_7)) val = 7; + else if(!ks.compare(TQt::Key_8)) val = 8; + else if(!ks.compare(TQt::Key_9)) val = 9; + else if(!ks.compare(TQt::Key_0)) val = 10; if(val != -1) { @@ -1214,7 +1214,7 @@ void SQ_GLWidget::crop() memoryPart *pt; SQ_GLWidget::findCloserTiles(tab->sw, tab->sh, pp.tilesx, pp.tilesy); - QPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp); + TQPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp); pp.realw = pair.first; pp.realh = pair.second; pp.w = tab->sw; @@ -1224,7 +1224,7 @@ void SQ_GLWidget::crop() { KMessageBox::error(this, i18n("Memory allocation failed for %1 of memory") - .arg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA)))); + .tqarg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA)))); return; } @@ -1291,7 +1291,7 @@ void SQ_GLWidget::slotChangeTab(int id) if(id == -1) { SQ_GLView::window()->resetStatusBar(); - KSquirrel::app()->setCaption(QString::null); + KSquirrel::app()->setCaption(TQString()); decoded = false; changeSlider(1.0); } @@ -1312,7 +1312,7 @@ void SQ_GLWidget::slotChangeTab(int id) for(;it != itEnd;++it, ++i) { - mid = images->insertItem(QString::fromLatin1("#%1 [%2x%3@%4]").arg(i+1).arg((*it).w).arg((*it).h).arg((*it).bpp)); + mid = images->insertItem(TQString::tqfromLatin1("#%1 [%2x%3@%4]").tqarg(i+1).tqarg((*it).w).tqarg((*it).h).tqarg((*it).bpp)); images->setItemParameter(mid, i); if(i == tab->current) @@ -1388,9 +1388,9 @@ void SQ_GLWidget::slotCloseRequest(int index) SQ_GLView::window()->tabbar()->blockSignals(false); // workaround bug in KTabBar - QMouseEvent ev(QEvent::MouseMove, - QCursor::pos(), - SQ_GLView::window()->tabbar()->mapFromGlobal(QCursor::pos()), + TQMouseEvent ev(TQEvent::MouseMove, + TQCursor::pos(), + SQ_GLView::window()->tabbar()->mapFromGlobal(TQCursor::pos()), Qt::NoButton, Qt::NoButton); @@ -1416,7 +1416,7 @@ void SQ_GLWidget::slotCloseRequest(int index) void SQ_GLWidget::initBrokenImage() { memoryPart *pt; - QImage broken = QPixmap(file_broken_xpm).convertToImage().swapRGB(); + TQImage broken = TQPixmap(file_broken_xpm).convertToImage().swapRGB(); broken.setAlphaBuffer(true); parts_broken = new Parts; @@ -1452,14 +1452,14 @@ void SQ_GLWidget::initBrokenImage() } // Accept drop events. -void SQ_GLWidget::dropEvent(QDropEvent *e) +void SQ_GLWidget::dropEvent(TQDropEvent *e) { - QStringList files; + TQStringList files; - if(QUriDrag::decodeLocalFiles(e, files)) + if(TQUriDrag::decodeLocalFiles(e, files)) { // go through array and find first supported image format - for(QStringList::iterator it = files.begin();it != files.end();++it) + for(TQStringList::iterator it = files.begin();it != files.end();++it) { if(SQ_LibraryHandler::instance()->libraryForFile(*it)) { @@ -1474,9 +1474,9 @@ void SQ_GLWidget::dropEvent(QDropEvent *e) } // Accept drag events. -void SQ_GLWidget::dragEnterEvent(QDragEnterEvent *e) +void SQ_GLWidget::dragEnterEvent(TQDragEnterEvent *e) { - e->accept(QUriDrag::canDecode(e)); + e->accept(TQUriDrag::canDecode(e)); } /* @@ -1484,8 +1484,8 @@ void SQ_GLWidget::dragEnterEvent(QDragEnterEvent *e) */ void SQ_GLWidget::setClearColor() { - QColor color; - QString path; + TQColor color; + TQString path; SQ_Config::instance()->setGroup("GL view"); @@ -1493,7 +1493,7 @@ void SQ_GLWidget::setClearColor() { // system color case 0: - color = colorGroup().color(QColorGroup::Base); + color = tqcolorGroup().color(TQColorGroup::Base); break; // custom color @@ -1601,10 +1601,10 @@ void SQ_GLWidget::toggleDrawingBackground() void SQ_GLWidget::createMarks() { - mm[0] = QImage(locate("data", "images/marks/mark_1.png")); - mm[1] = QImage(locate("data", "images/marks/mark_2.png")); - mm[2] = QImage(locate("data", "images/marks/mark_3.png")); - mm[3] = QImage(locate("data", "images/marks/mark_4.png")); + mm[0] = TQImage(locate("data", "images/marks/mark_1.png")); + mm[1] = TQImage(locate("data", "images/marks/mark_2.png")); + mm[2] = TQImage(locate("data", "images/marks/mark_3.png")); + mm[3] = TQImage(locate("data", "images/marks/mark_4.png")); marks = (mm[0].isNull() || mm[1].isNull() || mm[2].isNull() || mm[3].isNull()) ? false : true; @@ -1623,10 +1623,10 @@ void SQ_GLWidget::createMarks() */ void SQ_GLWidget::updateCurrentFileInfo() { - QString status = QString::fromLatin1("%1x%2@%3") - .arg(tab->finfo.image[tab->current].w) - .arg(tab->finfo.image[tab->current].h) - .arg(tab->finfo.image[tab->current].bpp); + TQString status = TQString::tqfromLatin1("%1x%2@%3") + .tqarg(tab->finfo.image[tab->current].w) + .tqarg(tab->finfo.image[tab->current].h) + .tqarg(tab->finfo.image[tab->current].bpp); #ifndef KSQUIRREL_PART SQ_GLView::window()->sbarWidget("SBDecoded")->setText(status); @@ -1667,7 +1667,7 @@ void SQ_GLWidget::calcFrameLabelWidth() #ifndef KSQUIRREL_PART SQ_GLView::window()->sbarWidget("SBFrame")->setFixedWidth( SQ_GLView::window()->sbarWidget("SBFrame")->fontMetrics() - .boundingRect(QString::fromLatin1("0%1/0%2").arg(tab->total).arg(tab->total)).width()); + .boundingRect(TQString::tqfromLatin1("0%1/0%2").tqarg(tab->total).tqarg(tab->total)).width()); #endif } @@ -1680,9 +1680,9 @@ void SQ_GLWidget::calcFrameLabelWidth() void SQ_GLWidget::frameChanged() { #ifndef KSQUIRREL_PART - SQ_GLView::window()->sbarWidget("SBFrame")->setText(QString::fromLatin1("%1/%2").arg(tab->current+1).arg(tab->total)); + SQ_GLView::window()->sbarWidget("SBFrame")->setText(TQString::tqfromLatin1("%1/%2").tqarg(tab->current+1).tqarg(tab->total)); #else - t_glv.sbarWidget("SBFrame")->setText(QString::fromLatin1("%1/%2").arg(tab->current+1).arg(tab->total)); + t_glv.sbarWidget("SBFrame")->setText(TQString::tqfromLatin1("%1/%2").tqarg(tab->current+1).tqarg(tab->total)); #endif } @@ -1705,7 +1705,7 @@ void SQ_GLWidget::closeAllTabsFull() SQ_GLView::window()->resetStatusBar(); SQ_GLView::window()->tabbar()->hide(); - KSquirrel::app()->setCaption(QString::null); + KSquirrel::app()->setCaption(TQString()); #endif decoded = false; @@ -1727,17 +1727,17 @@ void SQ_GLWidget::slotPrint() if(!decoded || tab->broken) return; - QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian); - QImage img; + TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian); + TQImage img; if(gls->valid() && calcSelection()) - img = im.copy(tab->sx, tab->sy, tab->sw, tab->sh).swapRGB(); + img = TQImage(im.copy(tab->sx, tab->sy, tab->sw, tab->sh)).swapRGB(); else { if(tab->parts[tab->current].realw == tab->parts[tab->current].w && tab->parts[tab->current].realh == tab->parts[tab->current].h) img = im.swapRGB(); else - img = im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h).swapRGB(); + img = TQImage(im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h)).swapRGB(); } img.setAlphaBuffer(true); @@ -1748,20 +1748,20 @@ void SQ_GLWidget::slotPrint() if(printer.setup(this)) { - QPainter p(&printer); + TQPainter p(&printer); - QPaintDeviceMetrics mt(&printer); + TQPaintDeviceMetrics mt(&printer); - QSize sz(img.width(), img.height()); + TQSize sz(img.width(), img.height()); if(img.width() > mt.width() || img.height() > mt.height()) - sz.scale(mt.width(), mt.height(), QSize::ScaleMin); + sz.tqscale(mt.width(), mt.height(), TQSize::ScaleMin); int cp = printer.numCopies(); for(int i = 0;i < cp;i++) { - p.drawImage(QRect((mt.width()-sz.width())/2, (mt.height()-sz.height())/2, sz.width(), sz.height()), img); + p.drawImage(TQRect((mt.width()-sz.width())/2, (mt.height()-sz.height())/2, sz.width(), sz.height()), img); if(i < cp-1) printer.newPage(); @@ -1774,5 +1774,5 @@ void SQ_GLWidget::copyURL() if(!decoded || tab->broken) return; - QApplication::clipboard()->setText(tab->m_original.prettyURL()); + TQApplication::tqclipboard()->setText(tab->m_original.prettyURL()); } diff --git a/ksquirrel/sq_helpwidget.ui b/ksquirrel/sq_helpwidget.ui index 8f92708..1902366 100644 --- a/ksquirrel/sq_helpwidget.ui +++ b/ksquirrel/sq_helpwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_HelpWidget</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_HelpWidget</cstring> </property> @@ -33,11 +33,11 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QWidgetStack" row="1" column="0"> + <widget class="TQWidgetStack" row="1" column="0"> <property name="name"> <cstring>widgetStack1</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -48,20 +48,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><b><p align=right>Esc,X,Return</p></b></td><td>close</td></tr><tr><td><b><p align=right>Middle click, F</p></b></td><td>fullscreen</td></tr><tr><td><b><p align=right>Z</p></b></td><td>show 'Zoom' menu</td></tr><tr><td><b><p align=right>/</p></b></td><td>show this help</td></tr><tr><td><b><p align=right>Right click, M, ContextMenu</p></b></td><td>show context menu</td></tr><tr><td><b><p align=right>N</p></b></td><td>toggle filter</td></tr><tr><td><b><p align=right>Shift + Left button</p></b></td><td>select a region</td></tr><tr><td><b><p align=right>Shift + Left</p></b></td><td>previous tab</td></tr><tr><td><b><p align=right>Shift + Right</p></b></td><td>next tab</td></tr><tr><td><b><p align=right>W</p></b></td><td>close tab</td></tr></table></p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -72,20 +72,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><b><p align=right>Space, Page Down</p></b></td><td>next image</td></tr><tr><td><b><p align=right>Backspace, Page Up</p></b></td><td>previous image</td></tr><tr><td><b><p align=right>Home</p></b></td><td>first image</td></tr><tr><td><b><p align=right>End</p></b></td><td>last image</td></tr></table></p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -96,20 +96,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><b><p align=right>Left, Right, Up, Down</p></b></td><td>move the image</td></tr><tr><td><b><p align=right>Ctrl + Left</p></b></td><td>rotate left</td></tr><tr><td><b><p align=right>Ctrl + Right</p></b></td><td>rotate right</td></tr><tr><td><b><p align=right>Ctrl + Up/Down</p></b></td><td>rotate for 180 degrees up/down</td></tr><tr><td><b><p align=right>Alt + Left/Right</p></b></td><td>rotate for 1 degree left/right</td></tr></table</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -120,20 +120,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><b><p align=right>+/-</p></b></td><td>zoom Nx</td></tr><tr><td><b><p align=right>Ctrl + +/-</p></b></td><td>zoom 2x/0.5x</td></tr><tr><td><b><p align=right>Scroll</p></b></td><td>load next/prev file OR zoom+/zoom-</td></tr><tr><td><b><p align=right>Shift + Scroll</p></b></td><td>zoom+/zoom-</td></tr><tr><td><b><p align=right>Ctrl + Scroll</p></b></td><td>zoom+ 2x/zoom- 2x</td></tr><tr><td><b><p align=right>1..9</p></b></td><td>zoom 1..9x</td></tr><tr><td><b><p align=right>0</p></b></td><td>zoom 10x</td></tr><tr><td><b><p align=right>comma</p></b></td><td>fit width</td></tr><tr><td><b><p align=right>period</p></b></td><td>fit height</td></tr><tr><td><b><p align=right>*</p></b></td><td>fit image</td></tr></table</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -147,21 +147,21 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> <property name="text"> <string><p align=center><table><tr><td><p align=right><b>S</b></p></td><td>save as</td></tr><tr><td><p align=right><b>V</b></p></td><td>flip vertically</td></tr><tr><td><p align=right><b>H</b></p></td><td>flip horizontally</td></tr><tr><td><p align=right><b>R</b></p></td><td>reset</td></tr><tr><td><p align=right><b>P</b></p></td><td>image properties</td></tr><tr><td><p align=right><b>C</b></p></td><td>codec settings</td></tr><tr><td><p align=right><b>L</b></p></td><td>ignore zoom if image is smaller than window</td></tr><tr><td><p align=right><b>I</b></p></td><td>menu with images</td></tr><tr><td><p align=right><b>A</b></p></td><td>stop/start animation</td></tr><tr><td><p align=right><b>B</b></p></td><td>toggle drawing background for transparent images</td></tr><tr><td><p align=right><b>K</b></p></td><td>toggle drawing tickmarks</td></tr><tr><td><p align=right><b>E</b></p></td><td>show menu with external tools</td></tr><tr><td><p align=right><b>Y</b></p></td><td>crop</td></tr><tr><td><p align=right><b>F1</b></p></td><td>first image in multi-paged image</td></tr><tr><td><p align=right><b>F2</b></p></td><td>previous</td></tr><tr><td><p align=right><b>F3</b></p></td><td>next</td></tr><tr><td><p align=right><b>F4</b></p></td><td>last</td></tr></table></p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </grid> </widget> </widget> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroup</cstring> </property> @@ -181,7 +181,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushButton3</cstring> </property> @@ -204,7 +204,7 @@ <number>0</number> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>pushButton3_2</cstring> </property> @@ -224,7 +224,7 @@ <number>1</number> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>pushButton3_3</cstring> </property> @@ -244,7 +244,7 @@ <number>2</number> </property> </widget> - <widget class="QPushButton" row="0" column="4"> + <widget class="TQPushButton" row="0" column="4"> <property name="name"> <cstring>pushButton3_5</cstring> </property> @@ -264,7 +264,7 @@ <number>4</number> </property> </widget> - <widget class="QPushButton" row="0" column="3"> + <widget class="TQPushButton" row="0" column="3"> <property name="name"> <cstring>pushButton3_4</cstring> </property> @@ -296,7 +296,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> @@ -321,14 +321,14 @@ <tabstop>pushButton3_4</tabstop> </tabstops> <includes> - <include location="global" impldecl="in implementation">qtooltip.h</include> + <include location="global" impldecl="in implementation">tqtooltip.h</include> <include location="local" impldecl="in implementation">sq_config.h</include> <include location="local" impldecl="in implementation">sq_helpwidget.ui.h</include> </includes> <functions> <function access="private" specifier="non virtual">init()</function> <function access="private" specifier="non virtual">destroy()</function> - <function returnType="bool">event( QEvent * e )</function> + <function returnType="bool">event( TQEvent * e )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_helpwidget.ui.h b/ksquirrel/sq_helpwidget.ui.h index 844f327..c0f2673 100644 --- a/ksquirrel/sq_helpwidget.ui.h +++ b/ksquirrel/sq_helpwidget.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). @@ -17,7 +17,7 @@ void SQ_HelpWidget::init() { - setPalette(QToolTip::palette()); + setPalette(TQToolTip::palette()); SQ_Config::instance()->setGroup("GL view"); int pg = SQ_Config::instance()->readNumEntry("help_id", 0); @@ -32,14 +32,14 @@ void SQ_HelpWidget::destroy() SQ_Config::instance()->writeEntry("help_id", buttonGroup->selectedId()); } -bool SQ_HelpWidget::event(QEvent *e) +bool SQ_HelpWidget::event(TQEvent *e) { - if(e->type() == QEvent::WindowDeactivate - || e->type() == QEvent::MouseButtonPress - || e->type() == QEvent::KeyPress) + if(e->type() == TQEvent::WindowDeactivate + || e->type() == TQEvent::MouseButtonPress + || e->type() == TQEvent::KeyPress) { reject(); } - return QDialog::event(e); + return TQDialog::event(e); } diff --git a/ksquirrel/sq_hloptions.h b/ksquirrel/sq_hloptions.h index 8b4308c..4b13134 100644 --- a/ksquirrel/sq_hloptions.h +++ b/ksquirrel/sq_hloptions.h @@ -31,7 +31,7 @@ struct SQ_HLOptions static SQ_HLOptions* instance() { return m_instance; } - QString param; + TQString param; KURL file, dir; /* diff --git a/ksquirrel/sq_iconlistbox.cpp b/ksquirrel/sq_iconlistbox.cpp index 5c67eac..39e155a 100644 --- a/ksquirrel/sq_iconlistbox.cpp +++ b/ksquirrel/sq_iconlistbox.cpp @@ -22,10 +22,10 @@ #include "sq_iconlistbox.h" #include "sq_iconlistitem.h" -SQ_IconListBox::SQ_IconListBox(QWidget *parent, const char *name, WFlags f) : KListBox(parent, name, f), +SQ_IconListBox::SQ_IconListBox(TQWidget *tqparent, const char *name, WFlags f) : KListBox(tqparent, name, f), mHeightValid(false), mWidthValid(false) { - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(TQScrollView::AlwaysOff); } void SQ_IconListBox::updateWidth() @@ -34,40 +34,40 @@ void SQ_IconListBox::updateWidth() { int maxWidth = 10, w; - for(QListBoxItem *i = item(0); i != 0; i = i->next()) + for(TQListBoxItem *i = item(0); i != 0; i = i->next()) { w = ((SQ_IconListItem *)i)->width(this); - maxWidth = QMAX(w, maxWidth); + maxWidth = TQMAX(w, maxWidth); } - for(QListBoxItem *i = item(0); i != 0; i = i->next()) + for(TQListBoxItem *i = item(0); i != 0; i = i->next()) ((SQ_IconListItem *)i)->expandMinimumWidth(maxWidth + 30); if(verticalScrollBar()->isVisible()) - maxWidth += verticalScrollBar()->sizeHint().width(); + maxWidth += verticalScrollBar()->tqsizeHint().width(); setFixedWidth(maxWidth + frameWidth()*2 + 30); mWidthValid = true; } } -void SQ_IconListBox::invalidateHeight() +void SQ_IconListBox::tqinvalidateHeight() { mHeightValid = false; } -void SQ_IconListBox::invalidateWidth() +void SQ_IconListBox::tqinvalidateWidth() { mWidthValid = false; } -void SQ_IconListBox::updateAndInstall(QObject *o) +void SQ_IconListBox::updateAndInstall(TQObject *o) { - invalidateHeight(); - invalidateWidth(); + tqinvalidateHeight(); + tqinvalidateWidth(); updateWidth(); - QFont listFont(font()); + TQFont listFont(font()); listFont.setBold(true); setFont(listFont); diff --git a/ksquirrel/sq_iconlistbox.h b/ksquirrel/sq_iconlistbox.h index be66c6c..5537ab5 100644 --- a/ksquirrel/sq_iconlistbox.h +++ b/ksquirrel/sq_iconlistbox.h @@ -29,14 +29,14 @@ class SQ_IconListBox : public KListBox { public: - SQ_IconListBox(QWidget * = 0, const char * = 0, WFlags = 0); + SQ_IconListBox(TQWidget * = 0, const char * = 0, WFlags = 0); - void updateAndInstall(QObject *); + void updateAndInstall(TQObject *); private: void updateWidth(); - void invalidateHeight(); - void invalidateWidth(); + void tqinvalidateHeight(); + void tqinvalidateWidth(); private: bool mHeightValid; diff --git a/ksquirrel/sq_iconlistitem.cpp b/ksquirrel/sq_iconlistitem.cpp index a0e9fd3..821e7cd 100644 --- a/ksquirrel/sq_iconlistitem.cpp +++ b/ksquirrel/sq_iconlistitem.cpp @@ -19,15 +19,15 @@ #include "config.h" #endif -#include <qlistbox.h> -#include <qpainter.h> -#include <qbitmap.h> -#include <qpixmap.h> +#include <tqlistbox.h> +#include <tqpainter.h> +#include <tqbitmap.h> +#include <tqpixmap.h> #include "sq_iconlistitem.h" -SQ_IconListItem::SQ_IconListItem(QListBox *listbox, const QPixmap &pixmap, const QString &text) - : QListBoxItem(listbox) +SQ_IconListItem::SQ_IconListItem(TQListBox *listbox, const TQPixmap &pixmap, const TQString &text) + : TQListBoxItem(listbox) { mPixmap = pixmap; @@ -40,66 +40,66 @@ SQ_IconListItem::SQ_IconListItem(QListBox *listbox, const QPixmap &pixmap, const int SQ_IconListItem::expandMinimumWidth( int width ) { - mMinimumWidth = QMAX(mMinimumWidth, width); + mMinimumWidth = TQMAX(mMinimumWidth, width); return mMinimumWidth; } -const QPixmap& SQ_IconListItem::defaultPixmap() +const TQPixmap& SQ_IconListItem::defaultPixmap() { - static QPixmap *pix=0; + static TQPixmap *pix=0; if(pix == 0) { - pix = new QPixmap( 32, 32 ); - QPainter p(pix); + pix = new TQPixmap( 32, 32 ); + TQPainter p(pix); p.eraseRect(0, 0, pix->width(), pix->height()); - p.setPen(Qt::red); + p.setPen(TQt::red); p.drawRect(0, 0, pix->width(), pix->height()); p.end(); - QBitmap mask(pix->width(), pix->height(), true); - mask.fill(Qt::black); - p.begin(&mask); - p.setPen(Qt::white); + TQBitmap tqmask(pix->width(), pix->height(), true); + tqmask.fill(TQt::black); + p.begin(&tqmask); + p.setPen(TQt::white); p.drawRect(0, 0, pix->width(), pix->height()); p.end(); - pix->setMask(mask); + pix->setMask(tqmask); } return *pix; } -void SQ_IconListItem::paint(QPainter *painter) +void SQ_IconListItem::paint(TQPainter *painter) { - QFontMetrics fm = painter->fontMetrics(); - int ht = fm.boundingRect(0, 0, 0, 0, Qt::AlignCenter, text()).height(); + TQFontMetrics fm = painter->fontMetrics(); + int ht = fm.boundingRect(0, 0, 0, 0, TQt::AlignCenter, text()).height(); int wp = mPixmap.width(); int hp = mPixmap.height(); painter->drawPixmap((mMinimumWidth-wp)/2, 5, mPixmap); if(text().isEmpty() == false) - painter->drawText(0, hp+7, mMinimumWidth, ht, Qt::AlignCenter, text()); + painter->drawText(0, hp+7, mMinimumWidth, ht, TQt::AlignCenter, text()); } -int SQ_IconListItem::height( const QListBox *lb ) const +int SQ_IconListItem::height( const TQListBox *lb ) const { if(text().isEmpty() == true) return mPixmap.height(); else { - int ht = lb->fontMetrics().boundingRect(0, 0, 0, 0, Qt::AlignCenter, text()).height(); + int ht = lb->fontMetrics().boundingRect(0, 0, 0, 0, TQt::AlignCenter, text()).height(); return (mPixmap.height() + ht + 10); } } -int SQ_IconListItem::width( const QListBox *lb ) const +int SQ_IconListItem::width( const TQListBox *lb ) const { - int wt = lb->fontMetrics().boundingRect(0, 0, 0, 0, Qt::AlignCenter, text()).width() + 10; + int wt = lb->fontMetrics().boundingRect(0, 0, 0, 0, TQt::AlignCenter, text()).width() + 10; int wp = mPixmap.width() + 10; - int w = QMAX(wt, wp); + int w = TQMAX(wt, wp); - return QMAX(w, mMinimumWidth); + return TQMAX(w, mMinimumWidth); } diff --git a/ksquirrel/sq_iconlistitem.h b/ksquirrel/sq_iconlistitem.h index 4a9f580..f0e997b 100644 --- a/ksquirrel/sq_iconlistitem.h +++ b/ksquirrel/sq_iconlistitem.h @@ -18,11 +18,11 @@ #ifndef SQ_ICONLISTITEM_H #define SQ_ICONLISTITEM_H -#include <qlistbox.h> +#include <tqlistbox.h> -class QListBox; -class QPainter; -class QPixmap; +class TQListBox; +class TQPainter; +class TQPixmap; /* * SQ_IconListItem represents a listbox item. @@ -32,21 +32,21 @@ class QPixmap; * Taken from kdelibs. */ -class SQ_IconListItem : public QListBoxItem +class SQ_IconListItem : public TQListBoxItem { public: - SQ_IconListItem(QListBox *listbox, const QPixmap &pixmap, const QString &text); + SQ_IconListItem(TQListBox *listbox, const TQPixmap &pixmap, const TQString &text); - virtual int height(const QListBox *lb) const; - virtual int width(const QListBox *lb) const; + virtual int height(const TQListBox *lb) const; + virtual int width(const TQListBox *lb) const; int expandMinimumWidth(int width); protected: - const QPixmap& defaultPixmap(); - void paint(QPainter *painter); + const TQPixmap& defaultPixmap(); + void paint(TQPainter *painter); private: - QPixmap mPixmap; + TQPixmap mPixmap; int mMinimumWidth; }; diff --git a/ksquirrel/sq_iconloader.cpp b/ksquirrel/sq_iconloader.cpp index 698160f..91feec2 100644 --- a/ksquirrel/sq_iconloader.cpp +++ b/ksquirrel/sq_iconloader.cpp @@ -27,7 +27,7 @@ SQ_IconLoader * SQ_IconLoader::m_instance = 0; -SQ_IconLoader::SQ_IconLoader(QObject *parent) : QObject(parent) +SQ_IconLoader::SQ_IconLoader(TQObject *tqparent) : TQObject(tqparent) { m_instance = this; @@ -37,10 +37,10 @@ SQ_IconLoader::SQ_IconLoader(QObject *parent) : QObject(parent) SQ_IconLoader::~SQ_IconLoader() {} -QPixmap SQ_IconLoader::loadIcon(const QString& name, KIcon::Group group, int size) const +TQPixmap SQ_IconLoader::loadIcon(const TQString& name, KIcon::Group group, int size) const { // try to load from installed icon theme - QPixmap p = KGlobal::iconLoader()->loadIcon(name, group, size, KIcon::DefaultState, 0, true); + TQPixmap p = KGlobal::iconLoader()->loadIcon(name, group, size, KIcon::DefaultState, 0, true); // requested pixmap not found, let's // try to find it in our pixmaps @@ -72,11 +72,11 @@ QPixmap SQ_IconLoader::loadIcon(const QString& name, KIcon::Group group, int siz */ void SQ_IconLoader::fillPixmaps() { - pixmap_up = QPixmap(xpm_up); - pixmap_down = QPixmap(xpm_down); - pixmap_display = QPixmap(xpm_display); - pixmap_folder = QPixmap(xpm_folder); - pixmap_images = QPixmap(xpm_images); - pixmap_binary = QPixmap(xpm_binary); - pixmap_edit = QPixmap(xpm_edit); + pixmap_up = TQPixmap(xpm_up); + pixmap_down = TQPixmap(xpm_down); + pixmap_display = TQPixmap(xpm_display); + pixmap_folder = TQPixmap(xpm_folder); + pixmap_images = TQPixmap(xpm_images); + pixmap_binary = TQPixmap(xpm_binary); + pixmap_edit = TQPixmap(xpm_edit); } diff --git a/ksquirrel/sq_iconloader.h b/ksquirrel/sq_iconloader.h index 164d918..2c40530 100644 --- a/ksquirrel/sq_iconloader.h +++ b/ksquirrel/sq_iconloader.h @@ -18,8 +18,8 @@ #ifndef SQ_ICONLOADER_H #define SQ_ICONLOADER_H -#include <qobject.h> -#include <qpixmap.h> +#include <tqobject.h> +#include <tqpixmap.h> #include <kicontheme.h> @@ -29,13 +29,13 @@ * instead. */ -class SQ_IconLoader : public QObject +class SQ_IconLoader : public TQObject { public: - SQ_IconLoader(QObject *parent = 0); + SQ_IconLoader(TQObject *tqparent = 0); ~SQ_IconLoader(); - QPixmap loadIcon(const QString &name, KIcon::Group group = KIcon::Desktop, int size = 16) const; + TQPixmap loadIcon(const TQString &name, KIcon::Group group = KIcon::Desktop, int size = 16) const; private: static SQ_IconLoader *m_instance; @@ -49,7 +49,7 @@ class SQ_IconLoader : public QObject static SQ_IconLoader* instance() { return m_instance; } private: - QPixmap pixmap_up, pixmap_down, + TQPixmap pixmap_up, pixmap_down, pixmap_display, pixmap_folder, pixmap_images, pixmap_binary, pixmap_edit; diff --git a/ksquirrel/sq_imageloader.cpp b/ksquirrel/sq_imageloader.cpp index 642c4c2..48b11cd 100644 --- a/ksquirrel/sq_imageloader.cpp +++ b/ksquirrel/sq_imageloader.cpp @@ -19,7 +19,7 @@ #include "config.h" #endif -#include <qfile.h> +#include <tqfile.h> #include <stdio.h> #include <string.h> #include <stdlib.h> @@ -34,7 +34,7 @@ SQ_ImageLoader * SQ_ImageLoader::m_instance = 0; -SQ_ImageLoader::SQ_ImageLoader(QObject *parent) : QObject(parent), m_errors(0) +SQ_ImageLoader::SQ_ImageLoader(TQObject *tqparent) : TQObject(tqparent), m_errors(0) { m_instance = this; @@ -54,7 +54,7 @@ SQ_ImageLoader::~SQ_ImageLoader() /* * Try to determine image dimensions. */ -bool SQ_ImageLoader::tasteImage(const QString &path, int *w, int *h, SQ_LIBRARY *_lib) +bool SQ_ImageLoader::tasteImage(const TQString &path, int *w, int *h, SQ_LIBRARY *_lib) { SQ_LIBRARY *lib; int res; @@ -73,7 +73,7 @@ bool SQ_ImageLoader::tasteImage(const QString &path, int *w, int *h, SQ_LIBRARY return false; // init... - res = codeK->read_init(QString(QFile::encodeName(path))); + res = codeK->read_init(TQString(TQFile::encodeName(path)).ascii()); // error in init()! if(res != SQE_OK) @@ -107,7 +107,7 @@ bool SQ_ImageLoader::tasteImage(const QString &path, int *w, int *h, SQ_LIBRARY * Try to load image and store a pointer to decoded image data in m_image. Aslo * store information about the image in finfo. */ -bool SQ_ImageLoader::loadImage(const QString &pixPath, const SQ_CodecSettings::settings &sett, bool multi, int nomorethan) +bool SQ_ImageLoader::loadImage(const TQString &pixPath, const SQ_CodecSettings::settings &sett, bool multi, int nomorethan) { SQ_LIBRARY *lib; int res, current = 0, i, j; @@ -141,7 +141,7 @@ bool SQ_ImageLoader::loadImage(const QString &pixPath, const SQ_CodecSettings::s SQ_CodecSettings::applySettings(lib, sett); // init... - res = codeK->read_init(QString(QFile::encodeName(pixPath))); + res = codeK->read_init(TQString(TQFile::encodeName(pixPath)).ascii()); // error in init()! if(res != SQE_OK) @@ -247,13 +247,13 @@ void SQ_ImageLoader::cleanup(bool del) } /* - * Return decoded image as QImage. + * Return decoded image as TQImage. */ -QImage SQ_ImageLoader::image() const +TQImage SQ_ImageLoader::image() const { - QImage image((unsigned char*)bits(), finfo->image[0].w, finfo->image[0].h, 32, 0, 0, QImage::LittleEndian); + TQImage image((unsigned char*)bits(), finfo->image[0].w, finfo->image[0].h, 32, 0, 0, TQImage::LittleEndian); - // if the image has alpha channel, let QImage know it + // if the image has alpha channel, let TQImage know it if(finfo->image[0].hasalpha) image.setAlphaBuffer(true); diff --git a/ksquirrel/sq_imageloader.h b/ksquirrel/sq_imageloader.h index 135c4a0..ecc8c77 100644 --- a/ksquirrel/sq_imageloader.h +++ b/ksquirrel/sq_imageloader.h @@ -18,9 +18,9 @@ #ifndef SQ_IMAGELOADER_H #define SQ_IMAGELOADER_H -#include <qstring.h> -#include <qimage.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqobject.h> #include "sq_codecsettings.h" @@ -35,10 +35,10 @@ struct SQ_LIBRARY; * (for generating thumbnails). */ -class SQ_ImageLoader : public QObject +class SQ_ImageLoader : public TQObject { public: - SQ_ImageLoader(QObject *parent); + SQ_ImageLoader(TQObject *tqparent); ~SQ_ImageLoader(); /* @@ -47,12 +47,12 @@ class SQ_ImageLoader : public QObject * * If 'multi' is true, read all image pages from file. */ - bool loadImage(const QString &path, const SQ_CodecSettings::settings &sett, bool multi = false, int nomorethan = -1); + bool loadImage(const TQString &path, const SQ_CodecSettings::settings &sett, bool multi = false, int nomorethan = -1); /* * Try to determine image dimensions. */ - bool tasteImage(const QString &path, int *w, int *h, SQ_LIBRARY *_lib = 0); + bool tasteImage(const TQString &path, int *w, int *h, SQ_LIBRARY *_lib = 0); /* * Remove any previously saved data. @@ -65,9 +65,9 @@ class SQ_ImageLoader : public QObject RGBA* bits() const; /* - * Return decoded image as QImage. + * Return decoded image as TQImage. */ - QImage image() const; + TQImage image() const; /* * Get a pointer to structure with information diff --git a/ksquirrel/sq_imageproperties.ui b/ksquirrel/sq_imageproperties.ui index 80e92fd..6f445f4 100644 --- a/ksquirrel/sq_imageproperties.ui +++ b/ksquirrel/sq_imageproperties.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ImageProperties</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ImageProperties</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>pushButton1</cstring> </property> @@ -49,18 +49,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>470</width> <height>20</height> </size> </property> </spacer> - <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQTabWidget" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -81,14 +81,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> </size> </property> </spacer> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -102,7 +102,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -118,7 +118,7 @@ <string>Owner:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel5_2</cstring> </property> @@ -134,7 +134,7 @@ <string>Group:</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textOwner</cstring> </property> @@ -142,7 +142,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel27_2</cstring> </property> @@ -157,11 +157,11 @@ <property name="text"> <string>Permissions:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textPermissions</cstring> </property> @@ -177,7 +177,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textGroup</cstring> </property> @@ -187,7 +187,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="1" column="1"> + <widget class="TQGroupBox" row="1" column="1"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -204,7 +204,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -219,11 +219,11 @@ <property name="text"> <string>Created:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -238,11 +238,11 @@ <property name="text"> <string>Last read:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3_2_2</cstring> </property> @@ -257,11 +257,11 @@ <property name="text"> <string>Last modified:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textCreated</cstring> </property> @@ -277,7 +277,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textLastRead</cstring> </property> @@ -293,7 +293,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textLastMod</cstring> </property> @@ -311,7 +311,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -325,7 +325,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -341,7 +341,7 @@ <string>File:</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textSize</cstring> </property> @@ -357,7 +357,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -373,7 +373,7 @@ <string>Directory:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3_3</cstring> </property> @@ -389,7 +389,7 @@ <string>Size:</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>lineDirectory</cstring> </property> @@ -397,7 +397,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>lineFile</cstring> </property> @@ -409,7 +409,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -420,45 +420,45 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel6_2_2_2</cstring> </property> <property name="text"> <string>Type:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel11_2_2_2</cstring> </property> <property name="text"> <string>Number of frames:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2_2_3</cstring> </property> @@ -473,11 +473,11 @@ <property name="text"> <string>Current frame</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2_2_4</cstring> </property> @@ -492,66 +492,66 @@ <property name="text"> <string>Delay:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel7_2_2_2</cstring> </property> <property name="text"> <string>Dimensions:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel8_2_2_2</cstring> </property> <property name="text"> <string>Bits per pixel:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel9_2_2_2</cstring> </property> <property name="text"> <string>Color space:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel10_2_2_2</cstring> </property> <property name="text"> <string>Compression:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel21_2_2_2</cstring> </property> <property name="text"> <string>Uncompressed size:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2</cstring> </property> @@ -566,11 +566,11 @@ <property name="text"> <string>Compression ratio:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2_2</cstring> </property> @@ -585,11 +585,11 @@ <property name="text"> <string>Interlaced:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel23_2_2_2_2_2</cstring> </property> @@ -602,9 +602,9 @@ </sizepolicy> </property> <property name="text"> - <string>Status:</string> + <string>tqStatus:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignRight</set> </property> </widget> @@ -618,7 +618,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>210</width> <height>16</height> @@ -627,15 +627,15 @@ </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textType</cstring> </property> @@ -651,7 +651,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textFrames</cstring> </property> @@ -667,7 +667,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textFrame</cstring> </property> @@ -675,7 +675,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textDelay</cstring> </property> @@ -683,7 +683,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textDimensions</cstring> </property> @@ -699,7 +699,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textBpp</cstring> </property> @@ -715,7 +715,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textColorModel</cstring> </property> @@ -731,7 +731,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textCompression</cstring> </property> @@ -747,7 +747,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textUncompressed</cstring> </property> @@ -763,7 +763,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textRatio</cstring> </property> @@ -779,7 +779,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textInterlaced</cstring> </property> @@ -787,15 +787,15 @@ <string></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textStatusIcon</cstring> </property> @@ -811,9 +811,9 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> - <cstring>textStatus</cstring> + <cstring>texttqStatus</cstring> </property> <property name="text"> <string></string> @@ -831,7 +831,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>205</width> <height>16</height> @@ -844,7 +844,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -855,7 +855,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListView" row="0" column="0"> + <widget class="TQListView" row="0" column="0"> <column> <property name="text"> <string>Group</string> @@ -899,9 +899,9 @@ </connection> <connection> <sender>listMeta</sender> - <signal>contextMenuRequested(QListViewItem*,const QPoint&,int)</signal> + <signal>contextMenuRequested(TQListViewItem*,const TQPoint&,int)</signal> <receiver>SQ_ImageProperties</receiver> - <slot>slotContextMenu(QListViewItem*,const QPoint&,int)</slot> + <slot>slotContextMenu(TQListViewItem*,const TQPoint&,int)</slot> </connection> </connections> <tabstops> @@ -912,24 +912,24 @@ <tabstop>pushButton1</tabstop> </tabstops> <includes> - <include location="global" impldecl="in declaration">qvaluevector.h</include> - <include location="global" impldecl="in declaration">qvariant.h</include> - <include location="global" impldecl="in declaration">qpair.h</include> - <include location="global" impldecl="in declaration">qpixmap.h</include> + <include location="global" impldecl="in declaration">tqvaluevector.h</include> + <include location="global" impldecl="in declaration">tqvariant.h</include> + <include location="global" impldecl="in declaration">tqpair.h</include> + <include location="global" impldecl="in declaration">tqpixmap.h</include> <include location="global" impldecl="in declaration">kurl.h</include> <include location="global" impldecl="in declaration">kio/job.h</include> <include location="global" impldecl="in declaration">kfileitem.h</include> - <include location="global" impldecl="in implementation">qstringlist.h</include> - <include location="global" impldecl="in implementation">qfileinfo.h</include> + <include location="global" impldecl="in implementation">tqstringlist.h</include> + <include location="global" impldecl="in implementation">tqfileinfo.h</include> <include location="global" impldecl="in implementation">kio/global.h</include> <include location="global" impldecl="in implementation">kpopupmenu.h</include> <include location="global" impldecl="in implementation">kstdaction.h</include> <include location="global" impldecl="in implementation">kaction.h</include> - <include location="global" impldecl="in implementation">qapplication.h</include> - <include location="global" impldecl="in implementation">qclipboard.h</include> - <include location="global" impldecl="in implementation">qdir.h</include> + <include location="global" impldecl="in implementation">tqapplication.h</include> + <include location="global" impldecl="in implementation">tqclipboard.h</include> + <include location="global" impldecl="in implementation">tqdir.h</include> <include location="local" impldecl="in implementation">sq_iconloader.h</include> - <include location="global" impldecl="in implementation">qbuttongroup.h</include> + <include location="global" impldecl="in implementation">tqbuttongroup.h</include> <include location="global" impldecl="in implementation">klocale.h</include> <include location="local" impldecl="in implementation">sq_imageproperties.ui.h</include> </includes> @@ -943,27 +943,27 @@ <variable access="private">QWidget *kew;</variable> <variable access="private">QPixmap ok, error;</variable> <variable access="private">KPopupMenu *menu;</variable> - <variable access="private">QListViewItem *data;</variable> + <variable access="private">TQListViewItem *data;</variable> <variable access="private">int z, exifMode;</variable> <variable access="private">KAction *copy, *copyentry, *copyall;</variable> - <variable access="private">QString file;</variable> + <variable access="private">TQString file;</variable> </variables> -<slots> - <slot access="private">slotContextMenu( QListViewItem * item, const QPoint & p, int z1 )</slot> +<Q_SLOTS> + <slot access="private">slotContextMenu( TQListViewItem * item, const TQPoint & p, int z1 )</slot> <slot access="private">slotCopyString()</slot> <slot access="private">slotCopyAll()</slot> <slot access="private">slotCopyEntry()</slot> <slot access="private" specifier="non virtual">slotModeClicked( int id )</slot> <slot access="private">slotStatResult( KIO::Job * job )</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> <function access="private" specifier="non virtual">destroy()</function> - <function>setParams( QStringList & l )</function> + <function>setParams( TQStringList & l )</function> <function specifier="non virtual">setURL( const KURL & _url )</function> <function access="private">setFileParams()</function> - <function>setMetaInfo( QValueVector<QPair<QString, QString> > meta )</function> - <function specifier="non virtual">setFile( const QString & _file )</function> + <function>setMetaInfo( TQValueVector<TQPair<TQString, TQString> > meta )</function> + <function specifier="non virtual">setFile( const TQString & _file )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_imageproperties.ui.h b/ksquirrel/sq_imageproperties.ui.h index b597b84..ba5fab8 100644 --- a/ksquirrel/sq_imageproperties.ui.h +++ b/ksquirrel/sq_imageproperties.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -18,16 +18,16 @@ #ifdef SQ_HAVE_KEXIF #include <libkexif/kexifwidget.h> #include <libkexif/kexifdata.h> -#include <qobjectlist.h> +#include <tqobjectlist.h> #include "sq_config.h" #endif void SQ_ImageProperties::init() { menu = new KPopupMenu; - copy = KStdAction::copy(this, SLOT(slotCopyString()), 0); - copyentry = new KAction(i18n("Copy entry"), 0, this, SLOT(slotCopyEntry()), 0); - copyall = new KAction(i18n("Copy all entries"), 0, this, SLOT(slotCopyAll()), 0); + copy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopyString()), 0); + copyentry = new KAction(i18n("Copy entry"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotCopyEntry()), 0); + copyall = new KAction(i18n("Copy all entries"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotCopyAll()), 0); copyentry->setIcon(copy->icon()); copyall->setIcon(copy->icon()); @@ -53,11 +53,11 @@ void SQ_ImageProperties::destroy() delete menu; } -void SQ_ImageProperties::setParams(QStringList &l) +void SQ_ImageProperties::setParams(TQStringList &l) { setFileParams(); - QStringList::Iterator it = l.begin(); + TQStringList::Iterator it = l.begin(); textType->setText(*it); ++it; textDimensions->setText(*it); ++it; textBpp->setText(*it); ++it; @@ -69,11 +69,11 @@ void SQ_ImageProperties::setParams(QStringList &l) int errors = (*it).toInt(); ++it; textFrames->setText(*it); ++it; textFrame->setText(*it); ++it; - QString s = QString::fromLatin1("%1").arg(i18n("1 error", "%n errors", errors)); - textStatus->setText((errors)?s:QString::null); + TQString s = TQString::tqfromLatin1("%1").tqarg(i18n("1 error", "%n errors", errors)); + texttqStatus->setText((errors)?s:TQString()); textStatusIcon->setPixmap((errors)?error:ok); - s = QString::fromLatin1("%1%2").arg(*it).arg(i18n(" ms.")); + s = TQString::tqfromLatin1("%1%2").tqarg(*it).tqarg(i18n(" ms.")); textDelay->setText(s); } @@ -85,43 +85,43 @@ void SQ_ImageProperties::setURL(const KURL &_url) void SQ_ImageProperties::setFileParams() { KIO::Job *stjob = KIO::stat(url, false); - connect(stjob, SIGNAL(result(KIO::Job *)), this, SLOT(slotStatResult(KIO::Job *))); + connect(stjob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotStatResult(KIO::Job *))); #ifdef SQ_HAVE_KEXIF SQ_Config::instance()->setGroup("GL view"); exifMode = SQ_Config::instance()->readNumEntry("exifmode", 0); - QWidget *tabWidgetEXIF = new QWidget(tabWidget, "tabWidgetEXIF"); + TQWidget *tabWidgetEXIF = new TQWidget(tabWidget, "tabWidgetEXIF"); tabWidget->addTab(tabWidgetEXIF, i18n("EXIF")); - QGridLayout *pageLayout6 = new QGridLayout(tabWidgetEXIF, 2, 1, 11, 6, "tabWidgetEXIFLayout"); + TQGridLayout *pageLayout6 = new TQGridLayout(tabWidgetEXIF, 2, 1, 11, 6, "tabWidgetEXIFLayout"); - QButtonGroup *gr = new QButtonGroup(tabWidgetEXIF, "EXIF mode"); - gr->setFrameShape(QFrame::NoFrame); + TQButtonGroup *gr = new TQButtonGroup(tabWidgetEXIF, "EXIF mode"); + gr->setFrameShape(TQFrame::NoFrame); gr->setExclusive(true); - connect(gr, SIGNAL(clicked(int)), this, SLOT(slotModeClicked(int))); + connect(gr, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotModeClicked(int))); - QGridLayout *pageLayoutGR = new QGridLayout(gr, 1, 3, 0, -1, "tabWidgetEXIFGRLayout"); + TQGridLayout *pageLayoutGR = new TQGridLayout(gr, 1, 3, 0, -1, "tabWidgetEXIFGRLayout"); - QPushButton *mode1 = new QPushButton(i18n("Simple"), gr, "mode1"); + TQPushButton *mode1 = new TQPushButton(i18n("Simple"), gr, "mode1"); mode1->setToggleButton(true); - QPushButton *mode2 = new QPushButton(i18n("Full"), gr, "mode2"); + TQPushButton *mode2 = new TQPushButton(i18n("Full"), gr, "mode2"); mode2->setToggleButton(true); - QSpacerItem *spacer = new QSpacerItem(15, 1, QSizePolicy::Expanding, QSizePolicy::Minimum); + TQSpacerItem *spacer = new TQSpacerItem(15, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum); // create KEXIF widget and load metadata from file KExifWidget *kew1 = new KExifWidget(tabWidgetEXIF); kew1->loadFile(file); // hack to workaround poor libkexif API - QObjectList *ch = const_cast<QObjectList *>(kew1->children()); - for(QObjectList::iterator it = ch->begin();it != ch->end();++it) + TQObjectList *ch = const_cast<TQObjectList *>(kew1->tqchildren()); + for(TQObjectList::iterator it = ch->begin();it != ch->end();++it) { - if((*it)->inherits("QListView")) + if((*it)->inherits(TQLISTVIEW_OBJECT_NAME_STRING)) { - QListView *l = dynamic_cast<QListView *>(*it); - QWidget *w = tabWidget->page(3); + TQListView *l = dynamic_cast<TQListView *>(*it); + TQWidget *w = tabWidget->page(3); if(l && w && !l->childCount()) tabWidget->changeTab(w, i18n("EXIF (no)")); @@ -142,7 +142,7 @@ void SQ_ImageProperties::setFileParams() kew1->setMode(KExifWidget::SIMPLE); } - // finally, add all widgets to layouts + // finally, add all widgets to tqlayouts pageLayoutGR->addWidget(mode1, 0, 0); pageLayoutGR->addWidget(mode2, 0, 1); pageLayoutGR->addItem(spacer, 0, 2); @@ -153,18 +153,18 @@ void SQ_ImageProperties::setFileParams() #endif } -void SQ_ImageProperties::setMetaInfo(QValueVector<QPair<QString,QString> > meta ) +void SQ_ImageProperties::setMetaInfo(TQValueVector<TQPair<TQString,TQString> > meta ) { - QListViewItem *after = 0, *item; + TQListViewItem *after = 0, *item; - QValueVector<QPair<QString,QString> >::iterator itEnd = meta.end(); + TQValueVector<TQPair<TQString,TQString> >::iterator itEnd = meta.end(); - for(QValueVector<QPair<QString,QString> >::iterator it = meta.begin();it != itEnd;++it) + for(TQValueVector<TQPair<TQString,TQString> >::iterator it = meta.begin();it != itEnd;++it) { if(after) - item = new QListViewItem(listMeta, after, (*it).first+QString::fromLatin1(" "), (*it).second.replace(QChar('\n'), QChar(' '))); + item = new TQListViewItem(listMeta, after, (*it).first+TQString::tqfromLatin1(" "), (*it).second.tqreplace(TQChar('\n'), TQChar(' '))); else - after = item = new QListViewItem(listMeta, (*it).first+QString::fromLatin1(" "), (*it).second.replace(QChar('\n'), QChar(' '))); + after = item = new TQListViewItem(listMeta, (*it).first+TQString::tqfromLatin1(" "), (*it).second.tqreplace(TQChar('\n'), TQChar(' '))); listMeta->insertItem(item); } @@ -173,14 +173,14 @@ void SQ_ImageProperties::setMetaInfo(QValueVector<QPair<QString,QString> > meta { listMeta->header()->hide(); - QWidget *w = tabWidget->page(2); + TQWidget *w = tabWidget->page(2); if(w) tabWidget->changeTab(w, i18n("Metadata (no)")); } } -void SQ_ImageProperties::slotContextMenu( QListViewItem *item, const QPoint &p, int z1 ) +void SQ_ImageProperties::slotContextMenu( TQListViewItem *item, const TQPoint &p, int z1 ) { if(item) { @@ -192,7 +192,7 @@ void SQ_ImageProperties::slotContextMenu( QListViewItem *item, const QPoint &p, void SQ_ImageProperties::slotCopyString() { - QApplication::clipboard()->setText(data->text(z), QClipboard::Clipboard); + TQApplication::tqclipboard()->setText(data->text(z), TQClipboard::Clipboard); } void SQ_ImageProperties::slotCopyAll() @@ -200,15 +200,15 @@ void SQ_ImageProperties::slotCopyAll() if(!data) return; - QString app; - QListViewItem *item = listMeta->firstChild(); + TQString app; + TQListViewItem *item = listMeta->firstChild(); for(;item;item = item->itemBelow()) { app.append(item->text(0) + "\n" + item->text(1) + "\n"); } - QApplication::clipboard()->setText(app, QClipboard::Clipboard); + TQApplication::tqclipboard()->setText(app, TQClipboard::Clipboard); } void SQ_ImageProperties::slotCopyEntry() @@ -216,9 +216,9 @@ void SQ_ImageProperties::slotCopyEntry() if(!data) return; - QString app = data->text(0) + "\n" + data->text(1) + "\n"; + TQString app = data->text(0) + "\n" + data->text(1) + "\n"; - QApplication::clipboard()->setText(app, QClipboard::Clipboard); + TQApplication::tqclipboard()->setText(app, TQClipboard::Clipboard); } void SQ_ImageProperties::slotModeClicked(int id) @@ -243,11 +243,11 @@ void SQ_ImageProperties::slotStatResult(KIO::Job *job) lineFile->setText(fi.name()); textSize->setText(KIO::convertSize(fi.size())); - textOwner->setText(QString("%1").arg(fi.user())); - textGroup->setText(QString("%1").arg(fi.group())); + textOwner->setText(TQString("%1").tqarg(fi.user())); + textGroup->setText(TQString("%1").tqarg(fi.group())); textPermissions->setText(fi.permissionsString()); - QDateTime abs; + TQDateTime abs; abs.setTime_t(fi.time(KIO::UDS_CREATION_TIME)); textCreated->setText(abs.toString("dd/MM/yyyy hh:mm:ss")); abs.setTime_t(fi.time(KIO::UDS_ACCESS_TIME)); @@ -258,7 +258,7 @@ void SQ_ImageProperties::slotStatResult(KIO::Job *job) } // set local file for KEXIF -void SQ_ImageProperties::setFile(const QString &_file) +void SQ_ImageProperties::setFile(const TQString &_file) { file = _file; } diff --git a/ksquirrel/sq_kipiinterface.cpp b/ksquirrel/sq_kipiinterface.cpp index a1a47ff..b759821 100644 --- a/ksquirrel/sq_kipiinterface.cpp +++ b/ksquirrel/sq_kipiinterface.cpp @@ -37,18 +37,18 @@ class SQ_KIPIImageCollection : public KIPI::ImageCollectionShared { public: - SQ_KIPIImageCollection(const QString& name, const KURL::List& images) + SQ_KIPIImageCollection(const TQString& name, const KURL::List& images) : KIPI::ImageCollectionShared(), mName(name), mImages(images) {} - QString name() + TQString name() { return mName; } - QString comment() + TQString comment() { - return QString::null; + return TQString(); } KURL::List images() @@ -64,13 +64,13 @@ class SQ_KIPIImageCollection : public KIPI::ImageCollectionShared return url; } - QString uploadRootName() + TQString uploadRootName() { return i18n("Root directory"); } private: - QString mName; + TQString mName; KURL::List mImages; }; @@ -83,42 +83,42 @@ class SQ_KIPIImageInfo : public KIPI::ImageInfoShared : KIPI::ImageInfoShared(interface, url) {} - QString title() + TQString title() { return _url.fileName(); } - QString description() + TQString description() { - return QString::null; + return TQString(); } - void setDescription(const QString&) + void setDescription(const TQString&) {} - QMap<QString,QVariant> attributes() + TQMap<TQString,TQVariant> attributes() { - return QMap<QString,QVariant>(); + return TQMap<TQString,TQVariant>(); } void clearAttributes() {} - void addAttributes(const QMap<QString, QVariant>&) + void addAttributes(const TQMap<TQString, TQVariant>&) {} }; /***************************************************************/ -SQ_KIPIInterface::SQ_KIPIInterface(QWidget *parent) - : KIPI::Interface(parent, "KSquirrel KIPI Interface") +SQ_KIPIInterface::SQ_KIPIInterface(TQWidget *tqparent) + : KIPI::Interface(TQT_TQOBJECT(tqparent), "KSquirrel KIPI Interface") { - connect(SQ_WidgetStack::instance()->diroperator(), SIGNAL(fileHighlighted(const KFileItem *)), - this, SLOT(slotSelectionChanged())); + connect(SQ_WidgetStack::instance()->diroperator(), TQT_SIGNAL(fileHighlighted(const KFileItem *)), + this, TQT_SLOT(slotSelectionChanged())); - connect(SQ_WidgetStack::instance()->diroperator()->dirLister(), SIGNAL(completed(const KURL&)), - this, SLOT(slotDirectoryChanged())); + connect(SQ_WidgetStack::instance()->diroperator()->dirLister(), TQT_SIGNAL(completed(const KURL&)), + this, TQT_SLOT(slotDirectoryChanged())); } SQ_KIPIInterface::~SQ_KIPIInterface() @@ -172,9 +172,9 @@ KIPI::ImageCollection SQ_KIPIInterface::currentBasket() return KIPI::ImageCollection(new SQ_KIPIImageCollection(i18n("Image basket"), list)); } -QValueList<KIPI::ImageCollection> SQ_KIPIInterface::allAlbums() +TQValueList<KIPI::ImageCollection> SQ_KIPIInterface::allAlbums() { - QValueList<KIPI::ImageCollection> list; + TQValueList<KIPI::ImageCollection> list; list << currentAlbum() << currentSelection(); diff --git a/ksquirrel/sq_kipiinterface.h b/ksquirrel/sq_kipiinterface.h index dd61067..f68b1a9 100644 --- a/ksquirrel/sq_kipiinterface.h +++ b/ksquirrel/sq_kipiinterface.h @@ -22,6 +22,10 @@ #include "config.h" #endif +#ifdef Q_MOC_RUN +#define SQ_HAVE_KIPI +#endif // Q_MOC_RUN + #ifdef SQ_HAVE_KIPI #include <libkipi/interface.h> @@ -31,19 +35,20 @@ class SQ_KIPIInterfacePrivate; class SQ_KIPIInterface : public KIPI::Interface { Q_OBJECT + TQ_OBJECT public: - SQ_KIPIInterface(QWidget *parent); + SQ_KIPIInterface(TQWidget *tqparent); ~SQ_KIPIInterface(); KIPI::ImageCollection currentAlbum(); KIPI::ImageCollection currentSelection(); KIPI::ImageCollection currentBasket(); - QValueList<KIPI::ImageCollection> allAlbums(); + TQValueList<KIPI::ImageCollection> allAlbums(); KIPI::ImageInfo info(const KURL &); int features() const; - bool addImage(const KURL &, QString &); + bool addImage(const KURL &, TQString &); private slots: void slotSelectionChanged(); @@ -51,7 +56,7 @@ class SQ_KIPIInterface : public KIPI::Interface }; inline -bool SQ_KIPIInterface::addImage(const KURL &, QString &) +bool SQ_KIPIInterface::addImage(const KURL &, TQString &) { return true; } diff --git a/ksquirrel/sq_kipimanager.cpp b/ksquirrel/sq_kipimanager.cpp index eba5da5..aaea02b 100644 --- a/ksquirrel/sq_kipimanager.cpp +++ b/ksquirrel/sq_kipimanager.cpp @@ -23,7 +23,7 @@ #include "config.h" #endif -#include <qwidget.h> +#include <tqwidget.h> #include <kactioncollection.h> #include <kpopupmenu.h> @@ -35,19 +35,19 @@ #include "sq_kipiinterface.h" -SQ_ActionMenu::SQ_ActionMenu(const QString &text, QObject *parent, const char *name) - : KActionMenu(text, parent, name) +SQ_ActionMenu::SQ_ActionMenu(const TQString &text, TQObject *tqparent, const char *name) + : KActionMenu(text, tqparent, name) {} -SQ_ActionMenu::SQ_ActionMenu(const QString &text, const QString &icon, QObject *parent, const char *name) - : KActionMenu(text, icon, parent, name) +SQ_ActionMenu::SQ_ActionMenu(const TQString &text, const TQString &icon, TQObject *tqparent, const char *name) + : KActionMenu(text, icon, tqparent, name) {} SQ_ActionMenu::~SQ_ActionMenu() { - QValueVector<KAction *>::iterator itEnd = plugged.end(); + TQValueVector<KAction *>::iterator itEnd = plugged.end(); - for(QValueVector<KAction *>::iterator it = plugged.begin();it != itEnd;++it) + for(TQValueVector<KAction *>::iterator it = plugged.begin();it != itEnd;++it) remove(*it); } @@ -60,7 +60,7 @@ void SQ_ActionMenu::insert(KAction *ka, int index) /***********************************************************************/ -SQ_KIPIManager::SQ_KIPIManager(QWidget *_parent, const char *name) : QObject(_parent, name), parent(_parent) +SQ_KIPIManager::SQ_KIPIManager(TQWidget *_parent, const char *name) : TQObject(_parent, name), tqparent(_parent) { kdDebug() << "+SQ_KIPIManager" << endl; @@ -72,11 +72,11 @@ SQ_KIPIManager::SQ_KIPIManager(QWidget *_parent, const char *name) : QObject(_pa loaded = false; p = new KPopupMenu; - connect(p, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShow())); + connect(p, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShow())); SQ_KIPIInterface *interface = new SQ_KIPIInterface(_parent); - mPluginLoader = new KIPI::PluginLoader(QStringList(), interface); - connect(mPluginLoader, SIGNAL(replug()), this, SLOT(slotReplug())); + mPluginLoader = new KIPI::PluginLoader(TQStringList(), interface); + connect(mPluginLoader, TQT_SIGNAL(replug()), this, TQT_SLOT(slotReplug())); } SQ_KIPIManager::~SQ_KIPIManager() @@ -147,7 +147,7 @@ void SQ_KIPIManager::slotReplug() if (!plugin) continue; - plugin->setup(parent); + plugin->setup(tqparent); KActionPtrList actions = plugin->actions(); KActionPtrList::ConstIterator actionIt = actions.begin(), end = actions.end(); @@ -157,7 +157,7 @@ void SQ_KIPIManager::slotReplug() { category = plugin->category(*actionIt); - fnd = cmenus.find(category); + fnd = cmenus.tqfind(category); if(fnd == cmenus.end()) continue; diff --git a/ksquirrel/sq_kipimanager.h b/ksquirrel/sq_kipimanager.h index 1ac80ab..f297e6a 100644 --- a/ksquirrel/sq_kipimanager.h +++ b/ksquirrel/sq_kipimanager.h @@ -23,10 +23,14 @@ #include <config.h> #endif +#ifdef Q_MOC_RUN +#define SQ_HAVE_KIPI +#endif // Q_MOC_RUN + #ifdef SQ_HAVE_KIPI -#include <qmap.h> -#include <qvaluevector.h> +#include <tqmap.h> +#include <tqvaluevector.h> #include <kaction.h> @@ -34,7 +38,7 @@ namespace KIPI { class PluginLoader; } -class QWidget; +class TQWidget; class KPopupMenu; @@ -45,8 +49,8 @@ class KPopupMenu; class SQ_ActionMenu : public KActionMenu { public: - SQ_ActionMenu(const QString &text, QObject *parent = 0, const char *name = 0); - SQ_ActionMenu(const QString &text, const QString &icon, QObject *parent = 0, const char *name = 0); + SQ_ActionMenu(const TQString &text, TQObject *tqparent = 0, const char *name = 0); + SQ_ActionMenu(const TQString &text, const TQString &icon, TQObject *tqparent = 0, const char *name = 0); /* * remove() all KActions currently plugged. @@ -62,7 +66,7 @@ class SQ_ActionMenu : public KActionMenu private: // Currently plugged KActions - QValueVector<KAction *> plugged; + TQValueVector<KAction *> plugged; }; inline @@ -75,12 +79,13 @@ int SQ_ActionMenu::count() const * KIPI plugins manager. It loads KIPI plugins and creates popup * menu with all available actions. */ -class SQ_KIPIManager : public QObject +class SQ_KIPIManager : public TQObject { Q_OBJECT + TQ_OBJECT public: - SQ_KIPIManager(QWidget *_parent, const char *name = 0); + SQ_KIPIManager(TQWidget *_parent, const char *name = 0); ~SQ_KIPIManager(); KPopupMenu* popup() const; @@ -95,12 +100,12 @@ class SQ_KIPIManager : public QObject void slotAboutToShow(); private: - typedef QMap<KIPI::Category, SQ_ActionMenu*> CategoryMap; + typedef TQMap<KIPI::Category, SQ_ActionMenu*> CategoryMap; KIPI::PluginLoader *mPluginLoader; CategoryMap cmenus; KAction *noPlugin; - QWidget *parent; + TQWidget *tqparent; KPopupMenu *p; bool loaded; }; diff --git a/ksquirrel/sq_library.h b/ksquirrel/sq_library.h index ac1dff3..cf350d6 100644 --- a/ksquirrel/sq_library.h +++ b/ksquirrel/sq_library.h @@ -18,14 +18,14 @@ #ifndef SQ_LIBRARY_H #define SQ_LIBRARY_H -#include <qstring.h> -#include <qregexp.h> -#include <qpixmap.h> +#include <tqstring.h> +#include <tqregexp.h> +#include <tqpixmap.h> #include <ksquirrel-libs/fmt_defs.h> #include <ksquirrel-libs/settings.h> -class QLibrary; +class TQLibrary; class KTempFile; @@ -45,34 +45,34 @@ struct SQ_LIBRARY {} // pointer to library - QLibrary *lib; + TQLibrary *lib; // path to a library on disk - QString libpath; + TQString libpath; // converted regular expression - QRegExp regexp; + TQRegExp regexp; // filter for a filemanager - QString filter; + TQString filter; // path to config file (.ui) - QString config; + TQString config; fmt_settings settings; // regular expression as string - QString regexp_str; + TQString regexp_str; - QString mimetype; + TQString mimetype; bool mime_multi; // information on codec - QString quickinfo; + TQString quickinfo; // codec's version - QString version; + TQString version; // pointer to a codec fmt_codec_base *codec, *codec_il; @@ -82,7 +82,7 @@ struct SQ_LIBRARY fmt_codec_base* (*codec_create)(); void (*codec_destroy)(fmt_codec_base*); - QPixmap mime; + TQPixmap mime; // options for writers. fmt_writeoptionsabs opt; diff --git a/ksquirrel/sq_libraryhandler.cpp b/ksquirrel/sq_libraryhandler.cpp index 0e10424..a86a7e5 100644 --- a/ksquirrel/sq_libraryhandler.cpp +++ b/ksquirrel/sq_libraryhandler.cpp @@ -19,11 +19,11 @@ #include "config.h" #endif -#include <qlibrary.h> -#include <qfileinfo.h> -#include <qstringlist.h> -#include <qfile.h> -#include <qdir.h> +#include <tqlibrary.h> +#include <tqfileinfo.h> +#include <tqstringlist.h> +#include <tqfile.h> +#include <tqdir.h> #include <kstringhandler.h> #include <ktempfile.h> @@ -46,8 +46,8 @@ static const int buffer_size = 10; SQ_LibraryHandler * SQ_LibraryHandler::m_instance = 0; // SQ_LibraryHandler -SQ_LibraryHandler::SQ_LibraryHandler(QObject *parent) - : QObject(parent), QValueVector<SQ_LIBRARY>() +SQ_LibraryHandler::SQ_LibraryHandler(TQObject *tqparent) + : TQObject(tqparent), TQValueVector<SQ_LIBRARY>() { m_instance = this; @@ -84,7 +84,7 @@ SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const KURL &url) { if((*it).mime_multi) { - if((*it).mimetype.find(mime->name()) != -1) + if((*it).mimetype.tqfind(mime->name()) != -1) { l = &(*it); break; @@ -108,7 +108,7 @@ SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const KURL &url) return l; } -SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const QString &path) +SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const TQString &path) { KURL u; u.setPath(path); @@ -119,9 +119,9 @@ SQ_LIBRARY* SQ_LibraryHandler::libraryForFile(const QString &path) /* * Get all filters as one string. */ -QString SQ_LibraryHandler::allFiltersString() const +TQString SQ_LibraryHandler::allFiltersString() const { - QString ret; + TQString ret; const_iterator itEnd = end(); @@ -135,9 +135,9 @@ QString SQ_LibraryHandler::allFiltersString() const return ret; } -QString SQ_LibraryHandler::allFiltersFileDialogString(bool r, bool allfiles) const +TQString SQ_LibraryHandler::allFiltersFileDialogString(bool r, bool allfiles) const { - QString ret; + TQString ret; const_iterator itEnd = end(); @@ -159,7 +159,7 @@ QString SQ_LibraryHandler::allFiltersFileDialogString(bool r, bool allfiles) con * Fill 'filters' with all found filters, and * 'quick' with appropriate information. */ -void SQ_LibraryHandler::allFilters(QStringList &filters, QStringList &quick) const +void SQ_LibraryHandler::allFilters(TQStringList &filters, TQStringList &quick) const { // clear rubbish filters.clear(); @@ -171,7 +171,7 @@ void SQ_LibraryHandler::allFilters(QStringList &filters, QStringList &quick) con const_iterator itEnd = end(); - // go through array and fill QStringLists + // go through array and fill TQStringLists for(const_iterator it = begin();it != itEnd;++it) if(!(*it).filter.isEmpty()) { @@ -180,7 +180,7 @@ void SQ_LibraryHandler::allFilters(QStringList &filters, QStringList &quick) con } } -void SQ_LibraryHandler::allWritableFilters(QStringList &filters, QStringList &quick) const +void SQ_LibraryHandler::allWritableFilters(TQStringList &filters, TQStringList &quick) const { // clear rubbish filters.clear(); @@ -192,7 +192,7 @@ void SQ_LibraryHandler::allWritableFilters(QStringList &filters, QStringList &qu const_iterator itEnd = end(); - // go through array and fill QStringLists + // go through array and fill TQStringLists for(const_iterator it = begin();it != itEnd;++it) if((*it).writestatic && !(*it).filter.isEmpty()) { @@ -228,32 +228,32 @@ void SQ_LibraryHandler::clear() (*it).lib = 0; } - QValueVector<SQ_LIBRARY>::clear(); + TQValueVector<SQ_LIBRARY>::clear(); } /* * Add new libraries. */ -void SQ_LibraryHandler::add(QStringList &foundLibraries) +void SQ_LibraryHandler::add(TQStringList &foundLibraries) { codec_options o; - QStringList::iterator itEnd = foundLibraries.end(); + TQStringList::iterator itEnd = foundLibraries.end(); - for(QStringList::iterator it = foundLibraries.begin();it != itEnd;++it) + for(TQStringList::iterator it = foundLibraries.begin();it != itEnd;++it) { - QFileInfo ff(*it); + TQFileInfo ff(*it); SQ_LIBRARY libtmp; - // create QLibrary object - libtmp.lib = new QLibrary(*it); + // create TQLibrary object + libtmp.lib = new TQLibrary(*it); libtmp.libpath = *it; libtmp.lib->load(); // resolve create() and destroy() functions - libtmp.codec_create = (fmt_codec_base*(*)())(libtmp.lib)->resolve(QString::fromLatin1("codec_create")); - libtmp.codec_destroy = (void (*)(fmt_codec_base*))(libtmp.lib)->resolve(QString::fromLatin1("codec_destroy")); + libtmp.codec_create = (fmt_codec_base*(*)())(libtmp.lib)->resolve(TQString::tqfromLatin1("codec_create")); + libtmp.codec_destroy = (void (*)(fmt_codec_base*))(libtmp.lib)->resolve(TQString::tqfromLatin1("codec_destroy")); // couldn't resolve - corrupted library ? if(!libtmp.codec_create || !libtmp.codec_destroy) @@ -269,14 +269,14 @@ void SQ_LibraryHandler::add(QStringList &foundLibraries) // read options codeK->options(&o); - QString q = o.name; + TQString q = o.name; // Yet unknown library ? if(!alreadyInMap(q)) { - libtmp.mime = QPixmap(reinterpret_cast<const char **>(o.pixmap)); + libtmp.mime = TQPixmap(reinterpret_cast<const char **>(o.pixmap)); libtmp.mimetype = o.mimetype; - libtmp.mime_multi = libtmp.mimetype.find(';') != -1; + libtmp.mime_multi = libtmp.mimetype.tqfind(';') != -1; libtmp.quickinfo = q; libtmp.filter = o.filter; libtmp.version = o.version; @@ -298,12 +298,12 @@ void SQ_LibraryHandler::add(QStringList &foundLibraries) libtmp.tmp = new KTempFile; libtmp.tmp->setAutoDelete(true); libtmp.tmp->close(); - codeK->settempfile(libtmp.tmp->name()); + codeK->settempfile(libtmp.tmp->name().ascii()); libtmp.tmp_il = new KTempFile; libtmp.tmp_il->setAutoDelete(true); libtmp.tmp_il->close(); - libtmp.codec_il->settempfile(libtmp.tmp_il->name()); + libtmp.codec_il->settempfile(libtmp.tmp_il->name().ascii()); } if(libtmp.writestatic) @@ -335,11 +335,11 @@ void SQ_LibraryHandler::add(QStringList &foundLibraries) /* * Is library named 'quick' already been handled ? */ -bool SQ_LibraryHandler::alreadyInMap(const QString &quick) const +bool SQ_LibraryHandler::alreadyInMap(const TQString &quick) const { const_iterator itEnd = end(); - // go through array and find 'quick' + // go through array and tqfind 'quick' for(const_iterator it = begin();it != itEnd;++it) if((*it).quickinfo == quick) return true; @@ -361,7 +361,7 @@ void SQ_LibraryHandler::dump() const for(const_iterator it = begin();it != itEnd;++it) { std::cerr << std::setw(30) - << KStringHandler::csqueeze(QFileInfo((*it).libpath).fileName(), 30) + << KStringHandler::csqueeze(TQFileInfo((*it).libpath).fileName(), 30) << std::setw(0) << " [" << KStringHandler::rsqueeze((*it).quickinfo, 45) @@ -373,14 +373,14 @@ void SQ_LibraryHandler::dump() const /* * Does any of found libraries handle given extension ? */ -bool SQ_LibraryHandler::knownExtension(const QString &ext) +bool SQ_LibraryHandler::knownExtension(const TQString &ext) { iterator itEnd = end(); // go through array and compare extensions for(iterator it = begin();it != itEnd;++it) { - if((*it).filter.contains(ext, false)) + if((*it).filter.tqcontains(ext, false)) return true; } @@ -393,7 +393,7 @@ bool SQ_LibraryHandler::knownExtension(const QString &ext) * * Name is a string, returned by fmt_quickinfo() */ -SQ_LIBRARY* SQ_LibraryHandler::libraryByName(const QString &name) +SQ_LIBRARY* SQ_LibraryHandler::libraryByName(const TQString &name) { SQ_LIBRARY *l; @@ -421,7 +421,7 @@ void SQ_LibraryHandler::writeSettings(SQ_LIBRARY *lib) fmt_settings::iterator itEnd = lib->settings.end(); - QString k; + TQString k; for(fmt_settings::iterator it = lib->settings.begin();it != itEnd;++it) { @@ -456,7 +456,7 @@ void SQ_LibraryHandler::readSettings(SQ_LIBRARY *lib) if(lib->config.isEmpty()) return; - QMap<QString, QString> map = kconf->entryMap(lib->quickinfo); + TQMap<TQString, TQString> map = kconf->entryMap(lib->quickinfo); if(!map.size()) { @@ -465,27 +465,27 @@ void SQ_LibraryHandler::readSettings(SQ_LIBRARY *lib) return; } - QMap<QString, QString>::iterator mapEnd = map.end(); + TQMap<TQString, TQString>::iterator mapEnd = map.end(); fmt_settings &sett = lib->settings; - QString d, k; + TQString d, k; settings_value val; - for(QMap<QString, QString>::iterator mapIt = map.begin();mapIt != mapEnd;++mapIt) + for(TQMap<TQString, TQString>::iterator mapIt = map.begin();mapIt != mapEnd;++mapIt) { k = mapIt.key(); d = mapIt.data(); - if(k.startsWith(QChar('i'))) + if(k.startsWith(TQChar('i'))) { val.type = settings_value::v_int; val.iVal = d.toInt(); } - else if(k.startsWith(QChar('d'))) + else if(k.startsWith(TQChar('d'))) { val.type = settings_value::v_double; val.dVal = d.toDouble(); } - else if(k.startsWith(QChar('b'))) + else if(k.startsWith(TQChar('b'))) { val.type = settings_value::v_bool; val.bVal = (d == "true"); @@ -511,16 +511,16 @@ void SQ_LibraryHandler::reload() void SQ_LibraryHandler::load() { - QStringList libs; + TQStringList libs; - QDir dir(SQ_KLIBS, QString::null, QDir::Unsorted, QDir::Files); + TQDir dir(SQ_KLIBS, TQString(), TQDir::Unsorted, TQDir::Files); - const QFileInfoList *list = dir.entryInfoList(); + const TQFileInfoList *list = dir.entryInfoList(); if(list) { - QFileInfoListIterator it(*list); - QFileInfo *fi; + TQFileInfoListIterator it(*list); + TQFileInfo *fi; while((fi = it.current()) != 0) { @@ -533,7 +533,7 @@ void SQ_LibraryHandler::load() add(libs); } -SQ_LibraryHandler::Support SQ_LibraryHandler::maybeSupported(const KURL &u, const QString &mime) const +SQ_LibraryHandler::Support SQ_LibraryHandler::maybeSupported(const KURL &u, const TQString &mime) const { const_iterator itEnd = constEnd(); @@ -541,7 +541,7 @@ SQ_LibraryHandler::Support SQ_LibraryHandler::maybeSupported(const KURL &u, cons bool treat = SQ_Config::instance()->readBoolEntry("treat", true); // we can determine mimetype by hand or use "mime" - QString mimeDet = mime.isEmpty() ? KMimeType::findByURL(u)->name() : mime; + TQString mimeDet = mime.isEmpty() ? KMimeType::findByURL(u)->name() : mime; // mimetype by magic is not determined automatically // for non-local urls - we may support this file type or may not @@ -554,10 +554,10 @@ SQ_LibraryHandler::Support SQ_LibraryHandler::maybeSupported(const KURL &u, cons { if((*it).mime_multi) { - if((*it).mimetype.find(mimeDet, 0, false) != -1) + if((*it).mimetype.tqfind(mimeDet, 0, false) != -1) return SQ_LibraryHandler::Yes; } - else if((*it).mimetype == mimeDet) // don't waste CPU time with find() + else if((*it).mimetype == mimeDet) // don't waste CPU time with tqfind() return SQ_LibraryHandler::Yes; } diff --git a/ksquirrel/sq_libraryhandler.h b/ksquirrel/sq_libraryhandler.h index a3f34bf..05bd4c9 100644 --- a/ksquirrel/sq_libraryhandler.h +++ b/ksquirrel/sq_libraryhandler.h @@ -18,13 +18,13 @@ #ifndef SQ_LIBRARY_HANDLER_H #define SQ_LIBRARY_HANDLER_H -#include <qvaluevector.h> -#include <qdatetime.h> -#include <qobject.h> +#include <tqvaluevector.h> +#include <tqdatetime.h> +#include <tqobject.h> #include "sq_library.h" -class QStringList; +class TQStringList; class KConfig; class KURL; @@ -34,10 +34,10 @@ class KURL; * in library loading mechanizm. */ -class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> +class SQ_LibraryHandler : public TQObject, public TQValueVector<SQ_LIBRARY> { public: - SQ_LibraryHandler(QObject *parent = 0); + SQ_LibraryHandler(TQObject *tqparent = 0); ~SQ_LibraryHandler(); enum Support { Maybe = 0, Yes, No }; @@ -49,14 +49,14 @@ class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> void sync(); - Support maybeSupported(const KURL &, const QString& = QString::null) const; + Support maybeSupported(const KURL &, const TQString& = TQString()) const; /* * Find appropriate SQ_LIBRARY by filename. If * not found, return NULL. */ SQ_LIBRARY* libraryForFile(const KURL &); - SQ_LIBRARY* libraryForFile(const QString &); + SQ_LIBRARY* libraryForFile(const TQString &); /* * Find appropriate SQ_LIBRARY by its name. If @@ -64,32 +64,32 @@ class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> * * Name is a string, returned by fmt_quickinfo() */ - SQ_LIBRARY* libraryByName(const QString &name); + SQ_LIBRARY* libraryByName(const TQString &name); /* * Does any of found libraries handle given extension ? */ - bool knownExtension(const QString &ext); + bool knownExtension(const TQString &ext); /* * Fill 'filters' with all found filters, and * 'quick' with appropriate information. */ - void allFilters(QStringList &filters, QStringList &quick) const; + void allFilters(TQStringList &filters, TQStringList &quick) const; - void allWritableFilters(QStringList &filters, QStringList &quick) const; + void allWritableFilters(TQStringList &filters, TQStringList &quick) const; /* * Get all filters as one string. */ - QString allFiltersString() const; + TQString allFiltersString() const; /* * Filters as one string suitable for KFileDialogs. * If r == true, return readable codecs * If allfiles == true, append *.* to result */ - QString allFiltersFileDialogString(bool r, bool allfiles = true) const; + TQString allFiltersFileDialogString(bool r, bool allfiles = true) const; /* * Remove and unload all libraries. @@ -105,7 +105,7 @@ class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> private: - void add(QStringList &foundLibraries); + void add(TQStringList &foundLibraries); /* * Load libraries from disk. @@ -114,7 +114,7 @@ class SQ_LibraryHandler : public QObject, public QValueVector<SQ_LIBRARY> /* * Is library with name 'quick' already been handled ? */ - bool alreadyInMap(const QString &quick) const; + bool alreadyInMap(const TQString &quick) const; void writeSettings(SQ_LIBRARY *lib); void readSettings(SQ_LIBRARY *lib); diff --git a/ksquirrel/sq_navigatordropmenu.cpp b/ksquirrel/sq_navigatordropmenu.cpp index 35f1900..c1a09a0 100644 --- a/ksquirrel/sq_navigatordropmenu.cpp +++ b/ksquirrel/sq_navigatordropmenu.cpp @@ -30,7 +30,7 @@ SQ_NavigatorDropMenu * SQ_NavigatorDropMenu::m_instance= 0; -SQ_NavigatorDropMenu::SQ_NavigatorDropMenu(QObject *parent) : QObject(parent) +SQ_NavigatorDropMenu::SQ_NavigatorDropMenu(TQObject *tqparent) : TQObject(tqparent) { m_instance = this; @@ -39,19 +39,19 @@ SQ_NavigatorDropMenu::SQ_NavigatorDropMenu(QObject *parent) : QObject(parent) dropmenu = new SQ_PopupMenu(0); // "copy" action - KAction *pACopy = new KAction(i18n("Copy here"), "editpaste", 0, this, SLOT(slotCopy()), ac, "sq_copy"); + KAction *pACopy = new KAction(i18n("Copy here"), "editpaste", 0, this, TQT_SLOT(slotCopy()), ac, "sq_copy"); // "move" action - KAction *pAMove = new KAction(i18n("Move here"), 0, 0, this, SLOT(slotMove()), ac, "sq_move"); + KAction *pAMove = new KAction(i18n("Move here"), 0, 0, this, TQT_SLOT(slotMove()), ac, "sq_move"); // "link" action - KAction *pALink = new KAction(i18n("Link here"), "www", 0, this, SLOT(slotLink()), ac, "sq_link"); + KAction *pALink = new KAction(i18n("Link here"), "www", 0, this, TQT_SLOT(slotLink()), ac, "sq_link"); // "cancel" action, this action will do nothing - just close popup menu KAction *pACancel = new KAction(i18n("Cancel"), 0, 0, 0, 0, ac, "sq_cancel"); // plug all actions to popup menu - dropmenu->insertTitle(QString::null); + dropmenu->insertTitle(TQString()); pACopy->plug(dropmenu); pAMove->plug(dropmenu); pALink->plug(dropmenu); @@ -69,7 +69,7 @@ void SQ_NavigatorDropMenu::slotCopy() if(also) emit done(url, SQ_NavigatorDropMenu::Copy); KIO::Job *job = KIO::copy(list, url); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotJobResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotJobResult(KIO::Job *))); } void SQ_NavigatorDropMenu::slotMove() @@ -77,7 +77,7 @@ void SQ_NavigatorDropMenu::slotMove() if(also) emit done(url, SQ_NavigatorDropMenu::Move); KIO::Job *job = KIO::move(list, url); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotJobResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotJobResult(KIO::Job *))); } void SQ_NavigatorDropMenu::slotLink() @@ -85,7 +85,7 @@ void SQ_NavigatorDropMenu::slotLink() if(also) emit done(url, SQ_NavigatorDropMenu::Link); KIO::Job *job = KIO::link(list, url); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotJobResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotJobResult(KIO::Job *))); } void SQ_NavigatorDropMenu::slotJobResult(KIO::Job *job) @@ -108,7 +108,7 @@ void SQ_NavigatorDropMenu::setupFiles(const KURL::List &l, const KURL &u) /* * Show popup menu with available actions. */ -void SQ_NavigatorDropMenu::exec(const QPoint &pos, bool _also) +void SQ_NavigatorDropMenu::exec(const TQPoint &pos, bool _also) { also = _also; dropmenu->exec(pos); diff --git a/ksquirrel/sq_navigatordropmenu.h b/ksquirrel/sq_navigatordropmenu.h index 6662301..9c1910a 100644 --- a/ksquirrel/sq_navigatordropmenu.h +++ b/ksquirrel/sq_navigatordropmenu.h @@ -18,8 +18,8 @@ #ifndef SQ_NAVIGATORDROPMENU_H #define SQ_NAVIGATORDROPMENU_H -#include <qobject.h> -#include <qpoint.h> +#include <tqobject.h> +#include <tqpoint.h> #include <kurl.h> @@ -33,22 +33,23 @@ class SQ_PopupMenu; * (copy, move, ...), which will be executed by SQ_FileIconViewBase, * when user dropped some files: * - * void SQ_FileIconViewBase::slotDropped(QDropEvent *, const KURL::List &urls, const KURL &_url) + * void SQ_FileIconViewBase::slotDropped(TQDropEvent *, const KURL::List &urls, const KURL &_url) * { * KURL url = (_url.isEmpty()) ? SQ_WidgetStack::instance()->url() : _url; * * SQ_NavigatorDropMenu::instance()->setupFiles(urls, url); - * SQ_NavigatorDropMenu::instance()->exec(QCursor::pos()); + * SQ_NavigatorDropMenu::instance()->exec(TQCursor::pos()); * } * */ -class SQ_NavigatorDropMenu : public QObject +class SQ_NavigatorDropMenu : public TQObject { Q_OBJECT + TQ_OBJECT public: - SQ_NavigatorDropMenu(QObject *parent = 0); + SQ_NavigatorDropMenu(TQObject *tqparent = 0); ~SQ_NavigatorDropMenu(); static SQ_NavigatorDropMenu* instance() { return m_instance; } @@ -63,7 +64,7 @@ class SQ_NavigatorDropMenu : public QObject /* * Show popup menu with available actions. */ - void exec(const QPoint &pos, bool = false); + void exec(const TQPoint &pos, bool = false); private slots: /* diff --git a/ksquirrel/sq_options.ui b/ksquirrel/sq_options.ui index 853b82f..1c75c46 100644 --- a/ksquirrel/sq_options.ui +++ b/ksquirrel/sq_options.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_Options</class> <author>Krasu</author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_Options</cstring> </property> @@ -21,13 +21,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>10000</width> <height>10000</height> @@ -59,9 +59,9 @@ </sizepolicy> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -77,7 +77,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>400</width> <height>20</height> @@ -98,7 +98,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -125,7 +125,7 @@ </widget> </hbox> </widget> - <widget class="QWidgetStack" row="0" column="1"> + <widget class="TQWidgetStack" row="0" column="1"> <property name="name"> <cstring>widgetStack</cstring> </property> @@ -140,7 +140,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pageMain</cstring> </property> @@ -164,14 +164,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_4</cstring> </property> @@ -179,7 +179,7 @@ <string><b>The main options</b></string> </property> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox5</cstring> </property> @@ -196,7 +196,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkSync</cstring> </property> @@ -204,7 +204,7 @@ <string>Write configuration file to disk, when I press "OK"</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>checkMinimize</cstring> </property> @@ -212,7 +212,7 @@ <string>Minimize to tray after closing</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>checkSplash</cstring> </property> @@ -220,7 +220,7 @@ <string>Show splash screen at startup</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>checkAnime</cstring> </property> @@ -228,7 +228,7 @@ <string>Don't show animated logo in toolbar</string> </property> </widget> - <widget class="QButtonGroup" row="6" column="0"> + <widget class="TQButtonGroup" row="6" column="0"> <property name="name"> <cstring>buttonGroupCS</cstring> </property> @@ -245,7 +245,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton22</cstring> </property> @@ -253,7 +253,7 @@ <string>Thumbnail loader</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton23</cstring> </property> @@ -261,7 +261,7 @@ <string>Image viewer (also preview window)</string> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioButton24_2</cstring> </property> @@ -269,7 +269,7 @@ <string>Both</string> </property> </widget> - <widget class="QRadioButton" row="3" column="0"> + <widget class="TQRadioButton" row="3" column="0"> <property name="name"> <cstring>radioButton25_2</cstring> </property> @@ -279,7 +279,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox" row="4" column="0"> + <widget class="TQCheckBox" row="4" column="0"> <property name="name"> <cstring>checkTreat</cstring> </property> @@ -287,7 +287,7 @@ <string>Treat unknown mime types as unsupported</string> </property> </widget> - <widget class="QCheckBox" row="5" column="0"> + <widget class="TQCheckBox" row="5" column="0"> <property name="name"> <cstring>checkKIPIDemand</cstring> </property> @@ -302,7 +302,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pageFileview</cstring> </property> @@ -316,7 +316,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_4_3</cstring> </property> @@ -324,11 +324,11 @@ <string><b>Disk navigator</b></string> </property> </widget> - <widget class="QTabWidget" row="1" column="0"> + <widget class="TQTabWidget" row="1" column="0"> <property name="name"> <cstring>tabNav</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -339,7 +339,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupSetPath</cstring> </property> @@ -370,7 +370,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioSetThis</cstring> </property> @@ -381,7 +381,7 @@ <number>2</number> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioSetLast</cstring> </property> @@ -392,7 +392,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioSetCurrent</cstring> </property> @@ -413,7 +413,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkRunUnknown</cstring> </property> @@ -424,7 +424,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>checkSaveHistory</cstring> </property> @@ -432,7 +432,7 @@ <string>Save history</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>checkSupportAr</cstring> </property> @@ -440,7 +440,7 @@ <string>Jump into archives</string> </property> </widget> - <widget class="QCheckBox" row="4" column="0"> + <widget class="TQCheckBox" row="4" column="0"> <property name="name"> <cstring>checkJumpFirst</cstring> </property> @@ -448,7 +448,7 @@ <string>Jump to first image</string> </property> </widget> - <widget class="QCheckBox" row="6" column="0"> + <widget class="TQCheckBox" row="6" column="0"> <property name="name"> <cstring>checkCalc</cstring> </property> @@ -466,7 +466,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> @@ -475,7 +475,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -496,14 +496,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>26</width> <height>10</height> </size> </property> </spacer> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>checkTooltips</cstring> </property> @@ -511,7 +511,7 @@ <string>Show tooltips with file information</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>checkDisableDirs</cstring> </property> @@ -519,7 +519,7 @@ <string>Don't show directories</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkDrag</cstring> </property> @@ -527,7 +527,7 @@ <string>Visualize drag operation</string> </property> </widget> - <widget class="QGroupBox" row="3" column="0"> + <widget class="TQGroupBox" row="3" column="0"> <property name="name"> <cstring>groupTooltip</cstring> </property> @@ -541,7 +541,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>checkInactive</cstring> </property> @@ -549,7 +549,7 @@ <string>Don't show tooltips when the main window is inactive</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkTooltipPreview</cstring> </property> @@ -569,7 +569,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -590,14 +590,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupSync</cstring> </property> @@ -625,7 +625,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioSyncBoth</cstring> </property> @@ -633,7 +633,7 @@ <string>Both</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioSyncWStackTree</cstring> </property> @@ -641,7 +641,7 @@ <string>Tree <- Navigator</string> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioSyncTreeWStack</cstring> </property> @@ -656,7 +656,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pageThumbnails</cstring> </property> @@ -670,7 +670,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_4_qqqq4</cstring> </property> @@ -688,14 +688,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> </size> </property> </spacer> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -712,7 +712,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>checkNoWriteThumbs</cstring> </property> @@ -720,7 +720,7 @@ <string>Do not write thumbnails on disk</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkMark</cstring> </property> @@ -753,7 +753,7 @@ <string> pixels</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>checkLazy</cstring> </property> @@ -790,7 +790,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>pageGL</cstring> </property> @@ -804,11 +804,11 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget" row="1" column="0"> + <widget class="TQTabWidget" row="1" column="0"> <property name="name"> <cstring>tabGL</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -819,7 +819,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupScrolling</cstring> </property> @@ -844,7 +844,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioSCRZoom_2</cstring> </property> @@ -852,7 +852,7 @@ <string>Zoom the scene</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioSRCNext_2</cstring> </property> @@ -862,7 +862,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>checkProgress</cstring> </property> @@ -870,15 +870,15 @@ <string>Show images progressively</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="0"> + <widget class="TQLayoutWidget" row="2" column="0"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroupColor</cstring> </property> @@ -903,7 +903,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioColorCustomTexture</cstring> </property> @@ -914,7 +914,7 @@ <number>2</number> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioColorCustom</cstring> </property> @@ -925,7 +925,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioColorSystem</cstring> </property> @@ -938,11 +938,11 @@ </widget> </grid> </widget> - <widget class="QWidgetStack"> + <widget class="TQWidgetStack"> <property name="name"> <cstring>widgetStack4</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -963,7 +963,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -981,7 +981,7 @@ <property name="enabled"> <bool>false</bool> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>95</width> <height>25</height> @@ -996,7 +996,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -1023,7 +1023,7 @@ </sizepolicy> </property> </widget> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -1046,7 +1046,7 @@ <property name="spacing"> <number>5</number> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushCustomValidate</cstring> </property> @@ -1054,14 +1054,14 @@ <string>Validate</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textCustomValidate</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -1077,7 +1077,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>2</height> @@ -1089,7 +1089,7 @@ </widget> </hbox> </widget> - <widget class="QButtonGroup" row="1" column="0"> + <widget class="TQButtonGroup" row="1" column="0"> <property name="name"> <cstring>buttonGroupDC</cstring> </property> @@ -1106,7 +1106,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioButton27_2</cstring> </property> @@ -1117,7 +1117,7 @@ <number>2</number> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton28_2</cstring> </property> @@ -1128,7 +1128,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton26_3</cstring> </property> @@ -1151,14 +1151,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>2</height> </size> </property> </spacer> - <widget class="QCheckBox" row="4" column="0"> + <widget class="TQCheckBox" row="4" column="0"> <property name="name"> <cstring>checkCloseAll</cstring> </property> @@ -1168,7 +1168,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1179,7 +1179,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupPages</cstring> </property> @@ -1196,7 +1196,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton18_2</cstring> </property> @@ -1204,7 +1204,7 @@ <string>Load all pages</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton19</cstring> </property> @@ -1212,7 +1212,7 @@ <string>Load only first page</string> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioButtonPagesNoMore</cstring> </property> @@ -1243,7 +1243,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>50</height> @@ -1252,7 +1252,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -1273,14 +1273,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox" row="3" column="0"> + <widget class="TQCheckBox" row="3" column="0"> <property name="name"> <cstring>checkMarks</cstring> </property> @@ -1288,7 +1288,7 @@ <string>Draw tickmarks around the image</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>checkDrawQuads</cstring> </property> @@ -1320,7 +1320,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1331,7 +1331,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupZoomLimit</cstring> </property> @@ -1348,7 +1348,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton27</cstring> </property> @@ -1359,7 +1359,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioButton28</cstring> </property> @@ -1367,7 +1367,7 @@ <string>Custom</string> </property> </widget> - <widget class="QGroupBox" row="3" column="0"> + <widget class="TQGroupBox" row="3" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -1390,7 +1390,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -1398,7 +1398,7 @@ <string>minimum</string> </property> </widget> - <widget class="QSpinBox" row="1" column="0"> + <widget class="TQSpinBox" row="1" column="0"> <property name="name"> <cstring>spinZoomMin</cstring> </property> @@ -1412,7 +1412,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -1420,7 +1420,7 @@ <string>maximum</string> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>spinZoomMax</cstring> </property> @@ -1436,7 +1436,7 @@ </widget> </grid> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton26</cstring> </property> @@ -1473,7 +1473,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -1482,7 +1482,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1493,7 +1493,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>checkTabs</cstring> </property> @@ -1511,14 +1511,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>46</height> </size> </property> </spacer> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupTabs</cstring> </property> @@ -1532,7 +1532,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>checkTabAsk</cstring> </property> @@ -1540,7 +1540,7 @@ <string>Ask what to do when opening new image</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkTabClose</cstring> </property> @@ -1553,7 +1553,7 @@ </grid> </widget> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_4_4</cstring> </property> @@ -1563,7 +1563,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> @@ -1577,11 +1577,11 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget" row="1" column="0"> + <widget class="TQTabWidget" row="1" column="0"> <property name="name"> <cstring>tabSidebar</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -1592,7 +1592,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup" row="0" column="0"> + <widget class="TQButtonGroup" row="0" column="0"> <property name="name"> <cstring>buttonGroupRecurs</cstring> </property> @@ -1609,7 +1609,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton24</cstring> </property> @@ -1617,7 +1617,7 @@ <string>No recursion</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton25</cstring> </property> @@ -1625,7 +1625,7 @@ <string>Show number of files</string> </property> </widget> - <widget class="QRadioButton" row="3" column="0"> + <widget class="TQRadioButton" row="3" column="0"> <property name="name"> <cstring>radioButton26_2</cstring> </property> @@ -1636,7 +1636,7 @@ <number>3</number> </property> </widget> - <widget class="QRadioButton" row="2" column="0"> + <widget class="TQRadioButton" row="2" column="0"> <property name="name"> <cstring>radioButton26_2_2</cstring> </property> @@ -1659,7 +1659,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>135</height> @@ -1668,7 +1668,7 @@ </spacer> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1679,7 +1679,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>checkDevice</cstring> </property> @@ -1697,14 +1697,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>90</height> </size> </property> </spacer> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>checkMountOptions</cstring> </property> @@ -1712,7 +1712,7 @@ <string>Show mount options</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>checkMountFS</cstring> </property> @@ -1722,7 +1722,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -1733,7 +1733,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>preview</cstring> </property> @@ -1751,14 +1751,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>10</height> </size> </property> </spacer> - <widget class="QGroupBox" row="1" column="0"> + <widget class="TQGroupBox" row="1" column="0"> <property name="name"> <cstring>groupBoxPreview</cstring> </property> @@ -1783,7 +1783,7 @@ <string> ms</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -1799,7 +1799,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>previewDont</cstring> </property> @@ -1821,7 +1821,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textPreviewText</cstring> </property> @@ -1832,7 +1832,7 @@ <string>Text color:</string> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>checkPreviewText</cstring> </property> @@ -1845,7 +1845,7 @@ </grid> </widget> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2_4_5_2</cstring> </property> @@ -1855,14 +1855,14 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WStackPage</cstring> </property> <attribute name="id"> <number>5</number> </attribute> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabelKIPI</cstring> </property> @@ -1928,9 +1928,9 @@ </connection> <connection> <sender>kURLReqCustomTexture</sender> - <signal>urlSelected(const QString&)</signal> + <signal>urlSelected(const TQString&)</signal> <receiver>SQ_Options</receiver> - <slot>slotNewCustomTexture(const QString&)</slot> + <slot>slotNewCustomTexture(const TQString&)</slot> </connection> <connection> <sender>radioButton28</sender> @@ -1964,9 +1964,9 @@ </connection> <connection> <sender>kURLReqCustomTexture</sender> - <signal>returnPressed(const QString&)</signal> + <signal>returnPressed(const TQString&)</signal> <receiver>SQ_Options</receiver> - <slot>slotNewCustomTexture(const QString&)</slot> + <slot>slotNewCustomTexture(const TQString&)</slot> </connection> <connection> <sender>buttonGroupColor</sender> @@ -1976,9 +1976,9 @@ </connection> <connection> <sender>kColorSystem</sender> - <signal>changed(const QColor&)</signal> + <signal>changed(const TQColor&)</signal> <receiver>SQ_Options</receiver> - <slot>slotSetSystemBack(const QColor&)</slot> + <slot>slotSetSystemBack(const TQColor&)</slot> </connection> <connection> <sender>radioButtonPagesNoMore</sender> @@ -2065,14 +2065,14 @@ <tabstop>kColorGLbackground</tabstop> </tabstops> <includes> - <include location="global" impldecl="in declaration">qpixmap.h</include> + <include location="global" impldecl="in declaration">tqpixmap.h</include> <include location="global" impldecl="in implementation">kstandarddirs.h</include> - <include location="global" impldecl="in implementation">qfileinfo.h</include> + <include location="global" impldecl="in implementation">tqfileinfo.h</include> <include location="local" impldecl="in implementation">sq_config.h</include> <include location="local" impldecl="in implementation">sq_libraryhandler.h</include> - <include location="global" impldecl="in implementation">qimage.h</include> - <include location="global" impldecl="in implementation">qmessagebox.h</include> - <include location="global" impldecl="in implementation">qdir.h</include> + <include location="global" impldecl="in implementation">tqimage.h</include> + <include location="global" impldecl="in implementation">tqmessagebox.h</include> + <include location="global" impldecl="in implementation">tqdir.h</include> <include location="local" impldecl="in implementation">sq_iconlistitem.h</include> <include location="local" impldecl="in implementation">sq_viewcache.h</include> <include location="local" impldecl="in implementation">sq_pixmapcache.h</include> @@ -2082,26 +2082,26 @@ <include location="local" impldecl="in implementation">sq_options.ui.h</include> </includes> <variables> - <variable>QString custpixmap;</variable> + <variable>TQString custpixmap;</variable> <variable>bool showlinks;</variable> - <variable>QString favpixmap;</variable> - <variable>QWidget *kipi;</variable> + <variable>TQString favpixmap;</variable> + <variable>TQWidget *kipi;</variable> </variables> -<slots> - <slot>slotNewCustomTexture( const QString & path )</slot> +<Q_SLOTS> + <slot>slotNewCustomTexture( const TQString & path )</slot> <slot>slotShowPage()</slot> <slot>slotCustomTextureToggled( bool en )</slot> <slot>slotValidateCustomTexture()</slot> - <slot>paletteChange( const QPalette & oldPalette )</slot> - <slot>slotSetSystemBack( const QColor & )</slot> -</slots> + <slot>paletteChange( const TQPalette & oldPalette )</slot> + <slot>slotSetSystemBack( const TQColor & )</slot> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> <function returnType="int">start()</function> - <function returnType="bool">validPixmap( QPixmap pix )</function> + <function returnType="bool">validPixmap( TQPixmap pix )</function> <function access="private" returnType="bool">isPowerOf2( int tested )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>sq_iconlistbox.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/ksquirrel/sq_options.ui.h b/ksquirrel/sq_options.ui.h index 7e33537..4252981 100644 --- a/ksquirrel/sq_options.ui.h +++ b/ksquirrel/sq_options.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -25,7 +25,7 @@ void SQ_Options::init() buttonOk->setIconSet(SQ_IconLoader::instance()->loadIcon("ok", KIcon::Desktop, KIcon::SizeSmall)); int tp; SQ_Config *kconf = SQ_Config::instance(); - QColor color; + TQColor color; pagesNumber->setRange(1, 1000, 1, true); @@ -66,7 +66,7 @@ void SQ_Options::init() // Init GLView page kconf->setGroup("GL view"); - QPixmap p1; + TQPixmap p1; checkProgress->setChecked(kconf->readBoolEntry("progressiv", true)); checkDrawQuads->setChecked(kconf->readBoolEntry("alpha_bkgr", true)); checkMarks->setChecked(kconf->readBoolEntry("marks", true)); @@ -89,7 +89,7 @@ void SQ_Options::init() buttonGroupColor->setButton(tp); widgetStack4->raiseWidget(tp); - kColorSystem->setColor(colorGroup().color(QColorGroup::Base)); + kColorSystem->setColor(tqcolorGroup().color(TQColorGroup::Base)); tp = kconf->readNumEntry("zoom limit", 1); buttonGroupZoomLimit->setButton(tp); @@ -148,23 +148,23 @@ void SQ_Options::init() new SQ_IconListItem(listMain, SQ_IconLoader::instance()->loadIcon("display", KIcon::Desktop, KIcon::SizeMedium), i18n("General")); new SQ_IconListItem(listMain, SQ_IconLoader::instance()->loadIcon("folder", KIcon::Desktop, KIcon::SizeMedium), i18n("Filing")); new SQ_IconListItem(listMain, SQ_IconLoader::instance()->loadIcon("images", KIcon::Desktop, KIcon::SizeMedium), i18n("Thumbnails")); - new SQ_IconListItem(listMain, QPixmap::fromMimeSource(locate("data", "images/listbox/image_win.png")), i18n("Image window")); + new SQ_IconListItem(listMain, TQPixmap::fromMimeSource(locate("data", "images/listbox/image_win.png")), i18n("Image window")); new SQ_IconListItem(listMain, SQ_IconLoader::instance()->loadIcon("penguin", KIcon::Desktop, KIcon::SizeMedium), i18n("Sidebar")); #ifdef SQ_HAVE_KIPI new SQ_IconListItem(listMain, SQ_IconLoader::instance()->loadIcon("kipi", KIcon::Desktop, KIcon::SizeMedium), i18n("KIPI")); - QWidget *pg6 = widgetStack->widget(5); - QGridLayout *pageLayout6 = new QGridLayout(pg6, 2, 1, 0, -1, "pageLayout_6"); + TQWidget *pg6 = widgetStack->widget(5); + TQGridLayout *pageLayout6 = new TQGridLayout(pg6, 2, 1, 0, -1, "pageLayout_6"); kipi = new KIPI::ConfigWidget(pg6); pageLayout6->addWidget(textLabelKIPI, 0, 0); pageLayout6->addWidget(kipi, 1, 0); checkKIPIDemand->setEnabled(true); #endif - listMain->updateAndInstall(this); + listMain->updateAndInstall(TQT_TQOBJECT(this)); - connect(listMain, SIGNAL(selectionChanged()), SLOT(slotShowPage())); + connect(listMain, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotShowPage())); kURLReqOpenCustom->setMode(mode); @@ -181,9 +181,9 @@ void SQ_Options::init() int SQ_Options::start() { - int result = QDialog::exec(); + int result = TQDialog::exec(); - if(result == QDialog::Accepted) + if(result == TQDialog::Accepted) { #ifdef SQ_HAVE_KIPI static_cast<KIPI::ConfigWidget *>(kipi)->apply(); @@ -267,7 +267,7 @@ int SQ_Options::start() return result; } -bool SQ_Options::validPixmap(QPixmap pix) +bool SQ_Options::validPixmap(TQPixmap pix) { return (isPowerOf2(pix.width()) && isPowerOf2(pix.height()) && pix.width() <= 256 && pix.width() == pix.height() && !pix.isNull()); } @@ -285,21 +285,21 @@ bool SQ_Options::isPowerOf2( int tested ) return i == tested; } -void SQ_Options::slotNewCustomTexture( const QString & path) +void SQ_Options::slotNewCustomTexture( const TQString & path) { - QPixmap p1(path); + TQPixmap p1(path); if(validPixmap(p1)) { custpixmap = path; - textCustomValidate->setText(QString::fromLatin1("%1x%2: OK") - .arg(p1.width()) - .arg(p1.height())); + textCustomValidate->setText(TQString::tqfromLatin1("%1x%2: OK") + .tqarg(p1.width()) + .tqarg(p1.height())); } else textCustomValidate->setText(i18n("Wrong dimensions: %1x%2.") - .arg(p1.width()) - .arg(p1.height())); + .tqarg(p1.width()) + .tqarg(p1.height())); } void SQ_Options::slotShowPage() @@ -320,14 +320,14 @@ void SQ_Options::slotValidateCustomTexture() slotNewCustomTexture(kURLReqCustomTexture->url()); } -void SQ_Options::paletteChange( const QPalette &oldPalette ) +void SQ_Options::paletteChange( const TQPalette &oldPalette ) { - QDialog::paletteChange(oldPalette); + TQDialog::paletteChange(oldPalette); - kColorSystem->setColor(colorGroup().color(QColorGroup::Base)); + kColorSystem->setColor(tqcolorGroup().color(TQColorGroup::Base)); } -void SQ_Options::slotSetSystemBack( const QColor & ) +void SQ_Options::slotSetSystemBack( const TQColor & ) { - kColorSystem->setColor(colorGroup().color(QColorGroup::Base)); + kColorSystem->setColor(tqcolorGroup().color(TQColorGroup::Base)); } diff --git a/ksquirrel/sq_pixmapcache.cpp b/ksquirrel/sq_pixmapcache.cpp index 7fe2217..4be5869 100644 --- a/ksquirrel/sq_pixmapcache.cpp +++ b/ksquirrel/sq_pixmapcache.cpp @@ -25,8 +25,8 @@ SQ_PixmapCache * SQ_PixmapCache::m_instance = 0; -SQ_PixmapCache::SQ_PixmapCache(QObject *parent, int limit) - : QObject(parent), QMap<KURL, SQ_Thumbnail>() +SQ_PixmapCache::SQ_PixmapCache(TQObject *tqparent, int limit) + : TQObject(tqparent), TQMap<KURL, SQ_Thumbnail>() { m_instance = this; cache_limit = limit << 10; @@ -82,7 +82,7 @@ void SQ_PixmapCache::insert(const KURL &key, const SQ_Thumbnail &thumb) last_full += entrySize(thumb); // add new entry - QMap<KURL, SQ_Thumbnail>::insert(key, thumb); + TQMap<KURL, SQ_Thumbnail>::insert(key, thumb); } /* @@ -90,7 +90,7 @@ void SQ_PixmapCache::insert(const KURL &key, const SQ_Thumbnail &thumb) */ void SQ_PixmapCache::removeEntry(const KURL &key) { - iterator it = find(key); + iterator it = tqfind(key); // no item to remove ? if(it == end()) @@ -98,7 +98,7 @@ void SQ_PixmapCache::removeEntry(const KURL &key) last_full -= entrySize(it.data()); - QMap<KURL, SQ_Thumbnail>::remove(key); + TQMap<KURL, SQ_Thumbnail>::remove(key); } /* @@ -116,9 +116,9 @@ void SQ_PixmapCache::removeEntryFull(const KURL &key) /* * Check if pixmap, represented by 'key', is already in cache. */ -bool SQ_PixmapCache::contains2(const KURL &key, SQ_Thumbnail &th) +bool SQ_PixmapCache::tqcontains2(const KURL &key, SQ_Thumbnail &th) { - iterator it = find(key); + iterator it = tqfind(key); // item found if(it != end()) @@ -158,7 +158,7 @@ void SQ_PixmapCache::clear() { valid_full = false; - QMap<KURL, SQ_Thumbnail>::clear(); + TQMap<KURL, SQ_Thumbnail>::clear(); } int SQ_PixmapCache::entrySize(const SQ_Thumbnail &th) const diff --git a/ksquirrel/sq_pixmapcache.h b/ksquirrel/sq_pixmapcache.h index e5f9936..cf0a567 100644 --- a/ksquirrel/sq_pixmapcache.h +++ b/ksquirrel/sq_pixmapcache.h @@ -18,8 +18,8 @@ #ifndef SQ_PIXMAPCACHE_H #define SQ_PIXMAPCACHE_H -#include <qmap.h> -#include <qobject.h> +#include <tqmap.h> +#include <tqobject.h> #include <kurl.h> @@ -29,15 +29,15 @@ class SQ_DirThumbs; /* * SQ_PixmapCache represents a simple memory cache, which - * stores pixmaps. It doesn't use neither QPixmapCache nor QCache. + * stores pixmaps. It doesn't use neither TQPixmapCache nor TQCache. * * Uses SQ_Dir(Thumbnails) to store thumbnails on disk. */ -class SQ_PixmapCache : public QObject, public QMap<KURL, SQ_Thumbnail> +class SQ_PixmapCache : public TQObject, public TQMap<KURL, SQ_Thumbnail> { public: - SQ_PixmapCache(QObject *parent, int limit = 20*1024); + SQ_PixmapCache(TQObject *tqparent, int limit = 20*1024); ~SQ_PixmapCache(); /* @@ -70,7 +70,7 @@ class SQ_PixmapCache : public QObject, public QMap<KURL, SQ_Thumbnail> /* * Check if pixmap, represented by 'key', is already in cache. */ - bool contains2(const KURL &key, SQ_Thumbnail &th); + bool tqcontains2(const KURL &key, SQ_Thumbnail &th); /* * Calculate total size used by cache (not exact!) diff --git a/ksquirrel/sq_pluginsinfo.ui b/ksquirrel/sq_pluginsinfo.ui index 46d6682..385e045 100644 --- a/ksquirrel/sq_pluginsinfo.ui +++ b/ksquirrel/sq_pluginsinfo.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_PluginsInfo</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_PluginsInfo</cstring> </property> @@ -36,7 +36,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QListView" row="1" column="0"> + <widget class="TQListView" row="1" column="0"> <column> <property name="text"> <string>...</string> @@ -124,15 +124,15 @@ <enum>LastColumn</enum> </property> </widget> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>textCount</cstring> </property> @@ -145,7 +145,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLibs1</cstring> </property> @@ -163,14 +163,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -178,7 +178,7 @@ <string>Total found:</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLibs</cstring> </property> @@ -193,9 +193,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -211,14 +211,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>445</width> <height>16</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushClose</cstring> </property> @@ -242,15 +242,15 @@ </connection> <connection> <sender>tableLib</sender> - <signal>doubleClicked(QListViewItem*)</signal> + <signal>doubleClicked(TQListViewItem*)</signal> <receiver>SQ_PluginsInfo</receiver> - <slot>slotDoubleClicked(QListViewItem*)</slot> + <slot>slotDoubleClicked(TQListViewItem*)</slot> </connection> <connection> <sender>tableLib</sender> - <signal>mouseButtonClicked(int,QListViewItem*,const QPoint&,int)</signal> + <signal>mouseButtonClicked(int,TQListViewItem*,const TQPoint&,int)</signal> <receiver>SQ_PluginsInfo</receiver> - <slot>slotMouseButtonClicked(int,QListViewItem*,const QPoint&,int)</slot> + <slot>slotMouseButtonClicked(int,TQListViewItem*,const TQPoint&,int)</slot> </connection> </connections> <includes> @@ -263,13 +263,13 @@ <include location="global" impldecl="in implementation">kstringhandler.h</include> <include location="local" impldecl="in implementation">sq_pluginsinfo.ui.h</include> </includes> -<slots> - <slot>slotDoubleClicked( QListViewItem * i )</slot> - <slot>slotMouseButtonClicked( int button, QListViewItem * i, const QPoint &, int c )</slot> -</slots> +<Q_SLOTS> + <slot>slotDoubleClicked( TQListViewItem * i )</slot> + <slot>slotMouseButtonClicked( int button, TQListViewItem * i, const TQPoint &, int c )</slot> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> <function access="private">showLibs()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_pluginsinfo.ui.h b/ksquirrel/sq_pluginsinfo.ui.h index cda52a7..b363937 100644 --- a/ksquirrel/sq_pluginsinfo.ui.h +++ b/ksquirrel/sq_pluginsinfo.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -28,15 +28,15 @@ void SQ_PluginsInfo::showLibs() if(!cnt) return; - QPixmap ok = SQ_IconLoader::instance()->loadIcon("ok", KIcon::Desktop, KIcon::SizeSmall); - QPixmap configure = SQ_IconLoader::instance()->loadIcon("configure", KIcon::Desktop, KIcon::SizeSmall); + TQPixmap ok = SQ_IconLoader::instance()->loadIcon("ok", KIcon::Desktop, KIcon::SizeSmall); + TQPixmap configure = SQ_IconLoader::instance()->loadIcon("configure", KIcon::Desktop, KIcon::SizeSmall); SQ_LibraryHandler::iterator itEnd = SQ_LibraryHandler::instance()->end(); - QListViewItem *item; + TQListViewItem *item; for(SQ_LibraryHandler::iterator it = SQ_LibraryHandler::instance()->begin();it != itEnd;++it) { - item = new QListViewItem(tableLib, QString::null, QString::null, + item = new TQListViewItem(tableLib, TQString(), TQString(), (*it).quickinfo, (*it).version, KStringHandler::rsqueeze((*it).mimetype, 20)); @@ -59,7 +59,7 @@ void SQ_PluginsInfo::showLibs() tableLib->setSelected(item, true); } -void SQ_PluginsInfo::slotDoubleClicked(QListViewItem *i) +void SQ_PluginsInfo::slotDoubleClicked(TQListViewItem *i) { if(!i) return; @@ -76,7 +76,7 @@ void SQ_PluginsInfo::slotDoubleClicked(QListViewItem *i) skel.exec(lib->settings); } -void SQ_PluginsInfo::slotMouseButtonClicked(int button, QListViewItem *i, const QPoint &, int c) +void SQ_PluginsInfo::slotMouseButtonClicked(int button, TQListViewItem *i, const TQPoint &, int c) { if(button == Qt::LeftButton && i && !c) slotDoubleClicked(i); diff --git a/ksquirrel/sq_popupmenu.cpp b/ksquirrel/sq_popupmenu.cpp index 2bb037e..0dafd91 100644 --- a/ksquirrel/sq_popupmenu.cpp +++ b/ksquirrel/sq_popupmenu.cpp @@ -21,19 +21,19 @@ #include "sq_popupmenu.h" -SQ_PopupMenu::SQ_PopupMenu(QWidget *parent, const char *name) - : KPopupMenu(parent, name), title(0) +SQ_PopupMenu::SQ_PopupMenu(TQWidget *tqparent, const char *name) + : KPopupMenu(tqparent, name), title(0) {} SQ_PopupMenu::~SQ_PopupMenu() {} -void SQ_PopupMenu::insertTitle(const QString &t) +void SQ_PopupMenu::insertTitle(const TQString &t) { title = KPopupMenu::insertTitle(t); } -void SQ_PopupMenu::changeTitle(const QString &t) +void SQ_PopupMenu::changeTitle(const TQString &t) { KPopupMenu::changeTitle(title, t); } diff --git a/ksquirrel/sq_popupmenu.h b/ksquirrel/sq_popupmenu.h index c6aaaad..0714d64 100644 --- a/ksquirrel/sq_popupmenu.h +++ b/ksquirrel/sq_popupmenu.h @@ -27,11 +27,11 @@ class SQ_PopupMenu : public KPopupMenu { public: - SQ_PopupMenu(QWidget *parent = 0, const char *name = 0); + SQ_PopupMenu(TQWidget *tqparent = 0, const char *name = 0); ~SQ_PopupMenu(); - void insertTitle(const QString &t); - void changeTitle(const QString &t); + void insertTitle(const TQString &t); + void changeTitle(const TQString &t); private: int title; diff --git a/ksquirrel/sq_progress.cpp b/ksquirrel/sq_progress.cpp index 8686270..495501f 100644 --- a/ksquirrel/sq_progress.cpp +++ b/ksquirrel/sq_progress.cpp @@ -21,16 +21,16 @@ #include <limits.h> -#include <qpainter.h> -#include <qbrush.h> -#include <qpen.h> +#include <tqpainter.h> +#include <tqbrush.h> +#include <tqpen.h> #include <kglobalsettings.h> #include "sq_progress.h" -SQ_Progress::SQ_Progress(QWidget *parent, const char *name) - : QLabel(parent, name, Qt::WNoAutoErase), m_text(true), painter(0) +SQ_Progress::SQ_Progress(TQWidget *tqparent, const char *name) + : TQLabel(tqparent, name, TQt::WNoAutoErase), m_text(true), painter(0) {} SQ_Progress::~SQ_Progress() @@ -47,11 +47,11 @@ void SQ_Progress::setTotalSteps(int totalSteps) if(!color.isValid()) color = KGlobalSettings::highlightColor(); - painter = new QPainter(this); + painter = new TQPainter(this); painter->setBrush(color); painter->setPen(color); - QFont f = font(); + TQFont f = font(); f.setBold(true); painter->setFont(f); @@ -103,7 +103,7 @@ void SQ_Progress::flush() painter = 0; } -void SQ_Progress::paintEvent(QPaintEvent *) +void SQ_Progress::paintEvent(TQPaintEvent *) { if(painter) { @@ -129,9 +129,9 @@ void SQ_Progress::drawProgress() // draw percentage value painter->setPen(KGlobalSettings::highlightedTextColor()); painter->setClipRect(0, 0, np, height()); - painter->drawText(rect(), Qt::AlignCenter | Qt::SingleLine, QString::number(percentage) + '%'); + painter->drawText(rect(), TQt::AlignCenter | TQt::SingleLine, TQString::number(percentage) + '%'); painter->setPen(KGlobalSettings::textColor()); painter->setClipRect(np, 0, width()-np, height()); - painter->drawText(rect(), Qt::AlignCenter | Qt::SingleLine, QString::number(percentage) + '%'); + painter->drawText(rect(), TQt::AlignCenter | TQt::SingleLine, TQString::number(percentage) + '%'); } } diff --git a/ksquirrel/sq_progress.h b/ksquirrel/sq_progress.h index 5644b53..0c43b56 100644 --- a/ksquirrel/sq_progress.h +++ b/ksquirrel/sq_progress.h @@ -18,25 +18,25 @@ #ifndef SQ_PROGRESS_H #define SQ_PROGRESS_H -#include <qlabel.h> -#include <qcolor.h> +#include <tqlabel.h> +#include <tqcolor.h> -class QPainter; +class TQPainter; /* - * SQ_Progress is a simple replacement for QProgressBar + * SQ_Progress is a simple replacement for TQProgressBar */ -class SQ_Progress : public QLabel +class SQ_Progress : public TQLabel { public: - SQ_Progress(QWidget *parent = 0, const char *name = 0); + SQ_Progress(TQWidget *tqparent = 0, const char *name = 0); ~SQ_Progress(); void setTotalSteps(int totalSteps); void addSteps(int steps); - void setColor(const QColor &c); // alternative progress color + void setColor(const TQColor &c); // alternative progress color /* * Set current progress to 'progress'. @@ -58,7 +58,7 @@ class SQ_Progress : public QLabel void setShowText(bool sh); protected: - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); private: void drawProgress(); @@ -66,9 +66,9 @@ class SQ_Progress : public QLabel private: int percentage, total_steps, step; bool m_text; - QColor color; + TQColor color; - QPainter *painter; + TQPainter *painter; }; inline @@ -84,7 +84,7 @@ void SQ_Progress::setShowText(bool sh) } inline -void SQ_Progress::setColor(const QColor &c) +void SQ_Progress::setColor(const TQColor &c) { color = c; } diff --git a/ksquirrel/sq_progressbox.cpp b/ksquirrel/sq_progressbox.cpp index 8100029..bd72131 100644 --- a/ksquirrel/sq_progressbox.cpp +++ b/ksquirrel/sq_progressbox.cpp @@ -19,24 +19,24 @@ #include "config.h" #endif -#include <qpushbutton.h> +#include <tqpushbutton.h> #include "sq_iconloader.h" #include "sq_progressbox.h" -SQ_ProgressBox::SQ_ProgressBox(QWidget *parent, const char *name) : QHBox(parent, name) +SQ_ProgressBox::SQ_ProgressBox(TQWidget *tqparent, const char *name) : TQHBox(tqparent, name) { -// QToolBar *progressBoxBar = new QToolBar(QString::null, NULL, this); - buttonStop = new QPushButton(this); +// TQToolBar *progressBoxBar = new TQToolBar(TQString(), NULL, this); + buttonStop = new TQPushButton(this); buttonStop->setFlat(true); buttonStop->setPixmap(SQ_IconLoader::instance()->loadIcon("player_stop", KIcon::Desktop, KIcon::SizeSmall)); - connect(buttonStop, SIGNAL(clicked()), parent, SLOT(slotThumbnailUpdateToggle())); + connect(buttonStop, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(slotThumbnailUpdateToggle())); // create progress bar p = new SQ_Progress(this); // setup progress bar - setFrameShape(QFrame::NoFrame); + setFrameShape(TQFrame::NoFrame); setSpacing(0); setMargin(0); setStretchFactor(p, 1); diff --git a/ksquirrel/sq_progressbox.h b/ksquirrel/sq_progressbox.h index 888c9f3..f2d501c 100644 --- a/ksquirrel/sq_progressbox.h +++ b/ksquirrel/sq_progressbox.h @@ -18,21 +18,21 @@ #ifndef SQ_PROGRESSBOX_H #define SQ_PROGRESSBOX_H -#include <qhbox.h> +#include <tqhbox.h> #include "sq_progress.h" -class QPushButton; +class TQPushButton; -class SQ_ProgressBox : public QHBox +class SQ_ProgressBox : public TQHBox { public: - SQ_ProgressBox(QWidget * parent = 0, const char * name = 0); + SQ_ProgressBox(TQWidget * tqparent = 0, const char * name = 0); ~SQ_ProgressBox(); SQ_Progress* progressBar() const; - QPushButton* button() const; + TQPushButton* button() const; void stopButtonPixmap(); void startButtonPixmap(); @@ -45,11 +45,11 @@ class SQ_ProgressBox : public QHBox private: SQ_Progress *p; - QPushButton *buttonStop; + TQPushButton *buttonStop; }; inline -QPushButton* SQ_ProgressBox::button() const +TQPushButton* SQ_ProgressBox::button() const { return buttonStop; } diff --git a/ksquirrel/sq_selectdeselectgroup.ui b/ksquirrel/sq_selectdeselectgroup.ui index 2a0bea2..7aaeac6 100644 --- a/ksquirrel/sq_selectdeselectgroup.ui +++ b/ksquirrel/sq_selectdeselectgroup.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_SelectDeselectGroup</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_SelectDeselectGroup</cstring> </property> @@ -22,15 +22,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> - <string>Filename or mask:</string> + <string>Filename or tqmask:</string> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>comboMask</cstring> </property> @@ -55,7 +55,7 @@ <bool>false</bool> </property> </widget> - <widget class="QPushButton" row="0" column="3"> + <widget class="TQPushButton" row="0" column="3"> <property name="name"> <cstring>pushMask</cstring> </property> @@ -63,7 +63,7 @@ <string></string> </property> </widget> - <widget class="QPushButton" row="0" column="2"> + <widget class="TQPushButton" row="0" column="2"> <property name="name"> <cstring>pushEdit</cstring> </property> @@ -95,12 +95,12 @@ <include location="local" impldecl="in implementation">sq_config.h</include> <include location="local" impldecl="in implementation">sq_selectdeselectgroup.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot access="private" specifier="non virtual">slotEdit()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> - <function returnType="int">exec( QString & mask )</function> + <function returnType="int">exec( TQString & tqmask )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_selectdeselectgroup.ui.h b/ksquirrel/sq_selectdeselectgroup.ui.h index ff51234..d7fcb07 100644 --- a/ksquirrel/sq_selectdeselectgroup.ui.h +++ b/ksquirrel/sq_selectdeselectgroup.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -31,13 +31,13 @@ void SQ_SelectDeselectGroup::init() #endif } -int SQ_SelectDeselectGroup::exec(QString &mask) +int SQ_SelectDeselectGroup::exec(TQString &tqmask) { - int result = QDialog::exec(); + int result = TQDialog::exec(); - if(result == QDialog::Accepted) + if(result == TQDialog::Accepted) { - QStringList list; + TQStringList list; int cc = comboMask->count(); for(int i = 0;i < cc;i++) @@ -47,17 +47,17 @@ int SQ_SelectDeselectGroup::exec(QString &mask) SQ_Config::instance()->setGroup("Fileview"); SQ_Config::instance()->writeEntry("selectdeselecthistory", list); - // save mask - mask = comboMask->currentText(); + // save tqmask + tqmask = comboMask->currentText(); } - return mask.isEmpty() ? QDialog::Rejected : result; + return tqmask.isEmpty() ? TQDialog::Rejected : result; } void SQ_SelectDeselectGroup::slotEdit() { #ifdef SQ_HAVE_KREGEXP - QDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<QDialog>("KRegExpEditor/KRegExpEditor"); + TQDialog *editorDialog = KParts::ComponentFactory::createInstanceFromQuery<TQDialog>("KRegExpEditor/KRegExpEditor"); if(editorDialog) { diff --git a/ksquirrel/sq_slideshow.ui b/ksquirrel/sq_slideshow.ui index ded1e44..d23c800 100644 --- a/ksquirrel/sq_slideshow.ui +++ b/ksquirrel/sq_slideshow.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_SlideShow</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_SlideShow</cstring> </property> @@ -22,9 +22,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -40,14 +40,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>220</width> <height>26</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushStart</cstring> </property> @@ -58,7 +58,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushClose</cstring> </property> @@ -68,7 +68,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -79,14 +79,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> <property name="text"> <string>Directory:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -100,7 +100,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>175</width> <height>16</height> @@ -135,40 +135,40 @@ <number>100</number> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Delay:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> <property name="text"> <string>Repeats:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_6</cstring> </property> <property name="text"> <string>Recursively</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QCheckBox" row="1" column="1" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>checkRecurs</cstring> </property> @@ -176,7 +176,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="8" column="0"> + <widget class="TQLabel" row="8" column="0"> <property name="name"> <cstring>textSize</cstring> </property> @@ -186,11 +186,11 @@ <property name="text"> <string>Show file size</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>textPos</cstring> </property> @@ -200,11 +200,11 @@ <property name="text"> <string>Show current index</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QCheckBox" row="8" column="1" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="8" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>checkSize</cstring> </property> @@ -215,7 +215,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="7" column="0"> + <widget class="TQLabel" row="7" column="0"> <property name="name"> <cstring>textName</cstring> </property> @@ -225,11 +225,11 @@ <property name="text"> <string>Show file name</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QCheckBox" row="6" column="1" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="6" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>checkPos</cstring> </property> @@ -240,7 +240,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox" row="7" column="1" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="7" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>checkName</cstring> </property> @@ -251,14 +251,14 @@ <string></string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> <property name="text"> <string>Background color:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -280,25 +280,25 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>186</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel1_5</cstring> </property> <property name="text"> <string>Onscreen messages</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QCheckBox" row="5" column="1" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="5" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>checkMessages</cstring> </property> @@ -316,7 +316,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>145</width> <height>16</height> @@ -334,7 +334,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="9" column="0"> + <widget class="TQLabel" row="9" column="0"> <property name="name"> <cstring>textColor</cstring> </property> @@ -344,13 +344,13 @@ <property name="text"> <string>Message text color:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="0" column="1" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -361,7 +361,7 @@ <cstring>kurl</cstring> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushCurrent</cstring> </property> @@ -369,7 +369,7 @@ <string></string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushHistory</cstring> </property> @@ -400,9 +400,9 @@ </connection> <connection> <sender>kurl</sender> - <signal>urlSelected(const QString&)</signal> + <signal>urlSelected(const TQString&)</signal> <receiver>SQ_SlideShow</receiver> - <slot>slotDirectory(const QString&)</slot> + <slot>slotDirectory(const TQString&)</slot> </connection> <connection> <sender>checkMessages</sender> @@ -419,29 +419,29 @@ <tabstop>pushClose</tabstop> </tabstops> <includes> - <include location="global" impldecl="in declaration">qstringlist.h</include> + <include location="global" impldecl="in declaration">tqstringlist.h</include> <include location="local" impldecl="in implementation">sq_config.h</include> <include location="local" impldecl="in implementation">sq_iconloader.h</include> - <include location="global" impldecl="in implementation">qpopupmenu.h</include> + <include location="global" impldecl="in implementation">tqpopupmenu.h</include> <include location="local" impldecl="in implementation">sq_widgetstack.h</include> <include location="local" impldecl="in implementation">sq_slideshow.ui.h</include> </includes> <variables> - <variable access="private">QStringList items;</variable> + <variable access="private">TQStringList items;</variable> </variables> -<slots> - <slot access="private">slotDirectory( const QString & dir )</slot> +<Q_SLOTS> + <slot access="private">slotDirectory( const TQString & dir )</slot> <slot access="private">slotActivated( int id )</slot> <slot access="private">slotCurrent()</slot> <slot access="private">slotMessages( bool b )</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> - <function returnType="int">exec( QString & path )</function> - <function access="private">setPath( const QString & path )</function> - <function access="private">appendPath( const QString & path )</function> + <function returnType="int">exec( TQString & path )</function> + <function access="private">setPath( const TQString & path )</function> + <function access="private">appendPath( const TQString & path )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>knuminput.h</includehint> <includehint>knuminput.h</includehint> diff --git a/ksquirrel/sq_slideshow.ui.h b/ksquirrel/sq_slideshow.ui.h index 9a9119b..f70c48e 100644 --- a/ksquirrel/sq_slideshow.ui.h +++ b/ksquirrel/sq_slideshow.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -26,19 +26,19 @@ void SQ_SlideShow::init() checkSize->setChecked(SQ_Config::instance()->readBoolEntry("messages_size", false)); checkPos->setChecked(SQ_Config::instance()->readBoolEntry("messages_pos", true)); - QColor col; + TQColor col; col.setNamedColor(SQ_Config::instance()->readEntry("background", "#4e4e4e")); bcolor->setColor(col); col.setNamedColor(SQ_Config::instance()->readEntry("message_text", "#ffffff")); tcolor->setColor(col); - QPopupMenu *hist = new QPopupMenu; + TQPopupMenu *hist = new TQPopupMenu; items = SQ_Config::instance()->readListEntry("history"); int i = 0; setPath(items.last()); - for(QStringList::iterator it = items.begin();it != items.end();++it) + for(TQStringList::iterator it = items.begin();it != items.end();++it) { if(i++ < SQ_HIST_NUMBER) hist->insertItem(*it); @@ -46,16 +46,16 @@ void SQ_SlideShow::init() break; } - connect(hist, SIGNAL(activated(int)), this, SLOT(slotActivated(int))); + connect(hist, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int))); pushHistory->setPopup(hist); } -int SQ_SlideShow::exec(QString &path) +int SQ_SlideShow::exec(TQString &path) { - int result = QDialog::exec(); + int result = TQDialog::exec(); - if(result == QDialog::Accepted) + if(result == TQDialog::Accepted) { // save parameters SQ_Config::instance()->setGroup("Slideshow"); @@ -75,28 +75,28 @@ int SQ_SlideShow::exec(QString &path) return result; } -void SQ_SlideShow::slotDirectory(const QString &dir) +void SQ_SlideShow::slotDirectory(const TQString &dir) { if(!dir.isEmpty()) appendPath(dir); } -void SQ_SlideShow::setPath(const QString &path) +void SQ_SlideShow::setPath(const TQString &path) { kurl->setURL(path); } void SQ_SlideShow::slotActivated(int id) { - QString dir = pushHistory->popup()->text(id); + TQString dir = pushHistory->popup()->text(id); if(!dir.isEmpty()) setPath(dir); } -void SQ_SlideShow::appendPath(const QString &path) +void SQ_SlideShow::appendPath(const TQString &path) { - if(items.findIndex(path) == -1) + if(items.tqfindIndex(path) == -1) { items.append(path); pushHistory->popup()->insertItem(path); @@ -108,7 +108,7 @@ void SQ_SlideShow::appendPath(const QString &path) void SQ_SlideShow::slotCurrent() { - QString path = SQ_WidgetStack::instance()->url().prettyURL(); + TQString path = SQ_WidgetStack::instance()->url().prettyURL(); setPath(path); appendPath(path); diff --git a/ksquirrel/sq_slideshowlisting.ui b/ksquirrel/sq_slideshowlisting.ui index f0b6a58..541fd63 100644 --- a/ksquirrel/sq_slideshowlisting.ui +++ b/ksquirrel/sq_slideshowlisting.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_SlideShowListing</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_SlideShowListing</cstring> </property> @@ -22,7 +22,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QFrame" row="0" column="0"> + <widget class="TQFrame" row="0" column="0"> <property name="name"> <cstring>frame3</cstring> </property> @@ -39,7 +39,7 @@ <property name="margin"> <number>2</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -55,7 +55,7 @@ <string>Listing</string> </property> </widget> - <widget class="QPushButton" row="0" column="3"> + <widget class="TQPushButton" row="0" column="3"> <property name="name"> <cstring>pushCancel</cstring> </property> @@ -73,11 +73,11 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textCount</cstring> </property> @@ -99,14 +99,14 @@ <includes> <include location="local" impldecl="in implementation">sq_slideshowlisting.ui.h</include> </includes> -<signals> +<Q_SIGNALS> <signal>kill();</signal> -</signals> +</Q_SIGNALS> <functions> <function access="private" specifier="non virtual">init()</function> - <function specifier="non virtual">setFile( int count, const QString & f )</function> + <function specifier="non virtual">setFile( int count, const TQString & f )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>ksqueezedtextlabel.h</includehint> </includehints> diff --git a/ksquirrel/sq_slideshowlisting.ui.h b/ksquirrel/sq_slideshowlisting.ui.h index 4608f8b..5b57c2a 100644 --- a/ksquirrel/sq_slideshowlisting.ui.h +++ b/ksquirrel/sq_slideshowlisting.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). @@ -12,11 +12,11 @@ void SQ_SlideShowListing::init() { - connect(pushCancel, SIGNAL(clicked()), this, SIGNAL(kill())); + connect(pushCancel, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(kill())); } -void SQ_SlideShowListing::setFile(int count, const QString &f) +void SQ_SlideShowListing::setFile(int count, const TQString &f) { - textCount->setText(QString::fromLatin1("[%1]").arg(count)); + textCount->setText(TQString::tqfromLatin1("[%1]").tqarg(count)); textFile->setText(f); } diff --git a/ksquirrel/sq_slideshowwidget.cpp b/ksquirrel/sq_slideshowwidget.cpp index d650602..ded1424 100644 --- a/ksquirrel/sq_slideshowwidget.cpp +++ b/ksquirrel/sq_slideshowwidget.cpp @@ -19,15 +19,15 @@ #include "config.h" #endif -#include <qimage.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qtoolbutton.h> -#include <qhbox.h> -#include <qfileinfo.h> -#include <qfont.h> -#include <qlabel.h> -#include <qwhatsthis.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqtoolbutton.h> +#include <tqhbox.h> +#include <tqfileinfo.h> +#include <tqfont.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> #include <kcursor.h> #include <klocale.h> @@ -50,25 +50,25 @@ SQ_SlideShowWidget * SQ_SlideShowWidget::m_inst = 0; -SQ_SlideShowWidget::SQ_SlideShowWidget(QWidget *parent, const char *name) - : QWidget(parent,name, Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_StaysOnTop | Qt::WNoAutoErase) +SQ_SlideShowWidget::SQ_SlideShowWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent,name, TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WStyle_StaysOnTop | TQt::WNoAutoErase) { m_inst = this; - timerHide = new QTimer(this); + timerHide = new TQTimer(this); - message = new QLabel(this); + message = new TQLabel(this); - QFont f = message->font(); + TQFont f = message->font(); f.setPointSize(12); f.setBold(true); message->setFont(f); message->setMargin(4); - message->setFrameShape(QFrame::NoFrame); + message->setFrameShape(TQFrame::NoFrame); - connect(timerHide, SIGNAL(timeout()), this, SLOT(slotHide())); + connect(timerHide, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotHide())); - options = new QHBox(this, "kde toolbar widget"); + options = new TQHBox(this, "kde toolbar widget"); options->setSpacing(0); options->setMargin(1); options->move(0, 0); @@ -77,28 +77,28 @@ SQ_SlideShowWidget::SQ_SlideShowWidget(QWidget *parent, const char *name) int is = KIcon::SizeMedium; - QToolButton *b = new QToolButton(options); + TQToolButton *b = new TQToolButton(options); b->setIconSet(SQ_IconLoader::instance()->loadIcon("previous", KIcon::Desktop, is)); - connect(b, SIGNAL(clicked()), this, SIGNAL(previous())); - connect(b, SIGNAL(clicked()), this, SLOT(slotResetPause())); + connect(b, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(previous())); + connect(b, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotResetPause())); - b = new QToolButton(options); + b = new TQToolButton(options); b->setIconSet(SQ_IconLoader::instance()->loadIcon("next", KIcon::Desktop, is)); - connect(b, SIGNAL(clicked()), this, SIGNAL(next())); - connect(b, SIGNAL(clicked()), this, SLOT(slotResetPause())); + connect(b, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(next())); + connect(b, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotResetPause())); - buttonPause = new QToolButton(options); + buttonPause = new TQToolButton(options); buttonPause->setToggleButton(true); buttonPause->setIconSet(SQ_IconLoader::instance()->loadIcon("player_pause", KIcon::Desktop, is)); - connect(buttonPause, SIGNAL(clicked()), this, SIGNAL(pause())); + connect(buttonPause, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(pause())); - b = new QToolButton(options); + b = new TQToolButton(options); b->setIconSet(SQ_IconLoader::instance()->loadIcon("help", KIcon::Desktop, is)); - connect(b, SIGNAL(clicked()), this, SLOT(slotShowHelp())); + connect(b, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowHelp())); - b = new QToolButton(options); + b = new TQToolButton(options); b->setIconSet(SQ_IconLoader::instance()->loadIcon("cancel", KIcon::Desktop, is)); - connect(b, SIGNAL(clicked()), this, SIGNAL(stopSlideShow())); + connect(b, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(stopSlideShow())); options->adjustSize(); message->setFixedHeight(options->height()); @@ -155,10 +155,10 @@ void SQ_SlideShowWidget::endSlideShow() message->hide(); hide(); - pixmap = QPixmap(); + pixmap = TQPixmap(); } -void SQ_SlideShowWidget::loadImage(const QString &_path, int _current) +void SQ_SlideShowWidget::loadImage(const TQString &_path, int _current) { fmt_info *finfo; RGBA *bits; @@ -178,20 +178,20 @@ void SQ_SlideShowWidget::loadImage(const QString &_path, int _current) constructMessage(); - pixmap = QPixmap(); + pixmap = TQPixmap(); int w = finfo->image[0].w; int h = finfo->image[0].h; - QImage *all = 0, *small = 0; + TQImage *all = 0, *small = 0; - all = new QImage((uchar *)bits, w, h, 32, 0, 0, QImage::LittleEndian); + all = new TQImage((uchar *)bits, w, h, 32, 0, 0, TQImage::LittleEndian); all->setAlphaBuffer(true); // scale down to fit into window if(w > width() || h > height()) { - small = new QImage(); - *small = SQ_Utils::scale(*all, width(), height(), SQ_Utils::SMOOTH_FAST, QImage::ScaleMin); + small = new TQImage(); + *small = SQ_Utils::scale(*all, width(), height(), SQ_Utils::SMOOTH_FAST, TQ_ScaleMin); delete all; all = 0; @@ -209,7 +209,7 @@ void SQ_SlideShowWidget::loadImage(const QString &_path, int _current) unsigned char t; RGBA *sk = reinterpret_cast<RGBA *>(small->bits()); - // swap R and B components - QPixmap need it + // swap R and B components - TQPixmap need it for(int i = 0;i < wh;i++) { t = (sk+i)->r; @@ -220,15 +220,15 @@ void SQ_SlideShowWidget::loadImage(const QString &_path, int _current) #ifdef SQ_HAVE_KEXIF KExifData data; data.readFromFile(_path); - int O = data.getImageOrientation(); + int O = data.getImageQt::Orientation(); if(O != KExifData::UNSPECIFIED && O != KExifData::NORMAL) { // copy original image - QImage img = *small; + TQImage img = *small; // rotate image - SQ_Utils::exifRotate(QString::null, img, O); + SQ_Utils::exifRotate(TQString(), img, O); // transfer back *small = img; @@ -246,9 +246,9 @@ void SQ_SlideShowWidget::loadImage(const QString &_path, int _current) update(); } -void SQ_SlideShowWidget::paintEvent(QPaintEvent *e) +void SQ_SlideShowWidget::paintEvent(TQPaintEvent *e) { - QPainter p(this); + TQPainter p(this); p.setClipRect(e->rect()); p.fillRect(e->rect(), bgcolor); @@ -257,27 +257,27 @@ void SQ_SlideShowWidget::paintEvent(QPaintEvent *e) p.drawPixmap((width() - pixmap.width()) / 2, (height() - pixmap.height()) / 2, pixmap); } -void SQ_SlideShowWidget::closeEvent(QCloseEvent *e) +void SQ_SlideShowWidget::closeEvent(TQCloseEvent *e) { emit stopSlideShow(); e->ignore(); } -void SQ_SlideShowWidget::keyPressEvent(QKeyEvent *e) +void SQ_SlideShowWidget::keyPressEvent(TQKeyEvent *e) { - if(e->key() == Qt::Key_Enter || e->key() == Qt::Key_Escape || e->key() == Qt::Key_Return) + if(e->key() == TQt::Key_Enter || e->key() == TQt::Key_Escape || e->key() == TQt::Key_Return) close(); - else if(e->key() == Qt::Key_Pause || e->key() == Qt::Key_Space) + else if(e->key() == TQt::Key_Pause || e->key() == TQt::Key_Space) { buttonPause->toggle(); emit pause(); } - else if(e->key() == Qt::Key_PageUp) + else if(e->key() == TQt::Key_PageUp) emit previous(); - else if(e->key() == Qt::Key_PageDown) + else if(e->key() == TQt::Key_PageDown) emit next(); - else if(e->key() == Qt::Key_M) + else if(e->key() == TQt::Key_M) { SQ_Config::instance()->setGroup("Slideshow"); @@ -296,7 +296,7 @@ void SQ_SlideShowWidget::keyPressEvent(QKeyEvent *e) e->accept(); } -void SQ_SlideShowWidget::mouseMoveEvent(QMouseEvent *) +void SQ_SlideShowWidget::mouseMoveEvent(TQMouseEvent *) { if(!options->isVisible()) { @@ -314,9 +314,9 @@ void SQ_SlideShowWidget::slotHide() if(messages) message->move(0, 0); } -bool SQ_SlideShowWidget::eventFilter(QObject *, QEvent *e) +bool SQ_SlideShowWidget::eventFilter(TQObject *, TQEvent *e) { - if(e->type() == QEvent::Enter) + if(e->type() == TQEvent::Enter) { timerHide->stop(); return true; @@ -327,7 +327,7 @@ bool SQ_SlideShowWidget::eventFilter(QObject *, QEvent *e) void SQ_SlideShowWidget::slotShowHelp() { - QWhatsThis::display(i18n( + TQWhatsThis::display(i18n( "<table cellspacing=0>" "<tr><td><b>Enter, Escape, Return</b></td><td>stop slideshow</td></tr>" "<tr><td><b>Pause, Space</b></td><td>pause/unpause slideshow</td></tr>" @@ -343,10 +343,10 @@ void SQ_SlideShowWidget::constructMessage() // construct onscreen message if(messages) { - QFileInfo fm(path); - QString s_message; + TQFileInfo fm(path); + TQString s_message; - if(mes_pos) s_message = QString::fromLatin1("[%1/%2] ").arg(current+1).arg(total); + if(mes_pos) s_message = TQString::tqfromLatin1("[%1/%2] ").tqarg(current+1).tqarg(total); if(mes_name) s_message += fm.fileName(); diff --git a/ksquirrel/sq_slideshowwidget.h b/ksquirrel/sq_slideshowwidget.h index 5d14a68..c6e1b43 100644 --- a/ksquirrel/sq_slideshowwidget.h +++ b/ksquirrel/sq_slideshowwidget.h @@ -18,13 +18,13 @@ #ifndef SQ_SLIDESHOWWIDGET_H #define SQ_SLIDESHOWWIDGET_H -#include <qwidget.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqpixmap.h> -class QTimer; -class QHBox; -class QLabel; -class QToolButton; +class TQTimer; +class TQHBox; +class TQLabel; +class TQToolButton; /** *@author Baryshev Dmitry @@ -35,19 +35,20 @@ class QToolButton; * "Action -> Slideshow advanced". */ -class SQ_SlideShowWidget : public QWidget +class SQ_SlideShowWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - SQ_SlideShowWidget(QWidget *parent = 0, const char *name = 0); + SQ_SlideShowWidget(TQWidget *tqparent = 0, const char *name = 0); ~SQ_SlideShowWidget(); void beginSlideShow(int totl); void endSlideShow(); - void loadImage(const QString &path, int); + void loadImage(const TQString &path, int); - virtual bool eventFilter(QObject * watched, QEvent *e); + virtual bool eventFilter(TQObject * watched, TQEvent *e); static SQ_SlideShowWidget* instance() { return m_inst; } @@ -55,12 +56,12 @@ class SQ_SlideShowWidget : public QWidget /* * Draw decoded image */ - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); /* * Ignore close event and tell KSquirrel to stop slideshow */ - virtual void closeEvent(QCloseEvent *); + virtual void closeEvent(TQCloseEvent *); /* * Return, Escape = stop slideshow @@ -68,12 +69,12 @@ class SQ_SlideShowWidget : public QWidget * Page Up = previous image * Page Down = next image */ - virtual void keyPressEvent(QKeyEvent *); + virtual void keyPressEvent(TQKeyEvent *); /* * show toolbar with actions */ - virtual void mouseMoveEvent(QMouseEvent *); + virtual void mouseMoveEvent(TQMouseEvent *); private: void constructMessage(); @@ -90,16 +91,16 @@ class SQ_SlideShowWidget : public QWidget void slotResetPause(); private: - QString path; + TQString path; int current; - QPixmap pixmap; - QColor bgcolor, tcolor; - QTimer *timerHide; - QLabel *message; - QHBox *options; + TQPixmap pixmap; + TQColor bgcolor, tcolor; + TQTimer *timerHide; + TQLabel *message; + TQHBox *options; bool messages, mes_name, mes_size, mes_pos; int total; - QToolButton *buttonPause; + TQToolButton *buttonPause; static SQ_SlideShowWidget *m_inst; }; diff --git a/ksquirrel/sq_splashscreen.cpp b/ksquirrel/sq_splashscreen.cpp index 3d0e66f..fc02b7f 100644 --- a/ksquirrel/sq_splashscreen.cpp +++ b/ksquirrel/sq_splashscreen.cpp @@ -48,23 +48,23 @@ SQ_SplashScreen * SQ_SplashScreen::m_inst = 0; -SQ_SplashScreen::SQ_SplashScreen(QWidget * parent, const char *name) - : QWidget(parent, name, - Qt::WStyle_Customize | - Qt::WStyle_NoBorder | - Qt::WStyle_StaysOnTop | - Qt::WDestructiveClose | - Qt::WX11BypassWM) +SQ_SplashScreen::SQ_SplashScreen(TQWidget * tqparent, const char *name) + : TQWidget(tqparent, name, + TQt::WStyle_Customize | + TQt::WStyle_NoBorder | + TQt::WStyle_StaysOnTop | + TQt::WDestructiveClose | + TQt::WX11BypassWM) { kdDebug() << "+SQ_SplashScreen" << endl; m_inst = this; - QPixmap pix = QPixmap(locate("data", "images/splash.png")); + TQPixmap pix = TQPixmap(locate("data", "images/splash.png")); setPaletteBackgroundPixmap(pix); - QRect rc = KGlobalSettings::splashScreenDesktopGeometry(); + TQRect rc = KGlobalSettings::splashScreenDesktopGeometry(); move(rc.center().x() - pix.width()/2, rc.center().y() - pix.height()/2); setFixedWidth(pix.width()); @@ -73,7 +73,7 @@ SQ_SplashScreen::SQ_SplashScreen(QWidget * parent, const char *name) pr = new SQ_Progress(this); pr->setGeometry(201, 255, 162, 14); pr->setShowText(false); - pr->setColor(QColor(170,100,110)); + pr->setColor(TQColor(170,100,110)); pr->setTotalSteps(10); } @@ -93,7 +93,7 @@ void SQ_SplashScreen::finish() } } -void SQ_SplashScreen::mousePressEvent(QMouseEvent *e) +void SQ_SplashScreen::mousePressEvent(TQMouseEvent *e) { e->accept(); diff --git a/ksquirrel/sq_splashscreen.h b/ksquirrel/sq_splashscreen.h index 3ca0505..7e198b4 100644 --- a/ksquirrel/sq_splashscreen.h +++ b/ksquirrel/sq_splashscreen.h @@ -37,14 +37,14 @@ #ifndef KSTARTUPLOGO_H #define KSTARTUPLOGO_H -#include <qwidget.h> +#include <tqwidget.h> class SQ_Progress; -class SQ_SplashScreen : public QWidget +class SQ_SplashScreen : public TQWidget { public: - SQ_SplashScreen(QWidget *parent = 0, const char *name = 0); + SQ_SplashScreen(TQWidget *tqparent = 0, const char *name = 0); ~SQ_SplashScreen(); static void advance(); @@ -55,7 +55,7 @@ class SQ_SplashScreen : public QWidget static SQ_SplashScreen* instance() { return m_inst; } protected: - virtual void mousePressEvent(QMouseEvent *); + virtual void mousePressEvent(TQMouseEvent *); private: SQ_Progress *pr; diff --git a/ksquirrel/sq_tabopendialog.ui b/ksquirrel/sq_tabopendialog.ui index 7928c39..7e3a3e3 100644 --- a/ksquirrel/sq_tabopendialog.ui +++ b/ksquirrel/sq_tabopendialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_TabOpenDialog</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_TabOpenDialog</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="0" column="0"> + <widget class="TQPushButton" row="0" column="0"> <property name="name"> <cstring>pushButton1</cstring> </property> @@ -30,7 +30,7 @@ <string>Open in a new tab</string> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>pushButton2</cstring> </property> @@ -38,7 +38,7 @@ <string>Replace current tab</string> </property> </widget> - <widget class="QPushButton" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQPushButton" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>pushButton3</cstring> </property> @@ -56,7 +56,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>10</width> <height>31</height> @@ -91,14 +91,14 @@ <variables> <variable access="private">int res;</variable> </variables> -<slots> +<Q_SLOTS> <slot access="private" specifier="non virtual">slotPush1()</slot> <slot access="private" specifier="non virtual">slotPush2()</slot> <slot access="private" specifier="non virtual">slotPush3()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> <function specifier="non virtual" returnType="int">result()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_tabopendialog.ui.h b/ksquirrel/sq_tabopendialog.ui.h index 7e21e52..5d80dfa 100644 --- a/ksquirrel/sq_tabopendialog.ui.h +++ b/ksquirrel/sq_tabopendialog.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). diff --git a/ksquirrel/sq_thumbnailcachemaster.ui b/ksquirrel/sq_thumbnailcachemaster.ui index 1dace2b..7ec6f28 100644 --- a/ksquirrel/sq_thumbnailcachemaster.ui +++ b/ksquirrel/sq_thumbnailcachemaster.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ThumbnailCacheMaster</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ThumbnailCacheMaster</cstring> </property> @@ -33,7 +33,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textThumbSize</cstring> </property> @@ -46,7 +46,7 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -83,7 +83,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>textCacheMemSize</cstring> </property> @@ -96,7 +96,7 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -136,9 +136,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="7" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="7" column="0" rowspan="1" colspan="2"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -154,14 +154,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>195</width> <height>21</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>pushClose</cstring> </property> @@ -230,7 +230,7 @@ </tabstops> <includes> <include location="global" impldecl="in declaration">kio/job.h</include> - <include location="global" impldecl="in implementation">qapplication.h</include> + <include location="global" impldecl="in implementation">tqapplication.h</include> <include location="global" impldecl="in implementation">kdirsize.h</include> <include location="local" impldecl="in implementation">sq_viewcache.h</include> <include location="local" impldecl="in implementation">sq_pixmapcache.h</include> @@ -240,7 +240,7 @@ <include location="global" impldecl="in implementation">kio/job.h</include> <include location="local" impldecl="in implementation">sq_thumbnailcachemaster.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot access="private">slotCalcCache()</slot> <slot access="private">slotClearCache()</slot> <slot access="private">slotClearFinished( KIO::Job * )</slot> @@ -248,11 +248,11 @@ <slot access="private">slotCalcCacheMemory()</slot> <slot access="private">slotShowDiskCache()</slot> <slot access="private">slotSyncCache()</slot> -</slots> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint> diff --git a/ksquirrel/sq_thumbnailcachemaster.ui.h b/ksquirrel/sq_thumbnailcachemaster.ui.h index 9c45919..a435add 100644 --- a/ksquirrel/sq_thumbnailcachemaster.ui.h +++ b/ksquirrel/sq_thumbnailcachemaster.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -30,44 +30,44 @@ void SQ_ThumbnailCacheMaster::slotCalcCache() int size = KDirSize::dirSize(url); - QString s = KIO::convertSize(size); + TQString s = KIO::convertSize(size); textThumbSize->setText(s); } void SQ_ThumbnailCacheMaster::slotClearCache() { - QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + TQApplication::setOverrideCursor(TQCursor(TQt::WaitCursor)); SQ_DirThumbs tmp; KURL url = tmp.root(); KIO::DeleteJob *job = KIO::del(url); - connect(job, SIGNAL(result(KIO::Job*)), this, SLOT(slotClearFinished(KIO::Job*))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), this, TQT_SLOT(slotClearFinished(KIO::Job*))); } void SQ_ThumbnailCacheMaster::slotClearFinished( KIO::Job * ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); slotCalcCache(); } void SQ_ThumbnailCacheMaster::slotClearMemoryCache() { - QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + TQApplication::setOverrideCursor(TQCursor(TQt::WaitCursor)); SQ_PixmapCache::instance()->clear(); slotCalcCacheMemory(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } void SQ_ThumbnailCacheMaster::slotCalcCacheMemory() { - textCacheMemSize->setText(QString::fromLatin1("%1/%2") - .arg(KIO::convertSize(SQ_PixmapCache::instance()->totalSize())) - .arg(KIO::convertSize(SQ_PixmapCache::instance()->cacheLimit()))); + textCacheMemSize->setText(TQString::tqfromLatin1("%1/%2") + .tqarg(KIO::convertSize(SQ_PixmapCache::instance()->totalSize())) + .tqarg(KIO::convertSize(SQ_PixmapCache::instance()->cacheLimit()))); } void SQ_ThumbnailCacheMaster::slotShowDiskCache() @@ -78,12 +78,12 @@ void SQ_ThumbnailCacheMaster::slotShowDiskCache() void SQ_ThumbnailCacheMaster::slotSyncCache() { - QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); + TQApplication::setOverrideCursor(TQCursor(TQt::WaitCursor)); SQ_PixmapCache::instance()->sync(); slotCalcCacheMemory(); slotCalcCache(); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } diff --git a/ksquirrel/sq_thumbnailinfo.h b/ksquirrel/sq_thumbnailinfo.h index f9f9448..6abff2d 100644 --- a/ksquirrel/sq_thumbnailinfo.h +++ b/ksquirrel/sq_thumbnailinfo.h @@ -18,9 +18,9 @@ #ifndef SQ_THUMBNAILINFO_H #define SQ_THUMBNAILINFO_H -#include <qstring.h> -#include <qpixmap.h> -#include <qimage.h> +#include <tqstring.h> +#include <tqpixmap.h> +#include <tqimage.h> #include <ctime> @@ -38,7 +38,7 @@ struct SQ_Thumbnail { // mime icon from image codec - QPixmap mime; + TQPixmap mime; // 'last modifiled' time of original file. // we should store it for non-local urls @@ -46,7 +46,7 @@ struct SQ_Thumbnail int w, h; - QImage thumbnail; + TQImage thumbnail; }; #endif diff --git a/ksquirrel/sq_thumbnailloadjob.cpp b/ksquirrel/sq_thumbnailloadjob.cpp index 3ca98c9..bc217c5 100644 --- a/ksquirrel/sq_thumbnailloadjob.cpp +++ b/ksquirrel/sq_thumbnailloadjob.cpp @@ -26,11 +26,11 @@ #include "config.h" #endif -#include <qdir.h> -#include <qimage.h> -#include <qpainter.h> -#include <qlabel.h> -#include <qdatetime.h> +#include <tqdir.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqlabel.h> +#include <tqdatetime.h> #include <kfileitem.h> #include <kiconloader.h> @@ -58,7 +58,7 @@ #define SQ_PREDOWNLOAD_SIZE 20 SQ_ThumbnailLoadJob::SQ_ThumbnailLoadJob(const KFileItemList &items, SQ_FileThumbView *parnt) - : KIO::Job(false), parent(parnt) + : KIO::Job(false), tqparent(parnt) { mBrokenThumbnail.thumbnail = KGlobal::iconLoader()->loadIcon("file_broken", KIcon::Desktop, SQ_ThumbnailSize::smallest()); mItems = items; @@ -177,7 +177,7 @@ void SQ_ThumbnailLoadJob::determineNextIcon() SQ_WidgetStack::instance()->thumbnailProcess(); - tfi = reinterpret_cast<SQ_FileThumbViewItem *>(item->extraData(parent)); + tfi = reinterpret_cast<SQ_FileThumbViewItem *>(item->extraData(tqparent)); // 1) local urls that are 100% supported, or // 2) remote urls that are 100% supported or _maybe_ supported (application/octet-stream) @@ -223,7 +223,7 @@ void SQ_ThumbnailLoadJob::slotResult(KIO::Job *job) KIO::UDSEntry::ConstIterator it = entry.begin(); mOriginalTime = 0; size = totalSize = 0; - QString suff; + TQString suff; for(; it != entry.end(); ++it) { @@ -257,7 +257,7 @@ void SQ_ThumbnailLoadJob::slotResult(KIO::Job *job) mState = STATE_PREDOWNLOAD; continueDownload = false; - tmp = new KTempFile(QString::null, QString::fromLatin1(".%1").arg(suff), 0600); + tmp = new KTempFile(TQString(), TQString::tqfromLatin1(".%1").tqarg(suff), 0600); tmp->setAutoDelete(true); tmp->close(); @@ -265,8 +265,8 @@ void SQ_ThumbnailLoadJob::slotResult(KIO::Job *job) KIO::Job *cpjob = KIO::get(mCurrentURL, false, false); - connect(cpjob, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotData(KIO::Job *, const QByteArray &))); + connect(cpjob, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); addSubjob(cpjob); } @@ -303,14 +303,14 @@ void SQ_ThumbnailLoadJob::slotResult(KIO::Job *job) } } -void SQ_ThumbnailLoadJob::slotData(KIO::Job *job, const QByteArray &data) +void SQ_ThumbnailLoadJob::slotData(KIO::Job *job, const TQByteArray &data) { if(!data.size()) return; size += data.size(); - QFile f(mTempURL.path()); + TQFile f(mTempURL.path()); if(f.open(IO_WriteOnly | IO_Append)) { @@ -348,7 +348,7 @@ bool SQ_ThumbnailLoadJob::statResultThumbnail() { SQ_Thumbnail th; - if(SQ_PixmapCache::instance()->contains2(mCurrentURL, th)) + if(SQ_PixmapCache::instance()->tqcontains2(mCurrentURL, th)) { emitThumbnailLoaded(th); return true; @@ -387,7 +387,7 @@ void SQ_ThumbnailLoadJob::createThumbnail(const KURL &pixPath) SQ_Thumbnail th; bool loaded = false; - if(SQ_PixmapCache::instance()->contains2(pixPath, th)) + if(SQ_PixmapCache::instance()->tqcontains2(pixPath, th)) { emitThumbnailLoaded(th); // kdDebug() << "CREATE found in cache \"" << pixPath << "\"" << endl; @@ -423,7 +423,7 @@ void SQ_ThumbnailLoadJob::insertOrSync(const KURL &url, SQ_Thumbnail &th) void SQ_ThumbnailLoadJob::emitThumbnailLoaded(SQ_Thumbnail &t) { - int biggestDimension = QMAX(t.thumbnail.width(), t.thumbnail.height()); + int biggestDimension = TQMAX(t.thumbnail.width(), t.thumbnail.height()); int thumbPixelSize = SQ_ThumbnailSize::instance()->pixelSize(); if(biggestDimension <= thumbPixelSize) diff --git a/ksquirrel/sq_thumbnailloadjob.h b/ksquirrel/sq_thumbnailloadjob.h index 4182014..e256cbd 100644 --- a/ksquirrel/sq_thumbnailloadjob.h +++ b/ksquirrel/sq_thumbnailloadjob.h @@ -24,7 +24,7 @@ #ifndef SQ_THUMBNAILLOADJOB_H #define SQ_THUMBNAILLOADJOB_H -#include <qimage.h> +#include <tqimage.h> #include <kio/job.h> @@ -36,7 +36,7 @@ class KTempFile; class SQ_DirThumbs; class SQ_FileThumbView; -typedef QPtrList<KFileItem> KFileItemList; +typedef TQPtrList<KFileItem> KFileItemList; /* * SQ_ThumbnailLoadJob is a job for loading thumbnails @@ -46,6 +46,7 @@ typedef QPtrList<KFileItem> KFileItemList; class SQ_ThumbnailLoadJob : public KIO::Job { Q_OBJECT + TQ_OBJECT public: SQ_ThumbnailLoadJob(const KFileItemList &itemList, SQ_FileThumbView *parnt); @@ -77,7 +78,7 @@ class SQ_ThumbnailLoadJob : public KIO::Job private slots: void slotResult(KIO::Job *job); - void slotData(KIO::Job *job, const QByteArray &data); + void slotData(KIO::Job *job, const TQByteArray &data); private: enum { STATE_STATORIG, STATE_PREDOWNLOAD, STATE_DOWNLOAD } mState; @@ -90,12 +91,12 @@ class SQ_ThumbnailLoadJob : public KIO::Job KIO::filesize_t totalSize, size; KTempFile *tmp; time_t mOriginalTime; - QString mime; + TQString mime; bool continueDownload, donothing; SQ_DirThumbs *dir; SQ_Thumbnail mBrokenThumbnail; - SQ_FileThumbView *parent; + SQ_FileThumbView *tqparent; }; #endif diff --git a/ksquirrel/sq_thumbnailsize.cpp b/ksquirrel/sq_thumbnailsize.cpp index a7708aa..2f9be60 100644 --- a/ksquirrel/sq_thumbnailsize.cpp +++ b/ksquirrel/sq_thumbnailsize.cpp @@ -31,16 +31,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. SQ_ThumbnailSize * SQ_ThumbnailSize::m_instance = 0; -SQ_ThumbnailSize::SQ_ThumbnailSize(QObject *parent, Size value) - : QObject(parent), mValue(value), m_extended(false), m_margin(16) +SQ_ThumbnailSize::SQ_ThumbnailSize(TQObject *tqparent, Size value) + : TQObject(tqparent), mValue(value), m_extended(false), m_margin(16) { m_instance = this; } -SQ_ThumbnailSize::SQ_ThumbnailSize(QObject *parent, const QString& str) - : QObject(parent), m_extended(false), m_margin(16) +SQ_ThumbnailSize::SQ_ThumbnailSize(TQObject *tqparent, const TQString& str) + : TQObject(tqparent), m_extended(false), m_margin(16) { - QString low = str.lower(); + TQString low = str.lower(); if(low == "medium") mValue = Medium; @@ -50,9 +50,9 @@ SQ_ThumbnailSize::SQ_ThumbnailSize(QObject *parent, const QString& str) mValue = Huge; } -void SQ_ThumbnailSize::setPixelSize(const QString &size) +void SQ_ThumbnailSize::setPixelSize(const TQString &size) { - QString low = size.lower(); + TQString low = size.lower(); if(low == "medium") mValue = Medium; @@ -62,9 +62,9 @@ void SQ_ThumbnailSize::setPixelSize(const QString &size) mValue = Huge; } -QString SQ_ThumbnailSize::stringValue() const +TQString SQ_ThumbnailSize::stringValue() const { - static QString sizeStr[3] = {"64","96","128"}; + static TQString sizeStr[3] = {"64","96","128"}; return sizeStr[int(mValue)]; } diff --git a/ksquirrel/sq_thumbnailsize.h b/ksquirrel/sq_thumbnailsize.h index 4411abd..d68bb47 100644 --- a/ksquirrel/sq_thumbnailsize.h +++ b/ksquirrel/sq_thumbnailsize.h @@ -25,21 +25,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef SQ_THUMBNAILSIZE_H #define SQ_THUMBNAILSIZE_H -#include <qstring.h> -#include <qobject.h> -#include <qsize.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqsize.h> /** * This is an "enum-like" class : an enum with cast operators to convert * from/to string and a few other methods */ -class SQ_ThumbnailSize : public QObject +class SQ_ThumbnailSize : public TQObject { public: enum Size { Medium, Large, Huge }; - SQ_ThumbnailSize(QObject *parent, Size value); - SQ_ThumbnailSize(QObject *parent, const QString& str); + SQ_ThumbnailSize(TQObject *tqparent, Size value); + SQ_ThumbnailSize(TQObject *tqparent, const TQString& str); void setExtended(bool); bool extended() const; @@ -47,15 +47,15 @@ class SQ_ThumbnailSize : public QObject void setMargin(int); int margin() const; - void setPixelSize(const QString &size); + void setPixelSize(const TQString &size); - QString pixelSizeString() const; + TQString pixelSizeString() const; int pixelSize() const; - QSize extendedSize() const; + TQSize extendedSize() const; int value() const; - QString stringValue() const; + TQString stringValue() const; static int biggest() { return 128; } static int smallest() { return 48; } @@ -115,21 +115,21 @@ int SQ_ThumbnailSize::pixelSize() const } inline -QSize SQ_ThumbnailSize::extendedSize() const +TQSize SQ_ThumbnailSize::extendedSize() const { switch (mValue) { case Medium: - return QSize(76, 108); + return TQSize(76, 108); case Large: - return QSize(108, 139); + return TQSize(108, 139); default: - return QSize(140, 170); + return TQSize(140, 170); } } inline -QString SQ_ThumbnailSize::pixelSizeString() const +TQString SQ_ThumbnailSize::pixelSizeString() const { switch (mValue) { diff --git a/ksquirrel/sq_thumbnailsunused.cpp b/ksquirrel/sq_thumbnailsunused.cpp index 7f00f19..cd67b44 100644 --- a/ksquirrel/sq_thumbnailsunused.cpp +++ b/ksquirrel/sq_thumbnailsunused.cpp @@ -21,7 +21,7 @@ SQ_ThumbnailsUnused * SQ_ThumbnailsUnused::m_instance = 0; -SQ_ThumbnailsUnused::SQ_ThumbnailsUnused(QObject *parent) : QObject(parent), QMap<KURL, time_t>() +SQ_ThumbnailsUnused::SQ_ThumbnailsUnused(TQObject *tqparent) : TQObject(tqparent), TQMap<KURL, time_t>() { m_instance = this; @@ -38,7 +38,7 @@ SQ_ThumbnailsUnused::~SQ_ThumbnailsUnused() bool SQ_ThumbnailsUnused::needUpdate(const KURL &u, time_t t) { - iterator it = find(u); + iterator it = tqfind(u); if(it == end()) return true; @@ -54,14 +54,14 @@ void SQ_ThumbnailsUnused::load() if(count <= 0) return; - QString is, s; + TQString is, s; time_t t; for(int i = 0;i < count;i++) { cache->setGroup("URL"); - is = QString::number(i); + is = TQString::number(i); s = cache->readEntry(is); cache->setGroup("Time"); @@ -80,12 +80,12 @@ void SQ_ThumbnailsUnused::save() cache->writeEntry("count", size()); iterator itEnd = end(); - QString is; + TQString is; int i = 0; for(iterator it = begin();it != itEnd;++it) { - is = QString::number(i); + is = TQString::number(i); cache->setGroup("URL"); cache->writeEntry(is, it.key().prettyURL()); diff --git a/ksquirrel/sq_thumbnailsunused.h b/ksquirrel/sq_thumbnailsunused.h index 4dcadb3..a201220 100644 --- a/ksquirrel/sq_thumbnailsunused.h +++ b/ksquirrel/sq_thumbnailsunused.h @@ -18,8 +18,8 @@ #ifndef SQ_THUMBNAILSUNUSED_H #define SQ_THUMBNAILSUNUSED_H -#include <qmap.h> -#include <qobject.h> +#include <tqmap.h> +#include <tqobject.h> #include <kurl.h> @@ -34,10 +34,10 @@ class KConfig; * (for example, smb:/ on slow network). */ -class SQ_ThumbnailsUnused : public QObject, public QMap<KURL, time_t> +class SQ_ThumbnailsUnused : public TQObject, public TQMap<KURL, time_t> { public: - SQ_ThumbnailsUnused(QObject *parent = 0); + SQ_ThumbnailsUnused(TQObject *tqparent = 0); ~SQ_ThumbnailsUnused(); bool needUpdate(const KURL &u, time_t t); diff --git a/ksquirrel/sq_utils.cpp b/ksquirrel/sq_utils.cpp index dc224c6..2cfadaf 100644 --- a/ksquirrel/sq_utils.cpp +++ b/ksquirrel/sq_utils.cpp @@ -19,7 +19,7 @@ #include "config.h" #endif -#include <qstring.h> +#include <tqstring.h> #include <ksquirrel-libs/fmt_defs.h> @@ -37,16 +37,16 @@ #include <libkexif/kexifdata.h> #endif -void SQ_Utils::exifRotate(const QString &file, QImage &im, int o) +void SQ_Utils::exifRotate(const TQString &file, TQImage &im, int o) { #ifdef SQ_HAVE_KEXIF im = im.xForm(SQ_Utils::exifGetMatrix(file, o)); #endif } -QWMatrix SQ_Utils::exifGetMatrix(const QString &file, int o) +TQWMatrix SQ_Utils::exifGetMatrix(const TQString &file, int o) { - QWMatrix matrix; + TQWMatrix matrix; #ifdef SQ_HAVE_KEXIF int O; @@ -55,7 +55,7 @@ QWMatrix SQ_Utils::exifGetMatrix(const QString &file, int o) { KExifData data; data.readFromFile(file); - O = data.getImageOrientation(); + O = data.getImageQt::Orientation(); } else O = o; @@ -79,20 +79,20 @@ QWMatrix SQ_Utils::exifGetMatrix(const QString &file, int o) return matrix; } -QImage SQ_Utils::scaleImage(unsigned char *im, int w, int h, int fitwithin) +TQImage SQ_Utils::scaleImage(unsigned char *im, int w, int h, int fitwithin) { if(w <= fitwithin && h <= fitwithin) { - QImage scaled(im, w, h, 32, 0, 0, QImage::LittleEndian); + TQImage scaled(im, w, h, 32, 0, 0, TQImage::LittleEndian); scaled.setAlphaBuffer(true); return scaled.copy(); } - QImage orig(im, w, h, 32, 0, 0, QImage::LittleEndian); + TQImage orig(im, w, h, 32, 0, 0, TQImage::LittleEndian); orig.setAlphaBuffer(true); // return scaled image - return SQ_Utils::scale(orig, fitwithin, fitwithin, SQ_Utils::SMOOTH_FAST, QImage::ScaleMin); + return SQ_Utils::scale(orig, fitwithin, fitwithin, SQ_Utils::SMOOTH_FAST, TQ_ScaleMin); } #ifndef KSQUIRREL_PART @@ -108,18 +108,18 @@ bool SQ_Utils::loadThumbnail(const KURL &pixPath, SQ_Thumbnail &t) { KExifData data; data.readFromFile(pixPath.path()); - QImage im = data.getThumbnail(); + TQImage im = data.getThumbnail(); if(!im.isNull()) { - SQ_Utils::exifRotate(QString::null, im, data.getImageOrientation()); + SQ_Utils::exifRotate(TQString(), im, data.getImageQt::Orientation()); th = true; t.w = 0; t.h = 0; t.mime = lib->mime; - QString w, h; + TQString w, h; w = im.text("Thumb::Image::Width"); h = im.text("Thumb::Image::Height"); t.w = w.toInt(); diff --git a/ksquirrel/sq_utils.h b/ksquirrel/sq_utils.h index 6bffac9..706aca4 100644 --- a/ksquirrel/sq_utils.h +++ b/ksquirrel/sq_utils.h @@ -18,12 +18,12 @@ #ifndef SQ_UTILS_H #define SQ_UTILS_H -#include <qimage.h> -#include <qwmatrix.h> +#include <tqimage.h> +#include <tqwmatrix.h> class KURL; -class QString; +class TQString; class SQ_Thumbnail; @@ -37,13 +37,13 @@ namespace SQ_Utils { enum SmoothAlgorithm { SMOOTH_NONE, SMOOTH_FAST, SMOOTH_NORMAL, SMOOTH_BEST }; - QImage scale(const QImage& image, int width, int height, - SmoothAlgorithm alg, QImage::ScaleMode mode = QImage::ScaleFree, double blur = 1.0); + TQImage scale(const TQImage& image, int width, int height, + SmoothAlgorithm alg, TQ_ScaleMode mode = TQ_ScaleFree, double blur = 1.0); /* * Scale given image to fit it within 'fitwithin' */ - QImage scaleImage(unsigned char *im, int w, int h, int fitwithin); + TQImage scaleImage(unsigned char *im, int w, int h, int fitwithin); #ifndef KSQUIRREL_PART /* @@ -55,9 +55,9 @@ namespace SQ_Utils /* * determine EXIF rotation and rotate image if needed */ - void exifRotate(const QString &file, QImage &i, int o = -1); + void exifRotate(const TQString &file, TQImage &i, int o = -1); - QWMatrix exifGetMatrix(const QString &file, int o = -1); + TQWMatrix exifGetMatrix(const TQString &file, int o = -1); }; #endif diff --git a/ksquirrel/sq_utils_scale.cpp b/ksquirrel/sq_utils_scale.cpp index d2742d1..ae80207 100644 --- a/ksquirrel/sq_utils_scale.cpp +++ b/ksquirrel/sq_utils_scale.cpp @@ -6,7 +6,7 @@ // ImageMagick code begin // ---------------------- -// This code is ImageMagick's resize code, adapted for QImage, with +// This code is ImageMagick's resize code, adapted for TQImage, with // fastfloat class added as an optimization. // The original license text follows. @@ -71,8 +71,8 @@ #endif #endif -#include <qimage.h> -#include <qcolor.h> +#include <tqimage.h> +#include <tqcolor.h> #include <kdeversion.h> #include <kcpuinfo.h> @@ -85,8 +85,8 @@ // everything in namespace namespace SQ_Utils { -#define Max QMAX -#define Min QMIN +#define Max TQMAX +#define Min TQMIN // mustn't be less than used precision (i.e. 1/fastfloat::RATIO) #define MagickEpsilon 0.0002 @@ -422,7 +422,7 @@ static fastfloat Triangle(const fastfloat x,const fastfloat) return(0.0); } -static void HorizontalFilter(const QImage& source,QImage& destination, +static void HorizontalFilter(const TQImage& source,TQImage& destination, const fastfloat x_factor,const fastfloat blur, ContributionInfo *contribution, Filter filter, fastfloat filtersupport) { @@ -491,23 +491,23 @@ static void HorizontalFilter(const QImage& source,QImage& destination, { int px = contribution[i].pixel; int py = y; - QRgb p = reinterpret_cast< QRgb* >( source.jumpTable()[ py ])[ px ]; - red+=contribution[i].weight*qRed(p); - green+=contribution[i].weight*qGreen(p); - blue+=contribution[i].weight*qBlue(p); - alpha+=contribution[i].weight*qAlpha(p); + TQRgb p = reinterpret_cast< TQRgb* >( const_cast<TQImage&>(source).jumpTable()[ py ])[ px ]; + red+=contribution[i].weight*tqRed(p); + green+=contribution[i].weight*tqGreen(p); + blue+=contribution[i].weight*tqBlue(p); + alpha+=contribution[i].weight*tqAlpha(p); } - QRgb pix = qRgba( + TQRgb pix = tqRgba( fasttolong( red < 0 ? 0 : red > 255 ? 255 : red + 0.5 ), fasttolong( green < 0 ? 0 : green > 255 ? 255 : green + 0.5 ), fasttolong( blue < 0 ? 0 : blue > 255 ? 255 : blue + 0.5 ), fasttolong( alpha < 0 ? 0 : alpha > 255 ? 255 : alpha + 0.5 )); - reinterpret_cast< QRgb* >( destination.jumpTable()[ y ])[ x ] = pix; + reinterpret_cast< TQRgb* >( const_cast<TQImage&>(destination).jumpTable()[ y ])[ x ] = pix; } } } -static void VerticalFilter(const QImage& source,QImage& destination, +static void VerticalFilter(const TQImage& source,TQImage& destination, const fastfloat y_factor,const fastfloat blur, ContributionInfo *contribution, Filter filter, fastfloat filtersupport ) { @@ -576,23 +576,23 @@ static void VerticalFilter(const QImage& source,QImage& destination, { int px = x; int py = contribution[i].pixel; - QRgb p = reinterpret_cast< QRgb* >( source.jumpTable()[ py ])[ px ]; - red+=contribution[i].weight*qRed(p); - green+=contribution[i].weight*qGreen(p); - blue+=contribution[i].weight*qBlue(p); - alpha+=contribution[i].weight*qAlpha(p); + TQRgb p = reinterpret_cast< TQRgb* >( const_cast<TQImage&>(source).jumpTable()[ py ])[ px ]; + red+=contribution[i].weight*tqRed(p); + green+=contribution[i].weight*tqGreen(p); + blue+=contribution[i].weight*tqBlue(p); + alpha+=contribution[i].weight*tqAlpha(p); } - QRgb pix = qRgba( + TQRgb pix = tqRgba( fasttolong( red < 0 ? 0 : red > 255 ? 255 : red + 0.5 ), fasttolong( green < 0 ? 0 : green > 255 ? 255 : green + 0.5 ), fasttolong( blue < 0 ? 0 : blue > 255 ? 255 : blue + 0.5 ), fasttolong( alpha < 0 ? 0 : alpha > 255 ? 255 : alpha + 0.5 )); - reinterpret_cast< QRgb* >( destination.jumpTable()[ y ])[ x ] = pix; + reinterpret_cast< TQRgb* >( const_cast<TQImage&>(destination).jumpTable()[ y ])[ x ] = pix; } } } -static QImage ResizeImage(const QImage& image,const int columns, +static TQImage ResizeImage(const TQImage& image,const int columns, const int rows, Filter filter, fastfloat filtersupport, double blur) { ContributionInfo @@ -610,7 +610,7 @@ static QImage ResizeImage(const QImage& image,const int columns, */ if ((columns == image.width()) && (rows == image.height()) && (blur == 1.0)) return image.copy(); - QImage resize_image( columns, rows, 32 ); + TQImage resize_image( columns, rows, 32 ); resize_image.setAlphaBuffer( image.hasAlphaBuffer()); /* Allocate filter contribution info. @@ -637,7 +637,7 @@ static QImage ResizeImage(const QImage& image,const int columns, if (((fastfloat) columns*(image.height()+rows)) > ((fastfloat) rows*(image.width()+columns))) { - QImage source_image( columns, image.height(), 32 ); + TQImage source_image( columns, image.height(), 32 ); source_image.setAlphaBuffer( image.hasAlphaBuffer()); HorizontalFilter(image,source_image,x_factor,blur, contribution,filter,filtersupport); @@ -646,7 +646,7 @@ static QImage ResizeImage(const QImage& image,const int columns, } else { - QImage source_image( image.width(), rows, 32 ); + TQImage source_image( image.width(), rows, 32 ); source_image.setAlphaBuffer( image.hasAlphaBuffer()); VerticalFilter(image,source_image,y_factor,blur, contribution,filter,filtersupport); @@ -723,7 +723,7 @@ static QImage ResizeImage(const QImage& image,const int columns, % % */ -QImage SampleImage(const QImage& image,const int columns, +TQImage SampleImage(const TQImage& image,const int columns, const int rows) { int @@ -755,7 +755,7 @@ QImage SampleImage(const QImage& image,const int columns, // 32bit like the ImageMagick original. This avoids the relatively // expensive conversion. const int d = image.depth() / 8; - QImage sample_image( columns, rows, image.depth()); + TQImage sample_image( columns, rows, image.depth()); sample_image.setAlphaBuffer( image.hasAlphaBuffer()); /* Allocate scan line buffer and column offset buffers. @@ -768,7 +768,7 @@ QImage SampleImage(const QImage& image,const int columns, */ // In the following several code 0.5 needs to be added, otherwise the image // would be moved by half a pixel to bottom-right, just like -// with Qt's QImage::scale() +// with TQt's TQImage::scale() for (x=0; x < (long) sample_image.width(); x++) { x_offset[x]=int((x+0.5)*image.width()/sample_image.width()); @@ -807,7 +807,7 @@ QImage SampleImage(const QImage& image,const int columns, case 4: // 32bit for (x=0; x < (long) sample_image.width(); x++) { - *(QRgb*)q=((QRgb*)pixels)[ x_offset[x] ]; + *(TQRgb*)q=((TQRgb*)pixels)[ x_offset[x] ]; q += d; } break; @@ -847,11 +847,11 @@ QImage SampleImage(const QImage& image,const int columns, /** * This is the normal smoothscale method, based on Imlib2's smoothscale. * - * Originally I took the algorithm used in NetPBM and Qt and added MMX/3dnow - * optimizations. It ran in about 1/2 the time as Qt. Then I ported Imlib's + * Originally I took the algorithm used in NetPBM and TQt and added MMX/3dnow + * optimizations. It ran in about 1/2 the time as TQt. Then I ported Imlib's * C algorithm and it ran at about the same speed as my MMX optimized one... * Finally I ported Imlib's MMX version and it ran in less than half the - * time as my MMX algorithm, (taking only a quarter of the time Qt does). + * time as my MMX algorithm, (taking only a quarter of the time TQt does). * * Changes include formatting, namespaces and other C++'ings, removal of old * #ifdef'ed code, and removal of unneeded border calculation code. @@ -932,7 +932,7 @@ namespace MImageScale{ int* mimageCalcXPoints(int sw, int dw); int* mimageCalcApoints(int s, int d, int up); MImageScaleInfo* mimageFreeScaleInfo(MImageScaleInfo *isi); - MImageScaleInfo *mimageCalcScaleInfo(QImage &img, int sw, int sh, + MImageScaleInfo *mimageCalcScaleInfo(TQImage &img, int sw, int sh, int dw, int dh, char aa, int sow); void mimageSampleRGBA(MImageScaleInfo *isi, unsigned int *dest, int dxx, int dyy, int dx, int dy, int dw, int dh, int dow); @@ -942,7 +942,7 @@ namespace MImageScale{ void mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, int dxx, int dyy, int dx, int dy, int dw, int dh, int dow, int sow); - QImage smoothScale(const QImage& img, int dw, int dh); + TQImage smoothScale(const TQImage& img, int dw, int dh); } #ifdef HAVE_X86_MMX @@ -956,14 +956,14 @@ extern "C" { using namespace MImageScale; -QImage MImageScale::smoothScale(const QImage& image, int dw, int dh) +TQImage MImageScale::smoothScale(const TQImage& image, int dw, int dh) { - QImage img = image.depth() < 32 ? image.convertDepth( 32 ) : image; + TQImage img = image.depth() < 32 ? image.convertDepth( 32 ) : image; int w = img.width(); int h = img.height(); int sow = img.bytesPerLine(); - // handle CroppedQImage + // handle CroppedTQImage if( img.height() > 1 && sow != img.scanLine( 1 ) - img.scanLine( 0 )) sow = img.scanLine( 1 ) - img.scanLine( 0 ); sow = sow / ( img.depth() / 8 ); @@ -971,9 +971,9 @@ QImage MImageScale::smoothScale(const QImage& image, int dw, int dh) MImageScaleInfo *scaleinfo = mimageCalcScaleInfo(img, w, h, dw, dh, true, sow); if(!scaleinfo) - return QImage(); + return TQImage(); - QImage buffer(dw, dh, 32); + TQImage buffer(dw, dh, 32); buffer.setAlphaBuffer(img.hasAlphaBuffer()); #ifdef HAVE_X86_MMX @@ -1138,7 +1138,7 @@ MImageScaleInfo* MImageScale::mimageFreeScaleInfo(MImageScaleInfo *isi) return(NULL); } -MImageScaleInfo* MImageScale::mimageCalcScaleInfo(QImage &img, int sw, int sh, +MImageScaleInfo* MImageScale::mimageCalcScaleInfo(TQImage &img, int sw, int sh, int dw, int dh, char aa, int sow) { MImageScaleInfo *isi; @@ -1249,7 +1249,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, g = ((gg * YAP) + (g * INV_YAP)) >> 16; b = ((bb * YAP) + (b * INV_YAP)) >> 16; a = ((aa * YAP) + (a * INV_YAP)) >> 16; - *dptr++ = qRgba(r, g, b, a); + *dptr++ = tqRgba(r, g, b, a); } else{ pix = ypoints[dyy + y] + xpoints[x]; @@ -1266,7 +1266,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, g >>= 8; b >>= 8; a >>= 8; - *dptr++ = qRgba(r, g, b, a); + *dptr++ = tqRgba(r, g, b, a); } } } @@ -1290,7 +1290,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, g >>= 8; b >>= 8; a >>= 8; - *dptr++ = qRgba(r, g, b, a); + *dptr++ = tqRgba(r, g, b, a); } else *dptr++ = sptr[xpoints[x] ]; @@ -1367,7 +1367,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, b >>= 4; a >>= 4; } - *dptr = qRgba(r, g, b, a); + *dptr = tqRgba(r, g, b, a); dptr++; } } @@ -1441,7 +1441,7 @@ void MImageScale::mimageScaleAARGBA(MImageScaleInfo *isi, unsigned int *dest, b >>= 4; a >>= 4; } - *dptr = qRgba(r, g, b, a); + *dptr = tqRgba(r, g, b, a); dptr++; } } @@ -1605,7 +1605,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, r = ((rr * YAP) + (r * INV_YAP)) >> 16; g = ((gg * YAP) + (g * INV_YAP)) >> 16; b = ((bb * YAP) + (b * INV_YAP)) >> 16; - *dptr++ = qRgba(r, g, b, 0xff); + *dptr++ = tqRgba(r, g, b, 0xff); } else{ pix = ypoints[dyy + y] + xpoints[x]; @@ -1619,7 +1619,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, r >>= 8; g >>= 8; b >>= 8; - *dptr++ = qRgba(r, g, b, 0xff); + *dptr++ = tqRgba(r, g, b, 0xff); } } } @@ -1640,7 +1640,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, r >>= 8; g >>= 8; b >>= 8; - *dptr++ = qRgba(r, g, b, 0xff); + *dptr++ = tqRgba(r, g, b, 0xff); } else *dptr++ = sptr[xpoints[x] ]; @@ -1708,7 +1708,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, g >>= 4; b >>= 4; } - *dptr = qRgba(r, g, b, 0xff); + *dptr = tqRgba(r, g, b, 0xff); dptr++; } } @@ -1773,7 +1773,7 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, g >>= 4; b >>= 4; } - *dptr = qRgba(r, g, b, 0xff); + *dptr = tqRgba(r, g, b, 0xff); dptr++; } } @@ -1877,14 +1877,14 @@ void MImageScale::mimageScaleAARGB(MImageScaleInfo *isi, unsigned int *dest, // Imlib2/Mosfet code end -QImage scale(const QImage& image, int width, int height, - SmoothAlgorithm alg, QImage::ScaleMode mode, double blur ) +TQImage scale(const TQImage& image, int width, int height, + SmoothAlgorithm alg, TQ_ScaleMode mode, double blur ) { if( image.isNull()) return image.copy(); - QSize newSize( image.size() ); - newSize.scale( QSize( width, height ), (QSize::ScaleMode)mode ); // ### remove cast in Qt 4.0 - newSize = newSize.expandedTo( QSize( 1, 1 )); // make sure it doesn't become null + TQSize newSize( image.size() ); + newSize.tqscale( TQSize( width, height ), (TQSize::ScaleMode)mode ); // ### remove cast in TQt 4.0 + newSize = newSize.expandedTo( TQSize( 1, 1 )); // make sure it doesn't become null if ( newSize == image.size() ) return image.copy(); @@ -1926,7 +1926,7 @@ QImage scale(const QImage& image, int width, int height, } return ResizeImage( image.convertDepth( 32 ), width, height, filter, filtersupport, blur ); - // unlike Qt's smoothScale() this function introduces new colors to grayscale images ... oh well + // unlike TQt's smoothScale() this function introduces new colors to grayscale images ... oh well } diff --git a/ksquirrel/sq_viewcache.ui b/ksquirrel/sq_viewcache.ui index f8b9aa7..dc87d83 100644 --- a/ksquirrel/sq_viewcache.ui +++ b/ksquirrel/sq_viewcache.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>SQ_ViewCache</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>SQ_ViewCache</cstring> </property> @@ -25,7 +25,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="3" column="2"> + <widget class="TQPushButton" row="3" column="2"> <property name="name"> <cstring>pushButton1</cstring> </property> @@ -33,7 +33,7 @@ <string>Close</string> </property> </widget> - <widget class="QListView" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQListView" row="0" column="0" rowspan="1" colspan="3"> <column> <property name="text"> <string>Name</string> @@ -94,33 +94,33 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget" row="3" column="0"> + <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string><b>Total:</b></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textTotal</cstring> </property> <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -134,7 +134,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -164,5 +164,5 @@ <functions> <function access="private" specifier="non virtual">init()</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/ksquirrel/sq_viewcache.ui.h b/ksquirrel/sq_viewcache.ui.h index fa7dc8a..5066e05 100644 --- a/ksquirrel/sq_viewcache.ui.h +++ b/ksquirrel/sq_viewcache.ui.h @@ -2,26 +2,26 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ void SQ_ViewCache::init() { - textTotal->setText(QString("<b>%1</b>").arg((int)SQ_PixmapCache::instance()->count())); + textTotal->setText(TQString("<b>%1</b>").tqarg((int)SQ_PixmapCache::instance()->count())); if(SQ_PixmapCache::instance()->isEmpty()) return; listCache->setSorting(-1); - QListViewItem *itemafter = 0, *item; + TQListViewItem *itemafter = 0, *item; SQ_PixmapCache::iterator itEnd = SQ_PixmapCache::instance()->end(); SQ_Thumbnail th; KURL url; - QString s; + TQString s; for(SQ_PixmapCache::iterator it = SQ_PixmapCache::instance()->begin();it != itEnd;++it) { @@ -30,11 +30,11 @@ void SQ_ViewCache::init() s = url.isLocalFile() ? url.path() : url.prettyURL(); if(itemafter) - item = new QListViewItem(listCache, itemafter, s, - QString::null, QString::fromLatin1("%1x%2").arg(th.w).arg(th.h)); + item = new TQListViewItem(listCache, itemafter, s, + TQString(), TQString::tqfromLatin1("%1x%2").tqarg(th.w).tqarg(th.h)); else - item = new QListViewItem(listCache, s, - QString::null, QString::fromLatin1("%1x%2").arg(th.w).arg(th.h)); + item = new TQListViewItem(listCache, s, + TQString(), TQString::tqfromLatin1("%1x%2").tqarg(th.w).tqarg(th.h)); item->setPixmap(1, it.data().mime); diff --git a/ksquirrel/sq_widgetstack.cpp b/ksquirrel/sq_widgetstack.cpp index 6f21e2f..6394a93 100644 --- a/ksquirrel/sq_widgetstack.cpp +++ b/ksquirrel/sq_widgetstack.cpp @@ -19,12 +19,12 @@ #include "config.h" #endif -#include <qlabel.h> -#include <qbuttongroup.h> -#include <qpushbutton.h> -#include <qtoolbutton.h> -#include <qtimer.h> -#include <qapplication.h> +#include <tqlabel.h> +#include <tqbuttongroup.h> +#include <tqpushbutton.h> +#include <tqtoolbutton.h> +#include <tqtimer.h> +#include <tqapplication.h> #include <kaction.h> #include <kcombobox.h> @@ -60,7 +60,7 @@ SQ_WidgetStack * SQ_WidgetStack::m_instance = 0; -SQ_WidgetStack::SQ_WidgetStack(QWidget *parent, const int id) : QObject(parent) +SQ_WidgetStack::SQ_WidgetStack(TQWidget *tqparent, const int id) : TQObject(tqparent) { m_instance = this; @@ -76,7 +76,7 @@ SQ_WidgetStack::SQ_WidgetStack(QWidget *parent, const int id) : QObject(parent) switch(SQ_Config::instance()->readNumEntry("set path", 0)) { case 0: url = KURL::fromPathOrURL(SQ_Config::instance()->readEntry("last visited", "/")); break; - case 1: url = KURL::fromPathOrURL(QDir::current().path()); break; + case 1: url = KURL::fromPathOrURL(TQDir::current().path()); break; case 2: url = KURL::fromPathOrURL(SQ_Config::instance()->readEntry("custom directory", "/")); break; default: url = KURL::fromPathOrURL("/"); @@ -85,17 +85,17 @@ SQ_WidgetStack::SQ_WidgetStack(QWidget *parent, const int id) : QObject(parent) else // path from command line url = SQ_HLOptions::instance()->dir; - dirop = new SQ_DirOperator(url, static_cast<SQ_DirOperator::ViewT>(id), parent); + dirop = new SQ_DirOperator(url, static_cast<SQ_DirOperator::ViewT>(id), tqparent); raiseWidget(m_type, false); - connect(KSquirrel::app(), SIGNAL(thumbSizeChanged(const QString&)), dirop, SLOT(slotSetThumbSize(const QString&))); - connect(dirop, SIGNAL(runSeparately(KFileItem *)), this, SLOT(slotRunSeparately())); + connect(KSquirrel::app(), TQT_SIGNAL(thumbSizeChanged(const TQString&)), dirop, TQT_SLOT(slotSetThumbSize(const TQString&))); + connect(dirop, TQT_SIGNAL(runSeparately(KFileItem *)), this, TQT_SLOT(slotRunSeparately())); KSquirrel::app()->historyCombo()->setEditText(url.isLocalFile() ? url.path() : url.prettyURL()); - timerShowProgress = new QTimer(this); - connect(timerShowProgress, SIGNAL(timeout()), this, SLOT(slotDelayedShowProgress())); + timerShowProgress = new TQTimer(this); + connect(timerShowProgress, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDelayedShowProgress())); } SQ_WidgetStack::~SQ_WidgetStack() @@ -116,8 +116,8 @@ void SQ_WidgetStack::init() fileaction = static_cast<SQ_WidgetStack::FileAction>(SQ_Config::instance()->readNumEntry("last_action", SQ_WidgetStack::Unknown)); KURL uu = KURL::fromPathOrURL(SQ_Config::instance()->readEntry("last_url")); - connect(SQ_NavigatorDropMenu::instance(), SIGNAL(done(const KURL &, int)), - this, SLOT(slotTreeMenuDone(const KURL &, int))); + connect(SQ_NavigatorDropMenu::instance(), TQT_SIGNAL(done(const KURL &, int)), + this, TQT_SLOT(slotTreeMenuDone(const KURL &, int))); emitNewLastURL(uu); } @@ -211,7 +211,7 @@ int SQ_WidgetStack::moveTo(Direction direction, KFileItem *it, bool useSupported /* * Set filter. */ -void SQ_WidgetStack::setNameFilter(const QString &f) +void SQ_WidgetStack::setNameFilter(const TQString &f) { dirop->setNameFilter(f); dirop->actionCollection()->action("reload")->activate(); @@ -220,7 +220,7 @@ void SQ_WidgetStack::setNameFilter(const QString &f) /* * Get current filter. */ -QString SQ_WidgetStack::nameFilter() const +TQString SQ_WidgetStack::nameFilter() const { return dirop->nameFilter(); } @@ -433,7 +433,7 @@ void SQ_WidgetStack::thumbnailProcess() tv->progressBox()->advance(); } -void SQ_WidgetStack::setURLForCurrent(const QString &path, bool parseTree) +void SQ_WidgetStack::setURLForCurrent(const TQString &path, bool parseTree) { KURL url = KURL::fromPathOrURL(path); @@ -481,7 +481,7 @@ void SQ_WidgetStack::slotRecreateThumbnail() tv->progressBox()->show(); - QTimer::singleShot(1, this, SLOT(slotDelayedRecreateThumbnail())); + TQTimer::singleShot(1, this, TQT_SLOT(slotDelayedRecreateThumbnail())); } void SQ_WidgetStack::slotDelayedRecreateThumbnail() @@ -566,7 +566,7 @@ void SQ_WidgetStack::slotFilePaste() // now copy or move files to current url job = (fileaction == SQ_WidgetStack::Copy) ? KIO::copy(files, _url) : KIO::move(files, _url); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotJobResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotJobResult(KIO::Job *))); } void SQ_WidgetStack::slotJobResult(KIO::Job *job) @@ -578,16 +578,16 @@ void SQ_WidgetStack::slotJobResult(KIO::Job *job) void SQ_WidgetStack::emitNewLastURL(const KURL &u) { lastURL = u; - QString text; + TQString text; - QString targ = KStringHandler::csqueeze(u.isLocalFile() ? u.path() : u.prettyURL(), 25); + TQString targ = KStringHandler::csqueeze(u.isLocalFile() ? u.path() : u.prettyURL(), 25); if(fileaction == SQ_WidgetStack::Copy) - text = i18n("Repeat (copy to %1)").arg(targ); + text = i18n("Repeat (copy to %1)").tqarg(targ); else if(fileaction == SQ_WidgetStack::Cut) - text = i18n("Repeat (move to %1)").arg(targ); + text = i18n("Repeat (move to %1)").tqarg(targ); else if(fileaction == SQ_WidgetStack::Link) - text = i18n("Repeat (link to %1)").arg(targ); + text = i18n("Repeat (link to %1)").tqarg(targ); if(!text.isEmpty()) emit newLastURL(text); @@ -605,7 +605,7 @@ void SQ_WidgetStack::repeat() return; KIO::Job *job = (fileaction == SQ_WidgetStack::Copy) ? KIO::copy(files, lastURL) : KIO::move(files, lastURL); - connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotJobResult(KIO::Job *))); + connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotJobResult(KIO::Job *))); } // Create links @@ -684,7 +684,7 @@ void SQ_WidgetStack::slotDeselectGroup() */ void SQ_WidgetStack::selectDeselectGroup(bool select) { - QString mask; + TQString tqmask; KFileView *local = dirop->view(); @@ -693,14 +693,14 @@ void SQ_WidgetStack::selectDeselectGroup(bool select) sd.setCaption(select ? i18n("Select a group of files") : i18n("Deselect a group of files")); sd.pushMask->setText(select ? i18n("Select !") : i18n("Deselect !")); - if(sd.exec(mask) == QDialog::Accepted) + if(sd.exec(tqmask) == TQDialog::Accepted) { if(select) local->clearSelection(); KFileItemList *sd_files = const_cast<KFileItemList *>(items()); KFileItem *i; - QRegExp exp(mask); + TQRegExp exp(tqmask); exp.setWildcard(true); if(!sd_files) @@ -751,7 +751,7 @@ void SQ_WidgetStack::slotSelectAll() } } -KAction* SQ_WidgetStack::action(const QString &name) +KAction* SQ_WidgetStack::action(const TQString &name) { return dirop->actionCollection()->action(name); } diff --git a/ksquirrel/sq_widgetstack.h b/ksquirrel/sq_widgetstack.h index 98847d3..65d910f 100644 --- a/ksquirrel/sq_widgetstack.h +++ b/ksquirrel/sq_widgetstack.h @@ -18,8 +18,8 @@ #ifndef SQ_WIDGETSTACK_H #define SQ_WIDGETSTACK_H -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include <kurl.h> #include <kfileitem.h> @@ -28,7 +28,7 @@ namespace KIO { class Job; } -class QTimer; +class TQTimer; class KAction; class KToggleAction; @@ -41,9 +41,10 @@ class KFileView; * updates, selecting/deselecting files with +/- etc. */ -class SQ_WidgetStack : public QObject +class SQ_WidgetStack : public TQObject { Q_OBJECT + TQ_OBJECT public: /* @@ -54,7 +55,7 @@ class SQ_WidgetStack : public QObject * 2 = Detail view * 3 = Thumbnail view */ - SQ_WidgetStack(QWidget *parent, const int id); + SQ_WidgetStack(TQWidget *tqparent, const int id); ~SQ_WidgetStack(); @@ -106,7 +107,7 @@ class SQ_WidgetStack : public QObject /* * Quick access to SQ_DirOperator::actionCollection::action() */ - KAction *action(const QString &name); + KAction *action(const TQString &name); /* * Select first supported image in current directory. @@ -147,7 +148,7 @@ class SQ_WidgetStack : public QObject void setURL(const KURL &, bool = true); signals: - void newLastURL(const QString &); + void newLastURL(const TQString &); public slots: /* @@ -164,7 +165,7 @@ class SQ_WidgetStack : public QObject /* * Set filter. */ - void setNameFilter(const QString&); + void setNameFilter(const TQString&); /* * Used by SQ_FileThumbView to manipulate thumbnail progress. @@ -177,7 +178,7 @@ class SQ_WidgetStack : public QObject /* * Set url */ - void setURLForCurrent(const QString &, bool parseTree = true); + void setURLForCurrent(const TQString &, bool parseTree = true); void setURLForCurrent(const KURL &, bool parseTree = true); void slotRunSeparately(); @@ -191,7 +192,7 @@ class SQ_WidgetStack : public QObject /* * Get current filter. */ - QString nameFilter() const; + TQString nameFilter() const; /* * Slots for file actions: copy, move, cut... @@ -233,7 +234,7 @@ class SQ_WidgetStack : public QObject */ SQ_DirOperator *dirop; - QTimer *timerShowProgress; + TQTimer *timerShowProgress; KURL::List files; // files to copy, move or link KURL lastURL; FileAction fileaction; |