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
* 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

@ -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);

@ -29,7 +29,7 @@
#include <kdialogbase.h>
#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:

@ -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();

@ -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<ImageCollection> _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 :

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

@ -30,7 +30,7 @@
Here is a list of things to do.
<ul>
<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
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

@ -36,9 +36,9 @@
struct KIPI::Plugin::Private {
TQMap<TQWidget*, KActionCollection*> m_actionCollection;
TQMap<TQWidget*, TDEActionCollection*> m_actionCollection;
TDEInstance* m_instance;
TQMap<TQWidget*, KActionPtrList> m_actions;
TQMap<TQWidget*, TDEActionPtrList> 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 ) );
}

@ -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;

@ -59,9 +59,9 @@
unplugActionList( TQString::fromLatin1("image_actions") );
unplugActionList( TQString::fromLatin1("tool_actions") );
TQPtrList<KAction> fileActions;
TQPtrList<KAction> imageActions;
TQPtrList<KAction> toolsActions;
TQPtrList<TDEAction> fileActions;
TQPtrList<TDEAction> imageActions;
TQPtrList<TDEAction> 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<KAction>* popup = 0;
TQPtrList<TDEAction>* 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 );
}
}

Loading…
Cancel
Save