Rename KIcon to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 11 years ago
parent a50010465a
commit 7bc058d1bf

@ -59,9 +59,9 @@ AddRemoveDialog::AddRemoveDialog(ActionType action, TQWidget* parent, const char
TQBoxLayout *warningLayout = new TQHBoxLayout; TQBoxLayout *warningLayout = new TQHBoxLayout;
TQLabel *warningIcon = new TQLabel(mainWidget); TQLabel *warningIcon = new TQLabel(mainWidget);
KIconLoader *loader = kapp->iconLoader(); TDEIconLoader *loader = kapp->iconLoader();
warningIcon->setPixmap(loader->loadIcon("messagebox_warning", KIcon::NoGroup, warningIcon->setPixmap(loader->loadIcon("messagebox_warning", TDEIcon::NoGroup,
KIcon::SizeMedium, KIcon::DefaultState, TDEIcon::SizeMedium, TDEIcon::DefaultState,
0, true)); 0, true));
warningLayout->addWidget(warningIcon); warningLayout->addWidget(warningIcon);

@ -51,9 +51,9 @@ namespace
// helper method to load icons for configuration pages // helper method to load icons for configuration pages
inline TQPixmap LoadIcon(const char* iconName) inline TQPixmap LoadIcon(const char* iconName)
{ {
KIconLoader* loader = TDEGlobal::instance()->iconLoader(); TDEIconLoader* loader = TDEGlobal::instance()->iconLoader();
return loader->loadIcon(TQString::fromLatin1(iconName), KIcon::NoGroup, return loader->loadIcon(TQString::fromLatin1(iconName), TDEIcon::NoGroup,
KIcon::SizeMedium); TDEIcon::SizeMedium);
} }
} }

@ -325,17 +325,17 @@ bool PoThumbCreator::create(const TQString &path, int width, int height, TQImage
if(pix.width() < 80) if(pix.width() < 80)
{ {
kbabelPix = TDEGlobal::iconLoader()->loadIcon("kbabel" kbabelPix = TDEGlobal::iconLoader()->loadIcon("kbabel"
,KIcon::Small,16,KIcon::DefaultState,0,true); ,TDEIcon::Small,16,TDEIcon::DefaultState,0,true);
} }
else if(pix.width() < 150) else if(pix.width() < 150)
{ {
kbabelPix = TDEGlobal::iconLoader()->loadIcon("kbabel" kbabelPix = TDEGlobal::iconLoader()->loadIcon("kbabel"
,KIcon::Desktop,32,KIcon::DefaultState,0,true); ,TDEIcon::Desktop,32,TDEIcon::DefaultState,0,true);
} }
else else
{ {
kbabelPix = TDEGlobal::iconLoader()->loadIcon("kbabel" kbabelPix = TDEGlobal::iconLoader()->loadIcon("kbabel"
,KIcon::Desktop,48,KIcon::DefaultState,0,true); ,TDEIcon::Desktop,48,TDEIcon::DefaultState,0,true);
} }
int x = pix.width()-kbabelPix.width()-4; int x = pix.width()-kbabelPix.width()-4;

@ -2532,7 +2532,7 @@ void CatalogManagerView::contentsMouseMoveEvent(TQMouseEvent* event)
uri.append(TQUriDrag::localFileToUri(item->potFile())); uri.append(TQUriDrag::localFileToUri(item->potFile()));
TQUriDrag* drag = new TQUriDrag(uri,this); TQUriDrag* drag = new TQUriDrag(uri,this);
TQPixmap icon=TDEGlobal::iconLoader()->loadIcon("txt",KIcon::Desktop); TQPixmap icon=TDEGlobal::iconLoader()->loadIcon("txt",TDEIcon::Desktop);
drag->setPixmap(icon,TQPoint(icon.width()/2,icon.height()/2)); drag->setPixmap(icon,TQPoint(icon.width()/2,icon.height()/2));
drag->drag(); drag->drag();
} }

@ -47,18 +47,18 @@
#define COL_REVISION 6 #define COL_REVISION 6
#define COL_TRANSLATOR 7 #define COL_TRANSLATOR 7
#define ICON_OK UserIcon("ok",KIcon::DefaultState) #define ICON_OK UserIcon("ok",TDEIcon::DefaultState)
#define ICON_MISSING UserIcon("missing",KIcon::DefaultState) #define ICON_MISSING UserIcon("missing",TDEIcon::DefaultState)
#define ICON_NEEDWORK UserIcon("needwork",KIcon::DefaultState) #define ICON_NEEDWORK UserIcon("needwork",TDEIcon::DefaultState)
#define ICON_BROKEN UserIcon("broken",KIcon::DefaultState) #define ICON_BROKEN UserIcon("broken",TDEIcon::DefaultState)
#define ICON_UPDATING SmallIcon("reload") #define ICON_UPDATING SmallIcon("reload")
#define ICON_FLAG SmallIcon("flag") #define ICON_FLAG SmallIcon("flag")
#define ICON_FOLDER_CLOSED_OK SmallIcon("folder_green") #define ICON_FOLDER_CLOSED_OK SmallIcon("folder_green")
#define ICON_FOLDER_CLOSED_WORK SmallIcon("folder_red") #define ICON_FOLDER_CLOSED_WORK SmallIcon("folder_red")
#define ICON_FOLDER_OPEN_OK SmallIcon("folder_green_open") #define ICON_FOLDER_OPEN_OK SmallIcon("folder_green_open")
#define ICON_FOLDER_OPEN_WORK SmallIcon("folder_red_open") #define ICON_FOLDER_OPEN_WORK SmallIcon("folder_red_open")
#define ICON_ERROR UserIcon("error",KIcon::DefaultState) #define ICON_ERROR UserIcon("error",TDEIcon::DefaultState)
#define ICON_NOFLAG UserIcon("noflag",KIcon::DefaultState) #define ICON_NOFLAG UserIcon("noflag",TDEIcon::DefaultState)
// Needed for determining which actions should be enabled and which not. // Needed for determining which actions should be enabled and which not.
#define NEEDS_PO 1 #define NEEDS_PO 1

@ -72,7 +72,7 @@ TDEActionSelector::TDEActionSelector( TQWidget *parent, const char *name )
d->selectedInsertionPolicy = BelowCurrent; d->selectedInsertionPolicy = BelowCurrent;
d->showUpDownButtons = true; d->showUpDownButtons = true;
//int isz = IconSize( KIcon::Small ); //int isz = IconSize( TDEIcon::Small );
TQHBoxLayout *lo = new TQHBoxLayout( this ); TQHBoxLayout *lo = new TQHBoxLayout( this );
lo->setSpacing( KDialog::spacingHint() ); lo->setSpacing( KDialog::spacingHint() );
@ -148,7 +148,7 @@ TQListBox *TDEActionSelector::selectedListBox()
void TDEActionSelector::setButtonIcon( const TQString &icon, MoveButton button ) void TDEActionSelector::setButtonIcon( const TQString &icon, MoveButton button )
{ {
int isz; int isz;
if ( d->iconSize == SmallIcon ) isz = IconSize( KIcon::Small ); if ( d->iconSize == SmallIcon ) isz = IconSize( TDEIcon::Small );
else if ( d->iconSize == Small ) isz = 16; else if ( d->iconSize == Small ) isz = 16;
else if ( d->iconSize == Medium ) isz = 22; else if ( d->iconSize == Medium ) isz = 22;
else if ( d->iconSize == Large ) isz = 32; else if ( d->iconSize == Large ) isz = 32;
@ -501,7 +501,7 @@ void TDEActionSelector::itemDoubleClicked( TQListBoxItem *item )
void TDEActionSelector::loadIcons() void TDEActionSelector::loadIcons()
{ {
int isz; int isz;
if ( d->iconSize == SmallIcon ) isz = IconSize( KIcon::Small ); if ( d->iconSize == SmallIcon ) isz = IconSize( TDEIcon::Small );
else if ( d->iconSize == Small ) isz = 16; else if ( d->iconSize == Small ) isz = 16;
else if ( d->iconSize == Medium ) isz = 22; else if ( d->iconSize == Medium ) isz = 22;
else if ( d->iconSize == Large ) isz = 32; else if ( d->iconSize == Large ) isz = 32;

@ -124,7 +124,7 @@ public:
/** /**
This enum identifies the icon sizes, used for the move buttons. This enum identifies the icon sizes, used for the move buttons.
The values correspond to the following pixel sizes: The values correspond to the following pixel sizes:
@li SmallIcon - the return value of IconSize( KIcon::Small ), the user defined size @li SmallIcon - the return value of IconSize( TDEIcon::Small ), the user defined size
of a small icon in KDE. This is the default setting. of a small icon in KDE. This is the default setting.
@li Small - 16px @li Small - 16px
@li Medium - 22px @li Medium - 22px
@ -283,7 +283,7 @@ public:
Sets the iconset for button @p button to @p iconset. Sets the iconset for button @p button to @p iconset.
You can use this method to et a costum icon set. Either You can use this method to et a costum icon set. Either
created by @ref TQIconSet, or use the application instance of created by @ref TQIconSet, or use the application instance of
@ref KIconLoader (recommended). @ref TDEIconLoader (recommended).
*/ */
void setButtonIconSet( const TQIconSet &iconset, MoveButton button ); void setButtonIconSet( const TQIconSet &iconset, MoveButton button );

@ -77,7 +77,7 @@ PreferencesDialog::~PreferencesDialog()
void PreferencesDialog::setupServerPage() void PreferencesDialog::setupServerPage()
{ {
TQFrame *topFrame = addPage( i18n("Servers"), 0, TQFrame *topFrame = addPage( i18n("Servers"), 0,
DesktopIcon( "gohome", KIcon::SizeMedium ) ); DesktopIcon( "gohome", TDEIcon::SizeMedium ) );
TQBoxLayout *layout = new TQVBoxLayout( topFrame ); TQBoxLayout *layout = new TQVBoxLayout( topFrame );
layout->setSpacing( spacingHint() ); layout->setSpacing( spacingHint() );
@ -108,7 +108,7 @@ void PreferencesDialog::setupServerPage()
void PreferencesDialog::setupAdvancedPage() void PreferencesDialog::setupAdvancedPage()
{ {
TQFrame *topFrame = addPage( i18n("Advanced"), 0, TQFrame *topFrame = addPage( i18n("Advanced"), 0,
DesktopIcon( "misc", KIcon::SizeMedium ) ); DesktopIcon( "misc", TDEIcon::SizeMedium ) );
TQBoxLayout *layout = new TQVBoxLayout( topFrame ); TQBoxLayout *layout = new TQVBoxLayout( topFrame );
layout->setSpacing( spacingHint() ); layout->setSpacing( spacingHint() );

@ -32,8 +32,8 @@ kdbgstream::flush
TDECmdLineArgs::addCmdLineOptions TDECmdLineArgs::addCmdLineOptions
k_bindtextdomain k_bindtextdomain
_nl_find_domain _nl_find_domain
KIconTheme::list TDEIconTheme::list
KIconTheme::current TDEIconTheme::current
TDEGlobalSettings::toolBarFont TDEGlobalSettings::toolBarFont
TDEGlobalSettings::menuFont TDEGlobalSettings::menuFont
TDEGlobalSettings::fixedFont TDEGlobalSettings::fixedFont

@ -72,8 +72,8 @@ $lastdir = '.';
'`SmallIcon\' undeclared \(first use this function\)' => "kiconloader", '`SmallIcon\' undeclared \(first use this function\)' => "kiconloader",
'`UserIcon\' undeclared \(first use this function\)' => "kiconloader", '`UserIcon\' undeclared \(first use this function\)' => "kiconloader",
'implicit declaration of function `int UserIcon\(...\)\'' => "kiconloader", 'implicit declaration of function `int UserIcon\(...\)\'' => "kiconloader",
'`KIcon\' undeclared \(first use this function\)' => "kiconloader", '`TDEIcon\' undeclared \(first use this function\)' => "kiconloader",
'invalid use of undefined type `class KIconLoader' => "kiconloader", 'invalid use of undefined type `class TDEIconLoader' => "kiconloader",
'invalid use of undefined type `class TDEInstance' => "kinstance", 'invalid use of undefined type `class TDEInstance' => "kinstance",
'invalid use of undefined type `class DCOPClient' => "dcopclient", 'invalid use of undefined type `class DCOPClient' => "dcopclient",
'`DCOPClient\' undeclared \(first use this function\)' => "dcopclient", '`DCOPClient\' undeclared \(first use this function\)' => "dcopclient",

@ -122,8 +122,8 @@
; KDE ; KDE
(kdebug.h kdDebug kdWarning kdError kdFatal kdBacktrace) (kdebug.h kdDebug kdWarning kdError kdFatal kdBacktrace)
(tdeconfig.h TDEConfigGroup) (tdeconfig.h TDEConfigGroup)
(kiconloader.h BarIcon SmallIcon DesktopIcon KIcon) (kiconloader.h BarIcon SmallIcon DesktopIcon TDEIcon)
(kicondialog.h KIconCanvas KIconButton) (kicondialog.h TDEIconCanvas TDEIconButton)
(knuminput.h KDoubleNumInput KIntNumInput) (knuminput.h KDoubleNumInput KIntNumInput)
; KDGear - http://www.klaralvdalens-datakonsult.se ; KDGear - http://www.klaralvdalens-datakonsult.se

@ -1149,9 +1149,9 @@ CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce,
if (e->call() && (e->call()->isRecursion() || e->call()->inCycle())) { if (e->call() && (e->call()->isRecursion() || e->call()->inCycle())) {
TQString icon = "undo"; TQString icon = "undo";
KIconLoader* loader = TDEApplication::kApplication()->iconLoader(); TDEIconLoader* loader = TDEApplication::kApplication()->iconLoader();
TQPixmap p= loader->loadIcon(icon, KIcon::Small, 0, TQPixmap p= loader->loadIcon(icon, TDEIcon::Small, 0,
KIcon::DefaultState, 0, true); TDEIcon::DefaultState, 0, true);
setPixmap(0, p); setPixmap(0, p);
} }
} }

@ -146,9 +146,9 @@ void CallItem::updateCost()
if (sameCycle && !selectedIsCycle && !shownIsCycle) { if (sameCycle && !selectedIsCycle && !shownIsCycle) {
TQString icon = "undo"; TQString icon = "undo";
KIconLoader* loader = TDEApplication::kApplication()->iconLoader(); TDEIconLoader* loader = TDEApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0, p= loader->loadIcon(icon, TDEIcon::Small, 0,
KIcon::DefaultState, 0, true); TDEIcon::DefaultState, 0, true);
} }
setPixmap(2, p); setPixmap(2, p);
} }

@ -178,9 +178,9 @@ void InstrItem::updateCost()
TQPixmap p; TQPixmap p;
TQString icon = "undo"; TQString icon = "undo";
KIconLoader* loader = TDEApplication::kApplication()->iconLoader(); TDEIconLoader* loader = TDEApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0, p= loader->loadIcon(icon, TDEIcon::Small, 0,
KIcon::DefaultState, 0, true); TDEIcon::DefaultState, 0, true);
if (p.isNull()) if (p.isNull())
str = i18n("(cycle)"); str = i18n("(cycle)");

@ -162,9 +162,9 @@ void SourceItem::updateCost()
TQPixmap p; TQPixmap p;
TQString icon = "undo"; TQString icon = "undo";
KIconLoader* loader = TDEApplication::kApplication()->iconLoader(); TDEIconLoader* loader = TDEApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0, p= loader->loadIcon(icon, TDEIcon::Small, 0,
KIcon::DefaultState, 0, true); TDEIcon::DefaultState, 0, true);
if (p.isNull()) if (p.isNull())
str = i18n("(cycle)"); str = i18n("(cycle)");

Loading…
Cancel
Save