diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-04 14:05:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-04 14:05:40 -0600 |
commit | 1d4158dd755a445fd42f2db7db5abab8084175cd (patch) | |
tree | 71ca5f966ca25d2a47b66ae27f7bb06c34d190bf /lib | |
parent | 391e0b69f256bab8971430050c65f0e6e7eea9be (diff) | |
download | koffice-1d4158dd755a445fd42f2db7db5abab8084175cd.tar.gz koffice-1d4158dd755a445fd42f2db7db5abab8084175cd.zip |
Rename KIcon to enhance compatibility with KDE4
Diffstat (limited to 'lib')
-rw-r--r-- | lib/kofficecore/KoDocumentInfoDlg.cpp | 12 | ||||
-rw-r--r-- | lib/kofficecore/KoOpenPane.cpp | 2 | ||||
-rw-r--r-- | lib/kofficecore/KoTemplates.cpp | 2 | ||||
-rw-r--r-- | lib/kofficeui/KoInsertLink.cpp | 8 | ||||
-rw-r--r-- | lib/kofficeui/KoSelectAction.cpp | 2 | ||||
-rw-r--r-- | lib/kofficeui/KoTemplateChooseDia.h | 14 | ||||
-rw-r--r-- | lib/kofficeui/KoTemplateCreateDia.cpp | 4 | ||||
-rw-r--r-- | lib/kofficeui/kcoloractions.cpp | 4 | ||||
-rw-r--r-- | lib/kofficeui/tkcoloractions.cpp | 2 | ||||
-rw-r--r-- | lib/kofficeui/ttdeaction.cpp | 2 | ||||
-rw-r--r-- | lib/kofficeui/ttdetoolbarbutton.cpp | 18 | ||||
-rw-r--r-- | lib/koproperty/editors/booledit.cpp | 6 | ||||
-rw-r--r-- | lib/kross/main/wdgscriptsmanager.cpp | 18 |
13 files changed, 47 insertions, 47 deletions
diff --git a/lib/kofficecore/KoDocumentInfoDlg.cpp b/lib/kofficecore/KoDocumentInfoDlg.cpp index 93236c2b..61bbe0d4 100644 --- a/lib/kofficecore/KoDocumentInfoDlg.cpp +++ b/lib/kofficecore/KoDocumentInfoDlg.cpp @@ -202,9 +202,9 @@ void KoDocumentInfoDlg::addAuthorPage( KoDocumentInfoAuthor *authorInfo ) { TQVBox *page = d->m_dialog->addVBoxPage( i18n( "Author" ) ); d->m_authorWidget = new KoDocumentInfoAuthorWidget( page ); - d->m_authorWidget->labelAuthor->setPixmap( TDEGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, 48 ) ); - d->m_authorWidget->pbLoadKABC->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Small ) ) ); - d->m_authorWidget->pbDelete->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "eraser", KIcon::Small ) ) ); + d->m_authorWidget->labelAuthor->setPixmap( TDEGlobal::iconLoader()->loadIcon( "personal", TDEIcon::Desktop, 48 ) ); + d->m_authorWidget->pbLoadKABC->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "kaddressbook", TDEIcon::Small ) ) ); + d->m_authorWidget->pbDelete->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "eraser", TDEIcon::Small ) ) ); d->m_authorWidget->leFullName->setText( authorInfo->fullName() ); d->m_authorWidget->leInitial->setText( authorInfo->initial() ); @@ -256,13 +256,13 @@ void KoDocumentInfoDlg::addAboutPage( KoDocumentInfoAbout *aboutInfo ) { TQVBox *page = d->m_dialog->addVBoxPage( i18n( "General" ) ); d->m_aboutWidget = new KoDocumentInfoAboutWidget( page ); - d->m_aboutWidget->pbReset->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "reload", KIcon::Small ) ) ); + d->m_aboutWidget->pbReset->setIconSet( TQIconSet( TDEGlobal::iconLoader()->loadIcon( "reload", TDEIcon::Small ) ) ); KoDocument* doc = dynamic_cast< KoDocument* >( d->m_info->parent() ); if ( doc ) { d->m_aboutWidget->leDocFile->setText( doc->file() ); d->m_aboutWidget->labelType->setText( KMimeType::mimeType( doc->mimeType() )->comment() ); - d->m_aboutWidget->pixmapLabel->setPixmap( KMimeType::mimeType( doc->mimeType() )->pixmap( KIcon::Desktop, 48 ) ); + d->m_aboutWidget->pixmapLabel->setPixmap( KMimeType::mimeType( doc->mimeType() )->pixmap( TDEIcon::Desktop, 48 ) ); } if ( aboutInfo->creationDate() != TQString() ) d->m_aboutWidget->labelCreated->setText( aboutInfo->creationDate() + ", " + aboutInfo->initialCreator() ); @@ -302,7 +302,7 @@ void KoDocumentInfoDlg::addUserMetadataPage( KoDocumentInfoUserMetadata *userMet TQString name = it.key(); TQString value = it.data(); TDEListViewItem* it = new TDEListViewItem( d->m_metaWidget->metaListView, name, value ); - it->setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "text", KIcon::Small ) ); + it->setPixmap( 0, TDEGlobal::iconLoader()->loadIcon( "text", TDEIcon::Small ) ); } } diff --git a/lib/kofficecore/KoOpenPane.cpp b/lib/kofficecore/KoOpenPane.cpp index 6459171a..16608406 100644 --- a/lib/kofficecore/KoOpenPane.cpp +++ b/lib/kofficecore/KoOpenPane.cpp @@ -258,7 +258,7 @@ void KoOpenPane::setCustomDocumentWidget(TQWidget *widget) { TQListViewItem* KoOpenPane::addPane(const TQString& title, const TQString& icon, TQWidget* widget, int sortWeight) { - return addPane(title, SmallIcon(icon, KIcon::SizeLarge, KIcon::DefaultState, d->m_instance), + return addPane(title, SmallIcon(icon, TDEIcon::SizeLarge, TDEIcon::DefaultState, d->m_instance), widget, sortWeight); } diff --git a/lib/kofficecore/KoTemplates.cpp b/lib/kofficecore/KoTemplates.cpp index 68daddb0..dd8410e3 100644 --- a/lib/kofficecore/KoTemplates.cpp +++ b/lib/kofficecore/KoTemplates.cpp @@ -66,7 +66,7 @@ const TQPixmap &KoTemplate::loadPicture( TDEInstance* instance ) { m_pixmap.convertFromImage(img); return m_pixmap; } else { // relative path - m_pixmap = instance->iconLoader()->loadIcon( m_picture, KIcon::Desktop, 128 ); + m_pixmap = instance->iconLoader()->loadIcon( m_picture, TDEIcon::Desktop, 128 ); return m_pixmap; } } diff --git a/lib/kofficeui/KoInsertLink.cpp b/lib/kofficeui/KoInsertLink.cpp index 1f1d2f4c..1329f8a9 100644 --- a/lib/kofficeui/KoInsertLink.cpp +++ b/lib/kofficeui/KoInsertLink.cpp @@ -42,21 +42,21 @@ KoInsertLinkDia::KoInsertLinkDia( TQWidget *parent, const char *name, bool displ KDialogBase::Ok, parent, name ) { bookmarkLink = 0L; - TQVBox *page=addVBoxPage(i18n("Internet"), TQString(),BarIcon("html",KIcon::SizeMedium)); + TQVBox *page=addVBoxPage(i18n("Internet"), TQString(),BarIcon("html",TDEIcon::SizeMedium)); internetLink = new internetLinkPage(page ); connect(internetLink,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged ( ))); - page=addVBoxPage(i18n("Mail & News"), TQString(),BarIcon("mail_generic",KIcon::SizeMedium)); + page=addVBoxPage(i18n("Mail & News"), TQString(),BarIcon("mail_generic",TDEIcon::SizeMedium)); mailLink = new mailLinkPage(page ); connect(mailLink,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged ())); - page=addVBoxPage(i18n("File"), TQString(),BarIcon("filenew",KIcon::SizeMedium)); + page=addVBoxPage(i18n("File"), TQString(),BarIcon("filenew",TDEIcon::SizeMedium)); fileLink = new fileLinkPage(page ); connect(fileLink,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged ())); if ( displayBookmarkLink) { - page=addVBoxPage(i18n("Bookmark"), TQString(),BarIcon("bookmark",KIcon::SizeMedium)); + page=addVBoxPage(i18n("Bookmark"), TQString(),BarIcon("bookmark",TDEIcon::SizeMedium)); bookmarkLink = new bookmarkLinkPage(page ); connect(bookmarkLink,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged ())); } diff --git a/lib/kofficeui/KoSelectAction.cpp b/lib/kofficeui/KoSelectAction.cpp index a5b057bc..0c6abfaa 100644 --- a/lib/kofficeui/KoSelectAction.cpp +++ b/lib/kofficeui/KoSelectAction.cpp @@ -98,7 +98,7 @@ int KoSelectAction::plug(TQWidget* widget, int index) if ( hasIconSet() ) id = menu->insertItem( iconSet(), text(), popupMenu(), -1, index ); else - id = menu->insertItem( kapp->iconLoader()->loadIcon(icon(), KIcon::Small), + id = menu->insertItem( kapp->iconLoader()->loadIcon(icon(), TDEIcon::Small), text(), popupMenu(), -1, index ); if ( !isEnabled() ) diff --git a/lib/kofficeui/KoTemplateChooseDia.h b/lib/kofficeui/KoTemplateChooseDia.h index ba6f17e1..6797a69c 100644 --- a/lib/kofficeui/KoTemplateChooseDia.h +++ b/lib/kofficeui/KoTemplateChooseDia.h @@ -37,16 +37,16 @@ class KoTemplateGroup; class TQGridLayout; /** - * Our reimplementation of KIconCanvas used within the template-chooser dialog. + * Our reimplementation of TDEIconCanvas used within the template-chooser dialog. * @internal */ -class KoTCDIconCanvas : public KIconCanvas +class KoTCDIconCanvas : public TDEIconCanvas { Q_OBJECT public: KoTCDIconCanvas( TQWidget *parent = 0, const char *name = 0L ) - : KIconCanvas( parent, name ) {} + : TDEIconCanvas( parent, name ) {} bool isCurrentValid() { return currentItem(); } TQIconViewItem * load(KoTemplateGroup *group, const TQString& name, TDEInstance* instance); @@ -56,21 +56,21 @@ class KoTCDIconCanvas : public KIconCanvas if ( e->key() == Key_Return || e->key() == Key_Enter ) e->ignore(); else - KIconCanvas::keyPressEvent( e ); + TDEIconCanvas::keyPressEvent( e ); } }; /// @internal -class KoTCDIconViewItem : public KIconViewItem +class KoTCDIconViewItem : public TDEIconViewItem { public: KoTCDIconViewItem(TQIconView *parent=0) - : KIconViewItem ( parent ) + : TDEIconViewItem ( parent ) {} KoTCDIconViewItem(TQIconView *parent=0, const TQString &text=0, const TQPixmap &icon=0, const TQString &descr=0, const TQString &fullname=0) - : KIconViewItem(parent, text, icon) + : TDEIconViewItem(parent, text, icon) { m_descr = descr; m_full = fullname; diff --git a/lib/kofficeui/KoTemplateCreateDia.cpp b/lib/kofficeui/KoTemplateCreateDia.cpp index 9b1f213c..09e7833e 100644 --- a/lib/kofficeui/KoTemplateCreateDia.cpp +++ b/lib/kofficeui/KoTemplateCreateDia.cpp @@ -367,7 +367,7 @@ void KoTemplateCreateDia::slotSelect() { d->m_default->setChecked(false); d->m_custom->setChecked(true); - TQString name = KIconDialog::getIcon(); + TQString name = TDEIconDialog::getIcon(); if( name.isEmpty() ) { if(d->m_customFile.isEmpty()) { d->m_default->setChecked(true); @@ -376,7 +376,7 @@ void KoTemplateCreateDia::slotSelect() { return; } // ### TODO: do a better remote loading without having to have d->m_tempFile - TQString path = TDEGlobal::iconLoader()->iconPath(name, KIcon::Desktop); + TQString path = TDEGlobal::iconLoader()->iconPath(name, TDEIcon::Desktop); d->m_customFile = path; d->m_customPixmap=TQPixmap(); updatePixmap(); diff --git a/lib/kofficeui/kcoloractions.cpp b/lib/kofficeui/kcoloractions.cpp index 2f9a41e2..0bbf4ff8 100644 --- a/lib/kofficeui/kcoloractions.cpp +++ b/lib/kofficeui/kcoloractions.cpp @@ -251,7 +251,7 @@ int TDESelectColorAction::plug( TQWidget* w, int index ) else instance = TDEGlobal::instance(); */ - id = menu->insertItem( iconSet( KIcon::Small, 0 ), text(), this,//dsweet + id = menu->insertItem( iconSet( TDEIcon::Small, 0 ), text(), this,//dsweet TQT_SLOT( slotActivated() ), 0, -1, index ); } else @@ -289,7 +289,7 @@ int TDESelectColorAction::plug( TQWidget* w, int index ) if ( icon().isEmpty() ) // old code using TQIconSet directly { - bar->insertButton( iconSet( KIcon::Small ).pixmap(), id_, TQT_SIGNAL( clicked() ), this, + bar->insertButton( iconSet( TDEIcon::Small ).pixmap(), id_, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotActivated() ), isEnabled(), plainText(), index ); } diff --git a/lib/kofficeui/tkcoloractions.cpp b/lib/kofficeui/tkcoloractions.cpp index eb190613..89574bcf 100644 --- a/lib/kofficeui/tkcoloractions.cpp +++ b/lib/kofficeui/tkcoloractions.cpp @@ -166,7 +166,7 @@ void TTDESelectColorAction::updatePixmap() } } else if(w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) ) { - TQPixmap pix =iconSet(KIcon::Small).pixmap(TQIconSet::Automatic,TQIconSet::Active); + TQPixmap pix =iconSet(TDEIcon::Small).pixmap(TQIconSet::Automatic,TQIconSet::Active); if ( pix.isNull() ) return; TQPainter p(&pix); diff --git a/lib/kofficeui/ttdeaction.cpp b/lib/kofficeui/ttdeaction.cpp index bfdc6c11..6725812a 100644 --- a/lib/kofficeui/ttdeaction.cpp +++ b/lib/kofficeui/ttdeaction.cpp @@ -155,7 +155,7 @@ void TTDEAction::updateLayout(TQWidget* base) TQPixmap pix; if (hasIcon()) - pix = iconSet(KIcon::Small).pixmap(); + pix = iconSet(TDEIcon::Small).pixmap(); if (!icon().isEmpty()) pix = BarIcon(icon()); diff --git a/lib/kofficeui/ttdetoolbarbutton.cpp b/lib/kofficeui/ttdetoolbarbutton.cpp index 51d82500..72956275 100644 --- a/lib/kofficeui/ttdetoolbarbutton.cpp +++ b/lib/kofficeui/ttdetoolbarbutton.cpp @@ -190,23 +190,23 @@ void TTDEToolBarButton::setIcon( const TQString& icon ) d->m_iconName = icon; int iconSize = 16; - setPixmap( BarIcon(icon, iconSize, KIcon::ActiveState, d->m_instance), false ); - setDisabledPixmap( BarIcon(icon, iconSize, KIcon::DisabledState, d->m_instance) ); - setDefaultPixmap( BarIcon(icon, iconSize, KIcon::DefaultState, d->m_instance) ); + setPixmap( BarIcon(icon, iconSize, TDEIcon::ActiveState, d->m_instance), false ); + setDisabledPixmap( BarIcon(icon, iconSize, TDEIcon::DisabledState, d->m_instance) ); + setDefaultPixmap( BarIcon(icon, iconSize, TDEIcon::DefaultState, d->m_instance) ); } void TTDEToolBarButton::setDisabledIcon( const TQString &icon ) { d->m_disabledIconName = icon; int iconSize = 16; - setDisabledPixmap( BarIcon(icon, iconSize, KIcon::DisabledState, d->m_instance) ); + setDisabledPixmap( BarIcon(icon, iconSize, TDEIcon::DisabledState, d->m_instance) ); } void TTDEToolBarButton::setDefaultIcon( const TQString &icon ) { d->m_defaultIconName = icon; int iconSize = 16; - setDefaultPixmap( BarIcon(icon, iconSize, KIcon::DefaultState, d->m_instance) ); + setDefaultPixmap( BarIcon(icon, iconSize, TDEIcon::DefaultState, d->m_instance) ); } TQPixmap TTDEToolBarButton::getActivePixmap() const @@ -417,8 +417,8 @@ void TTDEToolBarButton::makeDefaultPixmap() if (activePixmap.isNull()) return; - KIconEffect effect; - defaultPixmap = effect.apply(activePixmap, KIcon::Toolbar, KIcon::DefaultState); + TDEIconEffect effect; + defaultPixmap = effect.apply(activePixmap, TDEIcon::Toolbar, TDEIcon::DefaultState); } void TTDEToolBarButton::makeDisabledPixmap() @@ -426,8 +426,8 @@ void TTDEToolBarButton::makeDisabledPixmap() if (activePixmap.isNull()) return; - KIconEffect effect; - disabledPixmap = effect.apply(activePixmap, KIcon::Toolbar, KIcon::DisabledState); + TDEIconEffect effect; + disabledPixmap = effect.apply(activePixmap, TDEIcon::Toolbar, TDEIcon::DisabledState); } TQSize TTDEToolBarButton::sizeHint() const diff --git a/lib/koproperty/editors/booledit.cpp b/lib/koproperty/editors/booledit.cpp index 7791730c..839d6d52 100644 --- a/lib/koproperty/editors/booledit.cpp +++ b/lib/koproperty/editors/booledit.cpp @@ -86,17 +86,17 @@ static void drawViewerInternal(TQPainter *p, const TQRect &r, const TQVariant &v { p->eraseRect(r); TQRect r2(r); - r2.moveLeft(KIcon::SizeSmall + 6); + r2.moveLeft(TDEIcon::SizeSmall + 6); if(value.isNull() && !nullText.isEmpty()) { p->drawText(r2, TQt::AlignVCenter | TQt::AlignLeft, nullText); } else if(value.toBool()) { - p->drawPixmap(3, (r.height()-1-KIcon::SizeSmall)/2, yesIcon); + p->drawPixmap(3, (r.height()-1-TDEIcon::SizeSmall)/2, yesIcon); p->drawText(r2, TQt::AlignVCenter | TQt::AlignLeft, i18n("Yes")); } else { - p->drawPixmap(3, (r.height()-1-KIcon::SizeSmall)/2, noIcon); + p->drawPixmap(3, (r.height()-1-TDEIcon::SizeSmall)/2, noIcon); p->drawText(r2, TQt::AlignVCenter | TQt::AlignLeft, i18n("No")); } } diff --git a/lib/kross/main/wdgscriptsmanager.cpp b/lib/kross/main/wdgscriptsmanager.cpp index 4cbae081..a29c9676 100644 --- a/lib/kross/main/wdgscriptsmanager.cpp +++ b/lib/kross/main/wdgscriptsmanager.cpp @@ -137,18 +137,18 @@ WdgScriptsManager::WdgScriptsManager(ScriptGUIClient* scr, TQWidget* parent, con slotSelectionChanged(0); connect(scriptsList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem*))); - btnExec->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "exec", KIcon::MainToolbar, 16 )); + btnExec->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "exec", TDEIcon::MainToolbar, 16 )); connect(btnExec, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExecuteScript())); - btnLoad->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileopen", KIcon::MainToolbar, 16 )); + btnLoad->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileopen", TDEIcon::MainToolbar, 16 )); connect(btnLoad, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLoadScript())); - btnUnload->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileclose", KIcon::MainToolbar, 16 )); + btnUnload->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileclose", TDEIcon::MainToolbar, 16 )); connect(btnUnload, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUnloadScript())); - btnInstall->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileimport", KIcon::MainToolbar, 16 )); + btnInstall->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileimport", TDEIcon::MainToolbar, 16 )); connect(btnInstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInstallScript())); - btnUninstall->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileclose", KIcon::MainToolbar, 16 )); + btnUninstall->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "fileclose", TDEIcon::MainToolbar, 16 )); connect(btnUninstall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUninstallScript())); #ifdef KROSS_SUPPORT_NEWSTUFF - btnNewStuff->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "knewstuff", KIcon::MainToolbar, 16 )); + btnNewStuff->setIconSet(TDEGlobal::instance()->iconLoader()->loadIconSet( "knewstuff", TDEIcon::MainToolbar, 16 )); connect(btnNewStuff, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetNewScript())); #endif /* @@ -218,11 +218,11 @@ TQListViewItem* WdgScriptsManager::addItem(ScriptAction::Ptr action, TQListViewI TQPixmap pm; if(action->hasIcon()) { - KIconLoader* icons = TDEGlobal::iconLoader(); - pm = icons->loadIconSet(action->icon(), KIcon::Small).pixmap(TQIconSet::Small, TQIconSet::Active); + TDEIconLoader* icons = TDEGlobal::iconLoader(); + pm = icons->loadIconSet(action->icon(), TDEIcon::Small).pixmap(TQIconSet::Small, TQIconSet::Active); } else { - pm = action->iconSet(KIcon::Small, 16).pixmap(TQIconSet::Small, TQIconSet::Active); + pm = action->iconSet(TDEIcon::Small, 16).pixmap(TQIconSet::Small, TQIconSet::Active); } if(! pm.isNull()) i->setPixmap(0, pm); // display the icon |