diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-02 06:40:27 +0000 |
commit | 2595a15ebeb6fc46b7cb241d01ec0c2460ec2111 (patch) | |
tree | 18a8f0f4ac5a86dacfa74c3537551ec39bc85e75 /src/gui/choicefieldwidget.cpp | |
parent | 1d90725a4001fab9d3922b2cbcceeee5e2d1686f (diff) | |
download | tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.tar.gz tellico-2595a15ebeb6fc46b7cb241d01ec0c2460ec2111.zip |
TQt4 port tellico
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/tellico@1239054 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/choicefieldwidget.cpp')
-rw-r--r-- | src/gui/choicefieldwidget.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/choicefieldwidget.cpp b/src/gui/choicefieldwidget.cpp index e9c6870..8e0240b 100644 --- a/src/gui/choicefieldwidget.cpp +++ b/src/gui/choicefieldwidget.cpp @@ -16,29 +16,29 @@ #include <kcombobox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> using Tellico::GUI::ChoiceFieldWidget; -ChoiceFieldWidget::ChoiceFieldWidget(Data::FieldPtr field_, QWidget* parent_, const char* name_/*=0*/) - : FieldWidget(field_, parent_, name_), m_comboBox(0) { +ChoiceFieldWidget::ChoiceFieldWidget(Data::FieldPtr field_, TQWidget* tqparent_, const char* name_/*=0*/) + : FieldWidget(field_, tqparent_, name_), m_comboBox(0) { m_comboBox = new KComboBox(this); - connect(m_comboBox, SIGNAL(activated(int)), SIGNAL(modified())); + connect(m_comboBox, TQT_SIGNAL(activated(int)), TQT_SIGNAL(modified())); // always have empty choice - m_comboBox->insertItem(QString::null); + m_comboBox->insertItem(TQString()); m_comboBox->insertStringList(field_->allowed()); m_comboBox->setMinimumWidth(5*fontMetrics().maxWidth()); registerWidget(); } -QString ChoiceFieldWidget::text() const { +TQString ChoiceFieldWidget::text() const { return m_comboBox->currentText(); } -void ChoiceFieldWidget::setText(const QString& text_) { +void ChoiceFieldWidget::setText(const TQString& text_) { blockSignals(true); m_comboBox->blockSignals(true); @@ -54,15 +54,15 @@ void ChoiceFieldWidget::clear() { } void ChoiceFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) { - QString value = text(); + TQString value = text(); m_comboBox->clear(); // always have empty choice - m_comboBox->insertItem(QString::null); + m_comboBox->insertItem(TQString()); m_comboBox->insertStringList(newField_->allowed()); m_comboBox->setCurrentText(value); } -QWidget* ChoiceFieldWidget::widget() { +TQWidget* ChoiceFieldWidget::widget() { return m_comboBox; } |