diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/widget/utils/kexicomboboxdropdownbutton.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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); } |