From b1057f437bf65300831a0ccb45b920787c6b318d Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 11 Jun 2011 06:00:15 +0000 Subject: TQt4 port kdemultimedia This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- arts/gui/kde/kpopupbox_private.h | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'arts/gui/kde/kpopupbox_private.h') diff --git a/arts/gui/kde/kpopupbox_private.h b/arts/gui/kde/kpopupbox_private.h index 8fb25bea..06a58ebc 100644 --- a/arts/gui/kde/kpopupbox_private.h +++ b/arts/gui/kde/kpopupbox_private.h @@ -32,9 +32,10 @@ class TQBoxLayout; #include -class KPopupBox_widget : public QFrame +class KPopupBox_widget : public TQFrame { Q_OBJECT + TQ_OBJECT public: KPopupBox_widget( TQWidget* =0, const char* =0); ~KPopupBox_widget(); @@ -53,7 +54,7 @@ private: TQBoxLayout *_layout; TQFrame *_titlebar; - TQBoxLayout *_titlebarlayout; + TQBoxLayout *_titlebartqlayout; HandleDrag *_drag; ShowButton *_showbutton; OwnButton *_ownbutton; @@ -65,6 +66,7 @@ private: /*class KPopupBoxEventMapper : public TQObject { Q_OBJECT + TQ_OBJECT public: KPopupBoxEventMapper( KPopupBox_widget *widget, Arts::KPopupBox_impl *impl ) : TQObject( widget,"" ), _widget( widget ), _impl( impl ) @@ -79,13 +81,14 @@ private: class HandleDrag : public TQWidget { Q_OBJECT + TQ_OBJECT public: - HandleDrag( TQWidget *parent, const char* name=0 ) : TQWidget( parent,name ) {} + HandleDrag( TQWidget *tqparent, const char* name=0 ) : TQWidget( tqparent,name ) {} void paintEvent( TQPaintEvent * ) { TQPainter p( this ); TQStyle::SFlags flags = TQStyle::Style_Default; if( width() < height() ) flags |= TQStyle::Style_Horizontal; - style().drawPrimitive( TQStyle::PE_DockWindowHandle, &p, rect(), colorGroup(), flags ); + tqstyle().tqdrawPrimitive( TQStyle::PE_DockWindowHandle, &p, rect(), tqcolorGroup(), flags ); } signals: void clicked(); @@ -108,11 +111,12 @@ static const char* const own_xpm[] = { "5 5 2 1", "# c black", ". c None", "# class ShowButton : public TQPushButton { Q_OBJECT + TQ_OBJECT private: TQBoxLayout::Direction _dir; TQPixmap _pmleft, _pmright, _pmup, _pmdown; public: - ShowButton( TQWidget *parent, const char* name=0 ) : TQPushButton( parent,name ), _dir( TQBoxLayout::LeftToRight ) + ShowButton( TQWidget *tqparent, const char* name=0 ) : TQPushButton( tqparent,name ), _dir( TQBoxLayout::LeftToRight ) { connect( this, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( owntoggle( bool ) ) ); setToggleButton( true ); @@ -147,27 +151,28 @@ public slots: } } public: - TQSize minimumSizeHint() const { - int wh = style().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); + TQSize tqminimumSizeHint() const { + int wh = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); return TQSize( wh, wh ); } TQSizePolicy sizePolicy() const { return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); } - TQSize minimumSize() const { return minimumSizeHint(); } - TQSize sizeHint() const { return minimumSize(); } + TQSize tqminimumSize() const { return tqminimumSizeHint(); } + TQSize tqsizeHint() const { return tqminimumSize(); } void drawButton( TQPainter * p ) { - p->fillRect( 0,0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); + p->fillRect( 0,0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) ); p->drawPixmap( ( width() - pixmap()->width() ) / 2, ( height() - pixmap()->height() ) / 2, *pixmap() ); } }; class OwnButton : public TQPushButton { Q_OBJECT + TQ_OBJECT private: TQPixmap _pmown, _pminside; public: - OwnButton( TQWidget *parent, const char* name=0 ) : TQPushButton( parent,name ) + OwnButton( TQWidget *tqparent, const char* name=0 ) : TQPushButton( tqparent,name ) { connect( this, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( toggle( bool ) ) ); setToggleButton( true ); @@ -182,17 +187,17 @@ public slots: else setPixmap( _pmown ); } public: - TQSize minimumSizeHint() const { - int wh = style().pixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); + TQSize tqminimumSizeHint() const { + int wh = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowHandleExtent, this ); return TQSize( wh, wh ); } TQSizePolicy sizePolicy() const { return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); } - TQSize minimumSize() const { return minimumSizeHint(); } - TQSize sizeHint() const { return minimumSize(); } + TQSize tqminimumSize() const { return tqminimumSizeHint(); } + TQSize tqsizeHint() const { return tqminimumSize(); } void drawButton( TQPainter * p ) { - p->fillRect( 0,0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); + p->fillRect( 0,0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) ); p->drawPixmap( ( width() - pixmap()->width() ) / 2, ( height() - pixmap()->height() ) / 2, *pixmap() ); } }; @@ -202,6 +207,7 @@ public: class OwnWidget : public KArtsWidget { Q_OBJECT + TQ_OBJECT ShowButton *_b; public: OwnWidget( ShowButton* b, TQWidget* p, const char* n=0, WFlags f=0 ) : KArtsWidget( p,n,f ) { _b = b; } -- cgit v1.2.1