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