From b5d38fd2e94066885d4620b0c35c48a2faa5aa44 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:27:15 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1157637 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kwin-styles/cde/cdeclient.cpp | 178 +++++++++++++++++++------------------- kwin-styles/cde/cdeclient.h | 48 +++++----- kwin-styles/cde/config/config.cpp | 50 +++++------ kwin-styles/cde/config/config.h | 24 ++--- 4 files changed, 150 insertions(+), 150 deletions(-) (limited to 'kwin-styles/cde') diff --git a/kwin-styles/cde/cdeclient.cpp b/kwin-styles/cde/cdeclient.cpp index 9757ee87..6e2dd152 100644 --- a/kwin-styles/cde/cdeclient.cpp +++ b/kwin-styles/cde/cdeclient.cpp @@ -18,15 +18,15 @@ */ #include "cdeclient.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -114,9 +114,9 @@ static inline const KDecorationOptions* options() return KDecoration::options(); } -static void fixColorGroup(QColorGroup & colorGroup) +static void fixColorGroup(TQColorGroup & colorGroup) { - QColor light = colorGroup.light(); + TQColor light = colorGroup.light(); int hue, saturation, value; @@ -125,17 +125,17 @@ static void fixColorGroup(QColorGroup & colorGroup) if (value < 128) { light.setHsv(hue, saturation, 128); - colorGroup.setColor(QColorGroup::Light, light); + colorGroup.setColor(TQColorGroup::Light, light); } - QColor dark = colorGroup.dark(); + TQColor dark = colorGroup.dark(); dark.hsv(&hue, &saturation, &value); if (value < 84) { dark.setHsv(hue, saturation, 84); - colorGroup.setColor(QColorGroup::Dark, dark); + colorGroup.setColor(TQColorGroup::Dark, dark); } } @@ -156,7 +156,7 @@ static void readConfig(CdeClientFactory *f) coloredFrame = conf.readBoolEntry( "UseTitleBarBorderColors", true ); titlebarButtonMode = conf.readBoolEntry( "TitlebarButtonMode", true ); - QString value = conf.readEntry( "TextAlignment", "AlignHCenter" ); + TQString value = conf.readEntry( "TextAlignment", "AlignHCenter" ); if ( value == "AlignLeft" ) textAlignment = Qt::AlignLeft; else if ( value == "AlignHCenter" ) @@ -178,7 +178,7 @@ static void readConfig(CdeClientFactory *f) // Force button size to be in a reasonable range. // If the frame width is large, the button size must be large too. - s_buttonSize = QFontMetrics(options()->font( true )).height() + 2; + s_buttonSize = TQFontMetrics(options()->font( true )).height() + 2; if (s_buttonSize < 19) s_buttonSize = 19; if (s_buttonSize < s_frameWidth) s_buttonSize = s_frameWidth; s_buttonSize |= 1; // Be sure the button size is odd. @@ -248,11 +248,11 @@ bool CdeClientFactory::supports( Ability ability ) }; } -QValueList< CdeClientFactory::BorderSize > +TQValueList< CdeClientFactory::BorderSize > CdeClientFactory::borderSizes() const { // the list must be sorted - return QValueList< BorderSize >() << BorderTiny << BorderNormal << + return TQValueList< BorderSize >() << BorderTiny << BorderNormal << BorderLarge << BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized; } @@ -271,9 +271,9 @@ void CdeClient::init() widget()->setBackgroundMode(NoBackground); - mainLayout = new QVBoxLayout(widget()); - QBoxLayout* windowLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0); - titleLayout = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0); + mainLayout = new TQVBoxLayout(widget()); + TQBoxLayout* windowLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0); + titleLayout = new TQBoxLayout(0, TQBoxLayout::LeftToRight, 0, 0, 0); // TODO Check if this stuff can be simplified. // Border sizes are from a fixed set now. @@ -295,17 +295,17 @@ void CdeClient::init() mainLayout->addLayout( windowLayout, 1 ); if (isPreview()) - windowLayout->addWidget(new QLabel(i18n( + windowLayout->addWidget(new TQLabel(i18n( "
CDE preview
"), widget()), 1); else - windowLayout->addItem( new QSpacerItem( 0, 0 )); + windowLayout->addItem( new TQSpacerItem( 0, 0 )); for ( int i=0; i < BtnCount; i++ ) button[i] = NULL; addClientButtons( options()->titleButtonsLeft() ); - titlebar = new QSpacerItem( 10, 16, QSizePolicy::Expanding, QSizePolicy::Minimum ); + titlebar = new TQSpacerItem( 10, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); titleLayout->addItem( titlebar ); addClientButtons( options()->titleButtonsRight() ); @@ -314,7 +314,7 @@ void CdeClient::init() closing = false; } -void CdeClient::addClientButtons( const QString& s ) +void CdeClient::addClientButtons( const TQString& s ) { if ( s.length() > 0 ) for ( unsigned int i = 0; i < s.length(); i++ ) @@ -326,8 +326,8 @@ void CdeClient::addClientButtons( const QString& s ) if ( ! button[BtnMenu] ) { button[BtnMenu] = new CdeButton( this, "menu", BtnMenu, i18n("Menu"), LeftButton|RightButton ); - connect( button[BtnMenu], SIGNAL(pressed()), SLOT(menuButtonPressed()) ); - connect( button[BtnMenu], SIGNAL(released()), SLOT(menuButtonReleased()) ); + connect( button[BtnMenu], TQT_SIGNAL(pressed()), TQT_SLOT(menuButtonPressed()) ); + connect( button[BtnMenu], TQT_SIGNAL(released()), TQT_SLOT(menuButtonReleased()) ); titleLayout->addWidget( button[BtnMenu] ); } break; @@ -338,7 +338,7 @@ void CdeClient::addClientButtons( const QString& s ) { button[BtnHelp] = new CdeButton( this, "help", BtnHelp, i18n("Help") ); connect(button[BtnHelp], - SIGNAL(clicked()), SLOT(showContextHelp())); + TQT_SIGNAL(clicked()), TQT_SLOT(showContextHelp())); titleLayout->addWidget( button[BtnHelp] ); } break; @@ -349,7 +349,7 @@ void CdeClient::addClientButtons( const QString& s ) { button[BtnIconify] = new CdeButton( this, "iconify", BtnIconify, i18n("Minimize") ); connect(button[BtnIconify], - SIGNAL(clicked()), SLOT(minimize())); + TQT_SIGNAL(clicked()), TQT_SLOT(minimize())); titleLayout->addWidget( button[BtnIconify] ); } break; @@ -359,8 +359,8 @@ void CdeClient::addClientButtons( const QString& s ) if ( (! button[BtnMax] ) && isMaximizable() ) { button[BtnMax] = new CdeButton(this, "maximize", BtnMax, i18n("Maximize"), LeftButton|MidButton|RightButton); - connect(button[BtnMax], SIGNAL(clicked()), - SLOT(maximizeButtonClicked())); + connect(button[BtnMax], TQT_SIGNAL(clicked()), + TQT_SLOT(maximizeButtonClicked())); titleLayout->addWidget( button[BtnMax] ); } break; @@ -370,7 +370,7 @@ void CdeClient::addClientButtons( const QString& s ) if ( !button[BtnClose] && isCloseable()) { button[BtnClose] = new CdeButton(this, "close", BtnClose, i18n("Close")); - connect( button[BtnClose], SIGNAL( clicked()), SLOT(closeWindow()) ); + connect( button[BtnClose], TQT_SIGNAL( clicked()), TQT_SLOT(closeWindow()) ); titleLayout->addWidget( button[BtnClose] ); } // Add onAlldesktops button and spacers @@ -396,8 +396,8 @@ void CdeClient::maximizeChange() { if ( button[BtnMax] ) { bool m = maximizeMode() == MaximizeFull; - QToolTip::remove(button[BtnMax]); - QToolTip::add(button[BtnMax], m ? i18n("Restore") : i18n("Maximize")); + TQToolTip::remove(button[BtnMax]); + TQToolTip::add(button[BtnMax], m ? i18n("Restore") : i18n("Maximize")); button[BtnMax]->repaint(); } } @@ -410,7 +410,7 @@ void CdeClient::shadeChange() { } -void CdeClient::showEvent(QShowEvent *) +void CdeClient::showEvent(TQShowEvent *) { widget()->repaint(); } @@ -420,13 +420,13 @@ void CdeClient::desktopChange() // Nothing to do yet } -QSize CdeClient::minimumSize() const +TQSize CdeClient::minimumSize() const { - return QSize(2 * (s_buttonSize + s_frameWidth), + return TQSize(2 * (s_buttonSize + s_frameWidth), 2 * s_frameWidth + s_buttonSize); } -void CdeClient::resize(const QSize& s) +void CdeClient::resize(const TQSize& s) { widget()->resize(s); } @@ -440,21 +440,21 @@ void CdeClient::maximizeButtonClicked() void CdeClient::menuButtonPressed() { - static QTime* t = NULL; + static TQTime* t = NULL; static CdeClient* lastClient = NULL; if( t == NULL ) t = new QTime; - bool dbl = ( lastClient == this && t->elapsed() <= QApplication::doubleClickInterval()); + bool dbl = ( lastClient == this && t->elapsed() <= TQApplication::doubleClickInterval()); lastClient = this; t->start(); if( !dbl ) { - QRect menuRect = button[BtnMenu]->rect(); - QPoint menuTop = button[BtnMenu]->mapToGlobal(menuRect.topLeft()); - QPoint menuBottom = + TQRect menuRect = button[BtnMenu]->rect(); + TQPoint menuTop = button[BtnMenu]->mapToGlobal(menuRect.topLeft()); + TQPoint menuBottom = button[BtnMenu]->mapToGlobal(menuRect.bottomRight()); KDecorationFactory* f = factory(); - showWindowMenu(QRect(menuTop, menuBottom)); + showWindowMenu(TQRect(menuTop, menuBottom)); if( !f->exists( this )) // 'this' was deleted return; button[BtnMenu]->setDown(false); @@ -469,7 +469,7 @@ void CdeClient::menuButtonReleased() closeWindow(); } -void CdeClient::resizeEvent( QResizeEvent* e) +void CdeClient::resizeEvent( TQResizeEvent* e) { if (widget()->isVisibleToTLW()) { widget()->update(); @@ -488,22 +488,22 @@ void CdeClient::resizeEvent( QResizeEvent* e) if ( dx ) { widget()->update( width() - dx + 1, 0, dx, height() ); - widget()->update( QRect( QPoint(4,4), - titlebar->geometry().bottomLeft() - QPoint(1,0) ) ); - widget()->update(QRect(titlebar->geometry().topRight(), - QPoint(width() - 4, titlebar->geometry().bottom()))); + widget()->update( TQRect( TQPoint(4,4), + titlebar->geometry().bottomLeft() - TQPoint(1,0) ) ); + widget()->update(TQRect(titlebar->geometry().topRight(), + TQPoint(width() - 4, titlebar->geometry().bottom()))); // Titlebar needs no paint event - QApplication::postEvent( this, new QPaintEvent( titlebar->geometry(), false ) ); + TQApplication::postEvent( this, new TQPaintEvent( titlebar->geometry(), false ) ); } } } -void CdeClient::paintEvent( QPaintEvent* ) +void CdeClient::paintEvent( TQPaintEvent* ) { - QPainter p(widget()); + TQPainter p(widget()); - QColorGroup colorGroup; + TQColorGroup colorGroup; if ( coloredFrame ) colorGroup = options()->colorGroup( KDecoration::ColorTitleBar, isActive() ); @@ -512,8 +512,8 @@ void CdeClient::paintEvent( QPaintEvent* ) fixColorGroup( colorGroup ); - QRect trect = titlebar->geometry(); - QRect mrect = widget()->rect(); + TQRect trect = titlebar->geometry(); + TQRect mrect = widget()->rect(); if ( s_frameWidth > 0 ) { @@ -678,7 +678,7 @@ void CdeClient::paintEvent( QPaintEvent* ) } -KDecoration::Position CdeClient::mousePosition( const QPoint& p ) const +KDecoration::Position CdeClient::mousePosition( const TQPoint& p ) const { const int range = s_frameWidth + s_buttonSize; const int border = s_frameWidth + 1; @@ -710,19 +710,19 @@ KDecoration::Position CdeClient::mousePosition( const QPoint& p ) const return m; } -void CdeClient::mouseDoubleClickEvent( QMouseEvent * e ) +void CdeClient::mouseDoubleClickEvent( TQMouseEvent * e ) { if ( e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) ) titlebarDblClickOperation(); } -void CdeClient::wheelEvent( QWheelEvent * e ) +void CdeClient::wheelEvent( TQWheelEvent * e ) { if (isSetShade() || titleLayout->geometry().contains( e->pos() ) ) titlebarMouseWheelOperation( e->delta()); } -void CdeClient::mousePressEvent( QMouseEvent * e ) +void CdeClient::mousePressEvent( TQMouseEvent * e ) { if ( e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) ) { @@ -740,7 +740,7 @@ void CdeClient::borders(int &left, int &right, int &top, int &bottom) const top = s_buttonSize + s_frameWidth + 1; } -void CdeClient::mouseReleaseEvent( QMouseEvent * e ) +void CdeClient::mouseReleaseEvent( TQMouseEvent * e ) { if ( e->button() == LeftButton && titlebarPressed ) { @@ -749,28 +749,28 @@ void CdeClient::mouseReleaseEvent( QMouseEvent * e ) } } -bool CdeClient::eventFilter(QObject *o, QEvent *e) +bool CdeClient::eventFilter(TQObject *o, TQEvent *e) { if (o != widget()) return false; switch (e->type()) { - case QEvent::Resize: - resizeEvent(static_cast< QResizeEvent* >(e)); + case TQEvent::Resize: + resizeEvent(static_cast< TQResizeEvent* >(e)); return true; - case QEvent::Paint: - paintEvent(static_cast< QPaintEvent* >(e)); + case TQEvent::Paint: + paintEvent(static_cast< TQPaintEvent* >(e)); return true; - case QEvent::MouseButtonDblClick: - mouseDoubleClickEvent(static_cast< QMouseEvent* >(e)); + case TQEvent::MouseButtonDblClick: + mouseDoubleClickEvent(static_cast< TQMouseEvent* >(e)); return true; - case QEvent::MouseButtonPress: - processMousePressEvent(static_cast< QMouseEvent* >(e)); + case TQEvent::MouseButtonPress: + processMousePressEvent(static_cast< TQMouseEvent* >(e)); return true; - case QEvent::Show: - showEvent(static_cast< QShowEvent* >(e)); + case TQEvent::Show: + showEvent(static_cast< TQShowEvent* >(e)); return true; - case QEvent::Wheel: - wheelEvent( static_cast< QWheelEvent* >( e )); + case TQEvent::Wheel: + wheelEvent( static_cast< TQWheelEvent* >( e )); return true; default: break; @@ -781,16 +781,16 @@ bool CdeClient::eventFilter(QObject *o, QEvent *e) // --------------------------------------- CdeButton::CdeButton(CdeClient* parent, - const char* name, int btnType, const QString& tip, int realize_btns) - : QButton(parent->widget(), name), m_btnType(btnType), last_button(NoButton) + const char* name, int btnType, const TQString& tip, int realize_btns) + : TQButton(parent->widget(), name), m_btnType(btnType), last_button(NoButton) { - setBackgroundMode( QWidget::NoBackground ); + setBackgroundMode( TQWidget::NoBackground ); setFixedSize( s_buttonSize, s_buttonSize ); resize( s_buttonSize, s_buttonSize ); m_parent = parent; setCursor(ArrowCursor); - QToolTip::add(this, tip); + TQToolTip::add(this, tip); m_realize_buttons = realize_btns; } @@ -800,12 +800,12 @@ void CdeButton::reset() repaint( false ); } -void CdeButton::drawButton( QPainter* p ) +void CdeButton::drawButton( TQPainter* p ) { p->setBrush( options()->color( KDecoration::ColorTitleBar, m_parent->isActive() ) ); p->drawRect( 0, 0, s_buttonSize, s_buttonSize ); - QColorGroup colorGroup = + TQColorGroup colorGroup = options()->colorGroup( KDecoration::ColorTitleBar, m_parent->isActive() ); fixColorGroup(colorGroup); @@ -820,9 +820,9 @@ void CdeButton::drawButton( QPainter* p ) break; case (BtnHelp): p->setPen( colorGroup.light() ); - p->drawLineSegments( QPointArray(16, helpLLines) ); + p->drawLineSegments( TQPointArray(16, helpLLines) ); p->setPen( colorGroup.dark() ); - p->drawLineSegments( QPointArray(14, helpDLines) ); + p->drawLineSegments( TQPointArray(14, helpDLines) ); break; case (BtnIconify): qDrawShadePanel( p, s_o2, s_o2, s_w2, s_w2, colorGroup ); @@ -833,27 +833,27 @@ void CdeButton::drawButton( QPainter* p ) break; case (BtnClose): p->setPen( colorGroup.dark() ); - p->drawLineSegments( QPointArray(18, closeDLines) ); + p->drawLineSegments( TQPointArray(18, closeDLines) ); p->setPen( colorGroup.light() ); - p->drawLineSegments( QPointArray(15, closeLLines) ); + p->drawLineSegments( TQPointArray(15, closeLLines) ); break; } } -void CdeButton::mousePressEvent(QMouseEvent *e) +void CdeButton::mousePressEvent(TQMouseEvent *e) { last_button = e->button(); - QMouseEvent me(e->type(), e->pos(), + TQMouseEvent me(e->type(), e->pos(), e->globalPos(), (e->button()&m_realize_buttons)?LeftButton:NoButton, e->state()); - QButton::mousePressEvent(&me); + TQButton::mousePressEvent(&me); } -void CdeButton::mouseReleaseEvent(QMouseEvent * e) +void CdeButton::mouseReleaseEvent(TQMouseEvent * e) { last_button = e->button(); - QMouseEvent me(e->type(), e->pos(), + TQMouseEvent me(e->type(), e->pos(), e->globalPos(), (e->button()&m_realize_buttons)?LeftButton:NoButton, e->state()); - QButton::mouseReleaseEvent(&me); + TQButton::mouseReleaseEvent(&me); } } // CDE namespace diff --git a/kwin-styles/cde/cdeclient.h b/kwin-styles/cde/cdeclient.h index 40e8f2eb..071c41ff 100644 --- a/kwin-styles/cde/cdeclient.h +++ b/kwin-styles/cde/cdeclient.h @@ -18,8 +18,8 @@ #ifndef __CDECLIENT_H #define __CDECLIENT_H -#include -#include +#include +#include #include #include #include @@ -39,14 +39,14 @@ class CdeButton : public QButton { public: CdeButton( CdeClient* parent=0, const char* name=0, int btnType=0, - const QString& tip=NULL, int realize_btns = LeftButton ); + const TQString& tip=NULL, int realize_btns = LeftButton ); void reset(); ButtonState lastButton() { return last_button; } protected: - void mousePressEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); - virtual void drawButton(QPainter *p); + void mousePressEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); + virtual void drawButton(TQPainter *p); private: CdeClient *m_parent; @@ -64,26 +64,26 @@ public: void init(); protected: - bool eventFilter(QObject *o, QEvent *e); - void resizeEvent( QResizeEvent* ); - void paintEvent( QPaintEvent* ); - - void showEvent(QShowEvent *); - void addClientButtons( const QString& ); - void mouseDoubleClickEvent( QMouseEvent* ); - void wheelEvent( QWheelEvent * ); + bool eventFilter(TQObject *o, TQEvent *e); + void resizeEvent( TQResizeEvent* ); + void paintEvent( TQPaintEvent* ); + + void showEvent(TQShowEvent *); + void addClientButtons( const TQString& ); + void mouseDoubleClickEvent( TQMouseEvent* ); + void wheelEvent( TQWheelEvent * ); void captionChange(); void desktopChange(); void activeChange(); void shadeChange(); void iconChange(); - QSize minimumSize() const; - void resize(const QSize &size); + TQSize minimumSize() const; + void resize(const TQSize &size); void borders(int &left, int &right, int &top, int &bottom) const; - void mousePressEvent( QMouseEvent* ); - void mouseReleaseEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); + void mouseReleaseEvent( TQMouseEvent* ); void maximizeChange(); - Position mousePosition( const QPoint& p ) const; + Position mousePosition( const TQPoint& p ) const; protected slots: void menuButtonPressed(); @@ -92,14 +92,14 @@ protected slots: private: CdeButton* button[BtnCount]; - QVBoxLayout* mainLayout; - QBoxLayout* titleLayout; - QSpacerItem* titlebar; + TQVBoxLayout* mainLayout; + TQBoxLayout* titleLayout; + TQSpacerItem* titlebar; bool titlebarPressed; bool closing; }; -class CdeClientFactory: public QObject, public KDecorationFactory +class CdeClientFactory: public TQObject, public KDecorationFactory { public: CdeClientFactory(); @@ -108,7 +108,7 @@ public: virtual bool supports( Ability ability ); virtual bool reset(unsigned long changed); - QValueList< CdeClientFactory::BorderSize > borderSizes() const; + TQValueList< CdeClientFactory::BorderSize > borderSizes() const; }; diff --git a/kwin-styles/cde/config/config.cpp b/kwin-styles/cde/config/config.cpp index 5c3ac455..e9e49df0 100644 --- a/kwin-styles/cde/config/config.cpp +++ b/kwin-styles/cde/config/config.cpp @@ -2,11 +2,11 @@ #include "config.h" #include #include -#include -#include +#include +#include #include -extern "C" KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent ) +extern "C" KDE_EXPORT TQObject* allocate_config( KConfig* conf, TQWidget* parent ) { return new CdeConfig(conf, parent); } @@ -16,36 +16,36 @@ extern "C" KDE_EXPORT QObject* allocate_config( KConfig* conf, QWidget* parent ) * 'conf' is a pointer to the kwindecoration modules open kwin config, * and is by default set to the "Style" group. * - * 'parent' is the parent of the QObject, which is a VBox inside the + * 'parent' is the parent of the TQObject, which is a VBox inside the * Configure tab in kwindecoration */ -CdeConfig::CdeConfig( KConfig* conf, QWidget* parent ) - : QObject( parent ) +CdeConfig::CdeConfig( KConfig* conf, TQWidget* parent ) + : TQObject( parent ) { cdeConfig = new KConfig("kwincderc"); KGlobal::locale()->insertCatalogue("kwin_art_clients"); - groupBox = new QVBox( parent ); + groupBox = new TQVBox( parent ); - bgAlign = new QButtonGroup( 3, Qt::Horizontal, i18n("Text &Alignment"), groupBox ); + bgAlign = new TQButtonGroup( 3, Qt::Horizontal, i18n("Text &Alignment"), groupBox ); bgAlign->setExclusive( true ); - QWhatsThis::add( bgAlign, i18n("Use these buttons to set the alignment of the titlebar caption text.") ); - new QRadioButton( i18n("Left"), bgAlign, "AlignLeft" ); - QRadioButton *radio2 = new QRadioButton( i18n("Centered"), bgAlign, "AlignHCenter" ); + TQWhatsThis::add( bgAlign, i18n("Use these buttons to set the alignment of the titlebar caption text.") ); + new TQRadioButton( i18n("Left"), bgAlign, "AlignLeft" ); + TQRadioButton *radio2 = new TQRadioButton( i18n("Centered"), bgAlign, "AlignHCenter" ); radio2->setChecked( true ); - new QRadioButton( i18n("Right"), bgAlign, "AlignRight" ); + new TQRadioButton( i18n("Right"), bgAlign, "AlignRight" ); - cbColorBorder = new QCheckBox( i18n("Draw window frames using &titlebar colors"), groupBox ); - QWhatsThis::add( cbColorBorder, i18n("When selected, the window decoration borders " + cbColorBorder = new TQCheckBox( i18n("Draw window frames using &titlebar colors"), groupBox ); + TQWhatsThis::add( cbColorBorder, i18n("When selected, the window decoration borders " "are drawn using the titlebar colors. Otherwise, they are " "drawn using normal border colors instead.") ); -// cbTitlebarButton = new QCheckBox( i18n("Titlebar acts like a &pushbutton when clicked"), groupBox ); -// QWhatsThis::add( cbTitlebarButton, i18n("When selected, this option causes the window titlebar to behave " +// cbTitlebarButton = new TQCheckBox( i18n("Titlebar acts like a &pushbutton when clicked"), groupBox ); +// TQWhatsThis::add( cbTitlebarButton, i18n("When selected, this option causes the window titlebar to behave " // "as if it was a pushbutton when you click it to move the window.") ); - (void) new QLabel( i18n("Tip: If you want the look of the original Motif(tm) Window Manager,\n" + (void) new TQLabel( i18n("Tip: If you want the look of the original Motif(tm) Window Manager,\n" "click the \"Buttons\" tab above and remove the help\n" "and close buttons from the titlebar."), groupBox ); @@ -53,9 +53,9 @@ CdeConfig::CdeConfig( KConfig* conf, QWidget* parent ) load( conf ); // Ensure we track user changes properly - connect( cbColorBorder, SIGNAL(clicked()), SLOT(slotSelectionChanged()) ); -// connect( cbTitlebarButton, SIGNAL(clicked()), SLOT(slotSelectionChanged()) ); - connect( bgAlign, SIGNAL(clicked(int)), SLOT(slotSelectionChanged(int)) ); + connect( cbColorBorder, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); +// connect( cbTitlebarButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectionChanged()) ); + connect( bgAlign, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotSelectionChanged(int)) ); // Make the widgets visible in kwindecoration groupBox->show(); @@ -86,8 +86,8 @@ void CdeConfig::load( KConfig* /*conf*/ ) { cdeConfig->setGroup("General"); - QString value = cdeConfig->readEntry( "TextAlignment", "AlignHCenter" ); - QRadioButton *button = (QRadioButton*)bgAlign->child( (const char *)value.latin1() ); + TQString value = cdeConfig->readEntry( "TextAlignment", "AlignHCenter" ); + TQRadioButton *button = (TQRadioButton*)bgAlign->child( (const char *)value.latin1() ); if ( button ) button->setChecked( true ); @@ -104,9 +104,9 @@ void CdeConfig::save( KConfig* /*conf*/ ) { cdeConfig->setGroup("General"); - QRadioButton *button = (QRadioButton*)bgAlign->selected(); + TQRadioButton *button = (TQRadioButton*)bgAlign->selected(); if ( button ) - cdeConfig->writeEntry( "TextAlignment", QString(button->name()) ); + cdeConfig->writeEntry( "TextAlignment", TQString(button->name()) ); cdeConfig->writeEntry( "UseTitleBarBorderColors", cbColorBorder->isChecked() ); // cdeConfig->writeEntry( "TitlebarButtonMode", cbTitlebarButton->isChecked() ); @@ -119,7 +119,7 @@ void CdeConfig::save( KConfig* /*conf*/ ) // Sets UI widget defaults which must correspond to style defaults void CdeConfig::defaults() { - QRadioButton *button = (QRadioButton*)bgAlign->child( "AlignHCenter" ); + TQRadioButton *button = (TQRadioButton*)bgAlign->child( "AlignHCenter" ); if ( button ) button->setChecked( true ); diff --git a/kwin-styles/cde/config/config.h b/kwin-styles/cde/config/config.h index 723d7b95..c9a6c528 100644 --- a/kwin-styles/cde/config/config.h +++ b/kwin-styles/cde/config/config.h @@ -1,12 +1,12 @@ #ifndef __KDE_CDECONFIG_H #define __KDE_CDECONFIG_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include class QCheckBox; @@ -20,7 +20,7 @@ class CdeConfig: public QObject Q_OBJECT public: - CdeConfig( KConfig* conf, QWidget* parent ); + CdeConfig( KConfig* conf, TQWidget* parent ); ~CdeConfig(); // These public signals/slots work similar to KCM modules @@ -38,11 +38,11 @@ class CdeConfig: public QObject private: KConfig* cdeConfig; - QCheckBox* cbColorBorder; -// QCheckBox* cbTitlebarButton; - QHBox* groupBox; - QGroupBox* gbSlider; - QButtonGroup* bgAlign; + TQCheckBox* cbColorBorder; +// TQCheckBox* cbTitlebarButton; + TQHBox* groupBox; + TQGroupBox* gbSlider; + TQButtonGroup* bgAlign; }; -- cgit v1.2.1