Rename a number of classes to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 173d903084
commit d8240b9ed5

@ -19,7 +19,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="KListView" row="1" column="0" rowspan="5" colspan="1"> <widget class="TDEListView" row="1" column="0" rowspan="5" colspan="1">
<column> <column>
<property name="text"> <property name="text">
<string>Connection</string> <string>Connection</string>

@ -57,7 +57,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="KListView" row="1" column="0" rowspan="1" colspan="4"> <widget class="TDEListView" row="1" column="0" rowspan="1" colspan="4">
<column> <column>
<property name="text"> <property name="text">
<string>Essid</string> <string>Essid</string>

@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "traycomponent.h" #include "traycomponent.h"
class Device; class Device;
class KPopupMenu; class TDEPopupMenu;
class KSystemTray; class KSystemTray;
class DeviceTrayComponent : public TrayComponent class DeviceTrayComponent : public TrayComponent

@ -93,7 +93,7 @@ void CellularDeviceTray::newConnection()
} }
void CellularDeviceTray::addMenuItems(KPopupMenu* menu) void CellularDeviceTray::addMenuItems(TDEPopupMenu* menu)
{ {
ConnectionStore* connectionStore = ConnectionStore::getInstance(); ConnectionStore* connectionStore = ConnectionStore::getInstance();
@ -159,7 +159,7 @@ void CellularDeviceTray::addMenuItems(KPopupMenu* menu)
} }
// bring the device down // bring the device down
KAction* deactivate = tray()->actionCollection()->action("deactivate_device"); TDEAction* deactivate = tray()->actionCollection()->action("deactivate_device");
if (deactivate) if (deactivate)
deactivate->plug(menu); deactivate->plug(menu);

@ -43,7 +43,7 @@ class CellularDeviceTray : public DeviceTrayComponent
CellularDeviceTray (CellularDevice*, KSystemTray * parent = 0, const char * name = 0); CellularDeviceTray (CellularDevice*, KSystemTray * parent = 0, const char * name = 0);
~CellularDeviceTray (); ~CellularDeviceTray ();
void addMenuItems(KPopupMenu* menu); void addMenuItems(TDEPopupMenu* menu);
public slots: public slots:
void newConnection(); void newConnection();

@ -59,12 +59,12 @@ using namespace ConnectionSettings;
/* /*
* ConnectionListViewItem * ConnectionListViewItem
*/ */
class ConnectionListViewItem : public KListViewItem class ConnectionListViewItem : public TDEListViewItem
{ {
public: public:
ConnectionListViewItem(TQListView* parent, GenericConnection* connection) ConnectionListViewItem(TQListView* parent, GenericConnection* connection)
: KListViewItem(parent) : TDEListViewItem(parent)
, _conn(connection) , _conn(connection)
{ {
Info* info = _conn->getInfoSetting(); Info* info = _conn->getInfoSetting();

@ -46,12 +46,12 @@
using namespace ConnectionSettings; using namespace ConnectionSettings;
class NetworkListViewItem : public KListViewItem class NetworkListViewItem : public TDEListViewItem
{ {
public: public:
NetworkListViewItem(TQListView* parent, WirelessNetwork& net) NetworkListViewItem(TQListView* parent, WirelessNetwork& net)
: KListViewItem(parent, TQString::fromUtf8(net.getDisplaySsid()), TQString("%1\%").arg(net.getStrength())) : TDEListViewItem(parent, TQString::fromUtf8(net.getDisplaySsid()), TQString("%1\%").arg(net.getStrength()))
, _net(net) , _net(net)
{ {
TQ_UINT8 strength = net.getStrength(); TQ_UINT8 strength = net.getStrength();
@ -96,7 +96,7 @@ void
WirelessWidgetImpl::Init() WirelessWidgetImpl::Init()
{ {
TQVBoxLayout* layout = new TQVBoxLayout(_mainWid->framePlaceholder, 1, 1); TQVBoxLayout* layout = new TQVBoxLayout(_mainWid->framePlaceholder, 1, 1);
_searchLine = new KListViewSearchLineWidget(_mainWid->lvEssids, _mainWid->framePlaceholder); _searchLine = new TDEListViewSearchLineWidget(_mainWid->lvEssids, _mainWid->framePlaceholder);
layout->addWidget(_searchLine); layout->addWidget(_searchLine);
connect(_mainWid->txtEssid, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEssidChanged(const TQString&))); connect(_mainWid->txtEssid, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEssidChanged(const TQString&)));
@ -122,7 +122,7 @@ WirelessWidgetImpl::Activate()
for (TQValueList<WirelessNetwork>::Iterator it = nets.begin(); it != nets.end(); ++it) for (TQValueList<WirelessNetwork>::Iterator it = nets.begin(); it != nets.end(); ++it)
{ {
KListViewItem* item = new NetworkListViewItem(_mainWid->lvEssids, (*it)); TDEListViewItem* item = new NetworkListViewItem(_mainWid->lvEssids, (*it));
_mainWid->lvEssids->insertItem(item); _mainWid->lvEssids->insertItem(item);
} }

@ -30,7 +30,7 @@
#include "connection_setting_wireless.h" #include "connection_setting_wireless.h"
#include "knetworkmanager-connection_setting.h" #include "knetworkmanager-connection_setting.h"
class KListViewSearchLineWidget; class TDEListViewSearchLineWidget;
namespace ConnectionSettings namespace ConnectionSettings
{ {
@ -64,7 +64,7 @@ namespace ConnectionSettings
Info* _info_setting; Info* _info_setting;
WirelessSecurity* _security_setting; WirelessSecurity* _security_setting;
ConnectionSettingWirelessWidget* _mainWid; ConnectionSettingWirelessWidget* _mainWid;
KListViewSearchLineWidget* _searchLine; TDEListViewSearchLineWidget* _searchLine;
bool _new_conn; bool _new_conn;
}; };
} }

@ -170,7 +170,7 @@ void DeviceTray::setPixmap(const TQPixmap& pixmap)
KSystemTray::setPixmap(pixmap); KSystemTray::setPixmap(pixmap);
} }
void DeviceTray::contextMenuAboutToShow (KPopupMenu* menu) void DeviceTray::contextMenuAboutToShow (TDEPopupMenu* menu)
{ {
menu->clear(); menu->clear();
@ -182,7 +182,7 @@ void DeviceTray::contextMenuAboutToShow (KPopupMenu* menu)
// quit // quit
menu->insertSeparator (); menu->insertSeparator ();
KAction* quitAction = actionCollection ()->action (KStdAction::name (KStdAction::Quit)); TDEAction* quitAction = actionCollection ()->action (KStdAction::name (KStdAction::Quit));
if (quitAction) if (quitAction)
quitAction->plug (menu); quitAction->plug (menu);
} }
@ -246,7 +246,7 @@ void DeviceTray::updateTrayIcon(NMDeviceState state)
void DeviceTray::updateActions(NMDeviceState state) void DeviceTray::updateActions(NMDeviceState state)
{ {
// allow device deactivation only when device is activated // allow device deactivation only when device is activated
KAction* deactivate = actionCollection()->action("deactivate_device"); TDEAction* deactivate = actionCollection()->action("deactivate_device");
if (deactivate) if (deactivate)
deactivate->setEnabled( (state == NM_DEVICE_STATE_ACTIVATED || deactivate->setEnabled( (state == NM_DEVICE_STATE_ACTIVATED ||
state == NM_DEVICE_STATE_IP_CONFIG || state == NM_DEVICE_STATE_IP_CONFIG ||
@ -323,7 +323,7 @@ DeviceTray::DeviceTray (Device* dev) : KSystemTray ()
TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateDeviceState())); TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateDeviceState()));
// Actions used for plugging into the menu // Actions used for plugging into the menu
new KAction (i18n ("Deactivate connection..."), new TDEAction (i18n ("Deactivate connection..."),
SmallIcon ("no", TQIconSet::Automatic), 0, SmallIcon ("no", TQIconSet::Automatic), 0,
dev, TQT_SLOT (slotDeactivate()), actionCollection (), "deactivate_device"); dev, TQT_SLOT (slotDeactivate()), actionCollection (), "deactivate_device");
} }

@ -60,8 +60,8 @@ class DeviceTray : public KSystemTray
DeviceTray (Device*); DeviceTray (Device*);
~DeviceTray (); ~DeviceTray ();
void contextMenuAboutToShow (KPopupMenu* menu); void contextMenuAboutToShow (TDEPopupMenu* menu);
virtual void addMenuItems(KPopupMenu* menu) = 0; virtual void addMenuItems(TDEPopupMenu* menu) = 0;
Device* getDevice() const; Device* getDevice() const;
protected: protected:

@ -238,7 +238,7 @@ void Tray::slotNewVPNConnection()
dlg->show(); dlg->show();
} }
void Tray::contextMenuAboutToShow (KPopupMenu* menu) void Tray::contextMenuAboutToShow (TDEPopupMenu* menu)
{ {
TQT_DBusError err; TQT_DBusError err;
NMProxy* nm = NMProxy::getInstance(); NMProxy* nm = NMProxy::getInstance();
@ -262,11 +262,11 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
menu->insertItem (subhead, -1, -1); menu->insertItem (subhead, -1, -1);
// New connection // New connection
KAction * newConnAction = 0; TDEAction * newConnAction = 0;
int devices = d->trayComponents.count(); int devices = d->trayComponents.count();
if ( devices > 1 ) { if ( devices > 1 ) {
newConnAction = actionCollection ()->action ("new_connection_menu"); newConnAction = actionCollection ()->action ("new_connection_menu");
KActionMenu* newConnActionMenu = static_cast<KActionMenu*>(newConnAction); TDEActionMenu* newConnActionMenu = static_cast<TDEActionMenu*>(newConnAction);
newConnActionMenu->popupMenu()->clear(); newConnActionMenu->popupMenu()->clear();
TQValueList<TrayComponent*>::Iterator it; TQValueList<TrayComponent*>::Iterator it;
for (it = d->trayComponents.begin(); for (it = d->trayComponents.begin();
@ -274,7 +274,7 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
++it) ++it)
{ {
DeviceTrayComponent* dev_comp = dynamic_cast<DeviceTrayComponent*> (*it); DeviceTrayComponent* dev_comp = dynamic_cast<DeviceTrayComponent*> (*it);
KAction * deviceNewConnAction = 0; TDEAction * deviceNewConnAction = 0;
if (dev_comp) if (dev_comp)
{ {
TQString actionName = TQString("new_connection_%1").arg(dev_comp->device()->getInterface()); TQString actionName = TQString("new_connection_%1").arg(dev_comp->device()->getInterface());
@ -294,17 +294,17 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
menuCaption = menuCaption.append(")"); menuCaption = menuCaption.append(")");
deviceNewConnAction = actionCollection ()->action (actionName); deviceNewConnAction = actionCollection ()->action (actionName);
if (!deviceNewConnAction) { if (!deviceNewConnAction) {
deviceNewConnAction = new KAction (menuCaption, 0, (*it), TQT_SLOT(newConnection()), actionCollection(), actionName); deviceNewConnAction = new TDEAction (menuCaption, 0, (*it), TQT_SLOT(newConnection()), actionCollection(), actionName);
} }
newConnActionMenu->insert(deviceNewConnAction); newConnActionMenu->insert(deviceNewConnAction);
} }
} }
// New VPN connection option // New VPN connection option
++it; ++it;
KAction * deviceNewConnAction = 0; TDEAction * deviceNewConnAction = 0;
TQString menuCaption = "VPN Connection"; TQString menuCaption = "VPN Connection";
TQString actionName = TQString("new_connection_%1").arg("vpn"); TQString actionName = TQString("new_connection_%1").arg("vpn");
deviceNewConnAction = new KAction (menuCaption, 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewVPNConnection()), actionCollection(), actionName); deviceNewConnAction = new TDEAction (menuCaption, 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewVPNConnection()), actionCollection(), actionName);
newConnActionMenu->insert(deviceNewConnAction); newConnActionMenu->insert(deviceNewConnAction);
} else if ( devices == 1 ) { } else if ( devices == 1 ) {
newConnAction = actionCollection ()->action ("new_connection"); newConnAction = actionCollection ()->action ("new_connection");
@ -318,7 +318,7 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
// turn things off // turn things off
if (nm) if (nm)
{ {
KActionMenu* disableStuffActionMenu = static_cast<KActionMenu*>(actionCollection ()->action ("deactivate_menu") ); TDEActionMenu* disableStuffActionMenu = static_cast<TDEActionMenu*>(actionCollection ()->action ("deactivate_menu") );
disableStuffActionMenu->popupMenu()->clear(); disableStuffActionMenu->popupMenu()->clear();
TQValueList<TQPair<ConnectionSettings::Connection*, Device*> > map = nm->getActiveConnectionsMap(); TQValueList<TQPair<ConnectionSettings::Connection*, Device*> > map = nm->getActiveConnectionsMap();
d->act_conn_map.clear(); d->act_conn_map.clear();
@ -332,13 +332,13 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
continue; continue;
TQString actionName = TQString("disable_connection_%1_%2").arg(conn->getID()).arg(dev ? dev->getInterface() : ""); TQString actionName = TQString("disable_connection_%1_%2").arg(conn->getID()).arg(dev ? dev->getInterface() : "");
KAction * deviceNewConnAction = actionCollection ()->action (actionName); TDEAction * deviceNewConnAction = actionCollection ()->action (actionName);
TQString actionText = conn->getInfoSetting()->getName(); TQString actionText = conn->getInfoSetting()->getName();
if (dev) if (dev)
actionText += TQString(" (%1)").arg(dev->getInterface()); actionText += TQString(" (%1)").arg(dev->getInterface());
if (!deviceNewConnAction) { if (!deviceNewConnAction) {
deviceNewConnAction = new KAction (actionText, 0, &d->signalMapper, TQT_SLOT(map()), actionCollection(), actionName); deviceNewConnAction = new TDEAction (actionText, 0, &d->signalMapper, TQT_SLOT(map()), actionCollection(), actionName);
} }
d->signalMapper.setMapping(deviceNewConnAction, d->current_idx); d->signalMapper.setMapping(deviceNewConnAction, d->current_idx);
d->act_conn_map.insert(d->current_idx, TQPair<ConnectionSettings::Connection*, Device*> (conn, dev)); d->act_conn_map.insert(d->current_idx, TQPair<ConnectionSettings::Connection*, Device*> (conn, dev));
@ -349,7 +349,7 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
// disable wireless // disable wireless
if (nm->getWirelessHardwareEnabled(err)) if (nm->getWirelessHardwareEnabled(err))
{ {
KAction* wireless = NULL; TDEAction* wireless = NULL;
if (nm->getWirelessEnabled(err)) { if (nm->getWirelessEnabled(err)) {
wireless = actionCollection ()->action ("disable_wireless"); wireless = actionCollection ()->action ("disable_wireless");
} else { } else {
@ -359,7 +359,7 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
} }
// offline vs. online mode // offline vs. online mode
KAction* switch_mode = NULL; TDEAction* switch_mode = NULL;
if (nm->getState(err) != NM_STATE_ASLEEP) { if (nm->getState(err) != NM_STATE_ASLEEP) {
switch_mode = actionCollection ()->action ("offline_mode"); switch_mode = actionCollection ()->action ("offline_mode");
} }
@ -378,16 +378,16 @@ void Tray::contextMenuAboutToShow (KPopupMenu* menu)
} }
// Notifications // Notifications
KAction* notif = actionCollection()->action("configure_notifications"); TDEAction* notif = actionCollection()->action("configure_notifications");
notif->plug(menu); notif->plug(menu);
// Connection Editor // Connection Editor
KAction* edit = actionCollection ()->action ("edit_connections"); TDEAction* edit = actionCollection ()->action ("edit_connections");
edit->plug(menu); edit->plug(menu);
// quit // quit
menu->insertSeparator (); menu->insertSeparator ();
KAction* quitAction = actionCollection ()->action (KStdAction::name (KStdAction::Quit)); TDEAction* quitAction = actionCollection ()->action (KStdAction::name (KStdAction::Quit));
if (quitAction) if (quitAction)
quitAction->plug (menu); quitAction->plug (menu);
} }
@ -630,7 +630,7 @@ void Tray::slotRemoveDeviceTrayComponent(Device* dev)
// remove the appropriate action // remove the appropriate action
TQString actionName = TQString("new_connection_%1").arg(dev_comp->device()->getInterface()); TQString actionName = TQString("new_connection_%1").arg(dev_comp->device()->getInterface());
KAction * deviceNewConnAction = actionCollection ()->action (actionName); TDEAction * deviceNewConnAction = actionCollection ()->action (actionName);
if (!deviceNewConnAction) if (!deviceNewConnAction)
{ {
@ -1054,40 +1054,40 @@ Tray::Tray () : KSystemTray ()
setMouseTracking (true); setMouseTracking (true);
// Actions used for plugging into the menu // Actions used for plugging into the menu
new KAction (i18n ("Switch to offline mode"), new TDEAction (i18n ("Switch to offline mode"),
SmallIcon ("no", TQIconSet::Automatic), 0, SmallIcon ("no", TQIconSet::Automatic), 0,
TQT_TQOBJECT(this), TQT_SLOT (slotOfflineMode()), actionCollection (), "offline_mode"); TQT_TQOBJECT(this), TQT_SLOT (slotOfflineMode()), actionCollection (), "offline_mode");
new KAction (i18n ("Switch to online mode"), new TDEAction (i18n ("Switch to online mode"),
SmallIcon ("ok", TQIconSet::Automatic), 0, SmallIcon ("ok", TQIconSet::Automatic), 0,
TQT_TQOBJECT(this), TQT_SLOT (slotOnlineMode()), actionCollection (), "online_mode"); TQT_TQOBJECT(this), TQT_SLOT (slotOnlineMode()), actionCollection (), "online_mode");
new KAction (i18n ("Disable Wireless"), new TDEAction (i18n ("Disable Wireless"),
SmallIcon ("wireless_off", TQIconSet::Automatic), 0, SmallIcon ("wireless_off", TQIconSet::Automatic), 0,
TQT_TQOBJECT(this), TQT_SLOT (slotDisableWireless()), actionCollection (), "disable_wireless"); TQT_TQOBJECT(this), TQT_SLOT (slotDisableWireless()), actionCollection (), "disable_wireless");
new KAction (i18n ("Enable Wireless"), new TDEAction (i18n ("Enable Wireless"),
SmallIcon ("wireless", TQIconSet::Automatic), 0, SmallIcon ("wireless", TQIconSet::Automatic), 0,
TQT_TQOBJECT(this), TQT_SLOT (slotEnableWireless()), actionCollection (), "enable_wireless"); TQT_TQOBJECT(this), TQT_SLOT (slotEnableWireless()), actionCollection (), "enable_wireless");
new KAction (i18n ("Edit Connections"), new TDEAction (i18n ("Edit Connections"),
SmallIcon ("edit", TQIconSet::Automatic), 0, SmallIcon ("edit", TQIconSet::Automatic), 0,
TQT_TQOBJECT(this), TQT_SLOT (slotEditConnections()), actionCollection (), "edit_connections"); TQT_TQOBJECT(this), TQT_SLOT (slotEditConnections()), actionCollection (), "edit_connections");
new KAction (i18n ("Configure Notifications"), new TDEAction (i18n ("Configure Notifications"),
SmallIcon ("knotify", TQIconSet::Automatic), 0, SmallIcon ("knotify", TQIconSet::Automatic), 0,
TQT_TQOBJECT(this), TQT_SLOT (slotEditNotifications()), actionCollection (), "configure_notifications"); TQT_TQOBJECT(this), TQT_SLOT (slotEditNotifications()), actionCollection (), "configure_notifications");
// this action is only connected when the menu is shown, hence the 0 receiver // this action is only connected when the menu is shown, hence the 0 receiver
new KAction (i18n ("New connection ..."), new TDEAction (i18n ("New connection ..."),
SmallIcon ("filenew", TQIconSet::Automatic), 0, SmallIcon ("filenew", TQIconSet::Automatic), 0,
TQT_TQOBJECT(this), 0, actionCollection (), "new_connection"); TQT_TQOBJECT(this), 0, actionCollection (), "new_connection");
new KActionMenu (i18n ("New connection ..."), new TDEActionMenu (i18n ("New connection ..."),
SmallIcon ("filenew", TQIconSet::Automatic), SmallIcon ("filenew", TQIconSet::Automatic),
actionCollection(), "new_connection_menu"); actionCollection(), "new_connection_menu");
new KActionMenu (i18n ("Deactivate connection..."), new TDEActionMenu (i18n ("Deactivate connection..."),
SmallIcon ("no", TQIconSet::Automatic), SmallIcon ("no", TQIconSet::Automatic),
actionCollection (), "deactivate_menu"); actionCollection (), "deactivate_menu");

@ -73,7 +73,7 @@ class Tray : public KSystemTray
Tray (); Tray ();
~Tray (); ~Tray ();
static Tray* getInstance(); static Tray* getInstance();
void contextMenuAboutToShow (KPopupMenu* menu); void contextMenuAboutToShow (TDEPopupMenu* menu);
signals: signals:

@ -80,7 +80,7 @@ void WiredDeviceTray::newConnection()
} }
void WiredDeviceTray::addMenuItems(KPopupMenu* menu) void WiredDeviceTray::addMenuItems(TDEPopupMenu* menu)
{ {
ConnectionStore* connectionStore = ConnectionStore::getInstance(); ConnectionStore* connectionStore = ConnectionStore::getInstance();
@ -137,7 +137,7 @@ void WiredDeviceTray::addMenuItems(KPopupMenu* menu)
int id = menu->insertItem(SmallIcon("filenew", TQIconSet::Automatic), i18n("Create new wired connection"), this, TQT_SLOT(newConnection())); int id = menu->insertItem(SmallIcon("filenew", TQIconSet::Automatic), i18n("Create new wired connection"), this, TQT_SLOT(newConnection()));
} }
// bring the device down // bring the device down
KAction* deactivate = tray()->actionCollection()->action("deactivate_device"); TDEAction* deactivate = tray()->actionCollection()->action("deactivate_device");
if (deactivate) if (deactivate)
deactivate->plug(menu); deactivate->plug(menu);

@ -45,7 +45,7 @@ class WiredDeviceTray : public DeviceTrayComponent
WiredDeviceTray (WiredDevice*, KSystemTray * parent = 0, const char * name = 0); WiredDeviceTray (WiredDevice*, KSystemTray * parent = 0, const char * name = 0);
~WiredDeviceTray (); ~WiredDeviceTray ();
void addMenuItems(KPopupMenu* menu); void addMenuItems(TDEPopupMenu* menu);
public slots: public slots:
void newConnection(); void newConnection();

@ -139,7 +139,7 @@ WirelessConnection* WirelessDeviceTray::findMatchingConnection(const WirelessNet
return NULL; return NULL;
} }
void WirelessDeviceTray::addWirelessNetworks(KPopupMenu* menu) void WirelessDeviceTray::addWirelessNetworks(TDEPopupMenu* menu)
{ {
printf("Updating wireless network list\n\r"); printf("Updating wireless network list\n\r");
@ -244,7 +244,7 @@ void WirelessDeviceTray::addWirelessNetworks(KPopupMenu* menu)
//menu->insertSeparator(); //menu->insertSeparator();
} }
void WirelessDeviceTray::addMenuItems(KPopupMenu* menu) void WirelessDeviceTray::addMenuItems(TDEPopupMenu* menu)
{ {
NMProxy* nm = NMProxy::getInstance(); NMProxy* nm = NMProxy::getInstance();
TQT_DBusError err; TQT_DBusError err;
@ -274,7 +274,7 @@ void WirelessDeviceTray::addMenuItems(KPopupMenu* menu)
addWirelessNetworks(menu); addWirelessNetworks(menu);
// bring the device down // bring the device down
KAction* deactivate = tray()->actionCollection()->action("deactivate_device"); TDEAction* deactivate = tray()->actionCollection()->action("deactivate_device");
if (deactivate) if (deactivate)
deactivate->plug(menu); deactivate->plug(menu);
} }

@ -51,7 +51,7 @@ class WirelessDeviceTray : public DeviceTrayComponent
WirelessDeviceTray (WirelessDevice*, KSystemTray * parent = 0, const char * name = 0); WirelessDeviceTray (WirelessDevice*, KSystemTray * parent = 0, const char * name = 0);
~WirelessDeviceTray (); ~WirelessDeviceTray ();
void addMenuItems(KPopupMenu* menu); void addMenuItems(TDEPopupMenu* menu);
protected: protected:
/** /**
@ -69,7 +69,7 @@ class WirelessDeviceTray : public DeviceTrayComponent
void slotAccessPointRemoved(const TQString&); void slotAccessPointRemoved(const TQString&);
private: private:
void addWirelessNetworks (KPopupMenu* menu); void addWirelessNetworks (TDEPopupMenu* menu);
TQValueList<WirelessNetwork> getWirelessNetworks(); TQValueList<WirelessNetwork> getWirelessNetworks();
TQValueList<ConnectionSettings::WirelessConnection*> getWirelessConnections(); TQValueList<ConnectionSettings::WirelessConnection*> getWirelessConnections();
ConnectionSettings::WirelessConnection* findMatchingConnection(const WirelessNetwork& net, const TQValueList<ConnectionSettings::WirelessConnection*>& connection); ConnectionSettings::WirelessConnection* findMatchingConnection(const WirelessNetwork& net, const TQValueList<ConnectionSettings::WirelessConnection*>& connection);

@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <tqobject.h> #include <tqobject.h>
#include <tqpixmap.h> #include <tqpixmap.h>
class KPopupMenu; class TDEPopupMenu;
class KSystemTray; class KSystemTray;
class TrayComponent : public TQObject class TrayComponent : public TQObject
@ -38,7 +38,7 @@ Q_OBJECT
public: public:
TrayComponent(KSystemTray * parent, const char * name ); TrayComponent(KSystemTray * parent, const char * name );
virtual ~TrayComponent(); virtual ~TrayComponent();
virtual void addMenuItems(KPopupMenu* menu) = 0; virtual void addMenuItems(TDEPopupMenu* menu) = 0;
KSystemTray * tray() const;; KSystemTray * tray() const;;
virtual TQStringList getToolTipText(); virtual TQStringList getToolTipText();
signals: signals:

@ -57,7 +57,7 @@ void VPNTrayComponent::slotShowNewConnectionDialog()
} }
void VPNTrayComponent::addMenuItems(KPopupMenu* menu) void VPNTrayComponent::addMenuItems(TDEPopupMenu* menu)
{ {
int inactive_vpn_connections = 0; int inactive_vpn_connections = 0;
char vpn_found; char vpn_found;
@ -136,7 +136,7 @@ VPNTrayComponent::VPNTrayComponent (KSystemTray * parent, const char * name )
: TrayComponent (parent, name) : TrayComponent (parent, name)
{ {
//Actions used for plugging into the menu //Actions used for plugging into the menu
new KAction (i18n ("New connection ..."), new TDEAction (i18n ("New connection ..."),
SmallIcon ("encrypted", TQIconSet::Automatic), 0, SmallIcon ("encrypted", TQIconSet::Automatic), 0,
this, TQT_SLOT (slotShowNewConnectionDialog()), parent->actionCollection (), "create_new_vpn_connection"); this, TQT_SLOT (slotShowNewConnectionDialog()), parent->actionCollection (), "create_new_vpn_connection");
} }

@ -39,7 +39,7 @@ class VPNTrayComponent : public TrayComponent
VPNTrayComponent (KSystemTray * parent = 0, const char * name = 0); VPNTrayComponent (KSystemTray * parent = 0, const char * name = 0);
~VPNTrayComponent (); ~VPNTrayComponent ();
void addMenuItems(KPopupMenu* menu); void addMenuItems(TDEPopupMenu* menu);
public slots: public slots:
void slotShowNewConnectionDialog(); void slotShowNewConnectionDialog();

Loading…
Cancel
Save