diff options
Diffstat (limited to 'kexi/plugins/forms/widgets/kexidbcombobox.cpp')
-rw-r--r-- | kexi/plugins/forms/widgets/kexidbcombobox.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp index 2a25b905..81c66ba6 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp @@ -59,10 +59,10 @@ class KexiDBComboBox::Private KexiComboBoxPopup *popup; KComboBox *paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle (because styles use <static_cast>) - TQSize sizeHint; //!< A cache for KexiDBComboBox::sizeHint(), + TQSize tqsizeHint; //!< A cache for KexiDBComboBox::tqsizeHint(), //!< rebuilt by KexiDBComboBox::fontChange() and KexiDBComboBox::styleChange() KexiDB::QueryColumnInfo* visibleColumnInfo; - TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its children (if isEditable is false) + TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its tqchildren (if isEditable is false) bool isEditable : 1; //!< true is the combo box is editable bool buttonPressed : 1; bool mouseOver : 1; @@ -124,7 +124,7 @@ bool KexiDBComboBox::isEditable() const void KexiDBComboBox::paintEvent( TQPaintEvent * ) { TQPainter p( this ); - TQColorGroup cg( palette().active() ); + TQColorGroup cg( tqpalette().active() ); // if ( hasFocus() ) // cg.setColor(TQColorGroup::Base, cg.highlight()); // else @@ -144,9 +144,9 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) return; } -//! @todo support reverse layout +//! @todo support reverse tqlayout //bool reverse = TQApplication::reverseLayout(); - tqstyle().drawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg, + tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg, flags, (uint)TQStyle::SC_All, (d->buttonPressed ? TQStyle::SC_ComboBoxArrow : TQStyle::SC_None ) ); @@ -159,7 +159,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) if ( hasFocus() ) { if (0==qstrcmp(tqstyle().name(), "windows")) //a hack p.fillRect( editorGeometry, cg.brush( TQColorGroup::Highlight ) ); - TQRect r( TQStyle::visualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) ); + TQRect r( TQStyle::tqvisualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) ); r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //enlare by 1 pixel each side to avoid covering by the subwidget tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, cg, flags | TQStyle::Style_FocusAtBorder, TQStyleOption(cg.highlight())); @@ -170,7 +170,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) TQRect KexiDBComboBox::editorGeometry() const { - TQRect r( TQStyle::visualRect( + TQRect r( TQStyle::tqvisualRect( tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, d->paintedCombo, TQStyle::SC_ComboBoxEditField), d->paintedCombo ) ); @@ -211,20 +211,20 @@ void KexiDBComboBox::createEditor() void KexiDBComboBox::setLabelPosition(LabelPosition position) { if(m_subwidget) { - if (-1 != m_subwidget->metaObject()->findProperty("frameShape", true)) + if (-1 != m_subwidget->tqmetaObject()->findProperty("frameShape", true)) m_subwidget->setProperty("frameShape", TQVariant((int)TQFrame::NoFrame)); m_subwidget->setGeometry( editorGeometry() ); } // KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget); // update size policy // if (subwidgetInterface && subwidgetInterface->subwidgetStretchRequired(this)) { - TQSizePolicy sizePolicy( this->sizePolicy() ); + TQSizePolicy sizePolicy( this->tqsizePolicy() ); if(position == Left) sizePolicy.setHorData( TQSizePolicy::Minimum ); else sizePolicy.setVerData( TQSizePolicy::Minimum ); - //m_subwidget->setSizePolicy(sizePolicy); - setSizePolicy(sizePolicy); + //m_subwidget->tqsetSizePolicy(sizePolicy); + tqsetSizePolicy(sizePolicy); //} // } } @@ -233,7 +233,7 @@ TQRect KexiDBComboBox::buttonGeometry() const { TQRect arrowRect( tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, d->paintedCombo, TQStyle::SC_ComboBoxArrow) ); - arrowRect = TQStyle::visualRect(arrowRect, d->paintedCombo); + arrowRect = TQStyle::tqvisualRect(arrowRect, d->paintedCombo); arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); // a fix for Motif style return arrowRect; } @@ -259,7 +259,7 @@ bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e) if ( arrowRect.contains( e->pos() ) ) { d->arrowPressed = TRUE; d->arrowDown = TRUE; - repaint( FALSE ); + tqrepaint( FALSE ); } } else {*/ showPopup(); @@ -490,29 +490,29 @@ int KexiDBComboBox::popupWidthHint() const void KexiDBComboBox::fontChange( const TQFont & oldFont ) { - d->sizeHint = TQSize(); //force rebuild the cache + d->tqsizeHint = TQSize(); //force rebuild the cache KexiDBAutoField::fontChange(oldFont); } void KexiDBComboBox::styleChange( TQStyle& oldStyle ) { KexiDBAutoField::styleChange( oldStyle ); - d->sizeHint = TQSize(); //force rebuild the cache + d->tqsizeHint = TQSize(); //force rebuild the cache if (m_subwidget) m_subwidget->setGeometry( editorGeometry() ); } -TQSize KexiDBComboBox::sizeHint() const +TQSize KexiDBComboBox::tqsizeHint() const { - if ( isVisible() && d->sizeHint.isValid() ) - return d->sizeHint; + if ( isVisible() && d->tqsizeHint.isValid() ) + return d->tqsizeHint; const int maxWidth = 7 * fontMetrics().width(TQChar('x')) + 18; const int maxHeight = TQMAX( fontMetrics().lineSpacing(), 14 ) + 2; - d->sizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo, + d->tqsizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo, TQSize(maxWidth, maxHeight)).expandedTo(TQApplication::globalStrut())); - return d->sizeHint; + return d->tqsizeHint; } void KexiDBComboBox::editRequested() |