Raw Qt->TQt conversion using tde/scripts/conversions/qt3-tqt3/convert_existing_qt3_app_to_tq

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/1/head
Michele Calgaro 1 year ago
parent 100a40e71a
commit 7665c8d3f7
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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 <<EOF
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <ntqglobal.h>
#include <ntqapplication.h>
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#include <ntqevent.h>
#include <ntqstring.h>
#include <ntqstyle.h>
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210
#if TQT_VERSION < 210
#error 1
#endif
EOF
@ -1107,8 +1107,8 @@ fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF
#include <qcursor.h>
#include <qstylefactory.h>
#include <ntqcursor.h>
#include <ntqstylefactory.h>
#include <private/qucomextra_p.h>
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 <qdom.h>
#include <ntqdom.h>
],
[
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 <qapplication.h>],
[#include <ntqapplication.h>],
[
int argc;
char** argv;
@ -4467,7 +4467,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include <qimageio.h>
#include <qstring.h>
#include <ntqstring.h>
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)

@ -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

@ -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 <<EOF
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <ntqglobal.h>
#include <ntqapplication.h>
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#include <ntqevent.h>
#include <ntqstring.h>
#include <ntqstyle.h>
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210
#if TQT_VERSION < 210
#error 1
#endif
EOF
@ -1107,8 +1107,8 @@ fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF
#include <qcursor.h>
#include <qstylefactory.h>
#include <ntqcursor.h>
#include <ntqstylefactory.h>
#include <private/qucomextra_p.h>
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 <qdom.h>
#include <ntqdom.h>
],
[
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 <qapplication.h>],
[#include <ntqapplication.h>],
[
int argc;
char** argv;
@ -4467,7 +4467,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include <qimageio.h>
#include <qstring.h>
#include <ntqstring.h>
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)

@ -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 <qwizard.h>,#include <kwizard.h>,g\" >> $source.h ;\n";
$dep_lines .= "\t\$(UIC) $sourcedir$source.ui | \$(PERL) -pi -e \"s,public QWizard,public KWizard,g; s,#include <ntqwizard.h>,#include <kwizard.h>,g\" >> $source.h ;\n";
} else {
$dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n";
}

54
configure vendored

@ -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 <<EOF
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <ntqglobal.h>
#include <ntqapplication.h>
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#include <ntqevent.h>
#include <ntqstring.h>
#include <ntqstyle.h>
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210
#if TQT_VERSION < 210
#error 1
#endif
EOF
@ -29708,8 +29708,8 @@ fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF
#include <qcursor.h>
#include <qstylefactory.h>
#include <ntqcursor.h>
#include <ntqstylefactory.h>
#include <private/qucomextra_p.h>
EOF
fi
@ -29856,19 +29856,19 @@ export LIBRARY_PATH
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <ntqglobal.h>
#include <ntqapplication.h>
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#include <ntqevent.h>
#include <ntqstring.h>
#include <ntqstyle.h>
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210
#if TQT_VERSION < 210
#error 1
#endif
EOF
@ -29877,8 +29877,8 @@ fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF
#include <qcursor.h>
#include <qstylefactory.h>
#include <ntqcursor.h>
#include <ntqstylefactory.h>
#include <private/qucomextra_p.h>
EOF
fi
@ -30283,7 +30283,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <qapplication.h>
#include <ntqapplication.h>
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=: ;;

2
debian/control vendored

@ -2,7 +2,7 @@ Source: kommando
Section: kde
Priority: optional
Maintainer: Sune Vuorela <debian@pusling.com>
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

@ -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 <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+#include <ntqglobal.h>
+#include <ntqapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+#include <ntqevent.h>
+#include <ntqstring.h>
+#include <ntqstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#if TQT_VERSION < 210
+#error 1
+#endif
+EOF
@ -33860,8 +33860,8 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <ntqcursor.h>
+#include <ntqstylefactory.h>
+#include <private/qucomextra_p.h>
+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 <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+#include <ntqglobal.h>
+#include <ntqapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+#include <ntqevent.h>
+#include <ntqstring.h>
+#include <ntqstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#if TQT_VERSION < 210
+#error 1
+#endif
+EOF
@ -34028,8 +34028,8 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.0 kommando-0.5.1/autom4te.ca
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <ntqcursor.h>
+#include <ntqstylefactory.h>
+#include <private/qucomextra_p.h>
+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 <qapplication.h>
+#include <ntqapplication.h>
+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 <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+#include <ntqglobal.h>
+#include <ntqapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+#include <ntqevent.h>
+#include <ntqstring.h>
+#include <ntqstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#if TQT_VERSION < 210
+#error 1
+#endif
+EOF
@ -68308,8 +68308,8 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <ntqcursor.h>
+#include <ntqstylefactory.h>
+#include <private/qucomextra_p.h>
+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 <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+#include <ntqglobal.h>
+#include <ntqapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+#include <ntqevent.h>
+#include <ntqstring.h>
+#include <ntqstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#if TQT_VERSION < 210
+#error 1
+#endif
+EOF
@ -68476,8 +68476,8 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/output.1 kommando-0.5.1/autom4te.ca
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <ntqcursor.h>
+#include <ntqstylefactory.h>
+#include <private/qucomextra_p.h>
+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 <qapplication.h>
+#include <ntqapplication.h>
+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 <<EOF
+#include "confdefs.h"
+#include <qglobal.h>
+#include <qapplication.h>
+#include <ntqglobal.h>
+#include <ntqapplication.h>
+EOF
+if test "$kde_qtver" = "2"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qevent.h>
+#include <qstring.h>
+#include <qstyle.h>
+#include <ntqevent.h>
+#include <ntqstring.h>
+#include <ntqstyle.h>
+EOF
+
+if test $kde_qtsubver -gt 0; then
+cat >> conftest.$ac_ext <<EOF
+#if QT_VERSION < 210
+#if TQT_VERSION < 210
+#error 1
+#endif
+EOF
@ -74707,8 +74707,8 @@ diff -urN kommando-0.5.1.orig/autom4te.cache/traces.0 kommando-0.5.1/autom4te.ca
+
+if test "$kde_qtver" = "3"; then
+cat >> conftest.$ac_ext <<EOF
+#include <qcursor.h>
+#include <qstylefactory.h>
+#include <ntqcursor.h>
+#include <ntqstylefactory.h>
+#include <private/qucomextra_p.h>
+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 <qdom.h>
+ #include <ntqdom.h>
+ ],
+ [
+ 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 <qapplication.h>],
+[#include <ntqapplication.h>],
+ [
+ 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 <qimageio.h>
+#include <qstring.h>
+#include <ntqstring.h>
+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=: ;;

4
debian/rules vendored

@ -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

@ -158,17 +158,17 @@ patent issues. -->
<para>It slices! It dices! and it comes with a free toaster!</para>
<para>
The Squiggle Tool <guiicon><inlinemediaobject>
The Stquiggle Tool <guiicon><inlinemediaobject>
<imageobject>
<imagedata fileref="squiggle.png" format="PNG"/>
<imagedata fileref="stquiggle.png" format="PNG"/>
</imageobject>
<imageobject>
<imagedata fileref="squiggle.eps" format="EPS"/>
<imagedata fileref="stquiggle.eps" format="EPS"/>
</imageobject>
<textobject>
<phrase>Squiggle</phrase>
<phrase>Stquiggle</phrase>
</textobject>
</inlinemediaobject></guiicon> is used to draw squiggly lines all over
</inlinemediaobject></guiicon> is used to draw stquiggly lines all over
the &kommando; main window. It's not a bug, it's a feature!
</para>
@ -441,7 +441,7 @@ Program copyright 2005 Daniel Stöckel <email>the_docter@gmx.net</email>
<para>
Contributors:
<itemizedlist>
<listitem><para>Konqui the KDE Dragon <email>konqui@kde.org</email></para>
<listitem><para>Kontqui the KDE Dragon <email>konqui@kde.org</email></para>
</listitem>
<listitem><para>Tux the Linux Penguin <email>tux@linux.org</email></para>
</listitem>

@ -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 <qwizard.h>,#include <kwizard.h>,g" >> configdialog.h ;
$(UIC) $(srcdir)/configdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <ntqwizard.h>,#include <kwizard.h>,g" >> configdialog.h ;
configdialog.moc: configdialog.h
$(MOC) configdialog.h -o configdialog.moc

@ -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);

@ -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:

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConfigDialog</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>ConfigDialog</cstring>
</property>
@ -19,23 +19,23 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QSplitter">
<widget class="TQSplitter">
<property name="name">
<cstring>splitter12</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<widget class="QListBox">
<widget class="TQListBox">
<property name="name">
<cstring>listBox</cstring>
</property>
</widget>
<widget class="QWidgetStack">
<widget class="TQWidgetStack">
<property name="name">
<cstring>pages</cstring>
</property>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>menuPage</cstring>
</property>
@ -49,7 +49,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QFrame">
<widget class="TQFrame">
<property name="name">
<cstring>MenuFrame</cstring>
</property>
@ -63,7 +63,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget" row="2" column="0">
<widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
<cstring>layout8</cstring>
</property>
@ -74,7 +74,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -82,7 +82,7 @@
<string>Command:</string>
</property>
</widget>
<widget class="QLineEdit">
<widget class="TQLineEdit">
<property name="name">
<cstring>commandoEdit</cstring>
</property>
@ -92,7 +92,7 @@
</widget>
</hbox>
</widget>
<widget class="QPushButton" row="0" column="2">
<widget class="TQPushButton" row="0" column="2">
<property name="name">
<cstring>removeListView</cstring>
</property>
@ -100,12 +100,12 @@
<string>Remove</string>
</property>
</widget>
<widget class="QComboBox" row="0" column="0">
<widget class="TQComboBox" row="0" column="0">
<property name="name">
<cstring>menuViewComboBox</cstring>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>newListView</cstring>
</property>
@ -113,7 +113,7 @@
<string>Ne&amp;w</string>
</property>
</widget>
<widget class="QLayoutWidget" row="1" column="1" rowspan="1" colspan="2">
<widget class="TQLayoutWidget" row="1" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>layout11</cstring>
</property>
@ -121,7 +121,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>addMenu</cstring>
</property>
@ -129,7 +129,7 @@
<string>Add Menu</string>
</property>
</widget>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>addButton</cstring>
</property>
@ -137,7 +137,7 @@
<string>Add &amp;Button</string>
</property>
</widget>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>addService</cstring>
</property>
@ -145,7 +145,7 @@
<string>&amp;From KMenu</string>
</property>
</widget>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>remove</cstring>
</property>
@ -173,7 +173,7 @@
</size>
</property>
</spacer>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>buttonUp</cstring>
</property>
@ -181,7 +181,7 @@
<string>&amp;Up</string>
</property>
</widget>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>buttonDown</cstring>
</property>
@ -206,7 +206,7 @@
</size>
</property>
</spacer>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout7</cstring>
</property>
@ -231,7 +231,7 @@
</size>
</property>
</spacer>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout6</cstring>
</property>
@ -239,7 +239,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@ -310,7 +310,7 @@
</size>
</property>
</spacer>
<widget class="QWidgetStack" row="1" column="0">
<widget class="TQWidgetStack" row="1" column="0">
<property name="name">
<cstring>lists</cstring>
</property>
@ -320,7 +320,7 @@
<height>0</height>
</size>
</property>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>WStackPage</cstring>
</property>
@ -333,7 +333,7 @@
</widget>
</hbox>
</widget>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>shortcutPage</cstring>
</property>
@ -347,7 +347,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QFrame">
<widget class="TQFrame">
<property name="name">
<cstring>shortcutFrame</cstring>
</property>
@ -369,7 +369,7 @@
<string>N&amp;one</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@ -432,7 +432,7 @@
</widget>
</hbox>
</widget>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>colorPage</cstring>
</property>
@ -446,7 +446,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QFrame">
<widget class="TQFrame">
<property name="name">
<cstring>colorFrame</cstring>
</property>
@ -460,7 +460,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout10</cstring>
</property>
@ -468,7 +468,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@ -510,7 +510,7 @@
</spacer>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout11</cstring>
</property>
@ -518,7 +518,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@ -526,7 +526,7 @@
<string>Opacity:</string>
</property>
</widget>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@ -539,7 +539,7 @@
<string>&lt;font size="-1"&gt;Transparent&lt;/font&gt;</string>
</property>
</widget>
<widget class="QSlider">
<widget class="TQSlider">
<property name="name">
<cstring>opacitySlider</cstring>
</property>
@ -553,7 +553,7 @@
<enum>Horizontal</enum>
</property>
</widget>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1_4_2</cstring>
</property>
@ -582,7 +582,7 @@
<enum>Horizontal</enum>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout12</cstring>
</property>
@ -590,7 +590,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1_7</cstring>
</property>
@ -598,7 +598,7 @@
<string>Scheme:</string>
</property>
</widget>
<widget class="QComboBox">
<widget class="TQComboBox">
<item>
<property name="text">
<string>Tiny</string>
@ -642,7 +642,7 @@
</spacer>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout14</cstring>
</property>
@ -667,7 +667,7 @@
</size>
</property>
</spacer>
<widget class="QSpinBox" row="1" column="2">
<widget class="TQSpinBox" row="1" column="2">
<property name="name">
<cstring>menuRadiusSpinbox</cstring>
</property>
@ -681,7 +681,7 @@
<number>30</number>
</property>
</widget>
<widget class="QComboBox" row="2" column="2">
<widget class="TQComboBox" row="2" column="2">
<item>
<property name="text">
<string>16</string>
@ -722,7 +722,7 @@
<number>2</number>
</property>
</widget>
<widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
<widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1_5</cstring>
</property>
@ -730,7 +730,7 @@
<string>Menu Radius:</string>
</property>
</widget>
<widget class="QCheckBox" row="0" column="0">
<widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>customCheckbox</cstring>
</property>
@ -744,7 +744,7 @@
<string>Alt+T</string>
</property>
</widget>
<widget class="QLabel" row="1" column="3">
<widget class="TQLabel" row="1" column="3">
<property name="name">
<cstring>textLabel1_8</cstring>
</property>
@ -752,7 +752,7 @@
<string>px</string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
@ -760,7 +760,7 @@
<string>Menubutton size:</string>
</property>
</widget>
<widget class="QComboBox" row="3" column="2">
<widget class="TQComboBox" row="3" column="2">
<item>
<property name="text">
<string>16</string>
@ -818,7 +818,7 @@
</size>
</property>
</spacer>
<widget class="QLabel" row="3" column="0" rowspan="1" colspan="2">
<widget class="TQLabel" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1_6</cstring>
</property>
@ -870,15 +870,15 @@
<connections>
<connection>
<sender>navButtonSize</sender>
<signal>activated(const QString&amp;)</signal>
<signal>activated(const TQString&amp;)</signal>
<receiver>ConfigDialog</receiver>
<slot>slotNavButtonSizeChanged(const QString&amp;)</slot>
<slot>slotNavButtonSizeChanged(const TQString&amp;)</slot>
</connection>
<connection>
<sender>kColorButton1</sender>
<signal>changed(const QColor&amp;)</signal>
<signal>changed(const TQColor&amp;)</signal>
<receiver>ConfigDialog</receiver>
<slot>slotColorButtonClicked(const QColor&amp;)</slot>
<slot>slotColorButtonClicked(const TQColor&amp;)</slot>
</connection>
<connection>
<sender>addButton</sender>
@ -900,27 +900,27 @@
</connection>
<connection>
<sender>listBox</sender>
<signal>clicked(QListBoxItem*)</signal>
<signal>clicked(TQListBoxItem*)</signal>
<receiver>ConfigDialog</receiver>
<slot>slotListBoxClicked(QListBoxItem*)</slot>
<slot>slotListBoxClicked(TQListBoxItem*)</slot>
</connection>
<connection>
<sender>iconButton</sender>
<signal>iconChanged(QString)</signal>
<signal>iconChanged(TQString)</signal>
<receiver>ConfigDialog</receiver>
<slot>slotNewIcon()</slot>
</connection>
<connection>
<sender>commandoEdit</sender>
<signal>textChanged(const QString&amp;)</signal>
<signal>textChanged(const TQString&amp;)</signal>
<receiver>ConfigDialog</receiver>
<slot>slotCommandoTyped(const QString&amp;)</slot>
<slot>slotCommandoTyped(const TQString&amp;)</slot>
</connection>
<connection>
<sender>schemeCombobox</sender>
<signal>activated(const QString&amp;)</signal>
<signal>activated(const TQString&amp;)</signal>
<receiver>ConfigDialog</receiver>
<slot>slotSchemeComboboxChanged(const QString&amp;)</slot>
<slot>slotSchemeComboboxChanged(const TQString&amp;)</slot>
</connection>
<connection>
<sender>customCheckbox</sender>
@ -942,9 +942,9 @@
</connection>
<connection>
<sender>menuButtonSize</sender>
<signal>activated(const QString&amp;)</signal>
<signal>activated(const TQString&amp;)</signal>
<receiver>ConfigDialog</receiver>
<slot>slotMenuButtonSizeChanged(const QString&amp;)</slot>
<slot>slotMenuButtonSizeChanged(const TQString&amp;)</slot>
</connection>
<connection>
<sender>buttonUp</sender>
@ -960,9 +960,9 @@
</connection>
<connection>
<sender>menuViewComboBox</sender>
<signal>activated(const QString&amp;)</signal>
<signal>activated(const TQString&amp;)</signal>
<receiver>ConfigDialog</receiver>
<slot>slotChangeListView(const QString&amp;)</slot>
<slot>slotChangeListView(const TQString&amp;)</slot>
</connection>
<connection>
<sender>newListView</sender>
@ -978,24 +978,24 @@
</connection>
</connections>
<slots>
<slot access="protected">slotListBoxClicked(QListBoxItem* item)</slot>
<slot access="protected">slotListBoxClicked(TQListBoxItem* item)</slot>
<slot access="protected">slotAddMenuClicked()</slot>
<slot access="protected">slotCommandoTyped(const QString&amp; commando)</slot>
<slot access="protected">slotCommandoTyped(const TQString&amp; commando)</slot>
<slot access="protected">slotRemoveClicked()</slot>
<slot access="protected">slotNewIcon()</slot>
<slot access="protected">slotAddButtonClicked()</slot>
<slot access="protected">slotApplyClicked()</slot>
<slot access="protected">slotResetClicked()</slot>
<slot access="protected">slotSchemeComboboxChanged(const QString&amp;)</slot>
<slot access="protected">slotSchemeComboboxChanged(const TQString&amp;)</slot>
<slot access="protected">slotCustomSizeCheckboxToggled(bool)</slot>
<slot access="protected">slotColorButtonClicked(const QColor&amp; color)</slot>
<slot access="protected">slotColorButtonClicked(const TQColor&amp; color)</slot>
<slot access="protected">slotOpacitySliderChanged(int value)</slot>
<slot access="protected">slotMenuButtonSizeChanged(const QString&amp;)</slot>
<slot access="protected">slotNavButtonSizeChanged(const QString&amp;)</slot>
<slot access="protected">slotMenuButtonSizeChanged(const TQString&amp;)</slot>
<slot access="protected">slotNavButtonSizeChanged(const TQString&amp;)</slot>
<slot access="protected">slotMenuRadiusSpinboxChanged(int)</slot>
<slot access="protected">slotButtonUpPressed()</slot>
<slot access="protected">slotButtonDownPressed()</slot>
<slot>slotChangeListView(const QString&amp;)</slot>
<slot>slotChangeListView(const TQString&amp;)</slot>
<slot>slotNewListViewClicked()</slot>
<slot>slotRemoveListViewClicked()</slot>
</slots>

@ -30,14 +30,14 @@
#include <kapplication.h>
#include <dcopclient.h>
#include <qslider.h>
#include <qcombobox.h>
#include <qregexp.h>
#include <qspinbox.h>
#include <qlineedit.h>
#include <qmessagebox.h>
#include <qcheckbox.h>
#include <qwidgetstack.h>
#include <ntqslider.h>
#include <ntqcombobox.h>
#include <ntqregexp.h>
#include <ntqspinbox.h>
#include <ntqlineedit.h>
#include <ntqmessagebox.h>
#include <ntqcheckbox.h>
#include <ntqwidgetstack.h>
#include "menulistviewitem.h"
#include "servicemenu.h"
@ -47,16 +47,16 @@
#include <X11/Xlib.h>
#include <fixx11h.h>
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<MenuListViewItem*>(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<MenuListViewItem*>(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<QMouseEvent*>(evt)->button()){
case Qt::LeftButton:
case TQEvent::MouseButtonPress:
switch(static_cast<TQMouseEvent*>(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<QKeyEvent*>(evt)->key() == Qt::Key_Escape){
case TQEvent::KeyPress:
if(static_cast<TQKeyEvent*>(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;

@ -27,7 +27,7 @@
#include "configdialog.h"
#include <qptrlist.h>
#include <ntqptrlist.h>
#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();

@ -19,10 +19,10 @@
***************************************************************************/
#include "configuration.h"
#include <qfile.h>
#include <qwidgetstack.h>
#include <qobjectlist.h>
#include <qdir.h>
#include <ntqfile.h>
#include <ntqwidgetstack.h>
#include <ntqobjectlist.h>
#include <ntqdir.h>
#include <kstandarddirs.h>
#include <kshell.h>
@ -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<MenuListViewItem*>(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<QWidget*>(*it));
listViewParent->removeWidget(static_cast<TQWidget*>(*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<Menu> topLevelMenus;
TQPtrList<Menu> 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<MenuListViewItem*>(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)){

@ -20,14 +20,14 @@
#ifndef CONFIG_H
#define CONFIG_H
#include <qdom.h>
#include <ntqdom.h>
#include <menulistviewitem.h>
#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<int>(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

@ -19,7 +19,7 @@
***************************************************************************/
#include <qlayout.h>
#include <ntqlayout.h>
#include <klocale.h>
#include <kglobal.h>
@ -35,10 +35,10 @@ static const char description[] =
static const char version[] = "0.5.2";
typedef KGenericFactory<KCMKommando, QWidget> kommandoFactory;
typedef KGenericFactory<KCMKommando, TQWidget> 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.");
}

@ -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:

@ -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<Menu>& newmenus )
void Kommando::setTopLevelMenus( const TQPtrList<Menu>& 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();
}

@ -22,14 +22,14 @@
#ifndef _KOMMANDO_H_
#define _KOMMANDO_H_
#include <qwidget.h>
#include <qptrlist.h>
#include <ntqwidget.h>
#include <ntqptrlist.h>
#include <kpixmap.h>
#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<Menu>& newmenus);
virtual void setTopLevelMenus(const TQPtrList<Menu>& 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<Menu> mTopLevelMenus;
TQPtrList<Menu> 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();

@ -18,16 +18,16 @@
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <qmessagebox.h>
#include <qdir.h>
#include <ntqmessagebox.h>
#include <ntqdir.h>
#include <klocale.h>
#include <qmessagebox.h>
#include <ntqmessagebox.h>
#include <kdebug.h>
#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);
}

@ -33,7 +33,7 @@ class KommandoDaemon : public KDEDModule
K_DCOP
public:
KommandoDaemon(const QCString &obj);
KommandoDaemon(const TQCString &obj);
~KommandoDaemon();
k_dcop:

@ -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<KommandoView>()
: TQPtrList<KommandoView>()
{
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){

@ -20,33 +20,33 @@
#ifndef KOMMANDOVIEW_H
#define KOMMANDOVIEW_H
#include <qlistview.h>
#include <ntqlistview.h>
/**
@author Daniel Stöckel <the_docter@gmx.net>
*/
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<KommandoView>
class KommandoViewList : public TQPtrList<KommandoView>
{
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);
};

@ -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<count();++i)
{
QButton* temp = find(i);
TQButton* temp = find(i);
remove(temp);
delete temp;
}
@ -96,7 +96,7 @@ void Menu::selectButton( int num )
}
}
QButton * Menu::selectedButton( )
TQButton * Menu::selectedButton( )
{
if(mSelectedButtonNum<0){
return NULL;
@ -104,7 +104,7 @@ QButton * Menu::selectedButton( )
return find(mSelectedButtonNum);
}
int Menu::insert( QButton * button, int id )
int Menu::insert( TQButton * button, int id )
{
RoundButton* rButton = static_cast<RoundButton*>(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<SubmenuButton*>(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<RoundButton*>(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));
}

@ -20,8 +20,8 @@
#ifndef MENU_H
#define MENU_H
#include <qbuttongroup.h>
#include <qptrlist.h>
#include <ntqbuttongroup.h>
#include <ntqptrlist.h>
#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<Menu> children;
TQString mIconPath;
TQPtrList<Menu> children;
int mSelectedButtonNum;
QString mAppName;
TQString mAppName;
protected slots:
void slotMouseIn(RoundButton* emitter);

@ -21,14 +21,14 @@
#include <kiconloader.h>
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)

@ -20,29 +20,29 @@
#ifndef MENULISTVIEWITEM_H
#define MENULISTVIEWITEM_H
#include <qlistview.h>
#include <ntqlistview.h>
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

@ -22,16 +22,16 @@
#include <kiconloader.h>
#include <kpixmapeffect.h>
#include <qbitmap.h>
#include <ntqbitmap.h>
#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<Kommando*>(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();
}

@ -20,25 +20,25 @@
#ifndef ROUNDBUTTON_H
#define ROUNDBUTTON_H
#include <qbutton.h>
#include <qpainter.h>
#include <ntqbutton.h>
#include <ntqpainter.h>
#include <kiconeffect.h>
#include <kpixmap.h>
#include <cassert>
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

@ -21,23 +21,23 @@
#include <kglobal.h>
#include <klocale.h>
#include <qimage.h>
#include <ntqimage.h>
#include <kiconloader.h>
#include <kservicegroup.h>
#include <ksycoca.h>
#include <kdebug.h>
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<KSycocaEntry*>(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<KSycocaEntry*>(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<KService *>(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<KSycocaEntry*>(s));

@ -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<QPopupMenu> m_subMenus;
QMap<int, KSycocaEntry::Ptr> m_entryMap;
QObject *m_receiver;
TQIconSet getIconSet(const TQString& icon) const;
TQString m_relPath;
TQPtrList<TQPopupMenu> m_subMenus;
TQMap<int, KSycocaEntry::Ptr> 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

Loading…
Cancel
Save