From 114bf522e0797aa7b9b07290a1bc285cbcbfc36f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:09:19 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- ChangeLog | 6 +++--- libkipi/libkipi/batchprogressdialog.cpp | 14 +++++++------- libkipi/libkipi/batchprogressdialog.h | 4 ++-- libkipi/libkipi/imagecollectionselector.cpp | 4 ++-- libkipi/libkipi/imagedialog.cpp | 20 ++++++++++---------- libkipi/libkipi/imagedialog.h | 2 +- libkipi/libkipi/mainpage.cpp | 2 +- libkipi/libkipi/plugin.cpp | 14 +++++++------- libkipi/libkipi/plugin.h | 8 ++++---- libkipi/libkipi/pluginloader.cpp | 12 ++++++------ 10 files changed, 43 insertions(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02dba97..261a562 100644 --- a/ChangeLog +++ b/ChangeLog @@ -777,7 +777,7 @@ v0.1.0 2004-09-06 2004-07-07 15:03 cgilles * libkipi/: batchprogressdialog.cpp, batchprogressdialog.h: - CVS_SILENT using KListViewItem instead QListViewItem + CVS_SILENT using TDEListViewItem instead QListViewItem 2004-07-07 09:04 cgilles @@ -896,7 +896,7 @@ v0.1.0 2004-09-06 2004-06-15 18:55 cgilles * libkipi/: plugin.cpp, plugin.h: New plugin category - identification method based on KAction identification required + identification method based on TDEAction identification required for RawConverter plugin. CCMAIL: kde-imaging@kde.org @@ -1121,7 +1121,7 @@ v0.1.0 2004-09-06 To tell KIPI about actions, then plugins must now call KIPI::Plugin::addAction() on each action they want to be in the - topmost menu (thus not actions located in KActionMenu's). + topmost menu (thus not actions located in TDEActionMenu's). Let me summerize the changes - Host application now need to call actions() rather than actionCollection() to get information diff --git a/libkipi/libkipi/batchprogressdialog.cpp b/libkipi/libkipi/batchprogressdialog.cpp index ce5bad3..218bd45 100644 --- a/libkipi/libkipi/batchprogressdialog.cpp +++ b/libkipi/libkipi/batchprogressdialog.cpp @@ -69,11 +69,11 @@ namespace KIPI { -class BatchProgressItem : public KListViewItem +class BatchProgressItem : public TDEListViewItem { public: - BatchProgressItem(KListView * parent, TQListViewItem *after, const TQString &message, int messageType) - : KListViewItem( parent, after), m_messagetype(messageType) + BatchProgressItem(TDEListView * parent, TQListViewItem *after, const TQString &message, int messageType) + : TDEListViewItem( parent, after), m_messagetype(messageType) { // Set the icon. @@ -113,18 +113,18 @@ private: if ( m_messagetype == KIPI::ErrorMessage ) { _cg.setColor( TQColorGroup::Text, TQt::red ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); + TDEListViewItem::paintCell( p, _cg, column, width, alignment ); return; } if ( m_messagetype == KIPI::WarningMessage ) { _cg.setColor( TQColorGroup::Text, TQt::darkYellow ); - KListViewItem::paintCell( p, _cg, column, width, alignment ); + TDEListViewItem::paintCell( p, _cg, column, width, alignment ); return; } - KListViewItem::paintCell( p, cg, column, width, alignment ); + TDEListViewItem::paintCell( p, cg, column, width, alignment ); } }; @@ -167,7 +167,7 @@ BatchProgressDialog::BatchProgressDialog( TQWidget *parent, const TQString &capt //--------------------------------------------- - m_actionsList = new KListView( box ); + m_actionsList = new TDEListView( box ); m_actionsList->addColumn(i18n( "Status" )); m_actionsList->addColumn(i18n( "Current Actions" )); m_actionsList->setSorting(-1); diff --git a/libkipi/libkipi/batchprogressdialog.h b/libkipi/libkipi/batchprogressdialog.h index 21e7afb..00be6ff 100644 --- a/libkipi/libkipi/batchprogressdialog.h +++ b/libkipi/libkipi/batchprogressdialog.h @@ -29,7 +29,7 @@ #include #include "libkipi/libkipi_export.h" -class KListView; +class TDEListView; class KProgress; /** @@ -67,7 +67,7 @@ Q_OBJECT protected: KIPI::BatchProgressItem *m_item; - KListView *m_actionsList; + TDEListView *m_actionsList; KProgress *m_progress; private: diff --git a/libkipi/libkipi/imagecollectionselector.cpp b/libkipi/libkipi/imagecollectionselector.cpp index ddba1c5..7b3f3ad 100644 --- a/libkipi/libkipi/imagecollectionselector.cpp +++ b/libkipi/libkipi/imagecollectionselector.cpp @@ -76,7 +76,7 @@ private: struct ImageCollectionSelector::Private { Interface* _interface; - KListView* _list; + TDEListView* _list; TQLabel* _thumbLabel; TQLabel* _textLabel; TQListViewItem* _itemToSelect; @@ -90,7 +90,7 @@ ImageCollectionSelector::ImageCollectionSelector(TQWidget* parent, Interface* in d->_interface=interface; d->_itemToSelect = 0; - d->_list=new KListView(this); + d->_list=new TDEListView(this); d->_list->setResizeMode( TQListView::LastColumn ); d->_list->addColumn(""); d->_list->header()->hide(); diff --git a/libkipi/libkipi/imagedialog.cpp b/libkipi/libkipi/imagedialog.cpp index 7a5b11a..aeec94b 100644 --- a/libkipi/libkipi/imagedialog.cpp +++ b/libkipi/libkipi/imagedialog.cpp @@ -56,18 +56,18 @@ const int PREVIEW_SIZE = 128; namespace KIPI { -struct AlbumLVI : public KListViewItem { - AlbumLVI(KListView* parent, const KIPI::ImageCollection& album) - : KListViewItem(parent, album.name()) +struct AlbumLVI : public TDEListViewItem { + AlbumLVI(TDEListView* parent, const KIPI::ImageCollection& album) + : TDEListViewItem(parent, album.name()) , _album(album) {} const KIPI::ImageCollection& _album; }; -struct ImageLVI : public KListViewItem { - ImageLVI(KListView* parent, const KURL& url) - : KListViewItem(parent, url.fileName()), _url(url) {} +struct ImageLVI : public TDEListViewItem { + ImageLVI(TDEListView* parent, const KURL& url) + : TDEListViewItem(parent, url.fileName()), _url(url) {} KURL _url; }; @@ -77,8 +77,8 @@ struct ImageDialog::Private { KURL _url; KURL::List _urls; KIPI::Interface* _interface; - KListView* _albumList; - KListView* _imageList; + TDEListView* _albumList; + TDEListView* _imageList; TQLabel* _preview; TQValueList _albums; bool _singleSelection; @@ -143,12 +143,12 @@ ImageDialog::ImageDialog(TQWidget* parent, KIPI::Interface* interface, TQSplitter* splitter = new TQSplitter(box); - d->_albumList=new KListView(splitter); + d->_albumList=new TDEListView(splitter); d->_albumList->addColumn(i18n("Album Name")); d->_albumList->setMinimumWidth(200); d->_albumList->setResizeMode(TQListView::LastColumn); - d->_imageList=new KListView(splitter); + d->_imageList=new TDEListView(splitter); d->_imageList->addColumn(i18n("Image Name")); d->_imageList->setMinimumWidth(200); d->_imageList->setSelectionMode(singleSelection ? TQListView::Single : diff --git a/libkipi/libkipi/imagedialog.h b/libkipi/libkipi/imagedialog.h index 8495fc2..9e9244d 100644 --- a/libkipi/libkipi/imagedialog.h +++ b/libkipi/libkipi/imagedialog.h @@ -42,7 +42,7 @@ class TQListViewItem; class KFileItem; -class KListView; +class TDEListView; namespace KIPI { diff --git a/libkipi/libkipi/mainpage.cpp b/libkipi/libkipi/mainpage.cpp index 0347fc7..d4e30fe 100644 --- a/libkipi/libkipi/mainpage.cpp +++ b/libkipi/libkipi/mainpage.cpp @@ -30,7 +30,7 @@ Here is a list of things to do.
  • Create a class that inherits KIPI::Plugin. In the constructor you - must create instances of KAction for your application. The topmost + must create instances of TDEAction for your application. The topmost actions should be given to the Plugin super class using KIPI::Plugin::addAction().
  • As described in the tutorial here, you must call the macro diff --git a/libkipi/libkipi/plugin.cpp b/libkipi/libkipi/plugin.cpp index 66acf1c..d3ed293 100644 --- a/libkipi/libkipi/plugin.cpp +++ b/libkipi/libkipi/plugin.cpp @@ -36,9 +36,9 @@ struct KIPI::Plugin::Private { - TQMap m_actionCollection; + TQMap m_actionCollection; TDEInstance* m_instance; - TQMap m_actions; + TQMap m_actions; TQWidget* m_defaultWidget; }; @@ -55,7 +55,7 @@ KIPI::Plugin::~Plugin() delete d; } -KActionCollection* KIPI::Plugin::actionCollection( TQWidget* widget ) +TDEActionCollection* KIPI::Plugin::actionCollection( TQWidget* widget ) { if ( widget == 0 ) widget = d->m_defaultWidget; @@ -66,12 +66,12 @@ KActionCollection* KIPI::Plugin::actionCollection( TQWidget* widget ) return d->m_actionCollection[widget]; } -void KIPI::Plugin::addAction( KAction* action ) +void KIPI::Plugin::addAction( TDEAction* action ) { d->m_actions[d->m_defaultWidget].append( action ); } -KActionPtrList KIPI::Plugin::actions( TQWidget* widget ) +TDEActionPtrList KIPI::Plugin::actions( TQWidget* widget ) { if ( widget == 0 ) widget = d->m_defaultWidget; @@ -82,9 +82,9 @@ KActionPtrList KIPI::Plugin::actions( TQWidget* widget ) void KIPI::Plugin::setup( TQWidget* widget ) { d->m_defaultWidget = widget; - d->m_actions.insert( widget, KActionPtrList() ); + d->m_actions.insert( widget, TDEActionPtrList() ); TQString name = TQString( "action collection for %1" ).arg( widget->name() ); - d->m_actionCollection.insert( widget, new KActionCollection( widget, TQT_TQOBJECT(widget), name.latin1(), d->m_instance ) ); + d->m_actionCollection.insert( widget, new TDEActionCollection( widget, TQT_TQOBJECT(widget), name.latin1(), d->m_instance ) ); } diff --git a/libkipi/libkipi/plugin.h b/libkipi/libkipi/plugin.h index 0ffa25b..51a91f3 100644 --- a/libkipi/libkipi/plugin.h +++ b/libkipi/libkipi/plugin.h @@ -60,12 +60,12 @@ namespace KIPI virtual ~Plugin(); virtual void setup( TQWidget* widget ) = 0; - KActionPtrList actions( TQWidget* parent = 0 ); - KActionCollection* actionCollection( TQWidget* parent = 0 ); - virtual Category category( KAction* action ) const = 0; + TDEActionPtrList actions( TQWidget* parent = 0 ); + TDEActionCollection* actionCollection( TQWidget* parent = 0 ); + virtual Category category( TDEAction* action ) const = 0; protected: - void addAction( KAction* action ); + void addAction( TDEAction* action ); private: struct Private; diff --git a/libkipi/libkipi/pluginloader.cpp b/libkipi/libkipi/pluginloader.cpp index 73ea332..b3c5eae 100644 --- a/libkipi/libkipi/pluginloader.cpp +++ b/libkipi/libkipi/pluginloader.cpp @@ -59,9 +59,9 @@ unplugActionList( TQString::fromLatin1("image_actions") ); unplugActionList( TQString::fromLatin1("tool_actions") ); - TQPtrList fileActions; - TQPtrList imageActions; - TQPtrList toolsActions; + TQPtrList fileActions; + TQPtrList imageActions; + TQPtrList toolsActions; KIPI::PluginLoader::PluginList list = _pluginLoader->pluginList(); for( KIPI::PluginLoader::PluginList::Iterator it = list.begin(); it != list.end(); ++it ) { @@ -70,7 +70,7 @@ continue; plugin->setup( this ); - TQPtrList* popup = 0; + TQPtrList* popup = 0; if ( plugin->category() == KIPI::IMAGESPLUGIN ) popup = &imageActions; @@ -82,8 +82,8 @@ popup = &toolsActions; if ( popup ) { - KActionPtrList actions = plugin->actions(); - for( KActionPtrList::Iterator it = actions.begin(); it != actions.end(); ++it ) { + TDEActionPtrList actions = plugin->actions(); + for( TDEActionPtrList::Iterator it = actions.begin(); it != actions.end(); ++it ) { popup->append( *it ); } } -- cgit v1.2.3