Rename KIcon to enhance compatibility with KDE4

pull/16/head
Timothy Pearson 12 years ago
parent a14eaa0442
commit f2bfcad7ff

@ -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="#TDECmdLineArgs">TDECmdLineArgs</A></LI>
<LI><A HREF="#TDELocale">TDELocale</A></LI> <LI><A HREF="#TDELocale">TDELocale</A></LI>
<LI><A HREF="#TDEGlobal">TDEGlobal: access to KDE global objects.</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="#KTMainWindow">KTMainWindow</A></LI>
<LI><A HREF="#KHelpMenu">KHelpMenu</A></LI> <LI><A HREF="#KHelpMenu">KHelpMenu</A></LI>
<LI><A HREF="#TDEToolBar">TDEToolBar</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;kglobal.h&gt;
#include &lt;tdeconfig.h&gt; // Needed to use TDEConfig #include &lt;tdeconfig.h&gt; // Needed to use TDEConfig
#include &lt;klocale.h&gt; // Needed to use TDELocale #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> </PRE>
</TD> </TD>
</TR> </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" ); TQString mystr = i18n( "This is a string" );
KIconLoader *loader = TDEGlobal::iconLoader(); TDEIconLoader *loader = TDEGlobal::iconLoader();
</PRE> </PRE>
</TD> </TD>
</TR> </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> <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 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> the right icons. loadIcon (used by BarIcon) returns only toolbar icons.<P>
If you need icons for applications, use loadApplicationIcon.<P> If you need icons for applications, use loadApplicationIcon.<P>

@ -211,10 +211,10 @@ The preferred means of defining a shortcut, however, is to use <b>TDEAction</b>.
</table></li--> </table></li-->
</ul> </ul>
<H4>KIconLoader, KIconTheme</H4> <H4>TDEIconLoader, TDEIconTheme</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. 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. KURLBar and KURLBarItem.
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4> <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. as its use is basically limited to KThemeStyle.
<H4>TDEAction, TDEToolBar, TDEToolBarButton and icons</H4> <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 instead of using TQIconSet or TQPixmap. This results in always using the correct icon size and allows delayed
on-demand icon loading. on-demand icon loading.
<p> <p>
Method TDEAction::hasIconSet() has been renamed to TDEAction::hasIcon(), the old name will still work unless KDE_NO_COMPAT is defined. 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 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> <p>
TDEToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated. TDEToolBarButton methods setPixmap(), setDefaultPixmap(), setDisabledPixmap(), setDefaultIcon() and setDisabledIcon() are deprecated.
Use TDEToolBarButton::setIcon() (preferred) or TDEToolBarButton::setIconSet() instead. 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. allowed to fix this dependency problem: KRun can now use the OpenWith dialog directly.
<H4>KMimeType, KService</H4> <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. The change should affect only code using hardcoded numeric values instead of using the proper enum constants.
<H4>KFilterDev</H4> <H4>KFilterDev</H4>
@ -563,7 +563,7 @@ flexibility and efficiency.
<br><br> <br><br>
Sorting has changed radically. Previously, KFileView had protected methods QuickSort, Sorting has changed radically. Previously, KFileView had protected methods QuickSort,
compareItems() and mergeLists() to sort directory entries for displaying in the views. Now, 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, sorting is utilized by letting its view-items provide a TQString key() method. Therefore,
KFileView offers the two methods KFileView offers the two methods
<ul> <ul>
@ -613,8 +613,8 @@ have been merged into the new method activate( const KFileItem * ).
<br><br> <br><br>
Carsten Pfeiffer <A HREF="mailto:pfeiffer@kde.org">pfeiffer@kde.org</A> Carsten Pfeiffer <A HREF="mailto:pfeiffer@kde.org">pfeiffer@kde.org</A>
<H4>KIconDialog, KIconButton, KURLBar, KURLBarItem</H4> <H4>TDEIconDialog, TDEIconButton, KURLBar, KURLBarItem</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. 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> <H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>

@ -591,11 +591,11 @@ bool KNotify::notifyByPassivePopup( const TQString &text,
TDEConfig* eventsFile, TDEConfig* eventsFile,
WId senderWinId ) WId senderWinId )
{ {
KIconLoader iconLoader( appName ); TDEIconLoader iconLoader( appName );
if ( eventsFile != NULL ) { if ( eventsFile != NULL ) {
TDEConfigGroup config( eventsFile, "!Global!" ); TDEConfigGroup config( eventsFile, "!Global!" );
TQString iconName = config.readEntry( "IconName", appName ); 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 ); TQString title = config.readEntry( "Comment", appName );
KPassivePopup::message(title, text, icon, senderWinId); KPassivePopup::message(title, text, icon, senderWinId);
} else } else

@ -95,7 +95,7 @@ class KTEXTEDITOR_EXPORT ConfigInterfaceExtension
virtual TQString configPageName (uint number = 0) const = 0; virtual TQString configPageName (uint number = 0) const = 0;
virtual TQString configPageFullName (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: private:

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

@ -1998,7 +1998,7 @@ void KateDocument::configDialog()
path.clear(); path.clear();
path << KTextEditor::configInterfaceExtension (this)->configPageName (i); path << KTextEditor::configInterfaceExtension (this)->configPageName (i);
TQVBox *page = kd->addVBoxPage(path, KTextEditor::configInterfaceExtension (this)->configPageFullName (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)); editorPages.append (KTextEditor::configInterfaceExtension (this)->configPage(i, page));
} }

@ -163,7 +163,7 @@ class KateDocument : public Kate::Document,
KTextEditor::ConfigPage *configPage (uint number = 0, TQWidget *parent = 0, const char *name=0 ); KTextEditor::ConfigPage *configPage (uint number = 0, TQWidget *parent = 0, const char *name=0 );
TQString configPageName (uint number = 0) const; TQString configPageName (uint number = 0) const;
TQString configPageFullName (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 // KTextEditor::EditInterface stuff

@ -145,12 +145,12 @@ Group=Buttons (KDE)
ToolTip=Line Edit for restricted input (KDE) ToolTip=Line Edit for restricted input (KDE)
Group=Input (KDE) Group=Input (KDE)
[KIconButton] [TDEIconButton]
IncludeFile=kicondialog.h IncludeFile=kicondialog.h
ToolTip=Button for selecting an icon (KDE) ToolTip=Button for selecting an icon (KDE)
Group=Buttons (KDE) Group=Buttons (KDE)
[KIconView] [TDEIconView]
IncludeFile=kiconview.h IncludeFile=kiconview.h
ToolTip=Extended Icon View (KDE) ToolTip=Extended Icon View (KDE)
WhatsThis=An improved version of the TQIconView that allows certain KDE extensions WhatsThis=An improved version of the TQIconView that allows certain KDE extensions

@ -134,12 +134,12 @@ Group=Buttons (KDE)
ToolTip=Line Edit for restricted input (KDE) ToolTip=Line Edit for restricted input (KDE)
Group=Input (KDE) Group=Input (KDE)
[KIconButton] [TDEIconButton]
IncludeFile=kicondialog.h IncludeFile=kicondialog.h
ToolTip=Button for selecting an icon (KDE) ToolTip=Button for selecting an icon (KDE)
Group=Buttons (KDE) Group=Buttons (KDE)
[KIconView] [TDEIconView]
IncludeFile=kiconview.h IncludeFile=kiconview.h
ToolTip=Extended Icon View (KDE) ToolTip=Extended Icon View (KDE)
WhatsThis=An improved version of the QIconView that allows certain KDE extensions WhatsThis=An improved version of the QIconView that allows certain KDE extensions

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

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

@ -242,11 +242,11 @@ void DownloadDialog::addProvider(Provider *p)
} }
else else
{ {
pix = TDEGlobal::iconLoader()->loadIcon(p->icon().path(), KIcon::Panel); pix = TDEGlobal::iconLoader()->loadIcon(p->icon().path(), TDEIcon::Panel);
ret = true; 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); frame = addPage(p->name(), p->name(), pix);
m_frame = frame; m_frame = frame;
@ -415,8 +415,8 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants)
installed = installStatus(entry); installed = installStatus(entry);
if(installed > 0) pix = TDEGlobal::iconLoader()->loadIcon("ok", KIcon::Small); if(installed > 0) pix = TDEGlobal::iconLoader()->loadIcon("ok", TDEIcon::Small);
else if(installed < 0) pix = TDEGlobal::iconLoader()->loadIcon("history", KIcon::Small); else if(installed < 0) pix = TDEGlobal::iconLoader()->loadIcon("history", TDEIcon::Small);
else pix = TQPixmap(); else pix = TQPixmap();
TQString lang = TDEGlobal::locale()->language(); 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()->writeEntry(m_entryname, TQString(e->releaseDate().toString(Qt::ISODate)));
kapp->config()->sync(); kapp->config()->sync();
TQPixmap pix = TDEGlobal::iconLoader()->loadIcon("ok", KIcon::Small); TQPixmap pix = TDEGlobal::iconLoader()->loadIcon("ok", TDEIcon::Small);
TQString lang = TDEGlobal::locale()->language(); TQString lang = TDEGlobal::locale()->language();

@ -40,7 +40,7 @@ Christian Czezatke <e9025461@student.tuwien.ac.at>
TDEProcess class TDEProcess class
Matthias Ettrich <ettrich@kde.org> Matthias Ettrich <ettrich@kde.org>
KWM, Changes to TDEApplication and KIconLoader KWM, Changes to TDEApplication and TDEIconLoader
Stephan Kulow <coolo@kde.org> Stephan Kulow <coolo@kde.org>
heavy modifications to KURL, autoconf and automake stuff heavy modifications to KURL, autoconf and automake stuff

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

@ -1516,7 +1516,7 @@ signals:
/** /**
* @internal * @internal
* Used to notify KIconLoader objects that they need to reload. * Used to notify TDEIconLoader objects that they need to reload.
*/ */
void updateIconLoaders(); void updateIconLoaders();

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

@ -60,7 +60,7 @@ InfoOutput=4
[250] [250]
InfoOutput=4 InfoOutput=4
# KIconloader debug info off # TDEIconloader debug info off
[264] [264]
InfoOutput=4 InfoOutput=4

@ -74,7 +74,7 @@ TDESharedConfig *TDEGlobal::sharedConfig()
return _instance->sharedConfig(); return _instance->sharedConfig();
} }
KIconLoader *TDEGlobal::iconLoader() TDEIconLoader *TDEGlobal::iconLoader()
{ {
MYASSERT(_instance); MYASSERT(_instance);

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

@ -42,26 +42,26 @@ static bool tqt_has_xft=true;
extern bool tqt_use_xrender; extern bool tqt_use_xrender;
extern bool tqt_has_xft; extern bool tqt_has_xft;
#endif #endif
class KIconEffectPrivate class TDEIconEffectPrivate
{ {
public: public:
TQString mKey[6][3]; TQString mKey[6][3];
TQColor mColor2[6][3]; TQColor mColor2[6][3];
}; };
KIconEffect::KIconEffect() TDEIconEffect::TDEIconEffect()
{ {
d = new KIconEffectPrivate; d = new TDEIconEffectPrivate;
init(); init();
} }
KIconEffect::~KIconEffect() TDEIconEffect::~TDEIconEffect()
{ {
delete d; delete d;
d = 0L; d = 0L;
} }
void KIconEffect::init() void TDEIconEffect::init()
{ {
TDEConfig *config = TDEGlobal::config(); 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; 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]; TQString cached = d->mKey[group][state];
if (cached.isEmpty()) if (cached.isEmpty())
{ {
@ -172,14 +172,14 @@ TQString KIconEffect::fingerprint(int group, int state) const
return cached; 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"; kdDebug(265) << "Illegal icon state: " << state << "\n";
return image; return image;
} }
if (group >= KIcon::LastGroup) if (group >= TDEIcon::LastGroup)
{ {
kdDebug(265) << "Illegal icon group: " << group << "\n"; kdDebug(265) << "Illegal icon group: " << group << "\n";
return image; 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]); 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); 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 ) if (effect >= LastEffect )
{ {
@ -229,14 +229,14 @@ TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor
return image; 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"; kdDebug(265) << "Illegal icon state: " << state << "\n";
return pixmap; return pixmap;
} }
if (group >= KIcon::LastGroup) if (group >= TDEIcon::LastGroup)
{ {
kdDebug(265) << "Illegal icon group: " << group << "\n"; kdDebug(265) << "Illegal icon group: " << group << "\n";
return pixmap; 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]); 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 const TQColor col, bool trans) const
{ {
return apply (pixmap, effect, value, col, TDEGlobalSettings::baseColor(), trans); 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 const TQColor col, const TQColor col2, bool trans) const
{ {
TQPixmap result; 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 // 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. // 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() int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors(); : 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() int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors(); : 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(); int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits() unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits()
: (unsigned int *) img.tqcolorTable(); : (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() int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors(); : 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() int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors(); : 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); 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 ) if ( tqt_use_xrender && tqt_has_xft )
{ {
@ -540,7 +540,7 @@ void KIconEffect::semiTransparent(TQPixmap &pix)
pix.setMask(mask); pix.setMask(mask);
} }
TQImage KIconEffect::doublePixels(TQImage src) const TQImage TDEIconEffect::doublePixels(TQImage src) const
{ {
TQImage dst; TQImage dst;
if (src.depth() == 1) if (src.depth() == 1)
@ -589,7 +589,7 @@ TQImage KIconEffect::doublePixels(TQImage src) const
return dst; return dst;
} }
void KIconEffect::overlay(TQImage &src, TQImage &overlay) void TDEIconEffect::overlay(TQImage &src, TQImage &overlay)
{ {
if (src.depth() != overlay.depth()) if (src.depth() != overlay.depth())
{ {
@ -704,7 +704,7 @@ void KIconEffect::overlay(TQImage &src, TQImage &overlay)
} }
void void
KIconEffect::visualActivate(TQWidget * widget, TQRect rect) TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect)
{ {
if (!TDEGlobalSettings::visualActivate()) if (!TDEGlobalSettings::visualActivate())
return; return;
@ -772,7 +772,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
} }
void void
KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap) TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
{ {
if (!TDEGlobalSettings::visualActivate()) if (!TDEGlobalSettings::visualActivate())
return; return;

@ -10,8 +10,8 @@
* exact licensing terms. * exact licensing terms.
*/ */
#ifndef __KIconEffect_h_Included__ #ifndef __TDEIconEffect_h_Included__
#define __KIconEffect_h_Included__ #define __TDEIconEffect_h_Included__
#include <tqimage.h> #include <tqimage.h>
#include <tqpixmap.h> #include <tqpixmap.h>
@ -21,7 +21,7 @@
class TQWidget; class TQWidget;
class KIconEffectPrivate; class TDEIconEffectPrivate;
/** /**
* Applies effects to icons. * Applies effects to icons.
@ -29,16 +29,16 @@ class KIconEffectPrivate;
* This class applies effects to icons depending on their state and * This class applies effects to icons depending on their state and
* group. For example, it can be used to make all disabled icons * group. For example, it can be used to make all disabled icons
* in a toolbar gray. * in a toolbar gray.
* @see KIcon * @see TDEIcon
*/ */
class TDECORE_EXPORT KIconEffect class TDECORE_EXPORT TDEIconEffect
{ {
public: public:
/** /**
* Create a new KIconEffect. * Create a new TDEIconEffect.
*/ */
KIconEffect(); TDEIconEffect();
~KIconEffect(); ~TDEIconEffect();
/** /**
* This is the enumeration of all possible icon effects. * 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. * Tests whether an effect has been configured for the given icon group.
* @param group the group to check, see KIcon::Group * @param group the group to check, see TDEIcon::Group
* @param state the state to check, see KIcon::States * @param state the state to check, see TDEIcon::States
* @returns true if an effect is configured for the given @p group * @returns true if an effect is configured for the given @p group
* in @p state, otherwise false. * in @p state, otherwise false.
* @see KIcon::Group * @see TDEIcon::Group
* KIcon::States * TDEIcon::States
*/ */
bool hasEffect(int group, int state) const; bool hasEffect(int group, int state) const;
@ -76,8 +76,8 @@ public:
* Returns a fingerprint for the effect by encoding * Returns a fingerprint for the effect by encoding
* the given @p group and @p state into a TQString. This * the given @p group and @p state into a TQString. This
* is useful for caching. * is useful for caching.
* @param group the group, see KIcon::Group * @param group the group, see TDEIcon::Group
* @param state the state, see KIcon::States * @param state the state, see TDEIcon::States
* @return the fingerprint of the given @p group+@p state * @return the fingerprint of the given @p group+@p state
*/ */
TQString fingerprint(int group, int state) const; 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 * 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. * @p group and @p state parameters, and is configured by the user.
* @param src The image. * @param src The image.
* @param group The group for the icon, see KIcon::Group * @param group The group for the icon, see TDEIcon::Group
* @param state The icon's state, see KIcon::States * @param state The icon's state, see TDEIcon::States
* @return An image with the effect applied. * @return An image with the effect applied.
*/ */
TQImage apply(TQImage src, int group, int state) const; TQImage apply(TQImage src, int group, int state) const;
@ -95,7 +95,7 @@ public:
/** /**
* Applies an effect to an image. * Applies an effect to an image.
* @param src The 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 value Strength of the effect. 0 <= @p value <= 1.
* @param rgb Color parameter for effects that need one. * @param rgb Color parameter for effects that need one.
* @param trans Add Transparency if trans = true. * @param trans Add Transparency if trans = true.
@ -111,8 +111,8 @@ public:
/** /**
* Applies an effect to a pixmap. * Applies an effect to a pixmap.
* @param src The pixmap. * @param src The pixmap.
* @param group The group for the icon, see KIcon::Group * @param group The group for the icon, see TDEIcon::Group
* @param state The icon's state, see KIcon::States * @param state The icon's state, see TDEIcon::States
* @return A pixmap with the effect applied. * @return A pixmap with the effect applied.
*/ */
TQPixmap apply(TQPixmap src, int group, int state) const; TQPixmap apply(TQPixmap src, int group, int state) const;
@ -120,7 +120,7 @@ public:
/** /**
* Applies an effect to a pixmap. * Applies an effect to a pixmap.
* @param src The 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 value Strength of the effect. 0 <= @p value <= 1.
* @param rgb Color parameter for effects that need one. * @param rgb Color parameter for effects that need one.
* @param trans Add Transparency if trans = true. * @param trans Add Transparency if trans = true.
@ -225,7 +225,7 @@ private:
float mValue[6][3]; float mValue[6][3];
TQColor mColor[6][3]; TQColor mColor[6][3];
bool mTrans[6][3]; bool mTrans[6][3];
KIconEffectPrivate *d; TDEIconEffectPrivate *d;
}; };
#endif #endif

File diff suppressed because it is too large Load Diff

@ -9,8 +9,8 @@
* exact licensing terms. * exact licensing terms.
*/ */
#ifndef __KIconLoader_h_Included__ #ifndef __TDEIconLoader_h_Included__
#define __KIconLoader_h_Included__ #define __TDEIconLoader_h_Included__
#include <tqstring.h> #include <tqstring.h>
#include <tqpixmap.h> #include <tqpixmap.h>
@ -18,31 +18,31 @@
// Grmbl, X headers..... // Grmbl, X headers.....
#ifdef Status #ifdef Status
#define KIconLoaderXStatus Status #define TDEIconLoaderXStatus Status
#undef Status #undef Status
#endif #endif
#include <tqmovie.h> #include <tqmovie.h>
#ifdef KIconLoaderXStatus #ifdef TDEIconLoaderXStatus
#define Status int #define Status int
#undef KIconLoaderXStatus #undef TDEIconLoaderXStatus
#endif #endif
#include <kglobal.h> #include <kglobal.h>
#include <kinstance.h> #include <kinstance.h>
#include <kicontheme.h> #include <kicontheme.h>
struct KIconGroup; struct TDEIconGroup;
class KIconThemeNode; class TDEIconThemeNode;
class TDEConfig; class TDEConfig;
struct KIconLoaderPrivate; struct TDEIconLoaderPrivate;
class TDEStandardDirs; class TDEStandardDirs;
class KIconEffect; class TDEIconEffect;
/** /**
* Iconloader for KDE. * 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 will be searched in any of these themes. Additionally, it caches
* icons and applies effects according the the user's preferences. * icons and applies effects according the the user's preferences.
* *
@ -55,12 +55,12 @@ class KIconEffect;
* *
* The standard groups are defined below. * The standard groups are defined below.
* *
* @li KIcon::Desktop: Icons in the iconview of konqueror, kdesktop and similar apps. * @li TDEIcon::Desktop: Icons in the iconview of konqueror, kdesktop and similar apps.
* @li KIcon::Toolbar: Icons in toolbars. * @li TDEIcon::Toolbar: Icons in toolbars.
* @li KIcon::MainToolbar: Icons in the main toolbars. * @li TDEIcon::MainToolbar: Icons in the main toolbars.
* @li KIcon::Small: Various small (typical 16x16) places: titlebars, listviews * @li TDEIcon::Small: Various small (typical 16x16) places: titlebars, listviews
* and menu entries. * 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 * The icons are stored on disk in an icon theme or in a standalone
* directory. The icon theme directories contain multiple sizes and/or * directory. The icon theme directories contain multiple sizes and/or
@ -74,7 +74,7 @@ class KIconEffect;
* "User". * "User".
* *
*/ */
class TDECORE_EXPORT KIconLoader class TDECORE_EXPORT TDEIconLoader
{ {
public: public:
@ -92,12 +92,12 @@ public:
* @see TDEGlobal::iconLoader() * @see TDEGlobal::iconLoader()
* @see TDEInstance::iconLoader() * @see TDEInstance::iconLoader()
*/ */
KIconLoader(const TQString& appname=TQString::null, TDEStandardDirs *dirs = 0); TDEIconLoader(const TQString& appname=TQString::null, TDEStandardDirs *dirs = 0);
/** /**
* Cleanup * Cleanup
*/ */
~KIconLoader(); ~TDEIconLoader();
/** /**
* Adds @p appname to the list of application specific directories. * 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 * @param group The icon group. This will specify the size of and effects to
* be applied to the icon. * be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group. * @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 * @param state The icon state: @p DefaultState, @p ActiveState or
* @p DisabledState. Depending on the user's preferences, the iconloader * @p DisabledState. Depending on the user's preferences, the iconloader
* may apply a visual effect to hint about its state. * 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 * @return the TQPixmap. Can be null when not found, depending on
* @p canReturnNull. * @p canReturnNull.
*/ */
TQPixmap loadIcon(const TQString& name, KIcon::Group group, int size=0, TQPixmap loadIcon(const TQString& name, TDEIcon::Group group, int size=0,
int state=KIcon::DefaultState, TQString *path_store=0L, int state=TDEIcon::DefaultState, TQString *path_store=0L,
bool canReturnNull=false) const; bool canReturnNull=false) const;
/** /**
@ -138,7 +138,7 @@ public:
* @param group The icon group. This will specify the size of and effects to * @param group The icon group. This will specify the size of and effects to
* be applied to the icon. * be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group. * @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 * @param canReturnNull Can return a null iconset? If false, iconset
* containing the "unknown" pixmap is returned when no appropriate icon has * containing the "unknown" pixmap is returned when no appropriate icon has
* been found. * been found.
@ -148,10 +148,10 @@ public:
* @p canReturnNull. * @p canReturnNull.
* @since 3.5 * @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); 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. * Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon . * 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 * @param group The icon group. This will specify the size of and effects to
* be applied to the icon. * be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group. * @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 * @param canReturnNull Can return a null iconset? If false, iconset
* containing the "unknown" pixmap is returned when no appropriate icon has * containing the "unknown" pixmap is returned when no appropriate icon has
* been found. * been found.
@ -168,10 +168,10 @@ public:
* @p canReturnNull. * @p canReturnNull.
* @since 3.1 * @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); 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. * Creates an icon set, that will do on-demand loading of the icon.
* Loading itself is done by calling loadIcon . * 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 * @param group The icon group. This will specify the size of and effects to
* be applied to the icon. * be applied to the icon.
* @param size If nonzero, this overrides the size specified by @p group. * @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 * @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. * Returns the path of an icon.
@ -193,7 +193,7 @@ public:
* @param group_or_size If positive, search icons whose size is * @param group_or_size If positive, search icons whose size is
* specified by the icon group @p group_or_size. If negative, search * specified by the icon group @p group_or_size. If negative, search
* icons whose size is - @p group_or_size. * 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 * @param canReturnNull Can return a null string? If not, a path to the
* "unknown" icon will be returned. * "unknown" icon will be returned.
* @return the path of an icon, can be null or the "unknown" icon when * @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 name The name of the icon.
* @param group The icon group. See loadIcon(). * @param group The icon group. See loadIcon().
* @param size Override the default size for @p group. * @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. * @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. * Returns the path to an animated icon.
* @param name The name of the icon. * @param name The name of the icon.
* @param group The icon group. See loadIcon(). * @param group The icon group. See loadIcon().
* @param size Override the default size for @p group. * @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. * @return the full path to the movie, ready to be passed to QMovie's constructor.
* Empty string if not found. * 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 * 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 name The name of the icon.
* @param group The icon group. See loadIcon(). * @param group The icon group. See loadIcon().
* @param size Override the default size for @p group. * @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 * @return A TQStringList containing the absolute path of all the frames
* making up the animation. * 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 * 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 * @param group_or_size If positive, search icons whose size is
* specified by the icon group @p group_or_size. If negative, search * specified by the icon group @p group_or_size. If negative, search
* icons whose size is - @p group_or_size. * 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. * @param context The icon context.
* @return a list of all icons * @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. * Queries all available icons for a specific context.
* @param group_or_size The icon preferred group or size. If available * @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, * at this group or size, those icons will be returned, in other case,
* icons of undefined size will be returned. Positive numbers are groups, * icons of undefined size will be returned. Positive numbers are groups,
* negative numbers are negated sizes. See KIcon::Group and * negative numbers are negated sizes. See TDEIcon::Group and
* KIcon::StdSizes * TDEIcon::StdSizes
* @param context The icon context. * @param context The icon context.
* @return A TQStringList containing the icon names * @return A TQStringList containing the icon names
* available for that context * available for that context
*/ */
TQStringList queryIconsByContext(int group_or_size, TQStringList queryIconsByContext(int group_or_size,
KIcon::Context context=KIcon::Any) const; TDEIcon::Context context=TDEIcon::Any) const;
/** /**
* @internal * @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 * Returns a list of all icons (*.png or *.xpm extension) in the
@ -280,20 +280,20 @@ public:
* @param group the group to check. * @param group the group to check.
* @return the current size for an icon group. * @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 * Returns a pointer to the current theme. Can be used to query
* available and default sizes for groups. * available and default sizes for groups.
* @return a pointer to the current theme. 0 if no theme set. * @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. * Returns a pointer to the TDEIconEffect object used by the icon loader.
* @return the KIconEffect. * @return the TDEIconEffect.
*/ */
KIconEffect *iconEffect() const; TDEIconEffect *iconEffect() const;
/** /**
* Called by TDEInstance::newIconLoader to reconfigure the icon loader. * Called by TDEInstance::newIconLoader to reconfigure the icon loader.
@ -317,7 +317,7 @@ public:
* @return true if alpha blending is desired * @return true if alpha blending is desired
* @obsolete * @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 * 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 * The default is disabled, as the iconloader object must not be
* destroyed before all those iconsets are destroyed. * 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. * Every TDEInstance 's iconloader has this feature enabled.
* *
* @param enable true to enable delayed icon loading, false to disable * @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 * tries to find an icon with the name. It tries some extension and
* match strategies * match strategies
*/ */
KIcon findMatchingIcon(const TQString& name, int size) const; TDEIcon findMatchingIcon(const TQString& name, int size) const;
/** /**
* @internal * @internal
@ -394,7 +394,7 @@ public:
* below (the fallbacks of the theme) in the tree. * below (the fallbacks of the theme) in the tree.
* @internal * @internal
*/ */
void addBaseThemes(KIconThemeNode *node, const TQString &appname); void addBaseThemes(TDEIconThemeNode *node, const TQString &appname);
/** /**
* @internal * @internal
@ -434,120 +434,120 @@ public:
/** /**
* Loads all the different sizes for an iconset. * 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 ); int size, bool canReturnNull );
// @internal the data object // @internal the data object
KIconLoaderPrivate *d; TDEIconLoaderPrivate *d;
}; };
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a desktop icon. * Load a desktop icon.
*/ */
TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, int size=0, TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState, int state=TDEIcon::DefaultState,
TDEInstance *instance=TDEGlobal::instance()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a desktop icon. * Load a desktop icon.
*/ */
TDECORE_EXPORT TQPixmap DesktopIcon(const TQString& name, TDEInstance *instance); 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. * Load a desktop icon, and apply the necessary effects to get an IconSet.
*/ */
TDECORE_EXPORT TQIconSet DesktopIconSet(const TQString& name, int size=0, TDECORE_EXPORT TQIconSet DesktopIconSet(const TQString& name, int size=0,
TDEInstance *instance=TDEGlobal::instance()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a toolbar icon. * 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()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a toolbar icon. * Load a toolbar icon.
*/ */
TDECORE_EXPORT TQPixmap BarIcon(const TQString& name, TDEInstance *instance); 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. * Load a toolbar icon, and apply the necessary effects to get an IconSet.
*/ */
TDECORE_EXPORT TQIconSet BarIconSet(const TQString& name, int size=0, TDECORE_EXPORT TQIconSet BarIconSet(const TQString& name, int size=0,
TDEInstance *instance=TDEGlobal::instance()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a small icon. * Load a small icon.
*/ */
TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, int size=0, TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState, int state=TDEIcon::DefaultState,
TDEInstance *instance=TDEGlobal::instance()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a small icon. * Load a small icon.
*/ */
TDECORE_EXPORT TQPixmap SmallIcon(const TQString& name, TDEInstance *instance); 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. * Load a small icon, and apply the necessary effects to get an IconSet.
*/ */
TDECORE_EXPORT TQIconSet SmallIconSet(const TQString& name, int size=0, TDECORE_EXPORT TQIconSet SmallIconSet(const TQString& name, int size=0,
TDEInstance *instance=TDEGlobal::instance()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a main toolbar icon. * Load a main toolbar icon.
*/ */
TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, int size=0, TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, int size=0,
int state=KIcon::DefaultState, int state=TDEIcon::DefaultState,
TDEInstance *instance=TDEGlobal::instance()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a main toolbar icon. * Load a main toolbar icon.
*/ */
TDECORE_EXPORT TQPixmap MainBarIcon(const TQString& name, TDEInstance *instance); 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. * Load a main toolbar icon, and apply the effects to get an IconSet.
*/ */
TDECORE_EXPORT TQIconSet MainBarIconSet(const TQString& name, int size=0, TDECORE_EXPORT TQIconSet MainBarIconSet(const TQString& name, int size=0,
TDEInstance *instance=TDEGlobal::instance()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a user icon. User icons are searched in $appdir/pics. * 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()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Load a user icon. User icons are searched in $appdir/pics. * Load a user icon. User icons are searched in $appdir/pics.
*/ */
TDECORE_EXPORT TQPixmap UserIcon(const TQString& name, TDEInstance *instance); 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. * Load a user icon, and apply the effects to get an IconSet.
*/ */
TDECORE_EXPORT TQIconSet UserIconSet(const TQString& name, TDECORE_EXPORT TQIconSet UserIconSet(const TQString& name,
TDEInstance *instance=TDEGlobal::instance()); TDEInstance *instance=TDEGlobal::instance());
/** /**
* \relates KIconLoader * \relates TDEIconLoader
* Returns the current icon size for a specific group. * 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__

@ -9,8 +9,8 @@
* exact licensing terms. * exact licensing terms.
*/ */
#ifndef __KIconLoader_p_h_Included__ #ifndef __TDEIconLoader_p_h_Included__
#define __KIconLoader_p_h_Included__ #define __TDEIconLoader_p_h_Included__
#include <tqobject.h> #include <tqobject.h>
#include <tqstringlist.h> #include <tqstringlist.h>
@ -19,37 +19,37 @@
#include <kiconeffect.h> #include <kiconeffect.h>
#include <tqdict.h> #include <tqdict.h>
class KIconThemeNode class TDEIconThemeNode
{ {
public: public:
KIconThemeNode(KIconTheme *_theme); TDEIconThemeNode(TDEIconTheme *_theme);
~KIconThemeNode(); ~TDEIconThemeNode();
void queryIcons(TQStringList *lst, int size, KIcon::Context context) const; void queryIcons(TQStringList *lst, int size, TDEIcon::Context context) const;
void queryIconsByContext(TQStringList *lst, int size, KIcon::Context context) const; void queryIconsByContext(TQStringList *lst, int size, TDEIcon::Context context) const;
KIcon findIcon(const TQString& name, int size, KIcon::MatchType match) const; TDEIcon findIcon(const TQString& name, int size, TDEIcon::MatchType match) const;
void printTree(TQString& dbgString) const; void printTree(TQString& dbgString) const;
KIconTheme *theme; TDEIconTheme *theme;
}; };
class KIconLoaderPrivate : public TQObject class TDEIconLoaderPrivate : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
TQStringList mThemesInTree; TQStringList mThemesInTree;
KIconGroup *mpGroups; TDEIconGroup *mpGroups;
KIconThemeNode *mpThemeRoot; TDEIconThemeNode *mpThemeRoot;
TDEStandardDirs *mpDirs; TDEStandardDirs *mpDirs;
KIconLoader *q; TDEIconLoader *q;
KIconEffect mpEffect; TDEIconEffect mpEffect;
TQDict<TQImage> imgDict; TQDict<TQImage> imgDict;
TQImage lastImage; // last loaded image without effect applied TQImage lastImage; // last loaded image without effect applied
TQString lastImageKey; // key for icon without effect TQString lastImageKey; // key for icon without effect
TQString appname; TQString appname;
int lastIconType; // see KIcon::type int lastIconType; // see TDEIcon::type
int lastIconThreshold; // see KIcon::threshold int lastIconThreshold; // see TDEIcon::threshold
TQPtrList<KIconThemeNode> links; TQPtrList<TDEIconThemeNode> links;
bool extraDesktopIconsLoaded; bool extraDesktopIconsLoaded;
bool delayedLoading; bool delayedLoading;
@ -57,4 +57,4 @@ public slots:
void reconfigure(); void reconfigure();
}; };
#endif // __KIconLoader_p_h_Included__ #endif // __TDEIconLoader_p_h_Included__

@ -37,7 +37,7 @@
#include "kicontheme.h" #include "kicontheme.h"
class KIconThemePrivate class TDEIconThemePrivate
{ {
public: public:
TQString example, screenshot; TQString example, screenshot;
@ -49,18 +49,18 @@ public:
/** /**
* A subdirectory in an icon theme. * A subdirectory in an icon theme.
*/ */
class KIconThemeDir class TDEIconThemeDir
{ {
public: public:
KIconThemeDir(const TQString& dir, const TDEConfigBase *config); TDEIconThemeDir(const TQString& dir, const TDEConfigBase *config);
bool isValid() const { return mbValid; } bool isValid() const { return mbValid; }
TQString iconPath(const TQString& name) const; TQString iconPath(const TQString& name) const;
TQStringList iconList() const; TQStringList iconList() const;
TQString dir() const { return mDir; } TQString dir() const { return mDir; }
KIcon::Context context() const { return mContext; } TDEIcon::Context context() const { return mContext; }
KIcon::Type type() const { return mType; } TDEIcon::Type type() const { return mType; }
int size() const { return mSize; } int size() const { return mSize; }
int minSize() const { return mMinSize; } int minSize() const { return mMinSize; }
int maxSize() const { return mMaxSize; } int maxSize() const { return mMaxSize; }
@ -68,8 +68,8 @@ public:
private: private:
bool mbValid; bool mbValid;
KIcon::Type mType; TDEIcon::Type mType;
KIcon::Context mContext; TDEIcon::Context mContext;
int mSize, mMinSize, mMaxSize; int mSize, mMinSize, mMaxSize;
int mThreshold; 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 icnlibs;
TQStringList::ConstIterator it, itDir; TQStringList::ConstIterator it, itDir;
@ -168,7 +168,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName)
{ {
if (TDEStandardDirs::exists(*itDir + *it + "/")) if (TDEStandardDirs::exists(*itDir + *it + "/"))
{ {
KIconThemeDir *dir = new KIconThemeDir(*itDir + *it, &cfg); TDEIconThemeDir *dir = new TDEIconThemeDir(*itDir + *it, &cfg);
if (!dir->isValid()) if (!dir->isValid())
{ {
kdDebug(264) << "Icon directory " << *itDir << " group " << *it << " not valid.\n"; 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 // Expand available sizes for scalable icons to their full range
int i; int i;
TQMap<int,TQValueList<int> > scIcons; 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; TQValueList<int> lst;
for (i=dir->minSize(); i<=dir->maxSize(); i++) 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; delete d;
} }
bool KIconTheme::isValid() const bool TDEIconTheme::isValid() const
{ {
return !mDirs.isEmpty(); return !mDirs.isEmpty();
} }
bool KIconTheme::isHidden() const bool TDEIconTheme::isHidden() const
{ {
return d->hidden; return d->hidden;
} }
TQString KIconTheme::example() const { return d->example; } TQString TDEIconTheme::example() const { return d->example; }
TQString KIconTheme::screenshot() const { return d->screenshot; } TQString TDEIconTheme::screenshot() const { return d->screenshot; }
TQString KIconTheme::linkOverlay() const { return d->linkOverlay; } TQString TDEIconTheme::linkOverlay() const { return d->linkOverlay; }
TQString KIconTheme::lockOverlay() const { return d->lockOverlay; } TQString TDEIconTheme::lockOverlay() const { return d->lockOverlay; }
TQString KIconTheme::zipOverlay() const { return d->zipOverlay; } TQString TDEIconTheme::zipOverlay() const { return d->zipOverlay; }
TQString KIconTheme::shareOverlay() const { return d->shareOverlay; } 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"; kdDebug(264) << "Illegal icon group: " << group << "\n";
return -1; return -1;
@ -251,10 +251,10 @@ int KIconTheme::defaultSize(KIcon::Group group) const
return mDefSize[group]; return mDefSize[group];
} }
TQValueList<int> KIconTheme::querySizes(KIcon::Group group) const TQValueList<int> TDEIconTheme::querySizes(TDEIcon::Group group) const
{ {
TQValueList<int> empty; TQValueList<int> empty;
if ((group < 0) || (group >= KIcon::LastGroup)) if ((group < 0) || (group >= TDEIcon::LastGroup))
{ {
kdDebug(264) << "Illegal icon group: " << group << "\n"; kdDebug(264) << "Illegal icon group: " << group << "\n";
return empty; return empty;
@ -262,32 +262,32 @@ TQValueList<int> KIconTheme::querySizes(KIcon::Group group) const
return mSizes[group]; 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; int delta = 1000, dw;
TQPtrListIterator<KIconThemeDir> dirs(mDirs); TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
KIconThemeDir *dir; TDEIconThemeDir *dir;
// Try to find exact match // Try to find exact match
TQStringList result; TQStringList result;
for ( ; dirs.current(); ++dirs) for ( ; dirs.current(); ++dirs)
{ {
dir = dirs.current(); dir = dirs.current();
if ((context != KIcon::Any) && (context != dir->context())) if ((context != TDEIcon::Any) && (context != dir->context()))
continue; continue;
if ((dir->type() == KIcon::Fixed) && (dir->size() == size)) if ((dir->type() == TDEIcon::Fixed) && (dir->size() == size))
{ {
result += dir->iconList(); result += dir->iconList();
continue; continue;
} }
if ((dir->type() == KIcon::Scalable) && if ((dir->type() == TDEIcon::Scalable) &&
(size >= dir->minSize()) && (size <= dir->maxSize())) (size >= dir->minSize()) && (size <= dir->maxSize()))
{ {
result += dir->iconList(); result += dir->iconList();
continue; continue;
} }
if ((dir->type() == KIcon::Threshold) && if ((dir->type() == TDEIcon::Threshold) &&
(abs(size-dir->size())<dir->threshold())) (abs(size-dir->size())<dir->threshold()))
result+=dir->iconList(); result+=dir->iconList();
} }
@ -297,11 +297,11 @@ TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
dirs.toFirst(); dirs.toFirst();
// Find close match // Find close match
KIconThemeDir *best = 0L; TDEIconThemeDir *best = 0L;
for ( ; dirs.current(); ++dirs) for ( ; dirs.current(); ++dirs)
{ {
dir = dirs.current(); dir = dirs.current();
if ((context != KIcon::Any) && (context != dir->context())) if ((context != TDEIcon::Any) && (context != dir->context()))
continue; continue;
dw = dir->size() - size; dw = dir->size() - size;
if ((dw > 6) || (abs(dw) >= abs(delta))) if ((dw > 6) || (abs(dw) >= abs(delta)))
@ -315,11 +315,11 @@ TQStringList KIconTheme::queryIcons(int size, KIcon::Context context) const
return best->iconList(); 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; int dw;
KIconThemeDir *dir; TDEIconThemeDir *dir;
// We want all the icons for a given context, but we prefer icons // We want all the icons for a given context, but we prefer icons
// of size size . Note that this may (will) include duplicate 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) for ( ; dirs.current(); ++dirs)
{ {
dir = dirs.current(); dir = dirs.current();
if ((context != KIcon::Any) && (context != dir->context())) if ((context != TDEIcon::Any) && (context != dir->context()))
continue; continue;
dw = abs(dir->size() - size); dw = abs(dir->size() - size);
iconlist[(dw<127)?dw:127]+=dir->iconList(); iconlist[(dw<127)?dw:127]+=dir->iconList();
@ -344,50 +344,50 @@ TQStringList KIconTheme::queryIconsByContext(int size, KIcon::Context context) c
return iconlistResult; return iconlistResult;
} }
bool KIconTheme::hasContext(KIcon::Context context) const bool TDEIconTheme::hasContext(TDEIcon::Context context) const
{ {
TQPtrListIterator<KIconThemeDir> dirs(mDirs); TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
KIconThemeDir *dir; TDEIconThemeDir *dir;
for ( ; dirs.current(); ++dirs) for ( ; dirs.current(); ++dirs)
{ {
dir = dirs.current(); dir = dirs.current();
if ((context == KIcon::Any) || (context == dir->context())) if ((context == TDEIcon::Any) || (context == dir->context()))
return true; return true;
} }
return false; 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; TQString path;
int delta = -1000, dw; int delta = -1000, dw;
KIconThemeDir *dir; TDEIconThemeDir *dir;
dw = 1000; // shut up, gcc dw = 1000; // shut up, gcc
TQPtrListIterator<KIconThemeDir> dirs(mDirs); TQPtrListIterator<TDEIconThemeDir> dirs(mDirs);
for ( ; dirs.current(); ++dirs) for ( ; dirs.current(); ++dirs)
{ {
dir = dirs.current(); 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; continue;
if ((dir->type() == KIcon::Scalable) && if ((dir->type() == TDEIcon::Scalable) &&
((size < dir->minSize()) || (size > dir->maxSize()))) ((size < dir->minSize()) || (size > dir->maxSize())))
continue; continue;
if ((dir->type() == KIcon::Threshold) && if ((dir->type() == TDEIcon::Threshold) &&
(abs(dir->size()-size) > dir->threshold())) (abs(dir->size()-size) > dir->threshold()))
continue; continue;
} else } else
{ {
// dw < 0 means need to scale up to get an icon of the requested size // 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; dw = dir->size() - size;
} else if (dir->type() == KIcon::Scalable) } else if (dir->type() == TDEIcon::Scalable)
{ {
if (size < dir->minSize()) if (size < dir->minSize())
dw = dir->minSize() - size; dw = dir->minSize() - size;
@ -395,7 +395,7 @@ KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType matc
dw = dir->maxSize() - size; dw = dir->maxSize() - size;
else else
dw = 0; dw = 0;
} else if (dir->type() == KIcon::Threshold) } else if (dir->type() == TDEIcon::Threshold)
{ {
if (size < dir->size() - dir->threshold()) if (size < dir->size() - dir->threshold())
dw = dir->size() - dir->threshold() - size; 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(); icon.context = dir->context();
// if we got in MatchExact that far, we find no better // if we got in MatchExact that far, we find no better
if (match == KIcon::MatchExact) if (match == TDEIcon::MatchExact)
return icon; return icon;
else else
{ {
@ -435,13 +435,13 @@ KIcon KIconTheme::iconPath(const TQString& name, int size, KIcon::MatchType matc
} }
// static // static
TQString *KIconTheme::_theme = 0L; TQString *TDEIconTheme::_theme = 0L;
// static // static
TQStringList *KIconTheme::_theme_list = 0L; TQStringList *TDEIconTheme::_theme_list = 0L;
// static // static
TQString KIconTheme::current() TQString TDEIconTheme::current()
{ {
// Static pointer because of unloading problems wrt DSO's. // Static pointer because of unloading problems wrt DSO's.
if (_theme != 0L) if (_theme != 0L)
@ -463,7 +463,7 @@ TQString KIconTheme::current()
} }
// static // static
TQStringList KIconTheme::list() TQStringList TDEIconTheme::list()
{ {
// Static pointer because of unloading problems wrt DSO's. // Static pointer because of unloading problems wrt DSO's.
if (_theme_list != 0L) if (_theme_list != 0L)
@ -489,7 +489,7 @@ TQStringList KIconTheme::list()
continue; continue;
if (!TDEStandardDirs::exists(*it + *it2 + "/index.desktop") && !TDEStandardDirs::exists(*it + *it2 + "/index.theme")) if (!TDEStandardDirs::exists(*it + *it2 + "/index.desktop") && !TDEStandardDirs::exists(*it + *it2 + "/index.theme"))
continue; continue;
KIconTheme oink(*it2); TDEIconTheme oink(*it2);
if (!oink.isValid()) continue; if (!oink.isValid()) continue;
if (!_theme_list->contains(*it2)) if (!_theme_list->contains(*it2))
@ -500,7 +500,7 @@ TQStringList KIconTheme::list()
} }
// static // static
void KIconTheme::reconfigure() void TDEIconTheme::reconfigure()
{ {
delete _theme; delete _theme;
_theme=0L; _theme=0L;
@ -509,75 +509,75 @@ void KIconTheme::reconfigure()
} }
// static // static
TQString KIconTheme::defaultThemeName() TQString TDEIconTheme::defaultThemeName()
{ {
return TQString::fromLatin1("crystalsvg"); return TQString::fromLatin1("crystalsvg");
} }
/*** KIconThemeDir ***/ /*** TDEIconThemeDir ***/
KIconThemeDir::KIconThemeDir(const TQString& dir, const TDEConfigBase *config) TDEIconThemeDir::TDEIconThemeDir(const TQString& dir, const TDEConfigBase *config)
{ {
mbValid = false; mbValid = false;
mDir = dir; mDir = dir;
mSize = config->readNumEntry("Size"); mSize = config->readNumEntry("Size");
mMinSize = 1; // just set the variables to something mMinSize = 1; // just set the variables to something
mMaxSize = 50; // meaningful in case someone calls minSize or maxSize mMaxSize = 50; // meaningful in case someone calls minSize or maxSize
mType = KIcon::Fixed; mType = TDEIcon::Fixed;
if (mSize == 0) if (mSize == 0)
return; return;
TQString tmp = config->readEntry("Context"); TQString tmp = config->readEntry("Context");
if (tmp == "Devices") if (tmp == "Devices")
mContext = KIcon::Device; mContext = TDEIcon::Device;
else if (tmp == "MimeTypes") else if (tmp == "MimeTypes")
mContext = KIcon::MimeType; mContext = TDEIcon::MimeType;
else if (tmp == "FileSystems") else if (tmp == "FileSystems")
mContext = KIcon::FileSystem; mContext = TDEIcon::FileSystem;
else if (tmp == "Applications") else if (tmp == "Applications")
mContext = KIcon::Application; mContext = TDEIcon::Application;
else if (tmp == "Actions") else if (tmp == "Actions")
mContext = KIcon::Action; mContext = TDEIcon::Action;
else if (tmp == "Animations") else if (tmp == "Animations")
mContext = KIcon::Animation; mContext = TDEIcon::Animation;
else if (tmp == "Categories") else if (tmp == "Categories")
mContext = KIcon::Category; mContext = TDEIcon::Category;
else if (tmp == "Emblems") else if (tmp == "Emblems")
mContext = KIcon::Emblem; mContext = TDEIcon::Emblem;
else if (tmp == "Emotes") else if (tmp == "Emotes")
mContext = KIcon::Emote; mContext = TDEIcon::Emote;
else if (tmp == "International") else if (tmp == "International")
mContext = KIcon::International; mContext = TDEIcon::International;
else if (tmp == "Places") else if (tmp == "Places")
mContext = KIcon::Place; mContext = TDEIcon::Place;
else if (tmp == "Status") else if (tmp == "Status")
mContext = KIcon::StatusIcon; mContext = TDEIcon::StatusIcon;
else { else {
kdDebug(264) << "Invalid Context= line for icon theme: " << mDir << "\n"; kdDebug(264) << "Invalid Context= line for icon theme: " << mDir << "\n";
return; return;
} }
tmp = config->readEntry("Type"); tmp = config->readEntry("Type");
if (tmp == "Fixed") if (tmp == "Fixed")
mType = KIcon::Fixed; mType = TDEIcon::Fixed;
else if (tmp == "Scalable") else if (tmp == "Scalable")
mType = KIcon::Scalable; mType = TDEIcon::Scalable;
else if (tmp == "Threshold") else if (tmp == "Threshold")
mType = KIcon::Threshold; mType = TDEIcon::Threshold;
else { else {
kdDebug(264) << "Invalid Type= line for icon theme: " << mDir << "\n"; kdDebug(264) << "Invalid Type= line for icon theme: " << mDir << "\n";
return; return;
} }
if (mType == KIcon::Scalable) if (mType == TDEIcon::Scalable)
{ {
mMinSize = config->readNumEntry("MinSize", mSize); mMinSize = config->readNumEntry("MinSize", mSize);
mMaxSize = config->readNumEntry("MaxSize", mSize); mMaxSize = config->readNumEntry("MaxSize", mSize);
} else if (mType == KIcon::Threshold) } else if (mType == TDEIcon::Threshold)
mThreshold = config->readNumEntry("Threshold", 2); mThreshold = config->readNumEntry("Threshold", 2);
mbValid = true; mbValid = true;
} }
TQString KIconThemeDir::iconPath(const TQString& name) const TQString TDEIconThemeDir::iconPath(const TQString& name) const
{ {
if (!mbValid) if (!mbValid)
return TQString::null; return TQString::null;
@ -589,7 +589,7 @@ TQString KIconThemeDir::iconPath(const TQString& name) const
return TQString::null; return TQString::null;
} }
TQStringList KIconThemeDir::iconList() const TQStringList TDEIconThemeDir::iconList() const
{ {
TQDir dir(mDir); TQDir dir(mDir);
#ifdef HAVE_LIBART #ifdef HAVE_LIBART

@ -10,8 +10,8 @@
* *
*/ */
#ifndef __KIconTheme_h_Included__ #ifndef __TDEIconTheme_h_Included__
#define __KIconTheme_h_Included__ #define __TDEIconTheme_h_Included__
#include <tqstring.h> #include <tqstring.h>
#include <tqstringlist.h> #include <tqstringlist.h>
@ -20,23 +20,23 @@
#include "tdelibs_export.h" #include "tdelibs_export.h"
class TDEConfig; 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. * icon related constants.
* @see KIconEffect * @see TDEIconEffect
* @see KIconTheme * @see TDEIconTheme
* @see KIconLoader * @see TDEIconLoader
*/ */
class TDECORE_EXPORT KIcon class TDECORE_EXPORT TDEIcon
{ {
public: public:
KIcon() { size = 0; } TDEIcon() { size = 0; }
/** /**
* Return true if this icon is valid, false otherwise. * 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 // if you add a group here, make sure to change the config reading in
// KIconLoader too // TDEIconLoader too
/** /**
* The group of the icon. * The group of the icon.
*/ */
@ -173,18 +173,18 @@ public:
TQString path; TQString path;
private: private:
KIconPrivate *d; TDEIconPrivate *d;
}; };
inline KIcon::Group& operator++(KIcon::Group& group) { group = static_cast<KIcon::Group>(group+1); return group; } inline TDEIcon::Group& operator++(TDEIcon::Group& group) { group = static_cast<TDEIcon::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,int) { TDEIcon::Group ret = group; ++group; return ret; }
/** /**
* Class to use/access icon themes in KDE. This class is used by the * Class to use/access icon themes in KDE. This class is used by the
* iconloader but can be used by others too. * iconloader but can be used by others too.
* @see KIconLoader * @see TDEIconLoader
*/ */
class TDECORE_EXPORT KIconTheme class TDECORE_EXPORT TDEIconTheme
{ {
public: public:
/** /**
@ -193,8 +193,8 @@ public:
* @param appName the name of the application. Can be null. This argument * @param appName the name of the application. Can be null. This argument
* allows applications to have themed application icons. * allows applications to have themed application icons.
*/ */
KIconTheme(const TQString& name, const TQString& appName=TQString::null); TDEIconTheme(const TQString& name, const TQString& appName=TQString::null);
~KIconTheme(); ~TDEIconTheme();
/** /**
* The stylized name of the icon theme. * The stylized name of the icon theme.
@ -281,17 +281,17 @@ public:
/** /**
* The default size of this theme for a certain icon group. * 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. * @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. * 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 * @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. * Query available icons for a size and context.
@ -299,7 +299,7 @@ public:
* @param context the context of the icons * @param context the context of the icons
* @return the list of icon names * @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;
/** /**
* Query available icons for a context and preferred size. * Query available icons for a context and preferred size.
@ -307,26 +307,26 @@ public:
* @param context the context of the icons * @param context the context of the icons
* @return the list of icon names * @return the list of icon names
*/ */
TQStringList queryIconsByContext(int size, KIcon::Context context = KIcon::Any) const; TQStringList queryIconsByContext(int size, TDEIcon::Context context = TDEIcon::Any) const;
/** /**
* Lookup an icon in the theme. * Lookup an icon in the theme.
* @param name The name of the icon, without extension. * @param name The name of the icon, without extension.
* @param size The desired size of the icon. * @param size The desired size of the icon.
* @param match The matching mode. KIcon::MatchExact returns an icon * @param match The matching mode. TDEIcon::MatchExact returns an icon
* only if matches exactly. KIcon::MatchBest returns the best matching * only if matches exactly. TDEIcon::MatchBest returns the best matching
* icon. * icon.
* @return A KIcon class that describes the icon. If an icon is found, * @return A TDEIcon class that describes the icon. If an icon is found,
* @see KIcon::isValid will return true, and false otherwise. * @see TDEIcon::isValid will return true, and false otherwise.
*/ */
KIcon iconPath(const TQString& name, int size, KIcon::MatchType match) const; TDEIcon iconPath(const TQString& name, int size, TDEIcon::MatchType match) const;
/** /**
* Returns true if the theme has any icons for the given context. * Returns true if the theme has any icons for the given context.
* @since 3.5.5 * @since 3.5.5
*/ */
bool hasContext( KIcon::Context context ) const; bool hasContext( TDEIcon::Context context ) const;
/** /**
* List all icon themes installed on the system, global and local. * List all icon themes installed on the system, global and local.
@ -359,8 +359,8 @@ private:
int mDepth; int mDepth;
TQString mDir, mName, mDesc; TQString mDir, mName, mDesc;
TQStringList mInherits; TQStringList mInherits;
TQPtrList<KIconThemeDir> mDirs; TQPtrList<TDEIconThemeDir> mDirs;
KIconThemePrivate *d; TDEIconThemePrivate *d;
static TQString *_theme; static TQString *_theme;
static TQStringList *_theme_list; static TQStringList *_theme_list;

@ -259,11 +259,11 @@ void TDEInstance::setConfigName(const TQString &configName)
d->configName = configName; d->configName = configName;
} }
KIconLoader *TDEInstance::iconLoader() const TDEIconLoader *TDEInstance::iconLoader() const
{ {
DEBUG_CHECK_ALIVE DEBUG_CHECK_ALIVE
if( _iconLoader == 0 ) { if( _iconLoader == 0 ) {
_iconLoader = new KIconLoader( _name, dirs() ); _iconLoader = new TDEIconLoader( _name, dirs() );
_iconLoader->enableDelayedIconSetLoading( true ); _iconLoader->enableDelayedIconSetLoading( true );
} }
@ -293,7 +293,7 @@ TDEGlobalNetworkManager *TDEInstance::networkManager() const
void TDEInstance::newIconLoader() const void TDEInstance::newIconLoader() const
{ {
DEBUG_CHECK_ALIVE DEBUG_CHECK_ALIVE
KIconTheme::reconfigure(); TDEIconTheme::reconfigure();
_iconLoader->reconfigure( _name, dirs() ); _iconLoader->reconfigure( _name, dirs() );
} }

@ -21,7 +21,7 @@
class TDEStandardDirs; class TDEStandardDirs;
class TDEAboutData; class TDEAboutData;
class TDEConfig; class TDEConfig;
class KIconLoader; class TDEIconLoader;
class KCharsets; class KCharsets;
class TQFont; class TQFont;
class TDEInstancePrivate; class TDEInstancePrivate;
@ -108,7 +108,7 @@ class TDECORE_EXPORT TDEInstance
* Returns an iconloader object. * Returns an iconloader object.
* @return the iconloader object. * @return the iconloader object.
*/ */
KIconLoader *iconLoader() const; TDEIconLoader *iconLoader() const;
/** /**
* Returns a TDEHardwareDevices object. * Returns a TDEHardwareDevices object.
@ -166,7 +166,7 @@ private:
mutable TDEStandardDirs *_dirs; mutable TDEStandardDirs *_dirs;
mutable TDEConfig *_config; mutable TDEConfig *_config;
mutable KIconLoader *_iconLoader; mutable TDEIconLoader *_iconLoader;
mutable TDEHardwareDevices *_hardwaredevices; mutable TDEHardwareDevices *_hardwaredevices;
mutable TDEGlobalNetworkManager *_networkmanager; mutable TDEGlobalNetworkManager *_networkmanager;

@ -28,8 +28,8 @@
class KMimeSourceFactoryPrivate class KMimeSourceFactoryPrivate
{ {
public: public:
inline KMimeSourceFactoryPrivate (KIconLoader* loader) : m_iconLoader(loader), m_instance(0L) {} inline KMimeSourceFactoryPrivate (TDEIconLoader* loader) : m_iconLoader(loader), m_instance(0L) {}
inline KIconLoader *iconLoader() inline TDEIconLoader *iconLoader()
{ {
// If we don't have either of these, things are looking grim. // If we don't have either of these, things are looking grim.
Q_ASSERT(m_instance || m_iconLoader); Q_ASSERT(m_instance || m_iconLoader);
@ -40,11 +40,11 @@ public:
return m_instance->iconLoader(); return m_instance->iconLoader();
} }
KIconLoader *m_iconLoader; TDEIconLoader *m_iconLoader;
TDEInstance *m_instance; TDEInstance *m_instance;
}; };
KMimeSourceFactory::KMimeSourceFactory (KIconLoader* loader) KMimeSourceFactory::KMimeSourceFactory (TDEIconLoader* loader)
: TQMimeSourceFactory (), : TQMimeSourceFactory (),
d (new KMimeSourceFactoryPrivate (loader)) d (new KMimeSourceFactoryPrivate (loader))
{ {
@ -71,23 +71,23 @@ TQString KMimeSourceFactory::makeAbsolute (const TQString& absOrRelName, const T
if (myContext == "desktop") if (myContext == "desktop")
{ {
result = d->iconLoader()->iconPath (myName, KIcon::Desktop); result = d->iconLoader()->iconPath (myName, TDEIcon::Desktop);
} }
else if (myContext == "toolbar") else if (myContext == "toolbar")
{ {
result = d->iconLoader()->iconPath (myName, KIcon::Toolbar); result = d->iconLoader()->iconPath (myName, TDEIcon::Toolbar);
} }
else if (myContext == "maintoolbar") else if (myContext == "maintoolbar")
{ {
result = d->iconLoader()->iconPath (myName, KIcon::MainToolbar); result = d->iconLoader()->iconPath (myName, TDEIcon::MainToolbar);
} }
else if (myContext == "small") else if (myContext == "small")
{ {
result = d->iconLoader()->iconPath (myName, KIcon::Small); result = d->iconLoader()->iconPath (myName, TDEIcon::Small);
} }
else if (myContext == "user") else if (myContext == "user")
{ {
result = d->iconLoader()->iconPath (myName, KIcon::User); result = d->iconLoader()->iconPath (myName, TDEIcon::User);
} }
if (result.isEmpty()) if (result.isEmpty())

@ -29,7 +29,7 @@ class KMimeSourceFactoryPrivate;
class TDEInstance; class TDEInstance;
/** /**
* An extension to TQMimeSourceFactory that uses KIconLoader to * An extension to TQMimeSourceFactory that uses TDEIconLoader to
* find images. * find images.
* *
* Normally you don't have to instantiate this class at all, TDEApplication does that for * Normally you don't have to instantiate this class at all, TDEApplication does that for
@ -46,7 +46,7 @@ public:
* *
* @param loader is the iconloader used to find images. * @param loader is the iconloader used to find images.
*/ */
KMimeSourceFactory (KIconLoader* loader = TDEGlobal::iconLoader()); KMimeSourceFactory (TDEIconLoader* loader = TDEGlobal::iconLoader());
/** /**
* Destructor. * Destructor.

@ -43,7 +43,7 @@ public:
* You may subclass this and return a pixmap of size @p size for @p text. * You may subclass this and return a pixmap of size @p size for @p text.
* @param text the text that is associated with the pixmap * @param text the text that is associated with the pixmap
* @param size the size of the icon in pixels, 0 for defaylt size. * @param size the size of the icon in pixels, 0 for defaylt size.
* See KIcon::StdSize. * See TDEIcon::StdSize.
* @return the pixmap for the arguments, or null if there is none * @return the pixmap for the arguments, or null if there is none
*/ */
virtual TQPixmap pixmapFor( const TQString& text, int size = 0 ) = 0; virtual TQPixmap pixmapFor( const TQString& text, int size = 0 ) = 0;

@ -75,7 +75,7 @@ class TDEStandardDirsPrivate;
* @li data - Where applications store data. * @li data - Where applications store data.
* @li exe - Executables in $prefix/bin. findExe() for a function that takes $PATH into account. * @li exe - Executables in $prefix/bin. findExe() for a function that takes $PATH into account.
* @li html - HTML documentation. * @li html - HTML documentation.
* @li icon - Icons, see KIconLoader. * @li icon - Icons, see TDEIconLoader.
* @li lib - Libraries. * @li lib - Libraries.
* @li locale - Translation files for TDELocale. * @li locale - Translation files for TDELocale.
* @li mime - Mime types. * @li mime - Mime types.

@ -286,7 +286,7 @@ TDEGenericDevice* TDEGenericDevice::parentDevice() {
return m_parentDevice; return m_parentDevice;
} }
TQPixmap TDEGenericDevice::icon(KIcon::StdSizes size) { TQPixmap TDEGenericDevice::icon(TDEIcon::StdSizes size) {
return TDEGlobal::hardwareDevices()->getDeviceTypeIconFromType(type(), size); return TDEGlobal::hardwareDevices()->getDeviceTypeIconFromType(type(), size);
} }
@ -541,7 +541,7 @@ TQString TDEStorageDevice::friendlyName() {
TQString TDEStorageDevice::friendlyDeviceType() { TQString TDEStorageDevice::friendlyDeviceType() {
TQString ret = i18n("Hard Disk Drive"); TQString ret = i18n("Hard Disk Drive");
// Keep this in sync with TDEStorageDevice::icon(KIcon::StdSizes size) below // Keep this in sync with TDEStorageDevice::icon(TDEIcon::StdSizes size) below
if (isDiskOfType(TDEDiskDeviceType::Floppy)) { if (isDiskOfType(TDEDiskDeviceType::Floppy)) {
ret = i18n("Floppy Drive"); ret = i18n("Floppy Drive");
} }
@ -602,7 +602,7 @@ TQString TDEStorageDevice::friendlyDeviceType() {
return ret; return ret;
} }
TQPixmap TDEStorageDevice::icon(KIcon::StdSizes size) { TQPixmap TDEStorageDevice::icon(TDEIcon::StdSizes size) {
TQPixmap ret = DesktopIcon("hdd_unmount", size); TQPixmap ret = DesktopIcon("hdd_unmount", size);
if (isDiskOfType(TDEDiskDeviceType::Floppy)) { if (isDiskOfType(TDEDiskDeviceType::Floppy)) {
@ -5495,7 +5495,7 @@ TQString TDEHardwareDevices::getFriendlyDeviceTypeStringFromType(TDEGenericDevic
return ret; return ret;
} }
TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDEGenericDeviceType query, KIcon::StdSizes size) { TQPixmap TDEHardwareDevices::getDeviceTypeIconFromType(TDEGenericDeviceType::TDEGenericDeviceType query, TDEIcon::StdSizes size) {
TQPixmap ret = DesktopIcon("misc", size); TQPixmap ret = DesktopIcon("misc", size);
// // Keep this in sync with the TDEGenericDeviceType definition in the header // // Keep this in sync with the TDEGenericDeviceType definition in the header

@ -353,10 +353,10 @@ class TDECORE_EXPORT TDEGenericDevice : public TQObject
/** /**
* Get an icon for this device * Get an icon for this device
* @param size a KIcon::StdSizes structure specifying the desired icon size * @param size a TDEIcon::StdSizes structure specifying the desired icon size
* @return a TQPixmap containing the icon for the specified type * @return a TQPixmap containing the icon for the specified type
*/ */
virtual TQPixmap icon(KIcon::StdSizes size); virtual TQPixmap icon(TDEIcon::StdSizes size);
protected: protected:
/** /**
@ -622,12 +622,12 @@ class TDECORE_EXPORT TDEStorageDevice : public TDEGenericDevice
/** /**
* Get an icon for this device * Get an icon for this device
* @param size a KIcon::StdSizes structure specifying the desired icon size * @param size a TDEIcon::StdSizes structure specifying the desired icon size
* @return a TQPixmap containing the icon for the specified type * @return a TQPixmap containing the icon for the specified type
* *
* This method overrides TDEGenericDevice::icon(KIcon::StdSizes size) * This method overrides TDEGenericDevice::icon(TDEIcon::StdSizes size)
*/ */
TQPixmap icon(KIcon::StdSizes size); TQPixmap icon(TDEIcon::StdSizes size);
/** /**
* @return a TQString with a friendly name * @return a TQString with a friendly name
@ -1977,10 +1977,10 @@ class TDECORE_EXPORT TDEHardwareDevices : public TQObject
/** /**
* Get an icon for a device type * Get an icon for a device type
* @param query a TDEGenericDeviceType::TDEGenericDeviceType specifying a device type * @param query a TDEGenericDeviceType::TDEGenericDeviceType specifying a device type
* @param size a KIcon::StdSizes structure specifying the desired icon size * @param size a TDEIcon::StdSizes structure specifying the desired icon size
* @return a TQPixmap containing the icon for the specified type * @return a TQPixmap containing the icon for the specified type
*/ */
TQPixmap getDeviceTypeIconFromType(TDEGenericDeviceType::TDEGenericDeviceType query, KIcon::StdSizes size); TQPixmap getDeviceTypeIconFromType(TDEGenericDeviceType::TDEGenericDeviceType query, TDEIcon::StdSizes size);
/** /**
* Convenience function to obtain the root system device * Convenience function to obtain the root system device

@ -9,12 +9,12 @@ int main(int argc, char *argv[])
{ {
TDEApplication app(argc,argv,"kiconloadertest"/*,false,false*/); TDEApplication app(argc,argv,"kiconloadertest"/*,false,false*/);
KIconLoader * mpLoader = TDEGlobal::iconLoader(); TDEIconLoader * mpLoader = TDEGlobal::iconLoader();
KIcon::Context mContext = KIcon::Application; TDEIcon::Context mContext = TDEIcon::Application;
TQTime dt; TQTime dt;
dt.start(); dt.start();
int count = 0; int count = 0;
for ( int mGroup = 0; mGroup < KIcon::LastGroup ; ++mGroup ) for ( int mGroup = 0; mGroup < TDEIcon::LastGroup ; ++mGroup )
{ {
kdDebug() << "queryIcons " << mGroup << "," << mContext << endl; kdDebug() << "queryIcons " << mGroup << "," << mContext << endl;
TQStringList filelist=mpLoader->queryIcons(mGroup, mContext); TQStringList filelist=mpLoader->queryIcons(mGroup, mContext);
@ -25,7 +25,7 @@ int main(int argc, char *argv[])
++it, ++i ) ++it, ++i )
{ {
//kdDebug() << ( i==9 ? "..." : (*it) ) << endl; //kdDebug() << ( i==9 ? "..." : (*it) ) << endl;
mpLoader->loadIcon( (*it), (KIcon::Group)mGroup ); mpLoader->loadIcon( (*it), (TDEIcon::Group)mGroup );
++count; ++count;
} }
} }

@ -483,8 +483,8 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
if( XGetClassHint( tqt_xdisplay(), win, &hint ) ) { if( XGetClassHint( tqt_xdisplay(), win, &hint ) ) {
TQString className = hint.res_class; TQString className = hint.res_class;
TQPixmap pm = TDEGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth, TQPixmap pm = TDEGlobal::instance()->iconLoader()->loadIcon( className.lower(), TDEIcon::Small, iconWidth,
KIcon::DefaultState, 0, true ); TDEIcon::DefaultState, 0, true );
if( scale && !pm.isNull() ) if( scale && !pm.isNull() )
result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) ); result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) );
else else
@ -500,8 +500,8 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
// If the icon is still a null pixmap, load the 'xapp' icon // If the icon is still a null pixmap, load the 'xapp' icon
// as a last resort: // as a last resort:
if ( result.isNull() ) { if ( result.isNull() ) {
TQPixmap pm = TDEGlobal::instance()->iconLoader()->loadIcon( "xapp", KIcon::Small, iconWidth, TQPixmap pm = TDEGlobal::instance()->iconLoader()->loadIcon( "xapp", TDEIcon::Small, iconWidth,
KIcon::DefaultState, 0, true ); TDEIcon::DefaultState, 0, true );
if( scale && !pm.isNull() ) if( scale && !pm.isNull() )
result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) ); result.convertFromImage( TQImage(pm.convertToImage()).smoothScale( width, height ) );
else else

@ -81,7 +81,7 @@ SourceDisplay::SourceDisplay(KJSDebugWin *debugWin, TQWidget *parent, const char
{ {
verticalScrollBar()->setLineStep(TQFontMetrics(m_font).height()); verticalScrollBar()->setLineStep(TQFontMetrics(m_font).height());
viewport()->setBackgroundMode(TQt::NoBackground); viewport()->setBackgroundMode(TQt::NoBackground);
m_breakpointIcon = TDEGlobal::iconLoader()->loadIcon("stop",KIcon::Small); m_breakpointIcon = TDEGlobal::iconLoader()->loadIcon("stop",TDEIcon::Small);
} }
SourceDisplay::~SourceDisplay() SourceDisplay::~SourceDisplay()
@ -297,8 +297,8 @@ KJSErrorDialog::KJSErrorDialog(TQWidget *parent, const TQString& errorMessage, b
TQLabel *iconLabel = new TQLabel("",page); TQLabel *iconLabel = new TQLabel("",page);
iconLabel->setPixmap(TDEGlobal::iconLoader()->loadIcon("messagebox_critical", iconLabel->setPixmap(TDEGlobal::iconLoader()->loadIcon("messagebox_critical",
KIcon::NoGroup,KIcon::SizeMedium, TDEIcon::NoGroup,TDEIcon::SizeMedium,
KIcon::DefaultState,0,true)); TDEIcon::DefaultState,0,true));
TQWidget *contents = new TQWidget(page); TQWidget *contents = new TQWidget(page);
TQLabel *label = new TQLabel(errorMessage,contents); TQLabel *label = new TQLabel(errorMessage,contents);
@ -361,7 +361,7 @@ KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name)
m_execsAlloc = 0; m_execsAlloc = 0;
m_steppingDepth = 0; m_steppingDepth = 0;
m_stopIcon = TDEGlobal::iconLoader()->loadIcon("stop",KIcon::Small); m_stopIcon = TDEGlobal::iconLoader()->loadIcon("stop",TDEIcon::Small);
m_emptyIcon = TQPixmap(m_stopIcon.width(),m_stopIcon.height()); m_emptyIcon = TQPixmap(m_stopIcon.width(),m_stopIcon.height());
TQBitmap emptyMask(m_stopIcon.width(),m_stopIcon.height(),true); TQBitmap emptyMask(m_stopIcon.width(),m_stopIcon.height(),true);
m_emptyIcon.setMask(emptyMask); m_emptyIcon.setMask(emptyMask);

@ -1356,7 +1356,7 @@ void Cache::init()
nullPixmap = new TQPixmap; nullPixmap = new TQPixmap;
if ( !brokenPixmap ) if ( !brokenPixmap )
brokenPixmap = new TQPixmap(TDEHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", KIcon::Desktop, 16, KIcon::DisabledState)); brokenPixmap = new TQPixmap(TDEHTMLFactory::instance()->iconLoader()->loadIcon("file_broken", TDEIcon::Desktop, 16, TDEIcon::DisabledState));
if ( !blockedPixmap ) { if ( !blockedPixmap ) {
blockedPixmap = new TQPixmap(); blockedPixmap = new TQPixmap();

@ -607,7 +607,7 @@ bool TDEHTMLPart::openURL( const KURL &url )
if (userAgent != KProtocolManager::userAgentForHost(TQString())) { if (userAgent != KProtocolManager::userAgentForHost(TQString())) {
if (!d->m_statusBarUALabel) { if (!d->m_statusBarUALabel) {
d->m_statusBarUALabel = new KURLLabel(d->m_statusBarExtension->statusBar()); d->m_statusBarUALabel = new KURLLabel(d->m_statusBarExtension->statusBar());
d->m_statusBarUALabel->setFixedHeight(instance()->iconLoader()->currentSize(KIcon::Small)); d->m_statusBarUALabel->setFixedHeight(instance()->iconLoader()->currentSize(TDEIcon::Small));
d->m_statusBarUALabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); d->m_statusBarUALabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
d->m_statusBarUALabel->setUseCursor(false); d->m_statusBarUALabel->setUseCursor(false);
d->m_statusBarExtension->addStatusBarItem(d->m_statusBarUALabel, 0, false); d->m_statusBarExtension->addStatusBarItem(d->m_statusBarUALabel, 0, false);
@ -1074,7 +1074,7 @@ KJSErrorDlg *TDEHTMLPart::jsErrorExtension() {
if (!d->m_statusBarJSErrorLabel) { if (!d->m_statusBarJSErrorLabel) {
d->m_statusBarJSErrorLabel = new KURLLabel(d->m_statusBarExtension->statusBar()); d->m_statusBarJSErrorLabel = new KURLLabel(d->m_statusBarExtension->statusBar());
d->m_statusBarJSErrorLabel->setFixedHeight(instance()->iconLoader()->currentSize(KIcon::Small)); d->m_statusBarJSErrorLabel->setFixedHeight(instance()->iconLoader()->currentSize(TDEIcon::Small));
d->m_statusBarJSErrorLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); d->m_statusBarJSErrorLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
d->m_statusBarJSErrorLabel->setUseCursor(false); d->m_statusBarJSErrorLabel->setUseCursor(false);
d->m_statusBarExtension->addStatusBarItem(d->m_statusBarJSErrorLabel, 0, false); d->m_statusBarExtension->addStatusBarItem(d->m_statusBarJSErrorLabel, 0, false);
@ -1524,7 +1524,7 @@ void TDEHTMLPart::setPageSecurity( PageSecurity sec )
emit d->m_extension->setPageSecurity( sec ); emit d->m_extension->setPageSecurity( sec );
if ( sec != NotCrypted && !d->m_statusBarIconLabel && !parentPart() ) { if ( sec != NotCrypted && !d->m_statusBarIconLabel && !parentPart() ) {
d->m_statusBarIconLabel = new KURLLabel( d->m_statusBarExtension->statusBar() ); d->m_statusBarIconLabel = new KURLLabel( d->m_statusBarExtension->statusBar() );
d->m_statusBarIconLabel->setFixedHeight( instance()->iconLoader()->currentSize(KIcon::Small) ); d->m_statusBarIconLabel->setFixedHeight( instance()->iconLoader()->currentSize(TDEIcon::Small) );
d->m_statusBarIconLabel->setSizePolicy(TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed )); d->m_statusBarIconLabel->setSizePolicy(TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ));
d->m_statusBarIconLabel->setUseCursor( false ); d->m_statusBarIconLabel->setUseCursor( false );
d->m_statusBarExtension->addStatusBarItem( d->m_statusBarIconLabel, 0, false ); d->m_statusBarExtension->addStatusBarItem( d->m_statusBarIconLabel, 0, false );
@ -6406,13 +6406,13 @@ void TDEHTMLPart::tdehtmlMouseMoveEvent( tdehtml::MouseMoveEvent *event )
{ {
img = static_cast<HTMLImageElementImpl *>(innerNode.handle()); img = static_cast<HTMLImageElementImpl *>(innerNode.handle());
u = KURL( completeURL( tdehtml::parseURL(img->getAttribute(ATTR_SRC)).string() ) ); u = KURL( completeURL( tdehtml::parseURL(img->getAttribute(ATTR_SRC)).string() ) );
pix = KMimeType::mimeType("image/png")->pixmap(KIcon::Desktop); pix = KMimeType::mimeType("image/png")->pixmap(TDEIcon::Desktop);
} }
else else
{ {
// Text or image link... // Text or image link...
u = completeURL( d->m_strSelectedURL ); u = completeURL( d->m_strSelectedURL );
pix = KMimeType::pixmapForURL(u, 0, KIcon::Desktop, KIcon::SizeMedium); pix = KMimeType::pixmapForURL(u, 0, TDEIcon::Desktop, TDEIcon::SizeMedium);
} }
u.setPass(TQString()); u.setPass(TQString());
@ -7248,7 +7248,7 @@ void TDEHTMLPart::walletOpened(KWallet::Wallet *wallet) {
if (!d->m_statusBarWalletLabel) { if (!d->m_statusBarWalletLabel) {
d->m_statusBarWalletLabel = new KURLLabel(d->m_statusBarExtension->statusBar()); d->m_statusBarWalletLabel = new KURLLabel(d->m_statusBarExtension->statusBar());
d->m_statusBarWalletLabel->setFixedHeight(instance()->iconLoader()->currentSize(KIcon::Small)); d->m_statusBarWalletLabel->setFixedHeight(instance()->iconLoader()->currentSize(TDEIcon::Small));
d->m_statusBarWalletLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); d->m_statusBarWalletLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
d->m_statusBarWalletLabel->setUseCursor(false); d->m_statusBarWalletLabel->setUseCursor(false);
d->m_statusBarExtension->addStatusBarItem(d->m_statusBarWalletLabel, 0, false); d->m_statusBarExtension->addStatusBarItem(d->m_statusBarWalletLabel, 0, false);
@ -7385,7 +7385,7 @@ void TDEHTMLPart::setSuppressedPopupIndicator( bool enable, TDEHTMLPart *originP
if ( enable && !d->m_statusBarPopupLabel ) { if ( enable && !d->m_statusBarPopupLabel ) {
d->m_statusBarPopupLabel = new KURLLabel( d->m_statusBarExtension->statusBar() ); d->m_statusBarPopupLabel = new KURLLabel( d->m_statusBarExtension->statusBar() );
d->m_statusBarPopupLabel->setFixedHeight( instance()->iconLoader()->currentSize( KIcon::Small) ); d->m_statusBarPopupLabel->setFixedHeight( instance()->iconLoader()->currentSize( TDEIcon::Small) );
d->m_statusBarPopupLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed )); d->m_statusBarPopupLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ));
d->m_statusBarPopupLabel->setUseCursor( false ); d->m_statusBarPopupLabel->setUseCursor( false );
d->m_statusBarExtension->addStatusBarItem( d->m_statusBarPopupLabel, 0, false ); d->m_statusBarExtension->addStatusBarItem( d->m_statusBarPopupLabel, 0, false );

@ -975,13 +975,13 @@ void TDEHTMLView::viewportMousePressEvent( TQMouseEvent *_mouse )
pixmap.fill( TQColor( tqRgba( 127, 127, 127, 127 ) ) ); pixmap.fill( TQColor( tqRgba( 127, 127, 127, 127 ) ) );
TQPainter p( &pixmap ); TQPainter p( &pixmap );
icon = TDEGlobal::iconLoader()->loadIcon( "1uparrow", KIcon::Small ); icon = TDEGlobal::iconLoader()->loadIcon( "1uparrow", TDEIcon::Small );
p.drawPixmap( 16, 0, icon ); p.drawPixmap( 16, 0, icon );
icon = TDEGlobal::iconLoader()->loadIcon( "1leftarrow", KIcon::Small ); icon = TDEGlobal::iconLoader()->loadIcon( "1leftarrow", TDEIcon::Small );
p.drawPixmap( 0, 16, icon ); p.drawPixmap( 0, 16, icon );
icon = TDEGlobal::iconLoader()->loadIcon( "1downarrow", KIcon::Small ); icon = TDEGlobal::iconLoader()->loadIcon( "1downarrow", TDEIcon::Small );
p.drawPixmap( 16, 32,icon ); p.drawPixmap( 16, 32,icon );
icon = TDEGlobal::iconLoader()->loadIcon( "1rightarrow", KIcon::Small ); icon = TDEGlobal::iconLoader()->loadIcon( "1rightarrow", TDEIcon::Small );
p.drawPixmap( 32, 16, icon ); p.drawPixmap( 32, 16, icon );
p.drawEllipse( 23, 23, 2, 2 ); p.drawEllipse( 23, 23, 2, 2 );
@ -1269,7 +1269,7 @@ void TDEHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
if ( ( mailtoCursor || newWindowCursor ) && isVisible() && hasFocus() ) { if ( ( mailtoCursor || newWindowCursor ) && isVisible() && hasFocus() ) {
#ifdef Q_WS_X11 #ifdef Q_WS_X11
TQPixmap icon_pixmap = TDEGlobal::iconLoader()->loadIcon( mailtoCursor ? "mail_generic" : "window_new", KIcon::Small, 0, KIcon::DefaultState, 0, true ); TQPixmap icon_pixmap = TDEGlobal::iconLoader()->loadIcon( mailtoCursor ? "mail_generic" : "window_new", TDEIcon::Small, 0, TDEIcon::DefaultState, 0, true );
if (d->cursor_icon_widget) { if (d->cursor_icon_widget) {
const TQPixmap *pm = d->cursor_icon_widget->backgroundPixmap(); const TQPixmap *pm = d->cursor_icon_widget->backgroundPixmap();

@ -41,7 +41,7 @@
* The file dialog provides different views; there is a vertically scrolling * The file dialog provides different views; there is a vertically scrolling
* view based on TDEListView, showing things like filename, file size, * view based on TDEListView, showing things like filename, file size,
* permissions etc. in separate columns. And there is a horizontally scrolling * permissions etc. in separate columns. And there is a horizontally scrolling
* view based on KIconView. Additionally, there are some compound views, * view based on TDEIconView. Additionally, there are some compound views,
* like a view using the icon-view for files on the right side and another * like a view using the icon-view for files on the right side and another
* view for directories on the left. A view, that shows a preview for the * view for directories on the left. A view, that shows a preview for the
* currently selected file (using TDEIO::PreviewJob to generate previews) * currently selected file (using TDEIO::PreviewJob to generate previews)
@ -67,8 +67,8 @@
* The KPropertiesDialog is extensible with plugin-pages via the * The KPropertiesDialog is extensible with plugin-pages via the
* KPropsDlgPlugin class. * KPropsDlgPlugin class.
* *
* The KIconDialog class shows a list of icons installed on the system (as * The TDEIconDialog class shows a list of icons installed on the system (as
* accessible via KIconLoader) and allows the user to select one. * accessible via TDEIconLoader) and allows the user to select one.
* *
* KOpenWithDlg implements a dialog to choose an application from, that is * KOpenWithDlg implements a dialog to choose an application from, that is
* to be run, e.g. to let the user choose an application to open a file/url * to be run, e.g. to let the user choose an application to open a file/url
@ -97,7 +97,7 @@
* The base class for all views to be used with KDirOperator. * The base class for all views to be used with KDirOperator.
* *
* KFileIconView: * KFileIconView:
* The KFileView based on KIconView. * The KFileView based on TDEIconView.
* *
* KFileDetailView: * KFileDetailView:
* The KFileView based on TDEListView. * The KFileView based on TDEListView.

@ -60,8 +60,8 @@ public:
// to accelators, replace them with two ampersands. // to accelators, replace them with two ampersands.
serviceName.replace("&", "&&"); serviceName.replace("&", "&&");
TQPixmap normal = TDEGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, TQPixmap normal = TDEGlobal::instance()->iconLoader()->loadIcon(s->icon(), TDEIcon::Small,
0, KIcon::DefaultState, 0L, true); 0, TDEIcon::DefaultState, 0L, true);
// make sure they are not larger than 16x16 // make sure they are not larger than 16x16
if (normal.width() > 16 || normal.height() > 16) { if (normal.width() > 16 || normal.height() > 16) {

@ -49,11 +49,11 @@
#include <svgicons/ksvgiconpainter.h> #include <svgicons/ksvgiconpainter.h>
#endif #endif
class KIconCanvas::KIconCanvasPrivate class TDEIconCanvas::TDEIconCanvasPrivate
{ {
public: public:
KIconCanvasPrivate() { m_bLoading = false; } TDEIconCanvasPrivate() { m_bLoading = false; }
~KIconCanvasPrivate() {} ~TDEIconCanvasPrivate() {}
bool m_bLoading; bool m_bLoading;
}; };
@ -85,13 +85,13 @@ public:
}; };
/* /*
* KIconCanvas: Iconview for the iconloader dialog. * TDEIconCanvas: Iconview for the iconloader dialog.
*/ */
KIconCanvas::KIconCanvas(TQWidget *parent, const char *name) TDEIconCanvas::TDEIconCanvas(TQWidget *parent, const char *name)
: KIconView(parent, name) : TDEIconView(parent, name)
{ {
d = new KIconCanvasPrivate; d = new TDEIconCanvasPrivate;
mpTimer = new TQTimer(this); mpTimer = new TQTimer(this);
connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles())); connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles()));
connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)), connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)),
@ -101,13 +101,13 @@ KIconCanvas::KIconCanvas(TQWidget *parent, const char *name)
setShowToolTips(true); setShowToolTips(true);
} }
KIconCanvas::~KIconCanvas() TDEIconCanvas::~TDEIconCanvas()
{ {
delete mpTimer; delete mpTimer;
delete d; delete d;
} }
void KIconCanvas::loadFiles(const TQStringList& files) void TDEIconCanvas::loadFiles(const TQStringList& files)
{ {
clear(); clear();
mFiles = files; mFiles = files;
@ -116,7 +116,7 @@ void KIconCanvas::loadFiles(const TQStringList& files)
d->m_bLoading = false; d->m_bLoading = false;
} }
void KIconCanvas::slotLoadFiles() void TDEIconCanvas::slotLoadFiles()
{ {
setResizeMode(Fixed); setResizeMode(Fixed);
TQApplication::setOverrideCursor(tqwaitCursor); TQApplication::setOverrideCursor(tqwaitCursor);
@ -199,65 +199,65 @@ void KIconCanvas::slotLoadFiles()
setResizeMode(Adjust); setResizeMode(Adjust);
} }
TQString KIconCanvas::getCurrent() const TQString TDEIconCanvas::getCurrent() const
{ {
if (!currentItem()) if (!currentItem())
return TQString::null; return TQString::null;
return currentItem()->key(); return currentItem()->key();
} }
void KIconCanvas::stopLoading() void TDEIconCanvas::stopLoading()
{ {
d->m_bLoading = false; d->m_bLoading = false;
} }
void KIconCanvas::slotCurrentChanged(TQIconViewItem *item) void TDEIconCanvas::slotCurrentChanged(TQIconViewItem *item)
{ {
emit nameChanged((item != 0L) ? item->text() : TQString::null); emit nameChanged((item != 0L) ? item->text() : TQString::null);
} }
class KIconDialog::KIconDialogPrivate class TDEIconDialog::TDEIconDialogPrivate
{ {
public: public:
KIconDialogPrivate() { TDEIconDialogPrivate() {
m_bStrictIconSize = true; m_bStrictIconSize = true;
m_bLockUser = false; m_bLockUser = false;
m_bLockCustomDir = false; m_bLockCustomDir = false;
searchLine = 0; searchLine = 0;
} }
~KIconDialogPrivate() {} ~TDEIconDialogPrivate() {}
bool m_bStrictIconSize, m_bLockUser, m_bLockCustomDir; bool m_bStrictIconSize, m_bLockUser, m_bLockCustomDir;
TQString custom; TQString custom;
TQString customLocation; TQString customLocation;
KIconViewSearchLine *searchLine; TDEIconViewSearchLine *searchLine;
}; };
/* /*
* KIconDialog: Dialog for selecting icons. Both system and user * TDEIconDialog: Dialog for selecting icons. Both system and user
* specified icons can be chosen. * specified icons can be chosen.
*/ */
KIconDialog::KIconDialog(TQWidget *parent, const char *name) TDEIconDialog::TDEIconDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok) : KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok)
{ {
d = new KIconDialogPrivate; d = new TDEIconDialogPrivate;
mpLoader = TDEGlobal::iconLoader(); mpLoader = TDEGlobal::iconLoader();
init(); init();
} }
KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *parent, TDEIconDialog::TDEIconDialog(TDEIconLoader *loader, TQWidget *parent,
const char *name) const char *name)
: KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok) : KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok)
{ {
d = new KIconDialogPrivate; d = new TDEIconDialogPrivate;
mpLoader = loader; mpLoader = loader;
init(); init();
} }
void KIconDialog::init() void TDEIconDialog::init()
{ {
mGroupOrSize = KIcon::Desktop; mGroupOrSize = TDEIcon::Desktop;
mContext = KIcon::Any; mContext = TDEIcon::Any;
mType = 0; mType = 0;
mFileList = TDEGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); mFileList = TDEGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png"));
@ -297,7 +297,7 @@ void KIconDialog::init()
TQLabel *searchLabel = new TQLabel(i18n("&Search:"), main); TQLabel *searchLabel = new TQLabel(i18n("&Search:"), main);
searchLayout->addWidget(searchLabel); searchLayout->addWidget(searchLabel);
d->searchLine = new KIconViewSearchLine(main, "searchLine"); d->searchLine = new TDEIconViewSearchLine(main, "searchLine");
searchLayout->addWidget(d->searchLine); searchLayout->addWidget(d->searchLine);
searchLabel->setBuddy(d->searchLine); searchLabel->setBuddy(d->searchLine);
@ -310,7 +310,7 @@ void KIconDialog::init()
TQWhatsThis::add(d->searchLine, wtstr); TQWhatsThis::add(d->searchLine, wtstr);
mpCanvas = new KIconCanvas(main); mpCanvas = new TDEIconCanvas(main);
connect(mpCanvas, TQT_SIGNAL(executed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons())); connect(mpCanvas, TQT_SIGNAL(executed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons()));
connect(mpCanvas, TQT_SIGNAL(returnPressed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons())); connect(mpCanvas, TQT_SIGNAL(returnPressed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons()));
mpCanvas->setMinimumSize(400, 125); mpCanvas->setMinimumSize(400, 125);
@ -339,19 +339,19 @@ void KIconDialog::init()
I18N_NOOP( "Mimetypes" ), I18N_NOOP( "Mimetypes" ),
I18N_NOOP( "Places" ), I18N_NOOP( "Places" ),
I18N_NOOP( "Status" ) }; I18N_NOOP( "Status" ) };
static const KIcon::Context context_id[] = { static const TDEIcon::Context context_id[] = {
KIcon::Action, TDEIcon::Action,
KIcon::Animation, TDEIcon::Animation,
KIcon::Application, TDEIcon::Application,
KIcon::Category, TDEIcon::Category,
KIcon::Device, TDEIcon::Device,
KIcon::Emblem, TDEIcon::Emblem,
KIcon::Emote, TDEIcon::Emote,
KIcon::FileSystem, TDEIcon::FileSystem,
KIcon::International, TDEIcon::International,
KIcon::MimeType, TDEIcon::MimeType,
KIcon::Place, TDEIcon::Place,
KIcon::StatusIcon }; TDEIcon::StatusIcon };
mNumContext = 0; mNumContext = 0;
int cnt = sizeof( context_text ) / sizeof( context_text[ 0 ] ); int cnt = sizeof( context_text ) / sizeof( context_text[ 0 ] );
// check all 3 arrays have same sizes // check all 3 arrays have same sizes
@ -376,18 +376,18 @@ void KIconDialog::init()
} }
KIconDialog::~KIconDialog() TDEIconDialog::~TDEIconDialog()
{ {
delete d; delete d;
} }
void KIconDialog::slotAcceptIcons() void TDEIconDialog::slotAcceptIcons()
{ {
d->custom=TQString::null; d->custom=TQString::null;
slotOk(); slotOk();
} }
void KIconDialog::showIcons() void TDEIconDialog::showIcons()
{ {
mpCanvas->clear(); mpCanvas->clear();
TQStringList filelist; TQStringList filelist;
@ -417,40 +417,40 @@ void KIconDialog::showIcons()
mpCanvas->loadFiles(filelist); mpCanvas->loadFiles(filelist);
} }
void KIconDialog::setStrictIconSize(bool b) void TDEIconDialog::setStrictIconSize(bool b)
{ {
d->m_bStrictIconSize=b; d->m_bStrictIconSize=b;
} }
bool KIconDialog::strictIconSize() const bool TDEIconDialog::strictIconSize() const
{ {
return d->m_bStrictIconSize; return d->m_bStrictIconSize;
} }
void KIconDialog::setIconSize( int size ) void TDEIconDialog::setIconSize( int size )
{ {
// see KIconLoader, if you think this is weird // see TDEIconLoader, if you think this is weird
if ( size == 0 ) if ( size == 0 )
mGroupOrSize = KIcon::Desktop; // default Group mGroupOrSize = TDEIcon::Desktop; // default Group
else else
mGroupOrSize = -size; // yes, KIconLoader::queryIconsByContext is weird mGroupOrSize = -size; // yes, TDEIconLoader::queryIconsByContext is weird
} }
int KIconDialog::iconSize() const int TDEIconDialog::iconSize() const
{ {
// 0 or any other value ==> mGroupOrSize is a group, so we return 0 // 0 or any other value ==> mGroupOrSize is a group, so we return 0
return (mGroupOrSize < 0) ? -mGroupOrSize : 0; return (mGroupOrSize < 0) ? -mGroupOrSize : 0;
} }
#ifndef KDE_NO_COMPAT #ifndef KDE_NO_COMPAT
TQString KIconDialog::selectIcon(KIcon::Group group, KIcon::Context context, bool user) TQString TDEIconDialog::selectIcon(TDEIcon::Group group, TDEIcon::Context context, bool user)
{ {
setup( group, context, false, 0, user ); setup( group, context, false, 0, user );
return openDialog(); return openDialog();
} }
#endif #endif
void KIconDialog::setup(KIcon::Group group, KIcon::Context context, void TDEIconDialog::setup(TDEIcon::Group group, TDEIcon::Context context,
bool strictIconSize, int iconSize, bool user ) bool strictIconSize, int iconSize, bool user )
{ {
d->m_bStrictIconSize = strictIconSize; d->m_bStrictIconSize = strictIconSize;
@ -463,7 +463,7 @@ void KIconDialog::setup(KIcon::Group group, KIcon::Context context,
setContext( context ); setContext( context );
} }
void KIconDialog::setup(KIcon::Group group, KIcon::Context context, void TDEIconDialog::setup(TDEIcon::Group group, TDEIcon::Context context,
bool strictIconSize, int iconSize, bool user, bool strictIconSize, int iconSize, bool user,
bool lockUser, bool lockCustomDir ) bool lockUser, bool lockCustomDir )
{ {
@ -481,7 +481,7 @@ void KIconDialog::setup(KIcon::Group group, KIcon::Context context,
setContext( context ); setContext( context );
} }
void KIconDialog::setContext( KIcon::Context context ) void TDEIconDialog::setContext( TDEIcon::Context context )
{ {
mContext = context; mContext = context;
for( int i = 0; for( int i = 0;
@ -494,12 +494,12 @@ void KIconDialog::setContext( KIcon::Context context )
} }
} }
void KIconDialog::setCustomLocation( const TQString& location ) void TDEIconDialog::setCustomLocation( const TQString& location )
{ {
d->customLocation = location; d->customLocation = location;
} }
TQString KIconDialog::openDialog() TQString TDEIconDialog::openDialog()
{ {
showIcons(); showIcons();
@ -516,14 +516,14 @@ TQString KIconDialog::openDialog()
return TQString::null; return TQString::null;
} }
void KIconDialog::showDialog() void TDEIconDialog::showDialog()
{ {
setModal(false); setModal(false);
showIcons(); showIcons();
show(); show();
} }
void KIconDialog::slotOk() void TDEIconDialog::slotOk()
{ {
TQString name; TQString name;
if (!d->custom.isNull()) if (!d->custom.isNull())
@ -544,11 +544,11 @@ void KIconDialog::slotOk()
KDialogBase::slotOk(); KDialogBase::slotOk();
} }
TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context, TQString TDEIconDialog::getIcon(TDEIcon::Group group, TDEIcon::Context context,
bool strictIconSize, int iconSize, bool user, bool strictIconSize, int iconSize, bool user,
TQWidget *parent, const TQString &caption) TQWidget *parent, const TQString &caption)
{ {
KIconDialog dlg(parent, "icon dialog"); TDEIconDialog dlg(parent, "icon dialog");
dlg.setup( group, context, strictIconSize, iconSize, user ); dlg.setup( group, context, strictIconSize, iconSize, user );
if (!caption.isNull()) if (!caption.isNull())
dlg.setCaption(caption); dlg.setCaption(caption);
@ -556,7 +556,7 @@ TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
return dlg.openDialog(); return dlg.openDialog();
} }
void KIconDialog::slotButtonClicked(int id) void TDEIconDialog::slotButtonClicked(int id)
{ {
TQString file; TQString file;
@ -609,13 +609,13 @@ void KIconDialog::slotButtonClicked(int id)
} }
} }
void KIconDialog::slotContext(int id) void TDEIconDialog::slotContext(int id)
{ {
mContext = static_cast<KIcon::Context>( mContextMap[ id ] ); mContext = static_cast<TDEIcon::Context>( mContextMap[ id ] );
showIcons(); showIcons();
} }
void KIconDialog::slotStartLoading(int steps) void TDEIconDialog::slotStartLoading(int steps)
{ {
if (steps < 10) if (steps < 10)
mpProgress->hide(); mpProgress->hide();
@ -627,7 +627,7 @@ void KIconDialog::slotStartLoading(int steps)
} }
} }
void KIconDialog::slotProgress(int p) void TDEIconDialog::slotProgress(int p)
{ {
mpProgress->setProgress(p); mpProgress->setProgress(p);
// commented out the following since setProgress already paints ther // commented out the following since setProgress already paints ther
@ -635,46 +635,46 @@ void KIconDialog::slotProgress(int p)
//mpProgress->repaint(); //mpProgress->repaint();
} }
void KIconDialog::slotFinished() void TDEIconDialog::slotFinished()
{ {
mpProgress->hide(); mpProgress->hide();
} }
class KIconButton::KIconButtonPrivate class TDEIconButton::TDEIconButtonPrivate
{ {
public: public:
KIconButtonPrivate() { TDEIconButtonPrivate() {
m_bStrictIconSize = false; m_bStrictIconSize = false;
iconSize = 0; // let KIconLoader choose the default iconSize = 0; // let TDEIconLoader choose the default
} }
~KIconButtonPrivate() {} ~TDEIconButtonPrivate() {}
bool m_bStrictIconSize; bool m_bStrictIconSize;
int iconSize; int iconSize;
}; };
/* /*
* KIconButton: A "choose icon" pushbutton. * TDEIconButton: A "choose icon" pushbutton.
*/ */
KIconButton::KIconButton(TQWidget *parent, const char *name) TDEIconButton::TDEIconButton(TQWidget *parent, const char *name)
: TQPushButton(parent, name) : TQPushButton(parent, name)
{ {
init( TDEGlobal::iconLoader() ); init( TDEGlobal::iconLoader() );
} }
KIconButton::KIconButton(KIconLoader *loader, TDEIconButton::TDEIconButton(TDEIconLoader *loader,
TQWidget *parent, const char *name) TQWidget *parent, const char *name)
: TQPushButton(parent, name) : TQPushButton(parent, name)
{ {
init( loader ); init( loader );
} }
void KIconButton::init( KIconLoader *loader ) void TDEIconButton::init( TDEIconLoader *loader )
{ {
d = new KIconButtonPrivate; d = new TDEIconButtonPrivate;
mGroup = KIcon::Desktop; mGroup = TDEIcon::Desktop;
mContext = KIcon::Application; mContext = TDEIcon::Application;
mbUser = false; mbUser = false;
mpLoader = loader; mpLoader = loader;
@ -682,47 +682,47 @@ void KIconButton::init( KIconLoader *loader )
connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotChangeIcon())); connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotChangeIcon()));
} }
KIconButton::~KIconButton() TDEIconButton::~TDEIconButton()
{ {
delete mpDialog; delete mpDialog;
delete d; delete d;
} }
void KIconButton::setStrictIconSize(bool b) void TDEIconButton::setStrictIconSize(bool b)
{ {
d->m_bStrictIconSize=b; d->m_bStrictIconSize=b;
} }
bool KIconButton::strictIconSize() const bool TDEIconButton::strictIconSize() const
{ {
return d->m_bStrictIconSize; return d->m_bStrictIconSize;
} }
void KIconButton::setIconSize( int size ) void TDEIconButton::setIconSize( int size )
{ {
d->iconSize = size; d->iconSize = size;
} }
int KIconButton::iconSize() const int TDEIconButton::iconSize() const
{ {
return d->iconSize; return d->iconSize;
} }
void KIconButton::setIconType(KIcon::Group group, KIcon::Context context, bool user) void TDEIconButton::setIconType(TDEIcon::Group group, TDEIcon::Context context, bool user)
{ {
mGroup = group; mGroup = group;
mContext = context; mContext = context;
mbUser = user; mbUser = user;
} }
void KIconButton::setIcon(const TQString& icon) void TDEIconButton::setIcon(const TQString& icon)
{ {
mIcon = icon; mIcon = icon;
setIconSet(mpLoader->loadIconSet(mIcon, mGroup, d->iconSize)); setIconSet(mpLoader->loadIconSet(mIcon, mGroup, d->iconSize));
if (!mpDialog) if (!mpDialog)
{ {
mpDialog = new KIconDialog(mpLoader, this); mpDialog = new TDEIconDialog(mpLoader, this);
connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&))); connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&)));
} }
@ -730,17 +730,17 @@ void KIconButton::setIcon(const TQString& icon)
mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) ); mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
} }
void KIconButton::resetIcon() void TDEIconButton::resetIcon()
{ {
mIcon = TQString::null; mIcon = TQString::null;
setIconSet(TQIconSet()); setIconSet(TQIconSet());
} }
void KIconButton::slotChangeIcon() void TDEIconButton::slotChangeIcon()
{ {
if (!mpDialog) if (!mpDialog)
{ {
mpDialog = new KIconDialog(mpLoader, this); mpDialog = new TDEIconDialog(mpLoader, this);
connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&))); connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&)));
} }
@ -748,7 +748,7 @@ void KIconButton::slotChangeIcon()
mpDialog->showDialog(); mpDialog->showDialog();
} }
void KIconButton::newIconName(const TQString& name) void TDEIconButton::newIconName(const TQString& name)
{ {
if (name.isEmpty()) if (name.isEmpty())
return; return;
@ -763,10 +763,10 @@ void KIconButton::newIconName(const TQString& name)
emit iconChanged(name); emit iconChanged(name);
} }
void KIconCanvas::virtual_hook( int id, void* data ) void TDEIconCanvas::virtual_hook( int id, void* data )
{ KIconView::virtual_hook( id, data ); } { TDEIconView::virtual_hook( id, data ); }
void KIconDialog::virtual_hook( int id, void* data ) void TDEIconDialog::virtual_hook( int id, void* data )
{ KDialogBase::virtual_hook( id, data ); } { KDialogBase::virtual_hook( id, data ); }
#include "kicondialog.moc" #include "kicondialog.moc"

@ -11,8 +11,8 @@
* exact licensing terms. * exact licensing terms.
*/ */
#ifndef __KIconDialog_h__ #ifndef __TDEIconDialog_h__
#define __KIconDialog_h__ #define __TDEIconDialog_h__
#include <tqstring.h> #include <tqstring.h>
#include <tqstringlist.h> #include <tqstringlist.h>
@ -27,18 +27,18 @@ class TQTimer;
class TQKeyEvent; class TQKeyEvent;
class TQRadioButton; class TQRadioButton;
class KProgress; class KProgress;
class KIconLoader; class TDEIconLoader;
/** /**
* Icon canvas for KIconDialog. * Icon canvas for TDEIconDialog.
*/ */
class TDEIO_EXPORT KIconCanvas: public KIconView class TDEIO_EXPORT TDEIconCanvas: public TDEIconView
{ {
Q_OBJECT Q_OBJECT
public: public:
KIconCanvas(TQWidget *parent=0L, const char *name=0L); TDEIconCanvas(TQWidget *parent=0L, const char *name=0L);
~KIconCanvas(); ~TDEIconCanvas();
/** /**
* Load icons into the canvas. * Load icons into the canvas.
@ -71,14 +71,14 @@ private slots:
private: private:
TQStringList mFiles; TQStringList mFiles;
TQTimer *mpTimer; TQTimer *mpTimer;
KIconLoader *mpLoader; // unused TDEIconLoader *mpLoader; // unused
protected: protected:
virtual void virtual_hook( int id, void* data ); virtual void virtual_hook( int id, void* data );
private: private:
class KIconCanvasPrivate; class TDEIconCanvasPrivate;
KIconCanvasPrivate *d; TDEIconCanvasPrivate *d;
}; };
@ -88,7 +88,7 @@ private:
* *
* @short An icon selection dialog. * @short An icon selection dialog.
*/ */
class TDEIO_EXPORT KIconDialog: public KDialogBase class TDEIO_EXPORT TDEIconDialog: public KDialogBase
{ {
Q_OBJECT Q_OBJECT
@ -96,16 +96,16 @@ public:
/** /**
* Constructs an icon selection dialog using the global iconloader. * Constructs an icon selection dialog using the global iconloader.
*/ */
KIconDialog(TQWidget *parent=0L, const char *name=0L); TDEIconDialog(TQWidget *parent=0L, const char *name=0L);
/** /**
* Constructs an icon selection dialog using a specific iconloader. * Constructs an icon selection dialog using a specific iconloader.
*/ */
KIconDialog(KIconLoader *loader, TQWidget *parent=0, TDEIconDialog(TDEIconLoader *loader, TQWidget *parent=0,
const char *name=0); const char *name=0);
/** /**
* Destructs the dialog. * Destructs the dialog.
*/ */
~KIconDialog(); ~TDEIconDialog();
/** /**
* Sets a strict icon size policy for allowed icons. When true, * Sets a strict icon size policy for allowed icons. When true,
@ -126,7 +126,7 @@ public:
/** /**
* Sets the size of the icons to be shown / selected. * Sets the size of the icons to be shown / selected.
* @see KIcon::StdSizes * @see TDEIcon::StdSizes
* @see iconSize * @see iconSize
*/ */
void setIconSize(int size); void setIconSize(int size);
@ -141,16 +141,16 @@ public:
/** /**
* @deprecated in KDE 3.0, use the static method getIcon instead. * @deprecated in KDE 3.0, use the static method getIcon instead.
*/ */
TQString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context TQString selectIcon(TDEIcon::Group group=TDEIcon::Desktop, TDEIcon::Context
context=KIcon::Application, bool user=false); context=TDEIcon::Application, bool user=false);
#endif #endif
/** /**
* Allows you to set the same parameters as in the class method * Allows you to set the same parameters as in the class method
* getIcon(). * getIcon().
*/ */
void setup( KIcon::Group group, void setup( TDEIcon::Group group,
KIcon::Context context = KIcon::Application, TDEIcon::Context context = TDEIcon::Application,
bool strictIconSize = false, int iconSize = 0, bool strictIconSize = false, int iconSize = 0,
bool user = false ); bool user = false );
@ -163,14 +163,14 @@ public:
* @since 3.3 * @since 3.3
*/ */
void setup( KIcon::Group group, KIcon::Context context, void setup( TDEIcon::Group group, TDEIcon::Context context,
bool strictIconSize, int iconSize, bool user, bool lockUser, bool strictIconSize, int iconSize, bool user, bool lockUser,
bool lockCustomDir ); bool lockCustomDir );
/** /**
* exec()utes this modal dialog and returns the name of the selected icon, * exec()utes this modal dialog and returns the name of the selected icon,
* or TQString::null if the dialog was aborted. * or TQString::null if the dialog was aborted.
* @returns the name of the icon, suitable for loading with KIconLoader. * @returns the name of the icon, suitable for loading with TDEIconLoader.
* @see getIcon * @see getIcon
*/ */
TQString openDialog(); TQString openDialog();
@ -197,11 +197,11 @@ public:
* @param user Begin with the "user icons" instead of "system icons". * @param user Begin with the "user icons" instead of "system icons".
* @param parent The parent widget of the dialog. * @param parent The parent widget of the dialog.
* @param caption The caption to use for the dialog. * @param caption The caption to use for the dialog.
* @return The name of the icon, suitable for loading with KIconLoader. * @return The name of the icon, suitable for loading with TDEIconLoader.
* @version New in 3.0 * @version New in 3.0
*/ */
static TQString getIcon(KIcon::Group group=KIcon::Desktop, static TQString getIcon(TDEIcon::Group group=TDEIcon::Desktop,
KIcon::Context context=KIcon::Application, TDEIcon::Context context=TDEIcon::Application,
bool strictIconSize=false, int iconSize = 0, bool strictIconSize=false, int iconSize = 0,
bool user=false, TQWidget *parent=0, bool user=false, TQWidget *parent=0,
const TQString &caption=TQString::null); const TQString &caption=TQString::null);
@ -222,10 +222,10 @@ private slots:
private: private:
void init(); void init();
void showIcons(); void showIcons();
void setContext( KIcon::Context context ); void setContext( TDEIcon::Context context );
int mGroupOrSize; int mGroupOrSize;
KIcon::Context mContext; TDEIcon::Context mContext;
int mType; int mType;
TQStringList mFileList; TQStringList mFileList;
@ -233,28 +233,28 @@ private:
TQPushButton *mpBrowseBut; TQPushButton *mpBrowseBut;
TQRadioButton *mpRb1, *mpRb2; TQRadioButton *mpRb1, *mpRb2;
KProgress *mpProgress; KProgress *mpProgress;
KIconLoader *mpLoader; TDEIconLoader *mpLoader;
KIconCanvas *mpCanvas; TDEIconCanvas *mpCanvas;
int mNumContext; int mNumContext;
KIcon::Context mContextMap[ 12 ]; // must match KIcon::Context size, code has assert TDEIcon::Context mContextMap[ 12 ]; // must match TDEIcon::Context size, code has assert
protected: protected:
virtual void virtual_hook( int id, void* data ); virtual void virtual_hook( int id, void* data );
private: private:
class KIconDialogPrivate; class TDEIconDialogPrivate;
KIconDialogPrivate *d; TDEIconDialogPrivate *d;
}; };
/** /**
* A pushbutton for choosing an icon. Pressing on the button will open a * A pushbutton for choosing an icon. Pressing on the button will open a
* KIconDialog for the user to select an icon. The current icon will be * TDEIconDialog for the user to select an icon. The current icon will be
* displayed on the button. * displayed on the button.
* *
* @see KIconDialog * @see TDEIconDialog
* @short A push button that allows selection of an icon. * @short A push button that allows selection of an icon.
*/ */
class TDEIO_EXPORT KIconButton: public TQPushButton class TDEIO_EXPORT TDEIconButton: public TQPushButton
{ {
Q_OBJECT Q_OBJECT
TQ_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon ) TQ_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon )
@ -263,18 +263,18 @@ class TDEIO_EXPORT KIconButton: public TQPushButton
public: public:
/** /**
* Constructs a KIconButton using the global iconloader. * Constructs a TDEIconButton using the global iconloader.
*/ */
KIconButton(TQWidget *parent=0L, const char *name=0L); TDEIconButton(TQWidget *parent=0L, const char *name=0L);
/** /**
* Constructs a KIconButton using a specific KIconLoader. * Constructs a TDEIconButton using a specific TDEIconLoader.
*/ */
KIconButton(KIconLoader *loader, TQWidget *parent, const char *name=0L); TDEIconButton(TDEIconLoader *loader, TQWidget *parent, const char *name=0L);
/** /**
* Destructs the button. * Destructs the button.
*/ */
~KIconButton(); ~TDEIconButton();
/** /**
* Sets a strict icon size policy for allowed icons. When true, * Sets a strict icon size policy for allowed icons. When true,
@ -288,10 +288,10 @@ public:
bool strictIconSize() const; bool strictIconSize() const;
/** /**
* Sets the icon group and context. Use KIcon::NoGroup if you want to * Sets the icon group and context. Use TDEIcon::NoGroup if you want to
* allow icons for any group in the given context. * allow icons for any group in the given context.
*/ */
void setIconType(KIcon::Group group, KIcon::Context context, bool user=false); void setIconType(TDEIcon::Group group, TDEIcon::Context context, bool user=false);
/** /**
* Sets the button's initial icon. * Sets the button's initial icon.
@ -310,7 +310,7 @@ public:
/** /**
* Sets the size of the icon to be shown / selected. * Sets the size of the icon to be shown / selected.
* @see KIcon::StdSizes * @see TDEIcon::StdSizes
* @see iconSize * @see iconSize
*/ */
void setIconSize( int size ); void setIconSize( int size );
@ -333,18 +333,18 @@ private slots:
void newIconName(const TQString& name); void newIconName(const TQString& name);
private: private:
void init( KIconLoader *loader ); void init( TDEIconLoader *loader );
bool mbUser; bool mbUser;
KIcon::Group mGroup; TDEIcon::Group mGroup;
KIcon::Context mContext; TDEIcon::Context mContext;
TQString mIcon; TQString mIcon;
KIconDialog *mpDialog; TDEIconDialog *mpDialog;
KIconLoader *mpLoader; TDEIconLoader *mpLoader;
class KIconButtonPrivate; class TDEIconButtonPrivate;
KIconButtonPrivate *d; TDEIconButtonPrivate *d;
}; };
#endif // __KIconDialog_h__ #endif // __TDEIconDialog_h__

@ -160,8 +160,8 @@ void KImageFilePreview::slotFailed( const KFileItem* item )
if ( item->isDir() ) if ( item->isDir() )
imageLabel->clear(); imageLabel->clear();
else if ( item->url() == currentURL ) // should always be the case else if ( item->url() == currentURL ) // should always be the case
imageLabel->setPixmap( SmallIcon( "file_broken", KIcon::SizeLarge, imageLabel->setPixmap( SmallIcon( "file_broken", TDEIcon::SizeLarge,
KIcon::DisabledState )); TDEIcon::DisabledState ));
} }
void KImageFilePreview::slotResult( TDEIO::Job *job ) void KImageFilePreview::slotResult( TDEIO::Job *job )

@ -251,7 +251,7 @@ KNotifyWidget::KNotifyWidget( TQWidget *parent, const char *name,
d->pixmaps[COL_SOUND] = psound; d->pixmaps[COL_SOUND] = psound;
d->pixmaps[COL_TASKBAR] = ptaskbar; d->pixmaps[COL_TASKBAR] = ptaskbar;
int w = KIcon::SizeSmall + 6; int w = TDEIcon::SizeSmall + 6;
TQHeader *header = m_listview->header(); TQHeader *header = m_listview->header();
header->setLabel( COL_EXECUTE, pexec, TQString::null, w ); header->setLabel( COL_EXECUTE, pexec, TQString::null, w );

@ -171,7 +171,7 @@ bool TDEApplicationTree::isDirSel()
static TQPixmap appIcon(const TQString &iconName) static TQPixmap appIcon(const TQString &iconName)
{ {
TQPixmap normal = TDEGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true); TQPixmap normal = TDEGlobal::iconLoader()->loadIcon(iconName, TDEIcon::Small, 0, TDEIcon::DefaultState, 0L, true);
// make sure they are not larger than 20x20 // make sure they are not larger than 20x20
if (normal.width() > 20 || normal.height() > 20) if (normal.width() > 20 || normal.height() > 20)
{ {

@ -858,7 +858,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ ) if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ )
{ {
KIconButton *iconButton = new KIconButton( d->m_frame ); TDEIconButton *iconButton = new TDEIconButton( d->m_frame );
int bsize = 66 + 2 * iconButton->style().pixelMetric(TQStyle::PM_ButtonMargin); int bsize = 66 + 2 * iconButton->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconButton->setFixedSize(bsize, bsize); iconButton->setFixedSize(bsize, bsize);
iconButton->setIconSize(48); iconButton->setIconSize(48);
@ -872,11 +872,11 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
config.setDesktopGroup(); config.setDesktopGroup();
iconStr = config.readEntry( "Icon" ); iconStr = config.readEntry( "Icon" );
if ( config.hasDeviceType() ) if ( config.hasDeviceType() )
iconButton->setIconType( KIcon::Desktop, KIcon::Device ); iconButton->setIconType( TDEIcon::Desktop, TDEIcon::Device );
else else
iconButton->setIconType( KIcon::Desktop, KIcon::Application ); iconButton->setIconType( TDEIcon::Desktop, TDEIcon::Application );
} else } else
iconButton->setIconType( KIcon::Desktop, KIcon::Place ); iconButton->setIconType( TDEIcon::Desktop, TDEIcon::Place );
iconButton->setIcon(iconStr); iconButton->setIcon(iconStr);
iconArea = iconButton; iconArea = iconButton;
connect( iconButton, TQT_SIGNAL( iconChanged(TQString) ), connect( iconButton, TQT_SIGNAL( iconChanged(TQString) ),
@ -885,7 +885,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
TQLabel *iconLabel = new TQLabel( d->m_frame ); TQLabel *iconLabel = new TQLabel( d->m_frame );
int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin); int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconLabel->setFixedSize(bsize, bsize); iconLabel->setFixedSize(bsize, bsize);
iconLabel->setPixmap( TDEGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) ); iconLabel->setPixmap( TDEGlobal::iconLoader()->loadIcon( iconStr, TDEIcon::Desktop, 48) );
iconArea = iconLabel; iconArea = iconLabel;
} }
grid->addWidget(iconArea, curRow, 0, Qt::AlignLeft); grid->addWidget(iconArea, curRow, 0, Qt::AlignLeft);
@ -1427,7 +1427,7 @@ void KFilePropsPlugin::slotCopyFinished( TDEIO::Job * job )
void KFilePropsPlugin::applyIconChanges() void KFilePropsPlugin::applyIconChanges()
{ {
KIconButton *iconButton = ::tqqt_cast<KIconButton *>( iconArea ); TDEIconButton *iconButton = ::tqqt_cast<TDEIconButton *>( iconArea );
if ( !iconButton || !d->bIconChanged ) if ( !iconButton || !d->bIconChanged )
return; return;
// handle icon changes - only local files (or pseudo-local) for now // handle icon changes - only local files (or pseudo-local) for now
@ -2915,10 +2915,10 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
KSeparator* sep = new KSeparator( KSeparator::HLine, d->m_frame); KSeparator* sep = new KSeparator( KSeparator::HLine, d->m_frame);
layout->addMultiCellWidget(sep, 6, 6, 0, 1); layout->addMultiCellWidget(sep, 6, 6, 0, 1);
unmounted = new KIconButton( d->m_frame ); unmounted = new TDEIconButton( d->m_frame );
int bsize = 66 + 2 * unmounted->style().pixelMetric(TQStyle::PM_ButtonMargin); int bsize = 66 + 2 * unmounted->style().pixelMetric(TQStyle::PM_ButtonMargin);
unmounted->setFixedSize(bsize, bsize); unmounted->setFixedSize(bsize, bsize);
unmounted->setIconType(KIcon::Desktop, KIcon::Device); unmounted->setIconType(TDEIcon::Desktop, TDEIcon::Device);
layout->addWidget(unmounted, 7, 0); layout->addWidget(unmounted, 7, 0);
label = new TQLabel( i18n("Unmounted Icon"), d->m_frame ); label = new TQLabel( i18n("Unmounted Icon"), d->m_frame );
@ -3272,7 +3272,7 @@ void KDesktopPropsPlugin::slotAddFiletype()
} }
TQListViewItem *item = new TQListViewItem(majorGroup, min, (*it)->comment()); TQListViewItem *item = new TQListViewItem(majorGroup, min, (*it)->comment());
item->setPixmap(0, (*it)->pixmap(KIcon::Small, IconSize(KIcon::Small))); item->setPixmap(0, (*it)->pixmap(TDEIcon::Small, IconSize(TDEIcon::Small)));
} }
TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( "all" ); TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( "all" );
if ( mit != majorMap.end()) if ( mit != majorMap.end())

@ -42,7 +42,7 @@ class TQPushButton;
class KLineEdit; class KLineEdit;
class KURLRequester; class KURLRequester;
class TQButton; class TQButton;
class KIconButton; class TDEIconButton;
class KPropsDlgPlugin; class KPropsDlgPlugin;
class TQComboBox; class TQComboBox;
@ -670,7 +670,7 @@ public:
private: private:
KURLRequester *URLEdit; KURLRequester *URLEdit;
KIconButton *iconBox; TDEIconButton *iconBox;
TQString URLStr; TQString URLStr;
TQString iconStr; TQString iconStr;
@ -746,8 +746,8 @@ private:
TQLabel* mountpoint; TQLabel* mountpoint;
TQCheckBox* readonly; TQCheckBox* readonly;
void* unused; void* unused;
//KIconButton* mounted; //TDEIconButton* mounted;
KIconButton* unmounted; TDEIconButton* unmounted;
TQStringList m_devicelist; TQStringList m_devicelist;
int indexDevice; int indexDevice;

@ -89,8 +89,8 @@ public:
KURLBarItem::KURLBarItem( KURLBar *parent, KURLBarItem::KURLBarItem( KURLBar *parent,
const KURL& url, bool persistent, const TQString& description, const KURL& url, bool persistent, const TQString& description,
const TQString& icon, KIcon::Group group ) const TQString& icon, TDEIcon::Group group )
: TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ), : TQListBoxPixmap( TDEIconLoader::unknown() /*, parent->listBox()*/ ),
m_url( url ), m_url( url ),
m_pixmap( 0L ), m_pixmap( 0L ),
m_parent( parent ), m_parent( parent ),
@ -101,8 +101,8 @@ KURLBarItem::KURLBarItem( KURLBar *parent,
KURLBarItem::KURLBarItem( KURLBar *parent, KURLBarItem::KURLBarItem( KURLBar *parent,
const KURL& url, const TQString& description, const KURL& url, const TQString& description,
const TQString& icon, KIcon::Group group ) const TQString& icon, TDEIcon::Group group )
: TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ), : TQListBoxPixmap( TDEIconLoader::unknown() /*, parent->listBox()*/ ),
m_url( url ), m_url( url ),
m_pixmap( 0L ), m_pixmap( 0L ),
m_parent( parent ), m_parent( parent ),
@ -111,7 +111,7 @@ KURLBarItem::KURLBarItem( KURLBar *parent,
init( icon, group, description, true /*persistent*/ ); init( icon, group, description, true /*persistent*/ );
} }
void KURLBarItem::init( const TQString& icon, KIcon::Group group, void KURLBarItem::init( const TQString& icon, TDEIcon::Group group,
const TQString& description, bool persistent ) const TQString& description, bool persistent )
{ {
d = new KURLBarItemPrivate; d = new KURLBarItemPrivate;
@ -134,7 +134,7 @@ void KURLBarItem::setURL( const KURL& url )
setText( url.fileName() ); setText( url.fileName() );
} }
void KURLBarItem::setIcon( const TQString& icon, KIcon::Group group ) void KURLBarItem::setIcon( const TQString& icon, TDEIcon::Group group )
{ {
m_icon = icon; m_icon = icon;
m_group = group; m_group = group;
@ -143,7 +143,7 @@ void KURLBarItem::setIcon( const TQString& icon, KIcon::Group group )
m_pixmap = KMimeType::pixmapForURL( m_url, 0, group, iconSize() ); m_pixmap = KMimeType::pixmapForURL( m_url, 0, group, iconSize() );
else else
m_pixmap = TDEGlobal::iconLoader()->loadIcon( icon, group, iconSize(), m_pixmap = TDEGlobal::iconLoader()->loadIcon( icon, group, iconSize(),
KIcon::DefaultState ); TDEIcon::DefaultState );
} }
void KURLBarItem::setDescription( const TQString& desc ) void KURLBarItem::setDescription( const TQString& desc )
@ -203,7 +203,7 @@ void KURLBarItem::paint( TQPainter *p )
p->setPen( oldPen ); p->setPen( oldPen );
} }
if ( m_parent->iconSize() < KIcon::SizeMedium ) { if ( m_parent->iconSize() < TDEIcon::SizeMedium ) {
// small icon -> draw icon next to text // small icon -> draw icon next to text
// ### mostly cut & paste of TQListBoxPixmap::paint() until Qt 3.1 // ### mostly cut & paste of TQListBoxPixmap::paint() until Qt 3.1
@ -274,7 +274,7 @@ TQSize KURLBarItem::sizeHint() const
int hmin = 0; int hmin = 0;
const KURLBarListBox *lb =static_cast<const KURLBarListBox*>(listBox()); const KURLBarListBox *lb =static_cast<const KURLBarListBox*>(listBox());
if ( m_parent->iconSize() < KIcon::SizeMedium ) { if ( m_parent->iconSize() < TDEIcon::SizeMedium ) {
wmin = TQListBoxPixmap::width( lb ) + KDialog::spacingHint() * 2; wmin = TQListBoxPixmap::width( lb ) + KDialog::spacingHint() * 2;
hmin = TQListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2; hmin = TQListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2;
} }
@ -336,7 +336,7 @@ KURLBar::KURLBar( bool useGlobalItems, TQWidget *parent, const char *name, WFlag
m_isModified( false ), m_isModified( false ),
m_isImmutable( false ), m_isImmutable( false ),
m_listBox( 0L ), m_listBox( 0L ),
m_iconSize( KIcon::SizeMedium ) m_iconSize( TDEIcon::SizeMedium )
{ {
d = new KURLBarPrivate(); d = new KURLBarPrivate();
@ -359,7 +359,7 @@ KURLBar::~KURLBar()
KURLBarItem * KURLBar::insertItem(const KURL& url, const TQString& description, KURLBarItem * KURLBar::insertItem(const KURL& url, const TQString& description,
bool applicationLocal, bool applicationLocal,
const TQString& icon, KIcon::Group group ) const TQString& icon, TDEIcon::Group group )
{ {
KURLBarItem *item = new KURLBarItem(this, url, description, icon, group); KURLBarItem *item = new KURLBarItem(this, url, description, icon, group);
item->setApplicationLocal( applicationLocal ); item->setApplicationLocal( applicationLocal );
@ -368,7 +368,7 @@ KURLBarItem * KURLBar::insertItem(const KURL& url, const TQString& description,
} }
KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const TQString& description, KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const TQString& description,
const TQString& icon, KIcon::Group group ) const TQString& icon, TDEIcon::Group group )
{ {
KURLBarItem *item = new KURLBarItem(this, url, false, description, icon, group); KURLBarItem *item = new KURLBarItem(this, url, false, description, icon, group);
m_listBox->insertItem( item ); m_listBox->insertItem( item );
@ -622,7 +622,7 @@ void KURLBar::readItem( int i, TDEConfig *config, bool applicationLocal )
description, description,
applicationLocal, applicationLocal,
config->readEntry( TQString("Icon_") + number ), config->readEntry( TQString("Icon_") + number ),
static_cast<KIcon::Group>( static_cast<TDEIcon::Group>(
config->readNumEntry( TQString("IconGroup_") + number )) ); config->readNumEntry( TQString("IconGroup_") + number )) );
} }
@ -737,7 +737,7 @@ void KURLBar::slotContextMenuRequested( TQListBoxItem *_item, const TQPoint& pos
KURL lastURL = m_activeItem ? m_activeItem->url() : KURL(); KURL lastURL = m_activeItem ? m_activeItem->url() : KURL();
bool smallIcons = m_iconSize < KIcon::SizeMedium; bool smallIcons = m_iconSize < TDEIcon::SizeMedium;
TQPopupMenu *popup = new TQPopupMenu(); TQPopupMenu *popup = new TQPopupMenu();
popup->insertItem( smallIcons ? popup->insertItem( smallIcons ?
i18n("&Large Icons") : i18n("&Small Icons"), i18n("&Large Icons") : i18n("&Small Icons"),
@ -761,7 +761,7 @@ void KURLBar::slotContextMenuRequested( TQListBoxItem *_item, const TQPoint& pos
int result = popup->exec( pos ); int result = popup->exec( pos );
switch ( result ) { switch ( result ) {
case IconSize: case IconSize:
setIconSize( smallIcons ? KIcon::SizeMedium : KIcon::SizeSmallMedium ); setIconSize( smallIcons ? TDEIcon::SizeMedium : TDEIcon::SizeSmallMedium );
m_listBox->triggerUpdate( true ); m_listBox->triggerUpdate( true );
break; break;
case AddItem: case AddItem:
@ -966,7 +966,7 @@ KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url,
whatsThisText = i18n("<qt>This is the icon that will appear in the Quick Access panel.<p>" whatsThisText = i18n("<qt>This is the icon that will appear in the Quick Access panel.<p>"
"Click on the button to select a different icon.</qt>"); "Click on the button to select a different icon.</qt>");
label = new TQLabel( i18n("Choose an &icon:"), grid ); label = new TQLabel( i18n("Choose an &icon:"), grid );
m_iconButton = new KIconButton( grid, "icon button" ); m_iconButton = new TDEIconButton( grid, "icon button" );
m_iconButton->setIconSize( iconSize ); m_iconButton->setIconSize( iconSize );
if ( icon.isEmpty() ) if ( icon.isEmpty() )
icon = KMimeType::iconForURL( url ); icon = KMimeType::iconForURL( url );

@ -58,7 +58,7 @@ public:
KURLBarItem( KURLBar *parent, const KURL& url, bool persistent, KURLBarItem( KURLBar *parent, const KURL& url, bool persistent,
const TQString& description = TQString::null, const TQString& description = TQString::null,
const TQString& icon = TQString::null, const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel ); TDEIcon::Group group = TDEIcon::Panel );
/** /**
* Creates a persistent KURLBarItem to be used in the @p parent KURLBar. You need * Creates a persistent KURLBarItem to be used in the @p parent KURLBar. You need
@ -75,7 +75,7 @@ public:
KURLBarItem( KURLBar *parent, const KURL& url, KURLBarItem( KURLBar *parent, const KURL& url,
const TQString& description = TQString::null, const TQString& description = TQString::null,
const TQString& icon = TQString::null, const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel ); TDEIcon::Group group = TDEIcon::Panel );
/** /**
* Destroys the item * Destroys the item
@ -89,11 +89,11 @@ public:
*/ */
void setURL( const KURL& url ); void setURL( const KURL& url );
/** /**
* @p sets the icon for this item. See KIconLoader for a description * @p sets the icon for this item. See TDEIconLoader for a description
* of the icon groups. * of the icon groups.
* @see icon * @see icon
*/ */
void setIcon( const TQString& icon, KIcon::Group group = KIcon::Panel ); void setIcon( const TQString& icon, TDEIcon::Group group = TDEIcon::Panel );
/** /**
* Sets the description of this item that will be shown as item-text. * Sets the description of this item that will be shown as item-text.
* @see description * @see description
@ -144,7 +144,7 @@ public:
* returns the icon-group of this item (determines icon-effects). * returns the icon-group of this item (determines icon-effects).
* @see setIcon * @see setIcon
*/ */
KIcon::Group iconGroup() const { return m_group; } TDEIcon::Group iconGroup() const { return m_group; }
/** /**
* returns the pixmap of this item. * returns the pixmap of this item.
*/ */
@ -178,7 +178,7 @@ protected:
private: private:
int iconSize() const; int iconSize() const;
void init( const TQString& icon, KIcon::Group group, void init( const TQString& icon, TDEIcon::Group group,
const TQString& description, bool persistent ); const TQString& description, bool persistent );
KURL m_url; KURL m_url;
@ -186,7 +186,7 @@ private:
TQString m_icon; TQString m_icon;
TQString m_toolTip; TQString m_toolTip;
TQPixmap m_pixmap; TQPixmap m_pixmap;
KIcon::Group m_group; TDEIcon::Group m_group;
KURLBar *m_parent; KURLBar *m_parent;
bool m_appLocal :1; bool m_appLocal :1;
@ -257,7 +257,7 @@ public:
const TQString& description, const TQString& description,
bool applicationLocal = true, bool applicationLocal = true,
const TQString& icon = TQString::null, const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel ); TDEIcon::Group group = TDEIcon::Panel );
/** /**
* Inserts a new dynamic item into the KURLBar and returns the created * Inserts a new dynamic item into the KURLBar and returns the created
* KURLBarItem. * KURLBarItem.
@ -271,7 +271,7 @@ public:
virtual KURLBarItem * insertDynamicItem( const KURL& url, virtual KURLBarItem * insertDynamicItem( const KURL& url,
const TQString& description, const TQString& description,
const TQString& icon = TQString::null, const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel ); TDEIcon::Group group = TDEIcon::Panel );
/** /**
* The items can be arranged either vertically in one column or * The items can be arranged either vertically in one column or
* horizontally in one row. * horizontally in one row.
@ -299,13 +299,13 @@ public:
/** /**
* Sets the default iconsize to be used for items inserted with * Sets the default iconsize to be used for items inserted with
* insertItem. By default KIcon::SizeMedium. * insertItem. By default TDEIcon::SizeMedium.
* @see iconsize * @see iconsize
*/ */
virtual void setIconSize( int size ); virtual void setIconSize( int size );
/** /**
* @returns the default iconsize used for items inserted with * @returns the default iconsize used for items inserted with
* insertItem. By default KIcon::SizeMedium * insertItem. By default TDEIcon::SizeMedium
* @see setIconSize * @see setIconSize
*/ */
int iconSize() const { return m_iconSize; } int iconSize() const { return m_iconSize; }
@ -553,7 +553,7 @@ private:
class TQCheckBox; class TQCheckBox;
class KIconButton; class TDEIconButton;
class KLineEdit; class KLineEdit;
class KURLRequester; class KURLRequester;
@ -601,7 +601,7 @@ public:
KURLBarItemDialog( bool allowGlobal, const KURL& url, KURLBarItemDialog( bool allowGlobal, const KURL& url,
const TQString& description, TQString icon, const TQString& description, TQString icon,
bool appLocal = true, bool appLocal = true,
int iconSize = KIcon::SizeMedium, int iconSize = TDEIcon::SizeMedium,
TQWidget *parent = 0, const char *name = 0 ); TQWidget *parent = 0, const char *name = 0 );
/** /**
* Destroys the dialog. * Destroys the dialog.
@ -640,9 +640,9 @@ protected:
*/ */
KLineEdit * m_edit; KLineEdit * m_edit;
/** /**
* The KIconButton to configure the icon * The TDEIconButton to configure the icon
*/ */
KIconButton * m_iconButton; TDEIconButton * m_iconButton;
/** /**
* The TQCheckBox to modify the local/global setting * The TQCheckBox to modify the local/global setting
*/ */

@ -337,7 +337,7 @@ TQPixmap KURLComboBox::getPixmap( const KURL& url ) const
if ( myMode == Directories ) if ( myMode == Directories )
return d->dirpix; return d->dirpix;
else else
return KMimeType::pixmapForURL( url, 0, KIcon::Small ); return KMimeType::pixmapForURL( url, 0, TDEIcon::Small );
} }

@ -301,7 +301,7 @@ void KFileDetailView::updateView( bool b )
TQListViewItemIterator it( (TQListView*)this ); TQListViewItemIterator it( (TQListView*)this );
for ( ; it.current(); ++it ) { for ( ; it.current(); ++it ) {
KFileListViewItem *item=static_cast<KFileListViewItem *>(it.current()); KFileListViewItem *item=static_cast<KFileListViewItem *>(it.current());
item->setPixmap( 0, item->fileInfo()->pixmap(KIcon::SizeSmall) ); item->setPixmap( 0, item->fileInfo()->pixmap(TDEIcon::SizeSmall) );
} }
} }
@ -543,9 +543,9 @@ TQDragObject *KFileDetailView::dragObject()
} }
TQPixmap pixmap; TQPixmap pixmap;
if( urls.count() > 1 ) if( urls.count() > 1 )
pixmap = DesktopIcon( "tdemultiple", KIcon::SizeSmall ); pixmap = DesktopIcon( "tdemultiple", TDEIcon::SizeSmall );
if( pixmap.isNull() ) if( pixmap.isNull() )
pixmap = currentFileItem()->pixmap( KIcon::SizeSmall ); pixmap = currentFileItem()->pixmap( TDEIcon::SizeSmall );
TQPoint hotspot; TQPoint hotspot;
hotspot.setX( pixmap.width() / 2 ); hotspot.setX( pixmap.width() / 2 );
@ -668,7 +668,7 @@ void KFileDetailView::contentsDropEvent( TQDropEvent *e )
void KFileListViewItem::init() void KFileListViewItem::init()
{ {
KFileListViewItem::setPixmap( COL_NAME, inf->pixmap(KIcon::SizeSmall)); KFileListViewItem::setPixmap( COL_NAME, inf->pixmap(TDEIcon::SizeSmall));
setText( COL_NAME, inf->text() ); setText( COL_NAME, inf->text() );
setText( COL_SIZE, TDEGlobal::locale()->formatNumber( inf->size(), 0)); setText( COL_SIZE, TDEGlobal::locale()->formatNumber( inf->size(), 0));

@ -848,12 +848,12 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge
u.setPath( TQDir::rootDirPath() ); u.setPath( TQDir::rootDirPath() );
TQString text = i18n("Root Folder: %1").arg( u.path() ); TQString text = i18n("Root Folder: %1").arg( u.path() );
d->pathCombo->addDefaultURL( u, d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ), KMimeType::pixmapForURL( u, 0, TDEIcon::Small ),
text ); text );
u.setPath( TQDir::homeDirPath() ); u.setPath( TQDir::homeDirPath() );
text = i18n("Home Folder: %1").arg( u.path( +1 ) ); text = i18n("Home Folder: %1").arg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ), d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, TDEIcon::Small ),
text ); text );
KURL docPath; KURL docPath;
@ -863,14 +863,14 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge
{ {
text = i18n("Documents: %1").arg( docPath.path( +1 ) ); text = i18n("Documents: %1").arg( docPath.path( +1 ) );
d->pathCombo->addDefaultURL( docPath, d->pathCombo->addDefaultURL( docPath,
KMimeType::pixmapForURL( docPath, 0, KIcon::Small ), KMimeType::pixmapForURL( docPath, 0, TDEIcon::Small ),
text ); text );
} }
u.setPath( TDEGlobalSettings::desktopPath() ); u.setPath( TDEGlobalSettings::desktopPath() );
text = i18n("Desktop: %1").arg( u.path( +1 ) ); text = i18n("Desktop: %1").arg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u, d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ), KMimeType::pixmapForURL( u, 0, TDEIcon::Small ),
text ); text );
d->url = getStartURL( startDir, d->fileClass ); d->url = getStartURL( startDir, d->fileClass );

@ -113,7 +113,7 @@ public:
}; };
KFileIconView::KFileIconView(TQWidget *parent, const char *name) KFileIconView::KFileIconView(TQWidget *parent, const char *name)
: KIconView(parent, name), KFileView() : TDEIconView(parent, name), KFileView()
{ {
d = new KFileIconViewPrivate( this ); d = new KFileIconViewPrivate( this );
@ -126,8 +126,8 @@ KFileIconView::KFileIconView(TQWidget *parent, const char *name)
setArrangement( TopToBottom ); setArrangement( TopToBottom );
setAutoArrange( true ); setAutoArrange( true );
setItemsMovable( false ); setItemsMovable( false );
setMode( KIconView::Select ); setMode( TDEIconView::Select );
KIconView::setSorting( true ); TDEIconView::setSorting( true );
// as long as TQIconView only shows tooltips when the cursor is over the // as long as TQIconView only shows tooltips when the cursor is over the
// icon (and not the text), we have to create our own tooltips // icon (and not the text), we have to create our own tooltips
setShowToolTips( false ); setShowToolTips( false );
@ -286,12 +286,12 @@ void KFileIconView::slotActivateMenu( TQIconViewItem* item, const TQPoint& pos )
void KFileIconView::hideEvent( TQHideEvent *e ) void KFileIconView::hideEvent( TQHideEvent *e )
{ {
removeToolTip(); removeToolTip();
KIconView::hideEvent( e ); TDEIconView::hideEvent( e );
} }
void KFileIconView::keyPressEvent( TQKeyEvent *e ) void KFileIconView::keyPressEvent( TQKeyEvent *e )
{ {
KIconView::keyPressEvent( e ); TDEIconView::keyPressEvent( e );
// ignore Ctrl-Return so that the dialog can catch it. // ignore Ctrl-Return so that the dialog can catch it.
if ( (e->state() & ControlButton) && if ( (e->state() & ControlButton) &&
@ -303,7 +303,7 @@ void KFileIconView::setSelected( const KFileItem *info, bool enable )
{ {
KFileIconViewItem *item = viewItem( info ); KFileIconViewItem *item = viewItem( info );
if ( item ) if ( item )
KIconView::setSelected( item, enable, true ); TDEIconView::setSelected( item, enable, true );
} }
void KFileIconView::selectAll() void KFileIconView::selectAll()
@ -312,24 +312,24 @@ void KFileIconView::selectAll()
KFileView::selectionMode() == KFile::Single) KFileView::selectionMode() == KFile::Single)
return; return;
KIconView::selectAll( true ); TDEIconView::selectAll( true );
} }
void KFileIconView::clearSelection() void KFileIconView::clearSelection()
{ {
KIconView::clearSelection(); TDEIconView::clearSelection();
} }
void KFileIconView::invertSelection() void KFileIconView::invertSelection()
{ {
KIconView::invertSelection(); TDEIconView::invertSelection();
} }
void KFileIconView::clearView() void KFileIconView::clearView()
{ {
m_resolver->m_lstPendingMimeIconItems.clear(); m_resolver->m_lstPendingMimeIconItems.clear();
KIconView::clear(); TDEIconView::clear();
stopPreview(); stopPreview();
} }
@ -376,7 +376,7 @@ void KFileIconView::setCurrentItem( const KFileItem *item )
{ {
KFileIconViewItem *it = viewItem( item ); KFileIconViewItem *it = viewItem( item );
if ( it ) if ( it )
KIconView::setCurrentItem( it ); TDEIconView::setCurrentItem( it );
} }
KFileItem * KFileIconView::currentFileItem() const KFileItem * KFileIconView::currentFileItem() const
@ -510,7 +510,7 @@ void KFileIconView::ensureItemVisible( const KFileItem *i )
{ {
KFileIconViewItem *item = viewItem( i ); KFileIconViewItem *item = viewItem( i );
if ( item ) if ( item )
KIconView::ensureItemVisible( item ); TDEIconView::ensureItemVisible( item );
} }
void KFileIconView::slotSelectionChanged() void KFileIconView::slotSelectionChanged()
@ -538,7 +538,7 @@ void KFileIconView::slotSmallColumns()
setSpacing( 0 ); setSpacing( 0 );
d->noArrangement = false; // now we can arrange d->noArrangement = false; // now we can arrange
setIconSize( KIcon::SizeSmall ); setIconSize( TDEIcon::SizeSmall );
} }
void KFileIconView::slotLargeRows() void KFileIconView::slotLargeRows()
@ -547,14 +547,14 @@ void KFileIconView::slotLargeRows()
// setIconSize() all call arrangeItemsInGrid() :( Prevent this. // setIconSize() all call arrangeItemsInGrid() :( Prevent this.
d->noArrangement = true; // stop arrangeItemsInGrid()! d->noArrangement = true; // stop arrangeItemsInGrid()!
setGridX( TDEGlobal::iconLoader()->currentSize( KIcon::Desktop ) + 50 ); setGridX( TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop ) + 50 );
setItemTextPos( Bottom ); setItemTextPos( Bottom );
setArrangement( LeftToRight ); setArrangement( LeftToRight );
setWordWrapIconText( true ); setWordWrapIconText( true );
setSpacing( 5 ); // default in QIconView setSpacing( 5 ); // default in QIconView
d->noArrangement = false; // now we can arrange d->noArrangement = false; // now we can arrange
setIconSize( KIcon::SizeMedium ); setIconSize( TDEIcon::SizeMedium );
} }
void KFileIconView::stopPreview() void KFileIconView::stopPreview()
@ -612,11 +612,11 @@ void KFileIconView::gotPreview( const KFileItem *item, const TQPixmap& pix )
{ {
KFileIconViewItem *it = viewItem( item ); KFileIconViewItem *it = viewItem( item );
if ( it ) if ( it )
if( item->overlays() & KIcon::HiddenOverlay ) if( item->overlays() & TDEIcon::HiddenOverlay )
{ {
TQPixmap p( pix ); TQPixmap p( pix );
KIconEffect::semiTransparent( p ); TDEIconEffect::semiTransparent( p );
it->setPixmap( p ); it->setPixmap( p );
} }
else else
@ -697,7 +697,7 @@ void KFileIconView::setSorting( TQDir::SortSpec spec )
spec )); spec ));
} }
KIconView::setSorting( true, !isReversed() ); TDEIconView::setSorting( true, !isReversed() );
sort( !isReversed() ); sort( !isReversed() );
} }
@ -725,8 +725,8 @@ void KFileIconView::listingCompleted()
bool block = signalsBlocked(); bool block = signalsBlocked();
blockSignals( true ); blockSignals( true );
TQIconViewItem *item = viewItem( firstFileItem() ); TQIconViewItem *item = viewItem( firstFileItem() );
KIconView::setCurrentItem( item ); TDEIconView::setCurrentItem( item );
KIconView::setSelected( item, false ); TDEIconView::setSelected( item, false );
blockSignals( block ); blockSignals( block );
} }
@ -743,7 +743,7 @@ bool KFileIconView::eventFilter( TQObject *o, TQEvent *e )
removeToolTip(); removeToolTip();
} }
return KIconView::eventFilter( o, e ); return TDEIconView::eventFilter( o, e );
} }
///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
@ -751,7 +751,7 @@ bool KFileIconView::eventFilter( TQObject *o, TQEvent *e )
// ### workaround for Qt3 Bug // ### workaround for Qt3 Bug
void KFileIconView::showEvent( TQShowEvent *e ) void KFileIconView::showEvent( TQShowEvent *e )
{ {
KIconView::showEvent( e ); TDEIconView::showEvent( e );
} }
@ -794,7 +794,7 @@ void KFileIconView::arrangeItemsInGrid( bool update )
if ( d->noArrangement ) if ( d->noArrangement )
return; return;
KIconView::arrangeItemsInGrid( update ); TDEIconView::arrangeItemsInGrid( update );
} }
void KFileIconView::zoomIn() void KFileIconView::zoomIn()
@ -937,7 +937,7 @@ void KFileIconView::contentsDropEvent( TQDropEvent *e )
} }
void KFileIconView::virtual_hook( int id, void* data ) void KFileIconView::virtual_hook( int id, void* data )
{ KIconView::virtual_hook( id, data ); { TDEIconView::virtual_hook( id, data );
KFileView::virtual_hook( id, data ); } KFileView::virtual_hook( id, data ); }
#include "tdefileiconview.moc" #include "tdefileiconview.moc"

@ -37,18 +37,18 @@ class TQLabel;
* An item for the iconview, that has a reference to its corresponding * An item for the iconview, that has a reference to its corresponding
* KFileItem. * KFileItem.
*/ */
class TDEIO_EXPORT KFileIconViewItem : public KIconViewItem class TDEIO_EXPORT KFileIconViewItem : public TDEIconViewItem
{ {
public: public:
KFileIconViewItem( TQIconView *parent, const TQString &text, KFileIconViewItem( TQIconView *parent, const TQString &text,
const TQPixmap &pixmap, const TQPixmap &pixmap,
KFileItem *fi ) KFileItem *fi )
: KIconViewItem( parent, text, pixmap ), inf( fi ) {} : TDEIconViewItem( parent, text, pixmap ), inf( fi ) {}
/** /**
* @since 3.1 * @since 3.1
*/ */
KFileIconViewItem( TQIconView *parent, KFileItem *fi ) KFileIconViewItem( TQIconView *parent, KFileItem *fi )
: KIconViewItem( parent ), inf( fi ) {} : TDEIconViewItem( parent ), inf( fi ) {}
virtual ~KFileIconViewItem(); virtual ~KFileIconViewItem();
@ -80,7 +80,7 @@ namespace TDEIO {
* @see KCombiView * @see KCombiView
* @see KFileDetailView * @see KFileDetailView
*/ */
class TDEIO_EXPORT KFileIconView : public KIconView, public KFileView class TDEIO_EXPORT KFileIconView : public TDEIconView, public KFileView
{ {
Q_OBJECT Q_OBJECT
@ -114,12 +114,12 @@ public:
virtual KFileItem * prevItem( const KFileItem * ) const; virtual KFileItem * prevItem( const KFileItem * ) const;
/** /**
* Sets the size of the icons to show. Defaults to KIcon::SizeSmall. * Sets the size of the icons to show. Defaults to TDEIcon::SizeSmall.
*/ */
void setIconSize( int size ); void setIconSize( int size );
/** /**
* Sets the size of the previews. Defaults to KIcon::SizeLarge. * Sets the size of the previews. Defaults to TDEIcon::SizeLarge.
*/ */
void setPreviewSize( int size ); void setPreviewSize( int size );
@ -150,7 +150,7 @@ public:
TQScrollView *scrollWidget() const { return (TQScrollView*) this; } TQScrollView *scrollWidget() const { return (TQScrollView*) this; }
void setAcceptDrops(bool b) void setAcceptDrops(bool b)
{ {
KIconView::setAcceptDrops(b); TDEIconView::setAcceptDrops(b);
viewport()->setAcceptDrops(b); viewport()->setAcceptDrops(b);
} }
@ -239,9 +239,9 @@ private:
int th; int th;
int myIconSize; int myIconSize;
virtual void insertItem(TQIconViewItem *a, TQIconViewItem *b) { KIconView::insertItem(a, b); } virtual void insertItem(TQIconViewItem *a, TQIconViewItem *b) { TDEIconView::insertItem(a, b); }
virtual void setSelectionMode(TQIconView::SelectionMode m) { KIconView::setSelectionMode(m); } virtual void setSelectionMode(TQIconView::SelectionMode m) { TDEIconView::setSelectionMode(m); }
virtual void setSelected(TQIconViewItem *i, bool a, bool b) { KIconView::setSelected(i, a, b); } virtual void setSelected(TQIconViewItem *i, bool a, bool b) { TDEIconView::setSelected(i, a, b); }
bool canPreview( const KFileItem * ) const; bool canPreview( const KFileItem * ) const;
void stopPreview(); void stopPreview();

@ -39,7 +39,7 @@ KFileSpeedBar::KFileSpeedBar( TQWidget *parent, const char *name )
TDEConfigGroupSaver cs( config, ConfigGroup ); TDEConfigGroupSaver cs( config, ConfigGroup );
m_initializeSpeedbar = config->readBoolEntry( "Set speedbar defaults", m_initializeSpeedbar = config->readBoolEntry( "Set speedbar defaults",
true ); true );
setIconSize(KIcon::SizeSmallMedium); setIconSize(TDEIcon::SizeSmallMedium);
readConfig( TDEGlobal::config(), "KFileDialog Speedbar" ); readConfig( TDEGlobal::config(), "KFileDialog Speedbar" );
if ( m_initializeSpeedbar ) if ( m_initializeSpeedbar )

@ -143,7 +143,7 @@ void KFileTreeBranch::slotRefreshItems( const KFileItemList& list )
{ {
item = findTVIByURL(currItem->url()); item = findTVIByURL(currItem->url());
if (item) { if (item) {
item->setPixmap(0, item->fileItem()->pixmap( KIcon::SizeSmall )); item->setPixmap(0, item->fileItem()->pixmap( TDEIcon::SizeSmall ));
item->setText( 0, item->fileItem()->text()); item->setText( 0, item->fileItem()->text());
} }
++it; ++it;

@ -79,7 +79,7 @@ KFileTreeView::KFileTreeView( TQWidget *parent, const char *name )
m_bDrag = false; m_bDrag = false;
m_branches.setAutoDelete( true ); m_branches.setAutoDelete( true );
m_openFolderPixmap = DesktopIcon( "folder_open",KIcon::SizeSmall,KIcon::ActiveState ); m_openFolderPixmap = DesktopIcon( "folder_open",TDEIcon::SizeSmall,TDEIcon::ActiveState );
} }
KFileTreeView::~KFileTreeView() KFileTreeView::~KFileTreeView()
@ -357,7 +357,7 @@ void KFileTreeView::slotSelectionChanged()
KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name, KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name,
bool showHidden ) bool showHidden )
{ {
const TQPixmap& folderPix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Desktop,KIcon::SizeSmall ); const TQPixmap& folderPix = KMimeType::mimeType("inode/directory")->pixmap( TDEIcon::Desktop,TDEIcon::SizeSmall );
return addBranch( path, name, folderPix, showHidden); return addBranch( path, name, folderPix, showHidden);
} }
@ -491,7 +491,7 @@ TQPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
else else
{ {
// TODO: different modes, user Pixmaps ? // TODO: different modes, user Pixmaps ?
pix = item->fileItem()->pixmap( KIcon::SizeSmall ); // , KIcon::DefaultState); pix = item->fileItem()->pixmap( TDEIcon::SizeSmall ); // , TDEIcon::DefaultState);
/* Only if it is a dir and the user wants open dir pixmap and it is open, /* Only if it is a dir and the user wants open dir pixmap and it is open,
* change the fileitem's pixmap to the open folder pixmap. */ * change the fileitem's pixmap to the open folder pixmap. */
@ -524,7 +524,7 @@ void KFileTreeView::slotAnimation()
uint & iconNumber = it.data().iconNumber; uint & iconNumber = it.data().iconNumber;
TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) );
// kdDebug(250) << "Loading icon " << icon << endl; // kdDebug(250) << "Loading icon " << icon << endl;
item->setPixmap( 0, DesktopIcon( icon,KIcon::SizeSmall,KIcon::ActiveState )); // KFileTreeViewFactory::instance() ) ); item->setPixmap( 0, DesktopIcon( icon,TDEIcon::SizeSmall,TDEIcon::ActiveState )); // KFileTreeViewFactory::instance() ) );
iconNumber++; iconNumber++;
if ( iconNumber > it.data().iconCount ) if ( iconNumber > it.data().iconCount )

@ -34,7 +34,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent,
m_branch( brnch ), m_branch( brnch ),
m_wasListed(false) m_wasListed(false)
{ {
setPixmap(0, item->pixmap( KIcon::SizeSmall )); setPixmap(0, item->pixmap( TDEIcon::SizeSmall ));
setText( 0, item->text()); setText( 0, item->text());
} }
@ -47,7 +47,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent,
m_branch( brnch ), m_branch( brnch ),
m_wasListed(false) m_wasListed(false)
{ {
setPixmap(0, item->pixmap( KIcon::SizeSmall )); setPixmap(0, item->pixmap( TDEIcon::SizeSmall ));
setText( 0, item->text()); setText( 0, item->text());
} }

@ -125,7 +125,7 @@ int main(int argc, char **argv)
} }
else if (argv1 == TQString::fromLatin1("icon")) { else if (argv1 == TQString::fromLatin1("icon")) {
KIconDialog dlg; TDEIconDialog dlg;
TQString icon = dlg.selectIcon(); TQString icon = dlg.selectIcon();
kdDebug() << icon << endl; kdDebug() << icon << endl;
} }

@ -5,9 +5,9 @@ int main( int argc, char **argv )
{ {
TDEApplication app( argc, argv, "kicondialogtest" ); TDEApplication app( argc, argv, "kicondialogtest" );
// KIconDialog::getIcon(); // TDEIconDialog::getIcon();
KIconButton button; TDEIconButton button;
app.setMainWidget( &button ); app.setMainWidget( &button );
button.show(); button.show();

@ -66,9 +66,9 @@ void testFrame::showPath( const KURL &url )
{ {
TQString fname = "TestBranch"; // url.fileName (); TQString fname = "TestBranch"; // url.fileName ();
/* try a user icon */ /* try a user icon */
KIconLoader *loader = TDEGlobal::iconLoader(); TDEIconLoader *loader = TDEGlobal::iconLoader();
TQPixmap pix = loader->loadIcon( "contents2", KIcon::Small ); TQPixmap pix = loader->loadIcon( "contents2", TDEIcon::Small );
TQPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small ); TQPixmap pixOpen = loader->loadIcon( "contents", TDEIcon::Small );
KFileTreeBranch *nb = treeView->addBranch( url, fname, pix ); KFileTreeBranch *nb = treeView->addBranch( url, fname, pix );

@ -89,8 +89,8 @@ void DefaultProgress::init()
#ifdef Q_WS_X11 //FIXME(E): Remove once all the KWin::foo calls have been ported to QWS #ifdef Q_WS_X11 //FIXME(E): Remove once all the KWin::foo calls have been ported to QWS
// Set a useful icon for this window! // Set a useful icon for this window!
KWin::setIcons( winId(), KWin::setIcons( winId(),
TDEGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 32 ), TDEGlobal::iconLoader()->loadIcon( "filesave", TDEIcon::NoGroup, 32 ),
TDEGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 16 ) ); TDEGlobal::iconLoader()->loadIcon( "filesave", TDEIcon::NoGroup, 16 ) );
#endif #endif
TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(), TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),

@ -450,10 +450,10 @@ KMimeType::~KMimeType()
{ {
} }
TQPixmap KMimeType::pixmap( KIcon::Group _group, int _force_size, int _state, TQPixmap KMimeType::pixmap( TDEIcon::Group _group, int _force_size, int _state,
TQString * _path ) const TQString * _path ) const
{ {
KIconLoader *iconLoader=TDEGlobal::iconLoader(); TDEIconLoader *iconLoader=TDEGlobal::iconLoader();
TQString iconName=icon( TQString::null, false ); TQString iconName=icon( TQString::null, false );
if (!iconLoader->extraDesktopThemesAdded()) if (!iconLoader->extraDesktopThemesAdded())
{ {
@ -466,10 +466,10 @@ TQPixmap KMimeType::pixmap( KIcon::Group _group, int _force_size, int _state,
return iconLoader->loadIcon( iconName , _group, _force_size, _state, _path, false ); return iconLoader->loadIcon( iconName , _group, _force_size, _state, _path, false );
} }
TQPixmap KMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size, TQPixmap KMimeType::pixmap( const KURL& _url, TDEIcon::Group _group, int _force_size,
int _state, TQString * _path ) const int _state, TQString * _path ) const
{ {
KIconLoader *iconLoader=TDEGlobal::iconLoader(); TDEIconLoader *iconLoader=TDEGlobal::iconLoader();
TQString iconName=icon( _url, _url.isLocalFile() ); TQString iconName=icon( _url, _url.isLocalFile() );
if (!iconLoader->extraDesktopThemesAdded()) if (!iconLoader->extraDesktopThemesAdded())
{ {
@ -482,10 +482,10 @@ TQPixmap KMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_si
return iconLoader->loadIcon( iconName , _group, _force_size, _state, _path, false ); return iconLoader->loadIcon( iconName , _group, _force_size, _state, _path, false );
} }
TQPixmap KMimeType::pixmapForURL( const KURL & _url, mode_t _mode, KIcon::Group _group, TQPixmap KMimeType::pixmapForURL( const KURL & _url, mode_t _mode, TDEIcon::Group _group,
int _force_size, int _state, TQString * _path ) int _force_size, int _state, TQString * _path )
{ {
KIconLoader *iconLoader=TDEGlobal::iconLoader(); TDEIconLoader *iconLoader=TDEGlobal::iconLoader();
TQString iconName = iconForURL( _url, _mode ); TQString iconName = iconForURL( _url, _mode );
if (!iconLoader->extraDesktopThemesAdded()) if (!iconLoader->extraDesktopThemesAdded())
@ -745,7 +745,7 @@ TQString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const
return icon; return icon;
} }
TQPixmap KDEDesktopMimeType::pixmap( const KURL& _url, KIcon::Group _group, int _force_size, TQPixmap KDEDesktopMimeType::pixmap( const KURL& _url, TDEIcon::Group _group, int _force_size,
int _state, TQString * _path ) const int _state, TQString * _path ) const
{ {
TQString _icon = icon( _url, _url.isLocalFile() ); TQString _icon = icon( _url, _url.isLocalFile() );

@ -120,13 +120,13 @@ public:
* @param group The icon group where the icon is going to be used. * @param group The icon group where the icon is going to be used.
* @param force_size Override globallly configured icon size. * @param force_size Override globallly configured icon size.
* Use 0 for the default size * Use 0 for the default size
* @param state The icon state, one of: @p KIcon::DefaultState, * @param state The icon state, one of: @p TDEIcon::DefaultState,
* @p KIcon::ActiveState or @p KIcon::DisabledState. * @p TDEIcon::ActiveState or @p TDEIcon::DisabledState.
* @param path Output parameter to get the full path. Seldom needed. * @param path Output parameter to get the full path. Seldom needed.
* Ignored if 0 * Ignored if 0
* @return the pixmap of the mime type, can be a default icon if not found * @return the pixmap of the mime type, can be a default icon if not found
*/ */
virtual TQPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0, virtual TQPixmap pixmap( TDEIcon::Group group, int force_size = 0, int state = 0,
TQString * path = 0L ) const; TQString * path = 0L ) const;
/** /**
@ -139,13 +139,13 @@ public:
* @param _group The icon group where the icon is going to be used. * @param _group The icon group where the icon is going to be used.
* @param _force_size Override globallly configured icon size. * @param _force_size Override globallly configured icon size.
* Use 0 for the default size * Use 0 for the default size
* @param _state The icon state, one of: KIcon::DefaultState, * @param _state The icon state, one of: TDEIcon::DefaultState,
* KIcon::ActiveState or KIcon::DisabledState. * TDEIcon::ActiveState or TDEIcon::DisabledState.
* @param _path Output parameter to get the full path. Seldom needed. * @param _path Output parameter to get the full path. Seldom needed.
* Ignored if 0 * Ignored if 0
* @return the pixmap of the URL, can be a default icon if not found * @return the pixmap of the URL, can be a default icon if not found
*/ */
virtual TQPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0, virtual TQPixmap pixmap( const KURL& _url, TDEIcon::Group _group, int _force_size = 0,
int _state = 0, TQString * _path = 0L ) const; int _state = 0, TQString * _path = 0L ) const;
/** /**
@ -160,19 +160,19 @@ public:
* @param _group The icon group where the icon is going to be used. * @param _group The icon group where the icon is going to be used.
* @param _force_size Override globally configured icon size. * @param _force_size Override globally configured icon size.
* Use 0 for the default size * Use 0 for the default size
* @param _state The icon state, one of: KIcon::DefaultState, * @param _state The icon state, one of: TDEIcon::DefaultState,
* KIcon::ActiveState or KIcon::DisabledState. * TDEIcon::ActiveState or TDEIcon::DisabledState.
* @param _path Output parameter to get the full path. Seldom needed. * @param _path Output parameter to get the full path. Seldom needed.
* Ignored if 0 * Ignored if 0
* @return the pixmap of the URL, can be a default icon if not found * @return the pixmap of the URL, can be a default icon if not found
*/ */
static TQPixmap pixmapForURL( const KURL & _url, mode_t _mode = 0, KIcon::Group _group = KIcon::Desktop, static TQPixmap pixmapForURL( const KURL & _url, mode_t _mode = 0, TDEIcon::Group _group = TDEIcon::Desktop,
int _force_size = 0, int _state = 0, TQString * _path = 0L ); int _force_size = 0, int _state = 0, TQString * _path = 0L );
/** /**
* The same functionality as pixmapForURL(), but this method returns the name * The same functionality as pixmapForURL(), but this method returns the name
* of the icon to load. You'll have to use KIconLoader to load the pixmap for it. * of the icon to load. You'll have to use TDEIconLoader to load the pixmap for it.
* The advantage of this method is that you can store the result, and then use it * The advantage of this method is that you can store the result, and then use it
* later on for any kind of size. * later on for any kind of size.
* @param _url URL for the file * @param _url URL for the file
@ -537,7 +537,7 @@ public:
virtual TQString icon( const TQString& _url, bool _is_local ) const; virtual TQString icon( const TQString& _url, bool _is_local ) const;
virtual TQString icon( const KURL& _url, bool _is_local ) const; virtual TQString icon( const KURL& _url, bool _is_local ) const;
virtual TQPixmap pixmap( const KURL& _url, KIcon::Group _group, int _force_size = 0, virtual TQPixmap pixmap( const KURL& _url, TDEIcon::Group _group, int _force_size = 0,
int _state = 0, TQString * _path = 0L ) const; int _state = 0, TQString * _path = 0L ) const;
virtual TQString comment( const TQString& _url, bool _is_local ) const; virtual TQString comment( const TQString& _url, bool _is_local ) const;
virtual TQString comment( const KURL& _url, bool _is_local ) const; virtual TQString comment( const KURL& _url, bool _is_local ) const;
@ -603,7 +603,7 @@ public:
static pid_t run( const KURL& _url, bool _is_local ); static pid_t run( const KURL& _url, bool _is_local );
protected: protected:
virtual TQPixmap pixmap( KIcon::Group group, int force_size = 0, int state = 0, virtual TQPixmap pixmap( TDEIcon::Group group, int force_size = 0, int state = 0,
TQString * path = 0L ) const TQString * path = 0L ) const
{ return KMimeType::pixmap( group, force_size, state, path ); } { return KMimeType::pixmap( group, force_size, state, path ); }

@ -308,9 +308,9 @@ KService::~KService()
delete d; delete d;
} }
TQPixmap KService::pixmap( KIcon::Group _group, int _force_size, int _state, TQString * _path ) const TQPixmap KService::pixmap( TDEIcon::Group _group, int _force_size, int _state, TQString * _path ) const
{ {
KIconLoader *iconLoader=TDEGlobal::iconLoader(); TDEIconLoader *iconLoader=TDEGlobal::iconLoader();
if (!iconLoader->extraDesktopThemesAdded()) if (!iconLoader->extraDesktopThemesAdded())
{ {
TQPixmap pixmap=iconLoader->loadIcon( m_strIcon, _group, _force_size, _state, _path, true ); TQPixmap pixmap=iconLoader->loadIcon( m_strIcon, _group, _force_size, _state, _path, true );

@ -129,7 +129,7 @@ public:
* null if not set * null if not set
* @see icon() * @see icon()
*/ */
TQPixmap pixmap( KIcon::Group _group, int _force_size = 0, int _state = 0, TQPixmap pixmap( TDEIcon::Group _group, int _force_size = 0, int _state = 0,
TQString * _path = 0L ) const; TQString * _path = 0L ) const;
/** /**
* Checks whethe the service should be run in a terminal. * Checks whethe the service should be run in a terminal.

@ -186,7 +186,7 @@ TQString KURIFilterData::iconName()
if (service && service->icon() != TQString::fromLatin1( "unknown" )) { if (service && service->icon() != TQString::fromLatin1( "unknown" )) {
m_strIconName = service->icon(); m_strIconName = service->icon();
} }
else if ( !TDEGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() ) { else if ( !TDEGlobal::iconLoader()->loadIcon( exeName, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0, true ).isNull() ) {
m_strIconName = exeName; m_strIconName = exeName;
} }
else { else {
@ -200,7 +200,7 @@ TQString KURIFilterData::iconName()
if (service && service->icon() != TQString::fromLatin1( "unknown" )) { if (service && service->icon() != TQString::fromLatin1( "unknown" )) {
m_strIconName = service->icon(); m_strIconName = service->icon();
} }
else if ( !TDEGlobal::iconLoader()->loadIcon( exeName, KIcon::NoGroup, 16, KIcon::DefaultState, 0, true ).isNull() ) { else if ( !TDEGlobal::iconLoader()->loadIcon( exeName, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0, true ).isNull() ) {
m_strIconName = exeName; m_strIconName = exeName;
} }
else { else {

@ -26,7 +26,7 @@ TQPixmap KURLPixmapProvider::pixmapFor( const TQString& url, int size ) {
u.setPath( url ); u.setPath( url );
else else
u = url; u = url;
return KMimeType::pixmapForURL( u, 0, KIcon::Desktop, size ); return KMimeType::pixmapForURL( u, 0, TDEIcon::Desktop, size );
} }
void KURLPixmapProvider::virtual_hook( int id, void* data ) void KURLPixmapProvider::virtual_hook( int id, void* data )

@ -48,7 +48,7 @@ public:
* @param url the URL to fetch a pixmap for * @param url the URL to fetch a pixmap for
* @param size the size of the pixmap in pixels, or 0 for default. * @param size the size of the pixmap in pixels, or 0 for default.
* @return the resulting pixmap * @return the resulting pixmap
* @see KIcon::StdSizes * @see TDEIcon::StdSizes
*/ */
virtual TQPixmap pixmapFor( const TQString& url, int size = 0 ); virtual TQPixmap pixmapFor( const TQString& url, int size = 0 );
protected: protected:

@ -82,7 +82,7 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user,
// Row 0: pixmap prompt // Row 0: pixmap prompt
TQLabel* lbl; TQLabel* lbl;
TQPixmap pix( TDEGlobal::iconLoader()->loadIcon( "password", KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true)); TQPixmap pix( TDEGlobal::iconLoader()->loadIcon( "password", TDEIcon::NoGroup, TDEIcon::SizeHuge, 0, 0, true));
if ( !pix.isNull() ) if ( !pix.isNull() )
{ {
lbl = new TQLabel( main ); lbl = new TQLabel( main );

@ -570,14 +570,14 @@ int KFileItem::overlays() const
{ {
int _state = 0; int _state = 0;
if ( m_bLink ) if ( m_bLink )
_state |= KIcon::LinkOverlay; _state |= TDEIcon::LinkOverlay;
if ( !S_ISDIR( m_fileMode ) // Locked dirs have a special icon, use the overlay for files only if ( !S_ISDIR( m_fileMode ) // Locked dirs have a special icon, use the overlay for files only
&& !isReadable()) && !isReadable())
_state |= KIcon::LockOverlay; _state |= TDEIcon::LockOverlay;
if ( isHidden() ) if ( isHidden() )
_state |= KIcon::HiddenOverlay; _state |= TDEIcon::HiddenOverlay;
if( S_ISDIR( m_fileMode ) && m_bIsLocalURL) if( S_ISDIR( m_fileMode ) && m_bIsLocalURL)
{ {
@ -585,12 +585,12 @@ int KFileItem::overlays() const
KNFSShare::instance()->isDirectoryShared( m_url.path() )) KNFSShare::instance()->isDirectoryShared( m_url.path() ))
{ {
//kdDebug()<<"KFileShare::isDirectoryShared : "<<m_url.path()<<endl; //kdDebug()<<"KFileShare::isDirectoryShared : "<<m_url.path()<<endl;
_state |= KIcon::ShareOverlay; _state |= TDEIcon::ShareOverlay;
} }
} }
if ( m_pMimeType->name() == "application/x-gzip" && m_url.fileName().right(3) == ".gz" ) if ( m_pMimeType->name() == "application/x-gzip" && m_url.fileName().right(3) == ".gz" )
_state |= KIcon::ZipOverlay; _state |= TDEIcon::ZipOverlay;
return _state; return _state;
} }
@ -632,7 +632,7 @@ TQPixmap KFileItem::pixmap( int _size, int _state ) const
bool isLocalURL; bool isLocalURL;
KURL url = mostLocalURL(isLocalURL); KURL url = mostLocalURL(isLocalURL);
TQPixmap p = mime->pixmap( url, KIcon::Desktop, _size, _state ); TQPixmap p = mime->pixmap( url, TDEIcon::Desktop, _size, _state );
//kdDebug() << "finding pixmap for " << url.url() << " : " << mime->name() << endl; //kdDebug() << "finding pixmap for " << url.url() << " : " << mime->name() << endl;
if (p.isNull()) if (p.isNull())
kdWarning() << "Pixmap not found for mimetype " << m_pMimeType->name() << endl; kdWarning() << "Pixmap not found for mimetype " << m_pMimeType->name() << endl;

@ -346,14 +346,14 @@ public:
* Returns a pixmap representing the file. * Returns a pixmap representing the file.
* @param _size Size for the pixmap in pixels. Zero will return the * @param _size Size for the pixmap in pixels. Zero will return the
* globally configured default size. * globally configured default size.
* @param _state The state of the icon: KIcon::DefaultState, * @param _state The state of the icon: TDEIcon::DefaultState,
* KIcon::ActiveState or KIcon::DisabledState. * TDEIcon::ActiveState or TDEIcon::DisabledState.
* @return the pixmap * @return the pixmap
*/ */
TQPixmap pixmap( int _size, int _state=0 ) const; TQPixmap pixmap( int _size, int _state=0 ) const;
/** /**
* Returns the overlays (bitfield of KIcon::*Overlay flags) that are used * Returns the overlays (bitfield of TDEIcon::*Overlay flags) that are used
* for this item's pixmap. Overlays are used to show for example, whether * for this item's pixmap. Overlays are used to show for example, whether
* a file can be modified. * a file can be modified.
* @return the overlays of the pixmap * @return the overlays of the pixmap

@ -202,7 +202,7 @@ int main(int argc, char *argv[])
// //
debug("\nTrying findByURL for folder_home.png"); debug("\nTrying findByURL for folder_home.png");
TQString fh; TQString fh;
(void)k.iconLoader()->loadIcon("folder_home.png",KIcon::Desktop,0,KIcon::DefaultState,&fh); (void)k.iconLoader()->loadIcon("folder_home.png",TDEIcon::Desktop,0,TDEIcon::DefaultState,&fh);
mf = KMimeType::findByURL( fh, 0, true, false ); mf = KMimeType::findByURL( fh, 0, true, false );
assert( mf ); assert( mf );
check( "A PNG's mimetype", mf->name(), "image/png" ); check( "A PNG's mimetype", mf->name(), "image/png" );

@ -389,7 +389,7 @@ Since 2.2 release, Michael Goffioul <tdeprint@swing.be>
page ranges (problem with option encoding in CUPS). page ranges (problem with option encoding in CUPS).
15/02/2002 Michael Goffioul <tdeprint@swing.be> 15/02/2002 Michael Goffioul <tdeprint@swing.be>
* general: fixed infinite recursion bug in KIconSelectAction * general: fixed infinite recursion bug in TDEIconSelectAction
* CUPS: temporarily disabled edition of page-ranges as it seems CUPS is * CUPS: temporarily disabled edition of page-ranges as it seems CUPS is
buggy. I should find a workaround. buggy. I should find a workaround.
* general (CUPS): enable some actions for jobs on remote hosts. It seems * general (CUPS): enable some actions for jobs on remote hosts. It seems

@ -138,8 +138,8 @@ void CupsdDialog::addConfPage(CupsdPage *page)
{ {
TQPixmap icon = TDEGlobal::instance()->iconLoader()->loadIcon( TQPixmap icon = TDEGlobal::instance()->iconLoader()->loadIcon(
page->pixmap(), page->pixmap(),
KIcon::NoGroup, TDEIcon::NoGroup,
KIcon::SizeMedium TDEIcon::SizeMedium
); );
TQVBox *box = addVBoxPage(page->pageLabel(), page->header(), icon); TQVBox *box = addVBoxPage(page->pageLabel(), page->header(), icon);

@ -570,7 +570,7 @@ void KPrintDialog::initialize(KPrinter *printer)
sep = true; sep = true;
d->m_printers->insertItem(TQPixmap(), TQString::fromLatin1("--------")); d->m_printers->insertItem(TQPixmap(), TQString::fromLatin1("--------"));
} }
d->m_printers->insertItem(SmallIcon(it.current()->pixmap(),0,(it.current()->isValid() ? (int)KIcon::DefaultState : (int)KIcon::LockOverlay)),it.current()->name(),false/*sep*/); d->m_printers->insertItem(SmallIcon(it.current()->pixmap(),0,(it.current()->isValid() ? (int)TDEIcon::DefaultState : (int)TDEIcon::LockOverlay)),it.current()->name(),false/*sep*/);
if (it.current()->isSoftDefault()) if (it.current()->isSoftDefault())
defsoft = d->m_printers->count()-1; defsoft = d->m_printers->count()-1;
if (it.current()->isHardDefault()) if (it.current()->isHardDefault())

@ -25,10 +25,10 @@
#include <tdetoolbar.h> #include <tdetoolbar.h>
#include <tdetoolbarbutton.h> #include <tdetoolbarbutton.h>
class KIconSelectActionPrivate class TDEIconSelectActionPrivate
{ {
public: public:
KIconSelectActionPrivate() TDEIconSelectActionPrivate()
{ {
m_menu = 0; m_menu = 0;
} }
@ -36,18 +36,18 @@ public:
TQPopupMenu* m_menu; TQPopupMenu* m_menu;
}; };
KIconSelectAction::KIconSelectAction(const TQString& text, int accel, TQObject* parent, const char* name) TDEIconSelectAction::TDEIconSelectAction(const TQString& text, int accel, TQObject* parent, const char* name)
: TDESelectAction(text, accel, parent, name) : TDESelectAction(text, accel, parent, name)
{ {
d = new KIconSelectActionPrivate; d = new TDEIconSelectActionPrivate;
} }
KIconSelectAction::~KIconSelectAction() TDEIconSelectAction::~TDEIconSelectAction()
{ {
delete d; delete d;
} }
void KIconSelectAction::updateIcons() void TDEIconSelectAction::updateIcons()
{ {
if (d->m_menu) if (d->m_menu)
{ {
@ -57,7 +57,7 @@ void KIconSelectAction::updateIcons()
} }
} }
void KIconSelectAction::createPopupMenu() void TDEIconSelectAction::createPopupMenu()
{ {
if (!d->m_menu) if (!d->m_menu)
{ {
@ -66,14 +66,14 @@ void KIconSelectAction::createPopupMenu()
} }
} }
void KIconSelectAction::setItems(const TQStringList& lst, const TQStringList& iconlst) void TDEIconSelectAction::setItems(const TQStringList& lst, const TQStringList& iconlst)
{ {
TDESelectAction::setItems(lst); TDESelectAction::setItems(lst);
d->m_iconlst = iconlst; d->m_iconlst = iconlst;
updateIcons(); updateIcons();
} }
int KIconSelectAction::plug(TQWidget* widget, int index) int TDEIconSelectAction::plug(TQWidget* widget, int index)
{ {
int value(-1); int value(-1);
if (widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) if (widget->inherits(TQPOPUPMENU_OBJECT_NAME_STRING))
@ -101,7 +101,7 @@ int KIconSelectAction::plug(TQWidget* widget, int index)
return value; return value;
} }
void KIconSelectAction::updateCurrentItem(int id) void TDEIconSelectAction::updateCurrentItem(int id)
{ {
TQWidget* w = container(id); TQWidget* w = container(id);
if (w->inherits("TDEToolBar")) if (w->inherits("TDEToolBar"))
@ -110,7 +110,7 @@ void KIconSelectAction::updateCurrentItem(int id)
TDESelectAction::updateCurrentItem(id); TDESelectAction::updateCurrentItem(id);
} }
void KIconSelectAction::setCurrentItem(int index) void TDEIconSelectAction::setCurrentItem(int index)
{ {
TDESelectAction::setCurrentItem(index); TDESelectAction::setCurrentItem(index);
} }

@ -22,14 +22,14 @@
#include <tdeaction.h> #include <tdeaction.h>
class KIconSelectActionPrivate; class TDEIconSelectActionPrivate;
class KIconSelectAction : public TDESelectAction class TDEIconSelectAction : public TDESelectAction
{ {
Q_OBJECT Q_OBJECT
public: public:
KIconSelectAction(const TQString& text, int accel = 0, TQObject* parent = 0, const char* name = 0); TDEIconSelectAction(const TQString& text, int accel = 0, TQObject* parent = 0, const char* name = 0);
virtual ~KIconSelectAction(); virtual ~TDEIconSelectAction();
virtual int plug(TQWidget* widget, int index = -1); virtual int plug(TQWidget* widget, int index = -1);
@ -43,7 +43,7 @@ protected:
virtual void updateCurrentItem(int id); virtual void updateCurrentItem(int id);
private: private:
KIconSelectActionPrivate* d; TDEIconSelectActionPrivate* d;
}; };
#endif #endif

@ -62,8 +62,8 @@ void KMConfigDialog::addConfigPage(KMConfigPage *page)
{ {
TQPixmap icon = TDEGlobal::instance()->iconLoader()->loadIcon( TQPixmap icon = TDEGlobal::instance()->iconLoader()->loadIcon(
page->pagePixmap(), page->pagePixmap(),
KIcon::NoGroup, TDEIcon::NoGroup,
KIcon::SizeMedium TDEIcon::SizeMedium
); );
TQFrame *frame = addPage(page->pageName(),page->pageHeader(),icon); TQFrame *frame = addPage(page->pageName(),page->pageHeader(),icon);

@ -104,7 +104,7 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode)
} }
if (mode != m_mode || ((oldstate&0x4) != (m_state&0x4)) || (p && p->pixmap() != m_pixmap)) if (mode != m_mode || ((oldstate&0x4) != (m_state&0x4)) || (p && p->pixmap() != m_pixmap))
{ {
int iconstate = (m_state&0x4 ? (int)KIcon::DefaultState : (int)KIcon::LockOverlay); int iconstate = (m_state&0x4 ? (int)TDEIcon::DefaultState : (int)TDEIcon::LockOverlay);
if (p) if (p)
m_pixmap = p->pixmap(); m_pixmap = p->pixmap();
m_mode = mode; m_mode = mode;
@ -119,9 +119,9 @@ void KMIconViewItem::updatePrinter(KMPrinter *p, int mode)
} }
KMIconView::KMIconView(TQWidget *parent, const char *name) KMIconView::KMIconView(TQWidget *parent, const char *name)
: KIconView(parent,name) : TDEIconView(parent,name)
{ {
setMode(KIconView::Select); setMode(TDEIconView::Select);
setSelectionMode(TQIconView::Single); setSelectionMode(TQIconView::Single);
setItemsMovable(false); setItemsMovable(false);
setResizeMode(TQIconView::Adjust); setResizeMode(TQIconView::Adjust);

@ -45,7 +45,7 @@ private:
bool m_isclass; bool m_isclass;
}; };
class KMIconView : public KIconView class KMIconView : public TDEIconView
{ {
Q_OBJECT Q_OBJECT
public: public:

@ -78,7 +78,7 @@ void KMListViewItem::updatePrinter(KMPrinter *p)
if (p) if (p)
{ {
int oldstate = m_state; int oldstate = m_state;
int st(p->isValid() ? (int)KIcon::DefaultState : (int)KIcon::LockOverlay); int st(p->isValid() ? (int)TDEIcon::DefaultState : (int)TDEIcon::LockOverlay);
m_state = ((p->isHardDefault() ? 0x1 : 0x0) | (p->ownSoftDefault() ? 0x2 : 0x0) | (p->isValid() ? 0x4 : 0x0)); m_state = ((p->isHardDefault() ? 0x1 : 0x0) | (p->ownSoftDefault() ? 0x2 : 0x0) | (p->isValid() ? 0x4 : 0x0));
update = (oldstate != m_state); update = (oldstate != m_state);
QString name = (p->isVirtual() ? p->instanceName() : p->name()); QString name = (p->isVirtual() ? p->instanceName() : p->name());

@ -174,7 +174,7 @@ void KMMainView::saveSettings()
void KMMainView::initActions() void KMMainView::initActions()
{ {
KIconSelectAction *vact = new KIconSelectAction(i18n("&View"),0,m_actions,"view_change"); TDEIconSelectAction *vact = new TDEIconSelectAction(i18n("&View"),0,m_actions,"view_change");
TQStringList iconlst; TQStringList iconlst;
iconlst << "view_icon" << "view_detailed" << "view_tree"; iconlst << "view_icon" << "view_detailed" << "view_tree";
vact->setItems(TQStringList::split(',',i18n("&Icons,&List,&Tree"),false), iconlst); vact->setItems(TQStringList::split(',',i18n("&Icons,&List,&Tree"),false), iconlst);
@ -201,7 +201,7 @@ void KMMainView::initActions()
new TDEAction(i18n("Configure &Manager..."),"tdeprint_configmgr",0,TQT_TQOBJECT(this),TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure"); new TDEAction(i18n("Configure &Manager..."),"tdeprint_configmgr",0,TQT_TQOBJECT(this),TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure");
new TDEAction(i18n("Initialize Manager/&View"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotInit()),m_actions,"view_refresh"); new TDEAction(i18n("Initialize Manager/&View"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotInit()),m_actions,"view_refresh");
KIconSelectAction *dact = new KIconSelectAction(i18n("&Orientation"),0,m_actions,"orientation_change"); TDEIconSelectAction *dact = new TDEIconSelectAction(i18n("&Orientation"),0,m_actions,"orientation_change");
iconlst.clear(); iconlst.clear();
iconlst << "view_top_bottom" << "view_left_right"; iconlst << "view_top_bottom" << "view_left_right";
dact->setItems(TQStringList::split(',',i18n("&Vertical,&Horizontal"),false), iconlst); dact->setItems(TQStringList::split(',',i18n("&Vertical,&Horizontal"),false), iconlst);

@ -59,8 +59,8 @@ void KMPropertyPage::addPropPage(KMPropWidget *w)
TQPixmap icon = TDEGlobal::instance()->iconLoader()->loadIcon( TQPixmap icon = TDEGlobal::instance()->iconLoader()->loadIcon(
w->pixmap(), w->pixmap(),
KIcon::NoGroup, TDEIcon::NoGroup,
KIcon::SizeMedium TDEIcon::SizeMedium
); );
addPage(ctn,w->title(),w->header(),icon); addPage(ctn,w->title(),w->header(),icon);
} }

@ -88,7 +88,7 @@ KMSpecialPrinterDlg::KMSpecialPrinterDlg(TQWidget *parent, const char *name)
TQLabel *m_extensionlabel = new TQLabel(i18n("Filename e&xtension:"), m_outfile_gb); TQLabel *m_extensionlabel = new TQLabel(i18n("Filename e&xtension:"), m_outfile_gb);
m_extensionlabel->setBuddy(m_extension); m_extensionlabel->setBuddy(m_extension);
m_icon = new KIconButton(dummy); m_icon = new TDEIconButton(dummy);
m_icon->setIcon("fileprint"); m_icon->setIcon("fileprint");
m_icon->setFixedSize(TQSize(48,48)); m_icon->setFixedSize(TQSize(48,48));

@ -26,7 +26,7 @@ class KMPrinter;
class TQLineEdit; class TQLineEdit;
class TQCheckBox; class TQCheckBox;
class TQComboBox; class TQComboBox;
class KIconButton; class TDEIconButton;
class KXmlCommandSelector; class KXmlCommandSelector;
class KMSpecialPrinterDlg : public KDialogBase class KMSpecialPrinterDlg : public KDialogBase
@ -50,7 +50,7 @@ private:
TQComboBox *m_mimetype; TQComboBox *m_mimetype;
TQCheckBox *m_usefile; TQCheckBox *m_usefile;
TQStringList m_mimelist; TQStringList m_mimelist;
KIconButton *m_icon; TDEIconButton *m_icon;
KXmlCommandSelector *m_command; KXmlCommandSelector *m_command;
}; };

@ -193,7 +193,7 @@ void KFileList::addFiles(const KURL::List& files)
{ {
KMimeType::Ptr mime = KMimeType::findByURL( *it, 0, true, false); KMimeType::Ptr mime = KMimeType::findByURL( *it, 0, true, false);
item = new TQListViewItem(m_files, item, (*it).fileName(), mime->comment(), (*it).url()); item = new TQListViewItem(m_files, item, (*it).fileName(), mime->comment(), (*it).url());
item->setPixmap(0, mime->pixmap(*it, KIcon::Small)); item->setPixmap(0, mime->pixmap(*it, TDEIcon::Small));
} }
slotSelectionChanged(); slotSelectionChanged();
@ -218,7 +218,7 @@ void KFileList::setFileList(const TQStringList& files)
KURL url = KURL::fromPathOrURL( *it ); KURL url = KURL::fromPathOrURL( *it );
KMimeType::Ptr mime = KMimeType::findByURL(url, 0, true, false); KMimeType::Ptr mime = KMimeType::findByURL(url, 0, true, false);
item = new TQListViewItem(m_files, item, url.fileName(), mime->comment(), url.url()); item = new TQListViewItem(m_files, item, url.fileName(), mime->comment(), url.url());
item->setPixmap(0, mime->pixmap(url, KIcon::Small)); item->setPixmap(0, mime->pixmap(url, TDEIcon::Small));
} }
slotSelectionChanged(); slotSelectionChanged();
} }

@ -46,7 +46,7 @@ Nicolas Hadacek <hadacek@kde.org>
Key configuration classes, bug fixes Key configuration classes, bug fixes
Christoph Neerfeld <Christoph.Neerfeld@mail.bonn.netsurf.de> Christoph Neerfeld <Christoph.Neerfeld@mail.bonn.netsurf.de>
KIconLoader class TDEIconLoader class
Sven Radej <sven.radej@iname.com> Sven Radej <sven.radej@iname.com>
KLineEdit, KCombo, TDEToolbar, KStatusBar KLineEdit, KCombo, TDEToolbar, KStatusBar

@ -185,7 +185,7 @@ void KAnimWidget::updateIcons()
if (parent()->inherits( "TDEToolBar" )) if (parent()->inherits( "TDEToolBar" ))
d->size = ((TDEToolBar*)parent())->iconSize(); d->size = ((TDEToolBar*)parent())->iconSize();
if (!d->size) if (!d->size)
d->size = TDEGlobal::iconLoader()->currentSize(KIcon::MainToolbar); d->size = TDEGlobal::iconLoader()->currentSize(TDEIcon::MainToolbar);
TQString path = TDEGlobal::iconLoader()->iconPath(d->icon_name, -d->size); TQString path = TDEGlobal::iconLoader()->iconPath(d->icon_name, -d->size);
TQImage img(path); TQImage img(path);

@ -102,7 +102,7 @@ public:
/** /**
* Sets the name of the animated icons to load. This will use the * Sets the name of the animated icons to load. This will use the
* KIconLoader::loadAnimated method for the actual loading. * TDEIconLoader::loadAnimated method for the actual loading.
* *
* @param icons The name of the icons to use for the animation * @param icons The name of the icons to use for the animation
*/ */

@ -489,7 +489,7 @@ void KHistoryCombo::addToHistory( const TQString& item )
// now add the item // now add the item
if ( myPixProvider ) if ( myPixProvider )
insertItem( myPixProvider->pixmapFor(item, KIcon::SizeSmall), item, 0); insertItem( myPixProvider->pixmapFor(item, TDEIcon::SizeSmall), item, 0);
else else
insertItem( item, 0 ); insertItem( item, 0 );
@ -679,7 +679,7 @@ void KHistoryCombo::insertItems( const TQStringList& items )
const TQString item = *it; const TQString item = *it;
if ( !item.isEmpty() ) { // only insert non-empty items if ( !item.isEmpty() ) { // only insert non-empty items
if ( myPixProvider ) if ( myPixProvider )
insertItem( myPixProvider->pixmapFor(item, KIcon::SizeSmall), insertItem( myPixProvider->pixmapFor(item, TDEIcon::SizeSmall),
item ); item );
else else
insertItem( item ); insertItem( item );

@ -342,8 +342,8 @@ KSMModalDialogHeader::KSMModalDialogHeader(TQWidget* parent)
seperatorbox->setMargin(0); seperatorbox->setMargin(0);
TQWidget* ticon = new TQWidget( frame ); TQWidget* ticon = new TQWidget( frame );
KIconLoader * ldr = TDEGlobal::iconLoader(); TDEIconLoader * ldr = TDEGlobal::iconLoader();
TQPixmap trinityPixmap = ldr->loadIcon("kmenu", KIcon::Panel, KIcon::SizeLarge, KIcon::DefaultState, 0L, true); TQPixmap trinityPixmap = ldr->loadIcon("kmenu", TDEIcon::Panel, TDEIcon::SizeLarge, TDEIcon::DefaultState, 0L, true);
// Manually draw the alpha portions of the icon onto the widget background color... // Manually draw the alpha portions of the icon onto the widget background color...
TQRgb backgroundRgb = ticon->paletteBackgroundColor().rgb(); TQRgb backgroundRgb = ticon->paletteBackgroundColor().rgb();

@ -767,10 +767,10 @@ void KEditToolbarWidget::setupLayout()
this, TQT_SLOT(slotToolbarSelected(const TQString&))); this, TQT_SLOT(slotToolbarSelected(const TQString&)));
// TQPushButton *new_toolbar = new TQPushButton(i18n("&New"), this); // TQPushButton *new_toolbar = new TQPushButton(i18n("&New"), this);
// new_toolbar->setPixmap(BarIcon("filenew", KIcon::SizeSmall)); // new_toolbar->setPixmap(BarIcon("filenew", TDEIcon::SizeSmall));
// new_toolbar->setEnabled(false); // disabled until implemented // new_toolbar->setEnabled(false); // disabled until implemented
// TQPushButton *del_toolbar = new TQPushButton(i18n("&Delete"), this); // TQPushButton *del_toolbar = new TQPushButton(i18n("&Delete"), this);
// del_toolbar->setPixmap(BarIcon("editdelete", KIcon::SizeSmall)); // del_toolbar->setPixmap(BarIcon("editdelete", TDEIcon::SizeSmall));
// del_toolbar->setEnabled(false); // disabled until implemented // del_toolbar->setEnabled(false); // disabled until implemented
// our list of inactive actions // our list of inactive actions
@ -966,7 +966,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem)
TQMap<TQString, bool> active_list; TQMap<TQString, bool> active_list;
// see if our current action is in this toolbar // see if our current action is in this toolbar
KIconLoader *loader = TDEGlobal::instance()->iconLoader(); TDEIconLoader *loader = TDEGlobal::instance()->iconLoader();
TQDomNode n = elem.lastChild(); TQDomNode n = elem.lastChild();
for( ; !n.isNull(); n = n.previousSibling() ) for( ; !n.isNull(); n = n.previousSibling() )
{ {
@ -1018,9 +1018,9 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem)
act->setText(1, action->plainText()); act->setText(1, action->plainText());
if (action->hasIcon()) if (action->hasIcon())
if (!action->icon().isEmpty()) if (!action->icon().isEmpty())
act->setPixmap(0, loader->loadIcon(action->icon(), KIcon::Toolbar, 16, KIcon::DefaultState, 0, true) ); act->setPixmap(0, loader->loadIcon(action->icon(), TDEIcon::Toolbar, 16, TDEIcon::DefaultState, 0, true) );
else // Has iconset else // Has iconset
act->setPixmap(0, action->iconSet(KIcon::Toolbar).pixmap()); act->setPixmap(0, action->iconSet(TDEIcon::Toolbar).pixmap());
active_list.insert(action->name(), true); active_list.insert(action->name(), true);
break; break;
@ -1041,9 +1041,9 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem)
act->setText(1, action->plainText()); act->setText(1, action->plainText());
if (action->hasIcon()) if (action->hasIcon())
if (!action->icon().isEmpty()) if (!action->icon().isEmpty())
act->setPixmap(0, loader->loadIcon(action->icon(), KIcon::Toolbar, 16, KIcon::DefaultState, 0, true) ); act->setPixmap(0, loader->loadIcon(action->icon(), TDEIcon::Toolbar, 16, TDEIcon::DefaultState, 0, true) );
else // Has iconset else // Has iconset
act->setPixmap(0, action->iconSet(KIcon::Toolbar).pixmap()); act->setPixmap(0, action->iconSet(TDEIcon::Toolbar).pixmap());
} }
// finally, add default separators to the inactive list // finally, add default separators to the inactive list
@ -1373,7 +1373,7 @@ void KEditToolbarWidget::updateLocal(TQDomElement& elem)
void KEditToolbarWidget::slotChangeIcon() void KEditToolbarWidget::slotChangeIcon()
{ {
// We can't use KIconChooser here, since it's in libtdeio // We can't use TDEIconChooser here, since it's in libtdeio
// ##### KDE4: reconsider this, e.g. move KEditToolbar to libtdeio // ##### KDE4: reconsider this, e.g. move KEditToolbar to libtdeio
//if the process is already running (e.g. when somebody clicked the change button twice (see #127149)) - do nothing... //if the process is already running (e.g. when somebody clicked the change button twice (see #127149)) - do nothing...

@ -149,7 +149,7 @@ TQString KGuiItem::plainText() const
return stripped; return stripped;
} }
TQIconSet KGuiItem::iconSet( KIcon::Group group, int size, TDEInstance* instance ) const TQIconSet KGuiItem::iconSet( TDEIcon::Group group, int size, TDEInstance* instance ) const
{ {
if( d->m_hasIcon ) if( d->m_hasIcon )
{ {

@ -61,10 +61,10 @@ public:
TQString text() const; TQString text() const;
TQString plainText() const; TQString plainText() const;
#ifndef KDE_NO_COMPAT #ifndef KDE_NO_COMPAT
TQIconSet iconSet( KIcon::Group, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const; TQIconSet iconSet( TDEIcon::Group, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const;
TQIconSet iconSet() const { return iconSet( KIcon::Small ); } TQIconSet iconSet() const { return iconSet( TDEIcon::Small ); }
#else #else
TQIconSet iconSet( KIcon::Group=KIcon::Small, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const; TQIconSet iconSet( TDEIcon::Group=TDEIcon::Small, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const;
#endif #endif
TQString iconName() const; TQString iconName() const;

@ -127,7 +127,7 @@ TDEPopupMenu* KHelpMenu::menu()
bool need_separator = false; bool need_separator = false;
if (kapp->authorizeTDEAction("help_contents")) if (kapp->authorizeTDEAction("help_contents"))
{ {
mMenu->insertItem( BarIcon( "contents", KIcon::SizeSmall), mMenu->insertItem( BarIcon( "contents", TDEIcon::SizeSmall),
TQString(i18n( "%1 &Handbook" ).arg( appName)) ,menuHelpContents ); TQString(i18n( "%1 &Handbook" ).arg( appName)) ,menuHelpContents );
mMenu->connectItem( menuHelpContents, this, TQT_SLOT(appHelpActivated()) ); mMenu->connectItem( menuHelpContents, this, TQT_SLOT(appHelpActivated()) );
mMenu->setAccel( TDEStdAccel::shortcut(TDEStdAccel::Help), menuHelpContents ); mMenu->setAccel( TDEStdAccel::shortcut(TDEStdAccel::Help), menuHelpContents );

@ -36,17 +36,17 @@
#include <kpixmap.h> #include <kpixmap.h>
#include <kpixmapeffect.h> #include <kpixmapeffect.h>
class KIconView::KIconViewPrivate class TDEIconView::TDEIconViewPrivate
{ {
public: public:
KIconViewPrivate() { TDEIconViewPrivate() {
mode = KIconView::Execute; mode = TDEIconView::Execute;
fm = 0L; fm = 0L;
doAutoSelect = true; doAutoSelect = true;
textHeight = 0; textHeight = 0;
dragHoldItem = 0L; dragHoldItem = 0L;
} }
KIconView::Mode mode; TDEIconView::Mode mode;
bool doAutoSelect; bool doAutoSelect;
TQFontMetrics *fm; TQFontMetrics *fm;
TQPixmapCache maskCache; TQPixmapCache maskCache;
@ -56,10 +56,10 @@ public:
TQTimer doubleClickIgnoreTimer; TQTimer doubleClickIgnoreTimer;
}; };
KIconView::KIconView( TQWidget *parent, const char *name, WFlags f ) TDEIconView::TDEIconView( TQWidget *parent, const char *name, WFlags f )
: TQIconView( parent, name, f ) : TQIconView( parent, name, f )
{ {
d = new KIconViewPrivate; d = new TDEIconViewPrivate;
connect( this, TQT_SIGNAL( onViewport() ), connect( this, TQT_SIGNAL( onViewport() ),
this, TQT_SLOT( slotOnViewport() ) ); this, TQT_SLOT( slotOnViewport() ) );
@ -80,24 +80,24 @@ KIconView::KIconView( TQWidget *parent, const char *name, WFlags f )
connect( &d->dragHoldTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragHoldTimeout()) ); connect( &d->dragHoldTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragHoldTimeout()) );
} }
KIconView::~KIconView() TDEIconView::~TDEIconView()
{ {
delete d->fm; delete d->fm;
delete d; delete d;
} }
void KIconView::setMode( KIconView::Mode mode ) void TDEIconView::setMode( TDEIconView::Mode mode )
{ {
d->mode = mode; d->mode = mode;
} }
KIconView::Mode KIconView::mode() const TDEIconView::Mode TDEIconView::mode() const
{ {
return d->mode; return d->mode;
} }
void KIconView::slotOnItem( TQIconViewItem *item ) void TDEIconView::slotOnItem( TQIconViewItem *item )
{ {
if ( item ) { if ( item ) {
if ( m_bUseSingle ) { if ( m_bUseSingle ) {
@ -112,7 +112,7 @@ void KIconView::slotOnItem( TQIconViewItem *item )
} }
} }
void KIconView::slotOnViewport() void TDEIconView::slotOnViewport()
{ {
if ( m_bUseSingle && m_bChangeCursorOverItem ) if ( m_bUseSingle && m_bChangeCursorOverItem )
viewport()->unsetCursor(); viewport()->unsetCursor();
@ -121,12 +121,12 @@ void KIconView::slotOnViewport()
m_pCurrentItem = 0L; m_pCurrentItem = 0L;
} }
void KIconView::slotSettingsChanged(int category) void TDEIconView::slotSettingsChanged(int category)
{ {
if ( category != TDEApplication::SETTINGS_MOUSE ) if ( category != TDEApplication::SETTINGS_MOUSE )
return; return;
m_bUseSingle = TDEGlobalSettings::singleClick(); m_bUseSingle = TDEGlobalSettings::singleClick();
//kdDebug() << "KIconView::slotSettingsChanged for mouse, usesingle=" << m_bUseSingle << endl; //kdDebug() << "TDEIconView::slotSettingsChanged for mouse, usesingle=" << m_bUseSingle << endl;
disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQIconViewItem *, disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQIconViewItem *,
const TQPoint & ) ), const TQPoint & ) ),
@ -157,7 +157,7 @@ void KIconView::slotSettingsChanged(int category)
viewport()->unsetCursor(); viewport()->unsetCursor();
} }
void KIconView::slotAutoSelect() void TDEIconView::slotAutoSelect()
{ {
// check that the item still exists // check that the item still exists
if( index( m_pCurrentItem ) == -1 || !d->doAutoSelect ) if( index( m_pCurrentItem ) == -1 || !d->doAutoSelect )
@ -232,14 +232,14 @@ void KIconView::slotAutoSelect()
setSelected( m_pCurrentItem, true ); setSelected( m_pCurrentItem, true );
} }
else else
kdDebug() << "KIconView: That's not supposed to happen!!!!" << endl; kdDebug() << "TDEIconView: That's not supposed to happen!!!!" << endl;
} }
void KIconView::emitExecute( TQIconViewItem *item, const TQPoint &pos ) void TDEIconView::emitExecute( TQIconViewItem *item, const TQPoint &pos )
{ {
if ( d->mode != Execute ) if ( d->mode != Execute )
{ {
// kdDebug() << "KIconView::emitExecute : not in execute mode !" << endl; // kdDebug() << "TDEIconView::emitExecute : not in execute mode !" << endl;
return; return;
} }
@ -256,7 +256,7 @@ void KIconView::emitExecute( TQIconViewItem *item, const TQPoint &pos )
} }
} }
void KIconView::updateDragHoldItem( TQDropEvent *e ) void TDEIconView::updateDragHoldItem( TQDropEvent *e )
{ {
TQIconViewItem *item = findItem( e->pos() ); TQIconViewItem *item = findItem( e->pos() );
@ -274,21 +274,21 @@ void KIconView::updateDragHoldItem( TQDropEvent *e )
} }
} }
void KIconView::focusOutEvent( TQFocusEvent *fe ) void TDEIconView::focusOutEvent( TQFocusEvent *fe )
{ {
m_pAutoSelect->stop(); m_pAutoSelect->stop();
TQIconView::focusOutEvent( fe ); TQIconView::focusOutEvent( fe );
} }
void KIconView::leaveEvent( TQEvent *e ) void TDEIconView::leaveEvent( TQEvent *e )
{ {
m_pAutoSelect->stop(); m_pAutoSelect->stop();
TQIconView::leaveEvent( e ); TQIconView::leaveEvent( e );
} }
void KIconView::contentsMousePressEvent( TQMouseEvent *e ) void TDEIconView::contentsMousePressEvent( TQMouseEvent *e )
{ {
if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) { if( (selectionMode() == Extended) && (e->state() & ShiftButton) && !(e->state() & ControlButton) ) {
bool block = signalsBlocked(); bool block = signalsBlocked();
@ -303,7 +303,7 @@ void KIconView::contentsMousePressEvent( TQMouseEvent *e )
d->doAutoSelect = false; d->doAutoSelect = false;
} }
void KIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) void TDEIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
{ {
TQIconView::contentsMouseDoubleClickEvent( e ); TQIconView::contentsMouseDoubleClickEvent( e );
@ -318,9 +318,9 @@ void KIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
d->doubleClickIgnoreTimer.start(0, true); d->doubleClickIgnoreTimer.start(0, true);
} }
void KIconView::slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQPoint &pos ) void TDEIconView::slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQPoint &pos )
{ {
//kdDebug() << " KIconView::slotMouseButtonClicked() item=" << item << endl; //kdDebug() << " TDEIconView::slotMouseButtonClicked() item=" << item << endl;
if( d->doubleClickIgnoreTimer.isActive() ) if( d->doubleClickIgnoreTimer.isActive() )
return; // Ignore double click return; // Ignore double click
@ -328,19 +328,19 @@ void KIconView::slotMouseButtonClicked( int btn, TQIconViewItem *item, const TQP
emitExecute( item, pos ); emitExecute( item, pos );
} }
void KIconView::contentsMouseReleaseEvent( TQMouseEvent *e ) void TDEIconView::contentsMouseReleaseEvent( TQMouseEvent *e )
{ {
d->doAutoSelect = true; d->doAutoSelect = true;
TQIconView::contentsMouseReleaseEvent( e ); TQIconView::contentsMouseReleaseEvent( e );
} }
void KIconView::contentsDragEnterEvent( TQDragEnterEvent *e ) void TDEIconView::contentsDragEnterEvent( TQDragEnterEvent *e )
{ {
updateDragHoldItem( e ); updateDragHoldItem( e );
TQIconView::contentsDragEnterEvent( e ); TQIconView::contentsDragEnterEvent( e );
} }
void KIconView::contentsDragLeaveEvent( TQDragLeaveEvent *e ) void TDEIconView::contentsDragLeaveEvent( TQDragLeaveEvent *e )
{ {
d->dragHoldTimer.stop(); d->dragHoldTimer.stop();
d->dragHoldItem = 0L; d->dragHoldItem = 0L;
@ -348,19 +348,19 @@ void KIconView::contentsDragLeaveEvent( TQDragLeaveEvent *e )
} }
void KIconView::contentsDragMoveEvent( TQDragMoveEvent *e ) void TDEIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
{ {
updateDragHoldItem( e ); updateDragHoldItem( e );
TQIconView::contentsDragMoveEvent( e ); TQIconView::contentsDragMoveEvent( e );
} }
void KIconView::contentsDropEvent( TQDropEvent* e ) void TDEIconView::contentsDropEvent( TQDropEvent* e )
{ {
d->dragHoldTimer.stop(); d->dragHoldTimer.stop();
TQIconView::contentsDropEvent( e ); TQIconView::contentsDropEvent( e );
} }
void KIconView::slotDragHoldTimeout() void TDEIconView::slotDragHoldTimeout()
{ {
TQIconViewItem *tmp = d->dragHoldItem; TQIconViewItem *tmp = d->dragHoldItem;
d->dragHoldItem = 0L; d->dragHoldItem = 0L;
@ -368,7 +368,7 @@ void KIconView::slotDragHoldTimeout()
emit held( tmp ); emit held( tmp );
} }
void KIconView::takeItem( TQIconViewItem * item ) void TDEIconView::takeItem( TQIconViewItem * item )
{ {
if ( item == d->dragHoldItem ) if ( item == d->dragHoldItem )
{ {
@ -379,13 +379,13 @@ void KIconView::takeItem( TQIconViewItem * item )
TQIconView::takeItem( item ); TQIconView::takeItem( item );
} }
void KIconView::cancelPendingHeldSignal() void TDEIconView::cancelPendingHeldSignal()
{ {
d->dragHoldTimer.stop(); d->dragHoldTimer.stop();
d->dragHoldItem = 0L; d->dragHoldItem = 0L;
} }
void KIconView::wheelEvent( TQWheelEvent *e ) void TDEIconView::wheelEvent( TQWheelEvent *e )
{ {
if (horizontalScrollBar() && (arrangement() == TQIconView::TopToBottom)) { if (horizontalScrollBar() && (arrangement() == TQIconView::TopToBottom)) {
TQWheelEvent ce(e->pos(), e->delta(), e->state(), Qt::Horizontal); TQWheelEvent ce(e->pos(), e->delta(), e->state(), Qt::Horizontal);
@ -398,14 +398,14 @@ void KIconView::wheelEvent( TQWheelEvent *e )
TQIconView::wheelEvent(e); TQIconView::wheelEvent(e);
} }
void KIconView::setFont( const TQFont &font ) void TDEIconView::setFont( const TQFont &font )
{ {
delete d->fm; delete d->fm;
d->fm = 0L; d->fm = 0L;
TQIconView::setFont( font ); TQIconView::setFont( font );
} }
TQFontMetrics *KIconView::itemFontMetrics() const TQFontMetrics *TDEIconView::itemFontMetrics() const
{ {
if (!d->fm) { if (!d->fm) {
// TQIconView creates one too, but we can't access it // TQIconView creates one too, but we can't access it
@ -414,7 +414,7 @@ TQFontMetrics *KIconView::itemFontMetrics() const
return d->fm; return d->fm;
} }
TQPixmap KIconView::selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const TQPixmap TDEIconView::selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const
{ {
TQPixmap m; TQPixmap m;
if ( d->maskCache.find( TQString::number( pix->serialNumber() ), m ) ) if ( d->maskCache.find( TQString::number( pix->serialNumber() ), m ) )
@ -424,12 +424,12 @@ TQPixmap KIconView::selectedIconPixmap( TQPixmap *pix, const TQColor &col ) cons
return m; return m;
} }
int KIconView::iconTextHeight() const int TDEIconView::iconTextHeight() const
{ {
return d->textHeight > 0 ? d->textHeight : ( wordWrapIconText() ? 99 : 1 ); return d->textHeight > 0 ? d->textHeight : ( wordWrapIconText() ? 99 : 1 );
} }
void KIconView::setIconTextHeight( int n ) void TDEIconView::setIconTextHeight( int n )
{ {
int oldHeight = iconTextHeight(); int oldHeight = iconTextHeight();
if ( n > 1 ) if ( n > 1 )
@ -447,25 +447,25 @@ void KIconView::setIconTextHeight( int n )
///////////// /////////////
struct KIconViewItem::KIconViewItemPrivate struct TDEIconViewItem::TDEIconViewItemPrivate
{ {
TQSize m_pixmapSize; TQSize m_pixmapSize;
}; };
void KIconViewItem::init() void TDEIconViewItem::init()
{ {
m_wordWrap = 0L; m_wordWrap = 0L;
d = 0L; d = 0L;
calcRect(); calcRect();
} }
KIconViewItem::~KIconViewItem() TDEIconViewItem::~TDEIconViewItem()
{ {
delete m_wordWrap; delete m_wordWrap;
delete d; delete d;
} }
void KIconViewItem::calcRect( const TQString& text_ ) void TDEIconViewItem::calcRect( const TQString& text_ )
{ {
bool drawRoundedRect = TDEGlobalSettings::iconUseRoundedRect(); bool drawRoundedRect = TDEGlobalSettings::iconUseRoundedRect();
@ -475,14 +475,14 @@ void KIconViewItem::calcRect( const TQString& text_ )
delete m_wordWrap; delete m_wordWrap;
m_wordWrap = 0L; m_wordWrap = 0L;
#ifndef NDEBUG // be faster for the end-user, such a bug will have been fixed before hand :) #ifndef NDEBUG // be faster for the end-user, such a bug will have been fixed before hand :)
if ( !iconView()->inherits("KIconView") ) if ( !iconView()->inherits("TDEIconView") )
{ {
kdWarning() << "KIconViewItem used in a " << iconView()->className() << " !!" << endl; kdWarning() << "TDEIconViewItem used in a " << iconView()->className() << " !!" << endl;
return; return;
} }
#endif #endif
//kdDebug() << "KIconViewItem::calcRect - " << text() << endl; //kdDebug() << "TDEIconViewItem::calcRect - " << text() << endl;
KIconView *view = static_cast<KIconView *>(iconView()); TDEIconView *view = static_cast<TDEIconView *>(iconView());
TQRect itemIconRect = pixmapRect(); TQRect itemIconRect = pixmapRect();
TQRect itemTextRect = textRect(); TQRect itemTextRect = textRect();
TQRect itemRect = rect(); TQRect itemRect = rect();
@ -532,7 +532,7 @@ void KIconViewItem::calcRect( const TQString& text_ )
t = text_.isEmpty() ? text() : text_; t = text_.isEmpty() ? text() : text_;
// Max text height // Max text height
int nbLines = static_cast<KIconView*>( iconView() )->iconTextHeight(); int nbLines = static_cast<TDEIconView*>( iconView() )->iconTextHeight();
int height = nbLines > 0 ? fm->height() * nbLines : 0xFFFFFFFF; int height = nbLines > 0 ? fm->height() * nbLines : 0xFFFFFFFF;
// Should not be higher than pixmap if text is alongside icons // Should not be higher than pixmap if text is alongside icons
@ -629,16 +629,16 @@ void KIconViewItem::calcRect( const TQString& text_ )
} }
void KIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg ) void TDEIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg )
{ {
TQIconView* view = iconView(); TQIconView* view = iconView();
Q_ASSERT( view ); Q_ASSERT( view );
if ( !view ) if ( !view )
return; return;
#ifndef NDEBUG // be faster for the end-user, such a bug will have been fixed before hand :) #ifndef NDEBUG // be faster for the end-user, such a bug will have been fixed before hand :)
if ( !view->inherits("KIconView") ) if ( !view->inherits("TDEIconView") )
{ {
kdWarning() << "KIconViewItem used in a " << view->className() << " !!" << endl; kdWarning() << "TDEIconViewItem used in a " << view->className() << " !!" << endl;
return; return;
} }
#endif #endif
@ -651,14 +651,14 @@ void KIconViewItem::paintItem( TQPainter *p, const TQColorGroup &cg )
p->restore(); p->restore();
} }
KWordWrap * KIconViewItem::wordWrap() KWordWrap * TDEIconViewItem::wordWrap()
{ {
return m_wordWrap; return m_wordWrap;
} }
void KIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg ) void TDEIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg )
{ {
KIconView *kview = static_cast<KIconView *>(iconView()); TDEIconView *kview = static_cast<TDEIconView *>(iconView());
#ifndef QT_NO_PICTURE #ifndef QT_NO_PICTURE
if ( picture() ) { if ( picture() ) {
@ -702,7 +702,7 @@ void KIconViewItem::paintPixmap( TQPainter *p, const TQColorGroup &cg )
} }
} }
void KIconViewItem::paintText( TQPainter *p, const TQColorGroup &cg ) void TDEIconViewItem::paintText( TQPainter *p, const TQColorGroup &cg )
{ {
bool drawRoundedRect = TDEGlobalSettings::iconUseRoundedRect(); bool drawRoundedRect = TDEGlobalSettings::iconUseRoundedRect();
int textX; int textX;
@ -732,20 +732,20 @@ void KIconViewItem::paintText( TQPainter *p, const TQColorGroup &cg )
m_wordWrap->drawText( p, textX, textY, align | KWordWrap::Truncate ); m_wordWrap->drawText( p, textX, textY, align | KWordWrap::Truncate );
} }
TQSize KIconViewItem::pixmapSize() const TQSize TDEIconViewItem::pixmapSize() const
{ {
return d ? d->m_pixmapSize : TQSize( 0, 0 ); return d ? d->m_pixmapSize : TQSize( 0, 0 );
} }
void KIconViewItem::setPixmapSize( const TQSize& size ) void TDEIconViewItem::setPixmapSize( const TQSize& size )
{ {
if ( !d ) if ( !d )
d = new KIconViewItemPrivate; d = new TDEIconViewItemPrivate;
d->m_pixmapSize = size; d->m_pixmapSize = size;
} }
void KIconView::virtual_hook( int, void* ) void TDEIconView::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ } { /*BASE::virtual_hook( id, data );*/ }
#include "kiconview.moc" #include "kiconview.moc"

@ -39,20 +39,20 @@
* TQIconView::selectionChanged() signal. * TQIconView::selectionChanged() signal.
* *
**/ **/
class TDEUI_EXPORT KIconView : public TQIconView class TDEUI_EXPORT TDEIconView : public TQIconView
{ {
friend class KIconViewItem; friend class TDEIconViewItem;
Q_OBJECT Q_OBJECT
TQ_ENUMS( Mode ) TQ_ENUMS( Mode )
TQ_PROPERTY( Mode mode READ mode WRITE setMode ) TQ_PROPERTY( Mode mode READ mode WRITE setMode )
public: public:
KIconView( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); TDEIconView( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
~KIconView(); ~TDEIconView();
/** /**
* KIconView has two different operating modes. Execute mode is depending * TDEIconView has two different operating modes. Execute mode is depending
* on the configuration of single-click or double-click where the signal * on the configuration of single-click or double-click where the signal
* executed() will be emitted upon click/double-click. * executed() will be emitted upon click/double-click.
* In Select mode, this signal will not be emitted. * In Select mode, this signal will not be emitted.
@ -180,7 +180,7 @@ protected:
/** /**
* This method allows to handle correctly cases where a subclass * This method allows to handle correctly cases where a subclass
* needs the held() signal to not be triggered without calling * needs the held() signal to not be triggered without calling
* a KIconView::contentsDrag*Event() method (which have side effects * a TDEIconView::contentsDrag*Event() method (which have side effects
* because they forward to TQIconView). * because they forward to TQIconView).
*/ */
void cancelPendingHeldSignal(); void cancelPendingHeldSignal();
@ -191,11 +191,11 @@ private slots:
private: private:
/** /**
* @internal. For use by KIconViewItem. * @internal. For use by TDEIconViewItem.
*/ */
TQFontMetrics *itemFontMetrics() const; TQFontMetrics *itemFontMetrics() const;
/** /**
* @internal. For use by KIconViewItem. * @internal. For use by TDEIconViewItem.
*/ */
TQPixmap selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const; TQPixmap selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const;
@ -210,40 +210,40 @@ private:
protected: protected:
virtual void virtual_hook( int id, void* data ); virtual void virtual_hook( int id, void* data );
private: private:
class KIconViewPrivate; class TDEIconViewPrivate;
KIconViewPrivate *d; TDEIconViewPrivate *d;
}; };
class KWordWrap; class KWordWrap;
/** /**
* @short A variant of TQIconViewItem that wraps words better. * @short A variant of TQIconViewItem that wraps words better.
* *
* KIconViewItem exists to improve the word-wrap functionality of QIconViewItem * TDEIconViewItem exists to improve the word-wrap functionality of QIconViewItem
* Use KIconViewItem instead of TQIconViewItem for any iconview item you might have :) * Use TDEIconViewItem instead of TQIconViewItem for any iconview item you might have :)
* *
* @author David Faure <david@mandrakesoft.com> * @author David Faure <david@mandrakesoft.com>
*/ */
class TDEUI_EXPORT KIconViewItem : public TQIconViewItem class TDEUI_EXPORT TDEIconViewItem : public TQIconViewItem
{ {
public: public:
// Need to redefine all the constructors - I want Java ! // Need to redefine all the constructors - I want Java !
KIconViewItem( TQIconView *parent ) TDEIconViewItem( TQIconView *parent )
: TQIconViewItem( parent ) { init(); } // We need to call it because the parent ctor won't call our reimplementation :((( : TQIconViewItem( parent ) { init(); } // We need to call it because the parent ctor won't call our reimplementation :(((
KIconViewItem( TQIconView *parent, TQIconViewItem *after ) TDEIconViewItem( TQIconView *parent, TQIconViewItem *after )
: TQIconViewItem( parent, after ) { init(); } : TQIconViewItem( parent, after ) { init(); }
KIconViewItem( TQIconView *parent, const TQString &text ) TDEIconViewItem( TQIconView *parent, const TQString &text )
: TQIconViewItem( parent, text ) { init(); } : TQIconViewItem( parent, text ) { init(); }
KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text ) TDEIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text )
: TQIconViewItem( parent, after, text ) { init(); } : TQIconViewItem( parent, after, text ) { init(); }
KIconViewItem( TQIconView *parent, const TQString &text, const TQPixmap &icon ) TDEIconViewItem( TQIconView *parent, const TQString &text, const TQPixmap &icon )
: TQIconViewItem( parent, text, icon ) { init(); } : TQIconViewItem( parent, text, icon ) { init(); }
KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPixmap &icon ) TDEIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPixmap &icon )
: TQIconViewItem( parent, after, text, icon ) { init(); } : TQIconViewItem( parent, after, text, icon ) { init(); }
KIconViewItem( TQIconView *parent, const TQString &text, const TQPicture &picture ) TDEIconViewItem( TQIconView *parent, const TQString &text, const TQPicture &picture )
: TQIconViewItem( parent, text, picture ) { init(); } : TQIconViewItem( parent, text, picture ) { init(); }
KIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPicture &picture ) TDEIconViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &text, const TQPicture &picture )
: TQIconViewItem( parent, after, text, picture ) { init(); } : TQIconViewItem( parent, after, text, picture ) { init(); }
virtual ~KIconViewItem(); virtual ~TDEIconViewItem();
/** /**
* Using this function, you can specify a custom size for the pixmap. The * Using this function, you can specify a custom size for the pixmap. The
@ -274,8 +274,8 @@ protected:
private: private:
KWordWrap* m_wordWrap; KWordWrap* m_wordWrap;
struct KIconViewItemPrivate; struct TDEIconViewItemPrivate;
KIconViewItemPrivate *d; TDEIconViewItemPrivate *d;
}; };
#endif #endif

@ -35,10 +35,10 @@
typedef TQValueList <TQIconViewItem *> QIconViewItemList; typedef TQValueList <TQIconViewItem *> QIconViewItemList;
class KIconViewSearchLine::KIconViewSearchLinePrivate class TDEIconViewSearchLine::TDEIconViewSearchLinePrivate
{ {
public: public:
KIconViewSearchLinePrivate() : TDEIconViewSearchLinePrivate() :
iconView( 0 ), iconView( 0 ),
caseSensitive( DEFAULT_CASESENSITIVE ), caseSensitive( DEFAULT_CASESENSITIVE ),
activeSearch( false ), activeSearch( false ),
@ -54,7 +54,7 @@ public:
/****************************************************************************** /******************************************************************************
* Public Methods * * Public Methods *
*****************************************************************************/ *****************************************************************************/
KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent, TDEIconViewSearchLine::TDEIconViewSearchLine( TQWidget *parent,
TQIconView *iconView, TQIconView *iconView,
const char *name ) : const char *name ) :
KLineEdit( parent, name ) KLineEdit( parent, name )
@ -63,25 +63,25 @@ KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent,
init( iconView ); init( iconView );
} }
KIconViewSearchLine::KIconViewSearchLine( TQWidget *parent, const char *name ) : TDEIconViewSearchLine::TDEIconViewSearchLine( TQWidget *parent, const char *name ) :
KLineEdit( parent, name ) KLineEdit( parent, name )
{ {
d = NULL; d = NULL;
init( NULL ); init( NULL );
} }
KIconViewSearchLine::~KIconViewSearchLine() TDEIconViewSearchLine::~TDEIconViewSearchLine()
{ {
clear(); // empty hiddenItems, returning items back to iconView clear(); // empty hiddenItems, returning items back to iconView
delete d; delete d;
} }
bool KIconViewSearchLine::caseSensitive() const bool TDEIconViewSearchLine::caseSensitive() const
{ {
return d->caseSensitive; return d->caseSensitive;
} }
TQIconView *KIconViewSearchLine::iconView() const TQIconView *TDEIconViewSearchLine::iconView() const
{ {
return d->iconView; return d->iconView;
} }
@ -89,7 +89,7 @@ TQIconView *KIconViewSearchLine::iconView() const
/****************************************************************************** /******************************************************************************
* Public Slots * * Public Slots *
*****************************************************************************/ *****************************************************************************/
void KIconViewSearchLine::updateSearch( const TQString &s ) void TDEIconViewSearchLine::updateSearch( const TQString &s )
{ {
long original_count; long original_count;
int original_hiddenListChanged; int original_hiddenListChanged;
@ -125,7 +125,7 @@ void KIconViewSearchLine::updateSearch( const TQString &s )
d->iconView->ensureItemVisible( currentItem ); d->iconView->ensureItemVisible( currentItem );
} }
void KIconViewSearchLine::clear() void TDEIconViewSearchLine::clear()
{ {
// Clear hidden list, give items back to TQIconView, if it still exists // Clear hidden list, give items back to TQIconView, if it still exists
TQIconViewItem *item = NULL; TQIconViewItem *item = NULL;
@ -142,16 +142,16 @@ void KIconViewSearchLine::clear()
KLineEdit::clear(); KLineEdit::clear();
} }
void KIconViewSearchLine::iconDeleted(const TQString &filename) { void TDEIconViewSearchLine::iconDeleted(const TQString &filename) {
// Do nothing... // Do nothing...
} }
void KIconViewSearchLine::setCaseSensitive( bool cs ) void TDEIconViewSearchLine::setCaseSensitive( bool cs )
{ {
d->caseSensitive = cs; d->caseSensitive = cs;
} }
void KIconViewSearchLine::setIconView( TQIconView *iv ) void TDEIconViewSearchLine::setIconView( TQIconView *iv )
{ {
if ( d->iconView != NULL ) if ( d->iconView != NULL )
disconnect( d->iconView, TQT_SIGNAL( destroyed() ), disconnect( d->iconView, TQT_SIGNAL( destroyed() ),
@ -172,7 +172,7 @@ void KIconViewSearchLine::setIconView( TQIconView *iv )
/****************************************************************************** /******************************************************************************
* Protected Methods * * Protected Methods *
*****************************************************************************/ *****************************************************************************/
bool KIconViewSearchLine::itemMatches( const TQIconViewItem *item, bool TDEIconViewSearchLine::itemMatches( const TQIconViewItem *item,
const TQString &s ) const const TQString &s ) const
{ {
if ( s.isEmpty() ) if ( s.isEmpty() )
@ -185,10 +185,10 @@ bool KIconViewSearchLine::itemMatches( const TQIconViewItem *item,
return ( itemtext.find( s, 0, caseSensitive() ) >= 0 ); return ( itemtext.find( s, 0, caseSensitive() ) >= 0 );
} }
void KIconViewSearchLine::init( TQIconView *iconView ) void TDEIconViewSearchLine::init( TQIconView *iconView )
{ {
delete d; delete d;
d = new KIconViewSearchLinePrivate; d = new TDEIconViewSearchLinePrivate;
d->iconView = iconView; d->iconView = iconView;
@ -205,7 +205,7 @@ void KIconViewSearchLine::init( TQIconView *iconView )
setEnabled( false ); setEnabled( false );
} }
void KIconViewSearchLine::hideItem( TQIconViewItem *item ) void TDEIconViewSearchLine::hideItem( TQIconViewItem *item )
{ {
if ( ( item == NULL ) || ( d->iconView == NULL ) ) if ( ( item == NULL ) || ( d->iconView == NULL ) )
return; return;
@ -213,7 +213,7 @@ void KIconViewSearchLine::hideItem( TQIconViewItem *item )
item->setVisible(false); item->setVisible(false);
} }
void KIconViewSearchLine::showItem( TQIconViewItem *item ) void TDEIconViewSearchLine::showItem( TQIconViewItem *item )
{ {
if ( d->iconView == NULL ) if ( d->iconView == NULL )
{ {
@ -229,14 +229,14 @@ void KIconViewSearchLine::showItem( TQIconViewItem *item )
/****************************************************************************** /******************************************************************************
* Protected Slots * * Protected Slots *
*****************************************************************************/ *****************************************************************************/
void KIconViewSearchLine::queueSearch( const TQString &s ) void TDEIconViewSearchLine::queueSearch( const TQString &s )
{ {
d->queuedSearches++; d->queuedSearches++;
d->search = s; d->search = s;
TQTimer::singleShot( 200, this, TQT_SLOT( activateSearch() ) ); TQTimer::singleShot( 200, this, TQT_SLOT( activateSearch() ) );
} }
void KIconViewSearchLine::activateSearch() void TDEIconViewSearchLine::activateSearch()
{ {
d->queuedSearches--; d->queuedSearches--;
@ -253,7 +253,7 @@ void KIconViewSearchLine::activateSearch()
/****************************************************************************** /******************************************************************************
* Private Slots * * Private Slots *
*****************************************************************************/ *****************************************************************************/
void KIconViewSearchLine::iconViewDeleted() void TDEIconViewSearchLine::iconViewDeleted()
{ {
d->iconView = NULL; d->iconView = NULL;
setEnabled( false ); setEnabled( false );

@ -35,33 +35,33 @@ class TQIconViewItem;
* *
* @since 3.3 * @since 3.3
*/ */
class TDEUI_EXPORT KIconViewSearchLine : public KLineEdit class TDEUI_EXPORT TDEIconViewSearchLine : public KLineEdit
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Constructs a KIconViewSearchLine with \a iconView being the TQIconView to * Constructs a TDEIconViewSearchLine with \a iconView being the TQIconView to
* be filtered. * be filtered.
* *
* If \a iconView is null then the widget will be disabled until a iconview * If \a iconView is null then the widget will be disabled until a iconview
* is set with setIconView(). * is set with setIconView().
*/ */
KIconViewSearchLine( TQWidget *parent = 0, TDEIconViewSearchLine( TQWidget *parent = 0,
TQIconView *iconView = 0, TQIconView *iconView = 0,
const char *name = 0 ); const char *name = 0 );
/** /**
* Constructs a KIconViewSearchLine without any TQIconView to filter. The * Constructs a TDEIconViewSearchLine without any TQIconView to filter. The
* TQIconView object has to be set later with setIconView(). * TQIconView object has to be set later with setIconView().
*/ */
KIconViewSearchLine( TQWidget *parent, const char *name ); TDEIconViewSearchLine( TQWidget *parent, const char *name );
/** /**
* Destroys the KIconViewSearchLine. * Destroys the TDEIconViewSearchLine.
*/ */
virtual ~KIconViewSearchLine(); virtual ~TDEIconViewSearchLine();
/** /**
* Returns true if the search is case sensitive. This defaults to false. * Returns true if the search is case sensitive. This defaults to false.
@ -175,8 +175,8 @@ private slots:
private: private:
class KIconViewSearchLinePrivate; class TDEIconViewSearchLinePrivate;
KIconViewSearchLinePrivate *d; TDEIconViewSearchLinePrivate *d;
}; };

@ -82,7 +82,7 @@ static TQPixmap themedMessageBoxIcon(TQMessageBox::Icon icon)
break; break;
} }
TQPixmap ret = TDEGlobal::iconLoader()->loadIcon(icon_name, KIcon::NoGroup, KIcon::SizeMedium, KIcon::DefaultState, 0, true); TQPixmap ret = TDEGlobal::iconLoader()->loadIcon(icon_name, TDEIcon::NoGroup, TDEIcon::SizeMedium, TDEIcon::DefaultState, 0, true);
if (ret.isNull()) if (ret.isNull())
return TQMessageBox::standardIcon(icon); return TQMessageBox::standardIcon(icon);

@ -351,7 +351,7 @@ void KPasswordDialog::init()
// Row 1: pixmap + prompt // Row 1: pixmap + prompt
TQLabel *lbl; TQLabel *lbl;
const TQPixmap pix( TDEGlobal::iconLoader()->loadIcon( d->iconName, KIcon::NoGroup, KIcon::SizeHuge, 0, 0, true)); const TQPixmap pix( TDEGlobal::iconLoader()->loadIcon( d->iconName, TDEIcon::NoGroup, TDEIcon::SizeHuge, 0, 0, true));
if (!pix.isNull()) { if (!pix.isNull()) {
lbl = new TQLabel(m_pMain); lbl = new TQLabel(m_pMain);
lbl->setPixmap(pix); lbl->setPixmap(pix);

@ -317,12 +317,12 @@ TQPixmap KSystemTray::loadIcon( const TQString &icon, TDEInstance *instance )
TDEConfig *appCfg = kapp->config(); TDEConfig *appCfg = kapp->config();
TDEConfigGroupSaver configSaver(appCfg, "System Tray"); TDEConfigGroupSaver configSaver(appCfg, "System Tray");
int iconWidth = appCfg->readNumEntry("systrayIconWidth", 22); int iconWidth = appCfg->readNumEntry("systrayIconWidth", 22);
return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth ); return instance->iconLoader()->loadIcon( icon, TDEIcon::Panel, iconWidth );
} }
TQPixmap KSystemTray::loadSizedIcon( const TQString &icon, int iconWidth, TDEInstance *instance ) TQPixmap KSystemTray::loadSizedIcon( const TQString &icon, int iconWidth, TDEInstance *instance )
{ {
return instance->iconLoader()->loadIcon( icon, KIcon::Panel, iconWidth ); return instance->iconLoader()->loadIcon( icon, TDEIcon::Panel, iconWidth );
} }
void KSystemTray::setPixmap( const TQPixmap& p ) void KSystemTray::setPixmap( const TQPixmap& p )

@ -191,7 +191,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e )
} }
mHoverCloseButton = new TQPushButton( this ); mHoverCloseButton = new TQPushButton( this );
mHoverCloseButton->setIconSet( TDEGlobal::iconLoader()->loadIconSet("fileclose", KIcon::Toolbar, KIcon::SizeSmall) ); mHoverCloseButton->setIconSet( TDEGlobal::iconLoader()->loadIconSet("fileclose", TDEIcon::Toolbar, TDEIcon::SizeSmall) );
mHoverCloseButton->setGeometry( rect ); mHoverCloseButton->setGeometry( rect );
TQToolTip::add(mHoverCloseButton,i18n("Close this tab")); TQToolTip::add(mHoverCloseButton,i18n("Close this tab"));
mHoverCloseButton->setFlat(true); mHoverCloseButton->setFlat(true);

@ -188,7 +188,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name)
{ {
img = TQImage(locate("data", "kdewizard/pics/wizard_small.png")); img = TQImage(locate("data", "kdewizard/pics/wizard_small.png"));
// colorize and check to figure the correct color // colorize and check to figure the correct color
KIconEffect::colorize(img, mBlendedColor, 1.0); TDEIconEffect::colorize(img, mBlendedColor, 1.0);
QRgb colPixel( img.pixel(0,0) ); QRgb colPixel( img.pixel(0,0) );
mBlendedColor = TQColor(tqRed(colPixel),tqGreen(colPixel),tqBlue(colPixel)); mBlendedColor = TQColor(tqRed(colPixel),tqGreen(colPixel),tqBlue(colPixel));
@ -206,8 +206,8 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name)
setCaption(i18n("Tip of the Day")); setCaption(i18n("Tip of the Day"));
#ifdef Q_WS_X11 #ifdef Q_WS_X11
KWin::setIcons( winId(), KWin::setIcons( winId(),
TDEGlobal::iconLoader()->loadIcon( "idea", KIcon::NoGroup, 32 ), TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 32 ),
TDEGlobal::iconLoader()->loadIcon( "idea", KIcon::NoGroup, 16 ) ); TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 16 ) );
#endif #endif
TQVBoxLayout *vbox = new TQVBoxLayout(this, marginHint(), spacingHint()); TQVBoxLayout *vbox = new TQVBoxLayout(this, marginHint(), spacingHint());

@ -663,7 +663,7 @@ int TDEAction::plug( TQWidget *w, int index )
instance = m_parentCollection->instance(); instance = m_parentCollection->instance();
else else
instance = TDEGlobal::instance(); instance = TDEGlobal::instance();
id = menu->insertItem( d->iconSet( KIcon::Small, 0, instance ), d->text(), this,//dsweet id = menu->insertItem( d->iconSet( TDEIcon::Small, 0, instance ), d->text(), this,//dsweet
TQT_SLOT( slotPopupActivated() ), keyQt, TQT_SLOT( slotPopupActivated() ), keyQt,
-1, index ); -1, index );
} }
@ -945,12 +945,12 @@ void TDEAction::updateIcon( int id )
if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { if ( ::tqqt_cast<TQPopupMenu *>( w ) ) {
int itemId_ = itemId( id ); int itemId_ = itemId( id );
static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet( KIcon::Small ), d->text() ); static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet( TDEIcon::Small ), d->text() );
if (!d->m_cut.isNull()) if (!d->m_cut.isNull())
updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ ); updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ );
} }
else if ( ::tqqt_cast<TQMenuBar *>( w ) ) else if ( ::tqqt_cast<TQMenuBar *>( w ) )
static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( KIcon::Small ), d->text() ); static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( TDEIcon::Small ), d->text() );
else if ( ::tqqt_cast<TDEToolBar *>( w ) ) else if ( ::tqqt_cast<TDEToolBar *>( w ) )
static_cast<TDEToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); static_cast<TDEToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() );
} }
@ -988,11 +988,11 @@ void TDEAction::updateIconSet( int id )
if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better ) if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better )
static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() ); static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() );
else else
static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet( KIcon::Small ) ); static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet( TDEIcon::Small ) );
} }
} }
TQIconSet TDEAction::iconSet( KIcon::Group group, int size ) const TQIconSet TDEAction::iconSet( TDEIcon::Group group, int size ) const
{ {
return d->iconSet( group, size ); return d->iconSet( group, size );
} }

@ -466,14 +466,14 @@ public:
* Get the TQIconSet from which the icons used to display this action will * Get the TQIconSet from which the icons used to display this action will
* be chosen. * be chosen.
* *
* In KDE4 set group default to KIcon::Small while removing the other * In KDE4 set group default to TDEIcon::Small while removing the other
* iconSet() function. * iconSet() function.
*/ */
virtual TQIconSet iconSet( KIcon::Group group, int size=0 ) const; virtual TQIconSet iconSet( TDEIcon::Group group, int size=0 ) const;
/** /**
* Remove in KDE4 * Remove in KDE4
*/ */
TQIconSet iconSet() const { return iconSet( KIcon::Small ); } TQIconSet iconSet() const { return iconSet( TDEIcon::Small ); }
virtual TQString icon() const; virtual TQString icon() const;

@ -205,7 +205,7 @@ void TDEToggleAction::updateChecked( int id )
else { else {
const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem(); const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem();
if ( d->m_checkedGuiItem->hasIcon() ) if ( d->m_checkedGuiItem->hasIcon() )
pm->changeItem( itemId_, gui->iconSet( KIcon::Small ), gui->text() ); pm->changeItem( itemId_, gui->iconSet( TDEIcon::Small ), gui->text() );
else else
pm->changeItem( itemId_, gui->text() ); pm->changeItem( itemId_, gui->text() );
@ -228,7 +228,7 @@ void TDEToggleAction::updateChecked( int id )
static_cast<TDEToolBar*>( w )->setButton( itemId( id ), d->m_checked ); static_cast<TDEToolBar*>( w )->setButton( itemId( id ), d->m_checked );
if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) { if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) {
const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem(); const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem();
static_cast<TDEToolBar*>( w )->setButtonIconSet( itemId( id ), gui->iconSet( KIcon::Toolbar ) ); static_cast<TDEToolBar*>( w )->setButtonIconSet( itemId( id ), gui->iconSet( TDEIcon::Toolbar ) );
} }
} }
} }

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

@ -115,7 +115,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
@ -274,7 +274,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 TQIconSet, or use the application instance of created by TQIconSet, or use the application instance of
KIconLoader (recommended). TDEIconLoader (recommended).
*/ */
void setButtonIconSet( const TQIconSet &iconset, MoveButton button ); void setButtonIconSet( const TQIconSet &iconset, MoveButton button );

@ -731,7 +731,7 @@ public slots:
* Example (adding a help button to the first toolbar): * Example (adding a help button to the first toolbar):
* *
* \code * \code
* KIconLoader &loader = *TDEGlobal::iconLoader(); * TDEIconLoader &loader = *TDEGlobal::iconLoader();
* TQPixmap pixmap = loader.loadIcon( "help" ); * TQPixmap pixmap = loader.loadIcon( "help" );
* toolBar(0)->insertButton( pixmap, 0, TQT_SIGNAL(clicked()), * toolBar(0)->insertButton( pixmap, 0, TQT_SIGNAL(clicked()),
* this, TQT_SLOT(appHelpActivated()), true, i18n("Help") ); * this, TQT_SLOT(appHelpActivated()), true, i18n("Help") );

@ -913,9 +913,9 @@ int TDEToolBar::iconSize() const
int TDEToolBar::iconSizeDefault() const int TDEToolBar::iconSizeDefault() const
{ {
if (!::qstrcmp(name(), "mainToolBar")) if (!::qstrcmp(name(), "mainToolBar"))
return TDEGlobal::iconLoader()->currentSize(KIcon::MainToolbar); return TDEGlobal::iconLoader()->currentSize(TDEIcon::MainToolbar);
return TDEGlobal::iconLoader()->currentSize(KIcon::Toolbar); return TDEGlobal::iconLoader()->currentSize(TDEIcon::Toolbar);
} }
void TDEToolBar::setEnableContextMenu(bool enable ) void TDEToolBar::setEnableContextMenu(bool enable )
@ -1452,9 +1452,9 @@ void TDEToolBar::resizeEvent( TQResizeEvent *e )
void TDEToolBar::slotIconChanged(int group) void TDEToolBar::slotIconChanged(int group)
{ {
if ((group != KIcon::Toolbar) && (group != KIcon::MainToolbar)) if ((group != TDEIcon::Toolbar) && (group != TDEIcon::MainToolbar))
return; return;
if ((group == KIcon::MainToolbar) != !::qstrcmp(name(), "mainToolBar")) if ((group == TDEIcon::MainToolbar) != !::qstrcmp(name(), "mainToolBar"))
return; return;
doModeChange(); doModeChange();
@ -2062,14 +2062,14 @@ TDEPopupMenu *TDEToolBar::contextMenu()
TDEPopupMenu *size = new TDEPopupMenu( context, "size" ); TDEPopupMenu *size = new TDEPopupMenu( context, "size" );
size->insertItem( i18n("Default"), CONTEXT_ICONSIZES ); size->insertItem( i18n("Default"), CONTEXT_ICONSIZES );
// Query the current theme for available sizes // Query the current theme for available sizes
KIconTheme *theme = TDEGlobal::instance()->iconLoader()->theme(); TDEIconTheme *theme = TDEGlobal::instance()->iconLoader()->theme();
TQValueList<int> avSizes; TQValueList<int> avSizes;
if (theme) if (theme)
{ {
if (!::qstrcmp(name(), "mainToolBar")) if (!::qstrcmp(name(), "mainToolBar"))
avSizes = theme->querySizes( KIcon::MainToolbar); avSizes = theme->querySizes( TDEIcon::MainToolbar);
else else
avSizes = theme->querySizes( KIcon::Toolbar); avSizes = theme->querySizes( TDEIcon::Toolbar);
} }
d->iconSizes = avSizes; d->iconSizes = avSizes;

@ -830,11 +830,11 @@ public:
/** /**
* Set the icon size to load. Usually you should not call * Set the icon size to load. Usually you should not call
* this, the icon size is taken care of by KIconLoader * this, the icon size is taken care of by TDEIconLoader
* and globally configured. * and globally configured.
* By default, the toolbar will load icons of size 32 for main * By default, the toolbar will load icons of size 32 for main
* toolbars and 22 for other toolbars * toolbars and 22 for other toolbars
* @see KIconLoader. * @see TDEIconLoader.
* *
* @param size The size to use * @param size The size to use
*/ */

@ -196,9 +196,9 @@ void TDEToolBarButton::modeChange()
int pix_width = d->m_iconSize; int pix_width = d->m_iconSize;
if ( d->m_iconSize == 0 ) { if ( d->m_iconSize == 0 ) {
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar")) if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
pix_width = IconSize( KIcon::MainToolbar ); pix_width = IconSize( TDEIcon::MainToolbar );
else else
pix_width = IconSize( KIcon::Toolbar ); pix_width = IconSize( TDEIcon::Toolbar );
} }
int pix_height = pix_width; int pix_height = pix_width;
@ -284,10 +284,10 @@ void TDEToolBarButton::setIcon( const TQString &icon )
// TQObject::name() return "const char *" instead of TQString. // TQObject::name() return "const char *" instead of TQString.
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar")) if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet( TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
d->m_iconName, KIcon::MainToolbar, d->m_iconSize )); d->m_iconName, TDEIcon::MainToolbar, d->m_iconSize ));
else else
TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet( TQToolButton::setIconSet( d->m_instance->iconLoader()->loadIconSet(
d->m_iconName, KIcon::Toolbar, d->m_iconSize )); d->m_iconName, TDEIcon::Toolbar, d->m_iconSize ));
} }
void TDEToolBarButton::setIconSet( const TQIconSet &iconset ) void TDEToolBarButton::setIconSet( const TQIconSet &iconset )
@ -327,10 +327,10 @@ void TDEToolBarButton::setDefaultIcon( const TQString& icon )
TQIconSet set = iconSet(); TQIconSet set = iconSet();
TQPixmap pm; TQPixmap pm;
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar")) if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::MainToolbar, pm = d->m_instance->iconLoader()->loadIcon( icon, TDEIcon::MainToolbar,
d->m_iconSize ); d->m_iconSize );
else else
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::Toolbar, pm = d->m_instance->iconLoader()->loadIcon( icon, TDEIcon::Toolbar,
d->m_iconSize ); d->m_iconSize );
set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Normal ); set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Normal );
TQToolButton::setIconSet( set ); TQToolButton::setIconSet( set );
@ -341,10 +341,10 @@ void TDEToolBarButton::setDisabledIcon( const TQString& icon )
TQIconSet set = iconSet(); TQIconSet set = iconSet();
TQPixmap pm; TQPixmap pm;
if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar")) if (d->m_parent && !strcmp(d->m_parent->name(), "mainToolBar"))
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::MainToolbar, pm = d->m_instance->iconLoader()->loadIcon( icon, TDEIcon::MainToolbar,
d->m_iconSize ); d->m_iconSize );
else else
pm = d->m_instance->iconLoader()->loadIcon( icon, KIcon::Toolbar, pm = d->m_instance->iconLoader()->loadIcon( icon, TDEIcon::Toolbar,
d->m_iconSize ); d->m_iconSize );
set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Disabled ); set.setPixmap( pm, TQIconSet::Automatic, TQIconSet::Disabled );
TQToolButton::setIconSet( set ); TQToolButton::setIconSet( set );

@ -1,5 +1,5 @@
/* /*
* Tests the item container widgets KIconView, TDEListView, TDEListBox * Tests the item container widgets TDEIconView, TDEListView, TDEListBox
* *
* Copyright (c) 2000 by Michael Reiher <michael.reiher@gmx.de> * Copyright (c) 2000 by Michael Reiher <michael.reiher@gmx.de>
* *
@ -97,8 +97,8 @@ TopLevel::TopLevel(TQWidget *parent, const char *name)
TDEGlobal::config()->reparseConfiguration(); TDEGlobal::config()->reparseConfiguration();
//Create IconView //Create IconView
TQGroupBox* gbIconView = new TQGroupBox( 1, Qt::Horizontal, "KIconView", this); TQGroupBox* gbIconView = new TQGroupBox( 1, Qt::Horizontal, "TDEIconView", this);
m_pIconView = new KIconView( gbIconView ); m_pIconView = new TDEIconView( gbIconView );
hBox->addWidget( gbIconView ); hBox->addWidget( gbIconView );
hBox->addSpacing( 5 ); hBox->addSpacing( 5 );
connect( m_pIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), connect( m_pIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ),
@ -151,22 +151,22 @@ void TopLevel::slotSwitchMode( int id )
switch( id ) { switch( id ) {
case TopLevel::NoSelection: case TopLevel::NoSelection:
m_pIconView->setSelectionMode( KIconView::NoSelection ); m_pIconView->setSelectionMode( TDEIconView::NoSelection );
m_pListView->setSelectionMode( TQListView::NoSelection ); m_pListView->setSelectionMode( TQListView::NoSelection );
m_pListBox->setSelectionMode( TDEListBox::NoSelection ); m_pListBox->setSelectionMode( TDEListBox::NoSelection );
break; break;
case TopLevel::Single: case TopLevel::Single:
m_pIconView->setSelectionMode( KIconView::Single ); m_pIconView->setSelectionMode( TDEIconView::Single );
m_pListView->setSelectionMode( TQListView::Single ); m_pListView->setSelectionMode( TQListView::Single );
m_pListBox->setSelectionMode( TDEListBox::Single ); m_pListBox->setSelectionMode( TDEListBox::Single );
break; break;
case TopLevel::Multi: case TopLevel::Multi:
m_pIconView->setSelectionMode( KIconView::Multi ); m_pIconView->setSelectionMode( TDEIconView::Multi );
m_pListView->setSelectionMode( TQListView::Multi ); m_pListView->setSelectionMode( TQListView::Multi );
m_pListBox->setSelectionMode( TDEListBox::Multi ); m_pListBox->setSelectionMode( TDEListBox::Multi );
break; break;
case TopLevel::Extended: case TopLevel::Extended:
m_pIconView->setSelectionMode( KIconView::Extended ); m_pIconView->setSelectionMode( TDEIconView::Extended );
m_pListView->setSelectionMode( TQListView::Extended ); m_pListView->setSelectionMode( TQListView::Extended );
m_pListBox->setSelectionMode( TDEListBox::Extended ); m_pListBox->setSelectionMode( TDEListBox::Extended );
break; break;
@ -177,7 +177,7 @@ void TopLevel::slotSwitchMode( int id )
void TopLevel::slotIconViewExec( TQIconViewItem* item ) void TopLevel::slotIconViewExec( TQIconViewItem* item )
{ {
m_plblWidget->setText("KIconView"); m_plblWidget->setText("TDEIconView");
m_plblSignal->setText("executed"); m_plblSignal->setText("executed");
if( item ) if( item )
m_plblItem->setText( item->text() ); m_plblItem->setText( item->text() );

@ -3,7 +3,7 @@
#include <tqwidget.h> #include <tqwidget.h>
class KIconView; class TDEIconView;
class TDEListView; class TDEListView;
class TDEListBox; class TDEListBox;
class TQButtonGroup; class TQButtonGroup;
@ -31,7 +31,7 @@ public slots:
void slotClicked( TQIconViewItem* ) { tqDebug("CLICK");} void slotClicked( TQIconViewItem* ) { tqDebug("CLICK");}
void slotDoubleClicked( TQIconViewItem* ) { tqDebug("DOUBLE CLICK");} void slotDoubleClicked( TQIconViewItem* ) { tqDebug("DOUBLE CLICK");}
protected: protected:
KIconView* m_pIconView; TDEIconView* m_pIconView;
TDEListView* m_pListView; TDEListView* m_pListView;
TDEListBox* m_pListBox; TDEListBox* m_pListBox;

@ -254,12 +254,12 @@ void KCMultiDialog::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 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();

@ -207,7 +207,7 @@ void KPluginSelectionWidget::init( const TQValueList<KPluginInfo*> & plugininfos
{ {
TQCheckListItem * item = new KPluginInfoLVI( *it, listview ); TQCheckListItem * item = new KPluginInfoLVI( *it, listview );
if( ! ( *it )->icon().isEmpty() ) if( ! ( *it )->icon().isEmpty() )
item->setPixmap( 0, SmallIcon( ( *it )->icon(), IconSize( KIcon::Small ) ) ); item->setPixmap( 0, SmallIcon( ( *it )->icon(), IconSize( TDEIcon::Small ) ) );
item->setOn( ( *it )->isPluginEnabled() ); item->setOn( ( *it )->isPluginEnabled() );
d->pluginInfoMap.insert( item, *it ); d->pluginInfoMap.insert( item, *it );
} }

@ -119,7 +119,7 @@ void ComponentsDialog::show()
TQCheckListItem * item = new TQCheckListItem( d->listview, ( *it )->name(), TQCheckListItem * item = new TQCheckListItem( d->listview, ( *it )->name(),
TQCheckListItem::CheckBox ); TQCheckListItem::CheckBox );
if( ! ( *it )->icon().isEmpty() ) if( ! ( *it )->icon().isEmpty() )
item->setPixmap( 0, SmallIcon( ( *it )->icon(), IconSize( KIcon::Small ) ) ); item->setPixmap( 0, SmallIcon( ( *it )->icon(), IconSize( TDEIcon::Small ) ) );
item->setOn( ( *it )->isPluginEnabled() ); item->setOn( ( *it )->isPluginEnabled() );
d->plugininfomap[ item ] = ( *it ); d->plugininfomap[ item ] = ( *it );
} }
@ -144,7 +144,7 @@ void ComponentsDialog::executed( TQListViewItem * item )
info->setPluginEnabled( checked ); info->setPluginEnabled( checked );
//checkDependencies( info ); //checkDependencies( info );
// show info about the component on the right // show info about the component on the right
d->iconwidget->setPixmap( SmallIcon( info->icon(), KIcon::SizeLarge ) ); d->iconwidget->setPixmap( SmallIcon( info->icon(), TDEIcon::SizeLarge ) );
d->commentwidget->setText( info->comment() ); d->commentwidget->setText( info->comment() );
//d->descriptionwidget->setText( info->description() ); //d->descriptionwidget->setText( info->description() );
} }

@ -221,7 +221,7 @@ class PageNode
TQPixmap icon; TQPixmap icon;
if( ! m_value.group->icon.isNull() ) if( ! m_value.group->icon.isNull() )
icon = SmallIcon( m_value.group->icon, icon = SmallIcon( m_value.group->icon,
IconSize( KIcon::Small ) ); IconSize( TDEIcon::Small ) );
TQVBox * page = dlg->addVBoxPage( m_value.group->name, TQVBox * page = dlg->addVBoxPage( m_value.group->name,
TQString::null, icon ); TQString::null, icon );
TQLabel * comment = new TQLabel( m_value.group->comment, page ); TQLabel * comment = new TQLabel( m_value.group->comment, page );

@ -141,7 +141,7 @@ void TDECModuleContainer::addModule( const TQString& module )
allModules.append( proxy ); allModules.append( proxy );
d->tabWidget->addTab( proxy, TQIconSet(TDEGlobal::iconLoader()->loadIcon( d->tabWidget->addTab( proxy, TQIconSet(TDEGlobal::iconLoader()->loadIcon(
proxy->moduleInfo().icon(), KIcon::Desktop)), proxy->moduleInfo().icon(), TDEIcon::Desktop)),
/* QT eats ampersands for dinner. But not this time. */ /* QT eats ampersands for dinner. But not this time. */
proxy->moduleInfo().moduleName().replace( "&", "&&" )); proxy->moduleInfo().moduleName().replace( "&", "&&" ));

Loading…
Cancel
Save