diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 20:34:22 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 20:34:22 +0000 |
commit | b09bffed6b43262948018dfb0f11890850ddf7c1 (patch) | |
tree | 138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /kcron/ktvariable.cpp | |
parent | 6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff) | |
download | tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.tar.gz tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.zip |
TQt4 port kdeadmin
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcron/ktvariable.cpp')
-rw-r--r-- | kcron/ktvariable.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kcron/ktvariable.cpp b/kcron/ktvariable.cpp index 19cbba0..60ff101 100644 --- a/kcron/ktvariable.cpp +++ b/kcron/ktvariable.cpp @@ -27,18 +27,18 @@ KTVariable::KTVariable(CTVariable* _ctvar,const TQString &_caption) : ctvar( _ctvar) { TQFrame *page = makeMainWidget(); - TQGridLayout *layout = new TQGridLayout( page, 5, 3, 0, spacingHint() ); - layout->setRowStretch(3, 1); - layout->setColStretch(1, 1); + TQGridLayout *tqlayout = new TQGridLayout( page, 5, 3, 0, spacingHint() ); + tqlayout->setRowStretch(3, 1); + tqlayout->setColStretch(1, 1); setIcon(KTIcon::application(true)); // variable labVariable = new TQLabel(i18n("&Variable:"), page, "labVariable"); - layout->addWidget(labVariable, 1, 0, Qt::AlignLeft | Qt::AlignTop); + tqlayout->addWidget(labVariable, 1, 0, TQt::AlignLeft | TQt::AlignTop); cmbVariable = new TQComboBox(true, page, "cmbVariable"); - layout->addWidget(cmbVariable, 1, 1); + tqlayout->addWidget(cmbVariable, 1, 1); cmbVariable->insertItem("HOME"); cmbVariable->insertItem("MAILTO"); @@ -49,30 +49,30 @@ KTVariable::KTVariable(CTVariable* _ctvar,const TQString &_caption) : // icon labIcon = new TQLabel(page, "labIcon"); - layout->addMultiCellWidget(labIcon, 0, 1, 2, 2); + tqlayout->addMultiCellWidget(labIcon, 0, 1, 2, 2); // value labValue = new TQLabel(i18n("Va&lue:"), page, "labValue"); - layout->addWidget(labValue, 2, 0, Qt::AlignLeft | Qt::AlignTop); + tqlayout->addWidget(labValue, 2, 0, TQt::AlignLeft | TQt::AlignTop); leValue = new TQLineEdit(page, "leValue"); - layout->addMultiCellWidget(leValue, 2, 2, 1, 2); + tqlayout->addMultiCellWidget(leValue, 2, 2, 1, 2); leValue->setMaxLength(255); labValue->setBuddy(leValue); // comment labComment = new TQLabel(i18n("Co&mment:"), page, "labComment"); - layout->addWidget(labComment, 3, 0, Qt::AlignLeft | Qt::AlignTop); + tqlayout->addWidget(labComment, 3, 0, TQt::AlignLeft | TQt::AlignTop); teComment = new KTextEdit(page, "teComment"); - teComment->setTextFormat(Qt::PlainText); - layout->addMultiCellWidget(teComment, 3, 3, 1, 2); + teComment->setTextFormat(TQt::PlainText); + tqlayout->addMultiCellWidget(teComment, 3, 3, 1, 2); labComment->setBuddy(teComment); // enabled chkEnabled = new TQCheckBox(i18n("&Enabled"), page, "chkEnabled"); - layout->addWidget(chkEnabled, 4, 0); + tqlayout->addWidget(chkEnabled, 4, 0); // set starting field values cmbVariable->setEditText(TQString::fromLocal8Bit(ctvar->variable.c_str())); @@ -142,9 +142,9 @@ void KTVariable::slotOk() return; } - ctvar->variable = cmbVariable->currentText().local8Bit(); - ctvar->value = leValue->text().local8Bit(); - ctvar->comment = teComment->text().replace('\n',' ').replace('\r',' ').local8Bit(); + ctvar->variable = cmbVariable->currentText().local8Bit().data(); + ctvar->value = leValue->text().local8Bit().data(); + ctvar->comment = teComment->text().tqreplace('\n',' ').tqreplace('\r',' ').local8Bit().data(); ctvar->enabled = chkEnabled->isChecked(); close(); } |