diff options
Diffstat (limited to 'src/kvilib/tal')
54 files changed, 1227 insertions, 1199 deletions
diff --git a/src/kvilib/tal/kvi_tal_application.cpp b/src/kvilib/tal/kvi_tal_application.cpp index 4d8bd0d5..b78e1567 100644 --- a/src/kvilib/tal/kvi_tal_application.cpp +++ b/src/kvilib/tal/kvi_tal_application.cpp @@ -56,7 +56,7 @@ #else KviTalApplication::KviTalApplication(int &argc,char ** argv) - : QApplication(argc,argv) + : TQApplication(argc,argv) { } diff --git a/src/kvilib/tal/kvi_tal_application_kde.h b/src/kvilib/tal/kvi_tal_application_kde.h index 05d6e87f..c3149e3d 100644 --- a/src/kvilib/tal/kvi_tal_application_kde.h +++ b/src/kvilib/tal/kvi_tal_application_kde.h @@ -29,6 +29,7 @@ class KVILIB_API KviTalApplication : public KApplication { Q_OBJECT + TQ_OBJECT public: KviTalApplication(int &argc,char ** argv); ~KviTalApplication(); diff --git a/src/kvilib/tal/kvi_tal_application_qt.h b/src/kvilib/tal/kvi_tal_application_qt.h index 953608fe..96ff1dbb 100644 --- a/src/kvilib/tal/kvi_tal_application_qt.h +++ b/src/kvilib/tal/kvi_tal_application_qt.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_APPLICATION_QT_H_ -#define _KVI_TAL_APPLICATION_QT_H_ +#ifndef _KVI_TAL_APPLICATION_TQT_H_ +#define _KVI_TAL_APPLICATION_TQT_H_ // // File : kvi_tal_application_qt.h @@ -23,15 +23,16 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include <qapplication.h> +#include <tqapplication.h> -class KVILIB_API KviTalApplication : public QApplication +class KVILIB_API KviTalApplication : public TQApplication { Q_OBJECT + TQ_OBJECT public: KviTalApplication(int &argc,char ** argv); ~KviTalApplication(); }; -#endif // _KVI_TAL_APPLICATION_QT_H_ +#endif // _KVI_TAL_APPLICATION_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_filedialog.cpp b/src/kvilib/tal/kvi_tal_filedialog.cpp index b345fd0b..5760a90c 100644 --- a/src/kvilib/tal/kvi_tal_filedialog.cpp +++ b/src/kvilib/tal/kvi_tal_filedialog.cpp @@ -29,10 +29,10 @@ #ifdef COMPILE_USE_QT4 - #include <qdir.h> + #include <tqdir.h> - KviTalFileDialog::KviTalFileDialog(const QString &dirName,const QString &filter,QWidget *parent,const char *name,bool modal) - : QFileDialog(parent,"",dirName,filter) + KviTalFileDialog::KviTalFileDialog(const TQString &dirName,const TQString &filter,TQWidget *tqparent,const char *name,bool modal) + : TQFileDialog(tqparent,"",dirName,filter) { setModal(modal); } @@ -46,29 +46,29 @@ switch(m) { case AnyFile: - QFileDialog::setFileMode(QFileDialog::AnyFile); + TQFileDialog::setFileMode(TQFileDialog::AnyFile); break; case ExistingFile: - QFileDialog::setFileMode(QFileDialog::ExistingFile); + TQFileDialog::setFileMode(TQFileDialog::ExistingFile); break; case ExistingFiles: - QFileDialog::setFileMode(QFileDialog::ExistingFiles); + TQFileDialog::setFileMode(TQFileDialog::ExistingFiles); break; case Directory: - QFileDialog::setFileMode(QFileDialog::Directory); + TQFileDialog::setFileMode(TQFileDialog::Directory); break; case DirectoryOnly: - QFileDialog::setFileMode(QFileDialog::DirectoryOnly); + TQFileDialog::setFileMode(TQFileDialog::DirectoryOnly); break; default: - QFileDialog::setFileMode(QFileDialog::AnyFile); + TQFileDialog::setFileMode(TQFileDialog::AnyFile); break; } } - void KviTalFileDialog::setDirectory(const QString &szDirectory) + void KviTalFileDialog::setDirectory(const TQString &szDirectory) { - QFileDialog::setDirectory(szDirectory); + TQFileDialog::setDirectory(szDirectory); } @@ -78,8 +78,8 @@ #ifdef COMPILE_KDE_SUPPORT - KviTalFileDialog::KviTalFileDialog(const QString &dirName,const QString &filter,QWidget *parent,const char *name,bool modal) - : KFileDialog(dirName,filter,parent,name,modal) + KviTalFileDialog::KviTalFileDialog(const TQString &dirName,const TQString &filter,TQWidget *tqparent,const char *name,bool modal) + : KFileDialog(dirName,filter,tqparent,name,modal) { clearWFlags(WDestructiveClose); } @@ -117,7 +117,7 @@ } } - void KviTalFileDialog::setDirectory(const QString &szDirectory) + void KviTalFileDialog::setDirectory(const TQString &szDirectory) { setURL(szDirectory); } @@ -127,10 +127,10 @@ #else - #include <qdir.h> + #include <tqdir.h> - KviTalFileDialog::KviTalFileDialog(const QString &dirName,const QString &filter,QWidget *parent,const char *name,bool modal) - : QFileDialog(dirName,filter,parent,name,modal) + KviTalFileDialog::KviTalFileDialog(const TQString &dirName,const TQString &filter,TQWidget *tqparent,const char *name,bool modal) + : TQFileDialog(dirName,filter,tqparent,name,modal) { clearWFlags(WDestructiveClose); } @@ -144,29 +144,29 @@ switch(m) { case AnyFile: - setMode(QFileDialog::AnyFile); + setMode(TQFileDialog::AnyFile); break; case ExistingFile: - setMode(QFileDialog::ExistingFile); + setMode(TQFileDialog::ExistingFile); break; case ExistingFiles: - setMode(QFileDialog::ExistingFiles); + setMode(TQFileDialog::ExistingFiles); break; case Directory: - setMode(QFileDialog::Directory); + setMode(TQFileDialog::Directory); break; case DirectoryOnly: - setMode(QFileDialog::DirectoryOnly); + setMode(TQFileDialog::DirectoryOnly); break; default: - setMode(QFileDialog::AnyFile); + setMode(TQFileDialog::AnyFile); break; } } - void KviTalFileDialog::setDirectory(const QString &szDirectory) + void KviTalFileDialog::setDirectory(const TQString &szDirectory) { - setDir(QDir(szDirectory)); + setDir(TQDir(szDirectory)); } diff --git a/src/kvilib/tal/kvi_tal_filedialog_kde.h b/src/kvilib/tal/kvi_tal_filedialog_kde.h index 0f04a80c..5285aa16 100644 --- a/src/kvilib/tal/kvi_tal_filedialog_kde.h +++ b/src/kvilib/tal/kvi_tal_filedialog_kde.h @@ -24,26 +24,27 @@ // #include <kfiledialog.h> -#include <qfiledialog.h> +#include <tqfiledialog.h> class KVILIB_API KviTalFileDialog : public KFileDialog { Q_OBJECT + TQ_OBJECT public: - KviTalFileDialog(const QString &dirName,const QString &filter = QString::null,QWidget *parent = 0,const char *name = 0,bool modal = FALSE); + KviTalFileDialog(const TQString &dirName,const TQString &filter = TQString(),TQWidget *tqparent = 0,const char *name = 0,bool modal = FALSE); ~KviTalFileDialog(); public: enum FileMode { AnyFile, ExistingFile, ExistingFiles, Directory, DirectoryOnly }; void setFileMode(FileMode m); - void setDirectory(const QString &szDirectory); + void setDirectory(const TQString &szDirectory); - static QString getExistingDirectoryPath(const QString &dir = QString::null,const QString &caption = QString::null,QWidget *parent = 0) + static TQString getExistingDirectoryPath(const TQString &dir = TQString(),const TQString &caption = TQString(),TQWidget *tqparent = 0) { - // QFileDialog allows making new directories...kfiledialog not :/ - return QFileDialog::getExistingDirectory(dir,parent,0,caption); - //return getExistingDirectory(dir,parent,caption); + // TQFileDialog allows making new directories...kfiledialog not :/ + return TQFileDialog::getExistingDirectory(dir,tqparent,0,caption); + //return getExistingDirectory(dir,tqparent,caption); }; }; diff --git a/src/kvilib/tal/kvi_tal_filedialog_qt.h b/src/kvilib/tal/kvi_tal_filedialog_qt.h index 14a24854..0eebfc61 100644 --- a/src/kvilib/tal/kvi_tal_filedialog_qt.h +++ b/src/kvilib/tal/kvi_tal_filedialog_qt.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_FILEDIALOG_QT_H_ -#define _KVI_TAL_FILEDIALOG_QT_H_ +#ifndef _KVI_TAL_FILEDIALOG_TQT_H_ +#define _KVI_TAL_FILEDIALOG_TQT_H_ // // File : kvi_tal_filedialog_qt.h @@ -23,22 +23,23 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include <qfiledialog.h> +#include <tqfiledialog.h> -class KVILIB_API KviTalFileDialog : public QFileDialog +class KVILIB_API KviTalFileDialog : public TQFileDialog { Q_OBJECT + TQ_OBJECT public: - KviTalFileDialog(const QString &dirName,const QString &filter = QString::null,QWidget *parent = 0,const char *name = 0,bool modal = FALSE); + KviTalFileDialog(const TQString &dirName,const TQString &filter = TQString(),TQWidget *tqparent = 0,const char *name = 0,bool modal = FALSE); ~KviTalFileDialog(); public: enum FileMode { AnyFile, ExistingFile, ExistingFiles, Directory, DirectoryOnly }; void setFileMode(FileMode m); - void setDirectory(const QString &szDirectory); + void setDirectory(const TQString &szDirectory); - static QString getExistingDirectoryPath(const QString &dir = QString::null,const QString &caption = QString::null,QWidget *parent = 0) - { return getExistingDirectory(dir,parent,0 /* name */,caption); }; + static TQString getExistingDirectoryPath(const TQString &dir = TQString(),const TQString &caption = TQString(),TQWidget *tqparent = 0) + { return getExistingDirectory(dir,tqparent,0 /* name */,caption); }; }; -#endif // _KVI_TAL_FILEDIALOG_QT_H_ +#endif // _KVI_TAL_FILEDIALOG_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_filedialog_qt4.h b/src/kvilib/tal/kvi_tal_filedialog_qt4.h index eb5f7ab6..18bb420e 100644 --- a/src/kvilib/tal/kvi_tal_filedialog_qt4.h +++ b/src/kvilib/tal/kvi_tal_filedialog_qt4.h @@ -25,22 +25,23 @@ // //============================================================================= -#include <qfiledialog.h> +#include <tqfiledialog.h> -class KVILIB_API KviTalFileDialog : public QFileDialog +class KVILIB_API KviTalFileDialog : public TQFileDialog { Q_OBJECT + TQ_OBJECT public: - KviTalFileDialog(const QString &dirName,const QString &filter = QString::null,QWidget *parent = 0,const char *name = 0,bool modal = FALSE); + KviTalFileDialog(const TQString &dirName,const TQString &filter = TQString(),TQWidget *tqparent = 0,const char *name = 0,bool modal = FALSE); ~KviTalFileDialog(); public: enum FileMode { AnyFile, ExistingFile, ExistingFiles, Directory, DirectoryOnly }; void setFileMode(FileMode m); - void setDirectory(const QString &szDirectory); + void setDirectory(const TQString &szDirectory); - static QString getExistingDirectoryPath(const QString &dir = QString::null,const QString &caption = QString::null,QWidget *parent = 0) - { return getExistingDirectory(parent,caption,dir); }; + static TQString getExistingDirectoryPath(const TQString &dir = TQString(),const TQString &caption = TQString(),TQWidget *tqparent = 0) + { return getExistingDirectory(tqparent,caption,dir); }; }; -#endif // _KVI_TAL_FILEDIALOG_QT_H_ +#endif // _KVI_TAL_FILEDIALOG_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_grid_qt3.h b/src/kvilib/tal/kvi_tal_grid_qt3.h index fd77d15c..80ab6387 100644 --- a/src/kvilib/tal/kvi_tal_grid_qt3.h +++ b/src/kvilib/tal/kvi_tal_grid_qt3.h @@ -25,14 +25,15 @@ // //============================================================================= -#include <qgrid.h> +#include <tqgrid.h> -class KVILIB_API KviTalGrid : public QGrid +class KVILIB_API KviTalGrid : public TQGrid { Q_OBJECT + TQ_OBJECT public: - KviTalGrid(int n,Qt::Orientation orient,QWidget * pParent = 0) - : QGrid(n,orient,pParent) {}; + KviTalGrid(int n,Qt::Orientation orient,TQWidget * pParent = 0) + : TQGrid(n,orient,pParent) {}; ~KviTalGrid() {}; }; diff --git a/src/kvilib/tal/kvi_tal_grid_qt4.h b/src/kvilib/tal/kvi_tal_grid_qt4.h index 57612b3c..c117ec17 100644 --- a/src/kvilib/tal/kvi_tal_grid_qt4.h +++ b/src/kvilib/tal/kvi_tal_grid_qt4.h @@ -27,13 +27,14 @@ #include "kvi_settings.h" -#include <q3grid.h> +#include <tq3grid.h> class KVILIB_API KviTalGrid : public Q3Grid { Q_OBJECT + TQ_OBJECT public: - KviTalGrid(int n,Qt::Orientation orient,QWidget * pParent = 0) + KviTalGrid(int n,Qt::Orientation orient,TQWidget * pParent = 0) : Q3Grid(n,orient,pParent) {}; ~KviTalGrid() {}; }; diff --git a/src/kvilib/tal/kvi_tal_groupbox_qt3.h b/src/kvilib/tal/kvi_tal_groupbox_qt3.h index be3340a3..12369208 100644 --- a/src/kvilib/tal/kvi_tal_groupbox_qt3.h +++ b/src/kvilib/tal/kvi_tal_groupbox_qt3.h @@ -25,20 +25,21 @@ // //============================================================================= -#include <qgroupbox.h> +#include <tqgroupbox.h> -class KVILIB_API KviTalGroupBox : public QGroupBox +class KVILIB_API KviTalGroupBox : public TQGroupBox { Q_OBJECT + TQ_OBJECT public: - KviTalGroupBox(QWidget * parent = 0) - : QGroupBox(parent) {}; - KviTalGroupBox(const QString & title,QWidget * parent = 0) - : QGroupBox(title,parent) {}; - KviTalGroupBox(int strips,Qt::Orientation orientation,QWidget * parent = 0) - : QGroupBox(strips,orientation,parent) {}; - KviTalGroupBox(int strips,Qt::Orientation orientation,const QString & title,QWidget * parent = 0) - : QGroupBox(strips,orientation,title,parent) {}; + KviTalGroupBox(TQWidget * tqparent = 0) + : TQGroupBox(tqparent) {}; + KviTalGroupBox(const TQString & title,TQWidget * tqparent = 0) + : TQGroupBox(title,tqparent) {}; + KviTalGroupBox(int strips,Qt::Orientation orientation,TQWidget * tqparent = 0) + : TQGroupBox(strips,orientation,tqparent) {}; + KviTalGroupBox(int strips,Qt::Orientation orientation,const TQString & title,TQWidget * tqparent = 0) + : TQGroupBox(strips,orientation,title,tqparent) {}; ~KviTalGroupBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_groupbox_qt4.h b/src/kvilib/tal/kvi_tal_groupbox_qt4.h index c8917385..1b34de14 100644 --- a/src/kvilib/tal/kvi_tal_groupbox_qt4.h +++ b/src/kvilib/tal/kvi_tal_groupbox_qt4.h @@ -25,20 +25,21 @@ // //============================================================================= -#include <q3groupbox.h> +#include <tq3groupbox.h> class KVILIB_API KviTalGroupBox : public Q3GroupBox { Q_OBJECT + TQ_OBJECT public: - KviTalGroupBox(QWidget * parent = 0) - : Q3GroupBox(parent) {}; - KviTalGroupBox(const QString & title,QWidget * parent = 0) - : Q3GroupBox(title,parent) {}; - KviTalGroupBox(int strips,Qt::Orientation orientation,QWidget * parent = 0) - : Q3GroupBox(strips,orientation,parent) {}; - KviTalGroupBox(int strips,Qt::Orientation orientation,const QString & title,QWidget * parent = 0) - : Q3GroupBox(strips,orientation,title,parent) {}; + KviTalGroupBox(TQWidget * tqparent = 0) + : Q3GroupBox(tqparent) {}; + KviTalGroupBox(const TQString & title,TQWidget * tqparent = 0) + : Q3GroupBox(title,tqparent) {}; + KviTalGroupBox(int strips,Qt::Orientation orientation,TQWidget * tqparent = 0) + : Q3GroupBox(strips,orientation,tqparent) {}; + KviTalGroupBox(int strips,Qt::Orientation orientation,const TQString & title,TQWidget * tqparent = 0) + : Q3GroupBox(strips,orientation,title,tqparent) {}; ~KviTalGroupBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_hbox_qt3.h b/src/kvilib/tal/kvi_tal_hbox_qt3.h index 992ca03a..79d25b32 100644 --- a/src/kvilib/tal/kvi_tal_hbox_qt3.h +++ b/src/kvilib/tal/kvi_tal_hbox_qt3.h @@ -27,14 +27,15 @@ #include "kvi_settings.h" -#include <qhbox.h> +#include <tqhbox.h> -class KVILIB_API KviTalHBox : public QHBox +class KVILIB_API KviTalHBox : public TQHBox { Q_OBJECT + TQ_OBJECT public: - KviTalHBox(QWidget * pParent) - : QHBox(pParent) {}; + KviTalHBox(TQWidget * pParent) + : TQHBox(pParent) {}; virtual ~KviTalHBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_hbox_qt4.h b/src/kvilib/tal/kvi_tal_hbox_qt4.h index 384910c2..3ac5f426 100644 --- a/src/kvilib/tal/kvi_tal_hbox_qt4.h +++ b/src/kvilib/tal/kvi_tal_hbox_qt4.h @@ -27,13 +27,14 @@ #include "kvi_settings.h" -#include <q3hbox.h> +#include <tq3hbox.h> class KVILIB_API KviTalHBox : public Q3HBox { Q_OBJECT + TQ_OBJECT public: - KviTalHBox(QWidget * pParent,char* name=0) + KviTalHBox(TQWidget * pParent,char* name=0) : Q3HBox(pParent,name) {}; virtual ~KviTalHBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_iconview.cpp b/src/kvilib/tal/kvi_tal_iconview.cpp index 2f63388c..45b640fd 100644 --- a/src/kvilib/tal/kvi_tal_iconview.cpp +++ b/src/kvilib/tal/kvi_tal_iconview.cpp @@ -27,23 +27,23 @@ #ifdef COMPILE_USE_QT4 - KviTalIconView::KviTalIconView(QWidget * pParent,Qt::WFlags f) + KviTalIconView::KviTalIconView(TQWidget * pParent,TQt::WFlags f) : Q3IconView(pParent,0,f) { - connect(this,SIGNAL(selectionChanged(Q3IconViewItem *)),this,SLOT(redirect_selectionChanged(Q3IconViewItem *))); - connect(this,SIGNAL(currentChanged(Q3IconViewItem *)),this,SLOT(redirect_currentChanged(Q3IconViewItem *))); - connect(this,SIGNAL(clicked(Q3IconViewItem *)),this,SLOT(redirect_clicked(Q3IconViewItem *))); - connect(this,SIGNAL(clicked(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_clicked(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(pressed(Q3IconViewItem *)),this,SLOT(redirect_pressed(Q3IconViewItem *))); - connect(this,SIGNAL(pressed(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_pressed(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(doubleClicked(Q3IconViewItem *)),this,SLOT(redirect_doubleClicked(Q3IconViewItem *))); - connect(this,SIGNAL(returnPressed(Q3IconViewItem *)),this,SLOT(redirect_returnPressed(Q3IconViewItem *))); - connect(this,SIGNAL(rightButtonClicked(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_rightButtonClicked(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(rightButtonPressed(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_rightButtonPressed(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonClicked(int,Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonPressed(int,Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(contextMenuRequested(Q3IconViewItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(Q3IconViewItem *,const QPoint &))); - connect(this,SIGNAL(onItem(Q3IconViewItem *)),this,SLOT(redirect_onItem(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(selectionChanged(Q3IconViewItem *)),this,TQT_SLOT(redirect_selectionChanged(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(currentChanged(Q3IconViewItem *)),this,TQT_SLOT(redirect_currentChanged(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(clicked(Q3IconViewItem *)),this,TQT_SLOT(redirect_clicked(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(clicked(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(pressed(Q3IconViewItem *)),this,TQT_SLOT(redirect_pressed(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(pressed(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(doubleClicked(Q3IconViewItem *)),this,TQT_SLOT(redirect_doubleClicked(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(returnPressed(Q3IconViewItem *)),this,TQT_SLOT(redirect_returnPressed(Q3IconViewItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(rightButtonPressed(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(contextMenuRequested(Q3IconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(Q3IconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(onItem(Q3IconViewItem *)),this,TQT_SLOT(redirect_onItem(Q3IconViewItem *))); } void KviTalIconView::redirect_selectionChanged(Q3IconViewItem * pItem) @@ -61,7 +61,7 @@ emit clicked((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_clicked(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_clicked(Q3IconViewItem * pItem,const TQPoint &pnt) { emit clicked((KviTalIconViewItem *)pItem,pnt); } @@ -71,7 +71,7 @@ emit pressed((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_pressed(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_pressed(Q3IconViewItem * pItem,const TQPoint &pnt) { emit pressed((KviTalIconViewItem *)pItem,pnt); } @@ -86,27 +86,27 @@ emit returnPressed((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_rightButtonClicked(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_rightButtonClicked(Q3IconViewItem * pItem,const TQPoint &pnt) { emit rightButtonClicked((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_rightButtonPressed(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_rightButtonPressed(Q3IconViewItem * pItem,const TQPoint &pnt) { emit rightButtonPressed((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_mouseButtonClicked(int iButton,Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_mouseButtonClicked(int iButton,Q3IconViewItem * pItem,const TQPoint &pnt) { emit mouseButtonClicked(iButton,(KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_mouseButtonPressed(int iButton,Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_mouseButtonPressed(int iButton,Q3IconViewItem * pItem,const TQPoint &pnt) { emit mouseButtonPressed(iButton,(KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_contextMenuRequested(Q3IconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_contextMenuRequested(Q3IconViewItem * pItem,const TQPoint &pnt) { emit contextMenuRequested((KviTalIconViewItem *)pItem,pnt); } @@ -120,91 +120,91 @@ #include "kvi_tal_iconview_qt4.moc" #else - KviTalIconView::KviTalIconView(QWidget * pParent,Qt::WFlags f) - : QIconView(pParent,0,f) + KviTalIconView::KviTalIconView(TQWidget * pParent,TQt::WFlags f) + : TQIconView(pParent,0,f) { - connect(this,SIGNAL(selectionChanged(QIconViewItem *)),this,SLOT(redirect_selectionChanged(QIconViewItem *))); - connect(this,SIGNAL(currentChanged(QIconViewItem *)),this,SLOT(redirect_currentChanged(QIconViewItem *))); - connect(this,SIGNAL(clicked(QIconViewItem *)),this,SLOT(redirect_clicked(QIconViewItem *))); - connect(this,SIGNAL(clicked(QIconViewItem *,const QPoint &)),this,SLOT(redirect_clicked(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(pressed(QIconViewItem *)),this,SLOT(redirect_pressed(QIconViewItem *))); - connect(this,SIGNAL(pressed(QIconViewItem *,const QPoint &)),this,SLOT(redirect_pressed(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(doubleClicked(QIconViewItem *)),this,SLOT(redirect_doubleClicked(QIconViewItem *))); - connect(this,SIGNAL(returnPressed(QIconViewItem *)),this,SLOT(redirect_returnPressed(QIconViewItem *))); - connect(this,SIGNAL(rightButtonClicked(QIconViewItem *,const QPoint &)),this,SLOT(redirect_rightButtonClicked(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(rightButtonPressed(QIconViewItem *,const QPoint &)),this,SLOT(redirect_rightButtonPressed(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonClicked(int,QIconViewItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonPressed(int,QIconViewItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(contextMenuRequested(QIconViewItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(QIconViewItem *,const QPoint &))); - connect(this,SIGNAL(onItem(QIconViewItem *)),this,SLOT(redirect_onItem(QIconViewItem *))); + connect(this,TQT_SIGNAL(selectionChanged(TQIconViewItem *)),this,TQT_SLOT(redirect_selectionChanged(TQIconViewItem *))); + connect(this,TQT_SIGNAL(currentChanged(TQIconViewItem *)),this,TQT_SLOT(redirect_currentChanged(TQIconViewItem *))); + connect(this,TQT_SIGNAL(clicked(TQIconViewItem *)),this,TQT_SLOT(redirect_clicked(TQIconViewItem *))); + connect(this,TQT_SIGNAL(clicked(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(pressed(TQIconViewItem *)),this,TQT_SLOT(redirect_pressed(TQIconViewItem *))); + connect(this,TQT_SIGNAL(pressed(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(doubleClicked(TQIconViewItem *)),this,TQT_SLOT(redirect_doubleClicked(TQIconViewItem *))); + connect(this,TQT_SIGNAL(returnPressed(TQIconViewItem *)),this,TQT_SLOT(redirect_returnPressed(TQIconViewItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(rightButtonPressed(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(contextMenuRequested(TQIconViewItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(TQIconViewItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(onItem(TQIconViewItem *)),this,TQT_SLOT(redirect_onItem(TQIconViewItem *))); } - void KviTalIconView::redirect_selectionChanged(QIconViewItem * pItem) + void KviTalIconView::redirect_selectionChanged(TQIconViewItem * pItem) { emit selectionChanged((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_currentChanged(QIconViewItem * pItem) + void KviTalIconView::redirect_currentChanged(TQIconViewItem * pItem) { emit currentChanged((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_clicked(QIconViewItem * pItem) + void KviTalIconView::redirect_clicked(TQIconViewItem * pItem) { emit clicked((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_clicked(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_clicked(TQIconViewItem * pItem,const TQPoint &pnt) { emit clicked((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_pressed(QIconViewItem * pItem) + void KviTalIconView::redirect_pressed(TQIconViewItem * pItem) { emit pressed((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_pressed(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_pressed(TQIconViewItem * pItem,const TQPoint &pnt) { emit pressed((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_doubleClicked(QIconViewItem * pItem) + void KviTalIconView::redirect_doubleClicked(TQIconViewItem * pItem) { emit doubleClicked((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_returnPressed(QIconViewItem * pItem) + void KviTalIconView::redirect_returnPressed(TQIconViewItem * pItem) { emit returnPressed((KviTalIconViewItem *)pItem); } - void KviTalIconView::redirect_rightButtonClicked(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_rightButtonClicked(TQIconViewItem * pItem,const TQPoint &pnt) { emit rightButtonClicked((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_rightButtonPressed(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_rightButtonPressed(TQIconViewItem * pItem,const TQPoint &pnt) { emit rightButtonPressed((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_mouseButtonClicked(int iButton,QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_mouseButtonClicked(int iButton,TQIconViewItem * pItem,const TQPoint &pnt) { emit mouseButtonClicked(iButton,(KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_mouseButtonPressed(int iButton,QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_mouseButtonPressed(int iButton,TQIconViewItem * pItem,const TQPoint &pnt) { emit mouseButtonPressed(iButton,(KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_contextMenuRequested(QIconViewItem * pItem,const QPoint &pnt) + void KviTalIconView::redirect_contextMenuRequested(TQIconViewItem * pItem,const TQPoint &pnt) { emit contextMenuRequested((KviTalIconViewItem *)pItem,pnt); } - void KviTalIconView::redirect_onItem(QIconViewItem * pItem) + void KviTalIconView::redirect_onItem(TQIconViewItem * pItem) { emit onItem((KviTalIconViewItem *)pItem); } diff --git a/src/kvilib/tal/kvi_tal_iconview_qt3.h b/src/kvilib/tal/kvi_tal_iconview_qt3.h index 7cfec586..73d367c6 100644 --- a/src/kvilib/tal/kvi_tal_iconview_qt3.h +++ b/src/kvilib/tal/kvi_tal_iconview_qt3.h @@ -28,72 +28,73 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include <qiconview.h> +#include <tqiconview.h> class KviTalIconViewItem; -class KVILIB_API KviTalIconView : public QIconView +class KVILIB_API KviTalIconView : public TQIconView { Q_OBJECT + TQ_OBJECT public: - KviTalIconView(QWidget * pParent,Qt::WFlags f = 0); + KviTalIconView(TQWidget * pParent,TQt::WFlags f = 0); virtual ~KviTalIconView() {}; signals: void selectionChanged(KviTalIconViewItem * pItem); void currentChanged(KviTalIconViewItem * pItem); void clicked(KviTalIconViewItem * pItem); - void clicked(KviTalIconViewItem * pItem,const QPoint &pnt); + void clicked(KviTalIconViewItem * pItem,const TQPoint &pnt); void pressed(KviTalIconViewItem * pItem); - void pressed(KviTalIconViewItem * pItem,const QPoint &pnt); + void pressed(KviTalIconViewItem * pItem,const TQPoint &pnt); void doubleClicked(KviTalIconViewItem * pItem); void returnPressed(KviTalIconViewItem * pItem); - void rightButtonClicked(KviTalIconViewItem * pItem,const QPoint &pnt); - void rightButtonPressed(KviTalIconViewItem * pItem,const QPoint &pnt); - void mouseButtonClicked(int iButton,KviTalIconViewItem * pItem,const QPoint &pnt); - void mouseButtonPressed(int iButton,KviTalIconViewItem * pItem,const QPoint &pnt); - void contextMenuRequested(KviTalIconViewItem * pItem,const QPoint &pnt); + void rightButtonClicked(KviTalIconViewItem * pItem,const TQPoint &pnt); + void rightButtonPressed(KviTalIconViewItem * pItem,const TQPoint &pnt); + void mouseButtonClicked(int iButton,KviTalIconViewItem * pItem,const TQPoint &pnt); + void mouseButtonPressed(int iButton,KviTalIconViewItem * pItem,const TQPoint &pnt); + void contextMenuRequested(KviTalIconViewItem * pItem,const TQPoint &pnt); void onItem(KviTalIconViewItem * pItem); protected slots: - void redirect_selectionChanged(QIconViewItem * pItem); - void redirect_currentChanged(QIconViewItem * pItem); - void redirect_clicked(QIconViewItem * pItem); - void redirect_clicked(QIconViewItem * pItem,const QPoint &pnt); - void redirect_pressed(QIconViewItem * pItem); - void redirect_pressed(QIconViewItem * pItem,const QPoint &pnt); - void redirect_doubleClicked(QIconViewItem * pItem); - void redirect_returnPressed(QIconViewItem * pItem); - void redirect_rightButtonClicked(QIconViewItem * pItem,const QPoint &pnt); - void redirect_rightButtonPressed(QIconViewItem * pItem,const QPoint &pnt); - void redirect_mouseButtonClicked(int iButton,QIconViewItem * pItem,const QPoint &pnt); - void redirect_mouseButtonPressed(int iButton,QIconViewItem * pItem,const QPoint &pnt); - void redirect_contextMenuRequested(QIconViewItem * pItem,const QPoint &pnt); - void redirect_onItem(QIconViewItem * pItem); + void redirect_selectionChanged(TQIconViewItem * pItem); + void redirect_currentChanged(TQIconViewItem * pItem); + void redirect_clicked(TQIconViewItem * pItem); + void redirect_clicked(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_pressed(TQIconViewItem * pItem); + void redirect_pressed(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_doubleClicked(TQIconViewItem * pItem); + void redirect_returnPressed(TQIconViewItem * pItem); + void redirect_rightButtonClicked(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_rightButtonPressed(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_mouseButtonClicked(int iButton,TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_mouseButtonPressed(int iButton,TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_contextMenuRequested(TQIconViewItem * pItem,const TQPoint &pnt); + void redirect_onItem(TQIconViewItem * pItem); public: - KviTalIconViewItem * firstItem() const { return (KviTalIconViewItem *)QIconView::firstItem(); }; - KviTalIconViewItem * lastItem() const { return (KviTalIconViewItem *)QIconView::lastItem(); }; - KviTalIconViewItem * currentItem() const { return (KviTalIconViewItem *)QIconView::currentItem(); }; + KviTalIconViewItem * firstItem() const { return (KviTalIconViewItem *)TQIconView::firstItem(); }; + KviTalIconViewItem * lastItem() const { return (KviTalIconViewItem *)TQIconView::lastItem(); }; + KviTalIconViewItem * currentItem() const { return (KviTalIconViewItem *)TQIconView::currentItem(); }; }; -class KVILIB_API KviTalIconViewItem : public QIconViewItem +class KVILIB_API KviTalIconViewItem : public TQIconViewItem { public: - KviTalIconViewItem(KviTalIconView * parent) - : QIconViewItem(parent) {}; - KviTalIconViewItem(KviTalIconView * parent,KviTalIconViewItem * after) - : QIconViewItem(parent,after) {}; - KviTalIconViewItem(KviTalIconView * parent, const QString & text) - : QIconViewItem(parent,text) {}; - KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const QString & text) - : QIconViewItem(parent,after,text) {}; - KviTalIconViewItem(KviTalIconView * parent, const QString & text, const QPixmap & icon) - : QIconViewItem(parent,text,icon) {}; - KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const QString & text, const QPixmap & icon) - : QIconViewItem(parent,after,text,icon) {}; + KviTalIconViewItem(KviTalIconView * tqparent) + : TQIconViewItem(tqparent) {}; + KviTalIconViewItem(KviTalIconView * tqparent,KviTalIconViewItem * after) + : TQIconViewItem(tqparent,after) {}; + KviTalIconViewItem(KviTalIconView * tqparent, const TQString & text) + : TQIconViewItem(tqparent,text) {}; + KviTalIconViewItem(KviTalIconView * tqparent, KviTalIconViewItem * after, const TQString & text) + : TQIconViewItem(tqparent,after,text) {}; + KviTalIconViewItem(KviTalIconView * tqparent, const TQString & text, const TQPixmap & icon) + : TQIconViewItem(tqparent,text,icon) {}; + KviTalIconViewItem(KviTalIconView * tqparent, KviTalIconViewItem * after, const TQString & text, const TQPixmap & icon) + : TQIconViewItem(tqparent,after,text,icon) {}; public: - KviTalIconView * iconView() const { return (KviTalIconView *)QIconViewItem::iconView(); }; - KviTalIconViewItem * prevItem() const { return (KviTalIconViewItem *)QIconViewItem::prevItem(); }; - KviTalIconViewItem * nextItem() const { return (KviTalIconViewItem *)QIconViewItem::nextItem(); }; + KviTalIconView * iconView() const { return (KviTalIconView *)TQIconViewItem::iconView(); }; + KviTalIconViewItem * prevItem() const { return (KviTalIconViewItem *)TQIconViewItem::prevItem(); }; + KviTalIconViewItem * nextItem() const { return (KviTalIconViewItem *)TQIconViewItem::nextItem(); }; }; diff --git a/src/kvilib/tal/kvi_tal_iconview_qt4.h b/src/kvilib/tal/kvi_tal_iconview_qt4.h index 899acaac..99554341 100644 --- a/src/kvilib/tal/kvi_tal_iconview_qt4.h +++ b/src/kvilib/tal/kvi_tal_iconview_qt4.h @@ -28,45 +28,46 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include <q3iconview.h> +#include <tq3iconview.h> class KviTalIconViewItem; class KVILIB_API KviTalIconView : public Q3IconView { Q_OBJECT + TQ_OBJECT public: - KviTalIconView(QWidget * pParent,Qt::WFlags f = 0); + KviTalIconView(TQWidget * pParent,TQt::WFlags f = 0); virtual ~KviTalIconView() {}; signals: void selectionChanged(KviTalIconViewItem * pItem); void currentChanged(KviTalIconViewItem * pItem); void clicked(KviTalIconViewItem * pItem); - void clicked(KviTalIconViewItem * pItem,const QPoint &pnt); + void clicked(KviTalIconViewItem * pItem,const TQPoint &pnt); void pressed(KviTalIconViewItem * pItem); - void pressed(KviTalIconViewItem * pItem,const QPoint &pnt); + void pressed(KviTalIconViewItem * pItem,const TQPoint &pnt); void doubleClicked(KviTalIconViewItem * pItem); void returnPressed(KviTalIconViewItem * pItem); - void rightButtonClicked(KviTalIconViewItem * pItem,const QPoint &pnt); - void rightButtonPressed(KviTalIconViewItem * pItem,const QPoint &pnt); - void mouseButtonClicked(int iButton,KviTalIconViewItem * pItem,const QPoint &pnt); - void mouseButtonPressed(int iButton,KviTalIconViewItem * pItem,const QPoint &pnt); - void contextMenuRequested(KviTalIconViewItem * pItem,const QPoint &pnt); + void rightButtonClicked(KviTalIconViewItem * pItem,const TQPoint &pnt); + void rightButtonPressed(KviTalIconViewItem * pItem,const TQPoint &pnt); + void mouseButtonClicked(int iButton,KviTalIconViewItem * pItem,const TQPoint &pnt); + void mouseButtonPressed(int iButton,KviTalIconViewItem * pItem,const TQPoint &pnt); + void contextMenuRequested(KviTalIconViewItem * pItem,const TQPoint &pnt); void onItem(KviTalIconViewItem * pItem); protected slots: void redirect_selectionChanged(Q3IconViewItem * pItem); void redirect_currentChanged(Q3IconViewItem * pItem); void redirect_clicked(Q3IconViewItem * pItem); - void redirect_clicked(Q3IconViewItem * pItem,const QPoint &pnt); + void redirect_clicked(Q3IconViewItem * pItem,const TQPoint &pnt); void redirect_pressed(Q3IconViewItem * pItem); - void redirect_pressed(Q3IconViewItem * pItem,const QPoint &pnt); + void redirect_pressed(Q3IconViewItem * pItem,const TQPoint &pnt); void redirect_doubleClicked(Q3IconViewItem * pItem); void redirect_returnPressed(Q3IconViewItem * pItem); - void redirect_rightButtonClicked(Q3IconViewItem * pItem,const QPoint &pnt); - void redirect_rightButtonPressed(Q3IconViewItem * pItem,const QPoint &pnt); - void redirect_mouseButtonClicked(int iButton,Q3IconViewItem * pItem,const QPoint &pnt); - void redirect_mouseButtonPressed(int iButton,Q3IconViewItem * pItem,const QPoint &pnt); - void redirect_contextMenuRequested(Q3IconViewItem * pItem,const QPoint &pnt); + void redirect_rightButtonClicked(Q3IconViewItem * pItem,const TQPoint &pnt); + void redirect_rightButtonPressed(Q3IconViewItem * pItem,const TQPoint &pnt); + void redirect_mouseButtonClicked(int iButton,Q3IconViewItem * pItem,const TQPoint &pnt); + void redirect_mouseButtonPressed(int iButton,Q3IconViewItem * pItem,const TQPoint &pnt); + void redirect_contextMenuRequested(Q3IconViewItem * pItem,const TQPoint &pnt); void redirect_onItem(Q3IconViewItem * pItem); public: KviTalIconViewItem * firstItem() const { return (KviTalIconViewItem *)Q3IconView::firstItem(); }; @@ -77,18 +78,18 @@ public: class KVILIB_API KviTalIconViewItem : public Q3IconViewItem { public: - KviTalIconViewItem(KviTalIconView * parent) - : Q3IconViewItem(parent) {}; - KviTalIconViewItem(KviTalIconView * parent,KviTalIconViewItem * after) - : Q3IconViewItem(parent,after) {}; - KviTalIconViewItem(KviTalIconView * parent, const QString & text) - : Q3IconViewItem(parent,text) {}; - KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const QString & text) - : Q3IconViewItem(parent,after,text) {}; - KviTalIconViewItem(KviTalIconView * parent, const QString & text, const QPixmap & icon) - : Q3IconViewItem(parent,text,icon) {}; - KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const QString & text, const QPixmap & icon) - : Q3IconViewItem(parent,after,text,icon) {}; + KviTalIconViewItem(KviTalIconView * tqparent) + : Q3IconViewItem(tqparent) {}; + KviTalIconViewItem(KviTalIconView * tqparent,KviTalIconViewItem * after) + : Q3IconViewItem(tqparent,after) {}; + KviTalIconViewItem(KviTalIconView * tqparent, const TQString & text) + : Q3IconViewItem(tqparent,text) {}; + KviTalIconViewItem(KviTalIconView * tqparent, KviTalIconViewItem * after, const TQString & text) + : Q3IconViewItem(tqparent,after,text) {}; + KviTalIconViewItem(KviTalIconView * tqparent, const TQString & text, const TQPixmap & icon) + : Q3IconViewItem(tqparent,text,icon) {}; + KviTalIconViewItem(KviTalIconView * tqparent, KviTalIconViewItem * after, const TQString & text, const TQPixmap & icon) + : Q3IconViewItem(tqparent,after,text,icon) {}; public: KviTalIconView * iconView() const { return (KviTalIconView *)Q3IconViewItem::iconView(); }; KviTalIconViewItem * prevItem() const { return (KviTalIconViewItem *)Q3IconViewItem::prevItem(); }; diff --git a/src/kvilib/tal/kvi_tal_listbox.cpp b/src/kvilib/tal/kvi_tal_listbox.cpp index f5fcc087..e96cc012 100644 --- a/src/kvilib/tal/kvi_tal_listbox.cpp +++ b/src/kvilib/tal/kvi_tal_listbox.cpp @@ -26,29 +26,29 @@ #include "kvi_tal_listbox.h" #ifdef COMPILE_USE_QT4 - #include <qpainter.h> - #include <qstyle.h> - #include <qapplication.h> + #include <tqpainter.h> + #include <tqstyle.h> + #include <tqapplication.h> - KviTalListBox::KviTalListBox(QWidget * pParent,Qt::WFlags f) + KviTalListBox::KviTalListBox(TQWidget * pParent,TQt::WFlags f) : Q3ListBox(pParent,0,f) { - connect(this,SIGNAL(highlighted(Q3ListBoxItem *)),this,SLOT(redirect_highlighted(Q3ListBoxItem *))); - connect(this,SIGNAL(selected(Q3ListBoxItem *)),this,SLOT(redirect_selected(Q3ListBoxItem *))); - connect(this,SIGNAL(selectionChanged(Q3ListBoxItem *)),this,SLOT(redirect_selectionChanged(Q3ListBoxItem *))); - connect(this,SIGNAL(currentChanged(Q3ListBoxItem *)),this,SLOT(redirect_currentChanged(Q3ListBoxItem *))); - connect(this,SIGNAL(clicked(Q3ListBoxItem *)),this,SLOT(redirect_clicked(Q3ListBoxItem *))); - connect(this,SIGNAL(clicked(Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_clicked(Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(pressed(Q3ListBoxItem *)),this,SLOT(redirect_pressed(Q3ListBoxItem *))); - connect(this,SIGNAL(pressed(Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_pressed(Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(doubleClicked(Q3ListBoxItem *)),this,SLOT(redirect_doubleClicked(Q3ListBoxItem *))); - connect(this,SIGNAL(returnPressed(Q3ListBoxItem *)),this,SLOT(redirect_returnPressed(Q3ListBoxItem *))); - connect(this,SIGNAL(rightButtonClicked(Q3ListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonClicked(Q3ListBoxItem *, const QPoint &))); - connect(this,SIGNAL(rightButtonPressed(Q3ListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonPressed(Q3ListBoxItem *, const QPoint &))); - connect(this,SIGNAL(mouseButtonPressed(int,Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonClicked(int,Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(contextMenuRequested(Q3ListBoxItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(Q3ListBoxItem *,const QPoint &))); - connect(this,SIGNAL(onItem(Q3ListBoxItem *)),this,SLOT(redirect_onItem(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(highlighted(Q3ListBoxItem *)),this,TQT_SLOT(redirect_highlighted(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(selected(Q3ListBoxItem *)),this,TQT_SLOT(redirect_selected(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(selectionChanged(Q3ListBoxItem *)),this,TQT_SLOT(redirect_selectionChanged(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(currentChanged(Q3ListBoxItem *)),this,TQT_SLOT(redirect_currentChanged(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(clicked(Q3ListBoxItem *)),this,TQT_SLOT(redirect_clicked(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(clicked(Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(pressed(Q3ListBoxItem *)),this,TQT_SLOT(redirect_pressed(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(pressed(Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(doubleClicked(Q3ListBoxItem *)),this,TQT_SLOT(redirect_doubleClicked(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(returnPressed(Q3ListBoxItem *)),this,TQT_SLOT(redirect_returnPressed(Q3ListBoxItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(Q3ListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(Q3ListBoxItem *, const TQPoint &))); + connect(this,TQT_SIGNAL(rightButtonPressed(Q3ListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(Q3ListBoxItem *, const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(contextMenuRequested(Q3ListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(Q3ListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(onItem(Q3ListBoxItem *)),this,TQT_SLOT(redirect_onItem(Q3ListBoxItem *))); } void KviTalListBox::redirect_highlighted(Q3ListBoxItem *item) @@ -76,7 +76,7 @@ emit clicked((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_clicked(Q3ListBoxItem * item,const QPoint & pnt) + void KviTalListBox::redirect_clicked(Q3ListBoxItem * item,const TQPoint & pnt) { emit clicked((KviTalListBoxItem *)item,pnt); } @@ -86,7 +86,7 @@ emit pressed((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_pressed(Q3ListBoxItem * item,const QPoint & pnt) + void KviTalListBox::redirect_pressed(Q3ListBoxItem * item,const TQPoint & pnt) { emit pressed((KviTalListBoxItem *)item,pnt); } @@ -101,27 +101,27 @@ emit returnPressed((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_rightButtonClicked(Q3ListBoxItem * item, const QPoint &pnt) + void KviTalListBox::redirect_rightButtonClicked(Q3ListBoxItem * item, const TQPoint &pnt) { emit rightButtonClicked((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_rightButtonPressed(Q3ListBoxItem * item, const QPoint &pnt) + void KviTalListBox::redirect_rightButtonPressed(Q3ListBoxItem * item, const TQPoint &pnt) { emit rightButtonPressed((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const TQPoint & pos) { emit mouseButtonPressed(button,(KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const TQPoint & pos) { emit mouseButtonClicked(button,(KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_contextMenuRequested(Q3ListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_contextMenuRequested(Q3ListBoxItem * item,const TQPoint & pos) { emit contextMenuRequested((KviTalListBoxItem *)item,pos); } @@ -131,19 +131,19 @@ emit onItem((KviTalListBoxItem *)i); } - KviTalListBoxText::KviTalListBoxText(KviTalListBox *listbox, const QString &text) + KviTalListBoxText::KviTalListBoxText(KviTalListBox *listbox, const TQString &text) :KviTalListBoxItem(listbox) { setText(text); } - KviTalListBoxText::KviTalListBoxText(const QString &text) + KviTalListBoxText::KviTalListBoxText(const TQString &text) :KviTalListBoxItem() { setText(text); } - KviTalListBoxText::KviTalListBoxText(KviTalListBox* listbox, const QString &text, KviTalListBoxItem *after) + KviTalListBoxText::KviTalListBoxText(KviTalListBox* listbox, const TQString &text, KviTalListBoxItem *after) : KviTalListBoxItem(listbox, after) { setText(text); @@ -153,10 +153,10 @@ { } - void KviTalListBoxText::paint(QPainter *painter) + void KviTalListBoxText::paint(TQPainter *painter) { int itemHeight = height(listBox()); - QFontMetrics fm = painter->fontMetrics(); + TQFontMetrics fm = painter->fontMetrics(); int yPos = ((itemHeight - fm.height()) / 2) + fm.ascent(); painter->drawText(3, yPos, text()); } @@ -164,13 +164,13 @@ int KviTalListBoxText::height(const KviTalListBox* lb) const { int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0; - return qMax(h, QApplication::globalStrut().height()); + return qMax(h, TQApplication::globalStrut().height()); } int KviTalListBoxText::width(const KviTalListBox* lb) const { int w = lb ? lb->fontMetrics().width(text()) + 6 : 0; - return qMax(w, QApplication::globalStrut().width()); + return qMax(w, TQApplication::globalStrut().width()); } int KviTalListBoxText::rtti() const @@ -178,19 +178,19 @@ return RTTI; } - KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &pixmap) + KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pixmap) : KviTalListBoxItem(listbox) { pm = pixmap; } - KviTalListBoxPixmap::KviTalListBoxPixmap(const QPixmap &pixmap) + KviTalListBoxPixmap::KviTalListBoxPixmap(const TQPixmap &pixmap) : KviTalListBoxItem() { pm = pixmap; } - KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &pixmap, KviTalListBoxItem *after) + KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pixmap, KviTalListBoxItem *after) : KviTalListBoxItem(listbox, after) { pm = pixmap; @@ -200,21 +200,21 @@ { } - KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &pix, const QString& text) + KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pix, const TQString& text) : KviTalListBoxItem(listbox) { pm = pix; setText(text); } - KviTalListBoxPixmap::KviTalListBoxPixmap(const QPixmap & pix, const QString& text) + KviTalListBoxPixmap::KviTalListBoxPixmap(const TQPixmap & pix, const TQString& text) : KviTalListBoxItem() { pm = pix; setText(text); } - KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap & pix, const QString& text, + KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap & pix, const TQString& text, KviTalListBoxItem *after) : KviTalListBoxItem(listbox, after) { @@ -222,19 +222,19 @@ setText(text); } - void KviTalListBoxPixmap::paint(QPainter *painter) + void KviTalListBoxPixmap::paint(TQPainter *painter) { int itemHeight = height(listBox()); int yPos; - const QPixmap *pm = pixmap(); + const TQPixmap *pm = pixmap(); if (pm && ! pm->isNull()) { yPos = (itemHeight - pm->height()) / 2; painter->drawPixmap(3, yPos, *pm); } if (!text().isEmpty()) { - QFontMetrics fm = painter->fontMetrics(); + TQFontMetrics fm = painter->fontMetrics(); yPos = ((itemHeight - fm.height()) / 2) + fm.ascent(); painter->drawText(pm->width() + 5, yPos, text()); } @@ -247,15 +247,15 @@ h = pm.height(); else h = qMax(pm.height(), lb->fontMetrics().lineSpacing() + 2); - return qMax(h, QApplication::globalStrut().height()); + return qMax(h, TQApplication::globalStrut().height()); } int KviTalListBoxPixmap::width(const KviTalListBox* lb) const { if (text().isEmpty()) - return qMax(pm.width() + 6, QApplication::globalStrut().width()); + return qMax(pm.width() + 6, TQApplication::globalStrut().width()); return qMax(pm.width() + lb->fontMetrics().width(text()) + 6, - QApplication::globalStrut().width()); + TQApplication::globalStrut().width()); } int KviTalListBoxPixmap::rtti() const @@ -266,125 +266,125 @@ #include "kvi_tal_listbox_qt4.moc" #else - #include <qpainter.h> - #include <qstyle.h> - #include <qapplication.h> - - - KviTalListBox::KviTalListBox(QWidget * pParent,Qt::WFlags f) - : QListBox(pParent,0,f) - { - connect(this,SIGNAL(highlighted(QListBoxItem *)),this,SLOT(redirect_highlighted(QListBoxItem *))); - connect(this,SIGNAL(selected(QListBoxItem *)),this,SLOT(redirect_selected(QListBoxItem *))); - connect(this,SIGNAL(selectionChanged(QListBoxItem *)),this,SLOT(redirect_selectionChanged(QListBoxItem *))); - connect(this,SIGNAL(currentChanged(QListBoxItem *)),this,SLOT(redirect_currentChanged(QListBoxItem *))); - connect(this,SIGNAL(clicked(QListBoxItem *)),this,SLOT(redirect_clicked(QListBoxItem *))); - connect(this,SIGNAL(clicked(QListBoxItem *,const QPoint &)),this,SLOT(redirect_clicked(QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(pressed(QListBoxItem *)),this,SLOT(redirect_pressed(QListBoxItem *))); - connect(this,SIGNAL(pressed(QListBoxItem *,const QPoint &)),this,SLOT(redirect_pressed(QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(doubleClicked(QListBoxItem *)),this,SLOT(redirect_doubleClicked(QListBoxItem *))); - connect(this,SIGNAL(returnPressed(QListBoxItem *)),this,SLOT(redirect_returnPressed(QListBoxItem *))); - connect(this,SIGNAL(rightButtonClicked(QListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonClicked(QListBoxItem *, const QPoint &))); - connect(this,SIGNAL(rightButtonPressed(QListBoxItem *, const QPoint &)),this,SLOT(redirect_rightButtonPressed(QListBoxItem *, const QPoint &))); - connect(this,SIGNAL(mouseButtonPressed(int,QListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonPressed(int,QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(mouseButtonClicked(int,QListBoxItem *,const QPoint &)),this,SLOT(redirect_mouseButtonClicked(int,QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(contextMenuRequested(QListBoxItem *,const QPoint &)),this,SLOT(redirect_contextMenuRequested(QListBoxItem *,const QPoint &))); - connect(this,SIGNAL(onItem(QListBoxItem *)),this,SLOT(redirect_onItem(QListBoxItem *))); - } - - void KviTalListBox::redirect_highlighted(QListBoxItem *item) + #include <tqpainter.h> + #include <tqstyle.h> + #include <tqapplication.h> + + + KviTalListBox::KviTalListBox(TQWidget * pParent,TQt::WFlags f) + : TQListBox(pParent,0,f) + { + connect(this,TQT_SIGNAL(highlighted(TQListBoxItem *)),this,TQT_SLOT(redirect_highlighted(TQListBoxItem *))); + connect(this,TQT_SIGNAL(selected(TQListBoxItem *)),this,TQT_SLOT(redirect_selected(TQListBoxItem *))); + connect(this,TQT_SIGNAL(selectionChanged(TQListBoxItem *)),this,TQT_SLOT(redirect_selectionChanged(TQListBoxItem *))); + connect(this,TQT_SIGNAL(currentChanged(TQListBoxItem *)),this,TQT_SLOT(redirect_currentChanged(TQListBoxItem *))); + connect(this,TQT_SIGNAL(clicked(TQListBoxItem *)),this,TQT_SLOT(redirect_clicked(TQListBoxItem *))); + connect(this,TQT_SIGNAL(clicked(TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_clicked(TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(pressed(TQListBoxItem *)),this,TQT_SLOT(redirect_pressed(TQListBoxItem *))); + connect(this,TQT_SIGNAL(pressed(TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_pressed(TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(doubleClicked(TQListBoxItem *)),this,TQT_SLOT(redirect_doubleClicked(TQListBoxItem *))); + connect(this,TQT_SIGNAL(returnPressed(TQListBoxItem *)),this,TQT_SLOT(redirect_returnPressed(TQListBoxItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(TQListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonClicked(TQListBoxItem *, const TQPoint &))); + connect(this,TQT_SIGNAL(rightButtonPressed(TQListBoxItem *, const TQPoint &)),this,TQT_SLOT(redirect_rightButtonPressed(TQListBoxItem *, const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonPressed(int,TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_mouseButtonClicked(int,TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(contextMenuRequested(TQListBoxItem *,const TQPoint &)),this,TQT_SLOT(redirect_contextMenuRequested(TQListBoxItem *,const TQPoint &))); + connect(this,TQT_SIGNAL(onItem(TQListBoxItem *)),this,TQT_SLOT(redirect_onItem(TQListBoxItem *))); + } + + void KviTalListBox::redirect_highlighted(TQListBoxItem *item) { emit highlighted((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_selected(QListBoxItem *item) + void KviTalListBox::redirect_selected(TQListBoxItem *item) { emit selected((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_selectionChanged(QListBoxItem * item) + void KviTalListBox::redirect_selectionChanged(TQListBoxItem * item) { emit selectionChanged((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_currentChanged(QListBoxItem * item) + void KviTalListBox::redirect_currentChanged(TQListBoxItem * item) { emit currentChanged((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_clicked(QListBoxItem * item) + void KviTalListBox::redirect_clicked(TQListBoxItem * item) { emit clicked((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_clicked(QListBoxItem * item,const QPoint & pnt) + void KviTalListBox::redirect_clicked(TQListBoxItem * item,const TQPoint & pnt) { emit clicked((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_pressed(QListBoxItem * item) + void KviTalListBox::redirect_pressed(TQListBoxItem * item) { emit pressed((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_pressed(QListBoxItem * item,const QPoint & pnt) + void KviTalListBox::redirect_pressed(TQListBoxItem * item,const TQPoint & pnt) { emit pressed((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_doubleClicked(QListBoxItem * item) + void KviTalListBox::redirect_doubleClicked(TQListBoxItem * item) { emit doubleClicked((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_returnPressed(QListBoxItem * item) + void KviTalListBox::redirect_returnPressed(TQListBoxItem * item) { emit returnPressed((KviTalListBoxItem *)item); } - void KviTalListBox::redirect_rightButtonClicked(QListBoxItem * item, const QPoint &pnt) + void KviTalListBox::redirect_rightButtonClicked(TQListBoxItem * item, const TQPoint &pnt) { emit rightButtonClicked((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_rightButtonPressed(QListBoxItem * item, const QPoint &pnt) + void KviTalListBox::redirect_rightButtonPressed(TQListBoxItem * item, const TQPoint &pnt) { emit rightButtonPressed((KviTalListBoxItem *)item,pnt); } - void KviTalListBox::redirect_mouseButtonPressed(int button,QListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_mouseButtonPressed(int button,TQListBoxItem * item,const TQPoint & pos) { emit mouseButtonPressed(button,(KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_mouseButtonClicked(int button,QListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_mouseButtonClicked(int button,TQListBoxItem * item,const TQPoint & pos) { emit mouseButtonClicked(button,(KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_contextMenuRequested(QListBoxItem * item,const QPoint & pos) + void KviTalListBox::redirect_contextMenuRequested(TQListBoxItem * item,const TQPoint & pos) { emit contextMenuRequested((KviTalListBoxItem *)item,pos); } - void KviTalListBox::redirect_onItem(QListBoxItem * i) + void KviTalListBox::redirect_onItem(TQListBoxItem * i) { emit onItem((KviTalListBoxItem *)i); } - KviTalListBoxText::KviTalListBoxText( KviTalListBox *listbox, const QString &text ) + KviTalListBoxText::KviTalListBoxText( KviTalListBox *listbox, const TQString &text ) :KviTalListBoxItem( listbox ) { setText( text ); } - KviTalListBoxText::KviTalListBoxText( const QString &text ) + KviTalListBoxText::KviTalListBoxText( const TQString &text ) :KviTalListBoxItem() { setText( text ); } - KviTalListBoxText::KviTalListBoxText( KviTalListBox* listbox, const QString &text, KviTalListBoxItem *after ) + KviTalListBoxText::KviTalListBoxText( KviTalListBox* listbox, const TQString &text, KviTalListBoxItem *after ) : KviTalListBoxItem( listbox, after ) { setText( text ); @@ -394,10 +394,10 @@ { } - void KviTalListBoxText::paint( QPainter *painter ) + void KviTalListBoxText::paint( TQPainter *painter ) { int itemHeight = height( listBox() ); - QFontMetrics fm = painter->fontMetrics(); + TQFontMetrics fm = painter->fontMetrics(); int yPos = ( ( itemHeight - fm.height() ) / 2 ) + fm.ascent(); painter->drawText( 3, yPos, text() ); } @@ -405,13 +405,13 @@ int KviTalListBoxText::height( const KviTalListBox* lb ) const { int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0; - return QMAX( h, QApplication::globalStrut().height() ); + return TQMAX( h, TQApplication::globalStrut().height() ); } int KviTalListBoxText::width( const KviTalListBox* lb ) const { int w = lb ? lb->fontMetrics().width( text() ) + 6 : 0; - return QMAX( w, QApplication::globalStrut().width() ); + return TQMAX( w, TQApplication::globalStrut().width() ); } int KviTalListBoxText::RTTI = 1; @@ -421,19 +421,19 @@ return RTTI; } - KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &pixmap ) + KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &pixmap ) : KviTalListBoxItem( listbox ) { pm = pixmap; } - KviTalListBoxPixmap::KviTalListBoxPixmap( const QPixmap &pixmap ) + KviTalListBoxPixmap::KviTalListBoxPixmap( const TQPixmap &pixmap ) : KviTalListBoxItem() { pm = pixmap; } - KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &pixmap, KviTalListBoxItem *after ) + KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &pixmap, KviTalListBoxItem *after ) : KviTalListBoxItem( listbox, after ) { pm = pixmap; @@ -443,21 +443,21 @@ { } - KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &pix, const QString& text) + KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &pix, const TQString& text) : KviTalListBoxItem( listbox ) { pm = pix; setText( text ); } - KviTalListBoxPixmap::KviTalListBoxPixmap( const QPixmap & pix, const QString& text) + KviTalListBoxPixmap::KviTalListBoxPixmap( const TQPixmap & pix, const TQString& text) : KviTalListBoxItem() { pm = pix; setText( text ); } - KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap & pix, const QString& text, + KviTalListBoxPixmap::KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap & pix, const TQString& text, KviTalListBoxItem *after ) : KviTalListBoxItem( listbox, after ) { @@ -465,19 +465,19 @@ setText( text ); } - void KviTalListBoxPixmap::paint( QPainter *painter ) + void KviTalListBoxPixmap::paint( TQPainter *painter ) { int itemHeight = height( listBox() ); int yPos; - const QPixmap *pm = pixmap(); + const TQPixmap *pm = pixmap(); if ( pm && ! pm->isNull() ) { yPos = ( itemHeight - pm->height() ) / 2; painter->drawPixmap( 3, yPos, *pm); } if ( !text().isEmpty() ) { - QFontMetrics fm = painter->fontMetrics(); + TQFontMetrics fm = painter->fontMetrics(); yPos = ( ( itemHeight - fm.height() ) / 2 ) + fm.ascent(); painter->drawText( pm->width() + 5, yPos, text() ); } @@ -489,16 +489,16 @@ if ( text().isEmpty() ) h = pm.height(); else - h = QMAX( pm.height(), lb->fontMetrics().lineSpacing() + 2 ); - return QMAX( h, QApplication::globalStrut().height() ); + h = TQMAX( pm.height(), lb->fontMetrics().lineSpacing() + 2 ); + return TQMAX( h, TQApplication::globalStrut().height() ); } int KviTalListBoxPixmap::width( const KviTalListBox* lb ) const { if ( text().isEmpty() ) - return QMAX( pm.width() + 6, QApplication::globalStrut().width() ); - return QMAX( pm.width() + lb->fontMetrics().width( text() ) + 6, - QApplication::globalStrut().width() ); + return TQMAX( pm.width() + 6, TQApplication::globalStrut().width() ); + return TQMAX( pm.width() + lb->fontMetrics().width( text() ) + 6, + TQApplication::globalStrut().width() ); } int KviTalListBoxPixmap::RTTI = 2; diff --git a/src/kvilib/tal/kvi_tal_listbox.h b/src/kvilib/tal/kvi_tal_listbox.h index 18594539..4cddaeac 100644 --- a/src/kvilib/tal/kvi_tal_listbox.h +++ b/src/kvilib/tal/kvi_tal_listbox.h @@ -29,13 +29,13 @@ // // This is the only reasonable CROSS-QT3-QT4-COMPATIBLE implementation -// of QListBox I've been able to find. -// Note that using macros for the items will NOT work since moc +// of TQListBox I've been able to find. +// Note that using macros for the items will NOT work since tqmoc // doesn't expand them. Note also that KviTalListBoxText must -// be fully reimplemented and not be inherited from QListBoxText +// be fully reimplemented and not be inherited from TQListBoxText // to build up a consistent item object hierarchy. To complete -// the obscenity, we need TWO COMPLETE implementations: one for Qt3 -// and one for Qt4... bleah :D +// the obscenity, we need TWO COMPLETE implementations: one for TQt3 +// and one for TQt4... bleah :D // // The code for KviTalListBoxText is adapted from qlistbox.h/cpp // present in qt 3.3.6 AND in qt 4.1.2. diff --git a/src/kvilib/tal/kvi_tal_listbox_qt3.h b/src/kvilib/tal/kvi_tal_listbox_qt3.h index d65b7929..dcc3c0d9 100644 --- a/src/kvilib/tal/kvi_tal_listbox_qt3.h +++ b/src/kvilib/tal/kvi_tal_listbox_qt3.h @@ -27,82 +27,83 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include <qlistbox.h> +#include <tqlistbox.h> class KviTalListBoxItem; -class KVILIB_API KviTalListBox : public QListBox +class KVILIB_API KviTalListBox : public TQListBox { Q_OBJECT + TQ_OBJECT public: - KviTalListBox(QWidget * pParent,Qt::WFlags f = 0); + KviTalListBox(TQWidget * pParent,TQt::WFlags f = 0); virtual ~KviTalListBox() {}; public: - KviTalListBoxItem * firstItem() const { return (KviTalListBoxItem *)QListBox::firstItem(); }; - KviTalListBoxItem * selectedItem() const { return (KviTalListBoxItem *)QListBox::selectedItem(); }; - KviTalListBoxItem * item(int iIndex) const { return (KviTalListBoxItem *)QListBox::item(iIndex); }; + KviTalListBoxItem * firstItem() const { return (KviTalListBoxItem *)TQListBox::firstItem(); }; + KviTalListBoxItem * selectedItem() const { return (KviTalListBoxItem *)TQListBox::selectedItem(); }; + KviTalListBoxItem * item(int iIndex) const { return (KviTalListBoxItem *)TQListBox::item(iIndex); }; signals: void highlighted(KviTalListBoxItem *); void selected(KviTalListBoxItem *); void selectionChanged(KviTalListBoxItem * item); void currentChanged(KviTalListBoxItem * item); void clicked(KviTalListBoxItem * item); - void clicked(KviTalListBoxItem * item,const QPoint & pnt); + void clicked(KviTalListBoxItem * item,const TQPoint & pnt); void pressed(KviTalListBoxItem * item); - void pressed(KviTalListBoxItem * item,const QPoint & pnt); + void pressed(KviTalListBoxItem * item,const TQPoint & pnt); void doubleClicked(KviTalListBoxItem * item); void returnPressed(KviTalListBoxItem * item); - void rightButtonClicked(KviTalListBoxItem *, const QPoint &); - void rightButtonPressed(KviTalListBoxItem *, const QPoint &); - void mouseButtonPressed(int button,KviTalListBoxItem * item,const QPoint & pos); - void mouseButtonClicked(int button,KviTalListBoxItem * item,const QPoint & pos); - void contextMenuRequested(KviTalListBoxItem * item,const QPoint & pos); + void rightButtonClicked(KviTalListBoxItem *, const TQPoint &); + void rightButtonPressed(KviTalListBoxItem *, const TQPoint &); + void mouseButtonPressed(int button,KviTalListBoxItem * item,const TQPoint & pos); + void mouseButtonClicked(int button,KviTalListBoxItem * item,const TQPoint & pos); + void contextMenuRequested(KviTalListBoxItem * item,const TQPoint & pos); void onItem(KviTalListBoxItem * i); protected slots: - void redirect_highlighted(QListBoxItem *item); - void redirect_selected(QListBoxItem *item); - void redirect_selectionChanged(QListBoxItem * item); - void redirect_currentChanged(QListBoxItem * item); - void redirect_clicked(QListBoxItem * item); - void redirect_clicked(QListBoxItem * item,const QPoint & pnt); - void redirect_pressed(QListBoxItem * item); - void redirect_pressed(QListBoxItem * item,const QPoint & pnt); - void redirect_doubleClicked(QListBoxItem * item); - void redirect_returnPressed(QListBoxItem * item); - void redirect_rightButtonClicked(QListBoxItem * item, const QPoint &pnt); - void redirect_rightButtonPressed(QListBoxItem * item, const QPoint &pnt); - void redirect_mouseButtonPressed(int button,QListBoxItem * item,const QPoint & pos); - void redirect_mouseButtonClicked(int button,QListBoxItem * item,const QPoint & pos); - void redirect_contextMenuRequested(QListBoxItem * item,const QPoint & pos); - void redirect_onItem(QListBoxItem * i); + void redirect_highlighted(TQListBoxItem *item); + void redirect_selected(TQListBoxItem *item); + void redirect_selectionChanged(TQListBoxItem * item); + void redirect_currentChanged(TQListBoxItem * item); + void redirect_clicked(TQListBoxItem * item); + void redirect_clicked(TQListBoxItem * item,const TQPoint & pnt); + void redirect_pressed(TQListBoxItem * item); + void redirect_pressed(TQListBoxItem * item,const TQPoint & pnt); + void redirect_doubleClicked(TQListBoxItem * item); + void redirect_returnPressed(TQListBoxItem * item); + void redirect_rightButtonClicked(TQListBoxItem * item, const TQPoint &pnt); + void redirect_rightButtonPressed(TQListBoxItem * item, const TQPoint &pnt); + void redirect_mouseButtonPressed(int button,TQListBoxItem * item,const TQPoint & pos); + void redirect_mouseButtonClicked(int button,TQListBoxItem * item,const TQPoint & pos); + void redirect_contextMenuRequested(TQListBoxItem * item,const TQPoint & pos); + void redirect_onItem(TQListBoxItem * i); }; -class KVILIB_API KviTalListBoxItem : public QListBoxItem +class KVILIB_API KviTalListBoxItem : public TQListBoxItem { public: KviTalListBoxItem() - : QListBoxItem() {}; + : TQListBoxItem() {}; KviTalListBoxItem(KviTalListBox * pParent) - : QListBoxItem(pParent) {}; + : TQListBoxItem(pParent) {}; KviTalListBoxItem(KviTalListBox * pParent,KviTalListBoxItem * pAfter) - : QListBoxItem(pParent,pAfter) {}; + : TQListBoxItem(pParent,pAfter) {}; virtual ~KviTalListBoxItem() {}; public: - KviTalListBoxItem * next() const { return (KviTalListBoxItem *)QListBoxItem::next(); }; - KviTalListBoxItem * prev() const { return (KviTalListBoxItem *)QListBoxItem::prev(); }; - KviTalListBox * listBox() const { return (KviTalListBox *)QListBoxItem::listBox(); }; + KviTalListBoxItem * next() const { return (KviTalListBoxItem *)TQListBoxItem::next(); }; + KviTalListBoxItem * prev() const { return (KviTalListBoxItem *)TQListBoxItem::prev(); }; + KviTalListBox * listBox() const { return (KviTalListBox *)TQListBoxItem::listBox(); }; virtual int height(const KviTalListBox *) const { return 0; }; - int height(const QListBox *lb) const { return height((KviTalListBox *)lb); }; + int height(const TQListBox *lb) const { return height((KviTalListBox *)lb); }; virtual int width(const KviTalListBox *) const { return 0; }; - int width(const QListBox *lb) const { return width((KviTalListBox *)lb); }; + int width(const TQListBox *lb) const { return width((KviTalListBox *)lb); }; }; class KVILIB_API KviTalListBoxText : public KviTalListBoxItem { public: - KviTalListBoxText( KviTalListBox* listbox, const QString & text=QString::null ); - KviTalListBoxText( const QString & text=QString::null ); - KviTalListBoxText( KviTalListBox* listbox, const QString & text, KviTalListBoxItem *after ); + KviTalListBoxText( KviTalListBox* listbox, const TQString & text=TQString() ); + KviTalListBoxText( const TQString & text=TQString() ); + KviTalListBoxText( KviTalListBox* listbox, const TQString & text, KviTalListBoxItem *after ); ~KviTalListBoxText(); int height( const KviTalListBox * ) const; @@ -112,10 +113,10 @@ public: static int RTTI; protected: - virtual void paint( QPainter * ); + virtual void paint( TQPainter * ); private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) KviTalListBoxText( const KviTalListBoxText & ); KviTalListBoxText &operator=( const KviTalListBoxText & ); #endif @@ -125,15 +126,15 @@ private: // Disabled copy constructor and operator= class KVILIB_API KviTalListBoxPixmap : public KviTalListBoxItem { public: - KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap & ); - KviTalListBoxPixmap( const QPixmap & ); - KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap & pix, KviTalListBoxItem *after ); - KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap &, const QString& ); - KviTalListBoxPixmap( const QPixmap &, const QString& ); - KviTalListBoxPixmap( KviTalListBox* listbox, const QPixmap & pix, const QString&, KviTalListBoxItem *after ); + KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap & ); + KviTalListBoxPixmap( const TQPixmap & ); + KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap & pix, KviTalListBoxItem *after ); + KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap &, const TQString& ); + KviTalListBoxPixmap( const TQPixmap &, const TQString& ); + KviTalListBoxPixmap( KviTalListBox* listbox, const TQPixmap & pix, const TQString&, KviTalListBoxItem *after ); ~KviTalListBoxPixmap(); - const QPixmap *pixmap() const { return ± } + const TQPixmap *pixmap() const { return ± } int height( const KviTalListBox * ) const; int width( const KviTalListBox * ) const; @@ -142,12 +143,12 @@ public: static int RTTI; protected: - virtual void paint( QPainter * ); + virtual void paint( TQPainter * ); private: - QPixmap pm; + TQPixmap pm; private: // Disabled copy constructor and operator= -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) KviTalListBoxPixmap( const KviTalListBoxPixmap & ); KviTalListBoxPixmap &operator=( const KviTalListBoxPixmap & ); #endif diff --git a/src/kvilib/tal/kvi_tal_listbox_qt4.h b/src/kvilib/tal/kvi_tal_listbox_qt4.h index dcb92f4d..4222fc1c 100644 --- a/src/kvilib/tal/kvi_tal_listbox_qt4.h +++ b/src/kvilib/tal/kvi_tal_listbox_qt4.h @@ -27,7 +27,7 @@ #include "kvi_settings.h" -#include <q3listbox.h> +#include <tq3listbox.h> class KviTalListBoxItem; @@ -35,8 +35,9 @@ class KviTalListBoxItem; class KVILIB_API KviTalListBox : public Q3ListBox { Q_OBJECT + TQ_OBJECT public: - KviTalListBox(QWidget * pParent,Qt::WFlags f = 0); + KviTalListBox(TQWidget * pParent,TQt::WFlags f = 0); virtual ~KviTalListBox() {}; public: KviTalListBoxItem * firstItem() const { return (KviTalListBoxItem *)Q3ListBox::firstItem(); }; @@ -48,16 +49,16 @@ signals: void selectionChanged(KviTalListBoxItem * item); void currentChanged(KviTalListBoxItem * item); void clicked(KviTalListBoxItem * item); - void clicked(KviTalListBoxItem * item,const QPoint & pnt); + void clicked(KviTalListBoxItem * item,const TQPoint & pnt); void pressed(KviTalListBoxItem * item); - void pressed(KviTalListBoxItem * item,const QPoint & pnt); + void pressed(KviTalListBoxItem * item,const TQPoint & pnt); void doubleClicked(KviTalListBoxItem * item); void returnPressed(KviTalListBoxItem * item); - void rightButtonClicked(KviTalListBoxItem *, const QPoint &); - void rightButtonPressed(KviTalListBoxItem *, const QPoint &); - void mouseButtonPressed(int button,KviTalListBoxItem * item,const QPoint & pos); - void mouseButtonClicked(int button,KviTalListBoxItem * item,const QPoint & pos); - void contextMenuRequested(KviTalListBoxItem * item,const QPoint & pos); + void rightButtonClicked(KviTalListBoxItem *, const TQPoint &); + void rightButtonPressed(KviTalListBoxItem *, const TQPoint &); + void mouseButtonPressed(int button,KviTalListBoxItem * item,const TQPoint & pos); + void mouseButtonClicked(int button,KviTalListBoxItem * item,const TQPoint & pos); + void contextMenuRequested(KviTalListBoxItem * item,const TQPoint & pos); void onItem(KviTalListBoxItem * i); protected slots: void redirect_highlighted(Q3ListBoxItem *); @@ -65,16 +66,16 @@ protected slots: void redirect_selectionChanged(Q3ListBoxItem * item); void redirect_currentChanged(Q3ListBoxItem * item); void redirect_clicked(Q3ListBoxItem * item); - void redirect_clicked(Q3ListBoxItem * item,const QPoint & pnt); + void redirect_clicked(Q3ListBoxItem * item,const TQPoint & pnt); void redirect_pressed(Q3ListBoxItem * item); - void redirect_pressed(Q3ListBoxItem * item,const QPoint & pnt); + void redirect_pressed(Q3ListBoxItem * item,const TQPoint & pnt); void redirect_doubleClicked(Q3ListBoxItem * item); void redirect_returnPressed(Q3ListBoxItem *); - void redirect_rightButtonClicked(Q3ListBoxItem *, const QPoint &); - void redirect_rightButtonPressed(Q3ListBoxItem *, const QPoint &); - void redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const QPoint & pos); - void redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const QPoint & pos); - void redirect_contextMenuRequested(Q3ListBoxItem * item,const QPoint & pos); + void redirect_rightButtonClicked(Q3ListBoxItem *, const TQPoint &); + void redirect_rightButtonPressed(Q3ListBoxItem *, const TQPoint &); + void redirect_mouseButtonPressed(int button,Q3ListBoxItem * item,const TQPoint & pos); + void redirect_mouseButtonClicked(int button,Q3ListBoxItem * item,const TQPoint & pos); + void redirect_contextMenuRequested(Q3ListBoxItem * item,const TQPoint & pos); void redirect_onItem(Q3ListBoxItem * i); }; @@ -102,9 +103,9 @@ public: class KVILIB_API KviTalListBoxText : public KviTalListBoxItem { public: - KviTalListBoxText(KviTalListBox* listbox, const QString & text=QString()); - KviTalListBoxText(const QString & text=QString()); - KviTalListBoxText(KviTalListBox* listbox, const QString & text, KviTalListBoxItem *after); + KviTalListBoxText(KviTalListBox* listbox, const TQString & text=TQString()); + KviTalListBoxText(const TQString & text=TQString()); + KviTalListBoxText(KviTalListBox* listbox, const TQString & text, KviTalListBoxItem *after); ~KviTalListBoxText(); int height(const KviTalListBox *) const; @@ -114,25 +115,25 @@ public: enum { RTTI = 1 }; protected: - virtual void paint(QPainter *); + virtual void paint(TQPainter *); private: - Q_DISABLE_COPY(KviTalListBoxText) + TQ_DISABLE_COPY(KviTalListBoxText) }; class KVILIB_API KviTalListBoxPixmap : public KviTalListBoxItem { public: - KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &); - KviTalListBoxPixmap(const QPixmap &); - KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap & pix, KviTalListBoxItem *after); - KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap &, const QString&); - KviTalListBoxPixmap(const QPixmap &, const QString&); - KviTalListBoxPixmap(KviTalListBox* listbox, const QPixmap & pix, const QString&, KviTalListBoxItem *after); + KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &); + KviTalListBoxPixmap(const TQPixmap &); + KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap & pix, KviTalListBoxItem *after); + KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &, const TQString&); + KviTalListBoxPixmap(const TQPixmap &, const TQString&); + KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap & pix, const TQString&, KviTalListBoxItem *after); ~KviTalListBoxPixmap(); - const QPixmap *pixmap() const { return ± } + const TQPixmap *pixmap() const { return ± } int height(const KviTalListBox *) const; int width(const KviTalListBox *) const; @@ -141,12 +142,12 @@ public: enum { RTTI = 2 }; protected: - virtual void paint(QPainter *); + virtual void paint(TQPainter *); private: - Q_DISABLE_COPY(KviTalListBoxPixmap) + TQ_DISABLE_COPY(KviTalListBoxPixmap) - QPixmap pm; + TQPixmap pm; }; #endif // _KVI_TAL_LISTBOX_QT4_H_ diff --git a/src/kvilib/tal/kvi_tal_listview.cpp b/src/kvilib/tal/kvi_tal_listview.cpp index 01b253b3..6181d804 100644 --- a/src/kvilib/tal/kvi_tal_listview.cpp +++ b/src/kvilib/tal/kvi_tal_listview.cpp @@ -29,21 +29,21 @@ #ifdef COMPILE_USE_QT4 - #include <qpainter.h> - #include <qstyle.h> - #include <q3header.h> - #include <qapplication.h> - #include <qhash.h> - #include <qstyleoption.h> - #include <qaccessible.h> + #include <tqpainter.h> + #include <tqstyle.h> + #include <tq3header.h> + #include <tqapplication.h> + #include <tqhash.h> + #include <tqstyleoption.h> + #include <tqaccessible.h> - static QStyleOptionQ3ListView getStyleOption(const Q3ListView *lv, const Q3ListViewItem *item) + static TQStyleOptionQ3ListView getStyleOption(const Q3ListView *lv, const Q3ListViewItem *item) { - QStyleOptionQ3ListView opt; + TQStyleOptionQ3ListView opt; opt.init(lv); - opt.subControls = QStyle::SC_None; - opt.activeSubControls = QStyle::SC_None; - QWidget *vp = lv->viewport(); + opt.subControls = TQStyle::SC_None; + opt.activeSubControls = TQStyle::SC_None; + TQWidget *vp = lv->viewport(); opt.viewportPalette = vp->palette(); opt.viewportBGRole = vp->backgroundRole(); opt.itemMargin = lv->itemMargin(); @@ -52,26 +52,26 @@ opt.rootIsDecorated = lv->rootIsDecorated(); bool firstItem = true; while (item) { - QStyleOptionQ3ListViewItem lvi; + TQStyleOptionQ3ListViewItem lvi; lvi.height = item->height(); lvi.totalHeight = item->totalHeight(); lvi.itemY = item->itemPos(); lvi.childCount = item->childCount(); - lvi.features = QStyleOptionQ3ListViewItem::None; - lvi.state = QStyle::State_None; + lvi.features = TQStyleOptionQ3ListViewItem::None; + lvi.state = TQStyle::State_None; if (item->isEnabled()) - lvi.state |= QStyle::State_Enabled; + lvi.state |= TQStyle::State_Enabled; if (item->isOpen()) - lvi.state |= QStyle::State_Open; + lvi.state |= TQStyle::State_Open; if (item->isExpandable()) - lvi.features |= QStyleOptionQ3ListViewItem::Expandable; + lvi.features |= TQStyleOptionQ3ListViewItem::Expandable; if (item->multiLinesEnabled()) - lvi.features |= QStyleOptionQ3ListViewItem::MultiLine; + lvi.features |= TQStyleOptionQ3ListViewItem::MultiLine; if (item->isVisible()) - lvi.features |= QStyleOptionQ3ListViewItem::Visible; - if (item->parent() && item->parent()->rtti() == 1 - && static_cast<Q3CheckListItem *>(item->parent())->type() == Q3CheckListItem::Controller) - lvi.features |= QStyleOptionQ3ListViewItem::ParentControl; + lvi.features |= TQStyleOptionQ3ListViewItem::Visible; + if (item->tqparent() && item->tqparent()->rtti() == 1 + && static_cast<Q3CheckListItem *>(item->tqparent())->type() == Q3CheckListItem::Controller) + lvi.features |= TQStyleOptionQ3ListViewItem::ParentControl; opt.items.append(lvi); if (!firstItem) { item = item->nextSibling(); @@ -83,27 +83,27 @@ return opt; } - KviTalListView::KviTalListView(QWidget * pParent) + KviTalListView::KviTalListView(TQWidget * pParent) : Q3ListView(pParent) { - connect(this,SIGNAL(selectionChanged(Q3ListViewItem *)),this,SLOT(redirect_selectionChanged(Q3ListViewItem *))); - connect(this,SIGNAL(currentChanged(Q3ListViewItem *)),this,SLOT(redirect_currentChanged(Q3ListViewItem *))); - connect(this,SIGNAL(clicked(Q3ListViewItem *)),this,SLOT(redirect_clicked(Q3ListViewItem *))); - connect(this,SIGNAL(clicked(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_clicked(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(pressed(Q3ListViewItem *)),this,SLOT(redirect_pressed(Q3ListViewItem *))); - connect(this,SIGNAL(pressed(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_pressed(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(doubleClicked(Q3ListViewItem *)),this,SLOT(redirect_doubleClicked(Q3ListViewItem *))); - connect(this,SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_doubleClicked(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(returnPressed(Q3ListViewItem *)),this,SLOT(redirect_returnPressed(Q3ListViewItem *))); - connect(this,SIGNAL(spacePressed(Q3ListViewItem *)),this,SLOT(redirect_spacePressed(Q3ListViewItem *))); - connect(this,SIGNAL(rightButtonClicked(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_rightButtonClicked(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(rightButtonPressed(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_rightButtonPressed(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(mouseButtonClicked(int,Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_mouseButtonClicked(int,Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(mouseButtonPressed(int,Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_mouseButtonPressed(int,Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(contextMenuRequested(Q3ListViewItem *,const QPoint &,int)),this,SLOT(redirect_contextMenuRequested(Q3ListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(onItem(Q3ListViewItem *)),this,SLOT(redirect_onItem(Q3ListViewItem *))); - connect(this,SIGNAL(expanded(Q3ListViewItem *)),this,SLOT(redirect_expanded(Q3ListViewItem *))); - connect(this,SIGNAL(collapsed(Q3ListViewItem *)),this,SLOT(redirect_collapsed(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(selectionChanged(Q3ListViewItem *)),this,TQT_SLOT(redirect_selectionChanged(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(currentChanged(Q3ListViewItem *)),this,TQT_SLOT(redirect_currentChanged(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(clicked(Q3ListViewItem *)),this,TQT_SLOT(redirect_clicked(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(clicked(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_clicked(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(pressed(Q3ListViewItem *)),this,TQT_SLOT(redirect_pressed(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(pressed(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_pressed(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(doubleClicked(Q3ListViewItem *)),this,TQT_SLOT(redirect_doubleClicked(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(doubleClicked(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_doubleClicked(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(returnPressed(Q3ListViewItem *)),this,TQT_SLOT(redirect_returnPressed(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(spacePressed(Q3ListViewItem *)),this,TQT_SLOT(redirect_spacePressed(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_rightButtonClicked(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(rightButtonPressed(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_rightButtonPressed(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_mouseButtonClicked(int,Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_mouseButtonPressed(int,Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(contextMenuRequested(Q3ListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_contextMenuRequested(Q3ListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(onItem(Q3ListViewItem *)),this,TQT_SLOT(redirect_onItem(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(expanded(Q3ListViewItem *)),this,TQT_SLOT(redirect_expanded(Q3ListViewItem *))); + connect(this,TQT_SIGNAL(collapsed(Q3ListViewItem *)),this,TQT_SLOT(redirect_collapsed(Q3ListViewItem *))); } void KviTalListView::redirect_selectionChanged(Q3ListViewItem * pItem) @@ -121,7 +121,7 @@ emit clicked((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_clicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_clicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit clicked((KviTalListViewItem *)pItem,pnt,uColumn); } @@ -131,7 +131,7 @@ emit pressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_pressed(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_pressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit pressed((KviTalListViewItem *)pItem,pnt,uColumn); } @@ -141,7 +141,7 @@ emit doubleClicked((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_doubleClicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_doubleClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit doubleClicked((KviTalListViewItem *)pItem,pnt,uColumn); } @@ -156,27 +156,27 @@ emit spacePressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_rightButtonClicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_rightButtonClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit rightButtonClicked((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_rightButtonPressed(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_rightButtonPressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit rightButtonPressed((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_mouseButtonClicked(int iButton,Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_mouseButtonClicked(int iButton,Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit mouseButtonClicked(iButton,(KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_mouseButtonPressed(int iButton,Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_mouseButtonPressed(int iButton,Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit mouseButtonPressed(iButton,(KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_contextMenuRequested(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_contextMenuRequested(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit contextMenuRequested((KviTalListViewItem *)pItem,pnt,uColumn); } @@ -206,43 +206,43 @@ KviTalCheckListItem *exclusive; KviTalCheckListItem::ToggleState currentState; - QHash<KviTalCheckListItem *, KviTalCheckListItem::ToggleState> statesDict; + TQHash<KviTalCheckListItem *, KviTalCheckListItem::ToggleState> statesDict; bool tristate; }; - KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *tqparent, const TQString &text, Type tt) - : KviTalListViewItem(parent, text, QString()) + : KviTalListViewItem(tqparent, text, TQString()) { myType = tt; init(); if (myType == RadioButton) { - if (parent->type() != RadioButtonController) + if (tqparent->type() != RadioButtonController) qWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller"); else - d->exclusive = parent; + d->exclusive = tqparent; } } - KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after, - const QString &text, Type tt) - : KviTalListViewItem(parent, after, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt) + : KviTalListViewItem(tqparent, after, text) { myType = tt; init(); if (myType == RadioButton) { - if (parent->type() != RadioButtonController) + if (tqparent->type() != RadioButtonController) qWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller"); else - d->exclusive = parent; + d->exclusive = tqparent; } } - KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, Type tt) - : KviTalListViewItem(parent, text, QString()) + : KviTalListViewItem(tqparent, text, TQString()) { myType = tt; if (myType == RadioButton) { @@ -252,9 +252,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, KviTalListViewItem *after, - const QString &text, Type tt) - : KviTalListViewItem(parent, after, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt) + : KviTalListViewItem(tqparent, after, text) { myType = tt; if (myType == RadioButton) { @@ -264,9 +264,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, Type tt) - : KviTalListViewItem(parent, text) + : KviTalListViewItem(tqparent, text) { myType = tt; if (tt == RadioButton) @@ -275,9 +275,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, KviTalListViewItem *after, - const QString &text, Type tt) - : KviTalListViewItem(parent, after, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalListView *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt) + : KviTalListViewItem(tqparent, after, text) { myType = tt; if (tt == RadioButton) @@ -291,18 +291,18 @@ return RTTI; } - KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, const QString &text, - const QPixmap & p) - : KviTalListViewItem(parent, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, + const TQPixmap & p) + : KviTalListViewItem(tqparent, text) { myType = RadioButtonController; setPixmap(0, p); init(); } - KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, const QString &text, - const QPixmap & p) - : KviTalListViewItem(parent, text) + KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, + const TQPixmap & p) + : KviTalListViewItem(tqparent, text) { myType = RadioButtonController; setPixmap(0, p); @@ -324,7 +324,7 @@ && d->exclusive && d->exclusive->d && d->exclusive->d->exclusive == this) d->exclusive->turnOffChild(); - d->exclusive = 0; // so the children won't try to access us. + d->exclusive = 0; // so the tqchildren won't try to access us. delete d; d = 0; } @@ -373,9 +373,9 @@ if (myType == CheckBox) { setCurrentState(s); stateChange(state()); - if (update && parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController) - ((KviTalCheckListItem*)parent())->updateController(update, store); + if (update && tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) + ((KviTalCheckListItem*)tqparent())->updateController(update, store); } else if (myType == CheckBoxController) { if (s == NoChange && childCount()) { restoreState(this); @@ -397,18 +397,18 @@ ToggleState oldState = internalState(); updateController(false, false); if (oldState != internalState() && - parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*)parent())->type() == CheckBoxController) - ((KviTalCheckListItem*)parent())->updateController(update, store); + tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) + ((KviTalCheckListItem*)tqparent())->updateController(update, store); updateController(update, store); } else { - // if there are no children we simply set the CheckBoxController and update its parent + // if there are no tqchildren we simply set the CheckBoxController and update its tqparent setCurrentState(s); stateChange(state()); - if (parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController) - ((KviTalCheckListItem*)parent())->updateController(update, store); + if (tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) + ((KviTalCheckListItem*)tqparent())->updateController(update, store); } } else { setCurrentState(s); @@ -430,7 +430,7 @@ } stateChange(state()); } - repaint(); + tqrepaint(); } void KviTalCheckListItem::setCurrentState(ToggleState s) @@ -442,9 +442,9 @@ else on = false; - //#ifndef QT_NO_ACCESSIBILITY + //#ifndef TQT_NO_ACCESSIBILITY // if (old != d->currentState && listView()) - // QAccessible::updateAccessibility(listView()->viewport(), indexOfItem(this), QAccessible::StateChanged); + // TQAccessible::updateAccessibility(listView()->viewport(), indexOfItem(this), TQAccessible::StateChanged); //#else // Q_UNUSED(old); //#endif @@ -458,7 +458,7 @@ KviTalCheckListItem::ToggleState KviTalCheckListItem::storedState(KviTalCheckListItem *key) const { - QHash<KviTalCheckListItem *, KviTalCheckListItem::ToggleState>::Iterator it = d->statesDict.find(key); + TQHash<KviTalCheckListItem *, KviTalCheckListItem::ToggleState>::Iterator it = d->statesDict.tqfind(key); if (it != d->statesDict.end()) return it.value(); else @@ -478,28 +478,28 @@ if (lv && !lv->isEnabled() || !isEnabled()) return; - QPoint pos; - int boxsize = lv->style()->pixelMetric(QStyle::PM_CheckListButtonSize, 0, lv); + TQPoint pos; + int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); if (activatedPos(pos)) { - bool parentControl = false; - if (parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController) - parentControl = true; + bool tqparentControl = false; + if (tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController) + tqparentControl = true; - int x = parentControl ? 0 : 3; + int x = tqparentControl ? 0 : 3; int align = lv->columnAlignment(0); int marg = lv->itemMargin(); int y = 0; - if (align & Qt::AlignVCenter) + if (align & TQt::AlignVCenter) y = ((height() - boxsize) / 2) + marg; else y = (lv->fontMetrics().height() + 2 + marg - boxsize) / 2; - QRect r(x, y, boxsize-3, boxsize-3); + TQRect r(x, y, boxsize-3, boxsize-3); // columns might have been swapped r.moveBy(lv->header()->sectionPos(0), 0); - if (!r.contains(pos)) + if (!r.tqcontains(pos)) return; } if ((myType == CheckBox) || (myType == CheckBoxController)) { @@ -551,13 +551,13 @@ case CheckBox: setCurrentState(storedState(key)); stateChange(state()); - repaint(); + tqrepaint(); break; case CheckBoxController: { KviTalListViewItem *item = firstChild(); int childCount = 0; while (item) { - // recursively calling restoreState for children of type CheckBox and CheckBoxController + // recursively calling restoreState for tqchildren of type CheckBox and CheckBoxController if (item->rtti() == 1 && (((KviTalCheckListItem*)item)->type() == CheckBox || ((KviTalCheckListItem*)item)->type() == CheckBoxController)) { @@ -572,7 +572,7 @@ else updateController(false); } else { - // if there are no children we retrieve the CheckBoxController state directly. + // if there are no tqchildren we retrieve the CheckBoxController state directly. setState(storedState(key), true, false); } } @@ -588,10 +588,10 @@ return; KviTalCheckListItem *controller = 0; - // checks if this CheckBoxController has another CheckBoxController as parent - if (parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController) - controller = (KviTalCheckListItem*)parent(); + // checks if this CheckBoxController has another CheckBoxController as tqparent + if (tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController) + controller = (KviTalCheckListItem*)tqparent(); ToggleState theState = Off; bool first = true; @@ -622,7 +622,7 @@ if (update && controller) { controller->updateController(update, store); } - repaint(); + tqrepaint(); } } @@ -642,7 +642,7 @@ } item = item->nextSibling(); } - // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController children. + // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController tqchildren. setStoredState(internalState() , key); } @@ -652,13 +652,13 @@ int h = height(); KviTalListView *lv = listView(); if (lv) - h = qMax(lv->style()->pixelMetric(QStyle::PM_CheckListButtonSize, 0, lv), + h = qMax(lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv), h); - h = qMax(h, QApplication::globalStrut().height()); + h = qMax(h, TQApplication::globalStrut().height()); setHeight(h); } - int KviTalCheckListItem::width(const QFontMetrics& fm, const KviTalListView* lv, int column) const + int KviTalCheckListItem::width(const TQFontMetrics& fm, const KviTalListView* lv, int column) const { int r = KviTalListViewItem::width(fm, lv, column); if (column == 0) { @@ -666,13 +666,13 @@ if (myType == RadioButtonController && pixmap(0)) { // r += 0; } else { - r += lv->style()->pixelMetric(QStyle::PM_CheckListButtonSize, 0, lv) + 4; + r += lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv) + 4; } } - return qMax(r, QApplication::globalStrut().width()); + return qMax(r, TQApplication::globalStrut().width()); } - void KviTalCheckListItem::paintCell(QPainter * p, const QColorGroup & cg, + void KviTalCheckListItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align) { if (!p) @@ -682,11 +682,11 @@ if (!lv) return; - const QPalette::ColorRole crole = lv->foregroundRole(); + const TQPalette::ColorRole crole = lv->foregroundRole(); if (cg.brush(crole) != lv->palette().brush(crole)) p->fillRect(0, 0, width, height(), cg.brush(crole)); else - lv->paintEmptyArea(p, QRect(0, 0, width, height())); + lv->paintEmptyArea(p, TQRect(0, 0, width, height())); if (column != 0) { // The rest is text, or for subclasses to change. @@ -694,77 +694,77 @@ return; } - bool parentControl = false; - if (parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController) - parentControl = true; + bool tqparentControl = false; + if (tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController) + tqparentControl = true; - QFontMetrics fm(lv->fontMetrics()); - int boxsize = lv->style()->pixelMetric(myType == RadioButtonController ? QStyle::PM_CheckListControllerSize : - QStyle::PM_CheckListButtonSize, 0, lv); + TQFontMetrics fm(lv->fontMetrics()); + int boxsize = lv->tqstyle()->tqpixelMetric(myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : + TQStyle::PM_CheckListButtonSize, 0, lv); int marg = lv->itemMargin(); int r = marg; // Draw controller / checkbox / radiobutton --------------------- - QStyle::State styleflags = QStyle::State_None; + TQStyle::State styleflags = TQStyle::State_None; if (internalState() == On) { - styleflags |= QStyle::State_On; + styleflags |= TQStyle::State_On; } else if (internalState() == NoChange) { if (myType == CheckBoxController && !isTristate()) - styleflags |= QStyle::State_Off; + styleflags |= TQStyle::State_Off; else - styleflags |= QStyle::State_NoChange; + styleflags |= TQStyle::State_NoChange; } else { - styleflags |= QStyle::State_Off; + styleflags |= TQStyle::State_Off; } if (isSelected()) - styleflags |= QStyle::State_Selected; + styleflags |= TQStyle::State_Selected; if (isEnabled() && lv->isEnabled()) - styleflags |= QStyle::State_Enabled; + styleflags |= TQStyle::State_Enabled; if (lv->window()->isActiveWindow()) - styleflags |= QStyle::State_Active; + styleflags |= TQStyle::State_Active; if (myType == RadioButtonController) { int x = 0; - if(!parentControl) + if(!tqparentControl) x += 3; if (!pixmap(0)) { - QStyleOptionQ3ListView opt = getStyleOption(lv, this); + TQStyleOptionQ3ListView opt = getStyleOption(lv, this); opt.rect.setRect(x, 0, boxsize, fm.height() + 2 + marg); opt.palette = cg; opt.state = styleflags; - lv->style()->drawPrimitive(QStyle::PE_Q3CheckListController, &opt, p, lv); + lv->tqstyle()->drawPrimitive(TQStyle::PE_Q3CheckListController, &opt, p, lv); r += boxsize + 4; } } else { Q_ASSERT(lv); //### int x = 0; int y = 0; - if (!parentControl) + if (!tqparentControl) x += 3; - if (align & Qt::AlignVCenter) + if (align & TQt::AlignVCenter) y = ((height() - boxsize) / 2) + marg; else y = (fm.height() + 2 + marg - boxsize) / 2; - QStyleOptionQ3ListView opt = getStyleOption(lv, this); + TQStyleOptionQ3ListView opt = getStyleOption(lv, this); opt.rect.setRect(x, y, boxsize, fm.height() + 2 + marg); opt.palette = cg; opt.state = styleflags; - lv->style()->drawPrimitive((myType == CheckBox || myType == CheckBoxController) - ? QStyle::PE_Q3CheckListIndicator - : QStyle::PE_Q3CheckListExclusiveIndicator, &opt, p, lv); + lv->tqstyle()->drawPrimitive((myType == CheckBox || myType == CheckBoxController) + ? TQStyle::PE_Q3CheckListIndicator + : TQStyle::PE_Q3CheckListExclusiveIndicator, &opt, p, lv); r += boxsize + 4; } // Draw text ---------------------------------------------------- p->translate(r, 0); - p->setPen(QPen(cg.text())); + p->setPen(TQPen(cg.text())); KviTalListViewItem::paintCell(p, cg, column, width - r, align); } - void KviTalCheckListItem::paintFocus(QPainter *p, const QColorGroup & cg, - const QRect & r) + void KviTalCheckListItem::paintFocus(TQPainter *p, const TQColorGroup & cg, + const TQRect & r) { bool intersect = true; KviTalListView *lv = listView(); @@ -772,19 +772,19 @@ int xdepth = lv->treeStepSize() * (depth() + (lv->rootIsDecorated() ? 1 : 0)) + lv->itemMargin(); int p = lv->header()->cellPos(lv->header()->mapToActual(0)); xdepth += p; - intersect = r.intersects(QRect(p, r.y(), xdepth - p + 1, r.height())); + intersect = r.intersects(TQRect(p, r.y(), xdepth - p + 1, r.height())); } - bool parentControl = false; - if (parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController) - parentControl = true; + bool tqparentControl = false; + if (tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController) + tqparentControl = true; if (myType != RadioButtonController && intersect && (lv->rootIsDecorated() || myType == RadioButton || - (myType == CheckBox && parentControl))) { - QRect rect; - int boxsize = lv->style()->pixelMetric(QStyle::PM_CheckListButtonSize, 0, lv); - if (lv->columnAlignment(0) == Qt::AlignCenter) { - QFontMetrics fm(lv->font()); + (myType == CheckBox && tqparentControl))) { + TQRect rect; + int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); + if (lv->columnAlignment(0) == TQt::AlignCenter) { + TQFontMetrics fm(lv->font()); int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; if (bx < 0) bx = 0; rect.setRect(r.x() + bx + 5, r.y(), r.width() - bx - 5, @@ -801,120 +801,120 @@ #include "kvi_tal_listview_qt4.moc" #else - #include <qpainter.h> - #include <qstyle.h> - #include <qheader.h> - #include <qapplication.h> + #include <tqpainter.h> + #include <tqstyle.h> + #include <tqheader.h> + #include <tqapplication.h> - KviTalListView::KviTalListView(QWidget * pParent) - : QListView(pParent) - { - connect(this,SIGNAL(selectionChanged(QListViewItem *)),this,SLOT(redirect_selectionChanged(QListViewItem *))); - connect(this,SIGNAL(currentChanged(QListViewItem *)),this,SLOT(redirect_currentChanged(QListViewItem *))); - connect(this,SIGNAL(clicked(QListViewItem *)),this,SLOT(redirect_clicked(QListViewItem *))); - connect(this,SIGNAL(clicked(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_clicked(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(pressed(QListViewItem *)),this,SLOT(redirect_pressed(QListViewItem *))); - connect(this,SIGNAL(pressed(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_pressed(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(doubleClicked(QListViewItem *)),this,SLOT(redirect_doubleClicked(QListViewItem *))); - connect(this,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_doubleClicked(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(returnPressed(QListViewItem *)),this,SLOT(redirect_returnPressed(QListViewItem *))); - connect(this,SIGNAL(spacePressed(QListViewItem *)),this,SLOT(redirect_spacePressed(QListViewItem *))); - connect(this,SIGNAL(rightButtonClicked(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_rightButtonClicked(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(rightButtonPressed(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_rightButtonPressed(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(mouseButtonClicked(int,QListViewItem *,const QPoint &,int)),this,SLOT(redirect_mouseButtonClicked(int,QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(mouseButtonPressed(int,QListViewItem *,const QPoint &,int)),this,SLOT(redirect_mouseButtonPressed(int,QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(contextMenuRequested(QListViewItem *,const QPoint &,int)),this,SLOT(redirect_contextMenuRequested(QListViewItem *,const QPoint &,int))); - connect(this,SIGNAL(onItem(QListViewItem *)),this,SLOT(redirect_onItem(QListViewItem *))); - connect(this,SIGNAL(expanded(QListViewItem *)),this,SLOT(redirect_expanded(QListViewItem *))); - connect(this,SIGNAL(collapsed(QListViewItem *)),this,SLOT(redirect_collapsed(QListViewItem *))); + KviTalListView::KviTalListView(TQWidget * pParent) + : TQListView(pParent) + { + connect(this,TQT_SIGNAL(selectionChanged(TQListViewItem *)),this,TQT_SLOT(redirect_selectionChanged(TQListViewItem *))); + connect(this,TQT_SIGNAL(currentChanged(TQListViewItem *)),this,TQT_SLOT(redirect_currentChanged(TQListViewItem *))); + connect(this,TQT_SIGNAL(clicked(TQListViewItem *)),this,TQT_SLOT(redirect_clicked(TQListViewItem *))); + connect(this,TQT_SIGNAL(clicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_clicked(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(pressed(TQListViewItem *)),this,TQT_SLOT(redirect_pressed(TQListViewItem *))); + connect(this,TQT_SIGNAL(pressed(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_pressed(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(doubleClicked(TQListViewItem *)),this,TQT_SLOT(redirect_doubleClicked(TQListViewItem *))); + connect(this,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_doubleClicked(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(returnPressed(TQListViewItem *)),this,TQT_SLOT(redirect_returnPressed(TQListViewItem *))); + connect(this,TQT_SIGNAL(spacePressed(TQListViewItem *)),this,TQT_SLOT(redirect_spacePressed(TQListViewItem *))); + connect(this,TQT_SIGNAL(rightButtonClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_rightButtonClicked(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(rightButtonPressed(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_rightButtonPressed(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(mouseButtonClicked(int,TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_mouseButtonClicked(int,TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(mouseButtonPressed(int,TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_mouseButtonPressed(int,TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(contextMenuRequested(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(redirect_contextMenuRequested(TQListViewItem *,const TQPoint &,int))); + connect(this,TQT_SIGNAL(onItem(TQListViewItem *)),this,TQT_SLOT(redirect_onItem(TQListViewItem *))); + connect(this,TQT_SIGNAL(expanded(TQListViewItem *)),this,TQT_SLOT(redirect_expanded(TQListViewItem *))); + connect(this,TQT_SIGNAL(collapsed(TQListViewItem *)),this,TQT_SLOT(redirect_collapsed(TQListViewItem *))); } - void KviTalListView::redirect_selectionChanged(QListViewItem * pItem) + void KviTalListView::redirect_selectionChanged(TQListViewItem * pItem) { emit selectionChanged((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_currentChanged(QListViewItem * pItem) + void KviTalListView::redirect_currentChanged(TQListViewItem * pItem) { emit currentChanged((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_clicked(QListViewItem * pItem) + void KviTalListView::redirect_clicked(TQListViewItem * pItem) { emit clicked((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_clicked(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_clicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit clicked((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_pressed(QListViewItem * pItem) + void KviTalListView::redirect_pressed(TQListViewItem * pItem) { emit pressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_pressed(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_pressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit pressed((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_doubleClicked(QListViewItem * pItem) + void KviTalListView::redirect_doubleClicked(TQListViewItem * pItem) { emit doubleClicked((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_doubleClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_doubleClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit doubleClicked((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_returnPressed(QListViewItem * pItem) + void KviTalListView::redirect_returnPressed(TQListViewItem * pItem) { emit returnPressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_spacePressed(QListViewItem * pItem) + void KviTalListView::redirect_spacePressed(TQListViewItem * pItem) { emit spacePressed((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_rightButtonClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_rightButtonClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit rightButtonClicked((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_rightButtonPressed(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_rightButtonPressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit rightButtonPressed((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_mouseButtonClicked(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_mouseButtonClicked(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit mouseButtonClicked(iButton,(KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_mouseButtonPressed(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_mouseButtonPressed(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit mouseButtonPressed(iButton,(KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_contextMenuRequested(QListViewItem * pItem,const QPoint &pnt,int uColumn) + void KviTalListView::redirect_contextMenuRequested(TQListViewItem * pItem,const TQPoint &pnt,int uColumn) { emit contextMenuRequested((KviTalListViewItem *)pItem,pnt,uColumn); } - void KviTalListView::redirect_onItem(QListViewItem * pItem) + void KviTalListView::redirect_onItem(TQListViewItem * pItem) { emit onItem((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_expanded(QListViewItem * pItem) + void KviTalListView::redirect_expanded(TQListViewItem * pItem) { emit expanded((KviTalListViewItem *)pItem); } - void KviTalListView::redirect_collapsed(QListViewItem * pItem) + void KviTalListView::redirect_collapsed(TQListViewItem * pItem) { emit collapsed((KviTalListViewItem *)pItem); } @@ -935,39 +935,39 @@ // ### obscenity is warranted. - KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *tqparent, const TQString &text, Type tt ) - : KviTalListViewItem( parent, text, QString::null ) + : KviTalListViewItem( tqparent, text, TQString() ) { myType = tt; init(); if ( myType == RadioButton ) { - if ( parent->type() != RadioButtonController ) + if ( tqparent->type() != RadioButtonController ) qWarning( "KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller" ); else - d->exclusive = parent; + d->exclusive = tqparent; } } - KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *parent, KviTalListViewItem *after, - const QString &text, Type tt ) - : KviTalListViewItem( parent, after, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalCheckListItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt ) + : KviTalListViewItem( tqparent, after, text ) { myType = tt; init(); if ( myType == RadioButton ) { - if ( parent->type() != RadioButtonController ) + if ( tqparent->type() != RadioButtonController ) qWarning( "KviTalCheckListItem::KviTalCheckListItem(), radio button must be " "child of a controller" ); else - d->exclusive = parent; + d->exclusive = tqparent; } } - KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text, Type tt ) - : KviTalListViewItem( parent, text, QString::null ) + : KviTalListViewItem( tqparent, text, TQString() ) { myType = tt; if ( myType == RadioButton ) { @@ -977,9 +977,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *parent, KviTalListViewItem *after, - const QString &text, Type tt ) - : KviTalListViewItem( parent, after, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt ) + : KviTalListViewItem( tqparent, after, text ) { myType = tt; if ( myType == RadioButton ) { @@ -989,9 +989,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListView *parent, const QString &text, + KviTalCheckListItem::KviTalCheckListItem( KviTalListView *tqparent, const TQString &text, Type tt ) - : KviTalListViewItem( parent, text ) + : KviTalListViewItem( tqparent, text ) { myType = tt; if ( tt == RadioButton ) @@ -1000,9 +1000,9 @@ init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListView *parent, KviTalListViewItem *after, - const QString &text, Type tt ) - : KviTalListViewItem( parent, after, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalListView *tqparent, KviTalListViewItem *after, + const TQString &text, Type tt ) + : KviTalListViewItem( tqparent, after, text ) { myType = tt; if ( tt == RadioButton ) @@ -1019,18 +1019,18 @@ return RTTI; } - KviTalCheckListItem::KviTalCheckListItem( KviTalListView *parent, const QString &text, - const QPixmap & p ) - : KviTalListViewItem( parent, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalListView *tqparent, const TQString &text, + const TQPixmap & p ) + : KviTalListViewItem( tqparent, text ) { myType = RadioButtonController; setPixmap( 0, p ); init(); } - KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *parent, const QString &text, - const QPixmap & p ) - : KviTalListViewItem( parent, text ) + KviTalCheckListItem::KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text, + const TQPixmap & p ) + : KviTalListViewItem( tqparent, text ) { myType = RadioButtonController; setPixmap( 0, p ); @@ -1056,7 +1056,7 @@ && d->exclusive && d->exclusive->d && d->exclusive->d->exclusive == this ) d->exclusive->turnOffChild(); - d->exclusive = 0; // so the children won't try to access us. + d->exclusive = 0; // so the tqchildren won't try to access us. if ( d->statesDict ) delete d->statesDict; delete d; @@ -1107,9 +1107,9 @@ if ( myType == CheckBox ) { setCurrentState( s ); stateChange( state() ); - if ( update && parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) - ((KviTalCheckListItem*)parent())->updateController( update, store ); + if ( update && tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) + ((KviTalCheckListItem*)tqparent())->updateController( update, store ); } else if ( myType == CheckBoxController ) { if ( s == NoChange && childCount()) { restoreState( (void*) this ); @@ -1131,18 +1131,18 @@ ToggleState oldState = internalState(); updateController( FALSE, FALSE ); if ( oldState != internalState() && - parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) - ((KviTalCheckListItem*)parent())->updateController( update, store ); + tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) + ((KviTalCheckListItem*)tqparent())->updateController( update, store ); updateController( update, store ); } else { - // if there are no children we simply set the CheckBoxController and update its parent + // if there are no tqchildren we simply set the CheckBoxController and update its tqparent setCurrentState( s ); stateChange( state() ); - if ( parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) - ((KviTalCheckListItem*)parent())->updateController( update, store ); + if ( tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) + ((KviTalCheckListItem*)tqparent())->updateController( update, store ); } } else { setCurrentState( s ); @@ -1164,7 +1164,7 @@ } stateChange( state() ); } - repaint(); + tqrepaint(); } void KviTalCheckListItem::setCurrentState( ToggleState s ) @@ -1176,9 +1176,9 @@ else on = FALSE; - #if defined(QT_ACCESSIBILITY_SUPPORT) + #if defined(TQT_ACCESSIBILITY_SUPPORT) if ( old != d->currentState && listView() ) - QAccessible::updateAccessibility( listView()->viewport(), indexOfItem( this ), QAccessible::StateChanged ); + TQAccessible::updateAccessibility( listView()->viewport(), indexOfItem( this ), TQAccessible::StateChanged ); #else Q_UNUSED( old ); #endif @@ -1187,7 +1187,7 @@ void KviTalCheckListItem::setStoredState( ToggleState newState, void *key ) { if ( myType == CheckBox || myType == CheckBoxController ) - d->statesDict->replace( key, new ToggleState(newState) ); + d->statesDict->tqreplace( key, new ToggleState(newState) ); } KviTalCheckListItem::ToggleState KviTalCheckListItem::storedState( void *key ) const @@ -1195,7 +1195,7 @@ if ( !d->statesDict ) return Off; - ToggleState *foundState = d->statesDict->find( key ); + ToggleState *foundState = d->statesDict->tqfind( key ); if ( foundState ) return ToggleState( *foundState ); else @@ -1215,15 +1215,15 @@ if ( lv && !lv->isEnabled() || !isEnabled() ) return; - QPoint pos; - int boxsize = lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv); + TQPoint pos; + int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( activatedPos( pos ) ) { - bool parentControl = FALSE; - if ( parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) - parentControl = TRUE; + bool tqparentControl = FALSE; + if ( tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController ) + tqparentControl = TRUE; - int x = parentControl ? 0 : 3; + int x = tqparentControl ? 0 : 3; int align = lv->columnAlignment( 0 ); int marg = lv->itemMargin(); int y = 0; @@ -1233,10 +1233,10 @@ else y = (lv->fontMetrics().height() + 2 + marg - boxsize) / 2; - QRect r( x, y, boxsize-3, boxsize-3 ); + TQRect r( x, y, boxsize-3, boxsize-3 ); // columns might have been swapped r.moveBy( lv->header()->sectionPos( 0 ), 0 ); - if ( !r.contains( pos ) ) + if ( !r.tqcontains( pos ) ) return; } if ( ( myType == CheckBox ) || ( myType == CheckBoxController) ) { @@ -1287,13 +1287,13 @@ case CheckBox: setCurrentState( storedState( key ) ); stateChange( state() ); - repaint(); + tqrepaint(); break; case CheckBoxController: { KviTalListViewItem *item = firstChild(); int childCount = 0; while ( item ) { - // recursively calling restoreState for children of type CheckBox and CheckBoxController + // recursively calling restoreState for tqchildren of type CheckBox and CheckBoxController if ( item->rtti() == 1 && ( ((KviTalCheckListItem*)item)->type() == CheckBox || ((KviTalCheckListItem*)item)->type() == CheckBoxController ) ) { @@ -1308,7 +1308,7 @@ else updateController( FALSE ); } else { - // if there are no children we retrieve the CheckBoxController state directly. + // if there are no tqchildren we retrieve the CheckBoxController state directly. setState( storedState( key ), TRUE, FALSE ); } } @@ -1324,10 +1324,10 @@ return; KviTalCheckListItem *controller = 0; - // checks if this CheckBoxController has another CheckBoxController as parent - if ( parent() && parent()->rtti() == 1 - && ((KviTalCheckListItem*)parent())->type() == CheckBoxController ) - controller = (KviTalCheckListItem*)parent(); + // checks if this CheckBoxController has another CheckBoxController as tqparent + if ( tqparent() && tqparent()->rtti() == 1 + && ((KviTalCheckListItem*)tqparent())->type() == CheckBoxController ) + controller = (KviTalCheckListItem*)tqparent(); ToggleState theState = Off; bool first = TRUE; @@ -1358,7 +1358,7 @@ if ( update && controller ) { controller->updateController( update, store ); } - repaint(); + tqrepaint(); } } @@ -1378,7 +1378,7 @@ } item = item->nextSibling(); } - // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController children. + // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController tqchildren. setStoredState( internalState() , key ); } @@ -1388,13 +1388,13 @@ int h = height(); KviTalListView *lv = listView(); if ( lv ) - h = QMAX( lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv), + h = TQMAX( lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv), h ); - h = QMAX( h, QApplication::globalStrut().height() ); + h = TQMAX( h, TQApplication::globalStrut().height() ); setHeight( h ); } - int KviTalCheckListItem::width( const QFontMetrics& fm, const KviTalListView* lv, int column) const + int KviTalCheckListItem::width( const TQFontMetrics& fm, const KviTalListView* lv, int column) const { int r = KviTalListViewItem::width( fm, lv, column ); if ( column == 0 ) { @@ -1402,13 +1402,13 @@ if ( myType == RadioButtonController && pixmap( 0 ) ) { // r += 0; } else { - r += lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv) + 4; + r += lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; } } - return QMAX( r, QApplication::globalStrut().width() ); + return TQMAX( r, TQApplication::globalStrut().width() ); } - void KviTalCheckListItem::paintCell( QPainter * p, const QColorGroup & cg, + void KviTalCheckListItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { if ( !p ) @@ -1419,11 +1419,11 @@ return; const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode ); - if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) ) + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); + if ( cg.brush( crole ) != lv->tqcolorGroup().brush( crole ) ) p->fillRect( 0, 0, width, height(), cg.brush( crole ) ); else - lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) ); + lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); if ( column != 0 ) { // The rest is text, or for subclasses to change. @@ -1431,50 +1431,50 @@ return; } - bool parentControl = FALSE; - if ( parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) - parentControl = TRUE; + bool tqparentControl = FALSE; + if ( tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController ) + tqparentControl = TRUE; - QFontMetrics fm( lv->fontMetrics() ); - int boxsize = lv->style().pixelMetric( myType == RadioButtonController ? QStyle::PM_CheckListControllerSize : - QStyle::PM_CheckListButtonSize, lv); + TQFontMetrics fm( lv->fontMetrics() ); + int boxsize = lv->tqstyle().tqpixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : + TQStyle::PM_CheckListButtonSize, lv); int marg = lv->itemMargin(); int r = marg; // Draw controller / checkbox / radiobutton --------------------- - int styleflags = QStyle::Style_Default; + int styleflags = TQStyle::Style_Default; if ( internalState() == On ) { - styleflags |= QStyle::Style_On; + styleflags |= TQStyle::Style_On; } else if ( internalState() == NoChange ) { if ( myType == CheckBoxController && !isTristate() ) - styleflags |= QStyle::Style_Off; + styleflags |= TQStyle::Style_Off; else - styleflags |= QStyle::Style_NoChange; + styleflags |= TQStyle::Style_NoChange; } else { - styleflags |= QStyle::Style_Off; + styleflags |= TQStyle::Style_Off; } if ( isSelected() ) - styleflags |= QStyle::Style_Selected; + styleflags |= TQStyle::Style_Selected; if ( isEnabled() && lv->isEnabled() ) - styleflags |= QStyle::Style_Enabled; + styleflags |= TQStyle::Style_Enabled; if ( myType == RadioButtonController ) { int x = 0; - if(!parentControl) + if(!tqparentControl) x += 3; if ( !pixmap( 0 ) ) { - lv->style().drawPrimitive(QStyle::PE_CheckListController, p, - QRect(x, 0, boxsize, + lv->tqstyle().tqdrawPrimitive(TQStyle::PE_CheckListController, p, + TQRect(x, 0, boxsize, fm.height() + 2 + marg), - cg, styleflags, QStyleOption(this)); + cg, styleflags, TQStyleOption(this)); r += boxsize + 4; } } else { Q_ASSERT( lv ); //### int x = 0; int y = 0; - if ( !parentControl ) + if ( !tqparentControl ) x += 3; if ( align & AlignVCenter ) y = ( ( height() - boxsize ) / 2 ) + marg; @@ -1482,26 +1482,26 @@ y = (fm.height() + 2 + marg - boxsize) / 2; if ( ( myType == CheckBox ) || ( myType == CheckBoxController ) ) { - lv->style().drawPrimitive(QStyle::PE_CheckListIndicator, p, - QRect(x, y, boxsize, + lv->tqstyle().tqdrawPrimitive(TQStyle::PE_CheckListIndicator, p, + TQRect(x, y, boxsize, fm.height() + 2 + marg), - cg, styleflags, QStyleOption(this)); + cg, styleflags, TQStyleOption(this)); } else { //radio button look - lv->style().drawPrimitive(QStyle::PE_CheckListExclusiveIndicator, - p, QRect(x, y, boxsize, + lv->tqstyle().tqdrawPrimitive(TQStyle::PE_CheckListExclusiveIndicator, + p, TQRect(x, y, boxsize, fm.height() + 2 + marg), - cg, styleflags, QStyleOption(this)); + cg, styleflags, TQStyleOption(this)); } r += boxsize + 4; } // Draw text ---------------------------------------------------- p->translate( r, 0 ); - p->setPen( QPen( cg.text() ) ); + p->setPen( TQPen( cg.text() ) ); KviTalListViewItem::paintCell( p, cg, column, width - r, align ); } - void KviTalCheckListItem::paintFocus( QPainter *p, const QColorGroup & cg,const QRect & r ) + void KviTalCheckListItem::paintFocus( TQPainter *p, const TQColorGroup & cg,const TQRect & r ) { bool intersect = TRUE; KviTalListView *lv = listView(); @@ -1509,19 +1509,19 @@ int xdepth = lv->treeStepSize() * ( depth() + ( lv->rootIsDecorated() ? 1 : 0) ) + lv->itemMargin(); int p = lv->header()->cellPos( lv->header()->mapToActual( 0 ) ); xdepth += p; - intersect = r.intersects( QRect( p, r.y(), xdepth - p + 1, r.height() ) ); + intersect = r.intersects( TQRect( p, r.y(), xdepth - p + 1, r.height() ) ); } - bool parentControl = FALSE; - if ( parent() && parent()->rtti() == 1 && - ((KviTalCheckListItem*) parent())->type() == RadioButtonController ) - parentControl = TRUE; + bool tqparentControl = FALSE; + if ( tqparent() && tqparent()->rtti() == 1 && + ((KviTalCheckListItem*) tqparent())->type() == RadioButtonController ) + tqparentControl = TRUE; if ( myType != RadioButtonController && intersect && (lv->rootIsDecorated() || myType == RadioButton || - (myType == CheckBox && parentControl) ) ) { - QRect rect; - int boxsize = lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv); + (myType == CheckBox && tqparentControl) ) ) { + TQRect rect; + int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); if ( lv->columnAlignment(0) == AlignCenter ) { - QFontMetrics fm( lv->font() ); + TQFontMetrics fm( lv->font() ); int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; if ( bx < 0 ) bx = 0; rect.setRect( r.x() + bx + 5, r.y(), r.width() - bx - 5, diff --git a/src/kvilib/tal/kvi_tal_listview.h b/src/kvilib/tal/kvi_tal_listview.h index 9b95e2f8..0bf48740 100644 --- a/src/kvilib/tal/kvi_tal_listview.h +++ b/src/kvilib/tal/kvi_tal_listview.h @@ -28,13 +28,13 @@ // // This is the only reasonable CROSS-QT3-QT4-COMPATIBLE implementation -// of QListView I've been able to find. -// Note that using macros for the items will NOT work since moc +// of TQListView I've been able to find. +// Note that using macros for the items will NOT work since tqmoc // doesn't expand them. Note also that KviTalCheckListItem must -// be fully reimplemented and not be inherited from QCheckListItem +// be fully reimplemented and not be inherited from TQCheckListItem // to build up a consistent item object hierarchy. To complete -// the obscenity, we need TWO COMPLETE implementations: one for Qt3 -// and one for Qt4... bleah :D +// the obscenity, we need TWO COMPLETE implementations: one for TQt3 +// and one for TQt4... bleah :D // // The code for KviTalCheckListItem is adapted from qlistview.h/cpp // present in qt 3.3.6 AND in qt 4.1.2. diff --git a/src/kvilib/tal/kvi_tal_listview_qt3.h b/src/kvilib/tal/kvi_tal_listview_qt3.h index 4fe4a766..75b062a4 100644 --- a/src/kvilib/tal/kvi_tal_listview_qt3.h +++ b/src/kvilib/tal/kvi_tal_listview_qt3.h @@ -29,93 +29,94 @@ #include "kvi_qstring.h" -#include <qlistview.h> +#include <tqlistview.h> class KviTalListViewItem; -class KVILIB_API KviTalListView : public QListView +class KVILIB_API KviTalListView : public TQListView { friend class KviTalCheckListItem; Q_OBJECT + TQ_OBJECT public: - KviTalListView(QWidget * pParent); + KviTalListView(TQWidget * pParent); virtual ~KviTalListView() {}; public: - // Shadow the internal Qt methods - KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)QListView::firstChild(); }; - KviTalListViewItem * lastItem() const { return (KviTalListViewItem *)QListView::lastItem(); }; - KviTalListViewItem * selectedItem() const { return (KviTalListViewItem *)QListView::selectedItem(); }; - KviTalListViewItem * currentItem() const { return (KviTalListViewItem *)QListView::currentItem(); }; - KviTalListViewItem * itemAt(const QPoint &pnt) const { return (KviTalListViewItem *)QListView::itemAt(pnt); }; + // Shadow the internal TQt methods + KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)TQListView::firstChild(); }; + KviTalListViewItem * lastItem() const { return (KviTalListViewItem *)TQListView::lastItem(); }; + KviTalListViewItem * selectedItem() const { return (KviTalListViewItem *)TQListView::selectedItem(); }; + KviTalListViewItem * currentItem() const { return (KviTalListViewItem *)TQListView::currentItem(); }; + KviTalListViewItem * itemAt(const TQPoint &pnt) const { return (KviTalListViewItem *)TQListView::itemAt(pnt); }; signals: void selectionChanged(KviTalListViewItem * pItem); void currentChanged(KviTalListViewItem * pItem); void clicked(KviTalListViewItem * pItem); - void clicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void clicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void pressed(KviTalListViewItem * pItem); - void pressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void pressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void doubleClicked(KviTalListViewItem * pItem); - void doubleClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void doubleClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void returnPressed(KviTalListViewItem * pItem); void spacePressed(KviTalListViewItem * pItem); - void rightButtonClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void rightButtonPressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void contextMenuRequested(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void rightButtonClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void rightButtonPressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void contextMenuRequested(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void onItem(KviTalListViewItem * pItem); void expanded(KviTalListViewItem * pItem); void collapsed(KviTalListViewItem * pItem); protected slots: - void redirect_selectionChanged(QListViewItem * pItem); - void redirect_currentChanged(QListViewItem * pItem); - void redirect_clicked(QListViewItem * pItem); - void redirect_clicked(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_pressed(QListViewItem * pItem); - void redirect_pressed(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_doubleClicked(QListViewItem * pItem); - void redirect_doubleClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_returnPressed(QListViewItem * pItem); - void redirect_spacePressed(QListViewItem * pItem); - void redirect_rightButtonClicked(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_rightButtonPressed(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_mouseButtonClicked(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_mouseButtonPressed(int iButton,QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_contextMenuRequested(QListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_onItem(QListViewItem * pItem); - void redirect_expanded(QListViewItem * pItem); - void redirect_collapsed(QListViewItem * pItem); + void redirect_selectionChanged(TQListViewItem * pItem); + void redirect_currentChanged(TQListViewItem * pItem); + void redirect_clicked(TQListViewItem * pItem); + void redirect_clicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_pressed(TQListViewItem * pItem); + void redirect_pressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_doubleClicked(TQListViewItem * pItem); + void redirect_doubleClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_returnPressed(TQListViewItem * pItem); + void redirect_spacePressed(TQListViewItem * pItem); + void redirect_rightButtonClicked(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_rightButtonPressed(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_mouseButtonClicked(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_mouseButtonPressed(int iButton,TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_contextMenuRequested(TQListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_onItem(TQListViewItem * pItem); + void redirect_expanded(TQListViewItem * pItem); + void redirect_collapsed(TQListViewItem * pItem); }; -class KVILIB_API KviTalListViewItem : public QListViewItem +class KVILIB_API KviTalListViewItem : public TQListViewItem { public: KviTalListViewItem(KviTalListView * pParent) - : QListViewItem(pParent) {}; + : TQListViewItem(pParent) {}; KviTalListViewItem(KviTalListViewItem * pParent) - : QListViewItem(pParent) {}; + : TQListViewItem(pParent) {}; KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter) - : QListViewItem(pParent,pAfter) {}; + : TQListViewItem(pParent,pAfter) {}; KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter) - : QListViewItem(pParent,pAfter) {}; - KviTalListViewItem(KviTalListView * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty) - : QListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; - KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty) - : QListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; - KviTalListViewItem(KviTalListViewItem * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty) - : QListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4) {}; - KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty) - : QListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4) {}; + : TQListViewItem(pParent,pAfter) {}; + KviTalListViewItem(KviTalListView * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty) + : TQListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; + KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty) + : TQListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; + KviTalListViewItem(KviTalListViewItem * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty) + : TQListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4) {}; + KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty) + : TQListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4) {}; virtual ~KviTalListViewItem() {}; public: - // Shadow the internal Qt methods - KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)QListViewItem::firstChild(); }; - KviTalListViewItem * nextSibling() const { return (KviTalListViewItem *)QListViewItem::nextSibling(); }; - KviTalListViewItem * parent() const { return (KviTalListViewItem *)QListViewItem::parent(); }; - KviTalListView * listView() const { return (KviTalListView *)QListViewItem::listView(); }; - KviTalListViewItem * itemAbove() { return (KviTalListViewItem *)QListViewItem::itemAbove(); }; - KviTalListViewItem * itemBelow() { return (KviTalListViewItem *)QListViewItem::itemBelow(); }; + // Shadow the internal TQt methods + KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)TQListViewItem::firstChild(); }; + KviTalListViewItem * nextSibling() const { return (KviTalListViewItem *)TQListViewItem::nextSibling(); }; + KviTalListViewItem * tqparent() const { return (KviTalListViewItem *)TQListViewItem::tqparent(); }; + KviTalListView * listView() const { return (KviTalListView *)TQListViewItem::listView(); }; + KviTalListViewItem * itemAbove() { return (KviTalListViewItem *)TQListViewItem::itemAbove(); }; + KviTalListViewItem * itemBelow() { return (KviTalListViewItem *)TQListViewItem::itemBelow(); }; }; struct KviTalCheckListItemPrivate; @@ -132,27 +133,27 @@ public: }; enum ToggleState { Off, NoChange, On }; - KviTalCheckListItem(KviTalCheckListItem *parent, const QString &text,Type = RadioButtonController); - KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after,const QString &text, Type = RadioButtonController); - KviTalCheckListItem( KviTalListViewItem *parent, const QString &text,Type = RadioButtonController ); - KviTalCheckListItem( KviTalListViewItem *parent, KviTalListViewItem *after,const QString &text, Type = RadioButtonController ); - KviTalCheckListItem( KviTalListView *parent, const QString &text,Type = RadioButtonController ); - KviTalCheckListItem( KviTalListView *parent, KviTalListViewItem *after,const QString &text, Type = RadioButtonController ); - KviTalCheckListItem( KviTalListViewItem *parent, const QString &text,const QPixmap & ); - KviTalCheckListItem( KviTalListView *parent, const QString &text,const QPixmap & ); + KviTalCheckListItem(KviTalCheckListItem *tqparent, const TQString &text,Type = RadioButtonController); + KviTalCheckListItem(KviTalCheckListItem *tqparent, KviTalListViewItem *after,const TQString &text, Type = RadioButtonController); + KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text,Type = RadioButtonController ); + KviTalCheckListItem( KviTalListViewItem *tqparent, KviTalListViewItem *after,const TQString &text, Type = RadioButtonController ); + KviTalCheckListItem( KviTalListView *tqparent, const TQString &text,Type = RadioButtonController ); + KviTalCheckListItem( KviTalListView *tqparent, KviTalListViewItem *after,const TQString &text, Type = RadioButtonController ); + KviTalCheckListItem( KviTalListViewItem *tqparent, const TQString &text,const TQPixmap & ); + KviTalCheckListItem( KviTalListView *tqparent, const TQString &text,const TQPixmap & ); ~KviTalCheckListItem(); - void paintCell( QPainter *,const QColorGroup & cg,int column, int width, int alignment ); - virtual void paintFocus( QPainter *, const QColorGroup & cg, - const QRect & r ); - int width( const QFontMetrics&, const KviTalListView*, int column) const; + void paintCell( TQPainter *,const TQColorGroup & cg,int column, int width, int tqalignment ); + virtual void paintFocus( TQPainter *, const TQColorGroup & cg, + const TQRect & r ); + int width( const TQFontMetrics&, const KviTalListView*, int column) const; void setup(); virtual void setOn( bool ); // ### should be replaced by setChecked in ver4 bool isOn() const { return on; } Type type() const { return myType; } - QString text() const { return KviTalListViewItem::text( 0 ); } - QString text( int n ) const { return KviTalListViewItem::text( n ); } + TQString text() const { return KviTalListViewItem::text( 0 ); } + TQString text( int n ) const { return KviTalListViewItem::text( n ); } void setTristate( bool ); bool isTristate() const; @@ -185,6 +186,6 @@ private: }; -#define KviTalListViewItemIterator QListViewItemIterator +#define KviTalListViewItemIterator TQListViewItemIterator #endif // _KVI_TAL_LISTVIEW_QT3_H_ diff --git a/src/kvilib/tal/kvi_tal_listview_qt4.h b/src/kvilib/tal/kvi_tal_listview_qt4.h index e6ccc829..d6f2bba6 100644 --- a/src/kvilib/tal/kvi_tal_listview_qt4.h +++ b/src/kvilib/tal/kvi_tal_listview_qt4.h @@ -29,7 +29,7 @@ #include "kvi_qstring.h" -#include <q3listview.h> +#include <tq3listview.h> class KviTalListViewItem; @@ -38,32 +38,33 @@ class KVILIB_API KviTalListView : public Q3ListView { friend class KviTalCheckListItem; Q_OBJECT + TQ_OBJECT public: - KviTalListView(QWidget * pParent); + KviTalListView(TQWidget * pParent); virtual ~KviTalListView() {}; public: - // Shadow the internal Qt methods + // Shadow the internal TQt methods KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)Q3ListView::firstChild(); }; KviTalListViewItem * lastItem() const { return (KviTalListViewItem *)Q3ListView::lastItem(); }; KviTalListViewItem * selectedItem() const { return (KviTalListViewItem *)Q3ListView::selectedItem(); }; KviTalListViewItem * currentItem() const { return (KviTalListViewItem *)Q3ListView::currentItem(); }; - KviTalListViewItem * itemAt(const QPoint &pnt) const { return (KviTalListViewItem *)Q3ListView::itemAt(pnt); }; + KviTalListViewItem * itemAt(const TQPoint &pnt) const { return (KviTalListViewItem *)Q3ListView::itemAt(pnt); }; signals: void selectionChanged(KviTalListViewItem * pItem); void currentChanged(KviTalListViewItem * pItem); void clicked(KviTalListViewItem * pItem); - void clicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void clicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void pressed(KviTalListViewItem * pItem); - void pressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void pressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void doubleClicked(KviTalListViewItem * pItem); - void doubleClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void doubleClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void returnPressed(KviTalListViewItem * pItem); void spacePressed(KviTalListViewItem * pItem); - void rightButtonClicked(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void rightButtonPressed(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); - void contextMenuRequested(KviTalListViewItem * pItem,const QPoint &pnt,int uColumn); + void rightButtonClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void rightButtonPressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void mouseButtonClicked(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void mouseButtonPressed(int iButton,KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); + void contextMenuRequested(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn); void onItem(KviTalListViewItem * pItem); void expanded(KviTalListViewItem * pItem); void collapsed(KviTalListViewItem * pItem); @@ -71,18 +72,18 @@ protected slots: void redirect_selectionChanged(Q3ListViewItem * pItem); void redirect_currentChanged(Q3ListViewItem * pItem); void redirect_clicked(Q3ListViewItem * pItem); - void redirect_clicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); + void redirect_clicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); void redirect_pressed(Q3ListViewItem * pItem); - void redirect_pressed(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); + void redirect_pressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); void redirect_doubleClicked(Q3ListViewItem * pItem); - void redirect_doubleClicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); + void redirect_doubleClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); void redirect_returnPressed(Q3ListViewItem * pItem); void redirect_spacePressed(Q3ListViewItem * pItem); - void redirect_rightButtonClicked(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_rightButtonPressed(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_mouseButtonClicked(int iButton,Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_mouseButtonPressed(int iButton,Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); - void redirect_contextMenuRequested(Q3ListViewItem * pItem,const QPoint &pnt,int uColumn); + void redirect_rightButtonClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_rightButtonPressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_mouseButtonClicked(int iButton,Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_mouseButtonPressed(int iButton,Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); + void redirect_contextMenuRequested(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn); void redirect_onItem(Q3ListViewItem * pItem); void redirect_expanded(Q3ListViewItem * pItem); void redirect_collapsed(Q3ListViewItem * pItem); @@ -101,19 +102,19 @@ public: : Q3ListViewItem(pParent,pAfter) {}; KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter) : Q3ListViewItem(pParent,pAfter) {}; - KviTalListViewItem(KviTalListView * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty) + KviTalListViewItem(KviTalListView * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty) : Q3ListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; - KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty,const QString &szLabel5 = KviQString::empty) + KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty,const TQString &szLabel5 = KviTQString::empty) : Q3ListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4,szLabel5) {}; - KviTalListViewItem(KviTalListViewItem * pParent,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty) + KviTalListViewItem(KviTalListViewItem * pParent,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty) : Q3ListViewItem(pParent,szLabel1,szLabel2,szLabel3,szLabel4) {}; - KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const QString &szLabel1,const QString &szLabel2 = KviQString::empty,const QString &szLabel3 = KviQString::empty,const QString &szLabel4 = KviQString::empty) + KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter,const TQString &szLabel1,const TQString &szLabel2 = KviTQString::empty,const TQString &szLabel3 = KviTQString::empty,const TQString &szLabel4 = KviTQString::empty) : Q3ListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4) {}; public: - // Shadow the internal Qt methods + // Shadow the internal TQt methods KviTalListViewItem * firstChild() const { return (KviTalListViewItem *)Q3ListViewItem::firstChild(); }; KviTalListViewItem * nextSibling() const { return (KviTalListViewItem *)Q3ListViewItem::nextSibling(); }; - KviTalListViewItem * parent() const { return (KviTalListViewItem *)Q3ListViewItem::parent(); }; + KviTalListViewItem * tqparent() const { return (KviTalListViewItem *)Q3ListViewItem::tqparent(); }; KviTalListView * listView() const { return (KviTalListView *)Q3ListViewItem::listView(); }; KviTalListViewItem * itemAbove() { return (KviTalListViewItem *)Q3ListViewItem::itemAbove(); }; KviTalListViewItem * itemBelow() { return (KviTalListViewItem *)Q3ListViewItem::itemBelow(); }; @@ -132,36 +133,36 @@ public: enum ToggleState { Off, NoChange, On }; - KviTalCheckListItem(KviTalCheckListItem *parent, const QString &text, + KviTalCheckListItem(KviTalCheckListItem *tqparent, const TQString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after, - const QString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListViewItem *parent, const QString &text, + KviTalCheckListItem(KviTalCheckListItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type = RadioButtonController); + KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListViewItem *parent, KviTalListViewItem *after, - const QString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListView *parent, const QString &text, + KviTalCheckListItem(KviTalListViewItem *tqparent, KviTalListViewItem *after, + const TQString &text, Type = RadioButtonController); + KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListView *parent, KviTalListViewItem *after, - const QString &text, Type = RadioButtonController); - KviTalCheckListItem(KviTalListViewItem *parent, const QString &text, - const QPixmap &); - KviTalCheckListItem(KviTalListView *parent, const QString &text, - const QPixmap &); + KviTalCheckListItem(KviTalListView *tqparent, KviTalListViewItem *after, + const TQString &text, Type = RadioButtonController); + KviTalCheckListItem(KviTalListViewItem *tqparent, const TQString &text, + const TQPixmap &); + KviTalCheckListItem(KviTalListView *tqparent, const TQString &text, + const TQPixmap &); ~KviTalCheckListItem(); - void paintCell(QPainter *, const QColorGroup & cg, - int column, int width, int alignment); - virtual void paintFocus(QPainter *, const QColorGroup &cg, - const QRect & r); - int width(const QFontMetrics&, const KviTalListView*, int column) const; + void paintCell(TQPainter *, const TQColorGroup & cg, + int column, int width, int tqalignment); + virtual void paintFocus(TQPainter *, const TQColorGroup &cg, + const TQRect & r); + int width(const TQFontMetrics&, const KviTalListView*, int column) const; void setup(); virtual void setOn(bool); bool isOn() const { return on; } Type type() const { return myType; } - QString text() const { return KviTalListViewItem::text(0); } - QString text(int n) const { return KviTalListViewItem::text(n); } + TQString text() const { return KviTalListViewItem::text(0); } + TQString text(int n) const { return KviTalListViewItem::text(n); } void setTristate(bool); bool isTristate() const; diff --git a/src/kvilib/tal/kvi_tal_mainwindow.cpp b/src/kvilib/tal/kvi_tal_mainwindow.cpp index c2e52b2d..ff2e7b17 100644 --- a/src/kvilib/tal/kvi_tal_mainwindow.cpp +++ b/src/kvilib/tal/kvi_tal_mainwindow.cpp @@ -27,7 +27,7 @@ #ifdef COMPILE_KDE_SUPPORT - KviTalMainWindow::KviTalMainWindow(QWidget * par,const char * nam) + KviTalMainWindow::KviTalMainWindow(TQWidget * par,const char * nam) : KMainWindow(par,nam) { } @@ -37,8 +37,8 @@ #else #ifdef COMPILE_USE_QT4 - KviTalMainWindow::KviTalMainWindow(QWidget * par,const char * nam) - : QMainWindow(par,nam) + KviTalMainWindow::KviTalMainWindow(TQWidget * par,const char * nam) + : TQMainWindow(par,nam) { } @@ -49,13 +49,13 @@ void KviTalMainWindow::setUsesBigPixmaps(bool b) { - if(b)setIconSize(QSize(48,48)); - else setIconSize(QSize(24,24)); + if(b)setIconSize(TQSize(48,48)); + else setIconSize(TQSize(24,24)); } #include "kvi_tal_mainwindow_qt4.moc" #else - KviTalMainWindow::KviTalMainWindow(QWidget * par,const char * nam) - : QMainWindow(par,nam) + KviTalMainWindow::KviTalMainWindow(TQWidget * par,const char * nam) + : TQMainWindow(par,nam) { } #include "kvi_tal_mainwindow_qt3.moc" diff --git a/src/kvilib/tal/kvi_tal_mainwindow_kde.h b/src/kvilib/tal/kvi_tal_mainwindow_kde.h index 9f38aede..1edcba85 100644 --- a/src/kvilib/tal/kvi_tal_mainwindow_kde.h +++ b/src/kvilib/tal/kvi_tal_mainwindow_kde.h @@ -28,8 +28,9 @@ class KVILIB_API KviTalMainWindow : public KMainWindow { Q_OBJECT + TQ_OBJECT public: - KviTalMainWindow(QWidget * par,const char * nam); + KviTalMainWindow(TQWidget * par,const char * nam); ~KviTalMainWindow(); }; diff --git a/src/kvilib/tal/kvi_tal_mainwindow_qt3.h b/src/kvilib/tal/kvi_tal_mainwindow_qt3.h index d328774f..34dc9cb9 100644 --- a/src/kvilib/tal/kvi_tal_mainwindow_qt3.h +++ b/src/kvilib/tal/kvi_tal_mainwindow_qt3.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_MAINWINDOW_QT_H_ -#define _KVI_TAL_MAINWINDOW_QT_H_ +#ifndef _KVI_TAL_MAINWINDOW_TQT_H_ +#define _KVI_TAL_MAINWINDOW_TQT_H_ // // File : kvi_tal_mainwindow_qt.h @@ -23,14 +23,15 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include <qmainwindow.h> +#include <tqmainwindow.h> -class KVILIB_API KviTalMainWindow : public QMainWindow +class KVILIB_API KviTalMainWindow : public TQMainWindow { Q_OBJECT + TQ_OBJECT public: - KviTalMainWindow(QWidget * par,const char * nam); + KviTalMainWindow(TQWidget * par,const char * nam); ~KviTalMainWindow(); }; -#endif // _KVI_TAL_MAINWINDOW_QT_H_ +#endif // _KVI_TAL_MAINWINDOW_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_mainwindow_qt4.h b/src/kvilib/tal/kvi_tal_mainwindow_qt4.h index b6c2c1be..9669cb27 100644 --- a/src/kvilib/tal/kvi_tal_mainwindow_qt4.h +++ b/src/kvilib/tal/kvi_tal_mainwindow_qt4.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_MAINWINDOW_QT_H_ -#define _KVI_TAL_MAINWINDOW_QT_H_ +#ifndef _KVI_TAL_MAINWINDOW_TQT_H_ +#define _KVI_TAL_MAINWINDOW_TQT_H_ // // File : kvi_tal_mainwindow_qt.h @@ -23,17 +23,18 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include <qmainwindow.h> +#include <tqmainwindow.h> -class KVILIB_API KviTalMainWindow : public QMainWindow +class KVILIB_API KviTalMainWindow : public TQMainWindow { Q_OBJECT + TQ_OBJECT public: - KviTalMainWindow(QWidget * par,const char * nam); + KviTalMainWindow(TQWidget * par,const char * nam); ~KviTalMainWindow(); public: bool usesBigPixmaps(); void setUsesBigPixmaps(bool b); }; -#endif // _KVI_TAL_MAINWINDOW_QT_H_ +#endif // _KVI_TAL_MAINWINDOW_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_menubar.cpp b/src/kvilib/tal/kvi_tal_menubar.cpp index 0fbb28be..4db85f74 100644 --- a/src/kvilib/tal/kvi_tal_menubar.cpp +++ b/src/kvilib/tal/kvi_tal_menubar.cpp @@ -27,7 +27,7 @@ #ifdef COMPILE_KDE_SUPPORT - KviTalMenuBar::KviTalMenuBar(QWidget * par,const char * nam) + KviTalMenuBar::KviTalMenuBar(TQWidget * par,const char * nam) : KMenuBar(par,nam) { } @@ -40,11 +40,11 @@ #else - KviTalMenuBar::KviTalMenuBar(QWidget * par,const char * nam) + KviTalMenuBar::KviTalMenuBar(TQWidget * par,const char * nam) #ifdef COMPILE_USE_QT4 - : QMenuBar(par) + : TQMenuBar(par) #else - : QMenuBar(par,nam) + : TQMenuBar(par,nam) #endif { } diff --git a/src/kvilib/tal/kvi_tal_menubar_kde.h b/src/kvilib/tal/kvi_tal_menubar_kde.h index e345d221..2889d9ee 100644 --- a/src/kvilib/tal/kvi_tal_menubar_kde.h +++ b/src/kvilib/tal/kvi_tal_menubar_kde.h @@ -27,8 +27,9 @@ class KVILIB_API KviTalMenuBar : public KMenuBar { Q_OBJECT + TQ_OBJECT public: - KviTalMenuBar(QWidget * par,const char * nam); + KviTalMenuBar(TQWidget * par,const char * nam); ~KviTalMenuBar(); }; diff --git a/src/kvilib/tal/kvi_tal_menubar_qt.h b/src/kvilib/tal/kvi_tal_menubar_qt.h index c42dab7f..da030b8a 100644 --- a/src/kvilib/tal/kvi_tal_menubar_qt.h +++ b/src/kvilib/tal/kvi_tal_menubar_qt.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_MENUBAR_QT_H_ -#define _KVI_TAL_MENUBAR_QT_H_ +#ifndef _KVI_TAL_MENUBAR_TQT_H_ +#define _KVI_TAL_MENUBAR_TQT_H_ // // File : kvi_tal_menubar_qt.h // Creation date : Sun Aug 12 06:35:24 2001 GMT by Szymon Stefanek @@ -22,14 +22,15 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include <qmenubar.h> +#include <tqmenubar.h> -class KVILIB_API KviTalMenuBar : public QMenuBar +class KVILIB_API KviTalMenuBar : public TQMenuBar { Q_OBJECT + TQ_OBJECT public: - KviTalMenuBar(QWidget * par,const char * nam); + KviTalMenuBar(TQWidget * par,const char * nam); ~KviTalMenuBar(); }; -#endif //_KVI_TAL_MENUBAR_QT_H_ +#endif //_KVI_TAL_MENUBAR_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_popupmenu_qt3.h b/src/kvilib/tal/kvi_tal_popupmenu_qt3.h index 3340945b..755a9ef6 100644 --- a/src/kvilib/tal/kvi_tal_popupmenu_qt3.h +++ b/src/kvilib/tal/kvi_tal_popupmenu_qt3.h @@ -28,14 +28,15 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include <qpopupmenu.h> +#include <tqpopupmenu.h> -class KVILIB_API KviTalPopupMenu : public QPopupMenu +class KVILIB_API KviTalPopupMenu : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - KviTalPopupMenu(QWidget * pParent=0,const QString &szName = KviQString::empty) - : QPopupMenu(pParent,KviQString::toUtf8(szName).data()) {}; + KviTalPopupMenu(TQWidget * pParent=0,const TQString &szName = KviTQString::empty) + : TQPopupMenu(pParent,KviTQString::toUtf8(szName).data()) {}; virtual ~KviTalPopupMenu() {}; }; diff --git a/src/kvilib/tal/kvi_tal_popupmenu_qt4.h b/src/kvilib/tal/kvi_tal_popupmenu_qt4.h index 58da15ef..79e5e5f3 100644 --- a/src/kvilib/tal/kvi_tal_popupmenu_qt4.h +++ b/src/kvilib/tal/kvi_tal_popupmenu_qt4.h @@ -28,56 +28,57 @@ #include "kvi_settings.h" #include "kvi_qstring.h" -#include <q3popupmenu.h> -#include <qwidgetaction.h> +#include <tq3popupmenu.h> +#include <tqwidgetaction.h> class KVILIB_API KviTalPopupMenu : public Q3PopupMenu { Q_OBJECT + TQ_OBJECT public: - KviTalPopupMenu(QWidget * pParent=0,const QString &szName = KviQString::empty) + KviTalPopupMenu(TQWidget * pParent=0,const TQString &szName = KviTQString::empty) : Q3PopupMenu(pParent) { setName(szName); }; virtual ~KviTalPopupMenu() {}; - int insertItem(const QString &szText) + int insertItem(const TQString &szText) { return Q3PopupMenu::insertItem(szText); } - int insertItem(const QPixmap &pix,const QString &szText) + int insertItem(const TQPixmap &pix,const TQString &szText) { - return Q3PopupMenu::insertItem(QIcon(pix),szText,-1,-1); + return Q3PopupMenu::insertItem(TQIcon(pix),szText,-1,-1); } - int insertItem(const QString &szText,int id) + int insertItem(const TQString &szText,int id) { return Q3PopupMenu::insertItem(szText,id); } - int insertItem(const QPixmap &pix,const QString &szText,int id) + int insertItem(const TQPixmap &pix,const TQString &szText,int id) { - return Q3PopupMenu::insertItem(QIcon(pix),szText,id,-1); + return Q3PopupMenu::insertItem(TQIcon(pix),szText,id,-1); } - int insertItem(const QString &szText,const QObject * pReceiver,const char * szSlot) + int insertItem(const TQString &szText,const TQObject * pReceiver,const char * szSlot) { return Q3PopupMenu::insertItem(szText,pReceiver,szSlot); } - int insertItem(const QPixmap &pix,const QString &szText,const QObject * pReceiver,const char * szSlot) + int insertItem(const TQPixmap &pix,const TQString &szText,const TQObject * pReceiver,const char * szSlot) { - return Q3PopupMenu::insertItem(QIcon(pix),szText,pReceiver,szSlot); + return Q3PopupMenu::insertItem(TQIcon(pix),szText,pReceiver,szSlot); } - int insertItem(const QPixmap &pix,const QString &szText,QMenu *pMenu) + int insertItem(const TQPixmap &pix,const TQString &szText,TQMenu *pMenu) { - return Q3PopupMenu::insertItem(QIcon(pix),szText,pMenu,-1,-1); + return Q3PopupMenu::insertItem(TQIcon(pix),szText,pMenu,-1,-1); } - int insertItem(const QString &szText,QMenu *pMenu) + int insertItem(const TQString &szText,TQMenu *pMenu) { return Q3PopupMenu::insertItem(szText,pMenu,-1,-1); } - int insertItem(QWidget * pWidget) + int insertItem(TQWidget * pWidget) { - // needs Qt 4.2 - QWidgetAction * pAct = new QWidgetAction(this); + // needs TQt 4.2 + TQWidgetAction * pAct = new TQWidgetAction(this); pAct->setDefaultWidget(pWidget); addAction(pAct); return 0; diff --git a/src/kvilib/tal/kvi_tal_scrollview_qt3.h b/src/kvilib/tal/kvi_tal_scrollview_qt3.h index da6141e1..9cf783cd 100644 --- a/src/kvilib/tal/kvi_tal_scrollview_qt3.h +++ b/src/kvilib/tal/kvi_tal_scrollview_qt3.h @@ -27,14 +27,15 @@ #include "kvi_settings.h" -#include <qscrollview.h> +#include <tqscrollview.h> -class KVILIB_API KviTalScrollView : public QScrollView +class KVILIB_API KviTalScrollView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - KviTalScrollView(QWidget * pParent) - : QScrollView(pParent) {}; + KviTalScrollView(TQWidget * pParent) + : TQScrollView(pParent) {}; virtual ~KviTalScrollView() {}; }; diff --git a/src/kvilib/tal/kvi_tal_scrollview_qt4.h b/src/kvilib/tal/kvi_tal_scrollview_qt4.h index c82f5723..b9106e4e 100644 --- a/src/kvilib/tal/kvi_tal_scrollview_qt4.h +++ b/src/kvilib/tal/kvi_tal_scrollview_qt4.h @@ -27,13 +27,14 @@ #include "kvi_settings.h" -#include <q3scrollview.h> +#include <tq3scrollview.h> class KVILIB_API KviTalScrollView : public Q3ScrollView { Q_OBJECT + TQ_OBJECT public: - KviTalScrollView(QWidget * pParent) + KviTalScrollView(TQWidget * pParent) : Q3ScrollView(pParent) {}; virtual ~KviTalScrollView() {}; }; diff --git a/src/kvilib/tal/kvi_tal_tabdialog_qt3.h b/src/kvilib/tal/kvi_tal_tabdialog_qt3.h index 061053a3..2ff4794d 100644 --- a/src/kvilib/tal/kvi_tal_tabdialog_qt3.h +++ b/src/kvilib/tal/kvi_tal_tabdialog_qt3.h @@ -25,14 +25,15 @@ // //============================================================================= -#include <qtabdialog.h> +#include <tqtabdialog.h> -class KVILIB_API KviTalTabDialog : public QTabDialog +class KVILIB_API KviTalTabDialog : public TQTabDialog { Q_OBJECT + TQ_OBJECT public: - KviTalTabDialog(QWidget * pParent = 0,const char * name = 0,bool bModal = false) - : QTabDialog(pParent,name,bModal) {}; + KviTalTabDialog(TQWidget * pParent = 0,const char * name = 0,bool bModal = false) + : TQTabDialog(pParent,name,bModal) {}; ~KviTalTabDialog() {}; }; diff --git a/src/kvilib/tal/kvi_tal_tabdialog_qt4.h b/src/kvilib/tal/kvi_tal_tabdialog_qt4.h index c9e3eb0b..dc773cad 100644 --- a/src/kvilib/tal/kvi_tal_tabdialog_qt4.h +++ b/src/kvilib/tal/kvi_tal_tabdialog_qt4.h @@ -25,13 +25,14 @@ // //============================================================================= -#include <q3tabdialog.h> +#include <tq3tabdialog.h> class KVILIB_API KviTalTabDialog : public Q3TabDialog { Q_OBJECT + TQ_OBJECT public: - KviTalTabDialog(QWidget * pParent = 0,const char * name = 0,bool bModal = false) + KviTalTabDialog(TQWidget * pParent = 0,const char * name = 0,bool bModal = false) : Q3TabDialog(pParent,name,bModal) {}; ~KviTalTabDialog() {}; }; diff --git a/src/kvilib/tal/kvi_tal_textedit_qt3.h b/src/kvilib/tal/kvi_tal_textedit_qt3.h index b698f483..68e86ce7 100644 --- a/src/kvilib/tal/kvi_tal_textedit_qt3.h +++ b/src/kvilib/tal/kvi_tal_textedit_qt3.h @@ -25,14 +25,15 @@ // //============================================================================= -#include <qtextedit.h> +#include <tqtextedit.h> -class KVILIB_API KviTalTextEdit : public QTextEdit +class KVILIB_API KviTalTextEdit : public TQTextEdit { Q_OBJECT + TQ_OBJECT public: - KviTalTextEdit(QWidget * pParent = 0,const char * name = 0) - : QTextEdit(pParent,name) {}; + KviTalTextEdit(TQWidget * pParent = 0,const char * name = 0) + : TQTextEdit(pParent,name) {}; ~KviTalTextEdit() {}; }; diff --git a/src/kvilib/tal/kvi_tal_textedit_qt4.h b/src/kvilib/tal/kvi_tal_textedit_qt4.h index a3403d7c..574cda96 100644 --- a/src/kvilib/tal/kvi_tal_textedit_qt4.h +++ b/src/kvilib/tal/kvi_tal_textedit_qt4.h @@ -25,13 +25,14 @@ // //============================================================================= -#include <q3textedit.h> +#include <tq3textedit.h> class KVILIB_API KviTalTextEdit : public Q3TextEdit { Q_OBJECT + TQ_OBJECT public: - KviTalTextEdit(QWidget * pParent = 0,const char * name = 0) + KviTalTextEdit(TQWidget * pParent = 0,const char * name = 0) : Q3TextEdit(pParent,name) {}; ~KviTalTextEdit() {}; }; diff --git a/src/kvilib/tal/kvi_tal_toolbar.cpp b/src/kvilib/tal/kvi_tal_toolbar.cpp index f54dc973..80ac44aa 100644 --- a/src/kvilib/tal/kvi_tal_toolbar.cpp +++ b/src/kvilib/tal/kvi_tal_toolbar.cpp @@ -27,7 +27,7 @@ #ifdef COMPILE_KDE_SUPPORT - KviTalToolBar::KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) + KviTalToolBar::KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) : KToolBar(w,dock,bNewLine,nam) { setLabel(label); @@ -43,32 +43,32 @@ #ifdef COMPILE_USE_QT4 - KviTalToolBar::KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) + KviTalToolBar::KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) //: Q3ToolBar(label,w,dock,bNewLine,nam) - : QToolBar(label,w) + : TQToolBar(label,w) { - //setFrameStyle(QFrame::NoFrame); + //setFrameStyle(TQFrame::NoFrame); setObjectName(nam); - if(!layout()) - this->setLayout(new QBoxLayout(QBoxLayout::LeftToRight)); + if(!tqlayout()) + this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight)); w->addToolBar(dock,this); } - KviTalToolBar::KviTalToolBar(QMainWindow *w,const char * name) - : QToolBar(w) + KviTalToolBar::KviTalToolBar(TQMainWindow *w,const char * name) + : TQToolBar(w) { - //setFrameStyle(QFrame::NoFrame); + //setFrameStyle(TQFrame::NoFrame); setObjectName(name); - if(!layout()) - this->setLayout(new QBoxLayout(QBoxLayout::LeftToRight)); + if(!tqlayout()) + this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight)); w->addToolBar(this); } - QBoxLayout * KviTalToolBar::boxLayout() + TQBoxLayout * KviTalToolBar::boxLayout() { - return (QBoxLayout*)this->layout(); + return (TQBoxLayout*)this->tqlayout(); } - void KviTalToolBar::setBoxLayout(QBoxLayout * l) + void KviTalToolBar::setBoxLayout(TQBoxLayout * l) { this->setLayout(l); } @@ -80,19 +80,19 @@ void KviTalToolBar::setUsesBigPixmaps(bool b) { - if(b)setIconSize(QSize(48,48)); - else setIconSize(QSize(22,22)); + if(b)setIconSize(TQSize(48,48)); + else setIconSize(TQSize(22,22)); } #include "kvi_tal_toolbar_qt4.moc" #else - KviTalToolBar::KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) - : QToolBar(label,w,dock,bNewLine,nam) + KviTalToolBar::KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam) + : TQToolBar(label,w,dock,bNewLine,nam) { } - KviTalToolBar::KviTalToolBar(QMainWindow *w,const char * name) - : QToolBar(w,name) + KviTalToolBar::KviTalToolBar(TQMainWindow *w,const char * name) + : TQToolBar(w,name) { } diff --git a/src/kvilib/tal/kvi_tal_toolbar_kde.h b/src/kvilib/tal/kvi_tal_toolbar_kde.h index f6415f26..3da32998 100644 --- a/src/kvilib/tal/kvi_tal_toolbar_kde.h +++ b/src/kvilib/tal/kvi_tal_toolbar_kde.h @@ -29,8 +29,9 @@ class KVILIB_API KviTalToolBar : public KToolBar { Q_OBJECT + TQ_OBJECT public: - KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock = QT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); + KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock = TQT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); ~KviTalToolBar(); }; diff --git a/src/kvilib/tal/kvi_tal_toolbar_qt3.h b/src/kvilib/tal/kvi_tal_toolbar_qt3.h index a9b15b52..83d0dc70 100644 --- a/src/kvilib/tal/kvi_tal_toolbar_qt3.h +++ b/src/kvilib/tal/kvi_tal_toolbar_qt3.h @@ -1,5 +1,5 @@ -#ifndef _KVI_TAL_TOOLBAR_QT_H_ -#define _KVI_TAL_TOOLBAR_QT_H_ +#ifndef _KVI_TAL_TOOLBAR_TQT_H_ +#define _KVI_TAL_TOOLBAR_TQT_H_ // // File : kvi_tal_toolbar_qt.h // Creation date : Mon Aug 13 05:05:50 2001 GMT by Szymon Stefanek @@ -22,18 +22,19 @@ // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // -#include <qtoolbar.h> -#include <qmainwindow.h> +#include <tqtoolbar.h> +#include <tqmainwindow.h> #include "kvi_tal_toolbardocktype.h" -class KVILIB_API KviTalToolBar : public QToolBar +class KVILIB_API KviTalToolBar : public TQToolBar { Q_OBJECT + TQ_OBJECT public: - KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock = QT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); - KviTalToolBar(QMainWindow *w,const char * name=0); + KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock = TQT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); + KviTalToolBar(TQMainWindow *w,const char * name=0); ~KviTalToolBar(); }; -#endif //_KVI_TAL_TOOLBAR_QT_H_ +#endif //_KVI_TAL_TOOLBAR_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_toolbar_qt4.h b/src/kvilib/tal/kvi_tal_toolbar_qt4.h index 753d5a5c..50ef3637 100644 --- a/src/kvilib/tal/kvi_tal_toolbar_qt4.h +++ b/src/kvilib/tal/kvi_tal_toolbar_qt4.h @@ -25,23 +25,24 @@ #include "kvi_settings.h" #include "kvi_tal_toolbardocktype.h" -#include <QToolBar> -#include <QMainWindow> -#include <QBoxLayout> +#include <TQToolBar> +#include <TQMainWindow> +#include <TQBoxLayout> -class KVILIB_API KviTalToolBar : public QToolBar +class KVILIB_API KviTalToolBar : public TQToolBar { Q_OBJECT + TQ_OBJECT public: - KviTalToolBar(const QString &label,QMainWindow *w,QT_TOOLBARDOCK_TYPE dock = QT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); - KviTalToolBar(QMainWindow *w,const char * name=0); + KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock = TQT_DOCK_TOP,bool bNewLine = false,const char * nam = 0); + KviTalToolBar(TQMainWindow *w,const char * name=0); ~KviTalToolBar(); public: - QBoxLayout * boxLayout(); - void setBoxLayout(QBoxLayout *l); + TQBoxLayout * boxLayout(); + void setBoxLayout(TQBoxLayout *l); bool usesBigPixmaps(); void setUsesBigPixmaps(bool b); }; -#endif //_KVI_TAL_TOOLBAR_QT_H_ +#endif //_KVI_TAL_TOOLBAR_TQT_H_ diff --git a/src/kvilib/tal/kvi_tal_toolbardocktype.h b/src/kvilib/tal/kvi_tal_toolbardocktype.h index a7c9697a..0295f7d4 100644 --- a/src/kvilib/tal/kvi_tal_toolbardocktype.h +++ b/src/kvilib/tal/kvi_tal_toolbardocktype.h @@ -26,46 +26,35 @@ //#define COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4 /* - #define QT_TOOLBARDOCK_TYPE Qt::Dock - #define QT_DOCK_TOP Qt::DockTop - #define QT_DOCK_LEFT Qt::DockLeft - #define QT_DOCK_RIGHT Qt::DockRight - #define QT_DOCK_BOTTOM Qt::DockBottom - #define QT_DOCK_MINIMIZED Qt::DockMinimized - #define QT_DOCK_TORNOFF Qt::DockTornOff - #define QT_DOCK_UNMANAGED Qt::DockUnmanaged + #define TQT_TOOLBARDOCK_TYPE TQt::Dock + #define TQT_DOCK_TOP TQt::DockTop + #define TQT_DOCK_LEFT TQt::DockLeft + #define TQT_DOCK_RIGHT TQt::DockRight + #define TQT_DOCK_BOTTOM TQt::DockBottom + #define TQT_DOCK_MINIMIZED TQt::DockMinimized + #define TQT_DOCK_TORNOFF TQt::DockTornOff + #define TQT_DOCK_UNMANAGED TQt::DockUnmanaged */ - // We will need these when we'll use the real QToolBar in Qt 4.x - #define QT_TOOLBARDOCK_TYPE Qt::ToolBarArea - #define QT_DOCK_TOP Qt::TopToolBarArea - #define QT_DOCK_LEFT Qt::LeftToolBarArea - #define QT_DOCK_RIGHT Qt::RightToolBarArea - #define QT_DOCK_BOTTOM Qt::BottomToolBarArea + // We will need these when we'll use the real TQToolBar in TQt 4.x + #define TQT_TOOLBARDOCK_TYPE TQt::ToolBarArea + #define TQT_DOCK_TOP TQt::TopToolBarArea + #define TQT_DOCK_LEFT TQt::LeftToolBarArea + #define TQT_DOCK_RIGHT TQt::RightToolBarArea + #define TQT_DOCK_BOTTOM TQt::BottomToolBarArea // THESE ARE UNSUPPORTED UNDER QT4! - #define QT_DOCK_MINIMIZED Qt::TopToolBarArea - #define QT_DOCK_TORNOFF Qt::TopToolBarArea - #define QT_DOCK_UNMANAGED Qt::TopToolBarArea + #define TQT_DOCK_MINIMIZED TQt::TopToolBarArea + #define TQT_DOCK_TORNOFF TQt::TopToolBarArea + #define TQT_DOCK_UNMANAGED TQt::TopToolBarArea #else - #if QT_VERSION >= 300 - #define QT_TOOLBARDOCK_TYPE Qt::Dock - #define QT_DOCK_TOP Qt::DockTop - #define QT_DOCK_LEFT Qt::DockLeft - #define QT_DOCK_RIGHT Qt::DockRight - #define QT_DOCK_BOTTOM Qt::DockBottom - #define QT_DOCK_MINIMIZED Qt::DockMinimized - #define QT_DOCK_TORNOFF Qt::DockTornOff - #define QT_DOCK_UNMANAGED Qt::DockUnmanaged - #else - #define QT_TOOLBARDOCK_TYPE QMainWindow::ToolBarDock - #define QT_DOCK_TOP QMainWindow::Top - #define QT_DOCK_LEFT QMainWindow::Left - #define QT_DOCK_RIGHT QMainWindow::Right - #define QT_DOCK_BOTTOM QMainWindow::Bottom - #define QT_DOCK_MINIMIZED QMainWindow::Minimized - #define QT_DOCK_TORNOFF QMainWindow::TornOff - #define QT_DOCK_UNMANAGED QMainWindow::Unmanaged - #endif + #define TQT_TOOLBARDOCK_TYPE TQt::Dock + #define TQT_DOCK_TOP TQt::DockTop + #define TQT_DOCK_LEFT TQt::DockLeft + #define TQT_DOCK_RIGHT TQt::DockRight + #define TQT_DOCK_BOTTOM TQt::DockBottom + #define TQT_DOCK_MINIMIZED TQt::DockMinimized + #define TQT_DOCK_TORNOFF TQt::DockTornOff + #define TQT_DOCK_UNMANAGED TQt::DockUnmanaged #endif #endif //_KVI_TAL_TOOLBARDOCKTYPE_H_ diff --git a/src/kvilib/tal/kvi_tal_tooltip.cpp b/src/kvilib/tal/kvi_tal_tooltip.cpp index 3bd384d2..90d09631 100644 --- a/src/kvilib/tal/kvi_tal_tooltip.cpp +++ b/src/kvilib/tal/kvi_tal_tooltip.cpp @@ -25,10 +25,10 @@ #define __KVILIB__ #include "kvi_tal_tooltip.h" -#include <qevent.h> +#include <tqevent.h> -KviTalToolTipHelper::KviTalToolTipHelper(KviTalToolTip * pToolTip,QWidget * pWidget) -: QObject(pWidget) +KviTalToolTipHelper::KviTalToolTipHelper(KviTalToolTip * pToolTip,TQWidget * pWidget) +: TQObject(pWidget) { #ifdef COMPILE_USE_QT4 m_pToolTip = pToolTip; @@ -54,13 +54,13 @@ void KviTalToolTipHelper::toolTipDying() #endif } -bool KviTalToolTipHelper::eventFilter(QObject * pObject,QEvent * pEvent) +bool KviTalToolTipHelper::eventFilter(TQObject * pObject,TQEvent * pEvent) { #ifdef COMPILE_USE_QT4 - if((pEvent->type() == QEvent::ToolTip) && m_pToolTip) + if((pEvent->type() == TQEvent::ToolTip) && m_pToolTip) { - debug("TOOL TIP EVENT WITH POSITION %d,%d",((QHelpEvent *)pEvent)->pos().x(),((QHelpEvent *)pEvent)->pos().y()); - m_pToolTip->maybeTip(((QHelpEvent *)pEvent)->pos()); + debug("TOOL TIP EVENT WITH POSITION %d,%d",((TQHelpEvent *)pEvent)->pos().x(),((TQHelpEvent *)pEvent)->pos().y()); + m_pToolTip->maybeTip(((TQHelpEvent *)pEvent)->pos()); return true; } #endif @@ -68,9 +68,9 @@ bool KviTalToolTipHelper::eventFilter(QObject * pObject,QEvent * pEvent) } -KviTalToolTip::KviTalToolTip(QWidget * pParent) +KviTalToolTip::KviTalToolTip(TQWidget * pParent) #ifndef COMPILE_USE_QT4 -: QToolTip(pParent) +: TQToolTip(pParent) #endif { #ifdef COMPILE_USE_QT4 @@ -98,26 +98,26 @@ void KviTalToolTip::helperDying() #endif #ifdef COMPILE_USE_QT4 -void KviTalToolTip::add(QWidget * widget,const QString & text) +void KviTalToolTip::add(TQWidget * widget,const TQString & text) { - QToolTip::add(widget,text); + TQToolTip::add(widget,text); } -void KviTalToolTip::remove(QWidget * widget) +void KviTalToolTip::remove(TQWidget * widget) { - QToolTip::remove(widget); + TQToolTip::remove(widget); } -void KviTalToolTip::tip(const QRect & rect,const QString & text) +void KviTalToolTip::tip(const TQRect & rect,const TQString & text) { debug("TOOL TIP AT %d,%d",rect.topLeft().x(),rect.topLeft().y()); - QToolTip::showText(m_pParent->mapToGlobal(rect.topLeft()),text); + TQToolTip::showText(m_pParent->mapToGlobal(rect.topLeft()),text); } #endif -void KviTalToolTip::maybeTip(const QPoint & p) +void KviTalToolTip::maybeTip(const TQPoint & p) { - // does nothing here.. and in Qt 4.x will even fail to work + // does nothing here.. and in TQt 4.x will even fail to work } #ifndef COMPILE_ON_WINDOWS diff --git a/src/kvilib/tal/kvi_tal_tooltip.h b/src/kvilib/tal/kvi_tal_tooltip.h index 91811c3c..3c5cfb2a 100644 --- a/src/kvilib/tal/kvi_tal_tooltip.h +++ b/src/kvilib/tal/kvi_tal_tooltip.h @@ -27,50 +27,51 @@ #include "kvi_settings.h" -#include <qtooltip.h> -#include <qobject.h> +#include <tqtooltip.h> +#include <tqobject.h> class KviTalToolTip; -// This is useful only with Qt4, but we put it here anyway -// to have both a consistent API and make moc happy -class KviTalToolTipHelper : public QObject +// This is useful only with TQt4, but we put it here anyway +// to have both a consistent API and make tqmoc happy +class KviTalToolTipHelper : public TQObject { friend class KviTalToolTip; Q_OBJECT + TQ_OBJECT public: - KviTalToolTipHelper(KviTalToolTip * pToolTip,QWidget * pWidget); + KviTalToolTipHelper(KviTalToolTip * pToolTip,TQWidget * pWidget); ~KviTalToolTipHelper(); protected: KviTalToolTip * m_pToolTip; protected: - virtual bool eventFilter(QObject * pObject,QEvent * pEvent); + virtual bool eventFilter(TQObject * pObject,TQEvent * pEvent); void toolTipDying(); }; class KVILIB_API KviTalToolTip #ifndef COMPILE_USE_QT4 - : public QToolTip + : public TQToolTip #endif { friend class KviTalToolTipHelper; public: - KviTalToolTip(QWidget * pParent); + KviTalToolTip(TQWidget * pParent); virtual ~KviTalToolTip(); protected: #ifdef COMPILE_USE_QT4 KviTalToolTipHelper * m_pHelper; - QWidget * m_pParent; + TQWidget * m_pParent; #endif public: #ifdef COMPILE_USE_QT4 - static void add(QWidget * widget,const QString & text); - static void remove(QWidget * widget); - virtual void tip(const QRect & rect,const QString & text); + static void add(TQWidget * widget,const TQString & text); + static void remove(TQWidget * widget); + virtual void tip(const TQRect & rect,const TQString & text); #endif protected: - virtual void maybeTip(const QPoint & p); + virtual void maybeTip(const TQPoint & p); #ifdef COMPILE_USE_QT4 void helperDying(); #endif diff --git a/src/kvilib/tal/kvi_tal_vbox_qt3.h b/src/kvilib/tal/kvi_tal_vbox_qt3.h index 440a2436..d7f6ae40 100644 --- a/src/kvilib/tal/kvi_tal_vbox_qt3.h +++ b/src/kvilib/tal/kvi_tal_vbox_qt3.h @@ -27,14 +27,15 @@ #include "kvi_settings.h" -#include <qvbox.h> +#include <tqvbox.h> -class KVILIB_API KviTalVBox : public QVBox +class KVILIB_API KviTalVBox : public TQVBox { Q_OBJECT + TQ_OBJECT public: - KviTalVBox(QWidget * pParent) - : QVBox(pParent) {}; + KviTalVBox(TQWidget * pParent) + : TQVBox(pParent) {}; virtual ~KviTalVBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_vbox_qt4.h b/src/kvilib/tal/kvi_tal_vbox_qt4.h index 86de700d..715d09c0 100644 --- a/src/kvilib/tal/kvi_tal_vbox_qt4.h +++ b/src/kvilib/tal/kvi_tal_vbox_qt4.h @@ -27,13 +27,14 @@ #include "kvi_settings.h" -#include <q3vbox.h> +#include <tq3vbox.h> class KVILIB_API KviTalVBox : public Q3VBox { Q_OBJECT + TQ_OBJECT public: - KviTalVBox(QWidget * pParent) + KviTalVBox(TQWidget * pParent) : Q3VBox(pParent) {}; virtual ~KviTalVBox() {}; }; diff --git a/src/kvilib/tal/kvi_tal_widgetstack_qt3.h b/src/kvilib/tal/kvi_tal_widgetstack_qt3.h index cc0eb969..3fd50684 100644 --- a/src/kvilib/tal/kvi_tal_widgetstack_qt3.h +++ b/src/kvilib/tal/kvi_tal_widgetstack_qt3.h @@ -27,15 +27,16 @@ #include "kvi_settings.h" -#include <qwidgetstack.h> +#include <tqwidgetstack.h> -class KVILIB_API KviTalWidgetStack : public QWidgetStack +class KVILIB_API KviTalWidgetStack : public TQWidgetStack { Q_OBJECT + TQ_OBJECT public: - KviTalWidgetStack(QWidget * pParent) - : QWidgetStack(pParent) {}; + KviTalWidgetStack(TQWidget * pParent) + : TQWidgetStack(pParent) {}; virtual ~KviTalWidgetStack() {}; }; diff --git a/src/kvilib/tal/kvi_tal_widgetstack_qt4.h b/src/kvilib/tal/kvi_tal_widgetstack_qt4.h index 6d0cc53f..02037393 100644 --- a/src/kvilib/tal/kvi_tal_widgetstack_qt4.h +++ b/src/kvilib/tal/kvi_tal_widgetstack_qt4.h @@ -27,14 +27,15 @@ #include "kvi_settings.h" -//#include <qstackedwidget.h> -#include <q3widgetstack.h> +//#include <tqstackedwidget.h> +#include <tq3widgetstack.h> class KVILIB_API KviTalWidgetStack : public Q3WidgetStack { Q_OBJECT + TQ_OBJECT public: - KviTalWidgetStack(QWidget * pParent) + KviTalWidgetStack(TQWidget * pParent) : Q3WidgetStack(pParent) {}; virtual ~KviTalWidgetStack() {}; }; diff --git a/src/kvilib/tal/kvi_tal_windowstate.h b/src/kvilib/tal/kvi_tal_windowstate.h index 9510ba4a..bbd7c925 100644 --- a/src/kvilib/tal/kvi_tal_windowstate.h +++ b/src/kvilib/tal/kvi_tal_windowstate.h @@ -28,15 +28,15 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #define QT_WINDOWSTATE_FLAGS Qt::WindowState + #define TQT_WINDOWSTATE_FLAGS TQt::WindowState - #define QT_WINDOWSTATE_MAXIMIZED Qt::WindowMaximized - #define QT_WINDOWSTATE_MINIMIZED Qt::WindowMinimized + #define TQT_WINDOWSTATE_MAXIMIZED TQt::WindowMaximized + #define TQT_WINDOWSTATE_MINIMIZED TQt::WindowMinimized #else - #define QT_WINDOWSTATE_FLAGS Qt::WidgetState + #define TQT_WINDOWSTATE_FLAGS TQt::WidgetState - #define QT_WINDOWSTATE_MAXIMIZED Qt::WState_Maximized - #define QT_WINDOWSTATE_MINIMIZED Qt::WState_Minimized + #define TQT_WINDOWSTATE_MAXIMIZED TQt::WState_Maximized + #define TQT_WINDOWSTATE_MINIMIZED TQt::WState_Minimized #endif #endif // _KVI_TAL_WINDOWSTATE_H_ diff --git a/src/kvilib/tal/kvi_tal_wizard.cpp b/src/kvilib/tal/kvi_tal_wizard.cpp index 6f5f39da..53b7c03f 100644 --- a/src/kvilib/tal/kvi_tal_wizard.cpp +++ b/src/kvilib/tal/kvi_tal_wizard.cpp @@ -29,21 +29,21 @@ #include "kvi_locale.h" #ifdef COMPILE_USE_QT4 - #include <QShowEvent> - #include <QLabel> - #include <QPushButton> - #include <QGridLayout> - #include <QFrame> - #include <QStackedWidget> - #include <QPalette> + #include <TQShowEvent> + #include <TQLabel> + #include <TQPushButton> + #include <TQGridLayout> + #include <TQFrame> + #include <TQStackedWidget> + #include <TQPalette> #else - #include <qlabel.h> - #include <qpushbutton.h> - #include <qlayout.h> - #include <qevent.h> - #include <qframe.h> - #include <qwidgetstack.h> - #include <qpalette.h> + #include <tqlabel.h> + #include <tqpushbutton.h> + #include <tqlayout.h> + #include <tqevent.h> + #include <tqframe.h> + #include <tqwidgetstack.h> + #include <tqpalette.h> #endif @@ -59,8 +59,8 @@ public: EnableFinish = 16 }; public: - QWidget * pWidget; - QString szTitle; + TQWidget * pWidget; + TQString szTitle; bool bEnabled; int iEnableFlags; int iVisibleIndex; @@ -72,23 +72,23 @@ public: KviPointerList<KviTalWizardPageData> * pPageList; int iEnabledPageCount; KviTalWizardPageData * pCurrentPage; - QGridLayout * pLayout; - QLabel * pTitleLabel; - QLabel * pStepsLabel; - QPushButton * pBackButton; - QPushButton * pCancelButton; - QPushButton * pHelpButton; - QPushButton * pNextButton; - QWidget * pNextSpacer; - QPushButton * pFinishButton; - QWidget * pFinishSpacer; + TQGridLayout * pLayout; + TQLabel * pTitleLabel; + TQLabel * pStepsLabel; + TQPushButton * pBackButton; + TQPushButton * pCancelButton; + TQPushButton * pHelpButton; + TQPushButton * pNextButton; + TQWidget * pNextSpacer; + TQPushButton * pFinishButton; + TQWidget * pFinishSpacer; #ifdef COMPILE_USE_QT4 - QStackedWidget * pWidgetStack; + TQStackedWidget * pWidgetStack; #else - QWidgetStack * pWidgetStack; + TQWidgetStack * pWidgetStack; #endif public: - KviTalWizardPageData * findPage(QWidget * pWidget) + KviTalWizardPageData * findPage(TQWidget * pWidget) { for(KviTalWizardPageData * pData = pPageList->first();pData;pData = pPageList->next()) { @@ -120,7 +120,7 @@ public: return NULL; } - KviTalWizardPageData * findNextEnabledPage(QWidget * pReference) + KviTalWizardPageData * findNextEnabledPage(TQWidget * pReference) { if(!pReference) return findFirstEnabledPage(); @@ -135,7 +135,7 @@ public: return NULL; } - KviTalWizardPageData * findPrevEnabledPage(QWidget * pReference) + KviTalWizardPageData * findPrevEnabledPage(TQWidget * pReference) { if(!pReference) return findLastEnabledPage(); @@ -166,33 +166,33 @@ public: }; -KviTalWizard::KviTalWizard(QWidget * pParent) -: QDialog(pParent) +KviTalWizard::KviTalWizard(TQWidget * pParent) +: TQDialog(pParent) { m_p = new KviTalWizardPrivate; m_p->pPageList = new KviPointerList<KviTalWizardPageData>; m_p->pPageList->setAutoDelete(true); m_p->pCurrentPage = NULL; m_p->iEnabledPageCount = 0; - m_p->pLayout = new QGridLayout(this); + m_p->pLayout = new TQGridLayout(this); - m_p->pTitleLabel = new QLabel(this); + m_p->pTitleLabel = new TQLabel(this); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(m_p->pTitleLabel,0,0,1,3); #else m_p->pLayout->addMultiCellWidget(m_p->pTitleLabel,0,0,0,3); #endif - m_p->pStepsLabel = new QLabel(this); + m_p->pStepsLabel = new TQLabel(this); m_p->pStepsLabel->setMinimumWidth(80); - m_p->pStepsLabel->setAlignment(Qt::AlignRight); + m_p->pStepsLabel->tqsetAlignment(TQt::AlignRight); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(m_p->pStepsLabel,0,4,1,3); #else m_p->pLayout->addMultiCellWidget(m_p->pStepsLabel,0,0,4,6); #endif - QFrame * f1 = new QFrame(this); - f1->setFrameStyle(QFrame::Sunken | QFrame::HLine); + TQFrame * f1 = new TQFrame(this); + f1->setFrameStyle(TQFrame::Sunken | TQFrame::HLine); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(f1,1,0,1,7); #else @@ -200,15 +200,15 @@ KviTalWizard::KviTalWizard(QWidget * pParent) #endif #ifdef COMPILE_USE_QT4 - m_p->pWidgetStack = new QStackedWidget(this); + m_p->pWidgetStack = new TQStackedWidget(this); m_p->pLayout->addWidget(m_p->pWidgetStack,2,0,1,7); #else - m_p->pWidgetStack = new QWidgetStack(this); + m_p->pWidgetStack = new TQWidgetStack(this); m_p->pLayout->addMultiCellWidget(m_p->pWidgetStack,2,2,0,6); #endif - QFrame * f2 = new QFrame(this); - f2->setFrameStyle(QFrame::Sunken | QFrame::HLine); + TQFrame * f2 = new TQFrame(this); + f2->setFrameStyle(TQFrame::Sunken | TQFrame::HLine); #ifdef COMPILE_USE_QT4 m_p->pLayout->addWidget(f2,3,0,1,7); #else @@ -226,66 +226,66 @@ KviTalWizard::KviTalWizard(QWidget * pParent) pButtonBox->setSpacing(0); - m_p->pCancelButton = new QPushButton(__tr("Cancel"),pButtonBox); + m_p->pCancelButton = new TQPushButton(__tr("Cancel"),pButtonBox); m_p->pCancelButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pCancelButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(cancelButtonClicked()) + TQT_SLOT(cancelButtonClicked()) ); - QWidget * pSpacer = new QWidget(pButtonBox); + TQWidget * pSpacer = new TQWidget(pButtonBox); pSpacer->setFixedWidth(4); - m_p->pHelpButton = new QPushButton(__tr("Help"),pButtonBox); + m_p->pHelpButton = new TQPushButton(__tr("Help"),pButtonBox); m_p->pHelpButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pHelpButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(helpButtonClicked()) + TQT_SLOT(helpButtonClicked()) ); - QWidget * pLargeSpacer = new QWidget(pButtonBox); + TQWidget * pLargeSpacer = new TQWidget(pButtonBox); pLargeSpacer->setMinimumWidth(50); pButtonBox->setStretchFactor(pLargeSpacer,100); - QString szText = "< "; + TQString szText = "< "; szText += __tr("Back"); - m_p->pBackButton = new QPushButton(szText,pButtonBox); + m_p->pBackButton = new TQPushButton(szText,pButtonBox); m_p->pBackButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pBackButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(backButtonClicked()) + TQT_SLOT(backButtonClicked()) ); - m_p->pNextSpacer = new QWidget(pButtonBox); + m_p->pNextSpacer = new TQWidget(pButtonBox); m_p->pNextSpacer->setFixedWidth(4); szText = __tr("Next"); szText += " >"; - m_p->pNextButton = new QPushButton(szText,pButtonBox); + m_p->pNextButton = new TQPushButton(szText,pButtonBox); m_p->pNextButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pNextButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(nextButtonClicked()) + TQT_SLOT(nextButtonClicked()) ); - m_p->pFinishSpacer = new QWidget(pButtonBox); + m_p->pFinishSpacer = new TQWidget(pButtonBox); m_p->pFinishSpacer->setFixedWidth(4); - m_p->pFinishButton = new QPushButton(__tr("Finish"),pButtonBox); + m_p->pFinishButton = new TQPushButton(__tr("Finish"),pButtonBox); m_p->pFinishButton->setMinimumWidth(80); - QObject::connect( + TQObject::connect( m_p->pFinishButton, - SIGNAL(clicked()), + TQT_SIGNAL(clicked()), this, - SLOT(finishButtonClicked()) + TQT_SLOT(finishButtonClicked()) ); m_p->pLayout->setMargin(8); @@ -300,7 +300,7 @@ KviTalWizard::~KviTalWizard() delete m_p; } -void KviTalWizard::insertPage(QWidget * pWidget,const QString &szTitle,int iIndex) +void KviTalWizard::insertPage(TQWidget * pWidget,const TQString &szTitle,int iIndex) { KviTalWizardPageData * pPageData = m_p->findPage(pWidget); if(!pPageData) @@ -327,12 +327,12 @@ void KviTalWizard::insertPage(QWidget * pWidget,const QString &szTitle,int iInde } -void KviTalWizard::addPage(QWidget * pWidget,const QString &szTitle) +void KviTalWizard::addPage(TQWidget * pWidget,const TQString &szTitle) { insertPage(pWidget,szTitle,-1); } -bool KviTalWizard::setPageEnabled(QWidget * pWidget,bool bEnabled) +bool KviTalWizard::setPageEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -343,7 +343,7 @@ bool KviTalWizard::setPageEnabled(QWidget * pWidget,bool bEnabled) return true; } -bool KviTalWizard::setPageTitle(QWidget * pWidget,const QString &szTitle) +bool KviTalWizard::setPageTitle(TQWidget * pWidget,const TQString &szTitle) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -352,7 +352,7 @@ bool KviTalWizard::setPageTitle(QWidget * pWidget,const QString &szTitle) return true; } -bool KviTalWizard::setCurrentPage(QWidget * pWidget) +bool KviTalWizard::setCurrentPage(TQWidget * pWidget) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -361,7 +361,7 @@ bool KviTalWizard::setCurrentPage(QWidget * pWidget) return true; } -QWidget * KviTalWizard::currentPage() +TQWidget * KviTalWizard::currentPage() { if(!m_p->pCurrentPage) return NULL; @@ -378,8 +378,8 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData) bool bHelpEnabled = false; bool bFinishEnabled = false; - QString szTitle; - QString szSteps; + TQString szTitle; + TQString szSteps; if(pData) { @@ -396,15 +396,15 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData) szTitle = "<b>"; szTitle += pData->szTitle; szTitle += "</b>"; - QPalette pal = m_p->pStepsLabel->palette(); + TQPalette pal = m_p->pStepsLabel->palette(); #ifdef COMPILE_USE_QT4 - QColor clrWin = pal.color(QPalette::Normal,QPalette::Window); - QColor clrTxt = pal.color(QPalette::Normal,QPalette::WindowText); + TQColor clrWin = pal.color(TQPalette::Normal,TQPalette::Window); + TQColor clrTxt = pal.color(TQPalette::Normal,TQPalette::WindowText); #else - QColor clrWin = pal.color(QPalette::Normal,QColorGroup::Foreground); - QColor clrTxt = pal.color(QPalette::Normal,QColorGroup::Background); + TQColor clrWin = pal.color(TQPalette::Normal,TQColorGroup::Foreground); + TQColor clrTxt = pal.color(TQPalette::Normal,TQColorGroup::Background); #endif - QColor clrMid = qRgb( + TQColor clrMid = tqRgb( (clrWin.red() + clrTxt.red()) / 2, (clrWin.green() + clrTxt.green()) / 2, (clrWin.blue() + clrTxt.blue()) / 2 @@ -413,7 +413,7 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData) szSteps = "<nobr><font color=\""; szSteps += clrMid.name(); szSteps += "\"><b>["; - szSteps += QString("Step %1 of %2").arg(pData->iVisibleIndex).arg(m_p->iEnabledPageCount); + szSteps += TQString("Step %1 of %2").tqarg(pData->iVisibleIndex).tqarg(m_p->iEnabledPageCount); szSteps += "]</b></font></nobr>"; } @@ -447,7 +447,7 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData) } } -void KviTalWizard::showEvent(QShowEvent * e) +void KviTalWizard::showEvent(TQShowEvent * e) { if(!(m_p->pCurrentPage)) { @@ -456,10 +456,10 @@ void KviTalWizard::showEvent(QShowEvent * e) if(pData) setCurrentPage(pData->pWidget); } - QDialog::showEvent(e); + TQDialog::showEvent(e); } -void KviTalWizard::closeEvent(QCloseEvent * e) +void KviTalWizard::closeEvent(TQCloseEvent * e) { e->ignore(); cancelButtonClicked(); @@ -492,7 +492,7 @@ void KviTalWizard::finishButtonClicked() accept(); } -void KviTalWizard::setHelpEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setHelpEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -505,7 +505,7 @@ void KviTalWizard::setHelpEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -void KviTalWizard::setCancelEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setCancelEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -518,7 +518,7 @@ void KviTalWizard::setCancelEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -void KviTalWizard::setFinishEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setFinishEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -531,7 +531,7 @@ void KviTalWizard::setFinishEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -void KviTalWizard::setNextEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setNextEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -544,7 +544,7 @@ void KviTalWizard::setNextEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -void KviTalWizard::setBackEnabled(QWidget * pWidget,bool bEnabled) +void KviTalWizard::setBackEnabled(TQWidget * pWidget,bool bEnabled) { KviTalWizardPageData * pData = m_p->findPage(pWidget); if(!pData) @@ -557,27 +557,27 @@ void KviTalWizard::setBackEnabled(QWidget * pWidget,bool bEnabled) setCurrentPage(pData); } -QPushButton * KviTalWizard::cancelButton() +TQPushButton * KviTalWizard::cancelButton() { return m_p->pCancelButton; } -QPushButton * KviTalWizard::helpButton() +TQPushButton * KviTalWizard::helpButton() { return m_p->pHelpButton; } -QPushButton * KviTalWizard::finishButton() +TQPushButton * KviTalWizard::finishButton() { return m_p->pFinishButton; } -QPushButton * KviTalWizard::nextButton() +TQPushButton * KviTalWizard::nextButton() { return m_p->pNextButton; } -QPushButton * KviTalWizard::backButton() +TQPushButton * KviTalWizard::backButton() { return m_p->pBackButton; } diff --git a/src/kvilib/tal/kvi_tal_wizard.h b/src/kvilib/tal/kvi_tal_wizard.h index f84e3555..80e0afcf 100644 --- a/src/kvilib/tal/kvi_tal_wizard.h +++ b/src/kvilib/tal/kvi_tal_wizard.h @@ -28,13 +28,13 @@ #include "kvi_settings.h" #ifdef COMPILE_USE_QT4 - #include <QDialog> + #include <TQDialog> #else - #include <qdialog.h> + #include <tqdialog.h> #endif -class QShowEvent; -class QPushButton; +class TQShowEvent; +class TQPushButton; class KviTalWizardPrivate; class KviTalWizardPageData; @@ -43,11 +43,12 @@ class KviTalWizardPageData; /// /// \brief Provides a wizard-style dialog with steps /// -class KVILIB_API KviTalWizard : public QDialog +class KVILIB_API KviTalWizard : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviTalWizard(QWidget * pParent); + KviTalWizard(TQWidget * pParent); ~KviTalWizard(); protected: KviTalWizardPrivate * m_p; @@ -58,14 +59,14 @@ public: /// Adding a page a second time is equivalent to calling /// setPageTitle() and enabling the page. /// - void addPage(QWidget * pWidget,const QString &szTitle); + void addPage(TQWidget * pWidget,const TQString &szTitle); /// /// Adds a page to the wizard with the specified title /// and in the specified position. /// Adding a page a second time is equivalent to calling /// setPageTitle() and enabling the page. /// - void insertPage(QWidget * pWidget,const QString &szTitle,int iIndex); + void insertPage(TQWidget * pWidget,const TQString &szTitle,int iIndex); /// /// Enables or disables a page. A disabled page /// is skipped when the user presses "Next" in the @@ -75,14 +76,14 @@ public: /// Returns true on success or false if the pWidget /// does not identify a page that has been added to this wizard. /// - bool setPageEnabled(QWidget * pWidget,bool bEnabled); + bool setPageEnabled(TQWidget * pWidget,bool bEnabled); /// /// Changes a page title. /// /// Returns true on success or false if the pWidget /// does not identify a page that has been added to this wizard. /// - bool setPageTitle(QWidget * pWidget,const QString &szTitle); + bool setPageTitle(TQWidget * pWidget,const TQString &szTitle); /// /// Switches the wizard to the specified page. /// Please note that this class handles page switching @@ -91,56 +92,56 @@ public: /// Returns true on success or false if the pWidget /// does not identify a page that has been added to this wizard. /// - bool setCurrentPage(QWidget * pWidget); + bool setCurrentPage(TQWidget * pWidget); /// /// Returns a pointer to the current page /// - QWidget * currentPage(); + TQWidget * currentPage(); /// /// Enables or disables the help button for the specified page. /// By default the help button is always disabled. /// - void setHelpEnabled(QWidget * pWidget,bool bEnabled); + void setHelpEnabled(TQWidget * pWidget,bool bEnabled); /// /// Enables or disables the cancel button for the specified page. /// By default the cancel button is always enabled. /// - void setCancelEnabled(QWidget * pWidget,bool bEnabled); + void setCancelEnabled(TQWidget * pWidget,bool bEnabled); /// /// Enables or disables the finish button for the specified page. /// By default the finish button is always disabled. /// - void setFinishEnabled(QWidget * pWidget,bool bEnabled); + void setFinishEnabled(TQWidget * pWidget,bool bEnabled); /// /// Enables or disables the next button for the specified page. /// By default the next button is always enabled. /// - void setNextEnabled(QWidget * pWidget,bool bEnabled); + void setNextEnabled(TQWidget * pWidget,bool bEnabled); /// /// Enables or disables the prev button for the specified page. /// By default the prev button is always enabled. /// - void setBackEnabled(QWidget * pWidget,bool bEnabled); + void setBackEnabled(TQWidget * pWidget,bool bEnabled); /// /// Returns a pointer to the cancel button displayed in the dialog. /// - QPushButton * cancelButton(); + TQPushButton * cancelButton(); /// /// Returns a pointer to the help button displayed in the dialog. /// - QPushButton * helpButton(); + TQPushButton * helpButton(); /// /// Returns a pointer to the finish button displayed in the dialog. /// - QPushButton * finishButton(); + TQPushButton * finishButton(); /// /// Returns a pointer to the next button displayed in the dialog. /// - QPushButton * nextButton(); + TQPushButton * nextButton(); /// /// Returns a pointer to the back button displayed in the dialog. /// - QPushButton * backButton(); + TQPushButton * backButton(); signals: /// /// Emitted when the help button is clicked. @@ -150,11 +151,11 @@ protected: /// /// Displays the first page if no other page is shown yet. /// - virtual void showEvent(QShowEvent * e); + virtual void showEvent(TQShowEvent * e); /// /// Handles redirects the close button to the "cancel" operation. /// - virtual void closeEvent(QCloseEvent * e); + virtual void closeEvent(TQCloseEvent * e); protected: void setCurrentPage(KviTalWizardPageData * pData); protected slots: diff --git a/src/kvilib/tal/moc_kvi_tal_wizard.cpp b/src/kvilib/tal/moc_kvi_tal_wizard.cpp index 0ad29754..edf13270 100644 --- a/src/kvilib/tal/moc_kvi_tal_wizard.cpp +++ b/src/kvilib/tal/moc_kvi_tal_wizard.cpp @@ -2,21 +2,21 @@ ** KviTalWizard meta object code from reading C++ file 'kvi_tal_wizard.h' ** ** Created: Sun Mar 23 20:56:27 2008 -** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** by: The TQt TQMOC ($Id: qt/tqmoc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ -#undef QT_NO_COMPAT +#undef TQT_NO_COMPAT #include "kvi_tal_wizard.h" -#include <qmetaobject.h> -#include <qapplication.h> +#include <tqmetaobject.h> +#include <tqapplication.h> -#include <private/qucomextra_p.h> -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.8. It" -#error "cannot be used with the include files from this version of Qt." -#error "(The moc has changed too much.)" +#include <private/tqucomextra_p.h> +#if !defined(TQ_TQMOC_OUTPUT_REVISION) || (TQ_TQMOC_OUTPUT_REVISION != 26) +#error "This file was generated using the tqmoc from 3.3.8. It" +#error "cannot be used with the include files from this version of TQt." +#error "(The tqmoc has changed too much.)" #endif const char *KviTalWizard::className() const @@ -24,77 +24,77 @@ const char *KviTalWizard::className() const return "KviTalWizard"; } -QMetaObject *KviTalWizard::metaObj = 0; -static QMetaObjectCleanUp cleanUp_KviTalWizard( "KviTalWizard", &KviTalWizard::staticMetaObject ); +TQMetaObject *KviTalWizard::metaObj = 0; +static TQMetaObjectCleanUp cleanUp_KviTalWizard( "KviTalWizard", &KviTalWizard::staticMetaObject ); -#ifndef QT_NO_TRANSLATION -QString KviTalWizard::tr( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION +TQString KviTalWizard::tr( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviTalWizard", s, c, QApplication::DefaultCodec ); + if ( tqApp ) + return tqApp->translate( "KviTalWizard", s, c, TQApplication::DefaultCodec ); else - return QString::fromLatin1( s ); + return TQString::tqfromLatin1( s ); } -#ifndef QT_NO_TRANSLATION_UTF8 -QString KviTalWizard::trUtf8( const char *s, const char *c ) +#ifndef TQT_NO_TRANSLATION_UTF8 +TQString KviTalWizard::trUtf8( const char *s, const char *c ) { - if ( qApp ) - return qApp->translate( "KviTalWizard", s, c, QApplication::UnicodeUTF8 ); + if ( tqApp ) + return tqApp->translate( "KviTalWizard", s, c, TQApplication::UnicodeUTF8 ); else - return QString::fromUtf8( s ); + return TQString::fromUtf8( s ); } -#endif // QT_NO_TRANSLATION_UTF8 +#endif // TQT_NO_TRANSLATION_UTF8 -#endif // QT_NO_TRANSLATION +#endif // TQT_NO_TRANSLATION -QMetaObject* KviTalWizard::staticMetaObject() +TQMetaObject* KviTalWizard::staticMetaObject() { if ( metaObj ) return metaObj; - QMetaObject* parentObject = QDialog::staticMetaObject(); - static const QUMethod slot_0 = {"backButtonClicked", 0, 0 }; - static const QUMethod slot_1 = {"nextButtonClicked", 0, 0 }; - static const QUMethod slot_2 = {"helpButtonClicked", 0, 0 }; - static const QUMethod slot_3 = {"cancelButtonClicked", 0, 0 }; - static const QUMethod slot_4 = {"finishButtonClicked", 0, 0 }; - static const QMetaData slot_tbl[] = { - { "backButtonClicked()", &slot_0, QMetaData::Protected }, - { "nextButtonClicked()", &slot_1, QMetaData::Protected }, - { "helpButtonClicked()", &slot_2, QMetaData::Protected }, - { "cancelButtonClicked()", &slot_3, QMetaData::Protected }, - { "finishButtonClicked()", &slot_4, QMetaData::Protected } + TQMetaObject* tqparentObject = TQDialog::staticMetaObject(); + static const TQUMethod slot_0 = {"backButtonClicked", 0, 0 }; + static const TQUMethod slot_1 = {"nextButtonClicked", 0, 0 }; + static const TQUMethod slot_2 = {"helpButtonClicked", 0, 0 }; + static const TQUMethod slot_3 = {"cancelButtonClicked", 0, 0 }; + static const TQUMethod slot_4 = {"finishButtonClicked", 0, 0 }; + static const TQMetaData slot_tbl[] = { + { "backButtonClicked()", &slot_0, TQMetaData::Protected }, + { "nextButtonClicked()", &slot_1, TQMetaData::Protected }, + { "helpButtonClicked()", &slot_2, TQMetaData::Protected }, + { "cancelButtonClicked()", &slot_3, TQMetaData::Protected }, + { "finishButtonClicked()", &slot_4, TQMetaData::Protected } }; - static const QUMethod signal_0 = {"helpClicked", 0, 0 }; - static const QMetaData signal_tbl[] = { - { "helpClicked()", &signal_0, QMetaData::Public } + static const TQUMethod signal_0 = {"helpClicked", 0, 0 }; + static const TQMetaData signal_tbl[] = { + { "helpClicked()", &signal_0, TQMetaData::Public } }; - metaObj = QMetaObject::new_metaobject( - "KviTalWizard", parentObject, + metaObj = TQMetaObject::new_metaobject( + "KviTalWizard", tqparentObject, slot_tbl, 5, signal_tbl, 1, -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES 0, 0, 0, 0, -#endif // QT_NO_PROPERTIES +#endif // TQT_NO_PROPERTIES 0, 0 ); cleanUp_KviTalWizard.setMetaObject( metaObj ); return metaObj; } -void* KviTalWizard::qt_cast( const char* clname ) +void* KviTalWizard::tqqt_cast( const char* clname ) { if ( !qstrcmp( clname, "KviTalWizard" ) ) return this; - return QDialog::qt_cast( clname ); + return TQDialog::tqqt_cast( clname ); } -// SIGNAL helpClicked +// TQT_SIGNAL helpClicked void KviTalWizard::helpClicked() { activate_signal( staticMetaObject()->signalOffset() + 0 ); } -bool KviTalWizard::qt_invoke( int _id, QUObject* _o ) +bool KviTalWizard::qt_invoke( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->slotOffset() ) { case 0: backButtonClicked(); break; @@ -103,26 +103,26 @@ bool KviTalWizard::qt_invoke( int _id, QUObject* _o ) case 3: cancelButtonClicked(); break; case 4: finishButtonClicked(); break; default: - return QDialog::qt_invoke( _id, _o ); + return TQDialog::qt_invoke( _id, _o ); } return TRUE; } -bool KviTalWizard::qt_emit( int _id, QUObject* _o ) +bool KviTalWizard::qt_emit( int _id, TQUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: helpClicked(); break; default: - return QDialog::qt_emit(_id,_o); + return TQDialog::qt_emit(_id,_o); } return TRUE; } -#ifndef QT_NO_PROPERTIES +#ifndef TQT_NO_PROPERTIES -bool KviTalWizard::qt_property( int id, int f, QVariant* v) +bool KviTalWizard::qt_property( int id, int f, TQVariant* v) { - return QDialog::qt_property( id, f, v); + return TQDialog::qt_property( id, f, v); } -bool KviTalWizard::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES +bool KviTalWizard::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } +#endif // TQT_NO_PROPERTIES |