Rename KIcon to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent 28ae138d6e
commit 3b1d37c359

@ -28,7 +28,7 @@
#include "moduleiconitem.h" #include "moduleiconitem.h"
KcmSearch::KcmSearch( TQPtrList<ModulesView> *moduleViewList, TQWidget *parent, const char *name ) KcmSearch::KcmSearch( TQPtrList<ModulesView> *moduleViewList, TQWidget *parent, const char *name )
: KIconViewSearchLine(parent, (moduleViewList->at(0))?moduleViewList->at(0)->groups[0]:NULL, name){ : TDEIconViewSearchLine(parent, (moduleViewList->at(0))?moduleViewList->at(0)->groups[0]:NULL, name){
this->moduleViewList = moduleViewList; this->moduleViewList = moduleViewList;
} }

@ -31,7 +31,7 @@ class ModulesView;
* Searches all the ModuleIconItem's in MainWindow and "disables" the ones * Searches all the ModuleIconItem's in MainWindow and "disables" the ones
* whos keywords don't match the current search. * whos keywords don't match the current search.
*/ */
class KcmSearch : public KIconViewSearchLine class KcmSearch : public TDEIconViewSearchLine
{ {
Q_OBJECT Q_OBJECT

@ -256,13 +256,13 @@ void KCMultiWidget::addModule(const TDECModuleInfo& moduleinfo,
parentmodulenames += moduleinfo.moduleName(); parentmodulenames += moduleinfo.moduleName();
page = addHBoxPage( parentmodulenames, moduleinfo.comment(), page = addHBoxPage( parentmodulenames, moduleinfo.comment(),
SmallIcon( moduleinfo.icon(), SmallIcon( moduleinfo.icon(),
IconSize( KIcon::Small ) ) ); IconSize( TDEIcon::Small ) ) );
break; break;
case Tabbed: case Tabbed:
case IconList: case IconList:
page = addHBoxPage( moduleinfo.moduleName(), page = addHBoxPage( moduleinfo.moduleName(),
moduleinfo.comment(), DesktopIcon( moduleinfo.icon(), moduleinfo.comment(), DesktopIcon( moduleinfo.icon(),
KIcon::SizeMedium ) ); TDEIcon::SizeMedium ) );
break; break;
case Plain: case Plain:
page = plainPage(); page = plainPage();

@ -24,25 +24,25 @@
#define IMAGE_SIZE 32 #define IMAGE_SIZE 32
ModuleIconItem::ModuleIconItem( KIconView *parent, TDECModuleInfo module) ModuleIconItem::ModuleIconItem( TDEIconView *parent, TDECModuleInfo module)
: TQIconViewItem( parent, module.moduleName(), : TQIconViewItem( parent, module.moduleName(),
SmallIcon( module.icon(), IMAGE_SIZE ) ), SmallIcon( module.icon(), IMAGE_SIZE ) ),
currentState( KIcon::ActiveState), imageName(module.icon()) currentState( TDEIcon::ActiveState), imageName(module.icon())
{ {
modules.append(module); modules.append(module);
} }
ModuleIconItem::ModuleIconItem( KIconView *parent, const TQString &text, ModuleIconItem::ModuleIconItem( TDEIconView *parent, const TQString &text,
const TQString &imageName ) const TQString &imageName )
: TQIconViewItem( parent, text, SmallIcon( imageName, IMAGE_SIZE ) ), : TQIconViewItem( parent, text, SmallIcon( imageName, IMAGE_SIZE ) ),
currentState( KIcon::ActiveState ) currentState( TDEIcon::ActiveState )
{ {
this->imageName = imageName; this->imageName = imageName;
} }
void ModuleIconItem::loadIcon( bool enabled ) void ModuleIconItem::loadIcon( bool enabled )
{ {
int newState = enabled ? KIcon::DefaultState : KIcon::DisabledState; int newState = enabled ? TDEIcon::DefaultState : TDEIcon::DisabledState;
if( newState == currentState ) if( newState == currentState )
return; return;

@ -35,9 +35,9 @@ class ModuleIconItem : public TQIconViewItem
{ {
public: public:
ModuleIconItem( KIconView *parent, TDECModuleInfo module ); ModuleIconItem( TDEIconView *parent, TDECModuleInfo module );
ModuleIconItem( KIconView *parent, const TQString &text, ModuleIconItem( TDEIconView *parent, const TQString &text,
const TQString &imageName ); const TQString &imageName );
/** /**

@ -152,7 +152,7 @@ void ModulesView::createRow( const TQString &parentPath, TQBoxLayout *boxLayout
TQString path = (*it).subMenu; TQString path = (*it).subMenu;
KServiceGroup::Ptr group = KServiceGroup::group( path ); KServiceGroup::Ptr group = KServiceGroup::group( path );
if ( group ) { if ( group ) {
ModuleIconItem *item = new ModuleIconItem( ((KIconView*)iconView), ModuleIconItem *item = new ModuleIconItem( ((TDEIconView*)iconView),
group->caption(), group->icon() ); group->caption(), group->icon() );
item->modules = rootMenu->modules( path ); item->modules = rootMenu->modules( path );
} }

@ -26,12 +26,12 @@
/** /**
* Overloaded to give a larger default size that fits with text of two lines. * Overloaded to give a larger default size that fits with text of two lines.
*/ */
class RowIconView : public KIconView class RowIconView : public TDEIconView
{ {
public: public:
RowIconView( TQWidget* parent, const char *name=0 ) RowIconView( TQWidget* parent, const char *name=0 )
: KIconView( parent, name ){ }; : TDEIconView( parent, name ){ };
// Figure out the hight/width to have only one row // Figure out the hight/width to have only one row
TQSize minimumSizeHint() const { TQSize minimumSizeHint() const {

Loading…
Cancel
Save