diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-04 14:16:51 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-04 14:16:51 -0600 |
commit | f2bfcad7ffdd09911f282afe2a2051b3708601c9 (patch) | |
tree | ce4bebc206b6f9753745218e6a4c4368df624c16 /tdeio | |
parent | a14eaa044240517f1f3d7eb5dacbff96fd447ada (diff) | |
download | tdelibs-f2bfcad7ffdd09911f282afe2a2051b3708601c9.tar.gz tdelibs-f2bfcad7ffdd09911f282afe2a2051b3708601c9.zip |
Rename KIcon to enhance compatibility with KDE4
Diffstat (limited to 'tdeio')
35 files changed, 292 insertions, 292 deletions
diff --git a/tdeio/Mainpage.dox b/tdeio/Mainpage.dox index 464faf7a6..7cb127838 100644 --- a/tdeio/Mainpage.dox +++ b/tdeio/Mainpage.dox @@ -41,7 +41,7 @@ * The file dialog provides different views; there is a vertically scrolling * view based on TDEListView, showing things like filename, file size, * 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 * view for directories on the left. A view, that shows a preview for the * currently selected file (using TDEIO::PreviewJob to generate previews) @@ -67,8 +67,8 @@ * The KPropertiesDialog is extensible with plugin-pages via the * KPropsDlgPlugin class. * - * The KIconDialog class shows a list of icons installed on the system (as - * accessible via KIconLoader) and allows the user to select one. + * The TDEIconDialog class shows a list of icons installed on the system (as + * accessible via TDEIconLoader) and allows the user to select one. * * 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 @@ -97,7 +97,7 @@ * The base class for all views to be used with KDirOperator. * * KFileIconView: - * The KFileView based on KIconView. + * The KFileView based on TDEIconView. * * KFileDetailView: * The KFileView based on TDEListView. diff --git a/tdeio/tdefile/kcustommenueditor.cpp b/tdeio/tdefile/kcustommenueditor.cpp index 725048e37..65455aef0 100644 --- a/tdeio/tdefile/kcustommenueditor.cpp +++ b/tdeio/tdefile/kcustommenueditor.cpp @@ -60,8 +60,8 @@ public: // to accelators, replace them with two ampersands. serviceName.replace("&", "&&"); - TQPixmap normal = TDEGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small, - 0, KIcon::DefaultState, 0L, true); + TQPixmap normal = TDEGlobal::instance()->iconLoader()->loadIcon(s->icon(), TDEIcon::Small, + 0, TDEIcon::DefaultState, 0L, true); // make sure they are not larger than 16x16 if (normal.width() > 16 || normal.height() > 16) { diff --git a/tdeio/tdefile/kicondialog.cpp b/tdeio/tdefile/kicondialog.cpp index da8745507..aa8968b05 100644 --- a/tdeio/tdefile/kicondialog.cpp +++ b/tdeio/tdefile/kicondialog.cpp @@ -49,11 +49,11 @@ #include <svgicons/ksvgiconpainter.h> #endif -class KIconCanvas::KIconCanvasPrivate +class TDEIconCanvas::TDEIconCanvasPrivate { public: - KIconCanvasPrivate() { m_bLoading = false; } - ~KIconCanvasPrivate() {} + TDEIconCanvasPrivate() { m_bLoading = false; } + ~TDEIconCanvasPrivate() {} 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) - : KIconView(parent, name) +TDEIconCanvas::TDEIconCanvas(TQWidget *parent, const char *name) + : TDEIconView(parent, name) { - d = new KIconCanvasPrivate; + d = new TDEIconCanvasPrivate; mpTimer = new TQTimer(this); connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles())); connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)), @@ -101,13 +101,13 @@ KIconCanvas::KIconCanvas(TQWidget *parent, const char *name) setShowToolTips(true); } -KIconCanvas::~KIconCanvas() +TDEIconCanvas::~TDEIconCanvas() { delete mpTimer; delete d; } -void KIconCanvas::loadFiles(const TQStringList& files) +void TDEIconCanvas::loadFiles(const TQStringList& files) { clear(); mFiles = files; @@ -116,7 +116,7 @@ void KIconCanvas::loadFiles(const TQStringList& files) d->m_bLoading = false; } -void KIconCanvas::slotLoadFiles() +void TDEIconCanvas::slotLoadFiles() { setResizeMode(Fixed); TQApplication::setOverrideCursor(tqwaitCursor); @@ -199,65 +199,65 @@ void KIconCanvas::slotLoadFiles() setResizeMode(Adjust); } -TQString KIconCanvas::getCurrent() const +TQString TDEIconCanvas::getCurrent() const { if (!currentItem()) return TQString::null; return currentItem()->key(); } -void KIconCanvas::stopLoading() +void TDEIconCanvas::stopLoading() { d->m_bLoading = false; } -void KIconCanvas::slotCurrentChanged(TQIconViewItem *item) +void TDEIconCanvas::slotCurrentChanged(TQIconViewItem *item) { emit nameChanged((item != 0L) ? item->text() : TQString::null); } -class KIconDialog::KIconDialogPrivate +class TDEIconDialog::TDEIconDialogPrivate { public: - KIconDialogPrivate() { + TDEIconDialogPrivate() { m_bStrictIconSize = true; m_bLockUser = false; m_bLockCustomDir = false; searchLine = 0; } - ~KIconDialogPrivate() {} + ~TDEIconDialogPrivate() {} bool m_bStrictIconSize, m_bLockUser, m_bLockCustomDir; TQString custom; 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. */ -KIconDialog::KIconDialog(TQWidget *parent, const char *name) +TDEIconDialog::TDEIconDialog(TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok) { - d = new KIconDialogPrivate; + d = new TDEIconDialogPrivate; mpLoader = TDEGlobal::iconLoader(); init(); } -KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *parent, +TDEIconDialog::TDEIconDialog(TDEIconLoader *loader, TQWidget *parent, const char *name) : KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok) { - d = new KIconDialogPrivate; + d = new TDEIconDialogPrivate; mpLoader = loader; init(); } -void KIconDialog::init() +void TDEIconDialog::init() { - mGroupOrSize = KIcon::Desktop; - mContext = KIcon::Any; + mGroupOrSize = TDEIcon::Desktop; + mContext = TDEIcon::Any; mType = 0; mFileList = TDEGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png")); @@ -297,7 +297,7 @@ void KIconDialog::init() TQLabel *searchLabel = new TQLabel(i18n("&Search:"), main); searchLayout->addWidget(searchLabel); - d->searchLine = new KIconViewSearchLine(main, "searchLine"); + d->searchLine = new TDEIconViewSearchLine(main, "searchLine"); searchLayout->addWidget(d->searchLine); searchLabel->setBuddy(d->searchLine); @@ -310,7 +310,7 @@ void KIconDialog::init() 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(returnPressed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons())); mpCanvas->setMinimumSize(400, 125); @@ -339,19 +339,19 @@ void KIconDialog::init() I18N_NOOP( "Mimetypes" ), I18N_NOOP( "Places" ), I18N_NOOP( "Status" ) }; - static const KIcon::Context context_id[] = { - KIcon::Action, - KIcon::Animation, - KIcon::Application, - KIcon::Category, - KIcon::Device, - KIcon::Emblem, - KIcon::Emote, - KIcon::FileSystem, - KIcon::International, - KIcon::MimeType, - KIcon::Place, - KIcon::StatusIcon }; + static const TDEIcon::Context context_id[] = { + TDEIcon::Action, + TDEIcon::Animation, + TDEIcon::Application, + TDEIcon::Category, + TDEIcon::Device, + TDEIcon::Emblem, + TDEIcon::Emote, + TDEIcon::FileSystem, + TDEIcon::International, + TDEIcon::MimeType, + TDEIcon::Place, + TDEIcon::StatusIcon }; mNumContext = 0; int cnt = sizeof( context_text ) / sizeof( context_text[ 0 ] ); // check all 3 arrays have same sizes @@ -376,18 +376,18 @@ void KIconDialog::init() } -KIconDialog::~KIconDialog() +TDEIconDialog::~TDEIconDialog() { delete d; } -void KIconDialog::slotAcceptIcons() +void TDEIconDialog::slotAcceptIcons() { d->custom=TQString::null; slotOk(); } -void KIconDialog::showIcons() +void TDEIconDialog::showIcons() { mpCanvas->clear(); TQStringList filelist; @@ -417,40 +417,40 @@ void KIconDialog::showIcons() mpCanvas->loadFiles(filelist); } -void KIconDialog::setStrictIconSize(bool b) +void TDEIconDialog::setStrictIconSize(bool b) { d->m_bStrictIconSize=b; } -bool KIconDialog::strictIconSize() const +bool TDEIconDialog::strictIconSize() const { 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 ) - mGroupOrSize = KIcon::Desktop; // default Group + mGroupOrSize = TDEIcon::Desktop; // default Group 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 return (mGroupOrSize < 0) ? -mGroupOrSize : 0; } #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 ); return openDialog(); } #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 ) { d->m_bStrictIconSize = strictIconSize; @@ -463,7 +463,7 @@ void KIconDialog::setup(KIcon::Group group, KIcon::Context 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 lockUser, bool lockCustomDir ) { @@ -481,7 +481,7 @@ void KIconDialog::setup(KIcon::Group group, KIcon::Context context, setContext( context ); } -void KIconDialog::setContext( KIcon::Context context ) +void TDEIconDialog::setContext( TDEIcon::Context context ) { mContext = context; 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; } -TQString KIconDialog::openDialog() +TQString TDEIconDialog::openDialog() { showIcons(); @@ -516,14 +516,14 @@ TQString KIconDialog::openDialog() return TQString::null; } -void KIconDialog::showDialog() +void TDEIconDialog::showDialog() { setModal(false); showIcons(); show(); } -void KIconDialog::slotOk() +void TDEIconDialog::slotOk() { TQString name; if (!d->custom.isNull()) @@ -544,11 +544,11 @@ void KIconDialog::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, TQWidget *parent, const TQString &caption) { - KIconDialog dlg(parent, "icon dialog"); + TDEIconDialog dlg(parent, "icon dialog"); dlg.setup( group, context, strictIconSize, iconSize, user ); if (!caption.isNull()) dlg.setCaption(caption); @@ -556,7 +556,7 @@ TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context, return dlg.openDialog(); } -void KIconDialog::slotButtonClicked(int id) +void TDEIconDialog::slotButtonClicked(int id) { 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(); } -void KIconDialog::slotStartLoading(int steps) +void TDEIconDialog::slotStartLoading(int steps) { if (steps < 10) mpProgress->hide(); @@ -627,7 +627,7 @@ void KIconDialog::slotStartLoading(int steps) } } -void KIconDialog::slotProgress(int p) +void TDEIconDialog::slotProgress(int p) { mpProgress->setProgress(p); // commented out the following since setProgress already paints ther @@ -635,46 +635,46 @@ void KIconDialog::slotProgress(int p) //mpProgress->repaint(); } -void KIconDialog::slotFinished() +void TDEIconDialog::slotFinished() { mpProgress->hide(); } -class KIconButton::KIconButtonPrivate +class TDEIconButton::TDEIconButtonPrivate { public: - KIconButtonPrivate() { + TDEIconButtonPrivate() { m_bStrictIconSize = false; - iconSize = 0; // let KIconLoader choose the default + iconSize = 0; // let TDEIconLoader choose the default } - ~KIconButtonPrivate() {} + ~TDEIconButtonPrivate() {} bool m_bStrictIconSize; 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) { init( TDEGlobal::iconLoader() ); } -KIconButton::KIconButton(KIconLoader *loader, +TDEIconButton::TDEIconButton(TDEIconLoader *loader, TQWidget *parent, const char *name) : TQPushButton(parent, name) { init( loader ); } -void KIconButton::init( KIconLoader *loader ) +void TDEIconButton::init( TDEIconLoader *loader ) { - d = new KIconButtonPrivate; - mGroup = KIcon::Desktop; - mContext = KIcon::Application; + d = new TDEIconButtonPrivate; + mGroup = TDEIcon::Desktop; + mContext = TDEIcon::Application; mbUser = false; mpLoader = loader; @@ -682,47 +682,47 @@ void KIconButton::init( KIconLoader *loader ) connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotChangeIcon())); } -KIconButton::~KIconButton() +TDEIconButton::~TDEIconButton() { delete mpDialog; delete d; } -void KIconButton::setStrictIconSize(bool b) +void TDEIconButton::setStrictIconSize(bool b) { d->m_bStrictIconSize=b; } -bool KIconButton::strictIconSize() const +bool TDEIconButton::strictIconSize() const { return d->m_bStrictIconSize; } -void KIconButton::setIconSize( int size ) +void TDEIconButton::setIconSize( int size ) { d->iconSize = size; } -int KIconButton::iconSize() const +int TDEIconButton::iconSize() const { 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; mContext = context; mbUser = user; } -void KIconButton::setIcon(const TQString& icon) +void TDEIconButton::setIcon(const TQString& icon) { mIcon = icon; setIconSet(mpLoader->loadIconSet(mIcon, mGroup, d->iconSize)); if (!mpDialog) { - mpDialog = new KIconDialog(mpLoader, this); + mpDialog = new TDEIconDialog(mpLoader, this); 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 ) ); } -void KIconButton::resetIcon() +void TDEIconButton::resetIcon() { mIcon = TQString::null; setIconSet(TQIconSet()); } -void KIconButton::slotChangeIcon() +void TDEIconButton::slotChangeIcon() { if (!mpDialog) { - mpDialog = new KIconDialog(mpLoader, this); + mpDialog = new TDEIconDialog(mpLoader, this); connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&))); } @@ -748,7 +748,7 @@ void KIconButton::slotChangeIcon() mpDialog->showDialog(); } -void KIconButton::newIconName(const TQString& name) +void TDEIconButton::newIconName(const TQString& name) { if (name.isEmpty()) return; @@ -763,10 +763,10 @@ void KIconButton::newIconName(const TQString& name) emit iconChanged(name); } -void KIconCanvas::virtual_hook( int id, void* data ) -{ KIconView::virtual_hook( id, data ); } +void TDEIconCanvas::virtual_hook( int id, void* 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 ); } #include "kicondialog.moc" diff --git a/tdeio/tdefile/kicondialog.h b/tdeio/tdefile/kicondialog.h index d7cb48f1c..351de929d 100644 --- a/tdeio/tdefile/kicondialog.h +++ b/tdeio/tdefile/kicondialog.h @@ -11,8 +11,8 @@ * exact licensing terms. */ -#ifndef __KIconDialog_h__ -#define __KIconDialog_h__ +#ifndef __TDEIconDialog_h__ +#define __TDEIconDialog_h__ #include <tqstring.h> #include <tqstringlist.h> @@ -27,18 +27,18 @@ class TQTimer; class TQKeyEvent; class TQRadioButton; 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 public: - KIconCanvas(TQWidget *parent=0L, const char *name=0L); - ~KIconCanvas(); + TDEIconCanvas(TQWidget *parent=0L, const char *name=0L); + ~TDEIconCanvas(); /** * Load icons into the canvas. @@ -71,14 +71,14 @@ private slots: private: TQStringList mFiles; TQTimer *mpTimer; - KIconLoader *mpLoader; // unused + TDEIconLoader *mpLoader; // unused protected: virtual void virtual_hook( int id, void* data ); private: - class KIconCanvasPrivate; - KIconCanvasPrivate *d; + class TDEIconCanvasPrivate; + TDEIconCanvasPrivate *d; }; @@ -88,7 +88,7 @@ private: * * @short An icon selection dialog. */ -class TDEIO_EXPORT KIconDialog: public KDialogBase +class TDEIO_EXPORT TDEIconDialog: public KDialogBase { Q_OBJECT @@ -96,16 +96,16 @@ public: /** * 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. */ - KIconDialog(KIconLoader *loader, TQWidget *parent=0, + TDEIconDialog(TDEIconLoader *loader, TQWidget *parent=0, const char *name=0); /** * Destructs the dialog. */ - ~KIconDialog(); + ~TDEIconDialog(); /** * 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. - * @see KIcon::StdSizes + * @see TDEIcon::StdSizes * @see iconSize */ void setIconSize(int size); @@ -141,16 +141,16 @@ public: /** * @deprecated in KDE 3.0, use the static method getIcon instead. */ - TQString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context - context=KIcon::Application, bool user=false); + TQString selectIcon(TDEIcon::Group group=TDEIcon::Desktop, TDEIcon::Context + context=TDEIcon::Application, bool user=false); #endif /** * Allows you to set the same parameters as in the class method * getIcon(). */ - void setup( KIcon::Group group, - KIcon::Context context = KIcon::Application, + void setup( TDEIcon::Group group, + TDEIcon::Context context = TDEIcon::Application, bool strictIconSize = false, int iconSize = 0, bool user = false ); @@ -163,14 +163,14 @@ public: * @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 lockCustomDir ); /** * exec()utes this modal dialog and returns the name of the selected icon, * 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 */ TQString openDialog(); @@ -197,11 +197,11 @@ public: * @param user Begin with the "user icons" instead of "system icons". * @param parent The parent widget of 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 */ - static TQString getIcon(KIcon::Group group=KIcon::Desktop, - KIcon::Context context=KIcon::Application, + static TQString getIcon(TDEIcon::Group group=TDEIcon::Desktop, + TDEIcon::Context context=TDEIcon::Application, bool strictIconSize=false, int iconSize = 0, bool user=false, TQWidget *parent=0, const TQString &caption=TQString::null); @@ -222,10 +222,10 @@ private slots: private: void init(); void showIcons(); - void setContext( KIcon::Context context ); + void setContext( TDEIcon::Context context ); int mGroupOrSize; - KIcon::Context mContext; + TDEIcon::Context mContext; int mType; TQStringList mFileList; @@ -233,28 +233,28 @@ private: TQPushButton *mpBrowseBut; TQRadioButton *mpRb1, *mpRb2; KProgress *mpProgress; - KIconLoader *mpLoader; - KIconCanvas *mpCanvas; + TDEIconLoader *mpLoader; + TDEIconCanvas *mpCanvas; 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: virtual void virtual_hook( int id, void* data ); private: - class KIconDialogPrivate; - KIconDialogPrivate *d; + class TDEIconDialogPrivate; + TDEIconDialogPrivate *d; }; /** * 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. * - * @see KIconDialog + * @see TDEIconDialog * @short A push button that allows selection of an icon. */ -class TDEIO_EXPORT KIconButton: public TQPushButton +class TDEIO_EXPORT TDEIconButton: public TQPushButton { Q_OBJECT TQ_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon ) @@ -263,18 +263,18 @@ class TDEIO_EXPORT KIconButton: public TQPushButton 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. */ - ~KIconButton(); + ~TDEIconButton(); /** * Sets a strict icon size policy for allowed icons. When true, @@ -288,10 +288,10 @@ public: 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. */ - 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. @@ -310,7 +310,7 @@ public: /** * Sets the size of the icon to be shown / selected. - * @see KIcon::StdSizes + * @see TDEIcon::StdSizes * @see iconSize */ void setIconSize( int size ); @@ -333,18 +333,18 @@ private slots: void newIconName(const TQString& name); private: - void init( KIconLoader *loader ); + void init( TDEIconLoader *loader ); bool mbUser; - KIcon::Group mGroup; - KIcon::Context mContext; + TDEIcon::Group mGroup; + TDEIcon::Context mContext; TQString mIcon; - KIconDialog *mpDialog; - KIconLoader *mpLoader; - class KIconButtonPrivate; - KIconButtonPrivate *d; + TDEIconDialog *mpDialog; + TDEIconLoader *mpLoader; + class TDEIconButtonPrivate; + TDEIconButtonPrivate *d; }; -#endif // __KIconDialog_h__ +#endif // __TDEIconDialog_h__ diff --git a/tdeio/tdefile/kimagefilepreview.cpp b/tdeio/tdefile/kimagefilepreview.cpp index f499f4580..6c6722951 100644 --- a/tdeio/tdefile/kimagefilepreview.cpp +++ b/tdeio/tdefile/kimagefilepreview.cpp @@ -160,8 +160,8 @@ void KImageFilePreview::slotFailed( const KFileItem* item ) if ( item->isDir() ) imageLabel->clear(); else if ( item->url() == currentURL ) // should always be the case - imageLabel->setPixmap( SmallIcon( "file_broken", KIcon::SizeLarge, - KIcon::DisabledState )); + imageLabel->setPixmap( SmallIcon( "file_broken", TDEIcon::SizeLarge, + TDEIcon::DisabledState )); } void KImageFilePreview::slotResult( TDEIO::Job *job ) diff --git a/tdeio/tdefile/knotifydialog.cpp b/tdeio/tdefile/knotifydialog.cpp index ad56ca017..bd1abb277 100644 --- a/tdeio/tdefile/knotifydialog.cpp +++ b/tdeio/tdefile/knotifydialog.cpp @@ -251,7 +251,7 @@ KNotifyWidget::KNotifyWidget( TQWidget *parent, const char *name, d->pixmaps[COL_SOUND] = psound; d->pixmaps[COL_TASKBAR] = ptaskbar; - int w = KIcon::SizeSmall + 6; + int w = TDEIcon::SizeSmall + 6; TQHeader *header = m_listview->header(); header->setLabel( COL_EXECUTE, pexec, TQString::null, w ); diff --git a/tdeio/tdefile/kopenwith.cpp b/tdeio/tdefile/kopenwith.cpp index 16876e356..ca0043e70 100644 --- a/tdeio/tdefile/kopenwith.cpp +++ b/tdeio/tdefile/kopenwith.cpp @@ -171,7 +171,7 @@ bool TDEApplicationTree::isDirSel() 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 if (normal.width() > 20 || normal.height() > 20) { diff --git a/tdeio/tdefile/kpropertiesdialog.cpp b/tdeio/tdefile/kpropertiesdialog.cpp index 32644301a..2b8fd1814 100644 --- a/tdeio/tdefile/kpropertiesdialog.cpp +++ b/tdeio/tdefile/kpropertiesdialog.cpp @@ -858,7 +858,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) 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); iconButton->setFixedSize(bsize, bsize); iconButton->setIconSize(48); @@ -872,11 +872,11 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) config.setDesktopGroup(); iconStr = config.readEntry( "Icon" ); if ( config.hasDeviceType() ) - iconButton->setIconType( KIcon::Desktop, KIcon::Device ); + iconButton->setIconType( TDEIcon::Desktop, TDEIcon::Device ); else - iconButton->setIconType( KIcon::Desktop, KIcon::Application ); + iconButton->setIconType( TDEIcon::Desktop, TDEIcon::Application ); } else - iconButton->setIconType( KIcon::Desktop, KIcon::Place ); + iconButton->setIconType( TDEIcon::Desktop, TDEIcon::Place ); iconButton->setIcon(iconStr); iconArea = iconButton; connect( iconButton, TQT_SIGNAL( iconChanged(TQString) ), @@ -885,7 +885,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) TQLabel *iconLabel = new TQLabel( d->m_frame ); int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin); iconLabel->setFixedSize(bsize, bsize); - iconLabel->setPixmap( TDEGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) ); + iconLabel->setPixmap( TDEGlobal::iconLoader()->loadIcon( iconStr, TDEIcon::Desktop, 48) ); iconArea = iconLabel; } grid->addWidget(iconArea, curRow, 0, Qt::AlignLeft); @@ -1427,7 +1427,7 @@ void KFilePropsPlugin::slotCopyFinished( TDEIO::Job * job ) void KFilePropsPlugin::applyIconChanges() { - KIconButton *iconButton = ::tqqt_cast<KIconButton *>( iconArea ); + TDEIconButton *iconButton = ::tqqt_cast<TDEIconButton *>( iconArea ); if ( !iconButton || !d->bIconChanged ) return; // 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); 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); unmounted->setFixedSize(bsize, bsize); - unmounted->setIconType(KIcon::Desktop, KIcon::Device); + unmounted->setIconType(TDEIcon::Desktop, TDEIcon::Device); layout->addWidget(unmounted, 7, 0); label = new TQLabel( i18n("Unmounted Icon"), d->m_frame ); @@ -3272,7 +3272,7 @@ void KDesktopPropsPlugin::slotAddFiletype() } 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" ); if ( mit != majorMap.end()) diff --git a/tdeio/tdefile/kpropertiesdialog.h b/tdeio/tdefile/kpropertiesdialog.h index db89487a8..c67659ba7 100644 --- a/tdeio/tdefile/kpropertiesdialog.h +++ b/tdeio/tdefile/kpropertiesdialog.h @@ -42,7 +42,7 @@ class TQPushButton; class KLineEdit; class KURLRequester; class TQButton; -class KIconButton; +class TDEIconButton; class KPropsDlgPlugin; class TQComboBox; @@ -670,7 +670,7 @@ public: private: KURLRequester *URLEdit; - KIconButton *iconBox; + TDEIconButton *iconBox; TQString URLStr; TQString iconStr; @@ -746,8 +746,8 @@ private: TQLabel* mountpoint; TQCheckBox* readonly; void* unused; - //KIconButton* mounted; - KIconButton* unmounted; + //TDEIconButton* mounted; + TDEIconButton* unmounted; TQStringList m_devicelist; int indexDevice; diff --git a/tdeio/tdefile/kurlbar.cpp b/tdeio/tdefile/kurlbar.cpp index 2642926a1..0f575e4e5 100644 --- a/tdeio/tdefile/kurlbar.cpp +++ b/tdeio/tdefile/kurlbar.cpp @@ -89,8 +89,8 @@ public: KURLBarItem::KURLBarItem( KURLBar *parent, const KURL& url, bool persistent, const TQString& description, - const TQString& icon, KIcon::Group group ) - : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ), + const TQString& icon, TDEIcon::Group group ) + : TQListBoxPixmap( TDEIconLoader::unknown() /*, parent->listBox()*/ ), m_url( url ), m_pixmap( 0L ), m_parent( parent ), @@ -101,8 +101,8 @@ KURLBarItem::KURLBarItem( KURLBar *parent, KURLBarItem::KURLBarItem( KURLBar *parent, const KURL& url, const TQString& description, - const TQString& icon, KIcon::Group group ) - : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ), + const TQString& icon, TDEIcon::Group group ) + : TQListBoxPixmap( TDEIconLoader::unknown() /*, parent->listBox()*/ ), m_url( url ), m_pixmap( 0L ), m_parent( parent ), @@ -111,7 +111,7 @@ KURLBarItem::KURLBarItem( KURLBar *parent, 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 ) { d = new KURLBarItemPrivate; @@ -134,7 +134,7 @@ void KURLBarItem::setURL( const KURL& url ) 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_group = group; @@ -143,7 +143,7 @@ void KURLBarItem::setIcon( const TQString& icon, KIcon::Group group ) m_pixmap = KMimeType::pixmapForURL( m_url, 0, group, iconSize() ); else m_pixmap = TDEGlobal::iconLoader()->loadIcon( icon, group, iconSize(), - KIcon::DefaultState ); + TDEIcon::DefaultState ); } void KURLBarItem::setDescription( const TQString& desc ) @@ -203,7 +203,7 @@ void KURLBarItem::paint( TQPainter *p ) p->setPen( oldPen ); } - if ( m_parent->iconSize() < KIcon::SizeMedium ) { + if ( m_parent->iconSize() < TDEIcon::SizeMedium ) { // small icon -> draw icon next to text // ### mostly cut & paste of TQListBoxPixmap::paint() until Qt 3.1 @@ -274,7 +274,7 @@ TQSize KURLBarItem::sizeHint() const int hmin = 0; 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; 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_isImmutable( false ), m_listBox( 0L ), - m_iconSize( KIcon::SizeMedium ) + m_iconSize( TDEIcon::SizeMedium ) { d = new KURLBarPrivate(); @@ -359,7 +359,7 @@ KURLBar::~KURLBar() KURLBarItem * KURLBar::insertItem(const KURL& url, const TQString& description, bool applicationLocal, - const TQString& icon, KIcon::Group group ) + const TQString& icon, TDEIcon::Group group ) { KURLBarItem *item = new KURLBarItem(this, url, description, icon, group); 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, - const TQString& icon, KIcon::Group group ) + const TQString& icon, TDEIcon::Group group ) { KURLBarItem *item = new KURLBarItem(this, url, false, description, icon, group); m_listBox->insertItem( item ); @@ -622,7 +622,7 @@ void KURLBar::readItem( int i, TDEConfig *config, bool applicationLocal ) description, applicationLocal, config->readEntry( TQString("Icon_") + number ), - static_cast<KIcon::Group>( + static_cast<TDEIcon::Group>( 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(); - bool smallIcons = m_iconSize < KIcon::SizeMedium; + bool smallIcons = m_iconSize < TDEIcon::SizeMedium; TQPopupMenu *popup = new TQPopupMenu(); popup->insertItem( smallIcons ? i18n("&Large Icons") : i18n("&Small Icons"), @@ -761,7 +761,7 @@ void KURLBar::slotContextMenuRequested( TQListBoxItem *_item, const TQPoint& pos int result = popup->exec( pos ); switch ( result ) { case IconSize: - setIconSize( smallIcons ? KIcon::SizeMedium : KIcon::SizeSmallMedium ); + setIconSize( smallIcons ? TDEIcon::SizeMedium : TDEIcon::SizeSmallMedium ); m_listBox->triggerUpdate( true ); break; 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>" "Click on the button to select a different icon.</qt>"); 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 ); if ( icon.isEmpty() ) icon = KMimeType::iconForURL( url ); diff --git a/tdeio/tdefile/kurlbar.h b/tdeio/tdefile/kurlbar.h index 1219a6467..4939fa830 100644 --- a/tdeio/tdefile/kurlbar.h +++ b/tdeio/tdefile/kurlbar.h @@ -58,7 +58,7 @@ public: KURLBarItem( KURLBar *parent, const KURL& url, bool persistent, const TQString& description = 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 @@ -75,7 +75,7 @@ public: KURLBarItem( KURLBar *parent, const KURL& url, const TQString& description = TQString::null, const TQString& icon = TQString::null, - KIcon::Group group = KIcon::Panel ); + TDEIcon::Group group = TDEIcon::Panel ); /** * Destroys the item @@ -89,11 +89,11 @@ public: */ 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. * @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. * @see description @@ -144,7 +144,7 @@ public: * returns the icon-group of this item (determines icon-effects). * @see setIcon */ - KIcon::Group iconGroup() const { return m_group; } + TDEIcon::Group iconGroup() const { return m_group; } /** * returns the pixmap of this item. */ @@ -178,7 +178,7 @@ protected: private: int iconSize() const; - void init( const TQString& icon, KIcon::Group group, + void init( const TQString& icon, TDEIcon::Group group, const TQString& description, bool persistent ); KURL m_url; @@ -186,7 +186,7 @@ private: TQString m_icon; TQString m_toolTip; TQPixmap m_pixmap; - KIcon::Group m_group; + TDEIcon::Group m_group; KURLBar *m_parent; bool m_appLocal :1; @@ -257,7 +257,7 @@ public: const TQString& description, bool applicationLocal = true, 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 * KURLBarItem. @@ -271,7 +271,7 @@ public: virtual KURLBarItem * insertDynamicItem( const KURL& url, const TQString& description, 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 * horizontally in one row. @@ -299,13 +299,13 @@ public: /** * Sets the default iconsize to be used for items inserted with - * insertItem. By default KIcon::SizeMedium. + * insertItem. By default TDEIcon::SizeMedium. * @see iconsize */ virtual void setIconSize( int size ); /** * @returns the default iconsize used for items inserted with - * insertItem. By default KIcon::SizeMedium + * insertItem. By default TDEIcon::SizeMedium * @see setIconSize */ int iconSize() const { return m_iconSize; } @@ -553,7 +553,7 @@ private: class TQCheckBox; -class KIconButton; +class TDEIconButton; class KLineEdit; class KURLRequester; @@ -601,7 +601,7 @@ public: KURLBarItemDialog( bool allowGlobal, const KURL& url, const TQString& description, TQString icon, bool appLocal = true, - int iconSize = KIcon::SizeMedium, + int iconSize = TDEIcon::SizeMedium, TQWidget *parent = 0, const char *name = 0 ); /** * Destroys the dialog. @@ -640,9 +640,9 @@ protected: */ 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 */ diff --git a/tdeio/tdefile/kurlcombobox.cpp b/tdeio/tdefile/kurlcombobox.cpp index e01be4548..150e64b34 100644 --- a/tdeio/tdefile/kurlcombobox.cpp +++ b/tdeio/tdefile/kurlcombobox.cpp @@ -337,7 +337,7 @@ TQPixmap KURLComboBox::getPixmap( const KURL& url ) const if ( myMode == Directories ) return d->dirpix; else - return KMimeType::pixmapForURL( url, 0, KIcon::Small ); + return KMimeType::pixmapForURL( url, 0, TDEIcon::Small ); } diff --git a/tdeio/tdefile/tdefiledetailview.cpp b/tdeio/tdefile/tdefiledetailview.cpp index 68691bf6b..897c99aec 100644 --- a/tdeio/tdefile/tdefiledetailview.cpp +++ b/tdeio/tdefile/tdefiledetailview.cpp @@ -301,7 +301,7 @@ void KFileDetailView::updateView( bool b ) TQListViewItemIterator it( (TQListView*)this ); for ( ; it.current(); ++it ) { 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; if( urls.count() > 1 ) - pixmap = DesktopIcon( "tdemultiple", KIcon::SizeSmall ); + pixmap = DesktopIcon( "tdemultiple", TDEIcon::SizeSmall ); if( pixmap.isNull() ) - pixmap = currentFileItem()->pixmap( KIcon::SizeSmall ); + pixmap = currentFileItem()->pixmap( TDEIcon::SizeSmall ); TQPoint hotspot; hotspot.setX( pixmap.width() / 2 ); @@ -668,7 +668,7 @@ void KFileDetailView::contentsDropEvent( TQDropEvent *e ) 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_SIZE, TDEGlobal::locale()->formatNumber( inf->size(), 0)); diff --git a/tdeio/tdefile/tdefiledialog.cpp b/tdeio/tdefile/tdefiledialog.cpp index 034265065..ad0b20456 100644 --- a/tdeio/tdefile/tdefiledialog.cpp +++ b/tdeio/tdefile/tdefiledialog.cpp @@ -848,12 +848,12 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge u.setPath( TQDir::rootDirPath() ); TQString text = i18n("Root Folder: %1").arg( u.path() ); d->pathCombo->addDefaultURL( u, - KMimeType::pixmapForURL( u, 0, KIcon::Small ), + KMimeType::pixmapForURL( u, 0, TDEIcon::Small ), text ); u.setPath( TQDir::homeDirPath() ); 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 ); KURL docPath; @@ -863,14 +863,14 @@ void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidge { text = i18n("Documents: %1").arg( docPath.path( +1 ) ); d->pathCombo->addDefaultURL( docPath, - KMimeType::pixmapForURL( docPath, 0, KIcon::Small ), + KMimeType::pixmapForURL( docPath, 0, TDEIcon::Small ), text ); } u.setPath( TDEGlobalSettings::desktopPath() ); text = i18n("Desktop: %1").arg( u.path( +1 ) ); d->pathCombo->addDefaultURL( u, - KMimeType::pixmapForURL( u, 0, KIcon::Small ), + KMimeType::pixmapForURL( u, 0, TDEIcon::Small ), text ); d->url = getStartURL( startDir, d->fileClass ); diff --git a/tdeio/tdefile/tdefileiconview.cpp b/tdeio/tdefile/tdefileiconview.cpp index ab4be248a..406e3d3fe 100644 --- a/tdeio/tdefile/tdefileiconview.cpp +++ b/tdeio/tdefile/tdefileiconview.cpp @@ -113,7 +113,7 @@ public: }; KFileIconView::KFileIconView(TQWidget *parent, const char *name) - : KIconView(parent, name), KFileView() + : TDEIconView(parent, name), KFileView() { d = new KFileIconViewPrivate( this ); @@ -126,8 +126,8 @@ KFileIconView::KFileIconView(TQWidget *parent, const char *name) setArrangement( TopToBottom ); setAutoArrange( true ); setItemsMovable( false ); - setMode( KIconView::Select ); - KIconView::setSorting( true ); + setMode( TDEIconView::Select ); + TDEIconView::setSorting( true ); // 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 setShowToolTips( false ); @@ -286,12 +286,12 @@ void KFileIconView::slotActivateMenu( TQIconViewItem* item, const TQPoint& pos ) void KFileIconView::hideEvent( TQHideEvent *e ) { removeToolTip(); - KIconView::hideEvent( e ); + TDEIconView::hideEvent( e ); } void KFileIconView::keyPressEvent( TQKeyEvent *e ) { - KIconView::keyPressEvent( e ); + TDEIconView::keyPressEvent( e ); // ignore Ctrl-Return so that the dialog can catch it. if ( (e->state() & ControlButton) && @@ -303,7 +303,7 @@ void KFileIconView::setSelected( const KFileItem *info, bool enable ) { KFileIconViewItem *item = viewItem( info ); if ( item ) - KIconView::setSelected( item, enable, true ); + TDEIconView::setSelected( item, enable, true ); } void KFileIconView::selectAll() @@ -312,24 +312,24 @@ void KFileIconView::selectAll() KFileView::selectionMode() == KFile::Single) return; - KIconView::selectAll( true ); + TDEIconView::selectAll( true ); } void KFileIconView::clearSelection() { - KIconView::clearSelection(); + TDEIconView::clearSelection(); } void KFileIconView::invertSelection() { - KIconView::invertSelection(); + TDEIconView::invertSelection(); } void KFileIconView::clearView() { m_resolver->m_lstPendingMimeIconItems.clear(); - KIconView::clear(); + TDEIconView::clear(); stopPreview(); } @@ -376,7 +376,7 @@ void KFileIconView::setCurrentItem( const KFileItem *item ) { KFileIconViewItem *it = viewItem( item ); if ( it ) - KIconView::setCurrentItem( it ); + TDEIconView::setCurrentItem( it ); } KFileItem * KFileIconView::currentFileItem() const @@ -510,7 +510,7 @@ void KFileIconView::ensureItemVisible( const KFileItem *i ) { KFileIconViewItem *item = viewItem( i ); if ( item ) - KIconView::ensureItemVisible( item ); + TDEIconView::ensureItemVisible( item ); } void KFileIconView::slotSelectionChanged() @@ -538,7 +538,7 @@ void KFileIconView::slotSmallColumns() setSpacing( 0 ); d->noArrangement = false; // now we can arrange - setIconSize( KIcon::SizeSmall ); + setIconSize( TDEIcon::SizeSmall ); } void KFileIconView::slotLargeRows() @@ -547,14 +547,14 @@ void KFileIconView::slotLargeRows() // setIconSize() all call arrangeItemsInGrid() :( Prevent this. d->noArrangement = true; // stop arrangeItemsInGrid()! - setGridX( TDEGlobal::iconLoader()->currentSize( KIcon::Desktop ) + 50 ); + setGridX( TDEGlobal::iconLoader()->currentSize( TDEIcon::Desktop ) + 50 ); setItemTextPos( Bottom ); setArrangement( LeftToRight ); setWordWrapIconText( true ); setSpacing( 5 ); // default in QIconView d->noArrangement = false; // now we can arrange - setIconSize( KIcon::SizeMedium ); + setIconSize( TDEIcon::SizeMedium ); } void KFileIconView::stopPreview() @@ -612,11 +612,11 @@ void KFileIconView::gotPreview( const KFileItem *item, const TQPixmap& pix ) { KFileIconViewItem *it = viewItem( item ); if ( it ) - if( item->overlays() & KIcon::HiddenOverlay ) + if( item->overlays() & TDEIcon::HiddenOverlay ) { TQPixmap p( pix ); - KIconEffect::semiTransparent( p ); + TDEIconEffect::semiTransparent( p ); it->setPixmap( p ); } else @@ -697,7 +697,7 @@ void KFileIconView::setSorting( TQDir::SortSpec spec ) spec )); } - KIconView::setSorting( true, !isReversed() ); + TDEIconView::setSorting( true, !isReversed() ); sort( !isReversed() ); } @@ -725,8 +725,8 @@ void KFileIconView::listingCompleted() bool block = signalsBlocked(); blockSignals( true ); TQIconViewItem *item = viewItem( firstFileItem() ); - KIconView::setCurrentItem( item ); - KIconView::setSelected( item, false ); + TDEIconView::setCurrentItem( item ); + TDEIconView::setSelected( item, false ); blockSignals( block ); } @@ -743,7 +743,7 @@ bool KFileIconView::eventFilter( TQObject *o, TQEvent *e ) 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 void KFileIconView::showEvent( TQShowEvent *e ) { - KIconView::showEvent( e ); + TDEIconView::showEvent( e ); } @@ -794,7 +794,7 @@ void KFileIconView::arrangeItemsInGrid( bool update ) if ( d->noArrangement ) return; - KIconView::arrangeItemsInGrid( update ); + TDEIconView::arrangeItemsInGrid( update ); } void KFileIconView::zoomIn() @@ -937,7 +937,7 @@ void KFileIconView::contentsDropEvent( TQDropEvent *e ) } void KFileIconView::virtual_hook( int id, void* data ) -{ KIconView::virtual_hook( id, data ); +{ TDEIconView::virtual_hook( id, data ); KFileView::virtual_hook( id, data ); } #include "tdefileiconview.moc" diff --git a/tdeio/tdefile/tdefileiconview.h b/tdeio/tdefile/tdefileiconview.h index 9ec5d7b1d..0c46e4ffd 100644 --- a/tdeio/tdefile/tdefileiconview.h +++ b/tdeio/tdefile/tdefileiconview.h @@ -37,18 +37,18 @@ class TQLabel; * An item for the iconview, that has a reference to its corresponding * KFileItem. */ -class TDEIO_EXPORT KFileIconViewItem : public KIconViewItem +class TDEIO_EXPORT KFileIconViewItem : public TDEIconViewItem { public: KFileIconViewItem( TQIconView *parent, const TQString &text, const TQPixmap &pixmap, KFileItem *fi ) - : KIconViewItem( parent, text, pixmap ), inf( fi ) {} + : TDEIconViewItem( parent, text, pixmap ), inf( fi ) {} /** * @since 3.1 */ KFileIconViewItem( TQIconView *parent, KFileItem *fi ) - : KIconViewItem( parent ), inf( fi ) {} + : TDEIconViewItem( parent ), inf( fi ) {} virtual ~KFileIconViewItem(); @@ -80,7 +80,7 @@ namespace TDEIO { * @see KCombiView * @see KFileDetailView */ -class TDEIO_EXPORT KFileIconView : public KIconView, public KFileView +class TDEIO_EXPORT KFileIconView : public TDEIconView, public KFileView { Q_OBJECT @@ -114,12 +114,12 @@ public: 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 ); /** - * Sets the size of the previews. Defaults to KIcon::SizeLarge. + * Sets the size of the previews. Defaults to TDEIcon::SizeLarge. */ void setPreviewSize( int size ); @@ -150,7 +150,7 @@ public: TQScrollView *scrollWidget() const { return (TQScrollView*) this; } void setAcceptDrops(bool b) { - KIconView::setAcceptDrops(b); + TDEIconView::setAcceptDrops(b); viewport()->setAcceptDrops(b); } @@ -239,9 +239,9 @@ private: int th; int myIconSize; - virtual void insertItem(TQIconViewItem *a, TQIconViewItem *b) { KIconView::insertItem(a, b); } - virtual void setSelectionMode(TQIconView::SelectionMode m) { KIconView::setSelectionMode(m); } - virtual void setSelected(TQIconViewItem *i, bool a, bool b) { KIconView::setSelected(i, a, b); } + virtual void insertItem(TQIconViewItem *a, TQIconViewItem *b) { TDEIconView::insertItem(a, b); } + virtual void setSelectionMode(TQIconView::SelectionMode m) { TDEIconView::setSelectionMode(m); } + virtual void setSelected(TQIconViewItem *i, bool a, bool b) { TDEIconView::setSelected(i, a, b); } bool canPreview( const KFileItem * ) const; void stopPreview(); diff --git a/tdeio/tdefile/tdefilespeedbar.cpp b/tdeio/tdefile/tdefilespeedbar.cpp index ca7e19003..defcb2157 100644 --- a/tdeio/tdefile/tdefilespeedbar.cpp +++ b/tdeio/tdefile/tdefilespeedbar.cpp @@ -39,7 +39,7 @@ KFileSpeedBar::KFileSpeedBar( TQWidget *parent, const char *name ) TDEConfigGroupSaver cs( config, ConfigGroup ); m_initializeSpeedbar = config->readBoolEntry( "Set speedbar defaults", true ); - setIconSize(KIcon::SizeSmallMedium); + setIconSize(TDEIcon::SizeSmallMedium); readConfig( TDEGlobal::config(), "KFileDialog Speedbar" ); if ( m_initializeSpeedbar ) diff --git a/tdeio/tdefile/tdefiletreebranch.cpp b/tdeio/tdefile/tdefiletreebranch.cpp index f95cb4d47..b55c3ffb2 100644 --- a/tdeio/tdefile/tdefiletreebranch.cpp +++ b/tdeio/tdefile/tdefiletreebranch.cpp @@ -143,7 +143,7 @@ void KFileTreeBranch::slotRefreshItems( const KFileItemList& list ) { item = findTVIByURL(currItem->url()); if (item) { - item->setPixmap(0, item->fileItem()->pixmap( KIcon::SizeSmall )); + item->setPixmap(0, item->fileItem()->pixmap( TDEIcon::SizeSmall )); item->setText( 0, item->fileItem()->text()); } ++it; diff --git a/tdeio/tdefile/tdefiletreeview.cpp b/tdeio/tdefile/tdefiletreeview.cpp index fd7d630e1..6138b3863 100644 --- a/tdeio/tdefile/tdefiletreeview.cpp +++ b/tdeio/tdefile/tdefiletreeview.cpp @@ -79,7 +79,7 @@ KFileTreeView::KFileTreeView( TQWidget *parent, const char *name ) m_bDrag = false; m_branches.setAutoDelete( true ); - m_openFolderPixmap = DesktopIcon( "folder_open",KIcon::SizeSmall,KIcon::ActiveState ); + m_openFolderPixmap = DesktopIcon( "folder_open",TDEIcon::SizeSmall,TDEIcon::ActiveState ); } KFileTreeView::~KFileTreeView() @@ -357,7 +357,7 @@ void KFileTreeView::slotSelectionChanged() KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name, 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); } @@ -491,7 +491,7 @@ TQPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const else { // 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, * change the fileitem's pixmap to the open folder pixmap. */ @@ -524,7 +524,7 @@ void KFileTreeView::slotAnimation() uint & iconNumber = it.data().iconNumber; TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) ); // 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++; if ( iconNumber > it.data().iconCount ) diff --git a/tdeio/tdefile/tdefiletreeviewitem.cpp b/tdeio/tdefile/tdefiletreeviewitem.cpp index 3f7e5a485..8879c5675 100644 --- a/tdeio/tdefile/tdefiletreeviewitem.cpp +++ b/tdeio/tdefile/tdefiletreeviewitem.cpp @@ -34,7 +34,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent, m_branch( brnch ), m_wasListed(false) { - setPixmap(0, item->pixmap( KIcon::SizeSmall )); + setPixmap(0, item->pixmap( TDEIcon::SizeSmall )); setText( 0, item->text()); } @@ -47,7 +47,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent, m_branch( brnch ), m_wasListed(false) { - setPixmap(0, item->pixmap( KIcon::SizeSmall )); + setPixmap(0, item->pixmap( TDEIcon::SizeSmall )); setText( 0, item->text()); } diff --git a/tdeio/tdefile/tests/kfstest.cpp b/tdeio/tdefile/tests/kfstest.cpp index f6ee69687..0a2a698f5 100644 --- a/tdeio/tdefile/tests/kfstest.cpp +++ b/tdeio/tdefile/tests/kfstest.cpp @@ -125,7 +125,7 @@ int main(int argc, char **argv) } else if (argv1 == TQString::fromLatin1("icon")) { - KIconDialog dlg; + TDEIconDialog dlg; TQString icon = dlg.selectIcon(); kdDebug() << icon << endl; } diff --git a/tdeio/tdefile/tests/kicondialogtest.cpp b/tdeio/tdefile/tests/kicondialogtest.cpp index b2c56e159..c3f7a827d 100644 --- a/tdeio/tdefile/tests/kicondialogtest.cpp +++ b/tdeio/tdefile/tests/kicondialogtest.cpp @@ -5,9 +5,9 @@ int main( int argc, char **argv ) { TDEApplication app( argc, argv, "kicondialogtest" ); -// KIconDialog::getIcon(); +// TDEIconDialog::getIcon(); - KIconButton button; + TDEIconButton button; app.setMainWidget( &button ); button.show(); diff --git a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp index dfa59540d..689472597 100644 --- a/tdeio/tdefile/tests/tdefiletreeviewtest.cpp +++ b/tdeio/tdefile/tests/tdefiletreeviewtest.cpp @@ -66,9 +66,9 @@ void testFrame::showPath( const KURL &url ) { TQString fname = "TestBranch"; // url.fileName (); /* try a user icon */ - KIconLoader *loader = TDEGlobal::iconLoader(); - TQPixmap pix = loader->loadIcon( "contents2", KIcon::Small ); - TQPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small ); + TDEIconLoader *loader = TDEGlobal::iconLoader(); + TQPixmap pix = loader->loadIcon( "contents2", TDEIcon::Small ); + TQPixmap pixOpen = loader->loadIcon( "contents", TDEIcon::Small ); KFileTreeBranch *nb = treeView->addBranch( url, fname, pix ); diff --git a/tdeio/tdeio/defaultprogress.cpp b/tdeio/tdeio/defaultprogress.cpp index a4de9c31b..10db4fde7 100644 --- a/tdeio/tdeio/defaultprogress.cpp +++ b/tdeio/tdeio/defaultprogress.cpp @@ -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 // Set a useful icon for this window! KWin::setIcons( winId(), - TDEGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 32 ), - TDEGlobal::iconLoader()->loadIcon( "filesave", KIcon::NoGroup, 16 ) ); + TDEGlobal::iconLoader()->loadIcon( "filesave", TDEIcon::NoGroup, 32 ), + TDEGlobal::iconLoader()->loadIcon( "filesave", TDEIcon::NoGroup, 16 ) ); #endif TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(), diff --git a/tdeio/tdeio/kmimetype.cpp b/tdeio/tdeio/kmimetype.cpp index 243388cbc..c610e7e3f 100644 --- a/tdeio/tdeio/kmimetype.cpp +++ b/tdeio/tdeio/kmimetype.cpp @@ -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 { - KIconLoader *iconLoader=TDEGlobal::iconLoader(); + TDEIconLoader *iconLoader=TDEGlobal::iconLoader(); TQString iconName=icon( TQString::null, false ); 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 ); } -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 { - KIconLoader *iconLoader=TDEGlobal::iconLoader(); + TDEIconLoader *iconLoader=TDEGlobal::iconLoader(); TQString iconName=icon( _url, _url.isLocalFile() ); 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 ); } -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 ) { - KIconLoader *iconLoader=TDEGlobal::iconLoader(); + TDEIconLoader *iconLoader=TDEGlobal::iconLoader(); TQString iconName = iconForURL( _url, _mode ); if (!iconLoader->extraDesktopThemesAdded()) @@ -745,7 +745,7 @@ TQString KDEDesktopMimeType::icon( const KURL& _url, bool _is_local ) const 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 { TQString _icon = icon( _url, _url.isLocalFile() ); diff --git a/tdeio/tdeio/kmimetype.h b/tdeio/tdeio/kmimetype.h index 42f1cad8d..894c4556c 100644 --- a/tdeio/tdeio/kmimetype.h +++ b/tdeio/tdeio/kmimetype.h @@ -120,13 +120,13 @@ public: * @param group The icon group where the icon is going to be used. * @param force_size Override globallly configured icon size. * Use 0 for the default size - * @param state The icon state, one of: @p KIcon::DefaultState, - * @p KIcon::ActiveState or @p KIcon::DisabledState. + * @param state The icon state, one of: @p TDEIcon::DefaultState, + * @p TDEIcon::ActiveState or @p TDEIcon::DisabledState. * @param path Output parameter to get the full path. Seldom needed. * Ignored if 0 * @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; /** @@ -139,13 +139,13 @@ public: * @param _group The icon group where the icon is going to be used. * @param _force_size Override globallly configured icon size. * Use 0 for the default size - * @param _state The icon state, one of: KIcon::DefaultState, - * KIcon::ActiveState or KIcon::DisabledState. + * @param _state The icon state, one of: TDEIcon::DefaultState, + * TDEIcon::ActiveState or TDEIcon::DisabledState. * @param _path Output parameter to get the full path. Seldom needed. * Ignored if 0 * @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; /** @@ -160,19 +160,19 @@ public: * @param _group The icon group where the icon is going to be used. * @param _force_size Override globally configured icon size. * Use 0 for the default size - * @param _state The icon state, one of: KIcon::DefaultState, - * KIcon::ActiveState or KIcon::DisabledState. + * @param _state The icon state, one of: TDEIcon::DefaultState, + * TDEIcon::ActiveState or TDEIcon::DisabledState. * @param _path Output parameter to get the full path. Seldom needed. * Ignored if 0 * @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 ); /** * 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 * later on for any kind of size. * @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 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; virtual TQString comment( const TQString& _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 ); 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 { return KMimeType::pixmap( group, force_size, state, path ); } diff --git a/tdeio/tdeio/kservice.cpp b/tdeio/tdeio/kservice.cpp index 29ce88859..5147af0ad 100644 --- a/tdeio/tdeio/kservice.cpp +++ b/tdeio/tdeio/kservice.cpp @@ -308,9 +308,9 @@ KService::~KService() 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()) { TQPixmap pixmap=iconLoader->loadIcon( m_strIcon, _group, _force_size, _state, _path, true ); diff --git a/tdeio/tdeio/kservice.h b/tdeio/tdeio/kservice.h index a2e00d740..02519c1e8 100644 --- a/tdeio/tdeio/kservice.h +++ b/tdeio/tdeio/kservice.h @@ -129,7 +129,7 @@ public: * null if not set * @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; /** * Checks whethe the service should be run in a terminal. diff --git a/tdeio/tdeio/kurifilter.cpp b/tdeio/tdeio/kurifilter.cpp index 49953e5b7..809e2f504 100644 --- a/tdeio/tdeio/kurifilter.cpp +++ b/tdeio/tdeio/kurifilter.cpp @@ -186,7 +186,7 @@ TQString KURIFilterData::iconName() if (service && service->icon() != TQString::fromLatin1( "unknown" )) { 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; } else { @@ -200,7 +200,7 @@ TQString KURIFilterData::iconName() if (service && service->icon() != TQString::fromLatin1( "unknown" )) { 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; } else { diff --git a/tdeio/tdeio/kurlpixmapprovider.cpp b/tdeio/tdeio/kurlpixmapprovider.cpp index caeedf066..b0ecb7e43 100644 --- a/tdeio/tdeio/kurlpixmapprovider.cpp +++ b/tdeio/tdeio/kurlpixmapprovider.cpp @@ -26,7 +26,7 @@ TQPixmap KURLPixmapProvider::pixmapFor( const TQString& url, int size ) { u.setPath( url ); else 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 ) diff --git a/tdeio/tdeio/kurlpixmapprovider.h b/tdeio/tdeio/kurlpixmapprovider.h index 82be4bd1b..3dad217e3 100644 --- a/tdeio/tdeio/kurlpixmapprovider.h +++ b/tdeio/tdeio/kurlpixmapprovider.h @@ -48,7 +48,7 @@ public: * @param url the URL to fetch a pixmap for * @param size the size of the pixmap in pixels, or 0 for default. * @return the resulting pixmap - * @see KIcon::StdSizes + * @see TDEIcon::StdSizes */ virtual TQPixmap pixmapFor( const TQString& url, int size = 0 ); protected: diff --git a/tdeio/tdeio/passdlg.cpp b/tdeio/tdeio/passdlg.cpp index 54bcec3b2..942d16c64 100644 --- a/tdeio/tdeio/passdlg.cpp +++ b/tdeio/tdeio/passdlg.cpp @@ -82,7 +82,7 @@ void PasswordDialog::init( const TQString& prompt, const TQString& user, // Row 0: pixmap prompt 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() ) { lbl = new TQLabel( main ); diff --git a/tdeio/tdeio/tdefileitem.cpp b/tdeio/tdeio/tdefileitem.cpp index bd043504a..3d09e6877 100644 --- a/tdeio/tdeio/tdefileitem.cpp +++ b/tdeio/tdeio/tdefileitem.cpp @@ -570,14 +570,14 @@ int KFileItem::overlays() const { int _state = 0; 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 && !isReadable()) - _state |= KIcon::LockOverlay; + _state |= TDEIcon::LockOverlay; if ( isHidden() ) - _state |= KIcon::HiddenOverlay; + _state |= TDEIcon::HiddenOverlay; if( S_ISDIR( m_fileMode ) && m_bIsLocalURL) { @@ -585,12 +585,12 @@ int KFileItem::overlays() const KNFSShare::instance()->isDirectoryShared( m_url.path() )) { //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" ) - _state |= KIcon::ZipOverlay; + _state |= TDEIcon::ZipOverlay; return _state; } @@ -632,7 +632,7 @@ TQPixmap KFileItem::pixmap( int _size, int _state ) const bool 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; if (p.isNull()) kdWarning() << "Pixmap not found for mimetype " << m_pMimeType->name() << endl; diff --git a/tdeio/tdeio/tdefileitem.h b/tdeio/tdeio/tdefileitem.h index 45970f814..95207a537 100644 --- a/tdeio/tdeio/tdefileitem.h +++ b/tdeio/tdeio/tdefileitem.h @@ -346,14 +346,14 @@ public: * Returns a pixmap representing the file. * @param _size Size for the pixmap in pixels. Zero will return the * globally configured default size. - * @param _state The state of the icon: KIcon::DefaultState, - * KIcon::ActiveState or KIcon::DisabledState. + * @param _state The state of the icon: TDEIcon::DefaultState, + * TDEIcon::ActiveState or TDEIcon::DisabledState. * @return the pixmap */ 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 * a file can be modified. * @return the overlays of the pixmap diff --git a/tdeio/tests/tdesycocatest.cpp b/tdeio/tests/tdesycocatest.cpp index 5990d1225..e1b40339f 100644 --- a/tdeio/tests/tdesycocatest.cpp +++ b/tdeio/tests/tdesycocatest.cpp @@ -202,7 +202,7 @@ int main(int argc, char *argv[]) // debug("\nTrying findByURL for folder_home.png"); 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 ); assert( mf ); check( "A PNG's mimetype", mf->name(), "image/png" ); |