summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/forms/widgets/kexidbcheckbox.cpp')
-rw-r--r--kexi/plugins/forms/widgets/kexidbcheckbox.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kexi/plugins/forms/widgets/kexidbcheckbox.cpp b/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
index 6b63851a..c704a985 100644
--- a/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
@@ -23,29 +23,29 @@
#include <kexiutils/utils.h>
#include <kexidb/queryschema.h>
-KexiDBCheckBox::KexiDBCheckBox(const QString &text, QWidget *parent, const char *name)
- : QCheckBox(text, parent, name), KexiFormDataItemInterface()
+KexiDBCheckBox::KexiDBCheckBox(const TQString &text, TQWidget *tqparent, const char *name)
+ : TQCheckBox(text, tqparent, name), KexiFormDataItemInterface()
, m_invalidState(false)
, m_tristateChanged(false)
, m_tristate(TristateDefault)
{
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
updateTristate();
- connect(this, SIGNAL(stateChanged(int)), this, SLOT(slotStateChanged(int)));
+ connect(this, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotStateChanged(int)));
}
KexiDBCheckBox::~KexiDBCheckBox()
{
}
-void KexiDBCheckBox::setInvalidState( const QString& displayText )
+void KexiDBCheckBox::setInvalidState( const TQString& displayText )
{
setEnabled(false);
setState(NoChange);
m_invalidState = true;
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
- if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ if (focusPolicy() & TQ_TabFocus)
+ setFocusPolicy(TQ_ClickFocus);
setText(displayText);
}
@@ -54,7 +54,7 @@ KexiDBCheckBox::setEnabled(bool enabled)
{
if(enabled && m_invalidState)
return;
- QCheckBox::setEnabled(enabled);
+ TQCheckBox::setEnabled(enabled);
}
void
@@ -63,7 +63,7 @@ KexiDBCheckBox::setReadOnly(bool readOnly)
setEnabled(!readOnly);
}
-void KexiDBCheckBox::setValueInternal(const QVariant &add, bool removeOld)
+void KexiDBCheckBox::setValueInternal(const TQVariant &add, bool removeOld)
{
Q_UNUSED(add);
Q_UNUSED(removeOld);
@@ -73,12 +73,12 @@ void KexiDBCheckBox::setValueInternal(const QVariant &add, bool removeOld)
setState( m_origValue.toBool() ? On : Off );
}
-QVariant
+TQVariant
KexiDBCheckBox::value()
{
if (state()==NoChange)
- return QVariant();
- return QVariant(state()==On, 1);
+ return TQVariant();
+ return TQVariant(state()==On, 1);
}
void KexiDBCheckBox::slotStateChanged(int )
@@ -101,7 +101,7 @@ bool KexiDBCheckBox::isReadOnly() const
return !isEnabled();
}
-QWidget*
+TQWidget*
KexiDBCheckBox::widget()
{
return this;
@@ -146,29 +146,29 @@ void KexiDBCheckBox::updateTristate()
{
if (m_tristate == TristateDefault) {
//! @todo the data source may be defined as NOT NULL... thus disallowing NULL state
- QCheckBox::setTristate( !dataSource().isEmpty() );
+ TQCheckBox::setTristate( !dataSource().isEmpty() );
}
else {
- QCheckBox::setTristate( m_tristate == TristateOn );
+ TQCheckBox::setTristate( m_tristate == TristateOn );
}
}
-void KexiDBCheckBox::setDataSource(const QString &ds)
+void KexiDBCheckBox::setDataSource(const TQString &ds)
{
KexiFormDataItemInterface::setDataSource(ds);
updateTristate();
}
-void KexiDBCheckBox::setDisplayDefaultValue(QWidget *widget, bool displayDefaultValue)
+void KexiDBCheckBox::setDisplayDefaultValue(TQWidget *widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
// initialize display parameters for default / entered value
KexiDisplayUtils::DisplayParameters * const params
= displayDefaultValue ? m_displayParametersForDefaultValue : m_displayParametersForEnteredValue;
// setFont(params->font);
- QPalette pal(palette());
-// pal.setColor(QPalette::Active, QColorGroup::Text, params->textColor);
- pal.setColor(QPalette::Active, QColorGroup::Foreground, params->textColor);
+ TQPalette pal(palette());
+// pal.setColor(TQPalette::Active, TQColorGroup::Text, params->textColor);
+ pal.setColor(TQPalette::Active, TQColorGroup::Foreground, params->textColor);
setPalette(pal);
}