diff options
Diffstat (limited to 'kexi/widget/utils/kexicomboboxdropdownbutton.cpp')
-rw-r--r-- | kexi/widget/utils/kexicomboboxdropdownbutton.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kexi/widget/utils/kexicomboboxdropdownbutton.cpp b/kexi/widget/utils/kexicomboboxdropdownbutton.cpp index 407bc6fe..b5c22372 100644 --- a/kexi/widget/utils/kexicomboboxdropdownbutton.cpp +++ b/kexi/widget/utils/kexicomboboxdropdownbutton.cpp @@ -23,18 +23,18 @@ #include <kdebug.h> #include <kcombobox.h> -#include <qstyle.h> -#include <qapplication.h> +#include <tqstyle.h> +#include <tqapplication.h> -KexiComboBoxDropDownButton::KexiComboBoxDropDownButton( QWidget *parent ) - : KPushButton(parent) +KexiComboBoxDropDownButton::KexiComboBoxDropDownButton( TQWidget *tqparent ) + : KPushButton(tqparent) { m_paintedCombo = new KComboBox(this); m_paintedCombo->hide(); m_paintedCombo->setEditable(true); setToggleButton(true); - styleChange(style()); + styleChange(tqstyle()); m_paintedCombo->move(0,0); m_paintedCombo->setFixedSize(size()); } @@ -43,45 +43,45 @@ KexiComboBoxDropDownButton::~KexiComboBoxDropDownButton() { } -void KexiComboBoxDropDownButton::drawButton(QPainter *p) +void KexiComboBoxDropDownButton::drawButton(TQPainter *p) { - int flags = QStyle::Style_Enabled | QStyle::Style_HasFocus; + int flags = TQStyle::Style_Enabled | TQStyle::Style_HasFocus; if (isDown()) - flags |= QStyle::Style_Down; + flags |= TQStyle::Style_Down; KPushButton::drawButton(p); - QRect r = rect(); + TQRect r = rect(); r.setHeight(r.height()+m_fixForHeight); - if (m_drawComplexControl) { + if (m_tqdrawComplexControl) { if (m_fixForHeight>0 && m_paintedCombo->size()!=size()) { m_paintedCombo->move(0,0); - m_paintedCombo->setFixedSize(size()+QSize(0, m_fixForHeight)); //last chance to fix size + m_paintedCombo->setFixedSize(size()+TQSize(0, m_fixForHeight)); //last chance to fix size } - style().drawComplexControl( QStyle::CC_ComboBox, p, - m_fixForHeight>0 ? (const QWidget*)m_paintedCombo : this, r, colorGroup(), - flags, (uint)(QStyle::SC_ComboBoxArrow), QStyle::SC_None ); + tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, p, + m_fixForHeight>0 ? (const TQWidget*)m_paintedCombo : this, r, tqcolorGroup(), + flags, (uint)(TQStyle::SC_ComboBoxArrow), TQStyle::SC_None ); } else { r.setWidth(r.width()+2); - style().drawPrimitive( QStyle::PE_ArrowDown, p, r, colorGroup(), flags); + tqstyle().tqdrawPrimitive( TQStyle::PE_ArrowDown, p, r, tqcolorGroup(), flags); } } -void KexiComboBoxDropDownButton::styleChange( QStyle & oldStyle ) +void KexiComboBoxDropDownButton::styleChange( TQStyle & oldStyle ) { //<hack> - if (qstricmp(style().name(),"thinkeramik")==0) { + if (qstricmp(tqstyle().name(),"thinkeramik")==0) { m_fixForHeight = 3; } else m_fixForHeight = 0; //</hack> - m_drawComplexControl = - (style().inherits("KStyle") && qstricmp(style().name(),"qtcurve")!=0) - || qstricmp(style().name(),"platinum")==0; + m_tqdrawComplexControl = + (tqstyle().inherits("KStyle") && qstricmp(tqstyle().name(),"qtcurve")!=0) + || qstricmp(tqstyle().name(),"platinum")==0; if (m_fixForHeight==0) - setFixedWidth( style().querySubControlMetrics( QStyle::CC_ComboBox, - (const QWidget*)m_paintedCombo, QStyle::SC_ComboBoxArrow ).width() +1 ); + setFixedWidth( tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, + (const TQWidget*)m_paintedCombo, TQStyle::SC_ComboBoxArrow ).width() +1 ); KPushButton::styleChange(oldStyle); } |