Browse Source

Initial TQt conversion

Slávek Banko 5 years ago
parent
commit
0af498ec7d

+ 23
- 23
acinclude.m4 View File

@@ -1033,7 +1033,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
1033 1033
   x_includes=""
1034 1034
   x_libraries=""
1035 1035
 elif test "$kde_use_qt_mac" = "yes"; then
1036
-  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1036
+  dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
1037 1037
   dnl be included to get the information) --Sam
1038 1038
   CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1039 1039
   CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@@ -1065,19 +1065,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1065 1065
 AC_REQUIRE([KDE_USE_QT])
1066 1066
 cat > conftest.$ac_ext <<EOF
1067 1067
 #include "confdefs.h"
1068
-#include <qglobal.h>
1069
-#include <qapplication.h>
1068
+#include <ntqglobal.h>
1069
+#include <ntqapplication.h>
1070 1070
 EOF
1071 1071
 if test "$kde_qtver" = "2"; then
1072 1072
 cat >> conftest.$ac_ext <<EOF
1073
-#include <qevent.h>
1074
-#include <qstring.h>
1075
-#include <qstyle.h>
1073
+#include <ntqevent.h>
1074
+#include <ntqstring.h>
1075
+#include <ntqstyle.h>
1076 1076
 EOF
1077 1077
 
1078 1078
 if test $kde_qtsubver -gt 0; then
1079 1079
 cat >> conftest.$ac_ext <<EOF
1080
-#if QT_VERSION < 210
1080
+#if TQT_VERSION < 210
1081 1081
 #error 1
1082 1082
 #endif
1083 1083
 EOF
@@ -1086,8 +1086,8 @@ fi
1086 1086
 
1087 1087
 if test "$kde_qtver" = "3"; then
1088 1088
 cat >> conftest.$ac_ext <<EOF
1089
-#include <qcursor.h>
1090
-#include <qstylefactory.h>
1089
+#include <ntqcursor.h>
1090
+#include <ntqstylefactory.h>
1091 1091
 #include <private/qucomextra_p.h>
1092 1092
 EOF
1093 1093
 fi
@@ -1170,22 +1170,22 @@ fi
1170 1170
 if test -z "$3"; then
1171 1171
    if test $kde_qtver = 3; then
1172 1172
      if test $kde_qtsubver -gt 0; then
1173
-       kde_qt_verstring="QT_VERSION >= 0x03@VER@00"
1173
+       kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
1174 1174
        qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1175 1175
        kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1176 1176
      else
1177
-       kde_qt_verstring="QT_VERSION >= 300"
1177
+       kde_qt_verstring="TQT_VERSION >= 300"
1178 1178
      fi
1179 1179
    fi
1180 1180
    if test $kde_qtver = 2; then
1181 1181
      if test $kde_qtsubver -gt 0; then
1182
-       kde_qt_verstring="QT_VERSION >= 222"
1182
+       kde_qt_verstring="TQT_VERSION >= 222"
1183 1183
      else
1184
-       kde_qt_verstring="QT_VERSION >= 200"
1184
+       kde_qt_verstring="TQT_VERSION >= 200"
1185 1185
      fi
1186 1186
    fi
1187 1187
    if test $kde_qtver = 1; then
1188
-    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1188
+    kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
1189 1189
    fi
1190 1190
 else
1191 1191
    kde_qt_verstring="$3"
@@ -1291,7 +1291,7 @@ AC_ARG_ENABLE(
1291 1291
 USING_QT_MT=""
1292 1292
 
1293 1293
 dnl ------------------------------------------------------------------------
1294
-dnl If we not get --disable-qt-mt then adjust some vars for the host.
1294
+dnl If we not get --disable-tqt-mt then adjust some vars for the host.
1295 1295
 dnl ------------------------------------------------------------------------
1296 1296
 
1297 1297
 KDE_MT_LDFLAGS=
@@ -1354,7 +1354,7 @@ dnl ------------------------------------------------------------
1354 1354
 fi
1355 1355
 
1356 1356
 dnl ------------------------------------------------------------------------
1357
-dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1357
+dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
1358 1358
 dnl ------------------------------------------------------------------------
1359 1359
 
1360 1360
 if test "x$kde_use_qt_mt" = "xyes"; then
@@ -1425,9 +1425,9 @@ if test ! "$ac_qt_includes" = "NO"; then
1425 1425
 fi
1426 1426
 
1427 1427
 if test "$kde_qtver" != "1"; then
1428
-  kde_qt_header=qstyle.h
1428
+  kde_qt_header=ntqstyle.h
1429 1429
 else
1430
-  kde_qt_header=qglobal.h
1430
+  kde_qt_header=ntqglobal.h
1431 1431
 fi
1432 1432
 
1433 1433
 AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@@ -1979,7 +1979,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1979 1979
  LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1980 1980
 
1981 1981
  AC_TRY_LINK([
1982
-   #include <qdom.h>
1982
+   #include <ntqdom.h>
1983 1983
  ],
1984 1984
  [
1985 1985
    QDomDocument doc;
@@ -2498,7 +2498,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2498 2498
 ac_save_CXXFLAGS="$CXXFLAGS"
2499 2499
 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2500 2500
 AC_TRY_LINK(
2501
-[#include <qapplication.h>],
2501
+[#include <ntqapplication.h>],
2502 2502
             [
2503 2503
             int argc;
2504 2504
             char** argv;
@@ -4205,7 +4205,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4205 4205
 AC_TRY_RUN(dnl
4206 4206
 [
4207 4207
 #include <qimageio.h>
4208
-#include <qstring.h>
4208
+#include <ntqstring.h>
4209 4209
 int main() {
4210 4210
 		QString t = "hallo";
4211 4211
 		t.fill('t');
@@ -4989,7 +4989,7 @@ if test "${with_qt_dir+set}" = set; then
4989 4989
   kde_qtdir="$with_qt_dir"
4990 4990
 fi
4991 4991
 
4992
-AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
4992
+AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
4993 4993
 AC_MSG_RESULT($QTDOCDIR)
4994 4994
 
4995 4995
 AC_SUBST(QTDOCDIR)
@@ -5010,7 +5010,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
5010 5010
 AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5011 5011
 
5012 5012
 KDE_HAS_DOXYGEN=no
5013
-if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5013
+if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
5014 5014
   KDE_HAS_DOXYGEN=yes
5015 5015
 fi
5016 5016
 AC_SUBST(KDE_HAS_DOXYGEN)

+ 23
- 23
aclocal.m4 View File

@@ -1045,7 +1045,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
1045 1045
   x_includes=""
1046 1046
   x_libraries=""
1047 1047
 elif test "$kde_use_qt_mac" = "yes"; then
1048
-  dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
1048
+  dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
1049 1049
   dnl be included to get the information) --Sam
1050 1050
   CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
1051 1051
   CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@@ -1077,19 +1077,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
1077 1077
 AC_REQUIRE([KDE_USE_QT])
1078 1078
 cat > conftest.$ac_ext <<EOF
1079 1079
 #include "confdefs.h"
1080
-#include <qglobal.h>
1081
-#include <qapplication.h>
1080
+#include <ntqglobal.h>
1081
+#include <ntqapplication.h>
1082 1082
 EOF
1083 1083
 if test "$kde_qtver" = "2"; then
1084 1084
 cat >> conftest.$ac_ext <<EOF
1085
-#include <qevent.h>
1086
-#include <qstring.h>
1087
-#include <qstyle.h>
1085
+#include <ntqevent.h>
1086
+#include <ntqstring.h>
1087
+#include <ntqstyle.h>
1088 1088
 EOF
1089 1089
 
1090 1090
 if test $kde_qtsubver -gt 0; then
1091 1091
 cat >> conftest.$ac_ext <<EOF
1092
-#if QT_VERSION < 210
1092
+#if TQT_VERSION < 210
1093 1093
 #error 1
1094 1094
 #endif
1095 1095
 EOF
@@ -1098,8 +1098,8 @@ fi
1098 1098
 
1099 1099
 if test "$kde_qtver" = "3"; then
1100 1100
 cat >> conftest.$ac_ext <<EOF
1101
-#include <qcursor.h>
1102
-#include <qstylefactory.h>
1101
+#include <ntqcursor.h>
1102
+#include <ntqstylefactory.h>
1103 1103
 #include <private/qucomextra_p.h>
1104 1104
 EOF
1105 1105
 fi
@@ -1182,22 +1182,22 @@ fi
1182 1182
 if test -z "$3"; then
1183 1183
    if test $kde_qtver = 3; then
1184 1184
      if test $kde_qtsubver -gt 0; then
1185
-       kde_qt_verstring="QT_VERSION >= 0x03@VER@00"
1185
+       kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
1186 1186
        qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
1187 1187
        kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
1188 1188
      else
1189
-       kde_qt_verstring="QT_VERSION >= 300"
1189
+       kde_qt_verstring="TQT_VERSION >= 300"
1190 1190
      fi
1191 1191
    fi
1192 1192
    if test $kde_qtver = 2; then
1193 1193
      if test $kde_qtsubver -gt 0; then
1194
-       kde_qt_verstring="QT_VERSION >= 222"
1194
+       kde_qt_verstring="TQT_VERSION >= 222"
1195 1195
      else
1196
-       kde_qt_verstring="QT_VERSION >= 200"
1196
+       kde_qt_verstring="TQT_VERSION >= 200"
1197 1197
      fi
1198 1198
    fi
1199 1199
    if test $kde_qtver = 1; then
1200
-    kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
1200
+    kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
1201 1201
    fi
1202 1202
 else
1203 1203
    kde_qt_verstring="$3"
@@ -1303,7 +1303,7 @@ AC_ARG_ENABLE(
1303 1303
 USING_QT_MT=""
1304 1304
 
1305 1305
 dnl ------------------------------------------------------------------------
1306
-dnl If we not get --disable-qt-mt then adjust some vars for the host.
1306
+dnl If we not get --disable-tqt-mt then adjust some vars for the host.
1307 1307
 dnl ------------------------------------------------------------------------
1308 1308
 
1309 1309
 KDE_MT_LDFLAGS=
@@ -1366,7 +1366,7 @@ dnl ------------------------------------------------------------
1366 1366
 fi
1367 1367
 
1368 1368
 dnl ------------------------------------------------------------------------
1369
-dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
1369
+dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
1370 1370
 dnl ------------------------------------------------------------------------
1371 1371
 
1372 1372
 if test "x$kde_use_qt_mt" = "xyes"; then
@@ -1437,9 +1437,9 @@ if test ! "$ac_qt_includes" = "NO"; then
1437 1437
 fi
1438 1438
 
1439 1439
 if test "$kde_qtver" != "1"; then
1440
-  kde_qt_header=qstyle.h
1440
+  kde_qt_header=ntqstyle.h
1441 1441
 else
1442
-  kde_qt_header=qglobal.h
1442
+  kde_qt_header=ntqglobal.h
1443 1443
 fi
1444 1444
 
1445 1445
 AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@@ -1991,7 +1991,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
1991 1991
  LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
1992 1992
 
1993 1993
  AC_TRY_LINK([
1994
-   #include <qdom.h>
1994
+   #include <ntqdom.h>
1995 1995
  ],
1996 1996
  [
1997 1997
    QDomDocument doc;
@@ -2510,7 +2510,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
2510 2510
 ac_save_CXXFLAGS="$CXXFLAGS"
2511 2511
 CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
2512 2512
 AC_TRY_LINK(
2513
-[#include <qapplication.h>],
2513
+[#include <ntqapplication.h>],
2514 2514
             [
2515 2515
             int argc;
2516 2516
             char** argv;
@@ -4217,7 +4217,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
4217 4217
 AC_TRY_RUN(dnl
4218 4218
 [
4219 4219
 #include <qimageio.h>
4220
-#include <qstring.h>
4220
+#include <ntqstring.h>
4221 4221
 int main() {
4222 4222
 		QString t = "hallo";
4223 4223
 		t.fill('t');
@@ -5001,7 +5001,7 @@ if test "${with_qt_dir+set}" = set; then
5001 5001
   kde_qtdir="$with_qt_dir"
5002 5002
 fi
5003 5003
 
5004
-AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
5004
+AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
5005 5005
 AC_MSG_RESULT($QTDOCDIR)
5006 5006
 
5007 5007
 AC_SUBST(QTDOCDIR)
@@ -5022,7 +5022,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
5022 5022
 AC_SUBST(DOXYGEN_PROJECT_NUMBER)
5023 5023
 
5024 5024
 KDE_HAS_DOXYGEN=no
5025
-if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
5025
+if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
5026 5026
   KDE_HAS_DOXYGEN=yes
5027 5027
 fi
5028 5028
 AC_SUBST(KDE_HAS_DOXYGEN)

+ 7
- 7
kkbswitch/boldlistboxitem.cpp View File

@@ -16,11 +16,11 @@
16 16
  ***************************************************************************/
17 17
 
18 18
 #include "boldlistboxitem.h"
19
-#include <qpainter.h>
19
+#include <ntqpainter.h>
20 20
 
21
-BoldListBoxItem::BoldListBoxItem(QListBox *listbox, const QPixmap &pix,
22
-  const QString &text, bool bold)
23
-  : QListBoxPixmap(listbox, pix, text), m_bold(bold)
21
+BoldListBoxItem::BoldListBoxItem(TQListBox *listbox, const TQPixmap &pix,
22
+  const TQString &text, bool bold)
23
+  : TQListBoxPixmap(listbox, pix, text), m_bold(bold)
24 24
 {
25 25
 }
26 26
 
@@ -28,12 +28,12 @@ BoldListBoxItem::~BoldListBoxItem()
28 28
 {
29 29
 }
30 30
 
31
-void BoldListBoxItem::paint(QPainter *painter)
31
+void BoldListBoxItem::paint(TQPainter *painter)
32 32
 {
33 33
 	if (m_bold) {
34
-		QFont font = painter->font();
34
+		TQFont font = painter->font();
35 35
 		font.setBold(true);
36 36
 		painter->setFont(font);
37 37
 	}
38
-	QListBoxPixmap::paint(painter);	
38
+	TQListBoxPixmap::paint(painter);	
39 39
 }

+ 4
- 4
kkbswitch/boldlistboxitem.h View File

@@ -18,19 +18,19 @@
18 18
 #ifndef BOLDLISTBOXITEM_H
19 19
 #define BOLDLISTBOXITEM_H
20 20
 
21
-#include <qlistbox.h>
21
+#include <ntqlistbox.h>
22 22
 
23 23
 /**Listbox item that can optionally display its text in bold
24 24
   *@author Leonid Zeitlin
25 25
   */
26 26
 
27
-class BoldListBoxItem : public QListBoxPixmap  {
27
+class BoldListBoxItem : public TQListBoxPixmap  {
28 28
 private:
29 29
   bool m_bold;
30 30
 protected:
31
-  virtual void paint (QPainter *painter);
31
+  virtual void paint (TQPainter *painter);
32 32
 public: 
33
-	BoldListBoxItem(QListBox *listbox, const QPixmap &pix, const QString &text,
33
+	BoldListBoxItem(TQListBox *listbox, const TQPixmap &pix, const TQString &text,
34 34
 	  bool bold = false);
35 35
 	~BoldListBoxItem();
36 36
 	bool bold() { return m_bold; }

+ 11
- 11
kkbswitch/boldmenuitem.cpp View File

@@ -16,10 +16,10 @@
16 16
  ***************************************************************************/
17 17
 
18 18
 #include "boldmenuitem.h"
19
-#include <qfont.h>
20
-#include <qpainter.h>
21
-#include <qpalette.h>
22
-#include <qstyle.h>
19
+#include <ntqfont.h>
20
+#include <ntqpainter.h>
21
+#include <ntqpalette.h>
22
+#include <ntqstyle.h>
23 23
 #include <kdebug.h>
24 24
 #include <kglobalsettings.h>
25 25
 #include <kdeversion.h>
@@ -30,7 +30,7 @@
30 30
 #endif
31 31
 
32 32
 
33
-BoldMenuItem::BoldMenuItem(const QString &text, const QColor &active_text_color,
33
+BoldMenuItem::BoldMenuItem(const TQString &text, const TQColor &active_text_color,
34 34
   bool bold)
35 35
   : m_text(text), m_active_text_color(active_text_color), m_bold(bold)
36 36
 {
@@ -39,10 +39,10 @@ BoldMenuItem::BoldMenuItem(const QString &text, const QColor &active_text_color,
39 39
 BoldMenuItem::~BoldMenuItem(){
40 40
 }
41 41
 
42
-void BoldMenuItem::paint(QPainter* painter, const QColorGroup& /*cg*/,
42
+void BoldMenuItem::paint(TQPainter* painter, const TQColorGroup& /*cg*/,
43 43
 	  bool act, bool /*enabled*/, int x, int y, int w, int h)
44 44
 {
45
-  QFont font = painter->font();
45
+  TQFont font = painter->font();
46 46
   if (font.bold() != m_bold) {
47 47
     font.setBold(m_bold);
48 48
     painter->setFont(font);
@@ -54,15 +54,15 @@ void BoldMenuItem::paint(QPainter* painter, const QColorGroup& /*cg*/,
54 54
 
55 55
   painter->drawText(x, y, w, h, AlignLeft | AlignVCenter | ShowPrefix | DontClip,
56 56
     m_text);
57
-  //KApplication::style().drawItem(painter, QRect(x, y, w, h), AlignLeft | AlignVCenter | ShowPrefix | DontClip,
57
+  //KApplication::style().drawItem(painter, TQRect(x, y, w, h), AlignLeft | AlignVCenter | ShowPrefix | DontClip,
58 58
   //  cg, enabled, 0, m_text);
59 59
 }	
60 60
 
61 61
 
62
-void BoldMenuItem::setFont(const QFont& font)
62
+void BoldMenuItem::setFont(const TQFont& font)
63 63
 {
64
-  m_size = QFontMetrics(font).size(AlignLeft | AlignVCenter | ShowPrefix | DontClip,
64
+  m_size = TQFontMetrics(font).size(AlignLeft | AlignVCenter | ShowPrefix | DontClip,
65 65
     m_text);
66
-  QCustomMenuItem::setFont(font);
66
+  TQCustomMenuItem::setFont(font);
67 67
 }
68 68
 

+ 12
- 12
kkbswitch/boldmenuitem.h View File

@@ -18,35 +18,35 @@
18 18
 #ifndef BOLDMENUITEM_H
19 19
 #define BOLDMENUITEM_H
20 20
 
21
-#include <qmenudata.h>
21
+#include <ntqmenudata.h>
22 22
 
23 23
 /**A custom menu item that can display its text in bold
24 24
   *@author Leonid Zeitlin
25 25
   * 02.09.2001: somehow I cannot make it work. The item looks ok when not
26 26
   * selected, but appears empty when selected. I have a suspicion that this
27 27
   * is a problem with some KDE styles (B3 in particular), the style doesn't
28
-  * paint custom menu items correctly. With some other styles, such as Qt built-in
28
+  * paint custom menu items correctly. With some other styles, such as TQt built-in
29 29
   * Windows style, everything works correctly. I suspend the work on this for the
30 30
   * time being...
31 31
   */
32 32
 
33
-class BoldMenuItem : public QCustomMenuItem  {
33
+class BoldMenuItem : public TQCustomMenuItem  {
34 34
 private:
35
-  QString m_text;
36
-  QColor m_active_text_color;
35
+  TQString m_text;
36
+  TQColor m_active_text_color;
37 37
   bool m_bold;
38
-  QSize m_size;
38
+  TQSize m_size;
39 39
 public: 
40
-	BoldMenuItem(const QString &text, const QColor &active_text_color, bool bold = false);
40
+	BoldMenuItem(const TQString &text, const TQColor &active_text_color, bool bold = false);
41 41
 	~BoldMenuItem();
42
-	QString& text() { return m_text; };
43
-	void setText(const QString& value) { m_text = value; };
42
+	TQString& text() { return m_text; };
43
+	void setText(const TQString& value) { m_text = value; };
44 44
 	bool bold() { return m_bold; };
45 45
 	void setBold(bool value) { m_bold = value; };
46
-	virtual void paint(QPainter* painter, const QColorGroup& /*cg*/,
46
+	virtual void paint(TQPainter* painter, const TQColorGroup& /*cg*/,
47 47
 	  bool act, bool /*enabled*/, int x, int y, int w, int h);
48
-	virtual void setFont(const QFont& font);
49
-	virtual QSize sizeHint() { return m_size; };
48
+	virtual void setFont(const TQFont& font);
49
+	virtual TQSize sizeHint() { return m_size; };
50 50
 };
51 51
 
52 52
 #endif

+ 53
- 53
kkbswitch/kbconfig.cpp View File

@@ -30,9 +30,9 @@
30 30
 #include <kdebug.h>
31 31
 #include <kglobalaccel.h>
32 32
 
33
-#include <qnamespace.h>
34
-#include <qpainter.h>
35
-#include <qimage.h>
33
+#include <ntqnamespace.h>
34
+#include <ntqpainter.h>
35
+#include <ntqimage.h>
36 36
 
37 37
 #include "kbconfig.h"
38 38
 #include "xkeyboard.h"
@@ -79,20 +79,20 @@ void KBConfig::load(KConfig *config){
79 79
   m_use_shortcuts = config->readBoolEntry(USE_SHORTCUTS_ENTRY, false);
80 80
 	
81 81
   XKeyboard *xkb = XKeyboard::self();
82
-  QStringList list;
82
+  TQStringList list;
83 83
   xkb->getGroupNames(list);
84 84
   unsigned int i = 0;
85 85
   m_groups.clear();
86 86
   m_groups.resize(xkb->getNumKbdGroups());
87
-  QString name;
88
-  for (QStringList::Iterator iter = list.begin(); iter != list.end(); iter++, i++) {
87
+  TQString name;
88
+  for (TQStringList::Iterator iter = list.begin(); iter != list.end(); iter++, i++) {
89 89
     name = *iter;
90
-    if (name == QString::null) name = i18n("<Unnamed>");
90
+    if (name == TQString::null) name = i18n("<Unnamed>");
91 91
     m_groups.insert(i, new KBGroup(name));
92 92
   }
93 93
 
94
-  QValueVector<QPixmap> pixlist;
95
-  QStringList iconpaths;
94
+  TQValueVector<TQPixmap> pixlist;
95
+  TQStringList iconpaths;
96 96
   drawIcons(m_icon_style, &pixlist, &iconpaths);
97 97
   for (i = 0; i < m_groups.count(); i++) {
98 98
 		m_groups[i]->setPixmap(pixlist[i]);
@@ -102,9 +102,9 @@ void KBConfig::load(KConfig *config){
102 102
 	if (m_keys) delete m_keys;
103 103
   m_keys = new KGlobalAccel(NULL);
104 104
   for (int i = 0; i < groupCount(); i++) {
105
-    m_keys->insert(QString::fromLatin1("SetGroup %1").arg(i),
105
+    m_keys->insert(TQString::fromLatin1("SetGroup %1").arg(i),
106 106
       i18n("Activate %1 keyboard layout").arg(m_groups[i]->getName()),
107
-      QString::null, Qt::ALT+Qt::CTRL+Qt::Key_1 + i, KKey::QtWIN+Qt::CTRL+Qt::Key_1 + i,
107
+      TQString::null, TQt::ALT+TQt::CTRL+TQt::Key_1 + i, KKey::QtWIN+TQt::CTRL+TQt::Key_1 + i,
108 108
       kapp, SLOT(slotGroupSelected(int)));
109 109
   }
110 110
   m_keys->readSettings(config);
@@ -124,11 +124,11 @@ void KBConfig::save(KConfig *config)
124 124
   m_keys->writeSettings(config);
125 125
 }
126 126
 
127
-void KBConfig::drawIcons(IconStyle icon_style, QValueVector<QPixmap> *icons,
128
-  QStringList *iconpaths)
127
+void KBConfig::drawIcons(IconStyle icon_style, TQValueVector<TQPixmap> *icons,
128
+  TQStringList *iconpaths)
129 129
 {
130
-  QString path, countryCode, langCode;
131
-  QStringList layouts;
130
+  TQString path, countryCode, langCode;
131
+  TQStringList layouts;
132 132
   
133 133
   KGlobal::dirs()->addResourceDir("appdata", ".");
134 134
   KConfig map("group_names", true, true, "appdata");
@@ -147,9 +147,9 @@ void KBConfig::drawIcons(IconStyle icon_style, QValueVector<QPixmap> *icons,
147 147
     map.setGroup("Languages");
148 148
     langCode = map.readEntry(m_groups[i]->getName());
149 149
     if (langCode.isEmpty()) langCode = countryCode;
150
-    QPixmap &pix = (*icons)[i];
150
+    TQPixmap &pix = (*icons)[i];
151 151
     pix.resize(0, 0);
152
-    path = QString::null;
152
+    path = TQString::null;
153 153
     if (icon_style == ICON_FLAG /*&& !countryCode.isEmpty()*/)
154 154
       drawFlagPixmap(pix, path, countryCode, i, config);
155 155
     else if (icon_style == ICON_CODE_AND_FLAG /*&& !countryCode.isEmpty()*/)
@@ -165,8 +165,8 @@ void KBConfig::drawIcons(IconStyle icon_style, QValueVector<QPixmap> *icons,
165 165
 /*void KBConfig::guessGroupPixmaps(){
166 166
   KGlobal::dirs()->addResourceDir("appdata", ".");
167 167
   KConfig map("group_names", true, true, "appdata");
168
-  QString path, countryCode, langCode;
169
-  QPixmap pix;
168
+  TQString path, countryCode, langCode;
169
+  TQPixmap pix;
170 170
 
171 171
   for (unsigned int i = 0; i < m_groups.count(); i++) {
172 172
     if (m_groups[i]->getPixmap().isNull()) {
@@ -187,7 +187,7 @@ void KBConfig::drawIcons(IconStyle icon_style, QValueVector<QPixmap> *icons,
187 187
   }
188 188
 }*/
189 189
 
190
-bool KBConfig::getGroupImage(QImage &img, QString &path, const QString &code,
190
+bool KBConfig::getGroupImage(TQImage &img, TQString &path, const TQString &code,
191 191
   int group, KConfig *config)
192 192
 {
193 193
   bool ret = true;
@@ -197,12 +197,12 @@ bool KBConfig::getGroupImage(QImage &img, QString &path, const QString &code,
197 197
   if (path.isEmpty() || !img.load(path)) {
198 198
     if (code.isEmpty()) ret = false;
199 199
     else {
200
-      path = locate("locale", QString("l10n/%1/flag.png").arg(code));
200
+      path = locate("locale", TQString("l10n/%1/flag.png").arg(code));
201 201
       if (!path.isEmpty()) ret = img.load(path);
202 202
       else {
203 203
         // I am told in Red Hat 9 standard KDE flag pixmaps are missing.
204 204
         // Workaround: we have to simulate them by rescaling GKB's pixmaps
205
-        path = QString("/usr/share/pixmaps/gkb/%1.png").arg(code);
205
+        path = TQString("/usr/share/pixmaps/gkb/%1.png").arg(code);
206 206
         ret = img.load(path) && !img.isNull();
207 207
         need_to_scale = true;
208 208
       }
@@ -216,62 +216,62 @@ bool KBConfig::getGroupImage(QImage &img, QString &path, const QString &code,
216 216
   return ret;
217 217
 }
218 218
 
219
-void KBConfig::drawFlagPixmap(QPixmap &pix, QString &path, const QString &code,
219
+void KBConfig::drawFlagPixmap(TQPixmap &pix, TQString &path, const TQString &code,
220 220
   int group, KConfig *config)
221 221
 {
222
-  QImage img;
222
+  TQImage img;
223 223
   if (getGroupImage(img, path, code, group, config)) 
224 224
     pix.convertFromImage(img);
225 225
 }
226 226
 
227
-void KBConfig::drawCodePixmap(QPixmap &pix, const QString &code)
227
+void KBConfig::drawCodePixmap(TQPixmap &pix, const TQString &code)
228 228
 {
229 229
   pix.resize(19, 16);
230 230
 	
231
-  QPainter painter(&pix);
232
-  QFont font("helvetica", 9, QFont::Bold);
231
+  TQPainter painter(&pix);
232
+  TQFont font("helvetica", 9, TQFont::Bold);
233 233
   font.setPixelSize(10);
234 234
   painter.setFont(font);
235 235
 	painter.setPen(KGlobalSettings::highlightedTextColor());
236 236
 	
237 237
 	pix.fill(KGlobalSettings::highlightColor());
238 238
   painter.drawText(1, 0, pix.width(), pix.height(),
239
-    Qt::AlignHCenter | Qt::AlignVCenter, code.upper());
239
+    TQt::AlignHCenter | TQt::AlignVCenter, code.upper());
240 240
 
241
-  /*QSize size = painter.fontMetrics().size(0, code.upper());
241
+  /*TQSize size = painter.fontMetrics().size(0, code.upper());
242 242
   kdDebug() << size.width() << " x " << size.height() << endl;*/
243 243
 }
244 244
 
245
-void KBConfig::drawCodeAndFlagPixmap(QPixmap &pix, QString &path,
246
-  const QString &countryCode, const QString &langCode, int group, KConfig *config)
245
+void KBConfig::drawCodeAndFlagPixmap(TQPixmap &pix, TQString &path,
246
+  const TQString &countryCode, const TQString &langCode, int group, KConfig *config)
247 247
 {
248
-	QImage img;
248
+	TQImage img;
249 249
 	if (!getGroupImage(img, path, countryCode, group, config)) return; // could not find flag
250 250
 	if (img.depth() <= 8) img = img.convertDepth(32);
251 251
 
252 252
 	// the following code is taken from kdebase/kxkb/pixmap.cpp
253 253
   for (int y = 0; y < img.height(); y++)
254 254
     for(int x = 0; x < img.width(); x++) {
255
-      QRgb rgb = img.pixel(x, y);
256
-      img.setPixel(x, y, qRgb(qRed(rgb)*3/4, qGreen(rgb)*3/4, qBlue(rgb)*3/4));
255
+      TQRgb rgb = img.pixel(x, y);
256
+      img.setPixel(x, y, tqRgb(tqRed(rgb)*3/4, tqGreen(rgb)*3/4, tqBlue(rgb)*3/4));
257 257
     }
258 258
   pix.convertFromImage(img);
259 259
 
260
-  QPainter painter(&pix);
261
-  painter.setPen(Qt::black);
262
-  painter.setFont(QFont("helvetica", 10, QFont::Bold));
263
-  painter.drawText(1, 1, pix.width(), pix.height()-2, Qt::AlignCenter, langCode);
264
-  painter.setPen(Qt::white);
265
-  painter.drawText(0, 0, pix.width(), pix.height()-2, Qt::AlignCenter, langCode);
260
+  TQPainter painter(&pix);
261
+  painter.setPen(TQt::black);
262
+  painter.setFont(TQFont("helvetica", 10, TQFont::Bold));
263
+  painter.drawText(1, 1, pix.width(), pix.height()-2, TQt::AlignCenter, langCode);
264
+  painter.setPen(TQt::white);
265
+  painter.drawText(0, 0, pix.width(), pix.height()-2, TQt::AlignCenter, langCode);
266 266
 }
267 267
 
268
-void KBConfig::drawDefaultPixmap(QPixmap &pix, int group)
268
+void KBConfig::drawDefaultPixmap(TQPixmap &pix, int group)
269 269
 {
270 270
   pix.resize(FLAG_ICON_WIDTH, FLAG_ICON_HEIGHT);
271
-  QPainter painter(&pix);
271
+  TQPainter painter(&pix);
272 272
   pix.fill();
273 273
   painter.drawText(0, 0, pix.width(), pix.height(),
274
-    Qt::AlignHCenter | Qt::AlignVCenter, QString::number(group+1));
274
+    TQt::AlignHCenter | TQt::AlignVCenter, TQString::number(group+1));
275 275
 }	
276 276
 
277 277
 void KBConfig::checkKeysEnabled()
@@ -283,14 +283,14 @@ void KBConfig::checkKeysEnabled()
283 283
 
284 284
 /** No descriptions */
285 285
 /*void KBConfig::drawDefaultPixmaps(){
286
-  QPixmap pix(16, 16);
287
-  QPainter painter(&pix);
286
+  TQPixmap pix(16, 16);
287
+  TQPainter painter(&pix);
288 288
 
289 289
   for (unsigned int i = 0; i < m_groups.count(); i++) {
290 290
     if (m_groups[i]->getPixmap().isNull()) {
291 291
       pix.fill();
292 292
       painter.drawText(0, 0, pix.width(), pix.height(),
293
-        Qt::AlignHCenter | Qt::AlignVCenter, QString::number(i+1));
293
+        TQt::AlignHCenter | TQt::AlignVCenter, TQString::number(i+1));
294 294
       m_groups[i]->setPixmap(pix);
295 295
     }
296 296
   }
@@ -298,8 +298,8 @@ void KBConfig::checkKeysEnabled()
298 298
 
299 299
 /** No descriptions */
300 300
 /*void KBConfig::loadConfiguredPixmaps(KConfig *config){
301
-  QString path;
302
-  QPixmap pix;
301
+  TQString path;
302
+  TQPixmap pix;
303 303
   config->setGroup(ICONS_SECTION);
304 304
   for (unsigned int i = 0; i < m_groups.count(); i++) {
305 305
     path = config->readEntry(entryForGroup(i));
@@ -315,18 +315,18 @@ void KBConfig::checkKeysEnabled()
315 315
 
316 316
 
317 317
 /*!
318
-    \fn KBConfig::getXkbLayouts(const QStringList &layouts)
318
+    \fn KBConfig::getXkbLayouts(const TQStringList &layouts)
319 319
  */
320
-void KBConfig::getXkbLayouts(QStringList &layouts)
320
+void KBConfig::getXkbLayouts(TQStringList &layouts)
321 321
 {
322 322
 #if HAVE_X11_EXTENSIONS_XKBRULES_H && HAVE_LIBXKBFILE
323 323
   XkbRF_VarDefsRec vardefs;
324 324
   int i;
325 325
 
326 326
   usleep(10000);
327
-  if (XkbRF_GetNamesProp(qt_xdisplay(), NULL, &vardefs)) {
328
-    layouts = QStringList::split(',', vardefs.layout, true);
329
-    for (QStringList::Iterator it = layouts.begin(); it != layouts.end(); ++it) {
327
+  if (XkbRF_GetNamesProp(tqt_xdisplay(), NULL, &vardefs)) {
328
+    layouts = TQStringList::split(',', vardefs.layout, true);
329
+    for (TQStringList::Iterator it = layouts.begin(); it != layouts.end(); ++it) {
330 330
       i = 0;
331 331
       while ((*it)[i] >= 'a' && (*it)[i] <= 'z') i++;
332 332
       *it = (*it).left(i);

+ 14
- 14
kkbswitch/kbconfig.h View File

@@ -20,8 +20,8 @@
20 20
 
21 21
 #include "kbgroup.h"
22 22
 
23
-#include <qptrvector.h>
24
-#include <qvaluevector.h>
23
+#include <ntqptrvector.h>
24
+#include <ntqvaluevector.h>
25 25
 #include <kconfig.h>
26 26
 
27 27
 #define ICONS_SECTION "Icons"
@@ -32,7 +32,7 @@
32 32
 
33 33
 class KGlobalAccel;
34 34
 
35
-typedef QPtrVector<KBGroup> KBGroupVector;
35
+typedef TQPtrVector<KBGroup> KBGroupVector;
36 36
 
37 37
 /**The class that stores configuration information of KBSwitch
38 38
   *@author Leonid Zeitlin
@@ -79,11 +79,11 @@ public:
79 79
   void save(KConfig *config);
80 80
   /** No descriptions */
81 81
   /*void notifyChanged();*/
82
-  /*static QString entryForGroup(int i) {
83
-    return QString("Group%1").arg(i+1);
82
+  /*static TQString entryForGroup(int i) {
83
+    return TQString("Group%1").arg(i+1);
84 84
   }*/
85
-  void drawIcons(IconStyle icon_style, QValueVector<QPixmap> *icons,
86
-    QStringList *iconpaths);
85
+  void drawIcons(IconStyle icon_style, TQValueVector<TQPixmap> *icons,
86
+    TQStringList *iconpaths);
87 87
   void checkKeysEnabled();
88 88
   int getNextGroup(int groupno) {
89 89
     return groupno >= groupCount() - 1 ? 0 : groupno + 1;
@@ -95,16 +95,16 @@ private: // Private methods
95 95
   //void drawDefaultPixmaps();
96 96
   /** No descriptions */
97 97
   //void loadConfiguredPixmaps(KConfig *config);
98
-  void drawFlagPixmap(QPixmap &pix, QString &path, const QString &code,
98
+  void drawFlagPixmap(TQPixmap &pix, TQString &path, const TQString &code,
99 99
     int group, KConfig *config);
100
-  void drawCodePixmap(QPixmap &pix, const QString &code);
101
-  void drawCodeAndFlagPixmap(QPixmap &pix, QString &path,
102
-    const QString &countryCode, const QString &langCode, int group,
100
+  void drawCodePixmap(TQPixmap &pix, const TQString &code);
101
+  void drawCodeAndFlagPixmap(TQPixmap &pix, TQString &path,
102
+    const TQString &countryCode, const TQString &langCode, int group,
103 103
     KConfig *config);
104
-  void drawDefaultPixmap(QPixmap &pix, int group);
105
-  bool getGroupImage(QImage &img, QString &path, const QString &code, int group,
104
+  void drawDefaultPixmap(TQPixmap &pix, int group);
105
+  bool getGroupImage(TQImage &img, TQString &path, const TQString &code, int group,
106 106
     KConfig *config);
107
-  void getXkbLayouts(QStringList &layouts);
107
+  void getXkbLayouts(TQStringList &layouts);
108 108
 };
109 109
 
110 110
 #endif

+ 73
- 73
kkbswitch/kbconfigdlg.cpp View File

@@ -19,17 +19,17 @@
19 19
 #include "kbpickicondlg.h"
20 20
 #include "boldlistboxitem.h"
21 21
 
22
-#include <qlayout.h>
23
-#include <qlabel.h>
24
-#include <qcheckbox.h>
25
-#include <qwhatsthis.h>
26
-#include <qvbox.h>
27
-#include <qstyle.h>
28
-#include <qgroupbox.h>
29
-#include <qheader.h>
30
-#include <qobjectlist.h>
31
-#include <qpushbutton.h>
32
-#include <qcombobox.h>
22
+#include <ntqlayout.h>
23
+#include <ntqlabel.h>
24
+#include <ntqcheckbox.h>
25
+#include <ntqwhatsthis.h>
26
+#include <ntqvbox.h>
27
+#include <ntqstyle.h>
28
+#include <ntqgroupbox.h>
29
+#include <ntqheader.h>
30
+#include <ntqobjectlist.h>
31
+#include <ntqpushbutton.h>
32
+#include <ntqcombobox.h>
33 33
 
34 34
 #include <kdeversion.h>
35 35
 #include <klistbox.h>
@@ -50,12 +50,12 @@
50 50
  */
51 51
 class SmallerKeyChooser : public KKeyChooser {
52 52
 private:
53
-  QSize m_size_hint;
53
+  TQSize m_size_hint;
54 54
   void calcSizeHint();
55 55
 public:
56
-  SmallerKeyChooser(KGlobalAccel *accel, QWidget *parent) :
56
+  SmallerKeyChooser(KGlobalAccel *accel, TQWidget *parent) :
57 57
     KKeyChooser(accel, parent) { calcSizeHint(); }
58
-  virtual QSize sizeHint() const { return m_size_hint; }
58
+  virtual TQSize sizeHint() const { return m_size_hint; }
59 59
 };
60 60
 
61 61
 void SmallerKeyChooser::calcSizeHint()
@@ -63,28 +63,28 @@ void SmallerKeyChooser::calcSizeHint()
63 63
 	m_size_hint = KKeyChooser::sizeHint();
64 64
 
65 65
   KListView *lv = NULL;
66
-  QGroupBox *gb = NULL;
67
-  const QObjectList *objects = children();
68
-  QObjectListIt iter(*objects);
69
-  QObject *obj;
66
+  TQGroupBox *gb = NULL;
67
+  const TQObjectList *objects = children();
68
+  TQObjectListIt iter(*objects);
69
+  TQObject *obj;
70 70
 
71 71
   while ( (obj = iter.current()) ) {
72 72
 		++iter;
73 73
 		if (obj->inherits("KListView"))
74 74
 		  lv = dynamic_cast<KListView*>(obj);
75
-		else if (obj->inherits("QGroupBox"))
76
-		  gb = dynamic_cast<QGroupBox*>(obj);  
75
+		else if (obj->inherits("TQGroupBox"))
76
+		  gb = dynamic_cast<TQGroupBox*>(obj);  
77 77
 	}
78 78
 	if (!lv || !gb) return; // oops, should not happen
79 79
 	
80
-	QListViewItem *item = lv->firstChild();
80
+	TQListViewItem *item = lv->firstChild();
81 81
 	if (!item) return; 
82 82
 
83 83
 	int height = item->height() * (1 + item->childCount()) + lv->header()->height() +
84
-	  style().pixelMetric(QStyle::PM_ScrollBarExtent) + gb->sizeHint().height() +
84
+	  style().pixelMetric(TQStyle::PM_ScrollBarExtent) + gb->sizeHint().height() +
85 85
 	  layout()->spacing() * 2;
86 86
 	int width = lv->columnWidth(0) + lv->columnWidth(1);
87
-	m_size_hint = QSize(width, height);
87
+	m_size_hint = TQSize(width, height);
88 88
 }	
89 89
 
90 90
 static inline bool iconTypeShowsFlag(KBConfig::IconStyle icon_style)
@@ -92,14 +92,14 @@ static inline bool iconTypeShowsFlag(KBConfig::IconStyle icon_style)
92 92
 	return icon_style == KBConfig::ICON_FLAG || icon_style == KBConfig::ICON_CODE_AND_FLAG;
93 93
 }
94 94
 
95
-KBConfigDlg::KBConfigDlg(KBConfig *kbconf, QWidget *parent, const char *name )
95
+KBConfigDlg::KBConfigDlg(KBConfig *kbconf, TQWidget *parent, const char *name )
96 96
   : KDialogBase(Tabbed, i18n("Configure")/*caption*/, Ok | Apply | Cancel | Help,
97 97
       Ok, parent, name, true /*modal*/)
98 98
 {
99 99
   m_kbconf = kbconf;
100 100
   m_default_groupno = m_kbconf->default_groupno();
101 101
 
102
-  setHelp(QString("configure-kkbswitch"));
102
+  setHelp(TQString("configure-kkbswitch"));
103 103
   setButtonBoxOrientation(Horizontal);
104 104
   setupGeneralPage();
105 105
   setupShortcutsPage();
@@ -113,64 +113,64 @@ KBConfigDlg::~KBConfigDlg(){
113 113
 
114 114
 void KBConfigDlg::setupGeneralPage()
115 115
 {
116
-  QFrame *page = addPage(i18n("&General")); //makeMainWidget();
117
-  QVBoxLayout *vlayout = new QVBoxLayout(page);
116
+  TQFrame *page = addPage(i18n("&General")); //makeMainWidget();
117
+  TQVBoxLayout *vlayout = new TQVBoxLayout(page);
118 118
   vlayout->setSpacing(2);
119 119
 
120
-  QLabel *lbl = new QLabel(i18n("Available &keyboard layouts:"), page);
120
+  TQLabel *lbl = new TQLabel(i18n("Available &keyboard layouts:"), page);
121 121
   vlayout->addWidget(lbl);
122 122
 
123
-  QHBoxLayout *groupsLayout = new QHBoxLayout(vlayout);
123
+  TQHBoxLayout *groupsLayout = new TQHBoxLayout(vlayout);
124 124
   groupsLayout->setSpacing(2);
125 125
 
126 126
   lbGroups = new KListBox(page);
127
-  QObject::connect(lbGroups, SIGNAL(selectionChanged()), this, SLOT(slotLayoutSelected()));
128
-  QObject::connect(lbGroups, SIGNAL(doubleClicked(QListBoxItem *)), this,
129
-    SLOT(slotListBoxExecuted(QListBoxItem *)));
127
+  TQObject::connect(lbGroups, SIGNAL(selectionChanged()), this, SLOT(slotLayoutSelected()));
128
+  TQObject::connect(lbGroups, SIGNAL(doubleClicked(TQListBoxItem *)), this,
129
+    SLOT(slotListBoxExecuted(TQListBoxItem *)));
130 130
   groupsLayout->addWidget(lbGroups);
131 131
   lbl->setBuddy(lbGroups);
132
-  QWhatsThis::add(lbGroups, i18n("This list box shows keyboard layouts available in your system.\n"
132
+  TQWhatsThis::add(lbGroups, i18n("This list box shows keyboard layouts available in your system.\n"
133 133
     "Select a layout and click \"Change Icon...\" button to change the icon for a layout.\n"
134 134
     "If you have configured a non-default icon, you can reset the icon to default with \"Use Default Icon\" button.\n"
135 135
     "The layout shown is bold is the default layout. Use \"Set as default\" button "
136 136
     "to set the default layout."));
137 137
 
138
-  QVBoxLayout *btnLayout = new QVBoxLayout(groupsLayout);
138
+  TQVBoxLayout *btnLayout = new TQVBoxLayout(groupsLayout);
139 139
   btnLayout->setSpacing(2);
140 140
 
141
-  btnChangeIcon = new QPushButton(i18n("Cha&nge Icon..."), page);
142
-  QObject::connect(btnChangeIcon, SIGNAL(clicked()), this, SLOT(slotPickIcon()));
143
-  btnLayout->addWidget(btnChangeIcon, 0, Qt::AlignTop);
144
-  QWhatsThis::add(btnChangeIcon, i18n("Click this button to change the icon for the "
141
+  btnChangeIcon = new TQPushButton(i18n("Cha&nge Icon..."), page);
142
+  TQObject::connect(btnChangeIcon, SIGNAL(clicked()), this, SLOT(slotPickIcon()));
143
+  btnLayout->addWidget(btnChangeIcon, 0, TQt::AlignTop);
144
+  TQWhatsThis::add(btnChangeIcon, i18n("Click this button to change the icon for the "
145 145
     "layout selected in the list box to the left."));
146 146
 
147
-  btnSetDefaultIcon = new QPushButton(i18n("Use &Default Icon"), page);
148
-  QObject::connect(btnSetDefaultIcon, SIGNAL(clicked()), this, SLOT(slotSetDefaultIcon()));
149
-  btnLayout->addWidget(btnSetDefaultIcon, 0, Qt::AlignTop); 
150
-  QWhatsThis::add(btnSetDefaultIcon, i18n("Click this button to use default icon for the " 
147
+  btnSetDefaultIcon = new TQPushButton(i18n("Use &Default Icon"), page);
148
+  TQObject::connect(btnSetDefaultIcon, SIGNAL(clicked()), this, SLOT(slotSetDefaultIcon()));
149
+  btnLayout->addWidget(btnSetDefaultIcon, 0, TQt::AlignTop); 
150
+  TQWhatsThis::add(btnSetDefaultIcon, i18n("Click this button to use default icon for the " 
151 151
     "layout selected in the list box to the left."));
152 152
     
153
-  btnSetDefaultGroup = new QPushButton(i18n("&Set as Default"), page);
154
-  QObject::connect(btnSetDefaultGroup, SIGNAL(clicked()), this, SLOT(slotSetDefaultGroup()));
155
-  btnLayout->addWidget(btnSetDefaultGroup, 0, Qt::AlignTop);
156
-  QWhatsThis::add(btnSetDefaultGroup, i18n("Click this button to set the layout selected "
153
+  btnSetDefaultGroup = new TQPushButton(i18n("&Set as Default"), page);
154
+  TQObject::connect(btnSetDefaultGroup, SIGNAL(clicked()), this, SLOT(slotSetDefaultGroup()));
155
+  btnLayout->addWidget(btnSetDefaultGroup, 0, TQt::AlignTop);
156
+  TQWhatsThis::add(btnSetDefaultGroup, i18n("Click this button to set the layout selected "
157 157
     "in the list box to the left as the default"));
158 158
 
159
-  btnLayout->addItem(new QSpacerItem(1, 1, QSizePolicy::Minimum,
160
-    QSizePolicy::MinimumExpanding));
159
+  btnLayout->addItem(new TQSpacerItem(1, 1, TQSizePolicy::Minimum,
160
+    TQSizePolicy::MinimumExpanding));
161 161
 
162
-  lbl = new QLabel(i18n("Layout &icon style:"), page);
162
+  lbl = new TQLabel(i18n("Layout &icon style:"), page);
163 163
   vlayout->addWidget(lbl);
164 164
 
165
-  cbxIconType = new QComboBox(page);
165
+  cbxIconType = new TQComboBox(page);
166 166
   cbxIconType->setEditable(false);
167 167
   cbxIconType->insertItem(i18n("Country flag"));
168 168
   cbxIconType->insertItem(i18n("Language code"));
169 169
   cbxIconType->insertItem(i18n("Flag and code"));
170
-  QObject::connect(cbxIconType, SIGNAL(activated(int)), this, SLOT(slotIconTypeSelected(int)));
170
+  TQObject::connect(cbxIconType, SIGNAL(activated(int)), this, SLOT(slotIconTypeSelected(int)));
171 171
   vlayout->addWidget(cbxIconType);
172 172
   lbl->setBuddy(cbxIconType);
173
-  QWhatsThis::add(cbxIconType, i18n("<p>Select the style of icons representing the "
173
+  TQWhatsThis::add(cbxIconType, i18n("<p>Select the style of icons representing the "
174 174
     "current keyboard layout.\n"
175 175
     "You can choose from the following styles:"
176 176
     "<ul><li><b>Country flag</b> - displays the corresponding country flag"
@@ -178,17 +178,17 @@ void KBConfigDlg::setupGeneralPage()
178 178
     "<li><b>Flag and code</b> - displays the language code superimposed over the country flag."
179 179
     "</ul></p>"));
180 180
 
181
-  lbl = new QLabel(i18n("&Layout applies to:"), page);
181
+  lbl = new TQLabel(i18n("&Layout applies to:"), page);
182 182
   vlayout->addWidget(lbl);
183 183
   
184
-  cbxGroupScope = new QComboBox(page);
184
+  cbxGroupScope = new TQComboBox(page);
185 185
   cbxGroupScope->setEditable(false);
186 186
   cbxGroupScope->insertItem(i18n("All windows"));
187 187
   cbxGroupScope->insertItem(i18n("Windows of one application"));
188 188
   cbxGroupScope->insertItem(i18n("One window"));
189 189
   vlayout->addWidget(cbxGroupScope);
190 190
   lbl->setBuddy(cbxGroupScope);
191
-   QWhatsThis::add(cbxGroupScope, i18n("<p>Select what windows the currently selected "
191
+   TQWhatsThis::add(cbxGroupScope, i18n("<p>Select what windows the currently selected "
192 192
      "keyboard layout applies to:\n"
193 193
      "<ul><li><b>All windows</b> - one layout applies to all windows on your desktop\n"
194 194
      "<li><b>Windows of one application</b> - layout applies to one application; each " 
@@ -196,30 +196,30 @@ void KBConfigDlg::setupGeneralPage()
196 196
      "<li><b>One window</b> - layout applies to one window only; each window can have its own layout. "
197 197
      "When you switch between windows, layout follows the active window.</ul></p>"));
198 198
   
199
-  chkToggleMode = new QCheckBox(i18n("Use \"&Toggle Mode\""), page);
199
+  chkToggleMode = new TQCheckBox(i18n("Use \"&Toggle Mode\""), page);
200 200
   vlayout->addWidget(chkToggleMode);
201
-  QWhatsThis::add(chkToggleMode, i18n("Toggle mode is useful when you have more than two keyboard "
201
+  TQWhatsThis::add(chkToggleMode, i18n("Toggle mode is useful when you have more than two keyboard "
202 202
     "layouts defined. When toggle mode is on your normal layout switch key toggles between two most frequently used layouts. "
203 203
     "To activate other layouts use KKBSwitch's tray popup menu"));
204 204
 
205
-  /*chkPerwindowGroup = new QCheckBox(i18n("Use &per-window layout"), page);
205
+  /*chkPerwindowGroup = new TQCheckBox(i18n("Use &per-window layout"), page);
206 206
   vlayout->addWidget(chkPerwindowGroup);
207
-  QWhatsThis::add(chkPerwindowGroup, i18n("When this checkbox is checked, "
207
+  TQWhatsThis::add(chkPerwindowGroup, i18n("When this checkbox is checked, "
208 208
     "each window has its own current keyboard layout. When it's unchecked, "
209 209
     "the current layout affects all windows"));*/
210 210
 
211
-  chkAutostart = new QCheckBox(i18n("A&utostart"), page);
211
+  chkAutostart = new TQCheckBox(i18n("A&utostart"), page);
212 212
   vlayout->addWidget(chkAutostart);
213
-  QWhatsThis::add(chkAutostart, i18n("When this checkbox is checked, KKBSwitch "
213
+  TQWhatsThis::add(chkAutostart, i18n("When this checkbox is checked, KKBSwitch "
214 214
     "will start automatically when you log in"));
215 215
 }
216 216
 	
217 217
 void KBConfigDlg::setupShortcutsPage()
218 218
 {
219
-  QVBox *box = addVBoxPage(i18n("Sho&rtcuts"));
220
-  chkUseShortcuts = new QCheckBox(i18n("Use shortcuts to &activate keyboard layouts"), box);
219
+  TQVBox *box = addVBoxPage(i18n("Sho&rtcuts"));
220
+  chkUseShortcuts = new TQCheckBox(i18n("Use shortcuts to &activate keyboard layouts"), box);
221 221
   connect(chkUseShortcuts, SIGNAL(toggled(bool)), this, SLOT(slotUseShortcutsToggled(bool)));
222
-  QWhatsThis::add(chkUseShortcuts, i18n("Check this checkbox to be able to quickly "
222
+  TQWhatsThis::add(chkUseShortcuts, i18n("Check this checkbox to be able to quickly "
223 223
     "activate any keyboard layout with keyboard shorcuts. Once this checkbox "
224 224
     "is checked, you can adjust the shortcuts at the key chooser pane below. "
225 225
     "Especially useful if you have three or four keyboard layouts configured"));
@@ -256,11 +256,11 @@ void KBConfigDlg::showConfig(){
256 256
 /** Fire up "Pick Icon" dialog */
257 257
 void KBConfigDlg::slotPickIcon(){
258 258
 	int index = lbGroups->currentItem();
259
-  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
259
+  TQApplication::setOverrideCursor(TQCursor(TQt::WaitCursor));
260 260
   KBPickIconDlg dlg(m_iconpaths[index], *(lbGroups->pixmap(index)), this);
261
-  QApplication::restoreOverrideCursor();
261
+  TQApplication::restoreOverrideCursor();
262 262
   if (dlg.exec()) {
263
-		QString path = dlg.getIconPath();
263
+		TQString path = dlg.getIconPath();
264 264
     KBGroup *group = m_kbconf->getGroup(index);
265 265
 		if (!path.isEmpty() && path != group->getIconPath()) {
266 266
   		kapp->config()->writeEntry(group->getName()/*KBConfig::entryForGroup(index)*/, path);
@@ -277,7 +277,7 @@ void KBConfigDlg::slotSetDefaultGroup()
277 277
 		BoldListBoxItem *item = dynamic_cast<BoldListBoxItem*>(lbGroups->item(m_default_groupno));
278 278
 		item->setBold(false);
279 279
     m_default_groupno = new_default_group;
280
-    // NB: don't use selectedItem(); it's not present in Qt 3.0, and
280
+    // NB: don't use selectedItem(); it's not present in TQt 3.0, and
281 281
     // we want to maintain compatibility with it
282 282
     int curitem = lbGroups->currentItem();
283 283
     if (curitem > -1) { // should not be -1, but just in case
@@ -298,15 +298,15 @@ void KBConfigDlg::slotLayoutSelected(){
298 298
 }
299 299
 
300 300
 /** No descriptions */
301
-void KBConfigDlg::slotListBoxExecuted(QListBoxItem *){
301
+void KBConfigDlg::slotListBoxExecuted(TQListBoxItem *){
302 302
 	if (iconTypeShowsFlag(KBConfig::IconStyle(cbxIconType->currentItem())))
303 303
     slotPickIcon();
304 304
 }
305 305
 
306 306
 /** No descriptions */
307 307
 void KBConfigDlg::saveConfig(){
308
-  QString path;
309
-  const QPixmap *pix;
308
+  TQString path;
309
+  const TQPixmap *pix;
310 310
   KConfig *conf = kapp->config();
311 311
   conf->setGroup(ICONS_SECTION);
312 312
   for (int i = 0; i < m_kbconf->groupCount(); i++) {
@@ -353,10 +353,10 @@ void KBConfigDlg::slotIconTypeSelected(int index)
353 353
 
354 354
 void KBConfigDlg::redrawIcons(KBConfig::IconStyle icon_style)
355 355
 {
356
-  QValueVector<QPixmap> pixlist;
356
+  TQValueVector<TQPixmap> pixlist;
357 357
   m_kbconf->drawIcons(icon_style, &pixlist, &m_iconpaths);
358 358
 	int curIndex = lbGroups->currentItem();
359
-  // NB: don't use count(), use size(); count() is not present in Qt 3.0, and
359
+  // NB: don't use count(), use size(); count() is not present in TQt 3.0, and
360 360
   // we want to maintain compatibility with it
361 361
   for (unsigned int i = 0; i < pixlist.size(); i++) {
362 362
     BoldListBoxItem *curItem = dynamic_cast<BoldListBoxItem*>(lbGroups->item(i));

+ 17
- 17
kkbswitch/kbconfigdlg.h View File

@@ -21,11 +21,11 @@
21 21
 #include <kdialogbase.h>
22 22
 #include "kbconfig.h"
23 23
 
24
-class QWidget;
25
-class QCheckBox;
26
-class QPushButton;
27
-class QComboBox;
28
-class QStringList;
24
+class TQWidget;
25
+class TQCheckBox;
26
+class TQPushButton;
27
+class TQComboBox;
28
+class TQStringList;
29 29
 class KKeyChooser;
30 30
 
31 31
 
@@ -36,23 +36,23 @@ class KKeyChooser;
36 36
 class KBConfigDlg : public KDialogBase  {
37 37
    Q_OBJECT
38 38
 public: 
39
-	KBConfigDlg(KBConfig *kbconf, QWidget *parent=0, const char *name=0);
39
+	KBConfigDlg(KBConfig *kbconf, TQWidget *parent=0, const char *name=0);
40 40
 	~KBConfigDlg();
41 41
 private: // Private attributes
42 42
   /**  */
43 43
   KListBox *lbGroups;
44 44
   /**  */
45
-  QCheckBox *chkToggleMode;
46
-  //QCheckBox *chkPerwindowGroup;
47
-  QCheckBox *chkAutostart;
48
-  QPushButton *btnChangeIcon;
49
-  QPushButton *btnSetDefaultIcon;
50
-  QPushButton *btnSetDefaultGroup;
51
-  QComboBox *cbxIconType;
52
-  QComboBox *cbxGroupScope;
45
+  TQCheckBox *chkToggleMode;
46
+  //TQCheckBox *chkPerwindowGroup;
47
+  TQCheckBox *chkAutostart;
48
+  TQPushButton *btnChangeIcon;
49
+  TQPushButton *btnSetDefaultIcon;
50
+  TQPushButton *btnSetDefaultGroup;
51
+  TQComboBox *cbxIconType;
52
+  TQComboBox *cbxGroupScope;
53 53
   KKeyChooser *keyChooser;
54
-  QCheckBox *chkUseShortcuts;
55
-  QStringList m_iconpaths;
54
+  TQCheckBox *chkUseShortcuts;
55
+  TQStringList m_iconpaths;
56 56
   int m_default_groupno;
57 57
   KBConfig *m_kbconf;
58 58
   /** Display the current KBSwitch configuration in the dialog */
@@ -69,7 +69,7 @@ private slots: // Private slots
69 69
   /** No descriptions */
70 70
   void slotLayoutSelected();
71 71
   /** No descriptions */
72
-  void slotListBoxExecuted(QListBoxItem *item);
72
+  void slotListBoxExecuted(TQListBoxItem *item);
73 73
   void slotIconTypeSelected(int index);
74 74
   void slotUseShortcutsToggled(bool on);
75 75
   void slotSetDefaultIcon();

+ 1
- 1
kkbswitch/kbgroup.cpp View File

@@ -18,7 +18,7 @@
18 18
 #include "kbgroup.h"
19 19
 #include <kdebug.h>
20 20
 
21
-KBGroup::KBGroup(const QString& name){
21
+KBGroup::KBGroup(const TQString& name){
22 22
   m_name = name;
23 23
 }
24 24
 

+ 11
- 11
kkbswitch/kbgroup.h View File

@@ -18,8 +18,8 @@
18 18
 #ifndef KBGROUP_H
19 19
 #define KBGROUP_H
20 20
 
21
-#include <qpixmap.h>
22
-#include <qstring.h>
21
+#include <ntqpixmap.h>
22
+#include <ntqstring.h>
23 23
 
24 24
 /**A helper class the holds keyboard group's name and pixmap
25 25
   *@author Leonid Zeitlin
@@ -27,22 +27,22 @@
27 27
 
28 28
 class KBGroup {
29 29
 public: 
30
-	KBGroup(const QString& name);
30
+	KBGroup(const TQString& name);
31 31
 	~KBGroup();
32 32
 	/** */
33
-	const QPixmap& getPixmap() { return m_pixmap; }
33
+	const TQPixmap& getPixmap() { return m_pixmap; }
34 34
   /** No descriptions */
35
-  const QString& getName() { return m_name; }
35
+  const TQString& getName() { return m_name; }
36 36
   /** No descriptions */
37
-  void setPixmap(const QPixmap& pixmap) { m_pixmap = pixmap; }
38
-  const QString& getIconPath() { return m_iconpath; }
39
-  void setIconPath(const QString &iconpath) { m_iconpath = iconpath; }
37
+  void setPixmap(const TQPixmap& pixmap) { m_pixmap = pixmap; }
38
+  const TQString& getIconPath() { return m_iconpath; }
39
+  void setIconPath(const TQString &iconpath) { m_iconpath = iconpath; }
40 40
 private: // Private attributes
41 41
   /**  */
42
-  QString m_name;
42
+  TQString m_name;
43 43
   /**  */
44
-  QPixmap m_pixmap;
45
-  QString m_iconpath;
44
+  TQPixmap m_pixmap;
45
+  TQString m_iconpath;
46 46
 };
47 47
 
48 48
 #endif

+ 44
- 44
kkbswitch/kbpickicondlg.cpp View File

@@ -17,11 +17,11 @@
17 17
 
18 18
 #include "kbpickicondlg.h"
19 19
 
20
-#include <qvbox.h>
21
-#include <qdir.h>
22
-#include <qwhatsthis.h>
23
-#include <qpushbutton.h>
24
-#include <qimage.h>
20
+#include <ntqvbox.h>
21
+#include <ntqdir.h>
22
+#include <ntqwhatsthis.h>
23
+#include <ntqpushbutton.h>
24
+#include <ntqimage.h>
25 25
 
26 26
 #include <kdeversion.h>
27 27
 #include <klocale.h>
@@ -37,21 +37,21 @@
37 37
 #include "kbconfig.h"
38 38
 #include "pathlistboxitem.h"
39 39
 
40
-KBPickIconDlg::KBPickIconDlg(const QString &currentPath, const QPixmap &currentPixmap,
41
-  QWidget *parent, const char *name )
40
+KBPickIconDlg::KBPickIconDlg(const TQString &currentPath, const TQPixmap &currentPixmap,
41
+  TQWidget *parent, const char *name )
42 42
   : KDialogBase(parent, name, true /*modal*/, i18n("Pick an icon") /*caption*/, Ok | Cancel) {
43
-  QVBox *page = makeVBoxMainWidget();
43
+  TQVBox *page = makeVBoxMainWidget();
44 44
   
45 45
   lbIcons = new KListBox(page);
46
-  QObject::connect(lbIcons, SIGNAL(doubleClicked(QListBoxItem*)),
46
+  TQObject::connect(lbIcons, SIGNAL(doubleClicked(TQListBoxItem*)),
47 47
     this, SLOT(slotOk()));
48
-  QObject::connect(lbIcons, SIGNAL(returnPressed(QListBoxItem*)),
48
+  TQObject::connect(lbIcons, SIGNAL(returnPressed(TQListBoxItem*)),
49 49
     this, SLOT(slotOk()));
50
-  QWhatsThis::add(lbIcons, i18n("Select one of the icons"));  
50
+  TQWhatsThis::add(lbIcons, i18n("Select one of the icons"));  
51 51
 
52
-  QPushButton *btnBrowse = new QPushButton(i18n("&Browse..."), page);
53
-  QObject::connect(btnBrowse, SIGNAL(clicked()), this, SLOT(slotBrowseForIcon()));
54
-  QWhatsThis::add(btnBrowse, i18n("Browse for an image file to use as an icon"));
52
+  TQPushButton *btnBrowse = new TQPushButton(i18n("&Browse..."), page);
53
+  TQObject::connect(btnBrowse, SIGNAL(clicked()), this, SLOT(slotBrowseForIcon()));
54
+  TQWhatsThis::add(btnBrowse, i18n("Browse for an image file to use as an icon"));
55 55
   
56 56
   loadCountryFlags();
57 57
       
@@ -69,15 +69,15 @@ KBPickIconDlg::~KBPickIconDlg(){
69 69
 }
70 70
 
71 71
 /** Get the path name of the selected icon. Returns empty string if no icon selected */
72
-QString KBPickIconDlg::getIconPath(){
73
-  QListBoxItem *item = lbIcons->selectedItem();
72
+TQString KBPickIconDlg::getIconPath(){
73
+  TQListBoxItem *item = lbIcons->selectedItem();
74 74
 	if (item) 
75 75
 		return dynamic_cast<PathListBoxItem*>(item)->path;
76
-	else return QString::null; // should not happen
76
+	else return TQString::null; // should not happen
77 77
 }
78 78
 
79 79
 /** No descriptions */
80
-const QPixmap* KBPickIconDlg::getIcon(){
80
+const TQPixmap* KBPickIconDlg::getIcon(){
81 81
   if (lbIcons->currentItem() != -1)
82 82
     return lbIcons->pixmap(lbIcons->currentItem());
83 83
   else return NULL;
@@ -86,13 +86,13 @@ const QPixmap* KBPickIconDlg::getIcon(){
86 86
 /** Browse for an arbitrary icon file */
87 87
 void KBPickIconDlg::slotBrowseForIcon()
88 88
 {
89
-	QString iconPath = KFileDialog::getOpenFileName(QString::null,
89
+	TQString iconPath = KFileDialog::getOpenFileName(TQString::null,
90 90
 	  i18n("*.png *.jpg *.gif *.xpm|Icon files (*.png, *.jpg, *.gif, *.xpm)\n*.*|All files (*.*)"));
91 91
 	if (iconPath.isEmpty()) return;  
92
-  QImage img;
92
+  TQImage img;
93 93
   if (img.load(iconPath)) {
94 94
 		double aspectRatio = img.width() / img.height();
95
-		QString message = QString::null;
95
+		TQString message = TQString::null;
96 96
 		bool too_big, too_wide, too_narrow;
97 97
 		too_narrow = aspectRatio < FLAG_ICON_WIDTH / FLAG_ICON_HEIGHT - 0.1;
98 98
 		too_wide = aspectRatio > FLAG_ICON_WIDTH / FLAG_ICON_HEIGHT + 0.1;
@@ -102,7 +102,7 @@ void KBPickIconDlg::slotBrowseForIcon()
102 102
 	  	  "Preferred size for the layout icons is %3 by %4.\n")
103 103
 		    .arg(img.width()).arg(img.height()).arg(FLAG_ICON_WIDTH).arg(FLAG_ICON_HEIGHT);
104 104
       if (too_big) {
105
-        QString msg_tail = "";
105
+        TQString msg_tail = "";
106 106
         if (too_wide) msg_tail = i18n(" and also too wide");
107 107
 				else if (too_narrow) msg_tail += i18n(" and also too narrow");
108 108
 				message += i18n("This image is too big%1.").arg(msg_tail);
@@ -116,9 +116,9 @@ void KBPickIconDlg::slotBrowseForIcon()
116 116
 		}    	  
117 117
 		if (img.width() > FLAG_ICON_WIDTH + 3 || img.height() > FLAG_ICON_HEIGHT + 3)
118 118
 		  img = img.smoothScale(FLAG_ICON_WIDTH, FLAG_ICON_HEIGHT);
119
-		QPixmap pix;
119
+		TQPixmap pix;
120 120
 		pix.convertFromImage(img);
121
-    PathListBoxItem *item = new PathListBoxItem(lbIcons, pix, QFileInfo(iconPath).fileName(), 
121
+    PathListBoxItem *item = new PathListBoxItem(lbIcons, pix, TQFileInfo(iconPath).fileName(), 
122 122
       iconPath);
123 123
     lbIcons->setSelected(item, true);
124 124
     lbIcons->centerCurrentItem();
@@ -129,16 +129,16 @@ void KBPickIconDlg::slotBrowseForIcon()
129 129
 
130 130
 void KBPickIconDlg::loadCountryFlags()
131 131
 {
132
-  QPixmap pix;
133
-  QDir dir;
134
-  QStringList locales;
135
-  QString path;
136
-  QStringList dirs = KGlobal::dirs()->findDirs("locale", "l10n");
132
+  TQPixmap pix;
133
+  TQDir dir;
134
+  TQStringList locales;
135
+  TQString path;
136
+  TQStringList dirs = KGlobal::dirs()->findDirs("locale", "l10n");
137 137
   
138
-  for (QStringList::Iterator dirIter = dirs.begin(); dirIter != dirs.end(); dirIter++) {
138
+  for (TQStringList::Iterator dirIter = dirs.begin(); dirIter != dirs.end(); dirIter++) {
139 139
     dir.setPath(*dirIter);
140
-    locales = dir.entryList(QDir::Dirs, QDir::Name);
141
-    for (QStringList::Iterator iter = locales.begin(); iter != locales.end(); iter++) {
140
+    locales = dir.entryList(TQDir::Dirs, TQDir::Name);
141
+    for (TQStringList::Iterator iter = locales.begin(); iter != locales.end(); iter++) {
142 142
       path = dir.path() + "/" + *iter + "/flag.png";
143 143
       if (*iter != "." && *iter != ".." && pix.load(path)) {
144 144
 				KConfig config(dir.path() + "/" + *iter + "/entry.desktop", true, false,
@@ -152,16 +152,16 @@ void KBPickIconDlg::loadCountryFlags()
152 152
 	
153 153
 void KBPickIconDlg::loadGkbCountryFlags()
154 154
 {
155
-  QDir dir;
156
-  QString path, code, name;
157
-  QPixmap pix;
158
-  QImage img;
155
+  TQDir dir;
156
+  TQString path, code, name;
157
+  TQPixmap pix;
158
+  TQImage img;
159 159
 	
160 160
   dir.setPath("/usr/share/pixmaps/gkb");
161
-  const QFileInfoList *icons = dir.entryInfoList(QDir::Files, QDir::Name);
161
+  const TQFileInfoList *icons = dir.entryInfoList(TQDir::Files, TQDir::Name);
162 162
   if (icons) {
163
-		QFileInfoListIterator iter(*icons);
164
-		QFileInfo *info;
163
+		TQFileInfoListIterator iter(*icons);
164
+		TQFileInfo *info;
165 165
     for (; (info = iter.current()); ++iter) {
166 166
       path = info->filePath();
167 167
       code = info->baseName();
@@ -178,8 +178,8 @@ void KBPickIconDlg::loadGkbCountryFlags()
178 178
   }
179 179
 }
180 180
 
181
-void KBPickIconDlg::showCurrentPath(const QString &currentPath,
182
-  const QPixmap &currentPixmap)
181
+void KBPickIconDlg::showCurrentPath(const TQString &currentPath,
182
+  const TQPixmap &currentPixmap)
183 183
 {
184 184
 	PathListBoxItem *item = NULL;
185 185
   bool itemFound = false;
@@ -193,11 +193,11 @@ void KBPickIconDlg::showCurrentPath(const QString &currentPath,
193 193
   // why this strange manipulation of HScrollBarMode?
194 194
   // Strangely, without it, if the selected item is the last in the listbox, it ends up
195 195
   // being obscured by the horizontal scrollbar
196
-  lbIcons->setHScrollBarMode(QScrollView::AlwaysOn);
196
+  lbIcons->setHScrollBarMode(TQScrollView::AlwaysOn);
197 197
   if (!itemFound) item = new PathListBoxItem(lbIcons, currentPixmap, 
198
-    QFileInfo(currentPath).fileName(), currentPath);
198
+    TQFileInfo(currentPath).fileName(), currentPath);
199 199
   lbIcons->updateScrollBars();  
200 200
   lbIcons->setSelected(item, true);
201 201
 	lbIcons->ensureCurrentVisible();
202
-  lbIcons->setHScrollBarMode(QScrollView::Auto);  
202
+  lbIcons->setHScrollBarMode(TQScrollView::Auto);  
203 203
 }

+ 14
- 14
kkbswitch/kbpickicondlg.h View File

@@ -20,9 +20,9 @@
20 20
 
21 21
 #include <kdialogbase.h>
22 22
 
23
-class QWidget;
24
-class QStringList;
25
-class QPixmap;
23
+class TQWidget;
24
+class TQStringList;
25
+class TQPixmap;
26 26
 class KListBox;
27 27
 
28 28
 /**A dialog to pick an icon for a keyboard layout
@@ -32,30 +32,30 @@ class KListBox;
32 32
 class KBPickIconDlg : public KDialogBase  {
33 33
    Q_OBJECT
34 34
 public: 
35
-	KBPickIconDlg(const QString &currentPath, const QPixmap &currentPixmap,
36
-	  QWidget *parent=0, const char *name=0);
35
+	KBPickIconDlg(const TQString &currentPath, const TQPixmap &currentPixmap,
36
+	  TQWidget *parent=0, const char *name=0);
37 37
 	~KBPickIconDlg();
38 38
   /** Get the path name of the selected icon. Returns empty string if no icon selected */
39
-  QString getIconPath();
39
+  TQString getIconPath();
40 40
   /** No descriptions */
41
-  const QPixmap* getIcon();
41
+  const TQPixmap* getIcon();
42 42
 private: // Private attributes
43 43
   /**  */
44
-  //QStringList m_pathnames;
45
-  //QString m_iconpath;
44
+  //TQStringList m_pathnames;
45
+  //TQString m_iconpath;
46 46
   //KIconView *m_iconview;
47 47
   KListBox *lbIcons;
48
-  //QLabel *lblIcon;
49
-  //QRadioButton *rbFlags;
50
-  //QRadioButton *rbBrowse;
48
+  //TQLabel *lblIcon;
49
+  //TQRadioButton *rbFlags;
50
+  //TQRadioButton *rbBrowse;
51 51
   void loadCountryFlags();
52 52
   void loadGkbCountryFlags();
53
-  void showCurrentPath(const QString &currentPath, const QPixmap &currentPixmap);
53
+  void showCurrentPath(const TQString &currentPath, const TQPixmap &currentPixmap);
54 54
 private slots: // Private slots
55 55
   /** Browse for an arbitrary icon file */
56 56
   void slotBrowseForIcon();
57 57
   /** Respond to user selecting a flag in the icon view */
58
-  //void slotFlagSelected(QIconViewItem *item);
58
+  //void slotFlagSelected(TQIconViewItem *item);
59 59
 };
60 60
 
61 61
 #endif

+ 12
- 12
kkbswitch/kbswitchapp.cpp View File

@@ -45,20 +45,20 @@ KBSwitchApp::KBSwitchApp()
45 45
 #endif
46 46
 
47 47
   m_intf = new KBSwitchIntf(this, &m_kbconf);
48
-  QObject::connect(m_intf, SIGNAL(nextGroupSelected()), this, SLOT(slotSelectNextGroup()));
49
-  QObject::connect(m_intf, SIGNAL(groupSelected(int)), this, SLOT(slotGroupSelected(int)));
48
+  TQObject::connect(m_intf, SIGNAL(nextGroupSelected()), this, SLOT(slotSelectNextGroup()));
49
+  TQObject::connect(m_intf, SIGNAL(groupSelected(int)), this, SLOT(slotGroupSelected(int)));
50 50
 
51
-  QObject::connect(&m_xkb, SIGNAL(layoutChanged()), this, SLOT(reconfigure()));
52
-  QObject::connect(&m_xkb, SIGNAL(groupChanged(int)), this, SLOT(slotXkbGroupChanged(int)));
51
+  TQObject::connect(&m_xkb, SIGNAL(layoutChanged()), this, SLOT(reconfigure()));
52
+  TQObject::connect(&m_xkb, SIGNAL(groupChanged(int)), this, SLOT(slotXkbGroupChanged(int)));
53 53
 
54 54
   m_force_group_setting = false;
55 55
   int start_group = m_kbconf.default_groupno();
56 56
 
57 57
   m_trayicon = new KBSwitchTrayIcon(&m_kbconf);
58
-  QObject::connect(m_trayicon, SIGNAL(groupSelected(int)), this,
58
+  TQObject::connect(m_trayicon, SIGNAL(groupSelected(int)), this,
59 59
     SLOT(slotGroupSelected(int)));
60
-  QObject::connect(m_trayicon, SIGNAL(clicked()), this, SLOT(slotSelectNextGroup()));
61
-  QObject::connect(m_trayicon, SIGNAL(preferencesSelected()), this,
60
+  TQObject::connect(m_trayicon, SIGNAL(clicked()), this, SLOT(slotSelectNextGroup()));
61
+  TQObject::connect(m_trayicon, SIGNAL(preferencesSelected()), this,
62 62
     SLOT(slotPreferences()));
63 63
   
64 64
   if (start_group != m_xkb.getGroupNo()) {
@@ -144,10 +144,10 @@ void KBSwitchApp::slotSelectNextGroup()
144 144
 /** No descriptions */
145 145
 void KBSwitchApp::slotPreferences(){
146 146
   KBConfigDlg dlg(&m_kbconf);
147
-  QObject::connect(&dlg, SIGNAL(okClicked()), m_trayicon, SLOT(slotUpdateIcons()));
148
-  QObject::connect(&dlg, SIGNAL(applyClicked()), m_trayicon, SLOT(slotUpdateIcons()));
149
-  QObject::connect(&dlg, SIGNAL(okClicked()), this, SLOT(slotPrefChanged()));
150
-  QObject::connect(&dlg, SIGNAL(applyClicked()), this, SLOT(slotPrefChanged()));
147
+  TQObject::connect(&dlg, SIGNAL(okClicked()), m_trayicon, SLOT(slotUpdateIcons()));
148
+  TQObject::connect(&dlg, SIGNAL(applyClicked()), m_trayicon, SLOT(slotUpdateIcons()));
149
+  TQObject::connect(&dlg, SIGNAL(okClicked()), this, SLOT(slotPrefChanged()));
150
+  TQObject::connect(&dlg, SIGNAL(applyClicked()), this, SLOT(slotPrefChanged()));
151 151
   dlg.exec();
152 152
 }
153 153
 
@@ -179,7 +179,7 @@ void KBSwitchApp::slotXkbGroupChanged(int groupno){
179 179
 #ifdef HAVE_LIBXKLAVIER
180 180
   updateIcon(groupno);
181 181
 /*  XWindowAttributes attrs;
182
-  XGetWindowAttributes(qt_xdisplay(), qt_xrootwin(), &attrs);
182
+  XGetWindowAttributes(tqt_xdisplay(), tqt_xrootwin(), &attrs);
183 183
   kdDebug() << "root event mask is " << attrs.your_event_mask << endl;
184 184
   kdDebug() << "SubstructureNotifyMask is " <<
185 185
    ((attrs.your_event_mask & SubstructureNotifyMask) ? "ON" : "OFF") << endl;*/

+ 2
- 2
kkbswitch/kbswitchapp.h View File

@@ -29,7 +29,7 @@
29 29
   #include <kuniqueapp.h>
30 30
 #endif
31 31
 
32
-//#include <qmap.h>
32
+//#include <ntqmap.h>
33 33
 
34 34
 #include "kbgroup.h"
35 35
 #include "kbswitchtrayicon.h"
@@ -45,7 +45,7 @@ typedef struct _KBWinInfo {
45 45
   int next_groupno;
46 46
 } KBWinInfo;
47 47
 
48
-typedef QMap<WId, KBWinInfo> KBWindowMap;*/
48
+typedef TQMap<WId, KBWinInfo> KBWindowMap;*/
49 49
 
50 50
 /**
51 51
   *@author Leonid Zeitlin

+ 4
- 4
kkbswitch/kbswitchintf.cpp View File

@@ -18,8 +18,8 @@
18 18
 #include "kbswitchintf.h"
19 19
 //#include <kapp.h>
20 20
 
21
-KBSwitchIntf::KBSwitchIntf(QObject *parent, KBConfig *conf)
22
-  : QObject(parent, "KBSwitchIntf"), DCOPObject("KBSwitchIntf")
21
+KBSwitchIntf::KBSwitchIntf(TQObject *parent, KBConfig *conf)
22
+  : TQObject(parent, "KBSwitchIntf"), DCOPObject("KBSwitchIntf")
23 23
 {
24 24
   m_kbconf = conf;
25 25
 }
@@ -42,9 +42,9 @@ ASYNC KBSwitchIntf::selectGroup(int groupno)
42 42
   emit groupSelected(groupno);
43 43
 }
44 44
 
45
-QStringList KBSwitchIntf::getGroupNames()
45
+TQStringList KBSwitchIntf::getGroupNames()
46 46
 {
47
-  QStringList result;
47
+  TQStringList result;
48 48
   for (int i = 0; i < m_kbconf->groupCount(); i++)
49 49
     result.append(m_kbconf->getGroup(i)->getName());
50 50
   return result;

+ 5
- 5
kkbswitch/kbswitchintf.h View File

@@ -19,8 +19,8 @@
19 19
 #define KBSWITCHINTF_H
20 20
 
21 21
 #include <dcopobject.h>
22
-#include <qobject.h>
23
-#include <qstringlist.h>
22
+#include <ntqobject.h>
23
+#include <ntqstringlist.h>
24 24
 
25 25
 #include "kbconfig.h"
26 26
 
@@ -33,14 +33,14 @@
33 33
    separated the signals and k_dcop sections with the public section everything worked.
34 34
    Apparently, the k_dcop "keyword" confuses moc, which is only natural given that
35 35
    moc doesn't know about dcopidl! */
36
-class KBSwitchIntf : public QObject, public DCOPObject  {
36
+class KBSwitchIntf : public TQObject, public DCOPObject  {
37 37
   K_DCOP
38 38
   Q_OBJECT
39 39
 signals:
40 40
   void nextGroupSelected();	
41 41
   void groupSelected(int groupno);
42 42
 public:
43
-	KBSwitchIntf(QObject *parent, KBConfig *conf);
43
+	KBSwitchIntf(TQObject *parent, KBConfig *conf);
44 44
 	~KBSwitchIntf();
45 45
 private:
46 46
 	KBConfig *m_kbconf;
@@ -48,7 +48,7 @@ k_dcop:
48 48
   int getNumKbdGroups();
49 49
   ASYNC selectNextGroup();
50 50
   ASYNC selectGroup(int groupno);
51
-  QStringList getGroupNames();
51
+  TQStringList getGroupNames();
52 52
 };
53 53
 
54 54
 #endif

+ 7
- 7
kkbswitch/kbswitchintf_skel.cpp View File

@@ -15,7 +15,7 @@ static const char* const KBSwitchIntf_ftable[5][3] = {
15 15
     { "int", "getNumKbdGroups()", "getNumKbdGroups()" },
16 16
     { "ASYNC", "selectNextGroup()", "selectNextGroup()" },
17 17
     { "ASYNC", "selectGroup(int)", "selectGroup(int groupno)" },
18
-    { "QStringList", "getGroupNames()", "getGroupNames()" },
18
+    { "TQStringList", "getGroupNames()", "getGroupNames()" },
19 19
     { 0, 0, 0 }
20 20
 };
21 21
 static const int KBSwitchIntf_ftable_hiddens[4] = {
@@ -25,24 +25,24 @@ static const int KBSwitchIntf_ftable_hiddens[4] = {
25 25
     0,
26 26
 };
27 27
 
28
-bool KBSwitchIntf::process(const QCString &fun, const QByteArray &data, QCString& replyType, QByteArray &replyData)
28
+bool KBSwitchIntf::process(const TQCString &fun, const TQByteArray &data, TQCString& replyType, TQByteArray &replyData)
29 29
 {
30 30
     if ( fun == KBSwitchIntf_ftable[0][1] ) { // int getNumKbdGroups()
31 31
 	replyType = KBSwitchIntf_ftable[0][0]; 
32
-	QDataStream _replyStream( replyData, IO_WriteOnly );
32
+	TQDataStream _replyStream( replyData, IO_WriteOnly );
33 33
 	_replyStream << getNumKbdGroups( );
34 34
     } else if ( fun == KBSwitchIntf_ftable[1][1] ) { // void selectNextGroup()
35 35
 	replyType = KBSwitchIntf_ftable[1][0]; 
36 36
 	selectNextGroup( );
37 37
     } else if ( fun == KBSwitchIntf_ftable[2][1] ) { // void selectGroup(int)
38 38
 	int arg0;
39
-	QDataStream arg( data, IO_ReadOnly );
39
+	TQDataStream arg( data, IO_ReadOnly );
40 40
 	arg >> arg0;
41 41
 	replyType = KBSwitchIntf_ftable[2][0]; 
42 42
 	selectGroup(arg0 );
43
-    } else if ( fun == KBSwitchIntf_ftable[3][1] ) { // QStringList getGroupNames()
43
+    } else if ( fun == KBSwitchIntf_ftable[3][1] ) { // TQStringList getGroupNames()
44 44
 	replyType = KBSwitchIntf_ftable[3][0]; 
45
-	QDataStream _replyStream( replyData, IO_WriteOnly );
45
+	TQDataStream _replyStream( replyData, IO_WriteOnly );
46 46
 	_replyStream << getGroupNames( );
47 47
     } else {
48 48
 	return DCOPObject::process( fun, data, replyType, replyData );
@@ -63,7 +63,7 @@ QCStringList KBSwitchIntf::functions()
63 63
     for ( int i = 0; KBSwitchIntf_ftable[i][2]; i++ ) {
64 64
 	if (KBSwitchIntf_ftable_hiddens[i])
65 65
 	    continue;
66
-	QCString func = KBSwitchIntf_ftable[i][0];
66
+	TQCString func = KBSwitchIntf_ftable[i][0];
67 67
 	func += ' ';
68 68
 	func += KBSwitchIntf_ftable[i][2];
69 69
 	funcs << func;

+ 21
- 21
kkbswitch/kbswitchtrayicon.cpp View File

@@ -42,20 +42,20 @@
42 42
 #include <kiconloader.h>
43 43
 #include <kdebug.h>
44 44
 #include <kdeversion.h>
45
-#include <qtooltip.h>
46
-#include <qstyle.h>
47
-#include <qpainter.h>
45
+#include <ntqtooltip.h>
46
+#include <ntqstyle.h>
47
+#include <ntqpainter.h>
48 48
 
49 49
 #ifdef USE_BOLD_MENUITEM
50
-static QColor getActiveTextColor(KPopupMenu *menu)
50
+static TQColor getActiveTextColor(KPopupMenu *menu)
51 51
 {
52 52
 	int id = menu->insertItem("test text");
53
-	QMenuItem *item = menu->findItem(id);
54
-	QStyleOption styleopt = QStyleOption(item);
55
-	QPainter painter(menu);
56
-	QColorGroup &cg = menu->colorGroup();
57
-	KApplication::style().drawControl(QStyle::CE_PopupMenuItem, &painter, menu,
58
-	  menu->contentsRect(), cg, QStyle::Style_Enabled | QStyle::Style_Active,
53
+	TQMenuItem *item = menu->findItem(id);
54
+	TQStyleOption styleopt = TQStyleOption(item);
55
+	TQPainter painter(menu);
56
+	TQColorGroup &cg = menu->colorGroup();
57
+	KApplication::style().drawControl(TQStyle::CE_PopupMenuItem, &painter, menu,
58
+	  menu->contentsRect(), cg, TQStyle::Style_Enabled | TQStyle::Style_Active,
59 59
 	  styleopt);
60 60
 	menu->removeItem(id);
61 61
 	return painter.pen().color();  
@@ -63,7 +63,7 @@ static QColor getActiveTextColor(KPopupMenu *menu)
63 63
 #endif
64 64
 
65 65
 KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){
66
-  QPixmap pix;
66
+  TQPixmap pix;
67 67
 #if KDE_VERSION_MAJOR >= 3
68 68
   KActionCollection *actions = new KActionCollection(this);
69 69
   #define ACTION_PARENT actions
@@ -72,10 +72,10 @@ KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){
72 72
 #endif
73 73
 
74 74
   m_kbconf = conf;
75
-  //QObject::connect(conf, SIGNAL(changed()), this, SLOT(updateMenuIcons()));
75
+  //TQObject::connect(conf, SIGNAL(changed()), this, SLOT(updateMenuIcons()));
76 76
   KPopupMenu * menu = contextMenu();
77 77
   addLayoutItems(menu, false);
78
-  QObject::connect(menu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int)));
78
+  TQObject::connect(menu, SIGNAL(activated(int)), this, SLOT(slotMenuActivated(int)));
79 79
 
80 80
   menu->insertSeparator();
81 81
   KAction *pref = KStdAction::preferences(this, SIGNAL(preferencesSelected()), ACTION_PARENT);
@@ -85,11 +85,11 @@ KBSwitchTrayIcon::KBSwitchTrayIcon(KBConfig *conf){
85 85
   KAction *about = KStdAction::aboutApp(this, SLOT(slotAbout()), ACTION_PARENT);
86 86
   about->plug(menu);
87 87
 
88
-  /*QString path = locate("icon", "hicolor/16x16/apps/locale.png");
88
+  /*TQString path = locate("icon", "hicolor/16x16/apps/locale.png");
89 89
   if (!path.isEmpty()) pix.load(path);*/
90 90
   pix = kapp->iconLoader()->loadIcon("locale", KIcon::Small);
91 91
   menu->changeTitle(menu->idAt(0), pix, i18n("Keyboard Switch"));
92
-  setAlignment(Qt::AlignHCenter | Qt::AlignCenter);
92
+  setAlignment(TQt::AlignHCenter | TQt::AlignCenter);
93 93
 }
94 94
 
95 95
 KBSwitchTrayIcon::~KBSwitchTrayIcon(){
@@ -118,7 +118,7 @@ void KBSwitchTrayIcon::setToggleGroups(int group1, int group2){
118 118
   for (i = 0; i < m_kbconf->groupCount(); i++) {
119 119
     toggling = (i == group1 || i == group2);
120 120
 #ifdef USE_BOLD_MENUITEM
121
-		QMenuItem *item = menu->findItem(i);
121
+		TQMenuItem *item = menu->findItem(i);
122 122
 		BoldMenuItem *bolditem = dynamic_cast<BoldMenuItem*>(item->custom());
123 123
 		bolditem->setBold(toggling);
124 124
 #else
@@ -130,7 +130,7 @@ void KBSwitchTrayIcon::setToggleGroups(int group1, int group2){
130 130
 }
131 131
 
132 132
 /** No descriptions */
133
-void KBSwitchTrayIcon::mouseReleaseEvent(QMouseEvent *event){
133
+void KBSwitchTrayIcon::mouseReleaseEvent(TQMouseEvent *event){
134 134
   if (event->button() == LeftButton) {
135 135
     emit clicked();
136 136
   }
@@ -155,7 +155,7 @@ void KBSwitchTrayIcon::addLayoutItems(KPopupMenu *menu, bool clearOld) {
155 155
   KBGroup *group;
156 156
   int index;
157 157
 #ifdef USE_BOLD_MENUITEM
158
-  QColor active_text_color = getActiveTextColor(menu);
158
+  TQColor active_text_color = getActiveTextColor(menu);
159 159
 #endif  
160 160
 
161 161
   if (clearOld)
@@ -181,11 +181,11 @@ void KBSwitchTrayIcon::reconfigure(){
181 181
 
182 182
 /** Update the tray icon display for the given group */
183 183
 void KBSwitchTrayIcon::updateTrayIcon(int groupno){
184
-  const QPixmap& pix = m_kbconf->getGroup(groupno)->getPixmap();
184
+  const TQPixmap& pix = m_kbconf->getGroup(groupno)->getPixmap();
185 185
   setPixmap(pix);
186 186
   setActiveGroup(groupno);
187
-  QToolTip::remove(this);
188
-  QToolTip::add(this, m_kbconf->getGroup(groupno)->getName());
187
+  TQToolTip::remove(this);
188
+  TQToolTip::add(this, m_kbconf->getGroup(groupno)->getName());
189 189
 }
190 190
 
191 191
 /** Update menu and tray icons after configuration has changed */

+ 1
- 1
kkbswitch/kbswitchtrayicon.h View File

@@ -54,7 +54,7 @@ private: // Private attributes
54 54
   KBConfig *m_kbconf;
55 55
 protected: // Protected methods
56 56
   /** No descriptions */
57
-  void mouseReleaseEvent(QMouseEvent *event);
57
+  void mouseReleaseEvent(TQMouseEvent *event);
58 58
 public slots: // Public slots
59 59
   /** No descriptions */
60 60
   void slotAbout();

+ 2
- 2
kkbswitch/pathlistboxitem.cpp View File

@@ -17,8 +17,8 @@
17 17
 
18 18
 #include "pathlistboxitem.h"
19 19
 
20
-PathListBoxItem::PathListBoxItem(QListBox *listbox, const QPixmap &pix,
21
-  const QString &text, const QString &a_path) : QListBoxPixmap(listbox, pix, text),
20
+PathListBoxItem::PathListBoxItem(TQListBox *listbox, const TQPixmap &pix,
21
+  const TQString &text, const TQString &a_path) : TQListBoxPixmap(listbox, pix, text),
22 22
   path(a_path)
23 23
 {  
24 24
 }

+ 6
- 6
kkbswitch/pathlistboxitem.h View File

@@ -18,18 +18,18 @@
18 18
 #ifndef PATHLISTBOXITEM_H
19 19
 #define PATHLISTBOXITEM_H
20 20
 
21
-#include <qlistbox.h>
22
-#include <qstring.h>
21
+#include <ntqlistbox.h>
22
+#include <ntqstring.h>
23 23
 
24 24
 /**
25 25
   *@author Leonid Zeitlin
26 26
   */
27 27
 
28
-class PathListBoxItem : public QListBoxPixmap  {
28
+class PathListBoxItem : public TQListBoxPixmap  {
29 29
 public:
30
-  QString path;
31
-	PathListBoxItem(QListBox *listbox, const QPixmap &pix, const QString &text,
32
-	  const QString &a_path);
30
+  TQString path;
31
+	PathListBoxItem(TQListBox *listbox, const TQPixmap &pix, const TQString &text,
32
+	  const TQString &a_path);
33 33
 	~PathListBoxItem();
34 34
 };
35 35
 

+ 1
- 1
kkbswitch/singlewindowwatcher.cpp View File

@@ -23,7 +23,7 @@
23 23
 #include <kwinmodule.h>
24 24
 #include <kdebug.h>
25 25
 
26
-SingleWindowWatcher::SingleWindowWatcher(KBConfig *kbconf, QObject *parent, const char *name)
26
+SingleWindowWatcher::SingleWindowWatcher(KBConfig *kbconf, TQObject *parent, const char *name)
27 27
  : WindowWatcher(kbconf, parent, name)
28 28
 {
29 29
   reset();

+ 3
- 3
kkbswitch/singlewindowwatcher.h View File

@@ -21,7 +21,7 @@
21 21
 #define SINGLEWINDOWWATCHER_H
22 22
 
23 23
 #include "windowwatcher.h"
24
-#include <qmap.h>
24
+#include <ntqmap.h>
25 25
 
26 26
 /**
27 27
 Watches for changes of active window and keep a group per each window
@@ -35,7 +35,7 @@ private:
35 35
     int groupno;
36 36
     int next_groupno;
37 37
   };
38
-  typedef QMap<WId, KBWinInfo> KBWindowMap;
38
+  typedef TQMap<WId, KBWinInfo> KBWindowMap;
39 39
   KBWindowMap m_window_map;
40 40
   KBWindowMap::iterator m_active_window;      
41 41
   void addWindowToMap(WId window_id);
@@ -44,7 +44,7 @@ protected:
44 44
   virtual void windowRemoved(WId id);
45 45
   virtual void activeWindowChanged(WId id);
46 46
 public:
47
-  SingleWindowWatcher(KBConfig *kbconf, QObject *parent = 0, const char *name = 0);
47
+  SingleWindowWatcher(KBConfig *kbconf, TQObject *parent = 0, const char *name = 0);
48 48
   ~SingleWindowWatcher();
49 49
   virtual void changeGroup(int groupno, int next_groupno);
50 50
   virtual void reset();

+ 8
- 8
kkbswitch/windowclasswatcher.cpp View File

@@ -25,7 +25,7 @@
25 25
 
26 26
 #include <X11/Xutil.h>
27 27
 
28
-WindowClassWatcher::WindowClassWatcher(KBConfig *kbconf, QObject *parent, const char *name)
28
+WindowClassWatcher::WindowClassWatcher(KBConfig *kbconf, TQObject *parent, const char *name)
29 29
  : WindowWatcher(kbconf, parent, name)
30 30
 {
31 31
   reset();
@@ -35,12 +35,12 @@ WindowClassWatcher::~WindowClassWatcher()
35 35
 {
36 36
 }
37 37
 
38
-QString WindowClassWatcher::getWindowClass(WId id)
38
+TQString WindowClassWatcher::getWindowClass(WId id)
39 39
 {
40 40
   XClassHint hint;
41
-  QString ret = QString::null;
41
+  TQString ret = TQString::null;
42 42
   
43
-  if (XGetClassHint(qt_xdisplay(), id, &hint)) {
43
+  if (XGetClassHint(tqt_xdisplay(), id, &hint)) {
44 44
     ret = hint.res_class;
45 45
     XFree(hint.res_name);
46 46
     XFree(hint.res_class);
@@ -50,7 +50,7 @@ QString WindowClassWatcher::getWindowClass(WId id)
50 50
 
51 51
 void WindowClassWatcher::windowAdded(WId id)
52 52
 {
53
-  QString wclass = getWindowClass(id);
53
+  TQString wclass = getWindowClass(id);
54 54
   KBClassInfo &info = m_class_group_map[wclass];
55 55
   if (info.refcount == 0) {
56 56
     // new class
@@ -93,9 +93,9 @@ void WindowClassWatcher::reset()
93 93
   m_class_group_map.clear();
94 94
 
95 95
   // fill the map with existing windows  
96
-  const QValueList<WId> windows = m_kwin_module->windows();
97
-  const QValueList<WId>::ConstIterator end = windows.end();
98
-  for (QValueList<WId>::ConstIterator it = windows.begin(); it != end; ++it)
96
+  const TQValueList<WId> windows = m_kwin_module->windows();
97
+  const TQValueList<WId>::ConstIterator end = windows.end();
98
+  for (TQValueList<WId>::ConstIterator it = windows.begin(); it != end; ++it)
99 99
      windowAdded(*it);
100 100
   
101 101
   WId active_window = m_kwin_module->activeWindow();

+ 6
- 6
kkbswitch/windowclasswatcher.h View File

@@ -21,9 +21,9 @@
21 21
 #define WINDOWCLASSWATCHER_H
22 22
 
23 23
 #include "windowwatcher.h"
24
-#include <qmap.h>
24
+#include <ntqmap.h>
25 25
 
26
-class QString;
26
+class TQString;
27 27
 
28 28
 /**
29 29
 This class watcher for active window changes and keeps a group per window class
@@ -33,7 +33,7 @@ This class watcher for active window changes and keeps a group per window class
33 33
 class WindowClassWatcher : public WindowWatcher {
34 34
   Q_OBJECT
35 35
 private:
36
-  typedef QMap<WId, QString> WinClassMap;
36
+  typedef TQMap<WId, TQString> WinClassMap;
37 37
   WinClassMap m_win_class_map;
38 38
   struct KBClassInfo  {
39 39
     int groupno;
@@ -41,16 +41,16 @@ private:
41 41
     int refcount;   
42 42
     KBClassInfo() : refcount(0) {} 
43 43
   };
44
-  typedef QMap<QString, KBClassInfo> ClassGroupMap;
44
+  typedef TQMap<TQString, KBClassInfo> ClassGroupMap;
45 45
   ClassGroupMap m_class_group_map;
46 46
   ClassGroupMap::Iterator m_active_class;
47
-  QString getWindowClass(WId id);
47
+  TQString getWindowClass(WId id);
48 48
 protected:
49 49
   virtual void windowAdded(WId id);
50 50
   virtual void windowRemoved(WId id);
51 51
   virtual void activeWindowChanged(WId id);
52 52
 public:
53
-  WindowClassWatcher(KBConfig *kbconf, QObject *parent = 0, const char *name = 0);
53
+  WindowClassWatcher(KBConfig *kbconf, TQObject *parent = 0, const char *name = 0);
54 54
   ~WindowClassWatcher();
55 55
   virtual void changeGroup(int groupno, int next_groupno);
56 56
   virtual void reset();

+ 2
- 2
kkbswitch/windowwatcher.cpp View File

@@ -21,8 +21,8 @@
21 21
 
22 22
 #include <kwinmodule.h>
23 23
 
24
-WindowWatcher::WindowWatcher(KBConfig *kbconf, QObject *parent, const char *name)
25
- : QObject(parent, name)
24
+WindowWatcher::WindowWatcher(KBConfig *kbconf, TQObject *parent, const char *name)
25
+ : TQObject(parent, name)
26 26
 {
27 27
   m_kbconf = kbconf;
28 28
   m_kwin_module = new KWinModule(this);

+ 3
- 3
kkbswitch/windowwatcher.h View File

@@ -22,7 +22,7 @@
22 22
 #ifndef WINDOWWATCHER_H
23 23
 #define WINDOWWATCHER_H
24 24
 
25
-#include <qobject.h>
25
+#include <ntqobject.h>
26 26
 
27 27
 class KBConfig;
28 28
 class KWinModule;
@@ -32,7 +32,7 @@ class KWinModule;
32 32
 This class watches for active window changes and notifies KKBSwitch 
33 33
 that the keyboard group needs to be canged
34 34
 */
35
-class WindowWatcher : public QObject {
35
+class WindowWatcher : public TQObject {
36 36
   Q_OBJECT
37 37
 protected:
38 38
   KBConfig *m_kbconf;
@@ -42,7 +42,7 @@ protected slots:
42 42
   virtual void windowRemoved(WId id) = 0;
43 43
   virtual void activeWindowChanged(WId id) = 0;
44 44
 public:
45
-  WindowWatcher(KBConfig *kbconf, QObject *parent = 0, const char *name = 0);
45
+  WindowWatcher(KBConfig *kbconf, TQObject *parent = 0, const char *name = 0);
46 46
   ~WindowWatcher();
47 47
   virtual void changeGroup(int groupno, int next_groupno) = 0;
48 48
   virtual void reset() = 0;

+ 9
- 9
kkbswitch/xkeyboard.cpp View File

@@ -17,8 +17,8 @@
17 17
 
18 18
 #include "xkeyboard.h"
19 19
 
20
-#include <qwindowdefs.h>
21
-#include <qstringlist.h>
20
+#include <ntqwindowdefs.h>
21
+#include <ntqstringlist.h>
22 22
 
23 23
 #include <kdebug.h>
24 24
 #include <klocale.h>
@@ -27,7 +27,7 @@ XKeyboard *XKeyboard::m_self = 0;
27 27
 
28 28
 XKeyboard::XKeyboard()
29 29
 {
30
-  Display *display = qt_xdisplay();
30
+  Display *display = tqt_xdisplay();
31 31
 #ifdef HAVE_LIBXKLAVIER
32 32
 //  XklSetDebugLevel(0);
33 33
   XklSetLogAppender(XklLogAppender);
@@ -102,7 +102,7 @@ void XKeyboard::setGroupNo(int groupno){
102 102
 #ifdef HAVE_LIBXKLAVIER
103 103
   XklLockGroup(groupno);
104 104
 #else
105
-  XkbLockGroup(qt_xdisplay(), XkbUseCoreKbd, groupno);
105
+  XkbLockGroup(tqt_xdisplay(), XkbUseCoreKbd, groupno);
106 106
 #endif  
107 107
 }
108 108
 
@@ -115,7 +115,7 @@ extern "C" {
115 115
 #endif
116 116
 
117 117
 /** Get the names of the currently configured keyboard groups */
118
-void XKeyboard::getGroupNames(QStringList &list){
118
+void XKeyboard::getGroupNames(TQStringList &list){
119 119
 #ifdef HAVE_LIBXKLAVIER
120 120
   const char** groupnames = XklGetGroupNames();
121 121
   int numgroups = XklGetNumGroups();
@@ -123,7 +123,7 @@ void XKeyboard::getGroupNames(QStringList &list){
123 123
     list.append(groupnames[i]);
124 124
 #else
125 125
   XkbDescRec xkb;
126
-  Display *display = qt_xdisplay();
126
+  Display *display = tqt_xdisplay();
127 127
   char *names[XkbNumKbdGroups];
128 128
 
129 129
   memset(&xkb, 0, sizeof(xkb));
@@ -142,7 +142,7 @@ void XKeyboard::getGroupNames(QStringList &list){
142 142
       list.append(names[i]);
143 143
       XFree(names[i]);
144 144
     }
145
-    else list.append(QString::null);
145
+    else list.append(TQString::null);
146 146
   }
147 147
   XkbFreeNames(&xkb, XkbGroupNamesMask, 1);
148 148
 #endif  
@@ -159,7 +159,7 @@ int XKeyboard::getGroupNo(){
159 159
   return XklGetCurrentState()->group;
160 160
 #else
161 161
   XkbStateRec rec;
162
-  XkbGetState(qt_xdisplay(), XkbUseCoreKbd, &rec);
162
+  XkbGetState(tqt_xdisplay(), XkbUseCoreKbd, &rec);
163 163
   return (int) rec.group;
164 164
 #endif  
165 165
 }
@@ -191,7 +191,7 @@ void XKeyboard::retrieveNumKbdGroups(){
191 191
   it returns BadImplementation status code, and you have to specify
192 192
   xkb.device_spec = XkbUseCoreKbd. */
193 193
   xkb.device_spec = XkbUseCoreKbd;
194
-  XkbGetControls(qt_xdisplay(), XkbGroupsWrapMask, &xkb);
194
+  XkbGetControls(tqt_xdisplay(), XkbGroupsWrapMask, &xkb);
195 195
   m_numgroups = xkb.ctrls->num_groups;
196 196
   XkbFreeControls(&xkb, XkbGroupsWrapMask, 1);
197 197
 }

+ 4
- 4
kkbswitch/xkeyboard.h View File

@@ -20,7 +20,7 @@
20 20
 
21 21
 #include "config.h"
22 22
 
23
-#include <qobject.h>
23
+#include <ntqobject.h>
24 24
 
25 25
 #include <X11/Xlib.h>
26 26
 #include <X11/XKBlib.h>
@@ -29,13 +29,13 @@
29 29
   #include <libxklavier/xklavier.h>
30 30
 #endif
31 31
 
32
-class QStringList;
32
+class TQStringList;
33 33
 
34 34
 /**This class incapsulates XKeyboard Extension interface
35 35
   *@author Leonid Zeitlin
36 36
   */
37 37
   
38
-class XKeyboard : public QObject {
38
+class XKeyboard : public TQObject {
39 39
   Q_OBJECT
40 40
 private:
41 41
 #ifndef HAVE_LIBXKLAVIER
@@ -51,7 +51,7 @@ public:
51 51
   /** Set the current keyboard group to the given groupno */
52 52
   void setGroupNo(int groupno);
53 53
   /** Get the names of the currently configured keyboard groups */
54
-  void getGroupNames(QStringList &list);
54
+  void getGroupNames(TQStringList &list);
55 55
   static XKeyboard* self();
56 56
   /** return the current keyboard group index */
57 57
   int getGroupNo();

Loading…
Cancel
Save