From 74a2067d286867e313f736d6733407586b71195e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:10:05 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- kate/filetemplates/plugin/filetemplates.cpp | 24 ++++++++++++------------ kate/filetemplates/plugin/filetemplates.h | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'kate/filetemplates') diff --git a/kate/filetemplates/plugin/filetemplates.cpp b/kate/filetemplates/plugin/filetemplates.cpp index 5488f48..4fdf1d8 100644 --- a/kate/filetemplates/plugin/filetemplates.cpp +++ b/kate/filetemplates/plugin/filetemplates.cpp @@ -127,16 +127,16 @@ class TemplateInfo //BEGIN KateFileTemplates KateFileTemplates::KateFileTemplates( TQObject* parent, const char* name ) : Kate::Plugin ( (Kate::Application*)parent, name ), - m_actionCollection( new KActionCollection( this, "template_actions", new TDEInstance("kate") ) ) + m_actionCollection( new TDEActionCollection( this, "template_actions", new TDEInstance("kate") ) ) { // create actions, so that they are shared. // We plug them into each view's menus, and update them centrally, so that // new plugins can automatically become visible in all windows. - (void) new KAction ( i18n("Any File..."), 0, this, + (void) new TDEAction ( i18n("Any File..."), 0, this, TQT_SLOT( slotAny() ), m_actionCollection, "file_template_any" ); // recent templates - m_acRecentTemplates = new KRecentFilesAction( i18n("&Use Recent"), 0, this, + m_acRecentTemplates = new TDERecentFilesAction( i18n("&Use Recent"), 0, this, TQT_SLOT(slotOpenTemplate(const KURL &)), m_actionCollection, "file_templates_recent" ); @@ -248,11 +248,11 @@ void KateFileTemplates::addView(Kate::MainWindow *win) { PluginView *view = new PluginView (); - (void) new KAction( i18n("&Manage Templates..."), 0, + (void) new TDEAction( i18n("&Manage Templates..."), 0, this, TQT_SLOT(slotEditTemplate()), view->actionCollection(), "settings_manage_templates" ); - (void)new KActionMenu( i18n("New From &Template"), "make", + (void)new TDEActionMenu( i18n("New From &Template"), "make", view->actionCollection(), "file_new_fromtemplate" ); refreshMenu( view ); @@ -293,7 +293,7 @@ TQStringList KateFileTemplates::groups() void KateFileTemplates::refreshMenu( PluginView *v ) { - TQPopupMenu *m = (TQPopupMenu*)(((KActionMenu*)(v->actionCollection()->action("file_new_fromtemplate")))->popupMenu()); + TQPopupMenu *m = (TQPopupMenu*)(((TDEActionMenu*)(v->actionCollection()->action("file_new_fromtemplate")))->popupMenu()); // clear the menu for templates m->clear(); @@ -1069,11 +1069,11 @@ void KateTemplateWizard::accept() //END KateTemplateWizard //BEGIN KateTemplateItem -class KateTemplateItem : public KListViewItem +class KateTemplateItem : public TDEListViewItem { public: - KateTemplateItem( KListViewItem *parent, TemplateInfo *templateinfo ) - : KListViewItem( parent, templateinfo->tmplate ), templateinfo( templateinfo ) + KateTemplateItem( TDEListViewItem *parent, TemplateInfo *templateinfo ) + : TDEListViewItem( parent, templateinfo->tmplate ), templateinfo( templateinfo ) { } TemplateInfo *templateinfo; @@ -1105,7 +1105,7 @@ KateTemplateManager::KateTemplateManager( KateFileTemplates *kft, TQWidget *pare { TQGridLayout *lo = new TQGridLayout( this, 2, 6 ); lo->setSpacing( KDialogBase::spacingHint() ); - lvTemplates = new KListView( this ); + lvTemplates = new TDEListView( this ); lvTemplates->addColumn( i18n("Template") ); lo->addMultiCellWidget( lvTemplates, 1, 1, 1, 6 ); connect( lvTemplates, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateState()) ); @@ -1146,12 +1146,12 @@ void KateTemplateManager::reload() { lvTemplates->clear(); - TQDict groupitems; // FIXME TQMAP + TQDict groupitems; // FIXME TQMAP for ( uint i = 0; i < kft->templates().count(); i++ ) { if ( ! groupitems[ kft->templates().at( i )->group ] ) { - groupitems.insert( kft->templates().at( i )->group , new KListViewItem( lvTemplates, kft->templates().at( i )->group ) ); + groupitems.insert( kft->templates().at( i )->group , new TDEListViewItem( lvTemplates, kft->templates().at( i )->group ) ); groupitems[ kft->templates().at( i )->group ]->setOpen( true ); } new KateTemplateItem( groupitems[ kft->templates().at( i )->group ], kft->templates().at( i ) ); diff --git a/kate/filetemplates/plugin/filetemplates.h b/kate/filetemplates/plugin/filetemplates.h index bb7f912..c1fa754 100644 --- a/kate/filetemplates/plugin/filetemplates.h +++ b/kate/filetemplates/plugin/filetemplates.h @@ -142,13 +142,13 @@ class KateFileTemplates : public Kate::Plugin, public Kate::PluginViewInterface void refreshMenu( class PluginView */*class TQPopupMenu **/ ); TQPtrList m_views; - class KActionCollection *m_actionCollection; - class KRecentFilesAction *m_acRecentTemplates; + class TDEActionCollection *m_actionCollection; + class TDERecentFilesAction *m_acRecentTemplates; TQPtrList m_templates; class KDirWatch *m_dw; class KUser *m_user; class TDEConfig *m_emailstuff; - class KActionMenu *m_menu; + class TDEActionMenu *m_menu; }; class TemplateInfo; @@ -252,7 +252,7 @@ class KateTemplateManager : public TQWidget void slotRemoveTemplate(); private: - class KListView *lvTemplates; + class TDEListView *lvTemplates; class TQPushButton *btnNew, *btnEdit, *btnRemove, *btnDownload, *btnUpload; KateFileTemplates *kft; TQPtrList *remove; -- cgit v1.2.1