Second step, convert to tqt3 libraries.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
pull/1/head
gregory guy 4 years ago
parent a144151f6b
commit 007b664d64
No known key found for this signature in database
GPG Key ID: 3BCCA0F7AB4536F4

@ -1037,7 +1037,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes="" x_includes=""
x_libraries="" x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then elif test "$kde_use_qt_mac" = "yes"; then
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
dnl be included to get the information) --Sam dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp" CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@ -1069,19 +1069,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
AC_REQUIRE([KDE_USE_QT]) AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <ntqglobal.h>
#include <qapplication.h> #include <ntqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <ntqevent.h>
#include <qstring.h> #include <ntqstring.h>
#include <qstyle.h> #include <ntqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -1090,8 +1090,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <ntqcursor.h>
#include <qstylefactory.h> #include <ntqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -1178,22 +1178,22 @@ fi
if test -z "$3"; then if test -z "$3"; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300" kde_qt_verstring="TQT_VERSION >= 300"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then if test $kde_qtver = 1; then
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi fi
else else
kde_qt_verstring="$3" kde_qt_verstring="$3"
@ -1299,7 +1299,7 @@ AC_ARG_ENABLE(
USING_QT_MT="" USING_QT_MT=""
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host. dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS= KDE_MT_LDFLAGS=
@ -1362,7 +1362,7 @@ dnl ------------------------------------------------------------
fi fi
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host. dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then if test "x$kde_use_qt_mt" = "xyes"; then
@ -1433,9 +1433,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=ntqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=ntqglobal.h
fi fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@ -1987,7 +1987,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS" LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([ AC_TRY_LINK([
#include <qdom.h> #include <ntqdom.h>
], ],
[ [
QDomDocument doc; QDomDocument doc;
@ -2531,7 +2531,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK( AC_TRY_LINK(
[#include <qapplication.h>], [#include <ntqapplication.h>],
[ [
int argc; int argc;
char** argv; char** argv;
@ -4280,7 +4280,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl AC_TRY_RUN(dnl
[ [
#include <qimageio.h> #include <qimageio.h>
#include <qstring.h> #include <ntqstring.h>
int main() { int main() {
QString t = "hallo"; QString t = "hallo";
t.fill('t'); t.fill('t');
@ -5119,7 +5119,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir" kde_qtdir="$with_qt_dir"
fi fi
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR) AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR) AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR) AC_SUBST(QTDOCDIR)
@ -5140,7 +5140,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER) AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no KDE_HAS_DOXYGEN=no
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes KDE_HAS_DOXYGEN=yes
fi fi
AC_SUBST(KDE_HAS_DOXYGEN) AC_SUBST(KDE_HAS_DOXYGEN)

54
configure vendored

@ -689,7 +689,7 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*) | --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;; program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil) | -silent | --silent | --silen | --sile | --sil)
silent=yes ;; silent=yes ;;
@ -1264,7 +1264,7 @@ do
do do
case $ac_arg in case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil) | -silent | --silent | --silen | --sile | --sil)
continue ;; continue ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
@ -21477,22 +21477,22 @@ fi
if test -z ""; then if test -z ""; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300" kde_qt_verstring="TQT_VERSION >= 300"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then if test $kde_qtver = 1; then
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200" kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi fi
else else
kde_qt_verstring="" kde_qt_verstring=""
@ -28793,9 +28793,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=ntqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=ntqglobal.h
fi fi
@ -28864,19 +28864,19 @@ LIBS="$LIBS $LIBQT $KDE_MT_LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <ntqglobal.h>
#include <qapplication.h> #include <ntqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <ntqevent.h>
#include <qstring.h> #include <ntqstring.h>
#include <qstyle.h> #include <ntqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -28885,8 +28885,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <ntqcursor.h>
#include <qstylefactory.h> #include <ntqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -29033,19 +29033,19 @@ export LIBRARY_PATH
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <ntqglobal.h>
#include <qapplication.h> #include <ntqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <ntqevent.h>
#include <qstring.h> #include <ntqstring.h>
#include <qstyle.h> #include <ntqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -29054,8 +29054,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <ntqcursor.h>
#include <qstylefactory.h> #include <ntqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -29460,7 +29460,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */ /* end confdefs.h. */
#include <qapplication.h> #include <ntqapplication.h>
int int
main () main ()
{ {
@ -34546,7 +34546,7 @@ Try \`$0 --help' for more information." >&2;}
$ac_shift $ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;; ac_need_defaults=false;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \ -q | -quiet | --quiet | --tquie | --tqui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s) | -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;; ac_cs_silent=: ;;

@ -1,15 +1,15 @@
#include <qevent.h> #include <ntqevent.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qwhatsthis.h> #include <ntqwhatsthis.h>
#include <qtooltip.h> #include <ntqtooltip.h>
#include <kdialog.h> #include <kdialog.h>
#include <klocale.h> #include <klocale.h>
#include "keypad.h" #include "keypad.h"
CharButton::CharButton(const QString &text, QWidget *parent, const char *name) CharButton::CharButton(const TQString &text, TQWidget *parent, const char *name)
: QPushButton(text, parent, name) : TQPushButton(text, parent, name)
{ {
setAutoRepeat(true); setAutoRepeat(true);
setAccel(text); setAccel(text);
@ -22,30 +22,30 @@ void CharButton::emitClicked()
emit clicked(m_text); emit clicked(m_text);
} }
MathKeypad::MathKeypad(QWidget *parent, const char *name) MathKeypad::MathKeypad(TQWidget *parent, const char *name)
: QWidget(parent, name) : TQWidget(parent, name)
{ {
QVBoxLayout *vlayout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); TQVBoxLayout *vlayout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
QPushButton *focusButton = new QPushButton(i18n("Press to Focus Keypad"), this); TQPushButton *focusButton = new TQPushButton(i18n("Press to Focus Keypad"), this);
connect(focusButton, SIGNAL(clicked()), this, SLOT(setFocus())); connect(focusButton, SIGNAL(clicked()), this, SLOT(setFocus()));
vlayout->addWidget(focusButton); vlayout->addWidget(focusButton);
QGridLayout *midBox = new QGridLayout(vlayout, 5, 4, KDialog::spacingHint()); TQGridLayout *midBox = new TQGridLayout(vlayout, 5, 4, KDialog::spacingHint());
QPushButton *EnterButton = new QPushButton(i18n("Enter"), this); TQPushButton *EnterButton = new TQPushButton(i18n("Enter"), this);
EnterButton->setAccel(Key_Enter); EnterButton->setAccel(Key_Enter);
QWhatsThis::add(EnterButton, i18n("Enter expression onto stack")); TQWhatsThis::add(EnterButton, i18n("Enter expression onto stack"));
midBox->addMultiCellWidget(EnterButton, 0, 0, 0, 1); midBox->addMultiCellWidget(EnterButton, 0, 0, 0, 1);
connect(EnterButton, SIGNAL(clicked()), this, SIGNAL(enter())); connect(EnterButton, SIGNAL(clicked()), this, SIGNAL(enter()));
QPushButton *EEXButton = new QPushButton("&EEX", this); TQPushButton *EEXButton = new TQPushButton("&EEX", this);
QWhatsThis::add(EEXButton, i18n("Enters an E into line edit. When evaluated, the number directly before the E (no space on either side of the E) is multiplied by 10 raised to the number directly after the E. Only in Decimal mode.")); TQWhatsThis::add(EEXButton, i18n("Enters an E into line edit. When evaluated, the number directly before the E (no space on either side of the E) is multiplied by 10 raised to the number directly after the E. Only in Decimal mode."));
midBox->addWidget(EEXButton, 0, 2); midBox->addWidget(EEXButton, 0, 2);
connect(EEXButton, SIGNAL(clicked()), this, SIGNAL(eex())); connect(EEXButton, SIGNAL(clicked()), this, SIGNAL(eex()));
QPushButton *BackSpaceButton = new QPushButton("<-", this); TQPushButton *BackSpaceButton = new TQPushButton("<-", this);
QToolTip::add(BackSpaceButton, i18n("Inversed: Clear")); TQToolTip::add(BackSpaceButton, i18n("Inversed: Clear"));
BackSpaceButton->setAutoRepeat(true); BackSpaceButton->setAutoRepeat(true);
BackSpaceButton->setAccel(Key_Backspace); BackSpaceButton->setAccel(Key_Backspace);
midBox->addWidget(BackSpaceButton, 0, 3); midBox->addWidget(BackSpaceButton, 0, 3);
@ -53,71 +53,71 @@ MathKeypad::MathKeypad(QWidget *parent, const char *name)
CharButton *PeriodButton = new CharButton(".", this); CharButton *PeriodButton = new CharButton(".", this);
PeriodButton->setAccel(Key_Period); PeriodButton->setAccel(Key_Period);
connect(PeriodButton, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(PeriodButton, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(PeriodButton, 4, 2); midBox->addWidget(PeriodButton, 4, 2);
CharButton *SpaceButton = new CharButton(" ", this); CharButton *SpaceButton = new CharButton(" ", this);
SpaceButton->setText(i18n("Spc")); SpaceButton->setText(i18n("Spc"));
SpaceButton->setAccel(Key_Space); SpaceButton->setAccel(Key_Space);
connect(SpaceButton, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(SpaceButton, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(SpaceButton, 4, 1); midBox->addWidget(SpaceButton, 4, 1);
CharButton *KP0Button = new CharButton(QString::number(0), this); CharButton *KP0Button = new CharButton(TQString::number(0), this);
connect(KP0Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP0Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP0Button, 4, 0); midBox->addWidget(KP0Button, 4, 0);
CharButton *KP1Button = new CharButton(QString::number(1), this); CharButton *KP1Button = new CharButton(TQString::number(1), this);
connect(KP1Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP1Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP1Button, 3, 0); midBox->addWidget(KP1Button, 3, 0);
CharButton *KP2Button = new CharButton(QString::number(2), this); CharButton *KP2Button = new CharButton(TQString::number(2), this);
connect(KP2Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP2Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP2Button, 3, 1); midBox->addWidget(KP2Button, 3, 1);
CharButton *KP3Button = new CharButton(QString::number(3), this); CharButton *KP3Button = new CharButton(TQString::number(3), this);
connect(KP3Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP3Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP3Button, 3, 2); midBox->addWidget(KP3Button, 3, 2);
CharButton *KP4Button = new CharButton(QString::number(4), this); CharButton *KP4Button = new CharButton(TQString::number(4), this);
connect(KP4Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP4Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP4Button, 2, 0); midBox->addWidget(KP4Button, 2, 0);
CharButton *KP5Button = new CharButton(QString::number(5), this); CharButton *KP5Button = new CharButton(TQString::number(5), this);
connect(KP5Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP5Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP5Button, 2, 1); midBox->addWidget(KP5Button, 2, 1);
CharButton *KP6Button = new CharButton(QString::number(6), this); CharButton *KP6Button = new CharButton(TQString::number(6), this);
connect(KP6Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP6Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP6Button, 2, 2); midBox->addWidget(KP6Button, 2, 2);
CharButton *KP7Button = new CharButton(QString::number(7), this); CharButton *KP7Button = new CharButton(TQString::number(7), this);
connect(KP7Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP7Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP7Button, 1, 0); midBox->addWidget(KP7Button, 1, 0);
CharButton *KP8Button = new CharButton(QString::number(8), this); CharButton *KP8Button = new CharButton(TQString::number(8), this);
connect(KP8Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP8Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP8Button, 1, 1); midBox->addWidget(KP8Button, 1, 1);
CharButton *KP9Button = new CharButton(QString::number(9), this); CharButton *KP9Button = new CharButton(TQString::number(9), this);
connect(KP9Button, SIGNAL(clicked(const QString &)), this, SIGNAL(insertChar(const QString &))); connect(KP9Button, SIGNAL(clicked(const TQString &)), this, SIGNAL(insertChar(const TQString &)));
midBox->addWidget(KP9Button, 1, 2); midBox->addWidget(KP9Button, 1, 2);
QPushButton *DivideButton = new QPushButton("/", this); TQPushButton *DivideButton = new TQPushButton("/", this);
DivideButton->setAccel(Key_Slash); DivideButton->setAccel(Key_Slash);
connect(DivideButton, SIGNAL(clicked()), this, SIGNAL(divide())); connect(DivideButton, SIGNAL(clicked()), this, SIGNAL(divide()));
midBox->addWidget(DivideButton, 1, 3); midBox->addWidget(DivideButton, 1, 3);
QPushButton *MultiplyButton = new QPushButton("*", this); TQPushButton *MultiplyButton = new TQPushButton("*", this);
MultiplyButton->setAccel(Key_Asterisk); MultiplyButton->setAccel(Key_Asterisk);
connect(MultiplyButton, SIGNAL(clicked()), this, SIGNAL(multiply())); connect(MultiplyButton, SIGNAL(clicked()), this, SIGNAL(multiply()));
midBox->addWidget(MultiplyButton, 2, 3); midBox->addWidget(MultiplyButton, 2, 3);
QPushButton *SubtractionButton = new QPushButton("-", this); TQPushButton *SubtractionButton = new TQPushButton("-", this);
SubtractionButton->setAccel(Key_Minus); SubtractionButton->setAccel(Key_Minus);
connect(SubtractionButton, SIGNAL(clicked()), this, SIGNAL(subtract())); connect(SubtractionButton, SIGNAL(clicked()), this, SIGNAL(subtract()));
midBox->addWidget(SubtractionButton, 3, 3); midBox->addWidget(SubtractionButton, 3, 3);
QPushButton *AdditionButton = new QPushButton("+", this); TQPushButton *AdditionButton = new TQPushButton("+", this);
AdditionButton->setAccel(Key_Plus); AdditionButton->setAccel(Key_Plus);
connect(AdditionButton, SIGNAL(clicked()), this, SIGNAL(add())); connect(AdditionButton, SIGNAL(clicked()), this, SIGNAL(add()));
midBox->addWidget(AdditionButton, 4, 3); midBox->addWidget(AdditionButton, 4, 3);
@ -125,7 +125,7 @@ MathKeypad::MathKeypad(QWidget *parent, const char *name)
setCaption(i18n("Keypad") + " - Mathemagics"); setCaption(i18n("Keypad") + " - Mathemagics");
} }
void MathKeypad::closeEvent(QCloseEvent *e) void MathKeypad::closeEvent(TQCloseEvent *e)
{ {
emit closing(); emit closing();

@ -1,41 +1,41 @@
#ifndef KEYPAD_H #ifndef KEYPAD_H
#define KEYPAD_H #define KEYPAD_H
#include <qwidget.h> #include <ntqwidget.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qstring.h> #include <ntqstring.h>
class QCloseEvent; class TQCloseEvent;
class CharButton : public QPushButton class CharButton : public TQPushButton
{ {
Q_OBJECT Q_OBJECT
public: public:
CharButton(const QString &text, QWidget *parent=0, const char *name=0); CharButton(const TQString &text, TQWidget *parent=0, const char *name=0);
~CharButton() {} ~CharButton() {}
signals: signals:
void clicked(const QString &); void clicked(const TQString &);
private slots: private slots:
void emitClicked(); void emitClicked();
private: private:
QString m_text; TQString m_text;
}; };
class MathKeypad : public QWidget class MathKeypad : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
MathKeypad(QWidget *parent=0, const char *name=0); MathKeypad(TQWidget *parent=0, const char *name=0);
~MathKeypad() {} ~MathKeypad() {}
signals: signals:
void closing(); void closing();
void insertChar(const QString &); void insertChar(const TQString &);
void add(); void add();
void subtract(); void subtract();
@ -46,7 +46,7 @@ signals:
void eex(); void eex();
protected: protected:
void closeEvent(QCloseEvent *); void closeEvent(TQCloseEvent *);
}; };
#endif #endif

@ -1,11 +1,11 @@
#include <qkeycode.h> #include <ntqkeycode.h>
#include <qstring.h> #include <ntqstring.h>
#include <kdebug.h> #include <kdebug.h>
#include "kparanoidline.h" #include "kparanoidline.h"
KParanoidLine::KParanoidLine(QWidget *parent, const char *name) KParanoidLine::KParanoidLine(TQWidget *parent, const char *name)
: KLineEdit(parent, name) : KLineEdit(parent, name)
{ {
} }
@ -14,14 +14,14 @@ KParanoidLine::~KParanoidLine()
{ {
} }
void KParanoidLine::keyPressEvent(QKeyEvent *e) void KParanoidLine::keyPressEvent(TQKeyEvent *e)
{ {
if (e->key() == Key_BackSpace) if (e->key() == Key_BackSpace)
emit backspacePressed(); emit backspacePressed();
emit textEntered(e->text()); emit textEntered(e->text());
QLineEdit::keyPressEvent(e); TQLineEdit::keyPressEvent(e);
} }
#include "kparanoidline.moc" #include "kparanoidline.moc"

@ -8,15 +8,15 @@ class KParanoidLine : public KLineEdit
Q_OBJECT Q_OBJECT
public: public:
KParanoidLine(QWidget *parent=0, const char *name=0); KParanoidLine(TQWidget *parent=0, const char *name=0);
~KParanoidLine(); ~KParanoidLine();
signals: signals:
void backspacePressed(); void backspacePressed();
void textEntered(const QString &); void textEntered(const TQString &);
protected: protected:
void keyPressEvent( QKeyEvent *e ); void keyPressEvent( TQKeyEvent *e );
}; };
#endif // KPARANOIDLINE_H #endif // KPARANOIDLINE_H

@ -33,7 +33,7 @@ int main(int argc, char *argv[])
KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs::addCmdLineOptions(options);
KApplication a; KApplication a;
Mathemagics *mathemagics = new Mathemagics(0, "Mathemagics", Qt::WStyle_ContextHelp); Mathemagics *mathemagics = new Mathemagics(0, "Mathemagics", TQt::WStyle_ContextHelp);
a.setMainWidget(mathemagics); a.setMainWidget(mathemagics);
mathemagics->show(); mathemagics->show();
return a.exec(); return a.exec();

@ -1,22 +1,22 @@
#include <qcombobox.h> #include <ntqcombobox.h>
#include <qevent.h> #include <ntqevent.h>
#include <qfile.h> #include <ntqfile.h>
#include <qguardedptr.h> #include <ntqguardedptr.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qmap.h> #include <ntqmap.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qradiobutton.h> #include <ntqradiobutton.h>
#include <qscrollview.h> #include <ntqscrollview.h>
#include <qsizepolicy.h> #include <ntqsizepolicy.h>
#include <qstring.h> #include <ntqstring.h>
#include <qstringlist.h> #include <ntqstringlist.h>
#include <qtextstream.h> #include <ntqtextstream.h>
#include <qtimer.h> #include <ntqtimer.h>
#include <qtooltip.h> #include <ntqtooltip.h>
#include <qvaluelist.h> #include <ntqvaluelist.h>
#include <qwhatsthis.h> #include <ntqwhatsthis.h>
#include <qwidget.h> #include <ntqwidget.h>
#include <kaccel.h> #include <kaccel.h>
#include <kaction.h> #include <kaction.h>
@ -44,7 +44,7 @@
#include "kparanoidline.h" #include "kparanoidline.h"
#include "mathemagics.h" #include "mathemagics.h"
Mathemagics::Mathemagics(QWidget *parent, const char *name, WFlags f) Mathemagics::Mathemagics(TQWidget *parent, const char *name, WFlags f)
: KMainWindow(parent, name, f) : KMainWindow(parent, name, f)
{ {
noSave = false; noSave = false;
@ -52,19 +52,19 @@ Mathemagics::Mathemagics(QWidget *parent, const char *name, WFlags f)
numStackLevels = 0; numStackLevels = 0;
stackLevels.setAutoDelete(true); stackLevels.setAutoDelete(true);
QWidget *dummy = new QWidget(this); TQWidget *dummy = new TQWidget(this);
setCentralWidget(dummy); setCentralWidget(dummy);
QVBoxLayout *topLayout = new QVBoxLayout(dummy, 0, KDialog::spacingHint()); TQVBoxLayout *topLayout = new TQVBoxLayout(dummy, 0, KDialog::spacingHint());
topLevel = new QScrollView(dummy); topLevel = new TQScrollView(dummy);
topLayout->addWidget(topLevel); topLayout->addWidget(topLevel);
boxParent = new QWidget(topLevel->viewport()); boxParent = new TQWidget(topLevel->viewport());
topLevel->addChild(boxParent); topLevel->addChild(boxParent);
topLevel->setResizePolicy(QScrollView::AutoOneFit); topLevel->setResizePolicy(TQScrollView::AutoOneFit);
bigBox = new QVBoxLayout(boxParent, KDialog::marginHint(), KDialog::spacingHint()); bigBox = new TQVBoxLayout(boxParent, KDialog::marginHint(), KDialog::spacingHint());
LineEdit = new EditAction(i18n("Values"), 0, this, SLOT(slotEnter()), actionCollection(), "lineedit"); LineEdit = new EditAction(i18n("Values"), 0, this, SLOT(slotEnter()), actionCollection(), "lineedit");
HistoryBox = new ComboAction(i18n("History"), 0, 0, 0, actionCollection(), "history"); HistoryBox = new ComboAction(i18n("History"), 0, 0, 0, actionCollection(), "history");
@ -76,7 +76,7 @@ Mathemagics::Mathemagics(QWidget *parent, const char *name, WFlags f)
topLayout->addWidget(keypad); topLayout->addWidget(keypad);
connect(keypad, SIGNAL(closing()), this, SLOT(keypadClosing())); connect(keypad, SIGNAL(closing()), this, SLOT(keypadClosing()));
connect(keypad, SIGNAL(insertChar(const QString &)), this, SLOT(insertChar(const QString &))); connect(keypad, SIGNAL(insertChar(const TQString &)), this, SLOT(insertChar(const TQString &)));
connect(keypad, SIGNAL(add()), this, SLOT(slotAdd())); connect(keypad, SIGNAL(add()), this, SLOT(slotAdd()));
connect(keypad, SIGNAL(subtract()), this, SLOT(slotSubtract())); connect(keypad, SIGNAL(subtract()), this, SLOT(slotSubtract()));
connect(keypad, SIGNAL(multiply()), this, SLOT(slotMultiply())); connect(keypad, SIGNAL(multiply()), this, SLOT(slotMultiply()));
@ -86,7 +86,7 @@ Mathemagics::Mathemagics(QWidget *parent, const char *name, WFlags f)
connect(keypad, SIGNAL(eex()), this, SLOT(slotEEX())); connect(keypad, SIGNAL(eex()), this, SLOT(slotEEX()));
keypad->hide(); keypad->hide();
QStringList options(i18n("Degrees")); TQStringList options(i18n("Degrees"));
options.append(i18n("Radians")); options.append(i18n("Radians"));
options.append(i18n("Grads")); options.append(i18n("Grads"));
angGroup = new KListAction(i18n("Angle"), 0, 0, 0, actionCollection(), "angle"); angGroup = new KListAction(i18n("Angle"), 0, 0, 0, actionCollection(), "angle");
@ -100,7 +100,7 @@ Mathemagics::Mathemagics(QWidget *parent, const char *name, WFlags f)
baseGroup = new KListAction(i18n("Base"), 0, 0, 0, actionCollection(), "base"); baseGroup = new KListAction(i18n("Base"), 0, 0, 0, actionCollection(), "base");
baseGroup->setItems(options); baseGroup->setItems(options);
QStringList defaultFormulae; TQStringList defaultFormulae;
formulae = new KListAction(i18n("&Formulae"), 0, 0, 0, actionCollection(), "formulae"); formulae = new KListAction(i18n("&Formulae"), 0, 0, 0, actionCollection(), "formulae");
#include "formulae" #include "formulae"
formulae->setItems(defaultFormulae); formulae->setItems(defaultFormulae);
@ -156,9 +156,9 @@ Mathemagics::Mathemagics(QWidget *parent, const char *name, WFlags f)
connect(baseGroup, SIGNAL(activated(int)), this, SLOT(slotBaseChanged(int))); connect(baseGroup, SIGNAL(activated(int)), this, SLOT(slotBaseChanged(int)));
connect(angGroup, SIGNAL(activated(int)), this, SLOT(slotAngleChanged(int))); connect(angGroup, SIGNAL(activated(int)), this, SLOT(slotAngleChanged(int)));
connect(formulae, SIGNAL(activated(const QString &)), this, SLOT(runFormula(const QString &))); connect(formulae, SIGNAL(activated(const TQString &)), this, SLOT(runFormula(const TQString &)));
connect(HistoryBox->combo(), SIGNAL(activated(const QString&)), this, SLOT(slotPushHighlighted(const QString&))); connect(HistoryBox->combo(), SIGNAL(activated(const TQString&)), this, SLOT(slotPushHighlighted(const TQString&)));
connect(LineEdit->edit(), SIGNAL(backspacePressed()), this, SLOT(slotBackspace())); connect(LineEdit->edit(), SIGNAL(backspacePressed()), this, SLOT(slotBackspace()));
@ -178,8 +178,8 @@ Mathemagics::Mathemagics(QWidget *parent, const char *name, WFlags f)
variables["gradkey"] = 2; variables["gradkey"] = 2;
defVariables.append("gradkey"); defVariables.append("gradkey");
Stack = new QValueList<double>; Stack = new TQValueList<double>;
SavedStack = new QValueList<double>; SavedStack = new TQValueList<double>;
optionDialog = 0; optionDialog = 0;
// how long do status msgs stay up? in ms // how long do status msgs stay up? in ms
@ -195,10 +195,10 @@ Mathemagics::Mathemagics(QWidget *parent, const char *name, WFlags f)
kapp->config()->setGroup("Session"); kapp->config()->setGroup("Session");
QStringList stackList = kapp->config()->readListEntry("Stack", ','); TQStringList stackList = kapp->config()->readListEntry("Stack", ',');
int i; int i;
QStringList historyList = kapp->config()->readListEntry("History", ','); TQStringList historyList = kapp->config()->readListEntry("History", ',');
int count = historyList.count(); int count = historyList.count();
if (historyList.first() != "Nothing" && count > 0) if (historyList.first() != "Nothing" && count > 0)
{ {
@ -243,7 +243,7 @@ void Mathemagics::keypadClosing()
keypadAct->setChecked(false); keypadAct->setChecked(false);
} }
void Mathemagics::insertChar(const QString &s) void Mathemagics::insertChar(const TQString &s)
{ {
LineEdit->insert(s); LineEdit->insert(s);
} }
@ -269,7 +269,7 @@ void Mathemagics::updateStack()
level->edit()->setText(format(*Stack->at(i - 1))); level->edit()->setText(format(*Stack->at(i - 1)));
} }
QTimer::singleShot(100, this, SLOT(scrollToBottom())); TQTimer::singleShot(100, this, SLOT(scrollToBottom()));
} }
void Mathemagics::enter() void Mathemagics::enter()
@ -282,13 +282,13 @@ void Mathemagics::enter()
bool oldNoSave = noSave; bool oldNoSave = noSave;
noSave = true; noSave = true;
QStringList entryNums = this->entryNums; TQStringList entryNums = this->entryNums;
this->entryNums.clear(); this->entryNums.clear();
QString oldLineText = LineEdit->edit()->text(); TQString oldLineText = LineEdit->edit()->text();
LineEdit->clear(); LineEdit->clear();
for (QStringList::Iterator it = entryNums.begin(); it != entryNums.end(); ++it) for (TQStringList::Iterator it = entryNums.begin(); it != entryNums.end(); ++it)
{ {
int eIndex; int eIndex;
int eqIndex = (*it).find('='); int eqIndex = (*it).find('=');
@ -298,11 +298,11 @@ void Mathemagics::enter()
if (eqIndex >= 0 && (dolIndex < 0 || dolIndex > eqIndex)) // add equation if (eqIndex >= 0 && (dolIndex < 0 || dolIndex > eqIndex)) // add equation
{ {
QString formulaName = (*it).left(eqIndex); TQString formulaName = (*it).left(eqIndex);
if (formulaName.isEmpty()) if (formulaName.isEmpty())
continue; continue;
QString formula = (*it).right((*it).length() - eqIndex - 1); TQString formula = (*it).right((*it).length() - eqIndex - 1);
for (++it; it != entryNums.end(); ++it) for (++it; it != entryNums.end(); ++it)
{ {
@ -312,7 +312,7 @@ void Mathemagics::enter()
formulas[formulaName] = formula; formulas[formulaName] = formula;
QStringList newList(formulae->items()); TQStringList newList(formulae->items());
newList.remove(formulaName); newList.remove(formulaName);
if (!formulaName.isEmpty()) if (!formulaName.isEmpty())
@ -326,10 +326,10 @@ void Mathemagics::enter()
} }
else if ((eIndex = (*it).find('E')) != -1 && !notDec) // E found else if ((eIndex = (*it).find('E')) != -1 && !notDec) // E found
{ {
QString firstArg = (*it).left(eIndex); TQString firstArg = (*it).left(eIndex);
if (firstArg.isEmpty()) if (firstArg.isEmpty())
continue; continue;
QString secondArg = (*it).right((*it).length() - eIndex - 1); TQString secondArg = (*it).right((*it).length() - eIndex - 1);
val = firstArg.toDouble(&ok) * pow(10, secondArg.toDouble(&ok)); val = firstArg.toDouble(&ok) * pow(10, secondArg.toDouble(&ok));
if (ok) if (ok)
{ {
@ -379,7 +379,7 @@ bool Mathemagics::parseArgs(unsigned int reqArgs, bool autoEnter, bool save)
if (!LineEdit->text().isEmpty()) if (!LineEdit->text().isEmpty())
{ {
entryNums = QStringList::split(QChar(' '), LineEdit->text()); entryNums = TQStringList::split(TQChar(' '), LineEdit->text());
entryNumsCount = entryNums.count(); entryNumsCount = entryNums.count();
} }
@ -404,7 +404,7 @@ int Mathemagics::testArgs()
if (!LineEdit->text().isEmpty()) if (!LineEdit->text().isEmpty())
{ {
entryNums = QStringList::split(QChar(' '), LineEdit->text()); entryNums = TQStringList::split(TQChar(' '), LineEdit->text());
entryNumsCount = entryNums.count(); entryNumsCount = entryNums.count();
} }
@ -422,7 +422,7 @@ void Mathemagics::saveStack()
void Mathemagics::slotRestoreStack() void Mathemagics::slotRestoreStack()
{ {
// a simple swap // a simple swap
QValueList<double> *SavedStackPtr = Stack; TQValueList<double> *SavedStackPtr = Stack;
Stack = SavedStack; Stack = SavedStack;
SavedStack = SavedStackPtr; SavedStack = SavedStackPtr;
@ -795,7 +795,7 @@ void Mathemagics::slotRaiseTen()
void Mathemagics::slotEEX() void Mathemagics::slotEEX()
{ {
if (base == 10 || base >= 15) if (base == 10 || base >= 15)
LineEdit->insert(QString("E")); LineEdit->insert(TQString("E"));
} }
void Mathemagics::slotPercent() void Mathemagics::slotPercent()
@ -829,7 +829,7 @@ void Mathemagics::slotModulo()
return; return;
theResult = fmod(*Stack->at(1), Stack->first()); theResult = fmod(*Stack->at(1), Stack->first());
changeStatus(&theResult, QString(i18n("%1 mod ")).arg(*Stack->at(1)), 1); changeStatus(&theResult, TQString(i18n("%1 mod ")).arg(*Stack->at(1)), 1);
Stack->pop_front(); Stack->pop_front();
Stack->first() = theResult; Stack->first() = theResult;
@ -855,7 +855,7 @@ void Mathemagics::slotPower()
parseArgs(2); parseArgs(2);
theResult = pow(*Stack->at(1), 1 / Stack->first()); theResult = pow(*Stack->at(1), 1 / Stack->first());
changeStatus(&theResult, QString(i18n("%1 root of ")).arg(format(*Stack->at(1))), true); changeStatus(&theResult, TQString(i18n("%1 root of ")).arg(format(*Stack->at(1))), true);
InvButton->setChecked(false); InvButton->setChecked(false);
} }
@ -872,7 +872,7 @@ void Mathemagics::slotPower()
parseArgs(2); parseArgs(2);
theResult = pow(*Stack->at(1), Stack->first()); theResult = pow(*Stack->at(1), Stack->first());
changeStatus(&theResult, QString(i18n("%1 ^ ")).arg(format(*Stack->at(1))), 1); changeStatus(&theResult, TQString(i18n("%1 ^ ")).arg(format(*Stack->at(1))), 1);
} }
Stack->pop_front(); Stack->pop_front();
@ -890,7 +890,7 @@ void Mathemagics::slotNegative()
} }
else else
{ {
QString text = LineEdit->text(); TQString text = LineEdit->text();
unsigned int cursPos = LineEdit->edit()->cursorPosition(); unsigned int cursPos = LineEdit->edit()->cursorPosition();
unsigned int length = text.length(); unsigned int length = text.length();
@ -901,7 +901,7 @@ void Mathemagics::slotNegative()
if (base == 10 && eindex != -1) if (base == 10 && eindex != -1)
negIndex = eindex + 1; negIndex = eindex + 1;
if (text.at(negIndex) == QChar('-')) if (text.at(negIndex) == TQChar('-'))
{ {
text.remove(negIndex, 1); text.remove(negIndex, 1);
LineEdit->edit()->setText(text); LineEdit->edit()->setText(text);
@ -923,7 +923,7 @@ void Mathemagics::slotAnd()
{ {
theResult = (long int)Stack->first() & (long int)*Stack->at(1); theResult = (long int)Stack->first() & (long int)*Stack->at(1);
double pass = (double)theResult; double pass = (double)theResult;
changeStatus(&pass, QString(i18n("%1 AND ")).arg(format(*Stack->at(1))), 1); changeStatus(&pass, TQString(i18n("%1 AND ")).arg(format(*Stack->at(1))), 1);
Stack->pop_front(); Stack->pop_front();
Stack->pop_front(); Stack->pop_front();
Stack->prepend(theResult); Stack->prepend(theResult);
@ -939,7 +939,7 @@ void Mathemagics::slotXOr()
double theResult; double theResult;
theResult = (long int)Stack->first() ^ (long int)*Stack->at(1); theResult = (long int)Stack->first() ^ (long int)*Stack->at(1);
changeStatus(&theResult, QString(i18n("%1 XOR ")).arg(format(*Stack->at(1))), 1); changeStatus(&theResult, TQString(i18n("%1 XOR ")).arg(format(*Stack->at(1))), 1);
Stack->pop_front(); Stack->pop_front();
Stack->pop_front(); Stack->pop_front();
Stack->prepend(theResult); Stack->prepend(theResult);
@ -952,7 +952,7 @@ void Mathemagics::slotOr()
double theResult; double theResult;
theResult = (long int)Stack->first() | (long int)*Stack->at(1); theResult = (long int)Stack->first() | (long int)*Stack->at(1);
changeStatus(&theResult, QString(i18n("%1 OR ")).arg(format(*Stack->at(1))), 1); changeStatus(&theResult, TQString(i18n("%1 OR ")).arg(format(*Stack->at(1))), 1);
Stack->pop_front(); Stack->pop_front();
Stack->pop_front(); Stack->pop_front();
Stack->prepend(theResult); Stack->prepend(theResult);
@ -968,7 +968,7 @@ void Mathemagics::slotRsh()
double theResult; double theResult;
theResult = (long int)*Stack->at(1) >> (long int)Stack->first(); theResult = (long int)*Stack->at(1) >> (long int)Stack->first();
changeStatus(&theResult, QString(i18n("%1 RSH ")).arg(format(*Stack->at(1))), true); changeStatus(&theResult, TQString(i18n("%1 RSH ")).arg(format(*Stack->at(1))), true);
Stack->pop_front(); Stack->pop_front();
Stack->pop_front(); Stack->pop_front();
@ -985,7 +985,7 @@ void Mathemagics::slotLsh()
double theResult; double theResult;
theResult = (long int)*Stack->at(1) << (long int)Stack->first(); theResult = (long int)*Stack->at(1) << (long int)Stack->first();
changeStatus(&theResult, QString(i18n("%1 LSH ")).arg(format(*Stack->at(1))), true); changeStatus(&theResult, TQString(i18n("%1 LSH ")).arg(format(*Stack->at(1))), true);
Stack->pop_front(); Stack->pop_front();
Stack->pop_front(); Stack->pop_front();
@ -1045,9 +1045,9 @@ void Mathemagics::slotBackspace()
} }
} }
void Mathemagics::closeEvent(QCloseEvent * /*e*/) void Mathemagics::closeEvent(TQCloseEvent * /*e*/)
{ {
QString list; TQString list;
unsigned int i; unsigned int i;
kapp->config()->setGroup("Session"); kapp->config()->setGroup("Session");
@ -1100,7 +1100,7 @@ void Mathemagics::slotConfigure()
void Mathemagics::slotConfigureHide() void Mathemagics::slotConfigureHide()
{ {
QTimer::singleShot(0, this, SLOT(slotConfigureDestroy())); TQTimer::singleShot(0, this, SLOT(slotConfigureDestroy()));
} }
void Mathemagics::slotConfigureDestroy() void Mathemagics::slotConfigureDestroy()
@ -1196,7 +1196,7 @@ void Mathemagics::slotUpdateStackLevel(int level)
{ {
saveStack(); saveStack();
const QString stackText(stackLevels.at(level - 1)->edit()->text()); const TQString stackText(stackLevels.at(level - 1)->edit()->text());
if (stackText.isEmpty()) if (stackText.isEmpty())
{ {
Stack->remove(Stack->at(level - 1)); Stack->remove(Stack->at(level - 1));
@ -1223,23 +1223,23 @@ void Mathemagics::slotRevert()
statusBar()->message(i18n("Changes destroyed"), dispTime); statusBar()->message(i18n("Changes destroyed"), dispTime);
} }
double Mathemagics::format(QString theString, bool *ok) double Mathemagics::format(TQString theString, bool *ok)
{ {
return (base != 10 ? (double)theString.toInt(ok, base) : theString.toDouble(ok)); return (base != 10 ? (double)theString.toInt(ok, base) : theString.toDouble(ok));
} }
QString Mathemagics::format(double theDouble) TQString Mathemagics::format(double theDouble)
{ {
if (base != 10) if (base != 10)
{ {
QString convStr; TQString convStr;
convStr.setNum((int)theDouble, base); convStr.setNum((int)theDouble, base);
if (showPeriod) if (showPeriod)
convStr.append('.'); convStr.append('.');
return convStr; return convStr;
} }
QString decimal = QString::number(theDouble, 'f', formatPrec); TQString decimal = TQString::number(theDouble, 'f', formatPrec);
// leave zeroes on // leave zeroes on
if (fixedPrec) if (fixedPrec)
@ -1363,7 +1363,7 @@ void Mathemagics::rolld(unsigned int index)
updateStack(); updateStack();
} }
void Mathemagics::changeStatus(QString text) void Mathemagics::changeStatus(TQString text)
{ {
const unsigned int maxLength = 30; const unsigned int maxLength = 30;
@ -1372,7 +1372,7 @@ void Mathemagics::changeStatus(QString text)
if (HistoryBox->combo()->count() >= histNum) HistoryBox->combo()->removeItem(0); if (HistoryBox->combo()->count() >= histNum) HistoryBox->combo()->removeItem(0);
if (histDetail) if (histDetail)
text = QString(text + i18n("Base: %2; %3")).arg(base).arg(theAngle()); text = TQString(text + i18n("Base: %2; %3")).arg(base).arg(theAngle());
if (text.length() > maxLength) if (text.length() > maxLength)
{ {
@ -1389,7 +1389,7 @@ void Mathemagics::clearHistory()
HistoryBox->combo()->clear(); HistoryBox->combo()->clear();
} }
QString Mathemagics::theAngle() TQString Mathemagics::theAngle()
{ {
switch (angle) switch (angle)
{ {
@ -1406,7 +1406,7 @@ QString Mathemagics::theAngle()
return "Deg"; return "Deg";
} }
void Mathemagics::slotPushHighlighted(const QString& text) void Mathemagics::slotPushHighlighted(const TQString& text)
{ {
saveStack(); saveStack();
@ -1431,7 +1431,7 @@ void Mathemagics::error()
changeStatusError("Bad arguments"); changeStatusError("Bad arguments");
} }
void Mathemagics::changeStatusError(QString text) void Mathemagics::changeStatusError(TQString text)
{ {
text.prepend(i18n("Error: ")); text.prepend(i18n("Error: "));
statusBar()->message(text, dispTime); statusBar()->message(text, dispTime);
@ -1442,15 +1442,15 @@ void Mathemagics::changeStatusError(QString text)
void Mathemagics::changeStatus(double * res, char op) void Mathemagics::changeStatus(double * res, char op)
{ {
changeStatus(QString(i18n("%1 %2 %3 = %4")).arg(format(*Stack->at(1))).arg(op).arg(format(Stack->first())).arg(format(*res))); changeStatus(TQString(i18n("%1 %2 %3 = %4")).arg(format(*Stack->at(1))).arg(op).arg(format(Stack->first())).arg(format(*res)));
} }
void Mathemagics::changeStatus(double * res, QString op, bool prepend) void Mathemagics::changeStatus(double * res, TQString op, bool prepend)
{ {
if (prepend) if (prepend)
changeStatus(QString(i18n("%1%2 = %3")).arg(op).arg(format(Stack->first())).arg(format(*res))); changeStatus(TQString(i18n("%1%2 = %3")).arg(op).arg(format(Stack->first())).arg(format(*res)));
else else
changeStatus(QString(i18n("%1%2 = %3")).arg(format(Stack->first())).arg(op).arg(format(*res))); changeStatus(TQString(i18n("%1%2 = %3")).arg(format(Stack->first())).arg(op).arg(format(*res)));
} }
void Mathemagics::toggleKeypad(bool on) void Mathemagics::toggleKeypad(bool on)
@ -1463,25 +1463,25 @@ void Mathemagics::toggleKeypad(bool on)
void Mathemagics::slotOpen() void Mathemagics::slotOpen()
{ {
QString filename = KFileDialog::getOpenFileName(); TQString filename = KFileDialog::getOpenFileName();
if (filename.isNull()) if (filename.isNull())
return; return;
openFile(filename); openFile(filename);
} }
void Mathemagics::openFile(const QString &filename) void Mathemagics::openFile(const TQString &filename)
{ {
QFile f(filename); TQFile f(filename);
if (!f.open(IO_ReadOnly)) if (!f.open(IO_ReadOnly))
return; return;
enterMode = true; enterMode = true;
QTextStream t(&f); TQTextStream t(&f);
while (!t.eof()) while (!t.eof())
{ {
QString s = t.readLine(); TQString s = t.readLine();
// comments // comments
if (s.at(0) == '#') if (s.at(0) == '#')
@ -1489,7 +1489,7 @@ void Mathemagics::openFile(const QString &filename)
if (!s.isEmpty()) if (!s.isEmpty())
{ {
entryNums = QStringList::split(QChar(' '), s); entryNums = TQStringList::split(TQChar(' '), s);
enter(); enter();
} }
} }
@ -1498,13 +1498,13 @@ void Mathemagics::openFile(const QString &filename)
updateStack(); updateStack();
} }
void Mathemagics::saveFile(const QString &filename) void Mathemagics::saveFile(const TQString &filename)
{ {
QFile f(filename); TQFile f(filename);
if (!f.open(IO_WriteOnly)) if (!f.open(IO_WriteOnly))
return; return;
QTextStream t(&f); TQTextStream t(&f);
t << "# Saved by mathemagics" << endl; t << "# Saved by mathemagics" << endl;
@ -1518,7 +1518,7 @@ void Mathemagics::saveFile(const QString &filename)
bool already = false; bool already = false;
QValueList<double>::Iterator it = Stack->end(); TQValueList<double>::Iterator it = Stack->end();
it--; it--;
while (1) while (1)
@ -1538,14 +1538,14 @@ void Mathemagics::saveFile(const QString &filename)
t << endl; t << endl;
t << "# functions" << endl; t << "# functions" << endl;
for (QMap<QString, QString>::Iterator it = formulas.begin(); it != formulas.end(); ++it) for (TQMap<TQString, TQString>::Iterator it = formulas.begin(); it != formulas.end(); ++it)
{ {
if (defFormulas.contains(it.key()) <= 0) if (defFormulas.contains(it.key()) <= 0)
t << it.key() << "=" << it.data() << endl; t << it.key() << "=" << it.data() << endl;
} }
t << "# variables" << endl; t << "# variables" << endl;
for (QMap<QString, double>::Iterator it = variables.begin(); it != variables.end(); ++it) for (TQMap<TQString, double>::Iterator it = variables.begin(); it != variables.end(); ++it)
{ {
if (defVariables.contains(it.key()) <= 0) if (defVariables.contains(it.key()) <= 0)
t << it.data() << " $" << it.key() << "=" << endl;; t << it.data() << " $" << it.key() << "=" << endl;;
@ -1557,20 +1557,20 @@ void Mathemagics::saveFile(const QString &filename)
t << (HypButton->isChecked() ? "$true" : "$false") << " sethyp" << endl; t << (HypButton->isChecked() ? "$true" : "$false") << " sethyp" << endl;
} }
void Mathemagics::runFormula(const QString &name) void Mathemagics::runFormula(const TQString &name)
{ {
formulae->setCurrentItem(-1); formulae->setCurrentItem(-1);
QString s = formulas[name]; TQString s = formulas[name];
saveStack(); saveStack();
bool oldNoSave = noSave; bool oldNoSave = noSave;
noSave = true; noSave = true;
QStringList l = QStringList::split(' ', s); TQStringList l = TQStringList::split(' ', s);
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it)
{ {
QString command = (*it); TQString command = (*it);
bool ok; bool ok;
double num = format(command, &ok); double num = format(command, &ok);
@ -1588,7 +1588,7 @@ void Mathemagics::runFormula(const QString &name)
} }
// tests and returns startswith, and removes the search string from string if matches // tests and returns startswith, and removes the search string from string if matches
bool removeStartsWith(QString &s, const QString &search) bool removeStartsWith(TQString &s, const TQString &search)
{ {
if (s.startsWith(search)) if (s.startsWith(search))
{ {
@ -1599,17 +1599,17 @@ bool removeStartsWith(QString &s, const QString &search)
return false; return false;
} }
bool Mathemagics::runCommand(const QString &command) bool Mathemagics::runCommand(const TQString &command)
{ {
// case insensitive // case insensitive
QString operateOn = command.lower(); TQString operateOn = command.lower();
// allows operators to be embedded in numbers // allows operators to be embedded in numbers
// this finds a number at beginning of command // this finds a number at beginning of command
while (!operateOn.isEmpty()) while (!operateOn.isEmpty())
{ {
QChar firstChar(operateOn.at(0)); TQChar firstChar(operateOn.at(0));
if (firstChar.isNumber()) if (firstChar.isNumber())
{ {
for (int i = operateOn.length(); i > 0; --i) for (int i = operateOn.length(); i > 0; --i)
@ -1628,7 +1628,7 @@ bool Mathemagics::runCommand(const QString &command)
if (firstChar == '$') if (firstChar == '$')
{ {
QString varName = operateOn.right(operateOn.length() - 1); TQString varName = operateOn.right(operateOn.length() - 1);
if (varName.isEmpty()) if (varName.isEmpty())
return false; return false;
@ -1821,9 +1821,9 @@ bool Mathemagics::runCommand(const QString &command)
{ {
bool found = false; bool found = false;
// go through commands // go through commands
for (QMap<QString, QString>::Iterator it = formulas.begin(); it != formulas.end() && !found; ++it) for (TQMap<TQString, TQString>::Iterator it = formulas.begin(); it != formulas.end() && !found; ++it)
{ {
QString name = it.key(); TQString name = it.key();
if (removeStartsWith(operateOn, name)) if (removeStartsWith(operateOn, name))
{ {
runFormula(name); runFormula(name);
@ -1865,7 +1865,7 @@ void Mathemagics::newToolBarConfig()
//////////////////////////////////////////////// ////////////////////////////////////////////////
EditAction::EditAction(const QString& text, int accel, const QObject *receiver, const char *member, QObject* parent, const char* name) EditAction::EditAction(const TQString& text, int accel, const TQObject *receiver, const char *member, TQObject* parent, const char* name)
: KAction(text, accel, parent, name) : KAction(text, accel, parent, name)
{ {
m_receiver = receiver; m_receiver = receiver;
@ -1876,7 +1876,7 @@ EditAction::~EditAction()
{ {
} }
int EditAction::plug(QWidget *w, int index) int EditAction::plug(TQWidget *w, int index)
{ {
KToolBar *toolBar = (KToolBar *)w; KToolBar *toolBar = (KToolBar *)w;
int id = KAction::getToolButtonID(); int id = KAction::getToolButtonID();
@ -1894,7 +1894,7 @@ int EditAction::plug(QWidget *w, int index)
return containerCount() - 1; return containerCount() - 1;
} }
void EditAction::unplug(QWidget *w) void EditAction::unplug(TQWidget *w)
{ {
KToolBar *toolBar = (KToolBar *)w; KToolBar *toolBar = (KToolBar *)w;
int idx = findContainer(w); int idx = findContainer(w);
@ -1908,24 +1908,24 @@ void EditAction::clear()
m_combo->clear(); m_combo->clear();
} }
void EditAction::append(QString text) void EditAction::append(TQString text)
{ {
m_combo->setText(this->text() + text); m_combo->setText(this->text() + text);
} }
void EditAction::insert(QString text) void EditAction::insert(TQString text)
{ {
m_combo->insert(text); m_combo->insert(text);
} }
QGuardedPtr<KParanoidLine> EditAction::edit() TQGuardedPtr<KParanoidLine> EditAction::edit()
{ {
return m_combo; return m_combo;
} }
//////////////////////////////////////////////// ////////////////////////////////////////////////
ComboAction::ComboAction(const QString& text, int accel, const QObject *receiver, const char *member, QObject* parent, const char* name) ComboAction::ComboAction(const TQString& text, int accel, const TQObject *receiver, const char *member, TQObject* parent, const char* name)
: KAction(text, accel, parent, name) : KAction(text, accel, parent, name)
{ {
m_receiver = receiver; m_receiver = receiver;
@ -1936,13 +1936,13 @@ ComboAction::~ComboAction()
{ {
} }
int ComboAction::plug(QWidget *w, int index) int ComboAction::plug(TQWidget *w, int index)
{ {
KToolBar *toolBar = (KToolBar *)w; KToolBar *toolBar = (KToolBar *)w;
int id = KAction::getToolButtonID(); int id = KAction::getToolButtonID();
QComboBox *comboBox = new QComboBox(toolBar, "search edit"); TQComboBox *comboBox = new TQComboBox(toolBar, "search edit");
toolBar->insertWidget(id, 70, comboBox, index); toolBar->insertWidget(id, 70, comboBox, index);
if (m_receiver) if (m_receiver)
connect(comboBox, SIGNAL(returnPressed()), m_receiver, m_member); connect(comboBox, SIGNAL(returnPressed()), m_receiver, m_member);
@ -1955,7 +1955,7 @@ int ComboAction::plug(QWidget *w, int index)
return containerCount() - 1; return containerCount() - 1;
} }
void ComboAction::unplug(QWidget *w) void ComboAction::unplug(TQWidget *w)
{ {
KToolBar *toolBar = (KToolBar *)w; KToolBar *toolBar = (KToolBar *)w;
int idx = findContainer(w); int idx = findContainer(w);
@ -1965,7 +1965,7 @@ void ComboAction::unplug(QWidget *w)
m_combo = 0L; m_combo = 0L;
} }
QGuardedPtr<QComboBox> ComboAction::combo() TQGuardedPtr<TQComboBox> ComboAction::combo()
{ {
return m_combo; return m_combo;
} }

@ -6,13 +6,13 @@
#endif #endif
#include <kapp.h> #include <kapp.h>
#include <qwidget.h> #include <ntqwidget.h>
#include <qvaluelist.h> #include <ntqvaluelist.h>
#include <qptrlist.h> #include <ntqptrlist.h>
#include <kmainwindow.h> #include <kmainwindow.h>
#include <kaction.h> #include <kaction.h>
#include <qmap.h> #include <ntqmap.h>
#include <qguardedptr.h> #include <ntqguardedptr.h>
#include "stacklevel.h" #include "stacklevel.h"
#include "optiondialog.h" #include "optiondialog.h"
@ -21,11 +21,11 @@
class KListAction; class KListAction;
class EditAction; class EditAction;
class ComboAction; class ComboAction;
class QComboBox; class TQComboBox;
class QCloseEvent; class TQCloseEvent;
class QPushButton; class TQPushButton;
class QVBoxLayout; class TQVBoxLayout;
class QScrollView; class TQScrollView;
class KToggleAction; class KToggleAction;
class MathKeypad; class MathKeypad;
@ -35,24 +35,24 @@ class Mathemagics : public KMainWindow
public: public:
/** construtor */ /** construtor */
Mathemagics(QWidget* parent=0, const char *name=0, WFlags f = 0); Mathemagics(TQWidget* parent=0, const char *name=0, WFlags f = 0);
/** destructor */ /** destructor */
~Mathemagics(); ~Mathemagics();
void updateStack(); void updateStack();
protected slots: protected slots:
void runFormula(const QString &); void runFormula(const TQString &);
bool runCommand(const QString &); bool runCommand(const TQString &);
void openFile(const QString &filename); void openFile(const TQString &filename);
void saveFile(const QString &filename); void saveFile(const TQString &filename);
void slotOpen(); void slotOpen();
void clearHistory(); void clearHistory();
void scrollToBottom(); void scrollToBottom();
void keypadClosing(); void keypadClosing();
void insertChar(const QString &); void insertChar(const TQString &);
void configureToolBars(); void configureToolBars();
void newToolBarConfig(); void newToolBarConfig();
@ -95,7 +95,7 @@ protected slots:
void slotRestoreStack(); void slotRestoreStack();
void slotRevert(); void slotRevert();
void slotPushHighlighted(const QString&); void slotPushHighlighted(const TQString&);
void slotConfigure(); void slotConfigure();
void slotConfigureHide(); void slotConfigureHide();
@ -106,14 +106,14 @@ protected slots:
void slotAngleChanged(int id); void slotAngleChanged(int id);
protected: protected:
void closeEvent(QCloseEvent *); void closeEvent(TQCloseEvent *);
private: private:
QPtrList<StackLevel> stackLevels; TQPtrList<StackLevel> stackLevels;
void recreateStackLevels(); void recreateStackLevels();
QScrollView *topLevel; TQScrollView *topLevel;
QWidget *boxParent; TQWidget *boxParent;
QVBoxLayout *bigBox; TQVBoxLayout *bigBox;
EditAction* LineEdit; EditAction* LineEdit;
ComboAction* HistoryBox; ComboAction* HistoryBox;
@ -123,36 +123,36 @@ private:
MathKeypad *keypad; MathKeypad *keypad;
QValueList<double> *Stack; TQValueList<double> *Stack;
QValueList<double> *SavedStack; TQValueList<double> *SavedStack;
QStringList entryNums; TQStringList entryNums;
bool parseArgs(unsigned int reqArgs = 0, bool autoEnter = 1, bool save = 1); bool parseArgs(unsigned int reqArgs = 0, bool autoEnter = 1, bool save = 1);
double angConv(const double theDouble); double angConv(const double theDouble);
double angOut(const double theDouble); double angOut(const double theDouble);
QString theAngle(); TQString theAngle();
int testArgs(); int testArgs();
bool getArgs(unsigned int num); bool getArgs(unsigned int num);
QValueList<double> args; TQValueList<double> args;
double format(QString theString, bool *ok=0); double format(TQString theString, bool *ok=0);
QString format(double theDouble); TQString format(double theDouble);
void saveStack(); void saveStack();
void enter(); void enter();
int fact(int n); int fact(int n);
//QStatusBar *statusBar; //TQStatusBar *statusBar;
int dispTime; int dispTime;
void error(); void error();
void changeStatus(QString text); void changeStatus(TQString text);
void changeStatusError(QString text); void changeStatusError(TQString text);
void changeStatus(double * res, char op); void changeStatus(double * res, char op);
void changeStatus(double * res, QString op, bool prepend = 0); void changeStatus(double * res, TQString op, bool prepend = 0);
void level5Return(); void level5Return();
void level4Return(); void level4Return();
@ -189,14 +189,14 @@ private:
KToggleAction *HypButton; KToggleAction *HypButton;
// map names to their formulae // map names to their formulae
QMap<QString, QString> formulas; TQMap<TQString, TQString> formulas;
QStringList defFormulas; TQStringList defFormulas;
// map names to their help // map names to their help
QMap<QString, QString> help; TQMap<TQString, TQString> help;
// variables // variables
QMap<QString, double> variables; TQMap<TQString, double> variables;
QStringList defVariables; TQStringList defVariables;
}; };
class EditAction : public KAction class EditAction : public KAction
@ -204,25 +204,25 @@ class EditAction : public KAction
Q_OBJECT Q_OBJECT
public: public:
EditAction( const QString& text, int accel, const QObject *receiver, const char *member, QObject* parent, const char* name ); EditAction( const TQString& text, int accel, const TQObject *receiver, const char *member, TQObject* parent, const char* name );
~EditAction(); ~EditAction();
virtual int plug( QWidget *w, int index = -1 ); virtual int plug( TQWidget *w, int index = -1 );
virtual void unplug( QWidget *w ); virtual void unplug( TQWidget *w );
QString text() { return m_combo? m_combo->text() : QString::null; } TQString text() { return m_combo? m_combo->text() : TQString::null; }
QGuardedPtr<KParanoidLine> edit(); TQGuardedPtr<KParanoidLine> edit();
public slots: public slots:
void clear(); void clear();
void append(QString); void append(TQString);
void insert(QString); void insert(TQString);
signals: signals:
void plugged(); void plugged();
private: private:
QGuardedPtr<KParanoidLine> m_combo; TQGuardedPtr<KParanoidLine> m_combo;
const QObject *m_receiver; const TQObject *m_receiver;
const char *m_member; const char *m_member;
}; };
@ -231,19 +231,19 @@ class ComboAction : public KAction
Q_OBJECT Q_OBJECT
public: public:
ComboAction( const QString& text, int accel, const QObject *receiver, const char *member, QObject* parent, const char* name ); ComboAction( const TQString& text, int accel, const TQObject *receiver, const char *member, TQObject* parent, const char* name );
~ComboAction(); ~ComboAction();
virtual int plug( QWidget *w, int index = -1 ); virtual int plug( TQWidget *w, int index = -1 );
virtual void unplug( QWidget *w ); virtual void unplug( TQWidget *w );
QGuardedPtr<QComboBox> combo(); TQGuardedPtr<TQComboBox> combo();
signals: signals:
void plugged(); void plugged();
private: private:
QGuardedPtr<QComboBox> m_combo; TQGuardedPtr<TQComboBox> m_combo;
const QObject *m_receiver; const TQObject *m_receiver;
const char *m_member; const char *m_member;
}; };

@ -2,70 +2,70 @@
#include <kconfig.h> #include <kconfig.h>
#include <klocale.h> #include <klocale.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include <qhbox.h> #include <ntqhbox.h>
#include <qvgroupbox.h> #include <ntqvgroupbox.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qspinbox.h> #include <ntqspinbox.h>
#include "optiondialog.h" #include "optiondialog.h"
ConfigureDialog::ConfigureDialog(QWidget *parent, char *name, bool modal) ConfigureDialog::ConfigureDialog(TQWidget *parent, char *name, bool modal)
: KDialogBase(KDialogBase::TreeList, i18n("Configure"), Apply | Ok | Cancel, Ok, parent, name, modal) : KDialogBase(KDialogBase::TreeList, i18n("Configure"), Apply | Ok | Cancel, Ok, parent, name, modal)
{ {
setHelp("mathemagics/index.html", QString::null); setHelp("mathemagics/index.html", TQString::null);
QFrame *DisplayPage = addPage(i18n("Display")); TQFrame *DisplayPage = addPage(i18n("Display"));
QVBoxLayout *dBox = new QVBoxLayout(DisplayPage, marginHint(), spacingHint()); TQVBoxLayout *dBox = new TQVBoxLayout(DisplayPage, marginHint(), spacingHint());
QVGroupBox *numBox = new QVGroupBox(i18n("Numbers"), DisplayPage); TQVGroupBox *numBox = new TQVGroupBox(i18n("Numbers"), DisplayPage);
dBox->addWidget(numBox); dBox->addWidget(numBox);
QHBox *pBox = new QHBox(numBox); TQHBox *pBox = new TQHBox(numBox);
pBox->setSpacing(spacingHint()); pBox->setSpacing(spacingHint());
NumBoxLabel = new QLabel(i18n("Display precision:"), pBox); NumBoxLabel = new TQLabel(i18n("Display precision:"), pBox);
PrecNumBox = new QSpinBox(1, 30, 3, pBox); PrecNumBox = new TQSpinBox(1, 30, 3, pBox);
FixedCheckBox = new QCheckBox(i18n("&Fixed precision"), numBox); FixedCheckBox = new TQCheckBox(i18n("&Fixed precision"), numBox);
ShowPeriodCheckBox = new QCheckBox(i18n("Always &show decimal point"), numBox); ShowPeriodCheckBox = new TQCheckBox(i18n("Always &show decimal point"), numBox);
QHBox *sBox = new QHBox(DisplayPage); TQHBox *sBox = new TQHBox(DisplayPage);
dBox->addWidget(sBox); dBox->addWidget(sBox);
sBox->setSpacing(spacingHint()); sBox->setSpacing(spacingHint());
NumBoxLabel = new QLabel(i18n("Visible stack levels:"), sBox); NumBoxLabel = new TQLabel(i18n("Visible stack levels:"), sBox);
NumLevelsNumBox = new QSpinBox(1, 40, 1, sBox); NumLevelsNumBox = new TQSpinBox(1, 40, 1, sBox);
BeepBox = new QCheckBox(i18n("&Beep on error"), DisplayPage); BeepBox = new TQCheckBox(i18n("&Beep on error"), DisplayPage);
dBox->addWidget(BeepBox); dBox->addWidget(BeepBox);
QFrame *HistoryPage = addPage(i18n("History")); TQFrame *HistoryPage = addPage(i18n("History"));
QVBoxLayout *histBox = new QVBoxLayout(HistoryPage, marginHint(), spacingHint()); TQVBoxLayout *histBox = new TQVBoxLayout(HistoryPage, marginHint(), spacingHint());
QHBoxLayout *hBox = new QHBoxLayout(histBox, spacingHint()); TQHBoxLayout *hBox = new TQHBoxLayout(histBox, spacingHint());
HistDepthBox = new QSpinBox(0, 40, 5, HistoryPage); HistDepthBox = new TQSpinBox(0, 40, 5, HistoryPage);
HistoryLabel = new QLabel(HistDepthBox, i18n("History &depth:"), HistoryPage); HistoryLabel = new TQLabel(HistDepthBox, i18n("History &depth:"), HistoryPage);
hBox->addWidget(HistoryLabel); hBox->addWidget(HistoryLabel);
hBox->addWidget(HistDepthBox); hBox->addWidget(HistDepthBox);
ClearHistoryButton = new QPushButton(i18n("C&lear History"), HistoryPage); ClearHistoryButton = new TQPushButton(i18n("C&lear History"), HistoryPage);
connect(ClearHistoryButton, SIGNAL(clicked()), this, SIGNAL(clearHistory())); connect(ClearHistoryButton, SIGNAL(clicked()), this, SIGNAL(clearHistory()));
histBox->addWidget(ClearHistoryButton); histBox->addWidget(ClearHistoryButton);
histBox->addStretch(); histBox->addStretch();
HistDetailCheckBox = new QCheckBox(i18n("Show &base and angle"), HistoryPage); HistDetailCheckBox = new TQCheckBox(i18n("Show &base and angle"), HistoryPage);
histBox->addWidget(HistDetailCheckBox); histBox->addWidget(HistDetailCheckBox);
QFrame *StackPage = addPage(i18n("Stack")); TQFrame *StackPage = addPage(i18n("Stack"));
QVBoxLayout *stackBox = new QVBoxLayout(StackPage, marginHint(), spacingHint()); TQVBoxLayout *stackBox = new TQVBoxLayout(StackPage, marginHint(), spacingHint());
SaveStackCheckBox = new QCheckBox(i18n("&Save stack on quit"), StackPage); SaveStackCheckBox = new TQCheckBox(i18n("&Save stack on quit"), StackPage);
stackBox->addWidget(SaveStackCheckBox); stackBox->addWidget(SaveStackCheckBox);
DelDrops = new QCheckBox(i18n("&Backspace drops on line-entry"), StackPage); DelDrops = new TQCheckBox(i18n("&Backspace drops on line-entry"), StackPage);
stackBox->addWidget(DelDrops); stackBox->addWidget(DelDrops);
connect(this, SIGNAL(cancelClicked()), this, SLOT(readConfig())); connect(this, SIGNAL(cancelClicked()), this, SLOT(readConfig()));

@ -3,20 +3,20 @@
#include <kdialogbase.h> #include <kdialogbase.h>
class QVBoxLayout; class TQVBoxLayout;
class QHBoxLayout; class TQHBoxLayout;
class QGridLayout; class TQGridLayout;
class QCheckBox; class TQCheckBox;
class QLabel; class TQLabel;
class QPushButton; class TQPushButton;
class QSpinBox; class TQSpinBox;
class ConfigureDialog : public KDialogBase class ConfigureDialog : public KDialogBase
{ {
Q_OBJECT Q_OBJECT
public: public:
ConfigureDialog(QWidget *parent = 0, char *name = 0, bool modal = 0); ConfigureDialog(TQWidget *parent = 0, char *name = 0, bool modal = 0);
~ConfigureDialog(); ~ConfigureDialog();
signals: signals:
@ -32,20 +32,20 @@ private slots:
void writeConfig(); void writeConfig();
private: private:
QSpinBox *PrecNumBox; TQSpinBox *PrecNumBox;
QSpinBox *NumLevelsNumBox; TQSpinBox *NumLevelsNumBox;
QCheckBox *BeepBox; TQCheckBox *BeepBox;
QLabel *NumBoxLabel; TQLabel *NumBoxLabel;
QCheckBox *FixedCheckBox; TQCheckBox *FixedCheckBox;
QCheckBox *ShowPeriodCheckBox; TQCheckBox *ShowPeriodCheckBox;
QLabel *PrecLabel; TQLabel *PrecLabel;
QLabel *HistoryLabel; TQLabel *HistoryLabel;
QSpinBox *HistDepthBox; TQSpinBox *HistDepthBox;
QCheckBox *HistDetailCheckBox; TQCheckBox *HistDetailCheckBox;
QCheckBox *SaveStackCheckBox; TQCheckBox *SaveStackCheckBox;
QCheckBox *DelDrops; TQCheckBox *DelDrops;
QCheckBox *SaveHistoryCheckBox; TQCheckBox *SaveHistoryCheckBox;
QPushButton *ClearHistoryButton; TQPushButton *ClearHistoryButton;
}; };
#endif #endif

@ -1,29 +1,29 @@
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qstring.h> #include <ntqstring.h>
#include <qtooltip.h> #include <ntqtooltip.h>
#include <qwhatsthis.h> #include <ntqwhatsthis.h>
#include <kdialog.h> #include <kdialog.h>
#include <klocale.h> #include <klocale.h>
#include "stacklevel.h" #include "stacklevel.h"
StackLevel::StackLevel(int id, QWidget *parent, const char *name) StackLevel::StackLevel(int id, TQWidget *parent, const char *name)
: QHBox(parent, name) : TQHBox(parent, name)
{ {
setSpacing(KDialog::spacingHint()); setSpacing(KDialog::spacingHint());
this->id = id; this->id = id;
m_edit = new QLineEdit(this); m_edit = new TQLineEdit(this);
QToolTip::add(m_edit, i18n("Stack level %1").arg(QString::number(id))); TQToolTip::add(m_edit, i18n("Stack level %1").arg(TQString::number(id)));
connect(m_edit, SIGNAL(returnPressed()), this, SLOT(emitEdit())); connect(m_edit, SIGNAL(returnPressed()), this, SLOT(emitEdit()));
m_button = new QPushButton(this); m_button = new TQPushButton(this);
QWhatsThis::add(m_button, i18n("Roll from stack level %1").arg(QString::number(id))); TQWhatsThis::add(m_button, i18n("Roll from stack level %1").arg(TQString::number(id)));
QToolTip::add(m_button, i18n("Roll\nShifted: Roll down")); TQToolTip::add(m_button, i18n("Roll\nShifted: Roll down"));
m_button->setText(QString::number(id)); m_button->setText(TQString::number(id));
connect(m_button, SIGNAL(clicked()), this, SLOT(emitButton())); connect(m_button, SIGNAL(clicked()), this, SLOT(emitButton()));
} }
@ -39,7 +39,7 @@ void StackLevel::emitEdit()
void StackLevel::setEnabled(bool enabled) void StackLevel::setEnabled(bool enabled)
{ {
QHBox::setEnabled(enabled); TQHBox::setEnabled(enabled);
m_edit->setEnabled(enabled); m_edit->setEnabled(enabled);
m_button->setEnabled(enabled); m_button->setEnabled(enabled);
} }

@ -1,21 +1,21 @@
#ifndef STACKLEVEL_H #ifndef STACKLEVEL_H
#define STACKLEVEL_H #define STACKLEVEL_H
class QLineEdit; class TQLineEdit;
class QPushButton; class TQPushButton;
class QWidget; class TQWidget;
#include <qhbox.h> #include <ntqhbox.h>
class StackLevel : public QHBox class StackLevel : public TQHBox
{ {
Q_OBJECT Q_OBJECT
public: public:
StackLevel(int, QWidget *parent=0, const char *name=0); StackLevel(int, TQWidget *parent=0, const char *name=0);
virtual void setEnabled(bool enabled); virtual void setEnabled(bool enabled);
QLineEdit *edit() { return m_edit; } TQLineEdit *edit() { return m_edit; }
QPushButton *button() { return m_button; } TQPushButton *button() { return m_button; }
signals: signals:
void buttonPressed(int); void buttonPressed(int);
@ -26,8 +26,8 @@ protected slots:
void emitEdit(); void emitEdit();
private: private:
QLineEdit *m_edit; TQLineEdit *m_edit;
QPushButton *m_button; TQPushButton *m_button;
int id; int id;
}; };

Loading…
Cancel
Save