summaryrefslogtreecommitdiffstats
path: root/src/kvilib/tal
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/tal')
-rw-r--r--src/kvilib/tal/kvi_tal_filedialog.cpp49
-rw-r--r--src/kvilib/tal/kvi_tal_filedialog.h4
-rw-r--r--src/kvilib/tal/kvi_tal_filedialog_qt4.h47
-rw-r--r--src/kvilib/tal/kvi_tal_grid.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_grid.h4
-rw-r--r--src/kvilib/tal/kvi_tal_grid_qt4.h42
-rw-r--r--src/kvilib/tal/kvi_tal_groupbox.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_groupbox.h4
-rw-r--r--src/kvilib/tal/kvi_tal_groupbox_qt4.h48
-rw-r--r--src/kvilib/tal/kvi_tal_hbox.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_hbox.h4
-rw-r--r--src/kvilib/tal/kvi_tal_hbox_qt4.h42
-rw-r--r--src/kvilib/tal/kvi_tal_iconview.cpp95
-rw-r--r--src/kvilib/tal/kvi_tal_iconview.h4
-rw-r--r--src/kvilib/tal/kvi_tal_iconview_qt4.h100
-rw-r--r--src/kvilib/tal/kvi_tal_listbox.cpp242
-rw-r--r--src/kvilib/tal/kvi_tal_listbox.h20
-rw-r--r--src/kvilib/tal/kvi_tal_listbox_qt4.h153
-rw-r--r--src/kvilib/tal/kvi_tal_listview.cpp774
-rw-r--r--src/kvilib/tal/kvi_tal_listview.h20
-rw-r--r--src/kvilib/tal/kvi_tal_listview_qt4.h200
-rw-r--r--src/kvilib/tal/kvi_tal_mainwindow.cpp19
-rw-r--r--src/kvilib/tal/kvi_tal_mainwindow.h4
-rw-r--r--src/kvilib/tal/kvi_tal_mainwindow_qt4.h40
-rw-r--r--src/kvilib/tal/kvi_tal_menubar.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_popupmenu.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_popupmenu.h4
-rw-r--r--src/kvilib/tal/kvi_tal_popupmenu_qt4.h90
-rw-r--r--src/kvilib/tal/kvi_tal_scrollview.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_scrollview.h4
-rw-r--r--src/kvilib/tal/kvi_tal_scrollview_qt4.h42
-rw-r--r--src/kvilib/tal/kvi_tal_tabdialog.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_tabdialog.h4
-rw-r--r--src/kvilib/tal/kvi_tal_tabdialog_qt4.h40
-rw-r--r--src/kvilib/tal/kvi_tal_textedit.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_textedit.h4
-rw-r--r--src/kvilib/tal/kvi_tal_textedit_qt4.h40
-rw-r--r--src/kvilib/tal/kvi_tal_toolbar.cpp47
-rw-r--r--src/kvilib/tal/kvi_tal_toolbar.h4
-rw-r--r--src/kvilib/tal/kvi_tal_toolbar_qt4.h48
-rw-r--r--src/kvilib/tal/kvi_tal_toolbardocktype.h40
-rw-r--r--src/kvilib/tal/kvi_tal_tooltip.cpp58
-rw-r--r--src/kvilib/tal/kvi_tal_tooltip.h16
-rw-r--r--src/kvilib/tal/kvi_tal_vbox.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_vbox.h4
-rw-r--r--src/kvilib/tal/kvi_tal_vbox_qt4.h43
-rw-r--r--src/kvilib/tal/kvi_tal_widgetstack.cpp4
-rw-r--r--src/kvilib/tal/kvi_tal_widgetstack.h4
-rw-r--r--src/kvilib/tal/kvi_tal_widgetstack_qt4.h43
-rw-r--r--src/kvilib/tal/kvi_tal_windowstate.h7
-rw-r--r--src/kvilib/tal/kvi_tal_wizard.cpp48
-rw-r--r--src/kvilib/tal/kvi_tal_wizard.h4
52 files changed, 10 insertions, 2539 deletions
diff --git a/src/kvilib/tal/kvi_tal_filedialog.cpp b/src/kvilib/tal/kvi_tal_filedialog.cpp
index 77e7529e..cfbb2d60 100644
--- a/src/kvilib/tal/kvi_tal_filedialog.cpp
+++ b/src/kvilib/tal/kvi_tal_filedialog.cpp
@@ -27,54 +27,6 @@
#include "kvi_tal_filedialog.h"
-#ifdef COMPILE_USE_QT4
-
- #include <tqdir.h>
-
- KviTalFileDialog::KviTalFileDialog(const TQString &dirName,const TQString &filter,TQWidget *parent,const char *name,bool modal)
- : TQFileDialog(parent,"",dirName,filter)
- {
- setModal(modal);
- }
-
- KviTalFileDialog::~KviTalFileDialog()
- {
- }
-
- void KviTalFileDialog::setFileMode(FileMode m)
- {
- switch(m)
- {
- case AnyFile:
- TQFileDialog::setFileMode(TQFileDialog::AnyFile);
- break;
- case ExistingFile:
- TQFileDialog::setFileMode(TQFileDialog::ExistingFile);
- break;
- case ExistingFiles:
- TQFileDialog::setFileMode(TQFileDialog::ExistingFiles);
- break;
- case Directory:
- TQFileDialog::setFileMode(TQFileDialog::Directory);
- break;
- case DirectoryOnly:
- TQFileDialog::setFileMode(TQFileDialog::DirectoryOnly);
- break;
- default:
- TQFileDialog::setFileMode(TQFileDialog::AnyFile);
- break;
- }
- }
-
- void KviTalFileDialog::setDirectory(const TQString &szDirectory)
- {
- TQFileDialog::setDirectory(szDirectory);
- }
-
-
- #include "kvi_tal_filedialog_qt4.moc"
-
-#else
#ifdef COMPILE_TDE_SUPPORT
@@ -173,4 +125,3 @@
#include "kvi_tal_filedialog_qt.moc"
#endif
-#endif
diff --git a/src/kvilib/tal/kvi_tal_filedialog.h b/src/kvilib/tal/kvi_tal_filedialog.h
index f7456e3c..ca7151ae 100644
--- a/src/kvilib/tal/kvi_tal_filedialog.h
+++ b/src/kvilib/tal/kvi_tal_filedialog.h
@@ -27,14 +27,10 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_filedialog_qt4.h"
-#else
#ifdef COMPILE_TDE_SUPPORT
#include "kvi_tal_filedialog_kde.h"
#else
#include "kvi_tal_filedialog_qt.h"
#endif
-#endif
#endif // _KVI_TAL_FILEDIALOG_H_
diff --git a/src/kvilib/tal/kvi_tal_filedialog_qt4.h b/src/kvilib/tal/kvi_tal_filedialog_qt4.h
deleted file mode 100644
index 3c7580e7..00000000
--- a/src/kvilib/tal/kvi_tal_filedialog_qt4.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef _KVI_TAL_FILEDIALOG_QT4_H_
-#define _KVI_TAL_FILEDIALOG_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_filedialog_qt4.h
-// Creation date : Fri 19 Jan 2007 02:17:12 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include <tqfiledialog.h>
-
-class KVILIB_API KviTalFileDialog : public TQFileDialog
-{
- TQ_OBJECT
-
-public:
- KviTalFileDialog(const TQString &dirName,const TQString &filter = TQString(),TQWidget *parent = 0,const char *name = 0,bool modal = FALSE);
- ~KviTalFileDialog();
-public:
- enum FileMode { AnyFile, ExistingFile, ExistingFiles, Directory, DirectoryOnly };
-
- void setFileMode(FileMode m);
- void setDirectory(const TQString &szDirectory);
-
- static TQString getExistingDirectoryPath(const TQString &dir = TQString(),const TQString &caption = TQString(),TQWidget *parent = 0)
- { return getExistingDirectory(parent,caption,dir); };
-};
-
-#endif // _KVI_TAL_FILEDIALOG_TQT_H_
diff --git a/src/kvilib/tal/kvi_tal_grid.cpp b/src/kvilib/tal/kvi_tal_grid.cpp
index 472af5a0..3d688e9e 100644
--- a/src/kvilib/tal/kvi_tal_grid.cpp
+++ b/src/kvilib/tal/kvi_tal_grid.cpp
@@ -26,9 +26,5 @@
#include "kvi_tal_grid.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_grid_qt4.moc"
-#else
#include "kvi_tal_grid_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_grid.h b/src/kvilib/tal/kvi_tal_grid.h
index 18c4af98..a5ee8045 100644
--- a/src/kvilib/tal/kvi_tal_grid.h
+++ b/src/kvilib/tal/kvi_tal_grid.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_grid_qt4.h"
-#else
#include "kvi_tal_grid_qt3.h"
-#endif
#endif // _KVI_TAL_GRID_H_
diff --git a/src/kvilib/tal/kvi_tal_grid_qt4.h b/src/kvilib/tal/kvi_tal_grid_qt4.h
deleted file mode 100644
index 23a6bfab..00000000
--- a/src/kvilib/tal/kvi_tal_grid_qt4.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _KVI_TAL_GRID_QT4_H_
-#define _KVI_TAL_GRID_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_grid_qt4.h
-// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include "kvi_settings.h"
-
-#include <tq3grid.h>
-
-class KVILIB_API KviTalGrid : public Q3Grid
-{
- TQ_OBJECT
-
-public:
- KviTalGrid(int n,Qt::Orientation orient,TQWidget * pParent = 0)
- : Q3Grid(n,orient,pParent) {};
- ~KviTalGrid() {};
-};
-
-#endif // _KVI_TAL_GRID_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_groupbox.cpp b/src/kvilib/tal/kvi_tal_groupbox.cpp
index bf2f5689..704ff363 100644
--- a/src/kvilib/tal/kvi_tal_groupbox.cpp
+++ b/src/kvilib/tal/kvi_tal_groupbox.cpp
@@ -26,9 +26,5 @@
#include "kvi_tal_groupbox.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_groupbox_qt4.moc"
-#else
#include "kvi_tal_groupbox_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_groupbox.h b/src/kvilib/tal/kvi_tal_groupbox.h
index ae82519b..59c7096e 100644
--- a/src/kvilib/tal/kvi_tal_groupbox.h
+++ b/src/kvilib/tal/kvi_tal_groupbox.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_groupbox_qt4.h"
-#else
#include "kvi_tal_groupbox_qt3.h"
-#endif
#endif // _KVI_TAL_GROUPBOX_H_
diff --git a/src/kvilib/tal/kvi_tal_groupbox_qt4.h b/src/kvilib/tal/kvi_tal_groupbox_qt4.h
deleted file mode 100644
index 963a1a01..00000000
--- a/src/kvilib/tal/kvi_tal_groupbox_qt4.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef _KVI_TAL_GROUPBOX_QT4_H_
-#define _KVI_TAL_GROUPBOX_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_groupbox_qt4.h
-// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include <tq3groupbox.h>
-
-class KVILIB_API KviTalGroupBox : public Q3GroupBox
-{
- TQ_OBJECT
-
-public:
- KviTalGroupBox(TQWidget * parent = 0)
- : Q3GroupBox(parent) {};
- KviTalGroupBox(const TQString & title,TQWidget * parent = 0)
- : Q3GroupBox(title,parent) {};
- KviTalGroupBox(int strips,Qt::Orientation orientation,TQWidget * parent = 0)
- : Q3GroupBox(strips,orientation,parent) {};
- KviTalGroupBox(int strips,Qt::Orientation orientation,const TQString & title,TQWidget * parent = 0)
- : Q3GroupBox(strips,orientation,title,parent) {};
- ~KviTalGroupBox() {};
-};
-
-
-
-#endif // _KVI_TAL_GROUPBOX_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_hbox.cpp b/src/kvilib/tal/kvi_tal_hbox.cpp
index 6df56ee8..ba9f23ad 100644
--- a/src/kvilib/tal/kvi_tal_hbox.cpp
+++ b/src/kvilib/tal/kvi_tal_hbox.cpp
@@ -25,8 +25,4 @@
#define __KVILIB__
#include "kvi_tal_hbox.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_hbox_qt4.moc"
-#else
#include "kvi_tal_hbox_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_hbox.h b/src/kvilib/tal/kvi_tal_hbox.h
index 6f955ed6..3081aa96 100644
--- a/src/kvilib/tal/kvi_tal_hbox.h
+++ b/src/kvilib/tal/kvi_tal_hbox.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_hbox_qt4.h"
-#else
#include "kvi_tal_hbox_qt3.h"
-#endif
#endif // _KVI_TAL_HBOX_H_
diff --git a/src/kvilib/tal/kvi_tal_hbox_qt4.h b/src/kvilib/tal/kvi_tal_hbox_qt4.h
deleted file mode 100644
index 051b5228..00000000
--- a/src/kvilib/tal/kvi_tal_hbox_qt4.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _KVI_TAL_HBOX_QT4_H_
-#define _KVI_TAL_HBOX_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_hbox_qt4.h
-// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include "kvi_settings.h"
-
-#include <tq3hbox.h>
-
-class KVILIB_API KviTalHBox : public Q3HBox
-{
- TQ_OBJECT
-
-public:
- KviTalHBox(TQWidget * pParent,char* name=0)
- : Q3HBox(pParent,name) {};
- virtual ~KviTalHBox() {};
-};
-
-#endif // _KVI_TAL_HBOX_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_iconview.cpp b/src/kvilib/tal/kvi_tal_iconview.cpp
index 45b640fd..9abe0f64 100644
--- a/src/kvilib/tal/kvi_tal_iconview.cpp
+++ b/src/kvilib/tal/kvi_tal_iconview.cpp
@@ -25,100 +25,6 @@
#define __KVILIB__
#include "kvi_tal_iconview.h"
-#ifdef COMPILE_USE_QT4
-
- KviTalIconView::KviTalIconView(TQWidget * pParent,TQt::WFlags f)
- : Q3IconView(pParent,0,f)
- {
- 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)
- {
- emit selectionChanged((KviTalIconViewItem *)pItem);
- }
-
- void KviTalIconView::redirect_currentChanged(Q3IconViewItem * pItem)
- {
- emit currentChanged((KviTalIconViewItem *)pItem);
- }
-
- void KviTalIconView::redirect_clicked(Q3IconViewItem * pItem)
- {
- emit clicked((KviTalIconViewItem *)pItem);
- }
-
- void KviTalIconView::redirect_clicked(Q3IconViewItem * pItem,const TQPoint &pnt)
- {
- emit clicked((KviTalIconViewItem *)pItem,pnt);
- }
-
- void KviTalIconView::redirect_pressed(Q3IconViewItem * pItem)
- {
- emit pressed((KviTalIconViewItem *)pItem);
- }
-
- void KviTalIconView::redirect_pressed(Q3IconViewItem * pItem,const TQPoint &pnt)
- {
- emit pressed((KviTalIconViewItem *)pItem,pnt);
- }
-
- void KviTalIconView::redirect_doubleClicked(Q3IconViewItem * pItem)
- {
- emit doubleClicked((KviTalIconViewItem *)pItem);
- }
-
- void KviTalIconView::redirect_returnPressed(Q3IconViewItem * pItem)
- {
- emit returnPressed((KviTalIconViewItem *)pItem);
- }
-
- void KviTalIconView::redirect_rightButtonClicked(Q3IconViewItem * pItem,const TQPoint &pnt)
- {
- emit rightButtonClicked((KviTalIconViewItem *)pItem,pnt);
- }
-
- void KviTalIconView::redirect_rightButtonPressed(Q3IconViewItem * pItem,const TQPoint &pnt)
- {
- emit rightButtonPressed((KviTalIconViewItem *)pItem,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 TQPoint &pnt)
- {
- emit mouseButtonPressed(iButton,(KviTalIconViewItem *)pItem,pnt);
- }
-
- void KviTalIconView::redirect_contextMenuRequested(Q3IconViewItem * pItem,const TQPoint &pnt)
- {
- emit contextMenuRequested((KviTalIconViewItem *)pItem,pnt);
- }
-
- void KviTalIconView::redirect_onItem(Q3IconViewItem * pItem)
- {
- emit onItem((KviTalIconViewItem *)pItem);
- }
-
-
- #include "kvi_tal_iconview_qt4.moc"
-#else
KviTalIconView::KviTalIconView(TQWidget * pParent,TQt::WFlags f)
: TQIconView(pParent,0,f)
@@ -211,5 +117,4 @@
#include "kvi_tal_iconview_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_iconview.h b/src/kvilib/tal/kvi_tal_iconview.h
index 53b1137b..a2bc2114 100644
--- a/src/kvilib/tal/kvi_tal_iconview.h
+++ b/src/kvilib/tal/kvi_tal_iconview.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_iconview_qt4.h"
-#else
#include "kvi_tal_iconview_qt3.h"
-#endif
#endif // _KVI_TAL_ICONVIEW_H_
diff --git a/src/kvilib/tal/kvi_tal_iconview_qt4.h b/src/kvilib/tal/kvi_tal_iconview_qt4.h
deleted file mode 100644
index 5b919248..00000000
--- a/src/kvilib/tal/kvi_tal_iconview_qt4.h
+++ /dev/null
@@ -1,100 +0,0 @@
-#ifndef _KVI_TAL_ICONVIEW_QT4_H_
-#define _KVI_TAL_ICONVIEW_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_iconview_qt4.h
-// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,59 Temple Place - Suite 440, Boston, MA 02111-1407, USA.
-//
-//=============================================================================
-
-#include "kvi_settings.h"
-#include "kvi_qstring.h"
-
-#include <tq3iconview.h>
-
-class KviTalIconViewItem;
-
-class KVILIB_API KviTalIconView : public Q3IconView
-{
- TQ_OBJECT
-
-public:
- 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 TQPoint &pnt);
- void pressed(KviTalIconViewItem * pItem);
- void pressed(KviTalIconViewItem * pItem,const TQPoint &pnt);
- void doubleClicked(KviTalIconViewItem * pItem);
- void returnPressed(KviTalIconViewItem * pItem);
- 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 TQPoint &pnt);
- void redirect_pressed(Q3IconViewItem * pItem);
- void redirect_pressed(Q3IconViewItem * pItem,const TQPoint &pnt);
- void redirect_doubleClicked(Q3IconViewItem * pItem);
- void redirect_returnPressed(Q3IconViewItem * pItem);
- 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(); };
- KviTalIconViewItem * lastItem() const { return (KviTalIconViewItem *)Q3IconView::lastItem(); };
- KviTalIconViewItem * currentItem() const { return (KviTalIconViewItem *)Q3IconView::currentItem(); };
-};
-
-class KVILIB_API KviTalIconViewItem : public Q3IconViewItem
-{
-public:
- KviTalIconViewItem(KviTalIconView * parent)
- : Q3IconViewItem(parent) {};
- KviTalIconViewItem(KviTalIconView * parent,KviTalIconViewItem * after)
- : Q3IconViewItem(parent,after) {};
- KviTalIconViewItem(KviTalIconView * parent, const TQString & text)
- : Q3IconViewItem(parent,text) {};
- KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const TQString & text)
- : Q3IconViewItem(parent,after,text) {};
- KviTalIconViewItem(KviTalIconView * parent, const TQString & text, const TQPixmap & icon)
- : Q3IconViewItem(parent,text,icon) {};
- KviTalIconViewItem(KviTalIconView * parent, KviTalIconViewItem * after, const TQString & text, const TQPixmap & icon)
- : Q3IconViewItem(parent,after,text,icon) {};
-public:
- KviTalIconView * iconView() const { return (KviTalIconView *)Q3IconViewItem::iconView(); };
- KviTalIconViewItem * prevItem() const { return (KviTalIconViewItem *)Q3IconViewItem::prevItem(); };
- KviTalIconViewItem * nextItem() const { return (KviTalIconViewItem *)Q3IconViewItem::nextItem(); };
-};
-
-
-#endif // _KVI_TAL_ICONVIEW_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_listbox.cpp b/src/kvilib/tal/kvi_tal_listbox.cpp
index e96cc012..72a0cf28 100644
--- a/src/kvilib/tal/kvi_tal_listbox.cpp
+++ b/src/kvilib/tal/kvi_tal_listbox.cpp
@@ -25,247 +25,6 @@
#define __KVILIB__
#include "kvi_tal_listbox.h"
-#ifdef COMPILE_USE_QT4
- #include <tqpainter.h>
- #include <tqstyle.h>
- #include <tqapplication.h>
-
- KviTalListBox::KviTalListBox(TQWidget * pParent,TQt::WFlags f)
- : Q3ListBox(pParent,0,f)
- {
- 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)
- {
- emit highlighted((KviTalListBoxItem *)item);
- }
-
- void KviTalListBox::redirect_selected(Q3ListBoxItem *item)
- {
- emit selected((KviTalListBoxItem *)item);
- }
-
- void KviTalListBox::redirect_selectionChanged(Q3ListBoxItem * item)
- {
- emit selectionChanged((KviTalListBoxItem *)item);
- }
-
- void KviTalListBox::redirect_currentChanged(Q3ListBoxItem * item)
- {
- emit currentChanged((KviTalListBoxItem *)item);
- }
-
- void KviTalListBox::redirect_clicked(Q3ListBoxItem * item)
- {
- emit clicked((KviTalListBoxItem *)item);
- }
-
- void KviTalListBox::redirect_clicked(Q3ListBoxItem * item,const TQPoint & pnt)
- {
- emit clicked((KviTalListBoxItem *)item,pnt);
- }
-
- void KviTalListBox::redirect_pressed(Q3ListBoxItem * item)
- {
- emit pressed((KviTalListBoxItem *)item);
- }
-
- void KviTalListBox::redirect_pressed(Q3ListBoxItem * item,const TQPoint & pnt)
- {
- emit pressed((KviTalListBoxItem *)item,pnt);
- }
-
- void KviTalListBox::redirect_doubleClicked(Q3ListBoxItem * item)
- {
- emit doubleClicked((KviTalListBoxItem *)item);
- }
-
- void KviTalListBox::redirect_returnPressed(Q3ListBoxItem * item)
- {
- emit returnPressed((KviTalListBoxItem *)item);
- }
-
- void KviTalListBox::redirect_rightButtonClicked(Q3ListBoxItem * item, const TQPoint &pnt)
- {
- emit rightButtonClicked((KviTalListBoxItem *)item,pnt);
- }
-
- void KviTalListBox::redirect_rightButtonPressed(Q3ListBoxItem * item, const TQPoint &pnt)
- {
- emit rightButtonPressed((KviTalListBoxItem *)item,pnt);
- }
-
- 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 TQPoint & pos)
- {
- emit mouseButtonClicked(button,(KviTalListBoxItem *)item,pos);
- }
-
- void KviTalListBox::redirect_contextMenuRequested(Q3ListBoxItem * item,const TQPoint & pos)
- {
- emit contextMenuRequested((KviTalListBoxItem *)item,pos);
- }
-
- void KviTalListBox::redirect_onItem(Q3ListBoxItem * i)
- {
- emit onItem((KviTalListBoxItem *)i);
- }
-
- KviTalListBoxText::KviTalListBoxText(KviTalListBox *listbox, const TQString &text)
- :KviTalListBoxItem(listbox)
- {
- setText(text);
- }
-
- KviTalListBoxText::KviTalListBoxText(const TQString &text)
- :KviTalListBoxItem()
- {
- setText(text);
- }
-
- KviTalListBoxText::KviTalListBoxText(KviTalListBox* listbox, const TQString &text, KviTalListBoxItem *after)
- : KviTalListBoxItem(listbox, after)
- {
- setText(text);
- }
-
- KviTalListBoxText::~KviTalListBoxText()
- {
- }
-
- void KviTalListBoxText::paint(TQPainter *painter)
- {
- int itemHeight = height(listBox());
- TQFontMetrics fm = painter->fontMetrics();
- int yPos = ((itemHeight - fm.height()) / 2) + fm.ascent();
- painter->drawText(3, yPos, text());
- }
-
- int KviTalListBoxText::height(const KviTalListBox* lb) const
- {
- int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0;
- 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, TQApplication::globalStrut().width());
- }
-
- int KviTalListBoxText::rtti() const
- {
- return RTTI;
- }
-
- KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pixmap)
- : KviTalListBoxItem(listbox)
- {
- pm = pixmap;
- }
-
- KviTalListBoxPixmap::KviTalListBoxPixmap(const TQPixmap &pixmap)
- : KviTalListBoxItem()
- {
- pm = pixmap;
- }
-
- KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pixmap, KviTalListBoxItem *after)
- : KviTalListBoxItem(listbox, after)
- {
- pm = pixmap;
- }
-
- KviTalListBoxPixmap::~KviTalListBoxPixmap()
- {
- }
-
- KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap &pix, const TQString& text)
- : KviTalListBoxItem(listbox)
- {
- pm = pix;
- setText(text);
- }
-
- KviTalListBoxPixmap::KviTalListBoxPixmap(const TQPixmap & pix, const TQString& text)
- : KviTalListBoxItem()
- {
- pm = pix;
- setText(text);
- }
-
- KviTalListBoxPixmap::KviTalListBoxPixmap(KviTalListBox* listbox, const TQPixmap & pix, const TQString& text,
- KviTalListBoxItem *after)
- : KviTalListBoxItem(listbox, after)
- {
- pm = pix;
- setText(text);
- }
-
- void KviTalListBoxPixmap::paint(TQPainter *painter)
- {
- int itemHeight = height(listBox());
- int yPos;
-
- const TQPixmap *pm = pixmap();
- if (pm && ! pm->isNull()) {
- yPos = (itemHeight - pm->height()) / 2;
- painter->drawPixmap(3, yPos, *pm);
- }
-
- if (!text().isEmpty()) {
- TQFontMetrics fm = painter->fontMetrics();
- yPos = ((itemHeight - fm.height()) / 2) + fm.ascent();
- painter->drawText(pm->width() + 5, yPos, text());
- }
- }
-
- int KviTalListBoxPixmap::height(const KviTalListBox* lb) const
- {
- int h;
- if (text().isEmpty())
- h = pm.height();
- else
- h = qMax(pm.height(), lb->fontMetrics().lineSpacing() + 2);
- return qMax(h, TQApplication::globalStrut().height());
- }
-
- int KviTalListBoxPixmap::width(const KviTalListBox* lb) const
- {
- if (text().isEmpty())
- return qMax(pm.width() + 6, TQApplication::globalStrut().width());
- return qMax(pm.width() + lb->fontMetrics().width(text()) + 6,
- TQApplication::globalStrut().width());
- }
-
- int KviTalListBoxPixmap::rtti() const
- {
- return RTTI;
- }
-
-
- #include "kvi_tal_listbox_qt4.moc"
-#else
#include <tqpainter.h>
#include <tqstyle.h>
#include <tqapplication.h>
@@ -509,5 +268,4 @@
}
#include "kvi_tal_listbox_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_listbox.h b/src/kvilib/tal/kvi_tal_listbox.h
index f7c53560..95302d80 100644
--- a/src/kvilib/tal/kvi_tal_listbox.h
+++ b/src/kvilib/tal/kvi_tal_listbox.h
@@ -27,24 +27,6 @@
#include "kvi_settings.h"
-//
-// This is the only reasonable CROSS-QT3-QT4-COMPATIBLE implementation
-// of TQListBox I've been able to find.
-// Note that using macros for the items will NOT work since moc
-// doesn't expand them. Note also that KviTalListBoxText must
-// 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 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.
-//
-
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_listbox_qt4.h"
-#else
- #include "kvi_tal_listbox_qt3.h"
-#endif
+#include "kvi_tal_listbox_qt3.h"
#endif // _KVI_TAL_LISTBOX_H_
diff --git a/src/kvilib/tal/kvi_tal_listbox_qt4.h b/src/kvilib/tal/kvi_tal_listbox_qt4.h
deleted file mode 100644
index f2b34a19..00000000
--- a/src/kvilib/tal/kvi_tal_listbox_qt4.h
+++ /dev/null
@@ -1,153 +0,0 @@
-#ifndef _KVI_TAL_LISTBOX_QT4_H_
-#define _KVI_TAL_LISTBOX_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_listbox_qt4.h
-// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include "kvi_settings.h"
-
-#include <tq3listbox.h>
-
-class KviTalListBoxItem;
-
-
-class KVILIB_API KviTalListBox : public Q3ListBox
-{
- TQ_OBJECT
-
-public:
- KviTalListBox(TQWidget * pParent,TQt::WFlags f = 0);
- virtual ~KviTalListBox() {};
-public:
- KviTalListBoxItem * firstItem() const { return (KviTalListBoxItem *)Q3ListBox::firstItem(); };
- KviTalListBoxItem * selectedItem() const { return (KviTalListBoxItem *)Q3ListBox::selectedItem(); };
- KviTalListBoxItem * item(int iIndex) const { return (KviTalListBoxItem *)Q3ListBox::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 TQPoint & pnt);
- void pressed(KviTalListBoxItem * item);
- void pressed(KviTalListBoxItem * item,const TQPoint & pnt);
- void doubleClicked(KviTalListBoxItem * item);
- void returnPressed(KviTalListBoxItem * item);
- 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 *);
- void redirect_selected(Q3ListBoxItem *);
- void redirect_selectionChanged(Q3ListBoxItem * item);
- void redirect_currentChanged(Q3ListBoxItem * item);
- void redirect_clicked(Q3ListBoxItem * item);
- void redirect_clicked(Q3ListBoxItem * item,const TQPoint & pnt);
- void redirect_pressed(Q3ListBoxItem * item);
- void redirect_pressed(Q3ListBoxItem * item,const TQPoint & pnt);
- void redirect_doubleClicked(Q3ListBoxItem * item);
- void redirect_returnPressed(Q3ListBoxItem *);
- 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);
-};
-
-class KVILIB_API KviTalListBoxItem : public Q3ListBoxItem
-{
-public:
- KviTalListBoxItem()
- : Q3ListBoxItem() {};
- KviTalListBoxItem(KviTalListBox * pParent)
- : Q3ListBoxItem(pParent) {};
- KviTalListBoxItem(KviTalListBox * pParent,KviTalListBoxItem * pAfter)
- : Q3ListBoxItem(pParent,pAfter) {};
- virtual ~KviTalListBoxItem() {};
-public:
- KviTalListBoxItem * next() const { return (KviTalListBoxItem *)Q3ListBoxItem::next(); };
- KviTalListBoxItem * prev() const { return (KviTalListBoxItem *)Q3ListBoxItem::prev(); };
- KviTalListBox * listBox() const { return (KviTalListBox *)Q3ListBoxItem::listBox(); };
- virtual int height(const KviTalListBox *) const { return 0; };
- int height(const Q3ListBox *lb) const { return height((KviTalListBox *)lb); };
- virtual int width(const KviTalListBox *) const { return 0; };
- int width(const Q3ListBox *lb) const { return width((KviTalListBox *)lb); };
-};
-
-
-class KVILIB_API KviTalListBoxText : public KviTalListBoxItem
-{
-public:
- 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;
- int width(const KviTalListBox *) const;
-
- int rtti() const;
- enum { RTTI = 1 };
-
-protected:
- virtual void paint(TQPainter *);
-
-private:
- TQ_DISABLE_COPY(KviTalListBoxText)
-};
-
-
-class KVILIB_API KviTalListBoxPixmap : public KviTalListBoxItem
-{
-public:
- 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 TQPixmap *pixmap() const { return &pm; }
-
- int height(const KviTalListBox *) const;
- int width(const KviTalListBox *) const;
-
- int rtti() const;
- enum { RTTI = 2 };
-
-protected:
- virtual void paint(TQPainter *);
-
-private:
- TQ_DISABLE_COPY(KviTalListBoxPixmap)
-
- 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 997eda30..c41c909e 100644
--- a/src/kvilib/tal/kvi_tal_listview.cpp
+++ b/src/kvilib/tal/kvi_tal_listview.cpp
@@ -28,779 +28,6 @@
#include "kvi_pointerhashtable.h"
-#ifdef COMPILE_USE_QT4
- #include <tqpainter.h>
- #include <tqstyle.h>
- #include <tq3header.h>
- #include <tqapplication.h>
- #include <tqhash.h>
- #include <tqstyleoption.h>
- #include <tqaccessible.h>
-
- static TQStyleOptionQ3ListView getStyleOption(const Q3ListView *lv, const Q3ListViewItem *item)
- {
- TQStyleOptionQ3ListView opt;
- opt.init(lv);
- 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();
- opt.sortColumn = 0;
- opt.treeStepSize = lv->treeStepSize();
- opt.rootIsDecorated = lv->rootIsDecorated();
- bool firstItem = true;
- while (item) {
- TQStyleOptionQ3ListViewItem lvi;
- lvi.height = item->height();
- lvi.totalHeight = item->totalHeight();
- lvi.itemY = item->itemPos();
- lvi.childCount = item->childCount();
- lvi.features = TQStyleOptionQ3ListViewItem::None;
- lvi.state = TQStyle::State_None;
- if (item->isEnabled())
- lvi.state |= TQStyle::State_Enabled;
- if (item->isOpen())
- lvi.state |= TQStyle::State_Open;
- if (item->isExpandable())
- lvi.features |= TQStyleOptionQ3ListViewItem::Expandable;
- if (item->multiLinesEnabled())
- lvi.features |= TQStyleOptionQ3ListViewItem::MultiLine;
- if (item->isVisible())
- lvi.features |= TQStyleOptionQ3ListViewItem::Visible;
- if (item->parent() && item->parent()->rtti() == 1
- && static_cast<Q3CheckListItem *>(item->parent())->type() == Q3CheckListItem::Controller)
- lvi.features |= TQStyleOptionQ3ListViewItem::ParentControl;
- opt.items.append(lvi);
- if (!firstItem) {
- item = item->nextSibling();
- } else {
- firstItem = false;
- item = item->firstChild();
- }
- }
- return opt;
- }
-
- KviTalListView::KviTalListView(TQWidget * pParent)
- : Q3ListView(pParent)
- {
- 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)
- {
- emit selectionChanged((KviTalListViewItem *)pItem);
- }
-
- void KviTalListView::redirect_currentChanged(Q3ListViewItem * pItem)
- {
- emit currentChanged((KviTalListViewItem *)pItem);
- }
-
- void KviTalListView::redirect_clicked(Q3ListViewItem * pItem)
- {
- emit clicked((KviTalListViewItem *)pItem);
- }
-
- void KviTalListView::redirect_clicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn)
- {
- emit clicked((KviTalListViewItem *)pItem,pnt,uColumn);
- }
-
- void KviTalListView::redirect_pressed(Q3ListViewItem * pItem)
- {
- emit pressed((KviTalListViewItem *)pItem);
- }
-
- void KviTalListView::redirect_pressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn)
- {
- emit pressed((KviTalListViewItem *)pItem,pnt,uColumn);
- }
-
- void KviTalListView::redirect_doubleClicked(Q3ListViewItem * pItem)
- {
- emit doubleClicked((KviTalListViewItem *)pItem);
- }
-
- void KviTalListView::redirect_doubleClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn)
- {
- emit doubleClicked((KviTalListViewItem *)pItem,pnt,uColumn);
- }
-
- void KviTalListView::redirect_returnPressed(Q3ListViewItem * pItem)
- {
- emit returnPressed((KviTalListViewItem *)pItem);
- }
-
- void KviTalListView::redirect_spacePressed(Q3ListViewItem * pItem)
- {
- emit spacePressed((KviTalListViewItem *)pItem);
- }
-
- void KviTalListView::redirect_rightButtonClicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn)
- {
- emit rightButtonClicked((KviTalListViewItem *)pItem,pnt,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 TQPoint &pnt,int uColumn)
- {
- emit mouseButtonClicked(iButton,(KviTalListViewItem *)pItem,pnt,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 TQPoint &pnt,int uColumn)
- {
- emit contextMenuRequested((KviTalListViewItem *)pItem,pnt,uColumn);
- }
-
- void KviTalListView::redirect_onItem(Q3ListViewItem * pItem)
- {
- emit onItem((KviTalListViewItem *)pItem);
- }
-
- void KviTalListView::redirect_expanded(Q3ListViewItem * pItem)
- {
- emit expanded((KviTalListViewItem *)pItem);
- }
-
- void KviTalListView::redirect_collapsed(Q3ListViewItem * pItem)
- {
- emit collapsed((KviTalListViewItem *)pItem);
- }
-
-
- struct KviTalCheckListItemPrivate
- {
- KviTalCheckListItemPrivate():
- exclusive(0),
- currentState(KviTalCheckListItem::Off),
- tristate(false) {}
-
- KviTalCheckListItem *exclusive;
- KviTalCheckListItem::ToggleState currentState;
- TQHash<KviTalCheckListItem *, KviTalCheckListItem::ToggleState> statesDict;
- bool tristate;
- };
-
- KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *parent, const TQString &text,
- Type tt)
- : KviTalListViewItem(parent, text, TQString())
- {
- myType = tt;
- init();
- if (myType == RadioButton) {
- if (parent->type() != RadioButtonController)
- tqWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be "
- "child of a controller");
- else
- d->exclusive = parent;
- }
- }
-
- KviTalCheckListItem::KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after,
- const TQString &text, Type tt)
- : KviTalListViewItem(parent, after, text)
- {
- myType = tt;
- init();
- if (myType == RadioButton) {
- if (parent->type() != RadioButtonController)
- tqWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be "
- "child of a controller");
- else
- d->exclusive = parent;
- }
- }
-
- KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, const TQString &text,
- Type tt)
- : KviTalListViewItem(parent, text, TQString())
- {
- myType = tt;
- if (myType == RadioButton) {
- tqWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be "
- "child of a KviTalCheckListItem");
- }
- init();
- }
-
- KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, KviTalListViewItem *after,
- const TQString &text, Type tt)
- : KviTalListViewItem(parent, after, text)
- {
- myType = tt;
- if (myType == RadioButton) {
- tqWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be "
- "child of a KviTalCheckListItem");
- }
- init();
- }
-
- KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, const TQString &text,
- Type tt)
- : KviTalListViewItem(parent, text)
- {
- myType = tt;
- if (tt == RadioButton)
- tqWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be "
- "child of a KviTalCheckListItem");
- init();
- }
-
- KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, KviTalListViewItem *after,
- const TQString &text, Type tt)
- : KviTalListViewItem(parent, after, text)
- {
- myType = tt;
- if (tt == RadioButton)
- tqWarning("KviTalCheckListItem::KviTalCheckListItem(), radio button must be "
- "child of a KviTalCheckListItem");
- init();
- }
-
- int KviTalCheckListItem::rtti() const
- {
- return RTTI;
- }
-
- KviTalCheckListItem::KviTalCheckListItem(KviTalListView *parent, const TQString &text,
- const TQPixmap & p)
- : KviTalListViewItem(parent, text)
- {
- myType = RadioButtonController;
- setPixmap(0, p);
- init();
- }
-
- KviTalCheckListItem::KviTalCheckListItem(KviTalListViewItem *parent, const TQString &text,
- const TQPixmap & p)
- : KviTalListViewItem(parent, text)
- {
- myType = RadioButtonController;
- setPixmap(0, p);
- init();
- }
-
- void KviTalCheckListItem::init()
- {
- d = new KviTalCheckListItemPrivate();
- on = false; // ### remove on ver 4
- // CheckBoxControllers by default have tristate set to true
- if (myType == CheckBoxController)
- setTristate(true);
- }
-
- KviTalCheckListItem::~KviTalCheckListItem()
- {
- if (myType == RadioButton
- && 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.
- delete d;
- d = 0;
- }
-
- void KviTalCheckListItem::setTristate(bool b)
- {
- if ((myType != CheckBoxController) && (myType != CheckBox)) {
- tqWarning("KviTalCheckListItem::setTristate(), has no effect on RadioButton "
- "or RadioButtonController.");
- return;
- }
- d->tristate = b;
- }
-
- bool KviTalCheckListItem::isTristate() const
- {
- return d->tristate;
- }
-
- KviTalCheckListItem::ToggleState KviTalCheckListItem::state() const
- {
- if (!isTristate() && internalState() == NoChange)
- return Off;
- else
- return d->currentState;
- }
-
- KviTalCheckListItem::ToggleState KviTalCheckListItem::internalState() const
- {
- return d->currentState;
- }
-
- void KviTalCheckListItem::setState(ToggleState s)
- {
- if (myType == CheckBoxController && state() == NoChange)
- updateStoredState(this);
- setState(s, true, true);
- }
-
- void KviTalCheckListItem::setState(ToggleState s, bool update, bool store)
- {
-
- if (s == internalState())
- return;
-
- if (myType == CheckBox) {
- setCurrentState(s);
- stateChange(state());
- if (update && parent() && parent()->rtti() == 1
- && ((KviTalCheckListItem*)parent())->type() == CheckBoxController)
- ((KviTalCheckListItem*)parent())->updateController(update, store);
- } else if (myType == CheckBoxController) {
- if (s == NoChange && childCount()) {
- restoreState(this);
- } else {
- KviTalListViewItem *item = firstChild();
- int childCount = 0;
- while(item) {
- if (item->rtti() == 1 &&
- (((KviTalCheckListItem*)item)->type() == CheckBox ||
- ((KviTalCheckListItem*)item)->type() == CheckBoxController)) {
- KviTalCheckListItem *checkItem = (KviTalCheckListItem*)item;
- checkItem->setState(s, false, false);
- childCount++;
- }
- item = item->nextSibling();
- }
- if (update) {
- if (childCount > 0) {
- ToggleState oldState = internalState();
- updateController(false, false);
- if (oldState != internalState() &&
- parent() && parent()->rtti() == 1 &&
- ((KviTalCheckListItem*)parent())->type() == CheckBoxController)
- ((KviTalCheckListItem*)parent())->updateController(update, store);
-
- updateController(update, store);
- } else {
- // if there are no children we simply set the CheckBoxController and update its parent
- setCurrentState(s);
- stateChange(state());
- if (parent() && parent()->rtti() == 1
- && ((KviTalCheckListItem*)parent())->type() == CheckBoxController)
- ((KviTalCheckListItem*)parent())->updateController(update, store);
- }
- } else {
- setCurrentState(s);
- stateChange(state());
- }
-
- }
- } else if (myType == RadioButton) {
- if (s == On) {
- if (d->exclusive && d->exclusive->d->exclusive != this)
- d->exclusive->turnOffChild();
- setCurrentState(s);
- if (d->exclusive)
- d->exclusive->d->exclusive = this;
- } else {
- if (d->exclusive && d->exclusive->d->exclusive == this)
- d->exclusive->d->exclusive = 0;
- setCurrentState(Off);
- }
- stateChange(state());
- }
- repaint();
- }
-
- void KviTalCheckListItem::setCurrentState(ToggleState s)
- {
- ToggleState old = d->currentState;
- d->currentState = s;
- if (d->currentState == On)
- on = true;
- else
- on = false;
-
- //#ifndef TQT_NO_ACCESSIBILITY
- // if (old != d->currentState && listView())
- // TQAccessible::updateAccessibility(listView()->viewport(), indexOfItem(this), TQAccessible::StateChanged);
- //#else
- // Q_UNUSED(old);
- //#endif
- }
-
- void KviTalCheckListItem::setStoredState(ToggleState newState, KviTalCheckListItem *key)
- {
- if (myType == CheckBox || myType == CheckBoxController)
- d->statesDict[key] = newState;
- }
-
- KviTalCheckListItem::ToggleState KviTalCheckListItem::storedState(KviTalCheckListItem *key) const
- {
- TQHash<KviTalCheckListItem *, KviTalCheckListItem::ToggleState>::Iterator it = d->statesDict.find(key);
- if (it != d->statesDict.end())
- return it.value();
- else
- return Off;
- }
-
- void KviTalCheckListItem::turnOffChild()
- {
- if (myType == RadioButtonController && d->exclusive)
- d->exclusive->setOn(false);
- }
-
- void KviTalCheckListItem::activate()
- {
- KviTalListView * lv = listView();
-
- if (lv && !lv->isEnabled() || !isEnabled())
- return;
-
- TQPoint pos;
- int boxsize = lv->style()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv);
- if (activatedPos(pos)) {
- bool parentControl = false;
- if (parent() && parent()->rtti() == 1 &&
- ((KviTalCheckListItem*) parent())->type() == RadioButtonController)
- parentControl = true;
-
- int x = parentControl ? 0 : 3;
- int align = lv->columnAlignment(0);
- int marg = lv->itemMargin();
- int y = 0;
-
- if (align & TQt::AlignVCenter)
- y = ((height() - boxsize) / 2) + marg;
- else
- y = (lv->fontMetrics().height() + 2 + marg - boxsize) / 2;
-
- TQRect r(x, y, boxsize-3, boxsize-3);
- // columns might have been swapped
- r.moveBy(lv->header()->sectionPos(0), 0);
- if (!r.contains(pos))
- return;
- }
- if ((myType == CheckBox) || (myType == CheckBoxController)) {
- //lv->d->startEdit = FALSE;
- switch (internalState()) {
- case On:
- setState(Off);
- break;
- case Off:
- if (!isTristate() && myType == CheckBox) {
- setState(On);
- } else {
- setState(NoChange);
- if (myType == CheckBoxController && internalState() != NoChange)
- setState(On);
- }
- break;
- case NoChange:
- setState(On);
- break;
- }
- ignoreDoubleClick();
- } else if (myType == RadioButton) {
- setOn(true);
- ignoreDoubleClick();
- }
- }
-
- void KviTalCheckListItem::setOn(bool b )
- {
- if (b)
- setState(On , true, true);
- else
- setState(Off , true, true);
- }
-
- void KviTalCheckListItem::stateChange(bool)
- {
- }
-
- void KviTalCheckListItem::stateChange(ToggleState s)
- {
- stateChange(s == On);
- }
-
- void KviTalCheckListItem::restoreState(KviTalCheckListItem *key, int depth)
- {
- switch (type()) {
- case CheckBox:
- setCurrentState(storedState(key));
- stateChange(state());
- repaint();
- break;
- case CheckBoxController: {
- KviTalListViewItem *item = firstChild();
- int childCount = 0;
- while (item) {
- // recursively calling restoreState for children of type CheckBox and CheckBoxController
- if (item->rtti() == 1 &&
- (((KviTalCheckListItem*)item)->type() == CheckBox ||
- ((KviTalCheckListItem*)item)->type() == CheckBoxController)) {
- ((KviTalCheckListItem*)item)->restoreState(key , depth+1);
- childCount++;
- }
- item = item->nextSibling();
- }
- if (childCount > 0) {
- if (depth == 0)
- updateController(true);
- else
- updateController(false);
- } else {
- // if there are no children we retrieve the CheckBoxController state directly.
- setState(storedState(key), true, false);
- }
- }
- break;
- default:
- break;
- }
- }
-
- void KviTalCheckListItem::updateController(bool update , bool store)
- {
- if (myType != CheckBoxController)
- 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();
-
- ToggleState theState = Off;
- bool first = true;
- KviTalListViewItem *item = firstChild();
- while(item && theState != NoChange) {
- if (item->rtti() == 1 &&
- (((KviTalCheckListItem*)item)->type() == CheckBox ||
- ((KviTalCheckListItem*)item)->type() == CheckBoxController)) {
- KviTalCheckListItem *checkItem = (KviTalCheckListItem*)item;
- if (first) {
- theState = checkItem->internalState();
- first = false;
- } else {
- if (checkItem->internalState() == NoChange ||
- theState != checkItem->internalState())
- theState = NoChange;
- else
- theState = checkItem->internalState();
- }
- }
- item = item->nextSibling();
- }
- if (internalState() != theState) {
- setCurrentState(theState);
- if (store && (internalState() == On || internalState() == Off))
- updateStoredState(this);
- stateChange(state());
- if (update && controller) {
- controller->updateController(update, store);
- }
- repaint();
- }
- }
-
- void KviTalCheckListItem::updateStoredState(KviTalCheckListItem *key)
- {
- if (myType != CheckBoxController)
- return;
-
- KviTalListViewItem *item = firstChild();
- while(item) {
- if (item->rtti() == 1) {
- KviTalCheckListItem *checkItem = (KviTalCheckListItem*)item;
- if (checkItem->type() == CheckBox)
- checkItem->setStoredState(checkItem->internalState(), key);
- else if (checkItem->type() == CheckBoxController)
- checkItem->updateStoredState(key);
- }
- item = item->nextSibling();
- }
- // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController children.
- setStoredState(internalState() , key);
- }
-
- void KviTalCheckListItem::setup()
- {
- KviTalListViewItem::setup();
- int h = height();
- KviTalListView *lv = listView();
- if (lv)
- h = qMax(lv->style()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv),
- h);
- h = qMax(h, TQApplication::globalStrut().height());
- setHeight(h);
- }
-
- int KviTalCheckListItem::width(const TQFontMetrics& fm, const KviTalListView* lv, int column) const
- {
- int r = KviTalListViewItem::width(fm, lv, column);
- if (column == 0) {
- r += lv->itemMargin();
- if (myType == RadioButtonController && pixmap(0)) {
- // r += 0;
- } else {
- r += lv->style()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv) + 4;
- }
- }
- return qMax(r, TQApplication::globalStrut().width());
- }
-
- void KviTalCheckListItem::paintCell(TQPainter * p, const TQColorGroup & cg,
- int column, int width, int align)
- {
- if (!p)
- return;
-
- KviTalListView *lv = listView();
- if (!lv)
- return;
-
- 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, TQRect(0, 0, width, height()));
-
- if (column != 0) {
- // The rest is text, or for subclasses to change.
- KviTalListViewItem::paintCell(p, cg, column, width, align);
- return;
- }
-
- bool parentControl = false;
- if (parent() && parent()->rtti() == 1 &&
- ((KviTalCheckListItem*) parent())->type() == RadioButtonController)
- parentControl = true;
-
- TQFontMetrics fm(lv->fontMetrics());
- int boxsize = lv->style()->pixelMetric(myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize :
- TQStyle::PM_CheckListButtonSize, 0, lv);
- int marg = lv->itemMargin();
- int r = marg;
-
- // Draw controller / checkbox / radiobutton ---------------------
- TQStyle::State styleflags = TQStyle::State_None;
- if (internalState() == On) {
- styleflags |= TQStyle::State_On;
- } else if (internalState() == NoChange) {
- if (myType == CheckBoxController && !isTristate())
- styleflags |= TQStyle::State_Off;
- else
- styleflags |= TQStyle::State_NoChange;
- } else {
- styleflags |= TQStyle::State_Off;
- }
- if (isSelected())
- styleflags |= TQStyle::State_Selected;
- if (isEnabled() && lv->isEnabled())
- styleflags |= TQStyle::State_Enabled;
- if (lv->window()->isActiveWindow())
- styleflags |= TQStyle::State_Active;
-
- if (myType == RadioButtonController) {
- int x = 0;
- if(!parentControl)
- x += 3;
- if (!pixmap(0)) {
- TQStyleOptionQ3ListView opt = getStyleOption(lv, this);
- opt.rect.setRect(x, 0, boxsize, fm.height() + 2 + marg);
- opt.palette = cg;
- opt.state = styleflags;
- lv->style()->drawPrimitive(TQStyle::PE_Q3CheckListController, &opt, p, lv);
- r += boxsize + 4;
- }
- } else {
- Q_ASSERT(lv); //###
- int x = 0;
- int y = 0;
- if (!parentControl)
- x += 3;
- if (align & TQt::AlignVCenter)
- y = ((height() - boxsize) / 2) + marg;
- else
- y = (fm.height() + 2 + marg - boxsize) / 2;
-
- 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)
- ? TQStyle::PE_Q3CheckListIndicator
- : TQStyle::PE_Q3CheckListExclusiveIndicator, &opt, p, lv);
- r += boxsize + 4;
- }
-
- // Draw text ----------------------------------------------------
- p->translate(r, 0);
- p->setPen(TQPen(cg.text()));
- KviTalListViewItem::paintCell(p, cg, column, width - r, align);
- }
-
- void KviTalCheckListItem::paintFocus(TQPainter *p, const TQColorGroup & cg,
- const TQRect & r)
- {
- bool intersect = true;
- KviTalListView *lv = listView();
- if (lv && lv->header()->mapToActual(0) != 0) {
- 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(TQRect(p, r.y(), xdepth - p + 1, r.height()));
- }
- bool parentControl = false;
- if (parent() && parent()->rtti() == 1 &&
- ((KviTalCheckListItem*) parent())->type() == RadioButtonController)
- parentControl = true;
- if (myType != RadioButtonController && intersect &&
- (lv->rootIsDecorated() || myType == RadioButton ||
- (myType == CheckBox && parentControl))) {
- TQRect rect;
- int boxsize = lv->style()->pixelMetric(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,
- r.height());
- } else
- rect.setRect(r.x() + boxsize + 5, r.y(), r.width() - boxsize - 5,
- r.height());
- KviTalListViewItem::paintFocus(p, cg, rect);
- } else {
- KviTalListViewItem::paintFocus(p, cg, r);
- }
- }
-
-
- #include "kvi_tal_listview_qt4.moc"
-#else
#include <tqpainter.h>
#include <tqstyle.h>
#include <tqheader.h>
@@ -1536,7 +763,6 @@
}
#include "kvi_tal_listview_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_listview.h b/src/kvilib/tal/kvi_tal_listview.h
index 9e1b46fa..b343507f 100644
--- a/src/kvilib/tal/kvi_tal_listview.h
+++ b/src/kvilib/tal/kvi_tal_listview.h
@@ -26,26 +26,8 @@
//=============================================================================
-//
-// This is the only reasonable CROSS-QT3-QT4-COMPATIBLE implementation
-// of TQListView I've been able to find.
-// Note that using macros for the items will NOT work since moc
-// doesn't expand them. Note also that KviTalCheckListItem must
-// 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 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.
-//
-
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_listview_qt4.h"
-#else
- #include "kvi_tal_listview_qt3.h"
-#endif
+#include "kvi_tal_listview_qt3.h"
#endif // _KVI_TAL_LISTVIEW_H_
diff --git a/src/kvilib/tal/kvi_tal_listview_qt4.h b/src/kvilib/tal/kvi_tal_listview_qt4.h
deleted file mode 100644
index 3f0caf00..00000000
--- a/src/kvilib/tal/kvi_tal_listview_qt4.h
+++ /dev/null
@@ -1,200 +0,0 @@
-#ifndef _KVI_TAL_LISTVIEW_QT4_H_
-#define _KVI_TAL_LISTVIEW_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_listview_qt4.h
-// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include "kvi_settings.h"
-
-#include "kvi_qstring.h"
-
-#include <tq3listview.h>
-
-class KviTalListViewItem;
-
-
-class KVILIB_API KviTalListView : public Q3ListView
-{
- friend class KviTalCheckListItem;
- TQ_OBJECT
-
-public:
- KviTalListView(TQWidget * pParent);
- virtual ~KviTalListView() {};
-public:
- // 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 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 TQPoint &pnt,int uColumn);
- void pressed(KviTalListViewItem * pItem);
- void pressed(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
- void doubleClicked(KviTalListViewItem * pItem);
- void doubleClicked(KviTalListViewItem * pItem,const TQPoint &pnt,int uColumn);
- void returnPressed(KviTalListViewItem * pItem);
- void spacePressed(KviTalListViewItem * pItem);
- 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(Q3ListViewItem * pItem);
- void redirect_currentChanged(Q3ListViewItem * pItem);
- void redirect_clicked(Q3ListViewItem * pItem);
- void redirect_clicked(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn);
- void redirect_pressed(Q3ListViewItem * pItem);
- void redirect_pressed(Q3ListViewItem * pItem,const TQPoint &pnt,int uColumn);
- void redirect_doubleClicked(Q3ListViewItem * pItem);
- 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 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);
-
-};
-
-
-class KVILIB_API KviTalListViewItem : public Q3ListViewItem
-{
-public:
- KviTalListViewItem(KviTalListView * pParent)
- : Q3ListViewItem(pParent) {};
- KviTalListViewItem(KviTalListViewItem * pParent)
- : Q3ListViewItem(pParent) {};
- KviTalListViewItem(KviTalListView * pParent,KviTalListViewItem * pAfter)
- : Q3ListViewItem(pParent,pAfter) {};
- KviTalListViewItem(KviTalListViewItem * pParent,KviTalListViewItem * pAfter)
- : Q3ListViewItem(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)
- : Q3ListViewItem(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)
- : Q3ListViewItem(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)
- : Q3ListViewItem(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)
- : Q3ListViewItem(pParent,pAfter,szLabel1,szLabel2,szLabel3,szLabel4) {};
-public:
- // 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(); };
- KviTalListView * listView() const { return (KviTalListView *)Q3ListViewItem::listView(); };
- KviTalListViewItem * itemAbove() { return (KviTalListViewItem *)Q3ListViewItem::itemAbove(); };
- KviTalListViewItem * itemBelow() { return (KviTalListViewItem *)Q3ListViewItem::itemBelow(); };
-};
-
-struct KviTalCheckListItemPrivate;
-
-class KVILIB_API KviTalCheckListItem : public KviTalListViewItem
-{
-public:
- enum Type { RadioButton,
- CheckBox,
- Controller,
- RadioButtonController=Controller,
- CheckBoxController };
-
- enum ToggleState { Off, NoChange, On };
-
- KviTalCheckListItem(KviTalCheckListItem *parent, const TQString &text,
- Type = RadioButtonController);
- KviTalCheckListItem(KviTalCheckListItem *parent, KviTalListViewItem *after,
- const TQString &text, Type = RadioButtonController);
- KviTalCheckListItem(KviTalListViewItem *parent, const TQString &text,
- Type = RadioButtonController);
- KviTalCheckListItem(KviTalListViewItem *parent, KviTalListViewItem *after,
- const TQString &text, Type = RadioButtonController);
- KviTalCheckListItem(KviTalListView *parent, const TQString &text,
- Type = RadioButtonController);
- KviTalCheckListItem(KviTalListView *parent, KviTalListViewItem *after,
- const TQString &text, Type = RadioButtonController);
- KviTalCheckListItem(KviTalListViewItem *parent, const TQString &text,
- const TQPixmap &);
- KviTalCheckListItem(KviTalListView *parent, const TQString &text,
- const TQPixmap &);
- ~KviTalCheckListItem();
-
- void paintCell(TQPainter *, const TQColorGroup & cg,
- int column, int width, int alignment);
- 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; }
- TQString text() const { return KviTalListViewItem::text(0); }
- TQString text(int n) const { return KviTalListViewItem::text(n); }
-
- void setTristate(bool);
- bool isTristate() const;
- ToggleState state() const;
- void setState(ToggleState s);
-
- int rtti() const;
- enum { RTTI = 1 };
-
-protected:
- void activate();
- void turnOffChild();
- virtual void stateChange(bool);
-
-private:
- void init();
- ToggleState internalState() const;
- void setStoredState(ToggleState newState, KviTalCheckListItem *key);
- ToggleState storedState(KviTalCheckListItem *key) const;
- void stateChange(ToggleState s);
- void restoreState(KviTalCheckListItem *key, int depth = 0);
- void updateController(bool update = true , bool store = false);
- void updateStoredState(KviTalCheckListItem *key);
- void setState(ToggleState s, bool update, bool store);
- void setCurrentState(ToggleState s);
-
- Type myType;
- bool on;
- KviTalCheckListItemPrivate *d;
-};
-
-#define KviTalListViewItemIterator Q3ListViewItemIterator
-
-
-#endif // _KVI_TAL_LISTVIEW_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_mainwindow.cpp b/src/kvilib/tal/kvi_tal_mainwindow.cpp
index 0a83e90e..5ba6e653 100644
--- a/src/kvilib/tal/kvi_tal_mainwindow.cpp
+++ b/src/kvilib/tal/kvi_tal_mainwindow.cpp
@@ -36,30 +36,11 @@
#else
- #ifdef COMPILE_USE_QT4
- KviTalMainWindow::KviTalMainWindow(TQWidget * par,const char * nam)
- : TQMainWindow(par,nam)
- {
- }
-
- bool KviTalMainWindow::usesBigPixmaps()
- {
- return (iconSize().width() > 40);
- }
-
- void KviTalMainWindow::setUsesBigPixmaps(bool b)
- {
- if(b)setIconSize(TQSize(48,48));
- else setIconSize(TQSize(24,24));
- }
- #include "kvi_tal_mainwindow_qt4.moc"
- #else
KviTalMainWindow::KviTalMainWindow(TQWidget * par,const char * nam)
: TQMainWindow(par,nam)
{
}
#include "kvi_tal_mainwindow_qt3.moc"
- #endif
#endif
diff --git a/src/kvilib/tal/kvi_tal_mainwindow.h b/src/kvilib/tal/kvi_tal_mainwindow.h
index 904e18e3..d32705d7 100644
--- a/src/kvilib/tal/kvi_tal_mainwindow.h
+++ b/src/kvilib/tal/kvi_tal_mainwindow.h
@@ -28,11 +28,7 @@
#ifdef COMPILE_TDE_SUPPORT
#include "kvi_tal_mainwindow_kde.h"
#else
- #ifdef COMPILE_USE_QT4
- #include "kvi_tal_mainwindow_qt4.h"
- #else
#include "kvi_tal_mainwindow_qt3.h"
- #endif
#endif
#endif // _KVI_TAL_MAINWINDOW_H_
diff --git a/src/kvilib/tal/kvi_tal_mainwindow_qt4.h b/src/kvilib/tal/kvi_tal_mainwindow_qt4.h
deleted file mode 100644
index 76450240..00000000
--- a/src/kvilib/tal/kvi_tal_mainwindow_qt4.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _KVI_TAL_MAINWINDOW_TQT_H_
-#define _KVI_TAL_MAINWINDOW_TQT_H_
-
-//
-// File : kvi_tal_mainwindow_qt.h
-// Creation date : Sun Aug 12 2001 04:43:58 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2001 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-
-#include <tqmainwindow.h>
-
-class KVILIB_API KviTalMainWindow : public TQMainWindow
-{
- TQ_OBJECT
-
-public:
- KviTalMainWindow(TQWidget * par,const char * nam);
- ~KviTalMainWindow();
-public:
- bool usesBigPixmaps();
- void setUsesBigPixmaps(bool b);
-};
-
-#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 e0dcd2df..1ccc17e9 100644
--- a/src/kvilib/tal/kvi_tal_menubar.cpp
+++ b/src/kvilib/tal/kvi_tal_menubar.cpp
@@ -41,11 +41,7 @@
#else
KviTalMenuBar::KviTalMenuBar(TQWidget * par,const char * nam)
-#ifdef COMPILE_USE_QT4
- : TQMenuBar(par)
-#else
: TQMenuBar(par,nam)
-#endif
{
}
diff --git a/src/kvilib/tal/kvi_tal_popupmenu.cpp b/src/kvilib/tal/kvi_tal_popupmenu.cpp
index ad3c8463..2033453c 100644
--- a/src/kvilib/tal/kvi_tal_popupmenu.cpp
+++ b/src/kvilib/tal/kvi_tal_popupmenu.cpp
@@ -25,9 +25,5 @@
#define __KVILIB__
#include "kvi_tal_popupmenu.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_popupmenu_qt4.moc"
-#else
#include "kvi_tal_popupmenu_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_popupmenu.h b/src/kvilib/tal/kvi_tal_popupmenu.h
index 5035f031..e5dd9a8c 100644
--- a/src/kvilib/tal/kvi_tal_popupmenu.h
+++ b/src/kvilib/tal/kvi_tal_popupmenu.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_popupmenu_qt4.h"
-#else
#include "kvi_tal_popupmenu_qt3.h"
-#endif
#endif // _KVI_TAL_POPUPMENU_H_
diff --git a/src/kvilib/tal/kvi_tal_popupmenu_qt4.h b/src/kvilib/tal/kvi_tal_popupmenu_qt4.h
deleted file mode 100644
index b8db526d..00000000
--- a/src/kvilib/tal/kvi_tal_popupmenu_qt4.h
+++ /dev/null
@@ -1,90 +0,0 @@
-#ifndef _KVI_TAL_POPUPMENU_QT4_H_
-#define _KVI_TAL_POPUPMENU_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_popupmenu_qt3.h
-// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include "kvi_settings.h"
-#include "kvi_qstring.h"
-
-#include <tq3popupmenu.h>
-#include <tqwidgetaction.h>
-
-class KVILIB_API KviTalPopupMenu : public Q3PopupMenu
-{
- TQ_OBJECT
-
-public:
- KviTalPopupMenu(TQWidget * pParent=0,const TQString &szName = KviTQString::empty)
- : Q3PopupMenu(pParent)
- {
- setName(szName);
- };
- virtual ~KviTalPopupMenu() {};
-
- int insertItem(const TQString &szText)
- {
- return Q3PopupMenu::insertItem(szText);
- }
- int insertItem(const TQPixmap &pix,const TQString &szText)
- {
- return Q3PopupMenu::insertItem(TQIcon(pix),szText,-1,-1);
- }
- int insertItem(const TQString &szText,int id)
- {
- return Q3PopupMenu::insertItem(szText,id);
- }
- int insertItem(const TQPixmap &pix,const TQString &szText,int id)
- {
- return Q3PopupMenu::insertItem(TQIcon(pix),szText,id,-1);
- }
- int insertItem(const TQString &szText,const TQObject * pReceiver,const char * szSlot)
- {
- return Q3PopupMenu::insertItem(szText,pReceiver,szSlot);
- }
- int insertItem(const TQPixmap &pix,const TQString &szText,const TQObject * pReceiver,const char * szSlot)
- {
- return Q3PopupMenu::insertItem(TQIcon(pix),szText,pReceiver,szSlot);
- }
- int insertItem(const TQPixmap &pix,const TQString &szText,TQMenu *pMenu)
- {
- return Q3PopupMenu::insertItem(TQIcon(pix),szText,pMenu,-1,-1);
- }
- int insertItem(const TQString &szText,TQMenu *pMenu)
- {
- return Q3PopupMenu::insertItem(szText,pMenu,-1,-1);
- }
- int insertItem(TQWidget * pWidget)
- {
- // needs TQt 4.2
- TQWidgetAction * pAct = new TQWidgetAction(this);
- pAct->setDefaultWidget(pWidget);
- addAction(pAct);
- return 0;
- }
-
-
-};
-
-#endif // _KVI_TAL_POPUPMENU_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_scrollview.cpp b/src/kvilib/tal/kvi_tal_scrollview.cpp
index 7e3e5eba..8cd3810c 100644
--- a/src/kvilib/tal/kvi_tal_scrollview.cpp
+++ b/src/kvilib/tal/kvi_tal_scrollview.cpp
@@ -25,9 +25,5 @@
#define __KVILIB__
#include "kvi_tal_scrollview.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_scrollview_qt4.moc"
-#else
#include "kvi_tal_scrollview_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_scrollview.h b/src/kvilib/tal/kvi_tal_scrollview.h
index ff27acf4..ce9fcf77 100644
--- a/src/kvilib/tal/kvi_tal_scrollview.h
+++ b/src/kvilib/tal/kvi_tal_scrollview.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_scrollview_qt4.h"
-#else
#include "kvi_tal_scrollview_qt3.h"
-#endif
#endif // _KVI_TAL_SCROLLVIEW_H_
diff --git a/src/kvilib/tal/kvi_tal_scrollview_qt4.h b/src/kvilib/tal/kvi_tal_scrollview_qt4.h
deleted file mode 100644
index 26c22f45..00000000
--- a/src/kvilib/tal/kvi_tal_scrollview_qt4.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _KVI_TAL_SCROLLVIEW_QT4_H_
-#define _KVI_TAL_SCROLLVIEW_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_scrollview_qt4.h
-// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include "kvi_settings.h"
-
-#include <tq3scrollview.h>
-
-class KVILIB_API KviTalScrollView : public Q3ScrollView
-{
- TQ_OBJECT
-
-public:
- KviTalScrollView(TQWidget * pParent)
- : Q3ScrollView(pParent) {};
- virtual ~KviTalScrollView() {};
-};
-
-#endif // _KVI_TAL_SCROLLVIEW_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_tabdialog.cpp b/src/kvilib/tal/kvi_tal_tabdialog.cpp
index 81bd5b39..3e76dd30 100644
--- a/src/kvilib/tal/kvi_tal_tabdialog.cpp
+++ b/src/kvilib/tal/kvi_tal_tabdialog.cpp
@@ -26,9 +26,5 @@
#include "kvi_tal_tabdialog.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_tabdialog_qt4.moc"
-#else
#include "kvi_tal_tabdialog_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_tabdialog.h b/src/kvilib/tal/kvi_tal_tabdialog.h
index 46e09843..1eb12dfe 100644
--- a/src/kvilib/tal/kvi_tal_tabdialog.h
+++ b/src/kvilib/tal/kvi_tal_tabdialog.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_tabdialog_qt4.h"
-#else
#include "kvi_tal_tabdialog_qt3.h"
-#endif
#endif // _KVI_TAL_TABDIALOG_H_
diff --git a/src/kvilib/tal/kvi_tal_tabdialog_qt4.h b/src/kvilib/tal/kvi_tal_tabdialog_qt4.h
deleted file mode 100644
index 43c67c3e..00000000
--- a/src/kvilib/tal/kvi_tal_tabdialog_qt4.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _KVI_TAL_TABDIALOG_QT4_H_
-#define _KVI_TAL_TABDIALOG_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_tabdialog_qt4.h
-// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include <tq3tabdialog.h>
-
-class KVILIB_API KviTalTabDialog : public Q3TabDialog
-{
- TQ_OBJECT
-
-public:
- KviTalTabDialog(TQWidget * pParent = 0,const char * name = 0,bool bModal = false)
- : Q3TabDialog(pParent,name,bModal) {};
- ~KviTalTabDialog() {};
-};
-
-#endif // _KVI_TAL_TABDIALOG_QT3_H_
diff --git a/src/kvilib/tal/kvi_tal_textedit.cpp b/src/kvilib/tal/kvi_tal_textedit.cpp
index 686c8cba..e40c81b3 100644
--- a/src/kvilib/tal/kvi_tal_textedit.cpp
+++ b/src/kvilib/tal/kvi_tal_textedit.cpp
@@ -26,9 +26,5 @@
#include "kvi_tal_textedit.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_textedit_qt4.moc"
-#else
#include "kvi_tal_textedit_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_textedit.h b/src/kvilib/tal/kvi_tal_textedit.h
index fb7381ae..05986836 100644
--- a/src/kvilib/tal/kvi_tal_textedit.h
+++ b/src/kvilib/tal/kvi_tal_textedit.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_textedit_qt4.h"
-#else
#include "kvi_tal_textedit_qt3.h"
-#endif
#endif // _KVI_TAL_TEXTEDIT_H_
diff --git a/src/kvilib/tal/kvi_tal_textedit_qt4.h b/src/kvilib/tal/kvi_tal_textedit_qt4.h
deleted file mode 100644
index ec920392..00000000
--- a/src/kvilib/tal/kvi_tal_textedit_qt4.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef _KVI_TAL_TEXTEDIT_QT4_H_
-#define _KVI_TAL_TEXTEDIT_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_textedit_qt4.h
-// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include <tq3textedit.h>
-
-class KVILIB_API KviTalTextEdit : public Q3TextEdit
-{
- TQ_OBJECT
-
-public:
- KviTalTextEdit(TQWidget * pParent = 0,const char * name = 0)
- : Q3TextEdit(pParent,name) {};
- ~KviTalTextEdit() {};
-};
-
-#endif // _KVI_TAL_TEXTEDIT_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_toolbar.cpp b/src/kvilib/tal/kvi_tal_toolbar.cpp
index 393b15d6..914825fe 100644
--- a/src/kvilib/tal/kvi_tal_toolbar.cpp
+++ b/src/kvilib/tal/kvi_tal_toolbar.cpp
@@ -41,52 +41,6 @@
#else
- #ifdef COMPILE_USE_QT4
-
- KviTalToolBar::KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam)
- //: Q3ToolBar(label,w,dock,bNewLine,nam)
- : TQToolBar(label,w)
- {
- //setFrameStyle(TQFrame::NoFrame);
- setObjectName(nam);
- if(!layout())
- this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight));
- w->addToolBar(dock,this);
- }
- KviTalToolBar::KviTalToolBar(TQMainWindow *w,const char * name)
- : TQToolBar(w)
- {
- //setFrameStyle(TQFrame::NoFrame);
- setObjectName(name);
- if(!layout())
- this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight));
- w->addToolBar(this);
- }
-
- TQBoxLayout * KviTalToolBar::boxLayout()
- {
- return (TQBoxLayout*)this->layout();
- }
-
- void KviTalToolBar::setBoxLayout(TQBoxLayout * l)
- {
- this->setLayout(l);
- }
-
- bool KviTalToolBar::usesBigPixmaps()
- {
- return (iconSize().width() > 40);
- }
-
- void KviTalToolBar::setUsesBigPixmaps(bool b)
- {
- if(b)setIconSize(TQSize(48,48));
- else setIconSize(TQSize(22,22));
- }
-
- #include "kvi_tal_toolbar_qt4.moc"
-
- #else
KviTalToolBar::KviTalToolBar(const TQString &label,TQMainWindow *w,TQT_TOOLBARDOCK_TYPE dock,bool bNewLine,const char * nam)
: TQToolBar(label,w,dock,bNewLine,nam)
{
@@ -97,7 +51,6 @@
}
#include "kvi_tal_toolbar_qt3.moc"
- #endif
KviTalToolBar::~KviTalToolBar()
{
diff --git a/src/kvilib/tal/kvi_tal_toolbar.h b/src/kvilib/tal/kvi_tal_toolbar.h
index f9da5eff..c17b21ca 100644
--- a/src/kvilib/tal/kvi_tal_toolbar.h
+++ b/src/kvilib/tal/kvi_tal_toolbar.h
@@ -27,11 +27,7 @@
#ifdef COMPILE_TDE_SUPPORT
#include "kvi_tal_toolbar_kde.h"
#else
- #ifdef COMPILE_USE_QT4
- #include "kvi_tal_toolbar_qt4.h"
- #else
#include "kvi_tal_toolbar_qt3.h"
- #endif
#endif
#endif //_KVI_TAL_TOOLBAR_H_
diff --git a/src/kvilib/tal/kvi_tal_toolbar_qt4.h b/src/kvilib/tal/kvi_tal_toolbar_qt4.h
deleted file mode 100644
index b670c42c..00000000
--- a/src/kvilib/tal/kvi_tal_toolbar_qt4.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef _KVI_TAL_TOOLBAR_QT4_H_
-#define _KVI_TAL_TOOLBAR_QT4_H_
-//
-// File : kvi_tal_toolbar_qt4.h
-// Creation date : Wed Feb 1 2007 04:11:11 2001 GMT by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-
-#include "kvi_settings.h"
-#include "kvi_tal_toolbardocktype.h"
-
-#include <TQToolBar>
-#include <TQMainWindow>
-#include <TQBoxLayout>
-
-
-class KVILIB_API KviTalToolBar : public TQToolBar
-{
- TQ_OBJECT
-
-public:
- 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:
- TQBoxLayout * boxLayout();
- void setBoxLayout(TQBoxLayout *l);
- bool usesBigPixmaps();
- void setUsesBigPixmaps(bool b);
-};
-
-#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 0295f7d4..b4e5f4df 100644
--- a/src/kvilib/tal/kvi_tal_toolbardocktype.h
+++ b/src/kvilib/tal/kvi_tal_toolbardocktype.h
@@ -23,38 +23,14 @@
//
#include "kvi_settings.h"
-//#define COMPILE_USE_QT4
-#ifdef COMPILE_USE_QT4
-/*
- #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 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 TQT_DOCK_MINIMIZED TQt::TopToolBarArea
- #define TQT_DOCK_TORNOFF TQt::TopToolBarArea
- #define TQT_DOCK_UNMANAGED TQt::TopToolBarArea
-#else
- #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
+#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 //_KVI_TAL_TOOLBARDOCKTYPE_H_
diff --git a/src/kvilib/tal/kvi_tal_tooltip.cpp b/src/kvilib/tal/kvi_tal_tooltip.cpp
index 486c0feb..b7a5a516 100644
--- a/src/kvilib/tal/kvi_tal_tooltip.cpp
+++ b/src/kvilib/tal/kvi_tal_tooltip.cpp
@@ -30,90 +30,32 @@
KviTalToolTipHelper::KviTalToolTipHelper(KviTalToolTip * pToolTip,TQWidget * pWidget)
: TQObject(pWidget)
{
-#ifdef COMPILE_USE_QT4
- m_pToolTip = pToolTip;
- pWidget->installEventFilter(this);
-#endif
}
KviTalToolTipHelper::~KviTalToolTipHelper()
{
-#ifdef COMPILE_USE_QT4
- if(m_pToolTip)
- {
- m_pToolTip->helperDying();
- delete m_pToolTip;
- }
-#endif
}
void KviTalToolTipHelper::toolTipDying()
{
-#ifdef COMPILE_USE_QT4
- m_pToolTip = 0;
-#endif
}
bool KviTalToolTipHelper::eventFilter(TQObject * pObject,TQEvent * pEvent)
{
-#ifdef COMPILE_USE_QT4
- if((pEvent->type() == TQEvent::ToolTip) && m_pToolTip)
- {
- tqDebug("TOOL TIP EVENT WITH POSITION %d,%d",((TQHelpEvent *)pEvent)->pos().x(),((TQHelpEvent *)pEvent)->pos().y());
- m_pToolTip->maybeTip(((TQHelpEvent *)pEvent)->pos());
- return true;
- }
-#endif
return false;
}
KviTalToolTip::KviTalToolTip(TQWidget * pParent)
-#ifndef COMPILE_USE_QT4
: TQToolTip(pParent)
-#endif
{
-#ifdef COMPILE_USE_QT4
- m_pHelper = new KviTalToolTipHelper(this,pParent);
- m_pParent = pParent;
-#endif
}
KviTalToolTip::~KviTalToolTip()
{
-#ifdef COMPILE_USE_QT4
- if(m_pHelper)
- {
- m_pHelper->toolTipDying();
- delete m_pHelper;
- }
-#endif
}
-#ifdef COMPILE_USE_QT4
-void KviTalToolTip::helperDying()
-{
- m_pHelper = 0;
-}
-#endif
-#ifdef COMPILE_USE_QT4
-void KviTalToolTip::add(TQWidget * widget,const TQString & text)
-{
- TQToolTip::add(widget,text);
-}
-
-void KviTalToolTip::remove(TQWidget * widget)
-{
- TQToolTip::remove(widget);
-}
-
-void KviTalToolTip::tip(const TQRect & rect,const TQString & text)
-{
- tqDebug("TOOL TIP AT %d,%d",rect.topLeft().x(),rect.topLeft().y());
- TQToolTip::showText(m_pParent->mapToGlobal(rect.topLeft()),text);
-}
-#endif
void KviTalToolTip::maybeTip(const TQPoint & p)
{
diff --git a/src/kvilib/tal/kvi_tal_tooltip.h b/src/kvilib/tal/kvi_tal_tooltip.h
index 1e220e14..345ae54f 100644
--- a/src/kvilib/tal/kvi_tal_tooltip.h
+++ b/src/kvilib/tal/kvi_tal_tooltip.h
@@ -32,8 +32,6 @@
class KviTalToolTip;
-// This is useful only with TQt4, but we put it here anyway
-// to have both a consistent API and make moc happy
class KviTalToolTipHelper : public TQObject
{
friend class KviTalToolTip;
@@ -51,30 +49,16 @@ protected:
class KVILIB_API KviTalToolTip
-#ifndef COMPILE_USE_QT4
: public TQToolTip
-#endif
{
friend class KviTalToolTipHelper;
public:
KviTalToolTip(TQWidget * pParent);
virtual ~KviTalToolTip();
protected:
-#ifdef COMPILE_USE_QT4
- KviTalToolTipHelper * m_pHelper;
- TQWidget * m_pParent;
-#endif
public:
-#ifdef COMPILE_USE_QT4
- 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 TQPoint & p);
-#ifdef COMPILE_USE_QT4
- void helperDying();
-#endif
};
#endif // _KVI_TAL_TOOLTIP_H_
diff --git a/src/kvilib/tal/kvi_tal_vbox.cpp b/src/kvilib/tal/kvi_tal_vbox.cpp
index 5ef67152..0e02e6ce 100644
--- a/src/kvilib/tal/kvi_tal_vbox.cpp
+++ b/src/kvilib/tal/kvi_tal_vbox.cpp
@@ -25,9 +25,5 @@
#define __KVILIB__
#include "kvi_tal_vbox.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_vbox_qt4.moc"
-#else
#include "kvi_tal_vbox_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_vbox.h b/src/kvilib/tal/kvi_tal_vbox.h
index a27df527..b868a69f 100644
--- a/src/kvilib/tal/kvi_tal_vbox.h
+++ b/src/kvilib/tal/kvi_tal_vbox.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_vbox_qt4.h"
-#else
#include "kvi_tal_vbox_qt3.h"
-#endif
#endif // _KVI_TAL_VBOX_H_
diff --git a/src/kvilib/tal/kvi_tal_vbox_qt4.h b/src/kvilib/tal/kvi_tal_vbox_qt4.h
deleted file mode 100644
index 7dc576ec..00000000
--- a/src/kvilib/tal/kvi_tal_vbox_qt4.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _KVI_TAL_VBOX_QT4_H_
-#define _KVI_TAL_VBOX_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_vbox_qt4.h
-// Creation date : Mon Jan 22 2007 11:25:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include "kvi_settings.h"
-
-#include <tq3vbox.h>
-
-class KVILIB_API KviTalVBox : public Q3VBox
-{
- TQ_OBJECT
-
-public:
- KviTalVBox(TQWidget * pParent)
- : Q3VBox(pParent) {};
- virtual ~KviTalVBox() {};
-};
-
-
-#endif // _KVI_TAL_VBOX_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_widgetstack.cpp b/src/kvilib/tal/kvi_tal_widgetstack.cpp
index 1a99e3f9..6b89138b 100644
--- a/src/kvilib/tal/kvi_tal_widgetstack.cpp
+++ b/src/kvilib/tal/kvi_tal_widgetstack.cpp
@@ -25,9 +25,5 @@
#define __KVILIB__
#include "kvi_tal_widgetstack.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_widgetstack_qt4.moc"
-#else
#include "kvi_tal_widgetstack_qt3.moc"
-#endif
diff --git a/src/kvilib/tal/kvi_tal_widgetstack.h b/src/kvilib/tal/kvi_tal_widgetstack.h
index 7c9133c8..5047f5a9 100644
--- a/src/kvilib/tal/kvi_tal_widgetstack.h
+++ b/src/kvilib/tal/kvi_tal_widgetstack.h
@@ -27,10 +27,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include "kvi_tal_widgetstack_qt4.h"
-#else
#include "kvi_tal_widgetstack_qt3.h"
-#endif
#endif // _KVI_TAL_WIDGETSTACK_H_
diff --git a/src/kvilib/tal/kvi_tal_widgetstack_qt4.h b/src/kvilib/tal/kvi_tal_widgetstack_qt4.h
deleted file mode 100644
index 61931851..00000000
--- a/src/kvilib/tal/kvi_tal_widgetstack_qt4.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _KVI_TAL_WIDGETSTACK_QT4_H_
-#define _KVI_TAL_WIDGETSTACK_QT4_H_
-
-//=============================================================================
-//
-// File : kvi_tal_widgetstack_qt4.h
-// Creation date : Mon Jan 22 2007 11:17:08 by Szymon Stefanek
-//
-// This file is part of the KVirc irc client distribution
-// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
-//
-// This program is FREE software. You can redistribute it and/or
-// modify it under the terms of the GNU General Public License
-// as published by the Free Software Foundation; either version 2
-// of the License, or (at your opinion) any later version.
-//
-// This program is distributed in the HOPE that it will be USEFUL,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-// See the GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, write to the Free Software Foundation,
-// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-//=============================================================================
-
-#include "kvi_settings.h"
-
-//#include <tqstackedwidget.h>
-#include <tq3widgetstack.h>
-
-class KVILIB_API KviTalWidgetStack : public Q3WidgetStack
-{
- TQ_OBJECT
-
-public:
- KviTalWidgetStack(TQWidget * pParent)
- : Q3WidgetStack(pParent) {};
- virtual ~KviTalWidgetStack() {};
-};
-
-#endif // _KVI_TAL_WIDGETSTACK_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_windowstate.h b/src/kvilib/tal/kvi_tal_windowstate.h
index bbd7c925..95276a7f 100644
--- a/src/kvilib/tal/kvi_tal_windowstate.h
+++ b/src/kvilib/tal/kvi_tal_windowstate.h
@@ -27,16 +27,9 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #define TQT_WINDOWSTATE_FLAGS TQt::WindowState
-
- #define TQT_WINDOWSTATE_MAXIMIZED TQt::WindowMaximized
- #define TQT_WINDOWSTATE_MINIMIZED TQt::WindowMinimized
-#else
#define TQT_WINDOWSTATE_FLAGS TQt::WidgetState
#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 81ccda5f..4ab58566 100644
--- a/src/kvilib/tal/kvi_tal_wizard.cpp
+++ b/src/kvilib/tal/kvi_tal_wizard.cpp
@@ -28,15 +28,6 @@
#include "kvi_pointerlist.h"
#include "kvi_locale.h"
-#ifdef COMPILE_USE_QT4
- #include <TQShowEvent>
- #include <TQLabel>
- #include <TQPushButton>
- #include <TQGridLayout>
- #include <TQFrame>
- #include <TQStackedWidget>
- #include <TQPalette>
-#else
#include <tqlabel.h>
#include <tqpushbutton.h>
#include <tqlayout.h>
@@ -44,7 +35,6 @@
#include <tqframe.h>
#include <tqwidgetstack.h>
#include <tqpalette.h>
-#endif
class KviTalWizardPageData
@@ -82,11 +72,7 @@ public:
TQWidget * pNextSpacer;
TQPushButton * pFinishButton;
TQWidget * pFinishSpacer;
-#ifdef COMPILE_USE_QT4
- TQStackedWidget * pWidgetStack;
-#else
TQWidgetStack * pWidgetStack;
-#endif
public:
KviTalWizardPageData * findPage(TQWidget * pWidget)
{
@@ -177,50 +163,25 @@ KviTalWizard::KviTalWizard(TQWidget * pParent)
m_p->pLayout = new TQGridLayout(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 TQLabel(this);
m_p->pStepsLabel->setMinimumWidth(80);
m_p->pStepsLabel->setAlignment(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
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
m_p->pLayout->addMultiCellWidget(f1,1,1,0,6);
-#endif
-#ifdef COMPILE_USE_QT4
- m_p->pWidgetStack = new TQStackedWidget(this);
- m_p->pLayout->addWidget(m_p->pWidgetStack,2,0,1,7);
-#else
m_p->pWidgetStack = new TQWidgetStack(this);
m_p->pLayout->addMultiCellWidget(m_p->pWidgetStack,2,2,0,6);
-#endif
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
m_p->pLayout->addMultiCellWidget(f2,3,3,0,6);
-#endif
KviTalHBox * pButtonBox = new KviTalHBox(this);
-#ifdef COMPILE_USE_QT4
- m_p->pLayout->addWidget(pButtonBox,4,0,1,7);
-#else
m_p->pLayout->addMultiCellWidget(pButtonBox,4,4,0,6);
-#endif
pButtonBox->setMargin(0);
pButtonBox->setSpacing(0);
@@ -388,22 +349,13 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData)
bCancelEnabled = (pData->iEnableFlags & KviTalWizardPageData::EnableCancel);
bFinishEnabled = (pData->iEnableFlags & KviTalWizardPageData::EnableFinish);
bHelpEnabled = (pData->iEnableFlags & KviTalWizardPageData::EnableHelp);
-#ifdef COMPILE_USE_QT4
- m_p->pWidgetStack->setCurrentWidget(pData->pWidget);
-#else
m_p->pWidgetStack->raiseWidget(pData->pWidget);
-#endif
szTitle = "<b>";
szTitle += pData->szTitle;
szTitle += "</b>";
TQPalette pal = m_p->pStepsLabel->palette();
-#ifdef COMPILE_USE_QT4
- TQColor clrWin = pal.color(TQPalette::Active,TQPalette::Window);
- TQColor clrTxt = pal.color(TQPalette::Active,TQPalette::WindowText);
-#else
TQColor clrWin = pal.color(TQPalette::Active,TQColorGroup::Foreground);
TQColor clrTxt = pal.color(TQPalette::Active,TQColorGroup::Background);
-#endif
TQColor clrMid = tqRgb(
(clrWin.red() + clrTxt.red()) / 2,
(clrWin.green() + clrTxt.green()) / 2,
diff --git a/src/kvilib/tal/kvi_tal_wizard.h b/src/kvilib/tal/kvi_tal_wizard.h
index 0d7ead79..2606913a 100644
--- a/src/kvilib/tal/kvi_tal_wizard.h
+++ b/src/kvilib/tal/kvi_tal_wizard.h
@@ -27,11 +27,7 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include <TQDialog>
-#else
#include <tqdialog.h>
-#endif
class TQShowEvent;
class TQPushButton;