Browse Source

Rename KIcon to enhance compatibility with KDE4

tags/r14.0.0
Timothy Pearson 7 years ago
parent
commit
f2bfcad7ff
100 changed files with 978 additions and 978 deletions
  1. +5
    -5
      KDE2PORTING.html
  2. +9
    -9
      KDE3PORTING.html
  3. +2
    -2
      arts/knotify/knotify.cpp
  4. +1
    -1
      interfaces/tdetexteditor/configinterfaceextension.h
  5. +1
    -1
      kate/part/katedialogs.cpp
  6. +1
    -1
      kate/part/katedocument.cpp
  7. +1
    -1
      kate/part/katedocument.h
  8. +2
    -2
      kdewidgets/kde.widgets
  9. +2
    -2
      kdewidgets/tests/test.widgets
  10. +1
    -1
      kdoctools/customization/entities/general.entities
  11. +1
    -1
      kdoctools/customization/obsolete/general.entities
  12. +5
    -5
      knewstuff/downloaddialog.cpp
  13. +1
    -1
      tdecore/AUTHORS
  14. +2
    -2
      tdecore/kapplication.cpp
  15. +1
    -1
      tdecore/kapplication.h
  16. +2
    -2
      tdecore/kdebug.areas
  17. +1
    -1
      tdecore/kdebugrc
  18. +1
    -1
      tdecore/kglobal.cpp
  19. +2
    -2
      tdecore/kglobal.h
  20. +29
    -29
      tdecore/kiconeffect.cpp
  21. +21
    -21
      tdecore/kiconeffect.h
  22. +191
    -191
      tdecore/kiconloader.cpp
  23. +76
    -76
      tdecore/kiconloader.h
  24. +18
    -18
      tdecore/kiconloader_p.h
  25. +84
    -84
      tdecore/kicontheme.cpp
  26. +33
    -33
      tdecore/kicontheme.h
  27. +3
    -3
      tdecore/kinstance.cpp
  28. +3
    -3
      tdecore/kinstance.h
  29. +9
    -9
      tdecore/kmimesourcefactory.cpp
  30. +2
    -2
      tdecore/kmimesourcefactory.h
  31. +1
    -1
      tdecore/kpixmapprovider.h
  32. +1
    -1
      tdecore/kstandarddirs.h
  33. +4
    -4
      tdecore/tdehardwaredevices.cpp
  34. +7
    -7
      tdecore/tdehardwaredevices.h
  35. +4
    -4
      tdecore/tests/kiconloadertest.cpp
  36. +4
    -4
      tdecore/twin.cpp
  37. +4
    -4
      tdehtml/ecma/kjs_debugwin.cpp
  38. +1
    -1
      tdehtml/misc/loader.cpp
  39. +7
    -7
      tdehtml/tdehtml_part.cpp
  40. +5
    -5
      tdehtml/tdehtmlview.cpp
  41. +4
    -4
      tdeio/Mainpage.dox
  42. +2
    -2
      tdeio/tdefile/kcustommenueditor.cpp
  43. +92
    -92
      tdeio/tdefile/kicondialog.cpp
  44. +50
    -50
      tdeio/tdefile/kicondialog.h
  45. +2
    -2
      tdeio/tdefile/kimagefilepreview.cpp
  46. +1
    -1
      tdeio/tdefile/knotifydialog.cpp
  47. +1
    -1
      tdeio/tdefile/kopenwith.cpp
  48. +9
    -9
      tdeio/tdefile/kpropertiesdialog.cpp
  49. +4
    -4
      tdeio/tdefile/kpropertiesdialog.h
  50. +16
    -16
      tdeio/tdefile/kurlbar.cpp
  51. +15
    -15
      tdeio/tdefile/kurlbar.h
  52. +1
    -1
      tdeio/tdefile/kurlcombobox.cpp
  53. +4
    -4
      tdeio/tdefile/tdefiledetailview.cpp
  54. +4
    -4
      tdeio/tdefile/tdefiledialog.cpp
  55. +24
    -24
      tdeio/tdefile/tdefileiconview.cpp
  56. +10
    -10
      tdeio/tdefile/tdefileiconview.h
  57. +1
    -1
      tdeio/tdefile/tdefilespeedbar.cpp
  58. +1
    -1
      tdeio/tdefile/tdefiletreebranch.cpp
  59. +4
    -4
      tdeio/tdefile/tdefiletreeview.cpp
  60. +2
    -2
      tdeio/tdefile/tdefiletreeviewitem.cpp
  61. +1
    -1
      tdeio/tdefile/tests/kfstest.cpp
  62. +2
    -2
      tdeio/tdefile/tests/kicondialogtest.cpp
  63. +3
    -3
      tdeio/tdefile/tests/tdefiletreeviewtest.cpp
  64. +2
    -2
      tdeio/tdeio/defaultprogress.cpp
  65. +7
    -7
      tdeio/tdeio/kmimetype.cpp
  66. +12
    -12
      tdeio/tdeio/kmimetype.h
  67. +2
    -2
      tdeio/tdeio/kservice.cpp
  68. +1
    -1
      tdeio/tdeio/kservice.h
  69. +2
    -2
      tdeio/tdeio/kurifilter.cpp
  70. +1
    -1
      tdeio/tdeio/kurlpixmapprovider.cpp
  71. +1
    -1
      tdeio/tdeio/kurlpixmapprovider.h
  72. +1
    -1
      tdeio/tdeio/passdlg.cpp
  73. +6
    -6
      tdeio/tdeio/tdefileitem.cpp
  74. +3
    -3
      tdeio/tdeio/tdefileitem.h
  75. +1
    -1
      tdeio/tests/tdesycocatest.cpp
  76. +1
    -1
      tdeprint/ChangeLog
  77. +2
    -2
      tdeprint/cups/cupsdconf2/cupsddialog.cpp
  78. +1
    -1
      tdeprint/kprintdialog.cpp
  79. +11
    -11
      tdeprint/management/kiconselectaction.cpp
  80. +5
    -5
      tdeprint/management/kiconselectaction.h
  81. +2
    -2
      tdeprint/management/kmconfigdialog.cpp
  82. +3
    -3
      tdeprint/management/kmiconview.cpp
  83. +1
    -1
      tdeprint/management/kmiconview.h
  84. +1
    -1
      tdeprint/management/kmlistview.cpp
  85. +2
    -2
      tdeprint/management/kmmainview.cpp
  86. +2
    -2
      tdeprint/management/kmpropertypage.cpp
  87. +1
    -1
      tdeprint/management/kmspecialprinterdlg.cpp
  88. +2
    -2
      tdeprint/management/kmspecialprinterdlg.h
  89. +2
    -2
      tdeprint/tdefilelist.cpp
  90. +1
    -1
      tdeui/AUTHORS
  91. +1
    -1
      tdeui/kanimwidget.cpp
  92. +1
    -1
      tdeui/kanimwidget.h
  93. +2
    -2
      tdeui/kcombobox.cpp
  94. +2
    -2
      tdeui/kdialog.cpp
  95. +8
    -8
      tdeui/kedittoolbar.cpp
  96. +1
    -1
      tdeui/kguiitem.cpp
  97. +3
    -3
      tdeui/kguiitem.h
  98. +1
    -1
      tdeui/khelpmenu.cpp
  99. +58
    -58
      tdeui/kiconview.cpp
  100. +24
    -24
      tdeui/kiconview.h

+ 5
- 5
KDE2PORTING.html View File

@@ -23,7 +23,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<LI><A HREF="#TDECmdLineArgs">TDECmdLineArgs</A></LI>
<LI><A HREF="#TDELocale">TDELocale</A></LI>
<LI><A HREF="#TDEGlobal">TDEGlobal: access to KDE global objects.</A></LI>
<LI><A HREF="#KIconLoader">KIconLoader</A></LI>
<LI><A HREF="#TDEIconLoader">TDEIconLoader</A></LI>
<LI><A HREF="#KTMainWindow">KTMainWindow</A></LI>
<LI><A HREF="#KHelpMenu">KHelpMenu</A></LI>
<LI><A HREF="#TDEToolBar">TDEToolBar</A></LI>
@@ -207,7 +207,7 @@ must have created a TDEApplication object before the methods can be used.<P>
#include &lt;kglobal.h&gt;
#include &lt;tdeconfig.h&gt; // Needed to use TDEConfig
#include &lt;klocale.h&gt; // Needed to use TDELocale
#include &lt;kiconloader.h&gt; // Needed to use KIconLoader
#include &lt;kiconloader.h&gt; // Needed to use TDEIconLoader
</PRE>
</TD>
</TR>
@@ -219,7 +219,7 @@ must have created a TDEApplication object before the methods can be used.<P>
TQString mystr = i18n( "This is a string" );


KIconLoader *loader = TDEGlobal::iconLoader();
TDEIconLoader *loader = TDEGlobal::iconLoader();
</PRE>
</TD>
</TR>
@@ -227,9 +227,9 @@ must have created a TDEApplication object before the methods can be used.<P>

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

<H3><A NAME="KIconLoader">KIconLoader</A></H3>
<H3><A NAME="TDEIconLoader">TDEIconLoader</A></H3>

KIconLoader in 1.1 used to mix icons for applications and for toolbars.
TDEIconLoader in 1.1 used to mix icons for applications and for toolbars.
This has changed, so you may notice that your application doesn't find
the right icons. loadIcon (used by BarIcon) returns only toolbar icons.<P>
If you need icons for applications, use loadApplicationIcon.<P>


+ 9
- 9
KDE3PORTING.html View File

@@ -211,10 +211,10 @@ The preferred means of defining a shortcut, however, is to use <b>TDEAction</b>.
</table></li-->
</ul>

<H4>KIconLoader, KIconTheme</H4>
Methods now use KIcon::Group and KIcon::Context instead of int as types for group and context arguments.
<H4>TDEIconLoader, TDEIconTheme</H4>
Methods now use TDEIcon::Group and TDEIcon::Context instead of int as types for group and context arguments.
The change should affect only code using hardcoded numeric values instead of using the proper enum constants.
This applies to classes KIconLoader, KIconTheme and (in kio and tdefile) KMimeType, KService, KIconDialog, KIconButton,
This applies to classes TDEIconLoader, TDEIconTheme and (in kio and tdefile) KMimeType, KService, TDEIconDialog, TDEIconButton,
KURLBar and KURLBarItem.

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
@@ -323,13 +323,13 @@ present in Qt3/KDE3. KThemeBase is no longer in tdeui, but in kstyles/kthemestyl
as its use is basically limited to KThemeStyle.

<H4>TDEAction, TDEToolBar, TDEToolBarButton and icons</H4>
The preferred way for specifying icons is passing the icon names (and the icons will be loaded by KIconLoader),
The preferred way for specifying icons is passing the icon names (and the icons will be loaded by TDEIconLoader),
instead of using TQIconSet or TQPixmap. This results in always using the correct icon size and allows delayed
on-demand icon loading.
<p>
Method TDEAction::hasIconSet() has been renamed to TDEAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined.
TDEAction::iconSet() now has an argument specifying icon group, the old TDEAction::iconSet() is still available unless KDE_NO_COMPAT
is defined and returns KIcon::Small iconset, just like in KDE2.
is defined and returns TDEIcon::Small iconset, just like in KDE2.
<p>
TDEToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated.
Use TDEToolBarButton::setIcon() (preferred) or TDEToolBarButton::setIconSet() instead.
@@ -420,7 +420,7 @@ The merging of libtdeio, libtdesycoca, libtdefile and libkssl into a single libt
allowed to fix this dependency problem: KRun can now use the OpenWith dialog directly.

<H4>KMimeType, KService</H4>
Methods now use KIcon::Group and KIcon::Context instead of int as types for group and context arguments.
Methods now use TDEIcon::Group and TDEIcon::Context instead of int as types for group and context arguments.
The change should affect only code using hardcoded numeric values instead of using the proper enum constants.

<H4>KFilterDev</H4>
@@ -563,7 +563,7 @@ flexibility and efficiency.
<br><br>
Sorting has changed radically. Previously, KFileView had protected methods QuickSort,
compareItems() and mergeLists() to sort directory entries for displaying in the views. Now,
KFileView does not do any sorting anymore. Instead, the view's (i.e. KIconView, TDEListView)
KFileView does not do any sorting anymore. Instead, the view's (i.e. TDEIconView, TDEListView)
sorting is utilized by letting its view-items provide a TQString key() method. Therefore,
KFileView offers the two methods
<ul>
@@ -613,8 +613,8 @@ have been merged into the new method activate( const KFileItem * ).
<br><br>
Carsten Pfeiffer <A HREF="mailto:pfeiffer@kde.org">pfeiffer@kde.org</A>

<H4>KIconDialog, KIconButton, KURLBar, KURLBarItem</H4>
Methods now use KIcon::Group and KIcon::Context instead of int as types for group and context arguments.
<H4>TDEIconDialog, TDEIconButton, KURLBar, KURLBarItem</H4>
Methods now use TDEIcon::Group and TDEIcon::Context instead of int as types for group and context arguments.
The change should affect only code using hardcoded numeric values instead of using the proper enum constants.

<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>


+ 2
- 2
arts/knotify/knotify.cpp View File

@@ -591,11 +591,11 @@ bool KNotify::notifyByPassivePopup( const TQString &text,
TDEConfig* eventsFile,
WId senderWinId )
{
KIconLoader iconLoader( appName );
TDEIconLoader iconLoader( appName );
if ( eventsFile != NULL ) {
TDEConfigGroup config( eventsFile, "!Global!" );
TQString iconName = config.readEntry( "IconName", appName );
TQPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small );
TQPixmap icon = iconLoader.loadIcon( iconName, TDEIcon::Small );
TQString title = config.readEntry( "Comment", appName );
KPassivePopup::message(title, text, icon, senderWinId);
} else


+ 1
- 1
interfaces/tdetexteditor/configinterfaceextension.h View File

@@ -95,7 +95,7 @@ class KTEXTEDITOR_EXPORT ConfigInterfaceExtension
virtual TQString configPageName (uint number = 0) const = 0;
virtual TQString configPageFullName (uint number = 0) const = 0;
virtual TQPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const = 0;
virtual TQPixmap configPagePixmap (uint number = 0, int size = TDEIcon::SizeSmall) const = 0;
private:


+ 1
- 1
kate/part/katedialogs.cpp View File

@@ -1226,7 +1226,7 @@ void KatePartPluginConfigPage::slotConfigure()
path.clear();
path << cife->configPageName( i );
page = kd->addVBoxPage( path, cife->configPageFullName (i),
cife->configPagePixmap(i, KIcon::SizeMedium) );
cife->configPagePixmap(i, TDEIcon::SizeMedium) );
}
else
{


+ 1
- 1
kate/part/katedocument.cpp View File

@@ -1998,7 +1998,7 @@ void KateDocument::configDialog()
path.clear();
path << KTextEditor::configInterfaceExtension (this)->configPageName (i);
TQVBox *page = kd->addVBoxPage(path, KTextEditor::configInterfaceExtension (this)->configPageFullName (i),
KTextEditor::configInterfaceExtension (this)->configPagePixmap(i, KIcon::SizeMedium) );
KTextEditor::configInterfaceExtension (this)->configPagePixmap(i, TDEIcon::SizeMedium) );

editorPages.append (KTextEditor::configInterfaceExtension (this)->configPage(i, page));
}


+ 1
- 1
kate/part/katedocument.h View File

@@ -163,7 +163,7 @@ class KateDocument : public Kate::Document,
KTextEditor::ConfigPage *configPage (uint number = 0, TQWidget *parent = 0, const char *name=0 );
TQString configPageName (uint number = 0) const;
TQString configPageFullName (uint number = 0) const;
TQPixmap configPagePixmap (uint number = 0, int size = KIcon::SizeSmall) const;
TQPixmap configPagePixmap (uint number = 0, int size = TDEIcon::SizeSmall) const;

//
// KTextEditor::EditInterface stuff


+ 2
- 2
kdewidgets/kde.widgets View File

@@ -145,12 +145,12 @@ Group=Buttons (KDE)
ToolTip=Line Edit for restricted input (KDE)
Group=Input (KDE)

[KIconButton]
[TDEIconButton]
IncludeFile=kicondialog.h
ToolTip=Button for selecting an icon (KDE)
Group=Buttons (KDE)

[KIconView]
[TDEIconView]
IncludeFile=kiconview.h
ToolTip=Extended Icon View (KDE)
WhatsThis=An improved version of the TQIconView that allows certain KDE extensions


+ 2
- 2
kdewidgets/tests/test.widgets View File

@@ -134,12 +134,12 @@ Group=Buttons (KDE)
ToolTip=Line Edit for restricted input (KDE)
Group=Input (KDE)

[KIconButton]
[TDEIconButton]
IncludeFile=kicondialog.h
ToolTip=Button for selecting an icon (KDE)
Group=Buttons (KDE)

[KIconView]
[TDEIconView]
IncludeFile=kiconview.h
ToolTip=Extended Icon View (KDE)
WhatsThis=An improved version of the QIconView that allows certain KDE extensions


+ 1
- 1
kdoctools/customization/entities/general.entities View File

@@ -223,7 +223,7 @@
<!ENTITY khelpcenter "<application>KHelpCenter</application>">
<!ENTITY khexedit "<application>KHexEdit</application>">
<!ENTITY kicker "<application>Kicker</application>">
<!ENTITY kiconedit "<application>KIconEdit</application>">
<!ENTITY kiconedit "<application>TDEIconEdit</application>">
<!ENTITY kig "<application>Kig</application>">
<!ENTITY kikbd "<application>kikbd</application>">
<!ENTITY kinfocenter "<application>KInfoCenter</application>">


+ 1
- 1
kdoctools/customization/obsolete/general.entities View File

@@ -213,7 +213,7 @@
<!ENTITY khelpcenter "<application>KHelpCenter</application>">
<!ENTITY khexedit "<application>KHexEdit</application>">
<!ENTITY kicker "<application>Kicker</application>">
<!ENTITY kiconedit "<application>KIconEdit</application>">
<!ENTITY kiconedit "<application>TDEIconEdit</application>">
<!ENTITY kikbd "<application>kikbd</application>">
<!ENTITY kit "<application>Kit</application>">
<!ENTITY kiten "<application>Kiten</application>">


+ 5
- 5
knewstuff/downloaddialog.cpp View File

@@ -242,11 +242,11 @@ void DownloadDialog::addProvider(Provider *p)
}
else
{
pix = TDEGlobal::iconLoader()->loadIcon(p->icon().path(), KIcon::Panel);
pix = TDEGlobal::iconLoader()->loadIcon(p->icon().path(), TDEIcon::Panel);
ret = true;
}
}
if(!ret) pix = TDEGlobal::iconLoader()->loadIcon("knewstuff", KIcon::Panel);
if(!ret) pix = TDEGlobal::iconLoader()->loadIcon("knewstuff", TDEIcon::Panel);
frame = addPage(p->name(), p->name(), pix);
m_frame = frame;

@@ -415,8 +415,8 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants)

installed = installStatus(entry);

if(installed > 0) pix = TDEGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
else if(installed < 0) pix = TDEGlobal::iconLoader()->loadIcon("history", KIcon::Small);
if(installed > 0) pix = TDEGlobal::iconLoader()->loadIcon("ok", TDEIcon::Small);
else if(installed < 0) pix = TDEGlobal::iconLoader()->loadIcon("history", TDEIcon::Small);
else pix = TQPixmap();

TQString lang = TDEGlobal::locale()->language();
@@ -550,7 +550,7 @@ void DownloadDialog::install(Entry *e)
kapp->config()->writeEntry(m_entryname, TQString(e->releaseDate().toString(Qt::ISODate)));
kapp->config()->sync();

TQPixmap pix = TDEGlobal::iconLoader()->loadIcon("ok", KIcon::Small);
TQPixmap pix = TDEGlobal::iconLoader()->loadIcon("ok", TDEIcon::Small);

TQString lang = TDEGlobal::locale()->language();


+ 1
- 1
tdecore/AUTHORS View File

@@ -40,7 +40,7 @@ Christian Czezatke <e9025461@student.tuwien.ac.at>
TDEProcess class

Matthias Ettrich <ettrich@kde.org>
KWM, Changes to TDEApplication and KIconLoader
KWM, Changes to TDEApplication and TDEIconLoader

Stephan Kulow <coolo@kde.org>
heavy modifications to KURL, autoconf and automake stuff


+ 2
- 2
tdecore/kapplication.cpp View File

@@ -570,7 +570,7 @@ bool TDEApplication::notify(TQObject *receiver, TQEvent *event)
static TQPixmap* ic = NULL;
if( ic == NULL )
ic = new TQPixmap( TDEGlobal::iconLoader()->loadIcon( iconName(),
KIcon::NoGroup, 0, KIcon::DefaultState, NULL, true ));
TDEIcon::NoGroup, 0, TDEIcon::DefaultState, NULL, true ));
if( !ic->isNull())
{
w->setIcon( *ic );
@@ -978,7 +978,7 @@ void TDEApplication::init(bool GUIenabled)
#ifdef Q_WS_MACX
if (GUIenabled) {
TQPixmap pixmap = TDEGlobal::iconLoader()->loadIcon( TDECmdLineArgs::appName(),
KIcon::NoGroup, KIcon::SizeLarge, KIcon::DefaultState, 0L, false );
TDEIcon::NoGroup, TDEIcon::SizeLarge, TDEIcon::DefaultState, 0L, false );
if (!pixmap.isNull()) {
TQImage i = pixmap.convertToImage().convertDepth(32).smoothScale(40, 40);
for(int y = 0; y < i.height(); y++) {


+ 1
- 1
tdecore/kapplication.h View File

@@ -1516,7 +1516,7 @@ signals:

/**
* @internal
* Used to notify KIconLoader objects that they need to reload.
* Used to notify TDEIconLoader objects that they need to reload.
*/
void updateIconLoaders();



+ 2
- 2
tdecore/kdebug.areas View File

@@ -30,8 +30,8 @@
230 tdeui (KCommand)
240 tdeui (tdelibs)
250 tdefile (tdelibs)
264 tdecore (KIconLoader)
265 tdecore (KIconEffect)
264 tdecore (TDEIconLoader)
265 tdecore (TDEIconEffect)
270 tdeui (KRootPixmap)
280 tdeui (TDESharedPixmap)
281 tdeui (TDECModule)


+ 1
- 1
tdecore/kdebugrc View File

@@ -60,7 +60,7 @@ InfoOutput=4
[250]
InfoOutput=4

# KIconloader debug info off
# TDEIconloader debug info off
[264]
InfoOutput=4



+ 1
- 1
tdecore/kglobal.cpp View File

@@ -74,7 +74,7 @@ TDESharedConfig *TDEGlobal::sharedConfig()
return _instance->sharedConfig();
}

KIconLoader *TDEGlobal::iconLoader()
TDEIconLoader *TDEGlobal::iconLoader()
{
MYASSERT(_instance);



+ 2
- 2
tdecore/kglobal.h View File

@@ -24,7 +24,7 @@
class KCharsets;
class TDEConfig;
class TDESharedConfig;
class KIconLoader;
class TDEIconLoader;
class TDEHardwareDevices;
class TDEGlobalNetworkManager;
class TDELocale;
@@ -77,7 +77,7 @@ public:
* Returns an iconloader object.
* @return the global iconloader object
*/
static KIconLoader *iconLoader();
static TDEIconLoader *iconLoader();

/**
* Returns a TDEHardwareDevices object.


+ 29
- 29
tdecore/kiconeffect.cpp View File

@@ -42,26 +42,26 @@ static bool tqt_has_xft=true;
extern bool tqt_use_xrender;
extern bool tqt_has_xft;
#endif
class KIconEffectPrivate
class TDEIconEffectPrivate
{
public:
TQString mKey[6][3];
TQColor mColor2[6][3];
};

KIconEffect::KIconEffect()
TDEIconEffect::TDEIconEffect()
{
d = new KIconEffectPrivate;
d = new TDEIconEffectPrivate;
init();
}

KIconEffect::~KIconEffect()
TDEIconEffect::~TDEIconEffect()
{
delete d;
d = 0L;
}

void KIconEffect::init()
void TDEIconEffect::init()
{
TDEConfig *config = TDEGlobal::config();

@@ -137,14 +137,14 @@ void KIconEffect::init()
}
}

bool KIconEffect::hasEffect(int group, int state) const
bool TDEIconEffect::hasEffect(int group, int state) const
{
return mEffect[group][state] != NoEffect;
}

TQString KIconEffect::fingerprint(int group, int state) const
TQString TDEIconEffect::fingerprint(int group, int state) const
{
if ( group >= KIcon::LastGroup ) return "";
if ( group >= TDEIcon::LastGroup ) return "";
TQString cached = d->mKey[group][state];
if (cached.isEmpty())
{
@@ -172,14 +172,14 @@ TQString KIconEffect::fingerprint(int group, int state) const
return cached;
}

TQImage KIconEffect::apply(TQImage image, int group, int state) const
TQImage TDEIconEffect::apply(TQImage image, int group, int state) const
{
if (state >= KIcon::LastState)
if (state >= TDEIcon::LastState)
{
kdDebug(265) << "Illegal icon state: " << state << "\n";
return image;
}
if (group >= KIcon::LastGroup)
if (group >= TDEIcon::LastGroup)
{
kdDebug(265) << "Illegal icon group: " << group << "\n";
return image;
@@ -188,12 +188,12 @@ TQImage KIconEffect::apply(TQImage image, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}

TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, bool trans) const
TQImage TDEIconEffect::apply(TQImage image, int effect, float value, const TQColor col, bool trans) const
{
return apply (image, effect, value, col, TDEGlobalSettings::baseColor(), trans);
}

TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, const TQColor col2, bool trans) const
TQImage TDEIconEffect::apply(TQImage image, int effect, float value, const TQColor col, const TQColor col2, bool trans) const
{
if (effect >= LastEffect )
{
@@ -229,14 +229,14 @@ TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor
return image;
}

TQPixmap KIconEffect::apply(TQPixmap pixmap, int group, int state) const
TQPixmap TDEIconEffect::apply(TQPixmap pixmap, int group, int state) const
{
if (state >= KIcon::LastState)
if (state >= TDEIcon::LastState)
{
kdDebug(265) << "Illegal icon state: " << state << "\n";
return pixmap;
}
if (group >= KIcon::LastGroup)
if (group >= TDEIcon::LastGroup)
{
kdDebug(265) << "Illegal icon group: " << group << "\n";
return pixmap;
@@ -245,13 +245,13 @@ TQPixmap KIconEffect::apply(TQPixmap pixmap, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}

TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
TQPixmap TDEIconEffect::apply(TQPixmap pixmap, int effect, float value,
const TQColor col, bool trans) const
{
return apply (pixmap, effect, value, col, TDEGlobalSettings::baseColor(), trans);
}

TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
TQPixmap TDEIconEffect::apply(TQPixmap pixmap, int effect, float value,
const TQColor col, const TQColor col2, bool trans) const
{
TQPixmap result;
@@ -282,7 +282,7 @@ TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
// Taken from KImageEffect. We don't want to link tdecore to tdeui! As long
// as this code is not too big, it doesn't seem much of a problem to me.

void KIconEffect::toGray(TQImage &img, float value)
void TDEIconEffect::toGray(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -304,7 +304,7 @@ void KIconEffect::toGray(TQImage &img, float value)
}
}

void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
void TDEIconEffect::colorize(TQImage &img, const TQColor &col, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -345,7 +345,7 @@ void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
}
}

void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
void TDEIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits()
: (unsigned int *) img.tqcolorTable();
@@ -395,7 +395,7 @@ void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor
}
}

void KIconEffect::deSaturate(TQImage &img, float value)
void TDEIconEffect::deSaturate(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -413,7 +413,7 @@ void KIconEffect::deSaturate(TQImage &img, float value)
}
}

void KIconEffect::toGamma(TQImage &img, float value)
void TDEIconEffect::toGamma(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -435,7 +435,7 @@ void KIconEffect::toGamma(TQImage &img, float value)
}
}

void KIconEffect::semiTransparent(TQImage &img)
void TDEIconEffect::semiTransparent(TQImage &img)
{
img.setAlphaBuffer(true);

@@ -509,7 +509,7 @@ void KIconEffect::semiTransparent(TQImage &img)
}
}

void KIconEffect::semiTransparent(TQPixmap &pix)
void TDEIconEffect::semiTransparent(TQPixmap &pix)
{
if ( tqt_use_xrender && tqt_has_xft )
{
@@ -540,7 +540,7 @@ void KIconEffect::semiTransparent(TQPixmap &pix)
pix.setMask(mask);
}

TQImage KIconEffect::doublePixels(TQImage src) const
TQImage TDEIconEffect::doublePixels(TQImage src) const
{
TQImage dst;
if (src.depth() == 1)
@@ -589,7 +589,7 @@ TQImage KIconEffect::doublePixels(TQImage src) const
return dst;
}

void KIconEffect::overlay(TQImage &src, TQImage &overlay)
void TDEIconEffect::overlay(TQImage &src, TQImage &overlay)
{
if (src.depth() != overlay.depth())
{
@@ -704,7 +704,7 @@ void KIconEffect::overlay(TQImage &src, TQImage &overlay)
}

void
KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect)
{
if (!TDEGlobalSettings::visualActivate())
return;
@@ -772,7 +772,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
}

void
KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
{
if (!TDEGlobalSettings::visualActivate())
return;


+ 21
- 21
tdecore/kiconeffect.h View File

@@ -10,8 +10,8 @@
* exact licensing terms.
*/

#ifndef __KIconEffect_h_Included__
#define __KIconEffect_h_Included__
#ifndef __TDEIconEffect_h_Included__
#define __TDEIconEffect_h_Included__

#include <tqimage.h>
#include <tqpixmap.h>
@@ -21,7 +21,7 @@

class TQWidget;

class KIconEffectPrivate;
class TDEIconEffectPrivate;

/**
* Applies effects to icons.
@@ -29,16 +29,16 @@ class KIconEffectPrivate;
* This class applies effects to icons depending on their state and
* group. For example, it can be used to make all disabled icons
* in a toolbar gray.
* @see KIcon
* @see TDEIcon
*/
class TDECORE_EXPORT KIconEffect
class TDECORE_EXPORT TDEIconEffect
{
public:
/**
* Create a new KIconEffect.
* Create a new TDEIconEffect.
*/
KIconEffect();
~KIconEffect();
TDEIconEffect();
~TDEIconEffect();

/**
* This is the enumeration of all possible icon effects.
@@ -63,12 +63,12 @@ public:

/**
* Tests whether an effect has been configured for the given icon group.
* @param group the group to check, see KIcon::Group
* @param state the state to check, see KIcon::States
* @param group the group to check, see TDEIcon::Group
* @param state the state to check, see TDEIcon::States
* @returns true if an effect is configured for the given @p group
* in @p state, otherwise false.
* @see KIcon::Group
* KIcon::States
* @see TDEIcon::Group
* TDEIcon::States
*/
bool hasEffect(int group, int state) const;

@@ -76,8 +76,8 @@ public:
* Returns a fingerprint for the effect by encoding
* the given @p group and @p state into a TQString. This
* is useful for caching.
* @param group the group, see KIcon::Group
* @param state the state, see KIcon::States
* @param group the group, see TDEIcon::Group
* @param state the state, see TDEIcon::States
* @return the fingerprint of the given @p group+@p state
*/
TQString fingerprint(int group, int state) const;
@@ -86,8 +86,8 @@ public:
* Applies an effect to an image. The effect to apply depends on the
* @p group and @p state parameters, and is configured by the user.
* @param src The image.
* @param group The group for the icon, see KIcon::Group
* @param state The icon's state, see KIcon::States
* @param group The group for the icon, see TDEIcon::Group
* @param state The icon's state, see TDEIcon::States
* @return An image with the effect applied.
*/
TQImage apply(TQImage src, int group, int state) const;
@@ -95,7 +95,7 @@ public:
/**
* Applies an effect to an image.
* @param src The image.
* @param effect The effect to apply, one of KIconEffect::Effects.
* @param effect The effect to apply, one of TDEIconEffect::Effects.
* @param value Strength of the effect. 0 <= @p value <= 1.
* @param rgb Color parameter for effects that need one.
* @param trans Add Transparency if trans = true.
@@ -111,8 +111,8 @@ public:
/**
* Applies an effect to a pixmap.
* @param src The pixmap.
* @param group The group for the icon, see KIcon::Group
* @param state The icon's state, see KIcon::States
* @param group The group for the icon, see TDEIcon::Group
* @param state The icon's state, see TDEIcon::States
* @return A pixmap with the effect applied.
*/
TQPixmap apply(TQPixmap src, int group, int state) const;
@@ -120,7 +120,7 @@ public:
/**
* Applies an effect to a pixmap.
* @param src The pixmap.
* @param effect The effect to apply, one of KIconEffect::Effects.
* @param effect The effect to apply, one of TDEIconEffect::Effects.
* @param value Strength of the effect. 0 <= @p value <= 1.
* @param rgb Color parameter for effects that need one.
* @param trans Add Transparency if trans = true.
@@ -225,7 +225,7 @@ private:
float mValue[6][3];
TQColor mColor[6][3];
bool mTrans[6][3];
KIconEffectPrivate *d;
TDEIconEffectPrivate *d;
};

#endif

+ 191
- 191
tdecore/kiconloader.cpp
File diff suppressed because it is too large
View File


+ 76
- 76
tdecore/kiconloader.h View File

@@ -9,8 +9,8 @@
* exact licensing terms.
*/

#ifndef __KIconLoader_h_Included__
#define __KIconLoader_h_Included__
#ifndef __TDEIconLoader_h_Included__
#define __TDEIconLoader_h_Included__

#include <tqstring.h>
#include <tqpixmap.h>
@@ -18,31 +18,31 @@

// Grmbl, X headers.....
#ifdef Status
#define KIconLoaderXStatus Status
#define TDEIconLoaderXStatus Status
#undef Status
#endif
#include <tqmovie.h>
#ifdef KIconLoaderXStatus
#ifdef TDEIconLoaderXStatus
#define Status int
#undef KIconLoaderXStatus
#undef TDEIconLoaderXStatus
#endif

#include <kglobal.h>
#include <kinstance.h>
#include <kicontheme.h>

struct KIconGroup;
class KIconThemeNode;
struct TDEIconGroup;
class TDEIconThemeNode;
class TDEConfig;
struct KIconLoaderPrivate;
struct TDEIconLoaderPrivate;
class TDEStandardDirs;
class KIconEffect;
class TDEIconEffect;


/**
* Iconloader for KDE.
*
* KIconLoader will load the current icon theme and all its base themes.
* TDEIconLoader will load the current icon theme and all its base themes.
* Icons will be searched in any of these themes. Additionally, it caches
* icons and applies effects according the the user's preferences.
*
@@ -55,12 +55,12 @@ class KIconEffect;
*
* The standard groups are defined below.
*
* @li KIcon::Desktop: Icons in the iconview of konqueror, kdesktop and similar apps.
* @li KIcon::Toolbar: Icons in toolbars.
* @li KIcon::MainToolbar: Icons in the main toolbars.
* @li KIcon::Small: Various small (typical 16x16) places: titlebars, listviews
* @li TDEIcon::Desktop: Icons in the iconview of konqueror, kdesktop and similar apps.
* @li TDEIcon::Toolbar: Icons in toolbars.
* @li TDEIcon::MainToolbar: Icons in the main toolbars.
* @li TDEIcon::Small: Various small (typical 16x16) places: titlebars, listviews
* and menu entries.
* @li KIcon::Panel: Icons in kicker's panel
* @li TDEIcon::Panel: Icons in kicker's panel
*
* The icons are stored on disk in an icon theme or in a standalone
* directory. The icon theme directories contain multiple sizes and/or
@@ -74,7 +74,7 @@ class KIconEffect;
* "User".
*
*/
class TDECORE_EXPORT KIconLoader
class TDECORE_EXPORT TDEIconLoader
{
public:

@@ -92,12 +92,12 @@ public:
* @see TDEGlobal::iconLoader()
* @see TDEInstance::iconLoader()
*/
KIconLoader(const TQString& appname=TQString::null, TDEStandardDirs *dirs = 0);
TDEIconLoader(const TQString& appname=TQString::null, TDEStandardDirs *dirs = 0);

/**
* Cleanup
*/
~KIconLoader();
~TDEIconLoader();

/**
* Adds @p appname to the list of application specific directories.
@@ -116,7 +116,7 @@ public:
* @param group The icon group. This will specify the size of and effects to
* be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group.
* See KIcon::StdSizes.
* See TDEIcon::StdSizes.
* @param state The icon state: @p DefaultState, @p ActiveState or
* @p DisabledState. Depending on the user's preferences, the iconloader
* may apply a visual effect to hint about its state.
@@ -126,8 +126,8 @@ public:
* @return the TQPixmap. Can be null when not found, depending on
* @p canReturnNull.
*/
TQPixmap loadIcon(const TQString& name, KIcon::Group group, int size=0,
int state=KIcon::DefaultState, TQString *path_store=0L,
TQPixmap loadIcon(const TQString& name, TDEIcon::Group group, int size=0,
int state=TDEIcon::DefaultState, TQString *path_store=0L,
bool canReturnNull=false) const;

/**
@@ -138,7 +138,7 @@ public:
* @param group The icon group. This will specify the size of and effects to
* be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group.
* See KIcon::StdSizes.
* See TDEIcon::StdSizes.
* @param canReturnNull Can return a null iconset? If false, iconset
* containing the "unknown" pixmap is returned when no appropriate icon has
* been found.
@@ -148,10 +148,10 @@ public:
* @p canReturnNull.
* @since 3.5
*/
TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size,
TQIconSet loadIconSet(const TQString& name, TDEIcon::Group group, int size,
bool canReturnNull, bool immediateExistenceCheck);

// KDE4 merge as (const TQString&,KIcon::Group,int=0,bool=false,bool=true);
// KDE4 merge as (const TQString&,TDEIcon::Group,int=0,bool=false,bool=true);
/**
* Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon .
@@ -160,7 +160,7 @@ public:
* @param group The icon group. This will specify the size of and effects to
* be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group.
* See KIcon::StdSizes.
* See TDEIcon::StdSizes.
* @param canReturnNull Can return a null iconset? If false, iconset
* containing the "unknown" pixmap is returned when no appropriate icon has
* been found.
@@ -168,10 +168,10 @@ public:
* @p canReturnNull.
* @since 3.1
*/
TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size,
TQIconSet loadIconSet(const TQString& name, TDEIcon::Group group, int size,
bool canReturnNull);

// KDE4 merge as (const TQString&,KIcon::Group,int=0,bool=false,bool=true);
// KDE4 merge as (const TQString&,TDEIcon::Group,int=0,bool=false,bool=true);
/**
* Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon .
@@ -180,10 +180,10 @@ public:
* @param group The icon group. This will specify the size of and effects to
* be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group.
* See KIcon::StdSizes.
* See TDEIcon::StdSizes.
* @return the icon set. Can be null when not found
*/
TQIconSet loadIconSet(const TQString& name, KIcon::Group group, int size=0);
TQIconSet loadIconSet(const TQString& name, TDEIcon::Group group, int size=0);

/**
* Returns the path of an icon.
@@ -193,7 +193,7 @@ public:
* @param group_or_size If positive, search icons whose size is
* specified by the icon group @p group_or_size. If negative, search
* icons whose size is - @p group_or_size.
* See KIcon::Group and KIcon::StdSizes
* See TDEIcon::Group and TDEIcon::StdSizes
* @param canReturnNull Can return a null string? If not, a path to the
* "unknown" icon will be returned.
* @return the path of an icon, can be null or the "unknown" icon when
@@ -207,21 +207,21 @@ public:
* @param name The name of the icon.
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
* See KIcon::StdSizes.
* See TDEIcon::StdSizes.
* @return A TQMovie object. Can be null if not found.
*/
TQMovie loadMovie(const TQString& name, KIcon::Group group, int size=0) const;
TQMovie loadMovie(const TQString& name, TDEIcon::Group group, int size=0) const;

/**
* Returns the path to an animated icon.
* @param name The name of the icon.
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
* See KIcon::StdSizes.
* See TDEIcon::StdSizes.
* @return the full path to the movie, ready to be passed to QMovie's constructor.
* Empty string if not found.
*/
TQString moviePath(const TQString& name, KIcon::Group group, int size=0) const;
TQString moviePath(const TQString& name, TDEIcon::Group group, int size=0) const;

/**
* Loads an animated icon as a series of still frames. If you want to load
@@ -229,11 +229,11 @@ public:
* @param name The name of the icon.
* @param group The icon group. See loadIcon().
* @param size Override the default size for @p group.
* See KIcon::StdSizes.
* See TDEIcon::StdSizes.
* @return A TQStringList containing the absolute path of all the frames
* making up the animation.
*/
TQStringList loadAnimated(const TQString& name, KIcon::Group group, int size=0) const;
TQStringList loadAnimated(const TQString& name, TDEIcon::Group group, int size=0) const;

/**
* Queries all available icons for a specific group, having a specific
@@ -241,30 +241,30 @@ public:
* @param group_or_size If positive, search icons whose size is
* specified by the icon group @p group_or_size. If negative, search
* icons whose size is - @p group_or_size.
* See KIcon::Group and KIcon::StdSizes
* See TDEIcon::Group and TDEIcon::StdSizes
* @param context The icon context.
* @return a list of all icons
*/
TQStringList queryIcons(int group_or_size, KIcon::Context context=KIcon::Any) const;
TQStringList queryIcons(int group_or_size, TDEIcon::Context context=TDEIcon::Any) const;

/**
* Queries all available icons for a specific context.
* @param group_or_size The icon preferred group or size. If available
* at this group or size, those icons will be returned, in other case,
* icons of undefined size will be returned. Positive numbers are groups,
* negative numbers are negated sizes. See KIcon::Group and
* KIcon::StdSizes
* negative numbers are negated sizes. See TDEIcon::Group and
* TDEIcon::StdSizes
* @param context The icon context.
* @return A TQStringList containing the icon names
* available for that context
*/
TQStringList queryIconsByContext(int group_or_size,
KIcon::Context context=KIcon::Any) const;
TDEIcon::Context context=TDEIcon::Any) const;

/**
* @internal
*/
bool hasContext( KIcon::Context context ) const;
bool hasContext( TDEIcon::Context context ) const;

/**
* Returns a list of all icons (*.png or *.xpm extension) in the
@@ -280,20 +280,20 @@ public:
* @param group the group to check.
* @return the current size for an icon group.
*/
int currentSize(KIcon::Group group) const;
int currentSize(TDEIcon::Group group) const;

/**
* Returns a pointer to the current theme. Can be used to query
* available and default sizes for groups.
* @return a pointer to the current theme. 0 if no theme set.
*/
KIconTheme *theme() const;
TDEIconTheme *theme() const;

/**
* Returns a pointer to the KIconEffect object used by the icon loader.
* @return the KIconEffect.
* Returns a pointer to the TDEIconEffect object used by the icon loader.
* @return the TDEIconEffect.
*/
KIconEffect *iconEffect() const;
TDEIconEffect *iconEffect() const;

/**
* Called by TDEInstance::newIconLoader to reconfigure the icon loader.
@@ -317,7 +317,7 @@ public:
* @return true if alpha blending is desired
* @obsolete
*/
bool alphaBlending( KIcon::Group group ) const;
bool alphaBlending( TDEIcon::Group group ) const;

/**
* Adds all the default themes from other desktops at the end of
@@ -344,7 +344,7 @@ public:
* The default is disabled, as the iconloader object must not be
* destroyed before all those iconsets are destroyed.
*
* (Some broken applications use temporary KIconLoader objects).
* (Some broken applications use temporary TDEIconLoader objects).
* Every TDEInstance 's iconloader has this feature enabled.
*
* @param enable true to enable delayed icon loading, false to disable
@@ -375,7 +375,7 @@ public:
* tries to find an icon with the name. It tries some extension and
* match strategies
*/
KIcon findMatchingIcon(const TQString& name, int size) const;
TDEIcon findMatchingIcon(const TQString& name, int size) const;

/**
* @internal
@@ -394,7 +394,7 @@ public:
* below (the fallbacks of the theme) in the tree.
* @internal
*/
void addBaseThemes(KIconThemeNode *node, const TQString &appname);
void addBaseThemes(TDEIconThemeNode *node, const TQString &appname);

/**
* @internal
@@ -434,120 +434,120 @@ public:
/**
* Loads all the different sizes for an iconset.
*/
TQIconSet loadIconSetNonDelayed( const TQString& name, KIcon::Group group,
TQIconSet loadIconSetNonDelayed( const TQString& name, TDEIcon::Group group,
int size, bool canReturnNull );

// @internal the data object
KIconLoaderPrivate *d;
TDEIconLoaderPrivate *d;
};

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a desktop icon.
*/
TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState,
int state=TDEIcon::DefaultState,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a desktop icon.
*/
TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, TDEInstance *instance);

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a desktop icon, and apply the necessary effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet DesktopIconSet(const TQString& name, int size=0,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a toolbar icon.
*/
TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, int size=0, int state=KIcon::DefaultState,
TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, int size=0, int state=TDEIcon::DefaultState,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a toolbar icon.
*/
TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, TDEInstance *instance);

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a toolbar icon, and apply the necessary effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet BarIconSet(const TQString& name, int size=0,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a small icon.
*/
TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState,
int state=TDEIcon::DefaultState,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a small icon.
*/
TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, TDEInstance *instance);

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a small icon, and apply the necessary effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet SmallIconSet(const TQString& name, int size=0,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a main toolbar icon.
*/
TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState,
int state=TDEIcon::DefaultState,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a main toolbar icon.
*/
TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, TDEInstance *instance);

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a main toolbar icon, and apply the effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet MainBarIconSet(const TQString& name, int size=0,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a user icon. User icons are searched in $appdir/pics.
*/
TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, int state=KIcon::DefaultState,
TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, int state=TDEIcon::DefaultState,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a user icon. User icons are searched in $appdir/pics.
*/
TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, TDEInstance *instance);

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Load a user icon, and apply the effects to get an IconSet.
*/
TDECORE_EXPORT TQIconSet UserIconSet(const TQString& name,
TDEInstance *instance=TDEGlobal::instance());

/**
* \relates KIconLoader
* \relates TDEIconLoader
* Returns the current icon size for a specific group.
*/
TDECORE_EXPORT int IconSize(KIcon::Group group, TDEInstance *instance=TDEGlobal::instance());
TDECORE_EXPORT int IconSize(TDEIcon::Group group, TDEInstance *instance=TDEGlobal::instance());

#endif // __KIconLoader_h_Included__
#endif // __TDEIconLoader_h_Included__

+ 18
- 18
tdecore/kiconloader_p.h View File

@@ -9,8 +9,8 @@
* exact licensing terms.
*/

#ifndef __KIconLoader_p_h_Included__
#define __KIconLoader_p_h_Included__
#ifndef __TDEIconLoader_p_h_Included__
#define __TDEIconLoader_p_h_Included__

#include <tqobject.h>
#include <tqstringlist.h>
@@ -19,37 +19,37 @@
#include <kiconeffect.h>
#include <tqdict.h>

class KIconThemeNode
class TDEIconThemeNode
{
public:
KIconThemeNode(KIconTheme *_theme);
~KIconThemeNode();
TDEIconThemeNode(TDEIconTheme *_theme);
~TDEIconThemeNode();

void queryIcons(TQStringList *lst, int size, KIcon::Context context) const;
void queryIconsByContext(TQStringList *lst, int size, KIcon::Context context) const;
KIcon findIcon(const TQString& name, int size, KIcon::MatchType match) const;
void queryIcons(TQStringList *lst, int size, TDEIcon::Context context) const;
void queryIconsByContext(TQStringList *lst, int size, TDEIcon::Context context) const;
TDEIcon findIcon(const TQString& name, int size, TDEIcon::MatchType match) const;
void printTree(TQString& dbgString) const;

KIconTheme *theme;
TDEIconTheme *theme;
};

class KIconLoaderPrivate : public TQObject
class TDEIconLoaderPrivate : public TQObject
{
Q_OBJECT
public:
TQStringList mThemesInTree;
KIconGroup *mpGroups;
KIconThemeNode *mpThemeRoot;
TDEIconGroup *mpGroups;
TDEIconThemeNode *mpThemeRoot;
TDEStandardDirs *mpDirs;
KIconLoader *q;
KIconEffect mpEffect;
TDEIconLoader *q;
TDEIconEffect mpEffect;
TQDict<TQImage> imgDict;
TQImage lastImage; // last loaded image without effect applied
TQString lastImageKey; // key for icon without effect
TQString appname;
int lastIconType; // see KIcon::type
int lastIconThreshold; // see KIcon::threshold
TQPtrList<KIconThemeNode> links;
int lastIconType; // see TDEIcon::type
int lastIconThreshold; // see TDEIcon::threshold
TQPtrList<TDEIconThemeNode> links;
bool extraDesktopIconsLoaded;
bool delayedLoading;

@@ -57,4 +57,4 @@ public slots:
void reconfigure();
};

#endif // __KIconLoader_p_h_Included__
#endif // __TDEIconLoader_p_h_Included__

+ 84
- 84
tdecore/kicontheme.cpp View File

@@ -37,7 +37,7 @@

#include "kicontheme.h"

class KIconThemePrivate
class TDEIconThemePrivate
{
public:
TQString example, screenshot;
@@ -49,18 +49,18 @@ public:
/**
* A subdirectory in an icon theme.
*/
class KIconThemeDir
class TDEIconThemeDir
{
public:
KIconThemeDir(const TQString& dir, const TDEConfigBase *config);
TDEIconThemeDir(const TQString& dir, const TDEConfigBase *config);

bool isValid() const { return mbValid; }
TQString iconPath(const TQString& name) const;
TQStringList iconList() const;
TQString dir() const { return mDir; }

KIcon::Context context() const { return mContext; }
KIcon::Type type() const { return mType; }
TDEIcon::Context context() const { return mContext; }
TDEIcon::Type type() const { return mType; }
int size() const { return mSize; }
int minSize() const { return mMinSize; }
int maxSize() const { return mMaxSize; }
@@ -68,8 +68,8 @@ public:

private:
bool mbValid;
KIcon::Type mType;
KIcon::Context mContext;
TDEIcon::Type mType;
TDEIcon::Context mContext;
int mSize, mMinSize, mMaxSize;
int mThreshold;

@@ -77,11 +77,11 @@ private:
};


/*** KIconTheme ***/
/*** TDEIconTheme ***/

KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
TDEIconTheme::TDEIconTheme(const TQString& name, const TQString& appName)
{
d = new KIconThemePrivate;
d = new TDEIconThemePrivate;

TQStringList icnlibs;
TQStringList::ConstIterator it, itDir;
@@ -168,7 +168,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
{
if (TDEStandardDirs::exists(*itDir + *it + "/"))
{
KIconThemeDir *dir = new KIconThemeDir(*itDir + *it, &cfg);
TDEIconThemeDir *dir = new TDEIconThemeDir(*itDir + *it, &cfg);
if (!dir->isValid())
{
kdDebug(264) << "Icon directory " << *itDir << " group " << *it << " not valid.\n";
@@ -183,9 +183,9 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
// Expand available sizes for scalable icons to their full range
int i;
TQMap<int,TQValueList<int> > scIcons;
for (KIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next())
for (TDEIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next())
{
if ((dir->type() == KIcon::Scalable) && !scIcons.contains(dir->size()))
if ((dir->type() == TDEIcon::Scalable) && !scIcons.contains(dir->size()))
{
TQValueList<int> lst;
for (i=dir->minSize(); i<=dir->maxSize(); i++)
@@ -219,31 +219,31 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)

}

KIconTheme::~KIconTheme()
TDEIconTheme::~TDEIconTheme()
{
delete d;
}

bool KIconTheme::isValid() const
bool TDEIconTheme::isValid() const
{
return !mDirs.isEmpty();
}

bool KIconTheme::isHidden() const
bool TDEIconTheme::isHidden() const
{
return d->hidden;
}

TQString KIconTheme::example() const { return d->example; }
TQString KIconTheme::screenshot() const { return d->screenshot; }
TQString KIconTheme::linkOverlay() const { return d->linkOverlay; }
TQString KIconTheme::lockOverlay() const { return d->lockOverlay; }
TQString KIconTheme::zipOverlay() const { return d->zipOverlay; }
TQString KIconTheme::shareOverlay() const { return d->shareOverlay; }
TQString TDEIconTheme::example() const { return d->example; }
TQString TDEIconTheme::screenshot() const { return d->screenshot; }
TQString TDEIconTheme::linkOverlay() const { return d->linkOverlay; }
TQString TDEIconTheme::lockOverlay() const { return d->lockOverlay; }
TQString TDEIconTheme::zipOverlay() const { return d->zipOverlay; }
TQString TDEIconTheme::shareOverlay() const { return d->shareOverlay; }

int KIconTheme::defaultSize(KIcon::Group group) const
int TDEIconTheme::defaultSize(TDEIcon::Group group) const
{
if ((group < 0) || (group >= KIcon::LastGroup))
if ((group < 0) || (group >= TDEIcon::LastGroup))
{
kdDebug(264) << "Illegal icon group: " << group << "\n";
return -1;
@@ -251,10 +251,10 @@ int KIconTheme::defaultSize(KIcon::Group group) const
return mDefSize[group];
}

TQValueList<int> KIconTheme::querySizes(KIcon::Group group) const
TQValueList<int> TDEIconTheme::querySizes(TDEIcon::Group group) const
{
TQValueList<int> empty;
if ((group < 0) || (group >= KIcon::LastGroup))
if ((group < 0) || (group >= TDEIcon::LastGroup))
{
kdDebug(264) << "Illegal icon group: " << group << "\n";
return empty;
@@ -262,32 +262,32 @@ TQValueList<int> KIconTheme::querySizes(KIcon::Group group) const
return mSizes[group];
}

TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
TQStringList TDEIconTheme::queryIcons(int size, TDEIcon::Context context) const
{
int delta = 1000, dw;

TQPtrListIterator<KIconThemeDir> dirs(mDirs);
KIconThemeDir *dir;
TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
TDEIconThemeDir *dir;

// Try to find exact match
TQStringList result;
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
if ((context != KIcon::Any) && (context != dir->context()))
if ((context != TDEIcon::Any) && (context != dir->context()))
continue;
if ((dir->type() == KIcon::Fixed) && (dir->size() == size))
if ((dir->type() == TDEIcon::Fixed) && (dir->size() == size))
{
result += dir->iconList();
continue;
}
if ((dir->type() == KIcon::Scalable) &&
if ((dir->type() == TDEIcon::Scalable) &&
(size >= dir->minSize()) && (size <= dir->maxSize()))
{
result += dir->iconList();
continue;
}
if ((dir->type() == KIcon::Threshold) &&
if ((dir->type() == TDEIcon::Threshold) &&
(abs(size-dir->size())<dir->threshold()))
result+=dir->iconList();
}
@@ -297,11 +297,11 @@ TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
dirs.toFirst();

// Find close match
KIconThemeDir *best = 0L;
TDEIconThemeDir *best = 0L;
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
if ((context != KIcon::Any) && (context != dir->context()))
if ((context != TDEIcon::Any) && (context != dir->context()))
continue;
dw = dir->size() - size;
if ((dw > 6) || (abs(dw) >= abs(delta)))
@@ -315,11 +315,11 @@ TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
return best->iconList();
}

TQStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) const
TQStringList TDEIconTheme::queryIconsByContext(int size, TDEIcon::Context context) const
{
TQPtrListIterator<KIconThemeDir> dirs(mDirs);
TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
int dw;
KIconThemeDir *dir;
TDEIconThemeDir *dir;

// We want all the icons for a given context, but we prefer icons
// of size size . Note that this may (will) include duplicate icons
@@ -332,7 +332,7 @@ TQStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) c
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
if ((context != KIcon::Any) && (context != dir->context()))
if ((context != TDEIcon::Any) && (context != dir->context()))
continue;
dw = abs(dir->size() - size);
iconlist[(dw<127)?dw:127]+=dir->iconList();
@@ -344,50 +344,50 @@ TQStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) c
return iconlistResult;
}

bool KIconTheme::hasContext(KIcon::Context context) const
bool TDEIconTheme::hasContext(TDEIcon::Context context) const
{
TQPtrListIterator<KIconThemeDir> dirs(mDirs);
KIconThemeDir *dir;
TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
TDEIconThemeDir *dir;

for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();
if ((context == KIcon::Any) || (context == dir->context()))
if ((context == TDEIcon::Any) || (context == dir->context()))
return true;
}
return false;
}

KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType match) const
TDEIcon TDEIconTheme::iconPath(const TQString& name, int size, TDEIcon::MatchType match) const
{
KIcon icon;
TDEIcon icon;
TQString path;
int delta = -1000, dw;
KIconThemeDir *dir;
TDEIconThemeDir *dir;

dw = 1000; // shut up, gcc
TQPtrListIterator<KIconThemeDir> dirs(mDirs);
TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
for ( ; dirs.current(); ++dirs)
{
dir = dirs.current();

if (match == KIcon::MatchExact)
if (match == TDEIcon::MatchExact)
{
if ((dir->type() == KIcon::Fixed) && (dir->size() != size))
if ((dir->type() == TDEIcon::Fixed) && (dir->size() != size))
continue;
if ((dir->type() == KIcon::Scalable) &&
if ((dir->type() == TDEIcon::Scalable) &&
((size < dir->minSize()) || (size > dir->maxSize())))
continue;
if ((dir->type() == KIcon::Threshold) &&
if ((dir->type() == TDEIcon::Threshold) &&
(abs(dir->size()-size) > dir->threshold()))
continue;
} else
{
// dw < 0 means need to scale up to get an icon of the requested size
if (dir->type() == KIcon::Fixed)
if (dir->type() == TDEIcon::Fixed)
{
dw = dir->size() - size;
} else if (dir->type() == KIcon::Scalable)
} else if (dir->type() == TDEIcon::Scalable)
{
if (size < dir->minSize())
dw = dir->minSize() - size;
@@ -395,7 +395,7 @@ KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType matc
dw = dir->maxSize() - size;
else
dw = 0;
} else if (dir->type() == KIcon::Threshold)
} else if (dir->type() == TDEIcon::Threshold)
{
if (size < dir->size() - dir->threshold())
dw = dir->size() - dir->threshold() - size;
@@ -423,7 +423,7 @@ KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType matc
icon.context = dir->context();

// if we got in MatchExact that far, we find no better
if (match == KIcon::MatchExact)
if (match == TDEIcon::MatchExact)
return icon;
else
{
@@ -435,13 +435,13 @@ KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType matc
}

// static
TQString *KIconTheme::_theme = 0L;
TQString *TDEIconTheme::_theme = 0L;

// static
TQStringList *KIconTheme::_theme_list = 0L;
TQStringList *TDEIconTheme::_theme_list = 0L;

// static
TQString KIconTheme::current()
TQString TDEIconTheme::current()
{
// Static pointer because of unloading problems wrt DSO's.
if (_theme != 0L)
@@ -463,7 +463,7 @@ TQString KIconTheme::current()
}

// static
TQStringList KIconTheme::list()
TQStringList TDEIconTheme::list()
{
// Static pointer because of unloading problems wrt DSO's.
if (_theme_list != 0L)
@@ -489,7 +489,7 @@ TQStringList KIconTheme::list()
continue;
if (!TDEStandardDirs::exists(*it + *it2 + "/index.desktop") && !TDEStandardDirs::exists(*it + *it2 + "/index.theme"))
continue;
KIconTheme oink(*it2);
TDEIconTheme oink(*it2);
if (!oink.isValid()) continue;

if (!_theme_list->contains(*it2))
@@ -500,7 +500,7 @@ TQStringList KIconTheme::list()
}

// static
void KIconTheme::reconfigure()
void TDEIconTheme::reconfigure()
{
delete _theme;
_theme=0L;
@@ -509,75 +509,75 @@ void KIconTheme::reconfigure()
}

// static
TQString KIconTheme::defaultThemeName()
TQString TDEIconTheme::defaultThemeName()
{
return TQString::fromLatin1("crystalsvg");
}

/*** KIconThemeDir ***/
/*** TDEIconThemeDir ***/

KIconThemeDir::KIconThemeDir(const TQString& dir, const TDEConfigBase *config)
TDEIconThemeDir::TDEIconThemeDir(const TQString& dir, const TDEConfigBase *config)
{
mbValid = false;
mDir = dir;
mSize = config->readNumEntry("Size");
mMinSize = 1; // just set the variables to something
mMaxSize = 50; // meaningful in case someone calls minSize or maxSize
mType = KIcon::Fixed;
mType = TDEIcon::Fixed;

if (mSize == 0)
return;

TQString tmp = config->readEntry("Context");
if (tmp == "Devices")
mContext = KIcon::Device;
mContext = TDEIcon::Device;
else if (tmp == "MimeTypes")
mContext = KIcon::MimeType;
mContext = TDEIcon::MimeType;
else if (tmp == "FileSystems")
mContext = KIcon::FileSystem;
mContext = TDEIcon::FileSystem;
else if (tmp == "Applications")
mContext = KIcon::Application;
mContext = TDEIcon::Application;
else if (tmp == "Actions")
mContext = KIcon::Action;
mContext = TDEIcon::Action;
else if (tmp == "Animations")
mContext = KIcon::Animation;
mContext = TDEIcon::Animation;
else if (tmp == "Categories")
mContext = KIcon::Category;
mContext = TDEIcon::Category;
else if (tmp == "Emblems")
mContext = KIcon::Emblem;
mContext = TDEIcon::Emblem;
else if (tmp == "Emotes")
mContext = KIcon::Emote;
mContext = TDEIcon::Emote;
else if (tmp == "International")
mContext = KIcon::International;
mContext = TDEIcon::International;
else if (tmp == "Places")
mContext = KIcon::Place;
mContext = TDEIcon::Place;
else if (tmp == "Status")
mContext = KIcon::StatusIcon;
mContext = TDEIcon::StatusIcon;
else {
kdDebug(264) << "Invalid Context= line for icon theme: " << mDir << "\n";
return;
}
tmp = config->readEntry("Type");
if (tmp == "Fixed")
mType = KIcon::Fixed;
mType = TDEIcon::Fixed;
else if (tmp == "Scalable")
mType = KIcon::Scalable;
mType = TDEIcon::Scalable;
else if (tmp == "Threshold")
mType = KIcon::Threshold;
mType = TDEIcon::Threshold;
else {
kdDebug(264) << "Invalid Type= line for icon theme: " << mDir << "\n";
return;
}
if (mType == KIcon::Scalable)
if (mType == TDEIcon::Scalable)
{
mMinSize = config->readNumEntry("MinSize", mSize);
mMaxSize = config->readNumEntry("MaxSize", mSize);
} else if (mType == KIcon::Threshold)
} else if (mType == TDEIcon::Threshold)
mThreshold = config->readNumEntry("Threshold", 2);
mbValid = true;
}

TQString KIconThemeDir::iconPath(const TQString& name) const
TQString TDEIconThemeDir::iconPath(const TQString& name) const
{
if (!mbValid)
return TQString::null;
@@ -589,7 +589,7 @@ TQString KIconThemeDir::iconPath(const TQString& name) const
return TQString::null;
}

TQStringList KIconThemeDir::iconList() const
TQStringList TDEIconThemeDir::iconList() const
{
TQDir dir(mDir);
#ifdef HAVE_LIBART


+ 33
- 33
tdecore/kicontheme.h View File

@@ -10,8 +10,8 @@
*
*/

#ifndef __KIconTheme_h_Included__
#define __KIconTheme_h_Included__
#ifndef __TDEIconTheme_h_Included__
#define __TDEIconTheme_h_Included__

#include <tqstring.h>
#include <tqstringlist.h>
@@ -20,23 +20,23 @@
#include "tdelibs_export.h"

class TDEConfig;
class KIconThemeDir;
class TDEIconThemeDir;

class KIconThemePrivate;
class TDEIconThemePrivate;

class KIconPrivate;
class TDEIconPrivate;

/**
* One icon as found by KIconTheme. Also serves as a namespace containing
* One icon as found by TDEIconTheme. Also serves as a namespace containing
* icon related constants.
* @see KIconEffect
* @see KIconTheme
* @see KIconLoader
* @see TDEIconEffect
* @see TDEIconTheme
* @see TDEIconLoader
*/
class TDECORE_EXPORT KIcon
class TDECORE_EXPORT TDEIcon
{
public:
KIcon() { size = 0; }
TDEIcon() { size = 0; }

/**
* Return true if this icon is valid, false otherwise.
@@ -81,7 +81,7 @@ public:
};

// if you add a group here, make sure to change the config reading in
// KIconLoader too
// TDEIconLoader too
/**
* The group of the icon.
*/
@@ -173,18 +173,18 @@ public:
TQString path;

private:
KIconPrivate *d;
TDEIconPrivate *d;
};

inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; }
inline KIcon::Group operator++(KIcon::Group& group,int) { KIcon::Group ret = group; ++group; return ret; }
inline TDEIcon::Group& operator++(TDEIcon::Group& group) { group = static_cast<TDEIcon::Group>(group+1); return group; }
inline TDEIcon::Group operator++(TDEIcon::Group& group,int) { TDEIcon::Group ret = group; ++group; return ret; }

/**
* Class to use/access icon themes in KDE. This class is used by the
* iconloader but can be used by others too.
* @see KIconLoader
* @see TDEIconLoader
*/
class TDECORE_EXPORT KIconTheme
class TDECORE_EXPORT TDEIconTheme
{
public:
/**
@@ -193,8 +193,8 @@ public:
* @param appName the name of the application. Can be null. This argument
* allows applications to have themed application icons.
*/
KIconTheme(const TQString& name, const TQString& appName=TQString::null);
~KIconTheme();
TDEIconTheme(const TQString& name, const TQString& appName=TQString::null);
~TDEIconTheme();

/**
* The stylized name of the icon theme.
@@ -281,17 +281,17 @@ public:

/**
* The default size of this theme for a certain icon group.
* @param group The icon group. See KIcon::Group.
* @param group The icon group. See TDEIcon::Group.
* @return The default size in pixels for the given icon group.
*/
int defaultSize(KIcon::Group group) const;
int defaultSize(TDEIcon::Group group) const;

/**
* Query available sizes for a group.
* @param group The icon group. See KIcon::Group.
* @param group The icon group. See TDEIcon::Group.
* @return a list of available sized for the given group
*/
TQValueList<int> querySizes(KIcon::Group group) const;
TQValueList<int> querySizes(TDEIcon::Group group) const;

/**
* Query available icons for a size and context.
@@ -299,7 +299,7 @@ public:
* @param context the context of the icons
* @return the list of icon names
*/
TQStringList queryIcons(int size, KIcon::Context context = KIcon::Any) const;
TQStringList queryIcons(int size, TDEIcon::Context context = TDEIcon::Any) const;