diff options
author | Timothy Pearson <[email protected]> | 2013-02-01 15:04:09 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-02-01 15:04:09 -0600 |
commit | a45915945ee5f36df25754586c5c4a366c3a474d (patch) | |
tree | 9160a9c8259572bc5b7cde966a4066422aef2ba5 | |
parent | 21d0413b17e418a799acee2cb4395ed32152e2e3 (diff) | |
download | krename-a45915945ee5f36df25754586c5c4a366c3a474d.tar.gz krename-a45915945ee5f36df25754586c5c4a366c3a474d.zip |
Rename a number of classes to enhance compatibility with KDE4
-rw-r--r-- | krename/ProgressDialog.cpp | 10 | ||||
-rw-r--r-- | krename/ProgressDialog.h | 8 | ||||
-rw-r--r-- | krename/commandplugin.cpp | 2 | ||||
-rw-r--r-- | krename/commandplugin.h | 4 | ||||
-rw-r--r-- | krename/fileplugin.cpp | 4 | ||||
-rw-r--r-- | krename/helpdialog.cpp | 4 | ||||
-rw-r--r-- | krename/helpdialog.h | 4 | ||||
-rw-r--r-- | krename/kmylistbox.cpp | 16 | ||||
-rw-r--r-- | krename/kmylistbox.h | 2 | ||||
-rw-r--r-- | krename/kmylistview.cpp | 22 | ||||
-rw-r--r-- | krename/kmylistview.h | 4 | ||||
-rw-r--r-- | krename/krenameimpl.cpp | 12 | ||||
-rw-r--r-- | krename/krenameimpl.h | 10 | ||||
-rw-r--r-- | krename/numberdialog.cpp | 2 | ||||
-rw-r--r-- | krename/numberdialog.h | 4 | ||||
-rw-r--r-- | krename/profiledlg.cpp | 2 | ||||
-rw-r--r-- | krename/profiledlg.h | 4 | ||||
-rw-r--r-- | krename/replacedialog.cpp | 6 | ||||
-rw-r--r-- | krename/replacedialog.h | 4 |
19 files changed, 62 insertions, 62 deletions
diff --git a/krename/ProgressDialog.cpp b/krename/ProgressDialog.cpp index 489ac77..c390fe3 100644 --- a/krename/ProgressDialog.cpp +++ b/krename/ProgressDialog.cpp @@ -62,7 +62,7 @@ ProgressDialog::ProgressDialog( TQWidget* parent, const char* name, WFlags fl ) buttonCancel = new KPushButton( i18n("&Cancel"), this ); - display = new KListView( this ); + display = new TDEListView( this ); display->addColumn( i18n("Messages") ); display->addColumn( "sort" ); display->setColumnWidthMode( 0, TQListView::Maximum ); @@ -77,7 +77,7 @@ ProgressDialog::ProgressDialog( TQWidget* parent, const char* name, WFlags fl ) buttonUndo->setText( i18n("&Undo") ); buttonUndo->setEnabled( false ); - mnuButton = new KPopupMenu( this ); + mnuButton = new TDEPopupMenu( this ); mnuButton->insertItem( i18n("Restart KRename..."), this, TQT_SLOT( restart() )); mnuButton->insertSeparator(); mnuButton->insertItem( i18n("Rename Processed Files &Again..."), this, TQT_SLOT( again() ), 0, MNU_DONE_ID ); @@ -143,7 +143,7 @@ void ProgressDialog::print( TQString text, TQString pixmap ) if( pixmap.isNull() ) pixmap = "ok"; - KListViewItem* item = new KListViewItem( display, text, count() ); + TDEListViewItem* item = new TDEListViewItem( display, text, count() ); item->setPixmap( 0, SmallIcon(pixmap) ); display->insertItem( item ); } @@ -157,7 +157,7 @@ void ProgressDialog::error( TQString text ) } //TODO: simplify this (breaks i18n) - KListViewItem* item = new KListViewItem( display, TQString( i18n("Error: %1") ).arg( TQString() ) + simplify( text ), count() ); + TDEListViewItem* item = new TDEListViewItem( display, TQString( i18n("Error: %1") ).arg( TQString() ) + simplify( text ), count() ); item->setPixmap( 0, SmallIcon("cancel") ); display->insertItem( item ); } @@ -170,7 +170,7 @@ void ProgressDialog::warning( TQString text ) m_timer->start( TIMER_INTERVAL ); } - KListViewItem* item = new KListViewItem( display, TQString( i18n("Warning: %1") ).arg( TQString() ) + simplify( text ), count() ); + TDEListViewItem* item = new TDEListViewItem( display, TQString( i18n("Warning: %1") ).arg( TQString() ) + simplify( text ), count() ); item->setPixmap( 0, SmallIcon("idea") ); display->insertItem( item ); } diff --git a/krename/ProgressDialog.h b/krename/ProgressDialog.h index 791b4c4..cfd9528 100644 --- a/krename/ProgressDialog.h +++ b/krename/ProgressDialog.h @@ -31,8 +31,8 @@ typedef struct RenamedList }; class KRenameImpl; -class KListView; -class KPopupMenu; +class TDEListView; +class TDEPopupMenu; class KPushButton; class TQProgressBar; class TQStringList; @@ -91,13 +91,13 @@ class ProgressDialog : public TQWidget TQTimer* m_timer; - KListView* display; + TDEListView* display; KPushButton* buttonClose; KPushButton* buttonRestart; KPushButton* buttonOpenDest; KPushButton* buttonUndo; KPushButton* buttonCancel; - KPopupMenu* mnuButton; + TDEPopupMenu* mnuButton; TQProgressBar* bar; diff --git a/krename/commandplugin.cpp b/krename/commandplugin.cpp index 82a1115..e178ca2 100644 --- a/krename/commandplugin.cpp +++ b/krename/commandplugin.cpp @@ -88,7 +88,7 @@ void CommandPlugin::drawInterface( TQWidget* w, TQVBoxLayout* l ) vb->addLayout( hb ); - list = new KListBox( w ); + list = new TDEListBox( w ); vb->addWidget( list ); vb->setStretchFactor( list, 2 ); l->addLayout( vb ); diff --git a/krename/commandplugin.h b/krename/commandplugin.h index 6609ac3..c951d19 100644 --- a/krename/commandplugin.h +++ b/krename/commandplugin.h @@ -25,7 +25,7 @@ class TQCheckBox; class KLineEdit; -class KListBox; +class TDEListBox; class KPushButton; class CommandPlugin : public Plugin { Q_OBJECT @@ -52,7 +52,7 @@ class CommandPlugin : public Plugin { private: KLineEdit* commandline; TQCheckBox* checkNoBlock; - KListBox* list; + TDEListBox* list; KPushButton* buttonAdd; KPushButton* buttonRemove; diff --git a/krename/fileplugin.cpp b/krename/fileplugin.cpp index 7253d20..62943ba 100644 --- a/krename/fileplugin.cpp +++ b/krename/fileplugin.cpp @@ -139,8 +139,8 @@ void FilePlugin::drawInterface( TQWidget* w, TQVBoxLayout* l ) l->addWidget( new TQLabel( m_comment, w ) ); l->addWidget( new TQLabel( i18n("Supported tokens:"), w ) ); - KListBox* list = new KListBox( w ); - list->setColumnMode( KListBox::FitToWidth ); + TDEListBox* list = new TDEListBox( w ); + list->setColumnMode( TDEListBox::FitToWidth ); for( unsigned int i = 0; i < keys.count(); i++ ) list->insertItem( "[" + keys[i] + "]" ); diff --git a/krename/helpdialog.cpp b/krename/helpdialog.cpp index fe42ef3..e735b65 100644 --- a/krename/helpdialog.cpp +++ b/krename/helpdialog.cpp @@ -77,7 +77,7 @@ HelpDialog::HelpDialog( HelpDialogData* data, TQWidget* parent, comboHeadline = new TQComboBox( FALSE, this, "comboHeadline" ); HelpDialogLayout->addWidget( comboHeadline ); - list = new KListView( this, "list" ); + list = new TDEListView( this, "list" ); list->addColumn( i18n( "Token" ) ); list->addColumn( i18n( "Description" ) ); HelpDialogLayout->addWidget( list ); @@ -132,7 +132,7 @@ void HelpDialog::updateItems() for( unsigned int i = 0; i < items.count(); i++ ) { TQString tmp = items[i]; - new KListViewItem( list, tmp.section( ";;", 0, 0 ), tmp.section( ";;", 1, 1 ) ); + new TDEListViewItem( list, tmp.section( ";;", 0, 0 ), tmp.section( ";;", 1, 1 ) ); } } diff --git a/krename/helpdialog.h b/krename/helpdialog.h index 33b5cea..9cdf0fc 100644 --- a/krename/helpdialog.h +++ b/krename/helpdialog.h @@ -29,7 +29,7 @@ class TQGridLayout; class TQComboBox; class TQLineEdit; class TQPixmap; -class KListView; +class TDEListView; class KPushButton; class HelpDialogData : public TQObject { @@ -92,7 +92,7 @@ class HelpDialog : public TQDialog private: TQComboBox* comboHeadline; - KListView* list; + TDEListView* list; KPushButton* buttonAdd; KPushButton* buttonClose; diff --git a/krename/kmylistbox.cpp b/krename/kmylistbox.cpp index bc73deb..a92c77a 100644 --- a/krename/kmylistbox.cpp +++ b/krename/kmylistbox.cpp @@ -44,7 +44,7 @@ using namespace TDEIO; KMyListBox::KMyListBox(TQWidget* parent, const char* name, WFlags fl) - :KListBox(parent, name, fl) + :TDEListBox(parent, name, fl) { m_running_lister_counter = 0; @@ -86,7 +86,7 @@ void KMyListBox::setPreviewSize( int size ) void KMyListBox::removeItem( int index ) { - KListBox::removeItem( index ); + TDEListBox::removeItem( index ); } void KMyListBox::addFile( const KURL & filename, bool isfile ) @@ -201,7 +201,7 @@ void KMyListBox::viewportMousePressEvent( TQMouseEvent* e ) if( moving ) move( index( itemAt( e->pos() ) ) ); else { - KListBox::viewportMousePressEvent( e ); + TDEListBox::viewportMousePressEvent( e ); TQPoint p( e->pos() ); TQListBoxItem *i = itemAt( p ); if ( i ) { @@ -226,13 +226,13 @@ void KMyListBox::viewportMouseMoveEvent( TQMouseEvent* e ) ud->drag(); } } else - KListBox::viewportMouseMoveEvent( e ); + TDEListBox::viewportMouseMoveEvent( e ); } void KMyListBox::viewportMouseReleaseEvent( TQMouseEvent* e ) { mousePressed = FALSE; - KListBox::viewportMouseReleaseEvent( e ); + TDEListBox::viewportMouseReleaseEvent( e ); } void KMyListBox::keyPressEvent( TQKeyEvent* e ) @@ -697,13 +697,13 @@ const TQString KMyListBox::findNumInString( unsigned int pos, const TQString & s void KMyListBox::resizeEvent( TQResizeEvent* e ) { - KListBox::resizeEvent( e ); + TDEListBox::resizeEvent( e ); positionLabel(); } void KMyListBox::clear() { - KListBox::clear(); + TDEListBox::clear(); positionLabel(); } @@ -726,7 +726,7 @@ void KMyListBox::paintEvent( TQPaintEvent* e ) { // tqDebug("Updates=%i", (int)isUpdatesEnabled() ); //if( isUpdatesEnabled() ) - KListBox::paintEvent( e ); + TDEListBox::paintEvent( e ); } KMyListBoxItem::KMyListBoxItem( const KMyListBoxItem* item ) diff --git a/krename/kmylistbox.h b/krename/kmylistbox.h index 3c5f9a4..99b9801 100644 --- a/krename/kmylistbox.h +++ b/krename/kmylistbox.h @@ -35,7 +35,7 @@ class TQDragObject; class TQPixmap; class TQPainter; class TQPoint; -class KMyListBox : public KListBox { +class KMyListBox : public TDEListBox { Q_OBJECT public: diff --git a/krename/kmylistview.cpp b/krename/kmylistview.cpp index 62865c0..885a494 100644 --- a/krename/kmylistview.cpp +++ b/krename/kmylistview.cpp @@ -25,7 +25,7 @@ #include <krun.h> KMyListView::KMyListView( TQValueList<manualchanges>* _changes, KMyListBox* _list, TQWidget* parent, const char* name ) - :KListView(parent, name ) + :TDEListView(parent, name ) { changes = _changes; list = _list; @@ -75,7 +75,7 @@ void KMyListView::changeItem( TQListViewItem* item, const TQPoint&, int ) void KMyListView::showContext( TQListViewItem* item, const TQPoint& pos, int ) { - KPopupMenu* menu = new KPopupMenu( this ); + TDEPopupMenu* menu = new TDEPopupMenu( this ); if(item) { menu->insertTitle( list->text( itemIndex( item ) ), 0, 0 ); menu->insertItem( i18n("&Change Filename Manually"), this, TQT_SLOT( changeCurrentItem() ), Key_F2 ); @@ -115,25 +115,25 @@ void KMyListView::openCurrent() ///////////////////////////////////////////////////////////// KMyListViewItem::KMyListViewItem(TQListView *parent) - : KListViewItem(parent) + : TDEListViewItem(parent) { } KMyListViewItem::KMyListViewItem(TQListViewItem *parent) - : KListViewItem(parent) + : TDEListViewItem(parent) { } KMyListViewItem::KMyListViewItem(TQListView *parent, TQListViewItem *after) - : KListViewItem(parent, after) + : TDEListViewItem(parent, after) { } KMyListViewItem::KMyListViewItem(TQListViewItem *parent, TQListViewItem *after) - : KListViewItem(parent, after) + : TDEListViewItem(parent, after) { } KMyListViewItem::KMyListViewItem(bool m, TQListView *parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) - : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) + : TDEListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) { modified = m; } @@ -141,7 +141,7 @@ KMyListViewItem::KMyListViewItem(bool m, TQListView *parent, KMyListViewItem::KMyListViewItem(bool m, TQListViewItem *parent, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) - : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) + : TDEListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8) { modified = m; } @@ -149,7 +149,7 @@ KMyListViewItem::KMyListViewItem(bool m, TQListViewItem *parent, KMyListViewItem::KMyListViewItem(bool m, TQListView *parent, TQListViewItem *after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) - : KListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) + : TDEListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) { modified = m; } @@ -157,7 +157,7 @@ KMyListViewItem::KMyListViewItem(bool m, TQListView *parent, TQListViewItem *aft KMyListViewItem::KMyListViewItem(TQListViewItem *parent, TQListViewItem *after, TQString label1, TQString label2, TQString label3, TQString label4, TQString label5, TQString label6, TQString label7, TQString label8) - : KListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) + : TDEListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8) { } KMyListViewItem::~KMyListViewItem() @@ -171,7 +171,7 @@ void KMyListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, if( modified ) _cg.setColor( TQColorGroup::Text, TQt::red ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); + TDEListViewItem::paintCell( p, _cg, column, width, alignment ); _cg.setColor( TQColorGroup::Text, c ); } diff --git a/krename/kmylistview.h b/krename/kmylistview.h index 2071ac5..c533ae8 100644 --- a/krename/kmylistview.h +++ b/krename/kmylistview.h @@ -24,7 +24,7 @@ #include <tqvaluelist.h> class TQMouseEvent; -class KMyListView : public KListView { +class KMyListView : public TDEListView { Q_OBJECT public: @@ -52,7 +52,7 @@ class KMyListView : public KListView { ///////////////////////////////////////////////////////////// class TQColor; class TQString; -class KMyListViewItem : public KListViewItem { +class KMyListViewItem : public TDEListViewItem { public: KMyListViewItem(TQListView *parent); KMyListViewItem(TQListViewItem *parent); diff --git a/krename/krenameimpl.cpp b/krename/krenameimpl.cpp index a0c04cf..0163fd02 100644 --- a/krename/krenameimpl.cpp +++ b/krename/krenameimpl.cpp @@ -293,10 +293,10 @@ void KRenameImpl::parseCommandline() void KRenameImpl::setupActions() { - KActionCollection* actionCollection = new KActionCollection( this ); + TDEActionCollection* actionCollection = new TDEActionCollection( this ); - KPopupMenu* mnuExtra = new KPopupMenu( parent ); - KPopupMenu* mnuSettings = new KPopupMenu( parent ); + TDEPopupMenu* mnuExtra = new TDEPopupMenu( parent ); + TDEPopupMenu* mnuSettings = new TDEPopupMenu( parent ); KHelpMenu* mnuHelp = new KHelpMenu( parent ); menuBar->insertItem( i18n("E&xtras"), mnuExtra ); @@ -307,9 +307,9 @@ void KRenameImpl::setupActions() menuBar->insertSeparator(); menuBar->insertItem( i18n("&Help"), mnuHelp->menu() ); - KAction* prefAct = KStdAction::preferences( this, TQT_SLOT(preferences()), actionCollection ); - loadPlugins = new KAction( i18n("&Load TDE file plugins"), 0, this, TQT_SLOT( loadFilePlugins() ), actionCollection ); - KAction* reloadAct = new KAction( i18n("&Reload Plugin Data"), 0, this, TQT_SLOT( reloadFilePluginData() ), actionCollection ); + TDEAction* prefAct = KStdAction::preferences( this, TQT_SLOT(preferences()), actionCollection ); + loadPlugins = new TDEAction( i18n("&Load TDE file plugins"), 0, this, TQT_SLOT( loadFilePlugins() ), actionCollection ); + TDEAction* reloadAct = new TDEAction( i18n("&Reload Plugin Data"), 0, this, TQT_SLOT( reloadFilePluginData() ), actionCollection ); prefAct->plug( mnuSettings ); mnuSettings->insertSeparator(); diff --git a/krename/krenameimpl.h b/krename/krenameimpl.h index 5a51a42..ee897e9 100644 --- a/krename/krenameimpl.h +++ b/krename/krenameimpl.h @@ -24,16 +24,16 @@ class HelpDialog; class HelpDialogData; -class KAction; +class TDEAction; class KComboBox; class KJanusWidget; class KMyHistoryCombo; class KMyListBox; class KMyListView; class KMenuBar; -class KPopupMenu; +class TDEPopupMenu; class KPushButton; -class KToggleAction; +class TDEToggleAction; class KURL; class KURLRequester; class KIntNumInput; @@ -197,8 +197,8 @@ class KRenameImpl : public TQObject, public KRenameDCOP { protected: TQWidget* parent; KMenuBar* menuBar; - KPopupMenu* mnuSort; - KAction* loadPlugins; + TDEPopupMenu* mnuSort; + TDEAction* loadPlugins; TQPushButton* finishButton; diff --git a/krename/numberdialog.cpp b/krename/numberdialog.cpp index 2bfdfad..5b6275a 100644 --- a/krename/numberdialog.cpp +++ b/krename/numberdialog.cpp @@ -71,7 +71,7 @@ NumberDialog::NumberDialog(TQValueList<int> & n,TQWidget *parent ) TQHBoxLayout* group2Layout = new TQHBoxLayout( group2->layout() ); group2Layout->setAlignment( TQt::AlignTop ); - listNumbers = new KListBox( group2 ); + listNumbers = new TDEListBox( group2 ); buttonAdd = new KPushButton( group2 ); buttonAdd->setText( i18n( "&Add Number" ) ); diff --git a/krename/numberdialog.h b/krename/numberdialog.h index 66b79e9..81ede73 100644 --- a/krename/numberdialog.h +++ b/krename/numberdialog.h @@ -42,7 +42,7 @@ class KMyIntSpinBox : public KIntSpinBox class TQCheckBox; class KIntNumInput; -class KListBox; +class TDEListBox; class KPushButton; class NumberDialog : public KDialogBase { Q_OBJECT @@ -67,7 +67,7 @@ class NumberDialog : public KDialogBase { private: void sort(); - KListBox* listNumbers; + TDEListBox* listNumbers; KPushButton* buttonAdd; KPushButton* buttonRemove; KMyIntSpinBox* spinNumber; diff --git a/krename/profiledlg.cpp b/krename/profiledlg.cpp index 5da0e3f..0d6b0d5 100644 --- a/krename/profiledlg.cpp +++ b/krename/profiledlg.cpp @@ -400,7 +400,7 @@ ProfileDlg::ProfileDlg(KRenameImpl* krename, TQWidget *parent, const char *name) TQHBoxLayout* layout = new TQHBoxLayout( plainPage(), 6, 6 ); TQVBoxLayout* button = new TQVBoxLayout( 0, 6, 6 ); - profiles = new KListBox( plainPage() ); + profiles = new TDEListBox( plainPage() ); profiles->insertItem( new ProfileListBoxText( PROFILE_WIZARD_NAME ), PROFILE_WIZARD_INDEX ); profiles->insertItem( new ProfileListBoxText( PROFILE_TABBED_NAME ), PROFILE_TABBED_INDEX ); diff --git a/krename/profiledlg.h b/krename/profiledlg.h index 7942973..c711eec 100644 --- a/krename/profiledlg.h +++ b/krename/profiledlg.h @@ -20,7 +20,7 @@ #include <kdialogbase.h> -class KListBox; +class TDEListBox; class KPushButton; class KRenameImpl; class TQCheckBox; @@ -69,7 +69,7 @@ class ProfileDlg : public KDialogBase, public ProfileManager void slotHidden(); private: - KListBox* profiles; + TDEListBox* profiles; TQCheckBox* checkDefault; KPushButton* createProfile; diff --git a/krename/replacedialog.cpp b/krename/replacedialog.cpp index becbd43..a58fbc5 100644 --- a/krename/replacedialog.cpp +++ b/krename/replacedialog.cpp @@ -41,7 +41,7 @@ ReplaceDialog::ReplaceDialog( TQValueList<replacestrings> & r, TQWidget* parent { ReplaceDialogLayout = new TQGridLayout( plainPage(), 11, 6); - list = new KListView( plainPage() ); + list = new TDEListView( plainPage() ); list->addColumn( i18n("Find") ); list->addColumn( i18n("Replace With") ); list->addColumn( i18n("Regular Expression") ); @@ -111,7 +111,7 @@ ReplaceDialog::ReplaceDialog( TQValueList<replacestrings> & r, TQWidget* parent BatchRenamer::unEscape( rs.find ); - KListViewItem* item = new KListViewItem( list ); + TDEListViewItem* item = new TDEListViewItem( list ); item->setText( 0, encode( rs.find ) ); item->setText( 1, encode( rs.replace ) ); item->setText( 2, rs.reg ? i18n("yes") : i18n("no") ); @@ -141,7 +141,7 @@ void ReplaceDialog::add() it = it->nextSibling(); } - KListViewItem* item = new KListViewItem( list, i18n("Regular expression") ); + TDEListViewItem* item = new TDEListViewItem( list, i18n("Regular expression") ); item->setText( 0, encode( text1->text() ) ); item->setText( 1, encode( text2->text() ) ); item->setText( 2, checkReg->isChecked() ? i18n("yes") : i18n("no") ); diff --git a/krename/replacedialog.h b/krename/replacedialog.h index 0282245..7005222 100644 --- a/krename/replacedialog.h +++ b/krename/replacedialog.h @@ -32,7 +32,7 @@ class TQLabel; class TQLineEdit; class KPushButton; class TQListViewItem; -class KListView; +class TDEListView; class ReplaceDialog : public KDialogBase { Q_OBJECT @@ -59,7 +59,7 @@ class ReplaceDialog : public KDialogBase TQLineEdit* text2; TQLabel* TextLabel2; TQLineEdit* text1; - KListView* list; + TDEListView* list; TQCheckBox* checkReg; KPushButton* buttonAdd; |