summaryrefslogtreecommitdiffstats
path: root/lib/widgets/qcomboview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/widgets/qcomboview.cpp')
-rw-r--r--lib/widgets/qcomboview.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/widgets/qcomboview.cpp b/lib/widgets/qcomboview.cpp
index 2dcfb9f3..700344de 100644
--- a/lib/widgets/qcomboview.cpp
+++ b/lib/widgets/qcomboview.cpp
@@ -39,7 +39,7 @@ public:
QComboViewData( QComboView *cb ): current(0), lView( 0 ), combo( cb )
{
duplicatesEnabled = TRUE;
- cb->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
+ cb->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
}
inline TQListView * listView() { return lView; }
@@ -68,7 +68,7 @@ public:
TQLineEdit * ed; // /bin/ed rules!
TQTimer *completionTimer;
- TQSize tqsizeHint;
+ TQSize sizeHint;
private:
bool usinglView;
@@ -81,7 +81,7 @@ void QComboViewData::updateLinedGeometry()
{
if ( !ed || !combo )
return;
- TQRect r = TQStyle::tqvisualRect( combo->tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, combo,
+ TQRect r = TQStyle::visualRect( combo->tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, combo,
TQStyle::SC_ComboBoxEditField), combo );
// qWarning("updateLinedGeometry(): currentItem is %d", combo->currentItem() == 0 ? 0 : 1);
@@ -204,7 +204,7 @@ void QComboView::clear()
d->current = 0;
if ( d->ed ) {
- d->ed->setText( TQString::tqfromLatin1("") );
+ d->ed->setText( TQString::fromLatin1("") );
d->updateLinedGeometry();
}
currentChanged();
@@ -272,10 +272,10 @@ void QComboView::setAutoResize( bool enable )
the contents change dynamically. To tqinvalidate the cached value
call setFont().
*/
-TQSize QComboView::tqsizeHint() const
+TQSize QComboView::sizeHint() const
{
- if ( isVisible() && d->tqsizeHint.isValid() )
- return d->tqsizeHint;
+ if ( isVisible() && d->sizeHint.isValid() )
+ return d->sizeHint;
constPolish();
// int i, w;
@@ -290,10 +290,10 @@ TQSize QComboView::tqsizeHint() const
maxW = w;
}
*/
- d->tqsizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, this,
+ d->sizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, this,
TQSize(maxW, maxH)).expandedTo(TQApplication::globalStrut()));
- return d->tqsizeHint;
+ return d->sizeHint;
}
@@ -385,7 +385,7 @@ void QComboView::setPalette( const TQPalette &palette )
void QComboView::setFont( const TQFont &font )
{
- d->tqsizeHint = TQSize(); // tqinvalidate size hint
+ d->sizeHint = TQSize(); // tqinvalidate size hint
TQWidget::setFont( font );
d->listView()->setFont( font );
if (d->ed)
@@ -412,7 +412,7 @@ void QComboView::resizeEvent( TQResizeEvent * e )
void QComboView::paintEvent( TQPaintEvent * )
{
TQPainter p( this );
- const TQColorGroup & g = tqcolorGroup();
+ const TQColorGroup & g = colorGroup();
p.setPen(g.text());
TQStyle::SFlags flags = TQStyle::Style_Default;
@@ -428,7 +428,7 @@ void QComboView::paintEvent( TQPaintEvent * )
}
// bool reverse = TQApplication::reverseLayout();
- tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g,
+ tqstyle().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g,
flags, TQStyle::SC_All,
(d->arrowDown ?
TQStyle::SC_ComboBoxArrow :
@@ -436,7 +436,7 @@ void QComboView::paintEvent( TQPaintEvent * )
TQRect re = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
TQStyle::SC_ComboBoxEditField );
- re = TQStyle::tqvisualRect(re, this);
+ re = TQStyle::visualRect(re, this);
p.setClipRect( re );
if ( !d->ed ) {
@@ -445,14 +445,14 @@ void QComboView::paintEvent( TQPaintEvent * )
// we calculate the TQListBoxTexts height (ignoring strut)
int itemh = d->listView()->fontMetrics().lineSpacing() + 2;
p.translate( re.x(), re.y() + (re.height() - itemh)/2 );
- item->paintCell( &p, d->listView()->tqcolorGroup(), 0, width(), AlignLeft | AlignVCenter );
+ item->paintCell( &p, d->listView()->colorGroup(), 0, width(), AlignLeft | AlignVCenter );
}
} else if ( d->listView() && d->listView()->currentItem( ) && d->current ) {
TQListViewItem * item = d->current ;
const TQPixmap *pix = item->pixmap(0);
if ( pix ) {
p.fillRect( re.x(), re.y(), pix->width() + 4, re.height(),
- tqcolorGroup().brush( TQColorGroup::Base ) );
+ colorGroup().brush( TQColorGroup::Base ) );
p.drawPixmap( re.x() + 2, re.y() +
( re.height() - pix->height() ) / 2, *pix );
}
@@ -474,7 +474,7 @@ void QComboView::mousePressEvent( TQMouseEvent *e )
}
TQRect arrowRect = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
TQStyle::SC_ComboBoxArrow);
- arrowRect = TQStyle::tqvisualRect(arrowRect, this);
+ arrowRect = TQStyle::visualRect(arrowRect, this);
// Correction for motif style, where arrow is smaller
// and thus has a rect that doesn't fit the button.
@@ -700,12 +700,12 @@ static int listHeight( TQListView *l, int /*sl*/ )
prefH = ch * l->firstChild()->height();
}
else
- prefH = l->tqsizeHint().height();
+ prefH = l->sizeHint().height();
if (l->header()->isVisible())
- prefH += l->header()->tqsizeHint().height();
+ prefH += l->header()->sizeHint().height();
-// return prefH < l->tqsizeHint().height() ? prefH : l->tqsizeHint().height();
+// return prefH < l->sizeHint().height() ? prefH : l->sizeHint().height();
return prefH+2;
}
@@ -727,7 +727,7 @@ void QComboView::popup()
lb->installEventFilter( this );
lb->viewport()->installEventFilter( this );
d->mouseWasInsidePopup = FALSE;
-// int w = lb->variableWidth() ? lb->tqsizeHint().width() : width();
+// int w = lb->variableWidth() ? lb->sizeHint().width() : width();
int w = width();
int h = listHeight( lb, d->sizeLimit );
TQRect screen = TQApplication::desktop()->availableGeometry( const_cast<QComboView*>(this) );
@@ -790,7 +790,7 @@ void QComboView::updateMask()
{
TQPainter p( &bm, this );
- tqstyle().tqdrawComplexControlMask(TQStyle::CC_ComboBox, &p, this, rect());
+ tqstyle().drawComplexControlMask(TQStyle::CC_ComboBox, &p, this, rect());
}
setMask( bm );
@@ -904,7 +904,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
TQRect arrowRect =
tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this,
TQStyle::SC_ComboBoxArrow);
- arrowRect = TQStyle::tqvisualRect(arrowRect, this);
+ arrowRect = TQStyle::visualRect(arrowRect, this);
if ( arrowRect.contains( comboPos ) ) {
if ( !d->arrowDown ) {
d->arrowDown = TRUE;
@@ -918,7 +918,7 @@ bool QComboView::eventFilter( TQObject *object, TQEvent *event )
}
}
} else if ((e->state() & ( Qt::RightButton | Qt::LeftButton | Qt::MidButton ) ) == 0 &&
- tqstyle().tqstyleHint(TQStyle::SH_ComboBox_ListMouseTracking, this)) {
+ tqstyle().styleHint(TQStyle::SH_ComboBox_ListMouseTracking, this)) {
// qWarning("event filter:: emu");
TQWidget *mouseW = TQApplication::widgetAt( e->globalPos(), TRUE );
// if ( mouseW == d->listView()->viewport() ) { //###
@@ -1333,7 +1333,7 @@ bool QComboView::autoCompletion() const
*/
void QComboView::styleChange( TQStyle& s )
{
- d->tqsizeHint = TQSize(); // tqinvalidate size hint...
+ d->sizeHint = TQSize(); // tqinvalidate size hint...
if ( d->ed )
d->updateLinedGeometry();
TQWidget::styleChange( s );