diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
commit | 8155225c9be993acc0512956416d195edfef4eb9 (patch) | |
tree | de4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /kwin/kcmkwin/kwindecoration | |
parent | 364641b8e0279758d236af39abd138d379328a19 (diff) | |
download | tdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip |
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/kcmkwin/kwindecoration')
-rw-r--r-- | kwin/kcmkwin/kwindecoration/buttons.cpp | 70 | ||||
-rw-r--r-- | kwin/kcmkwin/kwindecoration/buttons.h | 10 | ||||
-rw-r--r-- | kwin/kcmkwin/kwindecoration/kwindecoration.cpp | 16 | ||||
-rw-r--r-- | kwin/kcmkwin/kwindecoration/preview.cpp | 14 | ||||
-rw-r--r-- | kwin/kcmkwin/kwindecoration/preview.h | 2 |
5 files changed, 56 insertions, 56 deletions
diff --git a/kwin/kcmkwin/kwindecoration/buttons.cpp b/kwin/kcmkwin/kwindecoration/buttons.cpp index 5d1d96d85..67f197fd9 100644 --- a/kwin/kcmkwin/kwindecoration/buttons.cpp +++ b/kwin/kcmkwin/kwindecoration/buttons.cpp @@ -54,7 +54,7 @@ ButtonDrag::ButtonDrag( Button btn, TQWidget* parent, const char* name) TQDataStream stream(data, IO_WriteOnly); stream << btn.name; stream << btn.icon; - stream << btn.type.unicode(); + stream << btn.type.tqunicode(); stream << (int) btn.duplicate; stream << (int) btn.supported; setEncodedData( data ); @@ -123,7 +123,7 @@ TQPixmap bitmapPixmap(const TQBitmap& bm, const TQColor& color) ButtonSource::ButtonSource(TQWidget *parent, const char* name) : KListView(parent, name) { - setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); setResizeMode(TQListView::AllColumns); setDragEnabled(true); @@ -140,19 +140,19 @@ ButtonSource::~ButtonSource() { } -TQSize ButtonSource::sizeHint() const +TQSize ButtonSource::tqsizeHint() const { - // make the sizeHint height a bit smaller than the one of TQListView... + // make the tqsizeHint height a bit smaller than the one of TQListView... if ( cachedSizeHint().isValid() ) return cachedSizeHint(); constPolish(); - TQSize s( header()->sizeHint() ); + TQSize s( header()->tqsizeHint() ); if ( verticalScrollBar()->isVisible() ) - s.setWidth( s.width() + style().pixelMetric(TQStyle::PM_ScrollBarExtent) ); + s.setWidth( s.width() + tqstyle().tqpixelMetric(TQStyle::PM_ScrollBarExtent) ); s += TQSize(frameWidth()*2,frameWidth()*2); // size hint: 4 lines of text... @@ -218,7 +218,7 @@ TQDragObject *ButtonSource::dragObject() if (i) { ButtonDrag *bd = new ButtonDrag(i->button(), viewport(), "button_drag"); - bd->setPixmap(bitmapPixmap(i->button().icon, colorGroup().foreground() )); + bd->setPixmap(bitmapPixmap(i->button().icon, tqcolorGroup().foreground() )); return bd; } @@ -306,15 +306,15 @@ void ButtonDropSite::clearRight() void ButtonDropSite::dragMoveEvent( TQDragMoveEvent* e ) { TQPoint p = e->pos(); - if (leftDropArea().contains(p) || rightDropArea().contains(p) || buttonAt(p) ) { + if (leftDropArea().tqcontains(p) || rightDropArea().tqcontains(p) || buttonAt(p) ) { e->accept(); // 2 pixel wide drop visualizer... TQRect r = contentsRect(); int x = -1; - if (leftDropArea().contains(p) ) { + if (leftDropArea().tqcontains(p) ) { x = leftDropArea().left(); - } else if (rightDropArea().contains(p) ) { + } else if (rightDropArea().tqcontains(p) ) { x = rightDropArea().right()+1; } else { ButtonDropSiteItem *item = buttonAt(p); @@ -373,10 +373,10 @@ void ButtonDropSite::dropEvent( TQDropEvent* e ) ButtonList *buttonList = 0; ButtonList::iterator buttonPosition; - if (leftDropArea().contains(p) ) { + if (leftDropArea().tqcontains(p) ) { buttonList = &buttonsLeft; buttonPosition = buttonsLeft.end(); - } else if (rightDropArea().contains(p) ) { + } else if (rightDropArea().tqcontains(p) ) { buttonList = &buttonsRight; buttonPosition = buttonsRight.begin(); } else { @@ -446,9 +446,9 @@ bool ButtonDropSite::getItemIterator(ButtonDropSiteItem *item, ButtonList* &list if (!item) return false; - ButtonList::iterator it = buttonsLeft.find(item); // try the left list first... + ButtonList::iterator it = buttonsLeft.tqfind(item); // try the left list first... if (it == buttonsLeft.end() ) { - it = buttonsRight.find(item); // try the right list... + it = buttonsRight.tqfind(item); // try the right list... if (it == buttonsRight.end() ) { return false; // item hasn't been found in one of the list, return... } else { @@ -487,7 +487,7 @@ void ButtonDropSite::mousePressEvent( TQMouseEvent* e ) m_selected = buttonAt(e->pos() ); if (m_selected) { ButtonDrag *bd = new ButtonDrag(m_selected->button(), this); - bd->setPixmap(bitmapPixmap(m_selected->button().icon, colorGroup().foreground() ) ); + bd->setPixmap(bitmapPixmap(m_selected->button().icon, tqcolorGroup().foreground() ) ); bd->dragMove(); } } @@ -521,14 +521,14 @@ void ButtonDropSite::recalcItemGeometry() ButtonDropSiteItem *ButtonDropSite::buttonAt(TQPoint p) { // try to find the item in the left button list for (ButtonList::const_iterator it = buttonsLeft.begin(); it != buttonsLeft.end(); ++it) { - if ( (*it)->rect.contains(p) ) { + if ( (*it)->rect.tqcontains(p) ) { return *it; } } // try to find the item in the right button list for (ButtonList::const_iterator it = buttonsRight.begin(); it != buttonsRight.end(); ++it) { - if ( (*it)->rect.contains(p) ) { + if ( (*it)->rect.tqcontains(p) ) { return *it; } } @@ -572,7 +572,7 @@ bool ButtonDropSite::removeSelectedButton() delete m_selected; m_selected = 0; recalcItemGeometry(); - update(); // repaint... + update(); // tqrepaint... } return succ; @@ -581,9 +581,9 @@ bool ButtonDropSite::removeSelectedButton() void ButtonDropSite::drawButtonList(TQPainter *p, const ButtonList& btns, int offset) { for (ButtonList::const_iterator it = btns.begin(); it != btns.end(); ++it) { - TQRect itemRect = (*it)->rect; - if (itemRect.isValid() ) { - (*it)->draw(p, colorGroup(), itemRect); + TQRect tqitemRect = (*it)->rect; + if (tqitemRect.isValid() ) { + (*it)->draw(p, tqcolorGroup(), tqitemRect); } offset += (*it)->width(); } @@ -675,11 +675,11 @@ ButtonPositionWidget::ButtonPositionWidget(TQWidget *parent, const char* name) m_factory(0) { TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint() ); - setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Maximum); + tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Maximum); TQLabel* label = new TQLabel( this ); m_dropSite = new ButtonDropSite( this ); - label->setAlignment( int( TQLabel::WordBreak ) ); + label->tqsetAlignment( int( TQLabel::WordBreak ) ); label->setText( i18n( "To add or remove titlebar buttons, simply <i>drag</i> items " "between the available item list and the titlebar preview. Similarly, " "drag items within the titlebar preview to re-position them.") ); @@ -761,7 +761,7 @@ void ButtonPositionWidget::setDecorationFactory(KDecorationFactory *factory) ButtonSourceItem *i = dynamic_cast<ButtonSourceItem*>(it.current() ); if (i) { Button b = i->button(); - b.supported = m_supportedButtons.contains(b.type); + b.supported = m_supportedButtons.tqcontains(b.type); i->setButton(b); } ++it; @@ -777,47 +777,47 @@ Button ButtonPositionWidget::getButton(TQChar type, bool& success) { if (type == 'R') { TQBitmap bmp(resize_width, resize_height, resize_bits, true); bmp.setMask(bmp); - return Button(i18n("Resize"), bmp, 'R', false, m_supportedButtons.contains('R') ); + return Button(i18n("Resize"), bmp, 'R', false, m_supportedButtons.tqcontains('R') ); } else if (type == 'L') { TQBitmap bmp(shade_width, shade_height, shade_bits, true); bmp.setMask(bmp); - return Button(i18n("Shade"), bmp, 'L', false, m_supportedButtons.contains('L') ); + return Button(i18n("Shade"), bmp, 'L', false, m_supportedButtons.tqcontains('L') ); } else if (type == 'B') { TQBitmap bmp(keepbelowothers_width, keepbelowothers_height, keepbelowothers_bits, true); bmp.setMask(bmp); - return Button(i18n("Keep Below Others"), bmp, 'B', false, m_supportedButtons.contains('B') ); + return Button(i18n("Keep Below Others"), bmp, 'B', false, m_supportedButtons.tqcontains('B') ); } else if (type == 'F') { TQBitmap bmp(keepaboveothers_width, keepaboveothers_height, keepaboveothers_bits, true); bmp.setMask(bmp); - return Button(i18n("Keep Above Others"), bmp, 'F', false, m_supportedButtons.contains('F') ); + return Button(i18n("Keep Above Others"), bmp, 'F', false, m_supportedButtons.tqcontains('F') ); } else if (type == 'X') { TQBitmap bmp(close_width, close_height, close_bits, true); bmp.setMask(bmp); - return Button(i18n("Close"), bmp, 'X', false, m_supportedButtons.contains('X') ); + return Button(i18n("Close"), bmp, 'X', false, m_supportedButtons.tqcontains('X') ); } else if (type == 'A') { TQBitmap bmp(maximize_width, maximize_height, maximize_bits, true); bmp.setMask(bmp); - return Button(i18n("Maximize"), bmp, 'A', false, m_supportedButtons.contains('A') ); + return Button(i18n("Maximize"), bmp, 'A', false, m_supportedButtons.tqcontains('A') ); } else if (type == 'I') { TQBitmap bmp(minimize_width, minimize_height, minimize_bits, true); bmp.setMask(bmp); - return Button(i18n("Minimize"), bmp, 'I', false, m_supportedButtons.contains('I') ); + return Button(i18n("Minimize"), bmp, 'I', false, m_supportedButtons.tqcontains('I') ); } else if (type == 'H') { TQBitmap bmp(help_width, help_height, help_bits, true); bmp.setMask(bmp); - return Button(i18n("Help"), bmp, 'H', false, m_supportedButtons.contains('H') ); + return Button(i18n("Help"), bmp, 'H', false, m_supportedButtons.tqcontains('H') ); } else if (type == 'S') { TQBitmap bmp(onalldesktops_width, onalldesktops_height, onalldesktops_bits, true); bmp.setMask(bmp); - return Button(i18n("On All Desktops"), bmp, 'S', false, m_supportedButtons.contains('S') ); + return Button(i18n("On All Desktops"), bmp, 'S', false, m_supportedButtons.tqcontains('S') ); } else if (type == 'M') { TQBitmap bmp(menu_width, menu_height, menu_bits, true); bmp.setMask(bmp); - return Button(i18n("Menu"), bmp, 'M', false, m_supportedButtons.contains('M') ); + return Button(i18n("Menu"), bmp, 'M', false, m_supportedButtons.tqcontains('M') ); } else if (type == '_') { TQBitmap bmp(spacer_width, spacer_height, spacer_bits, true); bmp.setMask(bmp); - return Button(i18n("--- spacer ---"), bmp, '_', true, m_supportedButtons.contains('_') ); + return Button(i18n("--- spacer ---"), bmp, '_', true, m_supportedButtons.tqcontains('_') ); } else { success = false; return Button(); diff --git a/kwin/kcmkwin/kwindecoration/buttons.h b/kwin/kcmkwin/kwindecoration/buttons.h index 0fcbff085..909adfe87 100644 --- a/kwin/kcmkwin/kwindecoration/buttons.h +++ b/kwin/kcmkwin/kwindecoration/buttons.h @@ -57,7 +57,7 @@ class Button bool supported; }; -class ButtonDrag : public QStoredDrag +class ButtonDrag : public TQStoredDrag { public: ButtonDrag( Button btn, TQWidget* parent, const char* name=0 ); @@ -91,7 +91,7 @@ class ButtonDropSiteItem /** * This is plugged into ButtonSource */ -class ButtonSourceItem : public QListViewItem +class ButtonSourceItem : public TQListViewItem { public: ButtonSourceItem(TQListView * parent, const Button& btn); @@ -117,7 +117,7 @@ class ButtonSource : public KListView ButtonSource(TQWidget *parent = 0, const char* name = 0); virtual ~ButtonSource(); - TQSize sizeHint() const; + TQSize tqsizeHint() const; void hideAllButtons(); void showAllButtons(); @@ -136,7 +136,7 @@ typedef TQValueList<ButtonDropSiteItem*> ButtonList; /** * This class renders and handles the demo titlebar dropsite */ -class ButtonDropSite: public QFrame +class ButtonDropSite: public TQFrame { Q_OBJECT @@ -189,7 +189,7 @@ class ButtonDropSite: public QFrame ButtonDropSiteItem *m_selected; }; -class ButtonPositionWidget : public QWidget +class ButtonPositionWidget : public TQWidget { Q_OBJECT diff --git a/kwin/kcmkwin/kwindecoration/kwindecoration.cpp b/kwin/kcmkwin/kwindecoration/kwindecoration.cpp index 193450086..65c951893 100644 --- a/kwin/kcmkwin/kwindecoration/kwindecoration.cpp +++ b/kwin/kcmkwin/kwindecoration/kwindecoration.cpp @@ -97,7 +97,7 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c pluginLayout->addWidget(decorationList); TQGroupBox *pluginSettingsGrp = new TQGroupBox( i18n("Decoration Options"), pluginPage ); - pluginSettingsGrp->setColumnLayout( 0, Vertical ); + pluginSettingsGrp->setColumnLayout( 0, Qt::Vertical ); pluginSettingsGrp->setFlat( true ); pluginSettingsGrp->layout()->setMargin( 0 ); pluginSettingsGrp->layout()->setSpacing( KDialog::spacingHint() ); @@ -112,13 +112,13 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c TQWhatsThis::add( cBorder, i18n( "Use this combobox to change the border size of the decoration." )); lBorder->hide(); cBorder->hide(); - TQHBoxLayout *borderSizeLayout = new TQHBoxLayout(pluginSettingsGrp->layout() ); + TQHBoxLayout *borderSizeLayout = new TQHBoxLayout(pluginSettingsGrp->tqlayout() ); borderSizeLayout->addWidget(lBorder); borderSizeLayout->addWidget(cBorder); borderSizeLayout->addStretch(); pluginConfigWidget = new TQVBox(pluginSettingsGrp); - pluginSettingsGrp->layout()->add( pluginConfigWidget ); + pluginSettingsGrp->tqlayout()->add( pluginConfigWidget ); // Page 2 (Button Selector) TQWidget* buttonPage = new TQWidget( tabWidget ); @@ -154,8 +154,8 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c preview = new KDecorationPreview( this ); previewLayout->addWidget(preview); - preview->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); - tabWidget->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Maximum); + preview->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + tabWidget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Maximum); // Page 3 (Window Shadows) TQHBox *inactiveShadowColourHBox, *shadowColourHBox; @@ -374,7 +374,7 @@ void KWinDecorationModule::findDecorations() { TQDir d(*it); if (d.exists()) - for (QFileInfoListIterator it(*d.entryInfoList()); it.current(); ++it) + for (TQFileInfoListIterator it(*d.entryInfoList()); it.current(); ++it) { TQString filename(it.current()->absFilePath()); if (KDesktopFile::isDesktopFile(filename)) @@ -640,7 +640,7 @@ void KWinDecorationModule::readConfig( KConfig* conf ) activeShadowSettings->setEnabled(shadowEnabled); inactiveShadowSettings->setEnabled(shadowEnabled); whichShadowSettings->setEnabled(shadowEnabled); - shadowColourButton->setColor(conf->readColorEntry("ShadowColour", &Qt::black)); + shadowColourButton->setColor(conf->readColorEntry("ShadowColour", &TQt::black)); shadowOpacitySlider->setValue((int)ceil(conf->readDoubleNumEntry("ShadowOpacity", 0.70) * 100)); shadowXOffsetSpinBox->setValue(conf->readNumEntry("ShadowXOffset", 0)); shadowYOffsetSpinBox->setValue(conf->readNumEntry("ShadowYOffset", 10)); @@ -649,7 +649,7 @@ void KWinDecorationModule::readConfig( KConfig* conf ) cbShadowTopMenus->setChecked(conf->readBoolEntry("ShadowTopMenus", false)); shadowThicknessSpinBox->setValue(conf->readNumEntry("ShadowThickness", 10)); cbInactiveShadow->setChecked(conf->readBoolEntry("InactiveShadowEnabled", false)); - inactiveShadowColourButton->setColor(conf->readColorEntry("InactiveShadowColour", &Qt::black)); + inactiveShadowColourButton->setColor(conf->readColorEntry("InactiveShadowColour", &TQt::black)); inactiveShadowOpacitySlider->setValue((int)ceil(conf->readDoubleNumEntry("InactiveShadowOpacity", 0.70) * 100)); inactiveShadowXOffsetSpinBox->setValue(conf->readNumEntry("InactiveShadowXOffset", 0)); inactiveShadowYOffsetSpinBox->setValue(conf->readNumEntry("InactiveShadowYOffset", 5)); diff --git a/kwin/kcmkwin/kwindecoration/preview.cpp b/kwin/kcmkwin/kwindecoration/preview.cpp index c9a0174f4..ea894ecbc 100644 --- a/kwin/kcmkwin/kwindecoration/preview.cpp +++ b/kwin/kcmkwin/kwindecoration/preview.cpp @@ -49,7 +49,7 @@ KDecorationPreview::KDecorationPreview( TQWidget* parent, const char* name ) "Most probably there\n" "was a problem loading the plugin." ), this ); - no_preview->setAlignment( AlignCenter ); + no_preview->tqsetAlignment( AlignCenter ); setMinimumSize( 100, 100 ); no_preview->resize( size()); @@ -127,15 +127,15 @@ void KDecorationPreview::positionPreviews() // Resize the active window size = TQSize( width() - xoffset, height() - titleBarHeight ) - .expandedTo( deco[Active]->minimumSize() ); + .expandedTo( deco[Active]->tqminimumSize() ); geometry = TQRect( TQPoint( 0, titleBarHeight ), size ); - deco[Active]->widget()->setGeometry( TQStyle::visualRect( geometry, this ) ); + deco[Active]->widget()->setGeometry( TQStyle::tqvisualRect( geometry, this ) ); // Resize the inactive window size = TQSize( width() - xoffset, height() - titleBarHeight ) - .expandedTo( deco[Inactive]->minimumSize() ); + .expandedTo( deco[Inactive]->tqminimumSize() ); geometry = TQRect( TQPoint( xoffset, 0 ), size ); - deco[Inactive]->widget()->setGeometry( TQStyle::visualRect( geometry, this ) ); + deco[Inactive]->widget()->setGeometry( TQStyle::tqvisualRect( geometry, this ) ); } void KDecorationPreview::setPreviewMask( const TQRegion& reg, int mode, bool active ) @@ -150,7 +150,7 @@ void KDecorationPreview::setPreviewMask( const TQRegion& reg, int mode, bool act } else { - TQMemArray< TQRect > rects = reg.rects(); + TQMemArray< TQRect > rects = reg.tqrects(); XRectangle* xrects = new XRectangle[ rects.count() ]; for( unsigned int i = 0; i < rects.count(); @@ -166,7 +166,7 @@ void KDecorationPreview::setPreviewMask( const TQRegion& reg, int mode, bool act delete[] xrects; } if( active ) - mask = reg; // keep shape of the active window for unobscuredRegion() + mask = reg; // keep tqshape of the active window for unobscuredRegion() } TQRect KDecorationPreview::windowGeometry( bool active ) const diff --git a/kwin/kcmkwin/kwindecoration/preview.h b/kwin/kcmkwin/kwindecoration/preview.h index 5604df587..2a753db69 100644 --- a/kwin/kcmkwin/kwindecoration/preview.h +++ b/kwin/kcmkwin/kwindecoration/preview.h @@ -30,7 +30,7 @@ class KDecorationPreviewBridge; class KDecorationPreviewOptions; class KDecorationPreview - : public QWidget + : public TQWidget { Q_OBJECT public: |