diff options
Diffstat (limited to 'kate/app')
50 files changed, 1442 insertions, 1442 deletions
diff --git a/kate/app/kateapp.cpp b/kate/app/kateapp.cpp index 00b58b8b5..70c81d465 100644 --- a/kate/app/kateapp.cpp +++ b/kate/app/kateapp.cpp @@ -42,10 +42,10 @@ #include <ksimpleconfig.h> #include <kstartupinfo.h> -#include <qfile.h> -#include <qtimer.h> -#include <qdir.h> -#include <qtextcodec.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqdir.h> +#include <tqtextcodec.h> #include <stdlib.h> #include <unistd.h> @@ -81,7 +81,7 @@ KateApp::KateApp (KCmdLineArgs *args) m_obj = new KateAppDCOPIface (this); kdDebug()<<"Setting KATE_PID: '"<<getpid()<<"'"<<endl; - ::setenv( "KATE_PID", QString("%1").arg(getpid()).latin1(), 1 ); + ::setenv( "KATE_PID", TQString("%1").arg(getpid()).latin1(), 1 ); // handle restore different if (isRestored()) @@ -129,10 +129,10 @@ Kate::Application *KateApp::application () * Has always been the Kate Versioning Scheme: * KDE X.Y.Z contains Kate X-1.Y.Z */ -QString KateApp::kateVersion (bool fullVersion) +TQString KateApp::kateVersion (bool fullVersion) { - return fullVersion ? QString ("%1.%2.%3").arg(KDE::versionMajor() - 1).arg(KDE::versionMinor()).arg(KDE::versionRelease()) - : QString ("%1.%2").arg(KDE::versionMajor() - 1).arg(KDE::versionMinor()); + return fullVersion ? TQString ("%1.%2.%3").arg(KDE::versionMajor() - 1).arg(KDE::versionMinor()).arg(KDE::versionRelease()) + : TQString ("%1.%2").arg(KDE::versionMajor() - 1).arg(KDE::versionMinor()); } void KateApp::restoreKate () @@ -142,7 +142,7 @@ void KateApp::restoreKate () // activate again correct session!!! sessionConfig()->setGroup("General"); - QString lastSession (sessionConfig()->readEntry ("Last Session", "default.katesession")); + TQString lastSession (sessionConfig()->readEntry ("Last Session", "default.katesession")); sessionManager()->activateSession (new KateSession (sessionManager(), lastSession, ""), false, false, false); m_docManager->restoreDocumentList (sessionConfig()); @@ -151,7 +151,7 @@ void KateApp::restoreKate () // restore all windows ;) for (int n=1; KMainWindow::canBeRestored(n); n++) - newMainWindow(sessionConfig(), QString ("%1").arg(n)); + newMainWindow(sessionConfig(), TQString ("%1").arg(n)); // oh, no mainwindow, create one, should not happen, but make sure ;) if (mainWindows() == 0) @@ -166,7 +166,7 @@ bool KateApp::startupKate () // user specified session to open if (m_args->isSet ("start")) { - sessionManager()->activateSession (sessionManager()->giveSession (QString::fromLocal8Bit(m_args->getOption("start"))), false, false); + sessionManager()->activateSession (sessionManager()->giveSession (TQString::fromLocal8Bit(m_args->getOption("start"))), false, false); } else { @@ -186,7 +186,7 @@ bool KateApp::startupKate () // notify about start KStartupInfo::setNewStartupId( activeMainWindow(), startupId()); - QTextCodec *codec = m_args->isSet("encoding") ? QTextCodec::codecForName(m_args->getOption("encoding")) : 0; + TQTextCodec *codec = m_args->isSet("encoding") ? TQTextCodec::codecForName(m_args->getOption("encoding")) : 0; bool tempfileSet = KCmdLineArgs::isTempFileSet(); @@ -195,7 +195,7 @@ bool KateApp::startupKate () for (int z=0; z<m_args->count(); z++) { // this file is no local dir, open it, else warn - bool noDir = !m_args->url(z).isLocalFile() || !QDir (m_args->url(z).path()).exists(); + bool noDir = !m_args->url(z).isLocalFile() || !TQDir (m_args->url(z).path()).exists(); if (noDir) { @@ -203,7 +203,7 @@ bool KateApp::startupKate () if (codec) id = activeMainWindow()->viewManager()->openURL( m_args->url(z), codec->name(), false, tempfileSet ); else - id = activeMainWindow()->viewManager()->openURL( m_args->url(z), QString::null, false, tempfileSet ); + id = activeMainWindow()->viewManager()->openURL( m_args->url(z), TQString::null, false, tempfileSet ); } else KMessageBox::sorry( activeMainWindow(), @@ -215,14 +215,14 @@ bool KateApp::startupKate () // handle stdin input if( m_args->isSet( "stdin" ) ) { - QTextIStream input(stdin); + TQTextIStream input(stdin); // set chosen codec if (codec) input.setCodec (codec); - QString line; - QString text; + TQString line; + TQString text; do { @@ -295,19 +295,19 @@ KateSessionManager *KateApp::sessionManager () return m_sessionManager; } -bool KateApp::openURL (const KURL &url, const QString &encoding, bool isTempFile) +bool KateApp::openURL (const KURL &url, const TQString &encoding, bool isTempFile) { KateMainWindow *mainWindow = activeMainWindow (); if (!mainWindow) return false; - QTextCodec *codec = encoding.isEmpty() ? 0 : QTextCodec::codecForName(encoding.latin1()); + TQTextCodec *codec = encoding.isEmpty() ? 0 : TQTextCodec::codecForName(encoding.latin1()); kdDebug () << "OPEN URL "<< encoding << endl; // this file is no local dir, open it, else warn - bool noDir = !url.isLocalFile() || !QDir (url.path()).exists(); + bool noDir = !url.isLocalFile() || !TQDir (url.path()).exists(); if (noDir) { @@ -315,7 +315,7 @@ bool KateApp::openURL (const KURL &url, const QString &encoding, bool isTempFile if (codec) mainWindow->viewManager()->openURL( url, codec->name(), true, isTempFile ); else - mainWindow->viewManager()->openURL( url, QString::null, true, isTempFile ); + mainWindow->viewManager()->openURL( url, TQString::null, true, isTempFile ); } else KMessageBox::sorry( mainWindow, @@ -336,7 +336,7 @@ bool KateApp::setCursor (int line, int column) return true; } -bool KateApp::openInput (const QString &text) +bool KateApp::openInput (const TQString &text) { activeMainWindow()->viewManager()->openURL( "", "", true ); @@ -348,7 +348,7 @@ bool KateApp::openInput (const QString &text) return true; } -KateMainWindow *KateApp::newMainWindow (KConfig *sconfig, const QString &sgroup) +KateMainWindow *KateApp::newMainWindow (KConfig *sconfig, const TQString &sgroup) { KateMainWindow *mainWindow = new KateMainWindow (sconfig, sgroup); m_mainWindows.push_back (mainWindow); diff --git a/kate/app/kateapp.h b/kate/app/kateapp.h index ff1d9d967..b67901cd9 100644 --- a/kate/app/kateapp.h +++ b/kate/app/kateapp.h @@ -24,7 +24,7 @@ #include <kapplication.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> class KateSessionManager; class KateAppDCOPIface; @@ -75,7 +75,7 @@ class KDE_EXPORT KateApp : public KApplication * @param fullVersion should full version be returned? * @return Kate version */ - static QString kateVersion (bool fullVersion = true); + static TQString kateVersion (bool fullVersion = true); /** * kate init @@ -140,7 +140,7 @@ class KDE_EXPORT KateApp : public KApplication * @param sgroup session group for this window * @return new constructed main window */ - KateMainWindow *newMainWindow (KConfig *sconfig = 0, const QString &sgroup = ""); + KateMainWindow *newMainWindow (KConfig *sconfig = 0, const TQString &sgroup = ""); /** * removes the mainwindow given, DOES NOT DELETE IT @@ -180,7 +180,7 @@ class KDE_EXPORT KateApp : public KApplication * @param isTempFile if set to true and the file is a local file, it will be deleted when the document is closed. * @return success */ - bool openURL (const KURL &url, const QString &encoding, bool isTempFile ); + bool openURL (const KURL &url, const TQString &encoding, bool isTempFile ); /** * position cursor in current active view @@ -196,7 +196,7 @@ class KDE_EXPORT KateApp : public KApplication * @param text text to fill in the new doc/view * @return success */ - bool openInput (const QString &text); + bool openInput (const TQString &text); private: /** @@ -227,7 +227,7 @@ class KDE_EXPORT KateApp : public KApplication /** * known main windows */ - QValueList<KateMainWindow*> m_mainWindows; + TQValueList<KateMainWindow*> m_mainWindows; /** * dcop interface diff --git a/kate/app/kateappIface.cpp b/kate/app/kateappIface.cpp index b70be960a..259e48b89 100644 --- a/kate/app/kateappIface.cpp +++ b/kate/app/kateappIface.cpp @@ -69,12 +69,12 @@ DCOPRef KateAppDCOPIface::mainWindow (uint n) return DCOPRef (); } -bool KateAppDCOPIface::openURL (KURL url, QString encoding) +bool KateAppDCOPIface::openURL (KURL url, TQString encoding) { return m_app->openURL (url, encoding, false); } -bool KateAppDCOPIface::openURL (KURL url, QString encoding, bool isTempFile) +bool KateAppDCOPIface::openURL (KURL url, TQString encoding, bool isTempFile) { return m_app->openURL (url, encoding, isTempFile); } @@ -84,19 +84,19 @@ bool KateAppDCOPIface::setCursor (int line, int column) return m_app->setCursor (line, column); } -bool KateAppDCOPIface::openInput (QString text) +bool KateAppDCOPIface::openInput (TQString text) { return m_app->openInput (text); } -bool KateAppDCOPIface::activateSession (QString session) +bool KateAppDCOPIface::activateSession (TQString session) { m_app->sessionManager()->activateSession (m_app->sessionManager()->giveSession (session)); return true; } -const QString & KateAppDCOPIface::session() const +const TQString & KateAppDCOPIface::session() const { return m_app->sessionManager()->activeSession()->sessionName(); } diff --git a/kate/app/kateappIface.h b/kate/app/kateappIface.h index 577c36e41..c57e788c8 100644 --- a/kate/app/kateappIface.h +++ b/kate/app/kateappIface.h @@ -49,7 +49,7 @@ class KateAppDCOPIface : public DCOPObject * @param encoding encoding name * @return success */ - bool openURL (KURL url, QString encoding); + bool openURL (KURL url, TQString encoding); /** * Like the above, but adds an option to let the documentManager know @@ -57,7 +57,7 @@ class KateAppDCOPIface : public DCOPObject * @p isTempFile should be set to true with the --tempfile option set ONLY, * files opened with this set to true will be deleted when closed. */ - bool openURL(KURL url, QString encoding, bool isTempFile); + bool openURL(KURL url, TQString encoding, bool isTempFile); /** * set cursor of active view in active main window @@ -73,19 +73,19 @@ class KateAppDCOPIface : public DCOPObject * @param text text to fill in the new doc/view * @return success */ - bool openInput (QString text); + bool openInput (TQString text); /** * activate a given session * @param session session name * @return success */ - bool activateSession (QString session); + bool activateSession (TQString session); /** * @return the name of the active session */ - const QString & session() const; + const TQString & session() const; private: KateApp *m_app; diff --git a/kate/app/kateconfigdialog.cpp b/kate/app/kateconfigdialog.cpp index 62d86054b..47a7de19c 100644 --- a/kate/app/kateconfigdialog.cpp +++ b/kate/app/kateconfigdialog.cpp @@ -32,17 +32,17 @@ #include "katefilelist.h" #include "kateexternaltools.h" -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qvbox.h> -#include <qwhatsthis.h> -#include <qcombobox.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqvbox.h> +#include <tqwhatsthis.h> +#include <tqcombobox.h> #include <kinstance.h> #include <kdebug.h> @@ -83,7 +83,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) pluginPages.setAutoDelete (false); editorPages.setAutoDelete (false); - QStringList path; + TQStringList path; setShowIconsInTreeList(true); @@ -95,75 +95,75 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) //BEGIN General page path << i18n("Application") << i18n("General"); - QFrame* frGeneral = addPage(path, i18n("General Options"), BarIcon("gohome", KIcon::SizeSmall)); + TQFrame* frGeneral = addPage(path, i18n("General Options"), BarIcon("gohome", KIcon::SizeSmall)); - QVBoxLayout *lo = new QVBoxLayout( frGeneral ); + TQVBoxLayout *lo = new TQVBoxLayout( frGeneral ); lo->setSpacing(KDialog::spacingHint()); config->setGroup("General"); // GROUP with the one below: "Appearance" - QButtonGroup *bgStartup = new QButtonGroup( 1, Qt::Horizontal, i18n("&Appearance"), frGeneral ); + TQButtonGroup *bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("&Appearance"), frGeneral ); lo->addWidget( bgStartup ); // show full path in title config->setGroup("General"); - cb_fullPath = new QCheckBox( i18n("&Show full path in title"), bgStartup); + cb_fullPath = new TQCheckBox( i18n("&Show full path in title"), bgStartup); cb_fullPath->setChecked( mainWindow->viewManager()->getShowFullPath() ); - QWhatsThis::add(cb_fullPath,i18n("If this option is checked, the full document path will be shown in the window caption.")); - connect( cb_fullPath, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) ); + TQWhatsThis::add(cb_fullPath,i18n("If this option is checked, the full document path will be shown in the window caption.")); + connect( cb_fullPath, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); // GROUP with the one below: "Behavior" - bgStartup = new QButtonGroup( 1, Qt::Horizontal, i18n("&Behavior"), frGeneral ); + bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("&Behavior"), frGeneral ); lo->addWidget( bgStartup ); // sync the konsole ? - cb_syncKonsole = new QCheckBox(bgStartup); + cb_syncKonsole = new TQCheckBox(bgStartup); cb_syncKonsole->setText(i18n("Sync &terminal emulator with active document")); cb_syncKonsole->setChecked(parent->syncKonsole); - QWhatsThis::add( cb_syncKonsole, i18n( + TQWhatsThis::add( cb_syncKonsole, i18n( "If this is checked, the built in Konsole will <code>cd</code> to the directory " "of the active document when started and whenever the active document changes, " "if the document is a local file.") ); - connect( cb_syncKonsole, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) ); + connect( cb_syncKonsole, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); // modified files notification - cb_modNotifications = new QCheckBox( + cb_modNotifications = new TQCheckBox( i18n("Wa&rn about files modified by foreign processes"), bgStartup ); cb_modNotifications->setChecked( parent->modNotification ); - QWhatsThis::add( cb_modNotifications, i18n( + TQWhatsThis::add( cb_modNotifications, i18n( "If enabled, when Kate receives focus you will be asked what to do with " "files that have been modified on the hard disk. If not enabled, you will " "be asked what to do with a file that has been modified on the hard disk only " "when that file gains focus inside Kate.") ); - connect( cb_modNotifications, SIGNAL( toggled( bool ) ), - this, SLOT( slotChanged() ) ); + connect( cb_modNotifications, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotChanged() ) ); // GROUP with the one below: "Meta-informations" - bgStartup = new QButtonGroup( 1, Qt::Horizontal, i18n("Meta-Information"), frGeneral ); + bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Meta-Information"), frGeneral ); lo->addWidget( bgStartup ); // save meta infos - cb_saveMetaInfos = new QCheckBox( bgStartup ); + cb_saveMetaInfos = new TQCheckBox( bgStartup ); cb_saveMetaInfos->setText(i18n("Keep &meta-information past sessions")); cb_saveMetaInfos->setChecked(KateDocManager::self()->getSaveMetaInfos()); - QWhatsThis::add(cb_saveMetaInfos, i18n( + TQWhatsThis::add(cb_saveMetaInfos, i18n( "Check this if you want document configuration like for example " "bookmarks to be saved past editor sessions. The configuration will be " "restored if the document has not changed when reopened.")); - connect( cb_saveMetaInfos, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) ); + connect( cb_saveMetaInfos, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); // meta infos days - QHBox *hbDmf = new QHBox( bgStartup ); + TQHBox *hbDmf = new TQHBox( bgStartup ); hbDmf->setEnabled(KateDocManager::self()->getSaveMetaInfos()); - QLabel *lDmf = new QLabel( i18n("&Delete unused meta-information after:"), hbDmf ); - sb_daysMetaInfos = new QSpinBox( 0, 180, 1, hbDmf ); + TQLabel *lDmf = new TQLabel( i18n("&Delete unused meta-information after:"), hbDmf ); + sb_daysMetaInfos = new TQSpinBox( 0, 180, 1, hbDmf ); sb_daysMetaInfos->setSpecialValueText(i18n("(never)")); sb_daysMetaInfos->setSuffix(i18n(" day(s)")); sb_daysMetaInfos->setValue( KateDocManager::self()->getDaysMetaInfos() ); lDmf->setBuddy( sb_daysMetaInfos ); - connect( cb_saveMetaInfos, SIGNAL( toggled( bool ) ), hbDmf, SLOT( setEnabled( bool ) ) ); - connect( sb_daysMetaInfos, SIGNAL( valueChanged ( int ) ), this, SLOT( slotChanged() ) ); + connect( cb_saveMetaInfos, TQT_SIGNAL( toggled( bool ) ), hbDmf, TQT_SLOT( setEnabled( bool ) ) ); + connect( sb_daysMetaInfos, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) ); lo->addStretch(1); // :-] works correct without autoadd //END General page @@ -172,36 +172,36 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) //BEGIN Session page path << i18n("Application") << i18n("Sessions"); - QFrame* frSessions = addPage(path, i18n("Session Management"), BarIcon("history", KIcon::SizeSmall)); + TQFrame* frSessions = addPage(path, i18n("Session Management"), BarIcon("history", KIcon::SizeSmall)); - lo = new QVBoxLayout( frSessions ); + lo = new TQVBoxLayout( frSessions ); lo->setSpacing(KDialog::spacingHint()); // GROUP with the one below: "Startup" - bgStartup = new QButtonGroup( 1, Qt::Horizontal, i18n("Elements of Sessions"), frSessions ); + bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Elements of Sessions"), frSessions ); lo->addWidget( bgStartup ); // restore view config - cb_restoreVC = new QCheckBox( bgStartup ); + cb_restoreVC = new TQCheckBox( bgStartup ); cb_restoreVC->setText(i18n("Include &window configuration")); config->setGroup("General"); cb_restoreVC->setChecked( config->readBoolEntry("Restore Window Configuration", true) ); - QWhatsThis::add(cb_restoreVC, i18n( + TQWhatsThis::add(cb_restoreVC, i18n( "Check this if you want all your views and frames restored each time you open Kate")); - connect( cb_restoreVC, SIGNAL( toggled( bool ) ), this, SLOT( slotChanged() ) ); + connect( cb_restoreVC, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); - QRadioButton *rb1, *rb2, *rb3; + TQRadioButton *rb1, *rb2, *rb3; - sessions_start = new QButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Startup"), frSessions ); + sessions_start = new TQButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Startup"), frSessions ); lo->add (sessions_start); sessions_start->setRadioButtonExclusive( true ); - sessions_start->insert( rb1=new QRadioButton( i18n("&Start new session"), sessions_start ), 0 ); - sessions_start->insert( rb2=new QRadioButton( i18n("&Load last-used session"), sessions_start ), 1 ); - sessions_start->insert( rb3=new QRadioButton( i18n("&Manually choose a session"), sessions_start ), 2 ); + sessions_start->insert( rb1=new TQRadioButton( i18n("&Start new session"), sessions_start ), 0 ); + sessions_start->insert( rb2=new TQRadioButton( i18n("&Load last-used session"), sessions_start ), 1 ); + sessions_start->insert( rb3=new TQRadioButton( i18n("&Manually choose a session"), sessions_start ), 2 ); config->setGroup("General"); - QString sesStart (config->readEntry ("Startup Session", "manual")); + TQString sesStart (config->readEntry ("Startup Session", "manual")); if (sesStart == "new") sessions_start->setButton (0); else if (sesStart == "last") @@ -209,20 +209,20 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) else sessions_start->setButton (2); - connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); - connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); - connect(rb3, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); + connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); + connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); + connect(rb3, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); - sessions_exit = new QButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Exit or Session Switch"), frSessions ); + sessions_exit = new TQButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Exit or Session Switch"), frSessions ); lo->add (sessions_exit); sessions_exit->setRadioButtonExclusive( true ); - sessions_exit->insert( rb1=new QRadioButton( i18n("&Do not save session"), sessions_exit ), 0 ); - sessions_exit->insert( rb2=new QRadioButton( i18n("&Save session"), sessions_exit ), 1 ); - sessions_exit->insert( rb3=new QRadioButton( i18n("&Ask user"), sessions_exit ), 2 ); + sessions_exit->insert( rb1=new TQRadioButton( i18n("&Do not save session"), sessions_exit ), 0 ); + sessions_exit->insert( rb2=new TQRadioButton( i18n("&Save session"), sessions_exit ), 1 ); + sessions_exit->insert( rb3=new TQRadioButton( i18n("&Ask user"), sessions_exit ), 2 ); config->setGroup("General"); - QString sesExit (config->readEntry ("Session Exit", "save")); + TQString sesExit (config->readEntry ("Session Exit", "save")); if (sesExit == "discard") sessions_exit->setButton (0); else if (sesExit == "save") @@ -230,9 +230,9 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) else sessions_exit->setButton (2); - connect(rb1, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); - connect(rb2, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); - connect(rb3, SIGNAL(toggled(bool)), this, SLOT(slotChanged())); + connect(rb1, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); + connect(rb2, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); + connect(rb3, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); lo->addStretch(1); // :-] works correct without autoadd //END Session page @@ -242,11 +242,11 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) // file selector page path << i18n("Application") << i18n("File Selector"); - QVBox *page = addVBoxPage( path, i18n("File Selector Settings"), + TQVBox *page = addVBoxPage( path, i18n("File Selector Settings"), BarIcon("fileopen", KIcon::SizeSmall) ); fileSelConfigPage = new KFSConfigPage( page, "file selector config page", mainWindow->fileselector ); - connect( fileSelConfigPage, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( fileSelConfigPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); path.clear(); path << i18n("Application") << i18n("Document List"); @@ -254,14 +254,14 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) BarIcon("view_text", KIcon::SizeSmall) ); filelistConfigPage = new KFLConfigPage( page, "file list config page", mainWindow->filelist ); - connect( filelistConfigPage, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( filelistConfigPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); path.clear(); path << i18n("Application") << i18n("Plugins"); - /*QVBox **/page=addVBoxPage(path,i18n("Plugin Manager"), + /*TQVBox **/page=addVBoxPage(path,i18n("Plugin Manager"), BarIcon("connect_established",KIcon::SizeSmall)); KateConfigPluginPage *configPluginPage = new KateConfigPluginPage(page, this); - connect( configPluginPage, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( configPluginPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); // Tools->External Tools menu path.clear(); @@ -269,7 +269,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) page = addVBoxPage( path, i18n("External Tools"), BarIcon("configure", KIcon::SizeSmall) ); configExternalToolsPage = new KateExternalToolsConfigWidget(page, "external tools config page"); - connect( configExternalToolsPage, SIGNAL(changed()), this, SLOT(slotChanged()) ); + connect( configExternalToolsPage, TQT_SIGNAL(changed()), this, TQT_SLOT(slotChanged()) ); // editor widgets from kwrite/kwdialog path.clear(); @@ -280,11 +280,11 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) { path.clear(); path << i18n("Editor") << KTextEditor::configInterfaceExtension (v->document())->configPageName (i); - /*QVBox **/page = addVBoxPage(path, KTextEditor::configInterfaceExtension (v->document())->configPageFullName (i), + /*TQVBox **/page = addVBoxPage(path, KTextEditor::configInterfaceExtension (v->document())->configPageFullName (i), KTextEditor::configInterfaceExtension (v->document())->configPagePixmap(i, KIcon::SizeSmall) ); KTextEditor::ConfigPage *cPage = KTextEditor::configInterfaceExtension (v->document())->configPage(i, page); - connect( cPage, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( cPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); editorPages.append (cPage); } @@ -312,15 +312,15 @@ void KateConfigDialog::addPluginPage (Kate::Plugin *plugin) for (uint i=0; i<Kate::pluginConfigInterfaceExtension(plugin)->configPages(); i++) { - QStringList path; + TQStringList path; path.clear(); path << i18n("Application")<<i18n("Plugins") << Kate::pluginConfigInterfaceExtension(plugin)->configPageName(i); - QVBox *page=addVBoxPage(path, Kate::pluginConfigInterfaceExtension(plugin)->configPageFullName(i), Kate::pluginConfigInterfaceExtension(plugin)->configPagePixmap(i, KIcon::SizeSmall)); + TQVBox *page=addVBoxPage(path, Kate::pluginConfigInterfaceExtension(plugin)->configPageFullName(i), Kate::pluginConfigInterfaceExtension(plugin)->configPagePixmap(i, KIcon::SizeSmall)); PluginPageListItem *info=new PluginPageListItem; info->plugin = plugin; info->page = Kate::pluginConfigInterfaceExtension(plugin)->configPage (i, page); - connect( info->page, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); + connect( info->page, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); pluginPages.append(info); } } @@ -334,7 +334,7 @@ void KateConfigDialog::removePluginPage (Kate::Plugin *plugin) { if ( pluginPages.at(i)->plugin == plugin ) { - QWidget *w = pluginPages.at(i)->page->parentWidget(); + TQWidget *w = pluginPages.at(i)->page->parentWidget(); delete pluginPages.at(i)->page; delete w; pluginPages.remove(pluginPages.at(i)); diff --git a/kate/app/kateconfigdialog.h b/kate/app/kateconfigdialog.h index 3fb523b61..1d8c38a96 100644 --- a/kate/app/kateconfigdialog.h +++ b/kate/app/kateconfigdialog.h @@ -64,19 +64,19 @@ class KateConfigDialog : public KDialogBase Kate::View* v; bool dataChanged; - QCheckBox *cb_fullPath; - QCheckBox *cb_syncKonsole; - QCheckBox *cb_modNotifications; - QCheckBox *cb_saveMetaInfos; - QSpinBox *sb_daysMetaInfos; - QCheckBox* cb_restoreVC; - QButtonGroup *sessions_start; - QButtonGroup *sessions_exit; + TQCheckBox *cb_fullPath; + TQCheckBox *cb_syncKonsole; + TQCheckBox *cb_modNotifications; + TQCheckBox *cb_saveMetaInfos; + TQSpinBox *sb_daysMetaInfos; + TQCheckBox* cb_restoreVC; + TQButtonGroup *sessions_start; + TQButtonGroup *sessions_exit; Kate::ConfigPage *fileSelConfigPage; Kate::ConfigPage *filelistConfigPage; Kate::ConfigPage *configExternalToolsPage; - QPtrList<PluginPageListItem> pluginPages; - QPtrList<KTextEditor::ConfigPage> editorPages; + TQPtrList<PluginPageListItem> pluginPages; + TQPtrList<KTextEditor::ConfigPage> editorPages; }; #endif diff --git a/kate/app/kateconfigplugindialogpage.cpp b/kate/app/kateconfigplugindialogpage.cpp index 7269d5f5b..4aa56c78d 100644 --- a/kate/app/kateconfigplugindialogpage.cpp +++ b/kate/app/kateconfigplugindialogpage.cpp @@ -24,19 +24,19 @@ #include "kateconfigdialog.h" #include <klistbox.h> #include "kateapp.h" -#include <qstringlist.h> -#include <qhbox.h> -#include <qlabel.h> +#include <tqstringlist.h> +#include <tqhbox.h> +#include <tqlabel.h> #include <klocale.h> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> #include <kiconloader.h> -#include <qwhatsthis.h> +#include <tqwhatsthis.h> class KatePluginListItem : public QCheckListItem { public: - KatePluginListItem(bool checked, KatePluginInfo *info, QListView *parent); + KatePluginListItem(bool checked, KatePluginInfo *info, TQListView *parent); KatePluginInfo *info() const { return mInfo; } protected: @@ -47,8 +47,8 @@ class KatePluginListItem : public QCheckListItem bool silentStateChange; }; -KatePluginListItem::KatePluginListItem(bool checked, KatePluginInfo *info, QListView *parent) - : QCheckListItem(parent, info->service->name(), CheckBox) +KatePluginListItem::KatePluginListItem(bool checked, KatePluginInfo *info, TQListView *parent) + : TQCheckListItem(parent, info->service->name(), CheckBox) , mInfo(info) , silentStateChange(false) { @@ -63,7 +63,7 @@ void KatePluginListItem::stateChange(bool b) static_cast<KatePluginListView *>(listView())->stateChanged(this, b); } -KatePluginListView::KatePluginListView(QWidget *parent, const char *name) +KatePluginListView::KatePluginListView(TQWidget *parent, const char *name) : KListView(parent, name) { } @@ -73,16 +73,16 @@ void KatePluginListView::stateChanged(KatePluginListItem *item, bool b) emit stateChange(item, b); } -KateConfigPluginPage::KateConfigPluginPage(QWidget *parent, KateConfigDialog *dialog):QVBox(parent) +KateConfigPluginPage::KateConfigPluginPage(TQWidget *parent, KateConfigDialog *dialog):TQVBox(parent) { myDialog=dialog; KatePluginListView* listView = new KatePluginListView(this); listView->addColumn(i18n("Name")); listView->addColumn(i18n("Comment")); - QWhatsThis::add(listView,i18n("Here you can see all available Kate plugins. Those with a check mark are loaded, and will be loaded again the next time Kate is started.")); + TQWhatsThis::add(listView,i18n("Here you can see all available Kate plugins. Those with a check mark are loaded, and will be loaded again the next time Kate is started.")); - connect(listView, SIGNAL(stateChange(KatePluginListItem *, bool)), this, SLOT(stateChange(KatePluginListItem *, bool))); + connect(listView, TQT_SIGNAL(stateChange(KatePluginListItem *, bool)), this, TQT_SLOT(stateChange(KatePluginListItem *, bool))); KatePluginList &pluginList (KatePluginManager::self()->pluginList()); for (unsigned int i=0; i < pluginList.size(); ++i) diff --git a/kate/app/kateconfigplugindialogpage.h b/kate/app/kateconfigplugindialogpage.h index f65da880b..c02c0411b 100644 --- a/kate/app/kateconfigplugindialogpage.h +++ b/kate/app/kateconfigplugindialogpage.h @@ -25,7 +25,7 @@ #include <klistview.h> -#include <qvbox.h> +#include <tqvbox.h> class KatePluginListItem; @@ -36,7 +36,7 @@ class KatePluginListView : public KListView friend class KatePluginListItem; public: - KatePluginListView (QWidget *parent = 0, const char *name = 0); + KatePluginListView (TQWidget *parent = 0, const char *name = 0); signals: void stateChange(KatePluginListItem *, bool); @@ -50,7 +50,7 @@ class KateConfigPluginPage: public QVBox Q_OBJECT public: - KateConfigPluginPage(QWidget *parent, class KateConfigDialog *dialog); + KateConfigPluginPage(TQWidget *parent, class KateConfigDialog *dialog); ~KateConfigPluginPage(){;}; private: diff --git a/kate/app/kateconsole.cpp b/kate/app/kateconsole.cpp index 5220859b2..a160162db 100644 --- a/kate/app/kateconsole.cpp +++ b/kate/app/kateconsole.cpp @@ -40,7 +40,7 @@ #include <kmessagebox.h> KateConsole::KateConsole (KateMainWindow *mw, KateMDI::ToolView* parent) - : QVBox (parent) + : TQVBox (parent) , m_part (0) , m_mw (mw) , m_toolView (parent) @@ -50,7 +50,7 @@ KateConsole::KateConsole (KateMainWindow *mw, KateMDI::ToolView* parent) KateConsole::~KateConsole () { if (m_part) - disconnect ( m_part, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) ); + disconnect ( m_part, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); } void KateConsole::loadConsoleIfNeeded() @@ -74,7 +74,7 @@ void KateConsole::loadConsoleIfNeeded() m_part->widget()->show(); - connect ( m_part, SIGNAL(destroyed()), this, SLOT(slotDestroyed()) ); + connect ( m_part, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); if (m_mw->viewManager()->activeView()) if (m_mw->viewManager()->activeView()->getDoc()->url().isValid()) @@ -93,7 +93,7 @@ void KateConsole::slotDestroyed () } } -void KateConsole::showEvent(QShowEvent *) +void KateConsole::showEvent(TQShowEvent *) { if (m_part) return; @@ -109,7 +109,7 @@ void KateConsole::cd (const KURL &url) m_part->openURL (url); } -void KateConsole::sendInput( const QString& text ) +void KateConsole::sendInput( const TQString& text ) { loadConsoleIfNeeded(); diff --git a/kate/app/kateconsole.h b/kate/app/kateconsole.h index 1750df11d..e308f1df2 100644 --- a/kate/app/kateconsole.h +++ b/kate/app/kateconsole.h @@ -25,7 +25,7 @@ #include <kurl.h> -#include <qvbox.h> +#include <tqvbox.h> namespace KParts { class ReadOnlyPart; @@ -69,7 +69,7 @@ class KateConsole : public QVBox * send given text to console * @param text commands for console */ - void sendInput( const QString& text ); + void sendInput( const TQString& text ); public slots: /** @@ -94,7 +94,7 @@ class KateConsole : public QVBox * the konsole get shown * @param ev show event */ - void showEvent(QShowEvent *ev); + void showEvent(TQShowEvent *ev); private: /** diff --git a/kate/app/katedocmanager.cpp b/kate/app/katedocmanager.cpp index fe6491f78..f60c09783 100644 --- a/kate/app/katedocmanager.cpp +++ b/kate/app/katedocmanager.cpp @@ -42,12 +42,12 @@ #include <kio/job.h> #include <kwin.h> -#include <qdatetime.h> -#include <qtextcodec.h> -#include <qprogressdialog.h> +#include <tqdatetime.h> +#include <tqtextcodec.h> +#include <tqprogressdialog.h> -KateDocManager::KateDocManager (QObject *parent) - : QObject (parent) +KateDocManager::KateDocManager (TQObject *parent) + : TQObject (parent) , m_saveMetaInfos(true) , m_daysMetaInfos(0) { @@ -80,13 +80,13 @@ KateDocManager::~KateDocManager () // purge saved filesessions if (m_daysMetaInfos > 0) { - QStringList groups = m_metaInfos->groupList(); - QDateTime *def = new QDateTime(QDate(1970, 1, 1)); - for (QStringList::Iterator it = groups.begin(); it != groups.end(); ++it) + TQStringList groups = m_metaInfos->groupList(); + TQDateTime *def = new TQDateTime(TQDate(1970, 1, 1)); + for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it) { m_metaInfos->setGroup(*it); - QDateTime last = m_metaInfos->readDateTimeEntry("Time", def); - if (last.daysTo(QDateTime::currentDateTime()) > m_daysMetaInfos) + TQDateTime last = m_metaInfos->readDateTimeEntry("Time", def); + if (last.daysTo(TQDateTime::currentDateTime()) > m_daysMetaInfos) m_metaInfos->deleteGroup(*it); } delete def; @@ -116,7 +116,7 @@ Kate::Document *KateDocManager::createDoc () emit documentCreated ((Kate::Document *)doc); emit m_documentManager->documentCreated ((Kate::Document *)doc); - connect(doc,SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); + connect(doc,TQT_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,TQT_SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); return (Kate::Document *)doc; } @@ -204,7 +204,7 @@ uint KateDocManager::documents () int KateDocManager::findDocument ( KURL url ) { - QPtrListIterator<Kate::Document> it(m_docList); + TQPtrListIterator<Kate::Document> it(m_docList); for (; it.current(); ++it) { @@ -216,7 +216,7 @@ int KateDocManager::findDocument ( KURL url ) Kate::Document *KateDocManager::findDocumentByUrl( KURL url ) { - for (QPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) + for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) { if ( it.current()->url() == url) return it.current(); @@ -231,7 +231,7 @@ bool KateDocManager::isOpen(KURL url) return findDocumentByUrl (url) != 0; } -Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding, uint *id, bool isTempFile) +Kate::Document *KateDocManager::openURL (const KURL& url,const TQString &encoding, uint *id, bool isTempFile) { // special handling if still only the first initial doc is there if (!documentList().isEmpty() && (documentList().count() == 1) && (!documentList().at(0)->isModified() && documentList().at(0)->url().isEmpty())) @@ -248,7 +248,7 @@ Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding if ( isTempFile && !url.isEmpty() && url.isLocalFile() ) { - QFileInfo fi( url.path() ); + TQFileInfo fi( url.path() ); if ( fi.exists() ) { m_tempFiles[ doc->documentNumber() ] = qMakePair(url, fi.lastModified()); @@ -256,7 +256,7 @@ Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding } } - connect(doc, SIGNAL(modStateChanged(Kate::Document *)), this, SLOT(slotModChanged(Kate::Document *))); + connect(doc, TQT_SIGNAL(modStateChanged(Kate::Document *)), this, TQT_SLOT(slotModChanged(Kate::Document *))); emit initialDocumentReplaced(); @@ -279,7 +279,7 @@ Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding if ( isTempFile && !url.isEmpty() && url.isLocalFile() ) { - QFileInfo fi( url.path() ); + TQFileInfo fi( url.path() ); if ( fi.exists() ) { m_tempFiles[ doc->documentNumber() ] = qMakePair(url, fi.lastModified()); @@ -298,7 +298,7 @@ bool KateDocManager::closeDocument(class Kate::Document *doc,bool closeURL) if (closeURL) if (!doc->closeURL()) return false; - QPtrList<Kate::View> closeList; + TQPtrList<Kate::View> closeList; uint documentNumber = doc->documentNumber(); for (uint i=0; i < KateApp::self()->mainWindows (); i++ ) @@ -308,7 +308,7 @@ bool KateDocManager::closeDocument(class Kate::Document *doc,bool closeURL) if ( closeURL && m_tempFiles.contains( documentNumber ) ) { - QFileInfo fi( m_tempFiles[ documentNumber ].first.path() ); + TQFileInfo fi( m_tempFiles[ documentNumber ].first.path() ); if ( fi.lastModified() <= m_tempFiles[ documentNumber ].second /*|| KMessageBox::questionYesNo( KateApp::self()->activeMainWindow(), i18n("The supposedly temporary file %1 has been modified. " @@ -346,7 +346,7 @@ bool KateDocManager::closeAllDocuments(bool closeURL) { bool res = true; - QPtrList<Kate::Document> docs = m_docList; + TQPtrList<Kate::Document> docs = m_docList; for (uint i=0; i < KateApp::self()->mainWindows (); i++ ) { @@ -370,9 +370,9 @@ bool KateDocManager::closeAllDocuments(bool closeURL) return res; } -QPtrList<Kate::Document> KateDocManager::modifiedDocumentList() { - QPtrList<Kate::Document> modified; - for (QPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) { +TQPtrList<Kate::Document> KateDocManager::modifiedDocumentList() { + TQPtrList<Kate::Document> modified; + for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) { Kate::Document *doc = it.current(); if (doc->isModified()) { modified.append(doc); @@ -385,7 +385,7 @@ QPtrList<Kate::Document> KateDocManager::modifiedDocumentList() { bool KateDocManager::queryCloseDocuments(KateMainWindow *w) { uint docCount = m_docList.count(); - for (QPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) + for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) { Kate::Document *doc = it.current(); @@ -402,7 +402,7 @@ bool KateDocManager::queryCloseDocuments(KateMainWindow *w) if (msgres==KMessageBox::Yes) { KEncodingFileDialog::Result r=KEncodingFileDialog::getSaveURLAndEncoding( - KTextEditor::encodingInterface(doc)->encoding(),QString::null,QString::null,w,i18n("Save As")); + KTextEditor::encodingInterface(doc)->encoding(),TQString::null,TQString::null,w,i18n("Save As")); doc->setEncoding( r.encoding ); @@ -439,23 +439,23 @@ bool KateDocManager::queryCloseDocuments(KateMainWindow *w) void KateDocManager::saveAll() { - for (QPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) + for (TQPtrListIterator<Kate::Document> it(m_docList); it.current(); ++it) if ( it.current()->isModified() && it.current()->views().count() ) ((Kate::View*)it.current()->views().first())->save(); } void KateDocManager::saveDocumentList (KConfig* config) { - QString prevGrp=config->group(); + TQString prevGrp=config->group(); config->setGroup ("Open Documents"); - QString grp = config->group(); + TQString grp = config->group(); config->writeEntry ("Count", m_docList.count()); int i=0; for ( Kate::Document *doc = m_docList.first(); doc; doc = m_docList.next() ) { - config->setGroup(QString("Document %1").arg(i)); + config->setGroup(TQString("Document %1").arg(i)); doc->writeSessionConfig(config); config->setGroup(grp); @@ -467,9 +467,9 @@ void KateDocManager::saveDocumentList (KConfig* config) void KateDocManager::restoreDocumentList (KConfig* config) { - QString prevGrp=config->group(); + TQString prevGrp=config->group(); config->setGroup ("Open Documents"); - QString grp = config->group(); + TQString grp = config->group(); unsigned int count = config->readUnsignedNumEntry("Count", 0); @@ -479,9 +479,9 @@ void KateDocManager::restoreDocumentList (KConfig* config) return; } - QProgressDialog *pd = new QProgressDialog( + TQProgressDialog *pd = new TQProgressDialog( i18n("Reopening files from the last session..."), - QString::null, + TQString::null, count, 0, "openprog"); @@ -492,7 +492,7 @@ void KateDocManager::restoreDocumentList (KConfig* config) bool first = true; for (unsigned int i=0; i < count; i++) { - config->setGroup(QString("Document %1").arg(i)); + config->setGroup(TQString("Document %1").arg(i)); Kate::Document *doc = 0; if (first) @@ -540,13 +540,13 @@ bool KateDocManager::loadMetaInfos(Kate::Document *doc, const KURL &url) if (!m_metaInfos->hasGroup(url.prettyURL())) return false; - QCString md5; + TQCString md5; bool ok = true; if (computeUrlMD5(url, md5)) { m_metaInfos->setGroup(url.prettyURL()); - QString old_md5 = m_metaInfos->readEntry("MD5"); + TQString old_md5 = m_metaInfos->readEntry("MD5"); if ((const char *)md5 == old_md5) doc->readSessionConfig(m_metaInfos); @@ -567,7 +567,7 @@ bool KateDocManager::loadMetaInfos(Kate::Document *doc, const KURL &url) */ void KateDocManager::saveMetaInfos(Kate::Document *doc) { - QCString md5; + TQCString md5; if (!m_saveMetaInfos) return; @@ -583,14 +583,14 @@ void KateDocManager::saveMetaInfos(Kate::Document *doc) m_metaInfos->setGroup(doc->url().prettyURL()); doc->writeSessionConfig(m_metaInfos); m_metaInfos->writeEntry("MD5", (const char *)md5); - m_metaInfos->writeEntry("Time", QDateTime::currentDateTime()); + m_metaInfos->writeEntry("Time", TQDateTime::currentDateTime()); m_metaInfos->sync(); } } -bool KateDocManager::computeUrlMD5(const KURL &url, QCString &result) +bool KateDocManager::computeUrlMD5(const KURL &url, TQCString &result) { - QFile f(url.path()); + TQFile f(url.path()); if (f.open(IO_ReadOnly)) { diff --git a/kate/app/katedocmanager.h b/kate/app/katedocmanager.h index 45931b655..b35d0a65f 100644 --- a/kate/app/katedocmanager.h +++ b/kate/app/katedocmanager.h @@ -25,14 +25,14 @@ #include <kate/document.h> -#include <qdatetime.h> -#include <qguardedptr.h> -#include <qptrlist.h> -#include <qobject.h> -#include <qptrdict.h> -#include <qintdict.h> -#include <qmap.h> -#include <qpair.h> +#include <tqdatetime.h> +#include <tqguardedptr.h> +#include <tqptrlist.h> +#include <tqobject.h> +#include <tqptrdict.h> +#include <tqintdict.h> +#include <tqmap.h> +#include <tqpair.h> namespace KParts { class Factory; } @@ -52,14 +52,14 @@ class KateDocumentInfo unsigned char modifiedOnDiscReason; }; -typedef QPair<KURL,QDateTime> TPair; +typedef QPair<KURL,TQDateTime> TPair; class KateDocManager : public QObject { Q_OBJECT public: - KateDocManager (QObject *parent); + KateDocManager (TQObject *parent); ~KateDocManager (); static KateDocManager *self (); @@ -92,16 +92,16 @@ class KateDocManager : public QObject uint documents (); - QPtrList<Kate::Document> &documentList () { return m_docList; }; + TQPtrList<Kate::Document> &documentList () { return m_docList; }; - Kate::Document *openURL(const KURL&,const QString &encoding=QString::null,uint *id =0,bool isTempFile=false); + Kate::Document *openURL(const KURL&,const TQString &encoding=TQString::null,uint *id =0,bool isTempFile=false); bool closeDocument(class Kate::Document *,bool closeURL=true); bool closeDocument(uint); bool closeDocumentWithID(uint); bool closeAllDocuments(bool closeURL=true); - QPtrList<Kate::Document> modifiedDocumentList(); + TQPtrList<Kate::Document> modifiedDocumentList(); bool queryCloseDocuments(KateMainWindow *w); void saveDocumentList (class KConfig *config); @@ -135,14 +135,14 @@ class KateDocManager : public QObject private: bool loadMetaInfos(Kate::Document *doc, const KURL &url); void saveMetaInfos(Kate::Document *doc); - bool computeUrlMD5(const KURL &url, QCString &result); + bool computeUrlMD5(const KURL &url, TQCString &result); Kate::DocumentManager *m_documentManager; - QPtrList<Kate::Document> m_docList; - QIntDict<Kate::Document> m_docDict; - QPtrDict<KateDocumentInfo> m_docInfos; - QMap<uint,TPair> m_tempFiles; - QGuardedPtr<Kate::Document> m_currentDoc; + TQPtrList<Kate::Document> m_docList; + TQIntDict<Kate::Document> m_docDict; + TQPtrDict<KateDocumentInfo> m_docInfos; + TQMap<uint,TPair> m_tempFiles; + TQGuardedPtr<Kate::Document> m_currentDoc; KConfig *m_metaInfos; bool m_saveMetaInfos; int m_daysMetaInfos; diff --git a/kate/app/katedocmanageriface.cpp b/kate/app/katedocmanageriface.cpp index 9c2eabc03..5ef01a1df 100644 --- a/kate/app/katedocmanageriface.cpp +++ b/kate/app/katedocmanageriface.cpp @@ -83,7 +83,7 @@ DCOPRef KateDocManagerDCOPIface::documentWithID (uint id) return DCOPRef (obj); } -DCOPRef KateDocManagerDCOPIface::openURL (KURL url, QString encoding) +DCOPRef KateDocManagerDCOPIface::openURL (KURL url, TQString encoding) { Kate::Document *doc = m_dm->openURL (url, encoding); diff --git a/kate/app/katedocmanageriface.h b/kate/app/katedocmanageriface.h index 7a2cb5506..353818c03 100644 --- a/kate/app/katedocmanageriface.h +++ b/kate/app/katedocmanageriface.h @@ -48,7 +48,7 @@ class KateDocManagerDCOPIface : public DCOPObject uint documents (); - DCOPRef openURL (KURL url, QString encoding); + DCOPRef openURL (KURL url, TQString encoding); bool closeDocument (uint n); diff --git a/kate/app/kateexternaltools.cpp b/kate/app/kateexternaltools.cpp index 50c07709b..6680e26a4 100644 --- a/kate/app/kateexternaltools.cpp +++ b/kate/app/kateexternaltools.cpp @@ -44,19 +44,19 @@ #include <kpopupmenu.h> #include <kdebug.h> -#include <qbitmap.h> -#include <qcombobox.h> -#include <qfile.h> -#include <qpushbutton.h> -#include <qlineedit.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qlistbox.h> -#include <qmap.h> -#include <qregexp.h> -#include <qtextedit.h> -#include <qtoolbutton.h> -#include <qwhatsthis.h> +#include <tqbitmap.h> +#include <tqcombobox.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqlineedit.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqmap.h> +#include <tqregexp.h> +#include <tqtextedit.h> +#include <tqtoolbutton.h> +#include <tqwhatsthis.h> #include <stdlib.h> #include <unistd.h> @@ -65,13 +65,13 @@ KateExternalToolsCommand *KateExternalToolsCommand::s_self=0; //BEGIN KateExternalTool -KateExternalTool::KateExternalTool( const QString &name, - const QString &command, - const QString &icon, - const QString &tryexec, - const QStringList &mimetypes, - const QString &acname, - const QString &cmdname, +KateExternalTool::KateExternalTool( const TQString &name, + const TQString &command, + const TQString &icon, + const TQString &tryexec, + const TQStringList &mimetypes, + const TQString &acname, + const TQString &cmdname, int save ) : name ( name ), command ( command ), @@ -90,12 +90,12 @@ bool KateExternalTool::checkExec() { // if tryexec is empty, it is the first word of command if ( tryexec.isEmpty() ) - tryexec = command.section( " ", 0, 0, QString::SectionSkipEmpty ); + tryexec = command.section( " ", 0, 0, TQString::SectionSkipEmpty ); // NOTE this code is modified taken from kdesktopfile.cpp, from KDesktopFile::tryExec() if (!tryexec.isEmpty()) { if (tryexec[0] == '/') { - if (::access(QFile::encodeName(tryexec), R_OK | X_OK)) + if (::access(TQFile::encodeName(tryexec), R_OK | X_OK)) return false; m_exec = tryexec; @@ -103,13 +103,13 @@ bool KateExternalTool::checkExec() // !!! Sergey A. Sukiyazov <corwin@micom.don.ru> !!! // Environment PATH may contain filenames in 8bit locale cpecified // encoding (Like a filenames). - QStringList dirs = QStringList::split(':', QFile::decodeName(::getenv("PATH"))); - QStringList::Iterator it(dirs.begin()); + TQStringList dirs = TQStringList::split(':', TQFile::decodeName(::getenv("PATH"))); + TQStringList::Iterator it(dirs.begin()); bool match = false; for (; it != dirs.end(); ++it) { - QString fName = *it + "/" + tryexec; - if (::access(QFile::encodeName(fName), R_OK | X_OK) == 0) + TQString fName = *it + "/" + tryexec; + if (::access(TQFile::encodeName(fName), R_OK | X_OK) == 0) { match = true; m_exec = fName; @@ -125,7 +125,7 @@ bool KateExternalTool::checkExec() return false; } -bool KateExternalTool::valid( const QString &mt ) const +bool KateExternalTool::valid( const TQString &mt ) const { return mimetypes.isEmpty() || mimetypes.contains( mt ); } @@ -137,7 +137,7 @@ KateExternalToolsCommand::KateExternalToolsCommand() : Kate::Command() { reload(); } -QStringList KateExternalToolsCommand::cmds () { +TQStringList KateExternalToolsCommand::cmds () { return m_list; } @@ -153,10 +153,10 @@ void KateExternalToolsCommand::reload () { KConfig config("externaltools", false, false, "appdata"); config.setGroup("Global"); - QStringList tools = config.readListEntry("tools"); + TQStringList tools = config.readListEntry("tools"); - for( QStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) + for( TQStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) { if ( *it == "---" ) continue; @@ -185,8 +185,8 @@ void KateExternalToolsCommand::reload () { else m_inited=true; } -bool KateExternalToolsCommand::exec (Kate::View *view, const QString &cmd, QString &) { - QWidget *wv=dynamic_cast<QWidget*>(view); +bool KateExternalToolsCommand::exec (Kate::View *view, const TQString &cmd, TQString &) { + TQWidget *wv=dynamic_cast<TQWidget*>(view); if (!wv) { // kdDebug(13001)<<"KateExternalToolsCommand::exec: Could not get view widget"<<endl; return false; @@ -197,7 +197,7 @@ bool KateExternalToolsCommand::exec (Kate::View *view, const QString &cmd, QStri return false; } // kdDebug(13001)<<"cmd="<<cmd.stripWhiteSpace()<<endl; - QString actionName=m_map[cmd.stripWhiteSpace()]; + TQString actionName=m_map[cmd.stripWhiteSpace()]; if (actionName.isEmpty()) return false; // kdDebug(13001)<<"actionName is not empty:"<<actionName<<endl; KateExternalToolsMenuAction *a= @@ -211,13 +211,13 @@ bool KateExternalToolsCommand::exec (Kate::View *view, const QString &cmd, QStri return true; } -bool KateExternalToolsCommand::help (Kate::View *, const QString &, QString &) { +bool KateExternalToolsCommand::help (Kate::View *, const TQString &, TQString &) { return false; } //END KateExternalToolsCommand //BEGIN KateExternalToolAction -KateExternalToolAction::KateExternalToolAction( QObject *parent, +KateExternalToolAction::KateExternalToolAction( TQObject *parent, const char *name, KateExternalTool *t) : KAction( parent, name ), tool ( t ) @@ -226,10 +226,10 @@ KateExternalToolAction::KateExternalToolAction( QObject *parent, if ( ! t->icon.isEmpty() ) setIconSet( SmallIconSet( t->icon ) ); - connect( this ,SIGNAL(activated()), this, SLOT(slotRun()) ); + connect( this ,TQT_SIGNAL(activated()), this, TQT_SLOT(slotRun()) ); } -bool KateExternalToolAction::expandMacro( const QString &str, QStringList &ret ) +bool KateExternalToolAction::expandMacro( const TQString &str, TQStringList &ret ) { KateMainWindow *mw = (KateMainWindow*)parent()->parent(); @@ -244,9 +244,9 @@ bool KateExternalToolAction::expandMacro( const QString &str, QStringList &ret ) else if ( str == "filename" ) ret += mw->activeDocumentUrl().fileName(); else if ( str == "line" ) // cursor line of current doc - ret += QString::number( view->cursorLine() ); + ret += TQString::number( view->cursorLine() ); else if ( str == "col" ) // cursor col of current doc - ret += QString::number( view->cursorColumn() ); + ret += TQString::number( view->cursorColumn() ); else if ( str == "selection" ) // selection of current doc if any ret += view->getDoc()->selection(); else if ( str == "text" ) // text of current doc @@ -268,7 +268,7 @@ void KateExternalToolAction::slotRun() { // expand the macros in command if any, // and construct a command with an absolute path - QString cmd = tool->command; + TQString cmd = tool->command; if ( ! expandMacrosShellQuote( cmd ) ) { @@ -291,8 +291,8 @@ void KateExternalToolAction::slotRun() //END KateExternalToolAction //BEGIN KateExternalToolsMenuAction -KateExternalToolsMenuAction::KateExternalToolsMenuAction( const QString &text, - QObject *parent, +KateExternalToolsMenuAction::KateExternalToolsMenuAction( const TQString &text, + TQObject *parent, const char* name, KateMainWindow *mw ) : KActionMenu( text, parent, name ), @@ -301,7 +301,7 @@ KateExternalToolsMenuAction::KateExternalToolsMenuAction( const QString &text, m_actionCollection = new KActionCollection( mainwindow ); - connect(KateDocManager::self(),SIGNAL(documentChanged()),this,SLOT(slotDocumentChanged())); + connect(KateDocManager::self(),TQT_SIGNAL(documentChanged()),this,TQT_SLOT(slotDocumentChanged())); reload(); } @@ -314,21 +314,21 @@ void KateExternalToolsMenuAction::reload() // load all the tools, and create a action for each of them KConfig *config = new KConfig( "externaltools", false, false, "appdata" ); config->setGroup( "Global" ); - QStringList tools = config->readListEntry( "tools" ); + TQStringList tools = config->readListEntry( "tools" ); // if there are tools that are present but not explicitly removed, // add them to the end of the list config->setReadDefaults( true ); - QStringList dtools = config->readListEntry( "tools" ); + TQStringList dtools = config->readListEntry( "tools" ); int gver = config->readNumEntry( "version", 1 ); config->setReadDefaults( false ); int ver = config->readNumEntry( "version" ); if ( ver <= gver ) { - QStringList removed = config->readListEntry( "removed" ); + TQStringList removed = config->readListEntry( "removed" ); bool sepadded = false; - for (QStringList::iterator itg = dtools.begin(); itg != dtools.end(); ++itg ) + for (TQStringList::iterator itg = dtools.begin(); itg != dtools.end(); ++itg ) { if ( ! tools.contains( *itg ) && ! removed.contains( *itg ) ) @@ -347,7 +347,7 @@ void KateExternalToolsMenuAction::reload() config->writeEntry( "version", gver ); } - for( QStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) + for( TQStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) { if ( *it == "---" ) { @@ -383,8 +383,8 @@ void KateExternalToolsMenuAction::slotDocumentChanged() Kate::DocumentExt *de = documentExt( KateDocManager::self()->activeDocument() ); if ( de ) { - QString mt = de->mimeType(); - QStringList l; + TQString mt = de->mimeType(); + TQStringList l; bool b; KActionPtrList actions = m_actionCollection->actions(); @@ -404,14 +404,14 @@ void KateExternalToolsMenuAction::slotDocumentChanged() //BEGIN ToolItem /** - * This is a QListBoxItem, that has a KateExternalTool. The text is the Name + * This is a TQListBoxItem, that has a KateExternalTool. The text is the Name * of the tool. */ class ToolItem : public QListBoxPixmap { public: - ToolItem( QListBox *lb, const QPixmap &icon, KateExternalTool *tool ) - : QListBoxPixmap( lb, icon, tool->name ), + ToolItem( TQListBox *lb, const TQPixmap &icon, KateExternalTool *tool ) + : TQListBoxPixmap( lb, icon, tool->name ), tool ( tool ) {;} @@ -423,26 +423,26 @@ class ToolItem : public QListBoxPixmap //BEGIN KateExternalToolServiceEditor KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool *tool, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n("Edit External Tool"), KDialogBase::Ok|KDialogBase::Cancel ), tool( tool ) { // create a entry for each property // fill in the values from the service if available - QWidget *w = new QWidget( this ); + TQWidget *w = new TQWidget( this ); setMainWidget( w ); - QGridLayout *lo = new QGridLayout( w ); + TQGridLayout *lo = new TQGridLayout( w ); lo->setSpacing( KDialogBase::spacingHint() ); - QLabel *l; + TQLabel *l; - leName = new QLineEdit( w ); + leName = new TQLineEdit( w ); lo->addWidget( leName, 1, 2 ); - l = new QLabel( leName, i18n("&Label:"), w ); + l = new TQLabel( leName, i18n("&Label:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 1, 1 ); if ( tool ) leName->setText( tool->name ); - QWhatsThis::add( leName, i18n( + TQWhatsThis::add( leName, i18n( "The name will be displayed in the 'Tools->External' menu") ); btnIcon = new KIconButton( w ); @@ -451,13 +451,13 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * if ( tool && !tool->icon.isEmpty() ) btnIcon->setIcon( tool->icon ); - teCommand = new QTextEdit( w ); + teCommand = new TQTextEdit( w ); lo->addMultiCellWidget( teCommand, 2, 2, 2, 3 ); - l = new QLabel( teCommand, i18n("S&cript:"), w ); + l = new TQLabel( teCommand, i18n("S&cript:"), w ); l->setAlignment( Qt::AlignTop|Qt::AlignRight ); lo->addWidget( l, 2, 1 ); if ( tool ) teCommand->setText( tool->command ); - QWhatsThis::add( teCommand, i18n( + TQWhatsThis::add( teCommand, i18n( "<p>The script to execute to invoke the tool. The script is passed " "to /bin/sh for execution. The following macros " "will be expanded:</p>" @@ -474,57 +474,57 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * "<li><code>%text</code> - the text of the current document.</ul>" ) ); - leExecutable = new QLineEdit( w ); + leExecutable = new TQLineEdit( w ); lo->addMultiCellWidget( leExecutable, 3, 3, 2, 3 ); - l = new QLabel( leExecutable, i18n("&Executable:"), w ); + l = new TQLabel( leExecutable, i18n("&Executable:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 3, 1 ); if ( tool ) leExecutable->setText( tool->tryexec ); - QWhatsThis::add( leExecutable, i18n( + TQWhatsThis::add( leExecutable, i18n( "The executable used by the command. This is used to check if a tool " "should be displayed; if not set, the first word of <em>command</em> " "will be used.") ); - leMimetypes = new QLineEdit( w ); + leMimetypes = new TQLineEdit( w ); lo->addWidget( leMimetypes, 4, 2 ); - l = new QLabel( leMimetypes, i18n("&Mime types:"), w ); + l = new TQLabel( leMimetypes, i18n("&Mime types:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 4, 1 ); if ( tool ) leMimetypes->setText( tool->mimetypes.join("; ") ); - QWhatsThis::add( leMimetypes, i18n( + TQWhatsThis::add( leMimetypes, i18n( "A semicolon-separated list of mime types for which this tool should " "be available; if this is left empty, the tool is always available. " "To choose from known mimetypes, press the button on the right.") ); - QToolButton *btnMTW = new QToolButton(w); + TQToolButton *btnMTW = new TQToolButton(w); lo->addWidget( btnMTW, 4, 3 ); - btnMTW->setIconSet(QIconSet(SmallIcon("wizard"))); - connect(btnMTW, SIGNAL(clicked()), this, SLOT(showMTDlg())); - QWhatsThis::add( btnMTW, i18n( + btnMTW->setIconSet(TQIconSet(SmallIcon("wizard"))); + connect(btnMTW, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMTDlg())); + TQWhatsThis::add( btnMTW, i18n( "Click for a dialog that can help you creating a list of mimetypes.") ); - cmbSave = new QComboBox(w); + cmbSave = new TQComboBox(w); lo->addMultiCellWidget( cmbSave, 5, 5, 2, 3 ); - l = new QLabel( cmbSave, i18n("&Save:"), w ); + l = new TQLabel( cmbSave, i18n("&Save:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 5, 1 ); - QStringList sl; + TQStringList sl; sl << i18n("None") << i18n("Current Document") << i18n("All Documents"); cmbSave->insertStringList( sl ); if ( tool ) cmbSave->setCurrentItem( tool->save ); - QWhatsThis::add( cmbSave, i18n( + TQWhatsThis::add( cmbSave, i18n( "You can elect to save the current or all [modified] documents prior to " "running the command. This is helpful if you want to pass URLs to " "an application like, for example, an FTP client.") ); - leCmdLine = new QLineEdit( w ); + leCmdLine = new TQLineEdit( w ); lo->addMultiCellWidget( leCmdLine, 6, 6, 2, 3 ); - l = new QLabel( leCmdLine, i18n("&Command line name:"), w ); + l = new TQLabel( leCmdLine, i18n("&Command line name:"), w ); l->setAlignment( l->alignment()|Qt::AlignRight ); lo->addWidget( l, 6, 1 ); if ( tool ) leCmdLine->setText( tool->cmdname ); - QWhatsThis::add( leCmdLine, i18n( + TQWhatsThis::add( leCmdLine, i18n( "If you specify a name here, you can invoke the command from the view " "command lines with exttool-the_name_you_specified_here. " "Please do not use spaces or tabs in the name.")); @@ -545,8 +545,8 @@ void KateExternalToolServiceEditor::slotOk() void KateExternalToolServiceEditor::showMTDlg() { - QString text = i18n("Select the MimeTypes for which to enable this tool."); - QStringList list = QStringList::split( QRegExp("\\s*;\\s*"), leMimetypes->text() ); + TQString text = i18n("Select the MimeTypes for which to enable this tool."); + TQStringList list = TQStringList::split( TQRegExp("\\s*;\\s*"), leMimetypes->text() ); KMimeTypeChooserDialog d( i18n("Select Mime Types"), text, list, "text", this ); if ( d.exec() == KDialogBase::Accepted ) { leMimetypes->setText( d.chooser()->mimeTypes().join(";") ); @@ -555,41 +555,41 @@ void KateExternalToolServiceEditor::showMTDlg() //END KateExternalToolServiceEditor //BEGIN KateExternalToolsConfigWidget -KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( QWidget *parent, const char* name ) +KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( TQWidget *parent, const char* name ) : Kate::ConfigPage( parent, name ), m_changed( false ) { - QGridLayout *lo = new QGridLayout( this, 5, 5, 0, KDialog::spacingHint() ); + TQGridLayout *lo = new TQGridLayout( this, 5, 5, 0, KDialog::spacingHint() ); lbTools = new KListBox( this ); lo->addMultiCellWidget( lbTools, 1, 4, 0, 3 ); - connect( lbTools, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()) ); + connect( lbTools, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) ); - btnNew = new QPushButton( i18n("&New..."), this ); + btnNew = new TQPushButton( i18n("&New..."), this ); lo->addWidget( btnNew, 5, 0 ); - connect( btnNew, SIGNAL(clicked()), this, SLOT(slotNew()) ); + connect( btnNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew()) ); - btnRemove = new QPushButton( i18n("&Remove"), this ); + btnRemove = new TQPushButton( i18n("&Remove"), this ); lo->addWidget( btnRemove, 5, 2 ); - connect( btnRemove, SIGNAL(clicked()), this, SLOT(slotRemove()) ); + connect( btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemove()) ); - btnEdit = new QPushButton( i18n("&Edit..."), this ); + btnEdit = new TQPushButton( i18n("&Edit..."), this ); lo->addWidget( btnEdit, 5, 1 ); - connect( btnEdit, SIGNAL(clicked()), this, SLOT(slotEdit()) ); + connect( btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit()) ); - QPushButton *b = new QPushButton( i18n("Insert &Separator"), this ); + TQPushButton *b = new TQPushButton( i18n("Insert &Separator"), this ); lo->addWidget( b, 5, 3 ); - connect( b, SIGNAL(clicked()), this, SLOT(slotInsertSeparator()) ); + connect( b, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInsertSeparator()) ); - btnMoveUp = new QPushButton( SmallIconSet("up"), "", this ); + btnMoveUp = new TQPushButton( SmallIconSet("up"), "", this ); lo->addWidget( btnMoveUp, 2, 4 ); - connect( btnMoveUp, SIGNAL(clicked()), this, SLOT(slotMoveUp()) ); + connect( btnMoveUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveUp()) ); - btnMoveDwn = new QPushButton( SmallIconSet("down"), "", this ); + btnMoveDwn = new TQPushButton( SmallIconSet("down"), "", this ); lo->addWidget( btnMoveDwn, 3, 4 ); - connect( btnMoveDwn, SIGNAL(clicked()), this, SLOT(slotMoveDown()) ); + connect( btnMoveDwn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveDown()) ); - connect( lbTools, SIGNAL( doubleClicked ( QListBoxItem * ) ), this, SLOT( slotEdit() ) ); + connect( lbTools, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), this, TQT_SLOT( slotEdit() ) ); lo->setRowStretch( 1, 1 ); lo->setRowStretch( 4, 1 ); @@ -598,7 +598,7 @@ KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( QWidget *parent, c lo->setColStretch( 2, 1 ); - QWhatsThis::add( lbTools, i18n( + TQWhatsThis::add( lbTools, i18n( "This list shows all the configured tools, represented by their menu text.") ); config = new KConfig("externaltools", false, false, "appdata"); @@ -618,13 +618,13 @@ void KateExternalToolsConfigWidget::reload() // load the files from a KConfig config->setGroup( "Global" ); - QStringList tools = config->readListEntry("tools"); + TQStringList tools = config->readListEntry("tools"); - for( QStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) + for( TQStringList::Iterator it = tools.begin(); it != tools.end(); ++it ) { if ( *it == "---" ) { - new QListBoxText( lbTools, "---" ); + new TQListBoxText( lbTools, "---" ); } else { @@ -647,9 +647,9 @@ void KateExternalToolsConfigWidget::reload() m_changed = false; } -QPixmap KateExternalToolsConfigWidget::blankIcon() +TQPixmap KateExternalToolsConfigWidget::blankIcon() { - QPixmap pm( KIcon::SizeSmall, KIcon::SizeSmall ); + TQPixmap pm( KIcon::SizeSmall, KIcon::SizeSmall ); pm.fill(); pm.setMask( pm.createHeuristicMask() ); return pm; @@ -663,7 +663,7 @@ void KateExternalToolsConfigWidget::apply() // save a new list // save each item - QStringList tools; + TQStringList tools; for ( uint i = 0; i < lbTools->count(); i++ ) { if ( lbTools->text( i ) == "---" ) @@ -693,18 +693,18 @@ void KateExternalToolsConfigWidget::apply() // add the group names to the list of removed items. if ( m_removed.count() ) { - for ( QStringList::iterator it = m_removed.begin(); it != m_removed.end(); ++it ) + for ( TQStringList::iterator it = m_removed.begin(); it != m_removed.end(); ++it ) { if ( config->hasGroup( *it ) ) config->deleteGroup( *it ); } - QStringList removed = config->readListEntry( "removed" ); + TQStringList removed = config->readListEntry( "removed" ); removed += m_removed; // clean up the list of removed items, so that it does not contain // non-existing groups (we can't remove groups from a non-owned global file). config->sync(); - QStringList::iterator it1 = removed.begin(); + TQStringList::iterator it1 = removed.begin(); while( it1 != removed.end() ) { if ( ! config->hasGroup( *it1 ) ) @@ -741,11 +741,11 @@ void KateExternalToolsConfigWidget::slotNew() editor.teCommand->text(), editor.btnIcon->icon(), editor.leExecutable->text(), - QStringList::split( QRegExp("\\s*;\\s*"), editor.leMimetypes->text() ) ); + TQStringList::split( TQRegExp("\\s*;\\s*"), editor.leMimetypes->text() ) ); // This is sticky, it does not change again, so that shortcuts sticks // TODO check for dups - t->acname = "externaltool_" + QString(t->name).replace( QRegExp("\\W+"), "" ); + t->acname = "externaltool_" + TQString(t->name).replace( TQRegExp("\\W+"), "" ); new ToolItem ( lbTools, t->icon.isEmpty() ? blankIcon() : SmallIcon( t->icon ), t ); @@ -787,7 +787,7 @@ void KateExternalToolsConfigWidget::slotEdit() t->command = editor.teCommand->text(); t->icon = editor.btnIcon->icon(); t->tryexec = editor.leExecutable->text(); - t->mimetypes = QStringList::split( QRegExp("\\s*;\\s*"), editor.leMimetypes->text() ); + t->mimetypes = TQStringList::split( TQRegExp("\\s*;\\s*"), editor.leMimetypes->text() ); t->save = editor.cmbSave->currentItem(); //if the icon has changed or name changed, I have to renew the listbox item :S @@ -817,7 +817,7 @@ void KateExternalToolsConfigWidget::slotInsertSeparator() void KateExternalToolsConfigWidget::slotMoveUp() { // move the current item in the listbox upwards if possible - QListBoxItem *item = lbTools->selectedItem(); + TQListBoxItem *item = lbTools->selectedItem(); if ( ! item ) return; int idx = lbTools->index( item ); @@ -833,7 +833,7 @@ void KateExternalToolsConfigWidget::slotMoveUp() else // a separator! { lbTools->removeItem( idx ); - lbTools->insertItem( new QListBoxText( 0, "---" ), idx-1 ); + lbTools->insertItem( new TQListBoxText( 0, "---" ), idx-1 ); } lbTools->setCurrentItem( idx - 1 ); @@ -845,7 +845,7 @@ void KateExternalToolsConfigWidget::slotMoveUp() void KateExternalToolsConfigWidget::slotMoveDown() { // move the current item in the listbox downwards if possible - QListBoxItem *item = lbTools->selectedItem(); + TQListBoxItem *item = lbTools->selectedItem(); if ( ! item ) return; uint idx = lbTools->index( item ); @@ -861,7 +861,7 @@ void KateExternalToolsConfigWidget::slotMoveDown() else // a separator! { lbTools->removeItem( idx ); - lbTools->insertItem( new QListBoxText( 0, "---" ), idx+1 ); + lbTools->insertItem( new TQListBoxText( 0, "---" ), idx+1 ); } lbTools->setCurrentItem( idx+1 ); diff --git a/kate/app/kateexternaltools.h b/kate/app/kateexternaltools.h index 4a5ecdacc..507e1cfca 100644 --- a/kate/app/kateexternaltools.h +++ b/kate/app/kateexternaltools.h @@ -28,7 +28,7 @@ #include <kdialogbase.h> #include <kate/document.h> #include <kmacroexpander.h> -#include <qpixmap.h> +#include <tqpixmap.h> /** * The external tools action @@ -57,7 +57,7 @@ class KateExternalToolsMenuAction : public KActionMenu Q_OBJECT public: - KateExternalToolsMenuAction( const QString &text=QString::null, QObject *parent=0, const char* name=0, class KateMainWindow *mw=0 ); + KateExternalToolsMenuAction( const TQString &text=TQString::null, TQObject *parent=0, const char* name=0, class KateMainWindow *mw=0 ); ~KateExternalToolsMenuAction() {}; /** @@ -82,10 +82,10 @@ class KateExternalToolAction : public KAction, public KWordMacroExpander { Q_OBJECT public: - KateExternalToolAction( QObject *parent, const char *name, class KateExternalTool *t ); + KateExternalToolAction( TQObject *parent, const char *name, class KateExternalTool *t ); ~KateExternalToolAction(); protected: - virtual bool expandMacro( const QString &str, QStringList &ret ); + virtual bool expandMacro( const TQString &str, TQStringList &ret ); private slots: void slotRun(); @@ -100,30 +100,30 @@ class KateExternalToolAction : public KAction, public KWordMacroExpander class KateExternalTool { public: - KateExternalTool( const QString &name=QString::null, - const QString &command=QString::null, - const QString &icon=QString::null, - const QString &tryexec=QString::null, - const QStringList &mimetypes=QStringList(), - const QString &acname=QString::null, - const QString &cmdname=QString::null, + KateExternalTool( const TQString &name=TQString::null, + const TQString &command=TQString::null, + const TQString &icon=TQString::null, + const TQString &tryexec=TQString::null, + const TQStringList &mimetypes=TQStringList(), + const TQString &acname=TQString::null, + const TQString &cmdname=TQString::null, int save=0 ); ~KateExternalTool() {}; - QString name; ///< The name used in the menu. - QString command; ///< The command to execute. - QString icon; ///< the icon to use in the menu. - QString tryexec; ///< The name or path of the executable. - QStringList mimetypes; ///< Optional list of mimetypes for which this action is valid. + TQString name; ///< The name used in the menu. + TQString command; ///< The command to execute. + TQString icon; ///< the icon to use in the menu. + TQString tryexec; ///< The name or path of the executable. + TQStringList mimetypes; ///< Optional list of mimetypes for which this action is valid. bool hasexec; ///< This is set by the constructor by calling checkExec(), if a value is present. - QString acname; ///< The name for the action. This is generated first time the action is is created. - QString cmdname; ///< The name for the commandline. + TQString acname; ///< The name for the action. This is generated first time the action is is created. + TQString cmdname; ///< The name for the commandline. int save; ///< We can save documents prior to activating the tool command: 0 = nothing, 1 = current document, 2 = all documents. /** * @return true if mimetypes is empty, or the @p mimetype matches. */ - bool valid( const QString &mimetype ) const; + bool valid( const TQString &mimetype ) const; /** * @return true if "tryexec" exists and has the executable bit set, or is * empty. @@ -132,7 +132,7 @@ class KateExternalTool bool checkExec(); private: - QString m_exec; ///< The fully qualified path of the executable. + TQString m_exec; ///< The fully qualified path of the executable. }; /** @@ -144,7 +144,7 @@ class KateExternalToolsConfigWidget : public Kate::ConfigPage { Q_OBJECT public: - KateExternalToolsConfigWidget( QWidget *parent, const char* name); + KateExternalToolsConfigWidget( TQWidget *parent, const char* name); virtual ~KateExternalToolsConfigWidget(); virtual void apply(); @@ -164,12 +164,12 @@ class KateExternalToolsConfigWidget : public Kate::ConfigPage void slotSelectionChanged(); private: - QPixmap blankIcon(); + TQPixmap blankIcon(); - QStringList m_removed; + TQStringList m_removed; class KListBox *lbTools; - class QPushButton *btnNew, *btnRemove, *btnEdit, *btnMoveUp, *btnMoveDwn; + class TQPushButton *btnNew, *btnRemove, *btnEdit, *btnMoveUp, *btnMoveDwn; class KConfig *config; @@ -186,13 +186,13 @@ class KateExternalToolsConfigWidget : public Kate::ConfigPage static KateExternalToolsCommand *self(); void reload(); public: - virtual QStringList cmds (); - virtual bool exec (Kate::View *view, const QString &cmd, QString &msg); - virtual bool help (Kate::View *view, const QString &cmd, QString &msg); + virtual TQStringList cmds (); + virtual bool exec (Kate::View *view, const TQString &cmd, TQString &msg); + virtual bool help (Kate::View *view, const TQString &cmd, TQString &msg); private: static KateExternalToolsCommand *s_self; - QStringList m_list; - QMap<QString,QString> m_map; + TQStringList m_list; + TQMap<TQString,TQString> m_map; bool m_inited; }; @@ -206,12 +206,12 @@ class KateExternalToolServiceEditor : public KDialogBase public: KateExternalToolServiceEditor( KateExternalTool *tool=0, - QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); - class QLineEdit *leName, *leExecutable, *leMimetypes,*leCmdLine; - class QTextEdit *teCommand; + class TQLineEdit *leName, *leExecutable, *leMimetypes,*leCmdLine; + class TQTextEdit *teCommand; class KIconButton *btnIcon; - class QComboBox *cmbSave; + class TQComboBox *cmbSave; private slots: /** diff --git a/kate/app/katefilelist.cpp b/kate/app/katefilelist.cpp index 8c350d45a..47c8aa75b 100644 --- a/kate/app/katefilelist.cpp +++ b/kate/app/katefilelist.cpp @@ -26,17 +26,17 @@ #include "kateviewmanager.h" #include "katemainwindow.h" -#include <qapplication.h> -#include <qpainter.h> -#include <qpopupmenu.h> -#include <qheader.h> -#include <qcolor.h> -#include <qcheckbox.h> -#include <qhbox.h> -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qwhatsthis.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqpopupmenu.h> +#include <tqheader.h> +#include <tqcolor.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> #include <kiconloader.h> #include <kconfig.h> @@ -54,16 +54,16 @@ class ToolTip : public QToolTip { public: - ToolTip( QWidget *parent, KateFileList *lv ) - : QToolTip( parent ), + ToolTip( TQWidget *parent, KateFileList *lv ) + : TQToolTip( parent ), m_listView( lv ) { } virtual ~ToolTip() {}; - void maybeTip( const QPoint &pos ) + void maybeTip( const TQPoint &pos ) { - QListViewItem *i = m_listView->itemAt( pos ); + TQListViewItem *i = m_listView->itemAt( pos ); if ( ! i ) return; KateFileListItem *item = ((KateFileListItem*)i); @@ -82,7 +82,7 @@ class ToolTip : public QToolTip //BEGIN KateFileList KateFileList::KateFileList (KateMainWindow *main, KateViewManager *_viewManager, - QWidget * parent, const char * name ) + TQWidget * parent, const char * name ) : KListView (parent, name) , m_sort( KateFileList::sortByID ) { @@ -90,18 +90,18 @@ KateFileList::KateFileList (KateMainWindow *main, m_tooltip = new ToolTip( viewport(), this ); // default colors - m_viewShade = QColor( 51, 204, 255 ); - m_editShade = QColor( 255, 102, 153 ); + m_viewShade = TQColor( 51, 204, 255 ); + m_editShade = TQColor( 255, 102, 153 ); m_enableBgShading = false; - setFocusPolicy ( QWidget::NoFocus ); + setFocusPolicy ( TQWidget::NoFocus ); viewManager = _viewManager; header()->hide(); addColumn("Document Name"); - setSelectionMode( QListView::Single ); + setSelectionMode( TQListView::Single ); setSorting( 0, true ); setShowToolTips( false ); @@ -113,18 +113,18 @@ KateFileList::KateFileList (KateMainWindow *main, slotModChanged (KateDocManager::self()->document(i)); } - connect(KateDocManager::self(),SIGNAL(documentCreated(Kate::Document *)), - this,SLOT(slotDocumentCreated(Kate::Document *))); - connect(KateDocManager::self(),SIGNAL(documentDeleted(uint)), - this,SLOT(slotDocumentDeleted(uint))); + connect(KateDocManager::self(),TQT_SIGNAL(documentCreated(Kate::Document *)), + this,TQT_SLOT(slotDocumentCreated(Kate::Document *))); + connect(KateDocManager::self(),TQT_SIGNAL(documentDeleted(uint)), + this,TQT_SLOT(slotDocumentDeleted(uint))); // don't Honour KDE single/double click setting, this files are already open, // no need for hassle of considering double-click - connect(this,SIGNAL(selectionChanged(QListViewItem *)), - this,SLOT(slotActivateView(QListViewItem *))); - connect(viewManager,SIGNAL(viewChanged()), this,SLOT(slotViewChanged())); - connect(this,SIGNAL(contextMenuRequested( QListViewItem *, const QPoint &, int )), - this,SLOT(slotMenu ( QListViewItem *, const QPoint &, int ))); + connect(this,TQT_SIGNAL(selectionChanged(TQListViewItem *)), + this,TQT_SLOT(slotActivateView(TQListViewItem *))); + connect(viewManager,TQT_SIGNAL(viewChanged()), this,TQT_SLOT(slotViewChanged())); + connect(this,TQT_SIGNAL(contextMenuRequested( TQListViewItem *, const TQPoint &, int )), + this,TQT_SLOT(slotMenu ( TQListViewItem *, const TQPoint &, int ))); } KateFileList::~KateFileList () @@ -134,14 +134,14 @@ KateFileList::~KateFileList () void KateFileList::setupActions () { - windowNext = KStdAction::back(this, SLOT(slotPrevDocument()), m_main->actionCollection()); - windowPrev = KStdAction::forward(this, SLOT(slotNextDocument()), m_main->actionCollection()); + windowNext = KStdAction::back(this, TQT_SLOT(slotPrevDocument()), m_main->actionCollection()); + windowPrev = KStdAction::forward(this, TQT_SLOT(slotNextDocument()), m_main->actionCollection()); sortAction = new KSelectAction( i18n("Sort &By"), 0, m_main->actionCollection(), "filelist_sortby" ); - QStringList l; + TQStringList l; l << i18n("Opening Order") << i18n("Document Name") << i18n("URL"); sortAction->setItems( l ); - connect( sortAction, SIGNAL(activated(int)), this, SLOT(setSortType(int)) ); + connect( sortAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setSortType(int)) ); } void KateFileList::updateActions () @@ -150,7 +150,7 @@ void KateFileList::updateActions () windowPrev->setEnabled(KateDocManager::self()->documents() > 1); } -void KateFileList::keyPressEvent(QKeyEvent *e) { +void KateFileList::keyPressEvent(TQKeyEvent *e) { if ( ( e->key() == Key_Return ) || ( e->key() == Key_Enter ) ) { e->accept(); @@ -166,7 +166,7 @@ void KateFileList::keyPressEvent(QKeyEvent *e) { // leftclick outside items. // ### if we get to accept keyboard navigation, set focus before // returning -void KateFileList::contentsMousePressEvent( QMouseEvent *e ) +void KateFileList::contentsMousePressEvent( TQMouseEvent *e ) { if ( ! itemAt( contentsToViewport( e->pos() ) ) ) return; @@ -174,7 +174,7 @@ void KateFileList::contentsMousePressEvent( QMouseEvent *e ) KListView::contentsMousePressEvent( e ); } -void KateFileList::resizeEvent( QResizeEvent *e ) +void KateFileList::resizeEvent( TQResizeEvent *e ) { KListView::resizeEvent( e ); @@ -217,9 +217,9 @@ void KateFileList::slotPrevDocument() void KateFileList::slotDocumentCreated (Kate::Document *doc) { new KateFileListItem( this, doc/*, doc->documentNumber()*/ ); - connect(doc,SIGNAL(modStateChanged(Kate::Document *)),this,SLOT(slotModChanged(Kate::Document *))); - connect(doc,SIGNAL(nameChanged(Kate::Document *)),this,SLOT(slotNameChanged(Kate::Document *))); - connect(doc,SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); + connect(doc,TQT_SIGNAL(modStateChanged(Kate::Document *)),this,TQT_SLOT(slotModChanged(Kate::Document *))); + connect(doc,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(slotNameChanged(Kate::Document *))); + connect(doc,TQT_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,TQT_SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); sort(); updateActions (); @@ -227,7 +227,7 @@ void KateFileList::slotDocumentCreated (Kate::Document *doc) void KateFileList::slotDocumentDeleted (uint documentNumber) { - QListViewItem * item = firstChild(); + TQListViewItem * item = firstChild(); while( item ) { if ( ((KateFileListItem *)item)->documentNumber() == documentNumber ) { @@ -244,7 +244,7 @@ void KateFileList::slotDocumentDeleted (uint documentNumber) updateActions (); } -void KateFileList::slotActivateView( QListViewItem *item ) +void KateFileList::slotActivateView( TQListViewItem *item ) { if ( ! item || item->rtti() != RTTI_KateFileListItem ) return; @@ -256,7 +256,7 @@ void KateFileList::slotModChanged (Kate::Document *doc) { if (!doc) return; - QListViewItem * item = firstChild(); + TQListViewItem * item = firstChild(); while( item ) { if ( ((KateFileListItem *)item)->documentNumber() == doc->documentNumber() ) @@ -291,7 +291,7 @@ void KateFileList::slotNameChanged (Kate::Document *doc) // ### using nextSibling to *only* look at toplevel items. // child items could be marks for example - QListViewItem * item = firstChild(); + TQListViewItem * item = firstChild(); while( item ) { if ( ((KateFileListItem*)item)->document() == doc ) { @@ -311,7 +311,7 @@ void KateFileList::slotViewChanged () Kate::View *view = viewManager->activeView(); uint dn = view->getDoc()->documentNumber(); - QListViewItem * i = firstChild(); + TQListViewItem * i = firstChild(); while( i ) { if ( ((KateFileListItem *)i)->documentNumber() == dn ) { @@ -348,23 +348,23 @@ void KateFileList::slotViewChanged () } -void KateFileList::slotMenu ( QListViewItem *item, const QPoint &p, int /*col*/ ) +void KateFileList::slotMenu ( TQListViewItem *item, const TQPoint &p, int /*col*/ ) { if (!item) return; - QPopupMenu *menu = (QPopupMenu*) ((viewManager->mainWindow())->factory()->container("filelist_popup", viewManager->mainWindow())); + TQPopupMenu *menu = (TQPopupMenu*) ((viewManager->mainWindow())->factory()->container("filelist_popup", viewManager->mainWindow())); if (menu) menu->exec(p); } -QString KateFileList::tooltip( QListViewItem *item, int ) +TQString KateFileList::tooltip( TQListViewItem *item, int ) { KateFileListItem *i = ((KateFileListItem*)item); - if ( ! i ) return QString::null; + if ( ! i ) return TQString::null; - QString str; + TQString str; const KateDocumentInfo *info = KateDocManager::self()->documentInfo(i->document()); if (info && info->modifiedOnDisc) @@ -393,9 +393,9 @@ void KateFileList::updateSort () sort (); } -void KateFileList::readConfig( KConfig *config, const QString &group ) +void KateFileList::readConfig( KConfig *config, const TQString &group ) { - QString oldgroup = config->group(); + TQString oldgroup = config->group(); config->setGroup( group ); setSortType( config->readNumEntry( "Sort Type", sortByID ) ); @@ -408,9 +408,9 @@ void KateFileList::readConfig( KConfig *config, const QString &group ) config->setGroup( oldgroup ); } -void KateFileList::writeConfig( KConfig *config, const QString &group ) +void KateFileList::writeConfig( KConfig *config, const TQString &group ) { - QString oldgroup = config->group(); + TQString oldgroup = config->group(); config->setGroup( group ); config->writeEntry( "Sort Type", m_sort ); @@ -421,21 +421,21 @@ void KateFileList::writeConfig( KConfig *config, const QString &group ) config->setGroup( oldgroup ); } -void KateFileList::takeItem( QListViewItem *item ) +void KateFileList::takeItem( TQListViewItem *item ) { if ( item->rtti() == RTTI_KateFileListItem ) { m_editHistory.removeRef( (KateFileListItem*)item ); m_viewHistory.removeRef( (KateFileListItem*)item ); } - QListView::takeItem( item ); + TQListView::takeItem( item ); } //END KateFileList //BEGIN KateFileListItem -KateFileListItem::KateFileListItem( QListView* lv, +KateFileListItem::KateFileListItem( TQListView* lv, Kate::Document *_doc ) - : QListViewItem( lv, _doc->docName() ), + : TQListViewItem( lv, _doc->docName() ), doc( _doc ), m_viewhistpos( 0 ), m_edithistpos( 0 ), @@ -447,13 +447,13 @@ KateFileListItem::~KateFileListItem() { } -const QPixmap *KateFileListItem::pixmap ( int column ) const +const TQPixmap *KateFileListItem::pixmap ( int column ) const { if ( column == 0) { - static QPixmap noPm = SmallIcon ("null"); - static QPixmap modPm = SmallIcon("modified"); - static QPixmap discPm = SmallIcon("modonhd"); - static QPixmap modmodPm = SmallIcon("modmod"); + static TQPixmap noPm = SmallIcon ("null"); + static TQPixmap modPm = SmallIcon("modified"); + static TQPixmap discPm = SmallIcon("modonhd"); + static TQPixmap modmodPm = SmallIcon("modmod"); const KateDocumentInfo *info = KateDocManager::self()->documentInfo(doc); @@ -466,22 +466,22 @@ const QPixmap *KateFileListItem::pixmap ( int column ) const return 0; } -void KateFileListItem::paintCell( QPainter *painter, const QColorGroup & cg, int column, int width, int align ) +void KateFileListItem::paintCell( TQPainter *painter, const TQColorGroup & cg, int column, int width, int align ) { KateFileList *fl = (KateFileList*)listView(); if ( ! fl ) return; if ( column == 0 ) { - QColorGroup cgNew = cg; + TQColorGroup cgNew = cg; // replace the base color with a different shading if necessary... if ( fl->shadingEnabled() && m_viewhistpos > 1 ) { - QColor b( cg.base() ); + TQColor b( cg.base() ); - QColor shade = fl->viewShade(); - QColor eshade = fl->editShade(); + TQColor shade = fl->viewShade(); + TQColor eshade = fl->editShade(); int hc = fl->histCount(); // If this file is in the edit history, blend in the eshade // color. The blend is weighted by the position in the editing history @@ -507,16 +507,16 @@ void KateFileListItem::paintCell( QPainter *painter, const QColorGroup & cg, int (int)((b.blue()*(1-t)) + (shade.blue()*t)) ); - cgNew.setColor(QColorGroup::Base, b); + cgNew.setColor(TQColorGroup::Base, b); } - QListViewItem::paintCell( painter, cgNew, column, width, align ); + TQListViewItem::paintCell( painter, cgNew, column, width, align ); } else - QListViewItem::paintCell( painter, cg, column, width, align ); + TQListViewItem::paintCell( painter, cg, column, width, align ); } -int KateFileListItem::compare ( QListViewItem * i, int col, bool ascending ) const +int KateFileListItem::compare ( TQListViewItem * i, int col, bool ascending ) const { if ( i->rtti() == RTTI_KateFileListItem ) { @@ -533,7 +533,7 @@ int KateFileListItem::compare ( QListViewItem * i, int col, bool ascending ) con return doc->url().prettyURL().compare( ((KateFileListItem*)i)->document()->url().prettyURL() ); break; default: - return QListViewItem::compare( i, col, ascending ); + return TQListViewItem::compare( i, col, ascending ); } } return 0; @@ -541,68 +541,68 @@ int KateFileListItem::compare ( QListViewItem * i, int col, bool ascending ) con //END KateFileListItem //BEGIN KFLConfigPage -KFLConfigPage::KFLConfigPage( QWidget* parent, const char *name, KateFileList *fl ) +KFLConfigPage::KFLConfigPage( TQWidget* parent, const char *name, KateFileList *fl ) : Kate::ConfigPage( parent, name ), m_filelist( fl ), m_changed( false ) { - QVBoxLayout *lo1 = new QVBoxLayout( this ); + TQVBoxLayout *lo1 = new TQVBoxLayout( this ); int spacing = KDialog::spacingHint(); lo1->setSpacing( spacing ); - QGroupBox *gb = new QGroupBox( 1, Qt::Horizontal, i18n("Background Shading"), this ); + TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Background Shading"), this ); lo1->addWidget( gb ); - QWidget *g = new QWidget( gb ); - QGridLayout *lo = new QGridLayout( g, 2, 2 ); + TQWidget *g = new TQWidget( gb ); + TQGridLayout *lo = new TQGridLayout( g, 2, 2 ); lo->setSpacing( KDialog::spacingHint() ); - cbEnableShading = new QCheckBox( i18n("&Enable background shading"), g ); + cbEnableShading = new TQCheckBox( i18n("&Enable background shading"), g ); lo->addMultiCellWidget( cbEnableShading, 1, 1, 0, 1 ); kcbViewShade = new KColorButton( g ); - lViewShade = new QLabel( kcbViewShade, i18n("&Viewed documents' shade:"), g ); + lViewShade = new TQLabel( kcbViewShade, i18n("&Viewed documents' shade:"), g ); lo->addWidget( lViewShade, 2, 0 ); lo->addWidget( kcbViewShade, 2, 1 ); kcbEditShade = new KColorButton( g ); - lEditShade = new QLabel( kcbEditShade, i18n("&Modified documents' shade:"), g ); + lEditShade = new TQLabel( kcbEditShade, i18n("&Modified documents' shade:"), g ); lo->addWidget( lEditShade, 3, 0 ); lo->addWidget( kcbEditShade, 3, 1 ); // sorting - QHBox *hbSorting = new QHBox( this ); + TQHBox *hbSorting = new TQHBox( this ); lo1->addWidget( hbSorting ); - lSort = new QLabel( i18n("&Sort by:"), hbSorting ); - cmbSort = new QComboBox( hbSorting ); + lSort = new TQLabel( i18n("&Sort by:"), hbSorting ); + cmbSort = new TQComboBox( hbSorting ); lSort->setBuddy( cmbSort ); - QStringList l; + TQStringList l; l << i18n("Opening Order") << i18n("Document Name") << i18n("URL"); cmbSort->insertStringList( l ); lo1->insertStretch( -1, 10 ); - QWhatsThis::add( cbEnableShading, i18n( + TQWhatsThis::add( cbEnableShading, i18n( "When background shading is enabled, documents that have been viewed " "or edited within the current session will have a shaded background. " "The most recent documents have the strongest shade.") ); - QWhatsThis::add( kcbViewShade, i18n( + TQWhatsThis::add( kcbViewShade, i18n( "Set the color for shading viewed documents.") ); - QWhatsThis::add( kcbEditShade, i18n( + TQWhatsThis::add( kcbEditShade, i18n( "Set the color for modified documents. This color is blended into " "the color for viewed files. The most recently edited documents get " "most of this color.") ); - QWhatsThis::add( cmbSort, i18n( + TQWhatsThis::add( cmbSort, i18n( "Set the sorting method for the documents.") ); reload(); slotEnableChanged(); - connect( cbEnableShading, SIGNAL(toggled(bool)), this, SLOT(slotMyChanged()) ); - connect( cbEnableShading, SIGNAL(toggled(bool)), this, SLOT(slotEnableChanged()) ); - connect( kcbViewShade, SIGNAL(changed(const QColor&)), this, SLOT(slotMyChanged()) ); - connect( kcbEditShade, SIGNAL(changed(const QColor&)), this, SLOT(slotMyChanged()) ); - connect( cmbSort, SIGNAL(activated(int)), this, SLOT(slotMyChanged()) ); + connect( cbEnableShading, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotMyChanged()) ); + connect( cbEnableShading, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEnableChanged()) ); + connect( kcbViewShade, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(slotMyChanged()) ); + connect( kcbEditShade, TQT_SIGNAL(changed(const TQColor&)), this, TQT_SLOT(slotMyChanged()) ); + connect( cmbSort, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMyChanged()) ); } void KFLConfigPage::apply() diff --git a/kate/app/katefilelist.h b/kate/app/katefilelist.h index 7615eb63d..e90281558 100644 --- a/kate/app/katefilelist.h +++ b/kate/app/katefilelist.h @@ -27,9 +27,9 @@ #include <klistview.h> -#include <qtooltip.h> -#include <qcolor.h> -#include <qptrlist.h> +#include <tqtooltip.h> +#include <tqcolor.h> +#include <tqptrlist.h> #define RTTI_KateFileListItem 1001 @@ -41,7 +41,7 @@ class KSelectAction; class KateFileListItem : public QListViewItem { public: - KateFileListItem( QListView *lv, + KateFileListItem( TQListView *lv, Kate::Document *doc ); ~KateFileListItem(); @@ -60,12 +60,12 @@ class KateFileListItem : public QListViewItem void setEditHistPos( int p ) { m_edithistpos = p; } protected: - virtual const QPixmap *pixmap ( int column ) const; - void paintCell( QPainter *painter, const QColorGroup & cg, int column, int width, int align ); + virtual const TQPixmap *pixmap ( int column ) const; + void paintCell( TQPainter *painter, const TQColorGroup & cg, int column, int width, int align ); /** * Reimplemented so we can sort by a number of different document properties. */ - int compare ( QListViewItem * i, int col, bool ascending ) const; + int compare ( TQListViewItem * i, int col, bool ascending ) const; private: Kate::Document *doc; @@ -81,7 +81,7 @@ class KateFileList : public KListView friend class KFLConfigPage; public: - KateFileList (KateMainWindow *main, KateViewManager *_viewManager, QWidget * parent = 0, const char * name = 0 ); + KateFileList (KateMainWindow *main, KateViewManager *_viewManager, TQWidget * parent = 0, const char * name = 0 ); ~KateFileList (); int sortType () const { return m_sort; }; @@ -93,21 +93,21 @@ class KateFileList : public KListView sortByURL = 2 }; - QString tooltip( QListViewItem *item, int ); + TQString tooltip( TQListViewItem *item, int ); uint histCount() const { return m_viewHistory.count(); } uint editHistCount() const { return m_editHistory.count(); } - QColor editShade() const { return m_editShade; } - QColor viewShade() const { return m_viewShade; } + TQColor editShade() const { return m_editShade; } + TQColor viewShade() const { return m_viewShade; } bool shadingEnabled() { return m_enableBgShading; } - void readConfig( class KConfig *config, const QString &group ); - void writeConfig( class KConfig *config, const QString &group ); + void readConfig( class KConfig *config, const TQString &group ); + void writeConfig( class KConfig *config, const TQString &group ); /** * reimplemented to remove the item from the history stacks */ - void takeItem( QListViewItem * ); + void takeItem( TQListViewItem * ); public slots: void setSortType (int s); @@ -117,25 +117,25 @@ class KateFileList : public KListView private slots: void slotDocumentCreated (Kate::Document *doc); void slotDocumentDeleted (uint documentNumber); - void slotActivateView( QListViewItem *item ); + void slotActivateView( TQListViewItem *item ); void slotModChanged (Kate::Document *doc); void slotModifiedOnDisc (Kate::Document *doc, bool b, unsigned char reason); void slotNameChanged (Kate::Document *doc); void slotViewChanged (); - void slotMenu ( QListViewItem *item, const QPoint &p, int col ); + void slotMenu ( TQListViewItem *item, const TQPoint &p, int col ); protected: - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); /** * Reimplemented to force Single mode for real: * don't let a mouse click outside items deselect. */ - virtual void contentsMousePressEvent( QMouseEvent *e ); + virtual void contentsMousePressEvent( TQMouseEvent *e ); /** * Reimplemented to make sure the first (and only) column is at least * the width of the viewport */ - virtual void resizeEvent( QResizeEvent *e ); + virtual void resizeEvent( TQResizeEvent *e ); private: void setupActions (); @@ -152,10 +152,10 @@ class KateFileList : public KListView KAction* windowPrev; KSelectAction* sortAction; - QPtrList<KateFileListItem> m_viewHistory; - QPtrList<KateFileListItem> m_editHistory; + TQPtrList<KateFileListItem> m_viewHistory; + TQPtrList<KateFileListItem> m_editHistory; - QColor m_viewShade, m_editShade; + TQColor m_viewShade, m_editShade; bool m_enableBgShading; class ToolTip *m_tooltip; @@ -164,7 +164,7 @@ class KateFileList : public KListView class KFLConfigPage : public Kate::ConfigPage { Q_OBJECT public: - KFLConfigPage( QWidget* parent=0, const char *name=0, KateFileList *fl=0 ); + KFLConfigPage( TQWidget* parent=0, const char *name=0, KateFileList *fl=0 ); virtual ~KFLConfigPage() {}; virtual void apply(); @@ -177,10 +177,10 @@ class KFLConfigPage : public Kate::ConfigPage { void slotMyChanged(); private: - class QCheckBox *cbEnableShading; + class TQCheckBox *cbEnableShading; class KColorButton *kcbViewShade, *kcbEditShade; - class QLabel *lEditShade, *lViewShade, *lSort; - class QComboBox *cmbSort; + class TQLabel *lEditShade, *lViewShade, *lSort; + class TQComboBox *cmbSort; KateFileList *m_filelist; bool m_changed; diff --git a/kate/app/katefileselector.cpp b/kate/app/katefileselector.cpp index bdc39fc9a..5ab42a289 100644 --- a/kate/app/katefileselector.cpp +++ b/kate/app/katefileselector.cpp @@ -28,24 +28,24 @@ #include "kactionselector.h" -#include <qlayout.h> -#include <qtoolbutton.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qstrlist.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qapplication.h> -#include <qlistbox.h> -#include <qscrollbar.h> -#include <qspinbox.h> -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qregexp.h> -#include <qdockarea.h> -#include <qtimer.h> -#include <qdir.h> +#include <tqlayout.h> +#include <tqtoolbutton.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqstrlist.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqapplication.h> +#include <tqlistbox.h> +#include <tqscrollbar.h> +#include <tqspinbox.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqregexp.h> +#include <tqdockarea.h> +#include <tqtimer.h> +#include <tqdir.h> #include <kapplication.h> #include <kiconloader.h> @@ -59,7 +59,7 @@ #include <kaction.h> #include <kmessagebox.h> #include <ktoolbarbutton.h> -#include <qtoolbar.h> +#include <tqtoolbar.h> #include <kpopupmenu.h> #include <kdialog.h> #include <kdebug.h> @@ -70,7 +70,7 @@ static void silenceQToolBar(QtMsgType, const char *){} // helper classes to be able to have a toolbar without move handle -KateFileSelectorToolBar::KateFileSelectorToolBar(QWidget *parent) +KateFileSelectorToolBar::KateFileSelectorToolBar(TQWidget *parent) : KToolBar( parent, "Kate FileSelector Toolbar", true ) { setMinimumWidth(10); @@ -84,15 +84,15 @@ void KateFileSelectorToolBar::setMovingEnabled( bool) } -KateFileSelectorToolBarParent::KateFileSelectorToolBarParent(QWidget *parent) - :QFrame(parent),m_tb(0){} +KateFileSelectorToolBarParent::KateFileSelectorToolBarParent(TQWidget *parent) + :TQFrame(parent),m_tb(0){} KateFileSelectorToolBarParent::~KateFileSelectorToolBarParent(){} void KateFileSelectorToolBarParent::setToolBar(KateFileSelectorToolBar *tb) { m_tb=tb; } -void KateFileSelectorToolBarParent::resizeEvent ( QResizeEvent * ) +void KateFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) { if (m_tb) { @@ -106,8 +106,8 @@ void KateFileSelectorToolBarParent::resizeEvent ( QResizeEvent * ) KateFileSelector::KateFileSelector( KateMainWindow *mainWindow, KateViewManager *viewManager, - QWidget * parent, const char * name ) - : QVBox (parent, name), + TQWidget * parent, const char * name ) + : TQVBox (parent, name), mainwin(mainWindow), viewmanager(viewManager) { @@ -123,7 +123,7 @@ KateFileSelector::KateFileSelector( KateMainWindow *mainWindow, qInstallMsgHandler( oldHandler ); cmbPath = new KURLComboBox( KURLComboBox::Directories, true, this, "path combo" ); - cmbPath->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed )); + cmbPath->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); KURLCompletion* cmpl = new KURLCompletion(KURLCompletion::DirCompletion); cmbPath->setCompletionObject( cmpl ); cmbPath->setAutoDeleteCompletionObject( true ); @@ -132,8 +132,8 @@ KateFileSelector::KateFileSelector( KateMainWindow *mainWindow, dir = new KDirOperator(KURL(), this, "operator"); dir->setView(KFile::/* Simple */Detail); dir->view()->setSelectionMode(KFile::Extended); - connect ( dir, SIGNAL( viewChanged(KFileView *) ), - this, SLOT( selectorViewChanged(KFileView *) ) ); + connect ( dir, TQT_SIGNAL( viewChanged(KFileView *) ), + this, TQT_SLOT( selectorViewChanged(KFileView *) ) ); setStretchFactor(dir, 2); KActionCollection *coll = dir->actionCollection(); @@ -151,59 +151,59 @@ KateFileSelector::KateFileSelector( KateMainWindow *mainWindow, mActionCollection, "bookmarks" ); acmBookmarks->setDelayed( false ); bookmarkHandler = new KBookmarkHandler( this, acmBookmarks->popupMenu() ); - QHBox* filterBox = new QHBox(this); + TQHBox* filterBox = new TQHBox(this); - btnFilter = new QToolButton( filterBox ); + btnFilter = new TQToolButton( filterBox ); btnFilter->setIconSet( SmallIconSet("filter" ) ); btnFilter->setToggleButton( true ); filter = new KHistoryCombo( true, filterBox, "filter"); - filter->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed )); + filter->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); filterBox->setStretchFactor(filter, 2); - connect( btnFilter, SIGNAL( clicked() ), this, SLOT( btnFilterClick() ) ); + connect( btnFilter, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnFilterClick() ) ); - connect( filter, SIGNAL( activated(const QString&) ), - SLOT( slotFilterChange(const QString&) ) ); - connect( filter, SIGNAL( returnPressed(const QString&) ), - filter, SLOT( addToHistory(const QString&) ) ); + connect( filter, TQT_SIGNAL( activated(const TQString&) ), + TQT_SLOT( slotFilterChange(const TQString&) ) ); + connect( filter, TQT_SIGNAL( returnPressed(const TQString&) ), + filter, TQT_SLOT( addToHistory(const TQString&) ) ); // kaction for the dir sync method acSyncDir = new KAction( i18n("Current Document Folder"), "curfiledir", 0, - this, SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" ); + this, TQT_SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" ); toolbar->setIconText( KToolBar::IconOnly ); toolbar->setIconSize( 16 ); toolbar->setEnableContextMenu( false ); - connect( cmbPath, SIGNAL( urlActivated( const KURL& )), - this, SLOT( cmbPathActivated( const KURL& ) )); - connect( cmbPath, SIGNAL( returnPressed( const QString& )), - this, SLOT( cmbPathReturnPressed( const QString& ) )); - connect(dir, SIGNAL(urlEntered(const KURL&)), - this, SLOT(dirUrlEntered(const KURL&)) ); + connect( cmbPath, TQT_SIGNAL( urlActivated( const KURL& )), + this, TQT_SLOT( cmbPathActivated( const KURL& ) )); + connect( cmbPath, TQT_SIGNAL( returnPressed( const TQString& )), + this, TQT_SLOT( cmbPathReturnPressed( const TQString& ) )); + connect(dir, TQT_SIGNAL(urlEntered(const KURL&)), + this, TQT_SLOT(dirUrlEntered(const KURL&)) ); - connect(dir, SIGNAL(finishedLoading()), - this, SLOT(dirFinishedLoading()) ); + connect(dir, TQT_SIGNAL(finishedLoading()), + this, TQT_SLOT(dirFinishedLoading()) ); // enable dir sync button if current doc has a valid URL - connect ( viewmanager, SIGNAL( viewChanged() ), - this, SLOT( kateViewChanged() ) ); + connect ( viewmanager, TQT_SIGNAL( viewChanged() ), + this, TQT_SLOT( kateViewChanged() ) ); // Connect the bookmark handler - connect( bookmarkHandler, SIGNAL( openURL( const QString& )), - this, SLOT( setDir( const QString& ) ) ); + connect( bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )), + this, TQT_SLOT( setDir( const TQString& ) ) ); - waitingUrl = QString::null; + waitingUrl = TQString::null; // whatsthis help - QWhatsThis::add( cmbPath, + TQWhatsThis::add( cmbPath, i18n("<p>Here you can enter a path for a folder to display." "<p>To go to a folder previously entered, press the arrow on " "the right and choose one. <p>The entry has folder " "completion. Right-click to choose how completion should behave.") ); - QWhatsThis::add( filter, + TQWhatsThis::add( filter, i18n("<p>Here you can enter a name filter to limit which files are displayed." "<p>To clear the filter, toggle off the filter button to the left." "<p>To reapply the last filter used, toggle on the filter button." ) ); - QWhatsThis::add( btnFilter, + TQWhatsThis::add( btnFilter, i18n("<p>This button clears the name filter when toggled off, or " "reapplies the last filter used when toggled on.") ); @@ -216,7 +216,7 @@ KateFileSelector::~KateFileSelector() //BEGIN Public Methods -void KateFileSelector::readConfig(KConfig *config, const QString & name) +void KateFileSelector::readConfig(KConfig *config, const TQString & name) { dir->setViewConfig( config, name + ":view" ); dir->readConfig(config, name + ":dir"); @@ -231,10 +231,10 @@ void KateFileSelector::readConfig(KConfig *config, const QString & name) cmbPath->setURLs( config->readPathListEntry( "dir history" ) ); // if we restore history if ( config->readBoolEntry( "restore location", true ) || kapp->isRestored() ) { - QString loc( config->readPathEntry( "location" ) ); + TQString loc( config->readPathEntry( "location" ) ); if ( ! loc.isEmpty() ) { // waitingDir = loc; -// QTimer::singleShot(0, this, SLOT(initialDirChangeHack())); +// TQTimer::singleShot(0, this, TQT_SLOT(initialDirChangeHack())); setDir( loc ); } } @@ -244,7 +244,7 @@ void KateFileSelector::readConfig(KConfig *config, const QString & name) filter->setMaxCount( config->readNumEntry( "filter history len", 9 ) ); filter->setHistoryItems( config->readListEntry("filter history"), true ); lastFilter = config->readEntry( "last filter" ); - QString flt(""); + TQString flt(""); if ( config->readBoolEntry( "restore last filter", true ) || kapp->isRestored() ) flt = config->readEntry("current filter"); filter->lineEdit()->setText( flt ); @@ -261,7 +261,7 @@ void KateFileSelector::initialDirChangeHack() void KateFileSelector::setupToolbar( KConfig *config ) { toolbar->clear(); - QStringList tbactions = config->readListEntry( "toolbar actions", ',' ); + TQStringList tbactions = config->readListEntry( "toolbar actions", ',' ); if ( tbactions.isEmpty() ) { // reasonable collection for default toolbar tbactions << "up" << "back" << "forward" << "home" << @@ -269,7 +269,7 @@ void KateFileSelector::setupToolbar( KConfig *config ) "bookmarks" << "sync_dir"; } KAction *ac; - for ( QStringList::Iterator it=tbactions.begin(); it != tbactions.end(); ++it ) { + for ( TQStringList::Iterator it=tbactions.begin(); it != tbactions.end(); ++it ) { if ( *it == "bookmarks" || *it == "sync_dir" ) ac = mActionCollection->action( (*it).latin1() ); else @@ -279,13 +279,13 @@ void KateFileSelector::setupToolbar( KConfig *config ) } } -void KateFileSelector::writeConfig(KConfig *config, const QString & name) +void KateFileSelector::writeConfig(KConfig *config, const TQString & name) { dir->writeConfig(config,name + ":dir"); config->setGroup( name ); config->writeEntry( "pathcombo history len", cmbPath->maxItems() ); - QStringList l; + TQStringList l; for (int i = 0; i < cmbPath->count(); i++) { l.append( cmbPath->text( i ) ); } @@ -309,21 +309,21 @@ void KateFileSelector::setView(KFile::FileView view) //BEGIN Public Slots -void KateFileSelector::slotFilterChange( const QString & nf ) +void KateFileSelector::slotFilterChange( const TQString & nf ) { - QString f = nf.stripWhiteSpace(); + TQString f = nf.stripWhiteSpace(); bool empty = f.isEmpty() || f == "*"; - QToolTip::remove( btnFilter ); + TQToolTip::remove( btnFilter ); if ( empty ) { dir->clearFilter(); - filter->lineEdit()->setText( QString::null ); - QToolTip::add( btnFilter, - QString( i18n("Apply last filter (\"%1\")") ).arg( lastFilter ) ); + filter->lineEdit()->setText( TQString::null ); + TQToolTip::add( btnFilter, + TQString( i18n("Apply last filter (\"%1\")") ).arg( lastFilter ) ); } else { dir->setNameFilter( f ); lastFilter = f; - QToolTip::add( btnFilter, i18n("Clear filter") ); + TQToolTip::add( btnFilter, i18n("Clear filter") ); } btnFilter->setOn( !empty ); dir->updateDir(); @@ -337,7 +337,7 @@ bool kateFileSelectorIsReadable ( const KURL& url ) if ( !url.isLocalFile() ) return true; // what else can we say? - QDir dir (url.path()); + TQDir dir (url.path()); return dir.exists (); } @@ -346,18 +346,18 @@ void KateFileSelector::setDir( KURL u ) KURL newurl; if ( !u.isValid() ) - newurl.setPath( QDir::homeDirPath() ); + newurl.setPath( TQDir::homeDirPath() ); else newurl = u; - QString pathstr = newurl.path(+1); + TQString pathstr = newurl.path(+1); newurl.setPath(pathstr); if ( !kateFileSelectorIsReadable ( newurl ) ) - newurl.cd(QString::fromLatin1("..")); + newurl.cd(TQString::fromLatin1("..")); if ( !kateFileSelectorIsReadable (newurl) ) - newurl.setPath( QDir::homeDirPath() ); + newurl.setPath( TQDir::homeDirPath() ); dir->setURL(newurl, true); } @@ -371,13 +371,13 @@ void KateFileSelector::cmbPathActivated( const KURL& u ) cmbPathReturnPressed( u.url() ); } -void KateFileSelector::cmbPathReturnPressed( const QString& u ) +void KateFileSelector::cmbPathReturnPressed( const TQString& u ) { KURL typedURL( u ); if ( typedURL.hasPass() ) - typedURL.setPass( QString::null ); + typedURL.setPass( TQString::null ); - QStringList urls = cmbPath->urls(); + TQStringList urls = cmbPath->urls(); urls.remove( typedURL.url() ); urls.prepend( typedURL.url() ); cmbPath->setURLs( urls, KURLComboBox::RemoveBottom ); @@ -405,7 +405,7 @@ void KateFileSelector::dirFinishedLoading() void KateFileSelector::btnFilterClick() { if ( !btnFilter->isOn() ) { - slotFilterChange( QString::null ); + slotFilterChange( TQString::null ); } else { filter->lineEdit()->setText( lastFilter ); @@ -432,7 +432,7 @@ void KateFileSelector::kateViewChanged() // if visible, sync if ( isVisible() ) { setActiveDocumentDir(); - waitingUrl = QString::null; + waitingUrl = TQString::null; } // else set waiting url else { @@ -456,37 +456,37 @@ void KateFileSelector::selectorViewChanged( KFileView * newView ) //BEGIN Protected -void KateFileSelector::focusInEvent( QFocusEvent * ) +void KateFileSelector::focusInEvent( TQFocusEvent * ) { dir->setFocus(); } -void KateFileSelector::showEvent( QShowEvent * ) +void KateFileSelector::showEvent( TQShowEvent * ) { // sync if we should if ( autoSyncEvents & GotVisible ) { // kdDebug(13001)<<"syncing fs on show"<<endl; setActiveDocumentDir(); - waitingUrl = QString::null; + waitingUrl = TQString::null; } // else, if we have a waiting URL set it else if ( ! waitingUrl.isEmpty() ) { setDir( waitingUrl ); - waitingUrl = QString::null; + waitingUrl = TQString::null; } } -bool KateFileSelector::eventFilter( QObject* o, QEvent *e ) +bool KateFileSelector::eventFilter( TQObject* o, TQEvent *e ) { /* This is rather unfortunate, but: - QComboBox does not support setting the size of the listbox to something + TQComboBox does not support setting the size of the listbox to something reasonable. Even using listbox->setVariableWidth() does not yield a satisfying result, something is wrong with the handling of the sizehint. And the popup is rather useless, if the paths are only partly visible. */ - QListBox *lb = cmbPath->listBox(); - if ( o == lb && e->type() == QEvent::Show ) { + TQListBox *lb = cmbPath->listBox(); + if ( o == lb && e->type() == TQEvent::Show ) { int add = lb->height() < lb->contentsHeight() ? lb->verticalScrollBar()->width() : 0; int w = QMIN( mainwin->width(), lb->contentsWidth() + add ); lb->resize( w, lb->height() ); @@ -495,7 +495,7 @@ bool KateFileSelector::eventFilter( QObject* o, QEvent *e ) // are changed. } // TODO - same thing for the completion popup? - return QWidget::eventFilter( o, e ); + return TQWidget::eventFilter( o, e ); } //END Protected @@ -505,17 +505,17 @@ bool KateFileSelector::eventFilter( QObject* o, QEvent *e ) QListboxItem that can store and return a string, used for the toolbar action selector. */ -class ActionLBItem : public QListBoxPixmap { +class ActionLBItem : public TQListBoxPixmap { public: - ActionLBItem( QListBox *lb=0, - const QPixmap &pm = QPixmap(), - const QString &text=QString::null, - const QString &str=QString::null ) : - QListBoxPixmap( lb, pm, text ), + ActionLBItem( TQListBox *lb=0, + const TQPixmap &pm = TQPixmap(), + const TQString &text=TQString::null, + const TQString &str=TQString::null ) : + TQListBoxPixmap( lb, pm, text ), _str(str) {}; - QString idstring() { return _str; }; + TQString idstring() { return _str; }; private: - QString _str; + TQString _str; }; //END ActionLBItem @@ -523,82 +523,82 @@ class ActionLBItem : public QListBoxPixmap { //////////////////////////////////////////////////////////////////////////////// // KFSConfigPage implementation //////////////////////////////////////////////////////////////////////////////// -KFSConfigPage::KFSConfigPage( QWidget *parent, const char *name, KateFileSelector *kfs ) +KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, KateFileSelector *kfs ) : Kate::ConfigPage( parent, name ), fileSelector( kfs ), m_changed( false ) { - QVBoxLayout *lo = new QVBoxLayout( this ); + TQVBoxLayout *lo = new TQVBoxLayout( this ); int spacing = KDialog::spacingHint(); lo->setSpacing( spacing ); // Toolbar - a lot for a little... - QGroupBox *gbToolbar = new QGroupBox( 1, Qt::Vertical, i18n("Toolbar"), this ); + TQGroupBox *gbToolbar = new TQGroupBox( 1, Qt::Vertical, i18n("Toolbar"), this ); acSel = new KActionSelector( gbToolbar ); acSel->setAvailableLabel( i18n("A&vailable actions:") ); acSel->setSelectedLabel( i18n("S&elected actions:") ); lo->addWidget( gbToolbar ); - connect( acSel, SIGNAL( added( QListBoxItem * ) ), this, SLOT( slotMyChanged() ) ); - connect( acSel, SIGNAL( removed( QListBoxItem * ) ), this, SLOT( slotMyChanged() ) ); - connect( acSel, SIGNAL( movedUp( QListBoxItem * ) ), this, SLOT( slotMyChanged() ) ); - connect( acSel, SIGNAL( movedDown( QListBoxItem * ) ), this, SLOT( slotMyChanged() ) ); + connect( acSel, TQT_SIGNAL( added( TQListBoxItem * ) ), this, TQT_SLOT( slotMyChanged() ) ); + connect( acSel, TQT_SIGNAL( removed( TQListBoxItem * ) ), this, TQT_SLOT( slotMyChanged() ) ); + connect( acSel, TQT_SIGNAL( movedUp( TQListBoxItem * ) ), this, TQT_SLOT( slotMyChanged() ) ); + connect( acSel, TQT_SIGNAL( movedDown( TQListBoxItem * ) ), this, TQT_SLOT( slotMyChanged() ) ); // Sync - QGroupBox *gbSync = new QGroupBox( 1, Qt::Horizontal, i18n("Auto Synchronization"), this ); - cbSyncActive = new QCheckBox( i18n("When a docu&ment becomes active"), gbSync ); - cbSyncShow = new QCheckBox( i18n("When the file selector becomes visible"), gbSync ); + TQGroupBox *gbSync = new TQGroupBox( 1, Qt::Horizontal, i18n("Auto Synchronization"), this ); + cbSyncActive = new TQCheckBox( i18n("When a docu&ment becomes active"), gbSync ); + cbSyncShow = new TQCheckBox( i18n("When the file selector becomes visible"), gbSync ); lo->addWidget( gbSync ); - connect( cbSyncActive, SIGNAL( toggled( bool ) ), this, SLOT( slotMyChanged() ) ); - connect( cbSyncShow, SIGNAL( toggled( bool ) ), this, SLOT( slotMyChanged() ) ); + connect( cbSyncActive, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotMyChanged() ) ); + connect( cbSyncShow, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotMyChanged() ) ); // Histories - QHBox *hbPathHist = new QHBox ( this ); - QLabel *lbPathHist = new QLabel( i18n("Remember &locations:"), hbPathHist ); - sbPathHistLength = new QSpinBox( hbPathHist ); + TQHBox *hbPathHist = new TQHBox ( this ); + TQLabel *lbPathHist = new TQLabel( i18n("Remember &locations:"), hbPathHist ); + sbPathHistLength = new TQSpinBox( hbPathHist ); lbPathHist->setBuddy( sbPathHistLength ); lo->addWidget( hbPathHist ); - connect( sbPathHistLength, SIGNAL( valueChanged ( int ) ), this, SLOT( slotMyChanged() ) ); + connect( sbPathHistLength, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotMyChanged() ) ); - QHBox *hbFilterHist = new QHBox ( this ); - QLabel *lbFilterHist = new QLabel( i18n("Remember &filters:"), hbFilterHist ); - sbFilterHistLength = new QSpinBox( hbFilterHist ); + TQHBox *hbFilterHist = new TQHBox ( this ); + TQLabel *lbFilterHist = new TQLabel( i18n("Remember &filters:"), hbFilterHist ); + sbFilterHistLength = new TQSpinBox( hbFilterHist ); lbFilterHist->setBuddy( sbFilterHistLength ); lo->addWidget( hbFilterHist ); - connect( sbFilterHistLength, SIGNAL( valueChanged ( int ) ), this, SLOT( slotMyChanged() ) ); + connect( sbFilterHistLength, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotMyChanged() ) ); // Session - QGroupBox *gbSession = new QGroupBox( 1, Qt::Horizontal, i18n("Session"), this ); - cbSesLocation = new QCheckBox( i18n("Restore loca&tion"), gbSession ); - cbSesFilter = new QCheckBox( i18n("Restore last f&ilter"), gbSession ); + TQGroupBox *gbSession = new TQGroupBox( 1, Qt::Horizontal, i18n("Session"), this ); + cbSesLocation = new TQCheckBox( i18n("Restore loca&tion"), gbSession ); + cbSesFilter = new TQCheckBox( i18n("Restore last f&ilter"), gbSession ); lo->addWidget( gbSession ); - connect( cbSesLocation, SIGNAL( toggled( bool ) ), this, SLOT( slotMyChanged() ) ); - connect( cbSesFilter, SIGNAL( toggled( bool ) ), this, SLOT( slotMyChanged() ) ); + connect( cbSesLocation, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotMyChanged() ) ); + connect( cbSesFilter, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotMyChanged() ) ); // make it look nice lo->addStretch( 1 ); // be helpfull /* - QWhatsThis::add( lbAvailableActions, i18n( + TQWhatsThis::add( lbAvailableActions, i18n( "<p>Available actions for the toolbar. To add an action, select it here " "and press the add (<strong>-></strong>) button" ) ); - QWhatsThis::add( lbUsedActions, i18n( + TQWhatsThis::add( lbUsedActions, i18n( "<p>Actions used in the toolbar. To remove an action, select it and " "press the remove (<strong><-</strong>) button." "<p>To change the order of the actions, use the Up and Down buttons to " "move the selected action.") ); */ - QString lhwt( i18n( + TQString lhwt( i18n( "<p>Decides how many locations to keep in the history of the location " "combo box.") ); - QWhatsThis::add( lbPathHist, lhwt ); - QWhatsThis::add( sbPathHistLength, lhwt ); - QString fhwt( i18n( + TQWhatsThis::add( lbPathHist, lhwt ); + TQWhatsThis::add( sbPathHistLength, lhwt ); + TQString fhwt( i18n( "<p>Decides how many filters to keep in the history of the filter " "combo box.") ); - QWhatsThis::add( lbFilterHist, fhwt ); - QWhatsThis::add( sbFilterHistLength, fhwt ); - QString synwt( i18n( + TQWhatsThis::add( lbFilterHist, fhwt ); + TQWhatsThis::add( sbFilterHistLength, fhwt ); + TQString synwt( i18n( "<p>These options allow you to have the File Selector automatically " "change location to the folder of the active document on certain " "events." @@ -606,12 +606,12 @@ KFSConfigPage::KFSConfigPage( QWidget *parent, const char *name, KateFileSelecto "effect until the file selector is visible." "<p>None of these are enabled by default, but you can always sync the " "location by pressing the sync button in the toolbar.") ); - QWhatsThis::add( gbSync, synwt ); - QWhatsThis::add( cbSesLocation, i18n( + TQWhatsThis::add( gbSync, synwt ); + TQWhatsThis::add( cbSesLocation, i18n( "<p>If this option is enabled (default), the location will be restored " "when you start Kate.<p><strong>Note</strong> that if the session is " "handled by the KDE session manager, the location is always restored.") ); - QWhatsThis::add( cbSesFilter, i18n( + TQWhatsThis::add( cbSesFilter, i18n( "<p>If this option is enabled (default), the current filter will be " "restored when you start Kate.<p><strong>Note</strong> that if the " "session is handled by the KDE session manager, the filter is always " @@ -633,8 +633,8 @@ void KFSConfigPage::apply() KConfig *config = kapp->config(); config->setGroup( "fileselector" ); // toolbar - QStringList l; - QListBoxItem *item = acSel->selectedListBox()->firstItem(); + TQStringList l; + TQListBoxItem *item = acSel->selectedListBox()->firstItem(); ActionLBItem *aItem; while ( item ) { @@ -675,23 +675,23 @@ void KFSConfigPage::init() KConfig *config = kapp->config(); config->setGroup( "fileselector" ); // toolbar - QStringList l = config->readListEntry( "toolbar actions", ',' ); + TQStringList l = config->readListEntry( "toolbar actions", ',' ); if ( l.isEmpty() ) // default toolbar l << "up" << "back" << "forward" << "home" << "short view" << "detailed view" << "bookmarks" << "sync_dir"; // actions from diroperator + two of our own - QStringList allActions; + TQStringList allActions; allActions << "up" << "back" << "forward" << "home" << "reload" << "mkdir" << "delete" << "short view" << "detailed view" /*<< "view menu" << "show hidden" << "properties"*/ << "bookmarks" << "sync_dir"; - QRegExp re("&(?=[^&])"); + TQRegExp re("&(?=[^&])"); KAction *ac; - QListBox *lb; - for ( QStringList::Iterator it=allActions.begin(); it != allActions.end(); ++it ) { + TQListBox *lb; + for ( TQStringList::Iterator it=allActions.begin(); it != allActions.end(); ++it ) { lb = l.contains( *it ) ? acSel->selectedListBox() : acSel->availableListBox(); if ( *it == "bookmarks" || *it == "sync_dir" ) ac = fileSelector->actionCollection()->action( (*it).latin1() ); diff --git a/kate/app/katefileselector.h b/kate/app/katefileselector.h index 0bab4c257..442d3101e 100644 --- a/kate/app/katefileselector.h +++ b/kate/app/katefileselector.h @@ -25,11 +25,11 @@ #include "katedocmanager.h" #include <kate/document.h> -#include <qvbox.h> +#include <tqvbox.h> #include <kfile.h> #include <kurl.h> #include <ktoolbar.h> -#include <qframe.h> +#include <tqframe.h> class KateMainWindow; class KateViewManager; @@ -50,7 +50,7 @@ class KateFileSelectorToolBar: public KToolBar { Q_OBJECT public: - KateFileSelectorToolBar(QWidget *parent); + KateFileSelectorToolBar(TQWidget *parent); virtual ~KateFileSelectorToolBar(); virtual void setMovingEnabled( bool b ); @@ -60,13 +60,13 @@ class KateFileSelectorToolBarParent: public QFrame { Q_OBJECT public: - KateFileSelectorToolBarParent(QWidget *parent); + KateFileSelectorToolBarParent(TQWidget *parent); ~KateFileSelectorToolBarParent(); void setToolBar(KateFileSelectorToolBar *tb); private: KateFileSelectorToolBar *m_tb; protected: - virtual void resizeEvent ( QResizeEvent * ); + virtual void resizeEvent ( TQResizeEvent * ); }; class KateFileSelector : public QVBox @@ -80,35 +80,35 @@ class KateFileSelector : public QVBox enum AutoSyncEvent { DocumentChanged=1, GotVisible=2 }; KateFileSelector( KateMainWindow *mainWindow=0, KateViewManager *viewManager=0, - QWidget * parent = 0, const char * name = 0 ); + TQWidget * parent = 0, const char * name = 0 ); ~KateFileSelector(); - void readConfig( KConfig *, const QString & ); - void writeConfig( KConfig *, const QString & ); + void readConfig( KConfig *, const TQString & ); + void writeConfig( KConfig *, const TQString & ); void setupToolbar( KConfig * ); void setView( KFile::FileView ); KDirOperator *dirOperator(){ return dir; } KActionCollection *actionCollection() { return mActionCollection; }; public slots: - void slotFilterChange(const QString&); + void slotFilterChange(const TQString&); void setDir(KURL); - void setDir( const QString& url ) { setDir( KURL( url ) ); }; + void setDir( const TQString& url ) { setDir( KURL( url ) ); }; void kateViewChanged(); void selectorViewChanged( KFileView * ); private slots: void cmbPathActivated( const KURL& u ); - void cmbPathReturnPressed( const QString& u ); + void cmbPathReturnPressed( const TQString& u ); void dirUrlEntered( const KURL& u ); void dirFinishedLoading(); void setActiveDocumentDir(); void btnFilterClick(); protected: - void focusInEvent( QFocusEvent * ); - void showEvent( QShowEvent * ); - bool eventFilter( QObject *, QEvent * ); + void focusInEvent( TQFocusEvent * ); + void showEvent( TQShowEvent * ); + bool eventFilter( TQObject *, TQEvent * ); void initialDirChangeHack(); private: @@ -119,15 +119,15 @@ class KateFileSelector : public QVBox KDirOperator * dir; class KAction *acSyncDir; KHistoryCombo * filter; - class QToolButton *btnFilter; + class TQToolButton *btnFilter; KateMainWindow *mainwin; KateViewManager *viewmanager; - QString lastFilter; + TQString lastFilter; int autoSyncEvents; // enabled autosync events - QString waitingUrl; // maybe display when we gets visible - QString waitingDir; + TQString waitingUrl; // maybe display when we gets visible + TQString waitingDir; }; /* TODO anders @@ -146,7 +146,7 @@ class KateFileSelector : public QVBox class KFSConfigPage : public Kate::ConfigPage { Q_OBJECT public: - KFSConfigPage( QWidget* parent=0, const char *name=0, KateFileSelector *kfs=0); + KFSConfigPage( TQWidget* parent=0, const char *name=0, KateFileSelector *kfs=0); virtual ~KFSConfigPage() {}; virtual void apply(); @@ -160,9 +160,9 @@ class KFSConfigPage : public Kate::ConfigPage { KateFileSelector *fileSelector; KActionSelector *acSel; - class QSpinBox *sbPathHistLength, *sbFilterHistLength; - class QCheckBox *cbSyncActive, *cbSyncShow; - class QCheckBox *cbSesLocation, *cbSesFilter; + class TQSpinBox *sbPathHistLength, *sbFilterHistLength; + class TQCheckBox *cbSyncActive, *cbSyncShow; + class TQCheckBox *cbSesLocation, *cbSesFilter; bool m_changed; }; diff --git a/kate/app/kategrepdialog.cpp b/kate/app/kategrepdialog.cpp index 8816862de..409bfd0a1 100644 --- a/kate/app/kategrepdialog.cpp +++ b/kate/app/kategrepdialog.cpp @@ -21,15 +21,15 @@ #include "kategrepdialog.h" #include "katemainwindow.h" -#include <qobject.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qevent.h> -#include <qlistbox.h> -#include <qregexp.h> -#include <qwhatsthis.h> -#include <qcursor.h> +#include <tqobject.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqevent.h> +#include <tqlistbox.h> +#include <tqregexp.h> +#include <tqwhatsthis.h> +#include <tqcursor.h> #include <kapplication.h> #include <kaccelmanager.h> @@ -65,8 +65,8 @@ const char *strTemplate[] = { }; -GrepTool::GrepTool(QWidget *parent, const char *name) - : QWidget(parent, name/*, false*/), m_fixFocus(true), childproc(0) +GrepTool::GrepTool(TQWidget *parent, const char *name) + : TQWidget(parent, name/*, false*/), m_fixFocus(true), childproc(0) { setCaption(i18n("Find in Files")); config = KGlobal::config(); @@ -85,7 +85,7 @@ GrepTool::GrepTool(QWidget *parent, const char *name) << "*"; } - QGridLayout *layout = new QGridLayout(this, 6, 3, 4, 4); + TQGridLayout *layout = new TQGridLayout(this, 6, 3, 4, 4); layout->setColStretch(0, 10); layout->addColSpacing(1, 10); layout->setColStretch(1, 0); @@ -94,43 +94,43 @@ GrepTool::GrepTool(QWidget *parent, const char *name) layout->setRowStretch(2, 10); layout->setRowStretch(4, 0); - QGridLayout *loInput = new QGridLayout(4, 2, 4); + TQGridLayout *loInput = new TQGridLayout(4, 2, 4); layout->addLayout(loInput, 0, 0); loInput->setColStretch(0, 0); loInput->setColStretch(1, 20); - QLabel *lPattern = new QLabel(i18n("Pattern:"), this); + TQLabel *lPattern = new TQLabel(i18n("Pattern:"), this); lPattern->setFixedSize(lPattern->sizeHint()); loInput->addWidget(lPattern, 0, 0, AlignRight | AlignVCenter); - QBoxLayout *loPattern = new QHBoxLayout( 4 ); + TQBoxLayout *loPattern = new TQHBoxLayout( 4 ); loInput->addLayout( loPattern, 0, 1 ); cmbPattern = new KComboBox(true, this); cmbPattern->setDuplicatesEnabled(false); cmbPattern->insertStringList(lastSearchItems); - cmbPattern->setEditText(QString::null); - cmbPattern->setInsertionPolicy(QComboBox::NoInsertion); + cmbPattern->setEditText(TQString::null); + cmbPattern->setInsertionPolicy(TQComboBox::NoInsertion); lPattern->setBuddy(cmbPattern); cmbPattern->setFocus(); cmbPattern->setMinimumSize(cmbPattern->sizeHint()); loPattern->addWidget( cmbPattern ); - cbCasesensitive = new QCheckBox(i18n("Case sensitive"), this); + cbCasesensitive = new TQCheckBox(i18n("Case sensitive"), this); cbCasesensitive->setMinimumWidth(cbCasesensitive->sizeHint().width()); cbCasesensitive->setChecked(config->readBoolEntry("CaseSensitive", true)); loPattern->addWidget(cbCasesensitive); - cbRegex = new QCheckBox( i18n("Regular expression"), this ); + cbRegex = new TQCheckBox( i18n("Regular expression"), this ); cbRegex->setMinimumWidth( cbRegex->sizeHint().width() ); cbRegex->setChecked( config->readBoolEntry( "Regex", true ) ); loPattern->addWidget( cbRegex ); loPattern->setStretchFactor( cmbPattern, 100 ); - QLabel *lTemplate = new QLabel(i18n("Template:"), this); + TQLabel *lTemplate = new TQLabel(i18n("Template:"), this); lTemplate->setFixedSize(lTemplate->sizeHint()); loInput->addWidget(lTemplate, 1, 0, AlignRight | AlignVCenter); - QBoxLayout *loTemplate = new QHBoxLayout(4); + TQBoxLayout *loTemplate = new TQHBoxLayout(4); loInput->addLayout(loTemplate, 1, 1); leTemplate = new KLineEdit(this); @@ -145,29 +145,29 @@ GrepTool::GrepTool(QWidget *parent, const char *name) cmbTemplate->setFixedSize(cmbTemplate->size()); loTemplate->addWidget(cmbTemplate); - QLabel *lFiles = new QLabel(i18n("Files:"), this); + TQLabel *lFiles = new TQLabel(i18n("Files:"), this); lFiles->setFixedSize(lFiles->sizeHint()); loInput->addWidget(lFiles, 2, 0, AlignRight | AlignVCenter); cmbFiles = new KComboBox(true, this); lFiles->setBuddy(cmbFiles->focusProxy()); cmbFiles->setMinimumSize(cmbFiles->sizeHint()); - cmbFiles->setInsertionPolicy(QComboBox::NoInsertion); + cmbFiles->setInsertionPolicy(TQComboBox::NoInsertion); cmbFiles->setDuplicatesEnabled(false); cmbFiles->insertStringList(lastSearchFiles); loInput->addWidget(cmbFiles, 2, 1); - QLabel *lDir = new QLabel(i18n("Folder:"), this); + TQLabel *lDir = new TQLabel(i18n("Folder:"), this); lDir->setFixedSize(lDir->sizeHint()); loInput->addWidget(lDir, 3, 0, AlignRight | AlignVCenter); - QBoxLayout *loDir = new QHBoxLayout(3); + TQBoxLayout *loDir = new TQHBoxLayout(3); loInput->addLayout(loDir, 3, 1); KComboBox* cmbUrl = new KComboBox(true, this); cmbUrl->setMinimumWidth(80); // make sure that 800x600 res works cmbUrl->setDuplicatesEnabled(false); - cmbUrl->setInsertionPolicy(QComboBox::NoInsertion); + cmbUrl->setInsertionPolicy(TQComboBox::NoInsertion); cmbDir = new KURLRequester( cmbUrl, this, "dir combo" ); cmbDir->completionObject()->setMode(KURLCompletion::DirCompletion); cmbDir->comboBox()->insertStringList(lastSearchPaths); @@ -175,7 +175,7 @@ GrepTool::GrepTool(QWidget *parent, const char *name) loDir->addWidget(cmbDir, 1); lDir->setBuddy(cmbDir); - cbRecursive = new QCheckBox(i18n("Recursive"), this); + cbRecursive = new TQCheckBox(i18n("Recursive"), this); cbRecursive->setMinimumWidth(cbRecursive->sizeHint().width()); cbRecursive->setChecked(config->readBoolEntry("Recursive", true)); loDir->addWidget(cbRecursive); @@ -189,15 +189,15 @@ GrepTool::GrepTool(QWidget *parent, const char *name) actionbox->addStretch(); actionbox->layout(); - lbResult = new QListBox(this); - QFontMetrics rb_fm(lbResult->fontMetrics()); + lbResult = new TQListBox(this); + TQFontMetrics rb_fm(lbResult->fontMetrics()); layout->addMultiCellWidget(lbResult, 2, 2, 0, 2); layout->activate(); KAcceleratorManager::manage( this ); - QWhatsThis::add(lPattern, + TQWhatsThis::add(lPattern, i18n("<p>Enter the expression you want to search for here." "<p>If 'regular expression' is unchecked, any non-space letters in your " "expression will be escaped with a backslash character." @@ -220,26 +220,26 @@ GrepTool::GrepTool(QWidget *parent, const char *name) "via the notation <code>\\#</code>." "<p>See the grep(1) documentation for the full documentation." )); - QWhatsThis::add(lFiles, + TQWhatsThis::add(lFiles, i18n("Enter the file name pattern of the files to search here.\n" "You may give several patterns separated by commas.")); - QWhatsThis::add(lTemplate, + TQWhatsThis::add(lTemplate, i18n("You can choose a template for the pattern from the combo box\n" "and edit it here. The string %s in the template is replaced\n" "by the pattern input field, resulting in the regular expression\n" "to search for.")); - QWhatsThis::add(lDir, + TQWhatsThis::add(lDir, i18n("Enter the folder which contains the files in which you want to search.")); - QWhatsThis::add(cbRecursive, + TQWhatsThis::add(cbRecursive, i18n("Check this box to search in all subfolders.")); - QWhatsThis::add(cbCasesensitive, + TQWhatsThis::add(cbCasesensitive, i18n("If this option is enabled (the default), the search will be case sensitive.")); - QWhatsThis::add( cbRegex, i18n( + TQWhatsThis::add( cbRegex, i18n( "<p>If this is enabled, your pattern will be passed unmodified to " "<em>grep(1)</em>. Otherwise, all characters that are not letters will be " "escaped using a backslash character to prevent grep from interpreting " "them as part of the expression.") ); - QWhatsThis::add(lbResult, + TQWhatsThis::add(lbResult, i18n("The results of the grep run are listed here. Select a\n" "filename/line number combination and press Enter or doubleclick\n" "on the item to show the respective line in the editor.")); @@ -250,16 +250,16 @@ GrepTool::GrepTool(QWidget *parent, const char *name) cmbFiles->installEventFilter( this ); cmbDir->comboBox()->installEventFilter( this ); - connect( cmbTemplate, SIGNAL(activated(int)), - SLOT(templateActivated(int)) ); - connect( lbResult, SIGNAL(selected(const QString&)), - SLOT(itemSelected(const QString&)) ); - connect( btnSearch, SIGNAL(clicked()), - SLOT(slotSearch()) ); - connect( btnClear, SIGNAL(clicked()), - SLOT(slotClear()) ); - connect( cmbPattern->lineEdit(), SIGNAL(textChanged ( const QString & )), - SLOT( patternTextChanged( const QString & ))); + connect( cmbTemplate, TQT_SIGNAL(activated(int)), + TQT_SLOT(templateActivated(int)) ); + connect( lbResult, TQT_SIGNAL(selected(const TQString&)), + TQT_SLOT(itemSelected(const TQString&)) ); + connect( btnSearch, TQT_SIGNAL(clicked()), + TQT_SLOT(slotSearch()) ); + connect( btnClear, TQT_SIGNAL(clicked()), + TQT_SLOT(slotClear()) ); + connect( cmbPattern->lineEdit(), TQT_SIGNAL(textChanged ( const TQString & )), + TQT_SLOT( patternTextChanged( const TQString & ))); patternTextChanged( cmbPattern->lineEdit()->text()); } @@ -270,7 +270,7 @@ GrepTool::~GrepTool() delete childproc; } -void GrepTool::patternTextChanged( const QString & _text) +void GrepTool::patternTextChanged( const TQString & _text) { btnSearch->setEnabled( !_text.isEmpty() ); } @@ -280,19 +280,19 @@ void GrepTool::templateActivated(int index) leTemplate->setText(strTemplate[index]); } -void GrepTool::itemSelected(const QString& item) +void GrepTool::itemSelected(const TQString& item) { int pos; - QString filename, linenumber; + TQString filename, linenumber; - QString str = item; + TQString str = item; if ( (pos = str.find(':')) != -1) { filename = str.left(pos); str = str.mid(pos+1); if ( (pos = str.find(':')) != -1) { - filename = m_workingDir + QDir::separator() + filename; + filename = m_workingDir + TQDir::separator() + filename; linenumber = str.left(pos); emit itemSelected(filename,linenumber.toInt()-1); } @@ -304,7 +304,7 @@ void GrepTool::processOutput() int pos; while ( (pos = buf.find('\n')) != -1) { - QString item = buf.mid(2,pos-2); + TQString item = buf.mid(2,pos-2); if (!item.isEmpty()) lbResult->insertItem(item); buf = buf.mid(pos+1); @@ -320,7 +320,7 @@ void GrepTool::slotSearch() return; } - if ( cmbDir->url().isEmpty() || ! QDir(cmbDir->url()).exists() ) + if ( cmbDir->url().isEmpty() || ! TQDir(cmbDir->url()).exists() ) { cmbDir->setFocus(); KMessageBox::information( this, i18n( @@ -345,10 +345,10 @@ void GrepTool::slotSearch() m_workingDir = cmbDir->url(); - QString s = cmbPattern->currentText(); + TQString s = cmbPattern->currentText(); if ( ! cbRegex->isChecked() ) - s.replace( QRegExp( "([^\\w'()<>])" ), "\\\\1" ); - QString pattern = leTemplate->text(); + s.replace( TQRegExp( "([^\\w'()<>])" ), "\\\\1" ); + TQString pattern = leTemplate->text(); pattern.replace( "%s", s ); childproc = new KProcess(); @@ -358,10 +358,10 @@ void GrepTool::slotSearch() *childproc << "-maxdepth" << "1"; if (!cmbFiles->currentText().isEmpty() ) { - QStringList files = QStringList::split ( ",", cmbFiles->currentText(), FALSE ); + TQStringList files = TQStringList::split ( ",", cmbFiles->currentText(), FALSE ); *childproc << "("; bool first = true; - for ( QStringList::Iterator it = files.begin(); it != files.end(); ++it ) + for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) { if (!first) *childproc << "-o"; @@ -377,21 +377,21 @@ void GrepTool::slotSearch() *childproc << "/dev/null"; //trick to have grep always display the filename *childproc << ";"; - connect( childproc, SIGNAL(processExited(KProcess *)), - SLOT(childExited()) ); - connect( childproc, SIGNAL(receivedStdout(KProcess *, char *, int)), - SLOT(receivedOutput(KProcess *, char *, int)) ); - connect( childproc, SIGNAL(receivedStderr(KProcess *, char *, int)), - SLOT(receivedErrOutput(KProcess *, char *, int)) ); + connect( childproc, TQT_SIGNAL(processExited(KProcess *)), + TQT_SLOT(childExited()) ); + connect( childproc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), + TQT_SLOT(receivedOutput(KProcess *, char *, int)) ); + connect( childproc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), + TQT_SLOT(receivedErrOutput(KProcess *, char *, int)) ); // actually it should be checked whether the process was started successfully - lbResult->setCursor( QCursor(Qt::WaitCursor) ); + lbResult->setCursor( TQCursor(Qt::WaitCursor) ); btnClear->setEnabled( false ); btnSearch->setGuiItem( KGuiItem(i18n("Cancel"), "button_cancel")); childproc->start(KProcess::NotifyOnExit, KProcess::AllOutput); } -void GrepTool::slotSearchFor(const QString &pattern) +void GrepTool::slotSearchFor(const TQString &pattern) { slotClear(); cmbPattern->setEditText(pattern); @@ -409,7 +409,7 @@ void GrepTool::finish() config->setGroup("GrepTool"); - QString cmbText = cmbPattern->currentText(); + TQString cmbText = cmbPattern->currentText(); bool itemsRemoved = lastSearchItems.remove(cmbText) > 0; lastSearchItems.prepend(cmbText); if (itemsRemoved) @@ -485,13 +485,13 @@ void GrepTool::childExited() void GrepTool::receivedOutput(KProcess */*proc*/, char *buffer, int buflen) { - buf += QCString(buffer, buflen+1); + buf += TQCString(buffer, buflen+1); processOutput(); } void GrepTool::receivedErrOutput(KProcess */*proc*/, char *buffer, int buflen) { - errbuf += QCString( buffer, buflen + 1 ); + errbuf += TQCString( buffer, buflen + 1 ); } void GrepTool::slotClear() @@ -500,7 +500,7 @@ void GrepTool::slotClear() lbResult->clear(); } -void GrepTool::updateDirName(const QString &dir) +void GrepTool::updateDirName(const TQString &dir) { if (m_lastUpdatedDir != dir) { @@ -509,35 +509,35 @@ void GrepTool::updateDirName(const QString &dir) } } -void GrepTool::setDirName(const QString &dir){ +void GrepTool::setDirName(const TQString &dir){ cmbDir->setURL(dir); } -bool GrepTool::eventFilter( QObject *o, QEvent *e ) +bool GrepTool::eventFilter( TQObject *o, TQEvent *e ) { - if ( e->type() == QEvent::KeyPress && ( - ((QKeyEvent*)e)->key() == Qt::Key_Return || - ((QKeyEvent*)e)->key() == Qt::Key_Enter ) ) + if ( e->type() == TQEvent::KeyPress && ( + ((TQKeyEvent*)e)->key() == Qt::Key_Return || + ((TQKeyEvent*)e)->key() == Qt::Key_Enter ) ) { slotSearch(); return true; } - return QWidget::eventFilter( o, e ); + return TQWidget::eventFilter( o, e ); } -void GrepTool::focusInEvent ( QFocusEvent * ev ) +void GrepTool::focusInEvent ( TQFocusEvent * ev ) { - QWidget::focusInEvent(ev); + TQWidget::focusInEvent(ev); if (m_fixFocus) { m_fixFocus = false; cmbPattern->setFocus(); } } -void GrepTool::showEvent( QShowEvent * ev ) +void GrepTool::showEvent( TQShowEvent * ev ) { - QWidget::showEvent(ev); + TQWidget::showEvent(ev); m_fixFocus = true; } diff --git a/kate/app/kategrepdialog.h b/kate/app/kategrepdialog.h index 5ed3b2b69..23ba00540 100644 --- a/kate/app/kategrepdialog.h +++ b/kate/app/kategrepdialog.h @@ -22,7 +22,7 @@ #define _GREPDIALOG_H_ #include <kdialog.h> -#include <qstringlist.h> +#include <tqstringlist.h> class QLineEdit; class KComboBox; @@ -40,25 +40,25 @@ class GrepTool : public QWidget Q_OBJECT public: - GrepTool(QWidget *parent, const char *name=0); + GrepTool(TQWidget *parent, const char *name=0); ~GrepTool(); // only updates if the dir you give to it differs from the last one given to it ! - void updateDirName(const QString &); + void updateDirName(const TQString &); - void setDirName(const QString &); + void setDirName(const TQString &); signals: - void itemSelected(const QString &abs_filename, int line); + void itemSelected(const TQString &abs_filename, int line); public slots: - void slotSearchFor(const QString &pattern); + void slotSearchFor(const TQString &pattern); protected: - bool eventFilter( QObject *, QEvent * ); - void focusInEvent ( QFocusEvent * ); - void showEvent( QShowEvent * ); + bool eventFilter( TQObject *, TQEvent * ); + void focusInEvent ( TQFocusEvent * ); + void showEvent( TQShowEvent * ); bool m_fixFocus; private slots: @@ -66,31 +66,31 @@ private slots: void childExited(); void receivedOutput(KProcess *proc, char *buffer, int buflen); void receivedErrOutput(KProcess *proc, char *buffer, int buflen); - void itemSelected(const QString&); + void itemSelected(const TQString&); void slotSearch(); void slotCancel(); void slotClear(); - void patternTextChanged( const QString &); + void patternTextChanged( const TQString &); private: void processOutput(); void finish(); - QLineEdit *leTemplate; + TQLineEdit *leTemplate; KComboBox *cmbFiles, *cmbPattern; KURLRequester *cmbDir; - QCheckBox *cbRecursive; - QCheckBox *cbCasesensitive, *cbRegex; - QListBox *lbResult; + TQCheckBox *cbRecursive; + TQCheckBox *cbCasesensitive, *cbRegex; + TQListBox *lbResult; KPushButton *btnSearch, *btnClear; KProcess *childproc; - QString buf; - QString errbuf; + TQString buf; + TQString errbuf; KConfig* config; - QStringList lastSearchItems; - QStringList lastSearchPaths; - QStringList lastSearchFiles; - QString m_lastUpdatedDir; - QString m_workingDir; + TQStringList lastSearchItems; + TQStringList lastSearchPaths; + TQStringList lastSearchFiles; + TQString m_lastUpdatedDir; + TQString m_workingDir; }; diff --git a/kate/app/katemailfilesdialog.cpp b/kate/app/katemailfilesdialog.cpp index 03bd497df..79a1e19c6 100644 --- a/kate/app/katemailfilesdialog.cpp +++ b/kate/app/katemailfilesdialog.cpp @@ -25,16 +25,16 @@ #include <klocale.h> #include <kurl.h> -#include <qevent.h> -#include <qlabel.h> -#include <qstringlist.h> -#include <qvbox.h> +#include <tqevent.h> +#include <tqlabel.h> +#include <tqstringlist.h> +#include <tqvbox.h> /* a private check list item, that can store a Kate::Document*. */ -class KateDocCheckItem : public QCheckListItem { +class KateDocCheckItem : public TQCheckListItem { public: - KateDocCheckItem( QListView *parent, const QString& text, Kate::Document *d ) - : QCheckListItem( parent, text, QCheckListItem::CheckBox ), mdoc(d) {}; + KateDocCheckItem( TQListView *parent, const TQString& text, Kate::Document *d ) + : TQCheckListItem( parent, text, TQCheckListItem::CheckBox ), mdoc(d) {}; Kate::Document *doc() { return mdoc; }; private: Kate::Document *mdoc; @@ -43,7 +43,7 @@ class KateDocCheckItem : public QCheckListItem { /////////////////////////////////////////////////////////////////////////// // KateMailDialog implementation /////////////////////////////////////////////////////////////////////////// -KateMailDialog::KateMailDialog( QWidget *parent, KateMainWindow *mainwin ) +KateMailDialog::KateMailDialog( TQWidget *parent, KateMainWindow *mainwin ) : KDialogBase( parent, "kate mail dialog", true, i18n("Email Files"), Ok|Cancel|User1, Ok, false, KGuiItem( i18n("&Show All Documents >>") ) ), @@ -53,7 +53,7 @@ KateMailDialog::KateMailDialog( QWidget *parent, KateMainWindow *mainwin ) mw = makeVBoxMainWidget(); mw->installEventFilter( this ); - lInfo = new QLabel( i18n( + lInfo = new TQLabel( i18n( "<p>Press <strong>Mail...</strong> to email the current document." "<p>To select more documents to send, press <strong>Show All Documents >></strong>."), mw ); // TODO avoid untill needed - later @@ -63,7 +63,7 @@ KateMailDialog::KateMailDialog( QWidget *parent, KateMainWindow *mainwin ) Kate::Document *currentDoc = mainWindow->viewManager()->activeView()->getDoc(); uint n = KateDocManager::self()->documents(); uint i = 0; - QCheckListItem *item; + TQCheckListItem *item; while ( i < n ) { Kate::Document *doc = KateDocManager::self()->document( i ); if ( doc ) { @@ -77,14 +77,14 @@ KateMailDialog::KateMailDialog( QWidget *parent, KateMainWindow *mainwin ) i++; } list->hide(); - connect( this, SIGNAL(user1Clicked()), this, SLOT(slotShowButton()) ); + connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotShowButton()) ); mw->setMinimumSize( lInfo->sizeHint() ); } -QPtrList<Kate::Document> KateMailDialog::selectedDocs() +TQPtrList<Kate::Document> KateMailDialog::selectedDocs() { - QPtrList<Kate::Document> l; - QListViewItem *item = list->firstChild(); + TQPtrList<Kate::Document> l; + TQListViewItem *item = list->firstChild(); while ( item ) { if ( ((KateDocCheckItem*)item)->isOn() ) l.append( ((KateDocCheckItem*)item)->doc() ); @@ -105,7 +105,7 @@ void KateMailDialog::slotShowButton() lInfo->setText( i18n("Press <strong>Mail...</strong> to send selected documents") ); } - mw->setMinimumSize( QSize( lInfo->sizeHint().width(), mw->sizeHint().height()) ); + mw->setMinimumSize( TQSize( lInfo->sizeHint().width(), mw->sizeHint().height()) ); setMinimumSize( calculateSize( mw->minimumSize().width(), mw->sizeHint().height() ) ); resize( width(), minimumHeight() ); } diff --git a/kate/app/katemailfilesdialog.h b/kate/app/katemailfilesdialog.h index 906cd99fa..377b9617c 100644 --- a/kate/app/katemailfilesdialog.h +++ b/kate/app/katemailfilesdialog.h @@ -23,7 +23,7 @@ #include <kdialogbase.h> #include <kurl.h> -#include <qptrlist.h> +#include <tqptrlist.h> class QString; class QStringList; @@ -38,21 +38,21 @@ class KateMainWindow; class KateMailDialog : public KDialogBase { Q_OBJECT public: - KateMailDialog( QWidget *parent=0, + KateMailDialog( TQWidget *parent=0, KateMainWindow *mainwin=0 ); ~KateMailDialog() {}; /** @return a list of the selected docs. */ - QPtrList<Kate::Document> selectedDocs(); + TQPtrList<Kate::Document> selectedDocs(); private slots: void slotShowButton(); private: class KListView *list; - class QLabel *lInfo; + class TQLabel *lInfo; KateMainWindow *mainWindow; - class QVBox *mw; + class TQVBox *mw; }; diff --git a/kate/app/katemain.cpp b/kate/app/katemain.cpp index 892f49271..371161de0 100644 --- a/kate/app/katemain.cpp +++ b/kate/app/katemain.cpp @@ -31,7 +31,7 @@ #include <dcopref.h> #include <kdebug.h> -#include <qtextcodec.h> +#include <tqtextcodec.h> #include <stdlib.h> @@ -58,7 +58,7 @@ static KCmdLineOptions options[] = extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) { // here we go, construct the Kate version - QString kateVersion = KateApp::kateVersion(); + TQString kateVersion = KateApp::kateVersion(); KAboutData aboutData ("kate", I18N_NOOP("Kate"), kateVersion.latin1(), I18N_NOOP( "Kate - Advanced Text Editor" ), KAboutData::License_LGPL_V2, @@ -117,7 +117,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) QCStringList allClients = client.registeredApplications(); // search for a kate app client, use the first found - QCString kateApp; + TQCString kateApp; if ( args->isSet("start") ) { @@ -126,8 +126,8 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) if (allClients[i] == "kate" || allClients[i].left(5) == "kate-") { DCOPRef ref( allClients[i], "KateApplication" ); - QString s = ref.call( "session" ); - if ( QString(args->getOption("start")) == s ) + TQString s = ref.call( "session" ); + if ( TQString(args->getOption("start")) == s ) { kateApp = allClients[i]; break; @@ -137,7 +137,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) } else if ( (args->isSet("pid")) || (::getenv("KATE_PID") !=0 ) ) { - QCString tryApp; + TQCString tryApp; if ( args->isSet("pid") ) tryApp = args->getOption("pid"); else @@ -168,9 +168,9 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) DCOPRef kRef (kateApp, "KateApplication"); if (args->isSet ("start")) - kRef.call( "activateSession", QString (args->getOption("start")) ); + kRef.call( "activateSession", TQString (args->getOption("start")) ); - QString enc = args->isSet("encoding") ? args->getOption("encoding") : QCString(""); + TQString enc = args->isSet("encoding") ? args->getOption("encoding") : TQCString(""); bool tempfileSet = KCmdLineArgs::isTempFileSet(); @@ -179,16 +179,16 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) if( args->isSet( "stdin" ) ) { - QTextIStream input(stdin); + TQTextIStream input(stdin); // set chosen codec - QTextCodec *codec = args->isSet("encoding") ? QTextCodec::codecForName(args->getOption("encoding")) : 0; + TQTextCodec *codec = args->isSet("encoding") ? TQTextCodec::codecForName(args->getOption("encoding")) : 0; if (codec) input.setCodec (codec); - QString line; - QString text; + TQString line; + TQString text; do { @@ -222,8 +222,8 @@ extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) // wants to see that document. // ### what to do about the infamous focus stealing prevention? uint mwn = kRef.call("activeMainWindowNumber"); - QCString smwn; - DCOPRef wRef( kateApp, QCString( "__KateMainWindow#") + smwn.setNum(mwn) ); + TQCString smwn; + DCOPRef wRef( kateApp, TQCString( "__KateMainWindow#") + smwn.setNum(mwn) ); if ( wRef.call("minimized") ) { if ( wRef.call( "maximized" ) ) diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp index 772f63339..dea2b0fae 100644 --- a/kate/app/katemainwindow.cpp +++ b/kate/app/katemainwindow.cpp @@ -77,8 +77,8 @@ #include <ktip.h> #include <kmenubar.h> #include <kstringhandler.h> -#include <qlayout.h> -#include <qptrvector.h> +#include <tqlayout.h> +#include <tqptrvector.h> #include <assert.h> #include <unistd.h> @@ -86,8 +86,8 @@ uint KateMainWindow::uniqueID = 1; -KateMainWindow::KateMainWindow (KConfig *sconfig, const QString &sgroup) - : KateMDI::MainWindow (0,(QString("__KateMainWindow#%1").arg(uniqueID)).latin1()) +KateMainWindow::KateMainWindow (KConfig *sconfig, const TQString &sgroup) + : KateMDI::MainWindow (0,(TQString("__KateMainWindow#%1").arg(uniqueID)).latin1()) { // first the very important id myID = uniqueID; @@ -101,17 +101,17 @@ KateMainWindow::KateMainWindow (KConfig *sconfig, const QString &sgroup) // here we go, set some usable default sizes if (!initialGeometrySet()) { - int scnum = QApplication::desktop()->screenNumber(parentWidget()); - QRect desk = QApplication::desktop()->screenGeometry(scnum); + int scnum = TQApplication::desktop()->screenNumber(parentWidget()); + TQRect desk = TQApplication::desktop()->screenGeometry(scnum); - QSize size; + TQSize size; // try to load size if (sconfig) { sconfig->setGroup (sgroup); - size.setWidth (sconfig->readNumEntry( QString::fromLatin1("Width %1").arg(desk.width()), 0 )); - size.setHeight (sconfig->readNumEntry( QString::fromLatin1("Height %1").arg(desk.height()), 0 )); + size.setWidth (sconfig->readNumEntry( TQString::fromLatin1("Width %1").arg(desk.width()), 0 )); + size.setHeight (sconfig->readNumEntry( TQString::fromLatin1("Height %1").arg(desk.height()), 0 )); } // if thats fails, try to reuse size @@ -131,11 +131,11 @@ KateMainWindow::KateMainWindow (KConfig *sconfig, const QString &sgroup) { // first try global app config KateApp::self()->config()->setGroup ("MainWindow"); - size.setWidth (KateApp::self()->config()->readNumEntry( QString::fromLatin1("Width %1").arg(desk.width()), 0 )); - size.setHeight (KateApp::self()->config()->readNumEntry( QString::fromLatin1("Height %1").arg(desk.height()), 0 )); + size.setWidth (KateApp::self()->config()->readNumEntry( TQString::fromLatin1("Width %1").arg(desk.width()), 0 )); + size.setHeight (KateApp::self()->config()->readNumEntry( TQString::fromLatin1("Height %1").arg(desk.height()), 0 )); if (size.isEmpty()) - size = QSize (kMin (700, desk.width()), kMin(480, desk.height())); + size = TQSize (kMin (700, desk.width()), kMin(480, desk.height())); } resize (size); @@ -166,14 +166,14 @@ KateMainWindow::KateMainWindow (KConfig *sconfig, const QString &sgroup) Kate::Document::registerCommand(KateExternalToolsCommand::self()); // connect documents menu aboutToshow - documentMenu = (QPopupMenu*)factory()->container("documents", this); - connect(documentMenu, SIGNAL(aboutToShow()), this, SLOT(documentMenuAboutToShow())); + documentMenu = (TQPopupMenu*)factory()->container("documents", this); + connect(documentMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(documentMenuAboutToShow())); // caption update for (uint i = 0; i < KateDocManager::self()->documents(); i++) slotDocumentCreated (KateDocManager::self()->document(i)); - connect(KateDocManager::self(),SIGNAL(documentCreated(Kate::Document *)),this,SLOT(slotDocumentCreated(Kate::Document *))); + connect(KateDocManager::self(),TQT_SIGNAL(documentCreated(Kate::Document *)),this,TQT_SLOT(slotDocumentCreated(Kate::Document *))); readOptions(); @@ -215,15 +215,15 @@ void KateMainWindow::setupMainWindow () KateMDI::ToolView *t = createToolView("kate_fileselector", KMultiTabBar::Left, SmallIcon("fileopen"), i18n("Filesystem Browser")); fileselector = new KateFileSelector( this, m_viewManager, t, "operator"); - connect(fileselector->dirOperator(),SIGNAL(fileSelected(const KFileItem*)),this,SLOT(fileSelected(const KFileItem*))); + connect(fileselector->dirOperator(),TQT_SIGNAL(fileSelected(const KFileItem*)),this,TQT_SLOT(fileSelected(const KFileItem*))); // ONLY ALLOW SHELL ACCESS IF ALLOWED ;) if (KateApp::self()->authorize("shell_access")) { t = createToolView("kate_greptool", KMultiTabBar::Bottom, SmallIcon("filefind"), i18n("Find in Files") ); greptool = new GrepTool( t, "greptool" ); - connect(greptool, SIGNAL(itemSelected(const QString &,int)), this, SLOT(slotGrepToolItemSelected(const QString &,int))); - connect(t,SIGNAL(visibleChanged(bool)),this, SLOT(updateGrepDir (bool))); + connect(greptool, TQT_SIGNAL(itemSelected(const TQString &,int)), this, TQT_SLOT(slotGrepToolItemSelected(const TQString &,int))); + connect(t,TQT_SIGNAL(visibleChanged(bool)),this, TQT_SLOT(updateGrepDir (bool))); // WARNING HACK - anders: showing the greptool seems to make the menu accels work greptool->show(); @@ -239,25 +239,25 @@ void KateMainWindow::setupActions() { KAction *a; - KStdAction::openNew( m_viewManager, SLOT( slotDocumentNew() ), actionCollection(), "file_new" )->setWhatsThis(i18n("Create a new document")); - KStdAction::open( m_viewManager, SLOT( slotDocumentOpen() ), actionCollection(), "file_open" )->setWhatsThis(i18n("Open an existing document for editing")); + KStdAction::openNew( m_viewManager, TQT_SLOT( slotDocumentNew() ), actionCollection(), "file_new" )->setWhatsThis(i18n("Create a new document")); + KStdAction::open( m_viewManager, TQT_SLOT( slotDocumentOpen() ), actionCollection(), "file_open" )->setWhatsThis(i18n("Open an existing document for editing")); - fileOpenRecent = KStdAction::openRecent (m_viewManager, SLOT(openURL (const KURL&)), actionCollection()); + fileOpenRecent = KStdAction::openRecent (m_viewManager, TQT_SLOT(openURL (const KURL&)), actionCollection()); fileOpenRecent->setWhatsThis(i18n("This lists files which you have opened recently, and allows you to easily open them again.")); - a=new KAction( i18n("Save A&ll"),"save_all", CTRL+Key_L, KateDocManager::self(), SLOT( saveAll() ), actionCollection(), "file_save_all" ); + a=new KAction( i18n("Save A&ll"),"save_all", CTRL+Key_L, KateDocManager::self(), TQT_SLOT( saveAll() ), actionCollection(), "file_save_all" ); a->setWhatsThis(i18n("Save all open, modified documents to disk.")); - KStdAction::close( m_viewManager, SLOT( slotDocumentClose() ), actionCollection(), "file_close" )->setWhatsThis(i18n("Close the current document.")); + KStdAction::close( m_viewManager, TQT_SLOT( slotDocumentClose() ), actionCollection(), "file_close" )->setWhatsThis(i18n("Close the current document.")); - a=new KAction( i18n( "Clos&e All" ), 0, this, SLOT( slotDocumentCloseAll() ), actionCollection(), "file_close_all" ); + a=new KAction( i18n( "Clos&e All" ), 0, this, TQT_SLOT( slotDocumentCloseAll() ), actionCollection(), "file_close_all" ); a->setWhatsThis(i18n("Close all open documents.")); - KStdAction::mail( this, SLOT(slotMail()), actionCollection() )->setWhatsThis(i18n("Send one or more of the open documents as email attachments.")); + KStdAction::mail( this, TQT_SLOT(slotMail()), actionCollection() )->setWhatsThis(i18n("Send one or more of the open documents as email attachments.")); - KStdAction::quit( this, SLOT( slotFileQuit() ), actionCollection(), "file_quit" )->setWhatsThis(i18n("Close this window")); + KStdAction::quit( this, TQT_SLOT( slotFileQuit() ), actionCollection(), "file_quit" )->setWhatsThis(i18n("Close this window")); - a=new KAction(i18n("&New Window"), "window_new", 0, this, SLOT(newWindow()), actionCollection(), "view_new_view"); + a=new KAction(i18n("&New Window"), "window_new", 0, this, TQT_SLOT(newWindow()), actionCollection(), "view_new_view"); a->setWhatsThis(i18n("Create a new Kate view (a new window with the same document list).")); if ( KateApp::self()->authorize("shell_access") ) @@ -267,46 +267,46 @@ void KateMainWindow::setupActions() } KToggleAction* showFullScreenAction = KStdAction::fullScreen( 0, 0, actionCollection(),this); - connect( showFullScreenAction,SIGNAL(toggled(bool)), this,SLOT(slotFullScreen(bool))); + connect( showFullScreenAction,TQT_SIGNAL(toggled(bool)), this,TQT_SLOT(slotFullScreen(bool))); documentOpenWith = new KActionMenu(i18n("Open W&ith"), actionCollection(), "file_open_with"); documentOpenWith->setWhatsThis(i18n("Open the current document using another application registered for its file type, or an application of your choice.")); - connect(documentOpenWith->popupMenu(), SIGNAL(aboutToShow()), this, SLOT(mSlotFixOpenWithMenu())); - connect(documentOpenWith->popupMenu(), SIGNAL(activated(int)), this, SLOT(slotOpenWithMenuAction(int))); + connect(documentOpenWith->popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(mSlotFixOpenWithMenu())); + connect(documentOpenWith->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotOpenWithMenuAction(int))); - a=KStdAction::keyBindings(this, SLOT(editKeys()), actionCollection()); + a=KStdAction::keyBindings(this, TQT_SLOT(editKeys()), actionCollection()); a->setWhatsThis(i18n("Configure the application's keyboard shortcut assignments.")); - a=KStdAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection()); + a=KStdAction::configureToolbars(this, TQT_SLOT(slotEditToolbars()), actionCollection()); a->setWhatsThis(i18n("Configure which items should appear in the toolbar(s).")); - KAction* settingsConfigure = KStdAction::preferences(this, SLOT(slotConfigure()), actionCollection(), "settings_configure"); + KAction* settingsConfigure = KStdAction::preferences(this, TQT_SLOT(slotConfigure()), actionCollection(), "settings_configure"); settingsConfigure->setWhatsThis(i18n("Configure various aspects of this application and the editing component.")); // pipe to terminal action if (KateApp::self()->authorize("shell_access")) - new KAction(i18n("&Pipe to Console"), "pipe", 0, console, SLOT(slotPipeToConsole()), actionCollection(), "tools_pipe_to_terminal"); + new KAction(i18n("&Pipe to Console"), "pipe", 0, console, TQT_SLOT(slotPipeToConsole()), actionCollection(), "tools_pipe_to_terminal"); // tip of the day :-) - KStdAction::tipOfDay( this, SLOT( tipOfTheDay() ), actionCollection() )->setWhatsThis(i18n("This shows useful tips on the use of this application.")); + KStdAction::tipOfDay( this, TQT_SLOT( tipOfTheDay() ), actionCollection() )->setWhatsThis(i18n("This shows useful tips on the use of this application.")); if (KatePluginManager::self()->pluginList().count() > 0) { - a=new KAction(i18n("&Plugins Handbook"), 0, this, SLOT(pluginHelp()), actionCollection(), "help_plugins_contents"); + a=new KAction(i18n("&Plugins Handbook"), 0, this, TQT_SLOT(pluginHelp()), actionCollection(), "help_plugins_contents"); a->setWhatsThis(i18n("This shows help files for various available plugins.")); } - connect(m_viewManager,SIGNAL(viewChanged()),this,SLOT(slotWindowActivated())); - connect(m_viewManager,SIGNAL(viewChanged()),this,SLOT(slotUpdateOpenWith())); + connect(m_viewManager,TQT_SIGNAL(viewChanged()),this,TQT_SLOT(slotWindowActivated())); + connect(m_viewManager,TQT_SIGNAL(viewChanged()),this,TQT_SLOT(slotUpdateOpenWith())); slotWindowActivated (); // session actions - new KAction(i18n("Menu entry Session->New", "&New"), "filenew", 0, KateSessionManager::self(), SLOT(sessionNew()), actionCollection(), "sessions_new"); - new KAction(i18n("&Open..."), "fileopen", 0, KateSessionManager::self(), SLOT(sessionOpen()), actionCollection(), "sessions_open"); - new KAction(i18n("&Save"), "filesave", 0, KateSessionManager::self(), SLOT(sessionSave()), actionCollection(), "sessions_save"); - new KAction(i18n("Save &As..."), "filesaveas", 0, KateSessionManager::self(), SLOT(sessionSaveAs()), actionCollection(), "sessions_save_as"); - new KAction(i18n("&Manage..."), "view_choose", 0, KateSessionManager::self(), SLOT(sessionManage()), actionCollection(), "sessions_manage"); + new KAction(i18n("Menu entry Session->New", "&New"), "filenew", 0, KateSessionManager::self(), TQT_SLOT(sessionNew()), actionCollection(), "sessions_new"); + new KAction(i18n("&Open..."), "fileopen", 0, KateSessionManager::self(), TQT_SLOT(sessionOpen()), actionCollection(), "sessions_open"); + new KAction(i18n("&Save"), "filesave", 0, KateSessionManager::self(), TQT_SLOT(sessionSave()), actionCollection(), "sessions_save"); + new KAction(i18n("Save &As..."), "filesaveas", 0, KateSessionManager::self(), TQT_SLOT(sessionSaveAs()), actionCollection(), "sessions_save_as"); + new KAction(i18n("&Manage..."), "view_choose", 0, KateSessionManager::self(), TQT_SLOT(sessionManage()), actionCollection(), "sessions_manage"); // quick open menu ;) new KateSessionsAction (i18n("&Quick Open"), actionCollection(), "sessions_list"); @@ -328,7 +328,7 @@ bool KateMainWindow::queryClose_internal() { if ( ! showModOnDiskPrompt() ) return false; - QPtrList<Kate::Document> modifiedDocuments=KateDocManager::self()->modifiedDocumentList(); + TQPtrList<Kate::Document> modifiedDocuments=KateDocManager::self()->modifiedDocumentList(); bool shutdown=(modifiedDocuments.count()==0); if (!shutdown) { @@ -386,7 +386,7 @@ void KateMainWindow::slotEditToolbars() { saveMainWindowSettings( KateApp::self()->config(), "MainWindow" ); KEditToolbar dlg( factory() ); - connect( &dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig()) ); + connect( &dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()) ); dlg.exec(); } @@ -449,8 +449,8 @@ void KateMainWindow::slotWindowActivated () { if (console && syncKonsole) { - static QString path; - QString newPath = m_viewManager->activeView()->getDoc()->url().directory(); + static TQString path; + TQString newPath = m_viewManager->activeView()->getDoc()->url().directory(); if ( newPath != path ) { @@ -480,14 +480,14 @@ void KateMainWindow::documentMenuAboutToShow() while (documentMenu->count() > 3) documentMenu->removeItemAt (3); - QListViewItem * item = filelist->firstChild(); + TQListViewItem * item = filelist->firstChild(); while( item ) { // would it be saner to use the screen width as a limit that some random number?? - QString name = KStringHandler::rsqueeze( ((KateFileListItem *)item)->document()->docName(), 150 ); + TQString name = KStringHandler::rsqueeze( ((KateFileListItem *)item)->document()->docName(), 150 ); Kate::Document* doc = ((KateFileListItem *)item)->document(); documentMenu->insertItem ( doc->isModified() ? i18n("'document name [*]', [*] means modified", "%1 [*]").arg(name) : name, - m_viewManager, SLOT (activateView (int)), 0, + m_viewManager, TQT_SLOT (activateView (int)), 0, ((KateFileListItem *)item)->documentNumber () ); item = item->nextSibling(); @@ -496,7 +496,7 @@ void KateMainWindow::documentMenuAboutToShow() documentMenu->setItemChecked ( m_viewManager->activeView()->getDoc()->documentNumber(), true); } -void KateMainWindow::slotGrepToolItemSelected(const QString &filename,int linenumber) +void KateMainWindow::slotGrepToolItemSelected(const TQString &filename,int linenumber) { KURL fileURL; fileURL.setPath( filename ); @@ -507,17 +507,17 @@ void KateMainWindow::slotGrepToolItemSelected(const QString &filename,int linenu setActiveWindow(); } -void KateMainWindow::dragEnterEvent( QDragEnterEvent *event ) +void KateMainWindow::dragEnterEvent( TQDragEnterEvent *event ) { event->accept(KURLDrag::canDecode(event)); } -void KateMainWindow::dropEvent( QDropEvent *event ) +void KateMainWindow::dropEvent( TQDropEvent *event ) { slotDropEvent(event); } -void KateMainWindow::slotDropEvent( QDropEvent * event ) +void KateMainWindow::slotDropEvent( TQDropEvent * event ) { KURL::List textlist; if (!KURLDrag::decode(event, textlist)) return; @@ -532,20 +532,20 @@ void KateMainWindow::editKeys() { KKeyDialog dlg ( false, this ); - QPtrList<KXMLGUIClient> clients = guiFactory()->clients(); + TQPtrList<KXMLGUIClient> clients = guiFactory()->clients(); - for( QPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it ) + for( TQPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it ) dlg.insert ( (*it)->actionCollection(), (*it)->instance()->aboutData()->programName() ); dlg.insert( externalTools->actionCollection(), i18n("External Tools") ); dlg.configure(); - QPtrList<Kate::Document> l=KateDocManager::self()->documentList(); + TQPtrList<Kate::Document> l=KateDocManager::self()->documentList(); for (uint i=0;i<l.count();i++) { // kdDebug(13001)<<"reloading Keysettings for document "<<i<<endl; l.at(i)->reloadXML(); - QPtrList<class KTextEditor::View> l1=l.at(i)->views ();//KTextEditor::Document + TQPtrList<class KTextEditor::View> l1=l.at(i)->views ();//KTextEditor::Document for (uint i1=0;i1<l1.count();i1++) { l1.at(i1)->reloadXML(); // kdDebug(13001)<<"reloading Keysettings for view "<<i<<"/"<<i1<<endl; @@ -555,7 +555,7 @@ void KateMainWindow::editKeys() externalTools->actionCollection()->writeShortcutSettings( "Shortcuts", new KConfig("externaltools", false, false, "appdata") ); } -void KateMainWindow::openURL (const QString &name) +void KateMainWindow::openURL (const TQString &name) { m_viewManager->openURL (KURL(name)); } @@ -615,7 +615,7 @@ void KateMainWindow::slotOpenWithMenuAction(int idx) { KURL::List list; list.append( m_viewManager->activeView()->getDoc()->url() ); - QString appname = documentOpenWith->popupMenu()->text(idx); + TQString appname = documentOpenWith->popupMenu()->text(idx); appname = appname.remove('&'); //Remove a possible accelerator ... otherwise the application might not get found. if ( appname.compare(i18n("Other...")) == 0 ) { @@ -626,7 +626,7 @@ void KateMainWindow::slotOpenWithMenuAction(int idx) return; } - QString qry = QString("((Type == 'Application') and (Name == '%1'))").arg( appname.latin1() ); + TQString qry = TQString("((Type == 'Application') and (Name == '%1'))").arg( appname.latin1() ); KMimeType::Ptr mime = KMimeType::findByURL( m_viewManager->activeView()->getDoc()->url() ); KTrader::OfferList offers = KTrader::self()->query(mime->name(), qry); @@ -640,7 +640,7 @@ void KateMainWindow::slotOpenWithMenuAction(int idx) void KateMainWindow::pluginHelp() { - KateApp::self()->invokeHelp (QString::null, "kate-plugins"); + KateApp::self()->invokeHelp (TQString::null, "kate-plugins"); } void KateMainWindow::slotMail() @@ -651,12 +651,12 @@ void KateMainWindow::slotMail() delete d; return; } - QPtrList<Kate::Document> attDocs = d->selectedDocs(); + TQPtrList<Kate::Document> attDocs = d->selectedDocs(); delete d; // Check that all selected files are saved (or shouldn't be) - QStringList urls; // to atthatch + TQStringList urls; // to atthatch Kate::Document *doc; - QPtrListIterator<Kate::Document> it(attDocs); + TQPtrListIterator<Kate::Document> it(attDocs); for ( ; it.current(); ++it ) { doc = it.current(); if (!doc) continue; @@ -709,18 +709,18 @@ void KateMainWindow::slotMail() } // check selected docs done if ( ! urls.count() ) return; - KateApp::self()->invokeMailer( QString::null, // to - QString::null, // cc - QString::null, // bcc - QString::null, // subject - QString::null, // body - QString::null, // msgfile + KateApp::self()->invokeMailer( TQString::null, // to + TQString::null, // cc + TQString::null, // bcc + TQString::null, // subject + TQString::null, // body + TQString::null, // msgfile urls // urls to atthatch ); } void KateMainWindow::tipOfTheDay() { - KTipDialog::showTip( /*0*/this, QString::null, true ); + KTipDialog::showTip( /*0*/this, TQString::null, true ); } void KateMainWindow::slotFullScreen(bool t) @@ -746,10 +746,10 @@ void KateMainWindow::updateGrepDir (bool visible) } } -bool KateMainWindow::event( QEvent *e ) +bool KateMainWindow::event( TQEvent *e ) { uint type = e->type(); - if ( type == QEvent::WindowActivate && modNotification ) + if ( type == TQEvent::WindowActivate && modNotification ) { showModOnDiskPrompt(); } @@ -786,9 +786,9 @@ bool KateMainWindow::showModOnDiskPrompt() void KateMainWindow::slotDocumentCreated (Kate::Document *doc) { - connect(doc,SIGNAL(modStateChanged(Kate::Document *)),this,SLOT(updateCaption(Kate::Document *))); - connect(doc,SIGNAL(nameChanged(Kate::Document *)),this,SLOT(updateCaption(Kate::Document *))); - connect(doc,SIGNAL(nameChanged(Kate::Document *)),this,SLOT(slotUpdateOpenWith())); + connect(doc,TQT_SIGNAL(modStateChanged(Kate::Document *)),this,TQT_SLOT(updateCaption(Kate::Document *))); + connect(doc,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(updateCaption(Kate::Document *))); + connect(doc,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(slotUpdateOpenWith())); updateCaption (doc); } @@ -804,7 +804,7 @@ void KateMainWindow::updateCaption (Kate::Document *doc) if (!(m_viewManager->activeView()->getDoc() == doc)) return; - QString c; + TQString c; if (m_viewManager->activeView()->getDoc()->url().isEmpty() || (!m_viewManager->getShowFullPath())) { c = m_viewManager->activeView()->getDoc()->docName(); @@ -814,9 +814,9 @@ void KateMainWindow::updateCaption (Kate::Document *doc) c = m_viewManager->activeView()->getDoc()->url().prettyURL(); } - QString sessName = KateApp::self()->sessionManager()->activeSession()->sessionName(); + TQString sessName = KateApp::self()->sessionManager()->activeSession()->sessionName(); if ( !sessName.isEmpty() ) - sessName = QString("%1: ").arg( sessName ); + sessName = TQString("%1: ").arg( sessName ); setCaption( sessName + KStringHandler::lsqueeze(c,64), m_viewManager->activeView()->getDoc()->isModified()); @@ -824,7 +824,7 @@ void KateMainWindow::updateCaption (Kate::Document *doc) void KateMainWindow::saveProperties(KConfig *config) { - QString grp=config->group(); + TQString grp=config->group(); saveSession(config, grp); m_viewManager->saveViewConfiguration (config, grp); @@ -834,7 +834,7 @@ void KateMainWindow::saveProperties(KConfig *config) void KateMainWindow::readProperties(KConfig *config) { - QString grp=config->group(); + TQString grp=config->group(); startRestore(config, grp); finishRestore (); diff --git a/kate/app/katemainwindow.h b/kate/app/katemainwindow.h index d5a67f65b..77db9999c 100644 --- a/kate/app/katemainwindow.h +++ b/kate/app/katemainwindow.h @@ -58,7 +58,7 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa * @param sconfig session config for this window, 0 if none * @param sgroup session config group to use */ - KateMainWindow (KConfig *sconfig, const QString &sgroup); + KateMainWindow (KConfig *sconfig, const TQString &sgroup); /** * Destruct the nice window @@ -124,8 +124,8 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa */ void saveOptions(); - void dragEnterEvent( QDragEnterEvent * ); - void dropEvent( QDropEvent * ); + void dragEnterEvent( TQDragEnterEvent * ); + void dropEvent( TQDropEvent * ); /** * slots used for actions in the menus/toolbars @@ -138,7 +138,7 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa void slotOpenWithMenuAction(int idx); - void slotGrepToolItemSelected ( const QString &filename, int linenumber ); + void slotGrepToolItemSelected ( const TQString &filename, int linenumber ); void slotMail(); void slotFileQuit(); @@ -147,7 +147,7 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa void slotWindowActivated (); void slotUpdateOpenWith(); void documentMenuAboutToShow(); - void slotDropEvent(QDropEvent *); + void slotDropEvent(TQDropEvent *); void editKeys(); void mSlotFixOpenWithMenu(); @@ -163,13 +163,13 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa void slotFullScreen(bool); public: - void openURL (const QString &name=0L); + void openURL (const TQString &name=0L); private slots: void updateGrepDir (bool visible); protected: - bool event( QEvent * ); + bool event( TQEvent * ); private slots: void slotDocumentCloseAll(); @@ -199,7 +199,7 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa KActionMenu* documentOpenWith; - QPopupMenu *documentMenu; + TQPopupMenu *documentMenu; KToggleAction* settingsShowFilelist; KToggleAction* settingsShowFileselector; diff --git a/kate/app/katemainwindowiface.cpp b/kate/app/katemainwindowiface.cpp index 9a748ffc9..c966cb71e 100644 --- a/kate/app/katemainwindowiface.cpp +++ b/kate/app/katemainwindowiface.cpp @@ -22,6 +22,6 @@ #include <kdebug.h> -KateMainWindowDCOPIface::KateMainWindowDCOPIface (KateMainWindow *w) : DCOPObject ((QString("KateMainWindow#%1").arg(w->mainWindowNumber())).latin1()), m_w (w) +KateMainWindowDCOPIface::KateMainWindowDCOPIface (KateMainWindow *w) : DCOPObject ((TQString("KateMainWindow#%1").arg(w->mainWindowNumber())).latin1()), m_w (w) { } diff --git a/kate/app/katemdi.cpp b/kate/app/katemdi.cpp index fbe9be1e1..9d73e762c 100644 --- a/kate/app/katemdi.cpp +++ b/kate/app/katemdi.cpp @@ -34,16 +34,16 @@ #include <kpopupmenu.h> #include <kmessagebox.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qevent.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqevent.h> namespace KateMDI { //BEGIN SPLITTER -Splitter::Splitter(Orientation o, QWidget* parent, const char* name) - : QSplitter(o, parent, name) +Splitter::Splitter(Orientation o, TQWidget* parent, const char* name) + : TQSplitter(o, parent, name) { } @@ -51,14 +51,14 @@ Splitter::~Splitter() { } -bool Splitter::isLastChild(QWidget* w) const +bool Splitter::isLastChild(TQWidget* w) const { return ( idAfter( w ) == 0 ); } -int Splitter::idAfter ( QWidget * w ) const +int Splitter::idAfter ( TQWidget * w ) const { - return QSplitter::idAfter (w); + return TQSplitter::idAfter (w); } //END SPLITTER @@ -66,13 +66,13 @@ int Splitter::idAfter ( QWidget * w ) const //BEGIN TOGGLETOOLVIEWACTION -ToggleToolViewAction::ToggleToolViewAction ( const QString& text, const KShortcut& cut, ToolView *tv, - QObject* parent, const char* name ) +ToggleToolViewAction::ToggleToolViewAction ( const TQString& text, const KShortcut& cut, ToolView *tv, + TQObject* parent, const char* name ) : KToggleAction(text,cut,parent,name) , m_tv(tv) { - connect(this,SIGNAL(toggled(bool)),this,SLOT(slotToggled(bool))); - connect(m_tv,SIGNAL(visibleChanged(bool)),this,SLOT(visibleChanged(bool))); + connect(this,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool))); + connect(m_tv,TQT_SIGNAL(visibleChanged(bool)),this,TQT_SLOT(visibleChanged(bool))); setChecked(m_tv->visible()); } @@ -119,16 +119,16 @@ static const char *guiDescription = "" "</kpartgui>"; GUIClient::GUIClient ( MainWindow *mw ) - : QObject ( mw ) + : TQObject ( mw ) , KXMLGUIClient ( mw ) , m_mw (mw) { - connect( m_mw->guiFactory(), SIGNAL( clientAdded( KXMLGUIClient * ) ), - this, SLOT( clientAdded( KXMLGUIClient * ) ) ); + connect( m_mw->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ), + this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) ); if ( domDocument().documentElement().isNull() ) { - QString completeDescription = QString::fromLatin1( guiDescription ) + TQString completeDescription = TQString::fromLatin1( guiDescription ) .arg( actionListName ); setXML( completeDescription, false /*merge*/ ); @@ -142,8 +142,8 @@ GUIClient::GUIClient ( MainWindow *mw ) CTRL|ALT|SHIFT|Key_F, actionCollection(), "kate_mdi_sidebar_visibility" ); m_showSidebarsAction->setCheckedState(i18n("Hide Side&bars")); m_showSidebarsAction->setChecked( m_mw->sidebarsVisible() ); - connect( m_showSidebarsAction, SIGNAL( toggled( bool ) ), - m_mw, SLOT( setSidebarsVisible( bool ) ) ); + connect( m_showSidebarsAction, TQT_SIGNAL( toggled( bool ) ), + m_mw, TQT_SLOT( setSidebarsVisible( bool ) ) ); m_toolMenu->insert( m_showSidebarsAction ); m_toolMenu->insert( new KActionSeparator( m_toolMenu ) ); @@ -163,12 +163,12 @@ void GUIClient::updateSidebarsVisibleAction() void GUIClient::registerToolView (ToolView *tv) { - QString aname = QString("kate_mdi_toolview_") + tv->id; + TQString aname = TQString("kate_mdi_toolview_") + tv->id; // try to read the action shortcut KShortcut sc; KConfig *cfg = kapp->config(); - QString _grp = cfg->group(); + TQString _grp = cfg->group(); cfg->setGroup("Shortcuts"); sc = KShortcut( cfg->readEntry( aname, "" ) ); cfg->setGroup( _grp ); @@ -214,7 +214,7 @@ void GUIClient::updateActions() unplugActionList( actionListName ); - QPtrList<KAction> addList; + TQPtrList<KAction> addList; addList.append(m_toolMenu); plugActionList( actionListName, addList ); @@ -225,8 +225,8 @@ void GUIClient::updateActions() //BEGIN TOOLVIEW -ToolView::ToolView (MainWindow *mainwin, Sidebar *sidebar, QWidget *parent) - : QVBox (parent) +ToolView::ToolView (MainWindow *mainwin, Sidebar *sidebar, TQWidget *parent) + : TQVBox (parent) , m_mainWin (mainwin) , m_sidebar (sidebar) , m_visible (false) @@ -253,13 +253,13 @@ bool ToolView::visible () const return m_visible; } -void ToolView::childEvent ( QChildEvent *ev ) +void ToolView::childEvent ( TQChildEvent *ev ) { // set the widget to be focus proxy if possible - if (ev->inserted() && ev->child() && ev->child()->qt_cast("QWidget")) - setFocusProxy ((QWidget *)(ev->child()->qt_cast("QWidget"))); + if (ev->inserted() && ev->child() && ev->child()->qt_cast("TQWidget")) + setFocusProxy ((TQWidget *)(ev->child()->qt_cast("TQWidget"))); - QVBox::childEvent (ev); + TQVBox::childEvent (ev); } //END TOOLVIEW @@ -267,7 +267,7 @@ void ToolView::childEvent ( QChildEvent *ev ) //BEGIN SIDEBAR -Sidebar::Sidebar (KMultiTabBar::KMultiTabBarPosition pos, MainWindow *mainwin, QWidget *parent) +Sidebar::Sidebar (KMultiTabBar::KMultiTabBarPosition pos, MainWindow *mainwin, TQWidget *parent) : KMultiTabBar ((pos == KMultiTabBar::Top || pos == KMultiTabBar::Bottom) ? KMultiTabBar::Horizontal : KMultiTabBar::Vertical, parent) , m_mainWin (mainwin) , m_splitter (0) @@ -288,11 +288,11 @@ void Sidebar::setSplitter (Splitter *sp) m_ownSplit = new Splitter ((position() == KMultiTabBar::Top || position() == KMultiTabBar::Bottom) ? Qt::Horizontal : Qt::Vertical, m_splitter); m_ownSplit->setOpaqueResize( KGlobalSettings::opaqueResize() ); m_ownSplit->setChildrenCollapsible( false ); - m_splitter->setResizeMode( m_ownSplit, QSplitter::KeepSize ); + m_splitter->setResizeMode( m_ownSplit, TQSplitter::KeepSize ); m_ownSplit->hide (); } -ToolView *Sidebar::addWidget (const QPixmap &icon, const QString &text, ToolView *widget) +ToolView *Sidebar::addWidget (const TQPixmap &icon, const TQString &text, ToolView *widget) { static int id = 0; @@ -318,7 +318,7 @@ ToolView *Sidebar::addWidget (const QPixmap &icon, const QString &text, ToolView else { widget->hide (); - widget->reparent (m_ownSplit, 0, QPoint()); + widget->reparent (m_ownSplit, 0, TQPoint()); widget->m_sidebar = this; } @@ -331,7 +331,7 @@ ToolView *Sidebar::addWidget (const QPixmap &icon, const QString &text, ToolView show (); - connect(tab(newId),SIGNAL(clicked(int)),this,SLOT(tabClicked(int))); + connect(tab(newId),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(tabClicked(int))); tab(newId)->installEventFilter(this); return widget; @@ -349,7 +349,7 @@ bool Sidebar::removeWidget (ToolView *widget) m_toolviews.remove (widget); bool anyVis = false; - QIntDictIterator<ToolView> it( m_idToWidget ); + TQIntDictIterator<ToolView> it( m_idToWidget ); for ( ; it.current(); ++it ) { if (!anyVis) @@ -373,7 +373,7 @@ bool Sidebar::showWidget (ToolView *widget) return false; // hide other non-persistent views - QIntDictIterator<ToolView> it( m_idToWidget ); + TQIntDictIterator<ToolView> it( m_idToWidget ); for ( ; it.current(); ++it ) if ((it.current() != widget) && !it.current()->persistent) { @@ -401,7 +401,7 @@ bool Sidebar::hideWidget (ToolView *widget) updateLastSize (); - for ( QIntDictIterator<ToolView> it( m_idToWidget ); it.current(); ++it ) + for ( TQIntDictIterator<ToolView> it( m_idToWidget ); it.current(); ++it ) { if (it.current() == widget) { @@ -443,11 +443,11 @@ void Sidebar::tabClicked(int i) } } -bool Sidebar::eventFilter(QObject *obj, QEvent *ev) +bool Sidebar::eventFilter(TQObject *obj, TQEvent *ev) { - if (ev->type()==QEvent::ContextMenu) + if (ev->type()==TQEvent::ContextMenu) { - QContextMenuEvent *e = (QContextMenuEvent *) ev; + TQContextMenuEvent *e = (TQContextMenuEvent *) ev; KMultiTabBarTab *bt = dynamic_cast<KMultiTabBarTab*>(obj); if (bt) { @@ -479,8 +479,8 @@ bool Sidebar::eventFilter(QObject *obj, QEvent *ev) if (position() != 3) p->insertItem(SmallIconSet("down"), i18n("Bottom Sidebar"),3); - connect(p, SIGNAL(activated(int)), - this, SLOT(buttonPopupActivate(int))); + connect(p, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(buttonPopupActivate(int))); p->exec(e->globalPos()); delete p; @@ -523,7 +523,7 @@ void Sidebar::buttonPopupActivate (int id) void Sidebar::updateLastSize () { - QValueList<int> s = m_splitter->sizes (); + TQValueList<int> s = m_splitter->sizes (); int i = 0; if ((position() == KMultiTabBar::Right || position() == KMultiTabBar::Bottom)) @@ -549,7 +549,7 @@ void Sidebar::restoreSession (KConfig *config) { ToolView *tv = m_toolviews[firstWrong]; - unsigned int pos = config->readUnsignedNumEntry (QString ("Kate-MDI-ToolView-%1-Sidebar-Position").arg(tv->id), firstWrong); + unsigned int pos = config->readUnsignedNumEntry (TQString ("Kate-MDI-ToolView-%1-Sidebar-Position").arg(tv->id), firstWrong); if (pos != firstWrong) break; @@ -559,12 +559,12 @@ void Sidebar::restoreSession (KConfig *config) if (firstWrong < m_toolviews.size()) { // first: collect the items to reshuffle - QValueList<TmpToolViewSorter> toSort; + TQValueList<TmpToolViewSorter> toSort; for (unsigned int i=firstWrong; i < m_toolviews.size(); ++i) { TmpToolViewSorter s; s.tv = m_toolviews[i]; - s.pos = config->readUnsignedNumEntry (QString ("Kate-MDI-ToolView-%1-Sidebar-Position").arg(m_toolviews[i]->id), i); + s.pos = config->readUnsignedNumEntry (TQString ("Kate-MDI-ToolView-%1-Sidebar-Position").arg(m_toolviews[i]->id), i); toSort.push_back (s); } @@ -595,7 +595,7 @@ void Sidebar::restoreSession (KConfig *config) // readd the button int newId = m_widgetToId[tv]; appendTab (tv->icon, newId, tv->text); - connect(tab(newId),SIGNAL(clicked(int)),this,SLOT(tabClicked(int))); + connect(tab(newId),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(tabClicked(int))); tab(newId)->installEventFilter(this); // reshuffle in splitter @@ -607,7 +607,7 @@ void Sidebar::restoreSession (KConfig *config) updateLastSize (); // restore the own splitter sizes - QValueList<int> s = config->readIntListEntry (QString ("Kate-MDI-Sidebar-%1-Splitter").arg(position())); + TQValueList<int> s = config->readIntListEntry (TQString ("Kate-MDI-Sidebar-%1-Splitter").arg(position())); m_ownSplit->setSizes (s); // show only correct toolviews, remember persistent values ;) @@ -616,8 +616,8 @@ void Sidebar::restoreSession (KConfig *config) { ToolView *tv = m_toolviews[i]; - tv->persistent = config->readBoolEntry (QString ("Kate-MDI-ToolView-%1-Persistent").arg(tv->id), false); - tv->setVisible (config->readBoolEntry (QString ("Kate-MDI-ToolView-%1-Visible").arg(tv->id), false)); + tv->persistent = config->readBoolEntry (TQString ("Kate-MDI-ToolView-%1-Persistent").arg(tv->id), false); + tv->setVisible (config->readBoolEntry (TQString ("Kate-MDI-ToolView-%1-Visible").arg(tv->id), false)); if (!anyVis) anyVis = tv->visible(); @@ -639,18 +639,18 @@ void Sidebar::restoreSession (KConfig *config) void Sidebar::saveSession (KConfig *config) { // store the own splitter sizes - QValueList<int> s = m_ownSplit->sizes(); - config->writeEntry (QString ("Kate-MDI-Sidebar-%1-Splitter").arg(position()), s); + TQValueList<int> s = m_ownSplit->sizes(); + config->writeEntry (TQString ("Kate-MDI-Sidebar-%1-Splitter").arg(position()), s); // store the data about all toolviews in this sidebar ;) for ( unsigned int i=0; i < m_toolviews.size(); ++i ) { ToolView *tv = m_toolviews[i]; - config->writeEntry (QString ("Kate-MDI-ToolView-%1-Position").arg(tv->id), tv->sidebar()->position()); - config->writeEntry (QString ("Kate-MDI-ToolView-%1-Sidebar-Position").arg(tv->id), i); - config->writeEntry (QString ("Kate-MDI-ToolView-%1-Visible").arg(tv->id), tv->visible()); - config->writeEntry (QString ("Kate-MDI-ToolView-%1-Persistent").arg(tv->id), tv->persistent); + config->writeEntry (TQString ("Kate-MDI-ToolView-%1-Position").arg(tv->id), tv->sidebar()->position()); + config->writeEntry (TQString ("Kate-MDI-ToolView-%1-Sidebar-Position").arg(tv->id), i); + config->writeEntry (TQString ("Kate-MDI-ToolView-%1-Visible").arg(tv->id), tv->visible()); + config->writeEntry (TQString ("Kate-MDI-ToolView-%1-Persistent").arg(tv->id), tv->persistent); } } @@ -659,14 +659,14 @@ void Sidebar::saveSession (KConfig *config) //BEGIN MAIN WINDOW -MainWindow::MainWindow (QWidget* parentWidget, const char* name) +MainWindow::MainWindow (TQWidget* parentWidget, const char* name) : KParts::MainWindow( parentWidget, name) , m_sidebarsVisible(true) , m_restoreConfig (0) , m_guiClient (new GUIClient (this)) { // init the internal widgets - QHBox *hb = new QHBox (this); + TQHBox *hb = new TQHBox (this); setCentralWidget(hb); m_sidebars[KMultiTabBar::Left] = new Sidebar (KMultiTabBar::Left, this, hb); @@ -676,7 +676,7 @@ MainWindow::MainWindow (QWidget* parentWidget, const char* name) m_sidebars[KMultiTabBar::Left]->setSplitter (m_hSplitter); - QVBox *vb = new QVBox (m_hSplitter); + TQVBox *vb = new TQVBox (m_hSplitter); m_hSplitter->setCollapsible(vb, false); m_sidebars[KMultiTabBar::Top] = new Sidebar (KMultiTabBar::Top, this, vb); @@ -686,7 +686,7 @@ MainWindow::MainWindow (QWidget* parentWidget, const char* name) m_sidebars[KMultiTabBar::Top]->setSplitter (m_vSplitter); - m_centralWidget = new QVBox (m_vSplitter); + m_centralWidget = new TQVBox (m_vSplitter); m_vSplitter->setCollapsible(m_centralWidget, false); m_sidebars[KMultiTabBar::Bottom] = new Sidebar (KMultiTabBar::Bottom, this, vb); @@ -709,12 +709,12 @@ MainWindow::~MainWindow () delete m_sidebars[i]; } -QWidget *MainWindow::centralWidget () const +TQWidget *MainWindow::centralWidget () const { return m_centralWidget; } -ToolView *MainWindow::createToolView (const QString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const QPixmap &icon, const QString &text) +ToolView *MainWindow::createToolView (const TQString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const TQPixmap &icon, const TQString &text) { if (m_idToWidget[identifier]) return 0; @@ -723,7 +723,7 @@ ToolView *MainWindow::createToolView (const QString &identifier, KMultiTabBar::K if (m_restoreConfig && m_restoreConfig->hasGroup (m_restoreGroup)) { m_restoreConfig->setGroup (m_restoreGroup); - pos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (QString ("Kate-MDI-ToolView-%1-Position").arg(identifier), pos); + pos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (TQString ("Kate-MDI-ToolView-%1-Position").arg(identifier), pos); } ToolView *v = m_sidebars[pos]->addWidget (icon, text, 0); @@ -738,7 +738,7 @@ ToolView *MainWindow::createToolView (const QString &identifier, KMultiTabBar::K return v; } -ToolView *MainWindow::toolView (const QString &identifier) const +ToolView *MainWindow::toolView (const TQString &identifier) const { return m_idToWidget[identifier]; } @@ -782,7 +782,7 @@ void MainWindow::setSidebarsVisible( bool visible ) "invoke <b>Window > Tool Views > Show Sidebars</b> " "in the menu. It is still possible to show/hide " "the tool views with the assigned shortcuts.</qt>"), - QString::null, "Kate hide sidebars notification message" ); + TQString::null, "Kate hide sidebars notification message" ); } } @@ -814,7 +814,7 @@ bool MainWindow::moveToolView (ToolView *widget, KMultiTabBar::KMultiTabBarPosit if (m_restoreConfig && m_restoreConfig->hasGroup (m_restoreGroup)) { m_restoreConfig->setGroup (m_restoreGroup); - pos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (QString ("Kate-MDI-ToolView-%1-Position").arg(widget->id), pos); + pos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (TQString ("Kate-MDI-ToolView-%1-Position").arg(widget->id), pos); } m_sidebars[pos]->addWidget (widget->icon, widget->text, widget); @@ -846,7 +846,7 @@ bool MainWindow::hideToolView (ToolView *widget) return widget->sidebar()->hideWidget (widget); } -void MainWindow::startRestore (KConfig *config, const QString &group) +void MainWindow::startRestore (KConfig *config, const TQString &group) { // first save this stuff m_restoreConfig = config; @@ -855,9 +855,9 @@ void MainWindow::startRestore (KConfig *config, const QString &group) if (!m_restoreConfig || !m_restoreConfig->hasGroup (m_restoreGroup)) { // set sane default sizes - QValueList<int> hs; + TQValueList<int> hs; hs << 200 << 100 << 200; - QValueList<int> vs; + TQValueList<int> vs; vs << 150 << 100 << 200; m_sidebars[0]->setLastSize (hs[0]); @@ -877,8 +877,8 @@ void MainWindow::startRestore (KConfig *config, const QString &group) m_restoreConfig->setGroup (m_restoreGroup); // get main splitter sizes ;) - QValueList<int> hs = m_restoreConfig->readIntListEntry ("Kate-MDI-H-Splitter"); - QValueList<int> vs = m_restoreConfig->readIntListEntry ("Kate-MDI-V-Splitter"); + TQValueList<int> hs = m_restoreConfig->readIntListEntry ("Kate-MDI-H-Splitter"); + TQValueList<int> vs = m_restoreConfig->readIntListEntry ("Kate-MDI-V-Splitter"); m_sidebars[0]->setLastSize (hs[0]); m_sidebars[1]->setLastSize (hs[2]); @@ -909,7 +909,7 @@ void MainWindow::finishRestore () m_restoreConfig->setGroup (m_restoreGroup); for ( unsigned int i=0; i < m_toolviews.size(); ++i ) { - KMultiTabBar::KMultiTabBarPosition newPos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (QString ("Kate-MDI-ToolView-%1-Position").arg(m_toolviews[i]->id), m_toolviews[i]->sidebar()->position()); + KMultiTabBar::KMultiTabBarPosition newPos = (KMultiTabBar::KMultiTabBarPosition) m_restoreConfig->readNumEntry (TQString ("Kate-MDI-ToolView-%1-Position").arg(m_toolviews[i]->id), m_toolviews[i]->sidebar()->position()); if (m_toolviews[i]->sidebar()->position() != newPos) { @@ -928,7 +928,7 @@ void MainWindow::finishRestore () m_restoreGroup = ""; } -void MainWindow::saveSession (KConfig *config, const QString &group) +void MainWindow::saveSession (KConfig *config, const TQString &group) { if (!config) return; @@ -938,8 +938,8 @@ void MainWindow::saveSession (KConfig *config, const QString &group) config->setGroup (group); // save main splitter sizes ;) - QValueList<int> hs = m_hSplitter->sizes(); - QValueList<int> vs = m_vSplitter->sizes(); + TQValueList<int> hs = m_hSplitter->sizes(); + TQValueList<int> vs = m_vSplitter->sizes(); if (hs[0] <= 2 && !m_sidebars[0]->splitterVisible ()) hs[0] = m_sidebars[0]->lastSize(); diff --git a/kate/app/katemdi.h b/kate/app/katemdi.h index 2aa6429bd..1b13c30a8 100644 --- a/kate/app/katemdi.h +++ b/kate/app/katemdi.h @@ -27,34 +27,34 @@ #include <kxmlguiclient.h> #include <kaction.h> -#include <qdict.h> -#include <qintdict.h> -#include <qmap.h> -#include <qsplitter.h> -#include <qpixmap.h> -#include <qptrlist.h> +#include <tqdict.h> +#include <tqintdict.h> +#include <tqmap.h> +#include <tqsplitter.h> +#include <tqpixmap.h> +#include <tqptrlist.h> namespace KateMDI { -/** This class is needed because QSplitter cant return an index for a widget. */ +/** This class is needed because TQSplitter cant return an index for a widget. */ class Splitter : public QSplitter { Q_OBJECT public: - Splitter(Orientation o, QWidget* parent=0, const char* name=0); + Splitter(Orientation o, TQWidget* parent=0, const char* name=0); ~Splitter(); /** Since there is supposed to be only 2 childs of a katesplitter, * any child other than the last is the first. - * This method uses QSplitter::idAfter(widget) which + * This method uses TQSplitter::idAfter(widget) which * returns 0 if there is no widget after this one. * This results in an error if widget is not a child * in this splitter */ - bool isLastChild(QWidget* w) const; + bool isLastChild(TQWidget* w) const; - int idAfter ( QWidget * w ) const; + int idAfter ( TQWidget * w ) const; }; class ToggleToolViewAction : public KToggleAction @@ -62,8 +62,8 @@ class ToggleToolViewAction : public KToggleAction Q_OBJECT public: - ToggleToolViewAction ( const QString& text, const KShortcut& cut, - class ToolView *tv, QObject* parent = 0, const char* name = 0 ); + ToggleToolViewAction ( const TQString& text, const KShortcut& cut, + class ToolView *tv, TQObject* parent = 0, const char* name = 0 ); virtual ~ToggleToolViewAction(); @@ -75,7 +75,7 @@ class ToggleToolViewAction : public KToggleAction ToolView *m_tv; }; -class GUIClient : public QObject, public KXMLGUIClient +class GUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT @@ -94,8 +94,8 @@ class GUIClient : public QObject, public KXMLGUIClient private: MainWindow *m_mw; KToggleAction *m_showSidebarsAction; - QPtrList<KAction> m_toolViewActions; - QMap<ToolView*, KAction*> m_toolToAction; + TQPtrList<KAction> m_toolViewActions; + TQMap<ToolView*, KAction*> m_toolToAction; KActionMenu *m_toolMenu; }; @@ -118,7 +118,7 @@ class ToolView : public QVBox * @param sidebar sidebar of this toolview * @param parent parent widget, e.g. the splitter of one of the sidebars */ - ToolView (class MainWindow *mainwin, class Sidebar *sidebar, QWidget *parent); + ToolView (class MainWindow *mainwin, class Sidebar *sidebar, TQWidget *parent); public: /** @@ -148,7 +148,7 @@ class ToolView : public QVBox bool visible () const; protected: - void childEvent ( QChildEvent *ev ); + void childEvent ( TQChildEvent *ev ); private: MainWindow *m_mainWin; @@ -157,7 +157,7 @@ class ToolView : public QVBox /** * unique id */ - QString id; + TQString id; /** * is visible in sidebar @@ -169,8 +169,8 @@ class ToolView : public QVBox */ bool persistent; - QPixmap icon; - QString text; + TQPixmap icon; + TQString text; }; class Sidebar : public KMultiTabBar @@ -178,13 +178,13 @@ class Sidebar : public KMultiTabBar Q_OBJECT public: - Sidebar (KMultiTabBar::KMultiTabBarPosition pos, class MainWindow *mainwin, QWidget *parent); + Sidebar (KMultiTabBar::KMultiTabBarPosition pos, class MainWindow *mainwin, TQWidget *parent); virtual ~Sidebar (); void setSplitter (Splitter *sp); public: - ToolView *addWidget (const QPixmap &icon, const QString &text, ToolView *widget); + ToolView *addWidget (const TQPixmap &icon, const TQString &text, ToolView *widget); bool removeWidget (ToolView *widget); bool showWidget (ToolView *widget); @@ -219,7 +219,7 @@ class Sidebar : public KMultiTabBar void tabClicked(int); protected: - bool eventFilter(QObject *obj, QEvent *ev); + bool eventFilter(TQObject *obj, TQEvent *ev); private slots: void buttonPopupActivate (int id); @@ -232,13 +232,13 @@ class Sidebar : public KMultiTabBar KMultiTabBar *m_tabBar; Splitter *m_ownSplit; - QIntDict<ToolView> m_idToWidget; - QMap<ToolView*, int> m_widgetToId; + TQIntDict<ToolView> m_idToWidget; + TQMap<ToolView*, int> m_widgetToId; /** * list of all toolviews around in this sidebar */ - QValueList<ToolView*> m_toolviews; + TQValueList<ToolView*> m_toolviews; int m_lastSize; @@ -258,7 +258,7 @@ class MainWindow : public KParts::MainWindow /** * Constructor */ - MainWindow (QWidget* parentWidget = 0, const char* name = 0); + MainWindow (TQWidget* parentWidget = 0, const char* name = 0); /** * Destructor @@ -275,7 +275,7 @@ class MainWindow : public KParts::MainWindow * this widget will get focus if a toolview is hidden * @return central widget */ - QWidget *centralWidget () const; + TQWidget *centralWidget () const; /** * add a given widget to the given sidebar if possible, name is very important @@ -285,14 +285,14 @@ class MainWindow : public KParts::MainWindow * @param text text to use in addition to icon * @return created toolview on success or 0 */ - ToolView *createToolView (const QString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const QPixmap &icon, const QString &text); + ToolView *createToolView (const TQString &identifier, KMultiTabBar::KMultiTabBarPosition pos, const TQPixmap &icon, const TQString &text); /** * give you handle to toolview for the given name, 0 if no toolview around * @param identifier toolview name * @return toolview if existing, else 0 */ - ToolView *toolView (const QString &identifier) const; + ToolView *toolView (const TQString &identifier) const; /** * set the toolview's tabbar style. @@ -364,7 +364,7 @@ class MainWindow : public KParts::MainWindow * @param config config object to use * @param group config group to use */ - void startRestore (KConfig *config, const QString &group); + void startRestore (KConfig *config, const TQString &group); /** * finish the restore @@ -376,7 +376,7 @@ class MainWindow : public KParts::MainWindow * @param config config object to use * @param group config group to use */ - void saveSession (KConfig *config, const QString &group); + void saveSession (KConfig *config, const TQString &group); /** * internal data ;) @@ -385,18 +385,18 @@ class MainWindow : public KParts::MainWindow /** * map identifiers to widgets */ - QDict<ToolView> m_idToWidget; + TQDict<ToolView> m_idToWidget; /** * list of all toolviews around */ - QValueList<ToolView*> m_toolviews; + TQValueList<ToolView*> m_toolviews; /** * widget, which is the central part of the * main window ;) */ - QWidget *m_centralWidget; + TQWidget *m_centralWidget; /** * horizontal splitter @@ -427,7 +427,7 @@ class MainWindow : public KParts::MainWindow /** * restore group */ - QString m_restoreGroup; + TQString m_restoreGroup; /** * out guiclient diff --git a/kate/app/katemwmodonhddialog.cpp b/kate/app/katemwmodonhddialog.cpp index efbee3cb5..5199a6925 100644 --- a/kate/app/katemwmodonhddialog.cpp +++ b/kate/app/katemwmodonhddialog.cpp @@ -33,18 +33,18 @@ #include <ktempfile.h> #include <kpushbutton.h> -#include <qlabel.h> -#include <qlistview.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> -#include <qvbox.h> +#include <tqlabel.h> +#include <tqlistview.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> +#include <tqvbox.h> class KateDocItem : public QCheckListItem { public: - KateDocItem( Kate::Document *doc, const QString &status, KListView *lv ) - : QCheckListItem( lv, doc->url().prettyURL(), CheckBox ), + KateDocItem( Kate::Document *doc, const TQString &status, KListView *lv ) + : TQCheckListItem( lv, doc->url().prettyURL(), CheckBox ), document( doc ) { setText( 1, status ); @@ -57,7 +57,7 @@ class KateDocItem : public QCheckListItem }; -KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, QWidget *parent, const char *name ) +KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, TQWidget *parent, const char *name ) : KDialogBase( parent, name, true, i18n("Documents Modified on Disk"), User1|User2|User3, User3, false, KGuiItem (i18n("&Ignore"), "fileclose"), @@ -74,16 +74,16 @@ KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, QWidget *parent, const "Reloads the selected documents from disk and closes the dialog if there " "are no more unhandled documents.") ); - QVBox *w = makeVBoxMainWidget(); + TQVBox *w = makeVBoxMainWidget(); w->setSpacing( KDialog::spacingHint() ); - QHBox *lo1 = new QHBox( w ); + TQHBox *lo1 = new TQHBox( w ); // dialog text - QLabel *icon = new QLabel( lo1 ); + TQLabel *icon = new TQLabel( lo1 ); icon->setPixmap( DesktopIcon("messagebox_warning") ); - QLabel *t = new QLabel( i18n( + TQLabel *t = new TQLabel( i18n( "<qt>The documents listed below has changed on disk.<p>Select one " "or more at the time and press an action button until the list is empty.</qt>"), lo1 ); lo1->setStretchFactor( t, 1000 ); @@ -92,26 +92,26 @@ KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, QWidget *parent, const lvDocuments = new KListView( w ); lvDocuments->addColumn( i18n("Filename") ); lvDocuments->addColumn( i18n("Status on Disk") ); - lvDocuments->setSelectionMode( QListView::Single ); + lvDocuments->setSelectionMode( TQListView::Single ); - QStringList l; + TQStringList l; l << "" << i18n("Modified") << i18n("Created") << i18n("Deleted"); for ( uint i=0; i < docs.size(); i++ ) new KateDocItem( docs[i], l[ (uint)KateDocManager::self()->documentInfo( docs[i] )->modifiedOnDiscReason ], lvDocuments ); - connect( lvDocuments, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()) ); + connect( lvDocuments, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) ); // diff button - QHBox *lo2 = new QHBox ( w ); - QWidget *d = new QWidget (lo2); + TQHBox *lo2 = new TQHBox ( w ); + TQWidget *d = new TQWidget (lo2); lo2->setStretchFactor (d, 2); btnDiff = new KPushButton( KGuiItem (i18n("&View Difference"), "edit"), lo2 ); - QWhatsThis::add( btnDiff, i18n( + TQWhatsThis::add( btnDiff, i18n( "Calculates the difference between the the editor contents and the disk " "file for the selected document, and shows the difference with the " "default application. Requires diff(1).") ); - connect( btnDiff, SIGNAL(clicked()), this, SLOT(slotDiff()) ); + connect( btnDiff, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDiff()) ); slotSelectionChanged(); m_tmpfile = 0; @@ -139,8 +139,8 @@ void KateMwModOnHdDialog::slotUser3() void KateMwModOnHdDialog::handleSelected( int action ) { // collect all items we can remove - QValueList<QListViewItem *> itemsToDelete; - for ( QListViewItemIterator it ( lvDocuments ); it.current(); ++it ) + TQValueList<TQListViewItem *> itemsToDelete; + for ( TQListViewItemIterator it ( lvDocuments ); it.current(); ++it ) { KateDocItem *item = static_cast<KateDocItem *>(it.current()); @@ -216,8 +216,8 @@ void KateMwModOnHdDialog::slotDiff() KProcIO *p = new KProcIO(); p->setComm( KProcess::All ); *p << "diff" << "-u" << "-" << doc->url().path(); - connect( p, SIGNAL(processExited(KProcess*)), this, SLOT(slotPDone(KProcess*)) ); - connect( p, SIGNAL(readReady(KProcIO*)), this, SLOT(slotPRead(KProcIO*)) ); + connect( p, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotPDone(KProcess*)) ); + connect( p, TQT_SIGNAL(readReady(KProcIO*)), this, TQT_SLOT(slotPRead(KProcIO*)) ); setCursor( WaitCursor ); @@ -236,7 +236,7 @@ void KateMwModOnHdDialog::slotPRead( KProcIO *p) if ( ! m_tmpfile ) m_tmpfile = new KTempFile(); // put all the data we have in it - QString stmp; + TQString stmp; bool dataRead = false; while ( p->readln( stmp, false ) > -1 ) { *m_tmpfile->textStream() << stmp << endl; diff --git a/kate/app/katemwmodonhddialog.h b/kate/app/katemwmodonhddialog.h index 86ecd252a..7a5d8f7ca 100644 --- a/kate/app/katemwmodonhddialog.h +++ b/kate/app/katemwmodonhddialog.h @@ -21,10 +21,10 @@ #define _KATE_MW_MODONHD_DIALOG_H_ #include <kdialogbase.h> -#include <qptrvector.h> +#include <tqptrvector.h> #include <kate/document.h> -typedef QPtrVector<Kate::Document> DocVector; +typedef TQPtrVector<Kate::Document> DocVector; class KProcIO; class KProcess; /** @@ -35,7 +35,7 @@ class KateMwModOnHdDialog : public KDialogBase { Q_OBJECT public: - KateMwModOnHdDialog( DocVector docs, QWidget *parent=0, const char *name=0 ); + KateMwModOnHdDialog( DocVector docs, TQWidget *parent=0, const char *name=0 ); ~KateMwModOnHdDialog(); protected slots: @@ -53,7 +53,7 @@ class KateMwModOnHdDialog : public KDialogBase enum Action { Ignore, Overwrite, Reload }; void handleSelected( int action ); class KListView *lvDocuments; - class QPushButton *btnDiff; + class TQPushButton *btnDiff; class KTempFile *m_tmpfile; }; diff --git a/kate/app/katepluginmanager.cpp b/kate/app/katepluginmanager.cpp index e3390e6a2..044cb73aa 100644 --- a/kate/app/katepluginmanager.cpp +++ b/kate/app/katepluginmanager.cpp @@ -27,12 +27,12 @@ #include "../interfaces/application.h" #include <kconfig.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kmessagebox.h> #include <kdebug.h> -#include <qfile.h> +#include <tqfile.h> -KatePluginManager::KatePluginManager(QObject *parent) : QObject (parent) +KatePluginManager::KatePluginManager(TQObject *parent) : TQObject (parent) { m_pluginManager = new Kate::PluginManager (this); setupPluginList (); @@ -57,13 +57,13 @@ KatePluginManager *KatePluginManager::self() void KatePluginManager::setupPluginList () { - QValueList<KService::Ptr> traderList= KTrader::self()->query("Kate/Plugin", "(not ('Kate/ProjectPlugin' in ServiceTypes)) and (not ('Kate/InitPlugin' in ServiceTypes))"); + TQValueList<KService::Ptr> traderList= KTrader::self()->query("Kate/Plugin", "(not ('Kate/ProjectPlugin' in ServiceTypes)) and (not ('Kate/InitPlugin' in ServiceTypes))"); for(KTrader::OfferList::Iterator it(traderList.begin()); it != traderList.end(); ++it) { KService::Ptr ptr = (*it); - QString pVersion = ptr->property("X-Kate-Version").toString(); + TQString pVersion = ptr->property("X-Kate-Version").toString(); // if ((pVersion >= "2.5") && (pVersion <= KateApp::kateVersion(false))) if (pVersion == "2.5") @@ -94,7 +94,7 @@ void KatePluginManager::writeConfig () for (unsigned int i=0; i < m_pluginList.size(); ++i) { - QString saveName=m_pluginList[i].service->property("X-Kate-PluginName").toString(); + TQString saveName=m_pluginList[i].service->property("X-Kate-PluginName").toString(); if (saveName.isEmpty()) saveName = m_pluginList[i].service->library(); @@ -143,12 +143,12 @@ void KatePluginManager::disableAllPluginsGUI (KateMainWindow *win) void KatePluginManager::loadPlugin (KatePluginInfo *item) { - QString pluginName=item->service->property("X-Kate-PluginName").toString(); + TQString pluginName=item->service->property("X-Kate-PluginName").toString(); if (pluginName.isEmpty()) pluginName=item->service->library(); - item->load = (item->plugin = Kate::createPlugin (QFile::encodeName(item->service->library()), Kate::application(), 0, pluginName)); + item->load = (item->plugin = Kate::createPlugin (TQFile::encodeName(item->service->library()), Kate::application(), 0, pluginName)); } void KatePluginManager::unloadPlugin (KatePluginInfo *item) @@ -197,12 +197,12 @@ void KatePluginManager::disablePluginGUI (KatePluginInfo *item) } } -Kate::Plugin *KatePluginManager::plugin(const QString &name) +Kate::Plugin *KatePluginManager::plugin(const TQString &name) { for (unsigned int i=0; i < m_pluginList.size(); ++i) { KatePluginInfo *info = &m_pluginList[i]; - QString pluginName=info->service->property("X-Kate-PluginName").toString(); + TQString pluginName=info->service->property("X-Kate-PluginName").toString(); if (pluginName.isEmpty()) pluginName=info->service->library(); if (pluginName==name) @@ -216,6 +216,6 @@ Kate::Plugin *KatePluginManager::plugin(const QString &name) return 0; } -bool KatePluginManager::pluginAvailable(const QString &){return false;} -class Kate::Plugin *KatePluginManager::loadPlugin(const QString &,bool ){return 0;} -void KatePluginManager::unloadPlugin(const QString &,bool){;} +bool KatePluginManager::pluginAvailable(const TQString &){return false;} +class Kate::Plugin *KatePluginManager::loadPlugin(const TQString &,bool ){return 0;} +void KatePluginManager::unloadPlugin(const TQString &,bool){;} diff --git a/kate/app/katepluginmanager.h b/kate/app/katepluginmanager.h index 76f9578b2..568b3bbd1 100644 --- a/kate/app/katepluginmanager.h +++ b/kate/app/katepluginmanager.h @@ -28,8 +28,8 @@ #include <ktrader.h> -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> class KatePluginInfo { @@ -39,14 +39,14 @@ class KatePluginInfo Kate::Plugin *plugin; }; -typedef QValueList<KatePluginInfo> KatePluginList; +typedef TQValueList<KatePluginInfo> KatePluginList; class KatePluginManager : public QObject { Q_OBJECT public: - KatePluginManager(QObject *parent); + KatePluginManager(TQObject *parent); ~KatePluginManager(); static KatePluginManager *self(); @@ -73,11 +73,11 @@ class KatePluginManager : public QObject inline KatePluginList & pluginList () { return m_pluginList; }; - Kate::Plugin *plugin (const QString &name); - bool pluginAvailable (const QString &name); + Kate::Plugin *plugin (const TQString &name); + bool pluginAvailable (const TQString &name); - Kate::Plugin *loadPlugin (const QString &name, bool permanent=true); - void unloadPlugin (const QString &name, bool permanent=true); + Kate::Plugin *loadPlugin (const TQString &name, bool permanent=true); + void unloadPlugin (const TQString &name, bool permanent=true); private: Kate::PluginManager *m_pluginManager; diff --git a/kate/app/katesavemodifieddialog.cpp b/kate/app/katesavemodifieddialog.cpp index 51dc1ea61..09257300c 100644 --- a/kate/app/katesavemodifieddialog.cpp +++ b/kate/app/katesavemodifieddialog.cpp @@ -20,30 +20,30 @@ #include "katesavemodifieddialog.moc" #include <klocale.h> -#include <qlistview.h> +#include <tqlistview.h> #include <klistview.h> #include <kguiitem.h> #include <kactivelabel.h> #include <kstdguiitem.h> -#include <qvbox.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqvbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <kiconloader.h> #include <kmessagebox.h> #include <kdebug.h> #include <kencodingfiledialog.h> #include <ktexteditor/encodinginterface.h> -class AbstractKateSaveModifiedDialogCheckListItem:public QCheckListItem { +class AbstractKateSaveModifiedDialogCheckListItem:public TQCheckListItem { public: - AbstractKateSaveModifiedDialogCheckListItem(QListViewItem *parent,const QString& title, const QString& url):QCheckListItem(parent,title,QCheckListItem::CheckBox) { + AbstractKateSaveModifiedDialogCheckListItem(TQListViewItem *parent,const TQString& title, const TQString& url):TQCheckListItem(parent,title,TQCheckListItem::CheckBox) { setText(1,url); setOn(true); setState(InitialState); } virtual ~AbstractKateSaveModifiedDialogCheckListItem() { } - virtual bool synchronousSave(QWidget *dialogParent)=0; + virtual bool synchronousSave(TQWidget *dialogParent)=0; enum STATE{InitialState,SaveOKState,SaveFailedState}; STATE state() const { return m_state;} void setState(enum STATE state) { @@ -51,7 +51,7 @@ public: KIconLoader *loader = KGlobal::instance()->iconLoader(); switch (state) { case InitialState: - setPixmap(0,QPixmap()); + setPixmap(0,TQPixmap()); break; case SaveOKState: setPixmap(0,loader->loadIcon("ok",KIcon::NoGroup,height())); @@ -67,15 +67,15 @@ private: class KateSaveModifiedDocumentCheckListItem:public AbstractKateSaveModifiedDialogCheckListItem { public: - KateSaveModifiedDocumentCheckListItem(QListViewItem *parent,Kate::Document *document):AbstractKateSaveModifiedDialogCheckListItem(parent,document->docName(),document->url().prettyURL()){ + KateSaveModifiedDocumentCheckListItem(TQListViewItem *parent,Kate::Document *document):AbstractKateSaveModifiedDialogCheckListItem(parent,document->docName(),document->url().prettyURL()){ m_document=document; } virtual ~KateSaveModifiedDocumentCheckListItem() { } - virtual bool synchronousSave(QWidget *dialogParent) { + virtual bool synchronousSave(TQWidget *dialogParent) { if (m_document->url().isEmpty() ) { KEncodingFileDialog::Result r=KEncodingFileDialog::getSaveURLAndEncoding( - KTextEditor::encodingInterface(m_document)->encoding(),QString::null,QString::null,dialogParent,i18n("Save As (%1)").arg(m_document->docName())); + KTextEditor::encodingInterface(m_document)->encoding(),TQString::null,TQString::null,dialogParent,i18n("Save As (%1)").arg(m_document->docName())); m_document->setEncoding( r.encoding ); if (!r.URLs.isEmpty()) { @@ -125,7 +125,7 @@ private: Kate::Document *m_document; }; -KateSaveModifiedDialog::KateSaveModifiedDialog(QWidget *parent, QPtrList<Kate::Document> documents): +KateSaveModifiedDialog::KateSaveModifiedDialog(TQWidget *parent, TQPtrList<Kate::Document> documents): KDialogBase( parent, "KateSaveModifiedDialog", true, i18n("Save Documents"), Yes | No | Cancel) { KGuiItem saveItem=KStdGuiItem::save(); @@ -138,18 +138,18 @@ KateSaveModifiedDialog::KateSaveModifiedDialog(QWidget *parent, QPtrList<Kate::D cancelItem.setText(i18n("&Abort Closing")); setButtonGuiItem(KDialogBase::Cancel,cancelItem); - QVBox *box=makeVBoxMainWidget(); + TQVBox *box=makeVBoxMainWidget(); new KActiveLabel(i18n("<qt>The following documents have been modified. Do you want to save them before closing?</qt>"),box); m_list=new KListView(box); m_list->addColumn(i18n("Title")); m_list->addColumn(i18n("Location")); m_list->setRootIsDecorated(true); - m_list->setResizeMode(QListView::LastColumn); + m_list->setResizeMode(TQListView::LastColumn); if (0) { - m_projectRoot=new QListViewItem(m_list,i18n("Projects")); + m_projectRoot=new TQListViewItem(m_list,i18n("Projects")); } else m_projectRoot=0; if (documents.count()>0) { - m_documentRoot=new QListViewItem(m_list,i18n("Documents")); + m_documentRoot=new TQListViewItem(m_list,i18n("Documents")); const uint docCnt=documents.count(); for (uint i=0;i<docCnt;i++) { new KateSaveModifiedDocumentCheckListItem(m_documentRoot,documents.at(i)); @@ -157,11 +157,11 @@ KateSaveModifiedDialog::KateSaveModifiedDialog(QWidget *parent, QPtrList<Kate::D m_documentRoot->setOpen(true); } else m_documentRoot=0; //FIXME - Is this the best way? - connect(m_list, SIGNAL(clicked(QListViewItem *)), SLOT(slotItemSelected())); - connect(m_list, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotItemSelected())); - connect(m_list, SIGNAL(spacePressed(QListViewItem *)), SLOT(slotItemSelected())); + connect(m_list, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(slotItemSelected())); + connect(m_list, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotItemSelected())); + connect(m_list, TQT_SIGNAL(spacePressed(TQListViewItem *)), TQT_SLOT(slotItemSelected())); if(documents.count()>3) { //For 3 or less, it would be quicker just to tick or untick them yourself, so don't clutter the gui. - connect(new QPushButton(i18n("Se&lect All"),box),SIGNAL(clicked()),this,SLOT(slotSelectAll())); + connect(new TQPushButton(i18n("Se&lect All"),box),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotSelectAll())); } } @@ -171,8 +171,8 @@ KateSaveModifiedDialog::~KateSaveModifiedDialog() { void KateSaveModifiedDialog::slotItemSelected() { kdDebug(13001) << "slotItemSelected()" << endl; - for(QListViewItem *it=m_documentRoot->firstChild();it;it=it->nextSibling()) { - if(((QCheckListItem*)it)->isOn()) { + for(TQListViewItem *it=m_documentRoot->firstChild();it;it=it->nextSibling()) { + if(((TQCheckListItem*)it)->isOn()) { enableButton(KDialogBase::Yes, true); return; } @@ -180,10 +180,10 @@ void KateSaveModifiedDialog::slotItemSelected() { enableButton(KDialogBase::Yes, false); } -static void selectItems(QListViewItem *root) { +static void selectItems(TQListViewItem *root) { if (!root) return; - for (QListViewItem *it=root->firstChild();it;it=it->nextSibling()) { - ((QCheckListItem*)it)->setOn(true); + for (TQListViewItem *it=root->firstChild();it;it=it->nextSibling()) { + ((TQCheckListItem*)it)->setOn(true); } } @@ -195,16 +195,16 @@ void KateSaveModifiedDialog::slotSelectAll() { void KateSaveModifiedDialog::slotUser2() { kdDebug(13001)<<"KateSaveModifiedDialog::slotYes()"<<endl; - if (doSave(m_documentRoot)) done(QDialog::Accepted); + if (doSave(m_documentRoot)) done(TQDialog::Accepted); } void KateSaveModifiedDialog::slotUser1() { - done(QDialog::Accepted); + done(TQDialog::Accepted); } -bool KateSaveModifiedDialog::doSave(QListViewItem *root) { +bool KateSaveModifiedDialog::doSave(TQListViewItem *root) { if (root) { - for (QListViewItem *it=root->firstChild();it;it=it->nextSibling()) { + for (TQListViewItem *it=root->firstChild();it;it=it->nextSibling()) { AbstractKateSaveModifiedDialogCheckListItem *cit= (AbstractKateSaveModifiedDialogCheckListItem*)it; if (cit->isOn() && (cit->state()!=AbstractKateSaveModifiedDialogCheckListItem::SaveOKState)) { if (!cit->synchronousSave(this /*perhaps that should be the kate mainwindow*/)) { @@ -220,7 +220,7 @@ bool KateSaveModifiedDialog::doSave(QListViewItem *root) { return true; } -bool KateSaveModifiedDialog::queryClose(QWidget *parent,QPtrList<Kate::Document> documents) { +bool KateSaveModifiedDialog::queryClose(TQWidget *parent,TQPtrList<Kate::Document> documents) { KateSaveModifiedDialog d(parent,documents); - return (d.exec()!=QDialog::Rejected); + return (d.exec()!=TQDialog::Rejected); } diff --git a/kate/app/katesavemodifieddialog.h b/kate/app/katesavemodifieddialog.h index 65817356b..97d39b3f0 100644 --- a/kate/app/katesavemodifieddialog.h +++ b/kate/app/katesavemodifieddialog.h @@ -28,20 +28,20 @@ class KListView; class KateSaveModifiedDialog: public KDialogBase { Q_OBJECT public: - KateSaveModifiedDialog(QWidget *parent, QPtrList<Kate::Document> documents); + KateSaveModifiedDialog(TQWidget *parent, TQPtrList<Kate::Document> documents); virtual ~KateSaveModifiedDialog(); - static bool queryClose(QWidget *parent,QPtrList<Kate::Document> documents); + static bool queryClose(TQWidget *parent,TQPtrList<Kate::Document> documents); protected: virtual void slotUser2(); virtual void slotUser1(); - bool doSave(QListViewItem *root); + bool doSave(TQListViewItem *root); protected slots: void slotSelectAll(); void slotItemSelected(); private: - QListViewItem *m_projectRoot; - QListViewItem *m_documentRoot; + TQListViewItem *m_projectRoot; + TQListViewItem *m_documentRoot; KListView *m_list; }; diff --git a/kate/app/katesession.cpp b/kate/app/katesession.cpp index 0d208c566..fd0e059f9 100644 --- a/kate/app/katesession.cpp +++ b/kate/app/katesession.cpp @@ -36,14 +36,14 @@ #include <kpushbutton.h> #include <kpopupmenu.h> -#include <qdir.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qhbox.h> -#include <qcheckbox.h> -#include <qdatetime.h> -#include <qmap.h> +#include <tqdir.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqhbox.h> +#include <tqcheckbox.h> +#include <tqdatetime.h> +#include <tqmap.h> #include <unistd.h> #include <time.h> @@ -53,7 +53,7 @@ bool operator<( const KateSession::Ptr& a, const KateSession::Ptr& b ) return a->sessionName().lower() < b->sessionName().lower(); } -KateSession::KateSession (KateSessionManager *manager, const QString &fileName, const QString &name) +KateSession::KateSession (KateSessionManager *manager, const TQString &fileName, const TQString &name) : m_sessionFileRel (fileName) , m_sessionName (name) , m_documents (0) @@ -101,7 +101,7 @@ void KateSession::init () if (m_sessionFileRel == "default.katesession") m_sessionName = i18n("Default Session"); else - m_sessionName = i18n("Session (%1)").arg(QTime::currentTime().toString(Qt::LocalDate)); + m_sessionName = i18n("Session (%1)").arg(TQTime::currentTime().toString(Qt::LocalDate)); } // create the file, write name to it! @@ -119,12 +119,12 @@ KateSession::~KateSession () delete m_writeConfig; } -QString KateSession::sessionFile () const +TQString KateSession::sessionFile () const { return m_manager->sessionsDir() + "/" + m_sessionFileRel; } -bool KateSession::create (const QString &name, bool force) +bool KateSession::create (const TQString &name, bool force) { if (!force && (name.isEmpty() || !m_sessionFileRel.isEmpty())) return false; @@ -139,12 +139,12 @@ bool KateSession::create (const QString &name, bool force) // get a usable filename int s = time(0); - QCString tname; + TQCString tname; while (true) { tname.setNum (s++); KMD5 md5 (tname); - m_sessionFileRel = QString ("%1.katesession").arg (md5.hexDigest().data()); + m_sessionFileRel = TQString ("%1.katesession").arg (md5.hexDigest().data()); if (!KGlobal::dirs()->exists(sessionFile ())) break; @@ -162,7 +162,7 @@ bool KateSession::create (const QString &name, bool force) return true; } -bool KateSession::rename (const QString &name) +bool KateSession::rename (const TQString &name) { if (name.isEmpty () || m_sessionFileRel.isEmpty() || m_sessionFileRel == "default.katesession") return false; @@ -203,8 +203,8 @@ KConfig *KateSession::configWrite () return m_writeConfig; } -KateSessionManager::KateSessionManager (QObject *parent) - : QObject (parent) +KateSessionManager::KateSessionManager (TQObject *parent) + : TQObject (parent) , m_sessionsDir (locateLocal( "data", "kate/sessions")) , m_activeSession (new KateSession (this, "", "")) { @@ -223,7 +223,7 @@ KateSessionManager *KateSessionManager::self() return KateApp::self()->sessionManager (); } -void KateSessionManager::dirty (const QString &) +void KateSessionManager::dirty (const TQString &) { updateSessionList (); } @@ -233,7 +233,7 @@ void KateSessionManager::updateSessionList () m_sessionList.clear (); // Let's get a list of all session we have atm - QDir dir (m_sessionsDir, "*.katesession"); + TQDir dir (m_sessionsDir, "*.katesession"); bool foundDefault = false; for (unsigned int i=0; i < dir.count(); ++i) @@ -317,11 +317,11 @@ void KateSessionManager::activateSession (KateSession::Ptr session, bool closeLa { if (i >= KateApp::self()->mainWindows()) { - KateApp::self()->newMainWindow(sc, QString ("MainWindow%1").arg(i)); + KateApp::self()->newMainWindow(sc, TQString ("MainWindow%1").arg(i)); } else { - sc->setGroup(QString ("MainWindow%1").arg(i)); + sc->setGroup(TQString ("MainWindow%1").arg(i)); KateApp::self()->mainWindow(i)->readProperties (sc); } } @@ -342,7 +342,7 @@ void KateSessionManager::activateSession (KateSession::Ptr session, bool closeLa } } -KateSession::Ptr KateSessionManager::createSession (const QString &name) +KateSession::Ptr KateSessionManager::createSession (const TQString &name) { KateSession::Ptr s = new KateSession (this, "", ""); s->create (name); @@ -350,7 +350,7 @@ KateSession::Ptr KateSessionManager::createSession (const QString &name) return s; } -KateSession::Ptr KateSessionManager::giveSession (const QString &name) +KateSession::Ptr KateSessionManager::giveSession (const TQString &name) { if (name.isEmpty()) return new KateSession (this, "", ""); @@ -374,7 +374,7 @@ bool KateSessionManager::saveActiveSession (bool tryAsk, bool rememberAsLast) KConfig *c = KateApp::self()->config(); c->setGroup("General"); - QString sesExit (c->readEntry ("Session Exit", "save")); + TQString sesExit (c->readEntry ("Session Exit", "save")); if (sesExit == "discard") return true; @@ -387,8 +387,8 @@ bool KateSessionManager::saveActiveSession (bool tryAsk, bool rememberAsLast) ); bool dontAgain = false; - int res = KMessageBox::createKMessageBox(dlg, QMessageBox::Question, - i18n("Save current session?"), QStringList(), + int res = KMessageBox::createKMessageBox(dlg, TQMessageBox::Question, + i18n("Save current session?"), TQStringList(), i18n("Do not ask again"), &dontAgain, KMessageBox::Notify); // remember to not ask again with right setting @@ -420,7 +420,7 @@ bool KateSessionManager::saveActiveSession (bool tryAsk, bool rememberAsLast) // save config for all windows around ;) for (unsigned int i=0; i < KateApp::self()->mainWindows (); ++i ) { - sc->setGroup(QString ("MainWindow%1").arg(i)); + sc->setGroup(TQString ("MainWindow%1").arg(i)); KateApp::self()->mainWindow(i)->saveProperties (sc); } @@ -446,8 +446,8 @@ bool KateSessionManager::chooseSession () c->setGroup("General"); // get last used session, default to default session - QString lastSession (c->readEntry ("Last Session", "default.katesession")); - QString sesStart (c->readEntry ("Startup Session", "manual")); + TQString lastSession (c->readEntry ("Last Session", "default.katesession")); + TQString sesStart (c->readEntry ("Startup Session", "manual")); // uhh, just open last used session, show no chooser if (sesStart == "last") @@ -551,7 +551,7 @@ void KateSessionManager::sessionSave () return; bool ok = false; - QString name = KInputDialog::getText (i18n("Specify Name for Current Session"), i18n("Session name:"), "", &ok); + TQString name = KInputDialog::getText (i18n("Specify Name for Current Session"), i18n("Session name:"), "", &ok); if (!ok) return; @@ -569,7 +569,7 @@ void KateSessionManager::sessionSave () void KateSessionManager::sessionSaveAs () { bool ok = false; - QString name = KInputDialog::getText (i18n("Specify New Name for Current Session"), i18n("Session name:"), "", &ok); + TQString name = KInputDialog::getText (i18n("Specify New Name for Current Session"), i18n("Session name:"), "", &ok); if (!ok) return; @@ -600,10 +600,10 @@ class KateSessionChooserItem : public QListViewItem { public: KateSessionChooserItem (KListView *lv, KateSession::Ptr s) - : QListViewItem (lv, s->sessionName()) + : TQListViewItem (lv, s->sessionName()) , session (s) { - QString docs; + TQString docs; docs.setNum (s->documents()); setText (1, docs); } @@ -611,7 +611,7 @@ class KateSessionChooserItem : public QListViewItem KateSession::Ptr session; }; -KateSessionChooser::KateSessionChooser (QWidget *parent, const QString &lastSession) +KateSessionChooser::KateSessionChooser (TQWidget *parent, const TQString &lastSession) : KDialogBase ( parent , "" , true @@ -624,29 +624,29 @@ KateSessionChooser::KateSessionChooser (QWidget *parent, const QString &lastSess , KGuiItem (i18n ("New Session"), "filenew") ) { - QHBox *page = new QHBox (this); + TQHBox *page = new TQHBox (this); page->setMinimumSize (400, 200); setMainWidget(page); - QHBox *hb = new QHBox (page); + TQHBox *hb = new TQHBox (page); hb->setSpacing (KDialog::spacingHint()); - QLabel *label = new QLabel (hb); + TQLabel *label = new TQLabel (hb); label->setPixmap (UserIcon("sessionchooser")); - label->setFrameStyle (QFrame::Panel | QFrame::Sunken); + label->setFrameStyle (TQFrame::Panel | TQFrame::Sunken); - QVBox *vb = new QVBox (hb); + TQVBox *vb = new TQVBox (hb); vb->setSpacing (KDialog::spacingHint()); m_sessions = new KListView (vb); m_sessions->addColumn (i18n("Session Name")); m_sessions->addColumn (i18n("Open Documents")); - m_sessions->setResizeMode (QListView::AllColumns); - m_sessions->setSelectionMode (QListView::Single); + m_sessions->setResizeMode (TQListView::AllColumns); + m_sessions->setSelectionMode (TQListView::Single); m_sessions->setAllColumnsShowFocus (true); - connect (m_sessions, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); - connect (m_sessions, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)), this, SLOT(slotUser2())); + connect (m_sessions, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); + connect (m_sessions, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(slotUser2())); KateSessionList &slist (KateSessionManager::self()->sessionList()); for (unsigned int i=0; i < slist.count(); ++i) @@ -657,7 +657,7 @@ KateSessionChooser::KateSessionChooser (QWidget *parent, const QString &lastSess m_sessions->setSelected (item, true); } - m_useLast = new QCheckBox (i18n ("&Always use this choice"), vb); + m_useLast = new TQCheckBox (i18n ("&Always use this choice"), vb); setResult (resultNone); @@ -708,7 +708,7 @@ void KateSessionChooser::selectionChanged () //BEGIN OPEN DIALOG -KateSessionOpenDialog::KateSessionOpenDialog (QWidget *parent) +KateSessionOpenDialog::KateSessionOpenDialog (TQWidget *parent) : KDialogBase ( parent , "" , true @@ -720,22 +720,22 @@ KateSessionOpenDialog::KateSessionOpenDialog (QWidget *parent) , KGuiItem( i18n("&Open"), "fileopen") ) { - QHBox *page = new QHBox (this); + TQHBox *page = new TQHBox (this); page->setMinimumSize (400, 200); setMainWidget(page); - QHBox *hb = new QHBox (page); + TQHBox *hb = new TQHBox (page); - QVBox *vb = new QVBox (hb); + TQVBox *vb = new TQVBox (hb); m_sessions = new KListView (vb); m_sessions->addColumn (i18n("Session Name")); m_sessions->addColumn (i18n("Open Documents")); - m_sessions->setResizeMode (QListView::AllColumns); - m_sessions->setSelectionMode (QListView::Single); + m_sessions->setResizeMode (TQListView::AllColumns); + m_sessions->setSelectionMode (TQListView::Single); m_sessions->setAllColumnsShowFocus (true); - connect (m_sessions, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)), this, SLOT(slotUser2())); + connect (m_sessions, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(slotUser2())); KateSessionList &slist (KateSessionManager::self()->sessionList()); for (unsigned int i=0; i < slist.count(); ++i) @@ -774,7 +774,7 @@ void KateSessionOpenDialog::slotUser2 () //BEGIN MANAGE DIALOG -KateSessionManageDialog::KateSessionManageDialog (QWidget *parent) +KateSessionManageDialog::KateSessionManageDialog (TQWidget *parent) : KDialogBase ( parent , "" , true @@ -785,34 +785,34 @@ KateSessionManageDialog::KateSessionManageDialog (QWidget *parent) , KStdGuiItem::close () ) { - QHBox *page = new QHBox (this); + TQHBox *page = new TQHBox (this); page->setMinimumSize (400, 200); setMainWidget(page); - QHBox *hb = new QHBox (page); + TQHBox *hb = new TQHBox (page); hb->setSpacing (KDialog::spacingHint()); m_sessions = new KListView (hb); m_sessions->addColumn (i18n("Session Name")); m_sessions->addColumn (i18n("Open Documents")); - m_sessions->setResizeMode (QListView::AllColumns); - m_sessions->setSelectionMode (QListView::Single); + m_sessions->setResizeMode (TQListView::AllColumns); + m_sessions->setSelectionMode (TQListView::Single); m_sessions->setAllColumnsShowFocus (true); - connect (m_sessions, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); + connect (m_sessions, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); updateSessionList (); - QWidget *vb = new QWidget (hb); - QVBoxLayout *vbl = new QVBoxLayout (vb); + TQWidget *vb = new TQWidget (hb); + TQVBoxLayout *vbl = new TQVBoxLayout (vb); vbl->setSpacing (KDialog::spacingHint()); m_rename = new KPushButton (i18n("&Rename..."), vb); - connect (m_rename, SIGNAL(clicked()), this, SLOT(rename())); + connect (m_rename, TQT_SIGNAL(clicked()), this, TQT_SLOT(rename())); vbl->addWidget (m_rename); m_del = new KPushButton (KStdGuiItem::del (), vb); - connect (m_del, SIGNAL(clicked()), this, SLOT(del())); + connect (m_del, TQT_SIGNAL(clicked()), this, TQT_SLOT(del())); vbl->addWidget (m_del); vbl->addStretch (); @@ -847,7 +847,7 @@ void KateSessionManageDialog::rename () return; bool ok = false; - QString name = KInputDialog::getText (i18n("Specify New Name for Session"), i18n("Session name:"), item->session->sessionName(), &ok); + TQString name = KInputDialog::getText (i18n("Specify New Name for Session"), i18n("Session name:"), item->session->sessionName(), &ok); if (!ok) return; @@ -869,7 +869,7 @@ void KateSessionManageDialog::del () if (!item || item->session->sessionFileRelative() == "default.katesession") return; - QFile::remove (item->session->sessionFile()); + TQFile::remove (item->session->sessionFile()); KateSessionManager::self()->updateSessionList (); updateSessionList (); } @@ -888,10 +888,10 @@ void KateSessionManageDialog::updateSessionList () //END MANAGE DIALOG -KateSessionsAction::KateSessionsAction(const QString& text, QObject* parent, const char* name ) +KateSessionsAction::KateSessionsAction(const TQString& text, TQObject* parent, const char* name ) : KActionMenu(text, parent, name) { - connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow())); + connect(popupMenu(),TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(slotAboutToShow())); } void KateSessionsAction::slotAboutToShow() @@ -903,7 +903,7 @@ void KateSessionsAction::slotAboutToShow() { popupMenu()->insertItem ( slist[i]->sessionName(), - this, SLOT (openSession (int)), 0, + this, TQT_SLOT (openSession (int)), 0, i ); } } diff --git a/kate/app/katesession.h b/kate/app/katesession.h index 899daff53..2b0dc39c4 100644 --- a/kate/app/katesession.h +++ b/kate/app/katesession.h @@ -26,8 +26,8 @@ #include <ksharedptr.h> #include <kaction.h> -#include <qobject.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqvaluelist.h> class KateSessionManager; @@ -52,7 +52,7 @@ class KateSession : public KShared * @param name session name * @param manager pointer to the manager */ - KateSession (KateSessionManager *manager, const QString &fileName, const QString &name); + KateSession (KateSessionManager *manager, const TQString &fileName, const TQString &name); /** * init the session object, after construction or create @@ -68,19 +68,19 @@ class KateSession : public KShared * session filename, absolute, calculated out of relative filename + session dir * @return absolute path to session file */ - QString sessionFile () const; + TQString sessionFile () const; /** * relative session filename * @return relative filename for this session */ - const QString &sessionFileRelative () const { return m_sessionFileRel; } + const TQString &sessionFileRelative () const { return m_sessionFileRel; } /** * session name * @return name for this session */ - const QString &sessionName () const { return m_sessionName; } + const TQString &sessionName () const { return m_sessionName; } /** * is this a valid session? if not, don't use any session if this is @@ -94,14 +94,14 @@ class KateSession : public KShared * @param force force to create new file * @return true if created, false if no creation needed */ - bool create (const QString &name, bool force = false); + bool create (const TQString &name, bool force = false); /** * rename this session * @param name new name * @return success */ - bool rename (const QString &name); + bool rename (const TQString &name); /** * config to read @@ -130,12 +130,12 @@ class KateSession : public KShared * session filename, in local location we can write to * relative filename to the session dirs :) */ - QString m_sessionFileRel; + TQString m_sessionFileRel; /** * session name, extracted from the file, to display to the user */ - QString m_sessionName; + TQString m_sessionName; /** * number of document of this session @@ -158,14 +158,14 @@ class KateSession : public KShared KSimpleConfig *m_writeConfig; }; -typedef QValueList<KateSession::Ptr> KateSessionList; +typedef TQValueList<KateSession::Ptr> KateSessionList; class KateSessionManager : public QObject { Q_OBJECT public: - KateSessionManager(QObject *parent); + KateSessionManager(TQObject *parent); ~KateSessionManager(); /** @@ -195,14 +195,14 @@ class KateSessionManager : public QObject * create a new session * @param name session name */ - KateSession::Ptr createSession (const QString &name); + KateSession::Ptr createSession (const TQString &name); /** * return session with given name * if no existing session matches, create new one with this name * @param name session name */ - KateSession::Ptr giveSession (const QString &name); + KateSession::Ptr giveSession (const TQString &name); /** * save current session @@ -224,7 +224,7 @@ class KateSessionManager : public QObject * session dir * @return global session dir */ - inline const QString &sessionsDir () const { return m_sessionsDir; } + inline const TQString &sessionsDir () const { return m_sessionsDir; } /** * initial session chooser, on app start @@ -260,7 +260,7 @@ class KateSessionManager : public QObject void sessionManage (); private slots: - void dirty (const QString &path); + void dirty (const TQString &path); public: /** @@ -272,7 +272,7 @@ class KateSessionManager : public QObject /** * absolute path to dir in home dir where to store the sessions */ - QString m_sessionsDir; + TQString m_sessionsDir; /** * list of current available sessions @@ -290,7 +290,7 @@ class KateSessionChooser : public KDialogBase Q_OBJECT public: - KateSessionChooser (QWidget *parent, const QString &lastSession); + KateSessionChooser (TQWidget *parent, const TQString &lastSession); ~KateSessionChooser (); KateSession::Ptr selectedSession (); @@ -298,7 +298,7 @@ class KateSessionChooser : public KDialogBase bool reopenLastSession (); enum { - resultQuit = QDialog::Rejected, + resultQuit = TQDialog::Rejected, resultOpen, resultNew, resultNone @@ -327,7 +327,7 @@ class KateSessionChooser : public KDialogBase private: KListView *m_sessions; - QCheckBox *m_useLast; + TQCheckBox *m_useLast; }; class KateSessionOpenDialog : public KDialogBase @@ -335,7 +335,7 @@ class KateSessionOpenDialog : public KDialogBase Q_OBJECT public: - KateSessionOpenDialog (QWidget *parent); + KateSessionOpenDialog (TQWidget *parent); ~KateSessionOpenDialog (); KateSession::Ptr selectedSession (); @@ -365,7 +365,7 @@ class KateSessionManageDialog : public KDialogBase Q_OBJECT public: - KateSessionManageDialog (QWidget *parent); + KateSessionManageDialog (TQWidget *parent); ~KateSessionManageDialog (); protected slots: @@ -406,7 +406,7 @@ class KateSessionsAction : public KActionMenu Q_OBJECT public: - KateSessionsAction(const QString& text, QObject* parent = 0, const char* name = 0); + KateSessionsAction(const TQString& text, TQObject* parent = 0, const char* name = 0); ~KateSessionsAction (){;}; public slots: diff --git a/kate/app/katetabwidget.cpp b/kate/app/katetabwidget.cpp index c24357be5..4b278e327 100644 --- a/kate/app/katetabwidget.cpp +++ b/kate/app/katetabwidget.cpp @@ -20,11 +20,11 @@ #include "katetabwidget.h" #include "katetabwidget.moc" -#include <qtabbar.h> +#include <tqtabbar.h> //BEGIN KateTabWidget -KateTabWidget::KateTabWidget(QWidget* parent, const char* name) +KateTabWidget::KateTabWidget(TQWidget* parent, const char* name) : KTabWidget(parent,name) , m_visibility (ShowWhenMoreThanOneTab) { @@ -32,40 +32,40 @@ KateTabWidget::KateTabWidget(QWidget* parent, const char* name) setHoverCloseButton(true); - connect(this, SIGNAL(closeRequest(QWidget*)), this, SLOT(closeTab(QWidget*))); + connect(this, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(closeTab(TQWidget*))); } KateTabWidget::~KateTabWidget() { } -void KateTabWidget::closeTab(QWidget* w) +void KateTabWidget::closeTab(TQWidget* w) { w->close(); } -void KateTabWidget::addTab ( QWidget * child, const QString & label ) +void KateTabWidget::addTab ( TQWidget * child, const TQString & label ) { KTabWidget::addTab(child,label); showPage(child); maybeShow(); } -void KateTabWidget::addTab ( QWidget * child, const QIconSet & iconset, const QString & label ) +void KateTabWidget::addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label ) { KTabWidget::addTab(child,iconset,label); showPage(child); maybeShow(); } -void KateTabWidget::addTab ( QWidget * child, QTab * tab ) +void KateTabWidget::addTab ( TQWidget * child, TQTab * tab ) { KTabWidget::addTab(child,tab); showPage(child); maybeShow(); } -void KateTabWidget::insertTab ( QWidget * child, const QString & label, int index) +void KateTabWidget::insertTab ( TQWidget * child, const TQString & label, int index) { KTabWidget::insertTab(child,label,index); showPage(child); @@ -73,7 +73,7 @@ void KateTabWidget::insertTab ( QWidget * child, const QString & label, int inde tabBar()->repaint(); } -void KateTabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index ) +void KateTabWidget::insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index ) { KTabWidget::insertTab(child,iconset,label,index); showPage(child); @@ -81,7 +81,7 @@ void KateTabWidget::insertTab ( QWidget * child, const QIconSet & iconset, const tabBar()->repaint(); } -void KateTabWidget::insertTab ( QWidget * child, QTab * tab, int index) +void KateTabWidget::insertTab ( TQWidget * child, TQTab * tab, int index) { KTabWidget::insertTab(child,tab,index); showPage(child); @@ -89,7 +89,7 @@ void KateTabWidget::insertTab ( QWidget * child, QTab * tab, int index) tabBar()->repaint(); } -void KateTabWidget::removePage ( QWidget * w ) +void KateTabWidget::removePage ( TQWidget * w ) { KTabWidget::removePage(w); maybeShow(); diff --git a/kate/app/katetabwidget.h b/kate/app/katetabwidget.h index 765f83fdb..7e4327595 100644 --- a/kate/app/katetabwidget.h +++ b/kate/app/katetabwidget.h @@ -34,29 +34,29 @@ class KateTabWidget : public KTabWidget }; public: - KateTabWidget(QWidget* parent, const char* name=0); + KateTabWidget(TQWidget* parent, const char* name=0); virtual ~KateTabWidget(); - virtual void addTab ( QWidget * child, const QString & label ); + virtual void addTab ( TQWidget * child, const TQString & label ); - virtual void addTab ( QWidget * child, const QIconSet & iconset, const QString & label ); + virtual void addTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label ); - virtual void addTab ( QWidget * child, QTab * tab ); + virtual void addTab ( TQWidget * child, TQTab * tab ); - virtual void insertTab ( QWidget * child, const QString & label, int index = -1 ); + virtual void insertTab ( TQWidget * child, const TQString & label, int index = -1 ); - virtual void insertTab ( QWidget * child, const QIconSet & iconset, const QString & label, int index = -1 ); + virtual void insertTab ( TQWidget * child, const TQIconSet & iconset, const TQString & label, int index = -1 ); - virtual void insertTab ( QWidget * child, QTab * tab, int index = -1 ); + virtual void insertTab ( TQWidget * child, TQTab * tab, int index = -1 ); - virtual void removePage ( QWidget * w ); + virtual void removePage ( TQWidget * w ); TabWidgetVisibility tabWidgetVisibility() const; void setTabWidgetVisibility( TabWidgetVisibility ); private slots: - void closeTab(QWidget* w); + void closeTab(TQWidget* w); private: void maybeShow(); diff --git a/kate/app/kateviewmanager.cpp b/kate/app/kateviewmanager.cpp index 39b6020ee..c62e6e082 100644 --- a/kate/app/kateviewmanager.cpp +++ b/kate/app/kateviewmanager.cpp @@ -47,15 +47,15 @@ #include <ktexteditor/encodinginterface.h> -#include <qobjectlist.h> -#include <qstringlist.h> -#include <qfileinfo.h> -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <tqobjectlist.h> +#include <tqstringlist.h> +#include <tqfileinfo.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> //END Includes KateViewManager::KateViewManager (KateMainWindow *parent) - : QObject (parent), + : TQObject (parent), showFullPath(false), m_mainWindow(parent) { // while init @@ -71,7 +71,7 @@ KateViewManager::KateViewManager (KateMainWindow *parent) m_viewManager = new Kate::ViewManager (this); m_currentContainer=0; - connect(m_mainWindow->tabWidget(),SIGNAL(currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); + connect(m_mainWindow->tabWidget(),TQT_SIGNAL(currentChanged(TQWidget*)),this,TQT_SLOT(tabChanged(TQWidget*))); slotNewTab(); tabChanged(m_mainWindow->tabWidget()->currentPage()); @@ -94,67 +94,67 @@ void KateViewManager::setupActions () /** * tabbing */ - a=new KAction ( i18n("New Tab"),"tab_new", 0, this, SLOT(slotNewTab()), + a=new KAction ( i18n("New Tab"),"tab_new", 0, this, TQT_SLOT(slotNewTab()), m_mainWindow->actionCollection(), "view_new_tab" ); - m_closeTab = new KAction ( i18n("Close Current Tab"),"tab_remove",0,this,SLOT(slotCloseTab()), + m_closeTab = new KAction ( i18n("Close Current Tab"),"tab_remove",0,this,TQT_SLOT(slotCloseTab()), m_mainWindow->actionCollection(),"view_close_tab"); m_activateNextTab = new KAction( i18n( "Activate Next Tab" ), - QApplication::reverseLayout() ? KStdAccel::tabPrev() : KStdAccel::tabNext(), - this, SLOT( activateNextTab() ), m_mainWindow->actionCollection(), "view_next_tab" ); + TQApplication::reverseLayout() ? KStdAccel::tabPrev() : KStdAccel::tabNext(), + this, TQT_SLOT( activateNextTab() ), m_mainWindow->actionCollection(), "view_next_tab" ); m_activatePrevTab = new KAction( i18n( "Activate Previous Tab" ), - QApplication::reverseLayout() ? KStdAccel::tabNext() : KStdAccel::tabPrev(), - this, SLOT( activatePrevTab() ), m_mainWindow->actionCollection(), "view_prev_tab" ); + TQApplication::reverseLayout() ? KStdAccel::tabNext() : KStdAccel::tabPrev(), + this, TQT_SLOT( activatePrevTab() ), m_mainWindow->actionCollection(), "view_prev_tab" ); /** * view splitting */ - a=new KAction ( i18n("Split Ve&rtical"), "view_right", CTRL+SHIFT+Key_L, this, SLOT( + a=new KAction ( i18n("Split Ve&rtical"), "view_right", CTRL+SHIFT+Key_L, this, TQT_SLOT( slotSplitViewSpaceVert() ), m_mainWindow->actionCollection(), "view_split_vert"); a->setWhatsThis(i18n("Split the currently active view vertically into two views.")); - a=new KAction ( i18n("Split &Horizontal"), "view_bottom", CTRL+SHIFT+Key_T, this, SLOT( + a=new KAction ( i18n("Split &Horizontal"), "view_bottom", CTRL+SHIFT+Key_T, this, TQT_SLOT( slotSplitViewSpaceHoriz() ), m_mainWindow->actionCollection(), "view_split_horiz"); a->setWhatsThis(i18n("Split the currently active view horizontally into two views.")); m_closeView = new KAction ( i18n("Cl&ose Current View"), "view_remove", CTRL+SHIFT+Key_R, this, - SLOT( slotCloseCurrentViewSpace() ), m_mainWindow->actionCollection(), + TQT_SLOT( slotCloseCurrentViewSpace() ), m_mainWindow->actionCollection(), "view_close_current_space" ); m_closeView->setWhatsThis(i18n("Close the currently active splitted view")); goNext=new KAction(i18n("Next View"),Key_F8,this, - SLOT(activateNextView()),m_mainWindow->actionCollection(),"go_next"); + TQT_SLOT(activateNextView()),m_mainWindow->actionCollection(),"go_next"); goNext->setWhatsThis(i18n("Make the next split view the active one.")); - goPrev=new KAction(i18n("Previous View"),SHIFT+Key_F8, this, SLOT(activatePrevView()),m_mainWindow->actionCollection(),"go_prev"); + goPrev=new KAction(i18n("Previous View"),SHIFT+Key_F8, this, TQT_SLOT(activatePrevView()),m_mainWindow->actionCollection(),"go_prev"); goPrev->setWhatsThis(i18n("Make the previous split view the active one.")); /** * buttons for tabbing */ - QToolButton *b = new QToolButton( m_mainWindow->tabWidget() ); - connect( b, SIGNAL( clicked() ), - this, SLOT( slotNewTab() ) ); + TQToolButton *b = new TQToolButton( m_mainWindow->tabWidget() ); + connect( b, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotNewTab() ) ); b->setIconSet( SmallIcon( "tab_new" ) ); b->adjustSize(); - QToolTip::add(b, i18n("Open a new tab")); + TQToolTip::add(b, i18n("Open a new tab")); m_mainWindow->tabWidget()->setCornerWidget( b, TopLeft ); - b = m_closeTabButton = new QToolButton( m_mainWindow->tabWidget() ); - connect( b, SIGNAL( clicked() ), - this, SLOT( slotCloseTab() ) ); + b = m_closeTabButton = new TQToolButton( m_mainWindow->tabWidget() ); + connect( b, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotCloseTab() ) ); b->setIconSet( SmallIcon( "tab_remove" ) ); b->adjustSize(); - QToolTip::add(b, i18n("Close the current tab")); + TQToolTip::add(b, i18n("Close the current tab")); m_mainWindow->tabWidget()->setCornerWidget( b, TopRight ); } @@ -167,7 +167,7 @@ void KateViewManager::updateViewSpaceActions () goPrev->setEnabled (m_currentContainer->viewSpaceCount() > 1); } -void KateViewManager::tabChanged(QWidget* widget) { +void KateViewManager::tabChanged(TQWidget* widget) { KateViewSpaceContainer *container=static_cast<KateViewSpaceContainer*>(widget->qt_cast("KateViewSpaceContainer")); Q_ASSERT(container); m_currentContainer=container; @@ -199,8 +199,8 @@ void KateViewManager::slotNewTab() m_viewSpaceContainerList.append(container); m_mainWindow->tabWidget()->addTab (container, ""); - connect(container,SIGNAL(viewChanged()),this,SIGNAL(viewChanged())); - connect(container,SIGNAL(viewChanged()),m_viewManager,SIGNAL(viewChanged())); + connect(container,TQT_SIGNAL(viewChanged()),this,TQT_SIGNAL(viewChanged())); + connect(container,TQT_SIGNAL(viewChanged()),m_viewManager,TQT_SIGNAL(viewChanged())); if (!m_init) { @@ -371,8 +371,8 @@ void KateViewManager::slotDocumentOpen () if (cv) { KEncodingFileDialog::Result r=KEncodingFileDialog::getOpenURLsAndEncoding( (cv ? KTextEditor::encodingInterface(cv->document())->encoding() : Kate::Document::defaultEncoding()), - (cv ? cv->document()->url().url() : QString::null), - QString::null,m_mainWindow,i18n("Open File")); + (cv ? cv->document()->url().url() : TQString::null), + TQString::null,m_mainWindow,i18n("Open File")); uint lastID = 0; for (KURL::List::Iterator i=r.URLs.begin(); i != r.URLs.end(); ++i) @@ -403,7 +403,7 @@ void KateViewManager::slotDocumentClose () KateDocManager::self()->closeDocument (activeView()->getDoc()); } -uint KateViewManager::openURL (const KURL &url, const QString& encoding, bool activate, bool isTempFile ) +uint KateViewManager::openURL (const KURL &url, const TQString& encoding, bool activate, bool isTempFile ) { uint id = 0; Kate::Document *doc = KateDocManager::self()->openURL (url, encoding, &id, isTempFile ); @@ -419,7 +419,7 @@ uint KateViewManager::openURL (const KURL &url, const QString& encoding, bool ac void KateViewManager::openURL (const KURL &url) { - openURL (url, QString::null); + openURL (url, TQString::null); } void KateViewManager::removeViewSpace (KateViewSpace *viewspace) @@ -463,42 +463,42 @@ void KateViewManager::setShowFullPath( bool enable ) * session config functions */ // FIXME 3.0 - make those config goups more streamlined: "objN:objN..." -void KateViewManager::saveViewConfiguration(KConfig *config,const QString& grp) +void KateViewManager::saveViewConfiguration(KConfig *config,const TQString& grp) { // Use the same group name for view configuration as usual for sessions. // (When called by session manager grp is a 1-based index for the main window) - QString group = grp; + TQString group = grp; bool ok = false; int n = group.toInt( &ok ); if ( ok ) - group = QString( "MainWindow%1" ).arg( n-1 ); + group = TQString( "MainWindow%1" ).arg( n-1 ); config->setGroup(group); config->writeEntry("ViewSpaceContainers",m_viewSpaceContainerList.count()); config->writeEntry("Active ViewSpaceContainer", m_mainWindow->tabWidget()->currentPageIndex()); for (uint i=0;i<m_viewSpaceContainerList.count();i++) { - m_viewSpaceContainerList.at(i)->saveViewConfiguration(config,group+QString(":ViewSpaceContainer-%1:").arg(i)); + m_viewSpaceContainerList.at(i)->saveViewConfiguration(config,group+TQString(":ViewSpaceContainer-%1:").arg(i)); } } -void KateViewManager::restoreViewConfiguration (KConfig *config, const QString& grp) +void KateViewManager::restoreViewConfiguration (KConfig *config, const TQString& grp) { // Use the same group name for view configuration as usual for sessions. // (When called by session manager grp is a 1-based index for the main window) - QString group = grp; + TQString group = grp; bool ok = false; int n = group.toInt( &ok ); if ( ok ) - group = QString( "MainWindow%1" ).arg( n-1 ); + group = TQString( "MainWindow%1" ).arg( n-1 ); config->setGroup(group); uint tabCount=config->readNumEntry("ViewSpaceContainers",0); int activeOne=config->readNumEntry("Active ViewSpaceContainer",0); if (tabCount==0) return; - m_viewSpaceContainerList.at(0)->restoreViewConfiguration(config,group+QString(":ViewSpaceContainer-0:")); + m_viewSpaceContainerList.at(0)->restoreViewConfiguration(config,group+TQString(":ViewSpaceContainer-0:")); for (uint i=1;i<tabCount;i++) { slotNewTab(); - m_viewSpaceContainerList.at(i)->restoreViewConfiguration(config,group+QString(":ViewSpaceContainer-%1:").arg(i)); + m_viewSpaceContainerList.at(i)->restoreViewConfiguration(config,group+TQString(":ViewSpaceContainer-%1:").arg(i)); } if (activeOne != m_mainWindow->tabWidget()->currentPageIndex()) diff --git a/kate/app/kateviewmanager.h b/kate/app/kateviewmanager.h index 6eb33e9f5..cfd7fba9a 100644 --- a/kate/app/kateviewmanager.h +++ b/kate/app/kateviewmanager.h @@ -26,7 +26,7 @@ #include <kate/view.h> #include <kate/document.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> class KateMainWindow; class KateViewSpaceContainer; @@ -48,7 +48,7 @@ class KateViewManager : public QObject KateViewSpaceContainer *activeContainer () { return m_currentContainer; } - QPtrList<KateViewSpaceContainer> *containers() { return &m_viewSpaceContainerList; } + TQPtrList<KateViewSpaceContainer> *containers() { return &m_viewSpaceContainerList; } void updateViewSpaceActions (); @@ -60,12 +60,12 @@ class KateViewManager : public QObject public: /* This will save the splitter configuration */ - void saveViewConfiguration(KConfig *config,const QString& group); + void saveViewConfiguration(KConfig *config,const TQString& group); /* restore it */ - void restoreViewConfiguration (KConfig *config,const QString& group); + void restoreViewConfiguration (KConfig *config,const TQString& group); - uint openURL (const KURL &url, const QString& encoding, bool activate = true, bool isTempFile=false); + uint openURL (const KURL &url, const TQString& encoding, bool activate = true, bool isTempFile=false); public slots: void openURL (const KURL &url); @@ -92,7 +92,7 @@ class KateViewManager : public QObject void activateView ( Kate::View *view ); void activateSpace ( Kate::View* v ); - void tabChanged(QWidget*); + void tabChanged(TQWidget*); public slots: bool getShowFullPath() const { return showFullPath; } @@ -127,22 +127,22 @@ class KateViewManager : public QObject protected: friend class KateViewSpaceContainer; - QGuardedPtr<Kate::View> guiMergedView; + TQGuardedPtr<Kate::View> guiMergedView; signals: - void statusChanged (Kate::View *, int, int, int, bool, int, const QString &); + void statusChanged (Kate::View *, int, int, int, bool, int, const TQString &); void statChanged (); void viewChanged (); private: Kate::ViewManager *m_viewManager; - QPtrList<KateViewSpaceContainer> m_viewSpaceContainerList; + TQPtrList<KateViewSpaceContainer> m_viewSpaceContainerList; KateViewSpaceContainer *m_currentContainer; KateMainWindow *m_mainWindow; bool m_init; - QToolButton *m_closeTabButton; + TQToolButton *m_closeTabButton; KAction *m_closeView; KAction *m_closeTab; KAction *m_activateNextTab; diff --git a/kate/app/kateviewspace.cpp b/kate/app/kateviewspace.cpp index 9efb155e4..43a73a2b6 100644 --- a/kate/app/kateviewspace.cpp +++ b/kate/app/kateviewspace.cpp @@ -33,40 +33,40 @@ #include <kconfig.h> #include <kdebug.h> -#include <qwidgetstack.h> -#include <qpainter.h> -#include <qlabel.h> -#include <qcursor.h> -#include <qpopupmenu.h> -#include <qpixmap.h> +#include <tqwidgetstack.h> +#include <tqpainter.h> +#include <tqlabel.h> +#include <tqcursor.h> +#include <tqpopupmenu.h> +#include <tqpixmap.h> //BEGIN KVSSBSep /* "KateViewSpaceStatusBarSeparator" A 2 px line to separate the statusbar from the view. It is here to compensate for the lack of a frame in the view, - I think Kate looks very nice this way, as QScrollView with frame + I think Kate looks very nice this way, as TQScrollView with frame looks slightly clumsy... - Slight 3D effect. I looked for suitable QStyle props or methods, - but found none, though maybe it should use QStyle::PM_DefaultFrameWidth + Slight 3D effect. I looked for suitable TQStyle props or methods, + but found none, though maybe it should use TQStyle::PM_DefaultFrameWidth for height (TRY!). It does look a bit funny with flat styles (Light, .Net) as is, but there are on methods to paint panel lines separately. And, those styles tends to look funny on their own, as a light line in a 3D frame next to a light contents widget is not functional. - Also, QStatusBar is up to now completely ignorant to style. + Also, TQStatusBar is up to now completely ignorant to style. -anders */ -class KVSSBSep : public QWidget { +class KVSSBSep : public TQWidget { public: - KVSSBSep( KateViewSpace *parent=0) : QWidget(parent) + KVSSBSep( KateViewSpace *parent=0) : TQWidget(parent) { setFixedHeight( 2 ); } protected: - void paintEvent( QPaintEvent *e ) + void paintEvent( TQPaintEvent *e ) { - QPainter p( this ); + TQPainter p( this ); p.setPen( colorGroup().shadow() ); p.drawLine( e->rect().left(), 0, e->rect().right(), 0 ); p.setPen( ((KateViewSpace*)parentWidget())->isActiveSpace() ? colorGroup().light() : colorGroup().midlight() ); @@ -77,13 +77,13 @@ protected: //BEGIN KateViewSpace KateViewSpace::KateViewSpace( KateViewSpaceContainer *viewManager, - QWidget* parent, const char* name ) - : QVBox(parent, name), + TQWidget* parent, const char* name ) + : TQVBox(parent, name), m_viewManager( viewManager ) { mViewList.setAutoDelete(false); - stack = new QWidgetStack( this ); + stack = new TQWidgetStack( this ); setStretchFactor(stack, 1); stack->setFocus(); //sep = new KVSSBSep( this ); @@ -92,7 +92,7 @@ KateViewSpace::KateViewSpace( KateViewSpaceContainer *viewManager, mViewCount = 0; setMinimumWidth (mStatusBar->minimumWidth()); - m_group = QString::null; + m_group = TQString::null; } KateViewSpace::~KateViewSpace() @@ -109,10 +109,10 @@ void KateViewSpace::addView(Kate::View* v, bool show) // restore the config of this view if possible if ( !m_group.isEmpty() ) { - QString fn = v->getDoc()->url().prettyURL(); + TQString fn = v->getDoc()->url().prettyURL(); if ( ! fn.isEmpty() ) { - QString vgroup = QString("%1 %2").arg(m_group).arg(fn); + TQString vgroup = TQString("%1 %2").arg(m_group).arg(fn); KateSession::Ptr as = KateSessionManager::self()->activeSession (); if ( as->configRead() && as->configRead()->hasGroup( vgroup ) ) @@ -138,8 +138,8 @@ void KateViewSpace::addView(Kate::View* v, bool show) void KateViewSpace::removeView(Kate::View* v) { - disconnect( v->getDoc(), SIGNAL(modifiedChanged()), - mStatusBar, SLOT(modifiedChanged()) ); + disconnect( v->getDoc(), TQT_SIGNAL(modifiedChanged()), + mStatusBar, TQT_SLOT(modifiedChanged()) ); bool active = ( v == currentView() ); @@ -162,17 +162,17 @@ bool KateViewSpace::showView(Kate::View* v) bool KateViewSpace::showView(uint documentNumber) { - QPtrListIterator<Kate::View> it (mViewList); + TQPtrListIterator<Kate::View> it (mViewList); it.toLast(); for( ; it.current(); --it ) { if (((Kate::Document*)it.current()->getDoc())->documentNumber() == documentNumber) { if ( currentView() ) - disconnect( currentView()->getDoc(), SIGNAL(modifiedChanged()), - mStatusBar, SLOT(modifiedChanged()) ); + disconnect( currentView()->getDoc(), TQT_SIGNAL(modifiedChanged()), + mStatusBar, TQT_SLOT(modifiedChanged()) ); Kate::View* kv = it.current(); - connect( kv->getDoc(), SIGNAL(modifiedChanged()), - mStatusBar, SLOT(modifiedChanged()) ); + connect( kv->getDoc(), TQT_SIGNAL(modifiedChanged()), + mStatusBar, TQT_SLOT(modifiedChanged()) ); mViewList.removeRef( kv ); mViewList.append( kv ); @@ -204,11 +204,11 @@ void KateViewSpace::setActive( bool active, bool ) mIsActiveSpace = active; // change the statusbar palette and make sure it gets updated - QPalette pal( palette() ); + TQPalette pal( palette() ); if ( ! active ) { - pal.setColor( QColorGroup::Background, pal.active().mid() ); - pal.setColor( QColorGroup::Light, pal.active().midlight() ); + pal.setColor( TQColorGroup::Background, pal.active().mid() ); + pal.setColor( TQColorGroup::Light, pal.active().midlight() ); } mStatusBar->setPalette( pal ); @@ -216,27 +216,27 @@ void KateViewSpace::setActive( bool active, bool ) //sep->update(); } -bool KateViewSpace::event( QEvent *e ) +bool KateViewSpace::event( TQEvent *e ) { - if ( e->type() == QEvent::PaletteChange ) + if ( e->type() == TQEvent::PaletteChange ) { setActive( mIsActiveSpace ); return true; } - return QVBox::event( e ); + return TQVBox::event( e ); } -void KateViewSpace::slotStatusChanged (Kate::View *view, int r, int c, int ovr, bool block, int mod, const QString &msg) +void KateViewSpace::slotStatusChanged (Kate::View *view, int r, int c, int ovr, bool block, int mod, const TQString &msg) { - if ((QWidgetStack *)view->parentWidget() != stack) + if ((TQWidgetStack *)view->parentWidget() != stack) return; mStatusBar->setStatus( r, c, ovr, block, mod, msg ); } -void KateViewSpace::saveConfig ( KConfig* config, int myIndex ,const QString& viewConfGrp) +void KateViewSpace::saveConfig ( KConfig* config, int myIndex ,const TQString& viewConfGrp) { // kdDebug()<<"KateViewSpace::saveConfig("<<myIndex<<", "<<viewConfGrp<<") - currentView: "<<currentView()<<")"<<endl; - QString group = QString(viewConfGrp+"-ViewSpace %1").arg( myIndex ); + TQString group = TQString(viewConfGrp+"-ViewSpace %1").arg( myIndex ); config->setGroup (group); config->writeEntry ("Count", mViewList.count()); @@ -245,7 +245,7 @@ void KateViewSpace::saveConfig ( KConfig* config, int myIndex ,const QString& vi config->writeEntry( "Active View", currentView()->getDoc()->url().prettyURL() ); // Save file list, includeing cursor position in this instance. - QPtrListIterator<Kate::View> it(mViewList); + TQPtrListIterator<Kate::View> it(mViewList); int idx = 0; for (; it.current(); ++it) @@ -253,10 +253,10 @@ void KateViewSpace::saveConfig ( KConfig* config, int myIndex ,const QString& vi if ( !it.current()->getDoc()->url().isEmpty() ) { config->setGroup( group ); - config->writeEntry( QString("View %1").arg( idx ), it.current()->getDoc()->url().prettyURL() ); + config->writeEntry( TQString("View %1").arg( idx ), it.current()->getDoc()->url().prettyURL() ); // view config, group: "ViewSpace <n> url" - QString vgroup = QString("%1 %2").arg(group).arg(it.current()->getDoc()->url().prettyURL()); + TQString vgroup = TQString("%1 %2").arg(group).arg(it.current()->getDoc()->url().prettyURL()); config->setGroup( vgroup ); it.current()->writeSessionConfig( config ); } @@ -271,10 +271,10 @@ void KateViewSpace::modifiedOnDisc(Kate::Document *, bool, unsigned char) mStatusBar->updateMod( currentView()->getDoc()->isModified() ); } -void KateViewSpace::restoreConfig ( KateViewSpaceContainer *viewMan, KConfig* config, const QString &group ) +void KateViewSpace::restoreConfig ( KateViewSpaceContainer *viewMan, KConfig* config, const TQString &group ) { config->setGroup (group); - QString fn = config->readEntry( "Active View" ); + TQString fn = config->readEntry( "Active View" ); if ( !fn.isEmpty() ) { @@ -283,7 +283,7 @@ void KateViewSpace::restoreConfig ( KateViewSpaceContainer *viewMan, KConfig* co if (doc) { // view config, group: "ViewSpace <n> url" - QString vgroup = QString("%1 %2").arg(group).arg(fn); + TQString vgroup = TQString("%1 %2").arg(group).arg(fn); config->setGroup( vgroup ); viewMan->createView (doc); @@ -307,22 +307,22 @@ KateVSStatusBar::KateVSStatusBar ( KateViewSpace *parent, const char *name ) : KStatusBar( parent, name ), m_viewSpace( parent ) { - m_lineColLabel = new QLabel( this ); + m_lineColLabel = new TQLabel( this ); addWidget( m_lineColLabel, 0, false ); m_lineColLabel->setAlignment( Qt::AlignCenter ); m_lineColLabel->installEventFilter( this ); - m_modifiedLabel = new QLabel( QString(" "), this ); + m_modifiedLabel = new TQLabel( TQString(" "), this ); addWidget( m_modifiedLabel, 0, false ); m_modifiedLabel->setAlignment( Qt::AlignCenter ); m_modifiedLabel->installEventFilter( this ); - m_insertModeLabel = new QLabel( i18n(" INS "), this ); + m_insertModeLabel = new TQLabel( i18n(" INS "), this ); addWidget( m_insertModeLabel, 0, false ); m_insertModeLabel->setAlignment( Qt::AlignCenter ); m_insertModeLabel->installEventFilter( this ); - m_selectModeLabel = new QLabel( i18n(" NORM "), this ); + m_selectModeLabel = new TQLabel( i18n(" NORM "), this ); addWidget( m_selectModeLabel, 0, false ); m_selectModeLabel->setAlignment( Qt::AlignCenter ); m_selectModeLabel->installEventFilter( this ); @@ -330,7 +330,7 @@ KateVSStatusBar::KateVSStatusBar ( KateViewSpace *parent, const char *name ) m_fileNameLabel=new KSqueezedTextLabel( this ); addWidget( m_fileNameLabel, 1, true ); m_fileNameLabel->setMinimumSize( 0, 0 ); - m_fileNameLabel->setSizePolicy(QSizePolicy( QSizePolicy::Ignored, QSizePolicy::Fixed )); + m_fileNameLabel->setSizePolicy(TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Fixed )); m_fileNameLabel->setAlignment( /*Qt::AlignRight*/Qt::AlignLeft ); m_fileNameLabel->installEventFilter( this ); @@ -345,7 +345,7 @@ KateVSStatusBar::~KateVSStatusBar () { } -void KateVSStatusBar::setStatus( int r, int c, int ovr, bool block, int, const QString &msg ) +void KateVSStatusBar::setStatus( int r, int c, int ovr, bool block, int, const TQString &msg ) { m_lineColLabel->setText( i18n(" Line: %1 Col: %2 ").arg(KGlobal::locale()->formatNumber(r+1, 0)) @@ -397,20 +397,20 @@ void KateVSStatusBar::modifiedChanged() void KateVSStatusBar::showMenu() { KMainWindow* mainWindow = static_cast<KMainWindow*>( topLevelWidget() ); - QPopupMenu* menu = static_cast<QPopupMenu*>( mainWindow->factory()->container("viewspace_popup", mainWindow ) ); + TQPopupMenu* menu = static_cast<TQPopupMenu*>( mainWindow->factory()->container("viewspace_popup", mainWindow ) ); if (menu) - menu->exec(QCursor::pos()); + menu->exec(TQCursor::pos()); } -bool KateVSStatusBar::eventFilter(QObject*,QEvent *e) +bool KateVSStatusBar::eventFilter(TQObject*,TQEvent *e) { - if (e->type()==QEvent::MouseButtonPress) + if (e->type()==TQEvent::MouseButtonPress) { if ( m_viewSpace->currentView() ) m_viewSpace->currentView()->setFocus(); - if ( ((QMouseEvent*)e)->button()==RightButton) + if ( ((TQMouseEvent*)e)->button()==RightButton) showMenu(); return true; diff --git a/kate/app/kateviewspace.h b/kate/app/kateviewspace.h index a07b5f6da..b6a5a185e 100644 --- a/kate/app/kateviewspace.h +++ b/kate/app/kateviewspace.h @@ -26,9 +26,9 @@ #include <kate/view.h> #include <kate/document.h> -#include <qptrlist.h> -#include <qwidget.h> -#include <qvbox.h> +#include <tqptrlist.h> +#include <tqwidget.h> +#include <tqvbox.h> #include <kstatusbar.h> class KVSSBSep; @@ -46,7 +46,7 @@ class KateVSStatusBar : public KStatusBar virtual ~KateVSStatusBar (); public slots: - void setStatus( int r, int c, int ovr, bool block, int mod, const QString &msg ); + void setStatus( int r, int c, int ovr, bool block, int mod, const TQString &msg ); void updateMod( bool ); /** * changed the modified icon according to document state. @@ -55,16 +55,16 @@ class KateVSStatusBar : public KStatusBar void modifiedChanged(); protected: - virtual bool eventFilter (QObject*,QEvent *); + virtual bool eventFilter (TQObject*,TQEvent *); virtual void showMenu (); private: - QLabel* m_lineColLabel; - QLabel* m_modifiedLabel; - QLabel* m_insertModeLabel; - QLabel* m_selectModeLabel; + TQLabel* m_lineColLabel; + TQLabel* m_modifiedLabel; + TQLabel* m_insertModeLabel; + TQLabel* m_selectModeLabel; KSqueezedTextLabel* m_fileNameLabel; - QPixmap m_modPm, m_modDiscPm, m_modmodPm, m_noPm; + TQPixmap m_modPm, m_modDiscPm, m_modmodPm, m_noPm; class KateViewSpace *m_viewSpace; }; @@ -76,11 +76,11 @@ class KateViewSpace : public QVBox Q_OBJECT public: - KateViewSpace(KateViewSpaceContainer *, QWidget* parent=0, const char* name=0); + KateViewSpace(KateViewSpaceContainer *, TQWidget* parent=0, const char* name=0); ~KateViewSpace(); bool isActiveSpace(); void setActive(bool b, bool showled=false); - QWidgetStack* stack; + TQWidgetStack* stack; void addView(Kate::View* v, bool show=true); void removeView(Kate::View* v); bool showView(Kate::View* v); @@ -88,29 +88,29 @@ class KateViewSpace : public QVBox Kate::View* currentView(); int viewCount() const { return mViewList.count(); } - void saveConfig (KConfig* config, int myIndex,const QString& viewConfGrp); - void restoreConfig ( class KateViewSpaceContainer *viewMan, KConfig* config, const QString &group ); + void saveConfig (KConfig* config, int myIndex,const TQString& viewConfGrp); + void restoreConfig ( class KateViewSpaceContainer *viewMan, KConfig* config, const TQString &group ); protected: - /** reimplemented to catch QEvent::PaletteChange, + /** reimplemented to catch TQEvent::PaletteChange, since we use a modified palette for the statusbar */ - bool event( QEvent * ); + bool event( TQEvent * ); private: bool mIsActiveSpace; KateVSStatusBar* mStatusBar; - QLabel* l; - QPixmap i_active; - QPixmap i_empty; - QPtrList<Kate::View> mViewList; + TQLabel* l; + TQPixmap i_active; + TQPixmap i_empty; + TQPtrList<Kate::View> mViewList; int mViewCount; KVSSBSep *sep; KateViewSpaceContainer *m_viewManager; - QString m_group; + TQString m_group; private slots: - void slotStatusChanged (Kate::View *view, int r, int c, int ovr, bool block, int mod, const QString &msg); + void slotStatusChanged (Kate::View *view, int r, int c, int ovr, bool block, int mod, const TQString &msg); public slots: void polish(); diff --git a/kate/app/kateviewspacecontainer.cpp b/kate/app/kateviewspacecontainer.cpp index 08a3bf6f6..1e05e8b5a 100644 --- a/kate/app/kateviewspacecontainer.cpp +++ b/kate/app/kateviewspacecontainer.cpp @@ -48,17 +48,17 @@ #include <ktexteditor/encodinginterface.h> -#include <qlayout.h> -#include <qobjectlist.h> -#include <qstringlist.h> -#include <qvbox.h> -#include <qtimer.h> -#include <qfileinfo.h> +#include <tqlayout.h> +#include <tqobjectlist.h> +#include <tqstringlist.h> +#include <tqvbox.h> +#include <tqtimer.h> +#include <tqfileinfo.h> //END Includes -KateViewSpaceContainer::KateViewSpaceContainer (QWidget *parent, KateViewManager *viewManager) - : QVBox (parent) +KateViewSpaceContainer::KateViewSpaceContainer (TQWidget *parent, KateViewManager *viewManager) + : TQVBox (parent) , m_viewManager(viewManager) , m_blockViewCreationAndActivation (false) , m_activeViewRunning (false) @@ -69,14 +69,14 @@ KateViewSpaceContainer::KateViewSpaceContainer (QWidget *parent, KateViewManager m_viewSpaceList.setAutoDelete(true); KateViewSpace* vs = new KateViewSpace( this, this ); - connect(this, SIGNAL(statusChanged(Kate::View *, int, int, int, bool, int, const QString&)), vs, SLOT(slotStatusChanged(Kate::View *, int, int, int, bool, int, const QString&))); + connect(this, TQT_SIGNAL(statusChanged(Kate::View *, int, int, int, bool, int, const TQString&)), vs, TQT_SLOT(slotStatusChanged(Kate::View *, int, int, int, bool, int, const TQString&))); vs->setActive( true ); m_viewSpaceList.append(vs); - connect( this, SIGNAL(viewChanged()), this, SLOT(slotViewChanged()) ); - connect(KateDocManager::self(), SIGNAL(initialDocumentReplaced()), this, SIGNAL(viewChanged())); + connect( this, TQT_SIGNAL(viewChanged()), this, TQT_SLOT(slotViewChanged()) ); + connect(KateDocManager::self(), TQT_SIGNAL(initialDocumentReplaced()), this, TQT_SIGNAL(viewChanged())); - connect(KateDocManager::self(),SIGNAL(documentCreated(Kate::Document *)),this,SLOT(documentCreated(Kate::Document *))); - connect(KateDocManager::self(),SIGNAL(documentDeleted(uint)),this,SLOT(documentDeleted(uint))); + connect(KateDocManager::self(),TQT_SIGNAL(documentCreated(Kate::Document *)),this,TQT_SLOT(documentCreated(Kate::Document *))); + connect(KateDocManager::self(),TQT_SIGNAL(documentDeleted(uint)),this,TQT_SLOT(documentDeleted(uint))); } KateViewSpaceContainer::~KateViewSpaceContainer () @@ -120,19 +120,19 @@ bool KateViewSpaceContainer::createView ( Kate::Document *doc ) view->actionCollection()->remove (view->actionCollection()->action( "set_confdlg" )); // popup menu - view->installPopup ((QPopupMenu*)(mainWindow()->factory()->container("ktexteditor_popup", mainWindow())) ); + view->installPopup ((TQPopupMenu*)(mainWindow()->factory()->container("ktexteditor_popup", mainWindow())) ); - connect(view->getDoc(),SIGNAL(nameChanged(Kate::Document *)),this,SLOT(statusMsg())); - connect(view,SIGNAL(cursorPositionChanged()),this,SLOT(statusMsg())); - connect(view,SIGNAL(newStatus()),this,SLOT(statusMsg())); - connect(view->getDoc(), SIGNAL(undoChanged()), this, SLOT(statusMsg())); - connect(view,SIGNAL(dropEventPass(QDropEvent *)), mainWindow(),SLOT(slotDropEvent(QDropEvent *))); - connect(view,SIGNAL(gotFocus(Kate::View *)),this,SLOT(activateSpace(Kate::View *))); + connect(view->getDoc(),TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(statusMsg())); + connect(view,TQT_SIGNAL(cursorPositionChanged()),this,TQT_SLOT(statusMsg())); + connect(view,TQT_SIGNAL(newStatus()),this,TQT_SLOT(statusMsg())); + connect(view->getDoc(), TQT_SIGNAL(undoChanged()), this, TQT_SLOT(statusMsg())); + connect(view,TQT_SIGNAL(dropEventPass(TQDropEvent *)), mainWindow(),TQT_SLOT(slotDropEvent(TQDropEvent *))); + connect(view,TQT_SIGNAL(gotFocus(Kate::View *)),this,TQT_SLOT(activateSpace(Kate::View *))); activeViewSpace()->addView( view ); activateView( view ); - connect( doc, SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)), - activeViewSpace(), SLOT(modifiedOnDisc(Kate::Document *, bool, unsigned char)) ); + connect( doc, TQT_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)), + activeViewSpace(), TQT_SLOT(modifiedOnDisc(Kate::Document *, bool, unsigned char)) ); return true; } @@ -159,7 +159,7 @@ bool KateViewSpaceContainer::deleteView (Kate::View *view, bool delViewSpace) KateViewSpace* KateViewSpaceContainer::activeViewSpace () { - QPtrListIterator<KateViewSpace> it(m_viewSpaceList); + TQPtrListIterator<KateViewSpace> it(m_viewSpaceList); for (; it.current(); ++it) { @@ -183,7 +183,7 @@ Kate::View* KateViewSpaceContainer::activeView () m_activeViewRunning = true; - for (QPtrListIterator<Kate::View> it(m_viewList); it.current(); ++it) + for (TQPtrListIterator<Kate::View> it(m_viewList); it.current(); ++it) { if ( it.current()->isActive() ) { @@ -256,7 +256,7 @@ void KateViewSpaceContainer::reactivateActiveView() { activateView(view); } else if (m_pendingViewCreation) { m_pendingViewCreation=false; - disconnect(m_pendingDocument,SIGNAL(nameChanged(Kate::Document *)),this,SLOT(slotPendingDocumentNameChanged())); + disconnect(m_pendingDocument,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(slotPendingDocumentNameChanged())); createView(m_pendingDocument); } } @@ -304,7 +304,7 @@ void KateViewSpaceContainer::activateView( uint documentNumber ) } else { - QPtrListIterator<Kate::View> it(m_viewList); + TQPtrListIterator<Kate::View> it(m_viewList); for ( ;it.current(); ++it) { if ( it.current()->getDoc()->documentNumber() == documentNumber ) @@ -359,7 +359,7 @@ void KateViewSpaceContainer::activatePrevView() void KateViewSpaceContainer::closeViews(uint documentNumber) { - QPtrList<Kate::View> closeList; + TQPtrList<Kate::View> closeList; for (uint z=0 ; z < m_viewList.count(); z++) { @@ -378,12 +378,12 @@ void KateViewSpaceContainer::closeViews(uint documentNumber) } if (m_blockViewCreationAndActivation) return; - QTimer::singleShot(0,this,SIGNAL(viewChanged())); + TQTimer::singleShot(0,this,TQT_SIGNAL(viewChanged())); //emit m_viewManager->viewChanged (); } void KateViewSpaceContainer::slotPendingDocumentNameChanged() { - QString c; + TQString c; if (m_pendingDocument->url().isEmpty() || (!showFullPath)) { c = m_pendingDocument->docName(); @@ -422,7 +422,7 @@ void KateViewSpaceContainer::statusMsg () int mod = (int)v->getDoc()->isModified(); bool block=v->getDoc()->blockSelectionMode(); - QString c; + TQString c; if (v->getDoc()->url().isEmpty() || (!showFullPath)) { c = v->getDoc()->docName(); @@ -448,9 +448,9 @@ void KateViewSpaceContainer::splitViewSpace( KateViewSpace* vs, bool isFirstTime = vs->parentWidget() == this; - QValueList<int> psizes; + TQValueList<int> psizes; if ( ! isFirstTime ) - if ( QSplitter *ps = static_cast<QSplitter*>(vs->parentWidget()->qt_cast("QSplitter")) ) + if ( TQSplitter *ps = static_cast<TQSplitter*>(vs->parentWidget()->qt_cast("TQSplitter")) ) psizes = ps->sizes(); Qt::Orientation o = isHoriz ? Qt::Vertical : Qt::Horizontal; @@ -464,24 +464,24 @@ void KateViewSpaceContainer::splitViewSpace( KateViewSpace* vs, if ( !((KateMDI::Splitter*)vs->parentWidget())->isLastChild( vs ) ) ((KateMDI::Splitter*)s->parentWidget())->moveToFirst( s ); } - vs->reparent( s, 0, QPoint(), true ); + vs->reparent( s, 0, TQPoint(), true ); KateViewSpace* vsNew = new KateViewSpace( this, s ); if (atTop) s->moveToFirst( vsNew ); if (!isFirstTime) - if (QSplitter *ps = static_cast<QSplitter*>(s->parentWidget()->qt_cast("QSplitter")) ) + if (TQSplitter *ps = static_cast<TQSplitter*>(s->parentWidget()->qt_cast("TQSplitter")) ) ps->setSizes( psizes ); s->show(); - QValueList<int> sizes; + TQValueList<int> sizes; int space = 50;//isHoriz ? s->parentWidget()->height()/2 : s->parentWidget()->width()/2; sizes << space << space; s->setSizes( sizes ); - connect(this, SIGNAL(statusChanged(Kate::View *, int, int, int, bool, int, const QString &)), vsNew, SLOT(slotStatusChanged(Kate::View *, int, int,int, bool, int, const QString &))); + connect(this, TQT_SIGNAL(statusChanged(Kate::View *, int, int, int, bool, int, const TQString &)), vsNew, TQT_SLOT(slotStatusChanged(Kate::View *, int, int,int, bool, int, const TQString &))); m_viewSpaceList.append( vsNew ); activeViewSpace()->setActive( false ); vsNew->setActive( true, true ); @@ -511,7 +511,7 @@ void KateViewSpaceContainer::removeViewSpace (KateViewSpace *viewspace) // save some size information KateMDI::Splitter* pp=0L; - QValueList<int> ppsizes; + TQValueList<int> ppsizes; if (m_viewSpaceList.count() > 2 && p->parentWidget() != this) { pp = (KateMDI::Splitter*)p->parentWidget(); @@ -552,9 +552,9 @@ void KateViewSpaceContainer::removeViewSpace (KateViewSpace *viewspace) // reparent the other sibling of the parent. while (p->children ()) { - QWidget* other = ((QWidget *)(( QPtrList<QObject>*)p->children())->first()); + TQWidget* other = ((TQWidget *)(( TQPtrList<TQObject>*)p->children())->first()); - other->reparent( p->parentWidget(), 0, QPoint(), true ); + other->reparent( p->parentWidget(), 0, TQPoint(), true ); // We also need to find the right viewspace to become active if (pIsFirst) ((KateMDI::Splitter*)p->parentWidget())->moveToFirst( other ); @@ -562,7 +562,7 @@ void KateViewSpaceContainer::removeViewSpace (KateViewSpace *viewspace) setActiveSpace( (KateViewSpace*)other ); } else { - QObjectList* l = other->queryList( "KateViewSpace" ); + TQObjectList* l = other->queryList( "KateViewSpace" ); if ( l->first() != 0 ) { // I REALLY hope so! setActiveSpace( (KateViewSpace*)l->first() ); } @@ -602,7 +602,7 @@ void KateViewSpaceContainer::setShowFullPath( bool enable ) * session config functions */ -void KateViewSpaceContainer::saveViewConfiguration(KConfig *config,const QString& group) +void KateViewSpaceContainer::saveViewConfiguration(KConfig *config,const TQString& group) { bool weHaveSplittersAlive (viewSpaceCount() > 1); @@ -620,8 +620,8 @@ void KateViewSpaceContainer::saveViewConfiguration(KConfig *config,const QString // I need the first splitter, the one which has this as parent. KateMDI::Splitter* s; - QObjectList *l = queryList("KateMDI::Splitter", 0, false, false); - QObjectListIt it( *l ); + TQObjectList *l = queryList("KateMDI::Splitter", 0, false, false); + TQObjectListIt it( *l ); if ( (s = (KateMDI::Splitter*)it.current()) != 0 ) saveSplitterConfig( s, 0, config , group); @@ -629,7 +629,7 @@ void KateViewSpaceContainer::saveViewConfiguration(KConfig *config,const QString delete l; } -void KateViewSpaceContainer::restoreViewConfiguration (KConfig *config, const QString& group) +void KateViewSpaceContainer::restoreViewConfiguration (KConfig *config, const TQString& group) { config->setGroup(group); //config->setGroup ("View Configuration"); @@ -638,7 +638,7 @@ void KateViewSpaceContainer::restoreViewConfiguration (KConfig *config, const QS if (!config->readBoolEntry ("Splitters")) { // only add the new views needed, let the old stay, won't hurt if one around - m_viewSpaceList.first ()->restoreConfig (this, config, QString(group+"-ViewSpace 0")); + m_viewSpaceList.first ()->restoreConfig (this, config, TQString(group+"-ViewSpace 0")); } else { @@ -652,7 +652,7 @@ void KateViewSpaceContainer::restoreViewConfiguration (KConfig *config, const QS m_viewSpaceList.clear(); // call restoreSplitter for Splitter 0 - restoreSplitter( config, QString(group+"-Splitter 0"), this,group ); + restoreSplitter( config, TQString(group+"-Splitter 0"), this,group ); } // finally, make the correct view active. @@ -665,26 +665,26 @@ void KateViewSpaceContainer::restoreViewConfiguration (KConfig *config, const QS } -void KateViewSpaceContainer::saveSplitterConfig( KateMDI::Splitter* s, int idx, KConfig* config, const QString& viewConfGrp ) +void KateViewSpaceContainer::saveSplitterConfig( KateMDI::Splitter* s, int idx, KConfig* config, const TQString& viewConfGrp ) { - QString grp = QString(viewConfGrp+"-Splitter %1").arg(idx); + TQString grp = TQString(viewConfGrp+"-Splitter %1").arg(idx); config->setGroup(grp); // Save sizes, orient, children for this splitter config->writeEntry( "Sizes", s->sizes() ); config->writeEntry( "Orientation", s->orientation() ); - QStringList childList; + TQStringList childList; // a katesplitter has two children, of which one may be a KateSplitter. - const QObjectList* l = s->children(); - QObjectListIt it( *l ); - QObject* obj; + const TQObjectList* l = s->children(); + TQObjectListIt it( *l ); + TQObject* obj; for (; it.current(); ++it) { obj = it.current(); - QString n; // name for child list, see below + TQString n; // name for child list, see below // For KateViewSpaces, ask them to save the file list. if ( obj->isA("KateViewSpace") ) { - n = QString(viewConfGrp+"-ViewSpace %1").arg( m_viewSpaceList.find((KateViewSpace*)obj) ); + n = TQString(viewConfGrp+"-ViewSpace %1").arg( m_viewSpaceList.find((KateViewSpace*)obj) ); ((KateViewSpace*)obj)->saveConfig ( config, m_viewSpaceList.find((KateViewSpace*)obj), viewConfGrp); // save active viewspace if ( ((KateViewSpace*)obj)->isActiveSpace() ) { @@ -696,11 +696,11 @@ void KateViewSpaceContainer::saveSplitterConfig( KateMDI::Splitter* s, int idx, else if ( obj->isA("KateMDI::Splitter") ) { idx++; saveSplitterConfig( (KateMDI::Splitter*)obj, idx, config,viewConfGrp); - n = QString(viewConfGrp+"-Splitter %1").arg( idx ); + n = TQString(viewConfGrp+"-Splitter %1").arg( idx ); } // make sure list goes in right place! if (!n.isEmpty()) { - if ( childList.count() > 0 && ! s->isLastChild( (QWidget*)obj ) ) + if ( childList.count() > 0 && ! s->isLastChild( (TQWidget*)obj ) ) childList.prepend( n ); else childList.append( n ); @@ -712,21 +712,21 @@ void KateViewSpaceContainer::saveSplitterConfig( KateMDI::Splitter* s, int idx, config->writeEntry("Children", childList); } -void KateViewSpaceContainer::restoreSplitter( KConfig* config, const QString &group, QWidget* parent, const QString& viewConfGrp) +void KateViewSpaceContainer::restoreSplitter( KConfig* config, const TQString &group, TQWidget* parent, const TQString& viewConfGrp) { config->setGroup( group ); KateMDI::Splitter* s = new KateMDI::Splitter((Qt::Orientation)config->readNumEntry("Orientation"), parent); - QStringList children = config->readListEntry( "Children" ); - for (QStringList::Iterator it=children.begin(); it!=children.end(); ++it) + TQStringList children = config->readListEntry( "Children" ); + for (TQStringList::Iterator it=children.begin(); it!=children.end(); ++it) { // for a viewspace, create it and open all documents therein. if ( (*it).startsWith(viewConfGrp+"-ViewSpace") ) { KateViewSpace* vs = new KateViewSpace( this, s ); - connect(this, SIGNAL(statusChanged(Kate::View *, int, int, int, bool, int, const QString &)), vs, SLOT(slotStatusChanged(Kate::View *, int, int, int, bool, int, const QString &))); + connect(this, TQT_SIGNAL(statusChanged(Kate::View *, int, int, int, bool, int, const TQString &)), vs, TQT_SLOT(slotStatusChanged(Kate::View *, int, int, int, bool, int, const TQString &))); if (m_viewSpaceList.isEmpty()) vs->setActive (true); @@ -741,7 +741,7 @@ void KateViewSpaceContainer::restoreSplitter( KConfig* config, const QString &gr else { // for a splitter, recurse. - restoreSplitter( config, QString(*it), s, viewConfGrp ); + restoreSplitter( config, TQString(*it), s, viewConfGrp ); } } diff --git a/kate/app/kateviewspacecontainer.h b/kate/app/kateviewspacecontainer.h index e8c64bd4e..402b368d1 100644 --- a/kate/app/kateviewspacecontainer.h +++ b/kate/app/kateviewspacecontainer.h @@ -40,18 +40,18 @@ class KateViewSpaceContainer: public QVBox friend class KateVSStatusBar; public: - KateViewSpaceContainer (QWidget *parent, KateViewManager *viewManager); + KateViewSpaceContainer (TQWidget *parent, KateViewManager *viewManager); ~KateViewSpaceContainer (); - inline QPtrList<Kate::View> &viewList () { return m_viewList; }; + inline TQPtrList<Kate::View> &viewList () { return m_viewList; }; public: /* This will save the splitter configuration */ - void saveViewConfiguration(KConfig *config,const QString& group); + void saveViewConfiguration(KConfig *config,const TQString& group); /* restore it */ - void restoreViewConfiguration (KConfig *config,const QString& group); + void restoreViewConfiguration (KConfig *config,const TQString& group); private: /** @@ -69,12 +69,12 @@ class KateViewSpaceContainer: public QVBox * If child splitters are found, it calls it self with those as the argument. * If a viewspace child is found, it is asked to save its filelist. */ - void saveSplitterConfig(KateMDI::Splitter* s, int idx=0, KConfig* config=0L, const QString& viewConfGrp=""); + void saveSplitterConfig(KateMDI::Splitter* s, int idx=0, KConfig* config=0L, const TQString& viewConfGrp=""); /** Restore a single splitter. * This is all the work is done for @see saveSplitterConfig() */ - void restoreSplitter ( KConfig* config, const QString &group, QWidget* parent , const QString& viewConfGrp); + void restoreSplitter ( KConfig* config, const TQString &group, TQWidget* parent , const TQString& viewConfGrp); void removeViewSpace (KateViewSpace *viewspace); @@ -141,21 +141,21 @@ class KateViewSpaceContainer: public QVBox void activatePrevView(); signals: - void statusChanged (Kate::View *, int, int, int, bool, int, const QString &); + void statusChanged (Kate::View *, int, int, int, bool, int, const TQString &); void statChanged (); void viewChanged (); private: KateViewManager *m_viewManager; - QPtrList<KateViewSpace> m_viewSpaceList; - QPtrList<Kate::View> m_viewList; + TQPtrList<KateViewSpace> m_viewSpaceList; + TQPtrList<Kate::View> m_viewList; bool m_blockViewCreationAndActivation; bool m_activeViewRunning; bool m_pendingViewCreation; - QGuardedPtr<Kate::Document> m_pendingDocument; + TQGuardedPtr<Kate::Document> m_pendingDocument; }; #endif diff --git a/kate/app/kbookmarkhandler.cpp b/kate/app/kbookmarkhandler.cpp index ada4d7a21..8ef055e36 100644 --- a/kate/app/kbookmarkhandler.cpp +++ b/kate/app/kbookmarkhandler.cpp @@ -22,7 +22,7 @@ #include <stdio.h> #include <stdlib.h> -#include <qtextstream.h> +#include <tqtextstream.h> #include <kbookmarkimporter.h> #include <kpopupmenu.h> @@ -36,7 +36,7 @@ KBookmarkHandler::KBookmarkHandler( KateFileSelector *parent, KPopupMenu* kpopupmenu ) - : QObject( parent, "KBookmarkHandler" ), + : TQObject( parent, "KBookmarkHandler" ), KBookmarkOwner(), mParent( parent ), m_menu( kpopupmenu ), @@ -45,7 +45,7 @@ KBookmarkHandler::KBookmarkHandler( KateFileSelector *parent, KPopupMenu* kpopup if (!m_menu) m_menu = new KPopupMenu( parent, "bookmark menu" ); - QString file = locate( "data", "kate/fsbookmarks.xml" ); + TQString file = locate( "data", "kate/fsbookmarks.xml" ); if ( file.isEmpty() ) file = locateLocal( "data", "kate/fsbookmarks.xml" ); @@ -61,23 +61,23 @@ KBookmarkHandler::~KBookmarkHandler() // delete m_bookmarkMenu; ### } -QString KBookmarkHandler::currentURL() const +TQString KBookmarkHandler::currentURL() const { return mParent->dirOperator()->url().url(); } -void KBookmarkHandler::slotNewBookmark( const QString& /*text*/, - const QCString& url, - const QString& additionalInfo ) +void KBookmarkHandler::slotNewBookmark( const TQString& /*text*/, + const TQCString& url, + const TQString& additionalInfo ) { *m_importStream << "<bookmark icon=\"" << KMimeType::iconForURL( KURL( url ) ); - *m_importStream << "\" href=\"" << QString::fromUtf8(url) << "\">\n"; - *m_importStream << "<title>" << (additionalInfo.isEmpty() ? QString::fromUtf8(url) : additionalInfo) << "</title>\n</bookmark>\n"; + *m_importStream << "\" href=\"" << TQString::fromUtf8(url) << "\">\n"; + *m_importStream << "<title>" << (additionalInfo.isEmpty() ? TQString::fromUtf8(url) : additionalInfo) << "</title>\n</bookmark>\n"; } -void KBookmarkHandler::slotNewFolder( const QString& text, bool /*open*/, - const QString& /*additionalInfo*/ ) +void KBookmarkHandler::slotNewFolder( const TQString& text, bool /*open*/, + const TQString& /*additionalInfo*/ ) { *m_importStream << "<folder icon=\"bookmark_folder\">\n<title=\""; *m_importStream << text << "\">\n"; diff --git a/kate/app/kbookmarkhandler.h b/kate/app/kbookmarkhandler.h index 15697e283..c673ccb73 100644 --- a/kate/app/kbookmarkhandler.h +++ b/kate/app/kbookmarkhandler.h @@ -30,7 +30,7 @@ class KActionMenu; class QTextStream; class KPopupMenu; -class KBookmarkHandler : public QObject, public KBookmarkOwner +class KBookmarkHandler : public TQObject, public KBookmarkOwner { Q_OBJECT @@ -39,19 +39,19 @@ public: ~KBookmarkHandler(); // KBookmarkOwner interface: - virtual void openBookmarkURL( const QString& url ) { emit openURL( url ); } - virtual QString currentURL() const; + virtual void openBookmarkURL( const TQString& url ) { emit openURL( url ); } + virtual TQString currentURL() const; KPopupMenu *menu() const { return m_menu; } signals: - void openURL( const QString& url ); + void openURL( const TQString& url ); private slots: - void slotNewBookmark( const QString& text, const QCString& url, - const QString& additionalInfo ); - void slotNewFolder( const QString& text, bool open, - const QString& additionalInfo ); + void slotNewBookmark( const TQString& text, const TQCString& url, + const TQString& additionalInfo ); + void slotNewFolder( const TQString& text, bool open, + const TQString& additionalInfo ); void newSeparator(); void endFolder(); @@ -63,7 +63,7 @@ private: KPopupMenu *m_menu; KBookmarkMenu *m_bookmarkMenu; - QTextStream *m_importStream; + TQTextStream *m_importStream; //class KBookmarkHandlerPrivate *d; }; diff --git a/kate/app/kwritemain.cpp b/kate/app/kwritemain.cpp index 5dab9340d..efb71b767 100644 --- a/kate/app/kwritemain.cpp +++ b/kate/app/kwritemain.cpp @@ -57,17 +57,17 @@ #include <kparts/event.h> #include <kmenubar.h> -#include <qdropsite.h> -#include <qdragobject.h> -#include <qvbox.h> -#include <qtextcodec.h> -#include <qlayout.h> +#include <tqdropsite.h> +#include <tqdragobject.h> +#include <tqvbox.h> +#include <tqtextcodec.h> +#include <tqlayout.h> // StatusBar field IDs #define KWRITE_ID_GEN 1 -QPtrList<KTextEditor::Document> KWrite::docList; -QPtrList<KWrite> KWrite::winList; +TQPtrList<KTextEditor::Document> KWrite::docList; +TQPtrList<KWrite> KWrite::winList; KWrite::KWrite (KTextEditor::Document *doc) : m_view(0), @@ -96,11 +96,11 @@ KWrite::KWrite (KTextEditor::Document *doc) setAcceptDrops(true); - connect(m_view,SIGNAL(newStatus()),this,SLOT(newCaption())); - connect(m_view,SIGNAL(viewStatusMsg(const QString &)),this,SLOT(newStatus(const QString &))); - connect(m_view->document(),SIGNAL(fileNameChanged()),this,SLOT(newCaption())); - connect(m_view->document(),SIGNAL(fileNameChanged()),this,SLOT(slotFileNameChanged())); - connect(m_view,SIGNAL(dropEventPass(QDropEvent *)),this,SLOT(slotDropEvent(QDropEvent *))); + connect(m_view,TQT_SIGNAL(newStatus()),this,TQT_SLOT(newCaption())); + connect(m_view,TQT_SIGNAL(viewStatusMsg(const TQString &)),this,TQT_SLOT(newStatus(const TQString &))); + connect(m_view->document(),TQT_SIGNAL(fileNameChanged()),this,TQT_SLOT(newCaption())); + connect(m_view->document(),TQT_SIGNAL(fileNameChanged()),this,TQT_SLOT(slotFileNameChanged())); + connect(m_view,TQT_SIGNAL(dropEventPass(TQDropEvent *)),this,TQT_SLOT(slotDropEvent(TQDropEvent *))); setXMLFile( "kwriteui.rc" ); createShellGUI( true ); @@ -108,11 +108,11 @@ KWrite::KWrite (KTextEditor::Document *doc) // install a working kate part popup dialog thingy if (static_cast<Kate::View*>(m_view->qt_cast("Kate::View"))) - static_cast<Kate::View*>(m_view->qt_cast("Kate::View"))->installPopup ((QPopupMenu*)(factory()->container("ktexteditor_popup", this)) ); + static_cast<Kate::View*>(m_view->qt_cast("Kate::View"))->installPopup ((TQPopupMenu*)(factory()->container("ktexteditor_popup", this)) ); // init with more usefull size, stolen from konq :) if (!initialGeometrySet()) - resize( QSize(700, 480).expandedTo(minimumSizeHint())); + resize( TQSize(700, 480).expandedTo(minimumSizeHint())); // call it as last thing, must be sure everything is already set up ;) setAutoSaveSettings (); @@ -139,41 +139,41 @@ KWrite::~KWrite() void KWrite::setupActions() { - KStdAction::close( this, SLOT(slotFlush()), actionCollection(), "file_close" )->setWhatsThis(i18n("Use this to close the current document")); + KStdAction::close( this, TQT_SLOT(slotFlush()), actionCollection(), "file_close" )->setWhatsThis(i18n("Use this to close the current document")); // setup File menu - KStdAction::print(this, SLOT(printDlg()), actionCollection())->setWhatsThis(i18n("Use this command to print the current document")); - KStdAction::openNew( this, SLOT(slotNew()), actionCollection(), "file_new" )->setWhatsThis(i18n("Use this command to create a new document")); - KStdAction::open( this, SLOT( slotOpen() ), actionCollection(), "file_open" )->setWhatsThis(i18n("Use this command to open an existing document for editing")); + KStdAction::print(this, TQT_SLOT(printDlg()), actionCollection())->setWhatsThis(i18n("Use this command to print the current document")); + KStdAction::openNew( this, TQT_SLOT(slotNew()), actionCollection(), "file_new" )->setWhatsThis(i18n("Use this command to create a new document")); + KStdAction::open( this, TQT_SLOT( slotOpen() ), actionCollection(), "file_open" )->setWhatsThis(i18n("Use this command to open an existing document for editing")); - m_recentFiles = KStdAction::openRecent(this, SLOT(slotOpen(const KURL&)), + m_recentFiles = KStdAction::openRecent(this, TQT_SLOT(slotOpen(const KURL&)), actionCollection()); m_recentFiles->setWhatsThis(i18n("This lists files which you have opened recently, and allows you to easily open them again.")); - KAction *a=new KAction(i18n("&New Window"), "window_new", 0, this, SLOT(newView()), + KAction *a=new KAction(i18n("&New Window"), "window_new", 0, this, TQT_SLOT(newView()), actionCollection(), "view_new_view"); a->setWhatsThis(i18n("Create another view containing the current document")); - a=new KAction(i18n("Choose Editor..."),0,this,SLOT(changeEditor()), + a=new KAction(i18n("Choose Editor..."),0,this,TQT_SLOT(changeEditor()), actionCollection(),"settings_choose_editor"); a->setWhatsThis(i18n("Override the system wide setting for the default editing component")); - KStdAction::quit(this, SLOT(close()), actionCollection())->setWhatsThis(i18n("Close the current document view")); + KStdAction::quit(this, TQT_SLOT(close()), actionCollection())->setWhatsThis(i18n("Close the current document view")); // setup Settings menu setStandardToolBarMenuEnabled(true); - m_paShowStatusBar = KStdAction::showStatusbar(this, SLOT(toggleStatusBar()), actionCollection(), "settings_show_statusbar"); + m_paShowStatusBar = KStdAction::showStatusbar(this, TQT_SLOT(toggleStatusBar()), actionCollection(), "settings_show_statusbar"); m_paShowStatusBar->setWhatsThis(i18n("Use this command to show or hide the view's statusbar")); - m_paShowPath = new KToggleAction(i18n("Sho&w Path"), 0, this, SLOT(newCaption()), + m_paShowPath = new KToggleAction(i18n("Sho&w Path"), 0, this, TQT_SLOT(newCaption()), actionCollection(), "set_showPath"); m_paShowPath->setCheckedState(i18n("Hide Path")); m_paShowPath->setWhatsThis(i18n("Show the complete document path in the window caption")); - a=KStdAction::keyBindings(this, SLOT(editKeys()), actionCollection()); + a=KStdAction::keyBindings(this, TQT_SLOT(editKeys()), actionCollection()); a->setWhatsThis(i18n("Configure the application's keyboard shortcut assignments.")); - a=KStdAction::configureToolbars(this, SLOT(editToolbars()), actionCollection()); + a=KStdAction::configureToolbars(this, TQT_SLOT(editToolbars()), actionCollection()); a->setWhatsThis(i18n("Configure which items should appear in the toolbar(s).")); } @@ -226,7 +226,7 @@ void KWrite::slotOpen() { KEncodingFileDialog::Result r=KEncodingFileDialog::getOpenURLsAndEncoding( KTextEditor::encodingInterface(m_view->document())->encoding(), - m_view->document()->url().url(),QString::null,this,i18n("Open File")); + m_view->document()->url().url(),TQString::null,this,i18n("Open File")); for (KURL::List::Iterator i=r.URLs.begin(); i != r.URLs.end(); ++i) { @@ -236,7 +236,7 @@ void KWrite::slotOpen() } else { - KURL::List l=KFileDialog::getOpenURLs(m_view->document()->url().url(),QString::null,this,QString::null); + KURL::List l=KFileDialog::getOpenURLs(m_view->document()->url().url(),TQString::null,this,TQString::null); for (KURL::List::Iterator i=l.begin(); i != l.end(); ++i) { slotOpen ( *i ); @@ -299,7 +299,7 @@ void KWrite::editToolbars() { saveMainWindowSettings( kapp->config(), "MainWindow" ); KEditToolbar *dlg = new KEditToolbar(guiFactory()); - connect( dlg, SIGNAL(newToolbarConfig()), this, SLOT(slotNewToolbarConfig()) ); + connect( dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()) ); dlg->exec(); delete dlg; } @@ -320,7 +320,7 @@ void KWrite::printDlg() KTextEditor::printInterface(m_view->document())->printDialog (); } -void KWrite::newStatus(const QString &msg) +void KWrite::newStatus(const TQString &msg) { newCaption(); @@ -334,7 +334,7 @@ void KWrite::newCaption() } else { - QString c; + TQString c; if (!m_paShowPath->isChecked()) { c = m_view->document()->url().fileName(); @@ -356,17 +356,17 @@ void KWrite::newCaption() } } -void KWrite::dragEnterEvent( QDragEnterEvent *event ) +void KWrite::dragEnterEvent( TQDragEnterEvent *event ) { event->accept(KURLDrag::canDecode(event)); } -void KWrite::dropEvent( QDropEvent *event ) +void KWrite::dropEvent( TQDropEvent *event ) { slotDropEvent(event); } -void KWrite::slotDropEvent( QDropEvent *event ) +void KWrite::slotDropEvent( TQDropEvent *event ) { KURL::List textlist; @@ -379,9 +379,9 @@ void KWrite::slotDropEvent( QDropEvent *event ) void KWrite::slotEnableActions( bool enable ) { - QValueList<KAction *> actions = actionCollection()->actions(); - QValueList<KAction *>::ConstIterator it = actions.begin(); - QValueList<KAction *>::ConstIterator end = actions.end(); + TQValueList<KAction *> actions = actionCollection()->actions(); + TQValueList<KAction *>::ConstIterator it = actions.begin(); + TQValueList<KAction *>::ConstIterator end = actions.end(); for (; it != end; ++it ) (*it)->setEnabled( enable ); @@ -471,7 +471,7 @@ void KWrite::saveGlobalProperties(KConfig *config) //save documents for (uint z = 1; z <= docList.count(); z++) { - QString buf = QString("Document %1").arg(z); + TQString buf = TQString("Document %1").arg(z); config->setGroup(buf); KTextEditor::Document *doc = docList.at(z - 1); @@ -482,7 +482,7 @@ void KWrite::saveGlobalProperties(KConfig *config) //save documents for (uint z = 1; z <= winList.count(); z++) { - QString buf = QString("Window %1").arg(z); + TQString buf = TQString("Window %1").arg(z); config->setGroup(buf); config->writeEntry("DocumentNumber",docList.find(winList.at(z-1)->view()->document()) + 1); @@ -498,7 +498,7 @@ void KWrite::restore() return; int docs, windows; - QString buf; + TQString buf; KTextEditor::Document *doc; KWrite *t; @@ -508,7 +508,7 @@ void KWrite::restore() for (int z = 1; z <= docs; z++) { - buf = QString("Document %1").arg(z); + buf = TQString("Document %1").arg(z); config->setGroup(buf); doc=KTextEditor::EditorChooser::createDocument(0,"KTextEditor::Document"); @@ -519,7 +519,7 @@ void KWrite::restore() for (int z = 1; z <= windows; z++) { - buf = QString("Window %1").arg(z); + buf = TQString("Window %1").arg(z); config->setGroup(buf); t = new KWrite(docList.at(config->readNumEntry("DocumentNumber") - 1)); t->restore(config,z); @@ -543,7 +543,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) KLocale::setMainCatalogue("kate"); //lukas: set this to have the kwritepart translated using kate message catalog // here we go, construct the KWrite version - QString kWriteVersion = QString ("%1.%2.%3").arg(KDE::versionMajor() + 1).arg(KDE::versionMinor()).arg(KDE::versionRelease()); + TQString kWriteVersion = TQString ("%1.%2.%3").arg(KDE::versionMajor() + 1).arg(KDE::versionMinor()).arg(KDE::versionRelease()); KAboutData aboutData ( "kwrite", I18N_NOOP("KWrite"), @@ -609,7 +609,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) bool nav = false; int line = 0, column = 0; - QTextCodec *codec = args->isSet("encoding") ? QTextCodec::codecForName(args->getOption("encoding")) : 0; + TQTextCodec *codec = args->isSet("encoding") ? TQTextCodec::codecForName(args->getOption("encoding")) : 0; if (args->isSet ("line")) { @@ -629,14 +629,14 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) if( args->isSet( "stdin" ) ) { - QTextIStream input(stdin); + TQTextIStream input(stdin); // set chosen codec if (codec) input.setCodec (codec); - QString line; - QString text; + TQString line; + TQString text; do { @@ -660,7 +660,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) KWrite *t = new KWrite(); // this file is no local dir, open it, else warn - bool noDir = !args->url(z).isLocalFile() || !QDir (args->url(z).path()).exists(); + bool noDir = !args->url(z).isLocalFile() || !TQDir (args->url(z).path()).exists(); if (noDir) { @@ -692,10 +692,10 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) return a.exec (); } -KWriteEditorChooser::KWriteEditorChooser(QWidget *): +KWriteEditorChooser::KWriteEditorChooser(TQWidget *): KDialogBase(KDialogBase::Plain,i18n("Choose Editor Component"),KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Cancel) { - (new QVBoxLayout(plainPage()))->setAutoAdd(true); + (new TQVBoxLayout(plainPage()))->setAutoAdd(true); m_chooser=new KTextEditor::EditorChooser(plainPage(),"Editor Chooser"); setMainWidget(m_chooser); m_chooser->readAppSetting(); diff --git a/kate/app/kwritemain.h b/kate/app/kwritemain.h index 7af2c67ad..6a3565a6c 100644 --- a/kate/app/kwritemain.h +++ b/kate/app/kwritemain.h @@ -55,8 +55,8 @@ class KWrite : public KParts::MainWindow bool queryClose(); - void dragEnterEvent( QDragEnterEvent * ); - void dropEvent( QDropEvent * ); + void dragEnterEvent( TQDragEnterEvent * ); + void dropEvent( TQDropEvent * ); public slots: void slotNew(); @@ -76,10 +76,10 @@ class KWrite : public KParts::MainWindow void printNow(); void printDlg(); - void newStatus(const QString &msg); + void newStatus(const TQString &msg); void newCaption(); - void slotDropEvent(QDropEvent *); + void slotDropEvent(TQDropEvent *); void slotEnableActions( bool enable ); @@ -113,10 +113,10 @@ class KWrite : public KParts::MainWindow KToggleAction * m_paShowPath; KToggleAction * m_paShowStatusBar; - QString encoding; + TQString encoding; - static QPtrList<KTextEditor::Document> docList; - static QPtrList<KWrite> winList; + static TQPtrList<KTextEditor::Document> docList; + static TQPtrList<KWrite> winList; }; class KWriteEditorChooser: public KDialogBase @@ -124,7 +124,7 @@ class KWriteEditorChooser: public KDialogBase Q_OBJECT public: - KWriteEditorChooser(QWidget *parent); + KWriteEditorChooser(TQWidget *parent); virtual ~KWriteEditorChooser(); private: |