From 7665c8d3f798aaf287ff14a35af74d9c303cb20c Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 22 Jul 2023 23:33:11 +0900 Subject: [PATCH] Raw Qt->TQt conversion using tde/scripts/conversions/qt3-tqt3/convert_existing_qt3_app_to_tq Signed-off-by: Michele Calgaro --- acinclude.m4 | 46 ++++----- admin/Doxyfile.global | 2 +- admin/acinclude.m4.in | 46 ++++----- admin/am_edit | 2 +- configure | 54 +++++------ debian/control | 2 +- debian/patches/98_buildprep.diff | 160 +++++++++++++++---------------- debian/rules | 4 +- doc/en/index.docbook | 12 +-- src/Makefile.in | 2 +- src/commandobutton.cpp | 14 +-- src/commandobutton.h | 14 +-- src/configdialog.ui | 140 +++++++++++++-------------- src/configdialogimpl.cpp | 90 ++++++++--------- src/configdialogimpl.h | 24 ++--- src/configuration.cpp | 136 +++++++++++++------------- src/configuration.h | 54 +++++------ src/kcmkommando.cpp | 10 +- src/kcmkommando.h | 4 +- src/kommando.cpp | 70 +++++++------- src/kommando.h | 26 ++--- src/kommandod.cpp | 10 +- src/kommandod.h | 2 +- src/kommandoview.cpp | 18 ++-- src/kommandoview.h | 22 ++--- src/menu.cpp | 18 ++-- src/menu.h | 30 +++--- src/menulistviewitem.cpp | 10 +- src/menulistviewitem.h | 14 +-- src/roundbutton.cpp | 28 +++--- src/roundbutton.h | 22 ++--- src/servicemenu.cpp | 50 +++++----- src/servicemenu.h | 20 ++-- 33 files changed, 578 insertions(+), 578 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index f8b9570..4240746 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1054,7 +1054,7 @@ elif test "$kde_use_qt_emb" = "yes"; then x_includes="" x_libraries="" elif test "$kde_use_qt_mac" = "yes"; then - dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to + dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to dnl be included to get the information) --Sam CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" @@ -1086,19 +1086,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM], AC_REQUIRE([KDE_USE_QT]) cat > conftest.$ac_ext < -#include +#include +#include EOF if test "$kde_qtver" = "2"; then cat >> conftest.$ac_ext < -#include -#include +#include +#include +#include EOF if test $kde_qtsubver -gt 0; then cat >> conftest.$ac_ext <> conftest.$ac_ext < -#include +#include +#include #include EOF fi @@ -1195,22 +1195,22 @@ fi if test -z "$3"; then if test $kde_qtver = 3; then if test $kde_qtsubver -gt 0; then - kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000" + kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000" qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` else - kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" + kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000" fi fi if test $kde_qtver = 2; then if test $kde_qtsubver -gt 0; then - kde_qt_verstring="QT_VERSION >= 222" + kde_qt_verstring="TQT_VERSION >= 222" else - kde_qt_verstring="QT_VERSION >= 200" + kde_qt_verstring="TQT_VERSION >= 200" fi fi if test $kde_qtver = 1; then - kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" + kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200" fi else kde_qt_verstring="$3" @@ -1316,7 +1316,7 @@ AC_ARG_ENABLE( USING_QT_MT="" dnl ------------------------------------------------------------------------ -dnl If we not get --disable-qt-mt then adjust some vars for the host. +dnl If we not get --disable-tqt-mt then adjust some vars for the host. dnl ------------------------------------------------------------------------ KDE_MT_LDFLAGS= @@ -1379,7 +1379,7 @@ dnl ------------------------------------------------------------ fi dnl ------------------------------------------------------------------------ -dnl If we got --enable-qt-mt then adjust the Qt library name for the host. +dnl If we got --enable-tqt-mt then adjust the Qt library name for the host. dnl ------------------------------------------------------------------------ if test "x$kde_use_qt_mt" = "xyes"; then @@ -1450,9 +1450,9 @@ if test ! "$ac_qt_includes" = "NO"; then fi if test "$kde_qtver" != "1"; then - kde_qt_header=qstyle.h + kde_qt_header=ntqstyle.h else - kde_qt_header=qglobal.h + kde_qt_header=ntqglobal.h fi AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) @@ -2035,7 +2035,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon, LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" AC_TRY_LINK([ - #include + #include ], [ QDomDocument doc; @@ -2596,7 +2596,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"` ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" AC_TRY_LINK( -[#include ], +[#include ], [ int argc; char** argv; @@ -4467,7 +4467,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" AC_TRY_RUN(dnl [ #include -#include +#include int main() { QString t = "hallo"; t.fill('t'); @@ -5313,7 +5313,7 @@ if test "${with_qt_dir+set}" = set; then kde_qtdir="$with_qt_dir" fi -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) +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) AC_MSG_RESULT($QTDOCDIR) AC_SUBST(QTDOCDIR) @@ -5334,7 +5334,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME) AC_SUBST(DOXYGEN_PROJECT_NUMBER) KDE_HAS_DOXYGEN=no -if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then +if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then KDE_HAS_DOXYGEN=yes fi AC_SUBST(KDE_HAS_DOXYGEN) diff --git a/admin/Doxyfile.global b/admin/Doxyfile.global index be61379..76ed646 100644 --- a/admin/Doxyfile.global +++ b/admin/Doxyfile.global @@ -928,7 +928,7 @@ INCLUDE_FILE_PATTERNS = # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. -PREDEFINED = QT_VERSION=320 \ +PREDEFINED = TQT_VERSION=320 \ __cplusplus \ Q_WS_X11 diff --git a/admin/acinclude.m4.in b/admin/acinclude.m4.in index fec382a..480aa1e 100644 --- a/admin/acinclude.m4.in +++ b/admin/acinclude.m4.in @@ -1054,7 +1054,7 @@ elif test "$kde_use_qt_emb" = "yes"; then x_includes="" x_libraries="" elif test "$kde_use_qt_mac" = "yes"; then - dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to + dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to dnl be included to get the information) --Sam CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" @@ -1086,19 +1086,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM], AC_REQUIRE([KDE_USE_QT]) cat > conftest.$ac_ext < -#include +#include +#include EOF if test "$kde_qtver" = "2"; then cat >> conftest.$ac_ext < -#include -#include +#include +#include +#include EOF if test $kde_qtsubver -gt 0; then cat >> conftest.$ac_ext <> conftest.$ac_ext < -#include +#include +#include #include EOF fi @@ -1195,22 +1195,22 @@ fi if test -z "$3"; then if test $kde_qtver = 3; then if test $kde_qtsubver -gt 0; then - kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000" + kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000" qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` else - kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" + kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000" fi fi if test $kde_qtver = 2; then if test $kde_qtsubver -gt 0; then - kde_qt_verstring="QT_VERSION >= 222" + kde_qt_verstring="TQT_VERSION >= 222" else - kde_qt_verstring="QT_VERSION >= 200" + kde_qt_verstring="TQT_VERSION >= 200" fi fi if test $kde_qtver = 1; then - kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" + kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200" fi else kde_qt_verstring="$3" @@ -1316,7 +1316,7 @@ AC_ARG_ENABLE( USING_QT_MT="" dnl ------------------------------------------------------------------------ -dnl If we not get --disable-qt-mt then adjust some vars for the host. +dnl If we not get --disable-tqt-mt then adjust some vars for the host. dnl ------------------------------------------------------------------------ KDE_MT_LDFLAGS= @@ -1379,7 +1379,7 @@ dnl ------------------------------------------------------------ fi dnl ------------------------------------------------------------------------ -dnl If we got --enable-qt-mt then adjust the Qt library name for the host. +dnl If we got --enable-tqt-mt then adjust the Qt library name for the host. dnl ------------------------------------------------------------------------ if test "x$kde_use_qt_mt" = "xyes"; then @@ -1450,9 +1450,9 @@ if test ! "$ac_qt_includes" = "NO"; then fi if test "$kde_qtver" != "1"; then - kde_qt_header=qstyle.h + kde_qt_header=ntqstyle.h else - kde_qt_header=qglobal.h + kde_qt_header=ntqglobal.h fi AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) @@ -2035,7 +2035,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon, LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" AC_TRY_LINK([ - #include + #include ], [ QDomDocument doc; @@ -2596,7 +2596,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"` ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" AC_TRY_LINK( -[#include ], +[#include ], [ int argc; char** argv; @@ -4467,7 +4467,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes" AC_TRY_RUN(dnl [ #include -#include +#include int main() { QString t = "hallo"; t.fill('t'); @@ -5313,7 +5313,7 @@ if test "${with_qt_dir+set}" = set; then kde_qtdir="$with_qt_dir" fi -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) +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) AC_MSG_RESULT($QTDOCDIR) AC_SUBST(QTDOCDIR) @@ -5334,7 +5334,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME) AC_SUBST(DOXYGEN_PROJECT_NUMBER) KDE_HAS_DOXYGEN=no -if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then +if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then KDE_HAS_DOXYGEN=yes fi AC_SUBST(KDE_HAS_DOXYGEN) diff --git a/admin/am_edit b/admin/am_edit index 9a8b690..d705822 100644 --- a/admin/am_edit +++ b/admin/am_edit @@ -1378,7 +1378,7 @@ sub tag_UIFILES () $dep_lines .= "$source.h: $sourcedir$source.ui\n"; $dep_lines .= "\trm -rf $source.h;\n"; if (!$kdeopts{"qtonly"}) { - $dep_lines .= "\t\$(UIC) $sourcedir$source.ui | \$(PERL) -pi -e \"s,public QWizard,public KWizard,g; s,#include ,#include ,g\" >> $source.h ;\n"; + $dep_lines .= "\t\$(UIC) $sourcedir$source.ui | \$(PERL) -pi -e \"s,public QWizard,public KWizard,g; s,#include ,#include ,g\" >> $source.h ;\n"; } else { $dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n"; } diff --git a/configure b/configure index d4f9d38..fce26c5 100755 --- a/configure +++ b/configure @@ -689,7 +689,7 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -1265,7 +1265,7 @@ do do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) @@ -21870,22 +21870,22 @@ fi if test -z ""; then if test $kde_qtver = 3; then if test $kde_qtsubver -gt 0; then - kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000" + kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000" qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` else - kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" + kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000" fi fi if test $kde_qtver = 2; then if test $kde_qtsubver -gt 0; then - kde_qt_verstring="QT_VERSION >= 222" + kde_qt_verstring="TQT_VERSION >= 222" else - kde_qt_verstring="QT_VERSION >= 200" + kde_qt_verstring="TQT_VERSION >= 200" fi fi if test $kde_qtver = 1; then - kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" + kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200" fi else kde_qt_verstring="" @@ -29616,9 +29616,9 @@ if test ! "$ac_qt_includes" = "NO"; then fi if test "$kde_qtver" != "1"; then - kde_qt_header=qstyle.h + kde_qt_header=ntqstyle.h else - kde_qt_header=qglobal.h + kde_qt_header=ntqglobal.h fi @@ -29687,19 +29687,19 @@ LIBS="$LIBS $LIBQT $KDE_MT_LIBS" cat > conftest.$ac_ext < -#include +#include +#include EOF if test "$kde_qtver" = "2"; then cat >> conftest.$ac_ext < -#include -#include +#include +#include +#include EOF if test $kde_qtsubver -gt 0; then cat >> conftest.$ac_ext <> conftest.$ac_ext < -#include +#include +#include #include EOF fi @@ -29856,19 +29856,19 @@ export LIBRARY_PATH cat > conftest.$ac_ext < -#include +#include +#include EOF if test "$kde_qtver" = "2"; then cat >> conftest.$ac_ext < -#include -#include +#include +#include +#include EOF if test $kde_qtsubver -gt 0; then cat >> conftest.$ac_ext <> conftest.$ac_ext < -#include +#include +#include #include EOF fi @@ -30283,7 +30283,7 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include int main () { @@ -33041,7 +33041,7 @@ Try \`$0 --help' for more information." >&2;} $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; diff --git a/debian/control b/debian/control index d440ba2..39cf965 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: kommando Section: kde Priority: optional Maintainer: Sune Vuorela -Build-Depends: debhelper (>= 5.0.0), kdelibs4-dev, autotools-dev, quilt +Build-Depends: debhelper (>= 5.0.0), kdelibs4-dev, autotools-dev, tquilt Standards-Version: 3.7.2 Package: kommando diff --git a/debian/patches/98_buildprep.diff b/debian/patches/98_buildprep.diff index d830e06..36c85a0 100644 --- a/debian/patches/98_buildprep.diff +++ b/debian/patches/98_buildprep.diff @@ -5147,7 +5147,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + @@ -5665,7 +5665,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) @@ -26303,22 +26303,22 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca +if test -z ""; then + if test $kde_qtver = 3; then + if test $kde_qtsubver -gt 0; then -+ kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000" ++ kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000" + qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` + kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` + else -+ kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" ++ kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000" + fi + fi + if test $kde_qtver = 2; then + if test $kde_qtsubver -gt 0; then -+ kde_qt_verstring="QT_VERSION >= 222" ++ kde_qt_verstring="TQT_VERSION >= 222" + else -+ kde_qt_verstring="QT_VERSION >= 200" ++ kde_qt_verstring="TQT_VERSION >= 200" + fi + fi + if test $kde_qtver = 1; then -+ kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" ++ kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200" + fi +else + kde_qt_verstring="" @@ -33769,9 +33769,9 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca +fi + +if test "$kde_qtver" != "1"; then -+ kde_qt_header=qstyle.h ++ kde_qt_header=ntqstyle.h +else -+ kde_qt_header=qglobal.h ++ kde_qt_header=ntqglobal.h +fi + + @@ -33839,19 +33839,19 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca + +cat > conftest.$ac_ext < -+#include ++#include ++#include +EOF +if test "$kde_qtver" = "2"; then +cat >> conftest.$ac_ext < -+#include -+#include ++#include ++#include ++#include +EOF + +if test $kde_qtsubver -gt 0; then +cat >> conftest.$ac_ext <> conftest.$ac_ext < -+#include ++#include ++#include +#include +EOF +fi @@ -34007,19 +34007,19 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca + +cat > conftest.$ac_ext < -+#include ++#include ++#include +EOF +if test "$kde_qtver" = "2"; then +cat >> conftest.$ac_ext < -+#include -+#include ++#include ++#include ++#include +EOF + +if test $kde_qtsubver -gt 0; then +cat >> conftest.$ac_ext <> conftest.$ac_ext < -+#include ++#include ++#include +#include +EOF +fi @@ -34433,7 +34433,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -+#include ++#include +int +main () +{ @@ -37217,7 +37217,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + @@ -39595,7 +39595,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + @@ -40113,7 +40113,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) @@ -60751,22 +60751,22 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca +if test -z ""; then + if test $kde_qtver = 3; then + if test $kde_qtsubver -gt 0; then -+ kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000" ++ kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000" + qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` + kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` + else -+ kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" ++ kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000" + fi + fi + if test $kde_qtver = 2; then + if test $kde_qtsubver -gt 0; then -+ kde_qt_verstring="QT_VERSION >= 222" ++ kde_qt_verstring="TQT_VERSION >= 222" + else -+ kde_qt_verstring="QT_VERSION >= 200" ++ kde_qt_verstring="TQT_VERSION >= 200" + fi + fi + if test $kde_qtver = 1; then -+ kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" ++ kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200" + fi +else + kde_qt_verstring="" @@ -68217,9 +68217,9 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca +fi + +if test "$kde_qtver" != "1"; then -+ kde_qt_header=qstyle.h ++ kde_qt_header=ntqstyle.h +else -+ kde_qt_header=qglobal.h ++ kde_qt_header=ntqglobal.h +fi + + @@ -68287,19 +68287,19 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca + +cat > conftest.$ac_ext < -+#include ++#include ++#include +EOF +if test "$kde_qtver" = "2"; then +cat >> conftest.$ac_ext < -+#include -+#include ++#include ++#include ++#include +EOF + +if test $kde_qtsubver -gt 0; then +cat >> conftest.$ac_ext <> conftest.$ac_ext < -+#include ++#include ++#include +#include +EOF +fi @@ -68455,19 +68455,19 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca + +cat > conftest.$ac_ext < -+#include ++#include ++#include +EOF +if test "$kde_qtver" = "2"; then +cat >> conftest.$ac_ext < -+#include -+#include ++#include ++#include ++#include +EOF + +if test $kde_qtsubver -gt 0; then +cat >> conftest.$ac_ext <> conftest.$ac_ext < -+#include ++#include ++#include +#include +EOF +fi @@ -68881,7 +68881,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -+#include ++#include +int +main () +{ @@ -71665,7 +71665,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; -+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \ ++ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + @@ -74656,7 +74656,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca + x_includes="" + x_libraries="" +elif test "$kde_use_qt_mac" = "yes"; then -+ dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to ++ dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to + dnl be included to get the information) --Sam + CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" + CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" @@ -74686,19 +74686,19 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca +AC_REQUIRE([KDE_USE_QT]) +cat > conftest.$ac_ext < -+#include ++#include ++#include +EOF +if test "$kde_qtver" = "2"; then +cat >> conftest.$ac_ext < -+#include -+#include ++#include ++#include ++#include +EOF + +if test $kde_qtsubver -gt 0; then +cat >> conftest.$ac_ext <> conftest.$ac_ext < -+#include ++#include ++#include +#include +EOF +fi @@ -74793,22 +74793,22 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca +if test -z "$3"; then + if test $kde_qtver = 3; then + if test $kde_qtsubver -gt 0; then -+ kde_qt_verstring="QT_VERSION >= 0x03@VER@00 && QT_VERSION < 0x040000" ++ kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000" + qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` + kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` + else -+ kde_qt_verstring="QT_VERSION >= 300 && QT_VERSION < 0x040000" ++ kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000" + fi + fi + if test $kde_qtver = 2; then + if test $kde_qtsubver -gt 0; then -+ kde_qt_verstring="QT_VERSION >= 222" ++ kde_qt_verstring="TQT_VERSION >= 222" + else -+ kde_qt_verstring="QT_VERSION >= 200" ++ kde_qt_verstring="TQT_VERSION >= 200" + fi + fi + if test $kde_qtver = 1; then -+ kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" ++ kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200" + fi +else + kde_qt_verstring="$3" @@ -74904,7 +74904,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca +USING_QT_MT="" + +dnl ------------------------------------------------------------------------ -+dnl If we not get --disable-qt-mt then adjust some vars for the host. ++dnl If we not get --disable-tqt-mt then adjust some vars for the host. +dnl ------------------------------------------------------------------------ + +KDE_MT_LDFLAGS= @@ -74967,7 +74967,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca +fi + +dnl ------------------------------------------------------------------------ -+dnl If we got --enable-qt-mt then adjust the Qt library name for the host. ++dnl If we got --enable-tqt-mt then adjust the Qt library name for the host. +dnl ------------------------------------------------------------------------ + +if test "x$kde_use_qt_mt" = "xyes"; then @@ -75038,9 +75038,9 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca +fi + +if test "$kde_qtver" != "1"; then -+ kde_qt_header=qstyle.h ++ kde_qt_header=ntqstyle.h +else -+ kde_qt_header=qglobal.h ++ kde_qt_header=ntqglobal.h +fi + +AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) @@ -75595,7 +75595,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca + LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" + + AC_TRY_LINK([ -+ #include ++ #include + ], + [ + QDomDocument doc; @@ -76108,7 +76108,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca +ac_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" +AC_TRY_LINK( -+[#include ], ++[#include ], + [ + int argc; + char** argv; @@ -77829,7 +77829,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca +AC_TRY_RUN(dnl +[ +#include -+#include ++#include +int main() { + QString t = "hallo"; + t.fill('t'); @@ -78532,7 +78532,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca + kde_qtdir="$with_qt_dir" +fi + -+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) ++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) +AC_MSG_RESULT($QTDOCDIR) + +AC_SUBST(QTDOCDIR) @@ -78553,7 +78553,7 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca +AC_SUBST(DOXYGEN_PROJECT_NUMBER) + +KDE_HAS_DOXYGEN=no -+if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then ++if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then + KDE_HAS_DOXYGEN=yes +fi +AC_SUBST(KDE_HAS_DOXYGEN) @@ -94654,7 +94654,7 @@ diff -urN kommando-0.5.1.orig/configure kommando-0.5.1/configure + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -741,24 +1349,20 @@ @@ -95164,7 +95164,7 @@ diff -urN kommando-0.5.1.orig/configure kommando-0.5.1/configure for ac_pass in 1 2 do @@ -1268,7 +1818,7 @@ - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) @@ -125047,7 +125047,7 @@ diff -urN kommando-0.5.1.orig/configure kommando-0.5.1/configure + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; diff --git a/debian/rules b/debian/rules index 416a6d5..dfbb638 100755 --- a/debian/rules +++ b/debian/rules @@ -27,7 +27,7 @@ endif config.status: configure dh_testdir - $(MAKE) -f /usr/share/quilt/quilt.make patch + $(MAKE) -f /usr/share/tquilt/tquilt.make patch sleep 1 # aclocal.m4 and acinclude.m4 have too recent timestamps in the @@ -62,7 +62,7 @@ clean: # Add here commands to clean up after the build process. -$(MAKE) distclean - $(MAKE) -f /usr/share/quilt/quilt.make unpatch + $(MAKE) -f /usr/share/tquilt/tquilt.make unpatch rm -f config.sub config.guess dh_clean diff --git a/doc/en/index.docbook b/doc/en/index.docbook index 225591b..751d8ea 100644 --- a/doc/en/index.docbook +++ b/doc/en/index.docbook @@ -158,17 +158,17 @@ patent issues. --> It slices! It dices! and it comes with a free toaster! -The Squiggle Tool +The Stquiggle Tool - + - + - Squiggle + Stquiggle - is used to draw squiggly lines all over + is used to draw stquiggly lines all over the &kommando; main window. It's not a bug, it's a feature! @@ -441,7 +441,7 @@ Program copyright 2005 Daniel Stöckel the_docter@gmx.net Contributors: -Konqui the KDE Dragon konqui@kde.org +Kontqui the KDE Dragon konqui@kde.org Tux the Linux Penguin tux@linux.org diff --git a/src/Makefile.in b/src/Makefile.in index bee4385..09cf2ae 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1051,6 +1051,6 @@ configdialog.cpp: $(srcdir)/configdialog.ui configdialog.h configdialog.moc configdialog.h: $(srcdir)/configdialog.ui rm -rf configdialog.h; - $(UIC) $(srcdir)/configdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> configdialog.h ; + $(UIC) $(srcdir)/configdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> configdialog.h ; configdialog.moc: configdialog.h $(MOC) configdialog.h -o configdialog.moc diff --git a/src/commandobutton.cpp b/src/commandobutton.cpp index 37930fc..61faa86 100644 --- a/src/commandobutton.cpp +++ b/src/commandobutton.cpp @@ -24,7 +24,7 @@ /* * Implementation CommandoButton */ -CommandoButton::CommandoButton(QWidget* parent, unsigned short rad) +CommandoButton::CommandoButton(TQWidget* parent, unsigned short rad) : RoundButton(parent,rad) { } @@ -44,23 +44,23 @@ Menu * SubmenuButton::execute( ) return subMenu(); } -SubmenuButton::SubmenuButton( QWidget * parent,unsigned short rad) +SubmenuButton::SubmenuButton( TQWidget * parent,unsigned short rad) :RoundButton(parent,rad) { } -SubmenuButton::SubmenuButton( QWidget * parent, Menu * submenu, unsigned short rad) +SubmenuButton::SubmenuButton( TQWidget * parent, Menu * submenu, unsigned short rad) :RoundButton(parent,rad),mSubMenu(submenu) { } -/*void SubmenuButton::setIcon( QString path ) +/*void SubmenuButton::setIcon( TQString path ) { mIconPath=path; icon=MainBarIcon(path,radius*2); //This line sometimes prints: "*** attempt to put segment in horiz list twice" - QPixmap overlay = MainBarIcon("kommando_overlay",radius*2); - QImage temp1(icon.convertToImage()); - QImage temp2(overlay.convertToImage()); + TQPixmap overlay = MainBarIcon("kommando_overlay",radius*2); + TQImage temp1(icon.convertToImage()); + TQImage temp2(overlay.convertToImage()); KIconEffect::overlay(temp1,temp2); icon.convertFromImage(temp1); setPixmap(icon); diff --git a/src/commandobutton.h b/src/commandobutton.h index bbb169f..0c03ba5 100644 --- a/src/commandobutton.h +++ b/src/commandobutton.h @@ -27,28 +27,28 @@ class CommandoButton : public RoundButton { Q_OBJECT public: - CommandoButton(QWidget* parent,unsigned short rad= 32); + CommandoButton(TQWidget* parent,unsigned short rad= 32); - virtual void setCommand(QString com){ mCommando=com; } - virtual QString command(){ return mCommando; } + virtual void setCommand(TQString com){ mCommando=com; } + virtual TQString command(){ return mCommando; } virtual Menu* execute(); virtual Type type() const { return RoundButton::Commando; } protected: - QString mCommando; + TQString mCommando; }; class SubmenuButton : public RoundButton { Q_OBJECT public: - SubmenuButton(QWidget* parent, unsigned short rad= 32); - SubmenuButton(QWidget* parent, Menu* submenu, unsigned short rad= 32); + SubmenuButton(TQWidget* parent, unsigned short rad= 32); + SubmenuButton(TQWidget* parent, Menu* submenu, unsigned short rad= 32); virtual void setSubMenu(Menu* theValue){ mSubMenu = theValue; } virtual Menu* subMenu() const{ return mSubMenu; } - //virtual void setIcon(QString path); + //virtual void setIcon(TQString path); virtual Menu* execute(); virtual Type type() const { return RoundButton::Submenu; } protected: diff --git a/src/configdialog.ui b/src/configdialog.ui index 1b68bbc..ca8889d 100644 --- a/src/configdialog.ui +++ b/src/configdialog.ui @@ -1,6 +1,6 @@ ConfigDialog - + ConfigDialog @@ -19,23 +19,23 @@ unnamed - + splitter12 Horizontal - + listBox - + pages - + menuPage @@ -49,7 +49,7 @@ 0 - + MenuFrame @@ -63,7 +63,7 @@ unnamed - + layout8 @@ -74,7 +74,7 @@ 0 - + textLabel1 @@ -82,7 +82,7 @@ Command: - + commandoEdit @@ -92,7 +92,7 @@ - + removeListView @@ -100,12 +100,12 @@ Remove - + menuViewComboBox - + newListView @@ -113,7 +113,7 @@ Ne&w - + layout11 @@ -121,7 +121,7 @@ unnamed - + addMenu @@ -129,7 +129,7 @@ Add Menu - + addButton @@ -137,7 +137,7 @@ Add &Button - + addService @@ -145,7 +145,7 @@ &From KMenu - + remove @@ -173,7 +173,7 @@ - + buttonUp @@ -181,7 +181,7 @@ &Up - + buttonDown @@ -206,7 +206,7 @@ - + layout7 @@ -231,7 +231,7 @@ - + layout6 @@ -239,7 +239,7 @@ unnamed - + textLabel2 @@ -310,7 +310,7 @@ - + lists @@ -320,7 +320,7 @@ 0 - + WStackPage @@ -333,7 +333,7 @@ - + shortcutPage @@ -347,7 +347,7 @@ 0 - + shortcutFrame @@ -369,7 +369,7 @@ N&one - + textLabel1_2 @@ -432,7 +432,7 @@ - + colorPage @@ -446,7 +446,7 @@ 0 - + colorFrame @@ -460,7 +460,7 @@ unnamed - + layout10 @@ -468,7 +468,7 @@ unnamed - + textLabel1_3 @@ -510,7 +510,7 @@ - + layout11 @@ -518,7 +518,7 @@ unnamed - + textLabel2_2 @@ -526,7 +526,7 @@ Opacity: - + textLabel1_4 @@ -539,7 +539,7 @@ <font size="-1">Transparent</font> - + opacitySlider @@ -553,7 +553,7 @@ Horizontal - + textLabel1_4_2 @@ -582,7 +582,7 @@ Horizontal - + layout12 @@ -590,7 +590,7 @@ unnamed - + textLabel1_7 @@ -598,7 +598,7 @@ Scheme: - + Tiny @@ -642,7 +642,7 @@ - + layout14 @@ -667,7 +667,7 @@ - + menuRadiusSpinbox @@ -681,7 +681,7 @@ 30 - + 16 @@ -722,7 +722,7 @@ 2 - + textLabel1_5 @@ -730,7 +730,7 @@ Menu Radius: - + customCheckbox @@ -744,7 +744,7 @@ Alt+T - + textLabel1_8 @@ -752,7 +752,7 @@ px - + textLabel2_3 @@ -760,7 +760,7 @@ Menubutton size: - + 16 @@ -818,7 +818,7 @@ - + textLabel1_6 @@ -870,15 +870,15 @@ navButtonSize - activated(const QString&) + activated(const TQString&) ConfigDialog - slotNavButtonSizeChanged(const QString&) + slotNavButtonSizeChanged(const TQString&) kColorButton1 - changed(const QColor&) + changed(const TQColor&) ConfigDialog - slotColorButtonClicked(const QColor&) + slotColorButtonClicked(const TQColor&) addButton @@ -900,27 +900,27 @@ listBox - clicked(QListBoxItem*) + clicked(TQListBoxItem*) ConfigDialog - slotListBoxClicked(QListBoxItem*) + slotListBoxClicked(TQListBoxItem*) iconButton - iconChanged(QString) + iconChanged(TQString) ConfigDialog slotNewIcon() commandoEdit - textChanged(const QString&) + textChanged(const TQString&) ConfigDialog - slotCommandoTyped(const QString&) + slotCommandoTyped(const TQString&) schemeCombobox - activated(const QString&) + activated(const TQString&) ConfigDialog - slotSchemeComboboxChanged(const QString&) + slotSchemeComboboxChanged(const TQString&) customCheckbox @@ -942,9 +942,9 @@ menuButtonSize - activated(const QString&) + activated(const TQString&) ConfigDialog - slotMenuButtonSizeChanged(const QString&) + slotMenuButtonSizeChanged(const TQString&) buttonUp @@ -960,9 +960,9 @@ menuViewComboBox - activated(const QString&) + activated(const TQString&) ConfigDialog - slotChangeListView(const QString&) + slotChangeListView(const TQString&) newListView @@ -978,24 +978,24 @@ - slotListBoxClicked(QListBoxItem* item) + slotListBoxClicked(TQListBoxItem* item) slotAddMenuClicked() - slotCommandoTyped(const QString& commando) + slotCommandoTyped(const TQString& commando) slotRemoveClicked() slotNewIcon() slotAddButtonClicked() slotApplyClicked() slotResetClicked() - slotSchemeComboboxChanged(const QString&) + slotSchemeComboboxChanged(const TQString&) slotCustomSizeCheckboxToggled(bool) - slotColorButtonClicked(const QColor& color) + slotColorButtonClicked(const TQColor& color) slotOpacitySliderChanged(int value) - slotMenuButtonSizeChanged(const QString&) - slotNavButtonSizeChanged(const QString&) + slotMenuButtonSizeChanged(const TQString&) + slotNavButtonSizeChanged(const TQString&) slotMenuRadiusSpinboxChanged(int) slotButtonUpPressed() slotButtonDownPressed() - slotChangeListView(const QString&) + slotChangeListView(const TQString&) slotNewListViewClicked() slotRemoveListViewClicked() diff --git a/src/configdialogimpl.cpp b/src/configdialogimpl.cpp index adea895..c52c298 100644 --- a/src/configdialogimpl.cpp +++ b/src/configdialogimpl.cpp @@ -30,14 +30,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include "menulistviewitem.h" #include "servicemenu.h" @@ -47,16 +47,16 @@ #include #include -ConfigDialogImpl::ConfigDialogImpl(QWidget* parent, const char* name, WFlags fl) +ConfigDialogImpl::ConfigDialogImpl(TQWidget* parent, const char* name, WFlags fl) : ConfigDialog(parent,name,fl), configChanged(false), grabbing(0), curListView(0), mMenus(true) { - new QListBoxPixmap(listBox,MainBarIcon("kommando",KIcon::SizeLarge),"Menu"); - new QListBoxPixmap(listBox,MainBarIcon("configure_shortcuts",KIcon::SizeLarge),"Shortcuts"); - new QListBoxPixmap(listBox,MainBarIcon("colors",KIcon::SizeLarge),"Appearance"); + new TQListBoxPixmap(listBox,MainBarIcon("kommando",KIcon::SizeLarge),"Menu"); + new TQListBoxPixmap(listBox,MainBarIcon("configure_shortcuts",KIcon::SizeLarge),"Shortcuts"); + new TQListBoxPixmap(listBox,MainBarIcon("colors",KIcon::SizeLarge),"Appearance"); listBox->setSelected(listBox->topItem(),true); connect(kKeyButton1,SIGNAL(capturedShortcut(const KShortcut&)),this,SLOT(slotShortcutChanged(const KShortcut&)) ); @@ -69,8 +69,8 @@ void ConfigDialogImpl::readConfig() { Config& config = Config::getSingleton(); - navButtonSize->setCurrentText(QString::number(config.navButtonSize())); - menuButtonSize->setCurrentText(QString::number(config.menuButtonSize())); + navButtonSize->setCurrentText(TQString::number(config.navButtonSize())); + menuButtonSize->setCurrentText(TQString::number(config.menuButtonSize())); menuRadiusSpinbox->setValue(config.menuRadius()); if(config.scheme()=="none"){ @@ -119,11 +119,11 @@ void ConfigDialogImpl::slotNewListViewClicked() { newListView->setEnabled(false); grabbing = true; - setCursor(Qt::CrossCursor); + setCursor(TQt::CrossCursor); grabMouse(); } -void ConfigDialogImpl::slotChangeListView(const QString& appname) +void ConfigDialogImpl::slotChangeListView(const TQString& appname) { KommandoView* temp = mMenus.getViewOrDefault(appname); if(temp == curListView){ @@ -135,16 +135,16 @@ void ConfigDialogImpl::slotChangeListView(const QString& appname) if(temp){ curListView = temp; lists->raiseWidget(curListView); - connect(curListView, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotMenuViewClicked(QListViewItem*))); + connect(curListView, SIGNAL(clicked(TQListViewItem*)), this, SLOT(slotMenuViewClicked(TQListViewItem*))); slotMenuViewClicked(curListView->selectedItem()); } } void ConfigDialogImpl::slotButtonDownPressed() { - QListViewItem* item = curListView->selectedItem(); + TQListViewItem* item = curListView->selectedItem(); if(item!=NULL){ - QListViewItem* below = item->itemBelow(); + TQListViewItem* below = item->itemBelow(); while((below!=NULL)&&(item->parent()!=below->parent())){ below=below->itemBelow(); } @@ -157,9 +157,9 @@ void ConfigDialogImpl::slotButtonDownPressed() void ConfigDialogImpl::slotButtonUpPressed() { - QListViewItem* item = curListView->selectedItem(); + TQListViewItem* item = curListView->selectedItem(); if(item!=NULL){ - QListViewItem* above = item->itemAbove(); + TQListViewItem* above = item->itemAbove(); while((above!=NULL)&&(item->parent()!=above->parent())){ above=above->itemAbove(); } @@ -184,7 +184,7 @@ void ConfigDialogImpl::slotCustomSizeCheckboxToggled(bool mode) setChanged(true); } -void ConfigDialogImpl::slotSchemeComboboxChanged(const QString& scheme) +void ConfigDialogImpl::slotSchemeComboboxChanged(const TQString& scheme) { Config& config=Config::getSingleton(); if(scheme=="Tiny"){ @@ -207,8 +207,8 @@ void ConfigDialogImpl::slotSchemeComboboxChanged(const QString& scheme) config.setScheme(scheme); - navButtonSize->setCurrentText(QString::number(config.navButtonSize())); - menuButtonSize->setCurrentText(QString::number(config.menuButtonSize())); + navButtonSize->setCurrentText(TQString::number(config.navButtonSize())); + menuButtonSize->setCurrentText(TQString::number(config.menuButtonSize())); menuRadiusSpinbox->setValue(config.menuRadius()); setChanged(true); } @@ -219,19 +219,19 @@ void ConfigDialogImpl::slotMenuRadiusSpinboxChanged(int size) setChanged(true); } -void ConfigDialogImpl::slotNavButtonSizeChanged(const QString& size) +void ConfigDialogImpl::slotNavButtonSizeChanged(const TQString& size) { Config::getSingleton().setNavButtonSize(size.toShort()); setChanged(true); } -void ConfigDialogImpl::slotMenuButtonSizeChanged(const QString& size) +void ConfigDialogImpl::slotMenuButtonSizeChanged(const TQString& size) { Config::getSingleton().setMenuButtonSize(size.toShort()); setChanged(true); } -void ConfigDialogImpl::slotCommandoTyped(const QString& commando) +void ConfigDialogImpl::slotCommandoTyped(const TQString& commando) { if (curListView->selectedItem() && curListView->selectedItem()->text(1) != commando) { curListView->selectedItem()->setText(1,commando); @@ -239,7 +239,7 @@ void ConfigDialogImpl::slotCommandoTyped(const QString& commando) } } -void ConfigDialogImpl::slotMenuViewClicked(QListViewItem* item) +void ConfigDialogImpl::slotMenuViewClicked(TQListViewItem* item) { MenuListViewItem* temp = static_cast(item); if(item == 0){ @@ -274,7 +274,7 @@ void ConfigDialogImpl::slotNewIcon() void ConfigDialogImpl::slotRemoveClicked() { - QListViewItem* temp = curListView->selectedItem()->nextSibling(); + TQListViewItem* temp = curListView->selectedItem()->nextSibling(); delete curListView->selectedItem(); curListView->setSelected(temp,true); if(temp==NULL){ @@ -295,10 +295,10 @@ void ConfigDialogImpl::slotAddMenuClicked() commandoEdit->setEnabled(false); } -void ConfigDialogImpl::createEntry(const QString& kind) +void ConfigDialogImpl::createEntry(const TQString& kind) { - QListViewItem* parent=NULL; - QListViewItem* newItem; + TQListViewItem* parent=NULL; + TQListViewItem* newItem; MenuListViewItem* selected =static_cast(curListView->selectedItem()); MenuListViewItem::ItemType type; if(selected!=NULL){ @@ -333,7 +333,7 @@ void ConfigDialogImpl::createEntry(const QString& kind) setChanged(true); } -void ConfigDialogImpl::slotListBoxClicked(QListBoxItem* item) +void ConfigDialogImpl::slotListBoxClicked(TQListBoxItem* item) { if(item!=NULL){ if(item->text()=="Menu"){ @@ -358,7 +358,7 @@ void ConfigDialogImpl::slotApplyClicked() Config& config = Config::getSingleton(); config.fromConfigDlg(mMenus); config.writeConfigFile(); - kapp->dcopClient()->send("kded", "kommandod", "reparseConfiguration()", QString::null); + kapp->dcopClient()->send("kded", "kommandod", "reparseConfiguration()", TQString::null); setChanged(false); } @@ -371,7 +371,7 @@ void ConfigDialogImpl::slotShortcutChanged(const KShortcut & cut ) } } -void ConfigDialogImpl::slotColorButtonClicked(const QColor& color) +void ConfigDialogImpl::slotColorButtonClicked(const TQColor& color) { Config::getSingleton().setTintColor(color); setChanged(true); @@ -387,8 +387,8 @@ void ConfigDialogImpl::slotAddService(KService* service) { slotAddButtonClicked(); - QString commando = service->exec(); - commando.remove(QRegExp(" %.\\b")); + TQString commando = service->exec(); + commando.remove(TQRegExp(" %.\\b")); commando.remove(" -caption \"%c\""); commandoEdit->setText(commando); curListView->selectedItem()->setText(1, commando); @@ -418,13 +418,13 @@ void ConfigDialogImpl::slotAddServiceGroup(KServiceGroup* group) } } -bool ConfigDialogImpl::event( QEvent * evt ) +bool ConfigDialogImpl::event( TQEvent * evt ) { if(grabbing){ switch(evt->type()){ - case QEvent::MouseButtonPress: - switch(static_cast(evt)->button()){ - case Qt::LeftButton: + case TQEvent::MouseButtonPress: + switch(static_cast(evt)->button()){ + case TQt::LeftButton: releaseMouse(); listViewFromClick(); grabbing = false; @@ -434,8 +434,8 @@ bool ConfigDialogImpl::event( QEvent * evt ) grabbing = false; } break; - case QEvent::KeyPress: - if(static_cast(evt)->key() == Qt::Key_Escape){ + case TQEvent::KeyPress: + if(static_cast(evt)->key() == TQt::Key_Escape){ releaseMouse(); grabbing = false; } @@ -469,8 +469,8 @@ void ConfigDialogImpl::listViewFromClick( ) int rep_rootx, rep_rooty; unsigned int rep_mask; int mousex, mousey; - Display* dpy = qt_xdisplay(); - Window win = qt_xrootwin(); + Display* dpy = tqt_xdisplay(); + Window win = tqt_xrootwin(); XClassHint hint; hint.res_class = 0; diff --git a/src/configdialogimpl.h b/src/configdialogimpl.h index ce5c397..d55f8dd 100644 --- a/src/configdialogimpl.h +++ b/src/configdialogimpl.h @@ -27,7 +27,7 @@ #include "configdialog.h" -#include +#include #include "kommandoview.h" @@ -46,7 +46,7 @@ class ConfigDialogImpl : public ConfigDialog Q_OBJECT public: - ConfigDialogImpl(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); + ConfigDialogImpl(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0); /*$PUBLIC_FUNCTIONS$*/ void readConfig(); @@ -67,29 +67,29 @@ class ConfigDialogImpl : public ConfigDialog virtual void initView(); virtual void listViewFromClick(); - void createEntry(const QString& kind); //This is a helper function to add a new entry to the Listview + void createEntry(const TQString& kind); //This is a helper function to add a new entry to the Listview void setChanged(bool state); - bool event(QEvent* evt); + bool event(TQEvent* evt); protected slots: /*$PROTECTED_SLOTS$*/ - virtual void slotChangeListView(const QString&); + virtual void slotChangeListView(const TQString&); virtual void slotButtonUpPressed(); virtual void slotButtonDownPressed(); virtual void slotCustomSizeCheckboxToggled(bool); - virtual void slotSchemeComboboxChanged(const QString&); + virtual void slotSchemeComboboxChanged(const TQString&); virtual void slotMenuRadiusSpinboxChanged(int); virtual void slotShortcutChanged(const KShortcut& cut); - virtual void slotCommandoTyped(const QString& commando); - virtual void slotMenuViewClicked(QListViewItem* item); + virtual void slotCommandoTyped(const TQString& commando); + virtual void slotMenuViewClicked(TQListViewItem* item); virtual void slotNewIcon(); virtual void slotRemoveClicked(); virtual void slotAddButtonClicked(); virtual void slotAddMenuClicked(); - virtual void slotListBoxClicked(QListBoxItem* item); - virtual void slotColorButtonClicked(const QColor& color); + virtual void slotListBoxClicked(TQListBoxItem* item); + virtual void slotColorButtonClicked(const TQColor& color); virtual void slotOpacitySliderChanged(int value); - virtual void slotNavButtonSizeChanged(const QString&); - virtual void slotMenuButtonSizeChanged(const QString&); + virtual void slotNavButtonSizeChanged(const TQString&); + virtual void slotMenuButtonSizeChanged(const TQString&); virtual void slotAddService(KService* service); virtual void slotAddServiceGroup(KServiceGroup* group); virtual void slotRemoveListViewClicked(); diff --git a/src/configuration.cpp b/src/configuration.cpp index 6df8c11..99b4ff9 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -19,10 +19,10 @@ ***************************************************************************/ #include "configuration.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -31,18 +31,18 @@ #include "menulistviewitem.h" Config::Config() - :mTintColor(Qt::black),mOpacity(0.2f),mScheme("none"),mMenuButtonSize(32),mNavButtonSize(32),mMenuRadius(132),doc(NULL) + :mTintColor(TQt::black),mOpacity(0.2f),mScheme("none"),mMenuButtonSize(32),mNavButtonSize(32),mMenuRadius(132),doc(NULL) { mConfigPath = locate("data", "kommando/kommandorc"); kdDebug() << "kommandorc located: " << mConfigPath << endl; - if (mConfigPath.isNull() || !QFile::exists(mConfigPath)){ //test for new config file + if (mConfigPath.isNull() || !TQFile::exists(mConfigPath)){ //test for new config file kdDebug() << "There is no kommandorc in kdedirs" << endl; mConfigPath = locateLocal("data", "kommando/kommandorc"); - if(QFile::exists(KShell::homeDir("")+"/.kommandorc")){ //tries old config file + if(TQFile::exists(KShell::homeDir("")+"/.kommandorc")){ //tries old config file kdDebug() << "There is a kommandorc in homedir, moving it to " << mConfigPath << endl; - QDir dir; + TQDir dir; if (!dir.rename(KShell::homeDir("")+"/.kommandorc", mConfigPath)) { kdWarning() << "Moving ~/.kommandorc failed, creating a default one" << endl; createDefaultConfigFile(); @@ -69,22 +69,22 @@ void Config::createDefaultConfigFile() bool Config::readConfigFile( ) { - QFile file(mConfigPath); + TQFile file(mConfigPath); if(!file.open(IO_ReadOnly)){ return false; } if(doc){ delete doc; } - doc = new QDomDocument(); + doc = new TQDomDocument(); doc->setContent( &file ); file.close(); if(doc){ - QDomNode topLevelNode = doc->documentElement().firstChild(); + TQDomNode topLevelNode = doc->documentElement().firstChild(); while(!topLevelNode.isNull()){ if(topLevelNode.isElement()){ - QDomElement elem = topLevelNode.toElement(); + TQDomElement elem = topLevelNode.toElement(); if(elem.tagName()=="access"){ setShortcut(elem.text()); } else if(elem.tagName()=="tintcolor"){ @@ -114,11 +114,11 @@ bool Config::writeConfigFile( ) } mConfigPath = locateLocal("data", "kommando/kommandorc"); - QFile file(mConfigPath); + TQFile file(mConfigPath); if(!file.open(IO_WriteOnly)){ return false; } - QTextStream str(&file); + TQTextStream str(&file); str << *doc; file.close(); return true; @@ -129,8 +129,8 @@ void Config::fromConfigDlg(KommandoViewList& listViews ) if(doc){ delete doc; } - doc = new QDomDocument(); - QDomElement root=doc->createElement("root"); + doc = new TQDomDocument(); + TQDomElement root=doc->createElement("root"); doc->appendChild(root); newNode("access",root,Shortcut(),"method","shortcut"); @@ -143,8 +143,8 @@ void Config::fromConfigDlg(KommandoViewList& listViews ) for(KommandoView* it = listViews.first(); it != 0; it = listViews.next()){ if(it->childCount() > 0){ - QDomElement node = newMenu(root,it->appName()); - QListViewItem* temp = it->firstChild(); + TQDomElement node = newMenu(root,it->appName()); + TQListViewItem* temp = it->firstChild(); while(temp){ menuItemToXML(node,static_cast(temp)); temp=temp->nextSibling(); @@ -154,12 +154,12 @@ void Config::fromConfigDlg(KommandoViewList& listViews ) } } -//ARGHHH!! I need this function because QListView::lastItem returns not only top level items but also children of top level items +//ARGHHH!! I need this function because TQListView::lastItem returns not only top level items but also children of top level items //It took me hours of my precious lifetime to figure that out!! _Terribly_ annoying -.- -QListViewItem* lastChild(QListView* view) +TQListViewItem* lastChild(TQListView* view) { - QListViewItem* temp=view->firstChild(); - QListViewItem* item=NULL; + TQListViewItem* temp=view->firstChild(); + TQListViewItem* item=NULL; while(temp!=NULL){ item=temp; temp=temp->nextSibling(); @@ -167,15 +167,15 @@ QListViewItem* lastChild(QListView* view) return item; } -void Config::toListView(KommandoViewList& listViews, QWidgetStack* listViewParent)//QListView* listView ) +void Config::toListView(KommandoViewList& listViews, TQWidgetStack* listViewParent)//TQListView* listView ) { if(doc){ - QDomNode topLevelNode = doc->documentElement().firstChild(); - const QObjectList *children = listViewParent->children(); + TQDomNode topLevelNode = doc->documentElement().firstChild(); + const TQObjectList *children = listViewParent->children(); if (children != 0) { - QObjectListIterator it(*children); + TQObjectListIterator it(*children); for (; *it != 0; ++it) - listViewParent->removeWidget(static_cast(*it)); + listViewParent->removeWidget(static_cast(*it)); } while(!topLevelNode.isNull()){ @@ -184,10 +184,10 @@ void Config::toListView(KommandoViewList& listViews, QWidgetStack* listViewParen { KommandoView* view = new KommandoView(listViewParent,topLevelNode.toElement().attribute("appname")); listViewParent->addWidget(view); - QDomNode menuNode = topLevelNode.firstChild(); + TQDomNode menuNode = topLevelNode.firstChild(); while(!menuNode.isNull()){ if(menuNode.isElement()){ - QDomElement elemNode=menuNode.toElement(); + TQDomElement elemNode=menuNode.toElement(); menuItemFromXML(view,lastChild(view),menuNode.toElement()); } menuNode = menuNode.nextSibling(); @@ -202,15 +202,15 @@ void Config::toListView(KommandoViewList& listViews, QWidgetStack* listViewParen void Config::toKommandoMenu(Kommando* buttonParent) { - QPtrList topLevelMenus; + TQPtrList topLevelMenus; Menu* defaultMenu = 0; if(doc){ - QDomNode node = doc->documentElement().firstChild(); + TQDomNode node = doc->documentElement().firstChild(); while(!node.isNull()){ if(node.isElement()&&(node.toElement().tagName() == "menu")){ Menu* mainMenu = menuFromXML(node.toElement(),buttonParent); - if((mainMenu->appName() == "default") || (mainMenu->appName() == QString::null)){ + if((mainMenu->appName() == "default") || (mainMenu->appName() == TQString::null)){ defaultMenu = mainMenu; } mainMenu->arrangeButtons(); @@ -237,7 +237,7 @@ void Config::toKommandoMenu(Kommando* buttonParent) void Config::setDefaultValues() { - setTintColor(Qt::black); + setTintColor(TQt::black); setOpacity(0.2f); setShortcut("Alt+Ctrl+H"); setNavButtonSize(32); @@ -248,8 +248,8 @@ void Config::setDefaultValues() if(doc){ delete doc; } - doc = new QDomDocument(); - QDomElement root = doc->createElement("root"); + doc = new TQDomDocument(); + TQDomElement root = doc->createElement("root"); doc->appendChild(root); newNode("access",root,Shortcut(),"method","shortcut"); @@ -260,23 +260,23 @@ void Config::setDefaultValues() newNode("menuradius",root,132); newNode("scheme",root,"Normal"); - QDomElement node= newMenu(root,"default"); + TQDomElement node= newMenu(root,"default"); newButton(node,"konsole","konsole --workdir $HOME"); newButton(node,"kwrite","kwrite"); newButton(node,"konqueror","konqueror"); newButton(node,"kcalc","kcalc"); newButton(node,"gimp","gimp"); newButton(node,"kfm_home","kfmclient openProfile filemanagement"); - node = newMenu(node,QString::null,"kmix"); + node = newMenu(node,TQString::null,"kmix"); newButton(node,"kmix","kmix"); newButton(node,"k3b","k3b"); newButton(node,"amarok","amarok"); newButton(node,"kaffeine","kaffeine"); } -Menu * Config::menuFromXML( const QDomElement & ownNode, Kommando * buttonParent, Menu* parent) +Menu * Config::menuFromXML( const TQDomElement & ownNode, Kommando * buttonParent, Menu* parent) { - QDomNode node=ownNode.firstChild(); + TQDomNode node=ownNode.firstChild(); Menu* newMenu = new Menu(parent,ownNode.attribute("appname")); @@ -303,11 +303,11 @@ Menu * Config::menuFromXML( const QDomElement & ownNode, Kommando * buttonParent return newMenu; } -CommandoButton* Config::comButtonFromXML(const QDomElement& ownNode, Kommando* parent) +CommandoButton* Config::comButtonFromXML(const TQDomElement& ownNode, Kommando* parent) { CommandoButton* button = new CommandoButton(parent,mMenuButtonSize); - QDomNode bnode=ownNode.firstChild(); + TQDomNode bnode=ownNode.firstChild(); while (!bnode.isNull()){ if(bnode.nodeName() == "command"){ button->setCommand(bnode.firstChild().nodeValue()); @@ -319,36 +319,36 @@ CommandoButton* Config::comButtonFromXML(const QDomElement& ownNode, Kommando* p return button; } -QDomElement Config::newNode( const QString& nodename, QDomNode& parent, int value ) +TQDomElement Config::newNode( const TQString& nodename, TQDomNode& parent, int value ) { - QDomElement node=doc->createElement(nodename); - node.appendChild(doc->createTextNode(QString::number(value))); + TQDomElement node=doc->createElement(nodename); + node.appendChild(doc->createTextNode(TQString::number(value))); parent.appendChild(node); return node; } -QDomElement Config::newNode( const QString& nodename, QDomNode& parent, float value ) +TQDomElement Config::newNode( const TQString& nodename, TQDomNode& parent, float value ) { - QDomElement node=doc->createElement(nodename); - node.appendChild(doc->createTextNode(QString::number(value))); + TQDomElement node=doc->createElement(nodename); + node.appendChild(doc->createTextNode(TQString::number(value))); parent.appendChild(node); return node; } -QDomElement Config::newNode( const QString& nodename, QDomNode& parent, const QString& value ) +TQDomElement Config::newNode( const TQString& nodename, TQDomNode& parent, const TQString& value ) { - QDomElement node=doc->createElement(nodename); + TQDomElement node=doc->createElement(nodename); node.appendChild(doc->createTextNode(value)); parent.appendChild(node); return node; } -QDomElement Config::newNode( const QString& nodename, QDomNode& parent, const QString& value, const QString& attrname, const QString& attrvalue ) +TQDomElement Config::newNode( const TQString& nodename, TQDomNode& parent, const TQString& value, const TQString& attrname, const TQString& attrvalue ) { - QDomElement node=doc->createElement(nodename); + TQDomElement node=doc->createElement(nodename); node.setAttribute(attrname,attrvalue); node.appendChild(doc->createTextNode(value)); parent.appendChild(node); @@ -356,16 +356,16 @@ QDomElement Config::newNode( const QString& nodename, QDomNode& parent, const QS return node; } -QDomElement Config::newButton(QDomNode& parent, const QString& icon, const QString& command ) +TQDomElement Config::newButton(TQDomNode& parent, const TQString& icon, const TQString& command ) { - QDomElement root = doc->createElement("button"); + TQDomElement root = doc->createElement("button"); if(command!=""){ - QDomElement node = doc->createElement("command"); + TQDomElement node = doc->createElement("command"); node.appendChild(doc->createTextNode(command)); root.appendChild(node); } if(icon!=""){ - QDomElement node=doc->createElement("icon"); + TQDomElement node=doc->createElement("icon"); node.appendChild(doc->createTextNode(icon)); root.appendChild(node); } @@ -373,14 +373,14 @@ QDomElement Config::newButton(QDomNode& parent, const QString& icon, const QStri return root; } -QDomElement Config::newMenu( QDomNode & parent, const QString& appName, const QString& icon ) +TQDomElement Config::newMenu( TQDomNode & parent, const TQString& appName, const TQString& icon ) { - QDomElement root = doc->createElement("menu"); - if(appName != QString::null){ + TQDomElement root = doc->createElement("menu"); + if(appName != TQString::null){ root.setAttribute("appname", appName); } - if(icon != QString::null){ - QDomElement node=doc->createElement("icon"); + if(icon != TQString::null){ + TQDomElement node=doc->createElement("icon"); node.appendChild(doc->createTextNode(icon)); root.appendChild(node); } @@ -388,11 +388,11 @@ QDomElement Config::newMenu( QDomNode & parent, const QString& appName, const QS return root; } -void Config::menuItemToXML( QDomNode & parent, MenuListViewItem* item) +void Config::menuItemToXML( TQDomNode & parent, MenuListViewItem* item) { if(item->type()==MenuListViewItem::Menu){ - QDomElement node = newMenu(parent,QString::null,item->iconPath()); - QListViewItem* temp = item->firstChild(); + TQDomElement node = newMenu(parent,TQString::null,item->iconPath()); + TQListViewItem* temp = item->firstChild(); while(temp){ menuItemToXML(node,static_cast(temp)); temp=temp->nextSibling(); @@ -402,7 +402,7 @@ void Config::menuItemToXML( QDomNode & parent, MenuListViewItem* item) } } -void Config::menuItemFromXML(KommandoView* parent, QListViewItem* after, const QDomElement& ownNode) +void Config::menuItemFromXML(KommandoView* parent, TQListViewItem* after, const TQDomElement& ownNode) { MenuListViewItem* item; if (ownNode.tagName()=="menu"){ @@ -414,7 +414,7 @@ void Config::menuItemFromXML(KommandoView* parent, QListViewItem* after, const Q itemHelper(ownNode,item); //Parse properties and children of this item } -void Config::menuItemFromXML(QListViewItem* parent, QListViewItem* after, const QDomElement& ownNode) +void Config::menuItemFromXML(TQListViewItem* parent, TQListViewItem* after, const TQDomElement& ownNode) { MenuListViewItem* item; if (ownNode.tagName()=="menu"){ @@ -427,13 +427,13 @@ void Config::menuItemFromXML(QListViewItem* parent, QListViewItem* after, const itemHelper(ownNode,item); //Parse properties and children of this item } -void Config::itemHelper(const QDomElement& ownNode, MenuListViewItem* item) +void Config::itemHelper(const TQDomElement& ownNode, MenuListViewItem* item) { - QDomNode temp = ownNode.firstChild(); + TQDomNode temp = ownNode.firstChild(); while(!temp.isNull()){ if(temp.isElement()){ - QDomElement temp2=temp.toElement(); + TQDomElement temp2=temp.toElement(); if(temp2.tagName() == "icon"){ item->setIconPath(temp2.firstChild().nodeValue()); } else if((temp2.tagName() == "command") && (item->type() == MenuListViewItem::Button)){ diff --git a/src/configuration.h b/src/configuration.h index a6aa442..7b763c0 100644 --- a/src/configuration.h +++ b/src/configuration.h @@ -20,14 +20,14 @@ #ifndef CONFIG_H #define CONFIG_H -#include +#include #include #include "kommando.h" #include "commandobutton.h" #include "kommandoview.h" -class QWidgetStack; +class TQWidgetStack; class Config{ public: @@ -41,15 +41,15 @@ class Config{ bool readConfigFile(); bool writeConfigFile(); void fromConfigDlg(KommandoViewList& listViews); - void toListView(KommandoViewList& listViews, QWidgetStack* listViewParent); + void toListView(KommandoViewList& listViews, TQWidgetStack* listViewParent); void toKommandoMenu(Kommando* buttonParent); void setDefaultValues(); - void setShortcut(const QString& cut){ mShortcut = cut; } - QString Shortcut() const{ return mShortcut; } + void setShortcut(const TQString& cut){ mShortcut = cut; } + TQString Shortcut() const{ return mShortcut; } - void setTintColor(const QColor& theValue){ mTintColor = theValue; } - QColor tintColor() const { return mTintColor; } + void setTintColor(const TQColor& theValue){ mTintColor = theValue; } + TQColor tintColor() const { return mTintColor; } void setOpacity(const float value){mOpacity=value;} float opacity() const {return mOpacity;} @@ -65,45 +65,45 @@ class Config{ unsigned int menuRadius() const{ return mMenuRadius; } unsigned int buttonDistance() const { return (mMenuRadius-static_cast(mMenuButtonSize*1.38)); } - void setScheme(const QString& theValue){ mScheme = theValue; } - QString scheme() const{ return mScheme; } + void setScheme(const TQString& theValue){ mScheme = theValue; } + TQString scheme() const{ return mScheme; } protected: Config(); Config(const Config&); void createDefaultConfigFile(); - QString mConfigPath; - QString mShortcut; - QColor mTintColor; + TQString mConfigPath; + TQString mShortcut; + TQColor mTintColor; float mOpacity; - QString mScheme; + TQString mScheme; unsigned short mMenuButtonSize; unsigned short mNavButtonSize; unsigned int mMenuRadius; bool mAddDefalutMenuLink; - QDomDocument* doc; + TQDomDocument* doc; //Factory functions - Menu* menuFromXML(const QDomElement& ownNode, Kommando* buttonParent, Menu* parent=NULL); - CommandoButton* comButtonFromXML(const QDomElement& ownNode, Kommando* parent); - QListView* newListView(QWidget * parent, const char* name); + Menu* menuFromXML(const TQDomElement& ownNode, Kommando* buttonParent, Menu* parent=NULL); + CommandoButton* comButtonFromXML(const TQDomElement& ownNode, Kommando* parent); + TQListView* newListView(TQWidget * parent, const char* name); - void menuItemToXML(QDomNode& parent, MenuListViewItem* item); + void menuItemToXML(TQDomNode& parent, MenuListViewItem* item); //The following 3 methods could have been implemented in just 1 method, if there would be no need in overriding the parent argument //so I put the code both menuItemFromXML methods share in itemHelper to reduce redundancy - void menuItemFromXML(KommandoView* parent, QListViewItem* after, const QDomElement& ownNode); - void menuItemFromXML(QListViewItem* parent, QListViewItem* after, const QDomElement& ownNode); - void itemHelper(const QDomElement& ownNode, MenuListViewItem* item); + void menuItemFromXML(KommandoView* parent, TQListViewItem* after, const TQDomElement& ownNode); + void menuItemFromXML(TQListViewItem* parent, TQListViewItem* after, const TQDomElement& ownNode); + void itemHelper(const TQDomElement& ownNode, MenuListViewItem* item); //Some factory functions that allow to setup a xml file quickly - QDomElement newNode(const QString& nodename, QDomNode& parent, int value); - QDomElement newNode(const QString& nodename, QDomNode& parent, float value); - QDomElement newNode(const QString& nodename, QDomNode& parent, const QString& value); - QDomElement newNode(const QString& nodename, QDomNode& parent, const QString& value, const QString& attrname, const QString& attrvalue); - QDomElement newButton(QDomNode& parent, const QString& icon, const QString& command); - QDomElement newMenu(QDomNode& parent, const QString& appName = QString::null, const QString& icon = QString::null); + TQDomElement newNode(const TQString& nodename, TQDomNode& parent, int value); + TQDomElement newNode(const TQString& nodename, TQDomNode& parent, float value); + TQDomElement newNode(const TQString& nodename, TQDomNode& parent, const TQString& value); + TQDomElement newNode(const TQString& nodename, TQDomNode& parent, const TQString& value, const TQString& attrname, const TQString& attrvalue); + TQDomElement newButton(TQDomNode& parent, const TQString& icon, const TQString& command); + TQDomElement newMenu(TQDomNode& parent, const TQString& appName = TQString::null, const TQString& icon = TQString::null); }; #endif diff --git a/src/kcmkommando.cpp b/src/kcmkommando.cpp index e3ef742..5007360 100644 --- a/src/kcmkommando.cpp +++ b/src/kcmkommando.cpp @@ -19,7 +19,7 @@ ***************************************************************************/ -#include +#include #include #include @@ -35,10 +35,10 @@ static const char description[] = static const char version[] = "0.5.2"; -typedef KGenericFactory kommandoFactory; +typedef KGenericFactory kommandoFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kommando, kommandoFactory("kcmkommando")) -KCMKommando::KCMKommando(QWidget *parent, const char *name, const QStringList&) +KCMKommando::KCMKommando(TQWidget *parent, const char *name, const TQStringList&) : KCModule(parent, name), about(0), configDialog(0) { about = new KAboutData("kommando", I18N_NOOP("Kommando"), version, description, @@ -47,7 +47,7 @@ KCMKommando::KCMKommando(QWidget *parent, const char *name, const QStringList&) about->addAuthor( "Sergio Cambra", 0, "runico@users.berlios.de" ); setAboutData(about); - QVBoxLayout* layout = new QVBoxLayout( this ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); layout->setAutoAdd( true ); configDialog = new ConfigDialogImpl(this); connect(configDialog, SIGNAL(changed(bool)), this, SLOT(configChanged(bool))); @@ -89,7 +89,7 @@ int KCMKommando::buttons() } -QString KCMKommando::quickHelp() const +TQString KCMKommando::quickHelp() const { return i18n("Helpful information about the prueba module."); } diff --git a/src/kcmkommando.h b/src/kcmkommando.h index bcc0fc2..f480c2f 100644 --- a/src/kcmkommando.h +++ b/src/kcmkommando.h @@ -32,14 +32,14 @@ class KCMKommando: public KCModule Q_OBJECT public: - KCMKommando( QWidget *parent=0, const char *name=0, const QStringList& = QStringList() ); + KCMKommando( TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() ); ~KCMKommando(); virtual void load(); virtual void save(); virtual void defaults(); virtual int buttons(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; virtual const KAboutData *aboutData()const { return about; }; protected slots: diff --git a/src/kommando.cpp b/src/kommando.cpp index e4abda2..2459af1 100644 --- a/src/kommando.cpp +++ b/src/kommando.cpp @@ -27,9 +27,9 @@ #include "configuration.h" Kommando::Kommando() - : QWidget( 0, "Kommando", Qt::WDestructiveClose | - Qt::WStyle_Customize | - Qt::WStyle_NoBorder), + : TQWidget( 0, "Kommando", TQt::WDestructiveClose | + TQt::WStyle_Customize | + TQt::WStyle_NoBorder), actMenu(0), navbutton(this), oldNavbuttonIconType(0) @@ -57,8 +57,8 @@ void Kommando::show( ) int rep_rootx, rep_rooty; unsigned int rep_mask; int mousex, mousey; - Display* dpy = qt_xdisplay(); - Window win = qt_xrootwin(); + Display* dpy = tqt_xdisplay(); + Window win = tqt_xrootwin(); XClassHint hint; hint.res_class = 0; @@ -84,16 +84,16 @@ void Kommando::show( ) move(mousex-config.menuRadius(),mousey-config.menuRadius()); //get the part of the screen the widget is drawn onto and apply a fade effect to it - mScreenshot = QPixmap::grabWindow( qt_xrootwin(), x(), y(), width(), height() ); + mScreenshot = TQPixmap::grabWindow( tqt_xrootwin(), x(), y(), width(), height() ); KPixmapEffect::fade( mScreenshot, config.opacity(), config.tintColor() ); - QWidget::show(); + TQWidget::show(); } void Kommando::hide( ) { selectButton(BUTTON_DESELECT); - QWidget::hide(); + TQWidget::hide(); } void Kommando::toggle( ) @@ -128,7 +128,7 @@ void Kommando::setActMenu( Menu * newMenu ) actMenu = newMenu; } -void Kommando::setActTopLevelMenu(const QString& appName ) +void Kommando::setActTopLevelMenu(const TQString& appName ) { Menu* menu = 0; for(Menu* it = mTopLevelMenus.first(); it != 0; it = mTopLevelMenus.next()){ @@ -136,15 +136,15 @@ void Kommando::setActTopLevelMenu(const QString& appName ) menu = it; break; } - //get a default menu, assume that a toplevel menu with QString::null or "default" as appname is one - if ((it->appName() == QString::null) || (it->appName() == "default")){ + //get a default menu, assume that a toplevel menu with TQString::null or "default" as appname is one + if ((it->appName() == TQString::null) || (it->appName() == "default")){ menu = it; } } setActMenu(menu); } -void Kommando::setTopLevelMenus( const QPtrList& newmenus ) +void Kommando::setTopLevelMenus( const TQPtrList& newmenus ) { setActMenu(0); //No need to clear the list, because autoDelete is turned on in @@ -160,13 +160,13 @@ void Kommando::windowActivationChange( bool oldActive ) } } -void Kommando::paintEvent( QPaintEvent * evt ) +void Kommando::paintEvent( TQPaintEvent * evt ) { - QPainter p(this); + TQPainter p(this); p.drawPixmap(evt->rect().topLeft(),mScreenshot,evt->rect()); } -void Kommando::wheelEvent( QWheelEvent * evt ) +void Kommando::wheelEvent( TQWheelEvent * evt ) { actMenu->selectButton(actMenu->selectedButtonNum()+evt->delta()/120); } @@ -223,36 +223,36 @@ void Kommando::slotButtonSelected( int type ) } } -void Kommando::keyPressEvent( QKeyEvent * evt ) +void Kommando::keyPressEvent( TQKeyEvent * evt ) { switch(evt->key()){ - case Qt::Key_Left: + case TQt::Key_Left: actMenu->selectButton(actMenu->selectedButtonNum()-1); break; - case Qt::Key_Right: + case TQt::Key_Right: actMenu->selectButton(actMenu->selectedButtonNum()+1); break; - case Qt::Key_Return: + case TQt::Key_Return: slotNavClick(); break; - case Qt::Key_Escape: + case TQt::Key_Escape: if(mTopLevelMenus.containsRef(actMenu)){ hide(); } else { setActMenu(actMenu->parentMenu()); } break; - case Qt::Key_1: - case Qt::Key_2: - case Qt::Key_3: - case Qt::Key_4: - case Qt::Key_5: - case Qt::Key_6: - case Qt::Key_7: - case Qt::Key_8: - case Qt::Key_9: + case TQt::Key_1: + case TQt::Key_2: + case TQt::Key_3: + case TQt::Key_4: + case TQt::Key_5: + case TQt::Key_6: + case TQt::Key_7: + case TQt::Key_8: + case TQt::Key_9: //We want to get the number of the button, so treat the enum as number (yes I know, but it works fine :->) - actMenu->selectButton(evt->key() - Qt::Key_1); + actMenu->selectButton(evt->key() - TQt::Key_1); break; } } @@ -269,7 +269,7 @@ void Kommando::resize( ) Config& config = Config::getSingleton(); setFixedSize(config.menuSize(),config.menuSize()); //apply a circular mask - QRegion mask(rect(),QRegion::Ellipse); + TQRegion mask(rect(),TQRegion::Ellipse); setMask(mask); } @@ -279,14 +279,14 @@ void Kommando::selectButton( int num ) actMenu->selectButton(num); } -void Kommando::mousePressEvent(QMouseEvent* evt) +void Kommando::mousePressEvent(TQMouseEvent* evt) { - middleMouseButtonState = (evt->button() == Qt::MidButton); + middleMouseButtonState = (evt->button() == TQt::MidButton); } -void Kommando::mouseReleaseEvent(QMouseEvent* evt) +void Kommando::mouseReleaseEvent(TQMouseEvent* evt) { - if(middleMouseButtonState && (evt->button() == Qt::MidButton)){ + if(middleMouseButtonState && (evt->button() == TQt::MidButton)){ middleMouseButtonState = false; slotNavClick(); } diff --git a/src/kommando.h b/src/kommando.h index 8d3d629..5886af3 100644 --- a/src/kommando.h +++ b/src/kommando.h @@ -22,14 +22,14 @@ #ifndef _KOMMANDO_H_ #define _KOMMANDO_H_ -#include -#include +#include +#include #include #include "menu.h" -class Kommando : public QWidget +class Kommando : public TQWidget { Q_OBJECT @@ -38,7 +38,7 @@ class Kommando : public QWidget /* * The window needs to appear at the mousecursors current position - * overriding QWidget::show() makes this easy, showEvent() does not + * overriding TQWidget::show() makes this easy, showEvent() does not * work properly though. */ virtual void show(); @@ -49,11 +49,11 @@ class Kommando : public QWidget virtual void nextButton() { selectButton(actMenu->selectedButtonNum()+1); } virtual void previousButton() { selectButton(actMenu->selectedButtonNum()-1); } - virtual void setActTopLevelMenu(const QString& appName); + virtual void setActTopLevelMenu(const TQString& appName); virtual void setActMenu(Menu* newmenu); - virtual void setTopLevelMenus(const QPtrList& newmenus); + virtual void setTopLevelMenus(const TQPtrList& newmenus); //virtual Menu* getMainMenu(){return mainMenu;} - virtual const QPixmap* screenshot(){return &mScreenshot;} + virtual const TQPixmap* screenshot(){return &mScreenshot;} virtual void setNavButtonSize(unsigned short size); virtual void resize(); @@ -63,19 +63,19 @@ class Kommando : public QWidget protected: Menu* actMenu; - QPtrList mTopLevelMenus; + TQPtrList mTopLevelMenus; RoundButton navbutton; bool middleMouseButtonState; int oldNavbuttonIconType; //holds whether the icon should be changed KPixmap mScreenshot; //Some events - virtual void paintEvent (QPaintEvent* evt); + virtual void paintEvent (TQPaintEvent* evt); virtual void windowActivationChange ( bool oldActive ); - virtual void wheelEvent (QWheelEvent * evt); - virtual void keyPressEvent(QKeyEvent* evt); - virtual void mousePressEvent(QMouseEvent* evt); - virtual void mouseReleaseEvent(QMouseEvent* evt); + virtual void wheelEvent (TQWheelEvent * evt); + virtual void keyPressEvent(TQKeyEvent* evt); + virtual void mousePressEvent(TQMouseEvent* evt); + virtual void mouseReleaseEvent(TQMouseEvent* evt); protected slots: virtual void slotOnClick(); diff --git a/src/kommandod.cpp b/src/kommandod.cpp index 7c0ac9c..c624c85 100644 --- a/src/kommandod.cpp +++ b/src/kommandod.cpp @@ -18,16 +18,16 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include -#include +#include +#include #include -#include +#include #include #include "kommandod.h" #include "configuration.h" -KommandoDaemon::KommandoDaemon(const QCString &name) +KommandoDaemon::KommandoDaemon(const TQCString &name) : KDEDModule(name), Shortcut(this,"Shortcut"), kommandoWin(0) { Config& config = Config::getSingleton(); @@ -61,7 +61,7 @@ void KommandoDaemon::reparseConfiguration() } extern "C" { - KDE_EXPORT KDEDModule *create_kommandod(const QCString &obj) + KDE_EXPORT KDEDModule *create_kommandod(const TQCString &obj) { return new KommandoDaemon(obj); } diff --git a/src/kommandod.h b/src/kommandod.h index 4fef5fa..e97bf31 100644 --- a/src/kommandod.h +++ b/src/kommandod.h @@ -33,7 +33,7 @@ class KommandoDaemon : public KDEDModule K_DCOP public: - KommandoDaemon(const QCString &obj); + KommandoDaemon(const TQCString &obj); ~KommandoDaemon(); k_dcop: diff --git a/src/kommandoview.cpp b/src/kommandoview.cpp index 32f6170..3182f12 100644 --- a/src/kommandoview.cpp +++ b/src/kommandoview.cpp @@ -19,10 +19,10 @@ ***************************************************************************/ #include "kommandoview.h" -KommandoView::KommandoView(QWidget* parent, const QString& name) - : QListView(parent) +KommandoView::KommandoView(TQWidget* parent, const TQString& name) + : TQListView(parent) { - if(name == QString::null){ + if(name == TQString::null){ m_AppName = "default"; } else { m_AppName = name; @@ -35,17 +35,17 @@ KommandoView::KommandoView(QWidget* parent, const QString& name) KommandoViewList::KommandoViewList(bool autoDelete) - : QPtrList() + : TQPtrList() { setAutoDelete(autoDelete); } -bool KommandoViewList::contains(const QString& view ) +bool KommandoViewList::contains(const TQString& view ) { return getView(view) != 0; } -KommandoView * KommandoViewList::getView(const QString& view ) +KommandoView * KommandoViewList::getView(const TQString& view ) { for(KommandoView* it = first(); it != 0; it = next()){ if(it->appName() == view){ @@ -55,21 +55,21 @@ KommandoView * KommandoViewList::getView(const QString& view ) return 0; } -KommandoView * KommandoViewList::getViewOrDefault( const QString& view ) +KommandoView * KommandoViewList::getViewOrDefault( const TQString& view ) { KommandoView* temp = 0; for(KommandoView* it = first(); it != 0; it = next()){ if(it->appName() == view){ return it; } - if((it->appName() == "default") || (it->appName() == QString::null)){ + if((it->appName() == "default") || (it->appName() == TQString::null)){ temp=it; } } return temp; } -void KommandoViewList::removeView( const QString & view ) +void KommandoViewList::removeView( const TQString & view ) { for(KommandoView* it = first(); it != 0; it = next()){ if(it->appName() == view){ diff --git a/src/kommandoview.h b/src/kommandoview.h index 310cde2..9384e22 100644 --- a/src/kommandoview.h +++ b/src/kommandoview.h @@ -20,33 +20,33 @@ #ifndef KOMMANDOVIEW_H #define KOMMANDOVIEW_H -#include +#include /** @author Daniel Stöckel */ -class KommandoView : public QListView +class KommandoView : public TQListView { public: - KommandoView(QWidget* parent, const QString& name); + KommandoView(TQWidget* parent, const TQString& name); - void setAppName(const QString& theValue){ m_AppName = theValue; } - QString appName() const{ return m_AppName; } + void setAppName(const TQString& theValue){ m_AppName = theValue; } + TQString appName() const{ return m_AppName; } private: - QString m_AppName; + TQString m_AppName; }; -class KommandoViewList : public QPtrList +class KommandoViewList : public TQPtrList { public: KommandoViewList(bool autoDelete = false); - bool contains(const QString& view); + bool contains(const TQString& view); - KommandoView* getView(const QString& view); - KommandoView* getViewOrDefault(const QString& view); - void removeView(const QString& view); + KommandoView* getView(const TQString& view); + KommandoView* getViewOrDefault(const TQString& view); + void removeView(const TQString& view); }; diff --git a/src/menu.cpp b/src/menu.cpp index e0acc2d..66a3db6 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -24,8 +24,8 @@ #include "commandobutton.h" #include "configuration.h" -Menu::Menu(Menu* parentMenu, const QString& appName) - : QButtonGroup(),mParentMenu(parentMenu),mSelectedButtonNum(BUTTON_DESELECT),mAppName(appName) +Menu::Menu(Menu* parentMenu, const TQString& appName) + : TQButtonGroup(),mParentMenu(parentMenu),mSelectedButtonNum(BUTTON_DESELECT),mAppName(appName) { children.setAutoDelete(true); } @@ -34,7 +34,7 @@ Menu::~Menu() { for(int i=0;i(button); connect(rButton, SIGNAL(mouseIn(RoundButton*)),this,SLOT(slotMouseIn(RoundButton*))); @@ -114,16 +114,16 @@ int Menu::insert( QButton * button, int id ) children.append(static_cast(rButton)->subMenu()); } - return QButtonGroup::insert(button,id); + return TQButtonGroup::insert(button,id); } -int Menu::insertNoChild( QButton * button, int id ) +int Menu::insertNoChild( TQButton * button, int id ) { RoundButton* rButton = static_cast(button); connect(rButton, SIGNAL(mouseIn(RoundButton*)),this,SLOT(slotMouseIn(RoundButton*))); connect(rButton, SIGNAL(mouseOut(RoundButton*)),this,SLOT(slotMouseOut())); - return QButtonGroup::insert(button,id); + return TQButtonGroup::insert(button,id); } void Menu::slotMouseIn(RoundButton* emitter) @@ -146,7 +146,7 @@ Menu * Menu::execute( ) return 0; //Well, we shouldn't actually reach this place, as execute is only called if it is sure that a button was selected } -void Menu::selectButton( QButton * button ) +void Menu::selectButton( TQButton * button ) { selectButton(id(button)); } diff --git a/src/menu.h b/src/menu.h index 6186bc2..3f64d7a 100644 --- a/src/menu.h +++ b/src/menu.h @@ -20,8 +20,8 @@ #ifndef MENU_H #define MENU_H -#include -#include +#include +#include #include "roundbutton.h" @@ -29,46 +29,46 @@ class RoundButton; -class Menu : public QButtonGroup +class Menu : public TQButtonGroup { Q_OBJECT public: - Menu(Menu* parentMenu=NULL, const QString& appName=""); + Menu(Menu* parentMenu=NULL, const TQString& appName=""); virtual ~Menu(); virtual Menu* parentMenu(){ return mParentMenu; } virtual void setParentMenu(Menu* menu){ mParentMenu=menu; } virtual void selectButton(int num); - virtual void selectButton(QButton* button); + virtual void selectButton(TQButton* button); virtual void showButtons(); virtual void hideButtons(); virtual void arrangeButtons(); virtual Menu* execute(); - virtual int insert ( QButton * button, int id = -1 ); + virtual int insert ( TQButton * button, int id = -1 ); //use this method for cross linking, otherway there will be problems with deletation - virtual int insertNoChild( QButton* button, int id = -1); + virtual int insertNoChild( TQButton* button, int id = -1); - void setIconPath(const QString& theValue){ mIconPath = theValue; } - QString IconPath() const{ return mIconPath; } + void setIconPath(const TQString& theValue){ mIconPath = theValue; } + TQString IconPath() const{ return mIconPath; } int selectedButtonNum() const { return mSelectedButtonNum; } - virtual QButton* selectedButton(); + virtual TQButton* selectedButton(); - void setAppName(const QString& theValue){ mAppName = theValue; } - QString appName() const { return mAppName; } + void setAppName(const TQString& theValue){ mAppName = theValue; } + TQString appName() const { return mAppName; } signals: virtual void buttonSelected(int type); protected: Menu* mParentMenu; - QString mIconPath; - QPtrList children; + TQString mIconPath; + TQPtrList children; int mSelectedButtonNum; - QString mAppName; + TQString mAppName; protected slots: void slotMouseIn(RoundButton* emitter); diff --git a/src/menulistviewitem.cpp b/src/menulistviewitem.cpp index 54ba1c7..e3c575f 100644 --- a/src/menulistviewitem.cpp +++ b/src/menulistviewitem.cpp @@ -21,14 +21,14 @@ #include -MenuListViewItem::MenuListViewItem(QListViewItem* parent, QListViewItem* after, QString col1, ItemType type, QString iconPath, QString col2) - : QListViewItem(parent,after,col1,col2),mType(type) +MenuListViewItem::MenuListViewItem(TQListViewItem* parent, TQListViewItem* after, TQString col1, ItemType type, TQString iconPath, TQString col2) + : TQListViewItem(parent,after,col1,col2),mType(type) { setIconPath(iconPath); } -MenuListViewItem::MenuListViewItem(QListView* parent, QListViewItem* after, QString col1, ItemType type, QString iconPath, QString col2) - : QListViewItem(parent,after,col1,col2),mType(type) +MenuListViewItem::MenuListViewItem(TQListView* parent, TQListViewItem* after, TQString col1, ItemType type, TQString iconPath, TQString col2) + : TQListViewItem(parent,after,col1,col2),mType(type) { setIconPath(iconPath); } @@ -37,7 +37,7 @@ MenuListViewItem::~MenuListViewItem() { } -void MenuListViewItem::setIconPath(const QString& path) +void MenuListViewItem::setIconPath(const TQString& path) { mIconPath = path; if(mIconPath!=NULL) diff --git a/src/menulistviewitem.h b/src/menulistviewitem.h index e55d3f8..350116b 100644 --- a/src/menulistviewitem.h +++ b/src/menulistviewitem.h @@ -20,29 +20,29 @@ #ifndef MENULISTVIEWITEM_H #define MENULISTVIEWITEM_H -#include +#include -class MenuListViewItem : public QListViewItem +class MenuListViewItem : public TQListViewItem { public: enum ItemType{Menu,Button}; //The after parameter is needed to avoid, that the Buttons get reversed everytime the config file is loaded - MenuListViewItem(QListViewItem* parent, QListViewItem* after, QString col1, ItemType type=Button, QString iconPath=NULL, QString col2=NULL); - MenuListViewItem(QListView* parent, QListViewItem* after, QString col1, ItemType type=Button, QString iconPath=NULL, QString col2=NULL); + MenuListViewItem(TQListViewItem* parent, TQListViewItem* after, TQString col1, ItemType type=Button, TQString iconPath=NULL, TQString col2=NULL); + MenuListViewItem(TQListView* parent, TQListViewItem* after, TQString col1, ItemType type=Button, TQString iconPath=NULL, TQString col2=NULL); ~MenuListViewItem(); void setType(const ItemType icontype){ mType = icontype; } ItemType type() const{ return mType; } - void setIconPath(const QString& path); + void setIconPath(const TQString& path); MenuListViewItem* lastChild(); - QString iconPath() const { return mIconPath; } + TQString iconPath() const { return mIconPath; } protected: ItemType mType; - QString mIconPath; + TQString mIconPath; }; #endif diff --git a/src/roundbutton.cpp b/src/roundbutton.cpp index c8cb9fb..7d3fafa 100644 --- a/src/roundbutton.cpp +++ b/src/roundbutton.cpp @@ -22,16 +22,16 @@ #include #include -#include +#include #include "kommando.h" -RoundButton::RoundButton( QWidget* parent, unsigned short rad, const char* name, WFlags f) - : QButton(parent, name, f) +RoundButton::RoundButton( TQWidget* parent, unsigned short rad, const char* name, WFlags f) + : TQButton(parent, name, f) { setRadius(rad); //setBackgroundMode(NoBackground); - //setBackgroundColor(QColor(0,0,0)); + //setBackgroundColor(TQColor(0,0,0)); background.resize(width(),height()); } @@ -40,13 +40,13 @@ RoundButton::~RoundButton() { } -void RoundButton::drawButton( QPainter *Painter ) +void RoundButton::drawButton( TQPainter *Painter ) { Painter->drawPixmap(0,0,background); drawButtonLabel(Painter); } -void RoundButton::drawButtonLabel( QPainter *Painter ) +void RoundButton::drawButtonLabel( TQPainter *Painter ) { //Do we have a pixmap? if(!pixmap()){ @@ -58,7 +58,7 @@ void RoundButton::drawButtonLabel( QPainter *Painter ) void RoundButton::move( int x, int y ) { - QButton::move(x-radius,y-radius); + TQButton::move(x-radius,y-radius); } void RoundButton::setRadius( int rad ) @@ -69,7 +69,7 @@ void RoundButton::setRadius( int rad ) //setIcon(mIconPath); } -void RoundButton::setIcon( const QString& path ) +void RoundButton::setIcon( const TQString& path ) { mIconPath=path; icon=MainBarIcon(path,radius*2); @@ -82,22 +82,22 @@ void RoundButton::show() //get the buttons part of the screenshot copyBlt(&background,0,0,static_cast(parent())->screenshot(),pos().x(),pos().y(),width(),height()); - QButton::show(); + TQButton::show(); } -bool RoundButton::event( QEvent * evt ) +bool RoundButton::event( TQEvent * evt ) { switch(evt->type()){ - case QEvent::Enter: + case TQEvent::Enter: emit mouseIn(this); setActive(true); return true; - case QEvent::Leave: + case TQEvent::Leave: emit mouseOut(this); setActive(false); return true; default: - return QButton::event(evt); + return TQButton::event(evt); } } @@ -112,7 +112,7 @@ void RoundButton::setActive( bool mode ) //key press events need to be ignored, so that they can be captured by the menu /* TODO execution could be placed here! */ -void RoundButton::keyPressEvent( QKeyEvent * evt ) +void RoundButton::keyPressEvent( TQKeyEvent * evt ) { evt->ignore(); } diff --git a/src/roundbutton.h b/src/roundbutton.h index 52432d4..50b1ca1 100644 --- a/src/roundbutton.h +++ b/src/roundbutton.h @@ -20,25 +20,25 @@ #ifndef ROUNDBUTTON_H #define ROUNDBUTTON_H -#include -#include +#include +#include #include #include #include class Menu; -class RoundButton : public QButton //well, there were round buttons in the begining at least *g* +class RoundButton : public TQButton //well, there were round buttons in the begining at least *g* { Q_OBJECT public: enum Type {Round, Commando, Submenu}; - RoundButton( QWidget* parent=0, unsigned short rad= 32, const char* name= 0, WFlags f = 0); + RoundButton( TQWidget* parent=0, unsigned short rad= 32, const char* name= 0, WFlags f = 0); ~RoundButton(); virtual void setRadius(int rad); - virtual void setIcon(const QString& path); + virtual void setIcon(const TQString& path); virtual void setActive(bool mode); //This method should not be called on a RoundButton instance. Childclasses have to implement it. @@ -57,16 +57,16 @@ class RoundButton : public QButton //well, there were round buttons in the begi protected: int radius; - QPixmap icon; - QString mIconPath; + TQPixmap icon; + TQString mIconPath; KPixmap background; KIconEffect mEffect; - virtual void keyPressEvent(QKeyEvent* evt); + virtual void keyPressEvent(TQKeyEvent* evt); - virtual void drawButtonLabel(QPainter*); - virtual void drawButton(QPainter*); - virtual bool event(QEvent* evt); + virtual void drawButtonLabel(TQPainter*); + virtual void drawButton(TQPainter*); + virtual bool event(TQEvent* evt); }; #endif diff --git a/src/servicemenu.cpp b/src/servicemenu.cpp index a1df8f8..272e453 100644 --- a/src/servicemenu.cpp +++ b/src/servicemenu.cpp @@ -21,23 +21,23 @@ #include #include -#include +#include #include #include #include #include -ServiceMenu::ServiceMenu(QObject *receiver, const char *slotActivatedItem, - const char *slotActivatedGroup, QWidget *parent, const char *name) - : KPopupMenu(parent, name), m_relPath(QString::null), +ServiceMenu::ServiceMenu(TQObject *receiver, const char *slotActivatedItem, + const char *slotActivatedGroup, TQWidget *parent, const char *name) + : KPopupMenu(parent, name), m_relPath(TQString::null), m_receiver(receiver), m_slotActivatedItem(slotActivatedItem), m_slotActivatedGroup(slotActivatedGroup) { initialize(); } -ServiceMenu::ServiceMenu(const QString & relPath, QObject *receiver, const char *slotActivatedItem, - const char *slotActivatedGroup, QWidget *parent, const char *name) +ServiceMenu::ServiceMenu(const TQString & relPath, TQObject *receiver, const char *slotActivatedItem, + const char *slotActivatedGroup, TQWidget *parent, const char *name) : KPopupMenu(parent, name), m_relPath(relPath), m_receiver(receiver), m_slotActivatedItem(slotActivatedItem), m_slotActivatedGroup(slotActivatedGroup) @@ -89,7 +89,7 @@ void ServiceMenu::createMenu() m_entryMap.insert(mid, static_cast(root)); insertSeparator(); - QStringList suppressGenericNames = root->suppressGenericNames(); + TQStringList suppressGenericNames = root->suppressGenericNames(); KServiceGroup::List::ConstIterator it = list.begin(); for (; it != list.end(); ++it) { @@ -106,7 +106,7 @@ void ServiceMenu::createMenu() if ((g->name().at(0) == '.')) continue; - QString groupCaption = g->caption(); + TQString groupCaption = g->caption(); // Item names may contain ampersands. To avoid them being converted // to accelerators, replace them with two ampersands. @@ -118,7 +118,7 @@ void ServiceMenu::createMenu() int newId = insertItem(getIconSet(g->icon()), groupCaption, m); m_entryMap.insert(newId, static_cast(g)); - // We have to delete the sub menu our selves! (See Qt docs.) + // We have to delete the sub menu our selves! (See TQt docs.) m_subMenus.append(m); } else if (e->isType(KST_KService)) { KService::Ptr s(static_cast(e)); @@ -129,12 +129,12 @@ void ServiceMenu::createMenu() } } -QIconSet ServiceMenu::getIconSet(const QString& icon) const +TQIconSet ServiceMenu::getIconSet(const TQString& icon) const { - QIconSet iconset; - QPixmap normal = KGlobal::instance()->iconLoader()->loadIcon( + TQIconSet iconset; + TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon( icon, KIcon::Small, 0, KIcon::DefaultState, 0L, true); - QPixmap active = KGlobal::instance()->iconLoader()->loadIcon( + TQPixmap active = KGlobal::instance()->iconLoader()->loadIcon( icon, KIcon::Small, 0, KIcon::ActiveState, 0L, true); // make sure they are not larger than 20x20 @@ -143,33 +143,33 @@ QIconSet ServiceMenu::getIconSet(const QString& icon) const if (active.width() > 20 || active.height() > 20) active.convertFromImage(active.convertToImage().smoothScale(20,20)); - iconset.setPixmap(normal, QIconSet::Small, QIconSet::Normal); - iconset.setPixmap(active, QIconSet::Small, QIconSet::Active); + iconset.setPixmap(normal, TQIconSet::Small, TQIconSet::Normal); + iconset.setPixmap(active, TQIconSet::Small, TQIconSet::Active); return iconset; } void ServiceMenu::insertMenuItem(KService::Ptr & s, - const QStringList *suppressGenericNames) + const TQStringList *suppressGenericNames) { // check for NoDisplay if (s->noDisplay()) return; - QString serviceName = s->name(); + TQString serviceName = s->name(); // ignore dotfiles. if ((serviceName.at(0) == '.')) return; // add comment /*if (KickerSettings::detailedMenuEntries()) { - QString comment = s->genericName(); + TQString comment = s->genericName(); if ( !comment.isEmpty() ) { if (KickerSettings::detailedEntriesNamesFirst()) { if (!suppressGenericNames || !suppressGenericNames->contains(s->untranslatedGenericName())) { - serviceName = QString( "%1 (%2)" ).arg( serviceName ).arg( comment ); + serviceName = TQString( "%1 (%2)" ).arg( serviceName ).arg( comment ); } } else - serviceName = QString( "%1 (%2)" ).arg( comment ).arg( serviceName ); + serviceName = TQString( "%1 (%2)" ).arg( comment ).arg( serviceName ); } } */ @@ -183,10 +183,10 @@ void ServiceMenu::insertMenuItem(KService::Ptr & s, // to accelerators, replace them with two ampersands. serviceName.replace("&", "&&"); - QIconSet iconset; - QPixmap normal = KGlobal::instance()->iconLoader()->loadIcon( + TQIconSet iconset; + TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon( s->icon(), KIcon::Small, 0, KIcon::DefaultState, 0L, true); - QPixmap active = KGlobal::instance()->iconLoader()->loadIcon( + TQPixmap active = KGlobal::instance()->iconLoader()->loadIcon( s->icon(), KIcon::Small, 0, KIcon::ActiveState, 0L, true); // make sure they are not larger than 20x20 @@ -195,8 +195,8 @@ void ServiceMenu::insertMenuItem(KService::Ptr & s, if (active.width() > 20 || active.height() > 20) active.convertFromImage(active.convertToImage().smoothScale(20,20)); - iconset.setPixmap(normal, QIconSet::Small, QIconSet::Normal); - iconset.setPixmap(active, QIconSet::Small, QIconSet::Active); + iconset.setPixmap(normal, TQIconSet::Small, TQIconSet::Normal); + iconset.setPixmap(active, TQIconSet::Small, TQIconSet::Active); int newId = insertItem(iconset, serviceName); m_entryMap.insert(newId, static_cast(s)); diff --git a/src/servicemenu.h b/src/servicemenu.h index 301add9..fafd25b 100644 --- a/src/servicemenu.h +++ b/src/servicemenu.h @@ -34,10 +34,10 @@ class ServiceMenu : public KPopupMenu { Q_OBJECT public: - ServiceMenu(QObject *receiver, const char *slotActivatedItem, - const char *slotActivatedGroup, QWidget *parent = 0, const char *name = 0); - ServiceMenu(const QString & relPath, QObject *receiver, const char *slotActivatedItem, - const char *slotActivatedGroup, QWidget *parent = 0, const char *name = 0); + ServiceMenu(TQObject *receiver, const char *slotActivatedItem, + const char *slotActivatedGroup, TQWidget *parent = 0, const char *name = 0); + ServiceMenu(const TQString & relPath, TQObject *receiver, const char *slotActivatedItem, + const char *slotActivatedGroup, TQWidget *parent = 0, const char *name = 0); ~ServiceMenu(); @@ -50,16 +50,16 @@ protected slots: void slotActivated(int id); private: - QIconSet getIconSet(const QString& icon) const; - QString m_relPath; - QPtrList m_subMenus; - QMap m_entryMap; - QObject *m_receiver; + TQIconSet getIconSet(const TQString& icon) const; + TQString m_relPath; + TQPtrList m_subMenus; + TQMap m_entryMap; + TQObject *m_receiver; const char *m_slotActivatedItem; const char *m_slotActivatedGroup; void initialize(); - void insertMenuItem(KService::Ptr &s, const QStringList *suppressGenericNames = 0); + void insertMenuItem(KService::Ptr &s, const TQStringList *suppressGenericNames = 0); }; #endif