Rename KIcon to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent bd608b63a8
commit 5f12b88e2d

@ -2320,7 +2320,7 @@ msgstr ""
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "" msgstr ""
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105

@ -2541,8 +2541,8 @@ msgstr "Lišta pro formátování textu"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2561,8 +2561,8 @@ msgstr "Værktøjslinie til tekstformattering"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2530,8 +2530,8 @@ msgstr "Textformat-Werkzeugleiste"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2440,8 +2440,8 @@ msgstr "Barra de formateo de texto"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2539,8 +2539,8 @@ msgstr "Mise en forme de texte"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2547,8 +2547,8 @@ msgstr "Barra degli strumenti di formattazione del testo"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2504,8 +2504,8 @@ msgstr "書式ツールバー"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2513,7 +2513,7 @@ msgstr ""
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "" msgstr ""
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105

@ -2469,8 +2469,8 @@ msgstr "Tekstformateringslinje"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2544,8 +2544,8 @@ msgstr "Pasek narzędzi formatowania tekstu"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2491,8 +2491,8 @@ msgstr "Barra de Ferramentas de Formatação de Texto"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2476,8 +2476,8 @@ msgstr "Панель инструментов Формат"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2420,8 +2420,8 @@ msgstr "Metin Biçimlendirme Araç Çubuğu"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2330,8 +2330,8 @@ msgstr "文本排版工具栏"
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "KIconDialogUI" msgstr "TDEIconDialogUI"
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105
#: rc.cpp:96 #: rc.cpp:96

@ -2493,7 +2493,7 @@ msgstr ""
#. i18n: file kicondialogui.ui line 31 #. i18n: file kicondialogui.ui line 31
#: rc.cpp:93 #: rc.cpp:93
#, no-c-format #, no-c-format
msgid "KIconDialogUI" msgid "TDEIconDialogUI"
msgstr "" msgstr ""
#. i18n: file kicondialogui.ui line 105 #. i18n: file kicondialogui.ui line 105

@ -99,7 +99,7 @@ void Archive::save(Basket *basket, bool withSubBaskets, const TQString &destinat
State::List states = (*it)->states(); State::List states = (*it)->states();
for (State::List::iterator it2 = states.begin(); it2 != states.end(); ++it2) { for (State::List::iterator it2 = states.begin(); it2 != states.end(); ++it2) {
State *state = (*it2); State *state = (*it2);
TQPixmap icon = kapp->iconLoader()->loadIcon(state->emblem(), KIcon::Small, 16, KIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); TQPixmap icon = kapp->iconLoader()->loadIcon(state->emblem(), TDEIcon::Small, 16, TDEIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true);
if (!icon.isNull()) { if (!icon.isNull()) {
icon.save(tempIconFile, "PNG"); icon.save(tempIconFile, "PNG");
TQString iconFileName = state->emblem().replace('/', '_'); TQString iconFileName = state->emblem().replace('/', '_');
@ -193,7 +193,7 @@ void Archive::saveBasketToArchive(Basket *basket, bool recursive, KTar *tar, TQS
// Save basket icon: // Save basket icon:
TQString tempIconFile = tempFolder + "icon.png"; TQString tempIconFile = tempFolder + "icon.png";
if (!basket->icon().isEmpty() && basket->icon() != "basket") { if (!basket->icon().isEmpty() && basket->icon() != "basket") {
TQPixmap icon = kapp->iconLoader()->loadIcon(basket->icon(), KIcon::Small, 16, KIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); TQPixmap icon = kapp->iconLoader()->loadIcon(basket->icon(), TDEIcon::Small, 16, TDEIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true);
if (!icon.isNull()) { if (!icon.isNull()) {
icon.save(tempIconFile, "PNG"); icon.save(tempIconFile, "PNG");
TQString iconFileName = basket->icon().replace('/', '_'); TQString iconFileName = basket->icon().replace('/', '_');
@ -432,7 +432,7 @@ void Archive::importTagEmblems(const TQString &extractionFolder)
if ( (!subElement.isNull()) && subElement.tagName() == "state" ) { if ( (!subElement.isNull()) && subElement.tagName() == "state" ) {
TQString emblemName = XMLWork::getElementText(subElement, "emblem"); TQString emblemName = XMLWork::getElementText(subElement, "emblem");
if (!emblemName.isEmpty()) { if (!emblemName.isEmpty()) {
TQPixmap emblem = kapp->iconLoader()->loadIcon(emblemName, KIcon::NoGroup, 16, KIcon::DefaultState, 0L, /*canReturnNull=*/true); TQPixmap emblem = kapp->iconLoader()->loadIcon(emblemName, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true);
// The icon does not exists on that computer, import it: // The icon does not exists on that computer, import it:
if (emblem.isNull()) { if (emblem.isNull()) {
// Of the emblem path was eg. "/home/seb/emblem.png", it was exported as "tag-emblems/_home_seb_emblem.png". // Of the emblem path was eg. "/home/seb/emblem.png", it was exported as "tag-emblems/_home_seb_emblem.png".
@ -547,7 +547,7 @@ void Archive::importBasketIcon(TQDomElement properties, const TQString &extracti
{ {
TQString iconName = XMLWork::getElementText(properties, "icon"); TQString iconName = XMLWork::getElementText(properties, "icon");
if (!iconName.isEmpty() && iconName != "basket") { if (!iconName.isEmpty() && iconName != "basket") {
TQPixmap icon = kapp->iconLoader()->loadIcon(iconName, KIcon::NoGroup, 16, KIcon::DefaultState, 0L, /*canReturnNull=*/true); TQPixmap icon = kapp->iconLoader()->loadIcon(iconName, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true);
// The icon does not exists on that computer, import it: // The icon does not exists on that computer, import it:
if (icon.isNull()) { if (icon.isNull()) {
TQDir dir; TQDir dir;

@ -911,7 +911,7 @@ void Basket::setAppearance(const TQString &icon, const TQString &name, const TQS
m_action->setText("BASKET SHORTCUT: " + name); m_action->setText("BASKET SHORTCUT: " + name);
// Basket should ALWAYS have an icon (the "basket" icon by default): // Basket should ALWAYS have an icon (the "basket" icon by default):
TQPixmap iconTest = kapp->iconLoader()->loadIcon(m_icon, KIcon::NoGroup, 16, KIcon::DefaultState, 0L, /*canReturnNull=*/true); TQPixmap iconTest = kapp->iconLoader()->loadIcon(m_icon, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true);
if (iconTest.isNull()) if (iconTest.isNull())
m_icon = "basket"; m_icon = "basket";
@ -3088,7 +3088,7 @@ void Basket::drawContents(TQPainter *painter, int clipX, int clipY, int clipWidt
label->setAlignment( int( TQLabel::AlignTop ) ); label->setAlignment( int( TQLabel::AlignTop ) );
layout->addMultiCellWidget( label, 0, 0, 1, 2 ); layout->addMultiCellWidget( label, 0, 0, 1, 2 );
TQLabel* pixmap = new TQLabel( m_decryptBox, "pixmap" ); TQLabel* pixmap = new TQLabel( m_decryptBox, "pixmap" );
pixmap->setPixmap( TDEGlobal::iconLoader()->loadIcon("encrypted", KIcon::NoGroup, KIcon::SizeHuge) ); pixmap->setPixmap( TDEGlobal::iconLoader()->loadIcon("encrypted", TDEIcon::NoGroup, TDEIcon::SizeHuge) );
layout->addMultiCellWidget( pixmap, 0, 1, 0, 0 ); layout->addMultiCellWidget( pixmap, 0, 1, 0, 0 );
TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
@ -5440,7 +5440,7 @@ DiskErrorDialog::DiskErrorDialog(const TQString &titleMessage, const TQString &m
//enableButtonOK(false); //enableButtonOK(false);
setModal(true); setModal(true);
TQHBoxLayout *layout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint()); TQHBoxLayout *layout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint());
TQPixmap icon = kapp->iconLoader()->loadIcon("hdd_unmount", KIcon::NoGroup, 64, KIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); TQPixmap icon = kapp->iconLoader()->loadIcon("hdd_unmount", TDEIcon::NoGroup, 64, TDEIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true);
TQLabel *iconLabel = new TQLabel(plainPage()); TQLabel *iconLabel = new TQLabel(plainPage());
iconLabel->setPixmap(icon); iconLabel->setPixmap(icon);
iconLabel->setFixedSize(iconLabel->sizeHint()); iconLabel->setFixedSize(iconLabel->sizeHint());

@ -136,7 +136,7 @@ void BasketListViewItem::setup()
int height = MARGIN + TQMAX(BASKET_ICON_SIZE, textRect.height()) + MARGIN; int height = MARGIN + TQMAX(BASKET_ICON_SIZE, textRect.height()) + MARGIN;
setHeight(height); setHeight(height);
TQPixmap icon = kapp->iconLoader()->loadIcon(m_basket->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, /*canReturnNull=*/false); TQPixmap icon = kapp->iconLoader()->loadIcon(m_basket->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false);
setPixmap(/*column=*/0, icon); setPixmap(/*column=*/0, icon);
@ -580,12 +580,12 @@ void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*col
effectiveWidth += countPixmap.width() + MARGIN; effectiveWidth += countPixmap.width() + MARGIN;
} }
if (showLoadingIcon) { if (showLoadingIcon) {
TQPixmap icon = kapp->iconLoader()->loadIcon("find", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, /*canReturnNull=*/false); TQPixmap icon = kapp->iconLoader()->loadIcon("find", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false);
thePainter.drawPixmap(effectiveWidth, 0, icon); thePainter.drawPixmap(effectiveWidth, 0, icon);
effectiveWidth += BASKET_ICON_SIZE + MARGIN; effectiveWidth += BASKET_ICON_SIZE + MARGIN;
} }
if (showEncryptedIcon && !showLoadingIcon) { if (showEncryptedIcon && !showLoadingIcon) {
TQPixmap icon = kapp->iconLoader()->loadIcon("encrypted", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, /*canReturnNull=*/false); TQPixmap icon = kapp->iconLoader()->loadIcon("encrypted", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false);
thePainter.drawPixmap(effectiveWidth, 0, icon); thePainter.drawPixmap(effectiveWidth, 0, icon);
} }

@ -52,8 +52,8 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent)
// Icon and Name: // Icon and Name:
TQHBoxLayout *nameLayout = new TQHBoxLayout(0, marginHint()*2/3, spacingHint()); TQHBoxLayout *nameLayout = new TQHBoxLayout(0, marginHint()*2/3, spacingHint());
m_icon = new KIconButton(page); m_icon = new TDEIconButton(page);
m_icon->setIconType(KIcon::NoGroup, KIcon::Action); m_icon->setIconType(TDEIcon::NoGroup, TDEIcon::Action);
m_icon->setIconSize(16); m_icon->setIconSize(16);
m_icon->setIcon(m_basket->icon()); m_icon->setIcon(m_basket->icon());
int size = TQMAX(m_icon->sizeHint().width(), m_icon->sizeHint().height()); int size = TQMAX(m_icon->sizeHint().width(), m_icon->sizeHint().height());

@ -25,7 +25,7 @@
#include <tqmap.h> #include <tqmap.h>
#include <tqstring.h> #include <tqstring.h>
class KIconButton; class TDEIconButton;
class TQLineEdit; class TQLineEdit;
class TQComboBox; class TQComboBox;
class TQVButtonGroup; class TQVButtonGroup;
@ -55,7 +55,7 @@ class BasketPropertiesDialog : public KDialogBase
void selectColumnsLayout(); void selectColumnsLayout();
private: private:
Basket *m_basket; Basket *m_basket;
KIconButton *m_icon; TDEIconButton *m_icon;
TQLineEdit *m_name; TQLineEdit *m_name;
TQComboBox *m_backgroundImage; TQComboBox *m_backgroundImage;
KColorCombo2 *m_backgroundColor; KColorCombo2 *m_backgroundColor;

@ -1957,7 +1957,7 @@ void BNPView::showPassiveDroppedDelayed()
m_passivePopup->setView( m_passivePopup->setView(
title.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), title.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
(contentsPixmap.isNull() ? "" : "<img src=\"_passivepopup_image_\">"), (contentsPixmap.isNull() ? "" : "<img src=\"_passivepopup_image_\">"),
kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); kapp->iconLoader()->loadIcon(currentBasket()->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
m_passivePopup->show(); m_passivePopup->show();
} }
@ -1970,7 +1970,7 @@ void BNPView::showPassiveImpossible(const TQString &message)
.arg(i18n("Basket <i>%1</i> is locked")) .arg(i18n("Basket <i>%1</i> is locked"))
.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), .arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
message, message,
kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); kapp->iconLoader()->loadIcon(currentBasket()->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
m_passivePopup->show(); m_passivePopup->show();
} }
@ -1995,7 +1995,7 @@ void BNPView::showPassiveContent(bool forceShow/* = false*/)
.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)")) .arg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)"))
: Tools::textToHTMLWithoutP(currentBasket()->basketName()) ), : Tools::textToHTMLWithoutP(currentBasket()->basketName()) ),
message, message,
kapp->iconLoader()->loadIcon(currentBasket()->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); kapp->iconLoader()->loadIcon(currentBasket()->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
m_passivePopup->show(); m_passivePopup->show();
} }
@ -2009,7 +2009,7 @@ void BNPView::showPassiveLoading(Basket *basket)
m_passivePopup->setView( m_passivePopup->setView(
Tools::textToHTMLWithoutP(basket->basketName()), Tools::textToHTMLWithoutP(basket->basketName()),
i18n("Loading..."), i18n("Loading..."),
kapp->iconLoader()->loadIcon(basket->icon(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true)); kapp->iconLoader()->loadIcon(basket->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
m_passivePopup->show(); m_passivePopup->show();
} }

@ -51,8 +51,8 @@ FilterBar::FilterBar(TQWidget *parent, const char *name)
TQHBoxLayout *hBox = new TQHBoxLayout(this, /*margin*/0, /*spacing*/0); TQHBoxLayout *hBox = new TQHBoxLayout(this, /*margin*/0, /*spacing*/0);
// Create every widgets: // Create every widgets:
TQIconSet resetIconSet = kapp->iconLoader()->loadIconSet("locationbar_erase", KIcon::Toolbar); TQIconSet resetIconSet = kapp->iconLoader()->loadIconSet("locationbar_erase", TDEIcon::Toolbar);
TQIconSet inAllIconSet = kapp->iconLoader()->loadIconSet("find", KIcon::Toolbar); TQIconSet inAllIconSet = kapp->iconLoader()->loadIconSet("find", TDEIcon::Toolbar);
m_resetButton = new TQToolButton(this); m_resetButton = new TQToolButton(this);
@ -168,7 +168,7 @@ void FilterBar::repopulateTagsComnbo()
text = state->name(); text = state->name();
icon = state->emblem(); icon = state->emblem();
} }
emblem = kapp->iconLoader()->loadIcon(icon, KIcon::Desktop, ICON_SIZE, KIcon::DefaultState, 0L, /*canReturnNull=*/true); emblem = kapp->iconLoader()->loadIcon(icon, TDEIcon::Desktop, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true);
m_tagsBox->insertItem(emblem, text, index); m_tagsBox->insertItem(emblem, text, index);
// Update the mapping: // Update the mapping:
m_tagsMap.insert(index, tag); m_tagsMap.insert(index, tag);
@ -180,7 +180,7 @@ void FilterBar::repopulateTagsComnbo()
// Insert the state: // Insert the state:
text = state->name(); text = state->name();
icon = state->emblem(); icon = state->emblem();
emblem = kapp->iconLoader()->loadIcon(icon, KIcon::Desktop, ICON_SIZE, KIcon::DefaultState, 0L, /*canReturnNull=*/true); emblem = kapp->iconLoader()->loadIcon(icon, TDEIcon::Desktop, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true);
// Indent the emblem to show the hierarchy relation: // Indent the emblem to show the hierarchy relation:
if (!emblem.isNull()) if (!emblem.isNull())
emblem = Tools::indentPixmap(emblem, /*depth=*/1, /*deltaX=*/2 * ICON_SIZE / 3); emblem = Tools::indentPixmap(emblem, /*depth=*/1, /*deltaX=*/2 * ICON_SIZE / 3);

@ -53,8 +53,8 @@ class KGpgSelKey : public KDialogBase
TQVBoxLayout* vbox; TQVBoxLayout* vbox;
TQWidget* page = new TQWidget(this); TQWidget* page = new TQWidget(this);
TQLabel* labeltxt; TQLabel* labeltxt;
KIconLoader* loader = TDEGlobal::iconLoader(); TDEIconLoader* loader = TDEGlobal::iconLoader();
TQPixmap keyPair = loader->loadIcon("kgpg_key2", KIcon::Small, 20); TQPixmap keyPair = loader->loadIcon("kgpg_key2", TDEIcon::Small, 20);
setMinimumSize(350,100); setMinimumSize(350,100);
keysListpr = new TDEListView(page); keysListpr = new TDEListView(page);

@ -45,10 +45,10 @@
#include <svgicons/ksvgiconpainter.h> #include <svgicons/ksvgiconpainter.h>
#endif #endif
class KIconCanvasItem : public TQIconViewItem class TDEIconCanvasItem : public TQIconViewItem
{ {
public: public:
KIconCanvasItem ( TQIconView * parent, const TQString & key, const TQPixmap & pixmap ) TDEIconCanvasItem ( TQIconView * parent, const TQString & key, const TQPixmap & pixmap )
: TQIconViewItem(parent) : TQIconViewItem(parent)
{ {
setText(TQFileInfo(key).baseName()); setText(TQFileInfo(key).baseName());
@ -65,15 +65,15 @@ class KIconCanvasItem : public TQIconViewItem
} }
}; };
class KIconCanvas::KIconCanvasPrivate class TDEIconCanvas::TDEIconCanvasPrivate
{ {
public: public:
KIconCanvasPrivate() TDEIconCanvasPrivate()
{ {
m_bLoading = false; m_bLoading = false;
mSize = 0; mSize = 0;
} }
~KIconCanvasPrivate() ~TDEIconCanvasPrivate()
{ {
} }
bool m_bLoading; bool m_bLoading;
@ -86,13 +86,13 @@ class KIconCanvas::KIconCanvasPrivate
}; };
/* /*
* 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;
mpLoader = TDEGlobal::iconLoader(); mpLoader = TDEGlobal::iconLoader();
mpTimer = new TQTimer(this); mpTimer = new TQTimer(this);
connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles())); connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles()));
@ -103,18 +103,18 @@ KIconCanvas::KIconCanvas(TQWidget *parent, const char *name)
setStrictIconSize(false); setStrictIconSize(false);
} }
KIconCanvas::~KIconCanvas() TDEIconCanvas::~TDEIconCanvas()
{ {
delete mpTimer; delete mpTimer;
delete d; delete d;
} }
void KIconCanvas::setIconLoader(KIconLoader *loader) void TDEIconCanvas::setIconLoader(TDEIconLoader *loader)
{ {
mpLoader = loader; mpLoader = loader;
} }
void KIconCanvas::loadIcon(const TQString &name) void TDEIconCanvas::loadIcon(const TQString &name)
{ {
TQImage img; TQImage img;
TQString path = mpLoader->iconPath(name,-d->mSize); TQString path = mpLoader->iconPath(name,-d->mSize);
@ -150,10 +150,10 @@ void KIconCanvas::loadIcon(const TQString &name)
TQPixmap pm; TQPixmap pm;
pm.convertFromImage(img); pm.convertFromImage(img);
(void) new KIconCanvasItem(this, name, pm); (void) new TDEIconCanvasItem(this, name, pm);
} }
void KIconCanvas::loadFiles(const TQStringList& files) void TDEIconCanvas::loadFiles(const TQStringList& files)
{ {
clear(); clear();
mFiles = files; mFiles = files;
@ -162,7 +162,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(waitCursor); TQApplication::setOverrideCursor(waitCursor);
@ -200,34 +200,34 @@ void KIconCanvas::slotLoadFiles()
setResizeMode(Adjust); setResizeMode(Adjust);
} }
TQString KIconCanvas::getCurrent() const TQString TDEIconCanvas::getCurrent() const
{ {
return currentItem() ? currentItem()->key() : TQString(); return currentItem() ? currentItem()->key() : TQString();
} }
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()); emit nameChanged((item != 0L) ? item->text() : TQString());
} }
void KIconCanvas::setGroupOrSize( int groupOrSize ) void TDEIconCanvas::setGroupOrSize( int groupOrSize )
{ {
d->mSize = ((int)groupOrSize >= 0) ? d->mSize = ((int)groupOrSize >= 0) ?
mpLoader->currentSize((KIcon::Group)groupOrSize) : mpLoader->currentSize((TDEIcon::Group)groupOrSize) :
-groupOrSize; -groupOrSize;
} }
void KIconCanvas::setStrictIconSize( bool strictIconSize ) void TDEIconCanvas::setStrictIconSize( bool strictIconSize )
{ {
d->mStrictIconSize = strictIconSize; d->mStrictIconSize = strictIconSize;
} }
TQDragObject *KIconCanvas::dragObject() TQDragObject *TDEIconCanvas::dragObject()
{ {
// We use TQImageDrag rather than KURLDrag so that the user can't drag an icon out of the theme! // We use TQImageDrag rather than KURLDrag so that the user can't drag an icon out of the theme!
// TODO: support SVG? // TODO: support SVG?

@ -21,22 +21,22 @@
#include <kiconview.h> #include <kiconview.h>
class TQTimer; class TQTimer;
class KIconLoader; class TDEIconLoader;
class TQDragObject; class TQDragObject;
class TQIconLoader; class TQIconLoader;
/** /**
* Icon canvas for KIconDialog. * Icon canvas for TDEIconDialog.
*/ */
class TDEIO_EXPORT KIconCanvas: public KIconView class TDEIO_EXPORT TDEIconCanvas: public TDEIconView
/* NOTE: Why export this? */ /* NOTE: Why export this? */
{ {
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.
@ -48,7 +48,7 @@ public:
*/ */
TQString getCurrent() const; TQString getCurrent() const;
void setIconLoader(KIconLoader *loader); void setIconLoader(TDEIconLoader *loader);
void setGroupOrSize(int groupOrSize); void setGroupOrSize(int groupOrSize);
@ -75,7 +75,7 @@ private slots:
private: private:
TQStringList mFiles; TQStringList mFiles;
TQTimer *mpTimer; TQTimer *mpTimer;
KIconLoader *mpLoader; TDEIconLoader *mpLoader;
protected: protected:
virtual void virtual_hook( int id, void* data ); virtual void virtual_hook( int id, void* data );
@ -83,8 +83,8 @@ protected:
void loadIcon(const TQString &path); void loadIcon(const TQString &path);
private: private:
class KIconCanvasPrivate; class TDEIconCanvasPrivate;
KIconCanvasPrivate *d; TDEIconCanvasPrivate *d;
}; };
#endif #endif

@ -55,63 +55,63 @@ enum ExtendedContext
{ {
ALL = 0, ALL = 0,
RECENT = 1, RECENT = 1,
// Action thru MimeType, subtract 1 to convert to KIcon::Context // Action thru MimeType, subtract 1 to convert to TDEIcon::Context
OTHER = 7 OTHER = 7
}; };
class KIconDialog::KIconDialogPrivate class TDEIconDialog::TDEIconDialogPrivate
{ {
public: public:
KIconDialogPrivate() { TDEIconDialogPrivate() {
m_bStrictIconSize = true; m_bStrictIconSize = true;
} }
~KIconDialogPrivate() {} ~TDEIconDialogPrivate() {}
bool m_bStrictIconSize; bool m_bStrictIconSize;
TQString custom; TQString custom;
TQString customLocation; TQString customLocation;
int recentMax; int recentMax;
TQStringList recentList; TQStringList recentList;
ExtendedContext extendedContext; ExtendedContext extendedContext;
KIconDialogUI *ui; /* FIXME: KDE4 probably move this to the main class */ TDEIconDialogUI *ui; /* FIXME: KDE4 probably move this to the main class */
}; };
/* /*
* 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*) TDEIconDialog::TDEIconDialog(TQWidget *parent, const char*)
: KDialogBase(parent, "IconDialog", true, i18n("Select Icon"), Ok|Cancel, Ok) : KDialogBase(parent, "IconDialog", true, i18n("Select Icon"), Ok|Cancel, Ok)
{ {
d = new KIconDialogPrivate; d = new TDEIconDialogPrivate;
mpLoader = TDEGlobal::iconLoader(); mpLoader = TDEGlobal::iconLoader();
init(); init();
resize(minimumSize()); resize(minimumSize());
} }
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;
d->extendedContext = ALL; d->extendedContext = ALL;
mType = 0; mType = 0;
setCustomLocation(TQString()); // Initialize mFileList setCustomLocation(TQString()); // Initialize mFileList
// Read configuration // Read configuration
TDEConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver saver(config, "KIconDialog"); TDEConfigGroupSaver saver(config, "TDEIconDialog");
d->recentMax = config->readNumEntry("RecentMax", 10); d->recentMax = config->readNumEntry("RecentMax", 10);
d->recentList = config->readPathListEntry("RecentIcons"); d->recentList = config->readPathListEntry("RecentIcons");
d->ui = new KIconDialogUI( this ); d->ui = new TDEIconDialogUI( this );
setMainWidget(d->ui); setMainWidget(d->ui);
d->ui->searchLine->setIconView(d->ui->iconCanvas); d->ui->searchLine->setIconView(d->ui->iconCanvas);
@ -140,28 +140,28 @@ void KIconDialog::init()
d->ui->listBox->insertItem(i18n("Miscellaneous")); d->ui->listBox->insertItem(i18n("Miscellaneous"));
} }
KIconDialog::~KIconDialog() TDEIconDialog::~TDEIconDialog()
{ {
// Write configuration // Write configuration
TDEConfig *config = TDEGlobal::config(); TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver saver(config, "KIconDialog"); TDEConfigGroupSaver saver(config, "TDEIconDialog");
config->writeEntry("RecentMax", d->recentMax, true, true); config->writeEntry("RecentMax", d->recentMax, true, true);
config->writePathEntry("RecentIcons", d->recentList, ',', true, true); config->writePathEntry("RecentIcons", d->recentList, ',', true, true);
delete d; delete d;
} }
void KIconDialog::slotAcceptIcons() void TDEIconDialog::slotAcceptIcons()
{ {
//FIXME: not used anymore //FIXME: not used anymore
} }
void KIconDialog::showIcons() void TDEIconDialog::showIcons()
{ {
d->ui->iconCanvas->clear(); d->ui->iconCanvas->clear();
TQStringList filelist; TQStringList filelist;
KIcon::Context context = static_cast<KIcon::Context>(d->extendedContext - 1); TDEIcon::Context context = static_cast<TDEIcon::Context>(d->extendedContext - 1);
switch (d->extendedContext) switch (d->extendedContext)
{ {
case RECENT: case RECENT:
@ -172,7 +172,7 @@ void KIconDialog::showIcons()
break; break;
case ALL: case ALL:
filelist = mFileList; filelist = mFileList;
context = KIcon::Any; context = TDEIcon::Any;
// ** Fallthrough to next case ** // ** Fallthrough to next case **
default: default:
TQStringList list; TQStringList list;
@ -206,46 +206,46 @@ void KIconDialog::showIcons()
d->ui->iconCanvas->loadFiles(filelist); d->ui->iconCanvas->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 )
{ {
setup(group, context, strictIconSize, iconSize, user, false, false); setup(group, context, strictIconSize, iconSize, user, false, false);
} }
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 lockContext, bool lockBrowse ) bool lockContext, bool lockBrowse )
{ {
@ -254,7 +254,7 @@ void KIconDialog::setup(KIcon::Group group, KIcon::Context context,
mGroupOrSize = (iconSize == 0) ? group : -iconSize; mGroupOrSize = (iconSize == 0) ? group : -iconSize;
mType = user; mType = user;
d->extendedContext = static_cast<ExtendedContext>( ( context == KIcon::Any ) ? ALL : context + 1 ); d->extendedContext = static_cast<ExtendedContext>( ( context == TDEIcon::Any ) ? ALL : context + 1 );
// We cannot change layout because it is protected ;-( // We cannot change layout because it is protected ;-(
// FIXME: TQt4 we will be able to inherit from both TQDialog and our GUI // FIXME: TQt4 we will be able to inherit from both TQDialog and our GUI
@ -266,12 +266,12 @@ void KIconDialog::setup(KIcon::Group group, KIcon::Context context,
d->ui->listBox->setCurrentItem(d->extendedContext); d->ui->listBox->setCurrentItem(d->extendedContext);
} }
const TQString & KIconDialog::customLocation( ) const const TQString & TDEIconDialog::customLocation( ) const
{ {
return d->customLocation; return d->customLocation;
} }
void KIconDialog::setCustomLocation( const TQString& location ) void TDEIconDialog::setCustomLocation( const TQString& location )
{ {
d->customLocation = location; d->customLocation = location;
@ -283,7 +283,7 @@ void KIconDialog::setCustomLocation( const TQString& location )
} }
} }
TQString KIconDialog::openDialog() TQString TDEIconDialog::openDialog()
{ {
showIcons(); showIcons();
@ -300,7 +300,7 @@ TQString KIconDialog::openDialog()
} }
} }
void KIconDialog::showDialog() void TDEIconDialog::showDialog()
{ {
d->custom = TQString(); d->custom = TQString();
@ -318,7 +318,7 @@ void KIconDialog::showDialog()
showIcons(); showIcons();
} }
void KIconDialog::slotOk() void TDEIconDialog::slotOk()
{ {
TQString key = !d->custom.isEmpty() ? d->custom : d->ui->iconCanvas->getCurrent(); TQString key = !d->custom.isEmpty() ? d->custom : d->ui->iconCanvas->getCurrent();
@ -336,11 +336,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);
@ -348,7 +348,7 @@ TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
return dlg.openDialog(); return dlg.openDialog();
} }
void KIconDialog::slotBrowse() void TDEIconDialog::slotBrowse()
{ {
// Create a file dialog to select a PNG, XPM or SVG file, // Create a file dialog to select a PNG, XPM or SVG file,
// with the image previewer shown. // with the image previewer shown.
@ -372,13 +372,13 @@ void KIconDialog::slotBrowse()
} }
} }
void KIconDialog::slotContext(int id) void TDEIconDialog::slotContext(int id)
{ {
d->extendedContext = static_cast<ExtendedContext>(id); d->extendedContext = static_cast<ExtendedContext>(id);
showIcons(); showIcons();
} }
void KIconDialog::slotStartLoading(int steps) void TDEIconDialog::slotStartLoading(int steps)
{ {
if (steps < 10) if (steps < 10)
d->ui->progressBar->hide(); d->ui->progressBar->hide();
@ -392,26 +392,26 @@ void KIconDialog::slotStartLoading(int steps)
} }
} }
void KIconDialog::slotProgress(int p) void TDEIconDialog::slotProgress(int p)
{ {
d->ui->progressBar->setProgress(p); d->ui->progressBar->setProgress(p);
} }
void KIconDialog::slotFinished() void TDEIconDialog::slotFinished()
{ {
d->ui->progressBar->hide(); d->ui->progressBar->hide();
d->ui->filterLabel->show(); d->ui->filterLabel->show();
d->ui->searchLine->show(); d->ui->searchLine->show();
} }
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;
bool lockUser; bool lockUser;
bool lockCustom; bool lockCustom;
@ -420,27 +420,27 @@ class KIconButton::KIconButtonPrivate
/* /*
* 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;
@ -448,33 +448,33 @@ 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;
@ -483,7 +483,7 @@ void KIconButton::setIconType(KIcon::Group group, KIcon::Context context, bool u
d->lockCustom = false; d->lockCustom = false;
} }
void KIconButton::setIconType(KIcon::Group group, KIcon::Context context, bool user, bool lockUser, bool lockCustom) void TDEIconButton::setIconType(TDEIcon::Group group, TDEIcon::Context context, bool user, bool lockUser, bool lockCustom)
{ {
mGroup = group; mGroup = group;
mContext = context; mContext = context;
@ -492,45 +492,45 @@ void KIconButton::setIconType(KIcon::Group group, KIcon::Context context, bool u
d->lockCustom = lockCustom; d->lockCustom = lockCustom;
} }
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&)));
} }
} }
const TQString & KIconButton::customLocation( ) const const TQString & TDEIconButton::customLocation( ) const
{ {
return mpDialog ? mpDialog->customLocation() : TQString(); return mpDialog ? mpDialog->customLocation() : TQString();
} }
void KIconButton::setCustomLocation(const TQString &custom) void TDEIconButton::setCustomLocation(const TQString &custom)
{ {
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&)));
} }
mpDialog->setCustomLocation(custom); mpDialog->setCustomLocation(custom);
} }
void KIconButton::resetIcon() void TDEIconButton::resetIcon()
{ {
mIcon = TQString(); mIcon = TQString();
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&)));
} }
@ -538,7 +538,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;
@ -550,10 +550,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"

@ -13,8 +13,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>
@ -24,16 +24,16 @@
#include <kdialogbase.h> #include <kdialogbase.h>
#include <kiconview.h> #include <kiconview.h>
#include <kiconcanvas.h> // FIXME: BCI KDE 3 expects KIconCanvas to be defined in kicondialog.h #include <kiconcanvas.h> // FIXME: BCI KDE 3 expects TDEIconCanvas to be defined in kicondialog.h
class KIconDialogUI; class TDEIconDialogUI;
class TQComboBox; class TQComboBox;
class TQTimer; class TQTimer;
class TQKeyEvent; class TQKeyEvent;
class TQRadioButton; class TQRadioButton;
class KProgress; class KProgress;
class KIconLoader; class TDEIconLoader;
/** /**
* Dialog for interactive selection of icons. Use the function * Dialog for interactive selection of icons. Use the function
@ -41,7 +41,7 @@ class KIconLoader;
* *
* @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
@ -50,16 +50,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,
@ -86,7 +86,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);
@ -101,8 +101,8 @@ 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
/** /**
@ -110,8 +110,8 @@ public:
* 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 );
/* FIXME: KDE4 remove -- same as next method with default arguments */ /* FIXME: KDE4 remove -- same as next method with default arguments */
@ -124,7 +124,7 @@ 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 lockContext, bool strictIconSize, int iconSize, bool user, bool lockContext,
bool lockBrowse ); bool lockBrowse );
// FIXME: KDE4 add default arguments (right now this would cause ambiguity with previous method) // FIXME: KDE4 add default arguments (right now this would cause ambiguity with previous method)
@ -132,7 +132,7 @@ public:
/** /**
* 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() if the dialog was aborted. * or TQString() 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();
@ -159,11 +159,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()); const TQString &caption=TQString());
@ -186,7 +186,7 @@ private:
void showIcons(); void showIcons();
int mGroupOrSize; int mGroupOrSize;
KIcon::Context mContext; TDEIcon::Context mContext;
int mType; int mType;
TQStringList mFileList; TQStringList mFileList;
@ -197,26 +197,26 @@ private:
TQRadioButton *mpRb1, *mpRb2; TQRadioButton *mpRb1, *mpRb2;
KProgress *mpProgress; KProgress *mpProgress;
KIconLoader *mpLoader; TDEIconLoader *mpLoader;
KIconCanvas *mpCanvas; // FIXME: obsolete, remove in KDE4 TDEIconCanvas *mpCanvas; // FIXME: obsolete, remove in KDE4
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
@ -227,18 +227,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,
@ -252,16 +252,16 @@ 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);
/** /**
* Same as above method, but allows you to specify whether user and custom mode should be locked. * Same as above method, but allows you to specify whether user and custom mode should be locked.
*/ */
void setIconType(KIcon::Group group, KIcon::Context context, bool user, bool lockContext, bool lockBrowse); void setIconType(TDEIcon::Group group, TDEIcon::Context context, bool user, bool lockContext, bool lockBrowse);
/* FIXME: KDE4 this should replace the above method using default params */ /* FIXME: KDE4 this should replace the above method using default params */
/** /**
@ -291,7 +291,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 );
@ -314,18 +314,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__

@ -1,9 +1,9 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KIconDialogUI</class> <class>TDEIconDialogUI</class>
<author>Luke Sandell</author> <author>Luke Sandell</author>
<widget class="TQWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>KIconDialogUI</cstring> <cstring>TDEIconDialogUI</cstring>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
@ -28,7 +28,7 @@
</size> </size>
</property> </property>
<property name="caption"> <property name="caption">
<string>KIconDialogUI</string> <string>TDEIconDialogUI</string>
</property> </property>
<grid> <grid>
<property name="name"> <property name="name">
@ -50,7 +50,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
</widget> </widget>
<widget class="KIconCanvas" row="0" column="1"> <widget class="TDEIconCanvas" row="0" column="1">
<property name="name"> <property name="name">
<cstring>iconCanvas</cstring> <cstring>iconCanvas</cstring>
</property> </property>
@ -108,7 +108,7 @@
<cstring>searchLine</cstring> <cstring>searchLine</cstring>
</property> </property>
</widget> </widget>
<widget class="KIconViewSearchLine"> <widget class="TDEIconViewSearchLine">
<property name="name"> <property name="name">
<cstring>searchLine</cstring> <cstring>searchLine</cstring>
</property> </property>
@ -170,7 +170,7 @@
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>KIconViewSearchLine</class> <class>TDEIconViewSearchLine</class>
<header location="global">kiconviewsearchline.h</header> <header location="global">kiconviewsearchline.h</header>
<sizehint> <sizehint>
<width>-1</width> <width>-1</width>
@ -190,7 +190,7 @@
<slot access="public" specifier="">clear()</slot> <slot access="public" specifier="">clear()</slot>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>KIconCanvas</class> <class>TDEIconCanvas</class>
<header location="local">kiconcanvas.h</header> <header location="local">kiconcanvas.h</header>
<sizehint> <sizehint>
<width>-1</width> <width>-1</width>

@ -65,10 +65,10 @@ LikeBackBar::LikeBackBar(LikeBack *likeBack)
{ {
TQHBoxLayout *layout = new TQHBoxLayout(this); TQHBoxLayout *layout = new TQHBoxLayout(this);
TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", KIcon::Small); TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", TDEIcon::Small);
TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", KIcon::Small); TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", TDEIcon::Small);
TQIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug", KIcon::Small); TQIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug", TDEIcon::Small);
TQIconSet featureIconSet = kapp->iconLoader()->loadIconSet("likeback_feature", KIcon::Small); TQIconSet featureIconSet = kapp->iconLoader()->loadIconSet("likeback_feature", TDEIcon::Small);
m_likeButton = new TQToolButton(this, "likeback_like"); m_likeButton = new TQToolButton(this, "likeback_like");
m_likeButton->setIconSet(likeIconSet); m_likeButton->setIconSet(likeIconSet);
@ -412,10 +412,10 @@ void LikeBack::setUserWantsToShowBar(bool showBar)
void LikeBack::showInformationMessage() void LikeBack::showInformationMessage()
{ {
// Load and register the images needed by the message: // Load and register the images needed by the message:
TQPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like", KIcon::Small); TQPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like", TDEIcon::Small);
TQPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::Small); TQPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike", TDEIcon::Small);
TQPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::Small); TQPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug", TDEIcon::Small);
TQPixmap featureIcon = kapp->iconLoader()->loadIcon("likeback_feature", KIcon::Small); TQPixmap featureIcon = kapp->iconLoader()->loadIcon("likeback_feature", TDEIcon::Small);
TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon);
TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon);
TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon);
@ -668,7 +668,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC
TQWidget *buttons = new TQWidget(box); TQWidget *buttons = new TQWidget(box);
TQGridLayout *buttonsGrid = new TQGridLayout(buttons, /*nbRows=*/4, /*nbColumns=*/2, /*margin=*/0, spacingHint()); TQGridLayout *buttonsGrid = new TQGridLayout(buttons, /*nbRows=*/4, /*nbColumns=*/2, /*margin=*/0, spacingHint());
if (m_likeBack->buttons() & LikeBack::Like) { if (m_likeBack->buttons() & LikeBack::Like) {
TQPixmap likePixmap = kapp->iconLoader()->loadIcon("likeback_like", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); TQPixmap likePixmap = kapp->iconLoader()->loadIcon("likeback_like", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true);
TQLabel *likeIcon = new TQLabel(buttons); TQLabel *likeIcon = new TQLabel(buttons);
likeIcon->setPixmap(likePixmap); likeIcon->setPixmap(likePixmap);
likeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); likeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
@ -678,7 +678,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC
m_group->insert(likeButton, LikeBack::Like); m_group->insert(likeButton, LikeBack::Like);
} }
if (m_likeBack->buttons() & LikeBack::Dislike) { if (m_likeBack->buttons() & LikeBack::Dislike) {
TQPixmap dislikePixmap = kapp->iconLoader()->loadIcon("likeback_dislike", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); TQPixmap dislikePixmap = kapp->iconLoader()->loadIcon("likeback_dislike", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true);
TQLabel *dislikeIcon = new TQLabel(buttons); TQLabel *dislikeIcon = new TQLabel(buttons);
dislikeIcon->setPixmap(dislikePixmap); dislikeIcon->setPixmap(dislikePixmap);
dislikeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); dislikeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
@ -688,7 +688,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC
m_group->insert(dislikeButton, LikeBack::Dislike); m_group->insert(dislikeButton, LikeBack::Dislike);
} }
if (m_likeBack->buttons() & LikeBack::Bug) { if (m_likeBack->buttons() & LikeBack::Bug) {
TQPixmap bugPixmap = kapp->iconLoader()->loadIcon("likeback_bug", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); TQPixmap bugPixmap = kapp->iconLoader()->loadIcon("likeback_bug", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true);
TQLabel *bugIcon = new TQLabel(buttons); TQLabel *bugIcon = new TQLabel(buttons);
bugIcon->setPixmap(bugPixmap); bugIcon->setPixmap(bugPixmap);
bugIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); bugIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
@ -698,7 +698,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC
m_group->insert(bugButton, LikeBack::Bug); m_group->insert(bugButton, LikeBack::Bug);
} }
if (m_likeBack->buttons() & LikeBack::Feature) { if (m_likeBack->buttons() & LikeBack::Feature) {
TQPixmap featurePixmap = kapp->iconLoader()->loadIcon("likeback_feature", KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true); TQPixmap featurePixmap = kapp->iconLoader()->loadIcon("likeback_feature", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true);
TQLabel *featureIcon = new TQLabel(buttons); TQLabel *featureIcon = new TQLabel(buttons);
featureIcon->setPixmap(featurePixmap); featureIcon->setPixmap(featurePixmap);
featureIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); featureIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);

@ -441,8 +441,8 @@ void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height,
else { else {
int iconSize = m_look->iconSize(); int iconSize = m_look->iconSize();
TQString iconName = (isHovered ? Global::openNoteIcon() : m_icon); TQString iconName = (isHovered ? Global::openNoteIcon() : m_icon);
KIcon::States iconState = (isIconButtonHovered ? KIcon::ActiveState : KIcon::DefaultState); TDEIcon::States iconState = (isIconButtonHovered ? TDEIcon::ActiveState : TDEIcon::DefaultState);
pixmap = kapp->iconLoader()->loadIcon(iconName, KIcon::Desktop, iconSize, iconState, 0L, /*canReturnNull=*/false); pixmap = kapp->iconLoader()->loadIcon(iconName, TDEIcon::Desktop, iconSize, iconState, 0L, /*canReturnNull=*/false);
} }
int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0));
int pixmapX = (iconPreviewWidth - pixmap.width()) / 2; int pixmapX = (iconPreviewWidth - pixmap.width()) / 2;

@ -44,27 +44,27 @@
#include "global.h" #include "global.h"
#include "bnpview.h" #include "bnpview.h"
/** class SingleSelectionKIconView: */ /** class SingleSelectionTDEIconView: */
SingleSelectionKIconView::SingleSelectionKIconView(TQWidget *parent, const char *name, WFlags f) SingleSelectionTDEIconView::SingleSelectionTDEIconView(TQWidget *parent, const char *name, WFlags f)
: KIconView(parent, name, f), m_lastSelected(0) : TDEIconView(parent, name, f), m_lastSelected(0)
{ {
connect( this, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQIconViewItem*)) ); connect( this, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQIconViewItem*)) );
connect( this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) ); connect( this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()) );
} }
TQDragObject* SingleSelectionKIconView::dragObject() TQDragObject* SingleSelectionTDEIconView::dragObject()
{ {
return 0; return 0;
} }
void SingleSelectionKIconView::slotSelectionChanged(TQIconViewItem *item) void SingleSelectionTDEIconView::slotSelectionChanged(TQIconViewItem *item)
{ {
if (item) if (item)
m_lastSelected = item; m_lastSelected = item;
} }
void SingleSelectionKIconView::slotSelectionChanged() void SingleSelectionTDEIconView::slotSelectionChanged()
{ {
if (m_lastSelected && !m_lastSelected->isSelected()) if (m_lastSelected && !m_lastSelected->isSelected())
m_lastSelected->setSelected(true); m_lastSelected->setSelected(true);
@ -94,8 +94,8 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
// Icon, Name and Background Color: // Icon, Name and Background Color:
TQHBoxLayout *nameLayout = new TQHBoxLayout(0, marginHint()*2/3, spacingHint()); TQHBoxLayout *nameLayout = new TQHBoxLayout(0, marginHint()*2/3, spacingHint());
m_icon = new KIconButton(page); m_icon = new TDEIconButton(page);
m_icon->setIconType(KIcon::NoGroup, KIcon::Action); m_icon->setIconType(TDEIcon::NoGroup, TDEIcon::Action);
m_icon->setIconSize(16); m_icon->setIconSize(16);
m_icon->setIcon(m_defaultProperties.icon.isEmpty() ? "basket" : m_defaultProperties.icon); m_icon->setIcon(m_defaultProperties.icon.isEmpty() ? "basket" : m_defaultProperties.icon);
int size = TQMAX(m_icon->sizeHint().width(), m_icon->sizeHint().height()); int size = TQMAX(m_icon->sizeHint().width(), m_icon->sizeHint().height());
@ -140,11 +140,11 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
// *Meeting Summary // *Meeting Summary
// Hobbies: // Hobbies:
// * // *
m_templates = new SingleSelectionKIconView(page); m_templates = new SingleSelectionTDEIconView(page);
m_templates->setItemsMovable(false); m_templates->setItemsMovable(false);
m_templates->setMode(KIconView::Select); m_templates->setMode(TDEIconView::Select);
m_templates->setGridX(m_templates->maxItemWidth()); m_templates->setGridX(m_templates->maxItemWidth());
KIconViewItem *lastTemplate = 0; TDEIconViewItem *lastTemplate = 0;
TQPixmap icon(40, 53); TQPixmap icon(40, 53);
TQPainter painter(&icon); TQPainter painter(&icon);
@ -152,7 +152,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
painter.setPen(TDEGlobalSettings::textColor()); painter.setPen(TDEGlobalSettings::textColor());
painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawRect(0, 0, icon.width(), icon.height());
painter.end(); painter.end();
lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("One column"), icon); lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("One column"), icon);
if (defaultTemplate == "1column") if (defaultTemplate == "1column")
m_templates->setSelected(lastTemplate, true); m_templates->setSelected(lastTemplate, true);
@ -163,7 +163,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawRect(0, 0, icon.width(), icon.height());
painter.drawLine(icon.width() / 2, 0, icon.width() / 2, icon.height()); painter.drawLine(icon.width() / 2, 0, icon.width() / 2, icon.height());
painter.end(); painter.end();
lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Two columns"), icon); lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("Two columns"), icon);
if (defaultTemplate == "2columns") if (defaultTemplate == "2columns")
m_templates->setSelected(lastTemplate, true); m_templates->setSelected(lastTemplate, true);
@ -175,7 +175,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
painter.drawLine(icon.width() / 3, 0, icon.width() / 3, icon.height()); painter.drawLine(icon.width() / 3, 0, icon.width() / 3, icon.height());
painter.drawLine(icon.width() * 2 / 3, 0, icon.width() * 2 / 3, icon.height()); painter.drawLine(icon.width() * 2 / 3, 0, icon.width() * 2 / 3, icon.height());
painter.end(); painter.end();
lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Three columns"), icon); lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("Three columns"), icon);
if (defaultTemplate == "3columns") if (defaultTemplate == "3columns")
m_templates->setSelected(lastTemplate, true); m_templates->setSelected(lastTemplate, true);
@ -187,7 +187,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
painter.drawRect(icon.width() / 5, icon.width() / 5, icon.width() / 4, icon.height() / 8); painter.drawRect(icon.width() / 5, icon.width() / 5, icon.width() / 4, icon.height() / 8);
painter.drawRect(icon.width() * 2 / 5, icon.width() * 2 / 5, icon.width() / 4, icon.height() / 8); painter.drawRect(icon.width() * 2 / 5, icon.width() * 2 / 5, icon.width() / 4, icon.height() / 8);
painter.end(); painter.end();
lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Free"), icon); lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("Free"), icon);
if (defaultTemplate == "free") if (defaultTemplate == "free")
m_templates->setSelected(lastTemplate, true); m_templates->setSelected(lastTemplate, true);
@ -198,7 +198,7 @@ NewBasketDialog::NewBasketDialog(Basket *parentBasket, const NewBasketDefaultPro
painter.drawRect(0, 0, icon.width(), icon.height()); painter.drawRect(0, 0, icon.width(), icon.height());
painter.drawRect(icon.width() * 2 / 5, icon.height() * 3 / 7, icon.width() / 5, icon.height() / 7); painter.drawRect(icon.width() * 2 / 5, icon.height() * 3 / 7, icon.width() / 5, icon.height() / 7);
painter.end(); painter.end();
lastTemplate = new KIconViewItem(m_templates, lastTemplate, i18n("Mind map"), icon);*/ lastTemplate = new TDEIconViewItem(m_templates, lastTemplate, i18n("Mind map"), icon);*/
m_templates->setMinimumHeight(topLayout->minimumSize().width() * 9 / 16); m_templates->setMinimumHeight(topLayout->minimumSize().width() * 9 / 16);
@ -262,7 +262,7 @@ int NewBasketDialog::populateBasketsList(TQListViewItem *item, int indent, int i
while (item) { while (item) {
// Get the basket data: // Get the basket data:
Basket *basket = ((BasketListViewItem*)item)->basket(); Basket *basket = ((BasketListViewItem*)item)->basket();
TQPixmap icon = kapp->iconLoader()->loadIcon(basket->icon(), KIcon::NoGroup, ICON_SIZE, KIcon::DefaultState, 0L, /*canReturnNull=*/false); TQPixmap icon = kapp->iconLoader()->loadIcon(basket->icon(), TDEIcon::NoGroup, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false);
icon = Tools::indentPixmap(icon, indent, 2 * ICON_SIZE / 3); icon = Tools::indentPixmap(icon, indent, 2 * ICON_SIZE / 3);
// Append item to the list: // Append item to the list:
@ -297,7 +297,7 @@ void NewBasketDialog::nameChanged(const TQString &newName)
void NewBasketDialog::slotOk() void NewBasketDialog::slotOk()
{ {
TQIconViewItem *item = ((SingleSelectionKIconView*)m_templates)->selectedItem(); TQIconViewItem *item = ((SingleSelectionTDEIconView*)m_templates)->selectedItem();
TQString templateName; TQString templateName;
if (item->text() == i18n("One column")) if (item->text() == i18n("One column"))
templateName = "1column"; templateName = "1column";

@ -25,7 +25,7 @@
#include <kiconview.h> #include <kiconview.h>
#include <tqmap.h> #include <tqmap.h>
class KIconButton; class TDEIconButton;
class TQLineEdit; class TQLineEdit;
class TQDragObject; class TQDragObject;
class TQListViewItem; class TQListViewItem;
@ -34,16 +34,16 @@ class Basket;
class KColorCombo2; class KColorCombo2;
/** The class KIconView allow to drag items. We don't want to, so we disable it. /** The class TDEIconView allow to drag items. We don't want to, so we disable it.
* This class also unselect the selected item when the user right click an empty space. We don't want to, so we reselect it if that happens. * This class also unselect the selected item when the user right click an empty space. We don't want to, so we reselect it if that happens.
* @author Sébastien Laoût * @author Sébastien Laoût
*/ */
class SingleSelectionKIconView : public KIconView class SingleSelectionTDEIconView : public TDEIconView
{ {
Q_OBJECT Q_OBJECT
public: public:
SingleSelectionKIconView(TQWidget *parent = 0, const char *name = 0, WFlags f = 0); SingleSelectionTDEIconView(TQWidget *parent = 0, const char *name = 0, WFlags f = 0);
TQDragObject* dragObject(); TQDragObject* dragObject();
TQIconViewItem* selectedItem() { return m_lastSelected; } TQIconViewItem* selectedItem() { return m_lastSelected; }
private slots: private slots:
@ -91,10 +91,10 @@ class NewBasketDialog : public KDialogBase
private: private:
int populateBasketsList(TQListViewItem *item, int indent, int index); int populateBasketsList(TQListViewItem *item, int indent, int index);
NewBasketDefaultProperties m_defaultProperties; NewBasketDefaultProperties m_defaultProperties;
KIconButton *m_icon; TDEIconButton *m_icon;
TQLineEdit *m_name; TQLineEdit *m_name;
KColorCombo2 *m_backgroundColor; KColorCombo2 *m_backgroundColor;
KIconView *m_templates; TDEIconView *m_templates;
TQComboBox *m_createIn; TQComboBox *m_createIn;
TQMap<int, Basket*> m_basketsMap; TQMap<int, Basket*> m_basketsMap;
}; };

@ -1972,7 +1972,7 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect)
int xIcon = HANDLE_WIDTH + NOTE_MARGIN; int xIcon = HANDLE_WIDTH + NOTE_MARGIN;
for (State::List::Iterator it = m_states.begin(); it != m_states.end(); ++it) { for (State::List::Iterator it = m_states.begin(); it != m_states.end(); ++it) {
if (!(*it)->emblem().isEmpty()) { if (!(*it)->emblem().isEmpty()) {
TQPixmap stateEmblem = kapp->iconLoader()->loadIcon((*it)->emblem(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, false); TQPixmap stateEmblem = kapp->iconLoader()->loadIcon((*it)->emblem(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, false);
painter2.drawPixmap(xIcon, yIcon, stateEmblem); painter2.drawPixmap(xIcon, yIcon, stateEmblem);
xIcon += NOTE_MARGIN + EMBLEM_SIZE; xIcon += NOTE_MARGIN + EMBLEM_SIZE;
} }

@ -551,10 +551,10 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK
TQWidget *wid = new TQWidget(page); TQWidget *wid = new TQWidget(page);
TQHBoxLayout *hLay = new TQHBoxLayout(wid, /*margin=*/0, spacingHint()); TQHBoxLayout *hLay = new TQHBoxLayout(wid, /*margin=*/0, spacingHint());
m_icon = new KIconButton(wid); m_icon = new TDEIconButton(wid);
TQLabel *label3 = new TQLabel(m_icon, i18n("&Icon:"), page); TQLabel *label3 = new TQLabel(m_icon, i18n("&Icon:"), page);
KURL filteredURL = NoteFactory::filteredURL(KURL(m_url->lineEdit()->text()));//KURIFilter::self()->filteredURI(KURL(m_url->lineEdit()->text())); KURL filteredURL = NoteFactory::filteredURL(KURL(m_url->lineEdit()->text()));//KURIFilter::self()->filteredURI(KURL(m_url->lineEdit()->text()));
m_icon->setIconType(KIcon::NoGroup, KIcon::MimeType); m_icon->setIconType(TDEIcon::NoGroup, TDEIcon::MimeType);
m_icon->setIconSize(LinkLook::lookForURL(filteredURL)->iconSize()); m_icon->setIconSize(LinkLook::lookForURL(filteredURL)->iconSize());
m_autoIcon = new TQPushButton(i18n("Auto"), wid); // Create before to know size here: m_autoIcon = new TQPushButton(i18n("Auto"), wid); // Create before to know size here:
/* Icon button: */ /* Icon button: */
@ -704,9 +704,9 @@ LauncherEditDialog::LauncherEditDialog(LauncherContent *contentNote, TQWidget *p
TQWidget *wid = new TQWidget(page); TQWidget *wid = new TQWidget(page);
TQHBoxLayout *hLay = new TQHBoxLayout(wid, /*margin=*/0, spacingHint()); TQHBoxLayout *hLay = new TQHBoxLayout(wid, /*margin=*/0, spacingHint());
m_icon = new KIconButton(wid); m_icon = new TDEIconButton(wid);
TQLabel *label = new TQLabel(m_icon, i18n("&Icon:"), page); TQLabel *label = new TQLabel(m_icon, i18n("&Icon:"), page);
m_icon->setIconType(KIcon::NoGroup, KIcon::Application); m_icon->setIconType(TDEIcon::NoGroup, TDEIcon::Application);
m_icon->setIconSize(LinkLook::launcherLook->iconSize()); m_icon->setIconSize(LinkLook::launcherLook->iconSize());
TQPushButton *guessButton = new TQPushButton(i18n("&Guess"), wid); TQPushButton *guessButton = new TQPushButton(i18n("&Guess"), wid);
/* Icon button: */ /* Icon button: */

@ -28,7 +28,7 @@
class TQWidget; class TQWidget;
//class TQLineEdit; //class TQLineEdit;
class TQPushButton; class TQPushButton;
class KIconButton; class TDEIconButton;
class KURLRequester; class KURLRequester;
class KTextEdit; class KTextEdit;
class TDEMainWindow; class TDEMainWindow;
@ -237,7 +237,7 @@ class LinkEditDialog : public KDialogBase
bool m_isAutoModified; bool m_isAutoModified;
KURLRequester *m_url; KURLRequester *m_url;
TQLineEdit *m_title; TQLineEdit *m_title;
KIconButton *m_icon; TDEIconButton *m_icon;
TQPushButton *m_autoTitle; TQPushButton *m_autoTitle;
TQPushButton *m_autoIcon; TQPushButton *m_autoIcon;
}; };
@ -261,7 +261,7 @@ class LauncherEditDialog : public KDialogBase
LauncherContent *m_noteContent; LauncherContent *m_noteContent;
RunCommandRequester *m_command; RunCommandRequester *m_command;
TQLineEdit *m_name; TQLineEdit *m_name;
KIconButton *m_icon; TDEIconButton *m_icon;
}; };
/** This class manage toolbars for the inline editors. /** This class manage toolbars for the inline editors.

@ -937,7 +937,7 @@ TQString NoteFactory::iconForCommand(const TQString &command)
bool NoteFactory::isIconExist(const TQString &icon) bool NoteFactory::isIconExist(const TQString &icon)
{ {
return ! kapp->iconLoader()->loadIcon(icon, KIcon::NoGroup, 16, KIcon::DefaultState, 0L, true).isNull(); return ! kapp->iconLoader()->loadIcon(icon, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true).isNull();
} }
Note* NoteFactory::createEmptyNote(NoteType::Id type, Basket *parent) Note* NoteFactory::createEmptyNote(NoteType::Id type, Basket *parent)
@ -986,7 +986,7 @@ Note* NoteFactory::importKMenuLauncher(Basket *parent)
Note* NoteFactory::importIcon(Basket *parent) Note* NoteFactory::importIcon(Basket *parent)
{ {
TQString iconName = KIconDialog::getIcon( KIcon::Desktop, KIcon::Application, false, Settings::defIconSize() ); TQString iconName = TDEIconDialog::getIcon( TDEIcon::Desktop, TDEIcon::Application, false, Settings::defIconSize() );
if ( ! iconName.isEmpty() ) { if ( ! iconName.isEmpty() ) {
IconSizeDialog dialog(i18n("Import Icon as Image"), i18n("Choose the size of the icon to import as an image:"), iconName, Settings::defIconSize(), 0); IconSizeDialog dialog(i18n("Import Icon as Image"), i18n("Choose the size of the icon to import as an image:"), iconName, Settings::defIconSize(), 0);
dialog.exec(); dialog.exec();

@ -213,7 +213,7 @@ SystemTray::SystemTray(TQWidget *parent, const char *name)
TQImage lockedIconImage = m_iconPixmap.convertToImage(); TQImage lockedIconImage = m_iconPixmap.convertToImage();
TQPixmap lockOverlayPixmap = loadIcon("lockoverlay"); TQPixmap lockOverlayPixmap = loadIcon("lockoverlay");
TQImage lockOverlayImage = lockOverlayPixmap.convertToImage(); TQImage lockOverlayImage = lockOverlayPixmap.convertToImage();
KIconEffect::overlay(lockedIconImage, lockOverlayImage); TDEIconEffect::overlay(lockedIconImage, lockOverlayImage);
m_lockedIconPixmap.convertFromImage(lockedIconImage); m_lockedIconPixmap.convertFromImage(lockedIconImage);
updateToolTip(); // Set toolTip AND icon updateToolTip(); // Set toolTip AND icon
@ -362,7 +362,7 @@ static bool copyImage(TQImage &dest, TQImage &src, int x, int y)
if((y + src.height()) >= dest.height()) if((y + src.height()) >= dest.height())
return false; return false;
// We want to use KIconEffect::overlay to do this, since it handles // We want to use TDEIconEffect::overlay to do this, since it handles
// alpha, but the images need to be the same size. We can handle that. // alpha, but the images need to be the same size. We can handle that.
TQImage large_src(dest); TQImage large_src(dest);
@ -388,7 +388,7 @@ static bool copyImage(TQImage &dest, TQImage &src, int x, int y)
// Apply effect to image // Apply effect to image
KIconEffect::overlay(dest, large_src); TDEIconEffect::overlay(dest, large_src);
return true; return true;
} }
@ -412,11 +412,11 @@ void SystemTray::updateToolTip()
TQImage fgImage = fgPix.convertToImage(); // Should be 16x16 TQImage fgImage = fgPix.convertToImage(); // Should be 16x16
TQImage lockOverlayImage = loadIcon("lockoverlay").convertToImage(); TQImage lockOverlayImage = loadIcon("lockoverlay").convertToImage();
KIconEffect::semiTransparent(bgImage); TDEIconEffect::semiTransparent(bgImage);
copyImage(bgImage, fgImage, (bgImage.width() - fgImage.width()) / 2, copyImage(bgImage, fgImage, (bgImage.width() - fgImage.width()) / 2,
(bgImage.height() - fgImage.height()) / 2); (bgImage.height() - fgImage.height()) / 2);
if (basket->isLocked()) if (basket->isLocked())
KIconEffect::overlay(bgImage, lockOverlayImage); TDEIconEffect::overlay(bgImage, lockOverlayImage);
bgPix.convertFromImage(bgImage); bgPix.convertFromImage(bgImage);
setPixmap(bgPix); setPixmap(bgPix);

@ -724,7 +724,7 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac
TQPen pen = painter->pen(); TQPen pen = painter->pen();
TQFont font = painter->font(); TQFont font = painter->font();
int iconSize = KIcon::SizeSmall; int iconSize = TDEIcon::SizeSmall;
int iconMargin = StateMenuItem::iconMargin(); int iconMargin = StateMenuItem::iconMargin();
/* When an item is disabled, it often have a 3D sunken look. /* When an item is disabled, it often have a 3D sunken look.
@ -743,8 +743,8 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac
} else } else
drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light(); drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light();
if (!m_icon.isEmpty() && !drawingEtchedText) { if (!m_icon.isEmpty() && !drawingEtchedText) {
TQPixmap icon = kapp->iconLoader()->loadIcon(m_icon, KIcon::Small, iconSize, TQPixmap icon = kapp->iconLoader()->loadIcon(m_icon, TDEIcon::Small, iconSize,
(enabled ? (active ? KIcon::ActiveState : KIcon::DefaultState) : KIcon::DisabledState), (enabled ? (active ? TDEIcon::ActiveState : TDEIcon::DefaultState) : TDEIcon::DisabledState),
/*path_store=*/0L, /*canReturnNull=*/true); /*path_store=*/0L, /*canReturnNull=*/true);
painter->drawPixmap(x, y + (h-iconSize)/2, icon); painter->drawPixmap(x, y + (h-iconSize)/2, icon);
} }
@ -770,7 +770,7 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac
TQSize IndentedMenuItem::sizeHint() TQSize IndentedMenuItem::sizeHint()
{ {
int iconSize = KIcon::SizeSmall; int iconSize = TDEIcon::SizeSmall;
int iconMargin = StateMenuItem::iconMargin(); int iconMargin = StateMenuItem::iconMargin();
TQSize textSize = TQFontMetrics(TDEGlobalSettings::menuFont()).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, m_text ); TQSize textSize = TQFontMetrics(TDEGlobalSettings::menuFont()).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, m_text );
return TQSize(iconSize + iconMargin + textSize.width(), textSize.height()); return TQSize(iconSize + iconMargin + textSize.width(), textSize.height());
@ -793,7 +793,7 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ
TQPen pen = painter->pen(); TQPen pen = painter->pen();
TQFont font = painter->font(); TQFont font = painter->font();
int iconSize = 16; // We use 16 instead of KIcon::SizeSmall (the size of icons in menus) because tags will always be 16*16 icons int iconSize = 16; // We use 16 instead of TDEIcon::SizeSmall (the size of icons in menus) because tags will always be 16*16 icons
if (!active && m_state->backgroundColor().isValid()) if (!active && m_state->backgroundColor().isValid())
painter->fillRect(x/*-1*/, y/*-1*/, w/*+2*/, h/*+2*/, m_state->backgroundColor()); painter->fillRect(x/*-1*/, y/*-1*/, w/*+2*/, h/*+2*/, m_state->backgroundColor());
@ -813,8 +813,8 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ
} else } else
drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light(); drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light();
if (!m_state->emblem().isEmpty() && !drawingEtchedText) { if (!m_state->emblem().isEmpty() && !drawingEtchedText) {
TQPixmap icon = kapp->iconLoader()->loadIcon(m_state->emblem(), KIcon::Small, iconSize, TQPixmap icon = kapp->iconLoader()->loadIcon(m_state->emblem(), TDEIcon::Small, iconSize,
(enabled ? (active ? KIcon::ActiveState : KIcon::DefaultState) : KIcon::DisabledState), (enabled ? (active ? TDEIcon::ActiveState : TDEIcon::DefaultState) : TDEIcon::DisabledState),
/*path_store=*/0L, /*canReturnNull=*/true); /*path_store=*/0L, /*canReturnNull=*/true);
painter->drawPixmap(x, y + (h-iconSize)/2, icon); painter->drawPixmap(x, y + (h-iconSize)/2, icon);
} }
@ -843,7 +843,7 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ
TQSize StateMenuItem::sizeHint() TQSize StateMenuItem::sizeHint()
{ {
int iconSize = 16; // We use 16 instead of KIcon::SizeSmall (the size of icons in menus) because tags will always be 16*16 icons int iconSize = 16; // We use 16 instead of TDEIcon::SizeSmall (the size of icons in menus) because tags will always be 16*16 icons
TQFont theFont = m_state->font(TDEGlobalSettings::menuFont()); TQFont theFont = m_state->font(TDEGlobalSettings::menuFont());
TQSize textSize = TQFontMetrics(theFont).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, m_name ); TQSize textSize = TQFontMetrics(theFont).size( AlignLeft | AlignVCenter | ShowPrefix | DontClip, m_name );
return TQSize(iconSize + iconMargin() + textSize.width(), textSize.height()); return TQSize(iconSize + iconMargin() + textSize.width(), textSize.height());

@ -231,7 +231,7 @@ void TagListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*colorG
TQFontMetrics fontMetrics(font); TQFontMetrics fontMetrics(font);
TQRect textRect = fontMetrics.boundingRect(0, 0, /*width=*/1, 500000, TQt::AlignAuto | TQt::AlignTop, text); TQRect textRect = fontMetrics.boundingRect(0, 0, /*width=*/1, 500000, TQt::AlignAuto | TQt::AlignTop, text);
TQPixmap emblem = (withIcon ? kapp->iconLoader()->loadIcon(state->emblem(), KIcon::NoGroup, 16, KIcon::DefaultState, 0L, /*canReturnNull=*/true) : TQPixmap()); TQPixmap emblem = (withIcon ? kapp->iconLoader()->loadIcon(state->emblem(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true) : TQPixmap());
TQColor backgroundColor = (isSelected() ? TDEGlobalSettings::highlightColor() TQColor backgroundColor = (isSelected() ? TDEGlobalSettings::highlightColor()
: (withIcon && state->backgroundColor().isValid() ? state->backgroundColor() : (withIcon && state->backgroundColor().isValid() ? state->backgroundColor()
@ -402,8 +402,8 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew
m_stateNameLabel = new TQLabel(m_stateName, i18n("Na&me:"), stateWidget); m_stateNameLabel = new TQLabel(m_stateName, i18n("Na&me:"), stateWidget);
TQWidget *emblemWidget = new TQWidget(stateWidget); TQWidget *emblemWidget = new TQWidget(stateWidget);
m_emblem = new KIconButton(emblemWidget); m_emblem = new TDEIconButton(emblemWidget);
m_emblem->setIconType(KIcon::NoGroup, KIcon::Action); m_emblem->setIconType(TDEIcon::NoGroup, TDEIcon::Action);
m_emblem->setIconSize(16); m_emblem->setIconSize(16);
m_emblem->setIcon("editdelete"); m_emblem->setIcon("editdelete");
m_removeEmblem = new TQPushButton(i18n("Remove tag emblem", "Remo&ve"), emblemWidget); m_removeEmblem = new TQPushButton(i18n("Remove tag emblem", "Remo&ve"), emblemWidget);
@ -429,26 +429,26 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew
backgroundColorLayout->addWidget(m_backgroundColor); backgroundColorLayout->addWidget(m_backgroundColor);
backgroundColorLayout->addStretch(); backgroundColorLayout->addStretch();
TQIconSet boldIconSet = kapp->iconLoader()->loadIconSet("text_bold", KIcon::Small); TQIconSet boldIconSet = kapp->iconLoader()->loadIconSet("text_bold", TDEIcon::Small);
m_bold = new TQPushButton(boldIconSet, "", stateWidget); m_bold = new TQPushButton(boldIconSet, "", stateWidget);
m_bold->setToggleButton(true); m_bold->setToggleButton(true);
int size = TQMAX(m_bold->sizeHint().width(), m_bold->sizeHint().height()); int size = TQMAX(m_bold->sizeHint().width(), m_bold->sizeHint().height());
m_bold->setFixedSize(size, size); // Make it square! m_bold->setFixedSize(size, size); // Make it square!
TQToolTip::add(m_bold, i18n("Bold")); TQToolTip::add(m_bold, i18n("Bold"));
TQIconSet underlineIconSet = kapp->iconLoader()->loadIconSet("text_under", KIcon::Small); TQIconSet underlineIconSet = kapp->iconLoader()->loadIconSet("text_under", TDEIcon::Small);
m_underline = new TQPushButton(underlineIconSet, "", stateWidget); m_underline = new TQPushButton(underlineIconSet, "", stateWidget);
m_underline->setToggleButton(true); m_underline->setToggleButton(true);
m_underline->setFixedSize(size, size); // Make it square! m_underline->setFixedSize(size, size); // Make it square!
TQToolTip::add(m_underline, i18n("Underline")); TQToolTip::add(m_underline, i18n("Underline"));
TQIconSet italicIconSet = kapp->iconLoader()->loadIconSet("text_italic", KIcon::Small); TQIconSet italicIconSet = kapp->iconLoader()->loadIconSet("text_italic", TDEIcon::Small);
m_italic = new TQPushButton(italicIconSet, "", stateWidget); m_italic = new TQPushButton(italicIconSet, "", stateWidget);
m_italic->setToggleButton(true); m_italic->setToggleButton(true);
m_italic->setFixedSize(size, size); // Make it square! m_italic->setFixedSize(size, size); // Make it square!
TQToolTip::add(m_italic, i18n("Italic")); TQToolTip::add(m_italic, i18n("Italic"));
TQIconSet strikeIconSet = kapp->iconLoader()->loadIconSet("text_strike", KIcon::Small); TQIconSet strikeIconSet = kapp->iconLoader()->loadIconSet("text_strike", TDEIcon::Small);
m_strike = new TQPushButton(strikeIconSet, "", stateWidget); m_strike = new TQPushButton(strikeIconSet, "", stateWidget);
m_strike->setToggleButton(true); m_strike->setToggleButton(true);
m_strike->setFixedSize(size, size); // Make it square! m_strike->setFixedSize(size, size); // Make it square!

@ -31,7 +31,7 @@ class TQLineEdit;
class TQCheckBox; class TQCheckBox;
class KPushButton; class KPushButton;
class KKeyButton; class KKeyButton;
class KIconButton; class TDEIconButton;
class TDEFontCombo; class TDEFontCombo;
class TQLabel; class TQLabel;
class TDEShortcut; class TDEShortcut;
@ -164,7 +164,7 @@ class TagsEditDialog : public KDialogBase
TQGroupBox *m_stateBox; TQGroupBox *m_stateBox;
TQLabel *m_stateNameLabel; TQLabel *m_stateNameLabel;
TQLineEdit *m_stateName; TQLineEdit *m_stateName;
KIconButton *m_emblem; TDEIconButton *m_emblem;
TQPushButton *m_removeEmblem; TQPushButton *m_removeEmblem;
TQPushButton *m_bold; TQPushButton *m_bold;
TQPushButton *m_underline; TQPushButton *m_underline;

@ -176,10 +176,10 @@ void HelpLabel::keyPressEvent(TQKeyEvent *event)
/** class IconSizeDialog: */ /** class IconSizeDialog: */
class UndraggableKIconView : public KIconView class UndraggableTDEIconView : public TDEIconView
{ {
public: public:
UndraggableKIconView(TQWidget * parent = 0, const char * name = 0, WFlags f = 0) : KIconView(parent, name, f) {} UndraggableTDEIconView(TQWidget * parent = 0, const char * name = 0, WFlags f = 0) : TDEIconView(parent, name, f) {}
TQDragObject* dragObject() { return 0; } TQDragObject* dragObject() { return 0; }
}; };
@ -193,15 +193,15 @@ IconSizeDialog::IconSizeDialog(const TQString &caption, const TQString &message,
TQLabel *label = new TQLabel(message, page); TQLabel *label = new TQLabel(message, page);
topLayout->addWidget(label); topLayout->addWidget(label);
KIconView *iconView = new UndraggableKIconView(page); TDEIconView *iconView = new UndraggableTDEIconView(page);
iconView->setItemsMovable(false); iconView->setItemsMovable(false);
iconView->setSelectionMode(KIconView::Single); iconView->setSelectionMode(TDEIconView::Single);
m_size16 = new KIconViewItem(iconView, 0, i18n("16 by 16 pixels"), DesktopIcon(icon, 16)); m_size16 = new TDEIconViewItem(iconView, 0, i18n("16 by 16 pixels"), DesktopIcon(icon, 16));
m_size22 = new KIconViewItem(iconView, m_size16, i18n("22 by 22 pixels"), DesktopIcon(icon, 22)); m_size22 = new TDEIconViewItem(iconView, m_size16, i18n("22 by 22 pixels"), DesktopIcon(icon, 22));
m_size32 = new KIconViewItem(iconView, m_size22, i18n("32 by 32 pixels"), DesktopIcon(icon, 32)); m_size32 = new TDEIconViewItem(iconView, m_size22, i18n("32 by 32 pixels"), DesktopIcon(icon, 32));
m_size48 = new KIconViewItem(iconView, m_size32, i18n("48 by 48 pixels"), DesktopIcon(icon, 48)); m_size48 = new TDEIconViewItem(iconView, m_size32, i18n("48 by 48 pixels"), DesktopIcon(icon, 48));
m_size64 = new KIconViewItem(iconView, m_size48, i18n("64 by 64 pixels"), DesktopIcon(icon, 64)); m_size64 = new TDEIconViewItem(iconView, m_size48, i18n("64 by 64 pixels"), DesktopIcon(icon, 64));
m_size128 = new KIconViewItem(iconView, m_size64, i18n("128 by 128 pixels"), DesktopIcon(icon, 128)); m_size128 = new TDEIconViewItem(iconView, m_size64, i18n("128 by 128 pixels"), DesktopIcon(icon, 128));
iconView->setMinimumWidth(m_size16->width() + m_size22->width() + m_size32->width() + m_size48->width() + m_size64->width() + m_size128->width() + iconView->setMinimumWidth(m_size16->width() + m_size22->width() + m_size32->width() + m_size48->width() + m_size64->width() + m_size128->width() +
(6+2) * iconView->spacing() + 20); (6+2) * iconView->spacing() + 20);
iconView->setMinimumHeight(m_size128->height() + 2 * iconView->spacing() + 20); iconView->setMinimumHeight(m_size128->height() + 2 * iconView->spacing() + 20);

@ -29,7 +29,7 @@
#include <kdialogbase.h> #include <kdialogbase.h>
class TQLineEdit; class TQLineEdit;
class KIconViewItem; class TDEIconViewItem;
class TQIconViewItem; class TQIconViewItem;
class Basket; class Basket;
@ -121,12 +121,12 @@ class IconSizeDialog : public KDialogBase
void slotSelectionChanged(); void slotSelectionChanged();
void choose(TQIconViewItem*); void choose(TQIconViewItem*);
private: private:
KIconViewItem *m_size16; TDEIconViewItem *m_size16;
KIconViewItem *m_size22; TDEIconViewItem *m_size22;
KIconViewItem *m_size32; TDEIconViewItem *m_size32;
KIconViewItem *m_size48; TDEIconViewItem *m_size48;
KIconViewItem *m_size64; TDEIconViewItem *m_size64;
KIconViewItem *m_size128; TDEIconViewItem *m_size128;
int m_iconSize; int m_iconSize;
}; };

Loading…
Cancel
Save