summaryrefslogtreecommitdiffstats
path: root/src/kvilib
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-08-24 21:28:39 +0900
committerMichele Calgaro <[email protected]>2023-08-31 10:03:10 +0900
commit030a2248f3630fd0404df98beffc78b5b5ca4c31 (patch)
tree75d55e7e177ca48e69d59f74181ce37841ecd51b /src/kvilib
parent17118265cf93b35b0b68e450ea5f43046c1d81c3 (diff)
downloadkvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.tar.gz
kvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.zip
Drop USE_QT4 code
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/kvilib')
-rw-r--r--src/kvilib/build/Makefile.am30
-rw-r--r--src/kvilib/config/kvi_settings.h3
-rw-r--r--src/kvilib/config/kvi_wincfg.h5
-rw-r--r--src/kvilib/core/kvi_pointerhashtable.h4
-rw-r--r--src/kvilib/core/kvi_pointerlist.h5
-rw-r--r--src/kvilib/core/kvi_qcstring.h10
-rw-r--r--src/kvilib/core/kvi_qstring.cpp117
-rw-r--r--src/kvilib/core/kvi_qstring.h55
-rw-r--r--src/kvilib/core/kvi_string.cpp4
-rw-r--r--src/kvilib/core/kvi_valuelist.h5
-rw-r--r--src/kvilib/ext/kvi_accel.h5
-rw-r--r--src/kvilib/ext/kvi_cmdformatter.cpp20
-rw-r--r--src/kvilib/ext/kvi_config.cpp8
-rw-r--r--src/kvilib/ext/kvi_doublebuffer.cpp10
-rw-r--r--src/kvilib/ext/kvi_draganddrop.h19
-rw-r--r--src/kvilib/ext/kvi_imagelib.cpp12
-rw-r--r--src/kvilib/ext/kvi_mediatype.cpp8
-rw-r--r--src/kvilib/ext/kvi_miscutils.cpp9
-rw-r--r--src/kvilib/ext/kvi_regusersdb.cpp4
-rw-r--r--src/kvilib/ext/kvi_sharedfiles.cpp5
-rw-r--r--src/kvilib/ext/kvi_stringconversion.cpp4
-rw-r--r--src/kvilib/file/kvi_file.cpp10
-rw-r--r--src/kvilib/file/kvi_file.h21
-rw-r--r--src/kvilib/file/kvi_fileutils.cpp16
-rw-r--r--src/kvilib/file/kvi_packagefile.cpp44
-rw-r--r--src/kvilib/irc/kvi_avatar.cpp4
-rw-r--r--src/kvilib/irc/kvi_ircmask.cpp4
-rw-r--r--src/kvilib/irc/kvi_ircserverdb.cpp9
-rw-r--r--src/kvilib/irc/kvi_nickserv.cpp8
-rw-r--r--src/kvilib/net/kvi_http.cpp4
-rw-r--r--src/kvilib/system/kvi_locale.cpp38
-rw-r--r--src/kvilib/system/kvi_locale.h7
-rw-r--r--src/kvilib/system/kvi_process.h5
-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
85 files changed, 20 insertions, 3041 deletions
diff --git a/src/kvilib/build/Makefile.am b/src/kvilib/build/Makefile.am
index 4e480336..e96d1517 100644
--- a/src/kvilib/build/Makefile.am
+++ b/src/kvilib/build/Makefile.am
@@ -188,56 +188,41 @@ headers_HEADERS = \
../tal/kvi_tal_filedialog.h \
../tal/kvi_tal_filedialog_kde.h \
../tal/kvi_tal_filedialog_qt.h \
- ../tal/kvi_tal_filedialog_qt4.h \
../tal/kvi_tal_grid.h \
../tal/kvi_tal_grid_qt3.h \
- ../tal/kvi_tal_grid_qt4.h \
../tal/kvi_tal_groupbox.h \
../tal/kvi_tal_groupbox_qt3.h \
- ../tal/kvi_tal_groupbox_qt4.h \
../tal/kvi_tal_hbox.h \
../tal/kvi_tal_hbox_qt3.h \
- ../tal/kvi_tal_hbox_qt4.h \
../tal/kvi_tal_iconview.h \
../tal/kvi_tal_iconview_qt3.h \
- ../tal/kvi_tal_iconview_qt4.h \
../tal/kvi_tal_listbox.h \
../tal/kvi_tal_listbox_qt3.h \
- ../tal/kvi_tal_listbox_qt4.h \
../tal/kvi_tal_listview.h \
../tal/kvi_tal_listview_qt3.h \
- ../tal/kvi_tal_listview_qt4.h \
../tal/kvi_tal_mainwindow.h \
../tal/kvi_tal_mainwindow_kde.h \
../tal/kvi_tal_mainwindow_qt3.h \
- ../tal/kvi_tal_mainwindow_qt4.h \
../tal/kvi_tal_menubar.h \
../tal/kvi_tal_menubar_kde.h \
../tal/kvi_tal_menubar_qt.h \
../tal/kvi_tal_popupmenu.h \
../tal/kvi_tal_popupmenu_qt3.h \
- ../tal/kvi_tal_popupmenu_qt4.h \
../tal/kvi_tal_scrollview.h \
../tal/kvi_tal_scrollview_qt3.h \
- ../tal/kvi_tal_scrollview_qt4.h \
../tal/kvi_tal_tabdialog.h \
../tal/kvi_tal_tabdialog_qt3.h \
- ../tal/kvi_tal_tabdialog_qt4.h \
../tal/kvi_tal_textedit.h \
../tal/kvi_tal_textedit_qt3.h \
- ../tal/kvi_tal_textedit_qt4.h \
../tal/kvi_tal_toolbar.h \
../tal/kvi_tal_toolbar_kde.h \
../tal/kvi_tal_toolbar_qt3.h \
- ../tal/kvi_tal_toolbar_qt4.h \
../tal/kvi_tal_toolbardocktype.h \
../tal/kvi_tal_tooltip.h \
../tal/kvi_tal_vbox.h \
../tal/kvi_tal_vbox_qt3.h \
- ../tal/kvi_tal_vbox_qt4.h \
../tal/kvi_tal_widgetstack.h \
../tal/kvi_tal_widgetstack_qt3.h \
- ../tal/kvi_tal_widgetstack_qt4.h \
../tal/kvi_tal_wizard.h \
../tal/kvi_tal_windowstate.h
@@ -281,40 +266,25 @@ headers_HEADERS = \
../tal/kvi_tal_application.cpp: ../tal/kvi_tal_application_qt.moc
../tal/kvi_tal_mainwindow.cpp: ../tal/kvi_tal_mainwindow_kde.moc
../tal/kvi_tal_mainwindow.cpp: ../tal/kvi_tal_mainwindow_qt3.moc
-../tal/kvi_tal_mainwindow.cpp: ../tal/kvi_tal_mainwindow_qt4.moc
../tal/kvi_tal_menubar.cpp: ../tal/kvi_tal_menubar_kde.moc
../tal/kvi_tal_menubar.cpp: ../tal/kvi_tal_menubar_qt.moc
../tal/kvi_tal_filedialog.cpp: ../tal/kvi_tal_filedialog_kde.moc
../tal/kvi_tal_filedialog.cpp: ../tal/kvi_tal_filedialog_qt.moc
-../tal/kvi_tal_filedialog.cpp: ../tal/kvi_tal_filedialog_qt4.moc
../tal/kvi_tal_grid.cpp: ../tal/kvi_tal_grid_qt3.moc
-../tal/kvi_tal_grid.cpp: ../tal/kvi_tal_grid_qt4.moc
../tal/kvi_tal_groupbox.cpp: ../tal/kvi_tal_groupbox_qt3.moc
-../tal/kvi_tal_groupbox.cpp: ../tal/kvi_tal_groupbox_qt4.moc
../tal/kvi_tal_hbox.cpp: ../tal/kvi_tal_hbox_qt3.moc
-../tal/kvi_tal_hbox.cpp: ../tal/kvi_tal_hbox_qt4.moc
../tal/kvi_tal_vbox.cpp: ../tal/kvi_tal_vbox_qt3.moc
-../tal/kvi_tal_vbox.cpp: ../tal/kvi_tal_vbox_qt4.moc
../tal/kvi_tal_popupmenu.cpp: ../tal/kvi_tal_popupmenu_qt3.moc
-../tal/kvi_tal_popupmenu.cpp: ../tal/kvi_tal_popupmenu_qt4.moc
../tal/kvi_tal_listview.cpp: ../tal/kvi_tal_listview_qt3.moc
-../tal/kvi_tal_listview.cpp: ../tal/kvi_tal_listview_qt4.moc
../tal/kvi_tal_listbox.cpp: ../tal/kvi_tal_listbox_qt3.moc
-../tal/kvi_tal_listbox.cpp: ../tal/kvi_tal_listbox_qt4.moc
../tal/kvi_tal_iconview.cpp: ../tal/kvi_tal_iconview_qt3.moc
-../tal/kvi_tal_iconview.cpp: ../tal/kvi_tal_iconview_qt4.moc
../tal/kvi_tal_scrollview.cpp: ../tal/kvi_tal_scrollview_qt3.moc
-../tal/kvi_tal_scrollview.cpp: ../tal/kvi_tal_scrollview_qt4.moc
../tal/kvi_tal_tabdialog.cpp: ../tal/kvi_tal_tabdialog_qt3.moc
-../tal/kvi_tal_tabdialog.cpp: ../tal/kvi_tal_tabdialog_qt4.moc
../tal/kvi_tal_textedit.cpp: ../tal/kvi_tal_textedit_qt3.moc
-../tal/kvi_tal_textedit.cpp: ../tal/kvi_tal_textedit_qt4.moc
../tal/kvi_tal_toolbar.cpp: ../tal/kvi_tal_toolbar_qt3.moc
-../tal/kvi_tal_toolbar.cpp: ../tal/kvi_tal_toolbar_qt4.moc
../tal/kvi_tal_toolbar.cpp: ../tal/kvi_tal_toolbar_kde.moc
../tal/kvi_tal_tooltip.cpp: ../tal/kvi_tal_tooltip.moc
../tal/kvi_tal_widgetstack.cpp: ../tal/kvi_tal_widgetstack_qt3.moc
-../tal/kvi_tal_widgetstack.cpp: ../tal/kvi_tal_widgetstack_qt4.moc
#
# All the cpp files depend on the precompiled headers being up-to-date
diff --git a/src/kvilib/config/kvi_settings.h b/src/kvilib/config/kvi_settings.h
index 770379d8..c9baf3a6 100644
--- a/src/kvilib/config/kvi_settings.h
+++ b/src/kvilib/config/kvi_settings.h
@@ -132,9 +132,6 @@
*/
#define KVI_DEPRECATED
-#ifdef COMPILE_USE_QT4
- #define debug tqDebug
-#endif
#endif //_KVI_SETTINGS_H_
diff --git a/src/kvilib/config/kvi_wincfg.h b/src/kvilib/config/kvi_wincfg.h
index 1a74f0ae..062aa81e 100644
--- a/src/kvilib/config/kvi_wincfg.h
+++ b/src/kvilib/config/kvi_wincfg.h
@@ -32,11 +32,6 @@
/* define if you want to compile with new parser */
#define COMPILE_NEW_KVS 1
-/* define if you want to use the TQt 4.x support */
-/* #undef COMPILE_USE_QT4 */
-
-#define COMPILE_USE_QT4
-
/* define if you want to use only the new KVS parser */
#define COMPILE_ONLY_NEW_KVS 1
diff --git a/src/kvilib/core/kvi_pointerhashtable.h b/src/kvilib/core/kvi_pointerhashtable.h
index 99e513f3..d7e84759 100644
--- a/src/kvilib/core/kvi_pointerhashtable.h
+++ b/src/kvilib/core/kvi_pointerhashtable.h
@@ -244,11 +244,7 @@ inline unsigned int kvi_hash_hash(const TQString &szKey,bool bCaseSensitive)
} else {
while(p->unicode())
{
-#ifdef COMPILE_USE_QT4
- uResult += p->toLower().unicode();
-#else
uResult += p->lower().unicode();
-#endif
p++;
}
}
diff --git a/src/kvilib/core/kvi_pointerlist.h b/src/kvilib/core/kvi_pointerlist.h
index c9746c29..b46343c3 100644
--- a/src/kvilib/core/kvi_pointerlist.h
+++ b/src/kvilib/core/kvi_pointerlist.h
@@ -36,10 +36,7 @@
// I think we need to be independent of that to the maximum degree possible.
// That's why we have our own fast pointer list class.
// This does not depend on TQt AT ALL and has an interface similar
-// to the TQt<=3.x series. The pointer lists with the autodelete
-// feature was great and I don't completly understand why they have
-// been removed from TQt4 in favor of the value based non-autodeleting
-// lists... anyway: here we go :)
+// to the TQt<=3.x series.
#include "kvi_settings.h"
diff --git a/src/kvilib/core/kvi_qcstring.h b/src/kvilib/core/kvi_qcstring.h
index 9406115c..97e6e423 100644
--- a/src/kvilib/core/kvi_qcstring.h
+++ b/src/kvilib/core/kvi_qcstring.h
@@ -27,13 +27,7 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include <tq3cstring.h> // includes <qbytearray.h>
- #define KviTQCString TQByteArray
-#else
- // this is dead in TQt 4.x
- #include <tqcstring.h>
- #define KviTQCString TQCString
-#endif
+#include <tqcstring.h>
+#define KviTQCString TQCString
#endif //!_KVI_TQCSTRING_H_
diff --git a/src/kvilib/core/kvi_qstring.cpp b/src/kvilib/core/kvi_qstring.cpp
index 84beaa07..a477527b 100644
--- a/src/kvilib/core/kvi_qstring.cpp
+++ b/src/kvilib/core/kvi_qstring.cpp
@@ -84,11 +84,7 @@ namespace KviTQString
while(c1 < c1e)
{
-#ifdef COMPILE_USE_QT4
- if(c1->toLower().unicode() != c2->toLower().unicode())return false;
-#else
if(c1->lower().unicode() != c2->lower().unicode())return false;
-#endif
c1++;
c2++;
}
@@ -126,11 +122,7 @@ namespace KviTQString
while((c1 < c1e) && (*sz2))
{
-#ifdef COMPILE_USE_QT4
- if(c1->toLower().unicode() != tolower(*sz2))return false;
-#else
if(c1->lower().unicode() != tolower(*sz2))return false;
-#endif
c1++;
sz2++;
}
@@ -150,11 +142,7 @@ namespace KviTQString
while((c1 < c1e) && (sz2->unicode()))
{
-#ifdef COMPILE_USE_QT4
- if(c1->toLower().unicode() != sz2->toLower().unicode())return false;
-#else
if(c1->lower().unicode() != sz2->lower().unicode())return false;
-#endif
c1++;
sz2++;
}
@@ -216,11 +204,7 @@ namespace KviTQString
while(c1 < c1e)
{
-#ifdef COMPILE_USE_QT4
- if(c1->toLower().unicode() != c2->toLower().unicode())return false;
-#else
if(c1->lower().unicode() != c2->lower().unicode())return false;
-#endif
c1++;
c2++;
}
@@ -238,11 +222,7 @@ namespace KviTQString
while(c1 < c1e)
{
if(!sz2->unicode())return false; // sz1 has at least another character
-#ifdef COMPILE_USE_QT4
- if(c1->toLower().unicode() != sz2->toLower().unicode())return false;
-#else
if(c1->lower().unicode() != sz2->lower().unicode())return false;
-#endif
c1++;
sz2++;
}
@@ -274,11 +254,7 @@ namespace KviTQString
while((c1 < c1e) && (*sz2))
{
-#ifdef COMPILE_USE_QT4
- if(c1->toLower().unicode() != tolower(*sz2))return false;
-#else
if(c1->lower().unicode() != tolower(*sz2))return false;
-#endif
c1++;
sz2++;
}
@@ -337,24 +313,12 @@ namespace KviTQString
{
if(c1 >= c1e)
{
-#ifdef COMPILE_USE_QT4
- if(c2 < c2e)return /* 0 */ - (c2->toLower().unicode());
-#else
if(c2 < c2e)return /* 0 */ - (c2->lower().unicode());
-#endif
return 0;
}
-#ifdef COMPILE_USE_QT4
- if(c2 >= c2e)return c1->toLower().unicode() /* - 0 */;
-#else
if(c2 >= c2e)return c1->lower().unicode() /* - 0 */;
-#endif
-#ifdef COMPILE_USE_QT4
- int diff = c1->toLower().unicode() - c2->toLower().unicode();
-#else
int diff = c1->lower().unicode() - c2->lower().unicode();
-#endif
if(diff)return diff;
c1++;
@@ -383,11 +347,7 @@ namespace KviTQString
int diff = 0;
-#ifdef COMPILE_USE_QT4
- while((c1 < c1e) && !(diff = (c1->toLower().unicode() - c2->toLower().unicode())))
-#else
while((c1 < c1e) && !(diff = (c1->lower().unicode() - c2->lower().unicode())))
-#endif
{
c1++;
c2++;
@@ -464,21 +424,13 @@ namespace KviTQString
void detach(TQString &sz)
{
-#ifdef COMPILE_USE_QT4
- sz.resize(sz.length());
-#else
sz.setLength(sz.length());
-#endif
}
const TQChar * nullTerminatedArray(const TQString &sz)
{
//sz.setLength(sz.length()); // detach!
-#ifdef COMPILE_USE_QT4
- return sz.constData();
-#else
return (const TQChar *)sz.ucs2(); // MAY BE NULL!
-#endif
}
void appendNumber(TQString &s,double dReal)
@@ -781,13 +733,8 @@ namespace KviTQString
// s1
//
-#ifdef COMPILE_USE_QT4
- const TQChar * m1 = (const TQChar *)szM1.constData();
- const TQChar * m2 = (const TQChar *)szM2.constData();
-#else
const TQChar * m1 = (const TQChar *)szM1.ucs2();
const TQChar * m2 = (const TQChar *)szM2.ucs2();
-#endif
if(!(m1 && m2 && (m1->unicode())))return false;
const TQChar * savePos1 = 0;
@@ -804,11 +751,7 @@ namespace KviTQString
continue; //and return
}
if(!m2->unicode())return false; //m2 finished and we had something to match here!
-#ifdef COMPILE_USE_QT4
- if(m1->toLower()==m2->toLower())
-#else
if(m1->lower()==m2->lower())
-#endif
{
//chars matched
m1++; //Go ahead in the two strings
@@ -864,11 +807,7 @@ namespace KviTQString
bool matchStringCI(const TQString &szExp,const TQString &szStr,bool bIsRegExp,bool bExact)
{
TQString szWildcard;
-#ifdef COMPILE_USE_QT4
- TQChar* ptr=(TQChar*)szExp.constData();
-#else
TQChar* ptr=(TQChar*)szExp.ucs2();
-#endif
if(!ptr) return 0;
while(ptr->unicode())
{
@@ -882,27 +821,15 @@ namespace KviTQString
}
ptr++;
}
-#ifdef COMPILE_USE_QT4
- TQRegExp re(szWildcard,TQt::CaseInsensitive,bIsRegExp ? TQRegExp::RegExp : TQRegExp::Wildcard);
-#else
TQRegExp re(szWildcard,false,!bIsRegExp);
-#endif
if(bExact) return re.exactMatch(szStr);
-#ifdef COMPILE_USE_QT4
- return re.indexIn(szStr) != -1;
-#else
return re.search(szStr) != -1;
-#endif
}
bool matchStringCS(const TQString &szExp,const TQString &szStr,bool bIsRegExp,bool bExact)
{
TQString szWildcard;
-#ifdef COMPILE_USE_QT4
- TQChar* ptr=(TQChar*)szExp.constData();
-#else
TQChar* ptr=(TQChar*)szExp.ucs2();
-#endif
if(!ptr) return 0;
while(ptr->unicode())
{
@@ -916,48 +843,28 @@ namespace KviTQString
}
ptr++;
}
-#ifdef COMPILE_USE_QT4
- TQRegExp re(szWildcard,TQt::CaseSensitive,bIsRegExp ? TQRegExp::RegExp : TQRegExp::Wildcard);
-#else
TQRegExp re(szWildcard,true,!bIsRegExp);
-#endif
if(bExact) return re.exactMatch(szStr);
-#ifdef COMPILE_USE_QT4
- return re.indexIn(szStr) != -1;
-#else
return re.search(szStr) != -1;
-#endif
}
void cutFromFirst(TQString &s,const TQChar &c,bool bIncluded)
{
-#ifdef COMPILE_USE_QT4
- int idx = s.indexOf(c);
-#else
int idx = s.find(c);
-#endif
if(idx == -1)return;
s.truncate(bIncluded ? idx : idx + 1);
}
void cutFromLast(TQString &s,const TQChar &c,bool bIncluded)
{
-#ifdef COMPILE_USE_QT4
- int idx = s.lastIndexOf(c);
-#else
int idx = s.findRev(c);
-#endif
if(idx == -1)return;
s.truncate(bIncluded ? idx : idx + 1);
}
void cutToFirst(TQString &s,const TQChar &c,bool bIncluded,bool bClearIfNotFound)
{
-#ifdef COMPILE_USE_QT4
- int idx = s.indexOf(c);
-#else
int idx = s.find(c);
-#endif
if(idx == -1)
{
if(bClearIfNotFound)s = "";
@@ -968,11 +875,7 @@ namespace KviTQString
void cutToLast(TQString &s,const TQChar &c,bool bIncluded,bool bClearIfNotFound)
{
-#ifdef COMPILE_USE_QT4
- int idx = s.lastIndexOf(c);
-#else
int idx = s.findRev(c);
-#endif
if(idx == -1)
{
if(bClearIfNotFound)s = "";
@@ -983,33 +886,21 @@ namespace KviTQString
void cutFromFirst(TQString &s,const TQString &c,bool bIncluded)
{
-#ifdef COMPILE_USE_QT4
- int idx = s.indexOf(c);
-#else
int idx = s.find(c);
-#endif
if(idx == -1)return;
s.truncate(bIncluded ? idx : idx + c.length());
}
void cutFromLast(TQString &s,const TQString &c,bool bIncluded)
{
-#ifdef COMPILE_USE_QT4
- int idx = s.lastIndexOf(c);
-#else
int idx = s.findRev(c);
-#endif
if(idx == -1)return;
s.truncate(bIncluded ? idx : idx + c.length());
}
void cutToFirst(TQString &s,const TQString &c,bool bIncluded,bool bClearIfNotFound)
{
-#ifdef COMPILE_USE_QT4
- int idx = s.indexOf(c);
-#else
int idx = s.find(c);
-#endif
if(idx == -1)
{
if(bClearIfNotFound)s = "";
@@ -1020,11 +911,7 @@ namespace KviTQString
void cutToLast(TQString &s,const TQString &c,bool bIncluded,bool bClearIfNotFound)
{
-#ifdef COMPILE_USE_QT4
- int idx = s.lastIndexOf(c);
-#else
int idx = s.findRev(c);
-#endif
if(idx == -1)
{
if(bClearIfNotFound)s = "";
@@ -1107,11 +994,7 @@ namespace KviTQString
void bufferToHex(TQString &szRetBuffer,const unsigned char * buffer,unsigned int len)
{
-#ifdef COMPILE_USE_QT4
- szRetBuffer.resize(len * 2);
-#else
szRetBuffer.setLength(len * 2);
-#endif
unsigned int i=0;
while(i < (len*2))
{
diff --git a/src/kvilib/core/kvi_qstring.h b/src/kvilib/core/kvi_qstring.h
index 7f9f7e73..8d70ba5f 100644
--- a/src/kvilib/core/kvi_qstring.h
+++ b/src/kvilib/core/kvi_qstring.h
@@ -136,115 +136,66 @@ namespace KviTQString
extern KVILIB_API const TQString empty;
///
- /// A portability wrapper which with TQt3 and TQt4.
/// Returns a lowcase version of the parameter string.
///
inline TQString toLower(const TQString &s)
{
-#ifdef COMPILE_USE_QT4
- return s.toLower();
-#else
return s.lower();
-#endif
}
inline int find(const TQString &s,TQChar c,int index = 0,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.find(c,index,cs);
-#endif
}
inline int find(const TQString &s,char c,int index = 0,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.find(c,index,cs);
-#endif
}
inline int find(const TQString &s,const TQString & str,int index = 0,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(str,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.find(str,index,cs);
-#endif
}
inline int find(const TQString &s,const TQRegExp & rx,int index = 0)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(rx,index);
-#else
return s.find(rx,index);
-#endif
}
inline int find(const TQString &s,const char * str,int index = 0)
{
-#ifdef COMPILE_USE_QT4
- return s.indexOf(TQString(str),index);
-#else
return s.find(str,index);
-#endif
}
inline int findRev(const TQString &s,TQChar c,int index = -1,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.findRev(c,index,cs);
-#endif
}
inline int findRev(const TQString &s,char c,int index = -1,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(c,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.findRev(c,index,cs);
-#endif
}
inline int findRev(const TQString &s,const TQString & str,int index = -1,bool cs = true)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(str,index,cs ? TQt::CaseSensitive : TQt::CaseInsensitive);
-#else
return s.findRev(str,index,cs);
-#endif
}
inline int findRev(const TQString &s,const TQRegExp & rx,int index = -1)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(rx,index);
-#else
return s.findRev(rx,index);
-#endif
}
inline int findRev(const TQString &s,const char * str,int index = -1)
{
-#ifdef COMPILE_USE_QT4
- return s.lastIndexOf(TQString(str),index);
-#else
return s.findRev(str,index);
-#endif
}
inline TQString trimmed(const TQString &s)
{
-#ifdef COMPILE_USE_QT4
- return s.trimmed();
-#else
return s.stripWhiteSpace();
-#endif
}
// WARNING: DO NOT USE CONSTRUCTS LIKE char * c = KviTQString::toUtf8(something).data();
@@ -258,11 +209,7 @@ namespace KviTQString
// transit to qt 4.x more or less cleanly...
inline KviTQCString toUtf8(const TQString &s)
{
-#ifdef COMPILE_USE_QT4
- return s.toUtf8();
-#else
return s.utf8();
-#endif
}
inline KviTQCString toLocal8Bit(const TQString &s)
@@ -289,6 +236,4 @@ namespace KviTQString
}
};
-// QT4SUX: Because TQString() is gone. TQString() is SLOWER than TQString() since it invokes a constructor and destructor.
-
#endif //!_KVI_TQSTRING_H_
diff --git a/src/kvilib/core/kvi_string.cpp b/src/kvilib/core/kvi_string.cpp
index c133f20f..9e491ccb 100644
--- a/src/kvilib/core/kvi_string.cpp
+++ b/src/kvilib/core/kvi_string.cpp
@@ -195,11 +195,7 @@ bool kvi_qstringEqualCI(const TQString &s1,const TQString &s2)
const TQChar * p1 = s1.unicode();
const TQChar * p2 = s2.unicode();
int l = s1.length() < s2.length() ? s1.length() : s2.length();
-#ifdef COMPILE_USE_QT4
- while(l-- && (p1->toLower() == p2->toLower()))p1++,p2++;
-#else
while(l-- && (p1->lower() == p2->lower()))p1++,p2++;
-#endif
if(l==-1)return true;
return false;
}
diff --git a/src/kvilib/core/kvi_valuelist.h b/src/kvilib/core/kvi_valuelist.h
index 9ad234f2..c5a2e624 100644
--- a/src/kvilib/core/kvi_valuelist.h
+++ b/src/kvilib/core/kvi_valuelist.h
@@ -26,12 +26,7 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include <tq3valuelist.h>
- #define KviValueList Q3ValueList
-#else
#include <tqvaluelist.h>
#define KviValueList TQValueList
-#endif
#endif //_KVI_VALUELIST_H_
diff --git a/src/kvilib/ext/kvi_accel.h b/src/kvilib/ext/kvi_accel.h
index 1014b2cb..f640d82c 100644
--- a/src/kvilib/ext/kvi_accel.h
+++ b/src/kvilib/ext/kvi_accel.h
@@ -27,12 +27,7 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include <tq3accel.h>
- #define KviAccel Q3Accel
-#else
#include <tqaccel.h>
#define KviAccel TQAccel
-#endif
#endif //!_KVI_ACCEL_H_
diff --git a/src/kvilib/ext/kvi_cmdformatter.cpp b/src/kvilib/ext/kvi_cmdformatter.cpp
index 153557b2..2866ae04 100644
--- a/src/kvilib/ext/kvi_cmdformatter.cpp
+++ b/src/kvilib/ext/kvi_cmdformatter.cpp
@@ -63,11 +63,7 @@ namespace KviCommandFormatter
} else {
// we pretend this line to be empty
TQString tmp = *it;
-#ifdef COMPILE_USE_QT4
- tmp = tmp.trimmed();
-#else
tmp = tmp.stripWhiteSpace();
-#endif
if(!tmp.isEmpty())return false;
*it = ""; // set it to empty also in the main buffer
}
@@ -127,11 +123,7 @@ namespace KviCommandFormatter
void unindent(TQString &buffer)
{
-#ifdef COMPILE_USE_QT4
- TQStringList list = buffer.split("\n",TQString::KeepEmptyParts);
-#else
TQStringList list = TQStringList::split("\n",buffer,true);
-#endif
while(hasLeadingChars(list,TQChar('\t')) || hasLeadingChars(list,TQChar(' ')))trimLeading(list);
//buffer = list.join("\n"); join implementation sux :D
// we WANT the last newline
@@ -162,11 +154,7 @@ namespace KviCommandFormatter
void bufferFromBlock(TQString &buffer)
{
-#ifdef COMPILE_USE_QT4
- buffer = buffer.trimmed();
-#else
buffer = buffer.stripWhiteSpace();
-#endif
if(buffer.isEmpty())return;
@@ -180,11 +168,7 @@ namespace KviCommandFormatter
unindent(buffer);
-#ifdef COMPILE_USE_QT4
- buffer = buffer.trimmed();
-#else
buffer = buffer.stripWhiteSpace();
-#endif
}
@@ -203,11 +187,7 @@ namespace KviCommandFormatter
void indent(TQString &buffer)
{
-#ifdef COMPILE_USE_QT4
- TQStringList list = buffer.split("\n",TQString::KeepEmptyParts);
-#else
TQStringList list = TQStringList::split("\n",buffer,true);
-#endif
addLeading(list,TQChar('\t'));
//buffer = list.join("\n"); join implementation sux :D
// we WANT the last newline
diff --git a/src/kvilib/ext/kvi_config.cpp b/src/kvilib/ext/kvi_config.cpp
index bd6f8a7a..dab135cc 100644
--- a/src/kvilib/ext/kvi_config.cpp
+++ b/src/kvilib/ext/kvi_config.cpp
@@ -627,11 +627,7 @@ TQStringList KviConfig::readStringListEntry(const TQString & szKey,const TQStrin
KviConfigGroup * p_group = getCurrentGroup();
TQString * p_str = p_group->find(szKey);
if(!p_str)return list;
-#ifdef COMPILE_USE_QT4
- return p_str->split(g_szConfigStringListSeparator);
-#else
return TQStringList::split(g_szConfigStringListSeparator,*p_str);
-#endif
}
void KviConfig::writeEntry(const TQString & szKey,const TQStringList &list)
@@ -653,11 +649,7 @@ KviValueList<int> KviConfig::readIntListEntry(const TQString & szKey,const KviVa
//tqDebug("Returning default list for group %s and key %s",m_szGroup.latin1(),szKey.latin1());
return list;
}
-#ifdef COMPILE_USE_QT4
- TQStringList sl = p_str->split(",");
-#else
TQStringList sl = TQStringList::split(",",*p_str);
-#endif
KviValueList<int> ret;
//tqDebug("Got option list for group %s and key %s: %s",m_szGroup.latin1(),szKey.latin1(),p_str->latin1());
diff --git a/src/kvilib/ext/kvi_doublebuffer.cpp b/src/kvilib/ext/kvi_doublebuffer.cpp
index 5f48a0cb..0f15dca3 100644
--- a/src/kvilib/ext/kvi_doublebuffer.cpp
+++ b/src/kvilib/ext/kvi_doublebuffer.cpp
@@ -38,12 +38,7 @@ KviDoubleBuffer::KviDoubleBuffer(unsigned int uWidth,unsigned int uHeight)
// There is either no such user requirement or it has grown by the meantime
unsigned int uMaxW = uWidth > g_pMemoryPixmap->width() ? uWidth : g_pMemoryPixmap->width();
unsigned int uMaxH = uHeight > g_pMemoryPixmap->height() ? uHeight : g_pMemoryPixmap->height();
-#ifdef COMPILE_USE_QT4
- // QT4SUX: TQPixmap::resize() is missing (it's a widely used function and assigning a new TQPixmap() seems to be slower and not intuitive)
- *g_pMemoryPixmap = TQPixmap(uMaxW,uMaxH);
-#else
g_pMemoryPixmap->resize(uMaxW,uMaxH);
-#endif
}
if(uWidth > g_uMaxRequestedWidth)g_uMaxRequestedWidth = uWidth;
@@ -78,12 +73,7 @@ void KviDoubleBuffer::heartbeat()
if(((g_uMaxRequestedHeight + 64) < g_pMemoryPixmap->height()) || ((g_uMaxRequestedWidth + 64) < g_pMemoryPixmap->width()))
{
// do shrink :)
-#ifdef COMPILE_USE_QT4
- // QT4SUX: TQPixmap::resize() is missing (it's a widely used function and assigning a new TQPixmap() seems to be slower and not intuitive)
- *g_pMemoryPixmap = TQPixmap(g_uMaxRequestedWidth,g_uMaxRequestedHeight);
-#else
g_pMemoryPixmap->resize(g_uMaxRequestedWidth,g_uMaxRequestedHeight);
-#endif
}
g_uMaxRequestedHeight = 0;
g_uMaxRequestedWidth = 0;
diff --git a/src/kvilib/ext/kvi_draganddrop.h b/src/kvilib/ext/kvi_draganddrop.h
index 0ad6e9a2..10dc489b 100644
--- a/src/kvilib/ext/kvi_draganddrop.h
+++ b/src/kvilib/ext/kvi_draganddrop.h
@@ -26,20 +26,11 @@
//=============================================================================
#include "kvi_settings.h"
+#include <tqdragobject.h>
-
-#ifdef COMPILE_USE_QT4
- #include <tq3dragobject.h>
- #define KviDragObject Q3DragObject
- #define KviUriDrag Q3UriDrag
- #define KviTextDrag Q3TextDrag
- #define KviImageDrag Q3ImageDrag
-#else
- #include <tqdragobject.h>
- #define KviDragObject TQDragObject
- #define KviUriDrag TQUriDrag
- #define KviTextDrag TQTextDrag
- #define KviImageDrag TQImageDrag
-#endif
+#define KviDragObject TQDragObject
+#define KviUriDrag TQUriDrag
+#define KviTextDrag TQTextDrag
+#define KviImageDrag TQImageDrag
#endif //!_KVI_DRAGANDDROP_H_
diff --git a/src/kvilib/ext/kvi_imagelib.cpp b/src/kvilib/ext/kvi_imagelib.cpp
index 104c69d4..8c0b6b43 100644
--- a/src/kvilib/ext/kvi_imagelib.cpp
+++ b/src/kvilib/ext/kvi_imagelib.cpp
@@ -113,26 +113,16 @@ TQPixmap KviImageLibrary::getImage(int zeroBasedIndex)
int xOffset=(zeroBasedIndex % imPerRow) * m_iWidth;
int yOffset=(zeroBasedIndex / imPerRow) * m_iHeight;
-#ifdef COMPILE_USE_QT4
- TQImage image(m_iWidth,m_iHeight,m_pLibrary->format());
-#else
TQImage image(m_iWidth,m_iHeight,m_pLibrary->depth());
-#endif
int d = image.depth() / 8;
-#ifndef COMPILE_USE_QT4
- if(d == 4)image.setAlphaBuffer(true); // TQt 4.x should manage it automagically
-#endif
+ if(d == 4)image.setAlphaBuffer(true);
//Copy the image data
//bitBlt(&image,0,0,m_pLibrary,xOffset,yOffset,m_iWidth,m_iHeight,TQt::CopyROP,false);
for(int i=0;i<m_iHeight;i++)
kvi_memmove(image.scanLine(i),m_pLibrary->scanLine(i + yOffset) + (xOffset * d),m_iWidth * d);
-#ifdef COMPILE_USE_QT4
- TQPixmap p = TQPixmap::fromImage(image);
-#else
TQPixmap p(image);
-#endif
return p;
}
diff --git a/src/kvilib/ext/kvi_mediatype.cpp b/src/kvilib/ext/kvi_mediatype.cpp
index 2bc60850..7631e36c 100644
--- a/src/kvilib/ext/kvi_mediatype.cpp
+++ b/src/kvilib/ext/kvi_mediatype.cpp
@@ -241,11 +241,7 @@ KviMediaType * KviMediaManager::findMediaType(const char * filename,bool bCheckM
KviStr szFullPath = filename;
if(!kvi_isAbsolutePath(szFullPath.ptr()))
{
-#ifdef COMPILE_USE_QT4
- KviStr tmp = TQDir::currentPath();
-#else
KviStr tmp = TQDir::currentDirPath();
-#endif
tmp.ensureLastCharIs('/');
szFullPath.prepend(tmp);
}
@@ -406,11 +402,7 @@ KviMediaType * KviMediaManager::findMediaTypeForRegularFile(const char * szFullP
TQRegExp re(m->szMagicBytes.ptr());
// It looks like they can't decide the name for this function :D
// ... well, maybe the latest choice is the best one.
-#ifdef COMPILE_USE_QT4
- if(re.indexIn(buffer) > -1)return m; // matched!
-#else
if(re.search(buffer) > -1)return m; // matched!
-#endif
// else magic failed...not a match
} else return m; // matched! (no magic check)
}
diff --git a/src/kvilib/ext/kvi_miscutils.cpp b/src/kvilib/ext/kvi_miscutils.cpp
index 7b3c4caa..111fa300 100644
--- a/src/kvilib/ext/kvi_miscutils.cpp
+++ b/src/kvilib/ext/kvi_miscutils.cpp
@@ -31,13 +31,8 @@ namespace KviMiscUtils
{
int compareVersions(const TQString &szVersion1,const TQString &szVersion2)
{
-#ifdef COMPILE_USE_QT4
- TQStringList sl1 = szVersion1.split(".");
- TQStringList sl2 = szVersion2.split(".");
-#else
TQStringList sl1 = TQStringList::split(".",szVersion1);
TQStringList sl2 = TQStringList::split(".",szVersion2);
-#endif
TQStringList::Iterator it1 = sl1.begin();
TQStringList::Iterator it2 = sl2.begin();
@@ -66,11 +61,7 @@ namespace KviMiscUtils
bool isValidVersionString(const TQString &szVersion)
{
-#ifdef COMPILE_USE_QT4
- TQStringList sl = szVersion.split(".");
-#else
TQStringList sl = TQStringList::split(".",szVersion);
-#endif
if(sl.isEmpty())return false;
// must all be numbers
for(TQStringList::Iterator it = sl.begin();it != sl.end();++it)
diff --git a/src/kvilib/ext/kvi_regusersdb.cpp b/src/kvilib/ext/kvi_regusersdb.cpp
index d34fde15..87ce9b6a 100644
--- a/src/kvilib/ext/kvi_regusersdb.cpp
+++ b/src/kvilib/ext/kvi_regusersdb.cpp
@@ -230,11 +230,7 @@ void KviRegisteredUser::setProperty(const TQString & name,const TQString & value
m_pPropertyDict = new KviPointerHashTable<TQString,TQString>(7,false);
m_pPropertyDict->setAutoDelete(true);
}
-#ifdef COMPILE_USE_QT4
- TQString * val = new TQString(value.trimmed());
-#else
TQString * val = new TQString(value.stripWhiteSpace());
-#endif
if(!val->isEmpty())
{
m_pPropertyDict->replace(name,val);
diff --git a/src/kvilib/ext/kvi_sharedfiles.cpp b/src/kvilib/ext/kvi_sharedfiles.cpp
index d38bd680..4651a3c6 100644
--- a/src/kvilib/ext/kvi_sharedfiles.cpp
+++ b/src/kvilib/ext/kvi_sharedfiles.cpp
@@ -86,12 +86,7 @@ KviSharedFile::KviSharedFile(const TQString &szName,const TQString &szAbsPath,co
m_szUserMask = szUserMask;
m_expireTime = expireTime;
m_uFileSize = uFileSize;
-#ifdef COMPILE_USE_QT4
- // QT4ROX: Because they have finally moved the functionality of TQString::contains() to TQString::count(), and TQString::contains() now does the right job
- m_uWildCount = m_szUserMask.count('*');
-#else
m_uWildCount = m_szUserMask.contains('*');
-#endif
m_uNonWildCount = m_szUserMask.length() - m_uWildCount;
}
diff --git a/src/kvilib/ext/kvi_stringconversion.cpp b/src/kvilib/ext/kvi_stringconversion.cpp
index f316fc2a..0d3736c6 100644
--- a/src/kvilib/ext/kvi_stringconversion.cpp
+++ b/src/kvilib/ext/kvi_stringconversion.cpp
@@ -266,11 +266,7 @@ namespace KviStringConversion
bool fromString(const TQString & szValue,TQStringList &buffer)
{
-#ifdef COMPILE_USE_QT4
- buffer = szValue.split(",");
-#else
buffer = TQStringList::split(",",szValue);
-#endif
return true;
}
diff --git a/src/kvilib/file/kvi_file.cpp b/src/kvilib/file/kvi_file.cpp
index 227a4997..d904540a 100644
--- a/src/kvilib/file/kvi_file.cpp
+++ b/src/kvilib/file/kvi_file.cpp
@@ -45,20 +45,12 @@ KviFile::~KviFile()
bool KviFile::openForReading()
{
-#ifdef COMPILE_USE_QT4
- return open(TQFile::ReadOnly);
-#else
return open(IO_ReadOnly);
-#endif
}
bool KviFile::openForWriting(bool bAppend)
{
-#ifdef COMPILE_USE_QT4
- return open(TQFile::WriteOnly | (bAppend ? TQFile::Append : TQFile::Truncate));
-#else
return open(IO_WriteOnly | (bAppend ? IO_Append : IO_Truncate));
-#endif
}
@@ -77,7 +69,6 @@ bool KviFile::load(TQByteArray &bData)
return true;
}
-#ifndef COMPILE_USE_QT4
bool KviFile::save(const KviTQCString &szData)
{
@@ -95,7 +86,6 @@ bool KviFile::load(KviTQCString &szData)
return true;
}
-#endif
bool KviFile::save(const TQString &szData)
diff --git a/src/kvilib/file/kvi_file.h b/src/kvilib/file/kvi_file.h
index 7cce041f..11cc85be 100644
--- a/src/kvilib/file/kvi_file.h
+++ b/src/kvilib/file/kvi_file.h
@@ -36,15 +36,7 @@
#include <tqfile.h>
#include <time.h>
-#ifdef COMPILE_USE_QT4
- #define kvi_file_offset_t qlonglong
-#else
-#ifdef USE_QT4
- #define kvi_file_offset_t qint64
-#else // USE_QT4
- #define kvi_file_offset_t TQFile::Offset
-#endif // USE_QT4
-#endif
+#define kvi_file_offset_t TQFile::Offset
class KVILIB_API KviFile : public TQFile, public KviHeapObject
@@ -58,20 +50,12 @@ public:
bool openForReading();
bool openForWriting(bool bAppend = false);
-#ifndef COMPILE_USE_QT4
- // Functions present in TQt 4.x but not TQt 3.x
bool putChar(char c){ return putch(c) != -1; };
bool ungetChar(char c){ return ungetch(c) != -1; };
bool getChar(char * c){ *c = getch(); return *c != -1; };
bool seek(kvi_file_offset_t o){ return at(o); };
kvi_file_offset_t pos(){ return at(); };
-#endif
-#ifdef COMPILE_USE_QT4
- // Missing functions in TQt 4.x
- quint64 writeBlock(const char * data,quint64 uLen){ return write(data,uLen); };
- quint64 readBlock(char * data,quint64 uLen){ return read(data,uLen); };
-#endif
// This stuff loads and saves LITTLE ENDIAN DATA!
bool save(kvi_u64_t t);
@@ -101,11 +85,8 @@ public:
bool save(const KviStr &szData);
bool load(KviStr &szData);
-#ifndef COMPILE_USE_QT4
- // Under TQt 4.x these collide with TQByteArray
bool save(const KviTQCString &szData);
bool load(KviTQCString &szData);
-#endif
bool save(const TQByteArray &bData);
bool load(TQByteArray &bData);
diff --git a/src/kvilib/file/kvi_fileutils.cpp b/src/kvilib/file/kvi_fileutils.cpp
index 8e81f861..9bea5c96 100644
--- a/src/kvilib/file/kvi_fileutils.cpp
+++ b/src/kvilib/file/kvi_fileutils.cpp
@@ -105,11 +105,7 @@ namespace KviFileUtils
TQString createdDir;
#ifdef COMPILE_ON_WINDOWS
-#ifdef COMPILE_USE_QT4
- int idx = dir.indexOf(':');
-#else
int idx = dir.find(':');
-#endif
if(idx == 1)
{
createdDir = dir.left(2);
@@ -213,20 +209,12 @@ namespace KviFileUtils
{
#ifdef COMPILE_ON_WINDOWS
szPath.replace('/',"\\");
-#ifdef COMPILE_USE_QT4
- szPath.replace("\\\\","\\");
-#else
while(szPath.find("\\\\") != -1)szPath.replace("\\\\","\\");
-#endif
// FIXME: Use the default drive here ?
if(szPath.startsWith("\\"))szPath.prepend("C:");
#else
szPath.replace('\\',"/");
-#ifdef COMPILE_USE_QT4
- szPath.replace("//","/");
-#else
while(KviTQString::find(szPath,"//") != -1)szPath.replace("//","/");
-#endif
// deal with windows paths
if((szPath.length() > 2) && (szPath.at(0) != TQChar('/')))
{
@@ -235,12 +223,8 @@ namespace KviFileUtils
szPath.remove(0,2);
}
}
-#ifdef COMPILE_USE_QT4
- szPath=TQDir::cleanPath(szPath);
-#else
szPath=TQDir::cleanDirPath(szPath);
#endif
-#endif
}
diff --git a/src/kvilib/file/kvi_packagefile.cpp b/src/kvilib/file/kvi_packagefile.cpp
index 31f69438..2c1ad469 100644
--- a/src/kvilib/file/kvi_packagefile.cpp
+++ b/src/kvilib/file/kvi_packagefile.cpp
@@ -128,11 +128,7 @@ KviPackageIOEngine::~KviPackageIOEngine()
bool KviPackageIOEngine::updateProgress(int iProgress,const TQString &szLabel)
{
if(!m_pProgressDialog)return true;
-#ifdef COMPILE_USE_QT4
- m_pProgressDialog->setValue(iProgress);
-#else
m_pProgressDialog->setProgress(iProgress);
-#endif
m_pProgressDialogLabel->setText(szLabel);
tqApp->processEvents();
if(m_pProgressDialog->wasCanceled())
@@ -145,14 +141,8 @@ bool KviPackageIOEngine::updateProgress(int iProgress,const TQString &szLabel)
void KviPackageIOEngine::showProgressDialog(const TQString &szCaption,int iTotalSteps)
{
-#ifdef COMPILE_USE_QT4
- m_pProgressDialog = new TQProgressDialog(TQString(""),__tr2qs("Cancel"),0,iTotalSteps,0);
- m_pProgressDialog->setModal(true);
- m_pProgressDialog->setWindowTitle(szCaption);
-#else
m_pProgressDialog = new TQProgressDialog(TQString(""),__tr2qs("Cancel"),iTotalSteps,0,"",true);
m_pProgressDialog->setCaption(szCaption);
-#endif
m_pProgressDialogLabel = new TQLabel(m_pProgressDialog);
m_pProgressDialogLabel->setMaximumSize(500,300);
m_pProgressDialog->setLabel(m_pProgressDialogLabel);
@@ -234,67 +224,35 @@ bool KviPackageWriter::addFileInternal(const TQFileInfo * fi,const TQString &szL
bool KviPackageWriter::addDirectory(const TQString &szLocalDirectoryName,const TQString &szTargetDirectoryPrefix,kvi_u32_t uAddFileFlags)
{
TQDir d(szLocalDirectoryName);
-#ifdef COMPILE_USE_QT4
- TQDir::Filters iFlags;
-#else
int iFlags;
-#endif
iFlags = TQDir::Files | TQDir::Readable;
if(!(uAddFileFlags & FollowSymLinks))
iFlags |= TQDir::NoSymLinks;
- // QT4SUX: Because the TQDir::entryInfoList() breaks really a lot of code by returning an object that behaves in a _totally_ different way.. it's also much slower
-
-#ifdef COMPILE_USE_QT4
- int j;
- TQFileInfoList sl = d.entryInfoList(iFlags);
- for(j=0;j<sl.size();j++)
- {
-#else
const TQFileInfoList * sl = d.entryInfoList(iFlags);
if(!sl)return false;
TQFileInfoListIterator it(*sl);
while(TQFileInfo * fi = it.current())
{
-#endif
TQString szSFileName = szLocalDirectoryName;
KviTQString::ensureLastCharIs(szSFileName,TQChar(KVI_PATH_SEPARATOR_CHAR));
-#ifdef COMPILE_USE_QT4
- TQFileInfo slowCopy = sl.at(j);
- szSFileName += slowCopy.fileName();
-#else
szSFileName += fi->fileName();
-#endif
TQString szDFileName = szTargetDirectoryPrefix;
KviTQString::ensureLastCharIs(szDFileName,TQChar(KVI_PATH_SEPARATOR_CHAR));
-#ifdef COMPILE_USE_QT4
- szDFileName += slowCopy.fileName();
- if(!addFileInternal(&slowCopy,szSFileName,szDFileName,uAddFileFlags))
- return false;
-#else
szDFileName += fi->fileName();
if(!addFileInternal(fi,szSFileName,szDFileName,uAddFileFlags))
return false;
-#endif
-#ifndef COMPILE_USE_QT4
++it;
-#endif
}
iFlags = TQDir::Dirs | TQDir::Readable;
if(!(uAddFileFlags & FollowSymLinks))
iFlags |= TQDir::NoSymLinks;
sl = d.entryInfoList(iFlags);
-#ifdef COMPILE_USE_QT4
- for(j=0;j<sl.size();j++)
- {
- TQString szDir = sl.at(j).fileName();
-#else
if(!sl)return false;
TQFileInfoListIterator it2(*sl);
while(TQFileInfo * fi2 = it2.current())
{
TQString szDir = fi2->fileName();
-#endif
if(!KviTQString::equalCS(szDir,"..") && !KviTQString::equalCS(szDir,"."))
{
TQString szSDirName = szLocalDirectoryName;
@@ -306,9 +264,7 @@ bool KviPackageWriter::addDirectory(const TQString &szLocalDirectoryName,const T
if(!addDirectory(szSDirName,szDDirName,uAddFileFlags))
return false;
}
-#ifndef COMPILE_USE_QT4
++it2;
-#endif
}
return true;
diff --git a/src/kvilib/irc/kvi_avatar.cpp b/src/kvilib/irc/kvi_avatar.cpp
index 680e7978..3a9f54df 100644
--- a/src/kvilib/irc/kvi_avatar.cpp
+++ b/src/kvilib/irc/kvi_avatar.cpp
@@ -153,13 +153,9 @@ TQPixmap * KviAvatar::scaledPixmap(unsigned int w,unsigned int h)
scaleW = (scaleH * curW) / curH;
}
-#ifdef COMPILE_USE_QT4
- m_pScaledPixmap = new TQPixmap(m_pPixmap->scaled(scaleW,scaleH));
-#else
TQImage img = m_pPixmap->convertToImage();
m_pScaledPixmap = new TQPixmap();
m_pScaledPixmap->convertFromImage(img.smoothScale(scaleW,scaleH));
-#endif
return m_pScaledPixmap;
}
diff --git a/src/kvilib/irc/kvi_ircmask.cpp b/src/kvilib/irc/kvi_ircmask.cpp
index 9b0030ae..90ae3566 100644
--- a/src/kvilib/irc/kvi_ircmask.cpp
+++ b/src/kvilib/irc/kvi_ircmask.cpp
@@ -299,11 +299,7 @@ bool KviIrcMask::hasNumericHost() const
else {
if((uc < '0') || (uc > '9'))
{
-#ifdef COMPILE_USE_QT4
- uc = p->toUpper().unicode();
-#else
uc = p->upper().unicode();
-#endif
if((uc < 'A') || (uc > 'F'))return false;
}
}
diff --git a/src/kvilib/irc/kvi_ircserverdb.cpp b/src/kvilib/irc/kvi_ircserverdb.cpp
index 84bb5f39..8eecb260 100644
--- a/src/kvilib/irc/kvi_ircserverdb.cpp
+++ b/src/kvilib/irc/kvi_ircserverdb.cpp
@@ -184,13 +184,8 @@ bool KviIrcServerDataBase::makeCurrentBestServerInNetwork(const TQString &szNetN
for(KviIrcServer * s = r->m_pServerList->first();s;s = r->m_pServerList->next())
{
-#ifdef COMPILE_USE_QT4
- if(s->m_szDescription.contains("random",TQt::CaseInsensitive) ||
- (s->m_szDescription.contains("round",TQt::CaseInsensitive) && s->m_szDescription.contains("robin",TQt::CaseInsensitive)))
-#else
if(s->m_szDescription.contains("random",false) ||
(s->m_szDescription.contains("round",false) && s->m_szDescription.contains("robin",false)))
-#endif
{
r->setCurrentServer(s);
return true;
@@ -343,11 +338,7 @@ search_finished:
if(!(bIsValidIpV4 || bIsValidIpV6))
{
// is it a valid hostname ? (must contain at least one dot)
-#ifdef COMPILE_USE_QT4
- if(!d->szServer.contains('.'))
-#else
if(d->szServer.contains('.') < 1)
-#endif
{
// assume it is a network name!
KviIrcServerDataBaseRecord * r = m_pRecords->find(d->szServer);
diff --git a/src/kvilib/irc/kvi_nickserv.cpp b/src/kvilib/irc/kvi_nickserv.cpp
index 24a50e96..240ac515 100644
--- a/src/kvilib/irc/kvi_nickserv.cpp
+++ b/src/kvilib/irc/kvi_nickserv.cpp
@@ -203,19 +203,11 @@ KviNickServRule * KviNickServRuleSet::matchRule(const TQString &szNick,const Kvi
if(!KviTQString::matchStringCI(r->registeredNick(),szNick,false,true)) continue;
if(!szServer.isEmpty())
{
-#ifdef COMPILE_USE_QT4
- TQRegExp res(r->serverMask(),TQt::CaseInsensitive,TQRegExp::Wildcard);
-#else
TQRegExp res(r->serverMask(),false,true);
-#endif
if(!res.exactMatch(szServer))continue;
}
if(!nickServ->matchedBy(KviIrcMask(r->nickServMask())))continue;
-#ifdef COMPILE_USE_QT4
- TQRegExp re(r->messageRegexp(),TQt::CaseInsensitive,TQRegExp::Wildcard);
-#else
TQRegExp re(r->messageRegexp(),false,true);
-#endif
if(re.exactMatch(szMsg))return r;
}
return 0;
diff --git a/src/kvilib/net/kvi_http.cpp b/src/kvilib/net/kvi_http.cpp
index 0bcd864b..a8045f82 100644
--- a/src/kvilib/net/kvi_http.cpp
+++ b/src/kvilib/net/kvi_http.cpp
@@ -274,11 +274,7 @@ bool KviHttpRequest::event(TQEvent *e)
case KVI_HTTP_REQUEST_THREAD_EVENT_REQUESTSENT:
{
TQString * req = ((KviThreadDataEvent<TQString> *)e)->getData();
-#ifdef COMPILE_USE_QT4
- TQStringList sl = req->split("\r\n");
-#else
TQStringList sl = TQStringList::split("\r\n",*req);
-#endif
emit requestSent(sl);
delete req;
return true;
diff --git a/src/kvilib/system/kvi_locale.cpp b/src/kvilib/system/kvi_locale.cpp
index d4f89cc1..8798d8ec 100644
--- a/src/kvilib/system/kvi_locale.cpp
+++ b/src/kvilib/system/kvi_locale.cpp
@@ -37,9 +37,6 @@
#include <tqtextcodec.h>
#include <tqdir.h>
-#ifdef COMPILE_USE_QT4
- #include <tqlocale.h>
-#endif
#include "kvi_string.h"
#include "kvi_qcstring.h"
@@ -307,19 +304,6 @@ public:
virtual int mibEnum () const { return 0; };
-#ifdef COMPILE_USE_QT4
- virtual TQByteArray name() const { return m_szName; };
-protected:
- virtual TQByteArray convertFromUnicode(const TQChar * input,int number,ConverterState * state) const
- {
- return m_pSendCodec->fromUnicode(input,number,state);
- }
- virtual TQString convertToUnicode(const char * chars,int len,ConverterState * state) const
- {
- if(g_utf8_validate(chars,len,NULL))return g_pUtf8TextCodec->toUnicode(chars,len,state);
- return m_pRecvCodec->toUnicode(chars,len,state);
- }
-#else
public:
virtual const char * mimeName () const { return m_pRecvCodec->mimeName(); };
virtual const char * name () const { return m_szName.data(); };
@@ -367,7 +351,6 @@ public:
return iii;
}
virtual int heuristicNameMatch(const char * hint) const { return 0; };
-#endif
};
static KviPointerHashTable<const char *,KviSmartTextCodec> * g_pSmartCodecDict = 0;
@@ -956,11 +939,7 @@ namespace KviLocale
{
// first of all try to find out the current locale
g_szLang="";
-#ifdef COMPILE_USE_QT4
- TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homePath());
-#else
TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homeDirPath());
-#endif
if(KviFileUtils::fileExists(szLangFile))
{
TQString szTmp;
@@ -968,11 +947,7 @@ namespace KviLocale
g_szLang=szTmp;
}
if(g_szLang.isEmpty())g_szLang = kvi_getenv("KVIRC_LANG");
-#ifdef COMPILE_USE_QT4
- if(g_szLang.isEmpty())g_szLang = TQLocale::system().name();
-#else
if(g_szLang.isEmpty())g_szLang = TQTextCodec::locale();
-#endif
if(g_szLang.isEmpty())g_szLang = kvi_getenv("LC_MESSAGES");
if(g_szLang.isEmpty())g_szLang = kvi_getenv("LANG");
if(g_szLang.isEmpty())g_szLang = "en";
@@ -1079,11 +1054,7 @@ namespace KviLocale
};
KviTranslator::KviTranslator(TQObject * par,const char * nam)
-#ifdef COMPILE_USE_QT4
-: TQTranslator(par)
-#else
: TQTranslator(par,nam)
-#endif
{
}
@@ -1091,13 +1062,6 @@ KviTranslator::~KviTranslator()
{
}
-#ifdef COMPILE_USE_QT4
-TQString KviTranslator::translate(const char *context,const char * message,const char * comment) const
-{
- // we ignore contexts and comments for qt translations
- return g_pMainCatalogue->translateToTQString(message);
-}
-#endif
TQString KviTranslator::find(const char *context,const char * message) const
{
@@ -1105,13 +1069,11 @@ TQString KviTranslator::find(const char *context,const char * message) const
return g_pMainCatalogue->translateToTQString(message);
}
-#ifndef COMPILE_USE_QT4
TQTranslatorMessage KviTranslator::findMessage(const char * context,const char * sourceText,const char * comment) const
{
// we ignore contexts for qt translations
return TQTranslatorMessage(context,sourceText,comment,g_pMainCatalogue->translateToTQString(sourceText));
}
-#endif
#if 0
diff --git a/src/kvilib/system/kvi_locale.h b/src/kvilib/system/kvi_locale.h
index b3f15b45..599aec41 100644
--- a/src/kvilib/system/kvi_locale.h
+++ b/src/kvilib/system/kvi_locale.h
@@ -132,15 +132,8 @@ class KVILIB_API KviTranslator : public TQTranslator
KviTranslator(TQObject * parent,const char * name);
~KviTranslator();
public:
-#ifdef COMPILE_USE_QT4
- virtual TQString translate(const char * context,const char * message,const char * comment) const;
-#endif
- // Deprecated in qt 4.x
virtual TQString find(const char * context,const char * message) const;
-#ifndef COMPILE_USE_QT4
- // Dead in qt 4.x
virtual TQTranslatorMessage findMessage(const char * context,const char * sourceText,const char * comment = 0) const;
-#endif
};
diff --git a/src/kvilib/system/kvi_process.h b/src/kvilib/system/kvi_process.h
index 649e40d7..2be819a5 100644
--- a/src/kvilib/system/kvi_process.h
+++ b/src/kvilib/system/kvi_process.h
@@ -26,12 +26,7 @@
#include "kvi_settings.h"
-#ifdef COMPILE_USE_QT4
- #include <tq3process.h>
- #define KviProcess Q3Process
-#else
#include <tqprocess.h>
#define KviProcess TQProcess
-#endif
#endif //!_KVI_PROCESS_H_
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;