Rename a number of classes to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 508a397f42
commit 114bf522e0

@ -777,7 +777,7 @@ v0.1.0 2004-09-06
2004-07-07 15:03 cgilles 2004-07-07 15:03 cgilles
* libkipi/: batchprogressdialog.cpp, batchprogressdialog.h: * libkipi/: batchprogressdialog.cpp, batchprogressdialog.h:
CVS_SILENT using KListViewItem instead QListViewItem CVS_SILENT using TDEListViewItem instead QListViewItem
2004-07-07 09:04 cgilles 2004-07-07 09:04 cgilles
@ -896,7 +896,7 @@ v0.1.0 2004-09-06
2004-06-15 18:55 cgilles 2004-06-15 18:55 cgilles
* libkipi/: plugin.cpp, plugin.h: New plugin category * 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. for RawConverter plugin.
CCMAIL: kde-imaging@kde.org 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 To tell KIPI about actions, then plugins must now call
KIPI::Plugin::addAction() on each action they want to be in the 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 Let me summerize the changes - Host application now need to call
actions() rather than actionCollection() to get information actions() rather than actionCollection() to get information

@ -69,11 +69,11 @@
namespace KIPI namespace KIPI
{ {
class BatchProgressItem : public KListViewItem class BatchProgressItem : public TDEListViewItem
{ {
public: public:
BatchProgressItem(KListView * parent, TQListViewItem *after, const TQString &message, int messageType) BatchProgressItem(TDEListView * parent, TQListViewItem *after, const TQString &message, int messageType)
: KListViewItem( parent, after), m_messagetype(messageType) : TDEListViewItem( parent, after), m_messagetype(messageType)
{ {
// Set the icon. // Set the icon.
@ -113,18 +113,18 @@ private:
if ( m_messagetype == KIPI::ErrorMessage ) if ( m_messagetype == KIPI::ErrorMessage )
{ {
_cg.setColor( TQColorGroup::Text, TQt::red ); _cg.setColor( TQColorGroup::Text, TQt::red );
KListViewItem::paintCell( p, _cg, column, width, alignment ); TDEListViewItem::paintCell( p, _cg, column, width, alignment );
return; return;
} }
if ( m_messagetype == KIPI::WarningMessage ) if ( m_messagetype == KIPI::WarningMessage )
{ {
_cg.setColor( TQColorGroup::Text, TQt::darkYellow ); _cg.setColor( TQColorGroup::Text, TQt::darkYellow );
KListViewItem::paintCell( p, _cg, column, width, alignment ); TDEListViewItem::paintCell( p, _cg, column, width, alignment );
return; 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( "Status" ));
m_actionsList->addColumn(i18n( "Current Actions" )); m_actionsList->addColumn(i18n( "Current Actions" ));
m_actionsList->setSorting(-1); m_actionsList->setSorting(-1);

@ -29,7 +29,7 @@
#include <kdialogbase.h> #include <kdialogbase.h>
#include "libkipi/libkipi_export.h" #include "libkipi/libkipi_export.h"
class KListView; class TDEListView;
class KProgress; class KProgress;
/** /**
@ -67,7 +67,7 @@ Q_OBJECT
protected: protected:
KIPI::BatchProgressItem *m_item; KIPI::BatchProgressItem *m_item;
KListView *m_actionsList; TDEListView *m_actionsList;
KProgress *m_progress; KProgress *m_progress;
private: private:

@ -76,7 +76,7 @@ private:
struct ImageCollectionSelector::Private { struct ImageCollectionSelector::Private {
Interface* _interface; Interface* _interface;
KListView* _list; TDEListView* _list;
TQLabel* _thumbLabel; TQLabel* _thumbLabel;
TQLabel* _textLabel; TQLabel* _textLabel;
TQListViewItem* _itemToSelect; TQListViewItem* _itemToSelect;
@ -90,7 +90,7 @@ ImageCollectionSelector::ImageCollectionSelector(TQWidget* parent, Interface* in
d->_interface=interface; d->_interface=interface;
d->_itemToSelect = 0; d->_itemToSelect = 0;
d->_list=new KListView(this); d->_list=new TDEListView(this);
d->_list->setResizeMode( TQListView::LastColumn ); d->_list->setResizeMode( TQListView::LastColumn );
d->_list->addColumn(""); d->_list->addColumn("");
d->_list->header()->hide(); d->_list->header()->hide();

@ -56,18 +56,18 @@ const int PREVIEW_SIZE = 128;
namespace KIPI namespace KIPI
{ {
struct AlbumLVI : public KListViewItem { struct AlbumLVI : public TDEListViewItem {
AlbumLVI(KListView* parent, const KIPI::ImageCollection& album) AlbumLVI(TDEListView* parent, const KIPI::ImageCollection& album)
: KListViewItem(parent, album.name()) : TDEListViewItem(parent, album.name())
, _album(album) {} , _album(album) {}
const KIPI::ImageCollection& _album; const KIPI::ImageCollection& _album;
}; };
struct ImageLVI : public KListViewItem { struct ImageLVI : public TDEListViewItem {
ImageLVI(KListView* parent, const KURL& url) ImageLVI(TDEListView* parent, const KURL& url)
: KListViewItem(parent, url.fileName()), _url(url) {} : TDEListViewItem(parent, url.fileName()), _url(url) {}
KURL _url; KURL _url;
}; };
@ -77,8 +77,8 @@ struct ImageDialog::Private {
KURL _url; KURL _url;
KURL::List _urls; KURL::List _urls;
KIPI::Interface* _interface; KIPI::Interface* _interface;
KListView* _albumList; TDEListView* _albumList;
KListView* _imageList; TDEListView* _imageList;
TQLabel* _preview; TQLabel* _preview;
TQValueList<ImageCollection> _albums; TQValueList<ImageCollection> _albums;
bool _singleSelection; bool _singleSelection;
@ -143,12 +143,12 @@ ImageDialog::ImageDialog(TQWidget* parent, KIPI::Interface* interface,
TQSplitter* splitter = new TQSplitter(box); TQSplitter* splitter = new TQSplitter(box);
d->_albumList=new KListView(splitter); d->_albumList=new TDEListView(splitter);
d->_albumList->addColumn(i18n("Album Name")); d->_albumList->addColumn(i18n("Album Name"));
d->_albumList->setMinimumWidth(200); d->_albumList->setMinimumWidth(200);
d->_albumList->setResizeMode(TQListView::LastColumn); d->_albumList->setResizeMode(TQListView::LastColumn);
d->_imageList=new KListView(splitter); d->_imageList=new TDEListView(splitter);
d->_imageList->addColumn(i18n("Image Name")); d->_imageList->addColumn(i18n("Image Name"));
d->_imageList->setMinimumWidth(200); d->_imageList->setMinimumWidth(200);
d->_imageList->setSelectionMode(singleSelection ? TQListView::Single : d->_imageList->setSelectionMode(singleSelection ? TQListView::Single :

@ -42,7 +42,7 @@
class TQListViewItem; class TQListViewItem;
class KFileItem; class KFileItem;
class KListView; class TDEListView;
namespace KIPI namespace KIPI
{ {

@ -30,7 +30,7 @@
Here is a list of things to do. Here is a list of things to do.
<ul> <ul>
<li> Create a class that inherits KIPI::Plugin. In the constructor you <li> 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 actions should be given to the Plugin super class using
KIPI::Plugin::addAction(). KIPI::Plugin::addAction().
<li> As described in the tutorial <a href="http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html#understanding_loading">here</a>, you must call the macro <li> As described in the tutorial <a href="http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html#understanding_loading">here</a>, you must call the macro

@ -36,9 +36,9 @@
struct KIPI::Plugin::Private { struct KIPI::Plugin::Private {
TQMap<TQWidget*, KActionCollection*> m_actionCollection; TQMap<TQWidget*, TDEActionCollection*> m_actionCollection;
TDEInstance* m_instance; TDEInstance* m_instance;
TQMap<TQWidget*, KActionPtrList> m_actions; TQMap<TQWidget*, TDEActionPtrList> m_actions;
TQWidget* m_defaultWidget; TQWidget* m_defaultWidget;
}; };
@ -55,7 +55,7 @@ KIPI::Plugin::~Plugin()
delete d; delete d;
} }
KActionCollection* KIPI::Plugin::actionCollection( TQWidget* widget ) TDEActionCollection* KIPI::Plugin::actionCollection( TQWidget* widget )
{ {
if ( widget == 0 ) if ( widget == 0 )
widget = d->m_defaultWidget; widget = d->m_defaultWidget;
@ -66,12 +66,12 @@ KActionCollection* KIPI::Plugin::actionCollection( TQWidget* widget )
return d->m_actionCollection[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 ); d->m_actions[d->m_defaultWidget].append( action );
} }
KActionPtrList KIPI::Plugin::actions( TQWidget* widget ) TDEActionPtrList KIPI::Plugin::actions( TQWidget* widget )
{ {
if ( widget == 0 ) if ( widget == 0 )
widget = d->m_defaultWidget; widget = d->m_defaultWidget;
@ -82,9 +82,9 @@ KActionPtrList KIPI::Plugin::actions( TQWidget* widget )
void KIPI::Plugin::setup( TQWidget* widget ) void KIPI::Plugin::setup( TQWidget* widget )
{ {
d->m_defaultWidget = 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() ); 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 ) );
} }

@ -60,12 +60,12 @@ namespace KIPI
virtual ~Plugin(); virtual ~Plugin();
virtual void setup( TQWidget* widget ) = 0; virtual void setup( TQWidget* widget ) = 0;
KActionPtrList actions( TQWidget* parent = 0 ); TDEActionPtrList actions( TQWidget* parent = 0 );
KActionCollection* actionCollection( TQWidget* parent = 0 ); TDEActionCollection* actionCollection( TQWidget* parent = 0 );
virtual Category category( KAction* action ) const = 0; virtual Category category( TDEAction* action ) const = 0;
protected: protected:
void addAction( KAction* action ); void addAction( TDEAction* action );
private: private:
struct Private; struct Private;

@ -59,9 +59,9 @@
unplugActionList( TQString::fromLatin1("image_actions") ); unplugActionList( TQString::fromLatin1("image_actions") );
unplugActionList( TQString::fromLatin1("tool_actions") ); unplugActionList( TQString::fromLatin1("tool_actions") );
TQPtrList<KAction> fileActions; TQPtrList<TDEAction> fileActions;
TQPtrList<KAction> imageActions; TQPtrList<TDEAction> imageActions;
TQPtrList<KAction> toolsActions; TQPtrList<TDEAction> toolsActions;
KIPI::PluginLoader::PluginList list = _pluginLoader->pluginList(); KIPI::PluginLoader::PluginList list = _pluginLoader->pluginList();
for( KIPI::PluginLoader::PluginList::Iterator it = list.begin(); it != list.end(); ++it ) { for( KIPI::PluginLoader::PluginList::Iterator it = list.begin(); it != list.end(); ++it ) {
@ -70,7 +70,7 @@
continue; continue;
plugin->setup( this ); plugin->setup( this );
TQPtrList<KAction>* popup = 0; TQPtrList<TDEAction>* popup = 0;
if ( plugin->category() == KIPI::IMAGESPLUGIN ) if ( plugin->category() == KIPI::IMAGESPLUGIN )
popup = &imageActions; popup = &imageActions;
@ -82,8 +82,8 @@
popup = &toolsActions; popup = &toolsActions;
if ( popup ) { if ( popup ) {
KActionPtrList actions = plugin->actions(); TDEActionPtrList actions = plugin->actions();
for( KActionPtrList::Iterator it = actions.begin(); it != actions.end(); ++it ) { for( TDEActionPtrList::Iterator it = actions.begin(); it != actions.end(); ++it ) {
popup->append( *it ); popup->append( *it );
} }
} }

Loading…
Cancel
Save