aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rwxr-xr-xadmin/config.guess128
-rwxr-xr-xadmin/config.sub84
-rw-r--r--admin/ltmain.sh114
-rw-r--r--po/modules/theme/Makefile.am4
-rw-r--r--src/config.h.in18
-rw-r--r--src/kvi_configstatus.h2
-rw-r--r--src/kvilib/build/Makefile.am24
-rw-r--r--src/kvilib/tal/kvi_tal_tabdialog.cpp34
-rw-r--r--src/kvilib/tal/kvi_tal_tabdialog.h36
-rw-r--r--src/kvilib/tal/kvi_tal_tabdialog_qt3.h39
-rw-r--r--src/kvilib/tal/kvi_tal_tabdialog_qt4.h39
-rw-r--r--src/kvilib/tal/kvi_tal_textedit.cpp34
-rw-r--r--src/kvilib/tal/kvi_tal_textedit.h36
-rw-r--r--src/kvilib/tal/kvi_tal_textedit_qt3.h39
-rw-r--r--src/kvilib/tal/kvi_tal_textedit_qt4.h39
-rw-r--r--src/kvilib/tal/kvi_tal_wizard.cpp34
-rw-r--r--src/kvilib/tal/kvi_tal_wizard.h36
-rw-r--r--src/kvilib/tal/kvi_tal_wizard_qt3.h39
-rw-r--r--src/kvilib/tal/kvi_tal_wizard_qt4.h39
-rw-r--r--src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp2
-rw-r--r--src/kvirc/ui/kvi_console.cpp3
-rw-r--r--src/kvirc/ui/kvi_cryptcontroller.cpp2
-rw-r--r--src/kvirc/ui/kvi_frame.cpp24
-rw-r--r--src/kvirc/ui/kvi_htmldialog.cpp6
-rw-r--r--src/kvirc/ui/kvi_input.cpp71
-rw-r--r--src/kvirc/ui/kvi_input.h3
-rw-r--r--src/kvirc/ui/kvi_ircview.cpp45
-rw-r--r--src/kvirc/ui/kvi_ircview.h9
-rw-r--r--src/kvirc/ui/kvi_mdicaption.cpp17
-rw-r--r--src/kvirc/ui/kvi_mdicaption.h5
-rw-r--r--src/kvirc/ui/kvi_mdichild.cpp29
-rw-r--r--src/kvirc/ui/kvi_mdimanager.cpp93
-rw-r--r--src/kvirc/ui/kvi_mdimanager.h6
-rw-r--r--src/kvirc/ui/kvi_splash.cpp3
-rw-r--r--src/kvirc/ui/kvi_statusbar.cpp2
-rw-r--r--src/kvirc/ui/kvi_window.cpp5
-rw-r--r--src/modules/about/aboutdialog.cpp13
-rw-r--r--src/modules/about/aboutdialog.h4
-rw-r--r--src/modules/actioneditor/actioneditor.cpp20
-rw-r--r--src/modules/actioneditor/actioneditor.h11
-rw-r--r--src/modules/dcc/canvaswidget.cpp2
-rw-r--r--src/modules/dcc/dialogs.cpp4
-rw-r--r--src/modules/dialog/libkvidialog.cpp2
-rw-r--r--src/modules/dockwidget/trayicon.cpp14
-rw-r--r--src/modules/dockwidget/trayicon_win.cpp20
-rw-r--r--src/modules/editor/scripteditor.cpp28
-rw-r--r--src/modules/editor/scripteditor.h4
-rw-r--r--src/modules/logview/logviewmdiwindow.cpp2
-rw-r--r--src/modules/mircimport/libkvimircimport.cpp2
-rw-r--r--src/modules/mircimport/libkvimircimport.h4
-rw-r--r--src/modules/notifier/notifierwindow.cpp4
-rw-r--r--src/modules/objects/class_multilineedit.cpp195
-rw-r--r--src/modules/objects/class_multilineedit.h1
-rw-r--r--src/modules/objects/class_wizard.cpp32
-rw-r--r--src/modules/objects/class_wizard.h4
-rw-r--r--src/modules/options/container.cpp5
-rw-r--r--src/modules/options/dialog.cpp9
-rw-r--r--src/modules/options/optw_servers.cpp4
-rw-r--r--src/modules/reguser/edituser.cpp14
-rw-r--r--src/modules/reguser/edituser.h4
-rw-r--r--src/modules/reguser/wizard.cpp8
-rw-r--r--src/modules/reguser/wizard.h4
-rw-r--r--src/modules/rijndael/libkvirijndael.h2
-rw-r--r--src/modules/setup/setupwizard.cpp24
-rw-r--r--src/modules/setup/setupwizard.h4
-rw-r--r--src/modules/theme/managementdialog.cpp4
-rw-r--r--src/modules/theme/managementdialog.h4
-rw-r--r--src/modules/theme/packthemedialog.cpp10
-rw-r--r--src/modules/theme/packthemedialog.h8
-rw-r--r--src/modules/theme/savethemedialog.cpp8
-rw-r--r--src/modules/theme/savethemedialog.h8
-rw-r--r--src/modules/toolbareditor/toolbareditor.cpp2
73 files changed, 1271 insertions, 378 deletions
diff --git a/ChangeLog b/ChangeLog
index b91dc24f7..25473fe6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+08 Feb 2007
+ [Pragma]
+ - More Qt 4.x port.
+ Solved the most disturbing problems: it looks a lot better now.
+ - Font metric cache values can no longer be computed directly from a
+ widget's font. We must use the painter idea of the font instead.
+ This complicates caching a bit.
+ - Some of the QPainter functions seem to behave in a bit different way
+ - QFrame::drawContents() is gone... we need to reimplement paintEvent()
+ - The setAutoFillBackground(false) setting seems to be propagated to children
+ in some way (?) (as opposed to backgroundMode(NoBackground) in Qt3)
+ - QToolButton::drawButton() is gone, need to directly drawPixmaps instead...
+ - ...
+ Ported also the first couple of modules.
+
+ Qt 4 causes a lot of problems in porting but I'm starting to feel
+ like the new library is very cool :)
+
05 Feb 2007
[Pragma]
- The KVIrc executable now compiles and starts with Qt4. With Qt3 everythin
diff --git a/admin/config.guess b/admin/config.guess
index 917bbc50f..d870848e0 100755
--- a/admin/config.guess
+++ b/admin/config.guess
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-07-08'
+timestamp='2006-02-27'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -138,6 +139,23 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
+ eval $set_cc_for_build
+ cat << EOF > $dummy.c
+ #include <features.h>
+ #ifdef __UCLIBC__
+ # ifdef __UCLIBC_CONFIG_VERSION__
+ LIBC=uclibc __UCLIBC_CONFIG_VERSION__
+ # else
+ LIBC=uclibc
+ # endif
+ #else
+ LIBC=gnu
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
+fi
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -206,6 +224,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
@@ -764,7 +785,12 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -772,6 +798,9 @@ EOF
i*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ i*:MSYS_NT-*:*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
i*:windows32*:*)
# uname -m includes "-pc" on this system.
echo ${UNAME_MACHINE}-mingw32
@@ -779,8 +808,11 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+ x86:Interix*:[345]*)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T:Interix*:[345]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -794,7 +826,7 @@ EOF
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
exit ;;
- amd64:CYGWIN*:*:*)
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
p*:CYGWIN*:*)
@@ -815,25 +847,25 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo cris-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo crisv32-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo frv-unknown-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
@@ -851,8 +883,12 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -870,14 +906,21 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-${LIBC}
+ exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -890,34 +933,37 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo x86_64-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
@@ -932,20 +978,22 @@ EOF
p'`
case "$ld_supported_targets" in
elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
;;
a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
exit ;;
coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
exit ;;
esac
+ # This should get integrated into the C code below, but now we hack
+ if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -961,7 +1009,7 @@ EOF
LIBC=gnulibc1
# endif
#else
- #ifdef __INTEL_COMPILER
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__sun)
LIBC=gnu
#else
LIBC=gnuaout
@@ -971,7 +1019,11 @@ EOF
LIBC=dietlibc
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1182,7 +1234,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
- *86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1261,6 +1312,9 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/admin/config.sub b/admin/config.sub
index 1c366dfde..bb394190f 100755
--- a/admin/config.sub
+++ b/admin/config.sub
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2005-07-08'
+timestamp='2006-02-27'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -119,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -171,6 +173,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -234,12 +244,12 @@ case $basic_machine in
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
+ | d10v | d30v | dlx | dsp16xx | dvp \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+ | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -257,17 +267,18 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
- | ms1 \
+ | mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]a*eb | sh[23]e | sh[34]eb | shbe | sheb | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
@@ -286,6 +297,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -336,19 +350,20 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
- | ms1-* \
+ | mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]a*eb-* | sh[23]e-* | sh[34]eb-* | shbe-* | sheb-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
@@ -678,6 +693,24 @@ case $basic_machine in
basic_machine=m68k-atari
os=-mint
;;
+ mipsEE* | ee | ps2)
+ basic_machine=mips64r5900el-scei
+ case $os in
+ -linux*)
+ ;;
+ *)
+ os=-elf
+ ;;
+ esac
+ ;;
+ iop)
+ basic_machine=mipsel-scei
+ os=-irx
+ ;;
+ dvp)
+ basic_machine=dvp-scei
+ os=-elf
+ ;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
@@ -696,6 +729,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -803,6 +839,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -859,6 +901,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -1101,7 +1147,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1174,21 +1220,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku*)
+ | -skyos* | -haiku* | -rdos* | -irx*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
diff --git a/admin/ltmain.sh b/admin/ltmain.sh
index 06823e057..8f7a6ac10 100644
--- a/admin/ltmain.sh
+++ b/admin/ltmain.sh
@@ -33,6 +33,9 @@ basename="s,^.*/,,g"
# function.
progpath="$0"
+# define SED for historic ltconfig's generated by Libtool 1.3
+test -z "$SED" && SED=sed
+
# The name of this program:
progname=`echo "$progpath" | $SED $basename`
modename="$progname"
@@ -51,6 +54,13 @@ TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
+# Same for EGREP, and just to be sure, do LTCC as well
+if test "X$EGREP" = X ; then
+ EGREP=egrep
+fi
+if test "X$LTCC" = X ; then
+ LTCC=${CC-gcc}
+fi
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
@@ -137,6 +147,30 @@ preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+if test -z "$max_cmd_len"; then
+ i=0
+ testring="ABCD"
+ new_result=
+
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while (test "X"`$SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
+ = "XX$testring") >/dev/null 2>&1 &&
+ new_result=`expr "X$testring" : ".*" 2>&1` &&
+ max_cmd_len="$new_result" &&
+ test "$i" != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ testring="$testring$testring"
+ done
+ testring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ max_cmd_len=`expr $max_cmd_len \/ 2`
+fi
+
#####################################
# Shell function definitions:
# This seems to be the best place for them
@@ -257,7 +291,21 @@ func_infer_tag ()
esac
CC_quoted="$CC_quoted $arg"
done
+ # user sometimes does CC=<HOST>-gcc so we need to match that to 'gcc'
+ trimedcc=`echo ${CC} | $SED -e "s/${host}-//g"`
+ # and sometimes libtool has CC=<HOST>-gcc but user does CC=gcc
+ extendcc=${host}-${CC}
+ # and sometimes libtool has CC=<OLDHOST>-gcc but user has CC=<NEWHOST>-gcc
+ # (Gentoo-specific hack because we always export $CHOST)
+ mungedcc=${CHOST-${host}}-${trimedcc}
case "$@ " in
+ "cc "* | " cc "* | "${host}-cc "* | " ${host}-cc "*|\
+ "gcc "* | " gcc "* | "${host}-gcc "* | " ${host}-gcc "*)
+ tagname=CC
+ break ;;
+ "$trimedcc "* | " $trimedcc "* | "`$echo $trimedcc` "* | " `$echo $trimedcc` "*|\
+ "$extendcc "* | " $extendcc "* | "`$echo $extendcc` "* | " `$echo $extendcc` "*|\
+ "$mungedcc "* | " $mungedcc "* | "`$echo $mungedcc` "* | " `$echo $mungedcc` "*|\
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
# The compiler in the base compile command matches
# the one in the tagged configuration.
@@ -851,7 +899,7 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$progpath" "$lockfile" 2>/dev/null; do
+ until $run ln "$srcfile" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
@@ -3642,6 +3690,13 @@ EOF
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
+ # It is ok to link against an archive when
+ # building a shared library.
+ if $AR -t $potlib > /dev/null 2>&1; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
| ${SED} 10q \
| $EGREP "$file_magic_regex" > /dev/null; then
@@ -5379,6 +5434,11 @@ else
$echo >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
+
+ # Make sure env LD_LIBRARY_PATH does not mess us up
+ if test -n \"\${LD_LIBRARY_PATH+set}\"; then
+ export LD_LIBRARY_PATH=\$progdir:\$LD_LIBRARY_PATH
+ fi
"
case $host in
# Backslashes separate directories on plain windows
@@ -5606,9 +5666,53 @@ fi\
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
exit $EXIT_FAILURE
fi
- newdependency_libs="$newdependency_libs $libdir/$name"
+ if test "X$EGREP" = X ; then
+ EGREP=egrep
+ fi
+ # We do not want portage's install root ($D) present. Check only for
+ # this if the .la is being installed.
+ if test "$installed" = yes && test "$D"; then
+ eval mynewdependency_lib=`echo "$libdir/$name" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$libdir/$name"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_1=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_1"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
+ ;;
+ *)
+ if test "$installed" = yes; then
+ # Rather use S=WORKDIR if our version of portage supports it.
+ # This is because some ebuild (gcc) do not use $S as buildroot.
+ if test "$PWORKDIR"; then
+ S="$PWORKDIR"
+ fi
+ # We do not want portage's build root ($S) present.
+ my_little_ninja_foo_2=`echo $deplib |$EGREP -e "$S"`
+ # We do not want portage's install root ($D) present.
+ my_little_ninja_foo_3=`echo $deplib |$EGREP -e "$D"`
+ if test -n "$my_little_ninja_foo_2" && test "$S"; then
+ mynewdependency_lib=""
+ elif test -n "$my_little_ninja_foo_3" && test "$D"; then
+ eval mynewdependency_lib=`echo "$deplib" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ else
+ mynewdependency_lib="$deplib"
+ fi
+ # Do not add duplicates
+ if test "$mynewdependency_lib"; then
+ my_little_ninja_foo_4=`echo $newdependency_libs |$EGREP -e "$mynewdependency_lib"`
+ if test -z "$my_little_ninja_foo_4"; then
+ newdependency_libs="$newdependency_libs $mynewdependency_lib"
+ fi
+ fi
;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
esac
done
dependency_libs="$newdependency_libs"
@@ -5660,6 +5764,10 @@ fi\
case $host,$output,$installed,$module,$dlname in
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
+ # Do not add duplicates
+ if test "$installed" = yes && test "$D"; then
+ install_libdir=`echo "$install_libdir" |sed -e "s:$D:/:g" -e 's:/\+:/:g'`
+ fi
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
diff --git a/po/modules/theme/Makefile.am b/po/modules/theme/Makefile.am
index eeee709d8..a4acd9b81 100644
--- a/po/modules/theme/Makefile.am
+++ b/po/modules/theme/Makefile.am
@@ -9,10 +9,10 @@ THISMODULE = theme
tmpdir = $(localedir)
# The *.mo files to generate
-tmp_DATA = theme_it.mo,theme_ru.mo
+tmp_DATA = theme_it.mo
# The *.po files to generate
-POFILES = theme_it.po,theme_ru.po
+POFILES = theme_it.po
###############################################################################
diff --git a/src/config.h.in b/src/config.h.in
index e79ea040e..0608196e3 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -190,31 +190,31 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* The size of `int', as computed by sizeof. */
+/* The size of a `int', as computed by sizeof. */
#undef SIZEOF_INT
-/* The size of `long int', as computed by sizeof. */
+/* The size of a `long int', as computed by sizeof. */
#undef SIZEOF_LONG_INT
-/* The size of `long long int', as computed by sizeof. */
+/* The size of a `long long int', as computed by sizeof. */
#undef SIZEOF_LONG_LONG_INT
-/* The size of `short int', as computed by sizeof. */
+/* The size of a `short int', as computed by sizeof. */
#undef SIZEOF_SHORT_INT
-/* The size of `unsigned int', as computed by sizeof. */
+/* The size of a `unsigned int', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_INT
-/* The size of `unsigned long int', as computed by sizeof. */
+/* The size of a `unsigned long int', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG_INT
-/* The size of `unsigned long long int', as computed by sizeof. */
+/* The size of a `unsigned long long int', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_LONG_LONG_INT
-/* The size of `unsigned short int', as computed by sizeof. */
+/* The size of a `unsigned short int', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_SHORT_INT
-/* The size of `void *', as computed by sizeof. */
+/* The size of a `void *', as computed by sizeof. */
#undef SIZEOF_VOID_P
/* Define to 1 if you have the ANSI C header files. */
diff --git a/src/kvi_configstatus.h b/src/kvi_configstatus.h
index f5ecf59a2..72e93f949 100644
--- a/src/kvi_configstatus.h
+++ b/src/kvi_configstatus.h
@@ -8,7 +8,7 @@
/* #undef BIG_ENDIAN_MACHINE_BYTE_ORDER */
/* this is the build date (configure date rather) */
-#define BUILD_DATE "Sat Feb 3 03:34:24 UTC 2007"
+#define BUILD_DATE "Fri Feb 9 03:55:03 UTC 2007"
/* these are the build flags */
#define BUILD_FLAGS "x86_64-cefgikopsAGTZ"
diff --git a/src/kvilib/build/Makefile.am b/src/kvilib/build/Makefile.am
index 250de5317..1f7417c84 100644
--- a/src/kvilib/build/Makefile.am
+++ b/src/kvilib/build/Makefile.am
@@ -91,10 +91,13 @@ libkvilib_la_SOURCES = \
../tal/kvi_tal_menubar.cpp \
../tal/kvi_tal_popupmenu.cpp \
../tal/kvi_tal_scrollview.cpp \
+ ../tal/kvi_tal_tabdialog.cpp \
+ ../tal/kvi_tal_textedit.cpp \
../tal/kvi_tal_toolbar.cpp \
../tal/kvi_tal_tooltip.cpp \
../tal/kvi_tal_vbox.cpp \
- ../tal/kvi_tal_widgetstack.cpp
+ ../tal/kvi_tal_widgetstack.cpp \
+ ../tal/kvi_tal_wizard.cpp
#
# Command useful to find out all the headers
@@ -215,6 +218,12 @@ headers_HEADERS = \
../tal/kvi_tal_scrollview.h \
../tal/kvi_tal_scrollview_qt3.h \
../tal/kvi_tal_scrollview_qt4.h \
+ ../tal/kvi_tal_tabdialog.h \
+ ../tal/kvi_tal_tabdialog_qt3.h \
+ ../tal/kvi_tal_tabdialog_qt4.h \
+ ../tal/kvi_tal_textedit.h \
+ ../tal/kvi_tal_textedit_qt3.h \
+ ../tal/kvi_tal_textedit_qt4.h \
../tal/kvi_tal_toolbar.h \
../tal/kvi_tal_toolbar_kde.h \
../tal/kvi_tal_toolbar_qt3.h \
@@ -227,6 +236,9 @@ headers_HEADERS = \
../tal/kvi_tal_widgetstack.h \
../tal/kvi_tal_widgetstack_qt3.h \
../tal/kvi_tal_widgetstack_qt4.h \
+ ../tal/kvi_tal_wizard.h \
+ ../tal/kvi_tal_wizard_qt3.h \
+ ../tal/kvi_tal_wizard_qt4.h \
../tal/kvi_tal_windowstate.h
@@ -276,8 +288,6 @@ headers_HEADERS = \
../tal/kvi_tal_hbox.cpp: ../tal/kvi_tal_hbox_qt4.moc
../tal/kvi_tal_vbox.cpp: ../tal/kvi_tal_vbox_qt3.moc
../tal/kvi_tal_vbox.cpp: ../tal/kvi_tal_vbox_qt4.moc
-../tal/kvi_tal_widgetstack.cpp: ../tal/kvi_tal_widgetstack_qt3.moc
-../tal/kvi_tal_widgetstack.cpp: ../tal/kvi_tal_widgetstack_qt4.moc
../tal/kvi_tal_popupmenu.cpp: ../tal/kvi_tal_popupmenu_qt3.moc
../tal/kvi_tal_popupmenu.cpp: ../tal/kvi_tal_popupmenu_qt4.moc
../tal/kvi_tal_listview.cpp: ../tal/kvi_tal_listview_qt3.moc
@@ -288,9 +298,17 @@ headers_HEADERS = \
../tal/kvi_tal_iconview.cpp: ../tal/kvi_tal_iconview_qt4.moc
../tal/kvi_tal_scrollview.cpp: ../tal/kvi_tal_scrollview_qt3.moc
../tal/kvi_tal_scrollview.cpp: ../tal/kvi_tal_scrollview_qt4.moc
+../tal/kvi_tal_tabdialog.cpp: ../tal/kvi_tal_tabdialog_qt3.moc
+../tal/kvi_tal_tabdialog.cpp: ../tal/kvi_tal_tabdialog_qt4.moc
+../tal/kvi_tal_textedit.cpp: ../tal/kvi_tal_textedit_qt3.moc
+../tal/kvi_tal_textedit.cpp: ../tal/kvi_tal_textedit_qt4.moc
../tal/kvi_tal_toolbar.cpp: ../tal/kvi_tal_toolbar_qt3.moc
../tal/kvi_tal_toolbar.cpp: ../tal/kvi_tal_toolbar_qt4.moc
../tal/kvi_tal_toolbar.cpp: ../tal/kvi_tal_toolbar_kde.moc
+../tal/kvi_tal_widgetstack.cpp: ../tal/kvi_tal_widgetstack_qt3.moc
+../tal/kvi_tal_widgetstack.cpp: ../tal/kvi_tal_widgetstack_qt4.moc
+../tal/kvi_tal_wizard.cpp: ../tal/kvi_tal_wizard_qt3.moc
+../tal/kvi_tal_wizard.cpp: ../tal/kvi_tal_wizard_qt4.moc
#
diff --git a/src/kvilib/tal/kvi_tal_tabdialog.cpp b/src/kvilib/tal/kvi_tal_tabdialog.cpp
new file mode 100644
index 000000000..ea5f09b6a
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_tabdialog.cpp
@@ -0,0 +1,34 @@
+//=============================================================================
+//
+// File : kvi_tal_tabdialog.cpp
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#define __KVILIB__
+#include "kvi_tal_tabdialog.h"
+
+
+#ifdef COMPILE_USE_QT4
+ #include "kvi_tal_tabdialog_qt4.moc"
+#else
+ #include "kvi_tal_tabdialog_qt3.moc"
+#endif
+
diff --git a/src/kvilib/tal/kvi_tal_tabdialog.h b/src/kvilib/tal/kvi_tal_tabdialog.h
new file mode 100644
index 000000000..2372bf63c
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_tabdialog.h
@@ -0,0 +1,36 @@
+#ifndef _KVI_TAL_TABDIALOG_H_
+#define _KVI_TAL_TABDIALOG_H_
+
+//=============================================================================
+//
+// File : kvi_tal_tabdialog.h
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#include "kvi_settings.h"
+
+#ifdef COMPILE_USE_QT4
+ #include "kvi_tal_tabdialog_qt4.h"
+#else
+ #include "kvi_tal_tabdialog_qt3.h"
+#endif
+
+#endif // _KVI_TAL_TABDIALOG_H_
diff --git a/src/kvilib/tal/kvi_tal_tabdialog_qt3.h b/src/kvilib/tal/kvi_tal_tabdialog_qt3.h
new file mode 100644
index 000000000..3941c99ff
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_tabdialog_qt3.h
@@ -0,0 +1,39 @@
+#ifndef _KVI_TAL_TABDIALOG_QT3_H_
+#define _KVI_TAL_TABDIALOG_QT3_H_
+
+//=============================================================================
+//
+// File : kvi_tal_tabdialog_qt3.h
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#include <qtabdialog.h>
+
+class KVILIB_API KviTalTabDialog : public QTabDialog
+{
+ Q_OBJECT
+public:
+ KviTalTabDialog(QWidget * pParent = 0,const char * name = 0,bool bModal = false)
+ : QTabDialog(pParent,name,bModal) {};
+ ~KviTalTabDialog() {};
+};
+
+#endif // _KVI_TAL_TABDIALOG_QT3_H_
diff --git a/src/kvilib/tal/kvi_tal_tabdialog_qt4.h b/src/kvilib/tal/kvi_tal_tabdialog_qt4.h
new file mode 100644
index 000000000..4862596a3
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_tabdialog_qt4.h
@@ -0,0 +1,39 @@
+#ifndef _KVI_TAL_TABDIALOG_QT4_H_
+#define _KVI_TAL_TABDIALOG_QT4_H_
+
+//=============================================================================
+//
+// File : kvi_tal_tabdialog_qt4.h
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#include <q3tabdialog.h>
+
+class KVILIB_API KviTalTabDialog : public Q3TabDialog
+{
+ Q_OBJECT
+public:
+ KviTalTabDialog(QWidget * pParent = 0,const char * name = 0,bool bModal = false)
+ : Q3TabDialog(pParent,name,bModal) {};
+ ~KviTalTabDialog() {};
+};
+
+#endif // _KVI_TAL_TABDIALOG_QT3_H_
diff --git a/src/kvilib/tal/kvi_tal_textedit.cpp b/src/kvilib/tal/kvi_tal_textedit.cpp
new file mode 100644
index 000000000..4ee16dcb2
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_textedit.cpp
@@ -0,0 +1,34 @@
+//=============================================================================
+//
+// File : kvi_tal_textedit.cpp
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#define __KVILIB__
+#include "kvi_tal_textedit.h"
+
+
+#ifdef COMPILE_USE_QT4
+ #include "kvi_tal_textedit_qt4.moc"
+#else
+ #include "kvi_tal_textedit_qt3.moc"
+#endif
+
diff --git a/src/kvilib/tal/kvi_tal_textedit.h b/src/kvilib/tal/kvi_tal_textedit.h
new file mode 100644
index 000000000..c3c904516
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_textedit.h
@@ -0,0 +1,36 @@
+#ifndef _KVI_TAL_TEXTEDIT_H_
+#define _KVI_TAL_TEXTEDIT_H_
+
+//=============================================================================
+//
+// File : kvi_tal_textedit.h
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#include "kvi_settings.h"
+
+#ifdef COMPILE_USE_QT4
+ #include "kvi_tal_textedit_qt4.h"
+#else
+ #include "kvi_tal_textedit_qt3.h"
+#endif
+
+#endif // _KVI_TAL_TEXTEDIT_H_
diff --git a/src/kvilib/tal/kvi_tal_textedit_qt3.h b/src/kvilib/tal/kvi_tal_textedit_qt3.h
new file mode 100644
index 000000000..ca5d2dfb0
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_textedit_qt3.h
@@ -0,0 +1,39 @@
+#ifndef _KVI_TAL_TEXTEDIT_QT3_H_
+#define _KVI_TAL_TEXTEDIT_QT3_H_
+
+//=============================================================================
+//
+// File : kvi_tal_textedit_qt3.h
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#include <qtextedit.h>
+
+class KVILIB_API KviTalTextEdit : public QTextEdit
+{
+ Q_OBJECT
+public:
+ KviTalTextEdit(QWidget * pParent = 0,const char * name = 0)
+ : QTextEdit(pParent,name) {};
+ ~KviTalTextEdit() {};
+};
+
+#endif // _KVI_TAL_TEXTEDIT_QT3_H_
diff --git a/src/kvilib/tal/kvi_tal_textedit_qt4.h b/src/kvilib/tal/kvi_tal_textedit_qt4.h
new file mode 100644
index 000000000..22c3a76d2
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_textedit_qt4.h
@@ -0,0 +1,39 @@
+#ifndef _KVI_TAL_TEXTEDIT_QT4_H_
+#define _KVI_TAL_TEXTEDIT_QT4_H_
+
+//=============================================================================
+//
+// File : kvi_tal_textedit_qt4.h
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#include <q3textedit.h>
+
+class KVILIB_API KviTalTextEdit : public Q3TextEdit
+{
+ Q_OBJECT
+public:
+ KviTalTextEdit(QWidget * pParent = 0,const char * name = 0)
+ : Q3TextEdit(pParent,name) {};
+ ~KviTalTextEdit() {};
+};
+
+#endif // _KVI_TAL_TEXTEDIT_QT4_H_
diff --git a/src/kvilib/tal/kvi_tal_wizard.cpp b/src/kvilib/tal/kvi_tal_wizard.cpp
new file mode 100644
index 000000000..6ab9e84f0
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_wizard.cpp
@@ -0,0 +1,34 @@
+//=============================================================================
+//
+// File : kvi_tal_wizard.cpp
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#define __KVILIB__
+#include "kvi_tal_wizard.h"
+
+
+#ifdef COMPILE_USE_QT4
+ #include "kvi_tal_wizard_qt4.moc"
+#else
+ #include "kvi_tal_wizard_qt3.moc"
+#endif
+
diff --git a/src/kvilib/tal/kvi_tal_wizard.h b/src/kvilib/tal/kvi_tal_wizard.h
new file mode 100644
index 000000000..c0121d625
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_wizard.h
@@ -0,0 +1,36 @@
+#ifndef _KVI_TAL_WIZARD_H_
+#define _KVI_TAL_WIZARD_H_
+
+//=============================================================================
+//
+// File : kvi_tal_wizard.h
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#include "kvi_settings.h"
+
+#ifdef COMPILE_USE_QT4
+ #include "kvi_tal_wizard_qt4.h"
+#else
+ #include "kvi_tal_wizard_qt3.h"
+#endif
+
+#endif // _KVI_TAL_WIZARD_H_
diff --git a/src/kvilib/tal/kvi_tal_wizard_qt3.h b/src/kvilib/tal/kvi_tal_wizard_qt3.h
new file mode 100644
index 000000000..aa8736a5a
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_wizard_qt3.h
@@ -0,0 +1,39 @@
+#ifndef _KVI_TAL_WIZARD_QT3_H_
+#define _KVI_TAL_WIZARD_QT3_H_
+
+//=============================================================================
+//
+// File : kvi_tal_wizard_qt3.h
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#include <qwizard.h>
+
+class KVILIB_API KviTalWizard : public QWizard
+{
+ Q_OBJECT
+public:
+ KviTalWizard(QWidget * pParent = 0,const char * name = 0,bool bModal = false)
+ : QWizard(pParent,name,bModal) {};
+ ~KviTalWizard() {};
+};
+
+#endif // _KVI_TAL_WIZARD_QT3_H_
diff --git a/src/kvilib/tal/kvi_tal_wizard_qt4.h b/src/kvilib/tal/kvi_tal_wizard_qt4.h
new file mode 100644
index 000000000..aa2ef093c
--- /dev/null
+++ b/src/kvilib/tal/kvi_tal_wizard_qt4.h
@@ -0,0 +1,39 @@
+#ifndef _KVI_TAL_WIZARD_QT4_H_
+#define _KVI_TAL_WIZARD_QT4_H_
+
+//=============================================================================
+//
+// File : kvi_tal_wizard_qt4.h
+// Creation date : Tue Feb 06 2007 14:35:08 by Szymon Stefanek
+//
+// This file is part of the KVirc irc client distribution
+// Copyright (C) 2007 Szymon Stefanek (pragma at kvirc dot net)
+//
+// This program is FREE software. You can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your opinion) any later version.
+//
+// This program is distributed in the HOPE that it will be USEFUL,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+// See the GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, write to the Free Software Foundation,
+// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+//
+//=============================================================================
+
+#include <q3wizard.h>
+
+class KVILIB_API KviTalWizard : public Q3Wizard
+{
+ Q_OBJECT
+public:
+ KviTalWizard(QWidget * pParent = 0,const char * name = 0,bool bModal = false)
+ : Q3Wizard(pParent,name,bModal) {};
+ ~KviTalWizard() {};
+};
+
+#endif // _KVI_TAL_WIZARD_QT4_H_
diff --git a/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp b/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp
index ffd1c53e4..849f9e510 100644
--- a/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp
+++ b/src/kvirc/kvs/kvi_kvs_corefunctions_gl.cpp
@@ -888,7 +888,7 @@ namespace KviKvsCoreFunctions
<string> $k(<foreground:integer>[,<background:integer>])
<string> $k
@description:
- Returns the COLOR mIRC control character (CTRL+K).[br]
+ Returns the COLOR mIRC control character (Qt::CTRL+K).[br]
If <foreground> and <background> are passed, a standard mIRC
color escape is returned.[br]
@seealso:
diff --git a/src/kvirc/ui/kvi_console.cpp b/src/kvirc/ui/kvi_console.cpp
index 90af7bc5d..55e7f4bff 100644
--- a/src/kvirc/ui/kvi_console.cpp
+++ b/src/kvirc/ui/kvi_console.cpp
@@ -122,7 +122,8 @@ KviConsole::KviConsole(KviFrame * lpFrm,int iFlags)
}
m_pButtonBox = new KviTalHBox(this);
- m_pButtonBox->setSpacing(5);
+ m_pButtonBox->setSpacing(0);
+ m_pButtonBox->setMargin(0);
new QLabel(__tr2qs("Address:"),m_pButtonBox,"url_label");
m_pAddressEdit = new QComboBox(m_pButtonBox,"url_editor");
m_pAddressEdit->setAutoCompletion(true);
diff --git a/src/kvirc/ui/kvi_cryptcontroller.cpp b/src/kvirc/ui/kvi_cryptcontroller.cpp
index 578ff5503..941355b69 100644
--- a/src/kvirc/ui/kvi_cryptcontroller.cpp
+++ b/src/kvirc/ui/kvi_cryptcontroller.cpp
@@ -109,7 +109,7 @@
#ifdef COMPILE_USE_QT4
m_pDescriptionLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft);
#else
- m_pDescriptionLabel->setAlignment(AlignTop | AlignLeft);
+ m_pDescriptionLabel->setAlignment(Qt::AlignTop | Qt::AlignLeft);
#endif
g->addMultiCellWidget(m_pDescriptionLabel,3,3,1,3);
diff --git a/src/kvirc/ui/kvi_frame.cpp b/src/kvirc/ui/kvi_frame.cpp
index 609d67628..6df95e5db 100644
--- a/src/kvirc/ui/kvi_frame.cpp
+++ b/src/kvirc/ui/kvi_frame.cpp
@@ -415,51 +415,51 @@ void KviFrame::accelActivated(int id)
case (Qt::Key_Right+Qt::ALT+Qt::SHIFT): switchToNextWindowInContext(); break;
case (Qt::Key_F4+Qt::CTRL): if(g_pActiveWindow)g_pActiveWindow->close(); break;
case (Qt::Key_F1): g_pApp->contextSensitiveHelp(); break;
-/* case(Key_F1 + SHIFT):
+/* case(Qt::Key_F1 + SHIFT):
item = m_pTaskBar->item(0);
if(item) setActiveWindow(item->window());
break;
- case(Key_F2 + SHIFT):
+ case(Qt::Key_F2 + SHIFT):
item = m_pTaskBar->item(1);
if(item) setActiveWindow(item->window());
break;
- case(Key_F3 + SHIFT):
+ case(Qt::Key_F3 + SHIFT):
item = m_pTaskBar->item(2);
if(item) setActiveWindow(item->window());
break;
- case(Key_F4 + SHIFT):
+ case(Qt::Key_F4 + SHIFT):
item = m_pTaskBar->item(3);
if(item) setActiveWindow(item->window());
break;
- case(Key_F5 + SHIFT):
+ case(Qt::Key_F5 + SHIFT):
item = m_pTaskBar->item(4);
if(item) setActiveWindow(item->window());
break;
- case(Key_F6 + SHIFT):
+ case(Qt::Key_F6 + SHIFT):
item = m_pTaskBar->item(5);
if(item) setActiveWindow(item->window());
break;
- case(Key_F7 + SHIFT):
+ case(Qt::Key_F7 + SHIFT):
item = m_pTaskBar->item(6);
if(item) setActiveWindow(item->window());
break;
- case(Key_F8 + SHIFT):
+ case(Qt::Key_F8 + SHIFT):
item = m_pTaskBar->item(7);
if(item) setActiveWindow(item->window());
break;
- case(Key_F9 + SHIFT):
+ case(Qt::Key_F9 + SHIFT):
item = m_pTaskBar->item(8);
if(item) setActiveWindow(item->window());
break;
- case(Key_F10 + SHIFT):
+ case(Qt::Key_F10 + SHIFT):
item = m_pTaskBar->item(9);
if(item) setActiveWindow(item->window());
break;
- case(Key_F11 + SHIFT):
+ case(Qt::Key_F11 + SHIFT):
item = m_pTaskBar->item(10);
if(item) setActiveWindow(item->window());
break;
- case(Key_F12 + SHIFT):
+ case(Qt::Key_F12 + SHIFT):
item = m_pTaskBar->item(11);
if(item) setActiveWindow(item->window());
break;*/
diff --git a/src/kvirc/ui/kvi_htmldialog.cpp b/src/kvirc/ui/kvi_htmldialog.cpp
index 671c4de63..2f36247fe 100644
--- a/src/kvirc/ui/kvi_htmldialog.cpp
+++ b/src/kvirc/ui/kvi_htmldialog.cpp
@@ -25,9 +25,9 @@
#include "kvi_htmldialog.h"
#include "kvi_locale.h"
+#include "kvi_tal_textedit.h"
#include <qlabel.h>
-#include <qtextbrowser.h>
#include <qpushbutton.h>
#include <qlayout.h>
@@ -47,7 +47,7 @@ KviHtmlDialog::KviHtmlDialog(QWidget * pParent,KviHtmlDialogData * pData)
QGridLayout * g = new QGridLayout(this,4,3,7,7);
QLabel * l;
- QTextEdit * te;
+ KviTalTextEdit * te;
QPushButton * pb;
int iUp = 0;
@@ -69,7 +69,7 @@ KviHtmlDialog::KviHtmlDialog(QWidget * pParent,KviHtmlDialogData * pData)
iDown = 1;
}
- te = new QTextBrowser(this);
+ te = new KviTalTextEdit(this);
te->setText(pData->szHtmlText);
if(pData->iFlags & KviHtmlDialogData::ForceMinimumSize)
diff --git a/src/kvirc/ui/kvi_input.cpp b/src/kvirc/ui/kvi_input.cpp
index b4d03e945..37ddcb4ed 100644
--- a/src/kvirc/ui/kvi_input.cpp
+++ b/src/kvirc/ui/kvi_input.cpp
@@ -203,10 +203,12 @@ KviInputEditor::KviInputEditor(QWidget * par,KviWindow *wnd,KviUserListView * vi
m_bReadOnly = FALSE;
setInputMethodEnabled(true);
- setBackgroundMode(Qt::NoBackground);
+
#ifdef COMPILE_USE_QT4
+ setAutoFillBackground(false);
setFocusPolicy(Qt::StrongFocus);
#else
+ setBackgroundMode(Qt::NoBackground);
setFocusPolicy(QWidget::StrongFocus);
#endif
setAcceptDrops(true);
@@ -324,6 +326,15 @@ QSize KviInputEditor::sizeHint() const
#define KVI_INPUT_DEF_BACK 100
#define KVI_INPUT_DEF_FORE 101
+#ifdef COMPILE_USE_QT4
+void KviInputEditor::paintEvent(QPaintEvent *e)
+{
+ QPainter p(this);
+ drawFrame(&p);
+ drawContents(&p);
+}
+#endif
+
void KviInputEditor::drawContents(QPainter *p)
{
if(!isVisible())return;
@@ -353,8 +364,6 @@ void KviInputEditor::drawContents(QPainter *p)
}
#endif
-
-
pa.setFont(KVI_OPTION_FONT(KviOption_fontInput));
QFontMetrics fm(pa.fontMetrics());
@@ -506,7 +515,11 @@ void KviInputEditor::drawContents(QPainter *p)
while(m_iBlockLen < m_iCursorPosition)
{
QChar c = m_szTextBuffer.at(m_iBlockLen);
+#ifdef COMPILE_USE_QT4
+ m_iLastCursorXPosition+= fm.width(c);
+#else
m_iLastCursorXPosition+= (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c);
+#endif
m_iBlockLen++;
}
@@ -520,8 +533,12 @@ void KviInputEditor::drawContents(QPainter *p)
pa.setPen(KVI_OPTION_COLOR(KviOption_colorInputForeground));
}
+#ifdef COMPILE_USE_QT4
+ // The other version of drawPixmap seems to be buggy
+ p->drawPixmap(rect.x(),rect.y(),rect.width(),rect.height(),*pDoubleBufferPixmap,0,0,widgetWidth,widgetHeight);
+#else
p->drawPixmap(rect.x(),rect.y(),*pDoubleBufferPixmap,0,0,widgetWidth,widgetHeight);
-
+#endif
}
void KviInputEditor::drawTextBlock(QPainter * pa,QFontMetrics & fm,int curXPos,int textBaseline,int charIdx,int len,bool bSelected)
@@ -620,7 +637,11 @@ void KviInputEditor::extractNextBlock(int idx,QFontMetrics & fm,int curXPos,int
(c != QChar(KVI_TEXT_ICON))))
{
m_iBlockLen++;
+#ifdef COMPILE_USE_QT4
+ int xxx = fm.width(c);
+#else
int xxx = (c.unicode() < 256 ? g_iInputFontCharWidth[c.unicode()] : fm.width(c));
+#endif
m_iBlockWidth +=xxx;
curXPos +=xxx;
idx++;
@@ -1517,7 +1538,7 @@ void KviInputEditor::keyPressEvent(QKeyEvent *e)
if((e->state() & Qt::AltButton) && (e->state() & Qt::Keypad))
{
- // Qt::Key_Meta seems to substitute Key_Alt on some keyboards
+ // Qt::Key_Meta seems to substitute Qt::Key_Alt on some keyboards
if((e->key() == Qt::Key_Alt) || (e->key() == Qt::Key_Meta))
{
m_szAltKeyCode = "";
@@ -2041,11 +2062,19 @@ void KviInputEditor::moveRightFirstVisibleCharToShowCursor()
QChar c = m_szTextBuffer.at(m_iCursorPosition);
+#ifdef COMPILE_USE_QT4
+ m_iLastCursorXPosition += fm.width(c);
+#else
m_iLastCursorXPosition += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c);
+#endif
while(m_iLastCursorXPosition >= contentsRect().width()-2*KVI_INPUT_MARGIN)
{
c = m_szTextBuffer.at(m_iFirstVisibleChar);
+#ifdef COMPILE_USE_QT4
+ m_iLastCursorXPosition -= fm.width(c);
+#else
m_iLastCursorXPosition -= (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c);
+#endif
m_iFirstVisibleChar++;
}
}
@@ -2076,7 +2105,11 @@ int KviInputEditor::charIndexFromXPosition(int xPos)
while(curChar < bufLen)
{
QChar c = m_szTextBuffer.at(curChar);
+#ifdef COMPILE_USE_QT4
+ int widthCh = fm.width(c);
+#else
int widthCh = (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c);
+#endif
if(xPos < (curXPos+(widthCh/2)))return curChar;
else if(xPos < (curXPos+widthCh))return (curChar+1);
{
@@ -2096,7 +2129,11 @@ int KviInputEditor::xPositionFromCharIndex(int chIdx,bool bContentsCoords)
while(curChar < chIdx)
{
QChar c = m_szTextBuffer.at(curChar);
+#ifdef COMPILE_USE_QT4
+ curXPos += fm.width(c);
+#else
curXPos += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c);
+#endif
curChar++;
}
return curXPos;
@@ -2234,10 +2271,13 @@ int KviInputEditor::xPositionFromCharIndex(int chIdx,bool bContentsCoords)
KviInput::KviInput(KviWindow *par,KviUserListView * view)
: QWidget(par,"input")
{
-
QBoxLayout* pLayout=new QHBoxLayout(this);
- pLayout->setAutoAdd( TRUE );
+ pLayout->setAutoAdd(true);
pLayout->setDirection(QBoxLayout::RightToLeft);
+
+ pLayout->setMargin(0);
+ pLayout->setSpacing(0);
+
m_pWindow = par;
m_pMultiLineEditor = 0;
@@ -2252,7 +2292,14 @@ KviInput::KviInput(KviWindow *par,KviUserListView * view)
connect(m_pHideToolsButton,SIGNAL(clicked()),this,SLOT(toggleToolButtons()));
m_pButtonContainer=new KviTalHBox(this);
-
+ m_pButtonContainer->setSpacing(0);
+
+#ifdef COMPILE_USE_QT4
+ m_pButtonContainer->setSizePolicy(QSizePolicy(QSizePolicy::Minimum,QSizePolicy::Preferred));
+// if(m_pButtonContainer->layout())
+// m_pButtonContainer->layout()->setSizeConstraint(QLayout::SetMinimumSize);
+#endif
+
m_pHistoryButton = new KviStyledToolButton(m_pButtonContainer,"historybutton");
m_pHistoryButton->setUsesBigPixmap(false);
//m_pHistoryButton->setUpdatesEnabled(TRUE); ???
@@ -2306,7 +2353,15 @@ KviInput::KviInput(KviWindow *par,KviUserListView * view)
m_pInputEditor = new KviInputEditor(this,par,view);
connect(m_pInputEditor,SIGNAL(enterPressed()),this,SLOT(inputEditorEnterPressed()));
+#ifdef COMPILE_USE_QT4
+ m_pInputEditor->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Ignored));
+#else
m_pInputEditor->setSizePolicy(QSizePolicy(QSizePolicy::Ignored,QSizePolicy::Ignored));
+#endif
+
+ pLayout->setStretchFactor(m_pInputEditor,100000);
+ pLayout->setStretchFactor(m_pButtonContainer,0);
+ pLayout->setStretchFactor(m_pHideToolsButton,0);
}
KviInput::~KviInput()
diff --git a/src/kvirc/ui/kvi_input.h b/src/kvirc/ui/kvi_input.h
index e9c879c43..412f2ddd2 100644
--- a/src/kvirc/ui/kvi_input.h
+++ b/src/kvirc/ui/kvi_input.h
@@ -207,6 +207,9 @@ protected:
virtual void imStartEvent(QIMEvent *e);
virtual void imComposeEvent(QIMEvent *e);
virtual void imEndEvent(QIMEvent *e);
+#ifdef COMPILE_USE_QT4
+ virtual void paintEvent(QPaintEvent *e);
+#endif
};
class KviScriptEditor;
diff --git a/src/kvirc/ui/kvi_ircview.cpp b/src/kvirc/ui/kvi_ircview.cpp
index 47a2ebe4d..6a920ee7d 100644
--- a/src/kvirc/ui/kvi_ircview.cpp
+++ b/src/kvirc/ui/kvi_ircview.cpp
@@ -351,7 +351,7 @@ KviIrcView::KviIrcView(QWidget *parent,KviFrame *pFrm,KviWindow *pWnd)
setBackgroundMode(NoBackground);
#endif
- m_pFm = new QFontMetrics(font());
+ m_pFm = 0; // will be updated in the first paint event
m_pToolTip = new KviIrcViewToolTip(this);
@@ -438,7 +438,7 @@ KviIrcView::~KviIrcView()
delete_text_line(l);
}
delete m_pMessagesStoppedWhileSelecting;
- delete m_pFm;
+ if(m_pFm)delete m_pFm;
delete m_pToolTip;
delete m_pWrappedBlockSelectionInfo;
}
@@ -451,15 +451,20 @@ KviIrcView::~KviIrcView()
void KviIrcView::setFont(const QFont &f)
{
- QWidget::setFont(f);
- recalcFontVariables(f);
+ if(m_pFm)
+ {
+ // force an update to the font variables
+ delete m_pFm;
+ m_pFm = 0;
+ }
KviIrcViewLine * l = m_pFirstLine;
while(l)
{
l->iMaxLineWidth = -1;
l = l->pNext;
}
- paintEvent(0);
+ QWidget::setFont(f);
+ paintEvent(0); // will force an update to the font variables
}
void KviIrcView::applyOptions()
@@ -469,7 +474,7 @@ void KviIrcView::applyOptions()
if(m_iFlushTimer) killTimer(m_iFlushTimer);
if(KVI_OPTION_UINT(KviOption_uintAutoFlushLogs))
{
- m_iFlushTimer= startTimer(KVI_OPTION_UINT(KviOption_uintAutoFlushLogs)*60*1000);
+ m_iFlushTimer = startTimer(KVI_OPTION_UINT(KviOption_uintAutoFlushLogs)*60*1000);
}
}
@@ -2758,7 +2763,7 @@ void KviIrcView::paintEvent(QPaintEvent *p)
} else {
// A self triggered event
m_iUnprocessedPaintEventRequests = 0; // only full repaints reset
- r = rect();
+ r = rect();
}
int rectLeft = r.x();
@@ -2773,6 +2778,15 @@ void KviIrcView::paintEvent(QPaintEvent *p)
QPainter pa(pDoubleBufferPixmap);
+ pa.setFont(font());
+ if(!m_pFm)
+ {
+ // note that QFontMetrics(pa.font()) may be not the same as QFontMetrics(font())
+ // because the painter might effectively use an approximation of the QFont specified
+ // by font().
+ recalcFontVariables(QFontMetrics(pa.font()),pa.fontInfo());
+ }
+
#ifdef COMPILE_PSEUDO_TRANSPARENCY
if(g_pShadedChildGlobalDesktopBackground)
{
@@ -2792,9 +2806,6 @@ void KviIrcView::paintEvent(QPaintEvent *p)
}
#endif
-
- pa.setFont(font());
-
//Have lines visible
int curBottomCoord = widgetHeight - KVI_IRCVIEW_VERTICAL_BORDER;
int maxLineWidth = widgetWidth;
@@ -2887,10 +2898,8 @@ void KviIrcView::paintEvent(QPaintEvent *p)
// (May correspond to more physical lines on the display if the text is wrapped)
//
-
for(int i=0;i < pCurTextLine->iBlockCount;i++)
{
-
register KviIrcViewWrappedBlock * block = &(pCurTextLine->pBlocks[i]);
// Play with the attributes
@@ -3756,11 +3765,11 @@ bool KviIrcView::checkSelectionBlock(KviIrcViewLine * line,int left,int bottom,i
//============ recalcFontVariables ==============//
-void KviIrcView::recalcFontVariables(const QFont &fnt)
+void KviIrcView::recalcFontVariables(const QFontMetrics &fm,const QFontInfo &fi)
{
// FIXME: #warning "OPTIMIZE THIS: GLOBAL VARIABLES"
- delete m_pFm;
- m_pFm = new QFontMetrics(fnt);
+ if(m_pFm)delete m_pFm;
+ m_pFm = new QFontMetrics(fm);
m_iFontLineSpacing = m_pFm->lineSpacing();
if(m_iFontLineSpacing < KVI_IRCVIEW_PIXMAP_SIZE && KVI_OPTION_BOOL(KviOption_boolIrcViewShowImages))
{
@@ -3769,7 +3778,10 @@ void KviIrcView::recalcFontVariables(const QFont &fnt)
m_iFontDescent =m_pFm->descent();
m_iFontLineWidth =m_pFm->lineWidth();
// cache the first 256 characters
- for(unsigned short i=0;i<256;i++)m_iFontCharacterWidth[i]=m_pFm->width(QChar(i));
+ for(unsigned short i=0;i<256;i++)
+ {
+ m_iFontCharacterWidth[i]=m_pFm->width(QChar(i));
+ }
if(m_iFontLineWidth==0)m_iFontLineWidth=1;
m_iWrapMargin = m_pFm->width("wwww");
//for(int i=0;i<256;i++)m_iFontCharacterWidth[i]=fm.width((char)i);
@@ -3777,7 +3789,6 @@ void KviIrcView::recalcFontVariables(const QFont &fnt)
m_iRelativePixmapY = (m_iFontLineSpacing + KVI_IRCVIEW_PIXMAP_SIZE) >> 1;
m_iIconWidth = m_pFm->width("w");
- QFontInfo fi(fnt);
if(fi.fixedPitch() && (m_iIconWidth > 0))
{
while(m_iIconWidth < 18)m_iIconWidth += m_iIconWidth;
diff --git a/src/kvirc/ui/kvi_ircview.h b/src/kvirc/ui/kvi_ircview.h
index 6a4566a1a..c344e42b6 100644
--- a/src/kvirc/ui/kvi_ircview.h
+++ b/src/kvirc/ui/kvi_ircview.h
@@ -118,7 +118,7 @@ private:
bool m_bSkipScrollBarRepaint;
int m_iSelectTimer;
- int m_iMouseTimer;
+ int m_iMouseTimer;
//int m_iTipTimer;
QString m_szLastSelection;
QString m_szLastSelectionLine;
@@ -131,9 +131,9 @@ private:
bool m_bPostedPaintEventPending;
KviPtrList<KviIrcViewLine> * m_pMessagesStoppedWhileSelecting;
KviIrcView * m_pMasterView;
- QFontMetrics * m_pFm;
+ QFontMetrics * m_pFm; // assume this valid only inside a paint event (may be 0 in other circumstances)
- QMouseEvent * m_pLastEvent;
+ QMouseEvent * m_pLastEvent;
KviIrcViewToolTip * m_pToolTip;
bool m_bHaveUnreadedHighlightedMessages;
@@ -205,14 +205,13 @@ signals:
private:
void setCursorLine(KviIrcViewLine * l);
KviIrcViewLine * getVisibleLineAt(int xPos,int yPos);
-// void findClosestPositionInText(int xCursorPos,int yCursorPos,KviIrcViewPositionInText &pos);
void getLinkEscapeCommand(QString &buffer,const QString &escape_cmd,const QString &escape_label);
void appendLine(KviIrcViewLine *ptr,bool bRepaint);
void postUpdateEvent();
void fastScroll(int lines = 1);
const kvi_wchar_t * getTextLine(int msg_type,const kvi_wchar_t * data_ptr,KviIrcViewLine *line_ptr,bool bEnableTimeStamp = true);
void calculateLineWraps(KviIrcViewLine *ptr,int maxWidth);
- void recalcFontVariables(const QFont &font);
+ void recalcFontVariables(const QFontMetrics &fm,const QFontInfo &fi);
bool checkSelectionBlock(KviIrcViewLine * line,int left,int bottom,int bufIndex);
void calculateSelectionBounds();
KviIrcViewWrappedBlock * getLinkUnderMouse(int xPos,int yPos,QRect * pRect = 0,QString * linkCmd = 0,QString * linkText = 0);
diff --git a/src/kvirc/ui/kvi_mdicaption.cpp b/src/kvirc/ui/kvi_mdicaption.cpp
index 3c788da57..37f90b2e5 100644
--- a/src/kvirc/ui/kvi_mdicaption.cpp
+++ b/src/kvirc/ui/kvi_mdicaption.cpp
@@ -78,7 +78,11 @@ void KviMdiCaptionButton::paintEvent(QPaintEvent *e)
void KviMdiCaptionButton::drawButton(QPainter *p)
{
+#ifdef COMPILE_USE_QT4
+ QBrush b(parentWidget()->palette().window());
+#else
QBrush b(parentWidget()->colorGroup().background());
+#endif
if(isDown())
qDrawShadePanel(p,0,0,width(),height(),colorGroup(),true,1,&b);
@@ -86,9 +90,9 @@ void KviMdiCaptionButton::drawButton(QPainter *p)
p->fillRect(0,0,width(),height(),b);
#ifdef COMPILE_USE_QT4
- QStyleOptionButton opt;
- opt.initFrom(this);
- style()->drawControl(QStyle::CE_PushButtonLabel,&opt,p,this);
+ int x = (width() - 16) / 2;
+ int y = (width() - 16) / 2;
+ p->drawPixmap(x,y,16,16,icon().pixmap(16,16),0,0,16,16);
#else
drawButtonLabel(p);
#endif
@@ -116,6 +120,9 @@ KviMdiCaption::KviMdiCaption(KviMdiChild * parent,const char * name)
m_bMouseGrabbed = true;
m_bActive = false;
calcLineSpacing();
+#ifdef COMPILE_USE_QT4
+ setAutoFillBackground(false);
+#endif
}
KviMdiCaption::~KviMdiCaption()
@@ -163,7 +170,6 @@ void KviMdiCaption::fontChange(const QFont &old)
void KviMdiCaption::mousePressEvent(QMouseEvent *e)
{
- debug("mouse press");
m_bMouseGrabbed = true;
m_lastMousePos = QCursor::pos();
#ifdef COMPILE_USE_QT4
@@ -171,8 +177,7 @@ void KviMdiCaption::mousePressEvent(QMouseEvent *e)
#else
setCursor(QCursor::sizeAllCursor);
#endif
- //grabMouse(Qt::sizeAllCursor);
- //e->ignore();
+ ((KviMdiChild *)parent())->activate(true);
}
void KviMdiCaption::mouseMoveEvent(QMouseEvent *)
diff --git a/src/kvirc/ui/kvi_mdicaption.h b/src/kvirc/ui/kvi_mdicaption.h
index 5b31dcfeb..fcd642cee 100644
--- a/src/kvirc/ui/kvi_mdicaption.h
+++ b/src/kvirc/ui/kvi_mdicaption.h
@@ -75,12 +75,13 @@ protected:
KviMdiCaptionButton * m_pMinimizeButton;
KviMdiCaptionButton * m_pMaximizeButton;
KviMdiCaptionButton * m_pCloseButton;
+ QPixmap m_pixSystemIcon;
public:
int heightHint();
void setActive(bool bActive);
bool active(){ return m_bActive; };
- void setSystemIcon(const QPixmap &pix){ m_pSystemButton->setPixmap(pix); };
- const QPixmap * systemIcon(){ return m_pSystemButton->pixmap(); };
+ void setSystemIcon(const QPixmap &pix){ m_pSystemButton->setPixmap(pix); m_pixSystemIcon = pix; };
+ const QPixmap * systemIcon(){ return &m_pixSystemIcon; };
void enableClose(bool bEnable){ m_pCloseButton->setEnabled(bEnable); };
bool closeEnabled(){ return m_pCloseButton->isEnabled(); };
virtual void setFocusProxy(QWidget * w);
diff --git a/src/kvirc/ui/kvi_mdichild.cpp b/src/kvirc/ui/kvi_mdichild.cpp
index b120584e0..654d11198 100644
--- a/src/kvirc/ui/kvi_mdichild.cpp
+++ b/src/kvirc/ui/kvi_mdichild.cpp
@@ -1,9 +1,10 @@
+//=============================================================================
//
// File : kvi_mdichild.cpp
// Creation date : Wed Jun 21 2000 17:35:45 by Szymon Stefanek
//
// This file is part of the KVirc irc client distribution
-// Copyright (C) 1999-2000 Szymon Stefanek (pragma at kvirc dot net)
+// Copyright (C) 1999-2007 Szymon Stefanek (pragma at kvirc dot net)
//
// This program is FREE software. You can redistribute it and/or
// modify it under the terms of the GNU General Public License
@@ -19,6 +20,7 @@
// along with this program. If not, write to the Free Software Foundation,
// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
+//=============================================================================
#define __KVIRC__
#define _KVI_DEBUG_CHECK_RANGE_
@@ -86,6 +88,10 @@ KviMdiChild::KviMdiChild(KviMdiManager * par,const char * name)
setMouseTracking(true);
setMinimumSize(KVI_MDICHILD_MIN_WIDTH,KVI_MDICHILD_MIN_HEIGHT);
+
+#ifdef COMPILE_USE_QT4
+ setAutoFillBackground(true);
+#endif
}
@@ -308,11 +314,12 @@ void KviMdiChild::mouseReleaseEvent(QMouseEvent *)
releaseMouse();
}
- if(QApplication::overrideCursor())QApplication::restoreOverrideCursor();
+ //if(QApplication::overrideCursor())QApplication::restoreOverrideCursor();
}
QCursor KviMdiChild::getResizeCursor(int resizeCorner)
{
+ debug("GET RESIZE CURSOR");
switch (resizeCorner)
{
case KVI_MDI_RESIZE_LEFT:
@@ -332,6 +339,7 @@ QCursor KviMdiChild::getResizeCursor(int resizeCorner)
return Qt::sizeBDiagCursor;
break;
default:
+ debug("RETURNING DEFAULT");
return Qt::arrowCursor;
break;
}
@@ -343,20 +351,27 @@ void KviMdiChild::mouseMoveEvent(QMouseEvent *e)
{
if(m_iResizeCorner && (m_state != Maximized))resizeWindowOpaque(m_iResizeCorner);
} else {
+ debug("MOVE EVENT");
setResizeCursor(getResizeCorner(e->pos().x(), e->pos().y()));
}
}
void KviMdiChild::setResizeCursor(int resizeCorner)
{
- if(resizeCorner == m_iLastCursorCorner)return; //Don't do it twice
+ debug("SET RESIZE CORNER %d",resizeCorner);
+ if(resizeCorner == m_iLastCursorCorner)
+ return; //Don't do it twice
m_iLastCursorCorner = resizeCorner;
if(resizeCorner == KVI_MDI_NORESIZE)
{
- if(QApplication::overrideCursor())QApplication::restoreOverrideCursor();
+ setCursor(getResizeCursor(resizeCorner));
+ //if(QApplication::overrideCursor())QApplication::restoreOverrideCursor();
} else {
if(m_state != Maximized)
- QApplication::setOverrideCursor(getResizeCursor(resizeCorner),true);
+ {
+ setCursor(getResizeCursor(resizeCorner));
+ //QApplication::setOverrideCursor(getResizeCursor(resizeCorner),true);
+ }
}
}
@@ -366,7 +381,7 @@ void KviMdiChild::leaveEvent(QEvent *)
{
m_iResizeCorner=KVI_MDI_NORESIZE;
m_iLastCursorCorner=KVI_MDI_NORESIZE;
- if(QApplication::overrideCursor())QApplication::restoreOverrideCursor();
+ //if(QApplication::overrideCursor())QApplication::restoreOverrideCursor();
} else {
if(m_iResizeCorner != KVI_MDI_NORESIZE)resizeWindowOpaque(m_iResizeCorner);
}
@@ -529,6 +544,7 @@ void KviMdiChild::unsetClient()
void KviMdiChild::activate(bool bSetFocus)
{
+ debug("CHILD ACTIVATING...");
if(!m_pCaption->active())m_pCaption->setActive(true);
if(m_pManager->topChild() != this)
m_pManager->setTopChild(this,bSetFocus);
@@ -537,6 +553,7 @@ void KviMdiChild::activate(bool bSetFocus)
void KviMdiChild::focusInEvent(QFocusEvent *)
{
+ debug("FOCUS IN EVENT FOR THE CHILD");
// We gained focus by click , tab or from the caption label
// Bring this child to top
m_pCaption->setActive(true);
diff --git a/src/kvirc/ui/kvi_mdimanager.cpp b/src/kvirc/ui/kvi_mdimanager.cpp
index 8d90eba49..73e11e052 100644
--- a/src/kvirc/ui/kvi_mdimanager.cpp
+++ b/src/kvirc/ui/kvi_mdimanager.cpp
@@ -45,6 +45,9 @@
#include <qdrawutil.h>
#include <qevent.h>
+#ifdef COMPILE_USE_QT4
+ #include "kvi_tal_hbox.h"
+#endif
#ifdef COMPILE_PSEUDO_TRANSPARENCY
#include <qpixmap.h>
@@ -71,6 +74,9 @@ KviMdiManager::KviMdiManager(QWidget * parent,KviFrame * pFrm,const char * name)
m_pSdiCloseButton = 0;
m_pSdiRestoreButton = 0;
m_pSdiMinimizeButton = 0;
+#ifdef COMPILE_USE_QT4
+ m_pSdiControls = 0;
+#endif
m_pWindowPopup = new KviTalPopupMenu(this);
connect(m_pWindowPopup,SIGNAL(activated(int)),this,SLOT(menuActivated(int)));
@@ -120,6 +126,7 @@ bool KviMdiManager::focusNextPrevChild(bool bNext)
void KviMdiManager::drawContents(QPainter *p,int x,int y,int w,int h)
{
+ //debug("MY DRAW CONTENTS (%d,%d,%d,%d)",x,y,w,h);
QRect r(x,y,w,h);
#ifdef COMPILE_PSEUDO_TRANSPARENCY
@@ -490,8 +497,6 @@ void KviMdiManager::updateSDIMode()
// a submenu. Due to the optical reasons it is removed here.
// The same popup is triggered by right clicking on the window name in the channel window list.
#ifndef Q_OS_MACX
-#ifndef COMPILE_USE_QT4
-// FIXME: Adding widgets to menus is not supported
KviMenuBar * b = m_pFrm->mainMenuBar();
const QPixmap * pix = lpC ? lpC->icon() : 0;
@@ -502,12 +507,18 @@ void KviMdiManager::updateSDIMode()
{
m_pSdiIconButton = new KviMenuBarToolButton(b,*pix,"nonne");
connect(m_pSdiIconButton,SIGNAL(clicked()),this,SLOT(activeChildSystemPopup()));
+#ifdef COMPILE_USE_QT4
+ // This is an obscure, undocumented and internal function in QT4 QMenuBar
+ // I won't be surprised if this disappears....
+ b->setCornerWidget(m_pSdiIconButton,Qt::TopLeftCorner);
+ m_pSdiIconButton->show();
+#else
m_iSdiIconItemId = b->insertItem(m_pSdiIconButton,-1,0);
+#endif
connect(m_pSdiIconButton,SIGNAL(destroyed()),this,SLOT(sdiIconButtonDestroyed()));
} else {
m_pSdiIconButton->setPixmap(*pix);
}
-#endif
#endif //Q_OS_MACX
}
@@ -533,40 +544,84 @@ bool KviMdiManager::isInSDIMode()
void KviMdiManager::enterSDIMode(KviMdiChild *lpC)
{
- KviMenuBar * b = m_pFrm->mainMenuBar();
-
-#ifndef COMPILE_USE_QT4
- // FIXME: This is NOT supported under QT4.. it sux
if(!m_pSdiCloseButton)
{
- m_pSdiMinimizeButton = new KviMenuBarToolButton(b,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINIMIZE)),"btnminimize");
+ KviMenuBar * b = m_pFrm->mainMenuBar();
+
+ QWidget * pButtonParent;
+
+#ifdef COMPILE_USE_QT4
+ m_pSdiControls = new KviTalHBox(b);
+ m_pSdiControls->setMargin(0);
+ m_pSdiControls->setSpacing(2);
+ m_pSdiControls->setAutoFillBackground(false);
+ pButtonParent = m_pSdiControls;
+#else
+ pButtonParent = b;
+#endif
+ m_pSdiMinimizeButton = new KviMenuBarToolButton(pButtonParent,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MINIMIZE)),"btnminimize");
connect(m_pSdiMinimizeButton,SIGNAL(clicked()),this,SLOT(minimizeActiveChild()));
+#ifndef COMPILE_USE_QT4
m_iSdiMinimizeItemId = b->insertItem(m_pSdiMinimizeButton,-1,b->count());
+#endif
connect(m_pSdiMinimizeButton,SIGNAL(destroyed()),this,SLOT(sdiMinimizeButtonDestroyed()));
- m_pSdiRestoreButton = new KviMenuBarToolButton(b,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RESTORE)),"btnrestore");
+ m_pSdiRestoreButton = new KviMenuBarToolButton(pButtonParent,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_RESTORE)),"btnrestore");
connect(m_pSdiRestoreButton,SIGNAL(clicked()),this,SLOT(restoreActiveChild()));
+#ifndef COMPILE_USE_QT4
m_iSdiRestoreItemId = b->insertItem(m_pSdiRestoreButton,-1,b->count());
+#endif
connect(m_pSdiRestoreButton,SIGNAL(destroyed()),this,SLOT(sdiRestoreButtonDestroyed()));
- m_pSdiCloseButton = new KviMenuBarToolButton(b,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),"btnclose");
+ m_pSdiCloseButton = new KviMenuBarToolButton(pButtonParent,*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),"btnclose");
connect(m_pSdiCloseButton,SIGNAL(clicked()),this,SLOT(closeActiveChild()));
+#ifndef COMPILE_USE_QT4
m_iSdiCloseItemId = b->insertItem(m_pSdiCloseButton,-1,b->count());
+#endif
connect(m_pSdiCloseButton,SIGNAL(destroyed()),this,SLOT(sdiCloseButtonDestroyed()));
+#ifdef COMPILE_USE_QT4
+ // This is an obscure, undocumented and internal function in QT4 QMenuBar
+ // I won't be surprised if this disappears....
+ b->setCornerWidget(m_pSdiControls,Qt::TopRightCorner);
+ // The show below SHOULD force a re-layout of the menubar..
+ // but it doesn't work when the KviFrame is still hidden (at startup)
+ // We handle this BUG in showEvent()
+ m_pSdiControls->show();
+#else
m_pSdiRestoreButton->show();
m_pSdiMinimizeButton->show();
m_pSdiCloseButton->show();
-
+#endif
emit enteredSdiMode();
setVScrollBarMode(KviTalScrollView::AlwaysOff);
setHScrollBarMode(KviTalScrollView::AlwaysOff);
}
-#endif
+
updateSDIMode();
}
+void KviMdiManager::showEvent(QShowEvent *e)
+{
+#ifdef COMPILE_USE_QT4
+ // force a re-layout of the menubar in Qt4 (see the note in enterSDIMode())
+ // by resetting the corner widget
+ if(m_pSdiControls)
+ {
+ debug("SHOW EVENT BEGIN");
+ m_pFrm->mainMenuBar()->setCornerWidget(0,Qt::TopRightCorner);
+ m_pFrm->mainMenuBar()->setCornerWidget(m_pSdiControls,Qt::TopRightCorner);
+ debug("SHOW EVENT END");
+ }
+ // also force an activation of the top MdiChild since it probably didn't get it yet
+ KviMdiChild * c = topChild();
+ if(c)
+ c->activate(false);
+#endif
+}
+
+
void KviMdiManager::sdiIconButtonDestroyed()
{
m_iSdiIconItemId = 0;
@@ -595,10 +650,24 @@ void KviMdiManager::leaveSDIMode()
{
__range_valid(m_pSdiCloseButton);
+#ifdef COMPILE_USE_QT4
+ if(m_pSdiControls)
+ {
+ delete m_pSdiControls;
+ m_pSdiControls = 0;
+ }
+ if(m_pSdiIconButton)
+ {
+ m_pSdiIconButton->hide(); // this will force a QMenuBar relayout
+ delete m_pSdiIconButton;
+ m_pSdiIconButton = 0;
+ }
+#else
if(m_iSdiIconItemId != 0)m_pFrm->mainMenuBar()->removeItem(m_iSdiIconItemId);
if(m_iSdiCloseItemId != 0)m_pFrm->mainMenuBar()->removeItem(m_iSdiCloseItemId);
if(m_iSdiRestoreItemId != 0)m_pFrm->mainMenuBar()->removeItem(m_iSdiRestoreItemId);
if(m_iSdiMinimizeItemId != 0)m_pFrm->mainMenuBar()->removeItem(m_iSdiMinimizeItemId);
+#endif
setVScrollBarMode(KviTalScrollView::Auto);
setHScrollBarMode(KviTalScrollView::Auto);
diff --git a/src/kvirc/ui/kvi_mdimanager.h b/src/kvirc/ui/kvi_mdimanager.h
index 201d6bd26..9c7204428 100644
--- a/src/kvirc/ui/kvi_mdimanager.h
+++ b/src/kvirc/ui/kvi_mdimanager.h
@@ -50,7 +50,7 @@
class KviFrame;
class KviTalPopupMenu;
-
+class KviTalHBox;
class KviSdiButtonBox;
class KviMenuBarToolButton;
@@ -81,6 +81,9 @@ protected:
KviMenuBarToolButton * m_pSdiCloseButton;
KviMenuBarToolButton * m_pSdiIconButton;
+#ifdef COMPILE_USE_QT4
+ KviTalHBox * m_pSdiControls;
+#endif
int m_iSdiIconItemId;
int m_iSdiRestoreItemId;
int m_iSdiMinimizeItemId;
@@ -101,6 +104,7 @@ protected:
virtual void resizeEvent(QResizeEvent *e);
virtual void drawContents(QPainter * p,int x,int y,int w,int h);
virtual bool focusNextPrevChild(bool pNext);
+ virtual void showEvent(QShowEvent *e);
public slots:
void cascadeWindows();
void cascadeMaximized();
diff --git a/src/kvirc/ui/kvi_splash.cpp b/src/kvirc/ui/kvi_splash.cpp
index 09c2a8349..152e98897 100644
--- a/src/kvirc/ui/kvi_splash.cpp
+++ b/src/kvirc/ui/kvi_splash.cpp
@@ -140,7 +140,8 @@ void KviSplashScreen::setProgress(int progress)
QPixmap slowQt4Copy = pixmap();
QPainter painter(&slowQt4Copy);
QSize size = slowQt4Copy.size();
- painter.drawPixmap(0,size.height() - m_pOverlay->height(),*m_pOverlay,0,0,(m_pOverlay->width() * progress) / 100,m_pOverlay->height());
+ int w = (m_pOverlay->width() * progress) / 100;
+ painter.drawPixmap(0,size.height() - m_pOverlay->height(),w,m_pOverlay->height(),*m_pOverlay,0,0,w,m_pOverlay->height());
painter.end();
setPixmap(slowQt4Copy);
#else
diff --git a/src/kvirc/ui/kvi_statusbar.cpp b/src/kvirc/ui/kvi_statusbar.cpp
index cc9603ec3..16cecc0be 100644
--- a/src/kvirc/ui/kvi_statusbar.cpp
+++ b/src/kvirc/ui/kvi_statusbar.cpp
@@ -108,7 +108,7 @@ KviStatusBar::KviStatusBar(KviFrame * pFrame)
#ifdef COMPILE_USE_QT4
m_pMessageLabel->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
#else
- m_pMessageLabel->setAlignment(SingleLine | AlignVCenter | AlignLeft);
+ m_pMessageLabel->setAlignment(SingleLine | Qt::AlignVCenter | Qt::AlignLeft);
#endif
m_pMessageLabel->setMinimumWidth(350);
diff --git a/src/kvirc/ui/kvi_window.cpp b/src/kvirc/ui/kvi_window.cpp
index 307a38246..15cc8b1b6 100644
--- a/src/kvirc/ui/kvi_window.cpp
+++ b/src/kvirc/ui/kvi_window.cpp
@@ -149,7 +149,7 @@ KviWindow::KviWindow(int type,KviFrame * lpFrm,const QString &name,KviConsole *
setMinimumSize(KVI_WINDOW_MIN_WIDTH,KVI_WINDOW_MIN_HEIGHT);
#ifdef COMPILE_USE_QT4
- setAutoFillBackground(false);
+ //setAutoFillBackground(false);
setFocusPolicy(Qt::StrongFocus);
#else
setBackgroundMode(NoBackground);
@@ -975,6 +975,7 @@ void KviWindow::youAreUndocked()
void KviWindow::activateSelf()
{
+ debug("ACTIVATING SELF");
if(mdiParent())
mdiParent()->activate(false);
@@ -993,6 +994,7 @@ void KviWindow::setFocus()
void KviWindow::focusInEvent(QFocusEvent *)
{
+ debug("FOCUS IN EVENT TO KviWindow");
if(m_pLastFocusedChild)
{
if(m_pLastFocusedChild->hasFocus() && m_pLastFocusedChild->isVisible())
@@ -1052,6 +1054,7 @@ void KviWindow::focusInEvent(QFocusEvent *)
// we should be already the active window at this point.
// If we're not, then run activateSelf() to fix this.
if(g_pActiveWindow != this)activateSelf();
+ else debug("ACTIVE WINDOW IS ALREADY THIS");
updateCaption();
}
diff --git a/src/modules/about/aboutdialog.cpp b/src/modules/about/aboutdialog.cpp
index db76a44c7..1688e09e2 100644
--- a/src/modules/about/aboutdialog.cpp
+++ b/src/modules/about/aboutdialog.cpp
@@ -33,9 +33,10 @@
#include <qwidget.h>
#include <qlayout.h>
-#include <qtextedit.h>
+#include <kvi_tal_textedit.h>
#include <qlabel.h>
#include <qpixmap.h>
+#include <qevent.h>
extern KviAboutDialog * g_pAboutDialog;
/*
@@ -69,7 +70,7 @@ extern KviAboutDialog * g_pAboutDialog;
#include "abouttext.inc"
KviAboutDialog::KviAboutDialog()
-: QTabDialog(0)
+: KviTalTabDialog(0)
{
setCaption(__tr2qs_ctx("About KVIrc...","about"));
setOkButton(__tr2qs_ctx("Close","about"));
@@ -98,7 +99,7 @@ KviAboutDialog::KviAboutDialog()
aboutString += KVI_SOURCES_DATE;
l = new QLabel(aboutString,w);
- l->setAlignment(AlignCenter);
+ l->setAlignment(Qt::AlignCenter);
g->addWidget(l,1,0);
addTab(w,__tr2qs_ctx("About","about"));
@@ -108,7 +109,7 @@ KviAboutDialog::KviAboutDialog()
w = new QWidget(this);
g = new QGridLayout(w,1,1,4,8);
- QTextEdit * v = new QTextEdit(w);
+ KviTalTextEdit * v = new KviTalTextEdit(w);
v->setReadOnly(true);
g->addWidget(v,0,0);
@@ -121,9 +122,9 @@ KviAboutDialog::KviAboutDialog()
w = new QWidget(this);
g = new QGridLayout(w,1,1,4,8);
- v = new QTextEdit(w);
+ v = new KviTalTextEdit(w);
v->setReadOnly(true);
- v->setWordWrap(QTextEdit::NoWrap);
+ v->setWordWrap(KviTalTextEdit::NoWrap);
g->addWidget(v,0,0);
QString szLicense;
diff --git a/src/modules/about/aboutdialog.h b/src/modules/about/aboutdialog.h
index b33579ab7..95ef968a4 100644
--- a/src/modules/about/aboutdialog.h
+++ b/src/modules/about/aboutdialog.h
@@ -22,9 +22,9 @@
// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
-#include <qtabdialog.h>
+#include <kvi_tal_tabdialog.h>
-class KviAboutDialog : public QTabDialog
+class KviAboutDialog : public KviTalTabDialog
{
Q_OBJECT
public:
diff --git a/src/modules/actioneditor/actioneditor.cpp b/src/modules/actioneditor/actioneditor.cpp
index 0bde7db8a..0c3e787ed 100644
--- a/src/modules/actioneditor/actioneditor.cpp
+++ b/src/modules/actioneditor/actioneditor.cpp
@@ -23,7 +23,6 @@
//=============================================================================
#include "actioneditor.h"
-#include "kvi_styled_controls.h"
#include "kvi_iconmanager.h"
#include "kvi_options.h"
#include "kvi_locale.h"
@@ -54,12 +53,15 @@
#include <qtoolbutton.h>
#include <qcheckbox.h>
#include <qtooltip.h>
-#include <qsimplerichtext.h>
#include <qpainter.h>
-#include <qheader.h>
+#ifdef COMPILE_USE_QT4
+ #include <q3header.h>
+#else
+ #include <qheader.h>
+#endif
#include <qtabwidget.h>
#include <kvi_tal_groupbox.h>
-#include <qvaluelist.h>
+#include "kvi_valuelist.h"
#include <qlabel.h>
extern KviActionEditorWindow * g_pActionEditorWindow;
@@ -652,7 +654,11 @@ KviActionEditor::KviActionEditor(QWidget * par)
QGridLayout * l = new QGridLayout(this,1,1,2,2);
+#ifdef COMPILE_USE_QT4
+ m_pSplitter = new QSplitter(Qt::Horizontal,this);
+#else
m_pSplitter = new QSplitter(QSplitter::Horizontal,this);
+#endif
l->addWidget(m_pSplitter,0,0);
@@ -661,7 +667,11 @@ KviActionEditor::KviActionEditor(QWidget * par)
m_pListView = new KviActionEditorListView(box);
//m_pListView->setMultiSelection(false);
m_pListView->setShowSortIndicator(true);
+#ifdef COMPILE_USE_QT4
+ m_pListView->setFocusPolicy(Qt::StrongFocus);
+#else
m_pListView->setFocusPolicy(QWidget::StrongFocus);
+#endif
connect(m_pListView,SIGNAL(currentChanged(KviTalListViewItem *)),this,SLOT(currentChanged(KviTalListViewItem *)));
@@ -990,7 +1000,7 @@ void KviActionEditorWindow::loadProperties(KviConfig *cfg)
{
int w = width();
KviWindow::loadProperties(cfg);
- QValueList<int> def;
+ KviValueList<int> def;
def.append((w * 25) / 100);
def.append((w * 75) / 100);
m_pEditor->m_pSplitter->setSizes(cfg->readIntListEntry("Splitter",def));
diff --git a/src/modules/actioneditor/actioneditor.h b/src/modules/actioneditor/actioneditor.h
index bd6cf38c4..e62df5565 100644
--- a/src/modules/actioneditor/actioneditor.h
+++ b/src/modules/actioneditor/actioneditor.h
@@ -28,6 +28,7 @@
#include <qwidget.h>
#include "kvi_tal_listview.h"
+#include "kvi_styled_controls.h"
class KviActionEditorListViewItem;
@@ -67,10 +68,18 @@ class QLineEdit;
class QComboBox;
class KviScriptEditor;
class QToolButton;
-class KviStyledCheckBox;
class QSimpleRichText;
class QPushButton;
+#ifdef COMPILE_USE_QT4
+ #include <q3simplerichtext.h>
+ #define QSimpleRichText Q3SimpleRichText
+#else
+ #include <qsimplerichtext.h>
+#endif
+
+
+
class KviActionEditorListViewItem : public KviTalListViewItem
{
public:
diff --git a/src/modules/dcc/canvaswidget.cpp b/src/modules/dcc/canvaswidget.cpp
index a82879a6c..bccf8e5ab 100644
--- a/src/modules/dcc/canvaswidget.cpp
+++ b/src/modules/dcc/canvaswidget.cpp
@@ -1213,7 +1213,7 @@ void KviCanvasView::contentsMousePressEvent(QMouseEvent *e)
beginDragLine(((KviCanvasLine *)hit),p);
break;
case KVI_CANVAS_RTTI_CONTROL_TYPE_POLYGON:
- beginDragPolygon(((KviCanvasPolygon *)hit),p,e->state() & ShiftButton,e->state() & ControlButton);
+ beginDragPolygon(((KviCanvasPolygon *)hit),p,e->state() & Qt::ShiftButton,e->state() & Qt::ControlButton);
break;
}
} else {
diff --git a/src/modules/dcc/dialogs.cpp b/src/modules/dcc/dialogs.cpp
index 963abae5f..9f3f28465 100644
--- a/src/modules/dcc/dialogs.cpp
+++ b/src/modules/dcc/dialogs.cpp
@@ -55,7 +55,7 @@ KviDccAcceptBox::KviDccAcceptBox(KviDccBroker * br,KviDccDescriptor * dcc,const
QLabel * l = new QLabel(text,this);
vb->addWidget(l);
QHBoxLayout *hb = new QHBoxLayout(4);
- vb->addLayout(hb,AlignCenter);
+ vb->addLayout(hb,Qt::AlignCenter);
QPushButton * btn = new QPushButton(__tr2qs_ctx("&Accept","dcc"),this);
btn->setDefault(true);
//btn->setFocus();
@@ -113,7 +113,7 @@ KviDccRenameBox::KviDccRenameBox(KviDccBroker * br,KviDccDescriptor * dcc,const
vb->addWidget(l);
QHBoxLayout *hb = new QHBoxLayout(4);
- vb->addLayout(hb,AlignCenter);
+ vb->addLayout(hb,Qt::AlignCenter);
QPushButton * btn = new QPushButton(__tr2qs_ctx("&Rename","dcc"),this);
hb->addWidget(btn);
diff --git a/src/modules/dialog/libkvidialog.cpp b/src/modules/dialog/libkvidialog.cpp
index 4237553a5..03512405e 100644
--- a/src/modules/dialog/libkvidialog.cpp
+++ b/src/modules/dialog/libkvidialog.cpp
@@ -213,7 +213,7 @@ KviKvsCallbackTextInput::KviKvsCallbackTextInput(
{
QLabel * il = new QLabel(this);
il->setPixmap(*pix);
- il->setAlignment(AlignCenter);
+ il->setAlignment(Qt::AlignCenter);
g->addWidget(il,0,0);
QLabel * tl = new QLabel(szLabel,this);
g->addWidget(tl,0,1);
diff --git a/src/modules/dockwidget/trayicon.cpp b/src/modules/dockwidget/trayicon.cpp
index cf2e46d8d..ccb6ba9ef 100644
--- a/src/modules/dockwidget/trayicon.cpp
+++ b/src/modules/dockwidget/trayicon.cpp
@@ -200,14 +200,14 @@ void TrayIcon::mousePressEvent( QMouseEvent *e )
// This is for X11, menus appear on mouse press
// I'm not sure whether Mac should be here or below.. Somebody check?
switch ( e->button() ) {
- case RightButton:
+ case Qt::RightButton:
if ( pop ) {
pop->popup( e->globalPos() );
e->accept();
}
break;
- case LeftButton:
- case MidButton:
+ case Qt::LeftButton:
+ case Qt::MidButton:
emit clicked( e->globalPos(), e->button() );
break;
default:
@@ -232,7 +232,7 @@ void TrayIcon::mouseReleaseEvent( QMouseEvent *e )
#ifdef Q_WS_WIN
// This is for Windows, where menus appear on mouse release
switch ( e->button() ) {
- case RightButton:
+ case Qt::RightButton:
if ( pop ) {
// Necessary to make keyboard focus
// and menu closing work on Windows.
@@ -242,8 +242,8 @@ void TrayIcon::mouseReleaseEvent( QMouseEvent *e )
e->accept();
}
break;
- case LeftButton:
- case MidButton:
+ case Qt::LeftButton:
+ case Qt::MidButton:
emit clicked( e->globalPos(), e->button() );
break;
default:
@@ -265,7 +265,7 @@ void TrayIcon::mouseReleaseEvent( QMouseEvent *e )
*/
void TrayIcon::mouseDoubleClickEvent( QMouseEvent *e )
{
- if ( e->button() == LeftButton )
+ if ( e->button() == Qt::LeftButton )
emit doubleClicked( e->globalPos() );
e->accept();
}
diff --git a/src/modules/dockwidget/trayicon_win.cpp b/src/modules/dockwidget/trayicon_win.cpp
index 5ba57625b..a916438af 100644
--- a/src/modules/dockwidget/trayicon_win.cpp
+++ b/src/modules/dockwidget/trayicon_win.cpp
@@ -153,16 +153,16 @@ public:
QPoint gpos = QCursor::pos();
switch (m->lParam) {
case WM_MOUSEMOVE: e = new QMouseEvent( QEvent::MouseMove, mapFromGlobal( gpos ), gpos, 0, 0 ); break;
- case WM_LBUTTONDOWN: e = new QMouseEvent( QEvent::MouseButtonPress, mapFromGlobal( gpos ), gpos, LeftButton, LeftButton ); break;
- case WM_LBUTTONUP: e = new QMouseEvent( QEvent::MouseButtonRelease, mapFromGlobal( gpos ), gpos, LeftButton, LeftButton ); break;
- case WM_LBUTTONDBLCLK: e = new QMouseEvent( QEvent::MouseButtonDblClick, mapFromGlobal( gpos ), gpos, LeftButton, LeftButton ); break;
- case WM_RBUTTONDOWN: e = new QMouseEvent( QEvent::MouseButtonPress, mapFromGlobal( gpos ), gpos, RightButton, RightButton ); break;
- case WM_RBUTTONUP: e = new QMouseEvent( QEvent::MouseButtonRelease, mapFromGlobal( gpos ), gpos, RightButton, RightButton ); break;
- case WM_RBUTTONDBLCLK: e = new QMouseEvent( QEvent::MouseButtonDblClick, mapFromGlobal( gpos ), gpos, RightButton, RightButton ); break;
- case WM_MBUTTONDOWN: e = new QMouseEvent( QEvent::MouseButtonPress, mapFromGlobal( gpos ), gpos, MidButton, MidButton ); break;
- case WM_MBUTTONUP: e = new QMouseEvent( QEvent::MouseButtonRelease, mapFromGlobal( gpos ), gpos, MidButton, MidButton ); break;
- case WM_MBUTTONDBLCLK: e = new QMouseEvent( QEvent::MouseButtonDblClick, mapFromGlobal( gpos ), gpos, MidButton, MidButton ); break;
- case WM_CONTEXTMENU: e = new QMouseEvent( QEvent::MouseButtonRelease, mapFromGlobal( gpos ), gpos, RightButton, RightButton ); break;
+ case WM_LBUTTONDOWN: e = new QMouseEvent( QEvent::MouseButtonPress, mapFromGlobal( gpos ), gpos, Qt::LeftButton, Qt::LeftButton ); break;
+ case WM_LBUTTONUP: e = new QMouseEvent( QEvent::MouseButtonRelease, mapFromGlobal( gpos ), gpos, Qt::LeftButton, Qt::LeftButton ); break;
+ case WM_LBUTTONDBLCLK: e = new QMouseEvent( QEvent::MouseButtonDblClick, mapFromGlobal( gpos ), gpos, Qt::LeftButton, Qt::LeftButton ); break;
+ case WM_RBUTTONDOWN: e = new QMouseEvent( QEvent::MouseButtonPress, mapFromGlobal( gpos ), gpos, Qt::RightButton, Qt::RightButton ); break;
+ case WM_RBUTTONUP: e = new QMouseEvent( QEvent::MouseButtonRelease, mapFromGlobal( gpos ), gpos, Qt::RightButton, Qt::RightButton ); break;
+ case WM_RBUTTONDBLCLK: e = new QMouseEvent( QEvent::MouseButtonDblClick, mapFromGlobal( gpos ), gpos, Qt::RightButton, Qt::RightButton ); break;
+ case WM_MBUTTONDOWN: e = new QMouseEvent( QEvent::MouseButtonPress, mapFromGlobal( gpos ), gpos, Qt::MidButton, Qt::MidButton ); break;
+ case WM_MBUTTONUP: e = new QMouseEvent( QEvent::MouseButtonRelease, mapFromGlobal( gpos ), gpos, Qt::MidButton, Qt::MidButton ); break;
+ case WM_MBUTTONDBLCLK: e = new QMouseEvent( QEvent::MouseButtonDblClick, mapFromGlobal( gpos ), gpos, Qt::MidButton, Qt::MidButton ); break;
+ case WM_CONTEXTMENU: e = new QMouseEvent( QEvent::MouseButtonRelease, mapFromGlobal( gpos ), gpos, Qt::RightButton, Qt::RightButton ); break;
}
if ( e ) {
bool res = QApplication::sendEvent( iconObject, e );
diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp
index 9fac05923..ddaa7cb19 100644
--- a/src/modules/editor/scripteditor.cpp
+++ b/src/modules/editor/scripteditor.cpp
@@ -216,9 +216,9 @@ void KviScriptEditorWidgetColorOptions::okClicked()
KviScriptEditorWidget::KviScriptEditorWidget(QWidget * pParent)
-: QTextEdit(pParent)
+: KviTalTextEdit(pParent)
{
- setWordWrap(QTextEdit::NoWrap);
+ setWordWrap(KviTalTextEdit::NoWrap);
m_pParent=pParent;
m_szHelp="Nothing";
updateOptions();
@@ -234,9 +234,9 @@ KviScriptEditorWidget::~KviScriptEditorWidget()
QPopupMenu * KviScriptEditorWidget::createPopupMenu( const QPoint& pos )
{
- QPopupMenu *pop=QTextEdit::createPopupMenu(pos);
- pop->insertItem(__tr2qs("Context sensitive help"),this,SLOT(slotHelp()),CTRL+Key_H);
- pop->insertItem(__tr2qs("&Replace"),this,SLOT(slotReplace()),CTRL+Key_R);
+ QPopupMenu *pop=KviTalTextEdit::createPopupMenu(pos);
+ pop->insertItem(__tr2qs("Context sensitive help"),this,SLOT(slotHelp()),Qt::CTRL+Qt::Key_H);
+ pop->insertItem(__tr2qs("&Replace"),this,SLOT(slotReplace()),Qt::CTRL+Qt::Key_R);
return pop;
}
@@ -271,7 +271,7 @@ void KviScriptEditorWidget::updateOptions()
p.setColor(QColorGroup::Text,g_clrNormalText);
setPalette(p);
- setTextFormat(QTextEdit::PlainText);
+ setTextFormat(KviTalTextEdit::PlainText);
// this will rehighlight everything
setText(text()); // an "hack" to ensure Update all in the editor
@@ -340,7 +340,7 @@ void KviScriptEditorWidget::keyPressEvent(QKeyEvent * e)
}
break;
case Qt::Key_Return:
- QTextEdit::keyPressEvent(e);
+ KviTalTextEdit::keyPressEvent(e);
int para,pos;
getCursorPosition(&para,&pos);
if(para > 0)
@@ -370,7 +370,7 @@ void KviScriptEditorWidget::keyPressEvent(QKeyEvent * e)
setFocus();
break;
}
- QTextEdit::keyPressEvent(e);
+ KviTalTextEdit::keyPressEvent(e);
emit keyPressed();
if(completelistbox->isVisible())
completition(0);
@@ -405,7 +405,7 @@ void KviScriptEditorWidget::contentsMousePressEvent(QMouseEvent *e)
//debug (buffer);
m_szHelp=buffer;
}
- QTextEdit::contentsMousePressEvent(e);
+ KviTalTextEdit::contentsMousePressEvent(e);
}
@@ -979,8 +979,8 @@ void KviScriptEditorImplementation::saveToFile()
void KviScriptEditorImplementation::setText(const QCString &txt)
{
m_pEditor->setText(txt.data());
- m_pEditor->setTextFormat(QTextEdit::PlainText);
- m_pEditor->moveCursor(QTextEdit::MoveEnd,false);
+ m_pEditor->setTextFormat(KviTalTextEdit::PlainText);
+ m_pEditor->moveCursor(KviTalTextEdit::MoveEnd,false);
m_pEditor->setModified(false);
updateRowColLabel();
}
@@ -996,8 +996,8 @@ QLineEdit * KviScriptEditorImplementation::getFindlineedit()
void KviScriptEditorImplementation::setText(const QString &txt)
{
m_pEditor->setText(txt);
- m_pEditor->setTextFormat(QTextEdit::PlainText);
- m_pEditor->moveCursor(QTextEdit::MoveEnd,false);
+ m_pEditor->setTextFormat(KviTalTextEdit::PlainText);
+ m_pEditor->moveCursor(KviTalTextEdit::MoveEnd,false);
m_pEditor->setModified(false);
updateRowColLabel();
}
@@ -1061,7 +1061,7 @@ void KviScriptEditorImplementation::loadFromFile()
if(KviFileUtils::loadFile(fName,buffer))
{
m_pEditor->setText(buffer);
- m_pEditor->moveCursor(QTextEdit::MoveEnd,false);
+ m_pEditor->moveCursor(KviTalTextEdit::MoveEnd,false);
updateRowColLabel();
} else {
QString tmp;
diff --git a/src/modules/editor/scripteditor.h b/src/modules/editor/scripteditor.h
index d0a278688..44f96ac19 100644
--- a/src/modules/editor/scripteditor.h
+++ b/src/modules/editor/scripteditor.h
@@ -29,7 +29,7 @@
#include <qlabel.h>
#include <qcstring.h>
-#include <qtextedit.h>
+#include <kvi_tal_textedit.h>
#include <qsyntaxhighlighter.h>
#include <qdialog.h>
#include <qcheckbox.h>
@@ -52,7 +52,7 @@ protected:
virtual void keyPressEvent(QKeyEvent * e);
};
-class KviScriptEditorWidget : public QTextEdit
+class KviScriptEditorWidget : public KviTalTextEdit
{
Q_OBJECT
Q_PROPERTY(bool contextSensitiveHelp READ contextSensitiveHelp)
diff --git a/src/modules/logview/logviewmdiwindow.cpp b/src/modules/logview/logviewmdiwindow.cpp
index 89c785a3d..68b6fcd19 100644
--- a/src/modules/logview/logviewmdiwindow.cpp
+++ b/src/modules/logview/logviewmdiwindow.cpp
@@ -157,7 +157,7 @@ KviLogViewMDIWindow::KviLogViewMDIWindow(KviModuleExtensionDescriptor * d,KviFra
setupItemList();
QAccel *a = new QAccel( this );
- a->connectItem( a->insertItem(Key_F+CTRL),
+ a->connectItem( a->insertItem(Qt::Key_F+Qt::CTRL),
m_pIrcView,
SLOT(toggleToolWidget()) );
}
diff --git a/src/modules/mircimport/libkvimircimport.cpp b/src/modules/mircimport/libkvimircimport.cpp
index d8563882f..65be91c4d 100644
--- a/src/modules/mircimport/libkvimircimport.cpp
+++ b/src/modules/mircimport/libkvimircimport.cpp
@@ -138,7 +138,7 @@ void KviMircServersIniImport::die()
KviRemoteMircServerImportWizard::KviRemoteMircServerImportWizard(KviRemoteMircServersIniImport * f)
-: QWizard(0)
+: KviTalWizard(0)
{
QString capt = __tr2qs("Remote mIRC servers.ini Import Wizard");
setCaption(capt);
diff --git a/src/modules/mircimport/libkvimircimport.h b/src/modules/mircimport/libkvimircimport.h
index d388ebb69..7f75e0907 100644
--- a/src/modules/mircimport/libkvimircimport.h
+++ b/src/modules/mircimport/libkvimircimport.h
@@ -26,7 +26,7 @@
#include "kvi_string.h"
#include "kvi_http.h"
-#include <qwizard.h>
+#include <kvi_tal_wizard.h>
#include <qlineedit.h>
#include <qlabel.h>
@@ -57,7 +57,7 @@ public:
virtual void die();
};
-class KviRemoteMircServerImportWizard : public QWizard
+class KviRemoteMircServerImportWizard : public KviTalWizard
{
Q_OBJECT
public:
diff --git a/src/modules/notifier/notifierwindow.cpp b/src/modules/notifier/notifierwindow.cpp
index dcaa44f84..d6e1045e7 100644
--- a/src/modules/notifier/notifierwindow.cpp
+++ b/src/modules/notifier/notifierwindow.cpp
@@ -713,11 +713,11 @@ void KviNotifierWindow::mousePressEvent(QMouseEvent * e)
m_pntClick = e->pos();
- if(e->button() == RightButton)
+ if(e->button() == Qt::RightButton)
{
contextPopup(e->pos());
return;
- } else if(e->button() == LeftButton) {
+ } else if(e->button() == Qt::LeftButton) {
m_bLeftButtonIsPressed = true;
}
diff --git a/src/modules/objects/class_multilineedit.cpp b/src/modules/objects/class_multilineedit.cpp
index f836980d7..12d330bd8 100644
--- a/src/modules/objects/class_multilineedit.cpp
+++ b/src/modules/objects/class_multilineedit.cpp
@@ -31,9 +31,18 @@
#include "kvi_malloc.h"
#include <qfile.h>
+#ifdef COMPILE_USE_QT4
+ #include <q3multilineedit.h>
+ #define KviTalMultiLineEdit Q3MultiLineEdit
+#else
+ #include <qmultilineedit.h>
+ #define KviTalMultiLineEdit QMultiLineEdit
+#endif
+
#include "class_multilineedit.h"
+
//->Tables for Text Format
static char * const mod_tbl[] = {
"PlainText",
@@ -209,9 +218,9 @@ static int mod_cod[] = {
!fn: $setAlignment(<alignment:string>)
Sets the alignment of the current paragraph to <alignment>. Valid values are:[br]
- AlignAuto - Aligns according to the language.[br]
- - AlignLeft - Aligns with the left edge.[br]
- - AlignRight - Aligns with the right edge.[br]
- - AlignCenter - Centers in both dimensions.
+ - Qt::AlignLeft - Aligns with the left edge.[br]
+ - Qt::AlignRight - Aligns with the right edge.[br]
+ - Qt::AlignCenter - Centers in both dimensions.
!fn: $setVerticalAlignment(<vertical_alignment:string>)
Sets the vertical alignment of the current format to <Valignemnt>. Valid Values are:[br]
- AlignNormal - Normal alignment.[br]
@@ -333,7 +342,7 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_mledit)
bool KviKvsObject_mledit::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams)
{
- setObject(new QMultiLineEdit(parentScriptWidget(),getName()),true);
+ setObject(new KviTalMultiLineEdit(parentScriptWidget(),getName()),true);
return true;
}
@@ -346,7 +355,7 @@ bool KviKvsObject_mledit::functionSetReadOnly(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QMultiLineEdit *)widget())->setReadOnly(bEnabled);
+ ((KviTalMultiLineEdit *)widget())->setReadOnly(bEnabled);
return true;
}
@@ -359,9 +368,9 @@ bool KviKvsObject_mledit::functionTextLine(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("line",KVS_PT_INT,0,iLine)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(iLine > ((QMultiLineEdit *)widget())->numLines() || iLine < 0) c->warning(__tr2qs("No such line number"));
+ if(iLine > ((KviTalMultiLineEdit *)widget())->numLines() || iLine < 0) c->warning(__tr2qs("No such line number"));
else
- c->returnValue()->setString(((QMultiLineEdit *)widget())->textLine(iLine));
+ c->returnValue()->setString(((KviTalMultiLineEdit *)widget())->textLine(iLine));
return true;
}
@@ -375,7 +384,7 @@ bool KviKvsObject_mledit::functionInsertLine(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("line",KVS_PT_INT,KVS_PF_OPTIONAL,iLine)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- ((QMultiLineEdit *)widget())->insertLine(szInsert,iLine);
+ ((KviTalMultiLineEdit *)widget())->insertLine(szInsert,iLine);
return true;
}
@@ -386,9 +395,9 @@ bool KviKvsObject_mledit::functionRemoveLine(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("line",KVS_PT_INT,0,iLine)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(iLine > ((QMultiLineEdit *)widget())->numLines() || iLine < 0)
+ if(iLine > ((KviTalMultiLineEdit *)widget())->numLines() || iLine < 0)
c->warning("No such line number");
- else ((QMultiLineEdit *)widget())->removeLine(iLine);
+ else ((KviTalMultiLineEdit *)widget())->removeLine(iLine);
return true;
}
@@ -403,17 +412,17 @@ bool KviKvsObject_mledit::functionInsertAt(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("col",KVS_PT_UNSIGNEDINTEGER,0,iCol)
KVSO_PARAMETERS_END(c)
if(!widget())return true;
- if(iLine < 0 || iCol < 0 || iLine > ((QMultiLineEdit *)widget())->numLines())
+ if(iLine < 0 || iCol < 0 || iLine > ((KviTalMultiLineEdit *)widget())->numLines())
c->warning("No such line number");
else
- ((QMultiLineEdit *)widget())->insertAt(szInsert,iLine,iCol);
+ ((KviTalMultiLineEdit *)widget())->insertAt(szInsert,iLine,iCol);
return true;
}
bool KviKvsObject_mledit::functionNumLines(KviKvsObjectFunctionCall *c)
{
- if(widget()) c->returnValue()->setInteger(((QMultiLineEdit *)widget())->numLines());
+ if(widget()) c->returnValue()->setInteger(((KviTalMultiLineEdit *)widget())->numLines());
return true;
}
@@ -428,7 +437,7 @@ bool KviKvsObject_mledit::functionSetCursorPosition(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("mark",KVS_PT_BOOL,0,bFlag)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QMultiLineEdit *)widget())->setCursorPosition(iLine, iCol, bFlag);
+ ((KviTalMultiLineEdit *)widget())->setCursorPosition(iLine, iCol, bFlag);
return true;
}
@@ -437,9 +446,9 @@ bool KviKvsObject_mledit::functionCursorPosition(KviKvsObjectFunctionCall *c)
if(!widget()) return true;
int line, col;
#if QT_VERSION >= 300
- ((QMultiLineEdit *)widget())->getCursorPosition(&line, &col);
+ ((KviTalMultiLineEdit *)widget())->getCursorPosition(&line, &col);
#else
- ((QMultiLineEdit *)widget())->cursorPosition(&line, &col);
+ ((KviTalMultiLineEdit *)widget())->cursorPosition(&line, &col);
#endif
KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)line));
@@ -451,14 +460,14 @@ bool KviKvsObject_mledit::functionCursorPosition(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionAtBeginning(KviKvsObjectFunctionCall *c)
{
if(!widget()) return true;
- c->returnValue()->setBoolean(((QMultiLineEdit *)widget())->atBeginning());
+ c->returnValue()->setBoolean(((KviTalMultiLineEdit *)widget())->atBeginning());
return true;
}
bool KviKvsObject_mledit::functionAtEnd(KviKvsObjectFunctionCall *c)
{
if(!widget()) return true;
- c->returnValue()->setBoolean(((QMultiLineEdit *)widget())->atEnd());
+ c->returnValue()->setBoolean(((KviTalMultiLineEdit *)widget())->atEnd());
return true;
}
@@ -470,13 +479,13 @@ bool KviKvsObject_mledit::functionSetWordWrap(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("word_wrap",KVS_PT_STRING,0,szWrap)
KVSO_PARAMETERS_END(c)
if(KviQString::equalCI(szWrap,"NoWrap"))
- ((QMultiLineEdit *)widget())->setWordWrap(QTextEdit::NoWrap);
+ ((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::NoWrap);
else if(KviQString::equalCI(szWrap,"WidgetWidth"))
- ((QMultiLineEdit *)widget())->setWordWrap(QTextEdit::WidgetWidth);
+ ((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::WidgetWidth);
else if(KviQString::equalCI(szWrap,"FixedPixelWidth"))
- ((QMultiLineEdit *)widget())->setWordWrap(QTextEdit::FixedPixelWidth);
+ ((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::FixedPixelWidth);
else if(KviQString::equalCI(szWrap,"FixedColumnWidth"))
- ((QMultiLineEdit *)widget())->setWordWrap(QTextEdit::FixedColumnWidth);
+ ((KviTalMultiLineEdit *)widget())->setWordWrap(KviTalMultiLineEdit::FixedColumnWidth);
else c->warning(__tr2qs("Unknown word wrap '%Q'"),&szWrap);
return true;
}
@@ -489,13 +498,13 @@ bool KviKvsObject_mledit::functionsetWrapPolicy(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("wrap_policy",KVS_PT_STRING,0,szPolicy)
KVSO_PARAMETERS_END(c)
if(KviQString::equalCI(szPolicy,"AtWhiteSpace)"))
- ((QMultiLineEdit *)widget())->setWrapPolicy(QTextEdit::AtWhiteSpace);
+ ((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::AtWhiteSpace);
else if(KviQString::equalCI(szPolicy,"Anywhere"))
- ((QMultiLineEdit *)widget())->setWrapPolicy(QTextEdit::Anywhere);
+ ((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::Anywhere);
else if(KviQString::equalCI(szPolicy,"AtWordBoundary"))
- ((QMultiLineEdit *)widget())->setWrapPolicy(QTextEdit::AtWordBoundary);
+ ((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::AtWordBoundary);
else if(KviQString::equalCI(szPolicy,"AtWordOrDocumentBoundary"))
- ((QMultiLineEdit *)widget())->setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary);
+ ((KviTalMultiLineEdit *)widget())->setWrapPolicy(KviTalMultiLineEdit::AtWordOrDocumentBoundary);
else c->warning(__tr2qs("Unknown wrap policy'%Q'"),&szPolicy);
return true;
}
@@ -503,21 +512,21 @@ bool KviKvsObject_mledit::functionsetWrapPolicy(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionWordWrap(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QMultiLineEdit *)widget())->wordWrap() & QMultiLineEdit::WidgetWidth);
+ c->returnValue()->setBoolean(((KviTalMultiLineEdit *)widget())->wordWrap() & KviTalMultiLineEdit::WidgetWidth);
return true;
}
bool KviKvsObject_mledit::functionText(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setString(((QMultiLineEdit *)widget())->text());
+ c->returnValue()->setString(((KviTalMultiLineEdit *)widget())->text());
return true;
}
bool KviKvsObject_mledit::functionLength(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setInteger(((QMultiLineEdit *)widget())->length());
+ c->returnValue()->setInteger(((KviTalMultiLineEdit *)widget())->length());
return true;
}
@@ -529,7 +538,7 @@ bool KviKvsObject_mledit::functionSetMaxLines(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("max_lines",KVS_PT_UNSIGNEDINTEGER,0,imaxLines)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QMultiLineEdit *)widget())->setMaxLines(imaxLines);
+ ((KviTalMultiLineEdit *)widget())->setMaxLines(imaxLines);
return true;
}
@@ -537,7 +546,7 @@ bool KviKvsObject_mledit::functionMaxLines(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setInteger(((QMultiLineEdit *)widget())->maxLines());
+ c->returnValue()->setInteger(((KviTalMultiLineEdit *)widget())->maxLines());
return true;
}
@@ -549,7 +558,7 @@ bool KviKvsObject_mledit::functionInsert(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szInsert)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->insert(szInsert);
+ ((KviTalMultiLineEdit *)widget())->insert(szInsert);
return true;
}
@@ -561,28 +570,28 @@ bool KviKvsObject_mledit::functionAppend(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szAppend)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->append(szAppend);
+ ((KviTalMultiLineEdit *)widget())->append(szAppend);
return true;
}
bool KviKvsObject_mledit::functionCopy(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QMultiLineEdit *)widget())->copy();
+ ((KviTalMultiLineEdit *)widget())->copy();
return true;
}
bool KviKvsObject_mledit::functionCut(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QMultiLineEdit *)widget())->cut();
+ ((KviTalMultiLineEdit *)widget())->cut();
return true;
}
bool KviKvsObject_mledit::functionPaste(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QMultiLineEdit *)widget())->paste();
+ ((KviTalMultiLineEdit *)widget())->paste();
return true;
}
//->Set Bold, Italic, Underline
@@ -593,7 +602,7 @@ bool KviKvsObject_mledit::functionsetBold(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bBold",KVS_PT_BOOL,0,bFlag)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setBold(bFlag);
+ ((KviTalMultiLineEdit *)widget())->setBold(bFlag);
return true;
}
bool KviKvsObject_mledit::functionsetUnderline(KviKvsObjectFunctionCall *c)
@@ -603,7 +612,7 @@ bool KviKvsObject_mledit::functionsetUnderline(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bUnderline",KVS_PT_BOOL,0,bFlag)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setUnderline(bFlag);
+ ((KviTalMultiLineEdit *)widget())->setUnderline(bFlag);
return true;
}
@@ -614,7 +623,7 @@ bool KviKvsObject_mledit::functionsetItalic(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bItalic",KVS_PT_BOOL,0,bFlag)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setItalic(bFlag);
+ ((KviTalMultiLineEdit *)widget())->setItalic(bFlag);
return true;
}
@@ -623,19 +632,19 @@ bool KviKvsObject_mledit::functionsetItalic(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionbold(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QMultiLineEdit *)widget())->bold());
+ c->returnValue()->setBoolean(((KviTalMultiLineEdit *)widget())->bold());
return true;
}
bool KviKvsObject_mledit::functionitalic(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QMultiLineEdit *)widget())->italic());
+ c->returnValue()->setBoolean(((KviTalMultiLineEdit *)widget())->italic());
return true;
}
bool KviKvsObject_mledit::functionunderline(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QMultiLineEdit *)widget())->underline());
+ c->returnValue()->setBoolean(((KviTalMultiLineEdit *)widget())->underline());
return true;
}
//->Zoom In, out at
@@ -647,9 +656,9 @@ bool KviKvsObject_mledit::functionzoomIn(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
if (!iZoom)
- ((QMultiLineEdit *)object())->zoomIn();
+ ((KviTalMultiLineEdit *)object())->zoomIn();
else
- ((QMultiLineEdit *)object())->zoomIn(iZoom);
+ ((KviTalMultiLineEdit *)object())->zoomIn(iZoom);
return true;
}
@@ -661,9 +670,9 @@ bool KviKvsObject_mledit::functionzoomOut(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
if (!iZoom)
- ((QMultiLineEdit *)object())->zoomOut();
+ ((KviTalMultiLineEdit *)object())->zoomOut();
else
- ((QMultiLineEdit *)object())->zoomOut(iZoom);
+ ((KviTalMultiLineEdit *)object())->zoomOut(iZoom);
return true;
}
bool KviKvsObject_mledit::functionzoomTo(KviKvsObjectFunctionCall *c)
@@ -673,7 +682,7 @@ bool KviKvsObject_mledit::functionzoomTo(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("zoom_size",KVS_PT_INT,0,iZoom)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)object())->zoomTo(iZoom);
+ ((KviTalMultiLineEdit *)object())->zoomTo(iZoom);
return true;
}
//-> Undo & Redo functions
@@ -681,31 +690,31 @@ bool KviKvsObject_mledit::functionzoomTo(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionundo(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QMultiLineEdit *)widget())->undo();
+ ((KviTalMultiLineEdit *)widget())->undo();
return true;
}
bool KviKvsObject_mledit::functionredo(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QMultiLineEdit *)widget())->redo();
+ ((KviTalMultiLineEdit *)widget())->redo();
return true;
}
bool KviKvsObject_mledit::functionclear(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QMultiLineEdit *)widget())->clear();
+ ((KviTalMultiLineEdit *)widget())->clear();
return true;
}
bool KviKvsObject_mledit::functiondel(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QMultiLineEdit *)widget())->del();
+ ((KviTalMultiLineEdit *)widget())->del();
return true;
}
bool KviKvsObject_mledit::functionindent(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QMultiLineEdit *)widget())->indent();
+ ((KviTalMultiLineEdit *)widget())->indent();
return true;
}
@@ -716,26 +725,26 @@ bool KviKvsObject_mledit::functionsetUndoRedoEnabled(KviKvsObjectFunctionCall *c
KVSO_PARAMETER("bUndoredo",KVS_PT_BOOL,0,bFlag)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setUndoRedoEnabled(bFlag);
+ ((KviTalMultiLineEdit *)widget())->setUndoRedoEnabled(bFlag);
return true;
}
bool KviKvsObject_mledit::functionisUndoRedoEnabled(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QMultiLineEdit *)widget())->isUndoRedoEnabled());
+ c->returnValue()->setBoolean(((KviTalMultiLineEdit *)widget())->isUndoRedoEnabled());
return true;
}
bool KviKvsObject_mledit::functionisUndoAvailable(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QMultiLineEdit *)widget())->isUndoAvailable());
+ c->returnValue()->setBoolean(((KviTalMultiLineEdit *)widget())->isUndoAvailable());
return true;
}
bool KviKvsObject_mledit::functionisRedoAvailable(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QMultiLineEdit *)widget())->isRedoAvailable());
+ c->returnValue()->setBoolean(((KviTalMultiLineEdit *)widget())->isRedoAvailable());
return true;
}
bool KviKvsObject_mledit::functionsetUndoDepth(KviKvsObjectFunctionCall *c)
@@ -745,14 +754,14 @@ bool KviKvsObject_mledit::functionsetUndoDepth(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("undo_depth",KVS_PT_UNSIGNEDINTEGER,0,iDepth)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)object())->setUndoDepth(iDepth);
+ ((KviTalMultiLineEdit *)object())->setUndoDepth(iDepth);
return true;
}
bool KviKvsObject_mledit::functionundoDepth(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setInteger(((QMultiLineEdit *)widget())->undoDepth());
+ c->returnValue()->setInteger(((KviTalMultiLineEdit *)widget())->undoDepth());
return true;
}
@@ -765,7 +774,7 @@ bool KviKvsObject_mledit::functionsetText(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setText(szText);
+ ((KviTalMultiLineEdit *)widget())->setText(szText);
return true;
}
bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c)
@@ -822,7 +831,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Not an hex digits"));
return true;
}
- if (widget()) ((QMultiLineEdit *)widget())->setColor(QColor(iColR,iColG,iColB));
+ if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(QColor(iColR,iColG,iColB));
return true;
}
if(c->params()->count() < 3)
@@ -836,7 +845,7 @@ bool KviKvsObject_mledit::functionsetColor(KviKvsObjectFunctionCall *c)
return false;
}
}
- if (widget()) ((QMultiLineEdit *)widget())->setColor(QColor(iColR,iColG,iColB));
+ if (widget()) ((KviTalMultiLineEdit *)widget())->setColor(QColor(iColR,iColG,iColB));
return true;
}
@@ -847,7 +856,7 @@ bool KviKvsObject_mledit::functionsetPointSize(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("point_size",KVS_PT_UNSIGNEDINTEGER,0,uPointSize)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setPointSize(uPointSize);
+ ((KviTalMultiLineEdit *)widget())->setPointSize(uPointSize);
return true;
}
@@ -858,7 +867,7 @@ bool KviKvsObject_mledit::functionsetLinkUnderline(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bLinkunderline",KVS_PT_BOOL,0,bFlag)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setLinkUnderline(bFlag);
+ ((KviTalMultiLineEdit *)widget())->setLinkUnderline(bFlag);
return true;
}
@@ -869,7 +878,7 @@ bool KviKvsObject_mledit::functionsetFamily(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("family",KVS_PT_STRING,0,szFamily)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setFamily(szFamily);
+ ((KviTalMultiLineEdit *)widget())->setFamily(szFamily);
return true;
}
@@ -880,7 +889,7 @@ bool KviKvsObject_mledit::functionsetModified(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bModified",KVS_PT_BOOL,0,bFlag)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setModified(bFlag);
+ ((KviTalMultiLineEdit *)widget())->setModified(bFlag);
return true;
}
@@ -893,7 +902,7 @@ bool KviKvsObject_mledit::functioninsertParagraph(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("paragraph",KVS_PT_INT,0,iParagraph)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QMultiLineEdit *)widget())->insertParagraph(szText,iParagraph);
+ ((KviTalMultiLineEdit *)widget())->insertParagraph(szText,iParagraph);
return true;
}
@@ -904,7 +913,7 @@ bool KviKvsObject_mledit::functionremoveParagraph(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("paragraph",KVS_PT_INT,0,iParagraph)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QMultiLineEdit*)widget())->removeParagraph(iParagraph);
+ ((KviTalMultiLineEdit*)widget())->removeParagraph(iParagraph);
return true;
}
@@ -915,7 +924,7 @@ bool KviKvsObject_mledit::functionsetOverwriteMode(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bOverwritemode",KVS_PT_BOOL,0,bFlag)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->setOverwriteMode(bFlag);
+ ((KviTalMultiLineEdit *)widget())->setOverwriteMode(bFlag);
return true;
}
@@ -923,7 +932,7 @@ bool KviKvsObject_mledit::functiontextFormat(KviKvsObjectFunctionCall *c)
{
if(!widget())return true;
- int fstyle = ((QMultiLineEdit *)widget())->textFormat();
+ int fstyle = ((KviTalMultiLineEdit *)widget())->textFormat();
QString format="";
for(unsigned int i = 0; i < mod_num; i++)
{
@@ -945,13 +954,13 @@ bool KviKvsObject_mledit::functionsetTextFormat(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
if(KviQString::equalCI(szFormat,"PlainText"))
- ((QMultiLineEdit *)widget())->setTextFormat(Qt::PlainText);
+ ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::PlainText);
else if(KviQString::equalCI(szFormat,"RichText"))
- ((QMultiLineEdit *)widget())->setTextFormat(Qt::RichText);
+ ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::RichText);
else if(KviQString::equalCI(szFormat,"LogText"))
- ((QMultiLineEdit *)widget())->setTextFormat(Qt::LogText);
+ ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::LogText);
else if(KviQString::equalCI(szFormat,"AutoText"))
- ((QMultiLineEdit *)widget())->setTextFormat(Qt::AutoText);
+ ((KviTalMultiLineEdit *)widget())->setTextFormat(Qt::AutoText);
else c->warning(__tr2qs("Unknown text format '%Q'"),&szFormat);
return true;
}
@@ -1011,7 +1020,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti
c->warning(__tr2qs("Not an hex digits"));
return true;
}
- if (widget()) ((QMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,QColor(iColR,iColG,iColB));
+ if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,QColor(iColR,iColG,iColB));
return true;
}
if(c->params()->count() < 3)
@@ -1025,7 +1034,7 @@ bool KviKvsObject_mledit::functionsetParagraphBackgroundColor(KviKvsObjectFuncti
return false;
}
}
- if (widget()) ((QMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,QColor(iColR,iColG,iColB));
+ if (widget()) ((KviTalMultiLineEdit *)widget())->setParagraphBackgroundColor(iParagraph,QColor(iColR,iColG,iColB));
return true;
}
@@ -1036,7 +1045,7 @@ bool KviKvsObject_mledit::functionclearParagraphBackground(KviKvsObjectFunctionC
KVSO_PARAMETER("paragraph",KVS_PT_INT,0,iParagraph)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QMultiLineEdit*)widget())->clearParagraphBackground(iParagraph);
+ ((KviTalMultiLineEdit*)widget())->clearParagraphBackground(iParagraph);
return true;
}
@@ -1063,7 +1072,7 @@ bool KviKvsObject_mledit::functionloadFile(KviKvsObjectFunctionCall *c)
QString txt = ts.read();
if ( !QStyleSheet::mightBeRichText( txt ) )
txt = QStyleSheet::convertFromPlainText( txt, QStyleSheetItem::WhiteSpacePre );
- ((QMultiLineEdit *)widget())->setText( txt );
+ ((KviTalMultiLineEdit *)widget())->setText( txt );
file.close();
return true;
}
@@ -1077,13 +1086,13 @@ bool KviKvsObject_mledit::functionsetAlignment(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
if(KviQString::equalCI(szAlignment,"Left"))
- ((QMultiLineEdit *)widget())->setAlignment(Qt::AlignLeft);
+ ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignLeft);
else if(KviQString::equalCI(szAlignment,"Right"))
- ((QMultiLineEdit *)widget())->setAlignment(Qt::AlignRight);
+ ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignRight);
else if(KviQString::equalCI(szAlignment,"Center"))
- ((QMultiLineEdit *)widget())->setAlignment(Qt::AlignCenter);
+ ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignCenter);
else if(KviQString::equalCI(szAlignment,"Justify"))
- ((QMultiLineEdit *)widget())->setAlignment(Qt::AlignJustify);
+ ((KviTalMultiLineEdit *)widget())->setAlignment(Qt::AlignJustify);
else c->warning(__tr2qs("Unknown alignment '%Q'"),&szAlignment);
return true;
}
@@ -1097,11 +1106,11 @@ bool KviKvsObject_mledit::functionsetAutoFormatting(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
if(KviQString::equalCI(szAutoformatting,"AutoNone"))
- ((QMultiLineEdit *)widget())->setAlignment(QTextEdit::AutoNone);
+ ((KviTalMultiLineEdit *)widget())->setAlignment(KviTalMultiLineEdit::AutoNone);
else if(KviQString::equalCI(szAutoformatting,"BulletList"))
- ((QMultiLineEdit *)widget())->setAlignment(QTextEdit::AutoBulletList);
+ ((KviTalMultiLineEdit *)widget())->setAlignment(KviTalMultiLineEdit::AutoBulletList);
else if(KviQString::equalCI(szAutoformatting,"AutoAll"))
- ((QMultiLineEdit *)widget())->setAlignment(QTextEdit::AutoAll);
+ ((KviTalMultiLineEdit *)widget())->setAlignment(KviTalMultiLineEdit::AutoAll);
else c->warning(__tr2qs("Unknown auto formatting mode '%Q'"),&szAutoformatting);
return true;
}
@@ -1115,11 +1124,11 @@ bool KviKvsObject_mledit::functionsetVerticalAlignment(KviKvsObjectFunctionCall
KVSO_PARAMETERS_END(c)
if(!widget()) return true;
if(KviQString::equalCI(szValignment,"Normal"))
- ((QMultiLineEdit *)widget())->setVerticalAlignment(QTextEdit::AlignNormal);
+ ((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignNormal);
else if(KviQString::equalCI(szValignment,"SuperScript"))
- ((QMultiLineEdit *)widget())->setVerticalAlignment(QTextEdit::AlignSuperScript);
+ ((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSuperScript);
else if(KviQString::equalCI(szValignment,"SubScript"))
- ((QMultiLineEdit *)widget())->setVerticalAlignment(QTextEdit::AlignSubScript);
+ ((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSubScript);
else c->warning(__tr2qs("Unknown vertical alignment '%Q'"),&szValignment);
return true;
}
@@ -1127,7 +1136,7 @@ bool KviKvsObject_mledit::functionsetVerticalAlignment(KviKvsObjectFunctionCall
bool KviKvsObject_mledit::functionparagraphs(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setInteger(((QMultiLineEdit *)widget())->paragraphs());
+ c->returnValue()->setInteger(((KviTalMultiLineEdit *)widget())->paragraphs());
return true;
}
@@ -1135,7 +1144,7 @@ bool KviKvsObject_mledit::functionparagraphs(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionlines(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setInteger(((QMultiLineEdit *)widget())->lines());
+ c->returnValue()->setInteger(((KviTalMultiLineEdit *)widget())->lines());
return true;
}
@@ -1147,7 +1156,7 @@ bool KviKvsObject_mledit::functionlineOfChar(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("index",KVS_PT_INT,0,iIndex)
KVSO_PARAMETERS_END(c)
if (widget())
- c->returnValue()->setInteger(((QMultiLineEdit *)widget())->lineOfChar(iPara,iIndex));
+ c->returnValue()->setInteger(((KviTalMultiLineEdit *)widget())->lineOfChar(iPara,iIndex));
return true;
}
@@ -1158,7 +1167,7 @@ bool KviKvsObject_mledit::functionlinesOfParagraph(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("paragraph",KVS_PT_INT,0,iLine)
KVSO_PARAMETERS_END(c)
if(widget())
- c->returnValue()->setInteger(((QMultiLineEdit *)widget())->linesOfParagraph(iLine));
+ c->returnValue()->setInteger(((KviTalMultiLineEdit *)widget())->linesOfParagraph(iLine));
return true;
}
@@ -1170,7 +1179,7 @@ bool KviKvsObject_mledit::functionparagraphLength(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("paragraph",KVS_PT_INT,0,iParagraph)
KVSO_PARAMETERS_END(c)
if(widget())
- c->returnValue()->setInteger(((QMultiLineEdit *)widget())->paragraphLength(iParagraph));
+ c->returnValue()->setInteger(((KviTalMultiLineEdit *)widget())->paragraphLength(iParagraph));
return true;
}
@@ -1182,7 +1191,7 @@ bool KviKvsObject_mledit::functionselectAll(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bSelectall",KVS_PT_BOOL,0,bFlag)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QMultiLineEdit *)widget())->selectAll(bFlag);
+ ((KviTalMultiLineEdit *)widget())->selectAll(bFlag);
return true;
}
diff --git a/src/modules/objects/class_multilineedit.h b/src/modules/objects/class_multilineedit.h
index aa308ddf5..c3abb6afd 100644
--- a/src/modules/objects/class_multilineedit.h
+++ b/src/modules/objects/class_multilineedit.h
@@ -27,7 +27,6 @@
#include "class_widget.h"
-#include <qmultilineedit.h>
#include "object_macros.h"
class KviKvsObject_mledit : public KviKvsObject_widget
diff --git a/src/modules/objects/class_wizard.cpp b/src/modules/objects/class_wizard.cpp
index fb56a57de..83117af97 100644
--- a/src/modules/objects/class_wizard.cpp
+++ b/src/modules/objects/class_wizard.cpp
@@ -21,7 +21,7 @@
// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
-#include <qwizard.h>
+#include <kvi_tal_wizard.h>
#include <qpushbutton.h>
#include "class_wizard.h"
#include "kvi_error.h"
@@ -147,7 +147,7 @@ bool KviKvsObject_wizard::functionaddPage(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- ((QWizard *)widget())->addPage(((QWidget *)(ob->object())),szLabel);
+ ((KviTalWizard *)widget())->addPage(((QWidget *)(ob->object())),szLabel);
return true;
}
bool KviKvsObject_wizard::functioninsertPage(KviKvsObjectFunctionCall *c)
@@ -168,7 +168,7 @@ bool KviKvsObject_wizard::functioninsertPage(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Can't add a non-widget object"));
return true;
}
- ((QWizard *)widget())->insertPage(((QWidget *)(ob->object())),szLabel,uIndex);
+ ((KviTalWizard *)widget())->insertPage(((QWidget *)(ob->object())),szLabel,uIndex);
return true;
}
@@ -186,7 +186,7 @@ bool KviKvsObject_wizard::functionremovePage(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Not a widget object"));
return true;
}
- ((QWizard *)widget())->removePage(((QWidget *)(ob->object())));
+ ((KviTalWizard *)widget())->removePage(((QWidget *)(ob->object())));
return true;
}
bool KviKvsObject_wizard::functionsetTitle(KviKvsObjectFunctionCall *c)
@@ -205,7 +205,7 @@ bool KviKvsObject_wizard::functionsetTitle(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((QWizard *)widget())->setTitle(((QWidget *)(ob->object())),szTitle);
+ ((KviTalWizard *)widget())->setTitle(((QWidget *)(ob->object())),szTitle);
return true;
}
bool KviKvsObject_wizard::functionsetBackEnabled(KviKvsObjectFunctionCall *c)
@@ -224,7 +224,7 @@ bool KviKvsObject_wizard::functionsetBackEnabled(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((QWizard *)widget())->setBackEnabled(((QWidget *)(ob->object())),bEnabled);
+ ((KviTalWizard *)widget())->setBackEnabled(((QWidget *)(ob->object())),bEnabled);
return true;
}
@@ -244,7 +244,7 @@ bool KviKvsObject_wizard::functionsetNextEnabled(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((QWizard *)widget())->setNextEnabled(((QWidget *)(ob->object())),bEnabled);
+ ((KviTalWizard *)widget())->setNextEnabled(((QWidget *)(ob->object())),bEnabled);
return true;
}
bool KviKvsObject_wizard::functionsetFinishEnabled(KviKvsObjectFunctionCall *c)
@@ -263,7 +263,7 @@ bool KviKvsObject_wizard::functionsetFinishEnabled(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((QWizard *)widget())->setFinishEnabled(((QWidget *)(ob->object())),bEnabled);
+ ((KviTalWizard *)widget())->setFinishEnabled(((QWidget *)(ob->object())),bEnabled);
return true;
}
bool KviKvsObject_wizard::functionsetHelpEnabled(KviKvsObjectFunctionCall *c)
@@ -282,7 +282,7 @@ bool KviKvsObject_wizard::functionsetHelpEnabled(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Widget object required"));
return true;
}
- ((QWizard *)widget())->setHelpEnabled(((QWidget *)(ob->object())),bEnabled);
+ ((KviTalWizard *)widget())->setHelpEnabled(((QWidget *)(ob->object())),bEnabled);
return true;
}
bool KviKvsObject_wizard::functionsetBackBtnText(KviKvsObjectFunctionCall *c)
@@ -292,7 +292,7 @@ bool KviKvsObject_wizard::functionsetBackBtnText(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QWizard *)widget())->QWizard::backButton()->setText(szText);
+ ((KviTalWizard *)widget())->KviTalWizard::backButton()->setText(szText);
return true;
}
bool KviKvsObject_wizard::functionsetNextBtnText(KviKvsObjectFunctionCall *c)
@@ -302,7 +302,7 @@ bool KviKvsObject_wizard::functionsetNextBtnText(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QWizard *)widget())->QWizard::nextButton()->setText(szText);
+ ((KviTalWizard *)widget())->KviTalWizard::nextButton()->setText(szText);
return true;
}
bool KviKvsObject_wizard::functionsetHelpBtnText(KviKvsObjectFunctionCall *c)
@@ -312,7 +312,7 @@ bool KviKvsObject_wizard::functionsetHelpBtnText(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QWizard *)widget())->QWizard::helpButton()->setText(szText);
+ ((KviTalWizard *)widget())->KviTalWizard::helpButton()->setText(szText);
return true;
}
bool KviKvsObject_wizard::functionsetFinishBtnText(KviKvsObjectFunctionCall *c)
@@ -322,7 +322,7 @@ bool KviKvsObject_wizard::functionsetFinishBtnText(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QWizard *)widget())->QWizard::finishButton()->setText(szText);
+ ((KviTalWizard *)widget())->KviTalWizard::finishButton()->setText(szText);
return true;
}
bool KviKvsObject_wizard::accept()
@@ -360,7 +360,7 @@ void KviKvsObject_wizard::backClicked()
callFunction(this,"backClickedEvent",params);
}
KviKvsMdmWizard::KviKvsMdmWizard(QWidget * par,const char * name,KviKvsObject_wizard * parent)
-:QWizard( par,name)
+:KviTalWizard( par,name)
{
m_pParentScript=parent;
connect (this->backButton(),SIGNAL(clicked()),this,SLOT(slotBackClicked()));
@@ -368,12 +368,12 @@ KviKvsMdmWizard::KviKvsMdmWizard(QWidget * par,const char * name,KviKvsObject_wi
}
void KviKvsMdmWizard::accept()
{
- if(m_pParentScript->accept())QWizard::accept();
+ if(m_pParentScript->accept())KviTalWizard::accept();
}
void KviKvsMdmWizard::reject()
{
- if(m_pParentScript->reject())QWizard::reject();
+ if(m_pParentScript->reject())KviTalWizard::reject();
}
void KviKvsMdmWizard::slotNextClicked()
diff --git a/src/modules/objects/class_wizard.h b/src/modules/objects/class_wizard.h
index 047b0dfb4..63c88fd96 100644
--- a/src/modules/objects/class_wizard.h
+++ b/src/modules/objects/class_wizard.h
@@ -22,7 +22,7 @@
// along with this program. If not, write to the Free Software Foundation,
// Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
-#include <qwizard.h>
+#include <kvi_tal_wizard.h>
#include "class_widget.h"
@@ -61,7 +61,7 @@ protected:
bool functionbackClickedEvent(KviKvsObjectFunctionCall *c);
};
-class KviKvsMdmWizard : public QWizard
+class KviKvsMdmWizard : public KviTalWizard
{
Q_OBJECT
diff --git a/src/modules/options/container.cpp b/src/modules/options/container.cpp
index e2af1c140..ef66a61ef 100644
--- a/src/modules/options/container.cpp
+++ b/src/modules/options/container.cpp
@@ -30,6 +30,11 @@
#include <qlayout.h>
#include <qpushbutton.h>
#include <qtooltip.h>
+#include <qevent.h>
+
+#ifdef COMPILE_USE_QT4
+ #include <qdesktopwidget.h>
+#endif
extern KviOptionsInstanceManager * g_pOptionsInstanceManager;
diff --git a/src/modules/options/dialog.cpp b/src/modules/options/dialog.cpp
index 010c06b58..5614fe61b 100644
--- a/src/modules/options/dialog.cpp
+++ b/src/modules/options/dialog.cpp
@@ -34,7 +34,7 @@
#include "kvi_ptrdict.h"
#include <qlayout.h>
-#include <qaccel.h>
+#include "kvi_accel.h"
#include <qlabel.h>
#include "kvi_tal_vbox.h"
#include <qsplitter.h>
@@ -50,6 +50,7 @@
#include <qobjectlist.h>
#include <qpainter.h>
#include <qfont.h>
+#include <qevent.h>
//extern KviModule * g_pOptionsModule;
@@ -64,7 +65,7 @@ KviGeneralOptionsFrontWidget::KviGeneralOptionsFrontWidget(QWidget *parent,const
createLayout(1,1);
QLabel * l = new QLabel(szText,this);
- l->setAlignment(AlignTop);
+ l->setAlignment(Qt::AlignTop);
layout()->addWidget(l,0,0);
}
@@ -281,8 +282,8 @@ KviOptionsDialog::KviOptionsDialog(QWidget * par,const QString &szGroup)
KVI_OPTION_RECT(KviOption_rectGeneralOptionsDialogGeometry).y());
}
- QAccel *a = new QAccel( this );
- a->connectItem( a->insertItem(Key_Escape), this,SLOT(close()) );
+ KviAccel *a = new KviAccel( this );
+ a->connectItem( a->insertItem(Qt::Key_Escape), this,SLOT(close()) );
}
KviOptionsDialog::~KviOptionsDialog()
diff --git a/src/modules/options/optw_servers.cpp b/src/modules/options/optw_servers.cpp
index 2c11230d3..5927be5e2 100644
--- a/src/modules/options/optw_servers.cpp
+++ b/src/modules/options/optw_servers.cpp
@@ -102,7 +102,7 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(QWidget * par,KviIrcNetwork * n
QLabel * l = new QLabel(szTmp,this);
l->setFrameStyle(QFrame::Raised | QFrame::StyledPanel);
- l->setAlignment(AlignCenter);
+ l->setAlignment(Qt::AlignCenter);
l->setMargin(10);
g->addMultiCellWidget(l,0,0,0,3);
l->setMinimumWidth(200);
@@ -451,7 +451,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(QWidget * par,KviIrcServer * s)
m_pHeaderLabel = new QLabel("",this); // the text will be set later
m_pHeaderLabel->setFrameStyle(QFrame::Raised | QFrame::StyledPanel);
- m_pHeaderLabel->setAlignment(AlignCenter);
+ m_pHeaderLabel->setAlignment(Qt::AlignCenter);
m_pHeaderLabel->setMargin(10);
g->addMultiCellWidget(m_pHeaderLabel,0,0,0,3);
m_pHeaderLabel->setMinimumWidth(200);
diff --git a/src/modules/reguser/edituser.cpp b/src/modules/reguser/edituser.cpp
index 3bc6d2532..e1101c58c 100644
--- a/src/modules/reguser/edituser.cpp
+++ b/src/modules/reguser/edituser.cpp
@@ -205,7 +205,7 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m)
QGridLayout * g = new QGridLayout(this,3,2,4,4);
QLabel * l = new QLabel(__tr2qs("Insert a mask for this user.<br>It can contain the wildcard characters '*' and '?'."),this);
- //l->setAlignment(AlignCenter);
+ //l->setAlignment(Qt::AlignCenter);
g->addMultiCellWidget(l,0,0,0,1);
KviTalHBox * b = new KviTalHBox(this);
@@ -213,29 +213,29 @@ KviReguserMaskDialog::KviReguserMaskDialog(QWidget * p,KviIrcMask * m)
m_pNickEdit = new QLineEdit(b);
//m_pNickEdit->setMinimumWidth(120);
- m_pNickEdit->setAlignment(AlignRight);
+ m_pNickEdit->setAlignment(Qt::AlignRight);
#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pNickEdit,__tr2qs("<center>This the <b>nickname</b> that will match this user, default value is the registered name.</center>"));
#endif
l = new QLabel("<center><b>!</b></center>",b);
- l->setAlignment(AlignCenter);
+ l->setAlignment(Qt::AlignCenter);
//l->setMinimumWidth(40);
m_pUserEdit = new QLineEdit(b);
//m_pUserEdit->setMinimumWidth(120);
- m_pUserEdit->setAlignment(AlignCenter);
+ m_pUserEdit->setAlignment(Qt::AlignCenter);
#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pUserEdit,__tr2qs("<center>This the <b>username</b> that will match this user. <b>*</b> will match any username.</center>"));
#endif
l = new QLabel("<center><b>@</b></center>",b);
- l->setAlignment(AlignCenter);
+ l->setAlignment(Qt::AlignCenter);
//l->setMinimumWidth(40);
m_pHostEdit = new QLineEdit(b);
//m_pHostEdit->setMinimumWidth(120);
- m_pHostEdit->setAlignment(AlignLeft);
+ m_pHostEdit->setAlignment(Qt::AlignLeft);
#ifdef COMPILE_INFO_TIPS
QToolTip::add(m_pHostEdit,__tr2qs("<center>This the <b>hostname</b> that will match this user. <b>*</b> will match any hostname.</center>"));
#endif
@@ -301,7 +301,7 @@ void KviReguserMaskDialog::okClicked()
KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(QWidget *p,KviRegisteredUser * r,bool bModal)
-: QTabDialog(p,"reguser_entry_editor",bModal)
+: KviTalTabDialog(p,"reguser_entry_editor",bModal)
{
m_pUser = r;
m_pCustomColor = new QColor();
diff --git a/src/modules/reguser/edituser.h b/src/modules/reguser/edituser.h
index 5fa2af4be..9bf37c8ab 100644
--- a/src/modules/reguser/edituser.h
+++ b/src/modules/reguser/edituser.h
@@ -34,7 +34,7 @@
#include "kvi_tal_listview.h"
#include "kvi_tal_listbox.h"
#include "kvi_dict.h"
-#include <qtabdialog.h>
+#include <kvi_tal_tabdialog.h>
#include <qtable.h>
#include "kvi_tal_popupmenu.h"
@@ -133,7 +133,7 @@ public:
};
-class KviRegisteredUserEntryDialog : public QTabDialog
+class KviRegisteredUserEntryDialog : public KviTalTabDialog
{
Q_OBJECT
public:
diff --git a/src/modules/reguser/wizard.cpp b/src/modules/reguser/wizard.cpp
index 2854b7b13..545f36242 100644
--- a/src/modules/reguser/wizard.cpp
+++ b/src/modules/reguser/wizard.cpp
@@ -46,7 +46,7 @@ extern KVIRC_API KviRegisteredUserDataBase * g_pRegisteredUserDataBase;
extern KviPtrList<KviRegistrationWizard> * g_pRegistrationWizardList;
KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegisteredUserDataBase * db,QWidget * par,bool bModal)
-: QWizard(par,"regusers_wizard",bModal)
+: KviTalWizard(par,"regusers_wizard",bModal)
{
m_pDb = db;
@@ -269,7 +269,7 @@ KviRegistrationWizard::~KviRegistrationWizard()
void KviRegistrationWizard::reject()
{
- QWizard::reject();
+ KviTalWizard::reject();
if(!m_bModal)delete this;
// hide();
// g_pApp->collectGarbage(this);
@@ -277,7 +277,7 @@ void KviRegistrationWizard::reject()
void KviRegistrationWizard::accept()
{
- QWizard::accept();
+ KviTalWizard::accept();
bool bLocalDb = true;
if(!m_pDb)
{
@@ -387,7 +387,7 @@ void KviRegistrationWizard::showEvent(QShowEvent *e)
{
if(height() < 420)resize(width(),420);
move((g_pApp->desktop()->width() - width())/2,(g_pApp->desktop()->height() - height())/2);
- QWizard::showEvent(e);
+ KviTalWizard::showEvent(e);
}
void KviRegistrationWizard::maskChanged(const QString &)
diff --git a/src/modules/reguser/wizard.h b/src/modules/reguser/wizard.h
index 0b97c3bcf..1ddbe0ba8 100644
--- a/src/modules/reguser/wizard.h
+++ b/src/modules/reguser/wizard.h
@@ -24,7 +24,7 @@
#include "kvi_string.h"
-#include <qwizard.h>
+#include <kvi_tal_wizard.h>
class KviPixmap;
class KviPixmapSelector;
@@ -37,7 +37,7 @@ class QLineEdit;
class QWidget;
class KviRegisteredUserDataBase;
-class KviRegistrationWizard : public QWizard
+class KviRegistrationWizard : public KviTalWizard
{
Q_OBJECT
public:
diff --git a/src/modules/rijndael/libkvirijndael.h b/src/modules/rijndael/libkvirijndael.h
index f6b7cd454..c3fd880a8 100644
--- a/src/modules/rijndael/libkvirijndael.h
+++ b/src/modules/rijndael/libkvirijndael.h
@@ -153,7 +153,7 @@
KviStr m_szDecryptKey;
bool m_bDecryptCBC;
public:
- virtual bool isCryptographicEngine(){ return false; }; // we need to return false since it doesn't use the CTRL+P escape
+ virtual bool isCryptographicEngine(){ return false; }; // we need to return false since it doesn't use the Qt::CTRL+P escape
virtual bool init(const char *encKey,int encKeyLen,const char *decKey,int decKeyLen);
virtual KviCryptEngine::EncryptResult encrypt(const char * plainText,KviStr &outBuffer);
virtual KviCryptEngine::DecryptResult decrypt(const char * inBuffer,KviStr &plainText);
diff --git a/src/modules/setup/setupwizard.cpp b/src/modules/setup/setupwizard.cpp
index 475debf85..d1bd90d32 100644
--- a/src/modules/setup/setupwizard.cpp
+++ b/src/modules/setup/setupwizard.cpp
@@ -36,7 +36,7 @@
#include "kvi_options.h"
#include "kvi_config.h"
-#include <qtextedit.h>
+#include <kvi_tal_textedit.h>
#include <qmessagebox.h>
#include <qdir.h>
#include <qpushbutton.h>
@@ -70,12 +70,12 @@ extern QString szUrl;
KviSetupPage::KviSetupPage(KviSetupWizard * w)
: KviTalHBox(w)
{
- // we need this to set localized text on buttons (see QT doc/ QWizard class)
- w->QWizard::backButton()->setText(__tr2qs("< &Back"));
- w->QWizard::nextButton()->setText(__tr2qs("&Next >"));
- w->QWizard::finishButton()->setText(__tr2qs("Finish"));
- w->QWizard::cancelButton()->setText(__tr2qs("Cancel"));
- //w->QWizard::helpButton()->setText(__tr2qs("Help"));
+ // we need this to set localized text on buttons (see QT doc/ KviTalWizard class)
+ w->KviTalWizard::backButton()->setText(__tr2qs("< &Back"));
+ w->KviTalWizard::nextButton()->setText(__tr2qs("&Next >"));
+ w->KviTalWizard::finishButton()->setText(__tr2qs("Finish"));
+ w->KviTalWizard::cancelButton()->setText(__tr2qs("Cancel"));
+ //w->KviTalWizard::helpButton()->setText(__tr2qs("Help"));
setSpacing(8);
@@ -107,7 +107,7 @@ KviSetupPage::~KviSetupPage()
KviSetupWizard::KviSetupWizard()
-: QWizard(0,0,true)
+: KviTalWizard(0,0,true)
{
QString szLabelText;
@@ -167,9 +167,9 @@ KviSetupWizard::KviSetupWizard()
"</ul></p>" \
"<p>The \"legalese\" version of the license is shown in the box below.</p>"));
- QTextEdit * ed = new QTextEdit(m_pLicense->m_pVBox);
+ KviTalTextEdit * ed = new KviTalTextEdit(m_pLicense->m_pVBox);
ed->setReadOnly(true);
- ed->setWordWrap(QTextEdit::NoWrap);
+ ed->setWordWrap(KviTalTextEdit::NoWrap);
QString szLicense;
QString szLicensePath;
g_pApp->getGlobalKvircDirectory(szLicensePath,KviApp::License,"COPYING");
@@ -784,7 +784,7 @@ void KviSetupWizard::reject()
__tr2qs("You have chosen to abort the setup.<br>KVIrc cannot run until you complete this procedure.<br><br>Do you really wish to abort?"),
QMessageBox::Yes,QMessageBox::No|QMessageBox::Default|QMessageBox::Escape) != QMessageBox::Yes)return;
- QWizard::reject();
+ KviTalWizard::reject();
}
void KviSetupWizard::accept()
@@ -969,7 +969,7 @@ void KviSetupWizard::accept()
#ifdef COMPILE_ON_WINDOWS
}
#endif
- QWizard::accept();
+ KviTalWizard::accept();
}
#include "setupwizard.moc"
diff --git a/src/modules/setup/setupwizard.h b/src/modules/setup/setupwizard.h
index 6d09e9840..476e969bf 100644
--- a/src/modules/setup/setupwizard.h
+++ b/src/modules/setup/setupwizard.h
@@ -23,7 +23,7 @@
//
-#include <qwizard.h>
+#include <kvi_tal_wizard.h>
#include "kvi_tal_vbox.h"
#include "kvi_tal_hbox.h"
#include "kvi_tal_groupbox.h"
@@ -59,7 +59,7 @@ public:
#define THEME_APPLY_HIRES 1
#define THEME_APPLY_LORES 2
-class KviSetupWizard : public QWizard
+class KviSetupWizard : public KviTalWizard
{
Q_OBJECT
public:
diff --git a/src/modules/theme/managementdialog.cpp b/src/modules/theme/managementdialog.cpp
index a3c004c34..4b0150731 100644
--- a/src/modules/theme/managementdialog.cpp
+++ b/src/modules/theme/managementdialog.cpp
@@ -41,7 +41,7 @@
#include <qpushbutton.h>
#include "kvi_tal_listbox.h"
#include <qlineedit.h>
-#include <qtextedit.h>
+#include <kvi_tal_textedit.h>
#include <qregexp.h>
#include <qmessagebox.h>
#include <qdir.h>
@@ -53,7 +53,7 @@
#include <qpainter.h>
#include <qtooltip.h>
#include <qimage.h>
-#include <qtextedit.h>
+#include <kvi_tal_textedit.h>
#include <qmultilineedit.h>
#include <qbuffer.h>
diff --git a/src/modules/theme/managementdialog.h b/src/modules/theme/managementdialog.h
index ef2fc37ec..7f363618e 100644
--- a/src/modules/theme/managementdialog.h
+++ b/src/modules/theme/managementdialog.h
@@ -34,11 +34,11 @@
#include <qcombobox.h>
#include "kvi_tal_popupmenu.h"
#include <qcursor.h>
-#include <qwizard.h>
+#include <kvi_tal_wizard.h>
class QLineEdit;
-class QTextEdit;
+class KviTalTextEdit;
class QPushButton;
class QLabel;
class QCheckBox;
diff --git a/src/modules/theme/packthemedialog.cpp b/src/modules/theme/packthemedialog.cpp
index 0efeb8bf5..43f80fa89 100644
--- a/src/modules/theme/packthemedialog.cpp
+++ b/src/modules/theme/packthemedialog.cpp
@@ -35,7 +35,7 @@
#include <qpainter.h>
#include <qtooltip.h>
#include <qimage.h>
-#include <qtextedit.h>
+#include <kvi_tal_textedit.h>
#include <qmultilineedit.h>
#include <qbuffer.h>
#include <qlabel.h>
@@ -61,7 +61,7 @@
KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPtrList<KviThemeInfo> * pThemeInfoList)
-: QWizard(pParent)
+: KviTalWizard(pParent)
{
m_pThemeInfoList = pThemeInfoList;
@@ -188,7 +188,7 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPtrList<KviThemeInfo
szThemesDescription += "</body></html>";
- QTextEdit * pTextEdit = new QTextEdit(pPage);
+ KviTalTextEdit * pTextEdit = new KviTalTextEdit(pPage);
pTextEdit->setPaper(QBrush(QColor(255,255,255)));
pTextEdit->setReadOnly(true);
pTextEdit->setText(szThemesDescription);
@@ -231,7 +231,7 @@ KviPackThemeDialog::KviPackThemeDialog(QWidget * pParent,KviPtrList<KviThemeInfo
pLabel->setText(__tr2qs_ctx("Description:","theme"));
pLayout->addWidget(pLabel,3,0);
- m_pPackageDescriptionEdit = new QTextEdit(pPage);
+ m_pPackageDescriptionEdit = new KviTalTextEdit(pPage);
m_pPackageDescriptionEdit->setText(szPackageDescription);
pLayout->addWidget(m_pPackageDescriptionEdit,3,1);
@@ -346,7 +346,7 @@ void KviPackThemeDialog::imageSelectionChanged(const QString &szImagePath)
void KviPackThemeDialog::accept()
{
if(!packTheme())return;
- QWizard::accept();
+ KviTalWizard::accept();
}
diff --git a/src/modules/theme/packthemedialog.h b/src/modules/theme/packthemedialog.h
index b3916dab6..083d42f39 100644
--- a/src/modules/theme/packthemedialog.h
+++ b/src/modules/theme/packthemedialog.h
@@ -29,16 +29,16 @@
#include "kvi_theme.h"
#include <qdialog.h>
-#include <qwizard.h>
+#include <kvi_tal_wizard.h>
class QLineEdit;
-class QTextEdit;
+class KviTalTextEdit;
class QLabel;
class QMultiLineEdit;
class KviFileSelector;
-class KviPackThemeDialog : public QWizard
+class KviPackThemeDialog : public KviTalWizard
{
Q_OBJECT
public:
@@ -52,7 +52,7 @@ protected:
QLabel * m_pImageLabel;
KviPtrList<KviThemeInfo> * m_pThemeInfoList;
QLineEdit * m_pPackageNameEdit;
- QTextEdit * m_pPackageDescriptionEdit;
+ KviTalTextEdit * m_pPackageDescriptionEdit;
QLineEdit * m_pPackageVersionEdit;
QLineEdit * m_pPackagerNameEdit;
QWidget * m_pImageSelectionPage;
diff --git a/src/modules/theme/savethemedialog.cpp b/src/modules/theme/savethemedialog.cpp
index 6e187fdb7..b40620c54 100644
--- a/src/modules/theme/savethemedialog.cpp
+++ b/src/modules/theme/savethemedialog.cpp
@@ -35,7 +35,7 @@
#include <qpainter.h>
#include <qtooltip.h>
#include <qimage.h>
-#include <qtextedit.h>
+#include <kvi_tal_textedit.h>
#include <qmultilineedit.h>
#include <qbuffer.h>
#include <qlabel.h>
@@ -60,7 +60,7 @@
KviSaveThemeDialog::KviSaveThemeDialog(QWidget * pParent)
-: QWizard(pParent)
+: KviTalWizard(pParent)
{
setCaption(__tr2qs_ctx("Save Current Theme - KVIrc","theme"));
setMinimumSize(400,350);
@@ -118,7 +118,7 @@ KviSaveThemeDialog::KviSaveThemeDialog(QWidget * pParent)
pLabel->setText(__tr2qs_ctx("Description:","theme"));
pLayout->addWidget(pLabel,3,0);
- m_pThemeDescriptionEdit = new QTextEdit(pPage);
+ m_pThemeDescriptionEdit = new KviTalTextEdit(pPage);
//m_pThemeDescriptionEdit->setText(szThemeDescription);
pLayout->addWidget(m_pThemeDescriptionEdit,3,1);
@@ -205,7 +205,7 @@ void KviSaveThemeDialog::imageSelectionChanged(const QString &szImagePath)
void KviSaveThemeDialog::accept()
{
if(!saveTheme())return;
- QWizard::accept();
+ KviTalWizard::accept();
}
diff --git a/src/modules/theme/savethemedialog.h b/src/modules/theme/savethemedialog.h
index 5e780f750..0e26ce44b 100644
--- a/src/modules/theme/savethemedialog.h
+++ b/src/modules/theme/savethemedialog.h
@@ -29,11 +29,11 @@
#include "kvi_theme.h"
#include <qdialog.h>
-#include <qwizard.h>
+#include <kvi_tal_wizard.h>
class QLineEdit;
-class QTextEdit;
+class KviTalTextEdit;
class QPushButton;
class QCheckBox;
class QLabel;
@@ -41,7 +41,7 @@ class QMultiLineEdit;
class KviFileSelector;
-class KviSaveThemeDialog : public QWizard
+class KviSaveThemeDialog : public KviTalWizard
{
Q_OBJECT
public:
@@ -52,7 +52,7 @@ protected:
KviFileSelector * m_pImageSelector;
QLabel * m_pImageLabel;
QLineEdit * m_pThemeNameEdit;
- QTextEdit * m_pThemeDescriptionEdit;
+ KviTalTextEdit * m_pThemeDescriptionEdit;
QLineEdit * m_pThemeVersionEdit;
QLineEdit * m_pAuthorNameEdit;
QWidget * m_pImageSelectionPage;
diff --git a/src/modules/toolbareditor/toolbareditor.cpp b/src/modules/toolbareditor/toolbareditor.cpp
index 895749e01..b979f9b8a 100644
--- a/src/modules/toolbareditor/toolbareditor.cpp
+++ b/src/modules/toolbareditor/toolbareditor.cpp
@@ -59,7 +59,7 @@ KviTrashcanLabel::KviTrashcanLabel(QWidget * p)
QToolTip::add(this,__tr2qs("Drop here the icons from the toolbars to remove them"));
setFrameStyle(QFrame::Sunken | QFrame::WinPanel);
setAcceptDrops(true);
- setAlignment(AlignCenter);
+ setAlignment(Qt::AlignCenter);
setMinimumSize(40,40);
m_uFlashCount = 0;
m_pFlashTimer = 0;