Initial TQt conversion of katesort

pull/1/head
Slávek Banko 11 years ago
parent ba41b40873
commit d7401b1d18

@ -1060,7 +1060,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"
@ -1092,19 +1092,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
@ -1113,8 +1113,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
@ -1201,22 +1201,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 && QT_VERSION < 0x040000" kde_qt_verstring="TQT_VERSION >= 0x03@VER@00 && TQT_VERSION < 0x040000"
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 && QT_VERSION < 0x040000" kde_qt_verstring="TQT_VERSION >= 300 && TQT_VERSION < 0x040000"
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"
@ -1325,7 +1325,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=
@ -1383,7 +1383,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
@ -1449,9 +1449,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)
@ -2034,7 +2034,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;
@ -2595,7 +2595,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;
@ -3439,7 +3439,7 @@ AC_DEFUN([KDE_ENABLE_HIDDEN_VISIBILITY],
AC_TRY_COMPILE( AC_TRY_COMPILE(
[ [
#include <qglobal.h> #include <ntqglobal.h>
#if Q_EXPORT - 0 != 0 #if Q_EXPORT - 0 != 0
/* if this compiles, then Q_EXPORT is undefined */ /* if this compiles, then Q_EXPORT is undefined */
/* if Q_EXPORT is nonempty, this will break compilation */ /* if Q_EXPORT is nonempty, this will break compilation */
@ -4689,7 +4689,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');
@ -5534,7 +5534,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)
@ -5555,7 +5555,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)

@ -26,7 +26,7 @@
#include <klocale.h> #include <klocale.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <map> #include <map>
#include <qregexp.h> #include <tqregexp.h>
class PluginView : public KXMLGUIClient class PluginView : public KXMLGUIClient
{ {
@ -55,14 +55,14 @@ KatePluginFactory::~KatePluginFactory()
delete s_instance; delete s_instance;
} }
QObject* KatePluginFactory::createObject( QObject* parent, const char* name, const char*, const QStringList & ) TQObject* KatePluginFactory::createObject( TQObject* parent, const char* name, const char*, const TQStringList & )
{ {
return new KatePluginSort( parent, name ); return new KatePluginSort( parent, name );
} }
KInstance* KatePluginFactory::s_instance = 0L; KInstance* KatePluginFactory::s_instance = 0L;
KatePluginSort::KatePluginSort( QObject* parent, const char* name ) KatePluginSort::KatePluginSort( TQObject* parent, const char* name )
: Kate::Plugin ( (Kate::Application*)parent, name ) : Kate::Plugin ( (Kate::Application*)parent, name )
{ {
} }
@ -120,13 +120,13 @@ void KatePluginSort::slotSort()
if (! (sel_sc == 0 && (int) sel_ec == kv->getDoc()->lineLength(kv->getDoc()->selStartLine()))) if (! (sel_sc == 0 && (int) sel_ec == kv->getDoc()->lineLength(kv->getDoc()->selStartLine())))
{ {
m_sortDialog.m_checkBoxByCol->setChecked(true); m_sortDialog.m_checkBoxByCol->setChecked(true);
m_sortDialog.m_lineEditStartCol->setText(QString::number(sel_sc,10)); m_sortDialog.m_lineEditStartCol->setText(TQString::number(sel_sc,10));
m_sortDialog.m_lineEditEndCol->setText(QString::number(sel_ec,10)); m_sortDialog.m_lineEditEndCol->setText(TQString::number(sel_ec,10));
} }
} }
kv->getDoc()->clearSelection(); kv->getDoc()->clearSelection();
} }
if (m_sortDialog.exec() == QDialog::Rejected) if (m_sortDialog.exec() == TQDialog::Rejected)
return; return;
if (kv->getDoc()->selection().isEmpty()) if (kv->getDoc()->selection().isEmpty())
@ -142,15 +142,15 @@ void KatePluginSort::slotSort()
sel_el-- ; sel_el-- ;
// split string to lines // split string to lines
QStringMultiMap strMLines; // alphabetical sort multimap TQStringMultiMap strMLines; // alphabetical sort multimap
LongMultiMap longMLines; // numerical sort multimap LongMultiMap longMLines; // numerical sort multimap
// Map filling... // Map filling...
QString skey; TQString skey;
QString sdata; TQString sdata;
int ikey, non_num_ind; int ikey, non_num_ind;
QRegExp rx("[^0-9]"); // Search regexp for not number character TQRegExp rx("[^0-9]"); // Search regexp for not number character
for (uint i = sel_sl; i <= sel_el; i++) for (uint i = sel_sl; i <= sel_el; i++)
{ {
sdata = kv->getDoc()->textLine(i); sdata = kv->getDoc()->textLine(i);
@ -159,22 +159,22 @@ void KatePluginSort::slotSort()
{ {
skey = skey.mid(m_sortDialog.m_lineEditStartCol->text().toInt() - 1, skey = skey.mid(m_sortDialog.m_lineEditStartCol->text().toInt() - 1,
m_sortDialog.m_lineEditEndCol->text().toInt() - m_sortDialog.m_lineEditStartCol->text().toInt()); m_sortDialog.m_lineEditEndCol->text().toInt() - m_sortDialog.m_lineEditStartCol->text().toInt());
// qDebug("skey: %s", skey.ascii()); // tqDebug("skey: %s", skey.ascii());
} }
// qDebug("\tLine: %d",i); // tqDebug("\tLine: %d",i);
// qDebug("Key: %s, Line content: %s", skey.ascii(),sdata.ascii()); // tqDebug("Key: %s, Line content: %s", skey.ascii(),sdata.ascii());
if (m_sortDialog.m_radioButtonAlphaSort->isChecked()) if (m_sortDialog.m_radioButtonAlphaSort->isChecked())
{ {
if (m_sortDialog.m_checkBoxCase->isChecked()) if (m_sortDialog.m_checkBoxCase->isChecked())
{ {
// Case sensitive sort // Case sensitive sort
strMLines.insert(std::pair<QString, QString>(skey ,sdata)); strMLines.insert(std::pair<TQString, TQString>(skey ,sdata));
} }
else else
{ {
// Case insensitive sort // Case insensitive sort
strMLines.insert(std::pair<QString, QString>(skey.lower(), sdata)); strMLines.insert(std::pair<TQString, TQString>(skey.lower(), sdata));
} }
} }
else else
@ -186,7 +186,7 @@ void KatePluginSort::slotSort()
non_num_ind = skey.find(rx,0); non_num_ind = skey.find(rx,0);
if (non_num_ind != -1) if (non_num_ind != -1)
{ // beginning of key is number { // beginning of key is number
// qDebug("non_num_ind: %d",non_num_ind); // tqDebug("non_num_ind: %d",non_num_ind);
skey.truncate(non_num_ind); skey.truncate(non_num_ind);
} }
else else
@ -194,8 +194,8 @@ void KatePluginSort::slotSort()
skey = "0"; skey = "0";
} }
} }
// qDebug("Key: %s",skey.ascii()); // tqDebug("Key: %s",skey.ascii());
longMLines.insert(std::pair<long, QString>(skey.toLong(), sdata)); longMLines.insert(std::pair<long, TQString>(skey.toLong(), sdata));
} }
} }
@ -204,12 +204,12 @@ void KatePluginSort::slotSort()
kv->getDoc()->removeText(sel_sl,0,sel_el,kv->getDoc()->lineLength(sel_el)); kv->getDoc()->removeText(sel_sl,0,sel_el,kv->getDoc()->lineLength(sel_el));
// kv->updateView(false); // kv->updateView(false);
QStringMultiMap::iterator smit, smsit, emsit; TQStringMultiMap::iterator smit, smsit, emsit;
LongMultiMap::iterator lmit, slmit, elmit; LongMultiMap::iterator lmit, slmit, elmit;
bool fasc; bool fasc;
uint i=sel_sl; // insert start line uint i=sel_sl; // insert start line
bool first=true; // First line flag bool first=true; // First line flag
QString prevLine; // Store previous line (for unique purpose) TQString prevLine; // Store previous line (for unique purpose)
if (m_sortDialog.m_radioButtonAlphaSort->isChecked()) if (m_sortDialog.m_radioButtonAlphaSort->isChecked())
{ {
@ -233,13 +233,13 @@ void KatePluginSort::slotSort()
{ {
sdata = smit->second; sdata = smit->second;
skey = smit->first; skey = smit->first;
// qDebug("Key: %s, Line content: %s", skey.ascii(),sdata.ascii()); // tqDebug("Key: %s, Line content: %s", skey.ascii(),sdata.ascii());
if (m_sortDialog.m_checkBoxUnique->isChecked()) if (m_sortDialog.m_checkBoxUnique->isChecked())
{ {
if ( prevLine.compare(sdata) != 0 || first ) //remove duplicities if ( prevLine.compare(sdata) != 0 || first ) //remove duplicities
{ {
// qDebug("Inserting line: %d",i); // tqDebug("Inserting line: %d",i);
first = false; first = false;
prevLine = sdata; prevLine = sdata;
kv->getDoc()->insertLine(i, sdata); kv->getDoc()->insertLine(i, sdata);
@ -249,7 +249,7 @@ void KatePluginSort::slotSort()
else else
{ {
prevLine = sdata; prevLine = sdata;
// qDebug("Inserting line: %d",i); // tqDebug("Inserting line: %d",i);
kv->getDoc()->insertLine(i, sdata); kv->getDoc()->insertLine(i, sdata);
i++; i++;
} // m_sortDialog.m_checkBoxUnique->isChecked() } // m_sortDialog.m_checkBoxUnique->isChecked()
@ -278,12 +278,12 @@ void KatePluginSort::slotSort()
sdata = lmit->second; sdata = lmit->second;
ikey = lmit->first; ikey = lmit->first;
// qDebug("Key: %d, Line content: %s", ikey,sdata.ascii()); // tqDebug("Key: %d, Line content: %s", ikey,sdata.ascii());
if (m_sortDialog.m_checkBoxUnique->isChecked()) if (m_sortDialog.m_checkBoxUnique->isChecked())
{ {
if ( prevLine.compare(sdata) != 0 || first ) //remove duplicities if ( prevLine.compare(sdata) != 0 || first ) //remove duplicities
{ {
// qDebug("Inserting line: %d",i); // tqDebug("Inserting line: %d",i);
first = false; first = false;
prevLine = sdata; prevLine = sdata;
kv->getDoc()->insertLine(i, sdata); kv->getDoc()->insertLine(i, sdata);
@ -293,7 +293,7 @@ void KatePluginSort::slotSort()
else else
{ {
prevLine = sdata; prevLine = sdata;
// qDebug("Inserting line: %d",i); // tqDebug("Inserting line: %d",i);
kv->getDoc()->insertLine(i, sdata); kv->getDoc()->insertLine(i, sdata);
i++; i++;
} // m_sortDialog.m_checkBoxUnique->isChecked() } // m_sortDialog.m_checkBoxUnique->isChecked()

@ -44,7 +44,7 @@ class KatePluginFactory : public KLibFactory
KatePluginFactory(); KatePluginFactory();
virtual ~KatePluginFactory(); virtual ~KatePluginFactory();
virtual QObject* createObject( QObject* parent = 0, const char* pname = 0, const char* name = "QObject", const QStringList &args = QStringList() ); virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0, const char* name = "TQObject", const TQStringList &args = TQStringList() );
private: private:
static KInstance* s_instance; static KInstance* s_instance;
@ -55,7 +55,7 @@ class KatePluginSort : public Kate::Plugin, Kate::PluginViewInterface
Q_OBJECT Q_OBJECT
public: public:
KatePluginSort( QObject* parent = 0, const char* name = 0 ); KatePluginSort( TQObject* parent = 0, const char* name = 0 );
virtual ~KatePluginSort(); virtual ~KatePluginSort();
void addView (Kate::MainWindow *win); void addView (Kate::MainWindow *win);
@ -65,9 +65,9 @@ class KatePluginSort : public Kate::Plugin, Kate::PluginViewInterface
void slotSort(); void slotSort();
private: private:
QPtrList<class PluginView> m_views; TQPtrList<class PluginView> m_views;
typedef std::multimap<QString,QString> QStringMultiMap; typedef std::multimap<TQString,TQString> TQStringMultiMap;
typedef std::multimap<long,QString> LongMultiMap; typedef std::multimap<long,TQString> LongMultiMap;
}; };
#endif // _PLUGIN_SORT_H_ #endif // _PLUGIN_SORT_H_

@ -21,34 +21,34 @@
#include "sortdialog.h" #include "sortdialog.h"
#include "kconfig.h" #include "kconfig.h"
#include <qwhatsthis.h> #include <tqwhatsthis.h>
SortDialog::SortDialog ( QWidget* parent, const char* name, bool modal, WFlags fl ) SortDialog::SortDialog ( TQWidget* parent, const char* name, bool modal, WFlags fl )
: sortdialoglayout ( parent,name, modal,fl ) : sortdialoglayout ( parent,name, modal,fl )
{ {
// set labels // set labels
QWhatsThis::add(m_radioButtonAsc,i18n( TQWhatsThis::add(m_radioButtonAsc,i18n(
"Sort in ascending order " "Sort in ascending order "
"(from A to Z or 0 to 9).")); "(from A to Z or 0 to 9)."));
QWhatsThis::add(m_radioButtonDesc,i18n( TQWhatsThis::add(m_radioButtonDesc,i18n(
"Sort in descending order " "Sort in descending order "
"(from Z to A or 9 to 0).")); "(from Z to A or 9 to 0)."));
QWhatsThis::add(m_checkBoxCase,i18n( TQWhatsThis::add(m_checkBoxCase,i18n(
"Check this for case sensitive sort.")); "Check this for case sensitive sort."));
QWhatsThis::add(m_checkBoxUnique,i18n( TQWhatsThis::add(m_checkBoxUnique,i18n(
"Check this to removed all duplicated records.")); "Check this to removed all duplicated records."));
QWhatsThis::add(m_checkBoxByCol,i18n( TQWhatsThis::add(m_checkBoxByCol,i18n(
"Check this for sorting by specific column.\n\n" "Check this for sorting by specific column.\n\n"
"If a part of one line is selected, " "If a part of one line is selected, "
"this checkbox is automatically selected. " "this checkbox is automatically selected. "
"Start and end fields are filled according to selection.")); "Start and end fields are filled according to selection."));
QWhatsThis::add(m_lineEditStartCol,i18n( TQWhatsThis::add(m_lineEditStartCol,i18n(
"Start column of the sorting area.")); "Start column of the sorting area."));
QWhatsThis::add(m_lineEditEndCol,i18n( TQWhatsThis::add(m_lineEditEndCol,i18n(
"End column of the sorting area.")); "End column of the sorting area."));
QWhatsThis::add(m_radioButtonAlphaSort,i18n( TQWhatsThis::add(m_radioButtonAlphaSort,i18n(
"Alphabetical sorting (A-Z).")); "Alphabetical sorting (A-Z)."));
QWhatsThis::add(m_radioButtonNumSort,i18n( TQWhatsThis::add(m_radioButtonNumSort,i18n(
"Numeric sorting (0-9)")); "Numeric sorting (0-9)"));
config_load(); config_load();
@ -60,7 +60,7 @@ SortDialog::~SortDialog()
/*$SPECIALIZATION$*/ /*$SPECIALIZATION$*/
void SortDialog::reject() void SortDialog::reject()
{ {
QDialog::reject(); TQDialog::reject();
} }
void SortDialog::accept() void SortDialog::accept()
@ -72,19 +72,19 @@ void SortDialog::accept()
m_lineEditEndCol->text().isEmpty() || m_lineEditEndCol->text().isEmpty() ||
m_lineEditEndCol->text().toInt() == 0) m_lineEditEndCol->text().toInt() == 0)
{ {
QMessageBox::warning(this,i18n("Error"), TQMessageBox::warning(this,i18n("Error"),
i18n("Fields:\n\"Starting at\" and \"Ending at\"\nhave to contains numbers."), i18n("Fields:\n\"Starting at\" and \"Ending at\"\nhave to contains numbers."),
i18n("OK")); i18n("OK"));
return; return;
} }
} }
config_save(); config_save();
QDialog::accept(); TQDialog::accept();
} }
int SortDialog::exec() int SortDialog::exec()
{ {
return QDialog::exec(); return TQDialog::exec();
} }
void SortDialog::toggledCol() void SortDialog::toggledCol()
@ -111,7 +111,7 @@ void SortDialog::toggledType()
void SortDialog::config_load () void SortDialog::config_load ()
{ {
// qDebug("config_load()"); // tqDebug("config_load()");
KConfig *config = new KConfig("katesortpluginrc"); KConfig *config = new KConfig("katesortpluginrc");
m_radioButtonAsc->setChecked(config->readBoolEntry("Asc",true)); m_radioButtonAsc->setChecked(config->readBoolEntry("Asc",true));
m_radioButtonDesc->setChecked(config->readBoolEntry("Desc",false)); m_radioButtonDesc->setChecked(config->readBoolEntry("Desc",false));
@ -126,7 +126,7 @@ void SortDialog::config_load ()
void SortDialog::config_save () void SortDialog::config_save ()
{ {
// qDebug("config_save()"); // tqDebug("config_save()");
KConfig *config = new KConfig("katesortpluginrc"); KConfig *config = new KConfig("katesortpluginrc");
config->writeEntry("Asc",m_radioButtonAsc->isOn()); config->writeEntry("Asc",m_radioButtonAsc->isOn());
config->writeEntry("Desc", m_radioButtonDesc->isOn()); config->writeEntry("Desc", m_radioButtonDesc->isOn());

@ -22,25 +22,25 @@
#define SORTDIALOG_H #define SORTDIALOG_H
#include "sortdialoglayout.h" #include "sortdialoglayout.h"
#include <qdialog.h> #include <tqdialog.h>
#include <klocale.h> #include <klocale.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qmessagebox.h> #include <tqmessagebox.h>
class SortDialog : public sortdialoglayout class SortDialog : public sortdialoglayout
{ {
Q_OBJECT Q_OBJECT
public: public:
SortDialog ( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); SortDialog ( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~SortDialog(); ~SortDialog();
// QCheckBox* m_checkBoxUnique; // TQCheckBox* m_checkBoxUnique;
/*$PUBLIC_FUNCTIONS$*/ /*$PUBLIC_FUNCTIONS$*/
public slots: public slots:

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>sortdialoglayout</class> <class>sortdialoglayout</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>sortdialoglayout</cstring> <cstring>sortdialoglayout</cstring>
</property> </property>
@ -22,7 +22,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>Layout1</cstring> <cstring>Layout1</cstring>
</property> </property>
@ -53,7 +53,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOk</cstring> <cstring>buttonOk</cstring>
</property> </property>
@ -70,7 +70,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>
@ -86,7 +86,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QButtonGroup" row="0" column="0"> <widget class="TQButtonGroup" row="0" column="0">
<property name="name"> <property name="name">
<cstring>m_groupSortOrder</cstring> <cstring>m_groupSortOrder</cstring>
</property> </property>
@ -97,7 +97,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -105,7 +105,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_radioButtonAsc</cstring> <cstring>m_radioButtonAsc</cstring>
</property> </property>
@ -119,7 +119,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_radioButtonDesc</cstring> <cstring>m_radioButtonDesc</cstring>
</property> </property>
@ -134,7 +134,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QGroupBox" row="0" column="1" rowspan="2" colspan="1"> <widget class="TQGroupBox" row="0" column="1" rowspan="2" colspan="1">
<property name="name"> <property name="name">
<cstring>m_groupAdvanced</cstring> <cstring>m_groupAdvanced</cstring>
</property> </property>
@ -145,7 +145,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -153,7 +153,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_checkBoxCase</cstring> <cstring>m_checkBoxCase</cstring>
</property> </property>
@ -164,7 +164,7 @@
<string>Alt+C</string> <string>Alt+C</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_checkBoxUnique</cstring> <cstring>m_checkBoxUnique</cstring>
</property> </property>
@ -172,7 +172,7 @@
<string>Uni&amp;que</string> <string>Uni&amp;que</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>m_checkBoxByCol</cstring> <cstring>m_checkBoxByCol</cstring>
</property> </property>
@ -185,7 +185,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>layout5</cstring> <cstring>layout5</cstring>
</property> </property>
@ -193,7 +193,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_textLabelStartCol</cstring> <cstring>m_textLabelStartCol</cstring>
</property> </property>
@ -221,7 +221,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>m_lineEditStartCol</cstring> <cstring>m_lineEditStartCol</cstring>
</property> </property>
@ -237,7 +237,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>layout6</cstring>
</property> </property>
@ -245,7 +245,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>m_textLabelEndCol</cstring> <cstring>m_textLabelEndCol</cstring>
</property> </property>
@ -273,7 +273,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLineEdit"> <widget class="TQLineEdit">
<property name="name"> <property name="name">
<cstring>m_lineEditEndCol</cstring> <cstring>m_lineEditEndCol</cstring>
</property> </property>
@ -308,7 +308,7 @@
</spacer> </spacer>
</grid> </grid>
</widget> </widget>
<widget class="QButtonGroup" row="1" column="0"> <widget class="TQButtonGroup" row="1" column="0">
<property name="name"> <property name="name">
<cstring>m_groupSortType</cstring> <cstring>m_groupSortType</cstring>
</property> </property>
@ -319,7 +319,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout3</cstring> <cstring>layout3</cstring>
</property> </property>
@ -327,7 +327,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_radioButtonAlphaSort</cstring> <cstring>m_radioButtonAlphaSort</cstring>
</property> </property>
@ -341,7 +341,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QRadioButton"> <widget class="TQRadioButton">
<property name="name"> <property name="name">
<cstring>m_radioButtonNumSort</cstring> <cstring>m_radioButtonNumSort</cstring>
</property> </property>

Loading…
Cancel
Save