Rename KIcon to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent fe573833ca
commit 90ccb026e1

@ -43,9 +43,9 @@
Configure::Configure(KNetStats* parent, const InterfaceMap& ifs) : ConfigureBase(parent) { Configure::Configure(KNetStats* parent, const InterfaceMap& ifs) : ConfigureBase(parent) {
// Load configuration // Load configuration
KIconLoader* loader = kapp->iconLoader(); TDEIconLoader* loader = kapp->iconLoader();
TQPixmap iconPCI = loader->loadIcon("icon_pci.png", KIcon::Small, 16); TQPixmap iconPCI = loader->loadIcon("icon_pci.png", TDEIcon::Small, 16);
// Clone the configuration. // Clone the configuration.
for (InterfaceMap::ConstIterator it = ifs.begin(); it != ifs.end(); ++it) { for (InterfaceMap::ConstIterator it = ifs.begin(); it != ifs.end(); ++it) {
@ -131,23 +131,23 @@ bool Configure::canSaveConfig()
void Configure::changeTheme(int theme) void Configure::changeTheme(int theme)
{ {
KIconLoader* loader = kapp->iconLoader(); TDEIconLoader* loader = kapp->iconLoader();
mIconError->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_error.png", mIconError->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_error.png",
KIcon::Panel, ICONSIZE)); TDEIcon::Panel, ICONSIZE));
mIconNone->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_none.png", mIconNone->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_none.png",
KIcon::Panel, ICONSIZE)); TDEIcon::Panel, ICONSIZE));
mIconTx->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_tx.png", mIconTx->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_tx.png",
KIcon::Panel, ICONSIZE)); TDEIcon::Panel, ICONSIZE));
mIconRx->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_rx.png", mIconRx->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_rx.png",
KIcon::Panel, ICONSIZE)); TDEIcon::Panel, ICONSIZE));
mIconBoth->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_both.png", mIconBoth->setPixmap(loader->loadIcon("theme"+TQString::number(theme)+"_both.png",
KIcon::Panel, ICONSIZE)); TDEIcon::Panel, ICONSIZE));
} }
/* /*
void Configure::showInterfaceContextMenu(TQListBoxItem* item, const TQPoint& point) { void Configure::showInterfaceContextMenu(TQListBoxItem* item, const TQPoint& point) {
if (!item && mConfig.size() == 1) if (!item && mConfig.size() == 1)
return; return;
TQPixmap icon = kapp->iconLoader()->loadIcon("editdelete", KIcon::Small, 16); TQPixmap icon = kapp->iconLoader()->loadIcon("editdelete", TDEIcon::Small, 16);
TQPopupMenu* menu = new TQPopupMenu(this); TQPopupMenu* menu = new TQPopupMenu(this);
menu->insertItem(icon, i18n("Renomve Interface"), this, TQT_SLOT(removeInterface())); menu->insertItem(icon, i18n("Renomve Interface"), this, TQT_SLOT(removeInterface()));
menu->exec(point); menu->exec(point);

@ -105,17 +105,17 @@ void KNetStatsView::setup() {
setFont(mOptions.mTxtFont); setFont(mOptions.mTxtFont);
else if (mOptions.mViewMode == Icon) { else if (mOptions.mViewMode == Icon) {
// Load Icons // Load Icons
KIconLoader* loader = kapp->iconLoader(); TDEIconLoader* loader = kapp->iconLoader();
mIconError = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_error.png", mIconError = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_error.png",
KIcon::Panel, ICONSIZE); TDEIcon::Panel, ICONSIZE);
mIconNone = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_none.png", mIconNone = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_none.png",
KIcon::Panel, ICONSIZE); TDEIcon::Panel, ICONSIZE);
mIconTx = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_tx.png", mIconTx = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_tx.png",
KIcon::Panel, ICONSIZE); TDEIcon::Panel, ICONSIZE);
mIconRx =loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_rx.png", mIconRx =loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_rx.png",
KIcon::Panel, ICONSIZE); TDEIcon::Panel, ICONSIZE);
mIconBoth = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_both.png", mIconBoth = loader->loadIcon("theme"+TQString::number(mOptions.mTheme)+"_both.png",
KIcon::Panel, ICONSIZE); TDEIcon::Panel, ICONSIZE);
mCurrentIcon = &mIconNone; mCurrentIcon = &mIconNone;
} }
mTimer->start(mOptions.mUpdateInterval); mTimer->start(mOptions.mUpdateInterval);

Loading…
Cancel
Save