summaryrefslogtreecommitdiffstats
path: root/src/knutnewupsdlg.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 19:37:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 19:37:06 +0000
commit968af1d235ac30d737991b269156bee5dc99d318 (patch)
tree19b118fa5380087e10cb728be545760791ce0676 /src/knutnewupsdlg.cpp
parentaea4882f3b37f17c5b56bc77667e683c52254c30 (diff)
downloadknutclient-968af1d235ac30d737991b269156bee5dc99d318.tar.gz
knutclient-968af1d235ac30d737991b269156bee5dc99d318.zip
TQt4 port knutclient
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knutclient@1238881 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/knutnewupsdlg.cpp')
-rw-r--r--src/knutnewupsdlg.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/knutnewupsdlg.cpp b/src/knutnewupsdlg.cpp
index 6cdd2b9..49cff4b 100644
--- a/src/knutnewupsdlg.cpp
+++ b/src/knutnewupsdlg.cpp
@@ -21,52 +21,52 @@
#include <kmessagebox.h>
#include <kactionselector.h>
-#include <qstring.h>
-#include <qlayout.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-//#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlistbox.h>
+#include <tqstring.h>
+#include <tqlayout.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+//#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlistbox.h>
//#include <iostream>
-KNutNewUpsDlg::KNutNewUpsDlg (KNutUpsData* const upsData, KNutVarData* const analogData, const bool add, QWidget* parent, const char* name, const bool modal)
- : KDialogBase(Plain, i18n("New Ups"),Help|Ok|Cancel,Ok, parent, name, modal, true ), addMember(add), m_myUpsData(upsData) {
+KNutNewUpsDlg::KNutNewUpsDlg (KNutUpsData* const upsData, KNutVarData* const analogData, const bool add, TQWidget* tqparent, const char* name, const bool modal)
+ : KDialogBase(Plain, i18n("New Ups"),Help|Ok|Cancel,Ok, tqparent, name, modal, true ), addMember(add), m_myUpsData(upsData) {
setName( "KupsNewUpsDlg" );
- QFrame *page =plainPage();
- QVBoxLayout *mainLayout = new QVBoxLayout( page, 0, spacingHint(), "mainLayout" );
- QHBoxLayout *dataLayout = new QHBoxLayout(mainLayout, spacingHint(),"dataLayout");
+ TQFrame *page =plainPage();
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( page, 0, spacingHint(), "mainLayout" );
+ TQHBoxLayout *dataLayout = new TQHBoxLayout(mainLayout, spacingHint(),"dataLayout");
- QGroupBox *hostBox = new QGroupBox (page,"hostBox");
- QGridLayout *hostLayout = new QGridLayout (hostBox, 5, 2, spacingHint () );
- hostBox->setFrameStyle(QFrame::NoFrame);
+ TQGroupBox *hostBox = new TQGroupBox (page,"hostBox");
+ TQGridLayout *hostLayout = new TQGridLayout (hostBox, 5, 2, spacingHint () );
+ hostBox->setFrameStyle(TQFrame::NoFrame);
dataLayout->addWidget(hostBox);
- QHBoxLayout *portLayout = new QHBoxLayout(-1,"portLayout");
+ TQHBoxLayout *portLayout = new TQHBoxLayout(-1,"portLayout");
hostLayout->addLayout(portLayout,4,1);
- QHBoxLayout *loginLayout = new QHBoxLayout(-1,"loginLayout");
+ TQHBoxLayout *loginLayout = new TQHBoxLayout(-1,"loginLayout");
hostLayout->addLayout(loginLayout,5,1);
- QGroupBox* GroupBox2 = new QGroupBox( page, "GroupBox2" );
+ TQGroupBox* GroupBox2 = new TQGroupBox( page, "GroupBox2" );
- QVBoxLayout *vActionSelectorLayout = new QVBoxLayout( GroupBox2, 0, spacingHint(), "VActionLayout" );
+ TQVBoxLayout *vActionSelectorLayout = new TQVBoxLayout( GroupBox2, 0, spacingHint(), "VActionLayout" );
vActionSelectorLayout->addSpacing(fontMetrics().lineSpacing());
- QHBoxLayout *hActionSelectorLayout = new QHBoxLayout( vActionSelectorLayout, spacingHint(), "HActionLayout" );
+ TQHBoxLayout *hActionSelectorLayout = new TQHBoxLayout( vActionSelectorLayout, spacingHint(), "HActionLayout" );
vActionSelectorLayout->addSpacing(10);
- QLabel* TextLabel1 = new QLabel( i18n("Name")+":",hostBox, "TextLabel1" );
+ TQLabel* TextLabel1 = new TQLabel( i18n("Name")+":",hostBox, "TextLabel1" );
hostLayout->addWidget (TextLabel1,1,0);
m_lineEdit1 = new KLineEdit( hostBox, "LineEdit1" );
m_lineEdit1->setEnabled( add );
@@ -74,46 +74,46 @@ KNutNewUpsDlg::KNutNewUpsDlg (KNutUpsData* const upsData, KNutVarData* const ana
// when makes adding name isn;t activated
hostLayout->addWidget (m_lineEdit1,1,1);
- QLabel* TextLabel2 = new QLabel(i18n("UPS address")+":", hostBox, "TextLabel2" );
+ TQLabel* TextLabel2 = new TQLabel(i18n("UPS address")+":", hostBox, "TextLabel2" );
hostLayout->addWidget (TextLabel2,2,0);
m_lineEdit2 = new KLineEdit( hostBox, "LineEdit2" );
hostLayout->addWidget (m_lineEdit2,2,1);
// Name of UPS
- QLabel* TextLabel7 = new QLabel(i18n("UPS name")+":", hostBox, "TextLabel7" );
+ TQLabel* TextLabel7 = new TQLabel(i18n("UPS name")+":", hostBox, "TextLabel7" );
hostLayout->addWidget (TextLabel7,3,0);
m_lineEdit7 = new KLineEdit( hostBox, "LineEdit7" );
hostLayout->addWidget (m_lineEdit7,3,1);
- QLabel* TextLabel3 = new QLabel(i18n("Delay (ms):"), hostBox, "TextLabel3" );
+ TQLabel* TextLabel3 = new TQLabel(i18n("Delay (ms):"), hostBox, "TextLabel3" );
hostLayout->addWidget (TextLabel3,4,0);
m_lineEdit3 = new KLineEdit( hostBox, "LineEdit3" );
m_lineEdit3->setText("5000");
portLayout->addWidget(m_lineEdit3);
portLayout->addSpacing(10);
- QLabel* TextLabel4 = new QLabel(i18n("Port:"), hostBox, "TextLabel4" );
+ TQLabel* TextLabel4 = new TQLabel(i18n("Port:"), hostBox, "TextLabel4" );
m_lineEdit4 = new KLineEdit( hostBox, "LineEdit4" );
- m_lineEdit4->setText(QString("%1").arg(knc::DefaultPort));
+ m_lineEdit4->setText(TQString("%1").tqarg(knc::DefaultPort));
portLayout->addWidget(TextLabel4);
portLayout->addWidget(m_lineEdit4);
- QLabel* TextLabel5 = new QLabel(i18n("User name:"), hostBox, "TextLabel5" );
+ TQLabel* TextLabel5 = new TQLabel(i18n("User name:"), hostBox, "TextLabel5" );
hostLayout->addWidget (TextLabel5,5,0);
m_lineEdit5 = new KLineEdit( hostBox, "LineEdit5" );
m_lineEdit5->setText("");
loginLayout->addWidget(m_lineEdit5);
loginLayout->addSpacing(10);
- QLabel* TextLabel6 = new QLabel(i18n("Password:"), hostBox, "TextLabel6" );
+ TQLabel* TextLabel6 = new TQLabel(i18n("Password:"), hostBox, "TextLabel6" );
m_lineEdit6 = new KLineEdit( hostBox, "LineEdit6" );
- m_lineEdit6->setEchoMode(QLineEdit::Password);
+ m_lineEdit6->setEchoMode(TQLineEdit::Password);
m_lineEdit6->setText("");
loginLayout->addWidget(TextLabel6);
loginLayout->addWidget(m_lineEdit6);
- m_savePassword = new QCheckBox (i18n("Store NUT password in configuration file"),page,"savePassword");
+ m_savePassword = new TQCheckBox (i18n("Store NUT password in configuration file"),page,"savePassword");
mainLayout->addWidget(m_savePassword);
mainLayout->addWidget(GroupBox2);
@@ -133,7 +133,7 @@ KNutNewUpsDlg::KNutNewUpsDlg (KNutUpsData* const upsData, KNutVarData* const ana
GroupBox2->setTitle( i18n( "UPS Variables" ));
- QListBox* aListBox = m_upsValueSelector->availableListBox();
+ TQListBox* aListBox = m_upsValueSelector->availableListBox();
for (int i=1; i < knc::NumberOfTypes; i++) { //values 0 is None, this values isn't showing
new KNutUpsBoxItem (aListBox,analogData->getNameAnalogData(i),i);
}
@@ -164,7 +164,7 @@ while (availableItem != 0) {
//remove item from left list
if (availableItem != 0) {
- QListBox* sListBox = m_upsValueSelector->selectedListBox();
+ TQListBox* sListBox = m_upsValueSelector->selectedListBox();
new KNutUpsBoxItem (sListBox,availableItem->text(),codeUpsVar);
m_upsValueSelector->availableListBox()->removeItem(m_upsValueSelector->availableListBox()->index(availableItem));
@@ -190,7 +190,7 @@ void KNutNewUpsDlg::putData (const KNutUpsData::upsRecordDef upsRecord ) {
m_lineEdit1->setText(upsRecord.name);
m_lineEdit2->setText(upsRecord.upsAddress);
m_lineEdit7->setText(upsRecord.upsName);
- QString delay, port;
+ TQString delay, port;
delay.setNum(upsRecord.delay);
m_lineEdit3->setText(delay);
port.setNum(upsRecord.port);