diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-06 14:15:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-06 14:15:01 -0600 |
commit | 1b89319fd93b88313cab40f1e9de24c067b04efb (patch) | |
tree | 80132996de993c3dcab4040864d7729842875b2d /src/profilenetworkrouteoptions.cpp | |
parent | d08a0ede1d2cb15bb14b0ff75eacf5c682b1fa0a (diff) | |
download | kvpnc-1b89319fd93b88313cab40f1e9de24c067b04efb.tar.gz kvpnc-1b89319fd93b88313cab40f1e9de24c067b04efb.zip |
Initial TQt conversion
Diffstat (limited to 'src/profilenetworkrouteoptions.cpp')
-rw-r--r-- | src/profilenetworkrouteoptions.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/profilenetworkrouteoptions.cpp b/src/profilenetworkrouteoptions.cpp index ad47bd2..55f1449 100644 --- a/src/profilenetworkrouteoptions.cpp +++ b/src/profilenetworkrouteoptions.cpp @@ -19,14 +19,14 @@ ***************************************************************************/ #include "profilenetworkrouteoptions.h" -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <klineedit.h> #include <klistview.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> #include <kpushbutton.h> #include <kmessagebox.h> #include <kcombobox.h> -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> #include <iostream> @@ -34,7 +34,7 @@ #include "addnetworkroutedialog.h" #include "widgetnotifyhelper.h" -ProfileNetworkRouteOptions::ProfileNetworkRouteOptions(QWidget *parent): ProfileNetworkRouteOptionsBase(parent) +ProfileNetworkRouteOptions::ProfileNetworkRouteOptions(TQWidget *parent): ProfileNetworkRouteOptionsBase(parent) { WidgetNotifyHelper h; h.setupChangedAction(this); @@ -68,11 +68,11 @@ void ProfileNetworkRouteOptions::delNetworkRouteClicked() { if ( NetworkListView->childCount() > 0 && NetworkListView->currentItem()!= 0 ) { - QListViewItem *item = NetworkListView->currentItem(); - QString Network = item->text(0); - QString Netmask = item->text(1); - int result = KMessageBox::questionYesNo ( this, i18n( "Do you really want to delete the network \"%1/%2\"?" ).arg( Network ).arg(Netmask), i18n( "Delete?" ) ); - //LogOutput->append( "Result: "+ QString().setNum(result) ) ; + TQListViewItem *item = NetworkListView->currentItem(); + TQString Network = item->text(0); + TQString Netmask = item->text(1); + int result = KMessageBox::questionYesNo ( this, i18n( "Do you really want to delete the network \"%1/%2\"?" ).tqarg( Network ).tqarg(Netmask), i18n( "Delete?" ) ); + //LogOutput->append( "Result: "+ TQString().setNum(result) ) ; if ( result == 3) // Yes { NetworkListView->removeItem(item); @@ -98,13 +98,13 @@ void ProfileNetworkRouteOptions::addNetworkRouteClicked() if (dlg.exec()) { - QString gateway = dlg.getGateway(); - QString interface = dlg.getInterface(); + TQString gateway = dlg.getGateway(); + TQString interface = dlg.getInterface(); if (!dlg.getUseGateway()) gateway="-"; if (!dlg.getUseInterface()) interface="-"; - NetworkListView->insertItem( new QListViewItem(NetworkListView, dlg.getNetwork(),dlg.getNetmask(), gateway,interface)); + NetworkListView->insertItem( new TQListViewItem(NetworkListView, dlg.getNetwork(),dlg.getNetmask(), gateway,interface)); if (dlg.dialogModified == true) dialogModified=true; } @@ -117,10 +117,10 @@ void ProfileNetworkRouteOptions::editNetworkRouteClicked() if ( NetworkListView->childCount() > 0 && NetworkListView->currentItem()!= 0 ) { AddNetworkRouteDialog dlg(this, i18n("Edit Network Route...")); - QString Network=NetworkListView->currentItem()->text(0); - QString Netmask=NetworkListView->currentItem()->text(1); - QString Gateway=NetworkListView->currentItem()->text(2); - QString Interface=NetworkListView->currentItem()->text(3); + TQString Network=NetworkListView->currentItem()->text(0); + TQString Netmask=NetworkListView->currentItem()->text(1); + TQString Gateway=NetworkListView->currentItem()->text(2); + TQString Interface=NetworkListView->currentItem()->text(3); dlg.main->InterfaceComboBox->insertItem("default"); // interface where default route points @@ -159,15 +159,15 @@ void ProfileNetworkRouteOptions::editNetworkRouteClicked() if (dlg.exec()) { - QString gateway = dlg.getGateway(); - QString interface = dlg.getInterface(); + TQString gateway = dlg.getGateway(); + TQString interface = dlg.getInterface(); if (!dlg.getUseGateway()) gateway="-"; if (!dlg.getUseInterface()) interface="-"; NetworkListView->takeItem(NetworkListView->currentItem()); - NetworkListView->insertItem( new QListViewItem(NetworkListView, dlg.getNetwork(),dlg.getNetmask(), gateway,interface)); + NetworkListView->insertItem( new TQListViewItem(NetworkListView, dlg.getNetwork(),dlg.getNetmask(), gateway,interface)); // NetworkListView->currentItem()->text(0) = dlg.getNetwork(); // NetworkListView->currentItem()->text(1) = dlg.getNetmask(); @@ -192,23 +192,23 @@ void ProfileNetworkRouteOptions::checkList() } } -void ProfileNetworkRouteOptions::contextMenuRequested ( QListViewItem * item, const QPoint &pos, int ) +void ProfileNetworkRouteOptions::contextMenuRequested ( TQListViewItem * item, const TQPoint &pos, int ) { - ContextMenu = new QPopupMenu ( 0 ); + ContextMenu = new TQPopupMenu ( 0 ); if (item != 0) { ContextMenu->insertItem(i18n("&Edit...")); ContextMenu->insertItem(i18n("&Delete...")); } ContextMenu->insertItem(i18n("&Add...")); - connect ( ContextMenu, SIGNAL ( activated ( int ) ), this, SLOT ( doContextMenuAction ( int ) ) ); + connect ( ContextMenu, TQT_SIGNAL ( activated ( int ) ), this, TQT_SLOT ( doContextMenuAction ( int ) ) ); ContextMenu->show(); ContextMenu->setGeometry(pos.x(),pos.y(), ContextMenu->width(),ContextMenu->height()); } void ProfileNetworkRouteOptions::doContextMenuAction ( int action) { - QString itemtext = ContextMenu->text ( action ); + TQString itemtext = ContextMenu->text ( action ); // std::cout << "action: " << itemtext << std::endl; if (itemtext == i18n("&Edit...")) editNetworkRouteClicked(); |