Qt3->TQt conversion.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/1/head
Mavridis Philippe 3 years ago
parent 1bd3c5b42f
commit d991b7f387
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -1033,7 +1033,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes="" x_includes=""
x_libraries="" x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then 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 tqglobal.h doesn't *have* to
dnl be included to get the information) --Sam dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@ -1065,19 +1065,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
AC_REQUIRE([KDE_USE_QT]) AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <tqglobal.h>
#include <qapplication.h> #include <tqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <tqevent.h>
#include <qstring.h> #include <tqstring.h>
#include <qstyle.h> #include <tqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -1086,8 +1086,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <tqcursor.h>
#include <qstylefactory.h> #include <tqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -1170,22 +1170,22 @@ fi
if test -z "$3"; then if test -z "$3"; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300" kde_qt_verstring="TQT_VERSION >= 300"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then 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 fi
else else
kde_qt_verstring="$3" kde_qt_verstring="$3"
@ -1291,7 +1291,7 @@ AC_ARG_ENABLE(
USING_QT_MT="" USING_QT_MT=""
dnl ------------------------------------------------------------------------ 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 ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS= KDE_MT_LDFLAGS=
@ -1354,7 +1354,7 @@ dnl ------------------------------------------------------------
fi fi
dnl ------------------------------------------------------------------------ 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 ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then if test "x$kde_use_qt_mt" = "xyes"; then
@ -1425,9 +1425,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=tqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=tqglobal.h
fi fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@ -1979,7 +1979,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([ AC_TRY_LINK([
#include <qdom.h> #include <tqdom.h>
], ],
[ [
QDomDocument doc; QDomDocument doc;
@ -2498,7 +2498,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK( AC_TRY_LINK(
[#include <qapplication.h>], [#include <tqapplication.h>],
[ [
int argc; int argc;
char** argv; char** argv;
@ -4205,7 +4205,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl AC_TRY_RUN(dnl
[ [
#include <qimageio.h> #include <qimageio.h>
#include <qstring.h> #include <tqstring.h>
int main() { int main() {
QString t = "hallo"; QString t = "hallo";
t.fill('t'); t.fill('t');
@ -4989,7 +4989,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir" kde_qtdir="$with_qt_dir"
fi 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(tqsql.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_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR) AC_SUBST(QTDOCDIR)
@ -5010,7 +5010,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER) AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no 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/tqsql.html; then
KDE_HAS_DOXYGEN=yes KDE_HAS_DOXYGEN=yes
fi fi
AC_SUBST(KDE_HAS_DOXYGEN) AC_SUBST(KDE_HAS_DOXYGEN)

@ -689,7 +689,7 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*) | --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;; 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 | --silent | --silen | --sile | --sil)
silent=yes ;; silent=yes ;;
@ -1265,7 +1265,7 @@ do
do do
case $ac_arg in case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -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) | -silent | --silent | --silen | --sile | --sil)
continue ;; continue ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
@ -21276,22 +21276,22 @@ fi
if test -z ""; then if test -z ""; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300" kde_qt_verstring="TQT_VERSION >= 300"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then 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 fi
else else
kde_qt_verstring="" kde_qt_verstring=""
@ -28456,9 +28456,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=tqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=tqglobal.h
fi fi
@ -28527,19 +28527,19 @@ LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <tqglobal.h>
#include <qapplication.h> #include <tqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <tqevent.h>
#include <qstring.h> #include <tqstring.h>
#include <qstyle.h> #include <tqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -28548,8 +28548,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <tqcursor.h>
#include <qstylefactory.h> #include <tqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -28696,19 +28696,19 @@ export LIBRARY_PATH
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <tqglobal.h>
#include <qapplication.h> #include <tqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <tqevent.h>
#include <qstring.h> #include <tqstring.h>
#include <qstyle.h> #include <tqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -28717,8 +28717,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <tqcursor.h>
#include <qstylefactory.h> #include <tqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -29117,7 +29117,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <qapplication.h> #include <tqapplication.h>
int int
main () main ()
{ {
@ -32134,7 +32134,7 @@ Try \`$0 --help' for more information." >&2;}
$ac_shift $ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;; 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) | -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;; ac_cs_silent=: ;;

@ -689,7 +689,7 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*) | --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;; 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 | --silent | --silen | --sile | --sil)
silent=yes ;; silent=yes ;;
@ -1265,7 +1265,7 @@ do
do do
case $ac_arg in case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -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) | -silent | --silent | --silen | --sile | --sil)
continue ;; continue ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
@ -21276,22 +21276,22 @@ fi
if test -z ""; then if test -z ""; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300" kde_qt_verstring="TQT_VERSION >= 300"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then 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 fi
else else
kde_qt_verstring="" kde_qt_verstring=""
@ -28456,9 +28456,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=tqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=tqglobal.h
fi fi
@ -28527,19 +28527,19 @@ LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <tqglobal.h>
#include <qapplication.h> #include <tqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <tqevent.h>
#include <qstring.h> #include <tqstring.h>
#include <qstyle.h> #include <tqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -28548,8 +28548,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <tqcursor.h>
#include <qstylefactory.h> #include <tqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -28696,19 +28696,19 @@ export LIBRARY_PATH
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <tqglobal.h>
#include <qapplication.h> #include <tqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <tqevent.h>
#include <qstring.h> #include <tqstring.h>
#include <qstyle.h> #include <tqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -28717,8 +28717,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <tqcursor.h>
#include <qstylefactory.h> #include <tqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -29117,7 +29117,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <qapplication.h> #include <tqapplication.h>
int int
main () main ()
{ {
@ -32134,7 +32134,7 @@ Try \`$0 --help' for more information." >&2;}
$ac_shift $ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;; 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) | -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;; ac_cs_silent=: ;;

@ -1440,7 +1440,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes="" x_includes=""
x_libraries="" x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then 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 tqglobal.h doesn't *have* to
dnl be included to get the information) --Sam dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@ -1470,19 +1470,19 @@ m4trace:acinclude.m4:1124: -1- AC_DEFUN([KDE_PRINT_QT_PROGRAM], [
AC_REQUIRE([KDE_USE_QT]) AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <tqglobal.h>
#include <qapplication.h> #include <tqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <tqevent.h>
#include <qstring.h> #include <tqstring.h>
#include <qstyle.h> #include <tqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -1491,8 +1491,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <tqcursor.h>
#include <qstylefactory.h> #include <tqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -1573,22 +1573,22 @@ fi
if test -z "$3"; then if test -z "$3"; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300" kde_qt_verstring="TQT_VERSION >= 300"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then 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 fi
else else
kde_qt_verstring="$3" kde_qt_verstring="$3"
@ -1684,7 +1684,7 @@ AC_ARG_ENABLE(
USING_QT_MT="" USING_QT_MT=""
dnl ------------------------------------------------------------------------ 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 ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS= KDE_MT_LDFLAGS=
@ -1747,7 +1747,7 @@ dnl ------------------------------------------------------------
fi fi
dnl ------------------------------------------------------------------------ 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 ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then if test "x$kde_use_qt_mt" = "xyes"; then
@ -1818,9 +1818,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=tqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=tqglobal.h
fi fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@ -2347,7 +2347,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([ AC_TRY_LINK([
#include <qdom.h> #include <tqdom.h>
], ],
[ [
QDomDocument doc; QDomDocument doc;
@ -2825,7 +2825,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK( AC_TRY_LINK(
[#include <qapplication.h>], [#include <tqapplication.h>],
[ [
int argc; int argc;
char** argv; char** argv;
@ -4393,7 +4393,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl AC_TRY_RUN(dnl
[ [
#include <qimageio.h> #include <qimageio.h>
#include <qstring.h> #include <tqstring.h>
int main() { int main() {
QString t = "hallo"; QString t = "hallo";
t.fill('t'); t.fill('t');
@ -5040,7 +5040,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir" kde_qtdir="$with_qt_dir"
fi 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(tqsql.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_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR) AC_SUBST(QTDOCDIR)
@ -5061,7 +5061,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER) AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no 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/tqsql.html; then
KDE_HAS_DOXYGEN=yes KDE_HAS_DOXYGEN=yes
fi fi
AC_SUBST(KDE_HAS_DOXYGEN) AC_SUBST(KDE_HAS_DOXYGEN)

54
configure vendored

@ -689,7 +689,7 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*) | --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;; 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 | --silent | --silen | --sile | --sil)
silent=yes ;; silent=yes ;;
@ -1265,7 +1265,7 @@ do
do do
case $ac_arg in case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -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) | -silent | --silent | --silen | --sile | --sil)
continue ;; continue ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
@ -21276,22 +21276,22 @@ fi
if test -z ""; then if test -z ""; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300" kde_qt_verstring="TQT_VERSION >= 300"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then 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 fi
else else
kde_qt_verstring="" kde_qt_verstring=""
@ -28456,9 +28456,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=tqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=tqglobal.h
fi fi
@ -28527,19 +28527,19 @@ LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <tqglobal.h>
#include <qapplication.h> #include <tqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <tqevent.h>
#include <qstring.h> #include <tqstring.h>
#include <qstyle.h> #include <tqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -28548,8 +28548,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <tqcursor.h>
#include <qstylefactory.h> #include <tqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -28696,19 +28696,19 @@ export LIBRARY_PATH
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <tqglobal.h>
#include <qapplication.h> #include <tqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <tqevent.h>
#include <qstring.h> #include <tqstring.h>
#include <qstyle.h> #include <tqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -28717,8 +28717,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <tqcursor.h>
#include <qstylefactory.h> #include <tqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -29117,7 +29117,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <qapplication.h> #include <tqapplication.h>
int int
main () main ()
{ {
@ -32134,7 +32134,7 @@ Try \`$0 --help' for more information." >&2;}
$ac_shift $ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;; 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) | -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;; ac_cs_silent=: ;;

@ -158,17 +158,17 @@ patent issues. -->
<para>It slices! It dices! and it comes with a free toaster!</para> <para>It slices! It dices! and it comes with a free toaster!</para>
<para> <para>
The Squiggle Tool <guiicon><inlinemediaobject> The Stquiggle Tool <guiicon><inlinemediaobject>
<imageobject> <imageobject>
<imagedata fileref="squiggle.png" format="PNG"/> <imagedata fileref="stquiggle.png" format="PNG"/>
</imageobject> </imageobject>
<imageobject> <imageobject>
<imagedata fileref="squiggle.eps" format="EPS"/> <imagedata fileref="stquiggle.eps" format="EPS"/>
</imageobject> </imageobject>
<textobject> <textobject>
<phrase>Squiggle</phrase> <phrase>Stquiggle</phrase>
</textobject> </textobject>
</inlinemediaobject></guiicon> is used to draw squiggly lines all over </inlinemediaobject></guiicon> is used to draw stquiggly lines all over
the &kompose; main window. It's not a bug, it's a feature! the &kompose; main window. It's not a bug, it's a feature!
</para> </para>
@ -441,7 +441,7 @@ Program copyright 2004 Hans Oischinger <email>oisch&#64;sourceforge&#46;net</ema
<para> <para>
Contributors: Contributors:
<itemizedlist> <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>
<listitem><para>Tux the Linux Penguin <email>tux@linux.org</email></para> <listitem><para>Tux the Linux Penguin <email>tux@linux.org</email></para>
</listitem> </listitem>

@ -212,19 +212,19 @@ msgstr "Activar automáticamente cuando el ratón sea colocado sobre"
#: komposepreferences.cpp:128 #: komposepreferences.cpp:128
msgid "Top-left corner" msgid "Top-left corner"
msgstr "Esquina superior izquierda" msgstr "Estquina superior iztquierda"
#: komposepreferences.cpp:130 #: komposepreferences.cpp:130
msgid "Top-right corner" msgid "Top-right corner"
msgstr "Esquina superior derecha" msgstr "Estquina superior derecha"
#: komposepreferences.cpp:132 #: komposepreferences.cpp:132
msgid "Bottom-left corner" msgid "Bottom-left corner"
msgstr "Esquina inferior izquierda" msgstr "Estquina inferior iztquierda"
#: komposepreferences.cpp:134 #: komposepreferences.cpp:134
msgid "Bottom-right corner" msgid "Bottom-right corner"
msgstr "Esquina inferior derecha" msgstr "Estquina inferior derecha"
#: komposepreferences.cpp:137 #: komposepreferences.cpp:137
msgid "Top edge" msgid "Top edge"
@ -252,7 +252,7 @@ msgid ""
"until auto-activation." "until auto-activation."
msgstr "" msgstr ""
"Indica el tiempo en ms que el puntero del ratón debe permanecer en la " "Indica el tiempo en ms que el puntero del ratón debe permanecer en la "
"esquina para la activación automática." "estquina para la activación automática."
#: komposepreferences.cpp:165 #: komposepreferences.cpp:165
msgid "Enable image effects" msgid "Enable image effects"

@ -82,7 +82,7 @@ msgstr "Dégroupée"
#: komposepreferences.cpp:56 #: komposepreferences.cpp:56
msgid "Fullscreen layout that shows all windows in no specific order" msgid "Fullscreen layout that shows all windows in no specific order"
msgstr "Vue pleine écran qui montre toutes les fenêtres sans ordre précis" msgstr "Vue pleine écran tqui montre toutes les fenêtres sans ordre précis"
#: komposepreferences.cpp:59 #: komposepreferences.cpp:59
msgid "Grouped by virtual desktops" msgid "Grouped by virtual desktops"
@ -93,7 +93,7 @@ msgid ""
"Fullscreen layout that shows a representation of your virtual desktops\n" "Fullscreen layout that shows a representation of your virtual desktops\n"
" and places the windows inside." " and places the windows inside."
msgstr "" msgstr ""
"Vue pleine écran qui montre une représentation des bureaux\n" "Vue pleine écran tqui montre une représentation des bureaux\n"
"et y place les fenêtres." "et y place les fenêtres."
#: komposepreferences.cpp:63 #: komposepreferences.cpp:63
@ -105,7 +105,7 @@ msgid ""
"Fullscreen layout that shows the windows of the desktop you're currently " "Fullscreen layout that shows the windows of the desktop you're currently "
"working on." "working on."
msgstr "" msgstr ""
"Vue pleine écran qui montre les fenêtres du bureau actuellement utilisé." "Vue pleine écran tqui montre les fenêtres du bureau actuellement utilisé."
#: komposepreferences.cpp:71 #: komposepreferences.cpp:71
msgid "Xinerama" msgid "Xinerama"
@ -144,7 +144,7 @@ msgstr ""
"L'utilisation de l'extention « Composite » des serveurs X récents rend " "L'utilisation de l'extention « Composite » des serveurs X récents rend "
"l'utilisation des captures d'écran inutile. \n" "l'utilisation des captures d'écran inutile. \n"
"Le contenu de toutes les fenêtres est dessiné dans un tampon d'arrière plan " "Le contenu de toutes les fenêtres est dessiné dans un tampon d'arrière plan "
"qui est accessible par Komposé.\n" "tqui est accessible par Komposé.\n"
"Notez toutefois que l'implémentation du principe « Composite », même dans " "Notez toutefois que l'implémentation du principe « Composite », même dans "
"les cartes graphiques modernes reste très peu performante et peu rendre " "les cartes graphiques modernes reste très peu performante et peu rendre "
"votre système quasiment inutilisable." "votre système quasiment inutilisable."
@ -198,7 +198,7 @@ msgid ""
"It will however increase memory usage quite a bit." "It will however increase memory usage quite a bit."
msgstr "" msgstr ""
"Ceci permet de limiter certaines opérations répétées de redimensionnement " "Ceci permet de limiter certaines opérations répétées de redimensionnement "
"quand Komposé a déjà traité une copie d'écran qui n'a pas été modifée.\n" "quand Komposé a déjà traité une copie d'écran tqui n'a pas été modifée.\n"
"En contre partie, la consommation de mémoire est légèrement augmentée." "En contre partie, la consommation de mémoire est légèrement augmentée."
#: komposepreferences.cpp:126 #: komposepreferences.cpp:126

@ -26,12 +26,12 @@
#include "komposesettings.h" #include "komposesettings.h"
#include "komposeglobal.h" #include "komposeglobal.h"
#include <qdesktopwidget.h> #include <tqdesktopwidget.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qdragobject.h> #include <tqdragobject.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <klocale.h> #include <klocale.h>
#include <kwin.h> #include <kwin.h>
@ -42,23 +42,23 @@
#include <kdebug.h> #include <kdebug.h>
KomposeDesktopWidget::KomposeDesktopWidget(int desktop, QWidget *parent, KomposeLayout *l, const char *name) KomposeDesktopWidget::KomposeDesktopWidget(int desktop, TQWidget *parent, KomposeLayout *l, const char *name)
: KomposeTaskContainerWidget( desktop, parent, l, name ), : KomposeTaskContainerWidget( desktop, parent, l, name ),
highlight(false) highlight(false)
{ {
// Retrieve geometry // Retrieve geometry
// QDesktopWidget *deskwidget = new QDesktopWidget(); // TQDesktopWidget *deskwidget = new TQDesktopWidget();
// deskRect = deskwidget->screenGeometry(); // deskRect = deskwidget->screenGeometry();
// delete deskwidget; // delete deskwidget;
initFonts(); initFonts();
// Set Desktop background as our background // Set Desktop background as our background
setBackgroundMode( Qt::NoBackground ); setBackgroundMode( TQt::NoBackground );
KWinModule kwinmodule( this, 1 ); KWinModule kwinmodule( this, 1 );
deskName = kwinmodule.desktopName(desktop+1); deskName = kwinmodule.desktopName(desktop+1);
QToolTip::add( this, i18n("Desktop %1 - %2").arg(desktop).arg(deskName) ); TQToolTip::add( this, i18n("Desktop %1 - %2").arg(desktop).arg(deskName) );
rootpix = new KRootPixmap (this); rootpix = new KRootPixmap (this);
rootpix->start(); rootpix->start();
@ -68,7 +68,7 @@ KomposeDesktopWidget::KomposeDesktopWidget(int desktop, QWidget *parent, Kompose
connect( KomposeTaskManager::instance(), SIGNAL( newTask( KomposeTask* ) ), this, SLOT( createTaskWidget( KomposeTask* ) ) ); connect( KomposeTaskManager::instance(), SIGNAL( newTask( KomposeTask* ) ), this, SLOT( createTaskWidget( KomposeTask* ) ) );
setFocusPolicy(QWidget::ClickFocus); setFocusPolicy(TQWidget::ClickFocus);
} }
@ -103,22 +103,22 @@ void KomposeDesktopWidget::initFonts()
// } // }
void KomposeDesktopWidget::leaveEvent ( QEvent * ) void KomposeDesktopWidget::leaveEvent ( TQEvent * )
{ {
// Unset highlight if cursor moves out of our rect // Unset highlight if cursor moves out of our rect
// but not if it enters a child widget // but not if it enters a child widget
QRect deskRect; TQRect deskRect;
deskRect.setTopLeft(mapToGlobal( QPoint(0,0) )); deskRect.setTopLeft(mapToGlobal( TQPoint(0,0) ));
deskRect.setWidth(width()); deskRect.setWidth(width());
deskRect.setHeight(height()); deskRect.setHeight(height());
if ( !deskRect.contains( QCursor::pos() ) ) if ( !deskRect.contains( TQCursor::pos() ) )
highlight = false; highlight = false;
unsetCursor(); unsetCursor();
repaint(); repaint();
} }
void KomposeDesktopWidget::enterEvent ( QEvent * ) void KomposeDesktopWidget::enterEvent ( TQEvent * )
{ {
setFocus(); setFocus();
setCursor( KCursor::handCursor() ); setCursor( KCursor::handCursor() );
@ -126,27 +126,27 @@ void KomposeDesktopWidget::enterEvent ( QEvent * )
repaint(); repaint();
} }
void KomposeDesktopWidget::focusInEvent ( QFocusEvent * ) void KomposeDesktopWidget::focusInEvent ( TQFocusEvent * )
{ {
highlight = true; highlight = true;
repaint(); repaint();
} }
void KomposeDesktopWidget::focusOutEvent ( QFocusEvent * ) void KomposeDesktopWidget::focusOutEvent ( TQFocusEvent * )
{ {
// Unset highlight if cursor moves out of our rect // Unset highlight if cursor moves out of our rect
// but not if it enters a child widget // but not if it enters a child widget
QRect deskRect; TQRect deskRect;
deskRect.setTopLeft(mapToGlobal( QPoint(0,0) )); deskRect.setTopLeft(mapToGlobal( TQPoint(0,0) ));
deskRect.setWidth(width()); deskRect.setWidth(width());
deskRect.setHeight(height()); deskRect.setHeight(height());
if ( !deskRect.contains( QCursor::pos() ) ) if ( !deskRect.contains( TQCursor::pos() ) )
highlight = false; highlight = false;
repaint(); repaint();
} }
void KomposeDesktopWidget::mouseReleaseEvent ( QMouseEvent * e ) void KomposeDesktopWidget::mouseReleaseEvent ( TQMouseEvent * e )
{ {
if ( !rect().contains( e->pos() ) ) if ( !rect().contains( e->pos() ) )
return; return;
@ -154,7 +154,7 @@ void KomposeDesktopWidget::mouseReleaseEvent ( QMouseEvent * e )
} }
void KomposeDesktopWidget::mouseDoubleClickEvent ( QMouseEvent * e ) void KomposeDesktopWidget::mouseDoubleClickEvent ( TQMouseEvent * e )
{ {
if ( !rect().contains( e->pos() ) ) if ( !rect().contains( e->pos() ) )
return; return;
@ -162,12 +162,12 @@ void KomposeDesktopWidget::mouseDoubleClickEvent ( QMouseEvent * e )
} }
void KomposeDesktopWidget::paintEvent ( QPaintEvent * ) void KomposeDesktopWidget::paintEvent ( TQPaintEvent * )
{ {
// KomposeWidget::paintEvent(e); // KomposeWidget::paintEvent(e);
QPainter p; TQPainter p;
p.begin( this ); p.begin( this );
// QPoint tl = mapToGlobal(QPoint(0,0)); // TQPoint tl = mapToGlobal(TQPoint(0,0));
// p.drawPixmap(0,0, *KomposeGlobal::instance()->getDesktopBgPixmap(), // p.drawPixmap(0,0, *KomposeGlobal::instance()->getDesktopBgPixmap(),
// tl.x(), tl.y(), width(), height()); // tl.x(), tl.y(), width(), height());
@ -183,45 +183,45 @@ void KomposeDesktopWidget::paintEvent ( QPaintEvent * )
// paint the Desktop num & name (centered if empty, bottom right if not) // paint the Desktop num & name (centered if empty, bottom right if not)
if ( layout->getNumofChilds() == 0 ) if ( layout->getNumofChilds() == 0 )
p.drawText(QRect(QPoint(0,0), size()), Qt::AlignCenter, QString("Desktop %1 - %2").arg(desktop+1).arg(deskName)); p.drawText(TQRect(TQPoint(0,0), size()), TQt::AlignCenter, TQString("Desktop %1 - %2").arg(desktop+1).arg(deskName));
else else
p.drawText(QRect(QPoint(0,0), size()), Qt::AlignRight | Qt::AlignBottom, QString("Desktop %1 - %2").arg(desktop+1).arg(deskName)); p.drawText(TQRect(TQPoint(0,0), size()), TQt::AlignRight | TQt::AlignBottom, TQString("Desktop %1 - %2").arg(desktop+1).arg(deskName));
p.end(); p.end();
} }
void KomposeDesktopWidget::dragEnterEvent( QDragEnterEvent* e ) void KomposeDesktopWidget::dragEnterEvent( TQDragEnterEvent* e )
{ {
kdDebug() << "KomposeDesktopWidget::dragEnterEvent" << endl; kdDebug() << "KomposeDesktopWidget::dragEnterEvent" << endl;
e->accept( QTextDrag::canDecode(e) ); e->accept( TQTextDrag::canDecode(e) );
} }
void KomposeDesktopWidget::dropEvent ( QDropEvent * e ) void KomposeDesktopWidget::dropEvent ( TQDropEvent * e )
{ {
QString text; TQString text;
if ( QTextDrag::decode(e, text) ) if ( TQTextDrag::decode(e, text) )
{ {
kdDebug() << "KomposeDesktopWidget::dropEvent - Received Task drop" << endl; kdDebug() << "KomposeDesktopWidget::dropEvent - Received Task drop" << endl;
KomposeTaskWidget* dropWidget = dynamic_cast<KomposeTaskWidget*>(e->source()); KomposeTaskWidget* dropWidget = dynamic_cast<KomposeTaskWidget*>(e->source());
dropWidget->getTask()->toDesktop( desktop + 1); dropWidget->getTask()->toDesktop( desktop + 1);
//if ( dropWidget->parentWidget() != this) //if ( dropWidget->parentWidget() != this)
// dropWidget->reparent( this, QPoint(0,0), true ); // dropWidget->reparent( this, TQPoint(0,0), true );
e->accept(); e->accept();
} }
} }
void KomposeDesktopWidget::childEvent ( QChildEvent * ce) void KomposeDesktopWidget::childEvent ( TQChildEvent * ce)
{ {
KomposeWidget::childEvent( ce ); KomposeWidget::childEvent( ce );
emit contentsChanged(); emit contentsChanged();
} }
void KomposeDesktopWidget::keyReleaseEvent ( QKeyEvent * e ) void KomposeDesktopWidget::keyReleaseEvent ( TQKeyEvent * e )
{ {
if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Space ) if ( e->key() == TQt::Key_Return || e->key() == TQt::Key_Space )
{ {
kdDebug() << "KomposeDesktopWidget::keyReleaseEvent - Switching to Desktop!" << endl; kdDebug() << "KomposeDesktopWidget::keyReleaseEvent - Switching to Desktop!" << endl;
KomposeViewManager::instance()->setCurrentDesktop(desktop); KomposeViewManager::instance()->setCurrentDesktop(desktop);

@ -32,7 +32,7 @@ class KomposeDesktopWidget : public KomposeTaskContainerWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
KomposeDesktopWidget(int desktop, QWidget *parent = 0, KomposeLayout *l = 0, const char *name = 0); KomposeDesktopWidget(int desktop, TQWidget *parent = 0, KomposeLayout *l = 0, const char *name = 0);
~KomposeDesktopWidget(); ~KomposeDesktopWidget();
@ -44,26 +44,26 @@ signals:
void contentsChanged(); void contentsChanged();
protected: protected:
void paintEvent ( QPaintEvent * ); void paintEvent ( TQPaintEvent * );
void dragEnterEvent ( QDragEnterEvent * ); void dragEnterEvent ( TQDragEnterEvent * );
void dropEvent ( QDropEvent * ); void dropEvent ( TQDropEvent * );
void leaveEvent ( QEvent * ); void leaveEvent ( TQEvent * );
void enterEvent ( QEvent * ); void enterEvent ( TQEvent * );
void mouseReleaseEvent ( QMouseEvent * e ); void mouseReleaseEvent ( TQMouseEvent * e );
void mouseDoubleClickEvent ( QMouseEvent * e ); void mouseDoubleClickEvent ( TQMouseEvent * e );
void childEvent( QChildEvent * ce); void childEvent( TQChildEvent * ce);
void focusInEvent ( QFocusEvent * ); void focusInEvent ( TQFocusEvent * );
void focusOutEvent ( QFocusEvent * ); void focusOutEvent ( TQFocusEvent * );
void keyReleaseEvent ( QKeyEvent * e ); void keyReleaseEvent ( TQKeyEvent * e );
protected slots: protected slots:
void initFonts(); void initFonts();
private: private:
QRect deskRect; TQRect deskRect;
QString deskName; TQString deskName;
bool highlight; // Highlight widget? bool highlight; // Highlight widget?
QFont titleFont; TQFont titleFont;
KRootPixmap *rootpix; KRootPixmap *rootpix;
}; };

@ -18,10 +18,10 @@
#include "komposeglobal.h" #include "komposeglobal.h"
#include "komposelayout.h" #include "komposelayout.h"
#include <qobjectlist.h> #include <tqobjectlist.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qdesktopwidget.h> #include <tqdesktopwidget.h>
#include <kwin.h> #include <kwin.h>
#include <kapplication.h> #include <kapplication.h>
@ -38,14 +38,14 @@ KomposeFullscreenWidget::KomposeFullscreenWidget( int displayType, KomposeLayout
: KomposeTaskContainerWidget( -1, 0, l ), : KomposeTaskContainerWidget( -1, 0, l ),
type(displayType) type(displayType)
{ {
// if ( QT_VERSION < 0x030300 ) // if ( TQT_VERSION < 0x030300 )
/* use showMaximized instead of setWindowState to make it compile on qt 3.1 or whatever */ /* use showMaximized instead of setWindowState to make it compile on qt 3.1 or whatever */
// showMaximized(); // showMaximized();
// KWin::setState( winId(), NET::KeepAbove ); // KWin::setState( winId(), NET::KeepAbove );
// Set Desktop background as our background // Set Desktop background as our background
setBackgroundMode( Qt::FixedPixmap ); setBackgroundMode( TQt::FixedPixmap );
// setBackgroundPixmap(*(KomposeGlobal::instance()->getDesktopBgPixmap())); // setBackgroundPixmap(*(KomposeGlobal::instance()->getDesktopBgPixmap()));
rootpix = new KRootPixmap (this); rootpix = new KRootPixmap (this);
rootpix->start(); rootpix->start();
@ -62,14 +62,14 @@ KomposeFullscreenWidget::KomposeFullscreenWidget( int displayType, KomposeLayout
setGeometry( KGlobalSettings::desktopGeometry( this ) ); setGeometry( KGlobalSettings::desktopGeometry( this ) );
else else
{ {
QDesktopWidget deskwidget; TQDesktopWidget deskwidget;
QRect deskRect = deskwidget.screenGeometry(KomposeSettings::instance()->getViewScreen()); TQRect deskRect = deskwidget.screenGeometry(KomposeSettings::instance()->getViewScreen());
setGeometry(deskRect); setGeometry(deskRect);
kdDebug() << deskRect << endl; kdDebug() << deskRect << endl;
} }
if (!isTopLevel()) if (!isTopLevel())
QApplication::sendPostedEvents(this, QEvent::ShowFullScreen); TQApplication::sendPostedEvents(this, TQEvent::ShowFullScreen);
setActiveWindow(); setActiveWindow();
KWin::setOnAllDesktops( winId(), true ); KWin::setOnAllDesktops( winId(), true );
@ -101,12 +101,12 @@ void KomposeFullscreenWidget::destroyChildWidgets()
{ {
setUpdatesEnabled( false ); setUpdatesEnabled( false );
KomposeWidget *child; KomposeWidget *child;
QPtrListIterator<KomposeWidget> it( *(layout->getManagedWidgets())); TQPtrListIterator<KomposeWidget> it( *(layout->getManagedWidgets()));
while ( (child = it.current()) != 0 ) while ( (child = it.current()) != 0 )
{ {
++it; ++it;
layout->remove(child); layout->remove(child);
dynamic_cast<QWidget*>(child)->deleteLater(); dynamic_cast<TQWidget*>(child)->deleteLater();
} }
setUpdatesEnabled( true ); setUpdatesEnabled( true );
kdDebug() << "KomposeFullscreenWidget::destroyChildWidgets() - all children destroyed" << endl; kdDebug() << "KomposeFullscreenWidget::destroyChildWidgets() - all children destroyed" << endl;
@ -158,10 +158,10 @@ void KomposeFullscreenWidget::createDesktopWidgets()
} }
} }
void KomposeFullscreenWidget::mouseReleaseEvent (QMouseEvent * ) void KomposeFullscreenWidget::mouseReleaseEvent (TQMouseEvent * )
{} {}
void KomposeFullscreenWidget::mousePressEvent ( QMouseEvent * e ) void KomposeFullscreenWidget::mousePressEvent ( TQMouseEvent * e )
{ {
if ( !rect().contains( e->pos() ) ) if ( !rect().contains( e->pos() ) )
return; return;
@ -181,9 +181,9 @@ void KomposeFullscreenWidget::mousePressEvent ( QMouseEvent * e )
} }
} }
void KomposeFullscreenWidget::keyReleaseEvent ( QKeyEvent * e ) void KomposeFullscreenWidget::keyReleaseEvent ( TQKeyEvent * e )
{ {
if ( e->key() == Qt::Key_Escape ) if ( e->key() == TQt::Key_Escape )
{ {
kdDebug() << "KomposeFullscreenWidget::keyReleaseEvent - Esc key pressed - Closing view" << endl; kdDebug() << "KomposeFullscreenWidget::keyReleaseEvent - Esc key pressed - Closing view" << endl;
KomposeViewManager::instance()->closeCurrentView(); KomposeViewManager::instance()->closeCurrentView();
@ -212,9 +212,9 @@ double KomposeFullscreenWidget::getAspectRatio()
return (double)width() / (double)height(); return (double)width() / (double)height();
} }
// void KomposeFullscreenWidget::paintEvent ( QPaintEvent * ) // void KomposeFullscreenWidget::paintEvent ( TQPaintEvent * )
// { // {
// QPainter p( this ); // TQPainter p( this );
// p.drawPixmap(rect(), *(KomposeGlobal::instance()->getDesktopBgPixmap())); // p.drawPixmap(rect(), *(KomposeGlobal::instance()->getDesktopBgPixmap()));
// p.end(); // p.end();
// } // }

@ -44,13 +44,13 @@ protected:
void initMenu(); void initMenu();
void createDesktopWidgets(); void createDesktopWidgets();
void mouseReleaseEvent (QMouseEvent *); void mouseReleaseEvent (TQMouseEvent *);
void mousePressEvent (QMouseEvent *); void mousePressEvent (TQMouseEvent *);
void keyReleaseEvent ( QKeyEvent * e ); void keyReleaseEvent ( TQKeyEvent * e );
// void paintEvent ( QPaintEvent * ); // void paintEvent ( TQPaintEvent * );
void destroyChildWidgets(); void destroyChildWidgets();
// virtual void closeEvent ( QCloseEvent * e ); // virtual void closeEvent ( TQCloseEvent * e );
private: private:
int type; int type;

@ -15,18 +15,18 @@
#include "komposegltaskwidget.h" #include "komposegltaskwidget.h"
#include "komposetaskmanager.h" #include "komposetaskmanager.h"
#include <qdesktopwidget.h> #include <tqdesktopwidget.h>
#include <qobjectlist.h> #include <tqobjectlist.h>
#include <kdebug.h> #include <kdebug.h>
#include <GL/gl.h> #include <GL/gl.h>
KomposeGLDesktopWidget::KomposeGLDesktopWidget(int desktop, QObject *parent, const char *name) KomposeGLDesktopWidget::KomposeGLDesktopWidget(int desktop, TQObject *parent, const char *name)
: KomposeGLWidget( parent ), : KomposeGLWidget( parent ),
deskNum( desktop ) deskNum( desktop )
{ {
// Retrieve geometry // Retrieve geometry
QDesktopWidget *deskwidget = new QDesktopWidget(); TQDesktopWidget *deskwidget = new TQDesktopWidget();
deskRect = deskwidget->availableGeometry(); deskRect = deskwidget->availableGeometry();
delete deskwidget; delete deskwidget;
@ -42,13 +42,13 @@ KomposeGLDesktopWidget::~KomposeGLDesktopWidget()
void KomposeGLDesktopWidget::createTaskWidgets() void KomposeGLDesktopWidget::createTaskWidgets()
{ {
TaskList tl = KomposeTaskManager::instance()->getTasks(); TaskList tl = KomposeTaskManager::instance()->getTasks();
qDebug("KomposeGLDesktopWidget::createTaskWidgets() on %d tasks", tl.count()); tqDebug("KomposeGLDesktopWidget::createTaskWidgets() on %d tasks", tl.count());
QPtrListIterator<KomposeTask> it( tl ); TQPtrListIterator<KomposeTask> it( tl );
KomposeTask *task; KomposeTask *task;
while ( (task = it.current()) != 0 ) while ( (task = it.current()) != 0 )
{ {
++it; ++it;
Q_CHECK_PTR(task); TQ_CHECK_PTR(task);
createTaskWidget( task ); createTaskWidget( task );
} }
} }
@ -58,26 +58,26 @@ void KomposeGLDesktopWidget::createTaskWidget( KomposeTask* task )
{ {
if (deskNum == task->onDesktop()-1 ) if (deskNum == task->onDesktop()-1 )
{ {
qDebug("KomposeGLDesktopWidget::createTaskWidget()" ); tqDebug("KomposeGLDesktopWidget::createTaskWidget()" );
KomposeGLTaskWidget *taskwidget = new KomposeGLTaskWidget( task, this, 0, "" ); KomposeGLTaskWidget *taskwidget = new KomposeGLTaskWidget( task, this, 0, "" );
} }
} }
int KomposeGLDesktopWidget::getHeightForWidth( int w ) const int KomposeGLDesktopWidget::getHeightForWidth( int w ) const
{ {
qDebug("KomposeGLDesktopWidget::getHeightForWidth()"); tqDebug("KomposeGLDesktopWidget::getHeightForWidth()");
return ((double)w / (double)deskRect.width()) * deskRect.height(); return ((double)w / (double)deskRect.width()) * deskRect.height();
} }
int KomposeGLDesktopWidget::getWidthForHeight( int h ) const int KomposeGLDesktopWidget::getWidthForHeight( int h ) const
{ {
qDebug("KomposeGLDesktopWidget::getWidthForHeight()"); tqDebug("KomposeGLDesktopWidget::getWidthForHeight()");
return ((double)h / (double)deskRect.height()) * deskRect.width(); return ((double)h / (double)deskRect.height()) * deskRect.width();
} }
double KomposeGLDesktopWidget::getAspectRatio() double KomposeGLDesktopWidget::getAspectRatio()
{ {
qDebug("KomposeGLDesktopWidget::getAspectRatio()"); tqDebug("KomposeGLDesktopWidget::getAspectRatio()");
return (double)deskRect.width() / (double)deskRect.height(); return (double)deskRect.width() / (double)deskRect.height();
} }
@ -85,7 +85,7 @@ double KomposeGLDesktopWidget::getAspectRatio()
void KomposeGLDesktopWidget::draw() void KomposeGLDesktopWidget::draw()
{ {
KomposeGLWidget::draw(); KomposeGLWidget::draw();
qDebug("KomposeGLDesktopWidget::draw() - %d,%d %dx%d", getRect().x(), getRect().y(), getRect().width(), getRect().height()); tqDebug("KomposeGLDesktopWidget::draw() - %d,%d %dx%d", getRect().x(), getRect().y(), getRect().width(), getRect().height());
glColor3f(0.0f, 0.0f, 1.0f); glColor3f(0.0f, 0.0f, 1.0f);
glBegin( GL_QUADS ); glBegin( GL_QUADS );
@ -96,12 +96,12 @@ void KomposeGLDesktopWidget::draw()
glEnd(); glEnd();
// Draw Task Widgets // Draw Task Widgets
QPtrListIterator<KomposeGLWidget> it( list ); TQPtrListIterator<KomposeGLWidget> it( list );
// Check or empty list // Check or empty list
if (it.count() == 0) if (it.count() == 0)
{ {
qDebug("KomposeGLDesktopWidget::draw() - empty list... skipping!"); tqDebug("KomposeGLDesktopWidget::draw() - empty list... skipping!");
return; return;
} }

@ -19,13 +19,13 @@
#include <GL/gl.h> #include <GL/gl.h>
#include <GL/glut.h> #include <GL/glut.h>
KomposeGLFullscreenWidget::KomposeGLFullscreenWidget(QWidget *parent, const char *name) : KomposeGLFullscreenWidget::KomposeGLFullscreenWidget(TQWidget *parent, const char *name) :
QGLWidget(parent, name) TQGLWidget(parent, name)
{ {
qDebug("KomposeGLFullscreenWidget::KomposeGLFullscreenWidget()"); tqDebug("KomposeGLFullscreenWidget::KomposeGLFullscreenWidget()");
layout = new KomposeLayout( this ); layout = new KomposeLayout( this );
setWindowState(Qt::WindowMaximized | Qt::WindowActive); setWindowState(TQt::WindowMaximized | TQt::WindowActive);
showFullScreen(); showFullScreen();
createDesktopWidgets(); createDesktopWidgets();
@ -42,7 +42,7 @@ void KomposeGLFullscreenWidget::createDesktopWidgets()
{ {
int row = i / 2; int row = i / 2;
int col = i % 2; int col = i % 2;
//qDebug("rc %d %d", row, col); //tqDebug("rc %d %d", row, col);
desktop[i] = new KomposeGLDesktopWidget(i, this); desktop[i] = new KomposeGLDesktopWidget(i, this);
layout->add(dynamic_cast<KomposeWidgetInterface*>(desktop[i])); layout->add(dynamic_cast<KomposeWidgetInterface*>(desktop[i]));
} }
@ -53,13 +53,13 @@ void KomposeGLFullscreenWidget::initializeGL()
// Set up the rendering context, define display lists etc.: // Set up the rendering context, define display lists etc.:
if( !format().hasOpenGL() ) if( !format().hasOpenGL() )
{ {
qWarning( "KomposeGLFullscreenWidget::initializeGL() - OpenGL not supported!" ); tqWarning( "KomposeGLFullscreenWidget::initializeGL() - OpenGL not supported!" );
return; return;
} }
if ( !format().doubleBuffer() ) if ( !format().doubleBuffer() )
{ {
qWarning( "KomposeGLFullscreenWidget::initializeGL() - Direct rendering enabled !" ); tqWarning( "KomposeGLFullscreenWidget::initializeGL() - Direct rendering enabled !" );
} }
// glShadeModel(GL_SMOOTH); // glShadeModel(GL_SMOOTH);
// //
@ -106,10 +106,10 @@ void KomposeGLFullscreenWidget::resizeGL( int w, int h )
} }
/*! draw OpenGL scene ( called from Qt ) */ /*! draw OpenGL scene ( called from TQt ) */
void KomposeGLFullscreenWidget::paintGL() void KomposeGLFullscreenWidget::paintGL()
{ {
qDebug("KomposeGLFullscreenWidget::paintGL()"); tqDebug("KomposeGLFullscreenWidget::paintGL()");
glPushMatrix(); glPushMatrix();
@ -130,7 +130,7 @@ void KomposeGLFullscreenWidget::paintGL()
void KomposeGLFullscreenWidget::setOrthographicProjection() void KomposeGLFullscreenWidget::setOrthographicProjection()
{ {
qDebug("KomposeGLFullscreenWidget::setOrthographicProjection() - %dx%d", width(), height()); tqDebug("KomposeGLFullscreenWidget::setOrthographicProjection() - %dx%d", width(), height());
glViewport( 0, 0, (GLint)width(), (GLint)height() ); glViewport( 0, 0, (GLint)width(), (GLint)height() );
// switch to projection mode // switch to projection mode
glMatrixMode(GL_PROJECTION); glMatrixMode(GL_PROJECTION);
@ -146,31 +146,31 @@ void KomposeGLFullscreenWidget::setOrthographicProjection()
glMatrixMode(GL_MODELVIEW);; glMatrixMode(GL_MODELVIEW);;
} }
// Redirect these functions to QGLWidget // Redirect these functions to TQGLWidget
void KomposeGLFullscreenWidget::setGeom ( const QRect &rect ) void KomposeGLFullscreenWidget::setGeom ( const TQRect &rect )
{ {
QGLWidget::setGeometry( rect ); TQGLWidget::setGeometry( rect );
} }
void KomposeGLFullscreenWidget::setGeom ( const QSize &size ) void KomposeGLFullscreenWidget::setGeom ( const TQSize &size )
{ {
QGLWidget::resize( size ); TQGLWidget::resize( size );
} }
QSize KomposeGLFullscreenWidget::getSize() const TQSize KomposeGLFullscreenWidget::getSize() const
{ {
return QGLWidget::size(); return TQGLWidget::size();
} }
QRect KomposeGLFullscreenWidget::getRect() const TQRect KomposeGLFullscreenWidget::getRect() const
{ {
return QGLWidget::rect(); return TQGLWidget::rect();
} }
void KomposeGLFullscreenWidget::removeChildWidget( KomposeWidgetInterface* obj ) void KomposeGLFullscreenWidget::removeChildWidget( KomposeWidgetInterface* obj )
{ {
QGLWidget::removeChild((QObject *) obj); TQGLWidget::removeChild((TQObject *) obj);
} }
#include "komposeglfullscreenwidget.moc" #include "komposeglfullscreenwidget.moc"

@ -17,7 +17,7 @@
#include "komposesettings.h" #include "komposesettings.h"
#include "komposesystray.h" #include "komposesystray.h"
#include <qtimer.h> #include <tqtimer.h>
#include <kapplication.h> #include <kapplication.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
@ -36,7 +36,7 @@
#include <dcopclient.h> #include <dcopclient.h>
// #include those AFTER Qt-includes! // #include those AFTER TQt-includes!
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <Imlib2.h> #include <Imlib2.h>
@ -51,7 +51,7 @@
static KomposeGlobal* globalInstance = 0; static KomposeGlobal* globalInstance = 0;
Display *disp; Display *disp;
static QString wallpaperForDesktop(int desktop) static TQString wallpaperForDesktop(int desktop)
{ {
return DCOPRef("kdesktop", "KBackgroundIface").call("currentWallpaper", desktop); return DCOPRef("kdesktop", "KBackgroundIface").call("currentWallpaper", desktop);
} }
@ -69,8 +69,8 @@ KomposeGlobal* KomposeGlobal::instance()
return globalInstance; return globalInstance;
} }
KomposeGlobal::KomposeGlobal(QObject *parent, const char *name) KomposeGlobal::KomposeGlobal(TQObject *parent, const char *name)
: QObject(parent, name), : TQObject(parent, name),
aboutDialogOpen(0), aboutDialogOpen(0),
hideSystray( false ), hideSystray( false ),
singleShot( false ), singleShot( false ),
@ -151,7 +151,7 @@ void KomposeGlobal::initGui()
*/ */
void KomposeGlobal::initActions() void KomposeGlobal::initActions()
{ {
actionCollection = new KActionCollection( (QWidget*)0 ); actionCollection = new KActionCollection( (TQWidget*)0 );
// Actions // Actions
actQuit = KStdAction::quit( kapp, SLOT(quit()), actionCollection ); actQuit = KStdAction::quit( kapp, SLOT(quit()), actionCollection );
@ -190,9 +190,9 @@ void KomposeGlobal::initSharedPixmaps()
// When Kompose is started by session management the bg shared pixmap may not be available yet // When Kompose is started by session management the bg shared pixmap may not be available yet
if (!desktopBgPixmap->isAvailable( pixmapName(1) )) if (!desktopBgPixmap->isAvailable( pixmapName(1) ))
{ {
qWarning("KomposeGlobal::initSharedPixmaps() - Pixmap not available"); tqWarning("KomposeGlobal::initSharedPixmaps() - Pixmap not available");
//enablePixmapExports(); //enablePixmapExports();
QTimer::singleShot( 1000, this, SLOT( initSharedPixmaps() ) ); TQTimer::singleShot( 1000, this, SLOT( initSharedPixmaps() ) );
//initSharedPixmaps(); //initSharedPixmaps();
//return; //return;
} }
@ -229,14 +229,14 @@ void KomposeGlobal::refreshSharedPixmaps()
desktopBgPixmap->loadFromShared( pixmapName(currentDesktop) ); desktopBgPixmap->loadFromShared( pixmapName(currentDesktop) );
} }
QString KomposeGlobal::pixmapName(int desk) TQString KomposeGlobal::pixmapName(int desk)
{ {
// To simplify things we take the background of the first desktop // To simplify things we take the background of the first desktop
QString pattern = QString("DESKTOP%1"); TQString pattern = TQString("DESKTOP%1");
int screen_number = DefaultScreen(qt_xdisplay()); int screen_number = DefaultScreen(tqt_xdisplay());
if (screen_number) if (screen_number)
{ {
pattern = QString("SCREEN%1-DESKTOP").arg(screen_number) + "%1"; pattern = TQString("SCREEN%1-DESKTOP").arg(screen_number) + "%1";
} }
return pattern.arg( desk ); return pattern.arg( desk );
} }
@ -246,7 +246,7 @@ void KomposeGlobal::slotDone(bool success)
if (!success) if (!success)
{ {
kdDebug() << "KomposeGlobal::slotDone() - loading of desktop background failed.\n" << endl; kdDebug() << "KomposeGlobal::slotDone() - loading of desktop background failed.\n" << endl;
//QTimer::singleShot( 1000, this, SLOT( initSharedPixmaps() ) ); //TQTimer::singleShot( 1000, this, SLOT( initSharedPixmaps() ) );
} }
} }
@ -257,12 +257,12 @@ void KomposeGlobal::enablePixmapExports()
DCOPClient *client = kapp->dcopClient(); DCOPClient *client = kapp->dcopClient();
if (!client->isAttached()) if (!client->isAttached())
client->attach(); client->attach();
QByteArray data; TQByteArray data;
QDataStream args( data, IO_WriteOnly ); TQDataStream args( data, IO_WriteOnly );
args << 1; args << 1;
QCString appname( "kdesktop" ); TQCString appname( "kdesktop" );
int screen_number = DefaultScreen(qt_xdisplay()); int screen_number = DefaultScreen(tqt_xdisplay());
if ( screen_number ) if ( screen_number )
appname.sprintf("kdesktop-screen-%d", screen_number ); appname.sprintf("kdesktop-screen-%d", screen_number );
@ -301,7 +301,7 @@ void KomposeGlobal::initImlib()
Visual *vis; Visual *vis;
Colormap cm; Colormap cm;
//int screen; //int screen;
disp = QPaintDevice::x11AppDisplay(); disp = TQPaintDevice::x11AppDisplay();
vis = DefaultVisual(disp, DefaultScreen(disp)); vis = DefaultVisual(disp, DefaultScreen(disp));
cm = DefaultColormap(disp, DefaultScreen(disp)); cm = DefaultColormap(disp, DefaultScreen(disp));
// context = imlib_context_new(); // context = imlib_context_new();
@ -328,7 +328,7 @@ void KomposeGlobal::initCompositeExt()
xcomposite = false; xcomposite = false;
#ifdef COMPOSITE #ifdef COMPOSITE
// Check for XComposite // Check for XComposite
Display *dpy = QPaintDevice::x11AppDisplay(); Display *dpy = TQPaintDevice::x11AppDisplay();
int event_base, error_base; int event_base, error_base;
if ( XCompositeQueryExtension( dpy, &event_base, &error_base ) ) if ( XCompositeQueryExtension( dpy, &event_base, &error_base ) )

@ -14,8 +14,8 @@
class KomposeSysTray; class KomposeSysTray;
#include <qobject.h> #include <tqobject.h>
#include <qstring.h> #include <tqstring.h>
class KPopupMenu; class KPopupMenu;
class KActionCollection; class KActionCollection;
@ -27,18 +27,18 @@ class KWinModule;
#include <config.h> #include <config.h>
#endif #endif
#if defined(Q_WS_X11) && defined(HAVE_XCOMPOSITE) && defined(HAVE_XDAMAGE) && QT_VERSION >= 0x030300 #if defined(Q_WS_X11) && defined(HAVE_XCOMPOSITE) && defined(HAVE_XDAMAGE) && TQT_VERSION >= 0x030300
# define COMPOSITE # define COMPOSITE
#endif #endif
/** /**
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeGlobal : public QObject class KomposeGlobal : public TQObject
{ {
Q_OBJECT Q_OBJECT
protected: protected:
KomposeGlobal(QObject *parent = 0, const char *name = 0); KomposeGlobal(TQObject *parent = 0, const char *name = 0);
~KomposeGlobal(); ~KomposeGlobal();
@ -71,7 +71,7 @@ protected:
protected slots: protected slots:
void initSharedPixmaps(); void initSharedPixmaps();
QString pixmapName(int desk); TQString pixmapName(int desk);
void slotDone(bool success); void slotDone(bool success);
void enablePixmapExports(); void enablePixmapExports();
void slotDesktopChanged(int desktop); void slotDesktopChanged(int desktop);

@ -16,18 +16,18 @@
#include "komposelayout.h" #include "komposelayout.h"
#include <kdebug.h> #include <kdebug.h>
#include <qgl.h> #include <tqgl.h>
#include <qimage.h> #include <tqimage.h>
KomposeGLTaskWidget::KomposeGLTaskWidget(KomposeTask *t, QObject *parent, KomposeLayout *l, const char *name) KomposeGLTaskWidget::KomposeGLTaskWidget(KomposeTask *t, TQObject *parent, KomposeLayout *l, const char *name)
: KomposeGLWidget(parent, l), : KomposeGLWidget(parent, l),
task(t) task(t)
{ {
QImage img = task->getScreenshot().convertToImage(); TQImage img = task->getScreenshot().convertToImage();
img = img.smoothScale( 256, 256, QImage::ScaleMin ); img = img.smoothScale( 256, 256, TQImage::ScaleMin );
tex = QGLWidget::convertToGLFormat( img ); tex = TQGLWidget::convertToGLFormat( img );
glGenTextures(1, &texture); glGenTextures(1, &texture);
glBindTexture(GL_TEXTURE_2D, texture); glBindTexture(GL_TEXTURE_2D, texture);
/* glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); // cheap scaling when image bigger than texture /* glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); // cheap scaling when image bigger than texture
@ -65,26 +65,26 @@ void KomposeGLTaskWidget::slotTaskDestroyed()
int KomposeGLTaskWidget::getHeightForWidth ( int w ) const int KomposeGLTaskWidget::getHeightForWidth ( int w ) const
{ {
qDebug("KomposeGLTaskWidget::getHeightForWidth()"); tqDebug("KomposeGLTaskWidget::getHeightForWidth()");
return task->getHeightForWidth(w); return task->getHeightForWidth(w);
} }
int KomposeGLTaskWidget::getWidthForHeight ( int h ) const int KomposeGLTaskWidget::getWidthForHeight ( int h ) const
{ {
qDebug("KomposeGLTaskWidget::getWidthForHeight()"); tqDebug("KomposeGLTaskWidget::getWidthForHeight()");
return task->getWidthForHeight(h); return task->getWidthForHeight(h);
} }
double KomposeGLTaskWidget::getAspectRatio() double KomposeGLTaskWidget::getAspectRatio()
{ {
qDebug("KomposeGLTaskWidget::getAspectRatio()"); tqDebug("KomposeGLTaskWidget::getAspectRatio()");
return task->getAspectRatio(); return task->getAspectRatio();
} }
void KomposeGLTaskWidget::draw() void KomposeGLTaskWidget::draw()
{ {
KomposeGLWidget::draw(); KomposeGLWidget::draw();
qDebug("KomposeGLTaskWidget::draw() - %d,%d %dx%d", getRect().x(), getRect().y(), getRect().width(), getRect().height()); tqDebug("KomposeGLTaskWidget::draw() - %d,%d %dx%d", getRect().x(), getRect().y(), getRect().width(), getRect().height());
glColor3f(1.0f, 0.0f, 0.0f); glColor3f(1.0f, 0.0f, 0.0f);
glBindTexture(GL_TEXTURE_2D, texture); glBindTexture(GL_TEXTURE_2D, texture);
@ -96,7 +96,7 @@ void KomposeGLTaskWidget::draw()
// glTexImage2D( GL_TEXTURE_2D, 0, 3, tex.width(), tex.height(), 0, // glTexImage2D( GL_TEXTURE_2D, 0, 3, tex.width(), tex.height(), 0,
// GL_RGBA, GL_UNSIGNED_BYTE, tex.bits() ); // GL_RGBA, GL_UNSIGNED_BYTE, tex.bits() );
// qDebug("KomposeGLTaskWidget::draw() - tex: %dx%d", tex.width(), tex.height() ); // tqDebug("KomposeGLTaskWidget::draw() - tex: %dx%d", tex.width(), tex.height() );
glBegin( GL_QUADS ); glBegin( GL_QUADS );
glTexCoord2f(0.0, 0.0); glTexCoord2f(0.0, 0.0);

@ -20,17 +20,17 @@
#include "komposeglwidget.h" #include "komposeglwidget.h"
#include "komposelayout.h" #include "komposelayout.h"
#include <qtimer.h> #include <tqtimer.h>
#include <kdebug.h> #include <kdebug.h>
/* /*
* The constructor accepts a custom layout, if none is specified a defaultlayout is used * The constructor accepts a custom layout, if none is specified a defaultlayout is used
*/ */
KomposeGLWidget::KomposeGLWidget(QObject *parent, KomposeLayout *l, const char *name) KomposeGLWidget::KomposeGLWidget(TQObject *parent, KomposeLayout *l, const char *name)
: QObject(parent) : TQObject(parent)
{ {
geometry = QRect(0,0,1,1); geometry = TQRect(0,0,1,1);
if (!l) if (!l)
layout = new KomposeLayout( this ); layout = new KomposeLayout( this );
else else
@ -45,27 +45,27 @@ KomposeGLWidget::~KomposeGLWidget()
/* /*
* Whenever a child is added to the widget it's also added to the layout * Whenever a child is added to the widget it's also added to the layout
*/ */
void KomposeGLWidget::childEvent ( QChildEvent * ce ) void KomposeGLWidget::childEvent ( TQChildEvent * ce )
{ {
if ( !ce->child()->inherits("KomposeGLWidget") ) if ( !ce->child()->inherits("KomposeGLWidget") )
return; return;
if ( ce->inserted() ) if ( ce->inserted() )
{ {
qDebug("KomposeGLWidget::childEvent : Added widget " << ce->child()->className() << " to " << className() << endl; tqDebug("KomposeGLWidget::childEvent : Added widget " << ce->child()->className() << " to " << className() << endl;
list.append( dynamic_cast<KomposeGLWidget*>(ce->child()) ); list.append( dynamic_cast<KomposeGLWidget*>(ce->child()) );
layout->add( dynamic_cast<KomposeWidgetInterface*>(ce->child()) ); layout->add( dynamic_cast<KomposeWidgetInterface*>(ce->child()) );
} }
else if ( ce->removed() ) else if ( ce->removed() )
{ {
qDebug("KomposeGLWidget::childEvent : Removed widget %s from %s", ce->child()->className(), className() ); tqDebug("KomposeGLWidget::childEvent : Removed widget %s from %s", ce->child()->className(), className() );
list.remove( dynamic_cast<KomposeGLWidget*>(ce->child()) ); list.remove( dynamic_cast<KomposeGLWidget*>(ce->child()) );
layout->remove( dynamic_cast<KomposeWidgetInterface*>(ce->child()) ); layout->remove( dynamic_cast<KomposeWidgetInterface*>(ce->child()) );
} }
// Whenever a child is added/removed: rearrange layout // Whenever a child is added/removed: rearrange layout
// FIXME: sometimes widget's aren't added in time, so we have to add a short delay: // FIXME: sometimes widget's aren't added in time, so we have to add a short delay:
QTimer::singleShot( 200, layout, SLOT( arrangeLayout() ) ); TQTimer::singleShot( 200, layout, SLOT( arrangeLayout() ) );
} }
/* /*
@ -73,47 +73,47 @@ void KomposeGLWidget::childEvent ( QChildEvent * ce )
*/ */
void KomposeGLWidget::draw() void KomposeGLWidget::draw()
{ {
qDebug("KomposeGLWidget::draw - Arranging layout"); tqDebug("KomposeGLWidget::draw - Arranging layout");
layout->arrangeLayout(); layout->arrangeLayout();
} }
// Redirect these functions to QWidget // Redirect these functions to TQWidget
void KomposeGLWidget::setGeom ( const QRect &rect ) void KomposeGLWidget::setGeom ( const TQRect &rect )
{ {
geometry = rect; geometry = rect;
} }
void KomposeGLWidget::setGeom ( const QSize &size ) void KomposeGLWidget::setGeom ( const TQSize &size )
{ {
geometry.setSize( size ); geometry.setSize( size );
} }
QSize KomposeGLWidget::getSize() const TQSize KomposeGLWidget::getSize() const
{ {
return geometry.size(); return geometry.size();
} }
QRect KomposeGLWidget::getRect() const TQRect KomposeGLWidget::getRect() const
{ {
return geometry; return geometry;
} }
KomposeWidgetInterface* KomposeGLWidget::getParentWidget() const KomposeWidgetInterface* KomposeGLWidget::getParentWidget() const
{ {
if ( QObject::parent()->inherits("KomposeWidgetInterface") ) if ( TQObject::parent()->inherits("KomposeWidgetInterface") )
return (KomposeWidgetInterface*)QObject::parent(); return (KomposeWidgetInterface*)TQObject::parent();
else else
{ {
qDebug("KomposeGLWidget::getParentWidget() - QWidget::parent() does not inherit (KomposeWidgetInterface)"); tqDebug("KomposeGLWidget::getParentWidget() - TQWidget::parent() does not inherit (KomposeWidgetInterface)");
return NULL; return NULL;
} }
} }
void KomposeGLWidget::removeChildWidget( KomposeWidgetInterface* obj ) void KomposeGLWidget::removeChildWidget( KomposeWidgetInterface* obj )
{ {
QObject::removeChild((QObject *) obj); TQObject::removeChild((TQObject *) obj);
} }
#include "komposeglwidget.moc" #include "komposeglwidget.moc"

@ -16,7 +16,7 @@
KomposeImage::KomposeImage( Imlib_Image& im ) KomposeImage::KomposeImage( Imlib_Image& im )
: QObject( 0L, 0L ), : TQObject( 0L, 0L ),
bhasImage(true), bhasImage(true),
bhasSourcePixmap(false), bhasSourcePixmap(false),
lasteffect( IEFFECT_NONE ), lasteffect( IEFFECT_NONE ),
@ -34,7 +34,7 @@ KomposeImage::KomposeImage( Imlib_Image& im )
KomposeImage::KomposeImage() KomposeImage::KomposeImage()
: QObject( 0L, 0L ), : TQObject( 0L, 0L ),
bhasImage(false), bhasImage(false),
bhasSourcePixmap(false), bhasSourcePixmap(false),
lasteffect( IEFFECT_NONE ), lasteffect( IEFFECT_NONE ),
@ -66,7 +66,7 @@ void KomposeImage::clearCached()
if ( !KomposeSettings::instance()->getCacheScaledPixmaps() ) if ( !KomposeSettings::instance()->getCacheScaledPixmaps() )
{ {
myQPixmap.resize(0,0); myTQPixmap.resize(0,0);
myIsDirty = true; myIsDirty = true;
} }
} }
@ -76,7 +76,7 @@ void KomposeImage::init()
myOrigWidth = myWidth; myOrigWidth = myWidth;
myOrigHeight = myHeight; myOrigHeight = myHeight;
myQPixmap.setOptimization( QPixmap::BestOptim ); myTQPixmap.setOptimization( TQPixmap::BestOptim );
// Create highlight color modifier // Create highlight color modifier
cmHighlight = imlib_create_color_modifier(); cmHighlight = imlib_create_color_modifier();
@ -103,16 +103,16 @@ void KomposeImage::setImage( Imlib_Image &im )
imlib_context_set_image( myIm ); imlib_context_set_image( myIm );
myOrigWidth = imlib_image_get_width(); myOrigWidth = imlib_image_get_width();
myOrigHeight = imlib_image_get_height(); myOrigHeight = imlib_image_get_height();
qDebug("KomposeTask::setImage() - Set Image: size:" << myWidth << "x" << myHeight << endl; tqDebug("KomposeTask::setImage() - Set Image: size:" << myWidth << "x" << myHeight << endl;
} }
myIsDirty = true; myIsDirty = true;
bhasImage = true; bhasImage = true;
} }
void KomposeImage::setImage( QPixmap &pm ) void KomposeImage::setImage( TQPixmap &pm )
{ {
mySourceQPixmap = pm; mySourceTQPixmap = pm;
bhasSourcePixmap = true; bhasSourcePixmap = true;
myOrigWidth = pm.width(); myOrigWidth = pm.width();
@ -126,23 +126,23 @@ void KomposeImage::createImageFromPixmap()
if ( !bhasSourcePixmap ) if ( !bhasSourcePixmap )
return; return;
qDebug("KomposeImage::createImageFromPixmap()"); tqDebug("KomposeImage::createImageFromPixmap()");
imlib_context_set_drawable( mySourceQPixmap.handle() ); imlib_context_set_drawable( mySourceTQPixmap.handle() );
if ( !KomposeSettings::instance()->getImageEffects() ) if ( !KomposeSettings::instance()->getImageEffects() )
{ {
Imlib_Image img = imlib_create_image_from_drawable((Pixmap)0, 0, 0, mySourceQPixmap.width(), mySourceQPixmap.height(), 1); Imlib_Image img = imlib_create_image_from_drawable((Pixmap)0, 0, 0, mySourceTQPixmap.width(), mySourceTQPixmap.height(), 1);
setImage( img ); setImage( img );
} }
else else
{ {
Imlib_Image imgOrig = imlib_create_image_from_drawable((Pixmap)0, 0, 0, mySourceQPixmap.width(), mySourceQPixmap.height(), 1); Imlib_Image imgOrig = imlib_create_image_from_drawable((Pixmap)0, 0, 0, mySourceTQPixmap.width(), mySourceTQPixmap.height(), 1);
imlib_context_set_anti_alias(1); imlib_context_set_anti_alias(1);
imlib_context_set_image( imgOrig ); imlib_context_set_image( imgOrig );
Imlib_Image img = imlib_create_cropped_scaled_image(0, 0, mySourceQPixmap.width(), mySourceQPixmap.height(), myWidth, myHeight); Imlib_Image img = imlib_create_cropped_scaled_image(0, 0, mySourceTQPixmap.width(), mySourceTQPixmap.height(), myWidth, myHeight);
imlib_free_image(); imlib_free_image();
setImage( img ); setImage( img );
@ -166,7 +166,7 @@ void KomposeImage::resize( int width, int height )
myIsDirty = true; myIsDirty = true;
} }
QPixmap* KomposeImage::qpixmap( int effect ) TQPixmap* KomposeImage::qpixmap( int effect )
{ {
if ( KomposeSettings::instance()->getImageEffects() && (lasteffect != effect ) ) if ( KomposeSettings::instance()->getImageEffects() && (lasteffect != effect ) )
{ {
@ -177,7 +177,7 @@ QPixmap* KomposeImage::qpixmap( int effect )
if ( myIsDirty) if ( myIsDirty)
renderPixmap(); renderPixmap();
return &myQPixmap; return &myTQPixmap;
} }
@ -194,7 +194,7 @@ void KomposeImage::renderPixmap()
else if ( !bhasImage && !bhasSourcePixmap ) else if ( !bhasImage && !bhasSourcePixmap )
return; return;
qDebug("KomposeImage::renderPixmap() - Creating %dx%d pixmap", myWidth, myHeight); tqDebug("KomposeImage::renderPixmap() - Creating %dx%d pixmap", myWidth, myHeight);
imlib_context_set_image( myIm ); imlib_context_set_image( myIm );
imlib_image_set_has_alpha(0); imlib_image_set_has_alpha(0);
@ -202,9 +202,9 @@ void KomposeImage::renderPixmap()
if ( KomposeSettings::instance()->getImageEffects() ) if ( KomposeSettings::instance()->getImageEffects() )
applyEffect(); applyEffect();
myQPixmap.resize( myWidth, myHeight); myTQPixmap.resize( myWidth, myHeight);
imlib_context_set_drawable(myQPixmap.handle()); imlib_context_set_drawable(myTQPixmap.handle());
imlib_context_set_anti_alias(1); imlib_context_set_anti_alias(1);
imlib_render_image_on_drawable_at_size(0, 0, myWidth, myHeight); imlib_render_image_on_drawable_at_size(0, 0, myWidth, myHeight);

@ -12,11 +12,11 @@
#ifndef KOMPOSEIMAGE_H #ifndef KOMPOSEIMAGE_H
#define KOMPOSEIMAGE_H #define KOMPOSEIMAGE_H
#include <qobject.h> #include <tqobject.h>
#include <qstring.h> #include <tqstring.h>
#include <qpixmap.h> #include <tqpixmap.h>
// #include those AFTER Qt-includes! // #include those AFTER TQt-includes!
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <Imlib2.h> #include <Imlib2.h>
@ -26,7 +26,7 @@ enum ImageEffect { IEFFECT_NONE, IEFFECT_TITLE, IEFFECT_MINIMIZED, IEFFECT_MINIM
/** /**
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeImage : public QObject class KomposeImage : public TQObject
{ {
Q_OBJECT Q_OBJECT
@ -42,7 +42,7 @@ public:
void resize( int width, int height ); void resize( int width, int height );
QPixmap* qpixmap( int effect ); TQPixmap* qpixmap( int effect );
void renderPixmap(); void renderPixmap();
void setDirty( bool d ) { myIsDirty = d; } void setDirty( bool d ) { myIsDirty = d; }
@ -50,7 +50,7 @@ public:
bool isValid() { return bhasImage || bhasSourcePixmap; } bool isValid() { return bhasImage || bhasSourcePixmap; }
bool hasImage() { return bhasImage; } bool hasImage() { return bhasImage; }
void setImage( Imlib_Image &im ); void setImage( Imlib_Image &im );
void setImage( QPixmap &pm ); void setImage( TQPixmap &pm );
public slots: public slots:
void clearCached(); void clearCached();
@ -65,8 +65,8 @@ private:
int myHeight; int myHeight;
Imlib_Image myIm; Imlib_Image myIm;
QPixmap myQPixmap; TQPixmap myTQPixmap;
QPixmap mySourceQPixmap; TQPixmap mySourceTQPixmap;
Imlib_Color_Modifier cmHighlight, cmMinimized; Imlib_Color_Modifier cmHighlight, cmMinimized;

@ -31,7 +31,7 @@
KomposeLayout::KomposeLayout( KomposeWidget *parent, int type, int dist, const char *name ) KomposeLayout::KomposeLayout( KomposeWidget *parent, int type, int dist, const char *name )
: QObject(parent, name), : TQObject(parent, name),
spacing(dist), spacing(dist),
widgetsChanged(false), widgetsChanged(false),
currentRows(0), currentRows(0),
@ -39,7 +39,7 @@ KomposeLayout::KomposeLayout( KomposeWidget *parent, int type, int dist, const c
parentWidget(parent) parentWidget(parent)
{ {
setType( type ); setType( type );
currentSize = QSize( 1, 1 ); currentSize = TQSize( 1, 1 );
} }
KomposeLayout::~KomposeLayout() KomposeLayout::~KomposeLayout()
@ -92,7 +92,7 @@ void KomposeLayout::rearrangeContents()
emptyContainers.clear(); emptyContainers.clear();
// Check for empty containers // Check for empty containers
QPtrListIterator<KomposeWidget> it( list ); TQPtrListIterator<KomposeWidget> it( list );
KomposeWidget *task; KomposeWidget *task;
while ( (task = it.current()) != 0 ) while ( (task = it.current()) != 0 )
{ {
@ -110,7 +110,7 @@ void KomposeLayout::rearrangeContents()
} }
// Arrange filled containers // Arrange filled containers
QRect filledRect( 0, TQRect filledRect( 0,
0, 0,
parentWidget->width(), parentWidget->width(),
parentWidget->height() - ( 40 + 2*spacing ) ); parentWidget->height() - ( 40 + 2*spacing ) );
@ -118,7 +118,7 @@ void KomposeLayout::rearrangeContents()
rearrangeContents( filledRect, filledContainers ); rearrangeContents( filledRect, filledContainers );
// Arrange empty containers // Arrange empty containers
QRect emptyRect( 0, TQRect emptyRect( 0,
parentWidget->height() - ( 40 + 2*spacing ), parentWidget->height() - ( 40 + 2*spacing ),
parentWidget->width(), parentWidget->width(),
( 40 + 2*spacing ) ); ( 40 + 2*spacing ) );
@ -129,7 +129,7 @@ void KomposeLayout::rearrangeContents()
} }
else // default type (generic) else // default type (generic)
{ {
QRect availRect( 0, TQRect availRect( 0,
0, 0,
parentWidget->width(), parentWidget->width(),
parentWidget->height()); parentWidget->height());
@ -146,7 +146,7 @@ void KomposeLayout::rearrangeContents()
* availRect specifies the size&pos of the contents * availRect specifies the size&pos of the contents
* Specify either rows or cols to set a fixed number of those (setting both won't work correctly) * Specify either rows or cols to set a fixed number of those (setting both won't work correctly)
*/ */
void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<KomposeWidget> widgets, int rows, int columns, bool setMemberRowsCols ) void KomposeLayout::rearrangeContents( const TQRect& availRect, const TQPtrList<KomposeWidget> widgets, int rows, int columns, bool setMemberRowsCols )
{ {
// Check or empty list // Check or empty list
if (widgets.count() == 0) if (widgets.count() == 0)
@ -155,7 +155,7 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko
return; return;
} }
QPtrListIterator<KomposeWidget> it( widgets ); TQPtrListIterator<KomposeWidget> it( widgets );
// Calculate grid's rows & cols // Calculate grid's rows & cols
if ( rows != -1 ) // rows have been specified if ( rows != -1 ) // rows have been specified
@ -188,8 +188,8 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko
int w = (availRect.width() - (columns+1) * spacing ) / columns; int w = (availRect.width() - (columns+1) * spacing ) / columns;
int h = (availRect.height() - (rows+1) * spacing ) / rows; int h = (availRect.height() - (rows+1) * spacing ) / rows;
QValueList<QRect> geometryRects; TQValueList<TQRect> geometryRects;
QValueList<int> maxRowHeights; TQValueList<int> maxRowHeights;
// Process rows // Process rows
for ( int i=0; i<rows; ++i ) for ( int i=0; i<rows; ++i )
{ {
@ -259,7 +259,7 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko
alignmentYoffset = h - widgeth; alignmentYoffset = h - widgeth;
if ( j==0 && w > widgetw ) if ( j==0 && w > widgetw )
alignmentXoffset = w - widgetw; alignmentXoffset = w - widgetw;
QRect geom( availRect.x() + j * (w + spacing) + spacing + alignmentXoffset + xOffsetFromLastCol, TQRect geom( availRect.x() + j * (w + spacing) + spacing + alignmentXoffset + xOffsetFromLastCol,
availRect.y() + i * (h + spacing) + spacing + alignmentYoffset, availRect.y() + i * (h + spacing) + spacing + alignmentYoffset,
widgetw, widgeth ); widgetw, widgeth );
geometryRects.append(geom); geometryRects.append(geom);
@ -274,8 +274,8 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko
} }
it.toFirst(); it.toFirst();
QValueList<QRect>::iterator geomIt = geometryRects.begin(); TQValueList<TQRect>::iterator geomIt = geometryRects.begin();
QValueList<int>::iterator maxRowHeightIt = maxRowHeights.begin(); TQValueList<int>::iterator maxRowHeightIt = maxRowHeights.begin();
int topOffset = 0; int topOffset = 0;
for ( int i=0; i<rows; ++i ) for ( int i=0; i<rows; ++i )
{ {
@ -286,7 +286,7 @@ void KomposeLayout::rearrangeContents( const QRect& availRect, const QPtrList<Ko
if ( (task = it.current()) == 0) if ( (task = it.current()) == 0)
break; break;
QRect geom = *geomIt; TQRect geom = *geomIt;
geom.setY( geom.y() + topOffset ); geom.setY( geom.y() + topOffset );
// geom.setHeight( geom.height() - topOffset ); // geom.setHeight( geom.height() - topOffset );
task->setGeometry( geom ); task->setGeometry( geom );
@ -345,12 +345,12 @@ KomposeWidget* KomposeLayout::getNeighbour( const KomposeWidget* widget, int dir
* Search for neighbour in the given list (called from inside) * Search for neighbour in the given list (called from inside)
*/ */
KomposeWidget* KomposeLayout::getNeighbour( KomposeWidget* KomposeLayout::getNeighbour(
QPtrList<KomposeWidget> listToSearch, TQPtrList<KomposeWidget> listToSearch,
const KomposeWidget* widget, const KomposeWidget* widget,
int direction, int direction,
int wrap ) int wrap )
{ {
QPtrListIterator<KomposeWidget> it( listToSearch ); TQPtrListIterator<KomposeWidget> it( listToSearch );
KomposeWidget *task; KomposeWidget *task;
KomposeWidget *neighbour; KomposeWidget *neighbour;

@ -20,12 +20,12 @@
#ifndef KOMPOSELAYOUT_H #ifndef KOMPOSELAYOUT_H
#define KOMPOSELAYOUT_H #define KOMPOSELAYOUT_H
#include <qobject.h> #include <tqobject.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include "komposewidget.h" #include "komposewidget.h"
class QRect; class TQRect;
enum LayoutType { TLAYOUT_GENERIC, // layouts all KomposeWidget classes enum LayoutType { TLAYOUT_GENERIC, // layouts all KomposeWidget classes
TLAYOUT_TASKCONTAINERS // layouts containers only TLAYOUT_TASKCONTAINERS // layouts containers only
@ -37,11 +37,11 @@ enum WrapDirections { WLAYOUT_NONE, WLAYOUT_HORIZONTAL, WLAYOUT_VERTICAL, WLAYOU
/** /**
The main layout class. The main layout class.
QLayout just didn't fit :( TQLayout just didn't fit :(
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeLayout : public QObject class KomposeLayout : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
@ -54,7 +54,7 @@ public:
void setType( int t ); void setType( int t );
int getType() { return layoutType; } int getType() { return layoutType; }
const QPtrList<KomposeWidget> *getManagedWidgets() { return &list; } const TQPtrList<KomposeWidget> *getManagedWidgets() { return &list; }
int getNumofChilds() { return list.count(); } int getNumofChilds() { return list.count(); }
KomposeWidget* getNeighbour( const KomposeWidget* widget, KomposeWidget* getNeighbour( const KomposeWidget* widget,
int direction = DLAYOUT_RIGHT, int direction = DLAYOUT_RIGHT,
@ -64,25 +64,25 @@ public slots:
void arrangeLayout(); void arrangeLayout();
protected: protected:
KomposeWidget* getNeighbour( QPtrList<KomposeWidget> listToSearch, KomposeWidget* getNeighbour( TQPtrList<KomposeWidget> listToSearch,
const KomposeWidget* widget, const KomposeWidget* widget,
int direction = DLAYOUT_RIGHT, int direction = DLAYOUT_RIGHT,
int wrap = WLAYOUT_NONE ); int wrap = WLAYOUT_NONE );
void rearrangeContents(); void rearrangeContents();
void rearrangeContents( const QRect& availRect, void rearrangeContents( const TQRect& availRect,
const QPtrList<KomposeWidget> widgets, const TQPtrList<KomposeWidget> widgets,
int rows = -1, int rows = -1,
int columns = -1, int columns = -1,
bool setMemberRowsCols = true ); bool setMemberRowsCols = true );
private: private:
// List of all managed childs // List of all managed childs
QPtrList<KomposeWidget> list; TQPtrList<KomposeWidget> list;
// List of container childs seperated by empty/full // List of container childs seperated by empty/full
QPtrList<KomposeWidget> filledContainers; TQPtrList<KomposeWidget> filledContainers;
QPtrList<KomposeWidget> emptyContainers; TQPtrList<KomposeWidget> emptyContainers;
QSize currentSize; TQSize currentSize;
int layoutType; int layoutType;
int spacing; int spacing;
bool widgetsChanged; bool widgetsChanged;

@ -14,21 +14,21 @@
#include "komposesettings.h" #include "komposesettings.h"
#include "komposeglobal.h" #include "komposeglobal.h"
#include <qlayout.h> #include <tqlayout.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <kapplication.h> #include <kapplication.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qhbox.h> #include <tqhbox.h>
#include <qslider.h> #include <tqslider.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qgrid.h> #include <tqgrid.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
@ -38,120 +38,120 @@ KomposePreferences::KomposePreferences()
: KDialogBase(IconList, i18n("Komposé Preferences"), Ok|Apply|Cancel, Ok) : KDialogBase(IconList, i18n("Komposé Preferences"), Ok|Apply|Cancel, Ok)
{ {
// FIXME: this is the biggest constructor I've EVER written! // FIXME: this is the biggest constructor I've EVER written!
// How about Qt Designer?! // How about TQt Designer?!
m_hasXinerama = QDesktopWidget().numScreens() > 1; m_hasXinerama = TQDesktopWidget().numScreens() > 1;
QFrame *page1 = addPage( i18n("Behavior"), QString::null, DesktopIcon("winprops", KIcon::SizeMedium) ); TQFrame *page1 = addPage( i18n("Behavior"), TQString::null, DesktopIcon("winprops", KIcon::SizeMedium) );
QFrame *page2 = addPage( i18n("Appearance"), QString::null, DesktopIcon("appearance", KIcon::SizeMedium) ); TQFrame *page2 = addPage( i18n("Appearance"), TQString::null, DesktopIcon("appearance", KIcon::SizeMedium) );
QFrame *page3 = addPage( i18n("Layouts"), QString::null, DesktopIcon("window_list", KIcon::SizeMedium) ); TQFrame *page3 = addPage( i18n("Layouts"), TQString::null, DesktopIcon("window_list", KIcon::SizeMedium) );
QVBoxLayout *page1Layout = new QVBoxLayout( page1, 0, KDialog::spacingHint() ); TQVBoxLayout *page1Layout = new TQVBoxLayout( page1, 0, KDialog::spacingHint() );
defaultViewBtnGroup = new QButtonGroup( 2, Horizontal, i18n("Default Layout"), page1 ); defaultViewBtnGroup = new TQButtonGroup( 2, Horizontal, i18n("Default Layout"), page1 );
defaultViewBtnGroup->setExclusive( true ); defaultViewBtnGroup->setExclusive( true );
QString defaultViewBtnGroupHelp = i18n("Determines which view should be started by default (e.g. when you click on the systray icon)."); TQString defaultViewBtnGroupHelp = i18n("Determines which view should be started by default (e.g. when you click on the systray icon).");
QWhatsThis::add( defaultViewBtnGroup, defaultViewBtnGroupHelp ); TQWhatsThis::add( defaultViewBtnGroup, defaultViewBtnGroupHelp );
QToolTip::add( defaultViewBtnGroup, defaultViewBtnGroupHelp ); TQToolTip::add( defaultViewBtnGroup, defaultViewBtnGroupHelp );
defaultViewWorld = new QRadioButton(i18n("Ungrouped"), defaultViewBtnGroup ); defaultViewWorld = new TQRadioButton(i18n("Ungrouped"), defaultViewBtnGroup );
QString defaultViewWorldHelp = i18n("Fullscreen layout that shows all windows in no specific order"); TQString defaultViewWorldHelp = i18n("Fullscreen layout that shows all windows in no specific order");
QWhatsThis::add( defaultViewWorld, defaultViewWorldHelp ); TQWhatsThis::add( defaultViewWorld, defaultViewWorldHelp );
QToolTip::add( defaultViewWorld, defaultViewWorldHelp ); TQToolTip::add( defaultViewWorld, defaultViewWorldHelp );
defaultViewVirtualDesks = new QRadioButton(i18n("Grouped by virtual desktops"), defaultViewBtnGroup ); defaultViewVirtualDesks = new TQRadioButton(i18n("Grouped by virtual desktops"), defaultViewBtnGroup );
QString defaultViewVirtualDesksHelp = i18n("Fullscreen layout that shows a representation of your virtual desktops\n and places the windows inside."); TQString defaultViewVirtualDesksHelp = i18n("Fullscreen layout that shows a representation of your virtual desktops\n and places the windows inside.");
QWhatsThis::add( defaultViewVirtualDesks, defaultViewVirtualDesksHelp ); TQWhatsThis::add( defaultViewVirtualDesks, defaultViewVirtualDesksHelp );
QToolTip::add( defaultViewVirtualDesks, defaultViewVirtualDesksHelp ); TQToolTip::add( defaultViewVirtualDesks, defaultViewVirtualDesksHelp );
defaultViewCurrentDesk = new QRadioButton(i18n("Current virtual desktop"), defaultViewBtnGroup ); defaultViewCurrentDesk = new TQRadioButton(i18n("Current virtual desktop"), defaultViewBtnGroup );
QString defaultViewCurrentDeskHelp = i18n("Fullscreen layout that shows the windows of the desktop you're currently working on."); TQString defaultViewCurrentDeskHelp = i18n("Fullscreen layout that shows the windows of the desktop you're currently working on.");
QWhatsThis::add( defaultViewCurrentDesk, defaultViewCurrentDeskHelp ); TQWhatsThis::add( defaultViewCurrentDesk, defaultViewCurrentDeskHelp );
QToolTip::add( defaultViewCurrentDesk, defaultViewCurrentDeskHelp ); TQToolTip::add( defaultViewCurrentDesk, defaultViewCurrentDeskHelp );
page1Layout->addWidget(defaultViewBtnGroup); page1Layout->addWidget(defaultViewBtnGroup);
if (m_hasXinerama) if (m_hasXinerama)
{ {
QGroupBox *xineramaGroupBox = new QGroupBox( 2, Vertical, i18n("Xinerama"), page1 ); TQGroupBox *xineramaGroupBox = new TQGroupBox( 2, Vertical, i18n("Xinerama"), page1 );
QDesktopWidget deskwidget; TQDesktopWidget deskwidget;
m_viewScreenAll = new QCheckBox(i18n("Use the whole desktop for Komposé"), xineramaGroupBox); m_viewScreenAll = new TQCheckBox(i18n("Use the whole desktop for Komposé"), xineramaGroupBox);
QHBox *hLayXineramaGrabDelay = new QHBox(xineramaGroupBox); TQHBox *hLayXineramaGrabDelay = new TQHBox(xineramaGroupBox);
QLabel *xineramaLabel = new QLabel(i18n("Use screen:"), hLayXineramaGrabDelay); TQLabel *xineramaLabel = new TQLabel(i18n("Use screen:"), hLayXineramaGrabDelay);
m_viewScreen = new QSpinBox(0, deskwidget.numScreens()-1, 1, hLayXineramaGrabDelay); m_viewScreen = new TQSpinBox(0, deskwidget.numScreens()-1, 1, hLayXineramaGrabDelay);
connect( m_viewScreenAll, SIGNAL(toggled(bool)), m_viewScreen, SLOT(setDisabled(bool)) ); connect( m_viewScreenAll, SIGNAL(toggled(bool)), m_viewScreen, SLOT(setDisabled(bool)) );
xineramaLabel->setBuddy(m_viewScreen); xineramaLabel->setBuddy(m_viewScreen);
QString xineramaHelp = i18n("Specify the screen where Komposé should appear." ); TQString xineramaHelp = i18n("Specify the screen where Komposé should appear." );
QWhatsThis::add( m_viewScreen, xineramaHelp ); TQWhatsThis::add( m_viewScreen, xineramaHelp );
QToolTip::add( m_viewScreen, xineramaHelp ); TQToolTip::add( m_viewScreen, xineramaHelp );
QWhatsThis::add( xineramaLabel, xineramaHelp ); TQWhatsThis::add( xineramaLabel, xineramaHelp );
QToolTip::add( xineramaLabel, xineramaHelp ); TQToolTip::add( xineramaLabel, xineramaHelp );
page1Layout->addWidget(xineramaGroupBox); page1Layout->addWidget(xineramaGroupBox);
} }
#ifdef COMPOSITE #ifdef COMPOSITE
QGroupBox *screenshotsGroupBox = new QGroupBox( 4, Vertical, i18n("Screenshots"), page1 ); TQGroupBox *screenshotsGroupBox = new TQGroupBox( 4, Vertical, i18n("Screenshots"), page1 );
useComposite = new QCheckBox(i18n("Use XComposite if available"), screenshotsGroupBox); useComposite = new TQCheckBox(i18n("Use XComposite if available"), screenshotsGroupBox);
QString useCompositeHelp = i18n("Making use of the Composite extension of newer X Servers makes the grabbing of screenshots obsolete.\nThe contents of all windows are drawn in back buffers that will be accessed by Komposé\nNote that the Composite implementation of even modern graphic card drivers is still very slow and may make your system pretty unusable."); TQString useCompositeHelp = i18n("Making use of the Composite extension of newer X Servers makes the grabbing of screenshots obsolete.\nThe contents of all windows are drawn in back buffers that will be accessed by Komposé\nNote that the Composite implementation of even modern graphic card drivers is still very slow and may make your system pretty unusable.");
QWhatsThis::add( useComposite, useCompositeHelp ); TQWhatsThis::add( useComposite, useCompositeHelp );
QToolTip::add( useComposite, useCompositeHelp ); TQToolTip::add( useComposite, useCompositeHelp );
connect( useComposite, SIGNAL(toggled(bool)), SLOT(setUseCompositeToggled(bool)) ); connect( useComposite, SIGNAL(toggled(bool)), SLOT(setUseCompositeToggled(bool)) );
#else #else
QGroupBox *screenshotsGroupBox = new QGroupBox( 3, Vertical, i18n("Screenshots"), page1 ); TQGroupBox *screenshotsGroupBox = new TQGroupBox( 3, Vertical, i18n("Screenshots"), page1 );
#endif #endif
passiveScreenshots = new QCheckBox(i18n("Passive screenshots"), screenshotsGroupBox); passiveScreenshots = new TQCheckBox(i18n("Passive screenshots"), screenshotsGroupBox);
QString passiveScreenshotsHelp = i18n("Create a screenshot whenever you raise or active a window.\nWhen selected the amount the annoying popup-effect before every Komposé activation will be minimized to nearly zero.\nThe drawback is that the screenshots are not so recent and may not display the actual content."); TQString passiveScreenshotsHelp = i18n("Create a screenshot whenever you raise or active a window.\nWhen selected the amount the annoying popup-effect before every Komposé activation will be minimized to nearly zero.\nThe drawback is that the screenshots are not so recent and may not display the actual content.");
QWhatsThis::add( passiveScreenshots, passiveScreenshotsHelp ); TQWhatsThis::add( passiveScreenshots, passiveScreenshotsHelp );
QToolTip::add( passiveScreenshots, passiveScreenshotsHelp ); TQToolTip::add( passiveScreenshots, passiveScreenshotsHelp );
QHBox *hLayScreenshotGrabDelay = new QHBox(screenshotsGroupBox); TQHBox *hLayScreenshotGrabDelay = new TQHBox(screenshotsGroupBox);
QLabel *screenshotGrabDelayLabel = new QLabel(i18n("Delay between screenshots (ms):"), hLayScreenshotGrabDelay); TQLabel *screenshotGrabDelayLabel = new TQLabel(i18n("Delay between screenshots (ms):"), hLayScreenshotGrabDelay);
screenshotGrabDelay = new QSpinBox(0, 999, 10, hLayScreenshotGrabDelay); screenshotGrabDelay = new TQSpinBox(0, 999, 10, hLayScreenshotGrabDelay);
screenshotGrabDelayLabel->setBuddy(screenshotGrabDelay); screenshotGrabDelayLabel->setBuddy(screenshotGrabDelay);
QString screenshotGrabDelayHelp = i18n("Specifies the time to wait between the activation of a window and the screenshot taking.\nIncrease it when your windows need more time to draw themselves after activation.\nValues below 300ms are not recommended, but may work in some cases." ); TQString screenshotGrabDelayHelp = i18n("Specifies the time to wait between the activation of a window and the screenshot taking.\nIncrease it when your windows need more time to draw themselves after activation.\nValues below 300ms are not recommended, but may work in some cases." );
QWhatsThis::add( screenshotGrabDelay, screenshotGrabDelayHelp ); TQWhatsThis::add( screenshotGrabDelay, screenshotGrabDelayHelp );
QToolTip::add( screenshotGrabDelay, screenshotGrabDelayHelp ); TQToolTip::add( screenshotGrabDelay, screenshotGrabDelayHelp );
QWhatsThis::add( screenshotGrabDelayLabel, screenshotGrabDelayHelp ); TQWhatsThis::add( screenshotGrabDelayLabel, screenshotGrabDelayHelp );
QToolTip::add( screenshotGrabDelayLabel, screenshotGrabDelayHelp ); TQToolTip::add( screenshotGrabDelayLabel, screenshotGrabDelayHelp );
cacheScaledPixmaps = new QCheckBox(i18n("Cache scaled Screenshots"), screenshotsGroupBox); cacheScaledPixmaps = new TQCheckBox(i18n("Cache scaled Screenshots"), screenshotsGroupBox);
QString cacheScaledPixmapsHelp = i18n("This may avoid some scaling operations to be called repeatedly when Komposé has been displayed before and the screenshot's size didn't change.\nIt will however increase memory usage quite a bit."); TQString cacheScaledPixmapsHelp = i18n("This may avoid some scaling operations to be called repeatedly when Komposé has been displayed before and the screenshot's size didn't change.\nIt will however increase memory usage quite a bit.");
QWhatsThis::add( cacheScaledPixmaps, cacheScaledPixmapsHelp ); TQWhatsThis::add( cacheScaledPixmaps, cacheScaledPixmapsHelp );
QToolTip::add( cacheScaledPixmaps, cacheScaledPixmapsHelp ); TQToolTip::add( cacheScaledPixmaps, cacheScaledPixmapsHelp );
page1Layout->addWidget(screenshotsGroupBox); page1Layout->addWidget(screenshotsGroupBox);
// Autolock // Autolock
QGroupBox* autoLockGroup = new QGroupBox( 0, Qt::Horizontal, i18n("Autoactivate when mouse moves into"), page1 ); TQGroupBox* autoLockGroup = new TQGroupBox( 0, TQt::Horizontal, i18n("Autoactivate when mouse moves into"), page1 );
QGridLayout* autoLockLayout = new QGridLayout( autoLockGroup->layout(), 5, 2, KDialog::spacingHint() ); TQGridLayout* autoLockLayout = new TQGridLayout( autoLockGroup->layout(), 5, 2, KDialog::spacingHint() );
m_topLeftCorner = new QCheckBox( i18n("Top-left corner"), autoLockGroup); m_topLeftCorner = new TQCheckBox( i18n("Top-left corner"), autoLockGroup);
autoLockLayout->addWidget( m_topLeftCorner, 0, 0 ); autoLockLayout->addWidget( m_topLeftCorner, 0, 0 );
m_topRightCorner = new QCheckBox( i18n("Top-right corner"), autoLockGroup ); m_topRightCorner = new TQCheckBox( i18n("Top-right corner"), autoLockGroup );
autoLockLayout->addWidget( m_topRightCorner, 1, 0 ); autoLockLayout->addWidget( m_topRightCorner, 1, 0 );
m_bottomLeftCorner = new QCheckBox( i18n("Bottom-left corner"), autoLockGroup ); m_bottomLeftCorner = new TQCheckBox( i18n("Bottom-left corner"), autoLockGroup );
autoLockLayout->addWidget( m_bottomLeftCorner, 2, 0 ); autoLockLayout->addWidget( m_bottomLeftCorner, 2, 0 );
m_bottomRightCorner = new QCheckBox( i18n("Bottom-right corner"), autoLockGroup ); m_bottomRightCorner = new TQCheckBox( i18n("Bottom-right corner"), autoLockGroup );
autoLockLayout->addWidget( m_bottomRightCorner, 3, 0 ); autoLockLayout->addWidget( m_bottomRightCorner, 3, 0 );
m_topEdge = new QCheckBox( i18n("Top edge"), autoLockGroup); m_topEdge = new TQCheckBox( i18n("Top edge"), autoLockGroup);
autoLockLayout->addWidget( m_topEdge, 0, 1 ); autoLockLayout->addWidget( m_topEdge, 0, 1 );
m_bottomEdge = new QCheckBox( i18n("Bottom edge"), autoLockGroup ); m_bottomEdge = new TQCheckBox( i18n("Bottom edge"), autoLockGroup );
autoLockLayout->addWidget( m_bottomEdge, 1, 1 ); autoLockLayout->addWidget( m_bottomEdge, 1, 1 );
m_leftEdge = new QCheckBox( i18n("Left edge"), autoLockGroup ); m_leftEdge = new TQCheckBox( i18n("Left edge"), autoLockGroup );
autoLockLayout->addWidget( m_leftEdge, 2, 1 ); autoLockLayout->addWidget( m_leftEdge, 2, 1 );
m_rightEdge = new QCheckBox( i18n("Right edge"), autoLockGroup ); m_rightEdge = new TQCheckBox( i18n("Right edge"), autoLockGroup );
autoLockLayout->addWidget( m_rightEdge, 3, 1 ); autoLockLayout->addWidget( m_rightEdge, 3, 1 );
QHBox *hLayAutoLockDelay = new QHBox(autoLockGroup); TQHBox *hLayAutoLockDelay = new TQHBox(autoLockGroup);
QLabel *autoLockDelayLabel = new QLabel(i18n("Delay until activation (ms):"), hLayAutoLockDelay); TQLabel *autoLockDelayLabel = new TQLabel(i18n("Delay until activation (ms):"), hLayAutoLockDelay);
autoLockDelay = new QSpinBox(0, 5000, 10, hLayAutoLockDelay); autoLockDelay = new TQSpinBox(0, 5000, 10, hLayAutoLockDelay);
autoLockDelayLabel->setBuddy(autoLockDelay); autoLockDelayLabel->setBuddy(autoLockDelay);
QString autoLockDelayHelp = i18n("Specifies the time in ms for which the mouse pointer must rest in the corner until auto-activation." ); TQString autoLockDelayHelp = i18n("Specifies the time in ms for which the mouse pointer must rest in the corner until auto-activation." );
QWhatsThis::add( autoLockDelay, autoLockDelayHelp ); TQWhatsThis::add( autoLockDelay, autoLockDelayHelp );
QToolTip::add( autoLockDelay, autoLockDelayHelp ); TQToolTip::add( autoLockDelay, autoLockDelayHelp );
QWhatsThis::add( autoLockDelayLabel, autoLockDelayHelp ); TQWhatsThis::add( autoLockDelayLabel, autoLockDelayHelp );
QToolTip::add( autoLockDelayLabel, autoLockDelayHelp ); TQToolTip::add( autoLockDelayLabel, autoLockDelayHelp );
autoLockLayout->addMultiCellWidget( hLayAutoLockDelay, 4, 4, 0, 1 ); autoLockLayout->addMultiCellWidget( hLayAutoLockDelay, 4, 4, 0, 1 );
page1Layout->addWidget(autoLockGroup); page1Layout->addWidget(autoLockGroup);
@ -160,39 +160,39 @@ KomposePreferences::KomposePreferences()
QVBoxLayout *page2Layout = new QVBoxLayout( page2, 0, KDialog::spacingHint() ); TQVBoxLayout *page2Layout = new TQVBoxLayout( page2, 0, KDialog::spacingHint() );
imageEffects = new QCheckBox(i18n("Enable image effects"), page2); imageEffects = new TQCheckBox(i18n("Enable image effects"), page2);
QString imageEffectsHelp = i18n("Lighten windows when the mouse moves over it or gray out minimized windows.\nDepending on your system specs this can be a bit slower." ); TQString imageEffectsHelp = i18n("Lighten windows when the mouse moves over it or gray out minimized windows.\nDepending on your system specs this can be a bit slower." );
QWhatsThis::add( imageEffects, imageEffectsHelp ); TQWhatsThis::add( imageEffects, imageEffectsHelp );
QToolTip::add( imageEffects, imageEffectsHelp ); TQToolTip::add( imageEffects, imageEffectsHelp );
page2Layout->addWidget(imageEffects); page2Layout->addWidget(imageEffects);
showDesktopNum = new QCheckBox(i18n("Show Desktop number on Systray icon"), page2); showDesktopNum = new TQCheckBox(i18n("Show Desktop number on Systray icon"), page2);
QString showDesktopNumHelp = i18n("Displays the number of the currently active Desktop on the Komposé systray icon." ); TQString showDesktopNumHelp = i18n("Displays the number of the currently active Desktop on the Komposé systray icon." );
QWhatsThis::add( showDesktopNum, showDesktopNumHelp ); TQWhatsThis::add( showDesktopNum, showDesktopNumHelp );
QToolTip::add( showDesktopNum, showDesktopNumHelp ); TQToolTip::add( showDesktopNum, showDesktopNumHelp );
page2Layout->addWidget(showDesktopNum); page2Layout->addWidget(showDesktopNum);
QGroupBox *windowTitleGroupBox = new QGroupBox( 3, Vertical, i18n("Window Titles"), page2 ); TQGroupBox *windowTitleGroupBox = new TQGroupBox( 3, Vertical, i18n("Window Titles"), page2 );
QHBox *hBoxWindowTitles = new QHBox(windowTitleGroupBox); TQHBox *hBoxWindowTitles = new TQHBox(windowTitleGroupBox);
showWindowTitles = new QCheckBox(i18n("Show window titles"), hBoxWindowTitles); showWindowTitles = new TQCheckBox(i18n("Show window titles"), hBoxWindowTitles);
windowTitleFontBtn = new QPushButton(i18n("Select Font..."), hBoxWindowTitles); windowTitleFontBtn = new TQPushButton(i18n("Select Font..."), hBoxWindowTitles);
QString showWindowTitlesHelp = i18n( "Display the name of every window in Komposé" ); TQString showWindowTitlesHelp = i18n( "Display the name of every window in Komposé" );
QWhatsThis::add( showWindowTitles, showWindowTitlesHelp ); TQWhatsThis::add( showWindowTitles, showWindowTitlesHelp );
QToolTip::add( showWindowTitles, showWindowTitlesHelp ); TQToolTip::add( showWindowTitles, showWindowTitlesHelp );
connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontBtn, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontBtn, SLOT(setEnabled(bool)) );
connect( windowTitleFontBtn, SIGNAL(clicked()), this, SLOT(showWindowTitleFontDialog()) ); connect( windowTitleFontBtn, SIGNAL(clicked()), this, SLOT(showWindowTitleFontDialog()) );
QGrid *gridWindowTitlesColor = new QGrid(2, windowTitleGroupBox); TQGrid *gridWindowTitlesColor = new TQGrid(2, windowTitleGroupBox);
// windowTitleFontColorLabel = new QLabel(windowTitleFontColor, i18n("Text color: "), gridWindowTitlesColor); // FIXME: How to link to a buddy that doesn't yet exist? // windowTitleFontColorLabel = new TQLabel(windowTitleFontColor, i18n("Text color: "), gridWindowTitlesColor); // FIXME: How to link to a buddy that doesn't yet exist?
windowTitleFontColorLabel = new QLabel(i18n("Text color:"), gridWindowTitlesColor); windowTitleFontColorLabel = new TQLabel(i18n("Text color:"), gridWindowTitlesColor);
windowTitleFontColor = new KColorButton(Qt::black, gridWindowTitlesColor); windowTitleFontColor = new KColorButton(TQt::black, gridWindowTitlesColor);
connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontColorLabel, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontColorLabel, SLOT(setEnabled(bool)) );
connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontColor, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontColor, SLOT(setEnabled(bool)) );
showWindowTitleShadow = new QCheckBox(i18n("Shadow color:"), gridWindowTitlesColor); showWindowTitleShadow = new TQCheckBox(i18n("Shadow color:"), gridWindowTitlesColor);
windowTitleFontShadowColor = new KColorButton(Qt::lightGray, gridWindowTitlesColor); windowTitleFontShadowColor = new KColorButton(TQt::lightGray, gridWindowTitlesColor);
connect( showWindowTitles, SIGNAL(toggled(bool)), showWindowTitleShadow, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), showWindowTitleShadow, SLOT(setEnabled(bool)) );
connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontShadowColor, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontShadowColor, SLOT(setEnabled(bool)) );
connect( showWindowTitleShadow, SIGNAL(toggled(bool)), windowTitleFontShadowColor, SLOT(setEnabled(bool)) ); connect( showWindowTitleShadow, SIGNAL(toggled(bool)), windowTitleFontShadowColor, SLOT(setEnabled(bool)) );
@ -201,10 +201,10 @@ KomposePreferences::KomposePreferences()
QGroupBox *iconGroupBox = new QGroupBox( 3, Vertical, i18n("Task Icons"), page2 ); TQGroupBox *iconGroupBox = new TQGroupBox( 3, Vertical, i18n("Task Icons"), page2 );
showIcons = new QCheckBox(i18n("Show icons"), iconGroupBox); showIcons = new TQCheckBox(i18n("Show icons"), iconGroupBox);
iconSize = new QSlider(0, 3, 1, 0, Qt::Horizontal, iconGroupBox); iconSize = new TQSlider(0, 3, 1, 0, TQt::Horizontal, iconGroupBox);
iconSizeDescription = new QLabel( iconSize, "", iconGroupBox); iconSizeDescription = new TQLabel( iconSize, "", iconGroupBox);
connect( iconSize, SIGNAL( sliderMoved(int) ), this, SLOT( updateIconSliderDesc(int) ) ); connect( iconSize, SIGNAL( sliderMoved(int) ), this, SLOT( updateIconSliderDesc(int) ) );
connect( iconSize, SIGNAL( valueChanged(int) ), this, SLOT( updateIconSliderDesc(int) ) ); connect( iconSize, SIGNAL( valueChanged(int) ), this, SLOT( updateIconSliderDesc(int) ) );
connect( showIcons, SIGNAL( toggled(bool) ), iconSize, SLOT( setEnabled(bool) ) ); connect( showIcons, SIGNAL( toggled(bool) ), iconSize, SLOT( setEnabled(bool) ) );
@ -215,24 +215,24 @@ KomposePreferences::KomposePreferences()
QVBoxLayout *page3Layout = new QVBoxLayout( page3, 0, KDialog::spacingHint() ); TQVBoxLayout *page3Layout = new TQVBoxLayout( page3, 0, KDialog::spacingHint() );
QVGroupBox *virtDesksLayoutGroupBox = new QVGroupBox( i18n("Grouped by Virtual Desktops"), page3 ); TQVGroupBox *virtDesksLayoutGroupBox = new TQVGroupBox( i18n("Grouped by Virtual Desktops"), page3 );
dynamicVirtDeskLayout = new QCheckBox(i18n("Layout empty virtual desktops minimized"), virtDesksLayoutGroupBox ); dynamicVirtDeskLayout = new TQCheckBox(i18n("Layout empty virtual desktops minimized"), virtDesksLayoutGroupBox );
QString dynamicVirtDeskLayoutHelp = i18n("Check this if you want empty virtual desktops to take less space on the screen.\nUncheck it if you want them to be arranged statically, each of the same size."); TQString dynamicVirtDeskLayoutHelp = i18n("Check this if you want empty virtual desktops to take less space on the screen.\nUncheck it if you want them to be arranged statically, each of the same size.");
QWhatsThis::add( dynamicVirtDeskLayout, dynamicVirtDeskLayoutHelp ); TQWhatsThis::add( dynamicVirtDeskLayout, dynamicVirtDeskLayoutHelp );
QToolTip::add( dynamicVirtDeskLayout, dynamicVirtDeskLayoutHelp ); TQToolTip::add( dynamicVirtDeskLayout, dynamicVirtDeskLayoutHelp );
QGrid *desktopColorsGroupBox = new QGrid( 2, virtDesksLayoutGroupBox ); TQGrid *desktopColorsGroupBox = new TQGrid( 2, virtDesksLayoutGroupBox );
desktopColorsGroupBox->setSpacing( 4 ); desktopColorsGroupBox->setSpacing( 4 );
desktopTitleFontColorLabel = new QLabel(i18n("Desktop frame color:"), desktopColorsGroupBox); desktopTitleFontColorLabel = new TQLabel(i18n("Desktop frame color:"), desktopColorsGroupBox);
desktopTitleFontColor = new KColorButton(Qt::black, desktopColorsGroupBox); desktopTitleFontColor = new KColorButton(TQt::black, desktopColorsGroupBox);
desktopTitleFontHighlightColorLabel = new QLabel(i18n("Desktop frame highlight color:"), desktopColorsGroupBox); desktopTitleFontHighlightColorLabel = new TQLabel(i18n("Desktop frame highlight color:"), desktopColorsGroupBox);
desktopTitleFontHighlightColor = new KColorButton(Qt::black, desktopColorsGroupBox); desktopTitleFontHighlightColor = new KColorButton(TQt::black, desktopColorsGroupBox);
page3Layout->addWidget(virtDesksLayoutGroupBox); page3Layout->addWidget(virtDesksLayoutGroupBox);
desktopTitleFontBtn = new QPushButton(i18n("Select Desktop Names Font..."), virtDesksLayoutGroupBox); desktopTitleFontBtn = new TQPushButton(i18n("Select Desktop Names Font..."), virtDesksLayoutGroupBox);
connect( desktopTitleFontBtn, SIGNAL(clicked()), this, SLOT(showDesktopTitleFontDialog()) ); connect( desktopTitleFontBtn, SIGNAL(clicked()), this, SLOT(showDesktopTitleFontDialog()) );
page3Layout->insertStretch(-1); page3Layout->insertStretch(-1);
@ -303,7 +303,7 @@ void KomposePreferences::fillPages()
showDesktopNum->setChecked( KomposeSettings::instance()->getShowDesktopNum() ); showDesktopNum->setChecked( KomposeSettings::instance()->getShowDesktopNum() );
showWindowTitles->setChecked( KomposeSettings::instance()->getShowWindowTitles() ); showWindowTitles->setChecked( KomposeSettings::instance()->getShowWindowTitles() );
windowTitleFont = new QFont(KomposeSettings::instance()->getWindowTitleFont()); windowTitleFont = new TQFont(KomposeSettings::instance()->getWindowTitleFont());
windowTitleFontColor->setColor( KomposeSettings::instance()->getWindowTitleFontColor() ); windowTitleFontColor->setColor( KomposeSettings::instance()->getWindowTitleFontColor() );
windowTitleFontShadowColor->setColor( KomposeSettings::instance()->getWindowTitleFontShadowColor() ); windowTitleFontShadowColor->setColor( KomposeSettings::instance()->getWindowTitleFontShadowColor() );
showWindowTitleShadow->setChecked( KomposeSettings::instance()->getShowWindowTitleShadow() ); showWindowTitleShadow->setChecked( KomposeSettings::instance()->getShowWindowTitleShadow() );
@ -314,7 +314,7 @@ void KomposePreferences::fillPages()
showWindowTitleShadow->setEnabled( KomposeSettings::instance()->getShowWindowTitles() ); showWindowTitleShadow->setEnabled( KomposeSettings::instance()->getShowWindowTitles() );
windowTitleFontShadowColor->setEnabled( KomposeSettings::instance()->getShowWindowTitles() || KomposeSettings::instance()->getShowWindowTitleShadow() ); windowTitleFontShadowColor->setEnabled( KomposeSettings::instance()->getShowWindowTitles() || KomposeSettings::instance()->getShowWindowTitleShadow() );
desktopTitleFont = new QFont(KomposeSettings::instance()->getDesktopTitleFont()); desktopTitleFont = new TQFont(KomposeSettings::instance()->getDesktopTitleFont());
desktopTitleFontColor->setColor( KomposeSettings::instance()->getDesktopTitleFontColor() ); desktopTitleFontColor->setColor( KomposeSettings::instance()->getDesktopTitleFontColor() );
desktopTitleFontHighlightColor->setColor( KomposeSettings::instance()->getDesktopTitleFontHighlightColor() ); desktopTitleFontHighlightColor->setColor( KomposeSettings::instance()->getDesktopTitleFontHighlightColor() );

@ -13,72 +13,72 @@
#include "komposesettings.h" #include "komposesettings.h"
#include <qlayout.h> #include <tqlayout.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <kapplication.h> #include <kapplication.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qhbox.h> #include <tqhbox.h>
#include <qslider.h> #include <tqslider.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qgrid.h> #include <tqgrid.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kcolorbutton.h> #include <kcolorbutton.h>
#include <kfontdialog.h> #include <kfontdialog.h>
KomposePreferences::KomposePreferences() KomposePreferences::KomposePreferences()
: KDialogBase(IconList, i18n(QString::fromUtf8("Komposé Preferences").utf8()), Ok|Apply|Cancel, Ok) : KDialogBase(IconList, i18n(TQString::fromUtf8("Komposé Preferences").utf8()), Ok|Apply|Cancel, Ok)
{ {
QFrame *page1 = addPage( i18n("Behavior"), QString::null, DesktopIcon("winprops", KIcon::SizeMedium) ); TQFrame *page1 = addPage( i18n("Behavior"), TQString::null, DesktopIcon("winprops", KIcon::SizeMedium) );
QFrame *page2 = addPage( i18n("Appearance"), QString::null, DesktopIcon("appearance", KIcon::SizeMedium) ); TQFrame *page2 = addPage( i18n("Appearance"), TQString::null, DesktopIcon("appearance", KIcon::SizeMedium) );
QFrame *page3 = addPage( i18n("Layouts"), QString::null, DesktopIcon("window_list", KIcon::SizeMedium) ); TQFrame *page3 = addPage( i18n("Layouts"), TQString::null, DesktopIcon("window_list", KIcon::SizeMedium) );
QVBoxLayout *page1Layout = new QVBoxLayout( page1, 0, KDialog::spacingHint() ); TQVBoxLayout *page1Layout = new TQVBoxLayout( page1, 0, KDialog::spacingHint() );
defaultViewBtnGroup = new QButtonGroup( 2, Horizontal, i18n("Default Layout"), page1 ); defaultViewBtnGroup = new TQButtonGroup( 2, Horizontal, i18n("Default Layout"), page1 );
defaultViewBtnGroup->setExclusive( true ); defaultViewBtnGroup->setExclusive( true );
QString defaultViewBtnGroupHelp = i18n("Determines which view should be started by default (e.g. when you click on the systray icon)."); TQString defaultViewBtnGroupHelp = i18n("Determines which view should be started by default (e.g. when you click on the systray icon).");
QWhatsThis::add( defaultViewBtnGroup, defaultViewBtnGroupHelp ); TQWhatsThis::add( defaultViewBtnGroup, defaultViewBtnGroupHelp );
QToolTip::add( defaultViewBtnGroup, defaultViewBtnGroupHelp ); TQToolTip::add( defaultViewBtnGroup, defaultViewBtnGroupHelp );
defaultViewWorld = new QRadioButton(i18n("Ungrouped"), defaultViewBtnGroup ); defaultViewWorld = new TQRadioButton(i18n("Ungrouped"), defaultViewBtnGroup );
QString defaultViewWorldHelp = i18n("Fullscreen layout that shows all windows in no specific order"); TQString defaultViewWorldHelp = i18n("Fullscreen layout that shows all windows in no specific order");
QWhatsThis::add( defaultViewWorld, defaultViewWorldHelp ); TQWhatsThis::add( defaultViewWorld, defaultViewWorldHelp );
QToolTip::add( defaultViewWorld, defaultViewWorldHelp ); TQToolTip::add( defaultViewWorld, defaultViewWorldHelp );
defaultViewVirtualDesks = new QRadioButton(i18n("Grouped by virtual desktops"), defaultViewBtnGroup ); defaultViewVirtualDesks = new TQRadioButton(i18n("Grouped by virtual desktops"), defaultViewBtnGroup );
QString defaultViewVirtualDesksHelp = i18n("Fullscreen layout that shows a representation of your virtual desktops\n and places the windows inside."); TQString defaultViewVirtualDesksHelp = i18n("Fullscreen layout that shows a representation of your virtual desktops\n and places the windows inside.");
QWhatsThis::add( defaultViewVirtualDesks, defaultViewVirtualDesksHelp ); TQWhatsThis::add( defaultViewVirtualDesks, defaultViewVirtualDesksHelp );
QToolTip::add( defaultViewVirtualDesks, defaultViewVirtualDesksHelp ); TQToolTip::add( defaultViewVirtualDesks, defaultViewVirtualDesksHelp );
page1Layout->addWidget(defaultViewBtnGroup); page1Layout->addWidget(defaultViewBtnGroup);
QGroupBox *screenshotsGroupBox = new QGroupBox( 3, Vertical, i18n("Screenshots"), page1 ); TQGroupBox *screenshotsGroupBox = new TQGroupBox( 3, Vertical, i18n("Screenshots"), page1 );
passiveScreenshots = new QCheckBox(i18n("Passive screenshots"), screenshotsGroupBox); passiveScreenshots = new TQCheckBox(i18n("Passive screenshots"), screenshotsGroupBox);
QString passiveScreenshotsHelp = i18n(QString::fromUtf8("Create a screenshot whenever you raise or active a window.\nWhen selected the amount the annoying popup-effect before every Komposé activation will be minimized to nearly zero.\nThe drawback is that the screenshots are not so recent and may not display the actual content.").utf8()); TQString passiveScreenshotsHelp = i18n(TQString::fromUtf8("Create a screenshot whenever you raise or active a window.\nWhen selected the amount the annoying popup-effect before every Komposé activation will be minimized to nearly zero.\nThe drawback is that the screenshots are not so recent and may not display the actual content.").utf8());
QWhatsThis::add( passiveScreenshots, passiveScreenshotsHelp ); TQWhatsThis::add( passiveScreenshots, passiveScreenshotsHelp );
QToolTip::add( passiveScreenshots, passiveScreenshotsHelp ); TQToolTip::add( passiveScreenshots, passiveScreenshotsHelp );
// onlyOneScreenshot = new QCheckBox(i18n("Only grab a screenshot when none exists"), screenshotsGroupBox); // onlyOneScreenshot = new TQCheckBox(i18n("Only grab a screenshot when none exists"), screenshotsGroupBox);
// QString onlyOneScreenshotHelp = i18n("When disabled new screenshots will be taken whenever possible.\nEnabling will only create a screenshot once the application is first activated and will never update it."); // TQString onlyOneScreenshotHelp = i18n("When disabled new screenshots will be taken whenever possible.\nEnabling will only create a screenshot once the application is first activated and will never update it.");
// QWhatsThis::add( onlyOneScreenshot, onlyOneScreenshotHelp ); // TQWhatsThis::add( onlyOneScreenshot, onlyOneScreenshotHelp );
// QToolTip::add( onlyOneScreenshot, onlyOneScreenshotHelp ); // TQToolTip::add( onlyOneScreenshot, onlyOneScreenshotHelp );
QHBox *hLayScreenshotGrabDelay = new QHBox(screenshotsGroupBox); TQHBox *hLayScreenshotGrabDelay = new TQHBox(screenshotsGroupBox);
QLabel *screenshotGrabDelayLabel = new QLabel(i18n("Delay between screenshots (ms):"), hLayScreenshotGrabDelay); TQLabel *screenshotGrabDelayLabel = new TQLabel(i18n("Delay between screenshots (ms):"), hLayScreenshotGrabDelay);
screenshotGrabDelay = new QSpinBox(0, 2000, 1, hLayScreenshotGrabDelay); screenshotGrabDelay = new TQSpinBox(0, 2000, 1, hLayScreenshotGrabDelay);
screenshotGrabDelayLabel->setBuddy(screenshotGrabDelay); screenshotGrabDelayLabel->setBuddy(screenshotGrabDelay);
QString screenshotGrabDelayHelp = i18n("Specifies the time to wait between the activation of a window and the screenshot taking.\nIncrease it when your windows need more time to draw themselves after activation.\nValues below 300ms are not recommended, but may work in some cases." ); TQString screenshotGrabDelayHelp = i18n("Specifies the time to wait between the activation of a window and the screenshot taking.\nIncrease it when your windows need more time to draw themselves after activation.\nValues below 300ms are not recommended, but may work in some cases." );
QWhatsThis::add( screenshotGrabDelay, screenshotGrabDelayHelp ); TQWhatsThis::add( screenshotGrabDelay, screenshotGrabDelayHelp );
QToolTip::add( screenshotGrabDelay, screenshotGrabDelayHelp ); TQToolTip::add( screenshotGrabDelay, screenshotGrabDelayHelp );
QWhatsThis::add( screenshotGrabDelayLabel, screenshotGrabDelayHelp ); TQWhatsThis::add( screenshotGrabDelayLabel, screenshotGrabDelayHelp );
QToolTip::add( screenshotGrabDelayLabel, screenshotGrabDelayHelp ); TQToolTip::add( screenshotGrabDelayLabel, screenshotGrabDelayHelp );
page1Layout->addWidget(screenshotsGroupBox); page1Layout->addWidget(screenshotsGroupBox);
@ -86,34 +86,34 @@ KomposePreferences::KomposePreferences()
QVBoxLayout *page2Layout = new QVBoxLayout( page2, 0, KDialog::spacingHint() ); TQVBoxLayout *page2Layout = new TQVBoxLayout( page2, 0, KDialog::spacingHint() );
imageEffects = new QCheckBox(i18n("Enable image effects"), page2); imageEffects = new TQCheckBox(i18n("Enable image effects"), page2);
QString imageEffectsHelp = i18n("Lighten windows when the mouse moves over it or gray out minimized windows.\nDepending on your system specs this can be a bit slower." ); TQString imageEffectsHelp = i18n("Lighten windows when the mouse moves over it or gray out minimized windows.\nDepending on your system specs this can be a bit slower." );
QWhatsThis::add( imageEffects, imageEffectsHelp ); TQWhatsThis::add( imageEffects, imageEffectsHelp );
QToolTip::add( imageEffects, imageEffectsHelp ); TQToolTip::add( imageEffects, imageEffectsHelp );
page2Layout->addWidget(imageEffects); page2Layout->addWidget(imageEffects);
QGroupBox *windowTitleGroupBox = new QGroupBox( 3, Vertical, i18n("Window Titles"), page2 ); TQGroupBox *windowTitleGroupBox = new TQGroupBox( 3, Vertical, i18n("Window Titles"), page2 );
QHBox *hBoxWindowTitles = new QHBox(windowTitleGroupBox); TQHBox *hBoxWindowTitles = new TQHBox(windowTitleGroupBox);
showWindowTitles = new QCheckBox(i18n("Show window titles"), hBoxWindowTitles); showWindowTitles = new TQCheckBox(i18n("Show window titles"), hBoxWindowTitles);
windowTitleFontBtn = new QPushButton(i18n("Select Font..."), hBoxWindowTitles); windowTitleFontBtn = new TQPushButton(i18n("Select Font..."), hBoxWindowTitles);
QString showWindowTitlesHelp = i18n( QString::fromUtf8("Display the name of every window in Komposé") ); TQString showWindowTitlesHelp = i18n( TQString::fromUtf8("Display the name of every window in Komposé") );
QWhatsThis::add( showWindowTitles, showWindowTitlesHelp ); TQWhatsThis::add( showWindowTitles, showWindowTitlesHelp );
QToolTip::add( showWindowTitles, showWindowTitlesHelp ); TQToolTip::add( showWindowTitles, showWindowTitlesHelp );
connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontBtn, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontBtn, SLOT(setEnabled(bool)) );
connect( windowTitleFontBtn, SIGNAL(clicked()), this, SLOT(showWindowTitleFontDialog()) ); connect( windowTitleFontBtn, SIGNAL(clicked()), this, SLOT(showWindowTitleFontDialog()) );
QGrid *gridWindowTitlesColor = new QGrid(2, windowTitleGroupBox); TQGrid *gridWindowTitlesColor = new TQGrid(2, windowTitleGroupBox);
// windowTitleFontColorLabel = new QLabel(windowTitleFontColor, i18n("Text color: "), gridWindowTitlesColor); // FIXME: How to link to a buddy that doesn't yet exist? // windowTitleFontColorLabel = new TQLabel(windowTitleFontColor, i18n("Text color: "), gridWindowTitlesColor); // FIXME: How to link to a buddy that doesn't yet exist?
windowTitleFontColorLabel = new QLabel(i18n("Text color:"), gridWindowTitlesColor); windowTitleFontColorLabel = new TQLabel(i18n("Text color:"), gridWindowTitlesColor);
windowTitleFontColor = new KColorButton(Qt::black, gridWindowTitlesColor); windowTitleFontColor = new KColorButton(TQt::black, gridWindowTitlesColor);
connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontColorLabel, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontColorLabel, SLOT(setEnabled(bool)) );
connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontColor, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontColor, SLOT(setEnabled(bool)) );
showWindowTitleShadow = new QCheckBox(i18n("Shadow color:"), gridWindowTitlesColor); showWindowTitleShadow = new TQCheckBox(i18n("Shadow color:"), gridWindowTitlesColor);
windowTitleFontShadowColor = new KColorButton(Qt::lightGray, gridWindowTitlesColor); windowTitleFontShadowColor = new KColorButton(TQt::lightGray, gridWindowTitlesColor);
connect( showWindowTitles, SIGNAL(toggled(bool)), showWindowTitleShadow, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), showWindowTitleShadow, SLOT(setEnabled(bool)) );
connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontShadowColor, SLOT(setEnabled(bool)) ); connect( showWindowTitles, SIGNAL(toggled(bool)), windowTitleFontShadowColor, SLOT(setEnabled(bool)) );
connect( showWindowTitleShadow, SIGNAL(toggled(bool)), windowTitleFontShadowColor, SLOT(setEnabled(bool)) ); connect( showWindowTitleShadow, SIGNAL(toggled(bool)), windowTitleFontShadowColor, SLOT(setEnabled(bool)) );
@ -122,10 +122,10 @@ KomposePreferences::KomposePreferences()
QGroupBox *iconGroupBox = new QGroupBox( 3, Vertical, i18n("Task Icons"), page2 ); TQGroupBox *iconGroupBox = new TQGroupBox( 3, Vertical, i18n("Task Icons"), page2 );
showIcons = new QCheckBox(i18n("Show icons"), iconGroupBox); showIcons = new TQCheckBox(i18n("Show icons"), iconGroupBox);
iconSize = new QSlider(0, 3, 1, 0, Qt::Horizontal, iconGroupBox); iconSize = new TQSlider(0, 3, 1, 0, TQt::Horizontal, iconGroupBox);
iconSizeDescription = new QLabel( iconSize, "", iconGroupBox); iconSizeDescription = new TQLabel( iconSize, "", iconGroupBox);
connect( iconSize, SIGNAL( sliderMoved(int) ), this, SLOT( updateIconSliderDesc(int) ) ); connect( iconSize, SIGNAL( sliderMoved(int) ), this, SLOT( updateIconSliderDesc(int) ) );
connect( iconSize, SIGNAL( valueChanged(int) ), this, SLOT( updateIconSliderDesc(int) ) ); connect( iconSize, SIGNAL( valueChanged(int) ), this, SLOT( updateIconSliderDesc(int) ) );
connect( showIcons, SIGNAL( toggled(bool) ), iconSize, SLOT( setEnabled(bool) ) ); connect( showIcons, SIGNAL( toggled(bool) ), iconSize, SLOT( setEnabled(bool) ) );
@ -136,32 +136,32 @@ KomposePreferences::KomposePreferences()
QVBoxLayout *page3Layout = new QVBoxLayout( page3, 0, KDialog::spacingHint() ); TQVBoxLayout *page3Layout = new TQVBoxLayout( page3, 0, KDialog::spacingHint() );
QVGroupBox *virtDesksLayoutGroupBox = new QVGroupBox( i18n("Grouped by Virtual Desktops"), page3 ); TQVGroupBox *virtDesksLayoutGroupBox = new TQVGroupBox( i18n("Grouped by Virtual Desktops"), page3 );
dynamicVirtDeskLayout = new QCheckBox(i18n("Layout empty virtual desktops minimized"), virtDesksLayoutGroupBox ); dynamicVirtDeskLayout = new TQCheckBox(i18n("Layout empty virtual desktops minimized"), virtDesksLayoutGroupBox );
QString dynamicVirtDeskLayoutHelp = i18n("Check this if you want empty virtual desktops to take less space on the screen.\nUncheck it if you want them to be arranged statically, each of the same size."); TQString dynamicVirtDeskLayoutHelp = i18n("Check this if you want empty virtual desktops to take less space on the screen.\nUncheck it if you want them to be arranged statically, each of the same size.");
QWhatsThis::add( dynamicVirtDeskLayout, dynamicVirtDeskLayoutHelp ); TQWhatsThis::add( dynamicVirtDeskLayout, dynamicVirtDeskLayoutHelp );
QToolTip::add( dynamicVirtDeskLayout, dynamicVirtDeskLayoutHelp ); TQToolTip::add( dynamicVirtDeskLayout, dynamicVirtDeskLayoutHelp );
QGrid *desktopColorsGroupBox = new QGrid( 2, virtDesksLayoutGroupBox ); TQGrid *desktopColorsGroupBox = new TQGrid( 2, virtDesksLayoutGroupBox );
desktopColorsGroupBox->setSpacing( 4 ); desktopColorsGroupBox->setSpacing( 4 );
tintVirtDesks = new QCheckBox(i18n("Tint virtual desktop widgets:"), desktopColorsGroupBox); tintVirtDesks = new TQCheckBox(i18n("Tint virtual desktop widgets:"), desktopColorsGroupBox);
tintVirtDesksColor = new KColorButton(Qt::blue, desktopColorsGroupBox); tintVirtDesksColor = new KColorButton(TQt::blue, desktopColorsGroupBox);
QString tintVirtDesksHelp = i18n("Colorize the transparent background of the virtual desktop widgets" ); TQString tintVirtDesksHelp = i18n("Colorize the transparent background of the virtual desktop widgets" );
QWhatsThis::add( tintVirtDesks, tintVirtDesksHelp ); TQWhatsThis::add( tintVirtDesks, tintVirtDesksHelp );
QToolTip::add( tintVirtDesks, tintVirtDesksHelp ); TQToolTip::add( tintVirtDesks, tintVirtDesksHelp );
QWhatsThis::add( tintVirtDesksColor, tintVirtDesksHelp ); TQWhatsThis::add( tintVirtDesksColor, tintVirtDesksHelp );
QToolTip::add( tintVirtDesksColor, tintVirtDesksHelp ); TQToolTip::add( tintVirtDesksColor, tintVirtDesksHelp );
connect( tintVirtDesks, SIGNAL(toggled(bool)), tintVirtDesksColor, SLOT(setEnabled(bool)) ); connect( tintVirtDesks, SIGNAL(toggled(bool)), tintVirtDesksColor, SLOT(setEnabled(bool)) );
desktopTitleFontColorLabel = new QLabel(i18n("Desktop frame color:"), desktopColorsGroupBox); desktopTitleFontColorLabel = new TQLabel(i18n("Desktop frame color:"), desktopColorsGroupBox);
desktopTitleFontColor = new KColorButton(Qt::black, desktopColorsGroupBox); desktopTitleFontColor = new KColorButton(TQt::black, desktopColorsGroupBox);
desktopTitleFontHighlightColorLabel = new QLabel(i18n("Desktop frame highlight color:"), desktopColorsGroupBox); desktopTitleFontHighlightColorLabel = new TQLabel(i18n("Desktop frame highlight color:"), desktopColorsGroupBox);
desktopTitleFontHighlightColor = new KColorButton(Qt::black, desktopColorsGroupBox); desktopTitleFontHighlightColor = new KColorButton(TQt::black, desktopColorsGroupBox);
page3Layout->addWidget(virtDesksLayoutGroupBox); page3Layout->addWidget(virtDesksLayoutGroupBox);
desktopTitleFontBtn = new QPushButton(i18n("Select Desktop Names Font..."), virtDesksLayoutGroupBox); desktopTitleFontBtn = new TQPushButton(i18n("Select Desktop Names Font..."), virtDesksLayoutGroupBox);
connect( desktopTitleFontBtn, SIGNAL(clicked()), this, SLOT(showDesktopTitleFontDialog()) ); connect( desktopTitleFontBtn, SIGNAL(clicked()), this, SLOT(showDesktopTitleFontDialog()) );
page3Layout->insertStretch(-1); page3Layout->insertStretch(-1);
@ -227,7 +227,7 @@ void KomposePreferences::fillPages()
tintVirtDesksColor->setEnabled( KomposeSettings::instance()->getTintVirtDesks() ); tintVirtDesksColor->setEnabled( KomposeSettings::instance()->getTintVirtDesks() );
showWindowTitles->setChecked( KomposeSettings::instance()->getShowWindowTitles() ); showWindowTitles->setChecked( KomposeSettings::instance()->getShowWindowTitles() );
windowTitleFont = new QFont(KomposeSettings::instance()->getWindowTitleFont()); windowTitleFont = new TQFont(KomposeSettings::instance()->getWindowTitleFont());
windowTitleFontColor->setColor( KomposeSettings::instance()->getWindowTitleFontColor() ); windowTitleFontColor->setColor( KomposeSettings::instance()->getWindowTitleFontColor() );
windowTitleFontShadowColor->setColor( KomposeSettings::instance()->getWindowTitleFontShadowColor() ); windowTitleFontShadowColor->setColor( KomposeSettings::instance()->getWindowTitleFontShadowColor() );
showWindowTitleShadow->setChecked( KomposeSettings::instance()->getShowWindowTitleShadow() ); showWindowTitleShadow->setChecked( KomposeSettings::instance()->getShowWindowTitleShadow() );
@ -238,7 +238,7 @@ void KomposePreferences::fillPages()
showWindowTitleShadow->setEnabled( KomposeSettings::instance()->getShowWindowTitles() ); showWindowTitleShadow->setEnabled( KomposeSettings::instance()->getShowWindowTitles() );
windowTitleFontShadowColor->setEnabled( KomposeSettings::instance()->getShowWindowTitles() || KomposeSettings::instance()->getShowWindowTitleShadow() ); windowTitleFontShadowColor->setEnabled( KomposeSettings::instance()->getShowWindowTitles() || KomposeSettings::instance()->getShowWindowTitleShadow() );
desktopTitleFont = new QFont(KomposeSettings::instance()->getDesktopTitleFont()); desktopTitleFont = new TQFont(KomposeSettings::instance()->getDesktopTitleFont());
desktopTitleFontColor->setColor( KomposeSettings::instance()->getDesktopTitleFontColor() ); desktopTitleFontColor->setColor( KomposeSettings::instance()->getDesktopTitleFontColor() );
desktopTitleFontHighlightColor->setColor( KomposeSettings::instance()->getDesktopTitleFontHighlightColor() ); desktopTitleFontHighlightColor->setColor( KomposeSettings::instance()->getDesktopTitleFontHighlightColor() );

@ -16,15 +16,15 @@
#include <klocale.h> #include <klocale.h>
class QCheckBox; class TQCheckBox;
class QFrame; class TQFrame;
class QSpinBox; class TQSpinBox;
class KColorButton; class KColorButton;
class QButtonGroup; class TQButtonGroup;
class QSlider; class TQSlider;
class QPushButton; class TQPushButton;
class QFont; class TQFont;
class QRadioButton; class TQRadioButton;
/** /**
@author Hans Oischinger @author Hans Oischinger
@ -51,59 +51,59 @@ protected slots:
private: private:
bool m_hasXinerama; bool m_hasXinerama;
QFrame *page1; TQFrame *page1;
QFrame *page2; TQFrame *page2;
QButtonGroup *defaultViewBtnGroup; TQButtonGroup *defaultViewBtnGroup;
QRadioButton *defaultViewWorld; TQRadioButton *defaultViewWorld;
QRadioButton *defaultViewVirtualDesks; TQRadioButton *defaultViewVirtualDesks;
QRadioButton *defaultViewCurrentDesk; TQRadioButton *defaultViewCurrentDesk;
QCheckBox *useComposite; TQCheckBox *useComposite;
QCheckBox *passiveScreenshots; TQCheckBox *passiveScreenshots;
QCheckBox *dynamicVirtDeskLayout; TQCheckBox *dynamicVirtDeskLayout;
QCheckBox *cacheScaledPixmaps; TQCheckBox *cacheScaledPixmaps;
QCheckBox *imageEffects; TQCheckBox *imageEffects;
QSpinBox *screenshotGrabDelay; TQSpinBox *screenshotGrabDelay;
QCheckBox *showIcons; TQCheckBox *showIcons;
QSlider *iconSize; TQSlider *iconSize;
QLabel *iconSizeDescription; TQLabel *iconSizeDescription;
QCheckBox *showWindowTitles; TQCheckBox *showWindowTitles;
QPushButton *windowTitleFontBtn; TQPushButton *windowTitleFontBtn;
QFont *windowTitleFont; TQFont *windowTitleFont;
KColorButton *windowTitleFontColor; KColorButton *windowTitleFontColor;
QCheckBox *showWindowTitleShadow; TQCheckBox *showWindowTitleShadow;
KColorButton *windowTitleFontShadowColor; KColorButton *windowTitleFontShadowColor;
QLabel *windowTitleFontColorLabel; TQLabel *windowTitleFontColorLabel;
QPushButton *desktopTitleFontBtn; TQPushButton *desktopTitleFontBtn;
QLabel *desktopTitleFontColorLabel; TQLabel *desktopTitleFontColorLabel;
QLabel *desktopTitleFontHighlightColorLabel; TQLabel *desktopTitleFontHighlightColorLabel;
KColorButton *desktopTitleFontColor; KColorButton *desktopTitleFontColor;
KColorButton *desktopTitleFontHighlightColor; KColorButton *desktopTitleFontHighlightColor;
QFont *desktopTitleFont; TQFont *desktopTitleFont;
QCheckBox *m_topLeftCorner; TQCheckBox *m_topLeftCorner;
QCheckBox *m_bottomLeftCorner; TQCheckBox *m_bottomLeftCorner;
QCheckBox *m_topRightCorner; TQCheckBox *m_topRightCorner;
QCheckBox *m_bottomRightCorner; TQCheckBox *m_bottomRightCorner;
QCheckBox *m_topEdge; TQCheckBox *m_topEdge;
QCheckBox *m_bottomEdge; TQCheckBox *m_bottomEdge;
QCheckBox *m_rightEdge; TQCheckBox *m_rightEdge;
QCheckBox *m_leftEdge; TQCheckBox *m_leftEdge;
QSpinBox *autoLockDelay; TQSpinBox *autoLockDelay;
QCheckBox *showDesktopNum; TQCheckBox *showDesktopNum;
QSpinBox *m_viewScreen; TQSpinBox *m_viewScreen;
QCheckBox *m_viewScreenAll; TQCheckBox *m_viewScreenAll;
}; };
#endif #endif

@ -15,7 +15,7 @@
#include "komposetaskmanager.h" #include "komposetaskmanager.h"
#include "komposepreferences.h" #include "komposepreferences.h"
#include <qcolor.h> #include <tqcolor.h>
#include <kglobalaccel.h> #include <kglobalaccel.h>
#include <kapplication.h> #include <kapplication.h>
@ -41,8 +41,8 @@ KomposeSettings* KomposeSettings::instance()
} }
KomposeSettings::KomposeSettings(QObject *parent, const char *name) KomposeSettings::KomposeSettings(TQObject *parent, const char *name)
: QObject(parent, name), : TQObject(parent, name),
dialogOpen(0), dialogOpen(0),
windowTitleFontMetrics(0) windowTitleFontMetrics(0)
{ {
@ -51,19 +51,19 @@ KomposeSettings::KomposeSettings(QObject *parent, const char *name)
globalAccel = new KGlobalAccel( this ); globalAccel = new KGlobalAccel( this );
globalAccel->insert( "showDefaultView", i18n("Show Komposé (default view)"), globalAccel->insert( "showDefaultView", i18n("Show Komposé (default view)"),
i18n("Displays the view you have configured as default"), i18n("Displays the view you have configured as default"),
KKey::QtWIN+Key_Tab, KKey::QtWIN+CTRL+SHIFT+Key_Tab, KKey::TQtWIN+Key_Tab, KKey::TQtWIN+CTRL+SHIFT+Key_Tab,
KomposeViewManager::instance(), SLOT(createDefaultView()) ); KomposeViewManager::instance(), SLOT(createDefaultView()) );
globalAccel->insert( "showWorldView", i18n("Show Komposé (ungrouped)"), globalAccel->insert( "showWorldView", i18n("Show Komposé (ungrouped)"),
i18n("Displays all windows unsorted"), i18n("Displays all windows unsorted"),
CTRL+SHIFT+Key_J, KKey::QtWIN+CTRL+SHIFT+Key_J, CTRL+SHIFT+Key_J, KKey::TQtWIN+CTRL+SHIFT+Key_J,
KomposeViewManager::instance(), SLOT(createWorldView()) ); KomposeViewManager::instance(), SLOT(createWorldView()) );
globalAccel->insert( "showVirtualDesktopView", i18n("Show Komposé (grouped by virtual desktops)"), globalAccel->insert( "showVirtualDesktopView", i18n("Show Komposé (grouped by virtual desktops)"),
i18n("Displays all windows sorted by virtual desktops"), i18n("Displays all windows sorted by virtual desktops"),
CTRL+SHIFT+Key_I, KKey::QtWIN+CTRL+SHIFT+Key_I, CTRL+SHIFT+Key_I, KKey::TQtWIN+CTRL+SHIFT+Key_I,
KomposeViewManager::instance(), SLOT(createVirtualDesktopView()) ); KomposeViewManager::instance(), SLOT(createVirtualDesktopView()) );
globalAccel->insert( "showCurrentDesktopView", i18n("Show Komposé (current virtual desktop)"), globalAccel->insert( "showCurrentDesktopView", i18n("Show Komposé (current virtual desktop)"),
i18n("Displays all windows on the current desktop"), i18n("Displays all windows on the current desktop"),
CTRL+SHIFT+Key_K, KKey::QtWIN+CTRL+SHIFT+Key_K, CTRL+SHIFT+Key_K, KKey::TQtWIN+CTRL+SHIFT+Key_K,
KomposeViewManager::instance(), SLOT(createCurrentDesktopView()) ); KomposeViewManager::instance(), SLOT(createCurrentDesktopView()) );
// read Settings from cfg file // read Settings from cfg file
@ -104,14 +104,14 @@ void KomposeSettings::readConfig()
iconSize = kapp->config()->readNumEntry("iconSize", 3); iconSize = kapp->config()->readNumEntry("iconSize", 3);
showWindowTitles = kapp->config()->readBoolEntry("showWindowTitles", true ); showWindowTitles = kapp->config()->readBoolEntry("showWindowTitles", true );
windowTitleFont = kapp->config()->readFontEntry("windowTitleFont", new QFont( "arial", 11, QFont::Bold ) ); windowTitleFont = kapp->config()->readFontEntry("windowTitleFont", new TQFont( "arial", 11, TQFont::Bold ) );
windowTitleFontColor = kapp->config()->readColorEntry("windowTitleFontColor", new QColor(Qt::black) ); windowTitleFontColor = kapp->config()->readColorEntry("windowTitleFontColor", new TQColor(TQt::black) );
showWindowTitleShadow = kapp->config()->readBoolEntry("showWindowTitleShadow", true ); showWindowTitleShadow = kapp->config()->readBoolEntry("showWindowTitleShadow", true );
windowTitleFontShadowColor = kapp->config()->readColorEntry("windowTitleFontShadowColor", new QColor(Qt::lightGray) ); windowTitleFontShadowColor = kapp->config()->readColorEntry("windowTitleFontShadowColor", new TQColor(TQt::lightGray) );
desktopTitleFont = kapp->config()->readFontEntry("desktopTitleFont", new QFont( "arial", 10 ) ); desktopTitleFont = kapp->config()->readFontEntry("desktopTitleFont", new TQFont( "arial", 10 ) );
desktopTitleFontColor = kapp->config()->readColorEntry("desktopTitleFontColor", new QColor(Qt::gray) ); desktopTitleFontColor = kapp->config()->readColorEntry("desktopTitleFontColor", new TQColor(TQt::gray) );
desktopTitleFontHighlightColor = kapp->config()->readColorEntry("desktopTitleFontHighlightColor", new QColor(Qt::black) ); desktopTitleFontHighlightColor = kapp->config()->readColorEntry("desktopTitleFontHighlightColor", new TQColor(TQt::black) );
cacheScaledPixmaps = kapp->config()->readBoolEntry("cacheScaledPixmaps", true); cacheScaledPixmaps = kapp->config()->readBoolEntry("cacheScaledPixmaps", true);
@ -227,7 +227,7 @@ void KomposeSettings::calcFontMetrics()
{ {
if (windowTitleFontMetrics != 0) if (windowTitleFontMetrics != 0)
delete windowTitleFontMetrics; delete windowTitleFontMetrics;
windowTitleFontMetrics = new QFontMetrics( windowTitleFont ); windowTitleFontMetrics = new TQFontMetrics( windowTitleFont );
windowTitleFontAscent = windowTitleFontMetrics->ascent(); windowTitleFontAscent = windowTitleFontMetrics->ascent();
windowTitleFontHeight = windowTitleFontMetrics->height(); windowTitleFontHeight = windowTitleFontMetrics->height();
} }

@ -12,26 +12,26 @@
#ifndef KOMPOSESETTINGS_H #ifndef KOMPOSESETTINGS_H
#define KOMPOSESETTINGS_H #define KOMPOSESETTINGS_H
#include <qobject.h> #include <tqobject.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qfont.h> #include <tqfont.h>
#define MAX_DESKTOPS 16 #define MAX_DESKTOPS 16
enum KomposeDisplay { KOMPOSEDISPLAY_WORLD, KOMPOSEDISPLAY_VIRTUALDESKS, KOMPOSEDISPLAY_CURRENTDESK }; enum KomposeDisplay { KOMPOSEDISPLAY_WORLD, KOMPOSEDISPLAY_VIRTUALDESKS, KOMPOSEDISPLAY_CURRENTDESK };
class KGlobalAccel; class KGlobalAccel;
class QFontMetrics; class TQFontMetrics;
/** /**
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeSettings : public QObject class KomposeSettings : public TQObject
{ {
Q_OBJECT Q_OBJECT
protected: protected:
KomposeSettings(QObject *parent = 0, const char *name = 0); KomposeSettings(TQObject *parent = 0, const char *name = 0);
~KomposeSettings(); ~KomposeSettings();
@ -63,27 +63,27 @@ public:
void setShowIcons( bool b ) { showIcons = b; } void setShowIcons( bool b ) { showIcons = b; }
int getIconSizePixels(); int getIconSizePixels();
void setWindowTitleFont( QFont f ) { windowTitleFont = f; } void setWindowTitleFont( TQFont f ) { windowTitleFont = f; }
const QFont& getWindowTitleFont() const { return windowTitleFont; } const TQFont& getWindowTitleFont() const { return windowTitleFont; }
int getShowWindowTitles() { return showWindowTitles; } int getShowWindowTitles() { return showWindowTitles; }
void setShowWindowTitles( bool b ) { showWindowTitles = b; } void setShowWindowTitles( bool b ) { showWindowTitles = b; }
int getShowWindowTitleShadow() { return showWindowTitleShadow; } int getShowWindowTitleShadow() { return showWindowTitleShadow; }
void setShowWindowTitleShadow( bool b ) { showWindowTitleShadow = b; } void setShowWindowTitleShadow( bool b ) { showWindowTitleShadow = b; }
const QColor& getWindowTitleFontColor() const { return windowTitleFontColor; } const TQColor& getWindowTitleFontColor() const { return windowTitleFontColor; }
void setWindowTitleFontColor( QColor c ) { windowTitleFontColor = c; } void setWindowTitleFontColor( TQColor c ) { windowTitleFontColor = c; }
const QColor& getWindowTitleFontShadowColor() const { return windowTitleFontShadowColor; } const TQColor& getWindowTitleFontShadowColor() const { return windowTitleFontShadowColor; }
void setWindowTitleFontShadowColor( QColor c ) { windowTitleFontShadowColor = c; } void setWindowTitleFontShadowColor( TQColor c ) { windowTitleFontShadowColor = c; }
const QFontMetrics* getWindowTitleFontMetrics() { return windowTitleFontMetrics; } const TQFontMetrics* getWindowTitleFontMetrics() { return windowTitleFontMetrics; }
int getWindowTitleFontAscent() { return windowTitleFontAscent; } int getWindowTitleFontAscent() { return windowTitleFontAscent; }
int getWindowTitleFontHeight() { return windowTitleFontHeight; } int getWindowTitleFontHeight() { return windowTitleFontHeight; }
void setDesktopTitleFont( QFont f ) { desktopTitleFont = f; } void setDesktopTitleFont( TQFont f ) { desktopTitleFont = f; }
const QFont& getDesktopTitleFont() const { return desktopTitleFont; } const TQFont& getDesktopTitleFont() const { return desktopTitleFont; }
const QColor& getDesktopTitleFontColor() const { return desktopTitleFontColor; } const TQColor& getDesktopTitleFontColor() const { return desktopTitleFontColor; }
void setDesktopTitleFontColor( QColor c ) { desktopTitleFontColor = c; } void setDesktopTitleFontColor( TQColor c ) { desktopTitleFontColor = c; }
const QColor& getDesktopTitleFontHighlightColor() const { return desktopTitleFontHighlightColor; } const TQColor& getDesktopTitleFontHighlightColor() const { return desktopTitleFontHighlightColor; }
void setDesktopTitleFontHighlightColor( QColor c ) { desktopTitleFontHighlightColor = c; } void setDesktopTitleFontHighlightColor( TQColor c ) { desktopTitleFontHighlightColor = c; }
bool getCacheScaledPixmaps() const { return cacheScaledPixmaps; } bool getCacheScaledPixmaps() const { return cacheScaledPixmaps; }
void setCacheScaledPixmaps( bool b ) { cacheScaledPixmaps = b; } void setCacheScaledPixmaps( bool b ) { cacheScaledPixmaps = b; }
@ -141,17 +141,17 @@ private:
bool showIcons; bool showIcons;
bool showWindowTitles; bool showWindowTitles;
QFont windowTitleFont; TQFont windowTitleFont;
QFontMetrics *windowTitleFontMetrics; TQFontMetrics *windowTitleFontMetrics;
int windowTitleFontAscent; int windowTitleFontAscent;
int windowTitleFontHeight; int windowTitleFontHeight;
QColor windowTitleFontColor; TQColor windowTitleFontColor;
bool showWindowTitleShadow; bool showWindowTitleShadow;
QColor windowTitleFontShadowColor; TQColor windowTitleFontShadowColor;
QFont desktopTitleFont; TQFont desktopTitleFont;
QColor desktopTitleFontColor; TQColor desktopTitleFontColor;
QColor desktopTitleFontHighlightColor; TQColor desktopTitleFontHighlightColor;
bool cacheScaledPixmaps; bool cacheScaledPixmaps;

@ -17,9 +17,9 @@
#include "komposeglobal.h" #include "komposeglobal.h"
#include "komposetaskmanager.h" #include "komposetaskmanager.h"
#include <qpixmap.h> #include <tqpixmap.h>
#include <qbitmap.h> #include <tqbitmap.h>
#include <qpainter.h> #include <tqpainter.h>
#include <kapplication.h> #include <kapplication.h>
#include <kaction.h> #include <kaction.h>
@ -27,7 +27,7 @@
#include <kiconeffect.h> #include <kiconeffect.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
KomposeSysTray::KomposeSysTray(QWidget *parent, const char *name) KomposeSysTray::KomposeSysTray(TQWidget *parent, const char *name)
: KSystemTray(parent, name) : KSystemTray(parent, name)
{ {
// Create Menu // Create Menu
@ -53,16 +53,16 @@ KomposeSysTray::~KomposeSysTray()
void KomposeSysTray::slotConfigChanged( ) void KomposeSysTray::slotConfigChanged( )
{ {
// set the icon here // set the icon here
QPixmap iconPixmap = loadIcon("kompose"); TQPixmap iconPixmap = loadIcon("kompose");
setPixmap(iconPixmap); setPixmap(iconPixmap);
icon = iconPixmap.convertToImage(); icon = iconPixmap.convertToImage();
currentDesktopChanged(KomposeTaskManager::instance()->getCurrentDesktopNum()); currentDesktopChanged(KomposeTaskManager::instance()->getCurrentDesktopNum());
} }
void KomposeSysTray::mouseReleaseEvent (QMouseEvent * ) void KomposeSysTray::mouseReleaseEvent (TQMouseEvent * )
{} {}
void KomposeSysTray::mousePressEvent ( QMouseEvent * e ) void KomposeSysTray::mousePressEvent ( TQMouseEvent * e )
{ {
if ( !rect().contains( e->pos() ) ) if ( !rect().contains( e->pos() ) )
return; return;
@ -89,37 +89,37 @@ void KomposeSysTray::currentDesktopChanged(int desktop)
if (!KomposeSettings::instance()->getShowDesktopNum()) if (!KomposeSettings::instance()->getShowDesktopNum())
return; return;
// update the icon to display the current desktop number // update the icon to display the current desktop number
// qDebug("Displaying current desktop number on the tray icon....\n"); // tqDebug("Displaying current desktop number on the tray icon....\n");
// copying from aKregator/src/trayicon.cpp // copying from aKregator/src/trayicon.cpp
// from KMSystemTray // from KMSystemTray
int oldW = pixmap()->size().width(); int oldW = pixmap()->size().width();
int oldH = pixmap()->size().height(); int oldH = pixmap()->size().height();
QString uStr=QString::number( desktop ); TQString uStr=TQString::number( desktop );
QFont f=KGlobalSettings::generalFont(); TQFont f=KGlobalSettings::generalFont();
f.setBold(true); f.setBold(true);
f.setItalic(true); f.setItalic(true);
float pointSize=f.pointSizeFloat(); float pointSize=f.pointSizeFloat();
QFontMetrics fm(f); TQFontMetrics fm(f);
int w=fm.width(uStr); int w=fm.width(uStr);
if( w > (oldW) ) if( w > (oldW) )
{ {
pointSize *= float(oldW) / float(w); pointSize *= float(oldW) / float(w);
f.setPointSizeFloat(pointSize); f.setPointSizeFloat(pointSize);
} }
QPixmap pix(oldW, oldH); TQPixmap pix(oldW, oldH);
pix.fill(Qt::white); pix.fill(TQt::white);
QPainter p(&pix); TQPainter p(&pix);
p.setFont(f); p.setFont(f);
p.setPen(Qt::black); p.setPen(TQt::black);
p.drawText(pix.rect(), Qt::AlignCenter, uStr); p.drawText(pix.rect(), TQt::AlignCenter, uStr);
pix.setMask(pix.createHeuristicMask()); pix.setMask(pix.createHeuristicMask());
QImage img=pix.convertToImage(); TQImage img=pix.convertToImage();
// overlay // overlay
QImage overlayImg=icon.copy(); TQImage overlayImg=icon.copy();
KIconEffect::overlay(overlayImg, img); KIconEffect::overlay(overlayImg, img);
QPixmap newIcon; TQPixmap newIcon;
newIcon.convertFromImage(overlayImg); newIcon.convertFromImage(overlayImg);
setPixmap(newIcon); setPixmap(newIcon);
} }

@ -14,7 +14,7 @@
#include <ksystemtray.h> #include <ksystemtray.h>
#include <qimage.h> #include <tqimage.h>
class KAction; class KAction;
class KGlobalAccel; class KGlobalAccel;
@ -27,21 +27,21 @@ class KomposeSysTray : public KSystemTray
{ {
Q_OBJECT Q_OBJECT
public: public:
KomposeSysTray(QWidget *parent = 0, const char *name = 0); KomposeSysTray(TQWidget *parent = 0, const char *name = 0);
~KomposeSysTray(); ~KomposeSysTray();
void currentDesktopChanged(int desktop); void currentDesktopChanged(int desktop);
protected: protected:
void mouseReleaseEvent (QMouseEvent *); void mouseReleaseEvent (TQMouseEvent *);
void mousePressEvent (QMouseEvent *); void mousePressEvent (TQMouseEvent *);
protected slots: protected slots:
void slotConfigChanged(); void slotConfigChanged();
private: private:
KPopupMenu *menu; KPopupMenu *menu;
QImage icon; TQImage icon;
}; };
#endif #endif

@ -23,11 +23,11 @@
#include "komposesettings.h" #include "komposesettings.h"
#include "komposeglobal.h" #include "komposeglobal.h"
#include <qobject.h> #include <tqobject.h>
#include <qimage.h> #include <tqimage.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <kpixmapio.h> #include <kpixmapio.h>
#include <kwinmodule.h> #include <kwinmodule.h>
@ -41,8 +41,8 @@
#include "komposetaskvisualizer.h" #include "komposetaskvisualizer.h"
#include <X11/Xlib.h> #include <X11/Xlib.h>
KomposeTask::KomposeTask(WId win, KWinModule *kwinmod, QObject *parent, const char *name) KomposeTask::KomposeTask(WId win, KWinModule *kwinmod, TQObject *parent, const char *name)
: QObject(parent, name), : TQObject(parent, name),
kwinmodule(kwinmod), kwinmodule(kwinmod),
windowID(win), windowID(win),
blockDamageEvents(false) blockDamageEvents(false)
@ -72,7 +72,7 @@ void KomposeTask::findWmFrame()
target_win = windowID; target_win = windowID;
for (;;) for (;;)
{ {
status = XQueryTree(QPaintDevice::x11AppDisplay(), target_win, &root, &parent, &children, &nchildren); status = XQueryTree(TQPaintDevice::x11AppDisplay(), target_win, &root, &parent, &children, &nchildren);
if (!status) if (!status)
break; break;
if (children) if (children)
@ -150,7 +150,7 @@ bool KomposeTask::isOnAllDesktops() const
bool KomposeTask::isModified() const bool KomposeTask::isModified() const
{ {
static QString modStr = QString::fromUtf8("[") + i18n("modified") + QString::fromUtf8("]"); static TQString modStr = TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]");
int modStrPos = windowInfo.visibleName().find(modStr); int modStrPos = windowInfo.visibleName().find(modStr);
return ( modStrPos != -1 ); return ( modStrPos != -1 );
@ -159,7 +159,7 @@ bool KomposeTask::isModified() const
void KomposeTask::maximize() void KomposeTask::maximize()
{ {
NETWinInfo ni( qt_xdisplay(), windowID, qt_xrootwin(), NET::WMState); NETWinInfo ni( tqt_xdisplay(), windowID, tqt_xrootwin(), NET::WMState);
ni.setState( NET::Max, NET::Max ); ni.setState( NET::Max, NET::Max );
if (windowInfo.mappingState() == NET::Iconic) if (windowInfo.mappingState() == NET::Iconic)
@ -169,7 +169,7 @@ void KomposeTask::maximize()
void KomposeTask::restore() void KomposeTask::restore()
{ {
KWin::deIconifyWindow( windowID, false ); KWin::deIconifyWindow( windowID, false );
// NETWinInfo ni( qt_xdisplay(), windowID, qt_xrootwin(), NET::WMState); // NETWinInfo ni( tqt_xdisplay(), windowID, tqt_xrootwin(), NET::WMState);
// ni.setState( 0, NET::Max ); // ni.setState( 0, NET::Max );
// //
// if (windowInfo.mappingState == NET::Iconic) // if (windowInfo.mappingState == NET::Iconic)
@ -178,26 +178,26 @@ void KomposeTask::restore()
void KomposeTask::iconify() void KomposeTask::iconify()
{ {
//XIconifyWindow( qt_xdisplay(), windowID, qt_xscreen() ); //XIconifyWindow( tqt_xdisplay(), windowID, tqt_xscreen() );
KWin::iconifyWindow( windowID, false ); KWin::iconifyWindow( windowID, false );
} }
void KomposeTask::close() void KomposeTask::close()
{ {
NETRootInfo ri( qt_xdisplay(), NET::CloseWindow ); NETRootInfo ri( tqt_xdisplay(), NET::CloseWindow );
ri.closeWindowRequest( windowID ); ri.closeWindowRequest( windowID );
} }
void KomposeTask::raise() void KomposeTask::raise()
{ {
// kdDebug(1210) << "Task::raise(): " << name() << endl; // kdDebug(1210) << "Task::raise(): " << name() << endl;
XRaiseWindow( qt_xdisplay(), windowID ); XRaiseWindow( tqt_xdisplay(), windowID );
} }
void KomposeTask::lower() void KomposeTask::lower()
{ {
// kdDebug(1210) << "Task::lower(): " << name() << endl; // kdDebug(1210) << "Task::lower(): " << name() << endl;
XLowerWindow( qt_xdisplay(), windowID ); XLowerWindow( tqt_xdisplay(), windowID );
} }
@ -232,7 +232,7 @@ void KomposeTask::minimizeOrRestore()
void KomposeTask::toDesktop(int desk) void KomposeTask::toDesktop(int desk)
{ {
NETWinInfo ni(qt_xdisplay(), windowID, qt_xrootwin(), NET::WMDesktop); NETWinInfo ni(tqt_xdisplay(), windowID, tqt_xrootwin(), NET::WMDesktop);
if (desk == 0) if (desk == 0)
{ {
ni.setDesktop(NETWinInfo::OnAllDesktops); ni.setDesktop(NETWinInfo::OnAllDesktops);
@ -249,7 +249,7 @@ void KomposeTask::toCurrentDesktop()
void KomposeTask::setAlwaysOnTop(bool stay) void KomposeTask::setAlwaysOnTop(bool stay)
{ {
NETWinInfo ni( qt_xdisplay(), windowID, qt_xrootwin(), NET::WMState); NETWinInfo ni( tqt_xdisplay(), windowID, tqt_xrootwin(), NET::WMState);
if(stay) if(stay)
ni.setState( NET::StaysOnTop, NET::StaysOnTop ); ni.setState( NET::StaysOnTop, NET::StaysOnTop );
else else
@ -263,7 +263,7 @@ void KomposeTask::toggleAlwaysOnTop()
void KomposeTask::setShaded(bool shade) void KomposeTask::setShaded(bool shade)
{ {
NETWinInfo ni( qt_xdisplay(), windowID, qt_xrootwin(), NET::WMState); NETWinInfo ni( tqt_xdisplay(), windowID, tqt_xrootwin(), NET::WMState);
if(shade) if(shade)
ni.setState( NET::Shaded, NET::Shaded ); ni.setState( NET::Shaded, NET::Shaded );
else else
@ -317,7 +317,7 @@ void KomposeTask::slotX11DamageNotify()
blockDamageEvents = true; blockDamageEvents = true;
emit x11DamageNotify(); emit x11DamageNotify();
QTimer::singleShot( 1000, this, SLOT( unBlockDamageEvents() ) ); TQTimer::singleShot( 1000, this, SLOT( unBlockDamageEvents() ) );
} }
int KomposeTask::getHeightForWidth ( int w ) const int KomposeTask::getHeightForWidth ( int w ) const
@ -335,7 +335,7 @@ double KomposeTask::getAspectRatio()
return (double)(getGeometry().width()) / (double)(getGeometry().height()); return (double)(getGeometry().width()) / (double)(getGeometry().height());
} }
QPixmap KomposeTask::getIcon( int size ) TQPixmap KomposeTask::getIcon( int size )
{ {
// Cache the icons??? // Cache the icons???
// if ( pm_icon.isNull() || pm_icon.width() != size ) // if ( pm_icon.isNull() || pm_icon.width() != size )

@ -20,8 +20,8 @@
#ifndef KOMPOSETASK_H #ifndef KOMPOSETASK_H
#define KOMPOSETASK_H #define KOMPOSETASK_H
#include <qobject.h> #include <tqobject.h>
#include <qrect.h> #include <tqrect.h>
#include <kwin.h> #include <kwin.h>
class KWinModule; class KWinModule;
@ -30,11 +30,11 @@ class KomposeTaskVisualizer;
/** /**
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeTask : public QObject class KomposeTask : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
KomposeTask(WId win, KWinModule *kwinmod, QObject *parent = 0, const char *name = 0); KomposeTask(WId win, KWinModule *kwinmod, TQObject *parent = 0, const char *name = 0);
~KomposeTask(); ~KomposeTask();
@ -54,13 +54,13 @@ public:
WId window() const { return windowID; } WId window() const { return windowID; }
WId wmFrame() const { return wmframeID; } WId wmFrame() const { return wmframeID; }
QString name() const { return windowInfo.name(); } TQString name() const { return windowInfo.name(); }
QString visibleName() const { return windowInfo.visibleName(); } TQString visibleName() const { return windowInfo.visibleName(); }
QString visibleNameWithState() const { return windowInfo.visibleNameWithState(); } TQString visibleNameWithState() const { return windowInfo.visibleNameWithState(); }
QRect getGeometry() const { return windowInfo.geometry(); } TQRect getGeometry() const { return windowInfo.geometry(); }
QRect getFrameGeometry() const { return windowInfo.frameGeometry(); } TQRect getFrameGeometry() const { return windowInfo.frameGeometry(); }
QPixmap getIcon( int size ); TQPixmap getIcon( int size );
double getAspectRatio(); double getAspectRatio();
int getHeightForWidth( int w ) const; int getHeightForWidth( int w ) const;
int getWidthForHeight( int h ) const; int getWidthForHeight( int h ) const;
@ -68,8 +68,8 @@ public:
KomposeTaskVisualizer* getVisualizer() { return visualizer; } KomposeTaskVisualizer* getVisualizer() { return visualizer; }
protected: protected:
void paintEvent ( QPaintEvent * ); void paintEvent ( TQPaintEvent * );
void mouseReleaseEvent ( QMouseEvent * e ); void mouseReleaseEvent ( TQMouseEvent * e );
void findWmFrame(); void findWmFrame();
signals: signals:

@ -16,14 +16,14 @@
#include "komposesettings.h" #include "komposesettings.h"
#include "komposetaskwidget.h" #include "komposetaskwidget.h"
#include <qobjectlist.h> #include <tqobjectlist.h>
#include <qwidget.h> #include <tqwidget.h>
#include <qtimer.h> #include <tqtimer.h>
#include <kdebug.h> #include <kdebug.h>
static bool controlHold = false; // is the control key pressed static bool controlHold = false; // is the control key pressed
KomposeTaskContainerWidget::KomposeTaskContainerWidget( int desk, QWidget *parent, KomposeLayout *l, const char *name) KomposeTaskContainerWidget::KomposeTaskContainerWidget( int desk, TQWidget *parent, KomposeLayout *l, const char *name)
: KomposeWidget(parent, l, name), : KomposeWidget(parent, l, name),
desktop( desk ) desktop( desk )
{ {
@ -47,7 +47,7 @@ void KomposeTaskContainerWidget::reparentTaskWidget( KomposeTask* task, int from
if ( (toDesktop!= -1) && (desktop == fromDesktop-1 || fromDesktop==-1) ) if ( (toDesktop!= -1) && (desktop == fromDesktop-1 || fromDesktop==-1) )
{ {
KomposeTaskWidget *child; KomposeTaskWidget *child;
QPtrListIterator<KomposeWidget> it( *(layout->getManagedWidgets())); TQPtrListIterator<KomposeWidget> it( *(layout->getManagedWidgets()));
while ( (child = dynamic_cast<KomposeTaskWidget*>(it.current()) ) != 0 ) while ( (child = dynamic_cast<KomposeTaskWidget*>(it.current()) ) != 0 )
{ {
++it; ++it;
@ -66,33 +66,33 @@ void KomposeTaskContainerWidget::reparentTaskWidget( KomposeTask* task, int from
if ( desktop == toDesktop -1 || (toDesktop == -1 && fromDesktop-1!=desktop) ) if ( desktop == toDesktop -1 || (toDesktop == -1 && fromDesktop-1!=desktop) )
{ {
createTaskWidget( task, true ); createTaskWidget( task, true );
//QTimer::singleShot( 200, layout, SLOT( arrangeLayout() ) ); //TQTimer::singleShot( 200, layout, SLOT( arrangeLayout() ) );
// layout->arrangeLayout(); // layout->arrangeLayout();
} }
} }
void KomposeTaskContainerWidget::keyPressEvent ( QKeyEvent * e ) void KomposeTaskContainerWidget::keyPressEvent ( TQKeyEvent * e )
{ {
if ( e->key() == Qt::Key_Control ) if ( e->key() == TQt::Key_Control )
{ {
controlHold = true; controlHold = true;
e->accept(); e->accept();
} }
} }
void KomposeTaskContainerWidget::keyReleaseEvent ( QKeyEvent * e ) void KomposeTaskContainerWidget::keyReleaseEvent ( TQKeyEvent * e )
{ {
if ( e->key() == Qt::Key_Control ) if ( e->key() == TQt::Key_Control )
{ {
controlHold = false; controlHold = false;
e->accept(); e->accept();
return; return;
} }
if ( e->key() == Qt::Key_Right || e->key() == Qt::Key_D || e->key() == Qt::Key_H || if ( e->key() == TQt::Key_Right || e->key() == TQt::Key_D || e->key() == TQt::Key_H ||
e->key() == Qt::Key_Left || e->key() == Qt::Key_A || e->key() == Qt::Key_J || e->key() == TQt::Key_Left || e->key() == TQt::Key_A || e->key() == TQt::Key_J ||
e->key() == Qt::Key_Up || e->key() == Qt::Key_W || e->key() == Qt::Key_K || e->key() == TQt::Key_Up || e->key() == TQt::Key_W || e->key() == TQt::Key_K ||
e->key() == Qt::Key_Down || e->key() == Qt::Key_S || e->key() == Qt::Key_L ) e->key() == TQt::Key_Down || e->key() == TQt::Key_S || e->key() == TQt::Key_L )
{ {
if ( controlHold && desktop != -1 ) if ( controlHold && desktop != -1 )
{ {
@ -105,40 +105,40 @@ void KomposeTaskContainerWidget::keyReleaseEvent ( QKeyEvent * e )
int direction = DLAYOUT_RIGHT; int direction = DLAYOUT_RIGHT;
switch( e->key() ) switch( e->key() )
{ {
case Qt::Key_Right: case TQt::Key_Right:
direction = DLAYOUT_RIGHT; direction = DLAYOUT_RIGHT;
break; break;
case Qt::Key_D: case TQt::Key_D:
direction = DLAYOUT_RIGHT; direction = DLAYOUT_RIGHT;
break; break;
case Qt::Key_L: case TQt::Key_L:
direction = DLAYOUT_RIGHT; direction = DLAYOUT_RIGHT;
break; break;
case Qt::Key_Left: case TQt::Key_Left:
direction = DLAYOUT_LEFT; direction = DLAYOUT_LEFT;
break; break;
case Qt::Key_A: case TQt::Key_A:
direction = DLAYOUT_LEFT; direction = DLAYOUT_LEFT;
break; break;
case Qt::Key_H: case TQt::Key_H:
direction = DLAYOUT_LEFT; direction = DLAYOUT_LEFT;
break; break;
case Qt::Key_Up: case TQt::Key_Up:
direction = DLAYOUT_TOP; direction = DLAYOUT_TOP;
break; break;
case Qt::Key_W: case TQt::Key_W:
direction = DLAYOUT_TOP; direction = DLAYOUT_TOP;
break; break;
case Qt::Key_K: case TQt::Key_K:
direction = DLAYOUT_TOP; direction = DLAYOUT_TOP;
break; break;
case Qt::Key_Down: case TQt::Key_Down:
direction = DLAYOUT_BOTTOM; direction = DLAYOUT_BOTTOM;
break; break;
case Qt::Key_S: case TQt::Key_S:
direction = DLAYOUT_BOTTOM; direction = DLAYOUT_BOTTOM;
break; break;
case Qt::Key_J: case TQt::Key_J:
direction = DLAYOUT_BOTTOM; direction = DLAYOUT_BOTTOM;
break; break;
} }
@ -159,13 +159,13 @@ bool KomposeTaskContainerWidget::focusNeighbourChild( int direction )
if ( !children()->containsRef(focusWidget()) ) if ( !children()->containsRef(focusWidget()) )
{ {
kdDebug() << "KomposeTaskContainerWidget::keyReleaseEvent - No widget focussed. Focussing first" << endl; kdDebug() << "KomposeTaskContainerWidget::keyReleaseEvent - No widget focussed. Focussing first" << endl;
const QObjectList *lst = children(); const TQObjectList *lst = children();
if ( lst ) if ( lst )
{ {
QObjectListIterator it( *lst ); TQObjectListIterator it( *lst );
QWidget *widget; TQWidget *widget;
while ( (widget = (QWidget*)it.current() ) ) while ( (widget = (TQWidget*)it.current() ) )
{ {
if (widget->inherits("KomposeTaskWidget") || widget->inherits("KomposeDesktopWidget")) if (widget->inherits("KomposeTaskWidget") || widget->inherits("KomposeDesktopWidget"))
{ {
@ -196,12 +196,12 @@ bool KomposeTaskContainerWidget::focusNeighbourChild( int direction )
void KomposeTaskContainerWidget::createTaskWidgets() void KomposeTaskContainerWidget::createTaskWidgets()
{ {
TaskList tl = KomposeTaskManager::instance()->getTasks(); TaskList tl = KomposeTaskManager::instance()->getTasks();
QPtrListIterator<KomposeTask> it( tl ); TQPtrListIterator<KomposeTask> it( tl );
KomposeTask *task; KomposeTask *task;
while ( (task = it.current()) != 0 ) while ( (task = it.current()) != 0 )
{ {
++it; ++it;
Q_CHECK_PTR(task); TQ_CHECK_PTR(task);
createTaskWidget( task); createTaskWidget( task);
} }
} }
@ -243,7 +243,7 @@ void KomposeTaskContainerWidget::requestRemoval( KomposeWidget *obj )
layout->arrangeLayout(); layout->arrangeLayout();
} }
void KomposeTaskContainerWidget::childEvent( QChildEvent * ce) void KomposeTaskContainerWidget::childEvent( TQChildEvent * ce)
{ {
KomposeWidget::childEvent(ce); KomposeWidget::childEvent(ce);
// ReLayout when we are in a active view and a new window appeared somewhere // ReLayout when we are in a active view and a new window appeared somewhere

@ -27,7 +27,7 @@ class KomposeTaskContainerWidget : public KomposeWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
KomposeTaskContainerWidget( int desk = 0, QWidget *parent = 0, KomposeLayout *l = 0, const char *name = 0); KomposeTaskContainerWidget( int desk = 0, TQWidget *parent = 0, KomposeLayout *l = 0, const char *name = 0);
virtual ~KomposeTaskContainerWidget(); virtual ~KomposeTaskContainerWidget();
@ -48,9 +48,9 @@ protected slots:
bool focusNeighbourChild( int direction ); bool focusNeighbourChild( int direction );
protected: protected:
void keyReleaseEvent ( QKeyEvent * e ); void keyReleaseEvent ( TQKeyEvent * e );
void keyPressEvent ( QKeyEvent * e ); void keyPressEvent ( TQKeyEvent * e );
void childEvent( QChildEvent * ce); void childEvent( TQChildEvent * ce);
int desktop; int desktop;
}; };

@ -27,10 +27,10 @@
#include "komposetask.h" #include "komposetask.h"
#include "komposeviewmanager.h" #include "komposeviewmanager.h"
#include <qtimer.h> #include <tqtimer.h>
#include <qimage.h> #include <tqimage.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qwidget.h> #include <tqwidget.h>
#include <kapplication.h> #include <kapplication.h>
#include <kwinmodule.h> #include <kwinmodule.h>
@ -66,7 +66,7 @@ KomposeTaskManager* KomposeTaskManager::instance()
KomposeTaskManager::KomposeTaskManager() KomposeTaskManager::KomposeTaskManager()
: QObject() : TQObject()
{ {
taskManagerInstance = this; taskManagerInstance = this;
kwin_module = new KWinModule(); kwin_module = new KWinModule();
@ -84,8 +84,8 @@ KomposeTaskManager::KomposeTaskManager()
connect( KomposeSettings::instance(), SIGNAL(settingsChanged()), this, SLOT(callCompositeRedirect()) ); connect( KomposeSettings::instance(), SIGNAL(settingsChanged()), this, SLOT(callCompositeRedirect()) );
// register existing windows // register existing windows
const QValueList<WId> windows = kwin_module->windows(); const TQValueList<WId> windows = kwin_module->windows();
for (QValueList<WId>::ConstIterator it = windows.begin(); it != windows.end(); ++it ) for (TQValueList<WId>::ConstIterator it = windows.begin(); it != windows.end(); ++it )
slotWindowAdded(*it); slotWindowAdded(*it);
connect( kwin_module, SIGNAL(activeWindowChanged(WId)), this, SLOT(slotTaskActivated(WId)) ); connect( kwin_module, SIGNAL(activeWindowChanged(WId)), this, SLOT(slotTaskActivated(WId)) );
@ -105,7 +105,7 @@ void KomposeTaskManager::callCompositeRedirect()
#ifdef COMPOSITE #ifdef COMPOSITE
if ( KomposeGlobal::instance()->hasXcomposite() ) if ( KomposeGlobal::instance()->hasXcomposite() )
{ {
Display *dpy = QPaintDevice::x11AppDisplay(); Display *dpy = TQPaintDevice::x11AppDisplay();
if ( KomposeSettings::instance()->getUseComposite() ) if ( KomposeSettings::instance()->getUseComposite() )
{ {
// Redirect // Redirect
@ -148,7 +148,7 @@ void KomposeTaskManager::slotWindowChanged( WId w, unsigned int dirty)
{ {
if( dirty & NET::WMState ) if( dirty & NET::WMState )
{ {
NETWinInfo info ( qt_xdisplay(), w, qt_xrootwin(), NET::WMState ); NETWinInfo info ( tqt_xdisplay(), w, tqt_xrootwin(), NET::WMState );
if ( (info.state() & NET::SkipTaskbar) != 0 ) if ( (info.state() & NET::SkipTaskbar) != 0 )
{ {
slotWindowRemoved( w ); slotWindowRemoved( w );
@ -194,7 +194,7 @@ void KomposeTaskManager::slotWindowRemoved(WId w )
void KomposeTaskManager::slotWindowAdded(WId w ) void KomposeTaskManager::slotWindowAdded(WId w )
{ {
// ignore myself // ignore myself
if ( QWidget::find(w) != 0 ) if ( TQWidget::find(w) != 0 )
return; return;
// if ( KomposeViewManager::instance()->hasActiveView() && w == KomposeViewManager::instance()->getViewWidget()->winId() ) // if ( KomposeViewManager::instance()->hasActiveView() && w == KomposeViewManager::instance()->getViewWidget()->winId() )
// { // {
@ -234,7 +234,7 @@ void KomposeTaskManager::slotUpdateScreenshots( bool switchDesktops )
{ {
kdDebug() << "KomposeTaskManager::slotUpdateScreenshots()" << endl; kdDebug() << "KomposeTaskManager::slotUpdateScreenshots()" << endl;
QPtrListIterator<KomposeTask> it( tasklist ); TQPtrListIterator<KomposeTask> it( tasklist );
KomposeTask *task; KomposeTask *task;
// Iterate through tasks sorted by desktops (this minimizes desktop switching if necessary) // Iterate through tasks sorted by desktops (this minimizes desktop switching if necessary)
@ -270,7 +270,7 @@ void KomposeTaskManager::simulatePasvScreenshotEvent()
void KomposeTaskManager::slotTaskActivated(WId winId) void KomposeTaskManager::slotTaskActivated(WId winId)
{ {
kdDebug() << "KomposeTaskManager::slotTaskActivated ( " << winId << " )" << endl; kdDebug() << "KomposeTaskManager::slotTaskActivated ( " << winId << " )" << endl;
QPtrListIterator<KomposeTask> it( tasklist ); TQPtrListIterator<KomposeTask> it( tasklist );
KomposeTask *task; KomposeTask *task;
while ( (task = it.current()) != 0 ) while ( (task = it.current()) != 0 )
{ {
@ -293,7 +293,7 @@ bool KomposeTaskManager::isOnTop(const KomposeTask* task)
{ {
if(!task) return false; if(!task) return false;
for (QValueList<WId>::ConstIterator it = kwin_module->stackingOrder().fromLast(); for (TQValueList<WId>::ConstIterator it = kwin_module->stackingOrder().fromLast();
it != kwin_module->stackingOrder().end(); --it ) it != kwin_module->stackingOrder().end(); --it )
{ {
for (KomposeTask* t = tasklist.first(); t != 0; t = tasklist.next() ) for (KomposeTask* t = tasklist.first(); t != 0; t = tasklist.next() )
@ -311,7 +311,7 @@ bool KomposeTaskManager::isOnTop(const KomposeTask* task)
return false; return false;
} }
QString KomposeTaskManager::getDesktopName(int desk) const TQString KomposeTaskManager::getDesktopName(int desk) const
{ {
return kwin_module->desktopName(desk); return kwin_module->desktopName(desk);
} }
@ -346,7 +346,7 @@ bool KomposeTaskManager::processX11Event( XEvent *event )
// e->damage is the damage handle returned by XDamageCreate() // e->damage is the damage handle returned by XDamageCreate()
// Subtract all the damage, repairing the window. // Subtract all the damage, repairing the window.
XDamageSubtract( QPaintDevice::x11AppDisplay(), e->damage, None, None ); XDamageSubtract( TQPaintDevice::x11AppDisplay(), e->damage, None, None );
if ( !KomposeViewManager::instance()->hasActiveView() ) if ( !KomposeViewManager::instance()->hasActiveView() )
return true; return true;

@ -20,21 +20,21 @@
#ifndef KOMPOSETASKMANAGER_H #ifndef KOMPOSETASKMANAGER_H
#define KOMPOSETASKMANAGER_H #define KOMPOSETASKMANAGER_H
#include <qobject.h> #include <tqobject.h>
#include <qptrlist.h> #include <tqptrlist.h>
class KWinModule; class KWinModule;
class KomposeTaskManager; class KomposeTaskManager;
class KomposeTask; class KomposeTask;
typedef QPtrList<KomposeTask> TaskList; typedef TQPtrList<KomposeTask> TaskList;
/** /**
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeTaskManager : public QObject class KomposeTaskManager : public TQObject
{ {
Q_OBJECT Q_OBJECT
protected: protected:
@ -48,7 +48,7 @@ public:
bool isOnTop(const KomposeTask* task ); bool isOnTop(const KomposeTask* task );
int getNumDesktops() const { return numDesks; } int getNumDesktops() const { return numDesks; }
QString getDesktopName(int desk) const; TQString getDesktopName(int desk) const;
int getCurrentDesktopNum(); int getCurrentDesktopNum();
TaskList getTasks() const { return tasklist; } TaskList getTasks() const { return tasklist; }

@ -23,10 +23,10 @@
#include <kshortcut.h> #include <kshortcut.h>
#include <klocale.h> #include <klocale.h>
#include <qiconset.h> #include <tqiconset.h>
KomposeTaskPrefsWidget::KomposeTaskPrefsWidget(KomposeTaskWidget *parent, const char *name) KomposeTaskPrefsWidget::KomposeTaskPrefsWidget(KomposeTaskWidget *parent, const char *name)
: QDockArea(Qt::Horizontal , QDockArea::Normal, parent, name) : TQDockArea(TQt::Horizontal , TQDockArea::Normal, parent, name)
{ {
KToolBar* pToolBar = new KToolBar( this, i18n("Task Actions") ); KToolBar* pToolBar = new KToolBar( this, i18n("Task Actions") );
pToolBar->setLabel(i18n("Task")); pToolBar->setLabel(i18n("Task"));

@ -12,14 +12,14 @@
#ifndef KOMPOSETASKPREFSWIDGET_H #ifndef KOMPOSETASKPREFSWIDGET_H
#define KOMPOSETASKPREFSWIDGET_H #define KOMPOSETASKPREFSWIDGET_H
#include <qdockarea.h> #include <tqdockarea.h>
class KomposeTaskWidget; class KomposeTaskWidget;
/** /**
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeTaskPrefsWidget : public QDockArea class KomposeTaskPrefsWidget : public TQDockArea
{ {
Q_OBJECT Q_OBJECT
public: public:

@ -15,11 +15,11 @@
#include "komposeviewmanager.h" #include "komposeviewmanager.h"
#include "komposetaskmanager.h" #include "komposetaskmanager.h"
#include <qpixmap.h> #include <tqpixmap.h>
#include <qtimer.h> #include <tqtimer.h>
#include <kwin.h> #include <kwin.h>
#include <netwm.h> #include <netwm.h>
#include <qapplication.h> #include <tqapplication.h>
#include <kdebug.h> #include <kdebug.h>
#include <time.h> #include <time.h>
@ -28,7 +28,7 @@
KomposeTaskVisualizer::KomposeTaskVisualizer(KomposeTask *parent, const char *name) KomposeTaskVisualizer::KomposeTaskVisualizer(KomposeTask *parent, const char *name)
: QObject(parent, name), : TQObject(parent, name),
task(parent), task(parent),
scaledScreenshotDirty(false), scaledScreenshotDirty(false),
screenshotSuspended(false), screenshotSuspended(false),
@ -40,8 +40,8 @@ KomposeTaskVisualizer::KomposeTaskVisualizer(KomposeTask *parent, const char *na
compositeInit = false; compositeInit = false;
#endif #endif
screenshot.setOptimization( QPixmap::BestOptim ); screenshot.setOptimization( TQPixmap::BestOptim );
scaledScreenshot.setOptimization( QPixmap::BestOptim ); scaledScreenshot.setOptimization( TQPixmap::BestOptim );
// Create highlight color modifier // Create highlight color modifier
cmHighlight = imlib_create_color_modifier(); cmHighlight = imlib_create_color_modifier();
@ -78,7 +78,7 @@ KomposeTaskVisualizer::~KomposeTaskVisualizer()
* Called from outside to retrieve a screenshot * Called from outside to retrieve a screenshot
* @param pix The pixmap the screenshot will be rendered onto * @param pix The pixmap the screenshot will be rendered onto
*/ */
void KomposeTaskVisualizer::renderOnPixmap(QPixmap* pix, int effect) void KomposeTaskVisualizer::renderOnPixmap(TQPixmap* pix, int effect)
{ {
if ( scaledScreenshotDirty || scaledScreenshot.isNull() || scaledScreenshot.size() != pix->size() || if ( scaledScreenshotDirty || scaledScreenshot.isNull() || scaledScreenshot.size() != pix->size() ||
KomposeSettings::instance()->getImageEffects() && (lasteffect != effect ) ) KomposeSettings::instance()->getImageEffects() && (lasteffect != effect ) )
@ -89,7 +89,7 @@ void KomposeTaskVisualizer::renderOnPixmap(QPixmap* pix, int effect)
copyBlt ( pix, 0, 0, &scaledScreenshot, 0, 0, pix->width(), pix->height() ); copyBlt ( pix, 0, 0, &scaledScreenshot, 0, 0, pix->width(), pix->height() );
// QPainter p( pix ); // TQPainter p( pix );
// p.drawPixmap(0 ,0 , *scaledScreenshot, 0, 0, pix->width(), pix->height() ); // p.drawPixmap(0 ,0 , *scaledScreenshot, 0, 0, pix->width(), pix->height() );
// p.end(); // p.end();
} }
@ -99,7 +99,7 @@ void KomposeTaskVisualizer::renderOnPixmap(QPixmap* pix, int effect)
* Renders a scaled version of screenshot and stores it as scaledScreenshot * Renders a scaled version of screenshot and stores it as scaledScreenshot
* @param newSize * @param newSize
*/ */
void KomposeTaskVisualizer::renderScaledScreenshot( QSize newSize ) void KomposeTaskVisualizer::renderScaledScreenshot( TQSize newSize )
{ {
kdDebug() << "KomposeTaskVisualizer::renderScaledScreenshot() (" << task->window() << ") " << newSize.width() << "x" << newSize.height() << endl; kdDebug() << "KomposeTaskVisualizer::renderScaledScreenshot() (" << task->window() << ") " << newSize.width() << "x" << newSize.height() << endl;
@ -140,7 +140,7 @@ void KomposeTaskVisualizer::renderScaledScreenshot( QSize newSize )
// The XComposite way // The XComposite way
#ifdef COMPOSITE #ifdef COMPOSITE
Picture picture = XRenderCreatePicture( dpy, windowBackingPix, format, CPSubwindowMode, &pa ); Picture picture = XRenderCreatePicture( dpy, windowBackingPix, format, CPSubwindowMode, &pa );
QRect geom = task->getGeometry(); TQRect geom = task->getGeometry();
double scale = (double)pix->width() / (double)geom.width(); double scale = (double)pix->width() / (double)geom.width();
XRenderSetPictureFilter( dpy, picture, FilterBilinear, 0, 0 ); XRenderSetPictureFilter( dpy, picture, FilterBilinear, 0, 0 );
@ -153,7 +153,7 @@ void KomposeTaskVisualizer::renderScaledScreenshot( QSize newSize )
XRenderSetPictureTransform( dpy, picture, &xform ); XRenderSetPictureTransform( dpy, picture, &xform );
XRenderComposite( QPaintDevice::x11AppDisplay(), XRenderComposite( TQPaintDevice::x11AppDisplay(),
hasAlpha ? PictOpOver : PictOpSrc, hasAlpha ? PictOpOver : PictOpSrc,
picture, picture,
None, None,
@ -197,7 +197,7 @@ void KomposeTaskVisualizer::slotTaskActivated()
{ {
// Retry 1 sec later // Retry 1 sec later
screenshotSuspended = true; screenshotSuspended = true;
QTimer::singleShot( 500, this, SLOT( slotTaskActivated() ) ); TQTimer::singleShot( 500, this, SLOT( slotTaskActivated() ) );
} }
screenshotSuspended = false; screenshotSuspended = false;
@ -208,7 +208,7 @@ void KomposeTaskVisualizer::slotTaskActivated()
{ {
kdDebug() << "KomposeTaskVisualizer::slotTaskActivated() (WId " << task->window() << ") - Screenshot already exists, but passive mode on - Grabbing new one." << endl; kdDebug() << "KomposeTaskVisualizer::slotTaskActivated() (WId " << task->window() << ") - Screenshot already exists, but passive mode on - Grabbing new one." << endl;
// Use a timer to make task switching feel more responsive // Use a timer to make task switching feel more responsive
QTimer::singleShot( 300, this, SLOT( captureScreenshot_GrabWindow() ) ); TQTimer::singleShot( 300, this, SLOT( captureScreenshot_GrabWindow() ) );
//captureScreenshot_GrabWindow(); //captureScreenshot_GrabWindow();
} }
} }
@ -247,8 +247,8 @@ void KomposeTaskVisualizer::slotUpdateScreenshot()
kdDebug() << "KomposeTaskVisualizer::slotUpdateScreenshot() (WId " << task->window() << ") - Forcing activation (no screenshot exists)" << endl; kdDebug() << "KomposeTaskVisualizer::slotUpdateScreenshot() (WId " << task->window() << ") - Forcing activation (no screenshot exists)" << endl;
task->activate(); task->activate();
QApplication::flushX(); TQApplication::flushX();
QApplication::syncX(); TQApplication::syncX();
// Wait until window is fully redrawn // Wait until window is fully redrawn
struct timespec req, rem; struct timespec req, rem;
@ -257,16 +257,16 @@ void KomposeTaskVisualizer::slotUpdateScreenshot()
while(nanosleep(&req, &rem)) while(nanosleep(&req, &rem))
req = rem; req = rem;
QApplication::flushX(); TQApplication::flushX();
//task->refresh(); //task->refresh();
// Finally capture! // Finally capture!
screenshot = QPixmap::grabWindow( task->window() ); screenshot = TQPixmap::grabWindow( task->window() );
//captureScreenshot_GrabWindow(); //captureScreenshot_GrabWindow();
// Restore if formerly iconified // Restore if formerly iconified
if ( iconifyLater ) if ( iconifyLater )
QTimer::singleShot( 1000, task, SLOT( iconify() ) ); TQTimer::singleShot( 1000, task, SLOT( iconify() ) );
scaledScreenshotDirty = true; scaledScreenshotDirty = true;
} }
@ -310,7 +310,7 @@ void KomposeTaskVisualizer::initXComposite()
#ifdef COMPOSITE #ifdef COMPOSITE
if ( !compositeInit && KomposeGlobal::instance()->hasXcomposite() && KomposeSettings::instance()->getUseComposite()) if ( !compositeInit && KomposeGlobal::instance()->hasXcomposite() && KomposeSettings::instance()->getUseComposite())
{ {
dpy = QPaintDevice::x11AppDisplay(); dpy = TQPaintDevice::x11AppDisplay();
connect( task, SIGNAL(x11ConfigureNotify()), this, SLOT(updateXCompositeNamedPixmap())); connect( task, SIGNAL(x11ConfigureNotify()), this, SLOT(updateXCompositeNamedPixmap()));
XSelectInput( dpy, task->wmFrame(), StructureNotifyMask ); XSelectInput( dpy, task->wmFrame(), StructureNotifyMask );
@ -360,21 +360,21 @@ void KomposeTaskVisualizer::captureScreenshot_GrabWindow()
//task->activate(); //task->activate();
// QWidget *rootWin = qApp->desktop(); // TQWidget *rootWin = tqApp->desktop();
// screenshot = QPixmap::grabWindow( rootWin->winId(), geom.x(), geom.y(), geom.width(), geom.height() ); // screenshot = TQPixmap::grabWindow( rootWin->winId(), geom.x(), geom.y(), geom.width(), geom.height() );
screenshot = QPixmap::grabWindow( task->window() ); screenshot = TQPixmap::grabWindow( task->window() );
scaledScreenshotDirty = true; scaledScreenshotDirty = true;
// We've just grabbed a screenshot and don't want this to happen again in the next 3?! seconds // We've just grabbed a screenshot and don't want this to happen again in the next 3?! seconds
screenshotBlocked = true; screenshotBlocked = true;
QTimer::singleShot( 3000, this, SLOT( enablePasvScreenshots() ) ); TQTimer::singleShot( 3000, this, SLOT( enablePasvScreenshots() ) );
kdDebug() << "KomposeTaskVisualizer::captureScreenshot_GrabWindow() (WId " << task->window() << ") - Grabbed screenshot." << endl; kdDebug() << "KomposeTaskVisualizer::captureScreenshot_GrabWindow() (WId " << task->window() << ") - Grabbed screenshot." << endl;
// Code to create a screenshot directly as an Imlib image // Code to create a screenshot directly as an Imlib image
// QRect geom = windowInfo.geometry(); // TQRect geom = windowInfo.geometry();
// Display *disp; // Display *disp;
// Visual *vis; // Visual *vis;
// Colormap cm; // Colormap cm;

@ -12,7 +12,7 @@
#ifndef KOMPOSETASKVISUALIZER_H #ifndef KOMPOSETASKVISUALIZER_H
#define KOMPOSETASKVISUALIZER_H #define KOMPOSETASKVISUALIZER_H
#include <qobject.h> #include <tqobject.h>
#include "komposetask.h" #include "komposetask.h"
@ -29,20 +29,20 @@
enum ImageEffect { IEFFECT_NONE, IEFFECT_TITLE, IEFFECT_MINIMIZED, IEFFECT_MINIMIZED_AND_TITLE, IEFFECT_HIGHLIGHT }; enum ImageEffect { IEFFECT_NONE, IEFFECT_TITLE, IEFFECT_MINIMIZED, IEFFECT_MINIMIZED_AND_TITLE, IEFFECT_HIGHLIGHT };
class QPixmap; class TQPixmap;
class QSize; class TQSize;
/** /**
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeTaskVisualizer : public QObject class KomposeTaskVisualizer : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
KomposeTaskVisualizer(KomposeTask *parent, const char *name = 0); KomposeTaskVisualizer(KomposeTask *parent, const char *name = 0);
~KomposeTaskVisualizer(); ~KomposeTaskVisualizer();
void renderOnPixmap( QPixmap* pix, int effect ); void renderOnPixmap( TQPixmap* pix, int effect );
protected: protected:
void applyEffect(); void applyEffect();
@ -51,7 +51,7 @@ protected slots:
void initXComposite(); void initXComposite();
void captureScreenshot_GrabWindow(); void captureScreenshot_GrabWindow();
void updateXCompositeNamedPixmap(); void updateXCompositeNamedPixmap();
void renderScaledScreenshot( QSize size ); void renderScaledScreenshot( TQSize size );
void setScaledScreenshotDirty() { scaledScreenshotDirty = true; } void setScaledScreenshotDirty() { scaledScreenshotDirty = true; }
void clearCached(); void clearCached();
@ -63,8 +63,8 @@ public slots:
private: private:
KomposeTask *task; KomposeTask *task;
QPixmap screenshot; TQPixmap screenshot;
QPixmap scaledScreenshot; TQPixmap scaledScreenshot;
bool scaledScreenshotDirty; bool scaledScreenshotDirty;
bool screenshotSuspended; // suspend pasv screenshots for this task bool screenshotSuspended; // suspend pasv screenshots for this task
bool screenshotBlocked; // dis/enable pasv screenshots for this task bool screenshotBlocked; // dis/enable pasv screenshots for this task

@ -28,16 +28,16 @@
#include "komposeglobal.h" #include "komposeglobal.h"
#include "komposesettings.h" #include "komposesettings.h"
#include <qpixmap.h> #include <tqpixmap.h>
#include <qimage.h> #include <tqimage.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qdragobject.h> #include <tqdragobject.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qiconset.h> #include <tqiconset.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qfont.h> #include <tqfont.h>
#include <kcursor.h> #include <kcursor.h>
#include <klocale.h> #include <klocale.h>
@ -50,18 +50,18 @@
#include "komposetaskvisualizer.h" #include "komposetaskvisualizer.h"
KomposeTaskWidget::KomposeTaskWidget(KomposeTask *t, QWidget *parent, KomposeLayout *l, const char *name) KomposeTaskWidget::KomposeTaskWidget(KomposeTask *t, TQWidget *parent, KomposeLayout *l, const char *name)
: KomposeWidget(parent, l, name), : KomposeWidget(parent, l, name),
highlight(false), highlight(false),
task(t) task(t)
{ {
setWFlags( WStaticContents | WRepaintNoErase | WResizeNoErase ); // avoid redraw errors setWFlags( WStaticContents | WRepaintNoErase | WResizeNoErase ); // avoid redraw errors
setBackgroundMode( Qt::NoBackground ); // avoid flickering setBackgroundMode( TQt::NoBackground ); // avoid flickering
QToolTip::add( this, task->visibleNameWithState() ); TQToolTip::add( this, task->visibleNameWithState() );
pm_dbBackground.setOptimization( QPixmap::BestOptim ); pm_dbBackground.setOptimization( TQPixmap::BestOptim );
setBackgroundMode( Qt::NoBackground ); setBackgroundMode( TQt::NoBackground );
//setBackgroundPixmap(pm_dbBackground); //setBackgroundPixmap(pm_dbBackground);
initActions(); initActions();
@ -81,8 +81,8 @@ KomposeTaskWidget::KomposeTaskWidget(KomposeTask *t, QWidget *parent, KomposeLay
connect( t, SIGNAL( x11DamageNotify() ), this, SLOT( drawWidgetAndRepaint() ) ); connect( t, SIGNAL( x11DamageNotify() ), this, SLOT( drawWidgetAndRepaint() ) );
} }
#endif #endif
//setFocusPolicy(QWidget::ClickFocus); //setFocusPolicy(TQWidget::ClickFocus);
setFocusPolicy(QWidget::StrongFocus); setFocusPolicy(TQWidget::StrongFocus);
initFonts(); initFonts();
} }
@ -117,7 +117,7 @@ void KomposeTaskWidget::slotTaskDestroyed()
//if (KomposeViewManager::instance()->hasActiveView()) //if (KomposeViewManager::instance()->hasActiveView())
emit requestRemoval(this); emit requestRemoval(this);
} }
void KomposeTaskWidget::resizeEvent ( QResizeEvent * e ) void KomposeTaskWidget::resizeEvent ( TQResizeEvent * e )
{ {
if ( e->oldSize() != e->size()) if ( e->oldSize() != e->size())
{ {
@ -128,7 +128,7 @@ void KomposeTaskWidget::resizeEvent ( QResizeEvent * e )
} }
void KomposeTaskWidget::paintEvent ( QPaintEvent * ) void KomposeTaskWidget::paintEvent ( TQPaintEvent * )
{ {
if (size().height() < 40 ) // small hack that will prevent drawing on init if (size().height() < 40 ) // small hack that will prevent drawing on init
return; return;
@ -155,7 +155,7 @@ void KomposeTaskWidget::drawWidget()
pm_dbBackground.resize( width(), height() ); pm_dbBackground.resize( width(), height() );
//pm_dbBackground.fill(white); //pm_dbBackground.fill(white);
QPainter p( &pm_dbBackground ); TQPainter p( &pm_dbBackground );
int effect = IEFFECT_NONE; int effect = IEFFECT_NONE;
@ -171,22 +171,22 @@ void KomposeTaskWidget::drawWidget()
task->getVisualizer()->renderOnPixmap(&pm_dbBackground, effect); task->getVisualizer()->renderOnPixmap(&pm_dbBackground, effect);
// Icon // Icon
QPoint titleTextPos( 6, KomposeSettings::instance()->getWindowTitleFontHeight() + 1); TQPoint titleTextPos( 6, KomposeSettings::instance()->getWindowTitleFontHeight() + 1);
if ( KomposeSettings::instance()->getShowIcons() ) if ( KomposeSettings::instance()->getShowIcons() )
{ {
QPixmap icon = task->getIcon( KomposeSettings::instance()->getIconSizePixels() ); TQPixmap icon = task->getIcon( KomposeSettings::instance()->getIconSizePixels() );
// Place the icon left or under the text, according to it's size // Place the icon left or under the text, according to it's size
if ( KomposeSettings::instance()->getIconSize() < 2 || icon.height() < 50 ) if ( KomposeSettings::instance()->getIconSize() < 2 || icon.height() < 50 )
{ {
// Medium sized or tiny Icon // Medium sized or tiny Icon
p.drawPixmap( QPoint(5, 5), icon ); p.drawPixmap( TQPoint(5, 5), icon );
titleTextPos.setX(icon.width() + 10); titleTextPos.setX(icon.width() + 10);
} }
else else
{ {
// Big Icon // Big Icon
p.drawPixmap( QPoint(5, 5), icon ); p.drawPixmap( TQPoint(5, 5), icon );
// titleTextPos.setX(icon.width()); // titleTextPos.setX(icon.width());
} }
} }
@ -201,62 +201,62 @@ void KomposeTaskWidget::drawWidget()
p.drawText( titleTextPos, task->visibleNameWithState() ); p.drawText( titleTextPos, task->visibleNameWithState() );
} }
p.setPen( KomposeSettings::instance()->getWindowTitleFontColor() ); p.setPen( KomposeSettings::instance()->getWindowTitleFontColor() );
p.drawText( QPoint( titleTextPos.x()-2, titleTextPos.y()-2 ), task->visibleNameWithState() ); p.drawText( TQPoint( titleTextPos.x()-2, titleTextPos.y()-2 ), task->visibleNameWithState() );
} }
// Border // Border
if (!highlight) if (!highlight)
{ {
QPen pen( gray, 1, Qt::SolidLine ); TQPen pen( gray, 1, TQt::SolidLine );
p.setPen( pen ); p.setPen( pen );
p.drawRect(rect()); p.drawRect(rect());
} }
else else
{ {
QPen pen( black, 2, Qt::DotLine ); TQPen pen( black, 2, TQt::DotLine );
p.setPen( pen ); p.setPen( pen );
p.drawRect( QRect( 1, 1, rect().width()-1, rect().height()-1 ) ); p.drawRect( TQRect( 1, 1, rect().width()-1, rect().height()-1 ) );
} }
p.end(); p.end();
} }
void KomposeTaskWidget::mouseReleaseEvent ( QMouseEvent * e ) void KomposeTaskWidget::mouseReleaseEvent ( TQMouseEvent * e )
{ {
if ( !rect().contains( e->pos() ) ) if ( !rect().contains( e->pos() ) )
return; return;
KomposeViewManager::instance()->activateTask( task ); KomposeViewManager::instance()->activateTask( task );
} }
void KomposeTaskWidget::mouseMoveEvent ( QMouseEvent * e ) void KomposeTaskWidget::mouseMoveEvent ( TQMouseEvent * e )
{ {
if ( e->state() == Qt::LeftButton ) if ( e->state() == TQt::LeftButton )
startDrag(); startDrag();
} }
// void KomposeTaskWidget::mouseDoubleClickEvent ( QMouseEvent * e ) // void KomposeTaskWidget::mouseDoubleClickEvent ( TQMouseEvent * e )
// { // {
// if ( !rect().contains( e->pos() ) ) // if ( !rect().contains( e->pos() ) )
// return; // return;
// KomposeTaskManager::instance()->activateTask( task ); // KomposeTaskManager::instance()->activateTask( task );
// } // }
void KomposeTaskWidget::keyReleaseEvent ( QKeyEvent * e ) void KomposeTaskWidget::keyReleaseEvent ( TQKeyEvent * e )
{ {
if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Space ) if ( e->key() == TQt::Key_Return || e->key() == TQt::Key_Space )
{ {
kdDebug() << "KomposeTaskWidget::keyReleaseEvent - activating Task!" << endl; kdDebug() << "KomposeTaskWidget::keyReleaseEvent - activating Task!" << endl;
e->accept(); e->accept();
KomposeViewManager::instance()->activateTask( task ); KomposeViewManager::instance()->activateTask( task );
return; return;
} }
else if ( e->key() == Qt::Key_C ) else if ( e->key() == TQt::Key_C )
{ {
kdDebug() << "KomposeTaskWidget::keyReleaseEvent - closing Task!" << endl; kdDebug() << "KomposeTaskWidget::keyReleaseEvent - closing Task!" << endl;
task->close(); task->close();
e->accept(); e->accept();
} }
else if ( e->key() == Qt::Key_M ) else if ( e->key() == TQt::Key_M )
{ {
kdDebug() << "KomposeTaskWidget::keyReleaseEvent - toggling state!" << endl; kdDebug() << "KomposeTaskWidget::keyReleaseEvent - toggling state!" << endl;
task->minimizeOrRestore(); task->minimizeOrRestore();
@ -270,7 +270,7 @@ void KomposeTaskWidget::keyReleaseEvent ( QKeyEvent * e )
KomposeWidget::keyReleaseEvent(e); KomposeWidget::keyReleaseEvent(e);
} }
void KomposeTaskWidget::leaveEvent ( QEvent * ) void KomposeTaskWidget::leaveEvent ( TQEvent * )
{ {
highlight = false; highlight = false;
unsetCursor(); unsetCursor();
@ -281,7 +281,7 @@ void KomposeTaskWidget::leaveEvent ( QEvent * )
parentWidget()->setFocus(); parentWidget()->setFocus();
} }
void KomposeTaskWidget::enterEvent ( QEvent * ) void KomposeTaskWidget::enterEvent ( TQEvent * )
{ {
setFocus(); setFocus();
setCursor( KCursor::handCursor() ); setCursor( KCursor::handCursor() );
@ -291,13 +291,13 @@ void KomposeTaskWidget::enterEvent ( QEvent * )
prefWidget->show(); prefWidget->show();
} }
void KomposeTaskWidget::focusInEvent ( QFocusEvent * ) void KomposeTaskWidget::focusInEvent ( TQFocusEvent * )
{ {
highlight = true; highlight = true;
drawWidgetAndRepaint(); drawWidgetAndRepaint();
} }
void KomposeTaskWidget::focusOutEvent ( QFocusEvent * ) void KomposeTaskWidget::focusOutEvent ( TQFocusEvent * )
{ {
highlight = false; highlight = false;
drawWidgetAndRepaint(); drawWidgetAndRepaint();
@ -325,11 +325,11 @@ void KomposeTaskWidget::startDrag()
{ {
// The text is just a dummy // The text is just a dummy
// FIXME: Maybe we should us a "Task"-Mimetype // FIXME: Maybe we should us a "Task"-Mimetype
QDragObject *d = new QTextDrag( "toDesktop()", this ); TQDragObject *d = new TQTextDrag( "toDesktop()", this );
d->dragCopy(); d->dragCopy();
} }
void KomposeTaskWidget::setGeometry( const QRect &rect ) void KomposeTaskWidget::setGeometry( const TQRect &rect )
{ {
int width = task->getGeometry().width(); int width = task->getGeometry().width();
int height = task->getGeometry().height(); int height = task->getGeometry().height();
@ -337,10 +337,10 @@ void KomposeTaskWidget::setGeometry( const QRect &rect )
// Don't scale images bigger than they actually are // Don't scale images bigger than they actually are
if ( rect.width() > width || rect.height() > height ) if ( rect.width() > width || rect.height() > height )
{ {
QWidget::setGeometry( QRect( rect.left(), rect.top(), width, height ) ); TQWidget::setGeometry( TQRect( rect.left(), rect.top(), width, height ) );
} }
else else
QWidget::setGeometry( rect ); TQWidget::setGeometry( rect );
} }
void KomposeTaskWidget::initActions() void KomposeTaskWidget::initActions()
@ -361,7 +361,7 @@ void KomposeTaskWidget::initMenu()
actMinimizeRestoreTask->plug(menu); actMinimizeRestoreTask->plug(menu);
// toDesktop menu // toDesktop menu
QPopupMenu* m = new QPopupMenu( this ); TQPopupMenu* m = new TQPopupMenu( this );
m->setCheckable( true ); m->setCheckable( true );
int id = m->insertItem( i18n("&All Desktops"), task, SLOT( toDesktop(int) ) ); int id = m->insertItem( i18n("&All Desktops"), task, SLOT( toDesktop(int) ) );
@ -372,7 +372,7 @@ void KomposeTaskWidget::initMenu()
for( int i = 1; i <= KomposeTaskManager::instance()->getNumDesktops(); i++ ) for( int i = 1; i <= KomposeTaskManager::instance()->getNumDesktops(); i++ )
{ {
QString name = QString( "&%1 %2" ).arg( i ).arg( KomposeTaskManager::instance()->getDesktopName( i ).replace( '&', "&&" ) ); TQString name = TQString( "&%1 %2" ).arg( i ).arg( KomposeTaskManager::instance()->getDesktopName( i ).replace( '&', "&&" ) );
id = m->insertItem( name, task, SLOT( toDesktop(int) ) ); id = m->insertItem( name, task, SLOT( toDesktop(int) ) );
m->setItemParameter( id, i ); m->setItemParameter( id, i );
m->setItemChecked( id, !task->isOnAllDesktops() && task->onDesktop() == i ); m->setItemChecked( id, !task->isOnAllDesktops() && task->onDesktop() == i );
@ -404,7 +404,7 @@ void KomposeTaskWidget::slotMinimizeRestoreToggled()
task->minimizeOrRestore(); task->minimizeOrRestore();
} }
void KomposeTaskWidget::mousePressEvent ( QMouseEvent * e ) void KomposeTaskWidget::mousePressEvent ( TQMouseEvent * e )
{ {
if ( !rect().contains( e->pos() ) ) if ( !rect().contains( e->pos() ) )
return; return;

@ -23,8 +23,8 @@
#include "komposewidget.h" #include "komposewidget.h"
#include "komposetaskprefswidget.h" #include "komposetaskprefswidget.h"
#include <qimage.h> #include <tqimage.h>
#include <qpixmap.h> #include <tqpixmap.h>
class KomposeTask; class KomposeTask;
@ -40,7 +40,7 @@ class KomposeTaskWidget : public KomposeWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
KomposeTaskWidget(KomposeTask *t, QWidget *parent = 0, KomposeLayout *l = 0, const char *name = 0); KomposeTaskWidget(KomposeTask *t, TQWidget *parent = 0, KomposeLayout *l = 0, const char *name = 0);
~KomposeTaskWidget(); ~KomposeTaskWidget();
@ -56,16 +56,16 @@ signals:
void requestRemoval(KomposeWidget*); void requestRemoval(KomposeWidget*);
protected: protected:
void paintEvent ( QPaintEvent * ); void paintEvent ( TQPaintEvent * );
void mouseReleaseEvent ( QMouseEvent * e ); void mouseReleaseEvent ( TQMouseEvent * e );
void mousePressEvent ( QMouseEvent * e ); void mousePressEvent ( TQMouseEvent * e );
void mouseMoveEvent ( QMouseEvent * e ); void mouseMoveEvent ( TQMouseEvent * e );
void leaveEvent ( QEvent * ); void leaveEvent ( TQEvent * );
void enterEvent ( QEvent * ); void enterEvent ( TQEvent * );
void resizeEvent ( QResizeEvent * ); void resizeEvent ( TQResizeEvent * );
void focusInEvent ( QFocusEvent * ); void focusInEvent ( TQFocusEvent * );
void focusOutEvent ( QFocusEvent * ); void focusOutEvent ( TQFocusEvent * );
void keyReleaseEvent ( QKeyEvent * e ); void keyReleaseEvent ( TQKeyEvent * e );
void startDrag(); void startDrag();
void initActions(); void initActions();
@ -76,17 +76,17 @@ protected slots:
void drawWidget(); void drawWidget();
void drawWidgetAndRepaint(); void drawWidgetAndRepaint();
void initFonts(); void initFonts();
void setGeometry( const QRect &rect ); void setGeometry( const TQRect &rect );
void reInitMenu(); void reInitMenu();
void slotMinimizeRestoreToggled(); void slotMinimizeRestoreToggled();
void setActionIcons( bool inverse=false ); void setActionIcons( bool inverse=false );
private: private:
QPixmap pm_dbBackground; TQPixmap pm_dbBackground;
bool highlight; // Highlight widget? bool highlight; // Highlight widget?
QFont titleFont; TQFont titleFont;
KomposeTask* task; KomposeTask* task;
KomposeTaskPrefsWidget *prefWidget; KomposeTaskPrefsWidget *prefWidget;

@ -16,12 +16,12 @@
#include "komposesettings.h" #include "komposesettings.h"
#include "komposesystray.h" #include "komposesystray.h"
#include <qtimer.h> #include <tqtimer.h>
#include <qcursor.h> #include <tqcursor.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qwidgetlist.h> #include <tqwidgetlist.h>
#include <qdesktopwidget.h> #include <tqdesktopwidget.h>
#include <kwin.h> #include <kwin.h>
#include <kapplication.h> #include <kapplication.h>
@ -45,7 +45,7 @@ KomposeViewManager* KomposeViewManager::instance()
KomposeViewManager::KomposeViewManager(): KomposeViewManager::KomposeViewManager():
DCOPObject( "KomposeDcopIface" ), DCOPObject( "KomposeDcopIface" ),
QObject(), TQObject(),
viewWidget(), viewWidget(),
activeView(0), activeView(0),
blockScreenshots(0) blockScreenshots(0)
@ -53,11 +53,11 @@ KomposeViewManager::KomposeViewManager():
viewManagerInstance = this; viewManagerInstance = this;
// Setup cursorupdate timer to check for mouse moves into corner // Setup cursorupdate timer to check for mouse moves into corner
cursorUpdateTimer = new QTimer(); cursorUpdateTimer = new TQTimer();
slotStartCursorUpdateTimer(); slotStartCursorUpdateTimer();
// dirty hack. see uglyQtHackInitFunction() // dirty hack. see uglyTQtHackInitFunction()
QTimer::singleShot( 500, this, SLOT( uglyQtHackInitFunction() ) ); TQTimer::singleShot( 500, this, SLOT( uglyTQtHackInitFunction() ) );
} }
@ -70,13 +70,13 @@ KomposeViewManager::~KomposeViewManager()
/** /**
* This is a hack that should be called by a timer as this connect won't work in the constructor * This is a hack that should be called by a timer as this connect won't work in the constructor
*/ */
void KomposeViewManager::uglyQtHackInitFunction() void KomposeViewManager::uglyTQtHackInitFunction()
{ {
connect( KomposeSettings::instance(), SIGNAL( settingsChanged() ), SLOT( slotStartCursorUpdateTimer() ) ); connect( KomposeSettings::instance(), SIGNAL( settingsChanged() ), SLOT( slotStartCursorUpdateTimer() ) );
} }
/** /**
* Starts the corner check timer which polls QCursor::pos() every second * Starts the corner check timer which polls TQCursor::pos() every second
@see checkCursorPos() @see checkCursorPos()
*/ */
void KomposeViewManager::slotStartCursorUpdateTimer() void KomposeViewManager::slotStartCursorUpdateTimer()
@ -92,8 +92,8 @@ void KomposeViewManager::slotStartCursorUpdateTimer()
KomposeSettings::instance()->getActivateOnLeftEdge() || KomposeSettings::instance()->getActivateOnLeftEdge() ||
KomposeSettings::instance()->getActivateOnRightEdge() ) KomposeSettings::instance()->getActivateOnRightEdge() )
{ {
kdDebug() << "KomposeViewManager::slotStartCursorUpdateTimer() - QCursor::pos() checks enabled" << endl; kdDebug() << "KomposeViewManager::slotStartCursorUpdateTimer() - TQCursor::pos() checks enabled" << endl;
QRect deskRect = QApplication::desktop()->screenGeometry(); TQRect deskRect = TQApplication::desktop()->screenGeometry();
topLeftCorner = deskRect.topLeft(); topLeftCorner = deskRect.topLeft();
topRightCorner = deskRect.topRight(); topRightCorner = deskRect.topRight();
@ -113,25 +113,25 @@ void KomposeViewManager::checkCursorPos()
{ {
if ( if (
( KomposeSettings::instance()->getActivateOnTopLeftCorner() && ( KomposeSettings::instance()->getActivateOnTopLeftCorner() &&
!activeView && QCursor::pos() == topLeftCorner ) || !activeView && TQCursor::pos() == topLeftCorner ) ||
( KomposeSettings::instance()->getActivateOnTopRightCorner() && ( KomposeSettings::instance()->getActivateOnTopRightCorner() &&
!activeView && QCursor::pos() == topRightCorner ) || !activeView && TQCursor::pos() == topRightCorner ) ||
( KomposeSettings::instance()->getActivateOnBottomLeftCorner() && ( KomposeSettings::instance()->getActivateOnBottomLeftCorner() &&
!activeView && QCursor::pos() == bottomLeftCorner ) || !activeView && TQCursor::pos() == bottomLeftCorner ) ||
( KomposeSettings::instance()->getActivateOnBottomRightCorner() && ( KomposeSettings::instance()->getActivateOnBottomRightCorner() &&
!activeView && QCursor::pos() == bottomRightCorner ) || !activeView && TQCursor::pos() == bottomRightCorner ) ||
( KomposeSettings::instance()->getActivateOnTopEdge() && ( KomposeSettings::instance()->getActivateOnTopEdge() &&
!activeView && QCursor::pos().y() == topLeftCorner.y() ) || !activeView && TQCursor::pos().y() == topLeftCorner.y() ) ||
( KomposeSettings::instance()->getActivateOnBottomEdge() && ( KomposeSettings::instance()->getActivateOnBottomEdge() &&
!activeView && QCursor::pos().y() == bottomLeftCorner.y() ) || !activeView && TQCursor::pos().y() == bottomLeftCorner.y() ) ||
( KomposeSettings::instance()->getActivateOnLeftEdge() && ( KomposeSettings::instance()->getActivateOnLeftEdge() &&
!activeView && QCursor::pos().x() == topLeftCorner.x() ) || !activeView && TQCursor::pos().x() == topLeftCorner.x() ) ||
( KomposeSettings::instance()->getActivateOnRightEdge() && ( KomposeSettings::instance()->getActivateOnRightEdge() &&
!activeView && QCursor::pos().x() == topRightCorner.x() ) !activeView && TQCursor::pos().x() == topRightCorner.x() )
) )
{ {
//cursorUpdateTimer->stop(); //cursorUpdateTimer->stop();
QTimer::singleShot( KomposeSettings::instance()->getAutoLockDelay(), this, SLOT( reCheckCursorPos() ) ); TQTimer::singleShot( KomposeSettings::instance()->getAutoLockDelay(), this, SLOT( reCheckCursorPos() ) );
} }
} }
@ -142,21 +142,21 @@ void KomposeViewManager::reCheckCursorPos()
{ {
if ( if (
( KomposeSettings::instance()->getActivateOnTopLeftCorner() && ( KomposeSettings::instance()->getActivateOnTopLeftCorner() &&
!activeView && QCursor::pos() == topLeftCorner ) || !activeView && TQCursor::pos() == topLeftCorner ) ||
( KomposeSettings::instance()->getActivateOnTopRightCorner() && ( KomposeSettings::instance()->getActivateOnTopRightCorner() &&
!activeView && QCursor::pos() == topRightCorner ) || !activeView && TQCursor::pos() == topRightCorner ) ||
( KomposeSettings::instance()->getActivateOnBottomLeftCorner() && ( KomposeSettings::instance()->getActivateOnBottomLeftCorner() &&
!activeView && QCursor::pos() == bottomLeftCorner ) || !activeView && TQCursor::pos() == bottomLeftCorner ) ||
( KomposeSettings::instance()->getActivateOnBottomRightCorner() && ( KomposeSettings::instance()->getActivateOnBottomRightCorner() &&
!activeView && QCursor::pos() == bottomRightCorner ) || !activeView && TQCursor::pos() == bottomRightCorner ) ||
( KomposeSettings::instance()->getActivateOnTopEdge() && ( KomposeSettings::instance()->getActivateOnTopEdge() &&
!activeView && QCursor::pos().y() == topLeftCorner.y() ) || !activeView && TQCursor::pos().y() == topLeftCorner.y() ) ||
( KomposeSettings::instance()->getActivateOnBottomEdge() && ( KomposeSettings::instance()->getActivateOnBottomEdge() &&
!activeView && QCursor::pos().y() == bottomLeftCorner.y() ) || !activeView && TQCursor::pos().y() == bottomLeftCorner.y() ) ||
( KomposeSettings::instance()->getActivateOnLeftEdge() && ( KomposeSettings::instance()->getActivateOnLeftEdge() &&
!activeView && QCursor::pos().x() == topLeftCorner.x() ) || !activeView && TQCursor::pos().x() == topLeftCorner.x() ) ||
( KomposeSettings::instance()->getActivateOnRightEdge() && ( KomposeSettings::instance()->getActivateOnRightEdge() &&
!activeView && QCursor::pos().x() == topRightCorner.x() ) !activeView && TQCursor::pos().x() == topRightCorner.x() )
) )
{ {
cursorUpdateTimer->stop(); cursorUpdateTimer->stop();
@ -230,7 +230,7 @@ void KomposeViewManager::closeCurrentView()
KWin::setCurrentDesktop( deskBeforeSnaps ); KWin::setCurrentDesktop( deskBeforeSnaps );
// A short delay until we allow screenshots again (would cause overlapping else // A short delay until we allow screenshots again (would cause overlapping else
QTimer::singleShot( 400, this, SLOT( toggleBlockScreenshots() ) ); TQTimer::singleShot( 400, this, SLOT( toggleBlockScreenshots() ) );
// Restart Timer for corner checks // Restart Timer for corner checks
slotStartCursorUpdateTimer(); slotStartCursorUpdateTimer();

@ -12,19 +12,19 @@
#ifndef KOMPOSEVIEWMANAGER_H #ifndef KOMPOSEVIEWMANAGER_H
#define KOMPOSEVIEWMANAGER_H #define KOMPOSEVIEWMANAGER_H
#include <qpoint.h> #include <tqpoint.h>
#include <dcopobject.h> #include <dcopobject.h>
#include "komposedcopiface.h" #include "komposedcopiface.h"
#include "komposefullscreenwidget.h" #include "komposefullscreenwidget.h"
class KomposeTask; class KomposeTask;
class QTimer; class TQTimer;
/** /**
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeViewManager : public QObject, virtual public KomposeDcopIface class KomposeViewManager : public TQObject, virtual public KomposeDcopIface
{ {
Q_OBJECT Q_OBJECT
protected: protected:
@ -56,7 +56,7 @@ protected slots:
void checkCursorPos(); void checkCursorPos();
void reCheckCursorPos(); void reCheckCursorPos();
void uglyQtHackInitFunction(); void uglyTQtHackInitFunction();
void slotStartCursorUpdateTimer(); void slotStartCursorUpdateTimer();
signals: signals:
@ -68,12 +68,12 @@ private:
bool blockScreenshots; // no screenshots when true bool blockScreenshots; // no screenshots when true
int deskBeforeSnaps; // the virtual desk we were on befor screenshots were taken int deskBeforeSnaps; // the virtual desk we were on befor screenshots were taken
QTimer *cursorUpdateTimer; TQTimer *cursorUpdateTimer;
// The 4 corners // The 4 corners
QPoint topLeftCorner; TQPoint topLeftCorner;
QPoint topRightCorner; TQPoint topRightCorner;
QPoint bottomLeftCorner; TQPoint bottomLeftCorner;
QPoint bottomRightCorner; TQPoint bottomRightCorner;
}; };
#endif #endif

@ -20,14 +20,14 @@
#include "komposewidget.h" #include "komposewidget.h"
#include "komposelayout.h" #include "komposelayout.h"
#include <qtimer.h> #include <tqtimer.h>
#include <kdebug.h> #include <kdebug.h>
/* /*
* The constructor accepts a custom layout, if none is specified a defaultlayout is used * The constructor accepts a custom layout, if none is specified a defaultlayout is used
*/ */
KomposeWidget::KomposeWidget(QWidget *parent, KomposeLayout *l, const char *name) KomposeWidget::KomposeWidget(TQWidget *parent, KomposeLayout *l, const char *name)
: QWidget(parent, name) : TQWidget(parent, name)
{ {
if (!l) if (!l)
layout = new KomposeLayout( this ); layout = new KomposeLayout( this );
@ -45,10 +45,10 @@ KomposeWidget::~KomposeWidget()
/* /*
* Whenever a child is added to the widget it's also added to the layout * Whenever a child is added to the widget it's also added to the layout
*/ */
void KomposeWidget::childEvent ( QChildEvent * ce) void KomposeWidget::childEvent ( TQChildEvent * ce)
{ {
KomposeWidget* kwChild = 0; KomposeWidget* kwChild = 0;
kwChild = ::qt_cast<KomposeWidget*>(ce->child()); kwChild = ::tqt_cast<KomposeWidget*>(ce->child());
if ( !kwChild ) if ( !kwChild )
return; return;
@ -68,7 +68,7 @@ void KomposeWidget::childEvent ( QChildEvent * ce)
/* /*
* Whenever a resize occurs rearrange the layout * Whenever a resize occurs rearrange the layout
*/ */
void KomposeWidget::resizeEvent ( QResizeEvent * e ) void KomposeWidget::resizeEvent ( TQResizeEvent * e )
{ {
kdDebug() << "KomposeWidget(" << className() << ")::resizeEvent - Size:" << e->size().width() << "x"<< e->size().height() << endl; kdDebug() << "KomposeWidget(" << className() << ")::resizeEvent - Size:" << e->size().width() << "x"<< e->size().height() << endl;
layout->arrangeLayout(); layout->arrangeLayout();
@ -77,11 +77,11 @@ void KomposeWidget::resizeEvent ( QResizeEvent * e )
KomposeWidget* KomposeWidget::getParentWidget() const KomposeWidget* KomposeWidget::getParentWidget() const
{ {
if ( QWidget::parent()->inherits("KomposeWidget") ) if ( TQWidget::parent()->inherits("KomposeWidget") )
return (KomposeWidget*)QWidget::parent(); return (KomposeWidget*)TQWidget::parent();
else else
{ {
kdDebug() << "KomposeWidget::getParentWidget() - QWidget::parent() does not inherit (KomposeWidget)" << endl; kdDebug() << "KomposeWidget::getParentWidget() - TQWidget::parent() does not inherit (KomposeWidget)" << endl;
return NULL; return NULL;
} }
} }

@ -20,7 +20,7 @@
#ifndef KOMPOSEWIDGET_H #ifndef KOMPOSEWIDGET_H
#define KOMPOSEWIDGET_H #define KOMPOSEWIDGET_H
#include <qwidget.h> #include <tqwidget.h>
class KomposeLayout; class KomposeLayout;
@ -28,11 +28,11 @@ class KomposeLayout;
This base class for all Kompose Widgets glues the Layout and the widget together: This base class for all Kompose Widgets glues the Layout and the widget together:
@author Hans Oischinger @author Hans Oischinger
*/ */
class KomposeWidget : public QWidget class KomposeWidget : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
KomposeWidget( QWidget *parent = 0, KomposeLayout *l = 0, const char *name = 0); KomposeWidget( TQWidget *parent = 0, KomposeLayout *l = 0, const char *name = 0);
virtual ~KomposeWidget(); virtual ~KomposeWidget();
@ -46,8 +46,8 @@ public:
int getNumofChilds(); int getNumofChilds();
protected: protected:
void childEvent( QChildEvent * ce); void childEvent( TQChildEvent * ce);
void resizeEvent ( QResizeEvent * e ); void resizeEvent ( TQResizeEvent * e );
protected: protected:
KomposeLayout *layout; KomposeLayout *layout;

@ -40,18 +40,18 @@ static KCmdLineOptions options[] =
KCmdLineLastOption KCmdLineLastOption
}; };
void myMessageOutput( QtMsgType type, const char *msg ) void myMessageOutput( TQtMsgType type, const char *msg )
{ {
return; return;
switch ( type ) switch ( type )
{ {
case QtDebugMsg: case TQtDebugMsg:
fprintf( stderr, "Debug: %s\n", msg ); fprintf( stderr, "Debug: %s\n", msg );
break; break;
case QtWarningMsg: case TQtWarningMsg:
fprintf( stderr, "Warning: %s\n", msg ); fprintf( stderr, "Warning: %s\n", msg );
break; break;
case QtFatalMsg: case TQtFatalMsg:
fprintf( stderr, "Fatal: %s\n", msg ); fprintf( stderr, "Fatal: %s\n", msg );
abort(); // deliberately core dump abort(); // deliberately core dump
} }

Loading…
Cancel
Save