diff options
Diffstat (limited to 'kate/app')
45 files changed, 432 insertions, 397 deletions
diff --git a/kate/app/kateapp.cpp b/kate/app/kateapp.cpp index 0176545fa..479d0c77c 100644 --- a/kate/app/kateapp.cpp +++ b/kate/app/kateapp.cpp @@ -69,10 +69,10 @@ KateApp::KateApp (TDECmdLineArgs *args) m_application = new Kate::Application (this); // doc + project man - m_docManager = new KateDocManager (TQT_TQOBJECT(this)); + m_docManager = new KateDocManager (this); // init all normal plugins - m_pluginManager = new KatePluginManager (TQT_TQOBJECT(this)); + m_pluginManager = new KatePluginManager (this); // session manager up m_sessionManager = KateSessionManager::self(); @@ -239,7 +239,7 @@ bool KateApp::startupKate() } else KMessageBox::sorry( activeMainWindow(), - i18n("The file '%1' could not be opened: it is not a normal file, it is a folder.").arg(m_args->url(z).url()) ); + i18n("The file '%1' could not be opened: it is not a normal file, it is a folder.").arg(m_args->url(z).pathOrURL()) ); } Kate::Document::setOpenErrorDialogsActivated (true); @@ -350,9 +350,9 @@ bool KateApp::query_session_close() saveSessions = true; } } - + if (saveSessions) - { + { m_sessionManager->saveActiveSession(); } m_sessionManager->saveConfig(saveSessions); @@ -403,7 +403,7 @@ bool KateApp::openURL (const KURL &url, const TQString &encoding, bool isTempFil } else KMessageBox::sorry( mainWindow, - i18n("The file '%1' could not be opened: it is not a normal file, it is a folder.").arg(url.url()) ); + i18n("The file '%1' could not be opened: it is not a normal file, it is a folder.").arg(url.pathOrURL()) ); return true; } diff --git a/kate/app/kateapp.h b/kate/app/kateapp.h index f421df5a7..e0c2d4317 100644 --- a/kate/app/kateapp.h +++ b/kate/app/kateapp.h @@ -39,9 +39,9 @@ class TDECmdLineArgs; * Kate Application * This class represents the core kate application object */ -class KDE_EXPORT KateApp : public TDEApplication +class TDE_EXPORT KateApp : public TDEApplication { - Q_OBJECT + TQ_OBJECT /** * constructors & accessor to app object + plugin interface for it diff --git a/kate/app/kateconfigdialog.cpp b/kate/app/kateconfigdialog.cpp index 883730c08..1d3cfd5aa 100644 --- a/kate/app/kateconfigdialog.cpp +++ b/kate/app/kateconfigdialog.cpp @@ -102,7 +102,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) config->setGroup("General"); // GROUP with the one below: "Appearance" - TQButtonGroup *bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("&Appearance"), frGeneral ); + TQButtonGroup *bgStartup = new TQButtonGroup( 1, TQt::Horizontal, i18n("&Appearance"), frGeneral ); lo->addWidget( bgStartup ); // show full path in title @@ -110,13 +110,13 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) cb_fullPath = new TQCheckBox(i18n("&Show full path in title"), bgStartup); cb_fullPath->setChecked(mainWindow->viewManager()->getShowFullPath()); 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())); + connect(cb_fullPath, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotChanged())); // show session name in title cb_showSessionName = new TQCheckBox(i18n("Show s&ession name in title"), bgStartup); cb_showSessionName->setChecked(parent->showSessionName); TQWhatsThis::add(cb_showSessionName, i18n("If this option is checked, the session name will be shown in the window caption.")); - connect(cb_showSessionName, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged())); + connect(cb_showSessionName, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotChanged())); // sort filelist if desired cb_sortFiles = new TQCheckBox(bgStartup); @@ -124,10 +124,10 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) cb_sortFiles->setChecked(parent->filelist->sortType() == KateFileList::sortByName); TQWhatsThis::add( cb_sortFiles, i18n( "If this is checked, the files in the file list will be sorted alphabetically.") ); - connect( cb_sortFiles, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); + connect( cb_sortFiles, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotChanged() ) ); // GROUP with the one below: "Behavior" - bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("&Behavior"), frGeneral ); + bgStartup = new TQButtonGroup( 1, TQt::Horizontal, i18n("&Behavior"), frGeneral ); lo->addWidget( bgStartup ); // number of recent files @@ -142,7 +142,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) "some items forgotten.</qt>") ); TQWhatsThis::add( lNrf, numRecentFileHelpString ); TQWhatsThis::add( sb_numRecentFiles, numRecentFileHelpString ); - connect( sb_numRecentFiles, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) ); + connect( sb_numRecentFiles, TQ_SIGNAL( valueChanged ( int ) ), this, TQ_SLOT( slotChanged() ) ); // Use only one instance of kate (MDI) ? cb_useInstance = new TQCheckBox(bgStartup); @@ -151,7 +151,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) TQWhatsThis::add( cb_useInstance, i18n( "When checked, all files opened from outside of Kate will only use the " "currently opened instance of Kate.") ); - connect( cb_useInstance, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); + connect( cb_useInstance, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotChanged() ) ); // sync the konsole ? cb_syncKonsole = new TQCheckBox(bgStartup); @@ -161,7 +161,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) "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, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); + connect( cb_syncKonsole, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotChanged() ) ); // modified files notification cb_modNotifications = new TQCheckBox( @@ -172,11 +172,11 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) "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, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SLOT( slotChanged() ) ); + connect( cb_modNotifications, TQ_SIGNAL( toggled( bool ) ), + this, TQ_SLOT( slotChanged() ) ); // GROUP with the one below: "Meta-informations" - bgStartup = new TQButtonGroup( 2, Qt::Horizontal, i18n("Meta-Information"), frGeneral ); + bgStartup = new TQButtonGroup( 2, TQt::Horizontal, i18n("Meta-Information"), frGeneral ); lo->addWidget( bgStartup ); // save meta infos @@ -187,7 +187,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) "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, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); + connect( cb_saveMetaInfos, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotChanged() ) ); // meta infos days TQHBox *hbDmf = new TQHBox( bgStartup ); @@ -198,8 +198,8 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) sb_daysMetaInfos->setSuffix(i18n(" day(s)")); sb_daysMetaInfos->setValue( KateDocManager::self()->getDaysMetaInfos() ); lDmf->setBuddy( sb_daysMetaInfos ); - connect( cb_saveMetaInfos, TQT_SIGNAL( toggled( bool ) ), hbDmf, TQT_SLOT( setEnabled( bool ) ) ); - connect( sb_daysMetaInfos, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) ); + connect( cb_saveMetaInfos, TQ_SIGNAL( toggled( bool ) ), hbDmf, TQ_SLOT( setEnabled( bool ) ) ); + connect( sb_daysMetaInfos, TQ_SIGNAL( valueChanged ( int ) ), this, TQ_SLOT( slotChanged() ) ); lo->addStretch(1); // :-] works correct without autoadd //END General page @@ -214,7 +214,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) lo->setSpacing(KDialog::spacingHint()); // GROUP with the one below: "Startup" - bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Elements of Sessions"), frSessions ); + bgStartup = new TQButtonGroup( 1, TQt::Horizontal, i18n("Elements of Sessions"), frSessions ); lo->addWidget( bgStartup ); // restore view config @@ -224,11 +224,11 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) cb_restoreVC->setChecked( config->readBoolEntry("Restore Window Configuration", true) ); TQWhatsThis::add(cb_restoreVC, i18n( "Check this if you want all your views and frames restored each time you open Kate")); - connect( cb_restoreVC, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) ); + connect( cb_restoreVC, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotChanged() ) ); TQRadioButton *rb1, *rb2, *rb3; - sessions_start = new TQButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Startup"), frSessions ); + sessions_start = new TQButtonGroup( 1, TQt::Horizontal, i18n("Behavior on Application Startup"), frSessions ); lo->add (sessions_start); sessions_start->setRadioButtonExclusive( true ); @@ -245,11 +245,11 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) else sessions_start->setButton (2); - 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())); + connect(rb1, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotChanged())); + connect(rb2, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotChanged())); + connect(rb3, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotChanged())); - sessions_exit = new TQButtonGroup( 1, Qt::Horizontal, i18n("Behavior on Application Exit or Session Switch"), frSessions ); + sessions_exit = new TQButtonGroup( 1, TQt::Horizontal, i18n("Behavior on Application Exit or Session Switch"), frSessions ); lo->add (sessions_exit); sessions_exit->setRadioButtonExclusive( true ); @@ -266,9 +266,9 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) else sessions_exit->setButton (2); - 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())); + connect(rb1, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotChanged())); + connect(rb2, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotChanged())); + connect(rb3, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotChanged())); lo->addStretch(1); // :-] works correct without autoadd //END Session page @@ -282,7 +282,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) BarIcon("document-open", TDEIcon::SizeSmall) ); fileSelConfigPage = new KFSConfigPage( page, "file selector config page", mainWindow->fileselector ); - connect( fileSelConfigPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); + connect( fileSelConfigPage, TQ_SIGNAL( changed() ), this, TQ_SLOT( slotChanged() ) ); path.clear(); path << i18n("Application") << i18n("Document List"); @@ -290,14 +290,14 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) BarIcon("view_text", TDEIcon::SizeSmall) ); filelistConfigPage = new KFLConfigPage( page, "file list config page", mainWindow->filelist ); - connect( filelistConfigPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); + connect( filelistConfigPage, TQ_SIGNAL( changed() ), this, TQ_SLOT( slotChanged() ) ); path.clear(); path << i18n("Application") << i18n("Plugins"); /*TQVBox **/page=addVBoxPage(path,i18n("Plugin Manager"), BarIcon("connect_established",TDEIcon::SizeSmall)); KateConfigPluginPage *configPluginPage = new KateConfigPluginPage(page, this); - connect( configPluginPage, TQT_SIGNAL( changed() ), TQT_TQOBJECT(this), TQT_SLOT( slotChanged() ) ); + connect( configPluginPage, TQ_SIGNAL( changed() ), this, TQ_SLOT( slotChanged() ) ); // Tools->External Tools menu path.clear(); @@ -305,7 +305,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) page = addVBoxPage( path, i18n("External Tools"), BarIcon("configure", TDEIcon::SizeSmall) ); configExternalToolsPage = new KateExternalToolsConfigWidget(page, "external tools config page"); - connect( configExternalToolsPage, TQT_SIGNAL(changed()), TQT_TQOBJECT(this), TQT_SLOT(slotChanged()) ); + connect( configExternalToolsPage, TQ_SIGNAL(changed()), this, TQ_SLOT(slotChanged()) ); // editor widgets from kwrite/kwdialog path.clear(); @@ -320,7 +320,7 @@ KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view ) KTextEditor::configInterfaceExtension (v->document())->configPagePixmap(i, TDEIcon::SizeSmall) ); KTextEditor::ConfigPage *cPage = KTextEditor::configInterfaceExtension (v->document())->configPage(i, page); - connect( cPage, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); + connect( cPage, TQ_SIGNAL( changed() ), this, TQ_SLOT( slotChanged() ) ); editorPages.append (cPage); } @@ -356,7 +356,7 @@ void KateConfigDialog::addPluginPage (Kate::Plugin *plugin) PluginPageListItem *info=new PluginPageListItem; info->plugin = plugin; info->page = Kate::pluginConfigInterfaceExtension(plugin)->configPage (i, page); - connect( info->page, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); + connect( info->page, TQ_SIGNAL( changed() ), this, TQ_SLOT( slotChanged() ) ); pluginPages.append(info); } } diff --git a/kate/app/kateconfigdialog.h b/kate/app/kateconfigdialog.h index a90cdd1c0..91b84ee5d 100644 --- a/kate/app/kateconfigdialog.h +++ b/kate/app/kateconfigdialog.h @@ -43,7 +43,7 @@ struct PluginPageListItem class KateConfigDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KateConfigDialog (KateMainWindow *parent, Kate::View *view); diff --git a/kate/app/kateconfigplugindialogpage.cpp b/kate/app/kateconfigplugindialogpage.cpp index 90d7262e5..d2b17eb52 100644 --- a/kate/app/kateconfigplugindialogpage.cpp +++ b/kate/app/kateconfigplugindialogpage.cpp @@ -82,7 +82,7 @@ KateConfigPluginPage::KateConfigPluginPage(TQWidget *parent, KateConfigDialog *d listView->addColumn(i18n("Comment")); 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, TQT_SIGNAL(stateChange(KatePluginListItem *, bool)), this, TQT_SLOT(stateChange(KatePluginListItem *, bool))); + connect(listView, TQ_SIGNAL(stateChange(KatePluginListItem *, bool)), this, TQ_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 009f30739..018c97dfa 100644 --- a/kate/app/kateconfigplugindialogpage.h +++ b/kate/app/kateconfigplugindialogpage.h @@ -31,7 +31,7 @@ class KatePluginListItem; class KatePluginListView : public TDEListView { - Q_OBJECT + TQ_OBJECT friend class KatePluginListItem; @@ -47,7 +47,7 @@ class KatePluginListView : public TDEListView class KateConfigPluginPage: public TQVBox { - Q_OBJECT + TQ_OBJECT public: KateConfigPluginPage(TQWidget *parent, class KateConfigDialog *dialog); diff --git a/kate/app/kateconsole.cpp b/kate/app/kateconsole.cpp index cb49ef16e..1e87a59d8 100644 --- a/kate/app/kateconsole.cpp +++ b/kate/app/kateconsole.cpp @@ -50,7 +50,7 @@ KateConsole::KateConsole (KateMainWindow *mw, KateMDI::ToolView* parent) KateConsole::~KateConsole () { if (m_part) - disconnect ( m_part, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); + disconnect ( m_part, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotDestroyed()) ); } void KateConsole::loadConsoleIfNeeded() @@ -64,7 +64,7 @@ void KateConsole::loadConsoleIfNeeded() if (!factory) return; - m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(TQT_TQOBJECT(this),"libkonsolepart", "KParts::ReadOnlyPart")); + m_part = static_cast<KParts::ReadOnlyPart *>(factory->create(this,"libkonsolepart", "KParts::ReadOnlyPart")); if (!m_part) return; @@ -74,7 +74,7 @@ void KateConsole::loadConsoleIfNeeded() m_part->widget()->show(); - connect ( m_part, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); + connect ( m_part, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotDestroyed()) ); if (m_mw->viewManager()->activeView()) if (m_mw->viewManager()->activeView()->getDoc()->url().isValid()) diff --git a/kate/app/kateconsole.h b/kate/app/kateconsole.h index dabfda38d..77fa455a4 100644 --- a/kate/app/kateconsole.h +++ b/kate/app/kateconsole.h @@ -44,7 +44,7 @@ class KateMainWindow; */ class KateConsole : public TQVBox { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/kate/app/katedocmanager.cpp b/kate/app/katedocmanager.cpp index aac535a7e..d592edd13 100644 --- a/kate/app/katedocmanager.cpp +++ b/kate/app/katedocmanager.cpp @@ -116,7 +116,7 @@ Kate::Document *KateDocManager::createDoc () emit documentCreated ((Kate::Document *)doc); emit m_documentManager->documentCreated ((Kate::Document *)doc); - connect(doc,TQT_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,TQT_SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); + connect(doc,TQ_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,TQ_SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); return (Kate::Document *)doc; } @@ -256,7 +256,7 @@ Kate::Document *KateDocManager::openURL (const KURL& url,const TQString &encodin } } - connect(doc, TQT_SIGNAL(modStateChanged(Kate::Document *)), this, TQT_SLOT(slotModChanged(Kate::Document *))); + connect(doc, TQ_SIGNAL(modStateChanged(Kate::Document *)), this, TQ_SLOT(slotModChanged(Kate::Document *))); emit initialDocumentReplaced(); @@ -597,7 +597,7 @@ bool KateDocManager::computeUrlMD5(const KURL &url, TQCString &result) { KMD5 md5; - if (!md5.update(TQT_TQIODEVICE_OBJECT(f))) + if (!md5.update(f)) return false; md5.hexDigest(result); diff --git a/kate/app/katedocmanager.h b/kate/app/katedocmanager.h index 569aa9853..81ff7a5c8 100644 --- a/kate/app/katedocmanager.h +++ b/kate/app/katedocmanager.h @@ -52,11 +52,11 @@ class KateDocumentInfo unsigned char modifiedOnDiscReason; }; -typedef QPair<KURL,TQDateTime> TPair; +typedef TQPair<KURL,TQDateTime> TPair; class KateDocManager : public TQObject { - Q_OBJECT + TQ_OBJECT public: KateDocManager (TQObject *parent); diff --git a/kate/app/kateexternaltools.cpp b/kate/app/kateexternaltools.cpp index 0b592b03a..e93e758ea 100644 --- a/kate/app/kateexternaltools.cpp +++ b/kate/app/kateexternaltools.cpp @@ -185,12 +185,12 @@ void KateExternalToolsCommand::reload () { } bool KateExternalToolsCommand::exec (Kate::View *view, const TQString &cmd, TQString &) { - TQWidget *wv=tqt_dynamic_cast<TQWidget*>(view); + TQWidget *wv=dynamic_cast<TQWidget*>(view); if (!wv) { // kdDebug(13001)<<"KateExternalToolsCommand::exec: Could not get view widget"<<endl; return false; } - KateMDI::MainWindow *dmw=tqt_dynamic_cast<KateMDI::MainWindow*>(wv->topLevelWidget()); + KateMDI::MainWindow *dmw=dynamic_cast<KateMDI::MainWindow*>(wv->topLevelWidget()); if (!dmw) { // kdDebug(13001)<<"KateExternalToolsCommand::exec: Could not get main window"<<endl; return false; @@ -200,7 +200,7 @@ bool KateExternalToolsCommand::exec (Kate::View *view, const TQString &cmd, TQSt if (actionName.isEmpty()) return false; // kdDebug(13001)<<"actionName is not empty:"<<actionName<<endl; KateExternalToolsMenuAction *a= - tqt_dynamic_cast<KateExternalToolsMenuAction*>(dmw->action("tools_external")); + dynamic_cast<KateExternalToolsMenuAction*>(dmw->action("tools_external")); if (!a) return false; // kdDebug(13001)<<"trying to find action"<<endl; TDEAction *a1=a->actionCollection()->action(static_cast<const char *>(actionName.utf8())); @@ -225,7 +225,7 @@ KateExternalToolAction::KateExternalToolAction( TQObject *parent, if ( ! t->icon.isEmpty() ) setIconSet( SmallIconSet( t->icon ) ); - connect( this ,TQT_SIGNAL(activated()), this, TQT_SLOT(slotRun()) ); + connect( this ,TQ_SIGNAL(activated()), this, TQ_SLOT(slotRun()) ); } bool KateExternalToolAction::expandMacro( const TQString &str, TQStringList &ret ) @@ -300,7 +300,7 @@ KateExternalToolsMenuAction::KateExternalToolsMenuAction( const TQString &text, m_actionCollection = new TDEActionCollection( mainwindow ); - connect(KateDocManager::self(),TQT_SIGNAL(documentChanged()),this,TQT_SLOT(slotDocumentChanged())); + connect(KateDocManager::self(),TQ_SIGNAL(documentChanged()),this,TQ_SLOT(slotDocumentChanged())); reload(); } @@ -389,7 +389,7 @@ void KateExternalToolsMenuAction::slotDocumentChanged() TDEActionPtrList actions = m_actionCollection->actions(); for (TDEActionPtrList::iterator it = actions.begin(); it != actions.end(); ++it ) { - KateExternalToolAction *action = tqt_dynamic_cast<KateExternalToolAction*>(*it); + KateExternalToolAction *action = dynamic_cast<KateExternalToolAction*>(*it); if ( action ) { l = action->tool->mimetypes; @@ -438,7 +438,7 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * leName = new TQLineEdit( w ); lo->addWidget( leName, 1, 2 ); l = new TQLabel( leName, i18n("&Label:"), w ); - l->setAlignment( l->alignment()|Qt::AlignRight ); + l->setAlignment( l->alignment()|TQt::AlignRight ); lo->addWidget( l, 1, 1 ); if ( tool ) leName->setText( tool->name ); TQWhatsThis::add( leName, i18n( @@ -453,7 +453,7 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * teCommand = new TQTextEdit( w ); lo->addMultiCellWidget( teCommand, 2, 2, 2, 3 ); l = new TQLabel( teCommand, i18n("S&cript:"), w ); - l->setAlignment( Qt::AlignTop|Qt::AlignRight ); + l->setAlignment( TQt::AlignTop|TQt::AlignRight ); lo->addWidget( l, 2, 1 ); if ( tool ) teCommand->setText( tool->command ); TQWhatsThis::add( teCommand, i18n( @@ -476,7 +476,7 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * leExecutable = new TQLineEdit( w ); lo->addMultiCellWidget( leExecutable, 3, 3, 2, 3 ); l = new TQLabel( leExecutable, i18n("&Executable:"), w ); - l->setAlignment( l->alignment()|Qt::AlignRight ); + l->setAlignment( l->alignment()|TQt::AlignRight ); lo->addWidget( l, 3, 1 ); if ( tool ) leExecutable->setText( tool->tryexec ); TQWhatsThis::add( leExecutable, i18n( @@ -487,7 +487,7 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * leMimetypes = new TQLineEdit( w ); lo->addWidget( leMimetypes, 4, 2 ); l = new TQLabel( leMimetypes, i18n("&Mime types:"), w ); - l->setAlignment( l->alignment()|Qt::AlignRight ); + l->setAlignment( l->alignment()|TQt::AlignRight ); lo->addWidget( l, 4, 1 ); if ( tool ) leMimetypes->setText( tool->mimetypes.join("; ") ); TQWhatsThis::add( leMimetypes, i18n( @@ -498,14 +498,14 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * TQToolButton *btnMTW = new TQToolButton(w); lo->addWidget( btnMTW, 4, 3 ); btnMTW->setIconSet(TQIconSet(SmallIcon("wizard"))); - connect(btnMTW, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMTDlg())); + connect(btnMTW, TQ_SIGNAL(clicked()), this, TQ_SLOT(showMTDlg())); TQWhatsThis::add( btnMTW, i18n( "Click for a dialog that can help you creating a list of mimetypes.") ); cmbSave = new TQComboBox(w); lo->addMultiCellWidget( cmbSave, 5, 5, 2, 3 ); l = new TQLabel( cmbSave, i18n("&Save:"), w ); - l->setAlignment( l->alignment()|Qt::AlignRight ); + l->setAlignment( l->alignment()|TQt::AlignRight ); lo->addWidget( l, 5, 1 ); TQStringList sl; sl << i18n("None") << i18n("Current Document") << i18n("All Documents"); @@ -520,7 +520,7 @@ KateExternalToolServiceEditor::KateExternalToolServiceEditor( KateExternalTool * leCmdLine = new TQLineEdit( w ); lo->addMultiCellWidget( leCmdLine, 6, 6, 2, 3 ); l = new TQLabel( leCmdLine, i18n("&Command line name:"), w ); - l->setAlignment( l->alignment()|Qt::AlignRight ); + l->setAlignment( l->alignment()|TQt::AlignRight ); lo->addWidget( l, 6, 1 ); if ( tool ) leCmdLine->setText( tool->cmdname ); TQWhatsThis::add( leCmdLine, i18n( @@ -562,33 +562,33 @@ KateExternalToolsConfigWidget::KateExternalToolsConfigWidget( TQWidget *parent, lbTools = new TDEListBox( this ); lo->addMultiCellWidget( lbTools, 1, 4, 0, 3 ); - connect( lbTools, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) ); + connect( lbTools, TQ_SIGNAL(selectionChanged()), this, TQ_SLOT(slotSelectionChanged()) ); btnNew = new TQPushButton( i18n("&New..."), this ); lo->addWidget( btnNew, 5, 0 ); - connect( btnNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew()) ); + connect( btnNew, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotNew()) ); btnRemove = new TQPushButton( i18n("&Remove"), this ); lo->addWidget( btnRemove, 5, 2 ); - connect( btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemove()) ); + connect( btnRemove, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotRemove()) ); btnEdit = new TQPushButton( i18n("&Edit..."), this ); lo->addWidget( btnEdit, 5, 1 ); - connect( btnEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEdit()) ); + connect( btnEdit, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotEdit()) ); TQPushButton *b = new TQPushButton( i18n("Insert &Separator"), this ); lo->addWidget( b, 5, 3 ); - connect( b, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInsertSeparator()) ); + connect( b, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotInsertSeparator()) ); btnMoveUp = new TQPushButton( SmallIconSet("go-up"), "", this ); lo->addWidget( btnMoveUp, 2, 4 ); - connect( btnMoveUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveUp()) ); + connect( btnMoveUp, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotMoveUp()) ); btnMoveDwn = new TQPushButton( SmallIconSet("go-down"), "", this ); lo->addWidget( btnMoveDwn, 3, 4 ); - connect( btnMoveDwn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveDown()) ); + connect( btnMoveDwn, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotMoveDown()) ); - connect( lbTools, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), this, TQT_SLOT( slotEdit() ) ); + connect( lbTools, TQ_SIGNAL( doubleClicked ( TQListBoxItem * ) ), this, TQ_SLOT( slotEdit() ) ); lo->setRowStretch( 1, 1 ); lo->setRowStretch( 4, 1 ); diff --git a/kate/app/kateexternaltools.h b/kate/app/kateexternaltools.h index ef3a9e9fd..aeefb0aa5 100644 --- a/kate/app/kateexternaltools.h +++ b/kate/app/kateexternaltools.h @@ -55,7 +55,7 @@ class KateExternalToolsMenuAction : public TDEActionMenu { friend class KateExternalToolAction; - Q_OBJECT + TQ_OBJECT public: KateExternalToolsMenuAction( const TQString &text=TQString::null, TQObject *parent=0, const char* name=0, class KateMainWindow *mw=0 ); ~KateExternalToolsMenuAction() {}; @@ -80,7 +80,7 @@ class KateExternalToolsMenuAction : public TDEActionMenu */ class KateExternalToolAction : public TDEAction, public KWordMacroExpander { - Q_OBJECT + TQ_OBJECT public: KateExternalToolAction( TQObject *parent, const char *name, class KateExternalTool *t ); ~KateExternalToolAction(); @@ -142,7 +142,7 @@ class KateExternalTool */ class KateExternalToolsConfigWidget : public Kate::ConfigPage { - Q_OBJECT + TQ_OBJECT public: KateExternalToolsConfigWidget( TQWidget *parent, const char* name); virtual ~KateExternalToolsConfigWidget(); @@ -201,7 +201,7 @@ class KateExternalToolsConfigWidget : public Kate::ConfigPage */ class KateExternalToolServiceEditor : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: diff --git a/kate/app/katefilelist.cpp b/kate/app/katefilelist.cpp index 9dd958a5d..1a1ce3103 100644 --- a/kate/app/katefilelist.cpp +++ b/kate/app/katefilelist.cpp @@ -48,6 +48,7 @@ #include <kstringhandler.h> #include <kcolorbutton.h> #include <kdialog.h> +#include <kmimetype.h> //END Includes //BEGIN ToolTip @@ -94,7 +95,7 @@ KateFileList::KateFileList (KateMainWindow *main, m_editShade = TQColor( 255, 102, 153 ); m_enableBgShading = false; - setFocusPolicy ( TQ_NoFocus ); + setFocusPolicy ( TQWidget::NoFocus ); viewManager = _viewManager; @@ -107,7 +108,7 @@ KateFileList::KateFileList (KateMainWindow *main, setupActions (); - connect(this,TQT_SIGNAL(moved()),this,TQT_SLOT(updateFileListLocations())); + connect(this,TQ_SIGNAL(moved()),this,TQ_SLOT(updateFileListLocations())); for (uint i = 0; i < KateDocManager::self()->documents(); i++) { @@ -115,18 +116,18 @@ KateFileList::KateFileList (KateMainWindow *main, slotModChanged (KateDocManager::self()->document(i)); } - 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))); + connect(KateDocManager::self(),TQ_SIGNAL(documentCreated(Kate::Document *)), + this,TQ_SLOT(slotDocumentCreated(Kate::Document *))); + connect(KateDocManager::self(),TQ_SIGNAL(documentDeleted(uint)), + this,TQ_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,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 ))); + connect(this,TQ_SIGNAL(selectionChanged(TQListViewItem *)), + this,TQ_SLOT(slotActivateView(TQListViewItem *))); + connect(viewManager,TQ_SIGNAL(viewChanged()), this,TQ_SLOT(slotViewChanged())); + connect(this,TQ_SIGNAL(contextMenuRequested( TQListViewItem *, const TQPoint &, int )), + this,TQ_SLOT(slotMenu ( TQListViewItem *, const TQPoint &, int ))); } KateFileList::~KateFileList () @@ -136,20 +137,20 @@ KateFileList::~KateFileList () void KateFileList::setupActions () { - windowNext = KStdAction::back(TQT_TQOBJECT(this), TQT_SLOT(slotPrevDocument()), m_main->actionCollection()); - windowPrev = KStdAction::forward(TQT_TQOBJECT(this), TQT_SLOT(slotNextDocument()), m_main->actionCollection()); + windowNext = KStdAction::back(this, TQ_SLOT(slotPrevDocument()), m_main->actionCollection()); + windowPrev = KStdAction::forward(this, TQ_SLOT(slotNextDocument()), m_main->actionCollection()); sortAction = new TDESelectAction( i18n("Sort &By"), 0, m_main->actionCollection(), "filelist_sortby" ); listMoveFileUp = new TDEAction( i18n("Move File Up"), 0, m_main->actionCollection(), "filelist_move_up" ); //listMoveFileUp->setShortcut(TDEShortcut(CTRL + SHIFT + Key_Comma)); listMoveFileDown = new TDEAction( i18n("Move File Down"), 0, m_main->actionCollection(), "filelist_move_down" ); //listMoveFileDown->setShortcut(TDEShortcut(CTRL + SHIFT + Key_Period)); - connect( listMoveFileUp, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(moveFileUp()) ); - connect( listMoveFileDown, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(moveFileDown()) ); + connect( listMoveFileUp, TQ_SIGNAL(activated()), this, TQ_SLOT(moveFileUp()) ); + connect( listMoveFileDown, TQ_SIGNAL(activated()), this, TQ_SLOT(moveFileDown()) ); TQStringList l; l << i18n("Opening Order") << i18n("Document Name") << i18n("URL") << i18n("Manual Placement"); sortAction->setItems( l ); - connect( sortAction, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setSortType(int)) ); + connect( sortAction, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setSortType(int)) ); } void KateFileList::updateActions () @@ -176,6 +177,7 @@ void KateFileList::keyPressEvent(TQKeyEvent *e) { // returning void KateFileList::contentsMousePressEvent( TQMouseEvent *e ) { + if (e->button() != TQMouseEvent::LeftButton) return; m_lastMouseDownPos = e->pos(); if ( ! itemAt( contentsToViewport( e->pos() ) ) ) @@ -227,9 +229,9 @@ void KateFileList::slotPrevDocument() void KateFileList::slotDocumentCreated (Kate::Document *doc) { new KateFileListItem( this, doc/*, doc->documentNumber()*/ ); - 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))); + connect(doc,TQ_SIGNAL(modStateChanged(Kate::Document *)),this,TQ_SLOT(slotModChanged(Kate::Document *))); + connect(doc,TQ_SIGNAL(nameChanged(Kate::Document *)),this,TQ_SLOT(slotNameChanged(Kate::Document *))); + connect(doc,TQ_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)),this,TQ_SLOT(slotModifiedOnDisc(Kate::Document *, bool, unsigned char))); sort(); updateFileListLocations(); @@ -267,7 +269,7 @@ void KateFileList::slotActivateView( TQListViewItem *item ) if (info && info->modifiedOnDisc) { // Simulate mouse button release, otherwise the paused DND operation // will reactivate as soon as the mouse re-enters the list view! - TQMouseEvent e(TQEvent::MouseButtonRelease, m_lastMouseDownPos, Qt::LeftButton, 0); + TQMouseEvent e(TQEvent::MouseButtonRelease, m_lastMouseDownPos, TQt::LeftButton, 0); contentsMouseReleaseEvent(&e); } @@ -436,7 +438,7 @@ TQString KateFileList::tooltip( TQListViewItem *item, int ) str += i18n("<b>This file was changed (deleted) on disk by another program.</b><br />"); } - str += i->document()->url().prettyURL(); + str += i->document()->url().pathOrURL(); return str; } @@ -556,20 +558,27 @@ KateFileListItem::~KateFileListItem() { } + const TQPixmap *KateFileListItem::pixmap ( int column ) const { if ( column == 0) { - static TQPixmap noPm = SmallIcon ("null"); + static TQMap<TQString, TQPixmap> mimeIcons; static TQPixmap modPm = SmallIcon("modified"); static TQPixmap discPm = SmallIcon("modonhd"); static TQPixmap modmodPm = SmallIcon("modmod"); const KateDocumentInfo *info = KateDocManager::self()->documentInfo(doc); + KMimeType::Ptr mime = KMimeType::findByURL(doc->url()); + + if (!mimeIcons.contains(mime->name())) + { + mimeIcons.insert(mime->name(), mime->pixmap(TDEIcon::Small)); + } if (info && info->modifiedOnDisc) return doc->isModified() ? &modmodPm : &discPm; else - return doc->isModified() ? &modPm : &noPm; + return doc->isModified() ? &modPm : &mimeIcons[mime->name()]; } return 0; @@ -659,7 +668,7 @@ KFLConfigPage::KFLConfigPage( TQWidget* parent, const char *name, KateFileList * int spacing = KDialog::spacingHint(); lo1->setSpacing( spacing ); - TQGroupBox *gb = new TQGroupBox( 1, Qt::Horizontal, i18n("Background Shading"), this ); + TQGroupBox *gb = new TQGroupBox( 1, TQt::Horizontal, i18n("Background Shading"), this ); lo1->addWidget( gb ); TQWidget *g = new TQWidget( gb ); @@ -707,11 +716,11 @@ KFLConfigPage::KFLConfigPage( TQWidget* parent, const char *name, KateFileList * reload(); slotEnableChanged(); - 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()) ); + connect( cbEnableShading, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotMyChanged()) ); + connect( cbEnableShading, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotEnableChanged()) ); + connect( kcbViewShade, TQ_SIGNAL(changed(const TQColor&)), this, TQ_SLOT(slotMyChanged()) ); + connect( kcbEditShade, TQ_SIGNAL(changed(const TQColor&)), this, TQ_SLOT(slotMyChanged()) ); + connect( cmbSort, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotMyChanged()) ); } void KFLConfigPage::apply() diff --git a/kate/app/katefilelist.h b/kate/app/katefilelist.h index 24a62c7a5..1112c1235 100644 --- a/kate/app/katefilelist.h +++ b/kate/app/katefilelist.h @@ -76,7 +76,7 @@ class KateFileListItem : public TQListViewItem class KateFileList : public TDEListView { - Q_OBJECT + TQ_OBJECT friend class KFLConfigPage; @@ -172,7 +172,7 @@ class KateFileList : public TDEListView }; class KFLConfigPage : public Kate::ConfigPage { - Q_OBJECT + TQ_OBJECT public: KFLConfigPage( TQWidget* parent=0, const char *name=0, KateFileList *fl=0 ); virtual ~KFLConfigPage() {}; diff --git a/kate/app/katefileselector.cpp b/kate/app/katefileselector.cpp index 4bba68ded..a9c9d2c16 100644 --- a/kate/app/katefileselector.cpp +++ b/kate/app/katefileselector.cpp @@ -113,14 +113,14 @@ KateFileSelector::KateFileSelector( KateMainWindow *mainWindow, { mActionCollection = new TDEActionCollection( this ); - TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceQToolBar ); + TQtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar ); KateFileSelectorToolBarParent *tbp=new KateFileSelectorToolBarParent(this); toolbar = new KateFileSelectorToolBar(tbp); tbp->setToolBar(toolbar); toolbar->setMovingEnabled(false); toolbar->setFlat(true); - tqInstallMsgHandler( oldHandler ); + qInstallMsgHandler( oldHandler ); cmbPath = new KURLComboBox( KURLComboBox::Directories, true, this, "path combo" ); cmbPath->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); @@ -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, TQT_SIGNAL( viewChanged(KFileView *) ), - this, TQT_SLOT( selectorViewChanged(KFileView *) ) ); + connect ( dir, TQ_SIGNAL( viewChanged(KFileView *) ), + this, TQ_SLOT( selectorViewChanged(KFileView *) ) ); setStretchFactor(dir, 2); TDEActionCollection *coll = dir->actionCollection(); @@ -159,37 +159,37 @@ KateFileSelector::KateFileSelector( KateMainWindow *mainWindow, filter = new KHistoryCombo( true, filterBox, "filter"); filter->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed )); filterBox->setStretchFactor(filter, 2); - connect( btnFilter, TQT_SIGNAL( clicked() ), this, TQT_SLOT( btnFilterClick() ) ); + connect( btnFilter, TQ_SIGNAL( clicked() ), this, TQ_SLOT( btnFilterClick() ) ); - 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&) ) ); + connect( filter, TQ_SIGNAL( activated(const TQString&) ), + TQ_SLOT( slotFilterChange(const TQString&) ) ); + connect( filter, TQ_SIGNAL( returnPressed(const TQString&) ), + filter, TQ_SLOT( addToHistory(const TQString&) ) ); // tdeaction for the dir sync method acSyncDir = new TDEAction( i18n("Current Document Folder"), "curfiledir", 0, - TQT_TQOBJECT(this), TQT_SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" ); + this, TQ_SLOT( setActiveDocumentDir() ), mActionCollection, "sync_dir" ); toolbar->setIconText( TDEToolBar::IconOnly ); toolbar->setIconSize( 16 ); toolbar->setEnableContextMenu( false ); - 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( cmbPath, TQ_SIGNAL( urlActivated( const KURL& )), + this, TQ_SLOT( cmbPathActivated( const KURL& ) )); + connect( cmbPath, TQ_SIGNAL( returnPressed( const TQString& )), + this, TQ_SLOT( cmbPathReturnPressed( const TQString& ) )); + connect(dir, TQ_SIGNAL(urlEntered(const KURL&)), + this, TQ_SLOT(dirUrlEntered(const KURL&)) ); - connect(dir, TQT_SIGNAL(finishedLoading()), - this, TQT_SLOT(dirFinishedLoading()) ); + connect(dir, TQ_SIGNAL(finishedLoading()), + this, TQ_SLOT(dirFinishedLoading()) ); // enable dir sync button if current doc has a valid URL - connect ( viewmanager, TQT_SIGNAL( viewChanged() ), - this, TQT_SLOT( kateViewChanged() ) ); + connect ( viewmanager, TQ_SIGNAL( viewChanged() ), + this, TQ_SLOT( kateViewChanged() ) ); // Connect the bookmark handler - connect( bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )), - this, TQT_SLOT( setDir( const TQString& ) ) ); + connect( bookmarkHandler, TQ_SIGNAL( openURL( const TQString& )), + this, TQ_SLOT( setDir( const TQString& ) ) ); waitingUrl = TQString::null; @@ -234,7 +234,7 @@ void KateFileSelector::readConfig(TDEConfig *config, const TQString & name) TQString loc( config->readPathEntry( "location" ) ); if ( ! loc.isEmpty() ) { // waitingDir = loc; -// TQTimer::singleShot(0, this, TQT_SLOT(initialDirChangeHack())); +// TQTimer::singleShot(0, this, TQ_SLOT(initialDirChangeHack())); setDir( loc ); } } @@ -485,7 +485,7 @@ bool KateFileSelector::eventFilter( TQObject* o, TQEvent *e ) And the popup is rather useless, if the paths are only partly visible. */ TQListBox *lb = cmbPath->listBox(); - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lb) && e->type() == TQEvent::Show ) { + if ( o == lb && e->type() == TQEvent::Show ) { int add = lb->height() < lb->contentsHeight() ? lb->verticalScrollBar()->width() : 0; int w = TQMIN( mainwin->width(), lb->contentsWidth() + add ); lb->resize( w, lb->height() ); @@ -532,23 +532,23 @@ KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, KateFileSelect lo->setSpacing( spacing ); // Toolbar - a lot for a little... - TQGroupBox *gbToolbar = new TQGroupBox( 1, Qt::Vertical, i18n("Toolbar"), this ); + TQGroupBox *gbToolbar = new TQGroupBox( 1, TQt::Vertical, i18n("Toolbar"), this ); acSel = new TDEActionSelector( gbToolbar ); acSel->setAvailableLabel( i18n("A&vailable actions:") ); acSel->setSelectedLabel( i18n("S&elected actions:") ); lo->addWidget( gbToolbar ); - 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() ) ); + connect( acSel, TQ_SIGNAL( added( TQListBoxItem * ) ), this, TQ_SLOT( slotMyChanged() ) ); + connect( acSel, TQ_SIGNAL( removed( TQListBoxItem * ) ), this, TQ_SLOT( slotMyChanged() ) ); + connect( acSel, TQ_SIGNAL( movedUp( TQListBoxItem * ) ), this, TQ_SLOT( slotMyChanged() ) ); + connect( acSel, TQ_SIGNAL( movedDown( TQListBoxItem * ) ), this, TQ_SLOT( slotMyChanged() ) ); // Sync - TQGroupBox *gbSync = new TQGroupBox( 1, Qt::Horizontal, i18n("Auto Synchronization"), this ); + TQGroupBox *gbSync = new TQGroupBox( 1, TQt::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, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotMyChanged() ) ); - connect( cbSyncShow, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotMyChanged() ) ); + connect( cbSyncActive, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotMyChanged() ) ); + connect( cbSyncShow, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotMyChanged() ) ); // Histories TQHBox *hbPathHist = new TQHBox ( this ); @@ -556,22 +556,22 @@ KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, KateFileSelect sbPathHistLength = new TQSpinBox( hbPathHist ); lbPathHist->setBuddy( sbPathHistLength ); lo->addWidget( hbPathHist ); - connect( sbPathHistLength, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotMyChanged() ) ); + connect( sbPathHistLength, TQ_SIGNAL( valueChanged ( int ) ), this, TQ_SLOT( slotMyChanged() ) ); 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, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotMyChanged() ) ); + connect( sbFilterHistLength, TQ_SIGNAL( valueChanged ( int ) ), this, TQ_SLOT( slotMyChanged() ) ); // Session - TQGroupBox *gbSession = new TQGroupBox( 1, Qt::Horizontal, i18n("Session"), this ); + TQGroupBox *gbSession = new TQGroupBox( 1, TQt::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, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotMyChanged() ) ); - connect( cbSesFilter, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotMyChanged() ) ); + connect( cbSesLocation, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotMyChanged() ) ); + connect( cbSesFilter, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotMyChanged() ) ); // make it look nice lo->addStretch( 1 ); diff --git a/kate/app/katefileselector.h b/kate/app/katefileselector.h index 5de8f74cb..09ea07a76 100644 --- a/kate/app/katefileselector.h +++ b/kate/app/katefileselector.h @@ -48,7 +48,7 @@ class KFileView; /* I think this fix for not moving toolbars is better */ class KateFileSelectorToolBar: public TDEToolBar { - Q_OBJECT + TQ_OBJECT public: KateFileSelectorToolBar(TQWidget *parent); virtual ~KateFileSelectorToolBar(); @@ -58,7 +58,7 @@ public: class KateFileSelectorToolBarParent: public TQFrame { - Q_OBJECT + TQ_OBJECT public: KateFileSelectorToolBarParent(TQWidget *parent); ~KateFileSelectorToolBarParent(); @@ -71,7 +71,7 @@ protected: class KateFileSelector : public TQVBox { - Q_OBJECT + TQ_OBJECT friend class KFSConfigPage; @@ -144,7 +144,7 @@ class KateFileSelector : public TQVBox user closed session. */ class KFSConfigPage : public Kate::ConfigPage { - Q_OBJECT + TQ_OBJECT public: KFSConfigPage( TQWidget* parent=0, const char *name=0, KateFileSelector *kfs=0); virtual ~KFSConfigPage() {}; diff --git a/kate/app/kategrepdialog.cpp b/kate/app/kategrepdialog.cpp index 70f067100..00bd1dcd6 100644 --- a/kate/app/kategrepdialog.cpp +++ b/kate/app/kategrepdialog.cpp @@ -101,7 +101,7 @@ GrepTool::GrepTool(TQWidget *parent, const char *name) TQLabel *lPattern = new TQLabel(i18n("Pattern:"), this); lPattern->setFixedSize(lPattern->sizeHint()); - loInput->addWidget(lPattern, 0, 0, Qt::AlignRight | Qt::AlignVCenter); + loInput->addWidget(lPattern, 0, 0, TQt::AlignRight | TQt::AlignVCenter); TQBoxLayout *loPattern = new TQHBoxLayout( 4 ); loInput->addLayout( loPattern, 0, 1 ); @@ -128,7 +128,7 @@ GrepTool::GrepTool(TQWidget *parent, const char *name) TQLabel *lTemplate = new TQLabel(i18n("Template:"), this); lTemplate->setFixedSize(lTemplate->sizeHint()); - loInput->addWidget(lTemplate, 1, 0, Qt::AlignRight | Qt::AlignVCenter); + loInput->addWidget(lTemplate, 1, 0, TQt::AlignRight | TQt::AlignVCenter); TQBoxLayout *loTemplate = new TQHBoxLayout(4); loInput->addLayout(loTemplate, 1, 1); @@ -147,13 +147,13 @@ GrepTool::GrepTool(TQWidget *parent, const char *name) TQLabel *lFiles = new TQLabel(i18n("Files:"), this); lFiles->setFixedSize(lFiles->sizeHint()); - loInput->addWidget(lFiles, 2, 0, Qt::AlignRight | Qt::AlignVCenter); + loInput->addWidget(lFiles, 2, 0, TQt::AlignRight | TQt::AlignVCenter); TQBoxLayout *loFiles = new TQHBoxLayout( 2 ); loInput->addLayout( loFiles, 2, 1 ); cmbFiles = new KComboBox(true, this); - lFiles->setBuddy(TQT_TQWIDGET(cmbFiles->focusProxy())); + lFiles->setBuddy(cmbFiles->focusProxy()); cmbFiles->setMinimumSize(cmbFiles->sizeHint()); cmbFiles->setInsertionPolicy(TQComboBox::NoInsertion); cmbFiles->setDuplicatesEnabled(false); @@ -168,7 +168,7 @@ GrepTool::GrepTool(TQWidget *parent, const char *name) TQLabel *lDir = new TQLabel(i18n("Folder:"), this); lDir->setFixedSize(lDir->sizeHint()); - loInput->addWidget(lDir, 3, 0, Qt::AlignRight | Qt::AlignVCenter); + loInput->addWidget(lDir, 3, 0, TQt::AlignRight | TQt::AlignVCenter); TQBoxLayout *loDir = new TQHBoxLayout(3); loInput->addLayout(loDir, 3, 1); @@ -189,7 +189,7 @@ GrepTool::GrepTool(TQWidget *parent, const char *name) cbRecursive->setChecked(config->readBoolEntry("Recursive", true)); loDir->addWidget(cbRecursive); - KButtonBox *actionbox = new KButtonBox(this, Qt::Vertical); + KButtonBox *actionbox = new KButtonBox(this, TQt::Vertical); layout->addWidget(actionbox, 0, 2); actionbox->addStretch(); btnSearch = static_cast<KPushButton*>(actionbox->addButton(KGuiItem(i18n("Find"),"edit-find"))); @@ -262,16 +262,16 @@ GrepTool::GrepTool(TQWidget *parent, const char *name) cmbFiles->installEventFilter( this ); cmbDir->comboBox()->installEventFilter( this ); - 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 & ))); + connect( cmbTemplate, TQ_SIGNAL(activated(int)), + TQ_SLOT(templateActivated(int)) ); + connect( lbResult, TQ_SIGNAL(selected(const TQString&)), + TQ_SLOT(itemSelected(const TQString&)) ); + connect( btnSearch, TQ_SIGNAL(clicked()), + TQ_SLOT(slotSearch()) ); + connect( btnClear, TQ_SIGNAL(clicked()), + TQ_SLOT(slotClear()) ); + connect( cmbPattern->lineEdit(), TQ_SIGNAL(textChanged ( const TQString & )), + TQ_SLOT( patternTextChanged( const TQString & ))); patternTextChanged( cmbPattern->lineEdit()->text()); } @@ -389,15 +389,15 @@ void GrepTool::slotSearch() *childproc << "/dev/null"; //trick to have grep always display the filename *childproc << ";"; - connect( childproc, TQT_SIGNAL(processExited(TDEProcess *)), - TQT_SLOT(childExited()) ); - connect( childproc, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), - TQT_SLOT(receivedOutput(TDEProcess *, char *, int)) ); - connect( childproc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), - TQT_SLOT(receivedErrOutput(TDEProcess *, char *, int)) ); + connect( childproc, TQ_SIGNAL(processExited(TDEProcess *)), + TQ_SLOT(childExited()) ); + connect( childproc, TQ_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + TQ_SLOT(receivedOutput(TDEProcess *, char *, int)) ); + connect( childproc, TQ_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + TQ_SLOT(receivedErrOutput(TDEProcess *, char *, int)) ); // actually it should be checked whether the process was started successfully - lbResult->setCursor( TQCursor(Qt::WaitCursor) ); + lbResult->setCursor( TQCursor(TQt::WaitCursor) ); btnClear->setEnabled( false ); btnSearch->setGuiItem( KGuiItem(i18n("Cancel"), "button_cancel")); childproc->start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput); @@ -532,8 +532,8 @@ void GrepTool::setDirName(const TQString &dir){ bool GrepTool::eventFilter( TQObject *o, TQEvent *e ) { if ( e->type() == TQEvent::KeyPress && ( - ((TQKeyEvent*)e)->key() == Qt::Key_Return || - ((TQKeyEvent*)e)->key() == Qt::Key_Enter ) ) + ((TQKeyEvent*)e)->key() == TQt::Key_Return || + ((TQKeyEvent*)e)->key() == TQt::Key_Enter ) ) { slotSearch(); return true; diff --git a/kate/app/kategrepdialog.h b/kate/app/kategrepdialog.h index 1bd930735..dbe722f20 100644 --- a/kate/app/kategrepdialog.h +++ b/kate/app/kategrepdialog.h @@ -37,7 +37,7 @@ class TQEvent; class GrepTool : public TQWidget { - Q_OBJECT + TQ_OBJECT public: GrepTool(TQWidget *parent, const char *name=0); diff --git a/kate/app/katemailfilesdialog.cpp b/kate/app/katemailfilesdialog.cpp index 2d933669a..9afa644cb 100644 --- a/kate/app/katemailfilesdialog.cpp +++ b/kate/app/katemailfilesdialog.cpp @@ -77,7 +77,7 @@ KateMailDialog::KateMailDialog( TQWidget *parent, KateMainWindow *mainwin ) i++; } list->hide(); - connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotShowButton()) ); + connect( this, TQ_SIGNAL(user1Clicked()), this, TQ_SLOT(slotShowButton()) ); mw->setMinimumSize( lInfo->sizeHint() ); } diff --git a/kate/app/katemailfilesdialog.h b/kate/app/katemailfilesdialog.h index a2de4e504..4b60a1946 100644 --- a/kate/app/katemailfilesdialog.h +++ b/kate/app/katemailfilesdialog.h @@ -36,7 +36,7 @@ class KateMainWindow; */ class KateMailDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KateMailDialog( TQWidget *parent=0, KateMainWindow *mainwin=0 ); diff --git a/kate/app/katemain.cpp b/kate/app/katemain.cpp index 2291a8668..d0212210b 100644 --- a/kate/app/katemain.cpp +++ b/kate/app/katemain.cpp @@ -57,7 +57,7 @@ static TDECmdLineOptions options[] = TDECmdLineLastOption }; -extern "C" KDE_EXPORT int kdemain( int argc, char **argv ) +extern "C" TDE_EXPORT int kdemain( int argc, char **argv ) { TDEConfig * config = NULL; bool alwaysUseInstance; diff --git a/kate/app/katemainwindow.cpp b/kate/app/katemainwindow.cpp index 906bac6f5..00f01dfe6 100644 --- a/kate/app/katemainwindow.cpp +++ b/kate/app/katemainwindow.cpp @@ -151,6 +151,8 @@ KateMainWindow::KateMainWindow (TDEConfig *sconfig, const TQString &sgroup) m_dcop = new KateMainWindowDCOPIface (this); + m_mainWindow->installEventFilter(this); + // setup the most important widgets setupMainWindow(); @@ -168,13 +170,13 @@ KateMainWindow::KateMainWindow (TDEConfig *sconfig, const TQString &sgroup) // connect documents menu aboutToshow documentMenu = (TQPopupMenu*)factory()->container("documents", this); - connect(documentMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(documentMenuAboutToShow())); + connect(documentMenu, TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(documentMenuAboutToShow())); // caption update for (uint i = 0; i < KateDocManager::self()->documents(); i++) slotDocumentCreated (KateDocManager::self()->document(i)); - connect(KateDocManager::self(),TQT_SIGNAL(documentCreated(Kate::Document *)),this,TQT_SLOT(slotDocumentCreated(Kate::Document *))); + connect(KateDocManager::self(),TQ_SIGNAL(documentCreated(Kate::Document *)),this,TQ_SLOT(slotDocumentCreated(Kate::Document *))); readOptions(); @@ -213,10 +215,11 @@ void KateMainWindow::setupMainWindow () KateMDI::ToolView *ft = createToolView("kate_filelist", KMultiTabBar::Left, SmallIcon("application-vnd.tde.tdemultiple"), i18n("Documents")); filelist = new KateFileList (this, m_viewManager, ft, "filelist"); filelist->readConfig(KateApp::self()->config(), "Filelist"); + filelist->viewport()->installEventFilter(this); KateMDI::ToolView *t = createToolView("kate_fileselector", KMultiTabBar::Left, SmallIcon("document-open"), i18n("Filesystem Browser")); fileselector = new KateFileSelector( this, m_viewManager, t, "operator"); - connect(fileselector->dirOperator(),TQT_SIGNAL(fileSelected(const KFileItem*)),this,TQT_SLOT(fileSelected(const KFileItem*))); + connect(fileselector->dirOperator(),TQ_SIGNAL(fileSelected(const KFileItem*)),this,TQ_SLOT(fileSelected(const KFileItem*))); KateMDI::ToolView *st = createToolView("kate_sessionpanel", KMultiTabBar::Left, SmallIcon("view_choose"), i18n("Sessions")); m_sessionpanel = new KateSessionPanel( this, m_viewManager, st, "sessionpanel"); @@ -226,8 +229,8 @@ void KateMainWindow::setupMainWindow () { t = createToolView("kate_greptool", KMultiTabBar::Bottom, SmallIcon("filefind"), i18n("Find in Files") ); greptool = new GrepTool( t, "greptool" ); - 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))); + connect(greptool, TQ_SIGNAL(itemSelected(const TQString &,int)), this, TQ_SLOT(slotGrepToolItemSelected(const TQString &,int))); + connect(t,TQ_SIGNAL(visibleChanged(bool)),this, TQ_SLOT(updateGrepDir (bool))); // WARNING HACK - anders: showing the greptool seems to make the menu accels work greptool->show(); @@ -243,25 +246,25 @@ void KateMainWindow::setupActions() { TDEAction *a; - KStdAction::openNew( TQT_TQOBJECT(m_viewManager), TQT_SLOT( slotDocumentNew() ), actionCollection(), "file_new" )->setWhatsThis(i18n("Create a new document")); - KStdAction::open( TQT_TQOBJECT(m_viewManager), TQT_SLOT( slotDocumentOpen() ), actionCollection(), "file_open" )->setWhatsThis(i18n("Open an existing document for editing")); + KStdAction::openNew( m_viewManager, TQ_SLOT( slotDocumentNew() ), actionCollection(), "file_new" )->setWhatsThis(i18n("Create a new document")); + KStdAction::open( m_viewManager, TQ_SLOT( slotDocumentOpen() ), actionCollection(), "file_open" )->setWhatsThis(i18n("Open an existing document for editing")); - fileOpenRecent = KStdAction::openRecent (TQT_TQOBJECT(m_viewManager), TQT_SLOT(openURL (const KURL&)), actionCollection()); + fileOpenRecent = KStdAction::openRecent (m_viewManager, TQ_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 TDEAction( i18n("Save A&ll"),"save_all", CTRL+Key_L, KateDocManager::self(), TQT_SLOT( saveAll() ), actionCollection(), "file_save_all" ); + a=new TDEAction( i18n("Save A&ll"),"save_all", CTRL+Key_L, KateDocManager::self(), TQ_SLOT( saveAll() ), actionCollection(), "file_save_all" ); a->setWhatsThis(i18n("Save all open, modified documents to disk.")); - KStdAction::close( TQT_TQOBJECT(m_viewManager), TQT_SLOT( slotDocumentClose() ), actionCollection(), "file_close" )->setWhatsThis(i18n("Close the current document.")); + KStdAction::close( m_viewManager, TQ_SLOT( slotDocumentClose() ), actionCollection(), "file_close" )->setWhatsThis(i18n("Close the current document.")); - a=new TDEAction( i18n( "Clos&e All" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotDocumentCloseAll() ), actionCollection(), "file_close_all" ); + a=new TDEAction( i18n( "Clos&e All" ), 0, this, TQ_SLOT( slotDocumentCloseAll() ), actionCollection(), "file_close_all" ); a->setWhatsThis(i18n("Close all open documents.")); - KStdAction::mail( TQT_TQOBJECT(this), TQT_SLOT(slotMail()), actionCollection() )->setWhatsThis(i18n("Send one or more of the open documents as email attachments.")); + KStdAction::mail( this, TQ_SLOT(slotMail()), actionCollection() )->setWhatsThis(i18n("Send one or more of the open documents as email attachments.")); - KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( slotFileQuit() ), actionCollection(), "file_quit" )->setWhatsThis(i18n("Close this window")); + KStdAction::quit( this, TQ_SLOT( slotFileQuit() ), actionCollection(), "file_quit" )->setWhatsThis(i18n("Close this window")); - a=new TDEAction(i18n("&New Window"), "window-new", 0, TQT_TQOBJECT(this), TQT_SLOT(newWindow()), actionCollection(), "view_new_view"); + a=new TDEAction(i18n("&New Window"), "window-new", 0, this, TQ_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") ) @@ -271,64 +274,64 @@ void KateMainWindow::setupActions() } TDEToggleAction* showFullScreenAction = KStdAction::fullScreen( 0, 0, actionCollection(),this); - connect( showFullScreenAction,TQT_SIGNAL(toggled(bool)), this,TQT_SLOT(slotFullScreen(bool))); + connect( showFullScreenAction,TQ_SIGNAL(toggled(bool)), this,TQ_SLOT(slotFullScreen(bool))); documentOpenWith = new TDEActionMenu(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(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(mSlotFixOpenWithMenu())); - connect(documentOpenWith->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotOpenWithMenuAction(int))); + connect(documentOpenWith->popupMenu(), TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(mSlotFixOpenWithMenu())); + connect(documentOpenWith->popupMenu(), TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotOpenWithMenuAction(int))); - a=KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(editKeys()), actionCollection()); + a=KStdAction::keyBindings(this, TQ_SLOT(editKeys()), actionCollection()); a->setWhatsThis(i18n("Configure the application's keyboard shortcut assignments.")); - a=KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotEditToolbars()), actionCollection()); + a=KStdAction::configureToolbars(this, TQ_SLOT(slotEditToolbars()), actionCollection()); a->setWhatsThis(i18n("Configure which items should appear in the toolbar(s).")); - TDEAction* settingsConfigure = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotConfigure()), actionCollection(), "settings_configure"); + TDEAction* settingsConfigure = KStdAction::preferences(this, TQ_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 TDEAction(i18n("&Pipe to Console"), "pipe", 0, TQT_TQOBJECT(console), TQT_SLOT(slotPipeToConsole()), actionCollection(), "tools_pipe_to_terminal"); + new TDEAction(i18n("&Pipe to Console"), "pipe", 0, console, TQ_SLOT(slotPipeToConsole()), actionCollection(), "tools_pipe_to_terminal"); // tip of the day :-) - KStdAction::tipOfDay( TQT_TQOBJECT(this), TQT_SLOT( tipOfTheDay() ), actionCollection() )->setWhatsThis(i18n("This shows useful tips on the use of this application.")); + KStdAction::tipOfDay( this, TQ_SLOT( tipOfTheDay() ), actionCollection() )->setWhatsThis(i18n("This shows useful tips on the use of this application.")); if (KatePluginManager::self()->pluginList().count() > 0) { - a=new TDEAction(i18n("&Plugins Handbook"), 0, TQT_TQOBJECT(this), TQT_SLOT(pluginHelp()), actionCollection(), "help_plugins_contents"); + a=new TDEAction(i18n("&Plugins Handbook"), 0, this, TQ_SLOT(pluginHelp()), actionCollection(), "help_plugins_contents"); a->setWhatsThis(i18n("This shows help files for various available plugins.")); } - connect(m_viewManager,TQT_SIGNAL(viewChanged()),TQT_TQOBJECT(this),TQT_SLOT(slotWindowActivated())); - connect(m_viewManager,TQT_SIGNAL(viewChanged()),TQT_TQOBJECT(this),TQT_SLOT(slotUpdateOpenWith())); + connect(m_viewManager,TQ_SIGNAL(viewChanged()),this,TQ_SLOT(slotWindowActivated())); + connect(m_viewManager,TQ_SIGNAL(viewChanged()),this,TQ_SLOT(slotUpdateOpenWith())); slotWindowActivated (); // session actions - new TDEAction(i18n("&New"), "list-add", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotNewSession()), actionCollection(), "session_new"); - new TDEAction(i18n("&Save"), "document-save", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSaveSession()), actionCollection(), "session_save"); - new TDEAction(i18n("Save &As..."), "document-save-as", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSaveSessionAs()), actionCollection(), "session_save_as"); + new TDEAction(i18n("&New"), "list-add", 0, + m_sessionpanel, TQ_SLOT(slotNewSession()), actionCollection(), "session_new"); + new TDEAction(i18n("&Save"), "document-save", 0, + m_sessionpanel, TQ_SLOT(slotSaveSession()), actionCollection(), "session_save"); + new TDEAction(i18n("Save &As..."), "document-save-as", 0, + m_sessionpanel, TQ_SLOT(slotSaveSessionAs()), actionCollection(), "session_save_as"); new TDEAction(i18n("&Rename"), "edit_user", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotRenameSession()), actionCollection(), "session_rename"); + m_sessionpanel, TQ_SLOT(slotRenameSession()), actionCollection(), "session_rename"); new TDEAction(i18n("&Delete"), "edit-delete", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotDeleteSession()), actionCollection(), "session_delete"); + m_sessionpanel, TQ_SLOT(slotDeleteSession()), actionCollection(), "session_delete"); new TDEAction(i18n("Re&load"), "reload", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotReloadSession()), actionCollection(), "session_reload"); + m_sessionpanel, TQ_SLOT(slotReloadSession()), actionCollection(), "session_reload"); new TDEAction(i18n("Acti&vate"), "forward", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotActivateSession()), actionCollection(), "session_activate"); + m_sessionpanel, TQ_SLOT(slotActivateSession()), actionCollection(), "session_activate"); new TDEToggleAction(i18n("Toggle read &only"), "encrypted", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSessionToggleReadOnly()), actionCollection(), "session_toggle_read_only"); + m_sessionpanel, TQ_SLOT(slotSessionToggleReadOnly()), actionCollection(), "session_toggle_read_only"); new TDEAction(i18n("Move &Up"), "go-up", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSessionMoveUp()), actionCollection(), "session_move_up"); + m_sessionpanel, TQ_SLOT(slotSessionMoveUp()), actionCollection(), "session_move_up"); new TDEAction(i18n("Move Do&wn"), "go-down", 0, - TQT_TQOBJECT(m_sessionpanel), TQT_SLOT(slotSessionMoveDown()), actionCollection(), "session_move_down"); + m_sessionpanel, TQ_SLOT(slotSessionMoveDown()), actionCollection(), "session_move_down"); new KateSessionListActionMenu(this, i18n("Sele&ct session"), actionCollection(), "session_list"); - connect(m_sessionpanel, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectionChanged())); + connect(m_sessionpanel, TQ_SIGNAL(selectionChanged()), this, TQ_SLOT(slotSelectionChanged())); } KateTabWidget *KateMainWindow::tabWidget () @@ -412,7 +415,7 @@ void KateMainWindow::slotEditToolbars() { saveMainWindowSettings( KateApp::self()->config(), "MainWindow" ); KEditToolbar dlg( factory() ); - connect( &dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()) ); + connect( &dlg, TQ_SIGNAL(newToolbarConfig()), this, TQ_SLOT(slotNewToolbarConfig()) ); dlg.exec(); } @@ -423,7 +426,7 @@ void KateMainWindow::slotNewToolbarConfig() void KateMainWindow::slotFileQuit() { - KateApp::self()->shutdownKate(this); + KateApp::self()->shutdownKate(this); } void KateMainWindow::readOptions () @@ -514,7 +517,7 @@ void KateMainWindow::documentMenuAboutToShow() Kate::Document* doc = ((KateFileListItem *)item)->document(); documentMenu->insertItem ( doc->isModified() ? i18n("'document name [*]', [*] means modified", "%1 [*]").arg(name) : name, - m_viewManager, TQT_SLOT (activateView (int)), 0, + m_viewManager, TQ_SLOT (activateView (int)), 0, ((KateFileListItem *)item)->documentNumber () ); item = item->nextSibling(); @@ -596,7 +599,7 @@ void KateMainWindow::slotConfigure() dlg->exec(); delete dlg; - + // Inform Kate that options may have been changed KateApp::self()->reparse_config(); } @@ -816,9 +819,9 @@ bool KateMainWindow::showModOnDiskPrompt() void KateMainWindow::slotDocumentCreated (Kate::Document *doc) { - connect(doc,TQT_SIGNAL(modStateChanged(Kate::Document *)),this,TQT_SLOT(updateCaption(Kate::Document *))); - connect(doc,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(slotNameChanged(Kate::Document *))); - connect(doc,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(slotUpdateOpenWith())); + connect(doc,TQ_SIGNAL(modStateChanged(Kate::Document *)),this,TQ_SLOT(updateCaption(Kate::Document *))); + connect(doc,TQ_SIGNAL(nameChanged(Kate::Document *)),this,TQ_SLOT(slotNameChanged(Kate::Document *))); + connect(doc,TQ_SIGNAL(nameChanged(Kate::Document *)),this,TQ_SLOT(slotUpdateOpenWith())); updateCaption (doc); } @@ -848,7 +851,7 @@ void KateMainWindow::updateCaption(Kate::Document *doc) } else { - c = m_viewManager->activeView()->getDoc()->url().prettyURL(); + c = m_viewManager->activeView()->getDoc()->url().pathOrURL(); } if (showSessionName) @@ -888,6 +891,24 @@ void KateMainWindow::readProperties(TDEConfig *config) config->setGroup(grp); } +bool KateMainWindow::eventFilter(TQObject *obj, TQEvent *ev) +{ + if (ev->type() == TQEvent::MouseButtonRelease) + { + TQMouseEvent *mouseEvent = static_cast<TQMouseEvent *>(ev); + switch (mouseEvent->button()) + { + case TQMouseEvent::HistoryBackButton: + filelist->slotPrevDocument(); + return true; + case TQMouseEvent::HistoryForwardButton: + filelist->slotNextDocument(); + return true; + } + } + return false; +} + //------------------------------------------- void KateMainWindow::slotSelectionChanged() { @@ -905,8 +926,8 @@ void KateMainWindow::slotSelectionChanged() if (a) { a->setEnabled((*spa_it)->isEnabled()); - } - } + } + } } //------------------------------------------- @@ -916,7 +937,7 @@ void KateMainWindow::activateSession(int sessionId) { return; } - + // Select the required session in the session panel's listview TQListViewItem *item = m_sessionpanel->m_listview->firstChild(); int idx = 0; @@ -937,7 +958,7 @@ void KateMainWindow::activateSession(int sessionId) KateSessionListActionMenu::KateSessionListActionMenu(KateMainWindow *mw, const TQString &text, TQObject *parent, const char *name) : TDEActionMenu(text, parent, name), m_mainWindow(mw) { - connect(popupMenu(), TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotAboutToShow())); + connect(popupMenu(), TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(slotAboutToShow())); } //------------------------------------------- @@ -948,6 +969,6 @@ void KateSessionListActionMenu::slotAboutToShow() TQPtrList<KateSession> &sessions = KateApp::self()->sessionManager()->getSessionsList(); for (int idx = 0; idx < (int)sessions.count(); ++idx) { - popupMenu()->insertItem(sessions[idx]->getSessionName(), m_mainWindow, TQT_SLOT(activateSession(int)), 0, idx); + popupMenu()->insertItem(sessions[idx]->getSessionName(), m_mainWindow, TQ_SLOT(activateSession(int)), 0, idx); } } diff --git a/kate/app/katemainwindow.h b/kate/app/katemainwindow.h index f458bd705..8901be978 100644 --- a/kate/app/katemainwindow.h +++ b/kate/app/katemainwindow.h @@ -47,7 +47,7 @@ class KateExternalToolsMenuAction; class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBase { - Q_OBJECT + TQ_OBJECT friend class KateConfigDialog; friend class KateViewManager; @@ -105,16 +105,16 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa bool queryClose_internal(); void openURL (const TQString &name=0L); - + public slots: /** * update "Sessions" menu status when selection in session panel has changed */ void slotSelectionChanged(); - + /** * activate the specified session. When there is the need to activate a session - * from the outside (for example from DCOP), using this method assures that + * from the outside (for example from DCOP), using this method assures that * the session activation is consistent with the behavior of the session panel * @param sessionId the id of the session to activate */ @@ -176,9 +176,10 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa void updateGrepDir (bool visible); void slotDocumentCloseAll(); - + protected: bool event( TQEvent * ); + bool eventFilter(TQObject *obj, TQEvent *ev); private: static uint uniqueID; @@ -215,14 +216,14 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa KateExternalToolsMenuAction *externalTools; GrepTool * greptool; - bool m_modignore, m_grrr; + bool m_modignore; KateTabWidget *m_tabWidget; }; class KateSessionListActionMenu : public TDEActionMenu { - Q_OBJECT + TQ_OBJECT public: KateSessionListActionMenu(KateMainWindow *mw, const TQString &text, TQObject *parent = NULL, const char *name = NULL); @@ -230,7 +231,7 @@ class KateSessionListActionMenu : public TDEActionMenu public slots: void slotAboutToShow(); - + protected: KateMainWindow *m_mainWindow; }; diff --git a/kate/app/katemdi.cpp b/kate/app/katemdi.cpp index 473d26014..15b4e62d1 100644 --- a/kate/app/katemdi.cpp +++ b/kate/app/katemdi.cpp @@ -71,8 +71,8 @@ ToggleToolViewAction::ToggleToolViewAction ( const TQString& text, const TDEShor : TDEToggleAction(text,cut,parent,name) , m_tv(tv) { - connect(this,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool))); - connect(m_tv,TQT_SIGNAL(visibleChanged(bool)),this,TQT_SLOT(visibleChanged(bool))); + connect(this,TQ_SIGNAL(toggled(bool)),this,TQ_SLOT(slotToggled(bool))); + connect(m_tv,TQ_SIGNAL(visibleChanged(bool)),this,TQ_SLOT(visibleChanged(bool))); setChecked(m_tv->visible()); } @@ -123,8 +123,8 @@ GUIClient::GUIClient ( MainWindow *mw ) , KXMLGUIClient ( mw ) , m_mw (mw) { - connect( m_mw->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ), - this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) ); + connect( m_mw->guiFactory(), TQ_SIGNAL( clientAdded( KXMLGUIClient * ) ), + this, TQ_SLOT( clientAdded( KXMLGUIClient * ) ) ); if ( domDocument().documentElement().isNull() ) { @@ -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, TQT_SIGNAL( toggled( bool ) ), - m_mw, TQT_SLOT( setSidebarsVisible( bool ) ) ); + connect( m_showSidebarsAction, TQ_SIGNAL( toggled( bool ) ), + m_mw, TQ_SLOT( setSidebarsVisible( bool ) ) ); m_toolMenu->insert( m_showSidebarsAction ); m_toolMenu->insert( new TDEActionSeparator( m_toolMenu ) ); @@ -256,8 +256,8 @@ bool ToolView::visible () const void ToolView::childEvent ( TQChildEvent *ev ) { // set the widget to be focus proxy if possible - if (ev->inserted() && ev->child() && TQT_TQOBJECT(ev->child())->tqt_cast(TQWIDGET_OBJECT_NAME_STRING)) { - setFocusProxy (::tqqt_cast<QWidget*>(TQT_TQOBJECT(ev->child()))); + if (ev->inserted() && ev->child() && ev->child()->tqt_cast("TQWidget")) { + setFocusProxy (::tqt_cast<TQWidget*>(ev->child())); } TQVBox::childEvent (ev); @@ -286,7 +286,7 @@ Sidebar::~Sidebar () void Sidebar::setSplitter (Splitter *sp) { m_splitter = sp; - m_ownSplit = new Splitter ((position() == KMultiTabBar::Top || position() == KMultiTabBar::Bottom) ? Qt::Horizontal : Qt::Vertical, m_splitter); + m_ownSplit = new Splitter ((position() == KMultiTabBar::Top || position() == KMultiTabBar::Bottom) ? TQt::Horizontal : TQt::Vertical, m_splitter); m_ownSplit->setOpaqueResize( TDEGlobalSettings::opaqueResize() ); m_ownSplit->setChildrenCollapsible( false ); m_splitter->setResizeMode( m_ownSplit, TQSplitter::KeepSize ); @@ -332,7 +332,7 @@ ToolView *Sidebar::addWidget (const TQPixmap &icon, const TQString &text, ToolVi show (); - connect(tab(newId),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(tabClicked(int))); + connect(tab(newId),TQ_SIGNAL(clicked(int)),this,TQ_SLOT(tabClicked(int))); tab(newId)->installEventFilter(this); return widget; @@ -449,7 +449,7 @@ bool Sidebar::eventFilter(TQObject *obj, TQEvent *ev) if (ev->type()==TQEvent::ContextMenu) { TQContextMenuEvent *e = (TQContextMenuEvent *) ev; - KMultiTabBarTab *bt = tqt_dynamic_cast<KMultiTabBarTab*>(obj); + KMultiTabBarTab *bt = dynamic_cast<KMultiTabBarTab*>(obj); if (bt) { kdDebug()<<"Request for popup"<<endl; @@ -480,8 +480,8 @@ bool Sidebar::eventFilter(TQObject *obj, TQEvent *ev) if (position() != 3) p->insertItem(SmallIconSet("go-down"), i18n("Bottom Sidebar"),3); - connect(p, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(buttonPopupActivate(int))); + connect(p, TQ_SIGNAL(activated(int)), + this, TQ_SLOT(buttonPopupActivate(int))); p->exec(e->globalPos()); delete p; @@ -596,7 +596,7 @@ void Sidebar::restoreSession (TDEConfig *config) // readd the button int newId = m_widgetToId[tv]; appendTab (tv->icon, newId, tv->text); - connect(tab(newId),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(tabClicked(int))); + connect(tab(newId),TQ_SIGNAL(clicked(int)),this,TQ_SLOT(tabClicked(int))); tab(newId)->installEventFilter(this); // reshuffle in splitter @@ -672,7 +672,7 @@ MainWindow::MainWindow (TQWidget* parentWidget, const char* name) m_sidebars[KMultiTabBar::Left] = new Sidebar (KMultiTabBar::Left, this, hb); - m_hSplitter = new Splitter (Qt::Horizontal, hb); + m_hSplitter = new Splitter (TQt::Horizontal, hb); m_hSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() ); m_sidebars[KMultiTabBar::Left]->setSplitter (m_hSplitter); @@ -682,7 +682,7 @@ MainWindow::MainWindow (TQWidget* parentWidget, const char* name) m_sidebars[KMultiTabBar::Top] = new Sidebar (KMultiTabBar::Top, this, vb); - m_vSplitter = new Splitter (Qt::Vertical, vb); + m_vSplitter = new Splitter (TQt::Vertical, vb); m_vSplitter->setOpaqueResize( TDEGlobalSettings::opaqueResize() ); m_sidebars[KMultiTabBar::Top]->setSplitter (m_vSplitter); diff --git a/kate/app/katemdi.h b/kate/app/katemdi.h index f37d56ef3..f9eef3bda 100644 --- a/kate/app/katemdi.h +++ b/kate/app/katemdi.h @@ -40,7 +40,7 @@ namespace KateMDI { /** This class is needed because TQSplitter cant return an index for a widget. */ class Splitter : public TQSplitter { - Q_OBJECT + TQ_OBJECT public: @@ -60,7 +60,7 @@ class Splitter : public TQSplitter class ToggleToolViewAction : public TDEToggleAction { - Q_OBJECT + TQ_OBJECT public: @@ -79,7 +79,7 @@ class ToggleToolViewAction : public TDEToggleAction class GUIClient : public TQObject, public KXMLGUIClient { - Q_OBJECT + TQ_OBJECT public: @@ -104,7 +104,7 @@ class GUIClient : public TQObject, public KXMLGUIClient class ToolView : public TQVBox { - Q_OBJECT + TQ_OBJECT friend class Sidebar; @@ -179,7 +179,7 @@ class ToolView : public TQVBox class Sidebar : public KMultiTabBar { - Q_OBJECT + TQ_OBJECT public: @@ -252,7 +252,7 @@ class Sidebar : public KMultiTabBar class MainWindow : public KParts::MainWindow { - Q_OBJECT + TQ_OBJECT friend class ToolView; diff --git a/kate/app/katemwmodonhddialog.cpp b/kate/app/katemwmodonhddialog.cpp index c908b3617..ffdd92fa7 100644 --- a/kate/app/katemwmodonhddialog.cpp +++ b/kate/app/katemwmodonhddialog.cpp @@ -44,7 +44,7 @@ class KateDocItem : public TQCheckListItem { public: KateDocItem( Kate::Document *doc, const TQString &status, TDEListView *lv ) - : TQCheckListItem( lv, doc->url().prettyURL(), CheckBox ), + : TQCheckListItem( lv, doc->url().pathOrURL(), CheckBox ), document( doc ) { setText( 1, status ); @@ -99,7 +99,7 @@ KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, TQWidget *parent, cons for ( uint i=0; i < docs.size(); i++ ) new KateDocItem( docs[i], l[ (uint)KateDocManager::self()->documentInfo( docs[i] )->modifiedOnDiscReason ], lvDocuments ); - connect( lvDocuments, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) ); + connect( lvDocuments, TQ_SIGNAL(selectionChanged()), this, TQ_SLOT(slotSelectionChanged()) ); // diff button TQHBox *lo2 = new TQHBox ( w ); @@ -111,7 +111,7 @@ KateMwModOnHdDialog::KateMwModOnHdDialog( DocVector docs, TQWidget *parent, cons "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, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDiff()) ); + connect( btnDiff, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotDiff()) ); slotSelectionChanged(); m_tmpfile = 0; @@ -143,12 +143,12 @@ void KateMwModOnHdDialog::handleSelected( int action ) for ( TQListViewItemIterator it ( lvDocuments ); it.current(); ++it ) { KateDocItem *item = static_cast<KateDocItem *>(it.current()); - + if ( item->isOn() ) { int reason = (int)KateDocManager::self()->documentInfo( item->document )->modifiedOnDiscReason; bool succes = true; - + Kate::DocumentExt *dext = documentExt( item->document ); if ( ! dext ) continue; @@ -161,7 +161,7 @@ void KateMwModOnHdDialog::handleSelected( int action ) { KMessageBox::sorry( this, i18n("Could not save the document \n'%1'"). - arg( item->document->url().prettyURL() ) ); + arg( item->document->url().pathOrURL() ) ); } break; @@ -216,8 +216,8 @@ void KateMwModOnHdDialog::slotDiff() KProcIO *p = new KProcIO(); p->setComm( TDEProcess::All ); *p << "diff" << "-u" << "-" << doc->url().path(); - connect( p, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotPDone(TDEProcess*)) ); - connect( p, TQT_SIGNAL(readReady(KProcIO*)), this, TQT_SLOT(slotPRead(KProcIO*)) ); + connect( p, TQ_SIGNAL(processExited(TDEProcess*)), this, TQ_SLOT(slotPDone(TDEProcess*)) ); + connect( p, TQ_SIGNAL(readReady(KProcIO*)), this, TQ_SLOT(slotPRead(KProcIO*)) ); setCursor( WaitCursor ); diff --git a/kate/app/katemwmodonhddialog.h b/kate/app/katemwmodonhddialog.h index ff2f4989d..2ca012f84 100644 --- a/kate/app/katemwmodonhddialog.h +++ b/kate/app/katemwmodonhddialog.h @@ -33,7 +33,7 @@ class TDEProcess; */ class KateMwModOnHdDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KateMwModOnHdDialog( DocVector docs, TQWidget *parent=0, const char *name=0 ); ~KateMwModOnHdDialog(); diff --git a/kate/app/katepluginmanager.h b/kate/app/katepluginmanager.h index 1617c5501..e8fbddcb0 100644 --- a/kate/app/katepluginmanager.h +++ b/kate/app/katepluginmanager.h @@ -43,7 +43,7 @@ typedef TQValueList<KatePluginInfo> KatePluginList; class KatePluginManager : public TQObject { - Q_OBJECT + TQ_OBJECT public: KatePluginManager(TQObject *parent); diff --git a/kate/app/katesavemodifieddialog.cpp b/kate/app/katesavemodifieddialog.cpp index 9ff79dfb4..4fca9b763 100644 --- a/kate/app/katesavemodifieddialog.cpp +++ b/kate/app/katesavemodifieddialog.cpp @@ -156,11 +156,11 @@ KateSaveModifiedDialog::KateSaveModifiedDialog(TQWidget *parent, TQPtrList<Kate: } m_documentRoot->setOpen(true); } else m_documentRoot=0; - 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())); + connect(m_list, TQ_SIGNAL(clicked(TQListViewItem *)), TQ_SLOT(slotItemSelected())); + connect(m_list, TQ_SIGNAL(doubleClicked(TQListViewItem *)), TQ_SLOT(slotItemSelected())); + connect(m_list, TQ_SIGNAL(spacePressed(TQListViewItem *)), TQ_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 TQPushButton(i18n("Se&lect All"),box),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotSelectAll())); + connect(new TQPushButton(i18n("Se&lect All"),box),TQ_SIGNAL(clicked()),this,TQ_SLOT(slotSelectAll())); } } diff --git a/kate/app/katesavemodifieddialog.h b/kate/app/katesavemodifieddialog.h index 92036c63c..e66da24d4 100644 --- a/kate/app/katesavemodifieddialog.h +++ b/kate/app/katesavemodifieddialog.h @@ -26,7 +26,7 @@ class TQListViewItem; class TDEListView; class KateSaveModifiedDialog: public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KateSaveModifiedDialog(TQWidget *parent, TQPtrList<Kate::Document> documents); virtual ~KateSaveModifiedDialog(); diff --git a/kate/app/katesession.cpp b/kate/app/katesession.cpp index bab8dce56..d57101310 100644 --- a/kate/app/katesession.cpp +++ b/kate/app/katesession.cpp @@ -847,8 +847,8 @@ KateSessionChooser::KateSessionChooser(TQWidget *parent) m_listview->setSorting(-1); m_listview->setResizeMode(TQListView::LastColumn); - connect (m_listview, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); - connect (m_listview, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotUser2())); + connect (m_listview, TQ_SIGNAL(selectionChanged()), this, TQ_SLOT(slotSelectionChanged())); + connect (m_listview, TQ_SIGNAL(executed(TQListViewItem*)), this, TQ_SLOT(slotUser2())); TQPtrList<KateSession> &sessions = KateSessionManager::self()->getSessionsList(); for (int idx = sessions.count()-1; idx >= 0; --idx) diff --git a/kate/app/katesession.h b/kate/app/katesession.h index e4a31f441..fa267e91f 100644 --- a/kate/app/katesession.h +++ b/kate/app/katesession.h @@ -175,7 +175,7 @@ class KateSession //FIXME add kdDebug statement to ease debugging class KateSessionManager : public TQObject { - Q_OBJECT + TQ_OBJECT public: @@ -503,7 +503,7 @@ class KateSessionChooserItem : public TDEListViewItem //FIXME create one single KateSessionChooser and reuse it all the time class KateSessionChooser : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: enum Result diff --git a/kate/app/katesessionpanel.cpp b/kate/app/katesessionpanel.cpp index c2f262ff8..e05da91cd 100644 --- a/kate/app/katesessionpanel.cpp +++ b/kate/app/katesessionpanel.cpp @@ -64,7 +64,7 @@ KateSessionNameChooser::KateSessionNameChooser(TQWidget *parent, bool showSwitch m_activateCB->setChecked(true); } - connect(m_sessionNameLE, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotTextChanged())); + connect(m_sessionNameLE, TQ_SIGNAL(textChanged(const TQString&)), this, TQ_SLOT(slotTextChanged())); slotTextChanged(); // update button status } @@ -146,28 +146,28 @@ KateSessionPanel::KateSessionPanel(KateMainWindow *mainWindow, KateViewManager * //m_listview->setRootIsDecorated(true); // FIXME disabled until doc list software is developed - connect(m_listview, TQT_SIGNAL(selectionChanged()), - this, TQT_SLOT(slotSelectionChanged())); - connect(m_listview, TQT_SIGNAL(executed(TQListViewItem*)), - this, TQT_SLOT(slotItemExecuted(TQListViewItem*))); - connect(m_listview, TQT_SIGNAL(returnPressed(TQListViewItem*)), - this, TQT_SLOT(slotItemExecuted(TQListViewItem*))); - connect(KateApp::self(), TQT_SIGNAL(optionsChanged()), - this, TQT_SLOT(slotSelectionChanged())); - connect(m_sessionManager, TQT_SIGNAL(switchOptionChanged()), - this, TQT_SLOT(slotSelectionChanged())); - connect(m_sessionManager, TQT_SIGNAL(sessionActivated(int, int)), - this, TQT_SLOT(slotSessionActivated(int, int))); - connect(m_sessionManager, TQT_SIGNAL(sessionCreated(int)), - this, TQT_SLOT(slotSessionCreated(int))); - connect(m_sessionManager, TQT_SIGNAL(sessionDeleted(int)), - this, TQT_SLOT(slotSessionDeleted(int))); - connect(m_sessionManager, TQT_SIGNAL(sessionsSwapped(int, int)), - this, TQT_SLOT(slotSessionsSwapped(int, int))); - connect(m_sessionManager, TQT_SIGNAL(sessionRenamed(int)), - this, TQT_SLOT(slotSessionRenamed(int))); - connect(m_listview, TQT_SIGNAL(itemRenamed(TQListViewItem*)), - this, TQT_SLOT(slotLVSessionRenamed(TQListViewItem*))); + connect(m_listview, TQ_SIGNAL(selectionChanged()), + this, TQ_SLOT(slotSelectionChanged())); + connect(m_listview, TQ_SIGNAL(executed(TQListViewItem*)), + this, TQ_SLOT(slotItemExecuted(TQListViewItem*))); + connect(m_listview, TQ_SIGNAL(returnPressed(TQListViewItem*)), + this, TQ_SLOT(slotItemExecuted(TQListViewItem*))); + connect(KateApp::self(), TQ_SIGNAL(optionsChanged()), + this, TQ_SLOT(slotSelectionChanged())); + connect(m_sessionManager, TQ_SIGNAL(switchOptionChanged()), + this, TQ_SLOT(slotSelectionChanged())); + connect(m_sessionManager, TQ_SIGNAL(sessionActivated(int, int)), + this, TQ_SLOT(slotSessionActivated(int, int))); + connect(m_sessionManager, TQ_SIGNAL(sessionCreated(int)), + this, TQ_SLOT(slotSessionCreated(int))); + connect(m_sessionManager, TQ_SIGNAL(sessionDeleted(int)), + this, TQ_SLOT(slotSessionDeleted(int))); + connect(m_sessionManager, TQ_SIGNAL(sessionsSwapped(int, int)), + this, TQ_SLOT(slotSessionsSwapped(int, int))); + connect(m_sessionManager, TQ_SIGNAL(sessionRenamed(int)), + this, TQ_SLOT(slotSessionRenamed(int))); + connect(m_listview, TQ_SIGNAL(itemRenamed(TQListViewItem*)), + this, TQ_SLOT(slotLVSessionRenamed(TQListViewItem*))); TQPtrList<KateSession>& sessions = m_sessionManager->getSessionsList(); for (int idx = sessions.count() - 1; idx >= 0; --idx) @@ -199,45 +199,45 @@ void KateSessionPanel::setup_toolbar() TDEAction *a; a = new TDEAction(i18n("New"), SmallIcon("list-add"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotNewSession()), m_actionCollection, "session_new"); + this, TQ_SLOT(slotNewSession()), m_actionCollection, "session_new"); a->setWhatsThis(i18n("Create a new session and switch to it.")); a->plug(m_toolbar); a = new TDEAction(i18n("Save"), SmallIcon("document-save"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSaveSession()), m_actionCollection, "session_save"); + this, TQ_SLOT(slotSaveSession()), m_actionCollection, "session_save"); a->setWhatsThis(i18n("Save the selected session.")); a->plug(m_toolbar); a = new TDEAction(i18n("Save as..."), SmallIcon("document-save-as"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSaveSessionAs()), m_actionCollection, "session_save_as"); + this, TQ_SLOT(slotSaveSessionAs()), m_actionCollection, "session_save_as"); a->setWhatsThis(i18n("Save an unsaved session with a new name or clone an already saved session " "into a new session.")); a->plug(m_toolbar); a = new TDEAction(i18n("Rename"), SmallIcon("edit_user"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotRenameSession()), m_actionCollection, "session_rename"); + this, TQ_SLOT(slotRenameSession()), m_actionCollection, "session_rename"); a->setWhatsThis(i18n("Rename the selected session.")); a->plug(m_toolbar); a = new TDEAction(i18n("Delete"), SmallIcon("edit-delete"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotDeleteSession()), m_actionCollection, "session_delete"); + this, TQ_SLOT(slotDeleteSession()), m_actionCollection, "session_delete"); a->setWhatsThis(i18n("Delete the selected session.")); a->plug(m_toolbar); a = new TDEAction(i18n("Reload"), SmallIcon("reload"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotReloadSession()), m_actionCollection, "session_reload"); + this, TQ_SLOT(slotReloadSession()), m_actionCollection, "session_reload"); a->setWhatsThis(i18n("Reload the last saved state of the selected session.")); a->plug(m_toolbar); m_toolbar->insertLineSeparator(); a = new TDEAction(i18n("Activate"), SmallIcon("forward"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotActivateSession()), m_actionCollection, "session_activate"); + this, TQ_SLOT(slotActivateSession()), m_actionCollection, "session_activate"); a->setWhatsThis(i18n("Activate the selected session.")); a->plug(m_toolbar); TDEToggleAction *tglA = new TDEToggleAction(i18n("Toggle read only"), SmallIcon("encrypted"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSessionToggleReadOnly()), m_actionCollection, "session_toggle_read_only"); + this, TQ_SLOT(slotSessionToggleReadOnly()), m_actionCollection, "session_toggle_read_only"); tglA->setWhatsThis(i18n("Toggle read only status for the selected session.<p>" "In a read only session, you can work as usual but the list of documents in the session " "will not be saved when you exit Kate or switch to another session.<p>" @@ -245,12 +245,12 @@ void KateSessionPanel::setup_toolbar() tglA->plug(m_toolbar); a = new TDEAction(i18n("Move Up"), SmallIcon("go-up"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSessionMoveUp()), m_actionCollection, "session_move_up"); + this, TQ_SLOT(slotSessionMoveUp()), m_actionCollection, "session_move_up"); a->setWhatsThis(i18n("Move up the selected session.")); a->plug(m_toolbar); a = new TDEAction(i18n("Move Down"), SmallIcon("go-down"), 0, - TQT_TQOBJECT(this), TQT_SLOT(slotSessionMoveDown()), m_actionCollection, "session_move_down"); + this, TQ_SLOT(slotSessionMoveDown()), m_actionCollection, "session_move_down"); a->setWhatsThis(i18n("Move down the selected session.")); a->plug(m_toolbar); } diff --git a/kate/app/katesessionpanel.h b/kate/app/katesessionpanel.h index 023de53e2..d8b1e156c 100644 --- a/kate/app/katesessionpanel.h +++ b/kate/app/katesessionpanel.h @@ -45,7 +45,7 @@ class TDEActionCollection; //FIXME improve string to distinguish between new session and saving an unnamed session class KateSessionNameChooser : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: @@ -72,7 +72,7 @@ class KateSessionNameChooser : public KDialogBase //BEGIN KateSessionPanelToolBarParent class KateSessionPanelToolBarParent: public TQFrame { - Q_OBJECT + TQ_OBJECT public: KateSessionPanelToolBarParent(TQWidget *parent) : TQFrame(parent), m_tbar(0) {} @@ -109,7 +109,7 @@ class KateSessionPanelItem : public TDEListViewItem //BEGIN KateSessionPanel class KateSessionPanel : public TQVBox { - Q_OBJECT + TQ_OBJECT friend class KateMainWindow; diff --git a/kate/app/katetabwidget.cpp b/kate/app/katetabwidget.cpp index e2ac7e8b3..20f2a230d 100644 --- a/kate/app/katetabwidget.cpp +++ b/kate/app/katetabwidget.cpp @@ -32,7 +32,7 @@ KateTabWidget::KateTabWidget(TQWidget* parent, const char* name) setHoverCloseButton(true); - connect(this, TQT_SIGNAL(closeRequest(TQWidget*)), this, TQT_SLOT(closeTab(TQWidget*))); + connect(this, TQ_SIGNAL(closeRequest(TQWidget*)), this, TQ_SLOT(closeTab(TQWidget*))); } KateTabWidget::~KateTabWidget() diff --git a/kate/app/katetabwidget.h b/kate/app/katetabwidget.h index 7e4327595..6bac94e1b 100644 --- a/kate/app/katetabwidget.h +++ b/kate/app/katetabwidget.h @@ -24,7 +24,7 @@ class KateTabWidget : public KTabWidget { - Q_OBJECT + TQ_OBJECT public: enum TabWidgetVisibility { diff --git a/kate/app/kateviewmanager.cpp b/kate/app/kateviewmanager.cpp index 7682b6cfd..6ae57f2ec 100644 --- a/kate/app/kateviewmanager.cpp +++ b/kate/app/kateviewmanager.cpp @@ -71,7 +71,7 @@ KateViewManager::KateViewManager (KateMainWindow *parent) m_viewManager = new Kate::ViewManager (this); m_currentContainer=0; - connect(m_mainWindow->tabWidget(),TQT_SIGNAL(currentChanged(TQWidget*)),this,TQT_SLOT(tabChanged(TQWidget*))); + connect(m_mainWindow->tabWidget(),TQ_SIGNAL(currentChanged(TQWidget*)),this,TQ_SLOT(tabChanged(TQWidget*))); slotNewTab(); tabChanged(m_mainWindow->tabWidget()->currentPage()); @@ -94,47 +94,47 @@ void KateViewManager::setupActions () /** * tabbing */ - a=new TDEAction ( i18n("New Tab"),"tab_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewTab()), + a=new TDEAction ( i18n("New Tab"),"tab_new", 0, this, TQ_SLOT(slotNewTab()), m_mainWindow->actionCollection(), "view_new_tab" ); - m_closeTab = new TDEAction ( i18n("Close Current Tab"),"tab_remove",0,TQT_TQOBJECT(this),TQT_SLOT(slotCloseTab()), + m_closeTab = new TDEAction ( i18n("Close Current Tab"),"tab_remove",0,this,TQ_SLOT(slotCloseTab()), m_mainWindow->actionCollection(),"view_close_tab"); m_activateNextTab = new TDEAction( i18n( "Activate Next Tab" ), TQApplication::reverseLayout() ? TDEStdAccel::tabPrev() : TDEStdAccel::tabNext(), - TQT_TQOBJECT(this), TQT_SLOT( activateNextTab() ), m_mainWindow->actionCollection(), "view_next_tab" ); + this, TQ_SLOT( activateNextTab() ), m_mainWindow->actionCollection(), "view_next_tab" ); m_activatePrevTab = new TDEAction( i18n( "Activate Previous Tab" ), TQApplication::reverseLayout() ? TDEStdAccel::tabNext() : TDEStdAccel::tabPrev(), - TQT_TQOBJECT(this), TQT_SLOT( activatePrevTab() ), m_mainWindow->actionCollection(), "view_prev_tab" ); + this, TQ_SLOT( activatePrevTab() ), m_mainWindow->actionCollection(), "view_prev_tab" ); /** * view splitting */ - a=new TDEAction ( i18n("Split Ve&rtical"), "view_right", CTRL+SHIFT+Key_L, TQT_TQOBJECT(this), TQT_SLOT( + a=new TDEAction ( i18n("Split Ve&rtical"), "view_right", CTRL+SHIFT+Key_L, this, TQ_SLOT( slotSplitViewSpaceVert() ), m_mainWindow->actionCollection(), "view_split_vert"); a->setWhatsThis(i18n("Split the currently active view vertically into two views.")); - a=new TDEAction ( i18n("Split &Horizontal"), "view_bottom", CTRL+SHIFT+Key_T, TQT_TQOBJECT(this), TQT_SLOT( + a=new TDEAction ( i18n("Split &Horizontal"), "view_bottom", CTRL+SHIFT+Key_T, this, TQ_SLOT( slotSplitViewSpaceHoriz() ), m_mainWindow->actionCollection(), "view_split_horiz"); a->setWhatsThis(i18n("Split the currently active view horizontally into two views.")); - m_closeView = new TDEAction ( i18n("Cl&ose Current View"), "view_remove", CTRL+SHIFT+Key_R, TQT_TQOBJECT(this), - TQT_SLOT( slotCloseCurrentViewSpace() ), m_mainWindow->actionCollection(), + m_closeView = new TDEAction ( i18n("Cl&ose Current View"), "view_remove", CTRL+SHIFT+Key_R, this, + TQ_SLOT( slotCloseCurrentViewSpace() ), m_mainWindow->actionCollection(), "view_close_current_space" ); m_closeView->setWhatsThis(i18n("Close the currently active splitted view")); - goNext=new TDEAction(i18n("Next View"),Key_F8,TQT_TQOBJECT(this), - TQT_SLOT(activateNextView()),m_mainWindow->actionCollection(),"go_next"); + goNext=new TDEAction(i18n("Next View"),Key_F8,this, + TQ_SLOT(activateNextView()),m_mainWindow->actionCollection(),"go_next"); goNext->setWhatsThis(i18n("Make the next split view the active one.")); - goPrev=new TDEAction(i18n("Previous View"),SHIFT+Key_F8, TQT_TQOBJECT(this), TQT_SLOT(activatePrevView()),m_mainWindow->actionCollection(),"go_prev"); + goPrev=new TDEAction(i18n("Previous View"),SHIFT+Key_F8, this, TQ_SLOT(activatePrevView()),m_mainWindow->actionCollection(),"go_prev"); goPrev->setWhatsThis(i18n("Make the previous split view the active one.")); @@ -142,16 +142,16 @@ void KateViewManager::setupActions () * buttons for tabbing */ TQToolButton *b = new TQToolButton( m_mainWindow->tabWidget() ); - connect( b, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( slotNewTab() ) ); + connect( b, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( slotNewTab() ) ); b->setIconSet( SmallIcon( "tab_new" ) ); b->adjustSize(); TQToolTip::add(b, i18n("Open a new tab")); m_mainWindow->tabWidget()->setCornerWidget( b, TopLeft ); b = m_closeTabButton = new TQToolButton( m_mainWindow->tabWidget() ); - connect( b, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( slotCloseTab() ) ); + connect( b, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( slotCloseTab() ) ); b->setIconSet( SmallIcon( "tab_remove" ) ); b->adjustSize(); TQToolTip::add(b, i18n("Close the current tab")); @@ -199,8 +199,8 @@ void KateViewManager::slotNewTab() m_viewSpaceContainerList.append(container); m_mainWindow->tabWidget()->addTab (container, ""); - connect(container,TQT_SIGNAL(viewChanged()),this,TQT_SIGNAL(viewChanged())); - connect(container,TQT_SIGNAL(viewChanged()),m_viewManager,TQT_SIGNAL(viewChanged())); + connect(container,TQ_SIGNAL(viewChanged()),this,TQ_SIGNAL(viewChanged())); + connect(container,TQ_SIGNAL(viewChanged()),m_viewManager,TQ_SIGNAL(viewChanged())); if (!m_init) { diff --git a/kate/app/kateviewmanager.h b/kate/app/kateviewmanager.h index d16b59dc2..f67eb4758 100644 --- a/kate/app/kateviewmanager.h +++ b/kate/app/kateviewmanager.h @@ -38,7 +38,7 @@ class TQToolButton; class KateViewManager : public TQObject { - Q_OBJECT + TQ_OBJECT public: KateViewManager (KateMainWindow *parent); diff --git a/kate/app/kateviewspace.cpp b/kate/app/kateviewspace.cpp index 7278d7d2a..240d9a810 100644 --- a/kate/app/kateviewspace.cpp +++ b/kate/app/kateviewspace.cpp @@ -30,6 +30,7 @@ #include <kiconloader.h> #include <tdelocale.h> #include <ksqueezedtextlabel.h> +#include <kmimetype.h> #include <tdeconfig.h> #include <kdebug.h> @@ -39,6 +40,7 @@ #include <tqcursor.h> #include <tqpopupmenu.h> #include <tqpixmap.h> +#include <tqtooltip.h> //BEGIN KVSSBSep /* @@ -139,8 +141,8 @@ void KateViewSpace::addView(Kate::View* v, bool show) void KateViewSpace::removeView(Kate::View* v) { - disconnect( v->getDoc(), TQT_SIGNAL(modifiedChanged()), - mStatusBar, TQT_SLOT(modifiedChanged()) ); + disconnect( v->getDoc(), TQ_SIGNAL(modifiedChanged()), + mStatusBar, TQ_SLOT(modifiedChanged()) ); bool active = ( v == currentView() ); @@ -168,12 +170,12 @@ bool KateViewSpace::showView(uint documentNumber) for( ; it.current(); --it ) { if (((Kate::Document*)it.current()->getDoc())->documentNumber() == documentNumber) { if ( currentView() ) - disconnect( currentView()->getDoc(), TQT_SIGNAL(modifiedChanged()), - mStatusBar, TQT_SLOT(modifiedChanged()) ); + disconnect( currentView()->getDoc(), TQ_SIGNAL(modifiedChanged()), + mStatusBar, TQ_SLOT(modifiedChanged()) ); Kate::View* kv = it.current(); - connect( kv->getDoc(), TQT_SIGNAL(modifiedChanged()), - mStatusBar, TQT_SLOT(modifiedChanged()) ); + connect( kv->getDoc(), TQ_SIGNAL(modifiedChanged()), + mStatusBar, TQ_SLOT(modifiedChanged()) ); mViewList.removeRef( kv ); mViewList.append( kv ); @@ -311,36 +313,35 @@ KateVSStatusBar::KateVSStatusBar ( KateViewSpace *parent, const char *name ) { m_lineColLabel = new TQLabel( this ); addWidget( m_lineColLabel, 0, false ); - m_lineColLabel->setAlignment( Qt::AlignCenter ); + m_lineColLabel->setAlignment( TQt::AlignCenter ); m_lineColLabel->installEventFilter( this ); m_modifiedLabel = new TQLabel( TQString(" "), this ); addWidget( m_modifiedLabel, 0, false ); - m_modifiedLabel->setAlignment( Qt::AlignCenter ); + m_modifiedLabel->setAlignment( TQt::AlignCenter ); m_modifiedLabel->installEventFilter( this ); m_insertModeLabel = new TQLabel( i18n(" INS "), this ); addWidget( m_insertModeLabel, 0, false ); - m_insertModeLabel->setAlignment( Qt::AlignCenter ); + m_insertModeLabel->setAlignment( TQt::AlignCenter ); m_insertModeLabel->installEventFilter( this ); m_selectModeLabel = new TQLabel( i18n(" NORM "), this ); addWidget( m_selectModeLabel, 0, false ); - m_selectModeLabel->setAlignment( Qt::AlignCenter ); + m_selectModeLabel->setAlignment( TQt::AlignCenter ); m_selectModeLabel->installEventFilter( this ); m_fileNameLabel=new KSqueezedTextLabel( this ); addWidget( m_fileNameLabel, 1, true ); m_fileNameLabel->setMinimumSize( 0, 0 ); m_fileNameLabel->setSizePolicy(TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Fixed )); - m_fileNameLabel->setAlignment( /*Qt::AlignRight*/Qt::AlignLeft ); + m_fileNameLabel->setAlignment( /*TQt::AlignRight*/TQt::AlignLeft ); m_fileNameLabel->installEventFilter( this ); installEventFilter( this ); m_modPm = SmallIcon("modified"); m_modDiscPm = SmallIcon("modonhd"); m_modmodPm = SmallIcon("modmod"); - m_noPm = SmallIcon("null"); } KateVSStatusBar::~KateVSStatusBar () @@ -377,6 +378,8 @@ void KateVSStatusBar::updateMod( bool mod ) bool modOnHD = info && info->modifiedOnDisc; + KMimeType::Ptr mime = KMimeType::findByURL(v->getDoc()->url()); + m_modifiedLabel->setPixmap( mod ? info && modOnHD ? @@ -384,8 +387,9 @@ void KateVSStatusBar::updateMod( bool mod ) m_modPm : info && modOnHD ? m_modDiscPm : - m_noPm + mime->pixmap(TDEIcon::Small) ); + TQToolTip::add(this, mime->comment()); } } @@ -412,7 +416,7 @@ bool KateVSStatusBar::eventFilter(TQObject*,TQEvent *e) if ( m_viewSpace->currentView() ) m_viewSpace->currentView()->setFocus(); - if ( ((TQMouseEvent*)e)->button()==Qt::RightButton) + if ( ((TQMouseEvent*)e)->button()==TQt::RightButton) showMenu(); return true; diff --git a/kate/app/kateviewspace.h b/kate/app/kateviewspace.h index 7c4674ec1..fa4ae6c2c 100644 --- a/kate/app/kateviewspace.h +++ b/kate/app/kateviewspace.h @@ -39,7 +39,7 @@ class KateViewSpaceContainer; class KateVSStatusBar : public KStatusBar { - Q_OBJECT + TQ_OBJECT public: KateVSStatusBar ( KateViewSpace *parent = 0L, const char *name = 0L ); @@ -64,7 +64,7 @@ class KateVSStatusBar : public KStatusBar TQLabel* m_insertModeLabel; TQLabel* m_selectModeLabel; KSqueezedTextLabel* m_fileNameLabel; - TQPixmap m_modPm, m_modDiscPm, m_modmodPm, m_noPm; + TQPixmap m_modPm, m_modDiscPm, m_modmodPm; class KateViewSpace *m_viewSpace; }; @@ -73,7 +73,7 @@ class KateViewSpace : public TQVBox friend class KateViewSpaceContainer; friend class KateVSStatusBar; - Q_OBJECT + TQ_OBJECT public: KateViewSpace(KateViewSpaceContainer *, TQWidget* parent=0, const char* name=0); diff --git a/kate/app/kateviewspacecontainer.cpp b/kate/app/kateviewspacecontainer.cpp index 6e2b5d0ea..72ffc8644 100644 --- a/kate/app/kateviewspacecontainer.cpp +++ b/kate/app/kateviewspacecontainer.cpp @@ -69,14 +69,14 @@ KateViewSpaceContainer::KateViewSpaceContainer (TQWidget *parent, KateViewManage m_viewSpaceList.setAutoDelete(true); KateViewSpace* vs = new KateViewSpace( this, this ); - 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&))); + connect(this, TQ_SIGNAL(statusChanged(Kate::View *, int, int, int, bool, int, const TQString&)), vs, TQ_SLOT(slotStatusChanged(Kate::View *, int, int, int, bool, int, const TQString&))); vs->setActive( true ); m_viewSpaceList.append(vs); - connect( this, TQT_SIGNAL(viewChanged()), this, TQT_SLOT(slotViewChanged()) ); - connect(KateDocManager::self(), TQT_SIGNAL(initialDocumentReplaced()), this, TQT_SIGNAL(viewChanged())); + connect( this, TQ_SIGNAL(viewChanged()), this, TQ_SLOT(slotViewChanged()) ); + connect(KateDocManager::self(), TQ_SIGNAL(initialDocumentReplaced()), this, TQ_SIGNAL(viewChanged())); - 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))); + connect(KateDocManager::self(),TQ_SIGNAL(documentCreated(Kate::Document *)),this,TQ_SLOT(documentCreated(Kate::Document *))); + connect(KateDocManager::self(),TQ_SIGNAL(documentDeleted(uint)),this,TQ_SLOT(documentDeleted(uint))); } KateViewSpaceContainer::~KateViewSpaceContainer () @@ -122,17 +122,17 @@ bool KateViewSpaceContainer::createView ( Kate::Document *doc ) // popup menu view->installPopup ((TQPopupMenu*)(mainWindow()->factory()->container("tdetexteditor_popup", mainWindow())) ); - 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 *))); + connect(view->getDoc(),TQ_SIGNAL(nameChanged(Kate::Document *)),this,TQ_SLOT(statusMsg())); + connect(view,TQ_SIGNAL(cursorPositionChanged()),this,TQ_SLOT(statusMsg())); + connect(view,TQ_SIGNAL(newStatus()),this,TQ_SLOT(statusMsg())); + connect(view->getDoc(), TQ_SIGNAL(undoChanged()), this, TQ_SLOT(statusMsg())); + connect(view,TQ_SIGNAL(dropEventPass(TQDropEvent *)), mainWindow(),TQ_SLOT(slotDropEvent(TQDropEvent *))); + connect(view,TQ_SIGNAL(gotFocus(Kate::View *)),this,TQ_SLOT(activateSpace(Kate::View *))); activeViewSpace()->addView( view ); activateView( view ); - connect( doc, TQT_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)), - activeViewSpace(), TQT_SLOT(modifiedOnDisc(Kate::Document *, bool, unsigned char)) ); + connect( doc, TQ_SIGNAL(modifiedOnDisc(Kate::Document *, bool, unsigned char)), + activeViewSpace(), TQ_SLOT(modifiedOnDisc(Kate::Document *, bool, unsigned char)) ); return true; } @@ -256,7 +256,7 @@ void KateViewSpaceContainer::reactivateActiveView() { activateView(view); } else if (m_pendingViewCreation) { m_pendingViewCreation=false; - disconnect(m_pendingDocument,TQT_SIGNAL(nameChanged(Kate::Document *)),this,TQT_SLOT(slotPendingDocumentNameChanged())); + disconnect(m_pendingDocument,TQ_SIGNAL(nameChanged(Kate::Document *)),this,TQ_SLOT(slotPendingDocumentNameChanged())); createView(m_pendingDocument); } } @@ -378,7 +378,7 @@ void KateViewSpaceContainer::closeViews(uint documentNumber) } if (m_blockViewCreationAndActivation) return; - TQTimer::singleShot(0,this,TQT_SIGNAL(viewChanged())); + TQTimer::singleShot(0,this,TQ_SIGNAL(viewChanged())); //emit m_viewManager->viewChanged (); } @@ -429,7 +429,7 @@ void KateViewSpaceContainer::statusMsg () } else { - c = v->getDoc()->url().prettyURL(); + c = v->getDoc()->url().pathOrURL(); } m_viewManager->mainWindow()->tabWidget()->changeTab (this, KStringHandler::lsqueeze(c,32)); @@ -450,10 +450,10 @@ void KateViewSpaceContainer::splitViewSpace( KateViewSpace* vs, TQValueList<int> psizes; if ( ! isFirstTime ) - if ( TQSplitter *ps = static_cast<TQSplitter*>(vs->parentWidget()->tqt_cast(TQSPLITTER_OBJECT_NAME_STRING)) ) + if ( TQSplitter *ps = static_cast<TQSplitter*>(vs->parentWidget()->tqt_cast("TQSplitter")) ) psizes = ps->sizes(); - Qt::Orientation o = isHoriz ? Qt::Vertical : Qt::Horizontal; + TQt::Orientation o = isHoriz ? TQt::Vertical : TQt::Horizontal; KateMDI::Splitter* s = new KateMDI::Splitter(o, vs->parentWidget()); s->setOpaqueResize( TDEGlobalSettings::opaqueResize() ); @@ -471,7 +471,7 @@ void KateViewSpaceContainer::splitViewSpace( KateViewSpace* vs, s->moveToFirst( vsNew ); if (!isFirstTime) - if (TQSplitter *ps = static_cast<TQSplitter*>(s->parentWidget()->tqt_cast(TQSPLITTER_OBJECT_NAME_STRING)) ) + if (TQSplitter *ps = static_cast<TQSplitter*>(s->parentWidget()->tqt_cast("TQSplitter")) ) ps->setSizes( psizes ); s->show(); @@ -481,7 +481,7 @@ void KateViewSpaceContainer::splitViewSpace( KateViewSpace* vs, sizes << space << space; s->setSizes( sizes ); - 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 &))); + connect(this, TQ_SIGNAL(statusChanged(Kate::View *, int, int, int, bool, int, const TQString &)), vsNew, TQ_SLOT(slotStatusChanged(Kate::View *, int, int,int, bool, int, const TQString &))); m_viewSpaceList.append( vsNew ); activeViewSpace()->setActive( false ); vsNew->setActive( true, true ); @@ -716,7 +716,7 @@ void KateViewSpaceContainer::restoreSplitter( TDEConfig* config, const TQString { config->setGroup( group ); - KateMDI::Splitter* s = new KateMDI::Splitter((Qt::Orientation)config->readNumEntry("Orientation"), parent); + KateMDI::Splitter* s = new KateMDI::Splitter((TQt::Orientation)config->readNumEntry("Orientation"), parent); TQStringList children = config->readListEntry( "Children" ); for (TQStringList::Iterator it=children.begin(); it!=children.end(); ++it) @@ -726,7 +726,7 @@ void KateViewSpaceContainer::restoreSplitter( TDEConfig* config, const TQString { KateViewSpace* vs = new KateViewSpace( this, s ); - 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 &))); + connect(this, TQ_SIGNAL(statusChanged(Kate::View *, int, int, int, bool, int, const TQString &)), vs, TQ_SLOT(slotStatusChanged(Kate::View *, int, int, int, bool, int, const TQString &))); if (m_viewSpaceList.isEmpty()) vs->setActive (true); diff --git a/kate/app/kateviewspacecontainer.h b/kate/app/kateviewspacecontainer.h index 2f1fa5372..a5f04f1ee 100644 --- a/kate/app/kateviewspacecontainer.h +++ b/kate/app/kateviewspacecontainer.h @@ -34,7 +34,7 @@ class KateMainWindow; class KateViewSpaceContainer: public TQVBox { - Q_OBJECT + TQ_OBJECT friend class KateViewSpace; friend class KateVSStatusBar; diff --git a/kate/app/kbookmarkhandler.h b/kate/app/kbookmarkhandler.h index 612c15a18..274218e04 100644 --- a/kate/app/kbookmarkhandler.h +++ b/kate/app/kbookmarkhandler.h @@ -32,7 +32,7 @@ class TDEPopupMenu; class KBookmarkHandler : public TQObject, public KBookmarkOwner { - Q_OBJECT + TQ_OBJECT public: KBookmarkHandler( KateFileSelector *parent, TDEPopupMenu *tdepopupmenu=0 ); diff --git a/kate/app/kwritemain.cpp b/kate/app/kwritemain.cpp index 00eb85a68..44899a82c 100644 --- a/kate/app/kwritemain.cpp +++ b/kate/app/kwritemain.cpp @@ -96,11 +96,11 @@ KWrite::KWrite (KTextEditor::Document *doc) setAcceptDrops(true); - 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 *))); + connect(m_view,TQ_SIGNAL(newStatus()),this,TQ_SLOT(newCaption())); + connect(m_view,TQ_SIGNAL(viewStatusMsg(const TQString &)),this,TQ_SLOT(newStatus(const TQString &))); + connect(m_view->document(),TQ_SIGNAL(fileNameChanged()),this,TQ_SLOT(newCaption())); + connect(m_view->document(),TQ_SIGNAL(fileNameChanged()),this,TQ_SLOT(slotFileNameChanged())); + connect(m_view,TQ_SIGNAL(dropEventPass(TQDropEvent *)),this,TQ_SLOT(slotDropEvent(TQDropEvent *))); setXMLFile( "kwriteui.rc" ); createShellGUI( true ); @@ -139,41 +139,41 @@ KWrite::~KWrite() void KWrite::setupActions() { - KStdAction::close( TQT_TQOBJECT(this), TQT_SLOT(slotFlush()), actionCollection(), "file_close" )->setWhatsThis(i18n("Use this to close the current document")); + KStdAction::close( this, TQ_SLOT(slotFlush()), actionCollection(), "file_close" )->setWhatsThis(i18n("Use this to close the current document")); // setup File menu - KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(printDlg()), actionCollection())->setWhatsThis(i18n("Use this command to print the current document")); - KStdAction::openNew( TQT_TQOBJECT(this), TQT_SLOT(slotNew()), actionCollection(), "file_new" )->setWhatsThis(i18n("Use this command to create a new document")); - KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotOpen() ), actionCollection(), "file_open" )->setWhatsThis(i18n("Use this command to open an existing document for editing")); + KStdAction::print(this, TQ_SLOT(printDlg()), actionCollection())->setWhatsThis(i18n("Use this command to print the current document")); + KStdAction::openNew( this, TQ_SLOT(slotNew()), actionCollection(), "file_new" )->setWhatsThis(i18n("Use this command to create a new document")); + KStdAction::open( this, TQ_SLOT( slotOpen() ), actionCollection(), "file_open" )->setWhatsThis(i18n("Use this command to open an existing document for editing")); - m_recentFiles = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotOpen(const KURL&)), + m_recentFiles = KStdAction::openRecent(this, TQ_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.")); - TDEAction *a=new TDEAction(i18n("&New Window"), "window-new", 0, TQT_TQOBJECT(this), TQT_SLOT(newView()), + TDEAction *a=new TDEAction(i18n("&New Window"), "window-new", 0, this, TQ_SLOT(newView()), actionCollection(), "view_new_view"); a->setWhatsThis(i18n("Create another view containing the current document")); - a=new TDEAction(i18n("Choose Editor Component..."),0,TQT_TQOBJECT(this),TQT_SLOT(changeEditor()), + a=new TDEAction(i18n("Choose Editor Component..."),0,this,TQ_SLOT(changeEditor()), actionCollection(),"settings_choose_editor"); a->setWhatsThis(i18n("Override the system wide setting for the default editing component")); - KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection())->setWhatsThis(i18n("Close the current document view")); + KStdAction::quit(this, TQ_SLOT(close()), actionCollection())->setWhatsThis(i18n("Close the current document view")); // setup Settings menu setStandardToolBarMenuEnabled(true); - m_paShowStatusBar = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(toggleStatusBar()), actionCollection(), "settings_show_statusbar"); + m_paShowStatusBar = KStdAction::showStatusbar(this, TQ_SLOT(toggleStatusBar()), actionCollection(), "settings_show_statusbar"); m_paShowStatusBar->setWhatsThis(i18n("Use this command to show or hide the view's statusbar")); - m_paShowPath = new TDEToggleAction(i18n("Sho&w Path"), 0, TQT_TQOBJECT(this), TQT_SLOT(newCaption()), + m_paShowPath = new TDEToggleAction(i18n("Sho&w Path"), 0, this, TQ_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(TQT_TQOBJECT(this), TQT_SLOT(editKeys()), actionCollection()); + a=KStdAction::keyBindings(this, TQ_SLOT(editKeys()), actionCollection()); a->setWhatsThis(i18n("Configure the application's keyboard shortcut assignments.")); - a=KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(editToolbars()), actionCollection()); + a=KStdAction::configureToolbars(this, TQ_SLOT(editToolbars()), actionCollection()); a->setWhatsThis(i18n("Configure which items should appear in the toolbar(s).")); } @@ -299,7 +299,7 @@ void KWrite::editToolbars() { saveMainWindowSettings( kapp->config(), "MainWindow" ); KEditToolbar *dlg = new KEditToolbar(guiFactory()); - connect( dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(slotNewToolbarConfig()) ); + connect( dlg, TQ_SIGNAL(newToolbarConfig()), this, TQ_SLOT(slotNewToolbarConfig()) ); dlg->exec(); delete dlg; } @@ -536,7 +536,7 @@ static TDECmdLineOptions options[] = TDECmdLineLastOption }; -extern "C" KDE_EXPORT int kdemain(int argc, char **argv) +extern "C" TDE_EXPORT int kdemain(int argc, char **argv) { Kate::Document::setFileChangedDialogsActivated (true); diff --git a/kate/app/kwritemain.h b/kate/app/kwritemain.h index 5718d1e67..5a4187c3b 100644 --- a/kate/app/kwritemain.h +++ b/kate/app/kwritemain.h @@ -37,7 +37,7 @@ class TDERecentFilesAction; class KWrite : public KParts::MainWindow { - Q_OBJECT + TQ_OBJECT public: @@ -122,7 +122,7 @@ class KWrite : public KParts::MainWindow class KWriteEditorChooser: public KDialogBase { - Q_OBJECT + TQ_OBJECT public: |