Rename KIcon to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent b4a44e228f
commit db9bddfafc

@ -89,7 +89,7 @@ TQPixmap DeviceTrayComponent::pixmapForState(NMDeviceState state)
TQMovie DeviceTrayComponent::movieForState(NMDeviceState state)
{
if (m_movies.contains(state)) {
return TQMovie( TDEGlobal::iconLoader()->moviePath(m_movies[state], KIcon::Panel));
return TQMovie( TDEGlobal::iconLoader()->moviePath(m_movies[state], TDEIcon::Panel));
} else {
return TQMovie();
}

@ -74,13 +74,13 @@ class ConnectionListViewItem : public TDEListViewItem
setText(1, info->getDevType());
// TODO: Move to a Factory
if (info->getDevType() == NM_SETTING_WIRED_SETTING_NAME)
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("wired", KIcon::Small));
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("wired", TDEIcon::Small));
else if (info->getDevType() == NM_SETTING_WIRELESS_SETTING_NAME)
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("wireless", KIcon::Small));
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("wireless", TDEIcon::Small));
else if (info->getDevType() == NM_SETTING_VPN_SETTING_NAME)
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("encrypted", KIcon::Small));
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("encrypted", TDEIcon::Small));
else
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("help", KIcon::Small));
setPixmap(0, TDEGlobal::iconLoader()->loadIcon("help", TDEIcon::Small));
}
}
@ -101,17 +101,17 @@ ConnectionEditorImpl::ConnectionEditorImpl(TQWidget* parent, const char* name, b
// pbEdit->hide();
pbNew->setIconSet(TDEGlobal::iconLoader()->loadIcon("add", KIcon::Small));
pbDelete->setIconSet(TDEGlobal::iconLoader()->loadIcon("remove", KIcon::Small));
pbEdit->setIconSet(TDEGlobal::iconLoader()->loadIcon("edit", KIcon::Small));
pbNew->setIconSet(TDEGlobal::iconLoader()->loadIcon("add", TDEIcon::Small));
pbDelete->setIconSet(TDEGlobal::iconLoader()->loadIcon("remove", TDEIcon::Small));
pbEdit->setIconSet(TDEGlobal::iconLoader()->loadIcon("edit", TDEIcon::Small));
TQPopupMenu* popup = new TQPopupMenu(pbNew);
// TODO: move to a factory class
popup->insertItem(TDEGlobal::iconLoader()->loadIcon("wireless", KIcon::Small), i18n("Wireless"), this, TQT_SLOT(slotNewWirelessConnection()));
popup->insertItem(TDEGlobal::iconLoader()->loadIcon("wired", KIcon::Small), i18n("Wired"), this, TQT_SLOT(slotNewWiredConnection()));
popup->insertItem(TDEGlobal::iconLoader()->loadIcon("wireless", TDEIcon::Small), i18n("Wireless"), this, TQT_SLOT(slotNewWirelessConnection()));
popup->insertItem(TDEGlobal::iconLoader()->loadIcon("wired", TDEIcon::Small), i18n("Wired"), this, TQT_SLOT(slotNewWiredConnection()));
if (!VPNManager::getVPNServices().isEmpty())
popup->insertItem(TDEGlobal::iconLoader()->loadIcon("encrypted", KIcon::Small), i18n("VPN"), this, TQT_SLOT(slotNewVPNConnection()));
popup->insertItem(TDEGlobal::iconLoader()->loadIcon("encrypted", TDEIcon::Small), i18n("VPN"), this, TQT_SLOT(slotNewVPNConnection()));
pbNew->setPopup(popup);

@ -56,18 +56,18 @@ class NetworkListViewItem : public TDEListViewItem
{
TQ_UINT8 strength = net.getStrength();
if (strength > 80)
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_100", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_100", TDEIcon::Small));
else if (strength > 55)
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_75", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_75", TDEIcon::Small));
else if (strength > 30)
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_50", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_50", TDEIcon::Small));
else if (strength > 5)
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_25", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_25", TDEIcon::Small));
else
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_00", KIcon::Small));
setPixmap(1, TDEGlobal::iconLoader()->loadIcon("nm_signal_00", TDEIcon::Small));
if (net.isEncrypted())
setPixmap(2, TDEGlobal::iconLoader()->loadIcon("lock", KIcon::Small));
setPixmap(2, TDEGlobal::iconLoader()->loadIcon("lock", TDEIcon::Small));
}
WirelessNetwork _net;

@ -160,7 +160,7 @@ void DeviceTray::setPixmap(const TQPixmap& pixmap)
TQImage iface_image = iface_pixmap.convertToImage();
TQImage pixmap_with_overlay = pixmap.convertToImage();
KIconEffect::overlay(pixmap_with_overlay, iface_image);
TDEIconEffect::overlay(pixmap_with_overlay, iface_image);
TQPixmap new_pixmap;
new_pixmap.convertFromImage(pixmap_with_overlay);
@ -288,13 +288,13 @@ void DeviceTray::loadIcons() {
d->pixmaps[NM_DEVICE_STATE_UNAVAILABLE] = loadSizedIcon("nm_no_connection", width());
d->pixmaps[NM_DEVICE_STATE_DISCONNECTED] = loadSizedIcon("nm_no_connection", width());
d->movies[NM_DEVICE_STATE_PREPARE] = TQMovie( TDEGlobal::iconLoader()->moviePath("nm_stage01_connecting", KIcon::Panel));
d->movies[NM_DEVICE_STATE_PREPARE] = TQMovie( TDEGlobal::iconLoader()->moviePath("nm_stage01_connecting", TDEIcon::Panel));
d->movies[NM_DEVICE_STATE_PREPARE].pause();
d->movies[NM_DEVICE_STATE_CONFIG] = TQMovie( TDEGlobal::iconLoader()->moviePath("nm_stage02_connecting", KIcon::Panel));
d->movies[NM_DEVICE_STATE_CONFIG] = TQMovie( TDEGlobal::iconLoader()->moviePath("nm_stage02_connecting", TDEIcon::Panel));
d->movies[NM_DEVICE_STATE_CONFIG].pause();
d->movies[NM_DEVICE_STATE_IP_CONFIG] = TQMovie( TDEGlobal::iconLoader()->moviePath("nm_stage03_connecting", KIcon::Panel));
d->movies[NM_DEVICE_STATE_IP_CONFIG] = TQMovie( TDEGlobal::iconLoader()->moviePath("nm_stage03_connecting", TDEIcon::Panel));
d->movies[NM_DEVICE_STATE_IP_CONFIG].pause();
d->movies[NM_DEVICE_STATE_NEED_AUTH] = d->movies[NM_DEVICE_STATE_CONFIG];

@ -959,10 +959,10 @@ void Tray::updateTrayIcon(NMDeviceState state)
// set the movie
if ((current_vpn_state == NM_VPN_CONNECTION_STATE_PREPARE) || (current_vpn_state == NM_VPN_CONNECTION_STATE_NEED_AUTH)) {
setMovie(TQMovie(TDEGlobal::iconLoader()->moviePath("nm_stage02_connecting_vpn", KIcon::Panel)));
setMovie(TQMovie(TDEGlobal::iconLoader()->moviePath("nm_stage02_connecting_vpn", TDEIcon::Panel)));
}
if ((current_vpn_state == NM_VPN_CONNECTION_STATE_CONNECT) || (current_vpn_state == NM_VPN_CONNECTION_STATE_IP_CONFIG_GET)) {
setMovie(TQMovie(TDEGlobal::iconLoader()->moviePath("nm_stage03_connecting_vpn", KIcon::Panel)));
setMovie(TQMovie(TDEGlobal::iconLoader()->moviePath("nm_stage03_connecting_vpn", TDEIcon::Panel)));
}
// start at the same frame as the movie before

@ -64,7 +64,7 @@ VPNAuthenticationDialog::VPNAuthenticationDialog(VPNConnection* conn, TQWidget*
{
this->setIcon(SmallIcon("encrypted", TQIconSet::Automatic));
this->setCaption(i18n("VPN Authentication for %1").arg(conn->getInfoSetting()->getName()));
labelPixmap->setPixmap(TDEGlobal::instance()->iconLoader()->loadIcon("encrypted", KIcon::Small, 32));
labelPixmap->setPixmap(TDEGlobal::instance()->iconLoader()->loadIcon("encrypted", TDEIcon::Small, 32));
// nice icons
pushOK->setIconSet(SmallIcon("button_ok", TQIconSet::Automatic));

Loading…
Cancel
Save