diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /filesharing/advanced/nfs/nfsdialog.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'filesharing/advanced/nfs/nfsdialog.cpp')
-rw-r--r-- | filesharing/advanced/nfs/nfsdialog.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/filesharing/advanced/nfs/nfsdialog.cpp b/filesharing/advanced/nfs/nfsdialog.cpp index ecf7a90b..926e3229 100644 --- a/filesharing/advanced/nfs/nfsdialog.cpp +++ b/filesharing/advanced/nfs/nfsdialog.cpp @@ -18,12 +18,12 @@ */ -#include <qradiobutton.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qlineedit.h> -#include <qbuttongroup.h> -#include <qlayout.h> +#include <tqradiobutton.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqlineedit.h> +#include <tqbuttongroup.h> +#include <tqlayout.h> #include <kdebug.h> #include <kmessagebox.h> @@ -38,7 +38,7 @@ #include "nfsfile.h" #include "nfsdialoggui.h" -NFSDialog::NFSDialog(QWidget * parent, NFSEntry* entry) +NFSDialog::NFSDialog(TQWidget * parent, NFSEntry* entry) : KDialogBase(Plain, i18n("NFS Options"), Ok|Cancel, Ok, parent), m_nfsEntry(entry), m_modified(false) @@ -59,23 +59,23 @@ NFSDialog::~NFSDialog() } void NFSDialog::initGUI() { - QWidget* page = plainPage(); + TQWidget* page = plainPage(); m_gui = new NFSDialogGUI(page); - QVBoxLayout *layout = new QVBoxLayout( page ); + TQVBoxLayout *layout = new TQVBoxLayout( page ); layout->addWidget( m_gui ); KAccel* accel = new KAccel( m_gui->listView ); - accel->insert( "Delete", Qt::Key_Delete, this, SLOT(slotRemoveHost())); + accel->insert( "Delete", Qt::Key_Delete, this, TQT_SLOT(slotRemoveHost())); } void NFSDialog::initSlots() { - connect( m_gui->removeHostBtn, SIGNAL(clicked()), this, SLOT( slotRemoveHost())); - connect( m_gui->addHostBtn, SIGNAL(clicked()), this, SLOT( slotAddHost())); - connect( m_gui->modifyHostBtn, SIGNAL(clicked()), this, SLOT( slotModifyHost())); - connect( m_gui->listView, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT( slotModifyHost())); + connect( m_gui->removeHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotRemoveHost())); + connect( m_gui->addHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotAddHost())); + connect( m_gui->modifyHostBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotModifyHost())); + connect( m_gui->listView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT( slotModifyHost())); } @@ -92,17 +92,17 @@ void NFSDialog::initListView() } } -QListViewItem* NFSDialog::createItemFromHost(NFSHost* host) +TQListViewItem* NFSDialog::createItemFromHost(NFSHost* host) { if (!host) return 0; - QListViewItem* item = new QListViewItem(m_gui->listView); + TQListViewItem* item = new TQListViewItem(m_gui->listView); updateItem(item, host); return item; } -void NFSDialog::updateItem(QListViewItem* item, NFSHost* host) +void NFSDialog::updateItem(TQListViewItem* item, NFSHost* host) { item->setText(0,host->name); item->setText(1,host->paramString()); @@ -123,7 +123,7 @@ void NFSDialog::slotAddHost() dlg->exec(); - if (dlg->result()==QDialog::Accepted) { + if (dlg->result()==TQDialog::Accepted) { m_workEntry->addHost(host); createItemFromHost(host); setModified(); @@ -143,13 +143,13 @@ void NFSDialog::slotOk() { void NFSDialog::slotRemoveHost() { - QPtrList<QListViewItem> items = m_gui->listView->selectedItems(); + TQPtrList<TQListViewItem> items = m_gui->listView->selectedItems(); if (items.count()==0) return; - QListViewItem *item; + TQListViewItem *item; for ( item = items.first(); item; item = items.next() ) { - QString name = item->text(0); + TQString name = item->text(0); m_gui->listView->takeItem(item); NFSHost* host = m_workEntry->getHostByName(name); @@ -169,13 +169,13 @@ void NFSDialog::slotRemoveHost() void NFSDialog::slotModifyHost() { - QPtrList<QListViewItem> items = m_gui->listView->selectedItems(); + TQPtrList<TQListViewItem> items = m_gui->listView->selectedItems(); if (items.count()==0) return; HostList hostList; - QListViewItem *item; + TQListViewItem *item; for ( item = items.first(); item; item = items.next() ) { NFSHost* host = m_workEntry->getHostByName(item->text(0)); @@ -187,7 +187,7 @@ void NFSDialog::slotModifyHost() } NFSHostDlg *dlg = new NFSHostDlg(this, &hostList, m_workEntry); - if (dlg->exec() == QDialog::Accepted && + if (dlg->exec() == TQDialog::Accepted && dlg->isModified()) { setModified(); |