diff options
Diffstat (limited to 'tdeui')
289 files changed, 2658 insertions, 2682 deletions
diff --git a/tdeui/about/top-left.png b/tdeui/about/top-left.png Binary files differindex b4d4ed605..71756a276 100644..100755 --- a/tdeui/about/top-left.png +++ b/tdeui/about/top-left.png diff --git a/tdeui/abouttde.png b/tdeui/abouttde.png Binary files differindex c93fd248c..e2061e967 100644..100755 --- a/tdeui/abouttde.png +++ b/tdeui/abouttde.png diff --git a/tdeui/kaboutdialog_private.h b/tdeui/kaboutdialog_private.h index 7a6245a81..057e8a6c1 100644 --- a/tdeui/kaboutdialog_private.h +++ b/tdeui/kaboutdialog_private.h @@ -34,7 +34,7 @@ class TQVBoxLayout; */ class KImageTrackLabel : public TQLabel { - Q_OBJECT + TQ_OBJECT public: enum MouseMode @@ -68,7 +68,7 @@ class TDEAboutContainerBasePrivate; */ class TDEAboutContainerBase : public TQWidget { - Q_OBJECT + TQ_OBJECT public: enum LayoutType diff --git a/tdeui/kactivelabel.cpp b/tdeui/kactivelabel.cpp index 0e5abc5ad..5f3362067 100644 --- a/tdeui/kactivelabel.cpp +++ b/tdeui/kactivelabel.cpp @@ -44,23 +44,23 @@ void KActiveLabel::init() setVScrollBarMode(TQScrollView::AlwaysOff); setHScrollBarMode(TQScrollView::AlwaysOff); setFrameStyle(TQFrame::NoFrame); - setFocusPolicy( TQ_TabFocus ); + setFocusPolicy( TQWidget::TabFocus ); paletteChanged(); - connect(this, TQT_SIGNAL(linkClicked(const TQString &)), - this, TQT_SLOT(openLink(const TQString &))); - if (kapp) + connect(this, TQ_SIGNAL(linkClicked(const TQString &)), + this, TQ_SLOT(openLink(const TQString &))); + if (tdeApp) { - connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), - this, TQT_SLOT(paletteChanged())); + connect(tdeApp, TQ_SIGNAL(tdedisplayPaletteChanged()), + this, TQ_SLOT(paletteChanged())); } } void KActiveLabel::paletteChanged() { - TQPalette p = kapp ? kapp->palette() : palette(); - p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background)); - p.setColor(TQColorGroup::Text, p.color(TQPalette::Normal, TQColorGroup::Foreground)); + TQPalette p = tdeApp ? tdeApp->palette() : palette(); + p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Active, TQColorGroup::Background)); + p.setColor(TQColorGroup::Text, p.color(TQPalette::Active, TQColorGroup::Foreground)); setPalette(p); } @@ -74,7 +74,7 @@ void KActiveLabel::openLink(const TQString & link) TQStringList args; args << "exec" << link; - kapp->tdeinitExec("kfmclient", args); + tdeApp->tdeinitExec("kfmclient", args); } void KActiveLabel::virtual_hook( int, void* ) diff --git a/tdeui/kactivelabel.h b/tdeui/kactivelabel.h index 5832a4fa1..9f49dd05c 100644 --- a/tdeui/kactivelabel.h +++ b/tdeui/kactivelabel.h @@ -36,7 +36,7 @@ class KActiveLabelPrivate; */ class TDEUI_EXPORT KActiveLabel : public TQTextBrowser { - Q_OBJECT + TQ_OBJECT public: /** * Constructor. diff --git a/tdeui/kanimwidget.cpp b/tdeui/kanimwidget.cpp index 1805714f2..25a0b6847 100644 --- a/tdeui/kanimwidget.cpp +++ b/tdeui/kanimwidget.cpp @@ -43,10 +43,10 @@ KAnimWidget::KAnimWidget( const TQString& icons, int size, TQWidget *parent, : TQFrame( parent, name ), d( new KAnimWidgetPrivate ) { - connect( &d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimerUpdate())); + connect( &d->timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotTimerUpdate())); if (parent && parent->inherits( "TDEToolBar" )) - connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(updateIcons())); + connect(parent, TQ_SIGNAL(modechange()), this, TQ_SLOT(updateIcons())); d->loadingCompleted = false; d->size = size; @@ -140,7 +140,7 @@ void KAnimWidget::mousePressEvent( TQMouseEvent *e ) void KAnimWidget::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e->button() == Qt::LeftButton && + if ( e->button() == TQt::LeftButton && rect().contains( e->pos() ) ) emit clicked(); diff --git a/tdeui/kanimwidget.h b/tdeui/kanimwidget.h index 77abf837a..046522d01 100644 --- a/tdeui/kanimwidget.h +++ b/tdeui/kanimwidget.h @@ -54,7 +54,7 @@ class KAnimWidgetPrivate; */ class TDEUI_EXPORT KAnimWidget : public TQFrame { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int size READ size WRITE setSize ) TQ_PROPERTY( TQString icons READ icons WRITE setIcons ) diff --git a/tdeui/karrowbutton.cpp b/tdeui/karrowbutton.cpp index 4dbbe5bab..c02e4a028 100644 --- a/tdeui/karrowbutton.cpp +++ b/tdeui/karrowbutton.cpp @@ -24,10 +24,10 @@ class KArrowButtonPrivate { public: - Qt::ArrowType arrow; + TQt::ArrowType arrow; }; -KArrowButton::KArrowButton(TQWidget *parent, Qt::ArrowType arrow, +KArrowButton::KArrowButton(TQWidget *parent, TQt::ArrowType arrow, const char *name) : TQPushButton(parent, name) { @@ -45,14 +45,14 @@ TQSize KArrowButton::sizeHint() const return TQSize( 12, 12 ); } -void KArrowButton::setArrowType(Qt::ArrowType a) +void KArrowButton::setArrowType(TQt::ArrowType a) { if (d->arrow != a) { d->arrow = a; repaint(); } } -Qt::ArrowType KArrowButton::arrowType() const +TQt::ArrowType KArrowButton::arrowType() const { return d->arrow; } @@ -63,7 +63,7 @@ void KArrowButton::drawButton(TQPainter *p) const unsigned int margin = 2; p->fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) ); - style().tqdrawPrimitive( TQStyle::PE_Panel, p, TQRect( 0, 0, width(), height() ), + style().drawPrimitive( TQStyle::PE_Panel, p, TQRect( 0, 0, width(), height() ), colorGroup(), isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Default, TQStyleOption( 2, 0 ) ); @@ -95,15 +95,15 @@ void KArrowButton::drawButton(TQPainter *p) TQStyle::PrimitiveElement e = TQStyle::PE_ArrowLeft; switch (d->arrow) { - case Qt::LeftArrow: e = TQStyle::PE_ArrowLeft; break; - case Qt::RightArrow: e = TQStyle::PE_ArrowRight; break; - case Qt::UpArrow: e = TQStyle::PE_ArrowUp; break; - case Qt::DownArrow: e = TQStyle::PE_ArrowDown; break; + case TQt::LeftArrow: e = TQStyle::PE_ArrowLeft; break; + case TQt::RightArrow: e = TQStyle::PE_ArrowRight; break; + case TQt::UpArrow: e = TQStyle::PE_ArrowUp; break; + case TQt::DownArrow: e = TQStyle::PE_ArrowDown; break; } int flags = TQStyle::Style_Enabled; if ( isDown() ) flags |= TQStyle::Style_Down; - style().tqdrawPrimitive( e, p, TQRect( TQPoint( x, y ), TQSize( arrowSize, arrowSize ) ), + style().drawPrimitive( e, p, TQRect( TQPoint( x, y ), TQSize( arrowSize, arrowSize ) ), colorGroup(), flags ); } diff --git a/tdeui/karrowbutton.h b/tdeui/karrowbutton.h index c490c8aab..a1843ad18 100644 --- a/tdeui/karrowbutton.h +++ b/tdeui/karrowbutton.h @@ -37,7 +37,7 @@ class KArrowButtonPrivate; */ class TDEUI_EXPORT KArrowButton : public TQPushButton { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int arrowType READ arrowTp WRITE setArrowTp ) public: @@ -48,7 +48,7 @@ class TDEUI_EXPORT KArrowButton : public TQPushButton * @param arrow The direction the arrrow should be pointing in * @param name An internal name for this widget */ - KArrowButton(TQWidget *parent = 0, Qt::ArrowType arrow = Qt::UpArrow, + KArrowButton(TQWidget *parent = 0, TQt::ArrowType arrow = TQt::UpArrow, const char *name = 0); /** @@ -65,11 +65,11 @@ class TDEUI_EXPORT KArrowButton : public TQPushButton * Returns the arrow type * @since 3.4 */ - Qt::ArrowType arrowType() const; + TQt::ArrowType arrowType() const; // hacks for moc braindamages with enums int arrowTp() const { return (int) arrowType(); } - void setArrowTp( int tp ) { setArrowType( (Qt::ArrowType) tp ); } + void setArrowTp( int tp ) { setArrowType( (TQt::ArrowType) tp ); } public slots: /** * Defines in what direction the arrow is pointing to. Will repaint the @@ -77,7 +77,7 @@ class TDEUI_EXPORT KArrowButton : public TQPushButton * * @param a The direction this arrow should be pointing in */ - void setArrowType(Qt::ArrowType a); + void setArrowType(TQt::ArrowType a); protected: /** diff --git a/tdeui/kauthicon.h b/tdeui/kauthicon.h index 3aad21dba..697182483 100644 --- a/tdeui/kauthicon.h +++ b/tdeui/kauthicon.h @@ -46,7 +46,7 @@ class KAuthIconPrivate; */ class TDEUI_EXPORT KAuthIcon : public TQWidget { - Q_OBJECT + TQ_OBJECT public: /** @@ -102,7 +102,7 @@ class KRootPermsIconPrivate; */ class TDEUI_EXPORT KRootPermsIcon : public KAuthIcon { - Q_OBJECT + TQ_OBJECT public: KRootPermsIcon(TQWidget *parent = 0, const char *name = 0); @@ -134,7 +134,7 @@ class KWritePermsIconPrivate; */ class TDEUI_EXPORT KWritePermsIcon : public KAuthIcon { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName ) public: diff --git a/tdeui/kbugreport.cpp b/tdeui/kbugreport.cpp index 44243715d..a99f44020 100644 --- a/tdeui/kbugreport.cpp +++ b/tdeui/kbugreport.cpp @@ -33,8 +33,8 @@ #include <klineedit.h> #include <tdelocale.h> #include <tdemessagebox.h> -#include <kprocess.h> -#include <kstandarddirs.h> +#include <tdeprocess.h> +#include <tdestandarddirs.h> #include <kstdguiitem.h> #include <kurl.h> #include <kurllabel.h> @@ -120,9 +120,9 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const TDEAboutData *abou // Configure email button m_configureEmail = new TQPushButton( i18n("Configure Email..."), parent ); - connect( m_configureEmail, TQT_SIGNAL( clicked() ), this, - TQT_SLOT( slotConfigureEmail() ) ); - glay->addMultiCellWidget( m_configureEmail, 0, 2, 2, 2, (TQ_Alignment)(AlignTop|AlignRight) ); + connect( m_configureEmail, TQ_SIGNAL( clicked() ), this, + TQ_SLOT( slotConfigureEmail() ) ); + glay->addMultiCellWidget( m_configureEmail, 0, 2, 2, 2, TQt::AlignTop|TQt::AlignRight ); // To qwtstr = i18n( "The email address this bug report is sent to." ); @@ -152,7 +152,7 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const TDEAboutData *abou d->appcombo = new KComboBox( false, parent, "app"); TQWhatsThis::add( d->appcombo, qwtstr ); d->appcombo->insertStrList((const char**)packages); - connect(d->appcombo, TQT_SIGNAL(activated(int)), TQT_SLOT(appChanged(int))); + connect(d->appcombo, TQ_SIGNAL(activated(int)), TQ_SLOT(appChanged(int))); d->appname = TQString::fromLatin1( m_aboutData ? m_aboutData->productName() : tqApp->name() ); @@ -241,7 +241,7 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const TDEAboutData *abou lay->addWidget( label ); // The multiline-edit - m_lineedit = new TQMultiLineEdit( parent, TQMULTILINEEDIT_OBJECT_NAME_STRING ); + m_lineedit = new TQMultiLineEdit( parent, "TQMultiLineEdit" ); m_lineedit->setMinimumHeight( 180 ); // make it big m_lineedit->setWordWrap(TQMultiLineEdit::WidgetWidth); lay->addWidget( m_lineedit, 10 /*stretch*/ ); @@ -272,8 +272,8 @@ KBugReport::KBugReport( TQWidget * parentw, bool modal, const TDEAboutData *abou lay->addWidget( d->submitBugButton ); lay->addSpacing(10); - connect( d->submitBugButton, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotOk())); + connect( d->submitBugButton, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotOk())); } } @@ -321,7 +321,7 @@ void KBugReport::slotConfigureEmail() if (m_process) return; m_process = new TDEProcess; *m_process << TQString::fromLatin1("tdecmshell") << TQString::fromLatin1("kcm_useraccount"); - connect(m_process, TQT_SIGNAL(processExited(TDEProcess *)), TQT_SLOT(slotSetFrom())); + connect(m_process, TQ_SIGNAL(processExited(TDEProcess *)), TQ_SLOT(slotSetFrom())); if (!m_process->start()) { kdDebug() << "Couldn't start tdecmshell.." << endl; @@ -363,8 +363,8 @@ void KBugReport::slotSetFrom() void KBugReport::slotUrlClicked(const TQString &urlText) { - if ( kapp ) - kapp->invokeBrowser( urlText ); + if ( tdeApp ) + tdeApp->invokeBrowser( urlText ); // When using the web form, a click can also close the window, as there's // not much to do. It also gives the user a direct response to his click: @@ -376,8 +376,8 @@ void KBugReport::slotUrlClicked(const TQString &urlText) void KBugReport::slotOk( void ) { if ( d->submitBugButton ) { - if ( kapp ) - kapp->invokeBrowser( d->url.url() ); + if ( tdeApp ) + tdeApp->invokeBrowser( d->url.url() ); return; } diff --git a/tdeui/kbugreport.h b/tdeui/kbugreport.h index 3110d3dd6..3720f7031 100644 --- a/tdeui/kbugreport.h +++ b/tdeui/kbugreport.h @@ -42,7 +42,7 @@ class KBugReportPrivate; */ class TDEUI_EXPORT KBugReport : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** * Creates a bug-report dialog. diff --git a/tdeui/kbuttonbox.cpp b/tdeui/kbuttonbox.cpp index faa26e95e..54329412e 100644 --- a/tdeui/kbuttonbox.cpp +++ b/tdeui/kbuttonbox.cpp @@ -130,7 +130,7 @@ KButtonBox::addButton( TQPushButton * pb = addButton(text, noexpand); if ((0 != receiver) && (0 != slot)) - TQObject::connect(pb, TQT_SIGNAL(clicked()), receiver, slot); + TQObject::connect(pb, TQ_SIGNAL(clicked()), receiver, slot); return pb; } @@ -146,7 +146,7 @@ KButtonBox::addButton( TQPushButton * pb = addButton(guiitem, noexpand); if ((0 != receiver) && (0 != slot)) - TQObject::connect(pb, TQT_SIGNAL(clicked()), receiver, slot); + TQObject::connect(pb, TQ_SIGNAL(clicked()), receiver, slot); return pb; } @@ -183,7 +183,7 @@ void KButtonBox::layout() { void KButtonBox::placeButtons() { - if(data->orientation == Qt::Horizontal) { + if(data->orientation == TQt::Horizontal) { // calculate free size and stretches int fs = width() - 2 * data->border; int stretch = 0; @@ -323,7 +323,7 @@ TQSize KButtonBox::sizeHint() const { else s = bs; - if(data->orientation == Qt::Horizontal) + if(data->orientation == TQt::Horizontal) dw += s.width(); else dw += s.height(); @@ -335,7 +335,7 @@ TQSize KButtonBox::sizeHint() const { ++itr; } - if(data->orientation == Qt::Horizontal) + if(data->orientation == TQt::Horizontal) return TQSize(dw, bs.height() + 2 * data->border); else return TQSize(bs.width() + 2 * data->border, dw); @@ -344,7 +344,7 @@ TQSize KButtonBox::sizeHint() const { TQSizePolicy KButtonBox::sizePolicy() const { - return data->orientation == Qt::Horizontal? + return data->orientation == TQt::Horizontal? TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) : TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ); } diff --git a/tdeui/kbuttonbox.h b/tdeui/kbuttonbox.h index 6044bdb53..5e0ce32fa 100644 --- a/tdeui/kbuttonbox.h +++ b/tdeui/kbuttonbox.h @@ -41,7 +41,7 @@ class KButtonBoxPrivate; class TDEUI_EXPORT KButtonBox : public TQWidget { - Q_OBJECT + TQ_OBJECT public: /** @@ -51,7 +51,7 @@ public: * addButton() are laid out from top to bottom, otherwise they * are laid out from left to right. */ - KButtonBox(TQWidget *parent, Orientation _orientation = Qt::Horizontal, + KButtonBox(TQWidget *parent, Orientation _orientation = TQt::Horizontal, int border = 0, int _autoborder = 6); /** diff --git a/tdeui/kcharselect.cpp b/tdeui/kcharselect.cpp index 5561e5883..064e905d2 100644 --- a/tdeui/kcharselect.cpp +++ b/tdeui/kcharselect.cpp @@ -78,7 +78,7 @@ KCharSelectTable::KCharSelectTable( TQWidget *parent, const char *name, const TQ setToolTips(); - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); setBackgroundMode( TQWidget::NoBackground ); } @@ -173,7 +173,7 @@ void KCharSelectTable::paintCell( class TQPainter* p, int row, int col ) } if ( c == focusItem.unicode() && hasFocus() ) { - style().tqdrawPrimitive( TQStyle::PE_FocusRect, p, TQRect( 2, 2, w - 4, h - 4 ), + style().drawPrimitive( TQStyle::PE_FocusRect, p, TQRect( 2, 2, w - 4, h - 4 ), colorGroup() ); focusPos = TQPoint( col, row ); } @@ -382,32 +382,32 @@ KCharSelect::KCharSelect( TQWidget *parent, const char *name, const TQString &_f TQLabel* const lFont = new TQLabel( i18n( "Font:" ), bar ); lFont->resize( lFont->sizeHint() ); - lFont->setAlignment( Qt::AlignRight | Qt::AlignVCenter ); + lFont->setAlignment( TQt::AlignRight | TQt::AlignVCenter ); lFont->setMaximumWidth( lFont->sizeHint().width() ); fontCombo = new TQComboBox( true, bar ); fillFontCombo(); fontCombo->resize( fontCombo->sizeHint() ); - connect( fontCombo, TQT_SIGNAL( activated( const TQString & ) ), this, TQT_SLOT( fontSelected( const TQString & ) ) ); + connect( fontCombo, TQ_SIGNAL( activated( const TQString & ) ), this, TQ_SLOT( fontSelected( const TQString & ) ) ); TQLabel* const lTable = new TQLabel( i18n( "Table:" ), bar ); lTable->resize( lTable->sizeHint() ); - lTable->setAlignment( Qt::AlignRight | Qt::AlignVCenter ); + lTable->setAlignment( TQt::AlignRight | TQt::AlignVCenter ); lTable->setMaximumWidth( lTable->sizeHint().width() ); tableSpinBox = new TQSpinBox( 0, 255, 1, bar ); tableSpinBox->resize( tableSpinBox->sizeHint() ); - connect( tableSpinBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( tableChanged( int ) ) ); + connect( tableSpinBox, TQ_SIGNAL( valueChanged( int ) ), this, TQ_SLOT( tableChanged( int ) ) ); TQLabel* const lUnicode = new TQLabel( i18n( "&Unicode code point:" ), bar ); lUnicode->resize( lUnicode->sizeHint() ); - lUnicode->setAlignment( Qt::AlignRight | Qt::AlignVCenter ); + lUnicode->setAlignment( TQt::AlignRight | TQt::AlignVCenter ); lUnicode->setMaximumWidth( lUnicode->sizeHint().width() ); const TQRegExp rx( "[a-fA-F0-9]{1,4}" ); - TQValidator* const validator = new TQRegExpValidator( rx, TQT_TQOBJECT(this) ); + TQValidator* const validator = new TQRegExpValidator( rx, this ); d->unicodeLine = new KLineEdit( bar ); d->unicodeLine->setValidator(validator); @@ -415,7 +415,7 @@ KCharSelect::KCharSelect( TQWidget *parent, const char *name, const TQString &_f d->unicodeLine->resize( d->unicodeLine->sizeHint() ); slotUpdateUnicode(_chr); - connect( d->unicodeLine, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotUnicodeEntered() ) ); + connect( d->unicodeLine, TQ_SIGNAL( returnPressed() ), this, TQ_SLOT( slotUnicodeEntered() ) ); charTable = new KCharSelectTable( this, name, _font.isEmpty() ? TQString(TQVBox::font().family()) : _font, _chr, _tableNum ); const TQSize sz( charTable->contentsWidth() + 4 , @@ -429,20 +429,20 @@ KCharSelect::KCharSelect( TQWidget *parent, const char *name, const TQString &_f setFont( _font.isEmpty() ? TQString(TQVBox::font().family()) : _font ); setTableNum( _tableNum ); - connect( charTable, TQT_SIGNAL( highlighted( const TQChar & ) ), this, TQT_SLOT( slotUpdateUnicode( const TQChar & ) ) ); - connect( charTable, TQT_SIGNAL( highlighted( const TQChar & ) ), this, TQT_SLOT( charHighlighted( const TQChar & ) ) ); - connect( charTable, TQT_SIGNAL( highlighted() ), this, TQT_SLOT( charHighlighted() ) ); - connect( charTable, TQT_SIGNAL( activated( const TQChar & ) ), this, TQT_SLOT( charActivated( const TQChar & ) ) ); - connect( charTable, TQT_SIGNAL( activated() ), this, TQT_SLOT( charActivated() ) ); - connect( charTable, TQT_SIGNAL( focusItemChanged( const TQChar & ) ), - this, TQT_SLOT( charFocusItemChanged( const TQChar & ) ) ); - connect( charTable, TQT_SIGNAL( focusItemChanged() ), this, TQT_SLOT( charFocusItemChanged() ) ); - connect( charTable, TQT_SIGNAL( tableUp() ), this, TQT_SLOT( charTableUp() ) ); - connect( charTable, TQT_SIGNAL( tableDown() ), this, TQT_SLOT( charTableDown() ) ); + connect( charTable, TQ_SIGNAL( highlighted( const TQChar & ) ), this, TQ_SLOT( slotUpdateUnicode( const TQChar & ) ) ); + connect( charTable, TQ_SIGNAL( highlighted( const TQChar & ) ), this, TQ_SLOT( charHighlighted( const TQChar & ) ) ); + connect( charTable, TQ_SIGNAL( highlighted() ), this, TQ_SLOT( charHighlighted() ) ); + connect( charTable, TQ_SIGNAL( activated( const TQChar & ) ), this, TQ_SLOT( charActivated( const TQChar & ) ) ); + connect( charTable, TQ_SIGNAL( activated() ), this, TQ_SLOT( charActivated() ) ); + connect( charTable, TQ_SIGNAL( focusItemChanged( const TQChar & ) ), + this, TQ_SLOT( charFocusItemChanged( const TQChar & ) ) ); + connect( charTable, TQ_SIGNAL( focusItemChanged() ), this, TQ_SLOT( charFocusItemChanged() ) ); + connect( charTable, TQ_SIGNAL( tableUp() ), this, TQ_SLOT( charTableUp() ) ); + connect( charTable, TQ_SIGNAL( tableDown() ), this, TQ_SLOT( charTableDown() ) ); - connect( charTable, TQT_SIGNAL(doubleClicked()),this,TQT_SLOT(slotDoubleClicked())); + connect( charTable, TQ_SIGNAL(doubleClicked()),this,TQ_SLOT(slotDoubleClicked())); - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); setFocusProxy( charTable ); } diff --git a/tdeui/kcharselect.h b/tdeui/kcharselect.h index a434154f0..4db7056f5 100644 --- a/tdeui/kcharselect.h +++ b/tdeui/kcharselect.h @@ -50,7 +50,7 @@ class KCharSelectPrivate; class TDEUI_EXPORT KCharSelectTable : public TQGridView { - Q_OBJECT + TQ_OBJECT public: KCharSelectTable( TQWidget *parent, const char *name, const TQString &_font, @@ -139,7 +139,7 @@ private: class TDEUI_EXPORT KCharSelect : public TQVBox { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQString fontFamily READ font WRITE setFont ) TQ_PROPERTY( int tableNum READ tableNum WRITE setTableNum ) TQ_PROPERTY( bool fontComboEnabled READ isFontComboEnabled WRITE enableFontCombo ) diff --git a/tdeui/kcmenumngr.cpp b/tdeui/kcmenumngr.cpp index 60e250575..90cf47e2a 100644 --- a/tdeui/kcmenumngr.cpp +++ b/tdeui/kcmenumngr.cpp @@ -59,7 +59,7 @@ void KContextMenuManager::insert( TQWidget* widget, TQPopupMenu* popup ) if ( !manager ) manager = new KContextMenuManager; - manager->connect( widget, TQT_SIGNAL( destroyed() ), manager, TQT_SLOT( widgetDestroyed() ) ); + manager->connect( widget, TQ_SIGNAL( destroyed() ), manager, TQ_SLOT( widgetDestroyed() ) ); manager->menus.insert( widget, popup ); widget->installEventFilter( manager ); } @@ -70,7 +70,7 @@ bool KContextMenuManager::eventFilter( TQObject *o, TQEvent * e) TQPoint pos; switch ( e->type() ) { case TQEvent::MouseButtonPress: - if (((TQMouseEvent*) e )->button() != Qt::RightButton ) + if (((TQMouseEvent*) e )->button() != TQt::RightButton ) break; if ( !showOnPress ) return true; // eat event for safety @@ -78,7 +78,7 @@ bool KContextMenuManager::eventFilter( TQObject *o, TQEvent * e) pos = ((TQMouseEvent*) e )->globalPos(); break; case TQEvent::MouseButtonRelease: - if ( showOnPress || ((TQMouseEvent*) e )->button() != Qt::RightButton ) + if ( showOnPress || ((TQMouseEvent*) e )->button() != TQt::RightButton ) break; popup = menus[o]; pos = ((TQMouseEvent*) e )->globalPos(); diff --git a/tdeui/kcmenumngr.h b/tdeui/kcmenumngr.h index f59ec8286..0147b3227 100644 --- a/tdeui/kcmenumngr.h +++ b/tdeui/kcmenumngr.h @@ -20,8 +20,6 @@ #ifndef KCMENUMNGR_H #define KCMENUMNGR_H -// #include <tqt.h> - #include <tqobject.h> #include <tqptrdict.h> #include <tqkeysequence.h> @@ -77,7 +75,7 @@ the position of the micro focus hint of the widget ( TQWidget::microFocusHint() class TDEUI_EXPORT KContextMenuManager : public TQObject { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/kcolorbutton.cpp b/tdeui/kcolorbutton.cpp index 5a42406a0..8f34024d8 100644 --- a/tdeui/kcolorbutton.cpp +++ b/tdeui/kcolorbutton.cpp @@ -47,7 +47,7 @@ KColorButton::KColorButton( TQWidget *parent, const char *name ) setAcceptDrops( true); // 2000-10-15 (putzer): fixes broken keyboard usage - connect (this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseColor())); + connect (this, TQ_SIGNAL(clicked()), this, TQ_SLOT(chooseColor())); } KColorButton::KColorButton( const TQColor &c, TQWidget *parent, @@ -60,7 +60,7 @@ KColorButton::KColorButton( const TQColor &c, TQWidget *parent, setAcceptDrops( true); // 2000-10-15 (putzer): fixes broken keyboard usage - connect (this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseColor())); + connect (this, TQ_SIGNAL(clicked()), this, TQ_SLOT(chooseColor())); } KColorButton::KColorButton( const TQColor &c, const TQColor &defaultColor, TQWidget *parent, @@ -73,7 +73,7 @@ KColorButton::KColorButton( const TQColor &c, const TQColor &defaultColor, TQWid setAcceptDrops( true); // 2000-10-15 (putzer): fixes broken keyboard usage - connect (this, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseColor())); + connect (this, TQ_SIGNAL(clicked()), this, TQ_SLOT(chooseColor())); } KColorButton::~KColorButton() @@ -126,13 +126,13 @@ void KColorButton::drawButtonLabel( TQPainter *painter ) if ( hasFocus() ) { TQRect focusRect = style().subRect( TQStyle::SR_PushButtonFocusRect, this ); - style().tqdrawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, colorGroup() ); + style().drawPrimitive( TQStyle::PE_FocusRect, painter, focusRect, colorGroup() ); } } TQSize KColorButton::sizeHint() const { - return style().tqsizeFromContents(TQStyle::CT_PushButton, this, TQSize(40, 15)). + return style().sizeFromContents(TQStyle::CT_PushButton, this, TQSize(40, 15)). expandedTo(TQApplication::globalStrut()); } @@ -174,7 +174,7 @@ void KColorButton::mousePressEvent( TQMouseEvent *e) void KColorButton::mouseMoveEvent( TQMouseEvent *e) { - if( (e->state() & Qt::LeftButton) && + if( (e->state() & TQt::LeftButton) && (e->pos()-mPos).manhattanLength() > TDEGlobalSettings::dndEventDelay() ) { // Drag color object diff --git a/tdeui/kcolorbutton.h b/tdeui/kcolorbutton.h index a9ca78ea8..d2ccc61b9 100644 --- a/tdeui/kcolorbutton.h +++ b/tdeui/kcolorbutton.h @@ -36,7 +36,7 @@ class KColorButtonPrivate; */ class TDEUI_EXPORT KColorButton : public TQPushButton { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQColor color READ color WRITE setColor ) TQ_PROPERTY( TQColor defaultColor READ defaultColor WRITE setDefaultColor ) diff --git a/tdeui/kcolorcombo.cpp b/tdeui/kcolorcombo.cpp index 87d5de32a..fd43ddcff 100644 --- a/tdeui/kcolorcombo.cpp +++ b/tdeui/kcolorcombo.cpp @@ -79,23 +79,23 @@ static void createStandardPalette() int i = 0; - standardPalette[i++] = Qt::red; - standardPalette[i++] = Qt::green; - standardPalette[i++] = Qt::blue; - standardPalette[i++] = Qt::cyan; - standardPalette[i++] = Qt::magenta; - standardPalette[i++] = Qt::yellow; - standardPalette[i++] = Qt::darkRed; - standardPalette[i++] = Qt::darkGreen; - standardPalette[i++] = Qt::darkBlue; - standardPalette[i++] = Qt::darkCyan; - standardPalette[i++] = Qt::darkMagenta; - standardPalette[i++] = Qt::darkYellow; - standardPalette[i++] = Qt::white; - standardPalette[i++] = Qt::lightGray; - standardPalette[i++] = Qt::gray; - standardPalette[i++] = Qt::darkGray; - standardPalette[i++] = Qt::black; + standardPalette[i++] = TQt::red; + standardPalette[i++] = TQt::green; + standardPalette[i++] = TQt::blue; + standardPalette[i++] = TQt::cyan; + standardPalette[i++] = TQt::magenta; + standardPalette[i++] = TQt::yellow; + standardPalette[i++] = TQt::darkRed; + standardPalette[i++] = TQt::darkGreen; + standardPalette[i++] = TQt::darkBlue; + standardPalette[i++] = TQt::darkCyan; + standardPalette[i++] = TQt::darkMagenta; + standardPalette[i++] = TQt::darkYellow; + standardPalette[i++] = TQt::white; + standardPalette[i++] = TQt::lightGray; + standardPalette[i++] = TQt::gray; + standardPalette[i++] = TQt::darkGray; + standardPalette[i++] = TQt::black; } #endif @@ -121,8 +121,8 @@ KColorCombo::KColorCombo( TQWidget *parent, const char *name ) addColors(); - connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) ); - connect( this, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotHighlighted(int) ) ); + connect( this, TQ_SIGNAL( activated(int) ), TQ_SLOT( slotActivated(int) ) ); + connect( this, TQ_SIGNAL( highlighted(int) ), TQ_SLOT( slotHighlighted(int) ) ); } diff --git a/tdeui/kcolorcombo.h b/tdeui/kcolorcombo.h index bade8efcb..084537441 100644 --- a/tdeui/kcolorcombo.h +++ b/tdeui/kcolorcombo.h @@ -38,7 +38,7 @@ class KColorComboInternal; */ class TDEUI_EXPORT KColorCombo : public TQComboBox { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQColor color READ color WRITE setColor ) public: diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp index b37bcf42c..8296c8319 100644 --- a/tdeui/kcolordialog.cpp +++ b/tdeui/kcolordialog.cpp @@ -68,7 +68,7 @@ #include "config.h" #endif -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <X11/Xlib.h> // defined in qapplication_x11.cpp @@ -191,23 +191,23 @@ static void createStandardPalette() int i = 0; - standardPalette[i++] = Qt::red; - standardPalette[i++] = Qt::green; - standardPalette[i++] = Qt::blue; - standardPalette[i++] = Qt::cyan; - standardPalette[i++] = Qt::magenta; - standardPalette[i++] = Qt::yellow; - standardPalette[i++] = Qt::darkRed; - standardPalette[i++] = Qt::darkGreen; - standardPalette[i++] = Qt::darkBlue; - standardPalette[i++] = Qt::darkCyan; - standardPalette[i++] = Qt::darkMagenta; - standardPalette[i++] = Qt::darkYellow; - standardPalette[i++] = Qt::white; - standardPalette[i++] = Qt::lightGray; - standardPalette[i++] = Qt::gray; - standardPalette[i++] = Qt::darkGray; - standardPalette[i++] = Qt::black; + standardPalette[i++] = TQt::red; + standardPalette[i++] = TQt::green; + standardPalette[i++] = TQt::blue; + standardPalette[i++] = TQt::cyan; + standardPalette[i++] = TQt::magenta; + standardPalette[i++] = TQt::yellow; + standardPalette[i++] = TQt::darkRed; + standardPalette[i++] = TQt::darkGreen; + standardPalette[i++] = TQt::darkBlue; + standardPalette[i++] = TQt::darkCyan; + standardPalette[i++] = TQt::darkMagenta; + standardPalette[i++] = TQt::darkYellow; + standardPalette[i++] = TQt::white; + standardPalette[i++] = TQt::lightGray; + standardPalette[i++] = TQt::gray; + standardPalette[i++] = TQt::darkGray; + standardPalette[i++] = TQt::black; } @@ -263,7 +263,7 @@ void KHSSelector::drawPalette( TQPixmap *pixmap ) //----------------------------------------------------------------------------- KValueSelector::KValueSelector( TQWidget *parent, const char *name ) - : TDESelector( Qt::Vertical, parent, name ), _hue(0), _sat(0) + : TDESelector( TQt::Vertical, parent, name ), _hue(0), _sat(0) { setRange( 0, 255 ); pixmap.setOptimization( TQPixmap::BestOptim ); @@ -298,9 +298,9 @@ void KValueSelector::drawPalette( TQPixmap *pixmap ) TQImage image( xSize, ySize, 32 ); TQColor col; uint *p; - QRgb rgb; + TQRgb rgb; - if ( orientation() == Qt::Horizontal ) + if ( orientation() == TQt::Horizontal ) { for ( int v = 0; v < ySize; v++ ) { @@ -315,7 +315,7 @@ void KValueSelector::drawPalette( TQPixmap *pixmap ) } } - if( orientation() == Qt::Vertical ) + if( orientation() == TQt::Vertical ) { for ( int v = 0; v < ySize; v++ ) { @@ -429,7 +429,7 @@ int KColorCells::posToCell(const TQPoint &pos, bool ignoreBorders) void KColorCells::mouseMoveEvent( TQMouseEvent *e ) { - if( !(e->state() & Qt::LeftButton)) return; + if( !(e->state() & TQt::LeftButton)) return; if(inMouse) { int delay = TDEGlobalSettings::dndEventDelay(); @@ -533,7 +533,7 @@ void KColorPatch::drawContents( TQPainter *painter ) void KColorPatch::mouseMoveEvent( TQMouseEvent *e ) { // Drag color object - if( !(e->state() & Qt::LeftButton)) return; + if( !(e->state() & TQt::LeftButton)) return; KColorDrag *d = new KColorDrag( color, this); d->dragCopy(); } @@ -597,12 +597,12 @@ KPaletteTable::KPaletteTable( TQWidget *parent, int minWidth, int cols) mNamedColorList->setFixedSize(minSize); mNamedColorList->hide(); layout->addWidget(mNamedColorList); - connect( mNamedColorList, TQT_SIGNAL(highlighted( const TQString & )), - this, TQT_SLOT( slotColorTextSelected( const TQString & )) ); + connect( mNamedColorList, TQ_SIGNAL(highlighted( const TQString & )), + this, TQ_SLOT( slotColorTextSelected( const TQString & )) ); setFixedSize( sizeHint()); - connect( combo, TQT_SIGNAL(activated(const TQString &)), - this, TQT_SLOT(slotSetPalette( const TQString &))); + connect( combo, TQ_SIGNAL(activated(const TQString &)), + this, TQ_SLOT(slotSetPalette( const TQString &))); } KPaletteTable::~KPaletteTable() @@ -704,7 +704,7 @@ KPaletteTable::readNamedColor( void ) // preventing the real dialog to become visible until the // error dialog box is removed (== bad UI). // - TQTimer::singleShot( 10, this, TQT_SLOT(slotShowNamedColorReadError()) ); + TQTimer::singleShot( 10, this, TQ_SLOT(slotShowNamedColorReadError()) ); } } @@ -831,10 +831,10 @@ KPaletteTable::setPalette( const TQString &_paletteName ) { cells->setColor( i, mPalette->color(i) ); } - connect( cells, TQT_SIGNAL( colorSelected( int ) ), - TQT_SLOT( slotColorCellSelected( int ) ) ); - connect( cells, TQT_SIGNAL( colorDoubleClicked( int ) ), - TQT_SLOT( slotColorCellDoubleClicked( int ) ) ); + connect( cells, TQ_SIGNAL( colorSelected( int ) ), + TQ_SLOT( slotColorCellSelected( int ) ) ); + connect( cells, TQ_SIGNAL( colorDoubleClicked( int ) ), + TQ_SLOT( slotColorCellDoubleClicked( int ) ) ); sv->addChild( cells ); cells->show(); sv->updateScrollBars(); @@ -930,7 +930,7 @@ public: TQCheckBox *cbDefaultColor; KColor defaultColor; KColor selColor; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 QX11EventFilter oldfilter; #endif }; @@ -944,12 +944,12 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) d = new KColorDialogPrivate; d->bRecursion = true; d->bColorPicking = false; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 d->oldfilter = 0; #endif d->cbDefaultColor = 0L; - connect( this, TQT_SIGNAL(okClicked(void)),this,TQT_SLOT(slotWriteSettings(void))); - connect( this, TQT_SIGNAL(closeClicked(void)),this,TQT_SLOT(slotWriteSettings(void))); + connect( this, TQ_SIGNAL(okClicked(void)),this,TQ_SLOT(slotWriteSettings(void))); + connect( this, TQ_SIGNAL(closeClicked(void)),this,TQ_SLOT(slotWriteSettings(void))); TQLabel *label; @@ -981,7 +981,7 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) l_left->addSpacing(10); TQGridLayout *l_lbot = new TQGridLayout(3, 6); - l_left->addLayout(TQT_TQLAYOUT(l_lbot)); + l_left->addLayout(l_lbot); // // the palette and value selector go into the H-box @@ -989,14 +989,14 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) d->hsSelector = new KHSSelector( page ); d->hsSelector->setMinimumSize(140, 70); l_ltop->addWidget(d->hsSelector, 8); - connect( d->hsSelector, TQT_SIGNAL( valueChanged( int, int ) ), - TQT_SLOT( slotHSChanged( int, int ) ) ); + connect( d->hsSelector, TQ_SIGNAL( valueChanged( int, int ) ), + TQ_SLOT( slotHSChanged( int, int ) ) ); d->valuePal = new KValueSelector( page ); d->valuePal->setMinimumSize(26, 70); l_ltop->addWidget(d->valuePal, 1); - connect( d->valuePal, TQT_SIGNAL( valueChanged( int ) ), - TQT_SLOT( slotVChanged( int ) ) ); + connect( d->valuePal, TQ_SIGNAL( valueChanged( int ) ), + TQ_SLOT( slotVChanged( int ) ) ); // @@ -1006,28 +1006,28 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) label->setAlignment(AlignRight | AlignVCenter); l_lbot->addWidget(label, 0, 2); d->hedit = new KColorSpinBox( 0, 359, 1, page ); - d->hedit->setValidator( new TQIntValidator( TQT_TQOBJECT(d->hedit) ) ); + d->hedit->setValidator( new TQIntValidator( d->hedit ) ); l_lbot->addWidget(d->hedit, 0, 3); - connect( d->hedit, TQT_SIGNAL( valueChanged(int) ), - TQT_SLOT( slotHSVChanged() ) ); + connect( d->hedit, TQ_SIGNAL( valueChanged(int) ), + TQ_SLOT( slotHSVChanged() ) ); label = new TQLabel( i18n("S:"), page ); label->setAlignment(AlignRight | AlignVCenter); l_lbot->addWidget(label, 1, 2); d->sedit = new KColorSpinBox( 0, 255, 1, page ); - d->sedit->setValidator( new TQIntValidator( TQT_TQOBJECT(d->sedit) ) ); + d->sedit->setValidator( new TQIntValidator( d->sedit ) ); l_lbot->addWidget(d->sedit, 1, 3); - connect( d->sedit, TQT_SIGNAL( valueChanged(int) ), - TQT_SLOT( slotHSVChanged() ) ); + connect( d->sedit, TQ_SIGNAL( valueChanged(int) ), + TQ_SLOT( slotHSVChanged() ) ); label = new TQLabel( i18n("V:"), page ); label->setAlignment(AlignRight | AlignVCenter); l_lbot->addWidget(label, 2, 2); d->vedit = new KColorSpinBox( 0, 255, 1, page ); - d->vedit->setValidator( new TQIntValidator( TQT_TQOBJECT(d->vedit) ) ); + d->vedit->setValidator( new TQIntValidator( d->vedit ) ); l_lbot->addWidget(d->vedit, 2, 3); - connect( d->vedit, TQT_SIGNAL( valueChanged(int) ), - TQT_SLOT( slotHSVChanged() ) ); + connect( d->vedit, TQ_SIGNAL( valueChanged(int) ), + TQ_SLOT( slotHSVChanged() ) ); // // add the RGB fields @@ -1036,28 +1036,28 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) label->setAlignment(AlignRight | AlignVCenter); l_lbot->addWidget(label, 0, 4); d->redit = new KColorSpinBox( 0, 255, 1, page ); - d->redit->setValidator( new TQIntValidator( TQT_TQOBJECT(d->redit) ) ); + d->redit->setValidator( new TQIntValidator( d->redit ) ); l_lbot->addWidget(d->redit, 0, 5); - connect( d->redit, TQT_SIGNAL( valueChanged(int) ), - TQT_SLOT( slotRGBChanged() ) ); + connect( d->redit, TQ_SIGNAL( valueChanged(int) ), + TQ_SLOT( slotRGBChanged() ) ); label = new TQLabel( i18n("G:"), page ); label->setAlignment(AlignRight | AlignVCenter); l_lbot->addWidget( label, 1, 4); d->gedit = new KColorSpinBox( 0, 255,1, page ); - d->gedit->setValidator( new TQIntValidator( TQT_TQOBJECT(d->gedit) ) ); + d->gedit->setValidator( new TQIntValidator( d->gedit ) ); l_lbot->addWidget(d->gedit, 1, 5); - connect( d->gedit, TQT_SIGNAL( valueChanged(int) ), - TQT_SLOT( slotRGBChanged() ) ); + connect( d->gedit, TQ_SIGNAL( valueChanged(int) ), + TQ_SLOT( slotRGBChanged() ) ); label = new TQLabel( i18n("B:"), page ); label->setAlignment(AlignRight | AlignVCenter); l_lbot->addWidget(label, 2, 4); d->bedit = new KColorSpinBox( 0, 255, 1, page ); - d->bedit->setValidator( new TQIntValidator( TQT_TQOBJECT(d->bedit) ) ); + d->bedit->setValidator( new TQIntValidator( d->bedit ) ); l_lbot->addWidget(d->bedit, 2, 5); - connect( d->bedit, TQT_SIGNAL( valueChanged(int) ), - TQT_SLOT( slotRGBChanged() ) ); + connect( d->bedit, TQ_SIGNAL( valueChanged(int) ), + TQ_SLOT( slotRGBChanged() ) ); // // the entry fields should be wide enough to hold 8888888 @@ -1083,13 +1083,13 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) d->table = new KPaletteTable( page ); d->l_right->addWidget(d->table, 10); - connect( d->table, TQT_SIGNAL( colorSelected( const TQColor &, const TQString & ) ), - TQT_SLOT( slotColorSelected( const TQColor &, const TQString & ) ) ); + connect( d->table, TQ_SIGNAL( colorSelected( const TQColor &, const TQString & ) ), + TQ_SLOT( slotColorSelected( const TQColor &, const TQString & ) ) ); connect( d->table, - TQT_SIGNAL( colorDoubleClicked( const TQColor &, const TQString & ) ), - TQT_SLOT( slotColorDoubleClicked( const TQColor &, const TQString & ) ) + TQ_SIGNAL( colorDoubleClicked( const TQColor &, const TQString & ) ), + TQ_SLOT( slotColorDoubleClicked( const TQColor &, const TQString & ) ) ); // Store the default value for saving time. d->originalPalette = d->table->palette(); @@ -1107,7 +1107,7 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) TQPushButton *button = new TQPushButton( page ); button->setText(i18n("&Add to Custom Colors")); l_hbox->addWidget(button, 0, AlignLeft); - connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( slotAddToCustomColors())); + connect( button, TQ_SIGNAL( clicked()), TQ_SLOT( slotAddToCustomColors())); // // The color picker button @@ -1115,7 +1115,7 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) button = new TQPushButton( page ); button->setPixmap( BarIcon("colorpicker")); l_hbox->addWidget(button, 0, AlignHCenter ); - connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( slotColorPicker())); + connect( button, TQ_SIGNAL( clicked()), TQ_SLOT( slotColorPicker())); // // a little space between @@ -1131,30 +1131,30 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) label = new TQLabel( page ); label->setText(i18n("Name:")); - l_grid->addWidget(TQT_TQWIDGET(label), 0, 1, Qt::AlignLeft); + l_grid->addWidget(label, 0, 1, TQt::AlignLeft); d->colorName = new TQLabel( page ); - l_grid->addWidget(TQT_TQWIDGET(d->colorName), 0, 2, Qt::AlignLeft); + l_grid->addWidget(d->colorName, 0, 2, TQt::AlignLeft); label = new TQLabel( page ); label->setText(i18n("HTML:")); - l_grid->addWidget(TQT_TQWIDGET(label), 1, 1, Qt::AlignLeft); + l_grid->addWidget(label, 1, 1, TQt::AlignLeft); d->htmlName = new KLineEdit( page ); d->htmlName->setMaxLength( 13 ); // Qt's TQColor allows 12 hexa-digits d->htmlName->setText("#FFFFFF"); // But HTML uses only 6, so do not worry about the size w = d->htmlName->fontMetrics().width(TQString::fromLatin1("#DDDDDDD")); d->htmlName->setFixedWidth(w); - l_grid->addWidget(TQT_TQWIDGET(d->htmlName), 1, 2, Qt::AlignLeft); + l_grid->addWidget(d->htmlName, 1, 2, TQt::AlignLeft); - connect( d->htmlName, TQT_SIGNAL( textChanged(const TQString &) ), - TQT_SLOT( slotHtmlChanged() ) ); + connect( d->htmlName, TQ_SIGNAL( textChanged(const TQString &) ), + TQ_SLOT( slotHtmlChanged() ) ); d->patch = new KColorPatch( page ); d->patch->setFixedSize(48, 48); - l_grid->addMultiCellWidget(TQT_TQWIDGET(d->patch), 0, 1, 0, 0, Qt::AlignHCenter | Qt::AlignVCenter); - connect( d->patch, TQT_SIGNAL( colorChanged( const TQColor&)), - TQT_SLOT( setColor( const TQColor&))); + l_grid->addMultiCellWidget(d->patch, 0, 1, 0, 0, TQt::AlignHCenter | TQt::AlignVCenter); + connect( d->patch, TQ_SIGNAL( colorChanged( const TQColor&)), + TQ_SLOT( setColor( const TQColor&))); tl_layout->activate(); page->setMinimumSize( page->sizeHint() ); @@ -1177,7 +1177,7 @@ KColorDialog::KColorDialog( TQWidget *parent, const char *name, bool modal ) KColorDialog::~KColorDialog() { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if (d->bColorPicking) tqt_set_x11_event_filter(d->oldfilter); #endif @@ -1187,7 +1187,7 @@ KColorDialog::~KColorDialog() bool KColorDialog::eventFilter( TQObject *obj, TQEvent *ev ) { - if ((TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->htmlName)) || (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->hsSelector))) + if ((obj == d->htmlName) || (obj == d->hsSelector)) switch(ev->type()) { case TQEvent::DragEnter: @@ -1226,7 +1226,7 @@ KColorDialog::setDefaultColor( const TQColor& col ) mainWidget()->setMinimumSize( mainWidget()->sizeHint() ); disableResize(); - connect( d->cbDefaultColor, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDefaultColorClicked() ) ); + connect( d->cbDefaultColor, TQ_SIGNAL( clicked() ), TQ_SLOT( slotDefaultColorClicked() ) ); } d->defaultColor = col; @@ -1486,7 +1486,7 @@ void KColorDialog::showColor( const KColor &color, const TQString &name ) static TQWidget *kde_color_dlg_widget = 0; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 static int kde_color_dlg_handler(XEvent *event) { if (event->type == ButtonRelease) @@ -1503,11 +1503,11 @@ void KColorDialog::slotColorPicker() { d->bColorPicking = true; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 d->oldfilter = tqt_set_x11_event_filter(kde_color_dlg_handler); #endif kde_color_dlg_widget = this; - grabMouse( tqcrossCursor ); + grabMouse( TQt::crossCursor ); grabKeyboard(); } @@ -1517,7 +1517,7 @@ KColorDialog::mouseReleaseEvent( TQMouseEvent *e ) if (d->bColorPicking) { d->bColorPicking = false; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 tqt_set_x11_event_filter(d->oldfilter); d->oldfilter = 0; #endif @@ -1532,7 +1532,7 @@ KColorDialog::mouseReleaseEvent( TQMouseEvent *e ) TQColor KColorDialog::grabColor(const TQPoint &p) { - TQWidget *desktop = TQT_TQWIDGET(TQApplication::desktop()); + TQWidget *desktop = TQApplication::desktop(); TQPixmap pm = TQPixmap::grabWindow( desktop->winId(), p.x(), p.y(), 1, 1); TQImage i = pm.convertToImage(); return i.pixel(0,0); @@ -1546,7 +1546,7 @@ KColorDialog::keyPressEvent( TQKeyEvent *e ) if (e->key() == Key_Escape) { d->bColorPicking = false; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 tqt_set_x11_event_filter(d->oldfilter); d->oldfilter = 0; #endif diff --git a/tdeui/kcolordialog.h b/tdeui/kcolordialog.h index e580ad582..a2ea4b52f 100644 --- a/tdeui/kcolordialog.h +++ b/tdeui/kcolordialog.h @@ -25,7 +25,7 @@ #ifndef KDELIBS_KCOLORDIALOG_H #define KDELIBS_KCOLORDIALOG_H -#ifdef Q_WS_QWS +#ifdef TQ_WS_QWS // FIXME(E): Do we need the KColorDialog extra functionality in Qt Embedded? #include <tqcolordialog.h> #define KColorDialog QColorDialog @@ -57,7 +57,7 @@ class KColorCells; */ class TDEUI_EXPORT KHSSelector : public KXYSelector { - Q_OBJECT + TQ_OBJECT public: /** @@ -101,7 +101,7 @@ class KValueSelectorPrivate; */ class TDEUI_EXPORT KValueSelector : public TDESelector { - Q_OBJECT + TQ_OBJECT public: /** @@ -197,7 +197,7 @@ private: **/ class TDEUI_EXPORT KPaletteTable : public TQWidget { - Q_OBJECT + TQ_OBJECT public: KPaletteTable( TQWidget *parent, int minWidth=210, int cols = 16); ~KPaletteTable(); @@ -252,7 +252,7 @@ private: */ class TDEUI_EXPORT KColorCells : public TQGridView { - Q_OBJECT + TQ_OBJECT public: KColorCells( TQWidget *parent, int rows, int cols ); ~KColorCells(); @@ -310,7 +310,7 @@ private: */ class TDEUI_EXPORT KColorPatch : public TQFrame { - Q_OBJECT + TQ_OBJECT public: KColorPatch( TQWidget *parent ); virtual ~KColorPatch(); @@ -376,7 +376,7 @@ private: **/ class TDEUI_EXPORT KColorDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** @@ -491,6 +491,6 @@ class TDEUI_EXPORT KColorDialog : public KDialogBase KColorDialogPrivate *d; }; -#endif // !Q_WS_QWS +#endif // !TQ_WS_QWS #endif // KDELIBS_KCOLORDIALOG_H diff --git a/tdeui/kcolordrag.h b/tdeui/kcolordrag.h index 289938b00..af3fb9cb4 100644 --- a/tdeui/kcolordrag.h +++ b/tdeui/kcolordrag.h @@ -34,7 +34,7 @@ class KColorDragPrivate; * See the Qt drag'n'drop documentation. */ class TDEUI_EXPORT KColorDrag : public TQStoredDrag { - Q_OBJECT + TQ_OBJECT public: /** @@ -65,7 +65,7 @@ public: /** * @deprecated This is equivalent with "new KColorDrag(color, dragsource)". */ - static KColorDrag* makeDrag( const TQColor&,TQWidget *dragsource) KDE_DEPRECATED; + static KColorDrag* makeDrag( const TQColor&,TQWidget *dragsource) TDE_DEPRECATED; private: TQColor m_color; // unused diff --git a/tdeui/kcombobox.cpp b/tdeui/kcombobox.cpp index 3b2b770ee..bcde35467 100644 --- a/tdeui/kcombobox.cpp +++ b/tdeui/kcombobox.cpp @@ -249,7 +249,7 @@ void KComboBox::wheelEvent( TQWheelEvent *ev ) void KComboBox::setLineEdit( TQLineEdit *edit ) { if ( !editable() && edit && - !qstrcmp( edit->className(), TQLINEEDIT_OBJECT_NAME_STRING ) ) + !qstrcmp( edit->className(), "TQLineEdit" ) ) { // uic generates code that creates a read-only KComboBox and then // calls combo->setEditable( true ), which causes TQComboBox to set up @@ -261,12 +261,12 @@ void KComboBox::setLineEdit( TQLineEdit *edit ) } TQComboBox::setLineEdit( edit ); - d->klineEdit = tqt_dynamic_cast<KLineEdit*>( edit ); + d->klineEdit = dynamic_cast<KLineEdit*>( edit ); setDelegate( d->klineEdit ); // Connect the returnPressed signal for both Q[K]LineEdits' if (edit) - connect( edit, TQT_SIGNAL( returnPressed() ), TQT_SIGNAL( returnPressed() )); + connect( edit, TQ_SIGNAL( returnPressed() ), TQ_SIGNAL( returnPressed() )); if ( d->klineEdit ) { @@ -274,32 +274,32 @@ void KComboBox::setLineEdit( TQLineEdit *edit ) // lineedit without us noticing. And TDECompletionBase::delegate would // be a dangling pointer then, so prevent that. Note: only do this // when it is a KLineEdit! - connect( edit, TQT_SIGNAL( destroyed() ), TQT_SLOT( lineEditDeleted() )); + connect( edit, TQ_SIGNAL( destroyed() ), TQ_SLOT( lineEditDeleted() )); - connect( d->klineEdit, TQT_SIGNAL( returnPressed( const TQString& )), - TQT_SIGNAL( returnPressed( const TQString& ) )); + connect( d->klineEdit, TQ_SIGNAL( returnPressed( const TQString& )), + TQ_SIGNAL( returnPressed( const TQString& ) )); - connect( d->klineEdit, TQT_SIGNAL( completion( const TQString& )), - TQT_SIGNAL( completion( const TQString& )) ); + connect( d->klineEdit, TQ_SIGNAL( completion( const TQString& )), + TQ_SIGNAL( completion( const TQString& )) ); - connect( d->klineEdit, TQT_SIGNAL( substringCompletion( const TQString& )), - TQT_SIGNAL( substringCompletion( const TQString& )) ); + connect( d->klineEdit, TQ_SIGNAL( substringCompletion( const TQString& )), + TQ_SIGNAL( substringCompletion( const TQString& )) ); connect( d->klineEdit, - TQT_SIGNAL( textRotation( TDECompletionBase::KeyBindingType )), - TQT_SIGNAL( textRotation( TDECompletionBase::KeyBindingType )) ); + TQ_SIGNAL( textRotation( TDECompletionBase::KeyBindingType )), + TQ_SIGNAL( textRotation( TDECompletionBase::KeyBindingType )) ); connect( d->klineEdit, - TQT_SIGNAL( completionModeChanged( TDEGlobalSettings::Completion )), - TQT_SIGNAL( completionModeChanged( TDEGlobalSettings::Completion))); + TQ_SIGNAL( completionModeChanged( TDEGlobalSettings::Completion )), + TQ_SIGNAL( completionModeChanged( TDEGlobalSettings::Completion))); connect( d->klineEdit, - TQT_SIGNAL( aboutToShowContextMenu( TQPopupMenu * )), - TQT_SIGNAL( aboutToShowContextMenu( TQPopupMenu * )) ); + TQ_SIGNAL( aboutToShowContextMenu( TQPopupMenu * )), + TQ_SIGNAL( aboutToShowContextMenu( TQPopupMenu * )) ); connect( d->klineEdit, - TQT_SIGNAL( completionBoxActivated( const TQString& )), - TQT_SIGNAL( activated( const TQString& )) ); + TQ_SIGNAL( completionBoxActivated( const TQString& )), + TQ_SIGNAL( activated( const TQString& )) ); } } @@ -390,10 +390,10 @@ void KHistoryCombo::init( bool useCompletion ) if ( histControl == "ignoredups" || histControl == "ignoreboth" ) setDuplicatesEnabled( false ); - connect( this, TQT_SIGNAL(aboutToShowContextMenu(TQPopupMenu*)), - TQT_SLOT(addContextMenuItems(TQPopupMenu*)) ); - connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotReset() )); - connect( this, TQT_SIGNAL( returnPressed(const TQString&) ), TQT_SLOT(slotReset())); + connect( this, TQ_SIGNAL(aboutToShowContextMenu(TQPopupMenu*)), + TQ_SLOT(addContextMenuItems(TQPopupMenu*)) ); + connect( this, TQ_SIGNAL( activated(int) ), TQ_SLOT( slotReset() )); + connect( this, TQ_SIGNAL( returnPressed(const TQString&) ), TQ_SLOT(slotReset())); } KHistoryCombo::~KHistoryCombo() @@ -455,10 +455,10 @@ void KHistoryCombo::addContextMenuItems( TQPopupMenu* menu ) { menu->insertSeparator(); if (d->bHistoryEditorEnabled) { - int idedit = menu->insertItem( SmallIconSet("edit"), i18n("&Edit History..."), this, TQT_SLOT( slotEdit()) ); + int idedit = menu->insertItem( SmallIconSet("edit"), i18n("&Edit History..."), this, TQ_SLOT( slotEdit()) ); menu->setItemEnabled(idedit, count()); } - int id = menu->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), this, TQT_SLOT( slotClear())); + int id = menu->insertItem( SmallIconSet("history_clear"), i18n("Clear &History"), this, TQ_SLOT( slotClear())); if (!count()) menu->setItemEnabled(id, false); } @@ -697,7 +697,7 @@ void KHistoryCombo::slotClear() void KHistoryCombo::slotEdit() { KHistoryComboEditor dlg( historyItems(), this ); - connect( &dlg, TQT_SIGNAL( removeFromHistory(const TQString&) ), TQT_SLOT( slotRemoveFromHistory(const TQString&)) ); + connect( &dlg, TQ_SIGNAL( removeFromHistory(const TQString&) ), TQ_SLOT( slotRemoveFromHistory(const TQString&)) ); dlg.exec(); } @@ -747,7 +747,7 @@ KHistoryComboEditor::KHistoryComboEditor( const TQStringList& entries, TQWidget TQLabel* slbl = new TQLabel(i18n("&Search:"), searchbox); TDEListViewSearchLine* listViewSearch = new TDEListViewSearchLine(searchbox); slbl->setBuddy(listViewSearch); - connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); + connect(clearSearch, TQ_SIGNAL(pressed()), listViewSearch, TQ_SLOT(clear())); // Add ListView m_pListView = new TDEListView( box ); @@ -766,8 +766,8 @@ KHistoryComboEditor::KHistoryComboEditor( const TQStringList& entries, TQWidget m_pListView->setMinimumSize( m_pListView->sizeHint() ); - connect( m_pListView, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ), - this, TQT_SLOT( slotSelectionChanged( TQListViewItem * ) ) ); + connect( m_pListView, TQ_SIGNAL( selectionChanged( TQListViewItem * ) ), + this, TQ_SLOT( slotSelectionChanged( TQListViewItem * ) ) ); enableButton( KDialogBase::User1, false ); diff --git a/tdeui/kcombobox.h b/tdeui/kcombobox.h index e0c2e2704..b403ff010 100644 --- a/tdeui/kcombobox.h +++ b/tdeui/kcombobox.h @@ -114,7 +114,7 @@ class KURL; * KComboBox *combo = new KComboBox( true, this, "mywidget" ); * TDECompletion *comp = combo->completionObject(); * // Connect to the return pressed signal - optional - * connect(combo,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&))); + * connect(combo,TQ_SIGNAL(returnPressed(const TQString&)),comp,TQ_SLOT(addItem(const TQString&))); * * // Provide the to be completed strings. Note that those are separate from the combo's * // contents. @@ -128,7 +128,7 @@ class KURL; * KURLCompletion *comp = new KURLCompletion(); * combo->setCompletionObject( comp ); * // Connect to the return pressed signal - optional - * connect(combo,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&))); + * connect(combo,TQ_SIGNAL(returnPressed(const TQString&)),comp,TQ_SLOT(addItem(const TQString&))); * \endcode * * Note that you have to either delete the allocated completion object @@ -141,7 +141,7 @@ class KURL; * // Tell the widget not to handle completion and rotation * combo->setHandleSignals( false ); * // Set your own completion key for manual completions. - * combo->setKeyBinding( TDECompletionBase::TextCompletion, Qt::End ); + * combo->setKeyBinding( TDECompletionBase::TextCompletion, TQt::End ); * // Hide the context (popup) menu * combo->setContextMenuEnabled( false ); * \endcode @@ -150,7 +150,7 @@ class KURL; */ class TDEUI_EXPORT KComboBox : public TQComboBox, public TDECompletionBase { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool autoCompletion READ autoCompletion WRITE setAutoCompletion ) TQ_PROPERTY( bool contextMenuEnabled READ isContextMenuEnabled WRITE setContextMenuEnabled ) TQ_PROPERTY( bool urlDropsEnabled READ isURLDropsEnabled WRITE setURLDropsEnabled ) @@ -539,7 +539,7 @@ class KPixmapProvider; */ class TDEUI_EXPORT KHistoryCombo : public KComboBox { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQStringList historyItems READ historyItems WRITE setHistoryItems ) public: @@ -553,8 +553,8 @@ public: * use * * \code - * connect( combo, TQT_SIGNAL( activated( const TQString& )), - * combo, TQT_SLOT( addToHistory( const TQString& ))); + * connect( combo, TQ_SIGNAL( activated( const TQString& )), + * combo, TQ_SLOT( addToHistory( const TQString& ))); * \endcode * * Use TQComboBox::setMaxCount() to limit the history. @@ -599,7 +599,7 @@ public: * You won't have the benefit of weighted completion though, so normally * you should do something like * \code - * TDEConfig *config = kapp->config(); + * TDEConfig *config = tdeApp->config(); * TQStringList list; * * // load the history and completion list after creating the history combo @@ -798,7 +798,7 @@ private: class TDEUI_EXPORT KHistoryComboEditor : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KHistoryComboEditor( const TQStringList& entries, TQWidget *parent = 0L ); diff --git a/tdeui/kcommand.cpp b/tdeui/kcommand.cpp index 5357e557a..cd30b861b 100644 --- a/tdeui/kcommand.cpp +++ b/tdeui/kcommand.cpp @@ -84,25 +84,25 @@ KCommandHistory::KCommandHistory(TDEActionCollection * actionCollection, bool wi if (withMenus) { TDEToolBarPopupAction * undo = new TDEToolBarPopupAction( i18n("&Undo"), "edit-undo", - TDEStdAccel::shortcut(TDEStdAccel::Undo), this, TQT_SLOT( undo() ), + TDEStdAccel::shortcut(TDEStdAccel::Undo), this, TQ_SLOT( undo() ), actionCollection, KStdAction::stdName( KStdAction::Undo ) ); - connect( undo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotUndoAboutToShow() ) ); - connect( undo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotUndoActivated( int ) ) ); + connect( undo->popupMenu(), TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( slotUndoAboutToShow() ) ); + connect( undo->popupMenu(), TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( slotUndoActivated( int ) ) ); m_undo = undo; m_undoPopup = undo->popupMenu(); TDEToolBarPopupAction * redo = new TDEToolBarPopupAction( i18n("&Redo"), "edit-redo", - TDEStdAccel::shortcut(TDEStdAccel::Redo), this, TQT_SLOT( redo() ), + TDEStdAccel::shortcut(TDEStdAccel::Redo), this, TQ_SLOT( redo() ), actionCollection, KStdAction::stdName( KStdAction::Redo ) ); - connect( redo->popupMenu(), TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotRedoAboutToShow() ) ); - connect( redo->popupMenu(), TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotRedoActivated( int ) ) ); + connect( redo->popupMenu(), TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( slotRedoAboutToShow() ) ); + connect( redo->popupMenu(), TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( slotRedoActivated( int ) ) ); m_redo = redo; m_redoPopup = redo->popupMenu(); } else { - m_undo = KStdAction::undo( this, TQT_SLOT( undo() ), actionCollection ); - m_redo = KStdAction::redo( this, TQT_SLOT( redo() ), actionCollection ); + m_undo = KStdAction::undo( this, TQ_SLOT( undo() ), actionCollection ); + m_redo = KStdAction::redo( this, TQ_SLOT( redo() ), actionCollection ); m_undoPopup = 0L; m_redoPopup = 0L; } diff --git a/tdeui/kcommand.h b/tdeui/kcommand.h index e27e5178b..f043afe00 100644 --- a/tdeui/kcommand.h +++ b/tdeui/kcommand.h @@ -154,7 +154,7 @@ protected: * to the name of the command. */ class TDEUI_EXPORT KCommandHistory : public TQObject { - Q_OBJECT + TQ_OBJECT public: /** * Creates a command history, to store commands. diff --git a/tdeui/kcursor.cpp b/tdeui/kcursor.cpp index 17f523d86..ae0a83935 100644 --- a/tdeui/kcursor.cpp +++ b/tdeui/kcursor.cpp @@ -49,7 +49,7 @@ TQCursor KCursor::handCursor() TDEConfig *config = TDEGlobal::config(); TDEConfigGroupSaver saver( config, "General" ); -#ifndef Q_WS_WIN // this mask doesn't work too well on win32 +#ifndef TQ_WS_WIN // this mask doesn't work too well on win32 if ( config->readEntry("handCursorStyle", "Windows") == "Windows" ) { static const unsigned char HAND_BITS[] = { @@ -74,7 +74,7 @@ TQCursor KCursor::handCursor() hand_cursor->handle(); } else -#endif //! Q_WS_WIN +#endif //! TQ_WS_WIN hand_cursor = new TQCursor(PointingHandCursor); } @@ -145,72 +145,72 @@ TQCursor KCursor::workingCursor() */ TQCursor KCursor::arrowCursor() { - return tqarrowCursor; + return TQt::arrowCursor; } TQCursor KCursor::upArrowCursor() { - return tqupArrowCursor; + return TQt::upArrowCursor; } TQCursor KCursor::crossCursor() { - return tqcrossCursor; + return TQt::crossCursor; } TQCursor KCursor::waitCursor() { - return tqwaitCursor; + return TQt::waitCursor; } TQCursor KCursor::ibeamCursor() { - return tqibeamCursor; + return TQt::ibeamCursor; } TQCursor KCursor::sizeVerCursor() { - return tqsizeVerCursor; + return TQt::sizeVerCursor; } TQCursor KCursor::sizeHorCursor() { - return tqsizeHorCursor; + return TQt::sizeHorCursor; } TQCursor KCursor::sizeBDiagCursor() { - return tqsizeBDiagCursor; + return TQt::sizeBDiagCursor; } TQCursor KCursor::sizeFDiagCursor() { - return tqsizeFDiagCursor; + return TQt::sizeFDiagCursor; } TQCursor KCursor::sizeAllCursor() { - return tqsizeAllCursor; + return TQt::sizeAllCursor; } TQCursor KCursor::blankCursor() { - return tqblankCursor; + return TQt::blankCursor; } TQCursor KCursor::whatsThisCursor() { - return tqwhatsThisCursor; + return TQt::whatsThisCursor; } // auto-hide cursor stuff @@ -250,8 +250,8 @@ KCursorPrivateAutoHideEventFilter::KCursorPrivateAutoHideEventFilter( TQWidget* , m_isOwnCursor( false ) { m_widget->setMouseTracking( true ); - connect( &m_autoHideTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( hideCursor() ) ); + connect( &m_autoHideTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( hideCursor() ) ); } KCursorPrivateAutoHideEventFilter::~KCursorPrivateAutoHideEventFilter() @@ -294,7 +294,7 @@ void KCursorPrivateAutoHideEventFilter::unhideCursor() TQWidget* w = actualWidget(); - if ( w->cursor().shape() != Qt::BlankCursor ) // someone messed with the cursor already + if ( w->cursor().shape() != TQt::BlankCursor ) // someone messed with the cursor already return; if ( m_isOwnCursor ) @@ -308,7 +308,7 @@ TQWidget* KCursorPrivateAutoHideEventFilter::actualWidget() const TQWidget* w = m_widget; // Is w a scrollview ? Call setCursor on the viewport in that case. - TQScrollView * sv = tqt_dynamic_cast<TQScrollView *>( w ); + TQScrollView * sv = dynamic_cast<TQScrollView *>( w ); if ( sv ) w = sv->viewport(); @@ -317,7 +317,7 @@ TQWidget* KCursorPrivateAutoHideEventFilter::actualWidget() const bool KCursorPrivateAutoHideEventFilter::eventFilter( TQObject *o, TQEvent *e ) { - Q_ASSERT( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_widget) ); + Q_ASSERT( o == m_widget ); switch ( e->type() ) { @@ -392,8 +392,8 @@ void KCursorPrivate::setAutoHideCursor( TQWidget *w, bool enable, bool customEve m_eventFilters.insert( w, filter ); if ( !customEventFilter ) w->installEventFilter( filter ); - connect( w, TQT_SIGNAL( destroyed(TQObject*) ), - this, TQT_SLOT( slotWidgetDestroyed(TQObject*) ) ); + connect( w, TQ_SIGNAL( destroyed(TQObject*) ), + this, TQ_SLOT( slotWidgetDestroyed(TQObject*) ) ); } else { @@ -402,8 +402,8 @@ void KCursorPrivate::setAutoHideCursor( TQWidget *w, bool enable, bool customEve return; w->removeEventFilter( filter ); delete filter; - disconnect( w, TQT_SIGNAL( destroyed(TQObject*) ), - this, TQT_SLOT( slotWidgetDestroyed(TQObject*) ) ); + disconnect( w, TQ_SIGNAL( destroyed(TQObject*) ), + this, TQ_SLOT( slotWidgetDestroyed(TQObject*) ) ); } } diff --git a/tdeui/kcursor_private.h b/tdeui/kcursor_private.h index 0ed1789e6..999280f74 100644 --- a/tdeui/kcursor_private.h +++ b/tdeui/kcursor_private.h @@ -38,7 +38,7 @@ class TQWidget; */ class KCursorPrivateAutoHideEventFilter : public TQObject { - Q_OBJECT + TQ_OBJECT public: KCursorPrivateAutoHideEventFilter( TQWidget* widget ); @@ -71,7 +71,7 @@ private: class KCursorPrivate : public TQObject { friend class KCursor; // to shut up the compiler - Q_OBJECT + TQ_OBJECT public: static KCursorPrivate *self(); diff --git a/tdeui/kdatepicker.cpp b/tdeui/kdatepicker.cpp index f29e32762..0622cbc1a 100644 --- a/tdeui/kdatepicker.cpp +++ b/tdeui/kdatepicker.cpp @@ -92,7 +92,7 @@ void KDatePicker::fillWeeksCombo(const TQDate &date) // make sure that the week of the lastDay is always inserted: in Chinese calendar // system, this is not always the case if(day < lastDay && day.daysTo(lastDay) < 7 && calendar->weekNumber(day) != calendar->weekNumber(lastDay)) - day = TQT_TQDATE_OBJECT(lastDay.addDays(-7)); + day = lastDay.addDays(-7); } } @@ -187,17 +187,17 @@ void KDatePicker::init( const TQDate &dt ) monthForward->setIconSet(BarIconSet(TQString::fromLatin1("1rightarrow"))); monthBackward->setIconSet(BarIconSet(TQString::fromLatin1("1leftarrow"))); } - connect(table, TQT_SIGNAL(dateChanged(TQDate)), TQT_SLOT(dateChangedSlot(TQDate))); - connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot())); - connect(monthForward, TQT_SIGNAL(clicked()), TQT_SLOT(monthForwardClicked())); - connect(monthBackward, TQT_SIGNAL(clicked()), TQT_SLOT(monthBackwardClicked())); - connect(yearForward, TQT_SIGNAL(clicked()), TQT_SLOT(yearForwardClicked())); - connect(yearBackward, TQT_SIGNAL(clicked()), TQT_SLOT(yearBackwardClicked())); - connect(d->selectWeek, TQT_SIGNAL(activated(int)), TQT_SLOT(weekSelected(int))); - connect(d->todayButton, TQT_SIGNAL(clicked()), TQT_SLOT(todayButtonClicked())); - connect(selectMonth, TQT_SIGNAL(clicked()), TQT_SLOT(selectMonthClicked())); - connect(selectYear, TQT_SIGNAL(toggled(bool)), TQT_SLOT(selectYearClicked())); - connect(line, TQT_SIGNAL(returnPressed()), TQT_SLOT(lineEnterPressed())); + connect(table, TQ_SIGNAL(dateChanged(TQDate)), TQ_SLOT(dateChangedSlot(TQDate))); + connect(table, TQ_SIGNAL(tableClicked()), TQ_SLOT(tableClickedSlot())); + connect(monthForward, TQ_SIGNAL(clicked()), TQ_SLOT(monthForwardClicked())); + connect(monthBackward, TQ_SIGNAL(clicked()), TQ_SLOT(monthBackwardClicked())); + connect(yearForward, TQ_SIGNAL(clicked()), TQ_SLOT(yearForwardClicked())); + connect(yearBackward, TQ_SIGNAL(clicked()), TQ_SLOT(yearBackwardClicked())); + connect(d->selectWeek, TQ_SIGNAL(activated(int)), TQ_SLOT(weekSelected(int))); + connect(d->todayButton, TQ_SIGNAL(clicked()), TQ_SLOT(todayButtonClicked())); + connect(selectMonth, TQ_SIGNAL(clicked()), TQ_SLOT(selectMonthClicked())); + connect(selectYear, TQ_SIGNAL(toggled(bool)), TQ_SLOT(selectYearClicked())); + connect(line, TQ_SIGNAL(returnPressed()), TQ_SLOT(lineEnterPressed())); table->setFocus(); @@ -225,8 +225,8 @@ KDatePicker::eventFilter(TQObject *o, TQEvent *e ) if ( (k->key() == TQt::Key_Prior) || (k->key() == TQt::Key_Next) || - (k->key() == Qt::Key_Up) || - (k->key() == Qt::Key_Down) ) + (k->key() == TQt::Key_Up) || + (k->key() == TQt::Key_Down) ) { TQApplication::sendEvent( table, e ); table->setFocus(); @@ -371,7 +371,7 @@ KDatePicker::selectMonthClicked() int day = calendar->day(date); // ----- construct a valid date in this month: calendar->setYMD(date, calendar->year(date), month, 1); - date = TQT_TQDATE_OBJECT(date.addDays(TQMIN(day, calendar->daysInMonth(date)) - 1)); + date = date.addDays(TQMIN(day, calendar->daysInMonth(date)) - 1); // ----- set this month setDate(date); } @@ -394,7 +394,7 @@ KDatePicker::selectYearClicked() picker->setYear( table->getDate().year() ); picker->selectAll(); popup->setMainWidget(picker); - connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int))); + connect(picker, TQ_SIGNAL(closeMe(int)), popup, TQ_SLOT(close(int))); picker->setFocus(); if(popup->exec(selectYear->mapToGlobal(TQPoint(0, selectMonth->height())))) { @@ -416,7 +416,7 @@ KDatePicker::selectYearClicked() } delete popup; - TQTimer::singleShot(0, this, TQT_SLOT(ensureSelectYearIsUp())); + TQTimer::singleShot(0, this, TQ_SLOT(ensureSelectYearIsUp())); } void @@ -507,7 +507,7 @@ KDatePicker::setFontSize(int s) maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height())); } - TQSize metricBound = style().tqsizeFromContents(TQStyle::CT_ToolButton, + TQSize metricBound = style().sizeFromContents(TQStyle::CT_ToolButton, selectMonth, maxMonthRect); selectMonth->setMinimumSize(metricBound); @@ -528,8 +528,8 @@ KDatePicker::setCloseButton( bool enable ) d->navigationLayout->addWidget(d->closeButton); TQToolTip::add(d->closeButton, i18n("Close")); d->closeButton->setPixmap( SmallIcon("remove") ); - connect( d->closeButton, TQT_SIGNAL( clicked() ), - topLevelWidget(), TQT_SLOT( close() ) ); + connect( d->closeButton, TQ_SIGNAL( clicked() ), + topLevelWidget(), TQ_SLOT( close() ) ); } else { delete d->closeButton; diff --git a/tdeui/kdatepicker.h b/tdeui/kdatepicker.h index 4e13f860e..e07882a2a 100644 --- a/tdeui/kdatepicker.h +++ b/tdeui/kdatepicker.h @@ -50,7 +50,7 @@ class KDateTable; **/ class TDEUI_EXPORT KDatePicker: public TQFrame { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQDate date READ date WRITE setDate) TQ_PROPERTY( bool closeButton READ hasCloseButton WRITE setCloseButton ) TQ_PROPERTY( int fontSize READ fontSize WRITE setFontSize ) @@ -104,7 +104,7 @@ public: * Returns the selected date. * @deprecated **/ - const TQDate& getDate() const KDE_DEPRECATED; + const TQDate& getDate() const TDE_DEPRECATED; /** * @returns the selected date. diff --git a/tdeui/kdatetbl.cpp b/tdeui/kdatetbl.cpp index ec5a1a132..7d76c3fc1 100644 --- a/tdeui/kdatetbl.cpp +++ b/tdeui/kdatetbl.cpp @@ -84,7 +84,7 @@ public: KDateValidator::KDateValidator(TQWidget* parent, const char* name) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) { } @@ -124,7 +124,7 @@ KDateTable::KDateTable(TQWidget *parent, TQDate date_, const char* name, WFlags kdDebug() << "KDateTable ctor: WARNING: Given date is invalid, using current date." << endl; date_=TQDate::currentDate(); } - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); setNumRows(7); // 6 weeks max + headline setNumCols(7); // 7 days a week setHScrollBarMode(AlwaysOff); @@ -140,7 +140,7 @@ KDateTable::KDateTable(TQWidget *parent, const char* name, WFlags f) { d = new KDateTablePrivate; setFontSize(10); - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); setNumRows(7); // 6 weeks max + headline setNumCols(7); // 7 days a week setHScrollBarMode(AlwaysOff); @@ -158,12 +158,12 @@ KDateTable::~KDateTable() void KDateTable::initAccels() { TDEAccel* accel = new TDEAccel(this, "date table accel"); - accel->insert(TDEStdAccel::Next, TQT_TQOBJECT(this), TQT_SLOT(nextMonth())); - accel->insert(TDEStdAccel::Prior, TQT_TQOBJECT(this), TQT_SLOT(previousMonth())); - accel->insert(TDEStdAccel::Home, TQT_TQOBJECT(this), TQT_SLOT(beginningOfMonth())); - accel->insert(TDEStdAccel::End, TQT_TQOBJECT(this), TQT_SLOT(endOfMonth())); - accel->insert(TDEStdAccel::BeginningOfLine, TQT_TQOBJECT(this), TQT_SLOT(beginningOfWeek())); - accel->insert(TDEStdAccel::EndOfLine, TQT_TQOBJECT(this), TQT_SLOT(endOfWeek())); + accel->insert(TDEStdAccel::Next, this, TQ_SLOT(nextMonth())); + accel->insert(TDEStdAccel::Prior, this, TQ_SLOT(previousMonth())); + accel->insert(TDEStdAccel::Home, this, TQ_SLOT(beginningOfMonth())); + accel->insert(TDEStdAccel::End, this, TQ_SLOT(endOfMonth())); + accel->insert(TDEStdAccel::BeginningOfLine, this, TQ_SLOT(beginningOfWeek())); + accel->insert(TDEStdAccel::EndOfLine, this, TQ_SLOT(endOfWeek())); accel->readSettings(); } @@ -351,22 +351,22 @@ void KDateTable::previousMonth() void KDateTable::beginningOfMonth() { - setDate(TQT_TQDATE_OBJECT(date.addDays(1 - date.day()))); + setDate(date.addDays(1 - date.day())); } void KDateTable::endOfMonth() { - setDate(TQT_TQDATE_OBJECT(date.addDays(date.daysInMonth() - date.day()))); + setDate(date.addDays(date.daysInMonth() - date.day())); } void KDateTable::beginningOfWeek() { - setDate(TQT_TQDATE_OBJECT(date.addDays(1 - date.dayOfWeek()))); + setDate(date.addDays(1 - date.dayOfWeek())); } void KDateTable::endOfWeek() { - setDate(TQT_TQDATE_OBJECT(date.addDays(7 - date.dayOfWeek()))); + setDate(date.addDays(7 - date.dayOfWeek())); } void @@ -374,22 +374,22 @@ KDateTable::keyPressEvent( TQKeyEvent *e ) { switch( e->key() ) { case Key_Up: - setDate(TQT_TQDATE_OBJECT(date.addDays(-7))); + setDate(date.addDays(-7)); break; case Key_Down: - setDate(TQT_TQDATE_OBJECT(date.addDays(7))); + setDate(date.addDays(7)); break; case Key_Left: - setDate(TQT_TQDATE_OBJECT(date.addDays(-1))); + setDate(date.addDays(-1)); break; case Key_Right: - setDate(TQT_TQDATE_OBJECT(date.addDays(1))); + setDate(date.addDays(1)); break; case Key_Minus: - setDate(TQT_TQDATE_OBJECT(date.addDays(-1))); + setDate(date.addDays(-1)); break; case Key_Plus: - setDate(TQT_TQDATE_OBJECT(date.addDays(1))); + setDate(date.addDays(1)); break; case Key_N: setDate(TQDate::currentDate()); @@ -447,7 +447,7 @@ KDateTable::setFontSize(int size) void KDateTable::wheelEvent ( TQWheelEvent * e ) { - setDate(TQT_TQDATE_OBJECT(date.addMonths( -(int)(e->delta()/120)) )); + setDate(date.addMonths( -(int)(e->delta()/120)) ); e->accept(); } @@ -497,7 +497,7 @@ KDateTable::contentsMousePressEvent(TQMouseEvent *e) emit tableClicked(); - if ( e->button() == Qt::RightButton && d->popupMenuEnabled ) + if ( e->button() == TQt::RightButton && d->popupMenuEnabled ) { TDEPopupMenu *menu = new TDEPopupMenu(); menu->insertTitle( TDEGlobal::locale()->formatDate(clickedDate) ); @@ -609,7 +609,7 @@ void KDateTable::unsetCustomDatePainting( const TQDate &date ) KDateInternalWeekSelector::KDateInternalWeekSelector (TQWidget* parent, const char* name) : TQLineEdit(parent, name), - val(new TQIntValidator(TQT_TQOBJECT(this))), + val(new TQIntValidator(this)), result(0) { TQFont font; @@ -618,7 +618,7 @@ KDateInternalWeekSelector::KDateInternalWeekSelector setFont(font); setFrameStyle(TQFrame::NoFrame); setValidator(val); - connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(weekEnteredSlot())); + connect(this, TQ_SIGNAL(returnPressed()), TQ_SLOT(weekEnteredSlot())); } void @@ -756,7 +756,7 @@ KDateInternalMonthPicker::paintCell(TQPainter* painter, int row, int col) void KDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e) { - if(!isEnabled() || e->button() != Qt::LeftButton) + if(!isEnabled() || e->button() != TQt::LeftButton) { KNotifyClient::beep(); return; @@ -783,7 +783,7 @@ KDateInternalMonthPicker::contentsMousePressEvent(TQMouseEvent *e) void KDateInternalMonthPicker::contentsMouseMoveEvent(TQMouseEvent *e) { - if (e->state() & Qt::LeftButton) + if (e->state() & TQt::LeftButton) { int row, col; TQPoint mouseCoord; @@ -850,7 +850,7 @@ KDateInternalMonthPicker::contentsMouseReleaseEvent(TQMouseEvent *e) KDateInternalYearSelector::KDateInternalYearSelector (TQWidget* parent, const char* name) : TQLineEdit(parent, name), - val(new TQIntValidator(TQT_TQOBJECT(this))), + val(new TQIntValidator(this)), result(0) { TQFont font; @@ -861,7 +861,7 @@ KDateInternalYearSelector::KDateInternalYearSelector // we have to respect the limits of TQDate here, I fear: val->setRange(0, 8000); setValidator(val); - connect(this, TQT_SIGNAL(returnPressed()), TQT_SLOT(yearEnteredSlot())); + connect(this, TQ_SIGNAL(returnPressed()), TQ_SLOT(yearEnteredSlot())); } void @@ -1008,7 +1008,7 @@ TDEPopupFrame::exec(TQPoint pos) popup(pos); repaint(); d->exec = true; - const TQGuardedPtr<TQObject> that = TQT_TQOBJECT(this); + const TQGuardedPtr<TQObject> that = this; tqApp->enter_loop(); if ( !that ) return TQDialog::Rejected; diff --git a/tdeui/kdatetbl.h b/tdeui/kdatetbl.h index 4bc1444ca..2b3b3b93f 100644 --- a/tdeui/kdatetbl.h +++ b/tdeui/kdatetbl.h @@ -39,7 +39,7 @@ class TDEPopupMenu; */ class TDEUI_EXPORT KDateInternalWeekSelector : public TQLineEdit { - Q_OBJECT + TQ_OBJECT protected: TQIntValidator *val; int result; @@ -66,7 +66,7 @@ private: */ class TDEUI_EXPORT KDateInternalMonthPicker : public TQGridView { - Q_OBJECT + TQ_OBJECT protected: /** * Store the month that has been clicked [1..12]. @@ -139,7 +139,7 @@ private: */ class TDEUI_EXPORT KDateInternalYearSelector : public TQLineEdit { - Q_OBJECT + TQ_OBJECT protected: TQIntValidator *val; int result; @@ -165,7 +165,7 @@ private: */ class TDEUI_EXPORT TDEPopupFrame : public TQFrame { - Q_OBJECT + TQ_OBJECT protected: /** * The result. It is returned from exec() when the popup window closes. @@ -186,7 +186,7 @@ public slots: */ void close(int r); /** - * Hides the widget. Reimplemented from QWidget + * Hides the widget. Reimplemented from TQWidget */ void hide(); @@ -262,7 +262,7 @@ public: */ class TDEUI_EXPORT KDateTable : public TQGridView { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQDate date READ getDate WRITE setDate ) TQ_PROPERTY( bool popupMenu READ popupMenuEnabled WRITE setPopupMenuEnabled ) diff --git a/tdeui/kdatetimewidget.cpp b/tdeui/kdatetimewidget.cpp index d7b677af9..1aa9332be 100644 --- a/tdeui/kdatetimewidget.cpp +++ b/tdeui/kdatetimewidget.cpp @@ -44,16 +44,16 @@ void KDateTimeWidget::init() d->dateWidget = new KDateWidget(this); d->timeWidget = new KTimeWidget(this); - connect(d->dateWidget, TQT_SIGNAL(changed(TQDate)), - TQT_SLOT(slotValueChanged())); - connect(d->timeWidget, TQT_SIGNAL(valueChanged(const TQTime &)), - TQT_SLOT(slotValueChanged())); + connect(d->dateWidget, TQ_SIGNAL(changed(TQDate)), + TQ_SLOT(slotValueChanged())); + connect(d->timeWidget, TQ_SIGNAL(valueChanged(const TQTime &)), + TQ_SLOT(slotValueChanged())); } void KDateTimeWidget::setDateTime(const TQDateTime & datetime) { - d->dateWidget->setDate(TQT_TQDATE_OBJECT(datetime.date())); - d->timeWidget->setTime(TQT_TQTIME_OBJECT(datetime.time())); + d->dateWidget->setDate(datetime.date()); + d->timeWidget->setTime(datetime.time()); } TQDateTime KDateTimeWidget::dateTime() const diff --git a/tdeui/kdatetimewidget.h b/tdeui/kdatetimewidget.h index 26c3cf670..d2b0b4e31 100644 --- a/tdeui/kdatetimewidget.h +++ b/tdeui/kdatetimewidget.h @@ -39,7 +39,7 @@ */ class TDEUI_EXPORT KDateTimeWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQDateTime dateTime READ dateTime WRITE setDateTime ) public: diff --git a/tdeui/kdatewidget.cpp b/tdeui/kdatewidget.cpp index 2fc9dda0a..8a7206d4a 100644 --- a/tdeui/kdatewidget.cpp +++ b/tdeui/kdatewidget.cpp @@ -88,9 +88,9 @@ void KDateWidget::init() d->m_year = new KDateWidgetSpinBox(locale->calendar()->minValidYear(), locale->calendar()->maxValidYear(), this); - connect(d->m_day, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged())); - connect(d->m_month, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDateChanged())); - connect(d->m_year, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged())); + connect(d->m_day, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotDateChanged())); + connect(d->m_month, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotDateChanged())); + connect(d->m_year, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotDateChanged())); } void KDateWidget::init(const TQDate& date) @@ -112,9 +112,9 @@ void KDateWidget::init(const TQDate& date) d->m_year = new KDateWidgetSpinBox(locale->calendar()->minValidYear(), locale->calendar()->maxValidYear(), this); - connect(d->m_day, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged())); - connect(d->m_month, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDateChanged())); - connect(d->m_year, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotDateChanged())); + connect(d->m_day, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotDateChanged())); + connect(d->m_month, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotDateChanged())); + connect(d->m_year, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotDateChanged())); } KDateWidget::~KDateWidget() diff --git a/tdeui/kdatewidget.h b/tdeui/kdatewidget.h index c89b382c1..3f68dc0da 100644 --- a/tdeui/kdatewidget.h +++ b/tdeui/kdatewidget.h @@ -35,7 +35,7 @@ */ class TDEUI_EXPORT KDateWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQDate date READ date WRITE setDate ) public: diff --git a/tdeui/kdcopactionproxy.cpp b/tdeui/kdcopactionproxy.cpp index 028c90883..2ce2fb4b4 100644 --- a/tdeui/kdcopactionproxy.cpp +++ b/tdeui/kdcopactionproxy.cpp @@ -94,7 +94,7 @@ TQMap<TQCString,DCOPRef> KDCOPActionProxy::actionMap( const TQCString &appId ) c TQCString id = appId; if ( id.isEmpty() ) - id = kapp->dcopClient()->appId(); + id = tdeApp->dcopClient()->appId(); TQValueList<TDEAction *> lst = actions(); TQValueList<TDEAction *>::ConstIterator it = lst.begin(); diff --git a/tdeui/kdcopactionproxy.h b/tdeui/kdcopactionproxy.h index 0bb80fec1..683a77177 100644 --- a/tdeui/kdcopactionproxy.h +++ b/tdeui/kdcopactionproxy.h @@ -73,7 +73,7 @@ public: * object id. * * You can construct a global DCOP object referenence using DCOPRef. For example like - * DCOPRef( kapp->dcopClient()->appId, actionProxy->actionObjectId( actionName ) ); + * DCOPRef( tdeApp->dcopClient()->appId, actionProxy->actionObjectId( actionName ) ); * * The action with the given name has to be available through the #action method. */ @@ -83,7 +83,7 @@ public: * Returns a map of all exported actions, with the action name as keys and a global DCOP reference * as data entries. * The appId argument is used to specify the appid component of the DCOP reference. By default the - * global application id is used ( kapp->dcopClient()->appId() ) . + * global application id is used ( tdeApp->dcopClient()->appId() ) . */ virtual TQMap<TQCString,DCOPRef> actionMap( const TQCString &appId = TQCString() ) const; diff --git a/tdeui/kdetrayproxy/kdetrayproxy.cpp b/tdeui/kdetrayproxy/kdetrayproxy.cpp index d0e7a84cf..6791b4c38 100644 --- a/tdeui/kdetrayproxy/kdetrayproxy.cpp +++ b/tdeui/kdetrayproxy/kdetrayproxy.cpp @@ -32,14 +32,14 @@ KDETrayProxy::KDETrayProxy() : selection( makeSelectionAtom()) { - connect( &selection, TQT_SIGNAL( newOwner( Window )), TQT_SLOT( newOwner( Window ))); - connect( &module, TQT_SIGNAL( windowAdded( WId )), TQT_SLOT( windowAdded( WId ))); + connect( &selection, TQ_SIGNAL( newOwner( Window )), TQ_SLOT( newOwner( Window ))); + connect( &module, TQ_SIGNAL( windowAdded( WId )), TQ_SLOT( windowAdded( WId ))); selection.owner(); for( TQValueList< WId >::ConstIterator it = module.windows().begin(); it != module.windows().end(); ++it ) windowAdded( *it ); - kapp->installX11EventFilter( this ); // XSelectInput( StructureNotifyMask ) on windows is done by KWinModule + tdeApp->installX11EventFilter( this ); // XSelectInput( StructureNotifyMask ) on windows is done by KWinModule // kdDebug() << "Init done" << endl; } @@ -143,7 +143,7 @@ void KDETrayProxy::dockWindow( Window w, Window owner ) ev.xclient.window = owner; ev.xclient.message_type = atom; ev.xclient.format = 32; - ev.xclient.data.l[ 0 ] = GET_QT_X_TIME(); + ev.xclient.data.l[ 0 ] = get_tqt_x_time(); ev.xclient.data.l[ 1 ] = 0; // SYSTEM_TRAY_REQUEST_DOCK ev.xclient.data.l[ 2 ] = w; ev.xclient.data.l[ 3 ] = 0; // unused diff --git a/tdeui/kdetrayproxy/kdetrayproxy.h b/tdeui/kdetrayproxy/kdetrayproxy.h index 9331aad5c..2231be9ab 100644 --- a/tdeui/kdetrayproxy/kdetrayproxy.h +++ b/tdeui/kdetrayproxy/kdetrayproxy.h @@ -28,7 +28,7 @@ class KDETrayProxy : public TQWidget { - Q_OBJECT + TQ_OBJECT public: KDETrayProxy(); public slots: diff --git a/tdeui/kdetrayproxy/module.cpp b/tdeui/kdetrayproxy/module.cpp index 5da30bab8..5d5155670 100644 --- a/tdeui/kdetrayproxy/module.cpp +++ b/tdeui/kdetrayproxy/module.cpp @@ -25,7 +25,7 @@ KDETrayModule::KDETrayModule( const TQCString& obj ) } extern "C" -KDE_EXPORT KDEDModule *create_kdetrayproxy( const TQCString& obj ) +TDE_EXPORT KDEDModule *create_kdetrayproxy( const TQCString& obj ) { return new KDETrayModule( obj ); } diff --git a/tdeui/kdetrayproxy/module.h b/tdeui/kdetrayproxy/module.h index 67ed1a29d..5ce759eb4 100644 --- a/tdeui/kdetrayproxy/module.h +++ b/tdeui/kdetrayproxy/module.h @@ -28,7 +28,7 @@ class KDETrayModule : public KDEDModule { - Q_OBJECT + TQ_OBJECT K_DCOP public: KDETrayModule( const TQCString& obj ); diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp index 72925525c..826012ab1 100644 --- a/tdeui/kdialog.cpp +++ b/tdeui/kdialog.cpp @@ -41,7 +41,7 @@ #include <tqpushbutton.h> #include "config.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <netwm.h> #endif @@ -121,7 +121,7 @@ void KDialog::polish() void KDialog::setCaption( const TQString &_caption ) { - TQString caption = kapp ? kapp->makeStdCaption( _caption ) : _caption; + TQString caption = tdeApp ? tdeApp->makeStdCaption( _caption ) : _caption; setPlainCaption( caption ); } @@ -130,7 +130,7 @@ void KDialog::setPlainCaption( const TQString &caption ) { TQDialog::setCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 NETWinInfo info( tqt_xdisplay(), winId(), tqt_xrootwin(), 0 ); info.setName( caption.utf8().data() ); #endif @@ -141,7 +141,7 @@ void KDialog::resizeLayout( TQWidget *w, int margin, int spacing ) { if( w->layout() ) { - resizeLayout( TQT_TQLAYOUTITEM(w->layout()), margin, spacing ); + resizeLayout( w->layout(), margin, spacing ); } if( !w->childrenListObject().isEmpty() ) @@ -295,7 +295,7 @@ void KDialogQueue::queueDialog(TQDialog *dialog) { KDialogQueue *_this = self(); _this->d->queue.append(dialog); - TQTimer::singleShot(0, _this, TQT_SLOT(slotShowQueuedDialog())); + TQTimer::singleShot(0, _this, TQ_SLOT(slotShowQueuedDialog())); } void KDialogQueue::slotShowQueuedDialog() @@ -317,7 +317,7 @@ void KDialogQueue::slotShowQueuedDialog() delete dialog; if (!d->queue.isEmpty()) - TQTimer::singleShot(20, this, TQT_SLOT(slotShowQueuedDialog())); + TQTimer::singleShot(20, this, TQ_SLOT(slotShowQueuedDialog())); else ksdkdq.destructObject(); // Suicide. } @@ -326,7 +326,7 @@ void KDialog::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } KSMModalDialogHeader::KSMModalDialogHeader(TQWidget* parent) - : TQWidget( parent, "", Qt::WDestructiveClose ) + : TQWidget( parent, "", TQt::WDestructiveClose ) { TQVBoxLayout* vbox = new TQVBoxLayout( this ); @@ -375,7 +375,7 @@ KSMModalDialogHeader::KSMModalDialogHeader(TQWidget* parent) TQWidget* swidget = new TQWidget( frame ); swidget->resize(2, frame->sizeHint().width()); - swidget->setBackgroundColor(Qt::black); + swidget->setBackgroundColor(TQt::black); seperatorbox->addWidget( swidget, AlignCenter ); TQLabel* label = new TQLabel( i18n("Trinity Desktop Environment"), frame ); @@ -396,7 +396,7 @@ KSMModalDialogHeader::~KSMModalDialogHeader() } KSMModalDialog::KSMModalDialog(TQWidget* parent) - : TQWidget( 0, "systemmodaldialogclass", Qt::WStyle_Customize | Qt::WType_Dialog | Qt::WStyle_Title | Qt::WStyle_StaysOnTop | Qt::WDestructiveClose ), m_keepOnTopTimer(NULL), m_allowClose(false) + : TQWidget( 0, "systemmodaldialogclass", TQt::WStyle_Customize | TQt::WType_Dialog | TQt::WStyle_Title | TQt::WStyle_StaysOnTop | TQt::WDestructiveClose ), m_keepOnTopTimer(NULL), m_allowClose(false) { // Signal that we do not want any window controls to be shown at all @@ -461,8 +461,8 @@ void KSMModalDialog::keepMeOnTop() { if (!m_keepOnTopTimer) { m_keepOnTopTimer = new TQTimer(); - connect(m_keepOnTopTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(keepMeOnTop())); - m_keepOnTopTimer->start(100, FALSE); + connect(m_keepOnTopTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(keepMeOnTop())); + m_keepOnTopTimer->start(100, false); } setActiveWindow(); raise(); diff --git a/tdeui/kdialog.h b/tdeui/kdialog.h index ad48693fe..1e19ca365 100644 --- a/tdeui/kdialog.h +++ b/tdeui/kdialog.h @@ -51,7 +51,7 @@ class TQLayoutItem; */ class TDEUI_EXPORT KDialog : public TQDialog { - Q_OBJECT + TQ_OBJECT public: @@ -188,7 +188,7 @@ class TDEUI_EXPORT KDialog : public TQDialog class KDialogQueuePrivate; class TDEUI_EXPORT KDialogQueue : public TQObject { - Q_OBJECT + TQ_OBJECT public: @@ -217,7 +217,7 @@ protected: */ class TDEUI_EXPORT KSMModalDialogHeader : public TQWidget { - Q_OBJECT + TQ_OBJECT public: KSMModalDialogHeader( TQWidget* parent ); @@ -240,7 +240,7 @@ class TQFrame; class TQGridLayout; class TDEUI_EXPORT KSMModalDialog : public TQWidget { - Q_OBJECT + TQ_OBJECT public: KSMModalDialog( TQWidget* parent ); diff --git a/tdeui/kdialogbase.cpp b/tdeui/kdialogbase.cpp index 1f7fbd5e3..72ba5e450 100644 --- a/tdeui/kdialogbase.cpp +++ b/tdeui/kdialogbase.cpp @@ -104,12 +104,12 @@ KDialogBase::KDialogBase( TQWidget *parent, const char *name, bool modal, :KDialog( parent, name, modal, (WFlags)WStyle_DialogBorder ), mTopLayout(0), mMainWidget(0), mUrlHelp(0), mJanus(0), mActionSep(0), mIsActivated(false), mShowTile(false), mMessageBoxMode(false), - mButtonOrientation(Qt::Horizontal), d(new KDialogBasePrivate) + mButtonOrientation(TQt::Horizontal), d(new KDialogBasePrivate) { setCaption( caption ); makeRelay(); - connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) ); + connect( this, TQ_SIGNAL(layoutHintChanged()), TQ_SLOT(updateGeometry()) ); enableButtonSeparator( separator ); makeButtonBox( buttonMask, defaultButton, user1, user2, user3 ); @@ -126,16 +126,16 @@ KDialogBase::KDialogBase( int dialogFace, const TQString &caption, :KDialog( parent, name, modal, (WFlags)WStyle_DialogBorder ), mTopLayout(0), mMainWidget(0), mUrlHelp(0), mJanus(0), mActionSep(0), mIsActivated(false), mShowTile(false), mMessageBoxMode(false), - mButtonOrientation(Qt::Horizontal), d(new KDialogBasePrivate) + mButtonOrientation(TQt::Horizontal), d(new KDialogBasePrivate) { setCaption( caption ); makeRelay(); - connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) ); + connect( this, TQ_SIGNAL(layoutHintChanged()), TQ_SLOT(updateGeometry()) ); mJanus = new KJanusWidget( this, "janus", dialogFace ); - connect(mJanus, TQT_SIGNAL(aboutToShowPage(TQWidget *)), - this, TQT_SIGNAL(aboutToShowPage(TQWidget *))); + connect(mJanus, TQ_SIGNAL(aboutToShowPage(TQWidget *)), + this, TQ_SIGNAL(aboutToShowPage(TQWidget *))); if( !mJanus || !mJanus->isValid() ) { return; } @@ -155,16 +155,16 @@ KDialogBase::KDialogBase( KDialogBase::DialogType dialogFace, WFlags f, TQWidge :KDialog( parent, name, modal, f ), mTopLayout(0), mMainWidget(0), mUrlHelp(0), mJanus(0), mActionSep(0), mIsActivated(false), mShowTile(false), mMessageBoxMode(false), - mButtonOrientation(Qt::Horizontal), d(new KDialogBasePrivate) + mButtonOrientation(TQt::Horizontal), d(new KDialogBasePrivate) { setCaption( caption ); makeRelay(); - connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) ); + connect( this, TQ_SIGNAL(layoutHintChanged()), TQ_SLOT(updateGeometry()) ); mJanus = new KJanusWidget( this, "janus", dialogFace ); - connect(mJanus, TQT_SIGNAL(aboutToShowPage(TQWidget *)), - this, TQT_SIGNAL(aboutToShowPage(TQWidget *))); + connect(mJanus, TQ_SIGNAL(aboutToShowPage(TQWidget *)), + this, TQ_SIGNAL(aboutToShowPage(TQWidget *))); if( !mJanus || !mJanus->isValid() ) { return; } @@ -183,13 +183,13 @@ KDialogBase::KDialogBase( const TQString &caption, int buttonMask, :KDialog( parent, name, modal, (WFlags)WStyle_DialogBorder ), mTopLayout(0), mMainWidget(0), mUrlHelp(0), mJanus(0), mActionSep(0), mIsActivated(false), mShowTile(false), mMessageBoxMode(true), - mButtonOrientation(Qt::Horizontal),mEscapeButton(escapeButton), + mButtonOrientation(TQt::Horizontal),mEscapeButton(escapeButton), d(new KDialogBasePrivate) { setCaption( caption ); makeRelay(); - connect( this, TQT_SIGNAL(layoutHintChanged()), TQT_SLOT(updateGeometry()) ); + connect( this, TQ_SIGNAL(layoutHintChanged()), TQ_SLOT(updateGeometry()) ); enableButtonSeparator( separator ); @@ -235,7 +235,7 @@ void SButton::resize( bool sameWidth, int margin, if( s.width() > w ) { w = s.width(); } } - if( orientation == Qt::Horizontal ) + if( orientation == TQt::Horizontal ) { for( p = list.first(); p; p = list.next() ) { @@ -281,7 +281,7 @@ KDialogBase::delayedDestruct() { if (isVisible()) hide(); - TQTimer::singleShot( 0, this, TQT_SLOT(slotDelayedDestruct())); + TQTimer::singleShot( 0, this, TQ_SLOT(slotDelayedDestruct())); } void @@ -299,7 +299,7 @@ void KDialogBase::setupLayout() // mTopLayout = new TQVBoxLayout( this, marginHint(), spacingHint() ); - if( mButtonOrientation == Qt::Horizontal ) + if( mButtonOrientation == TQt::Horizontal ) { mTopLayout = new TQBoxLayout( this, TQBoxLayout::TopToBottom, marginHint(), spacingHint() ); @@ -349,10 +349,10 @@ void KDialogBase::setButtonBoxOrientation( int orientation ) mButtonOrientation = orientation; if( mActionSep ) { - mActionSep->setOrientation( mButtonOrientation == Qt::Horizontal ? + mActionSep->setOrientation( mButtonOrientation == TQt::Horizontal ? TQFrame::HLine : TQFrame::VLine ); } - if( mButtonOrientation == Qt::Vertical ) + if( mButtonOrientation == TQt::Vertical ) { enableLinkedHelp(false); // 2000-06-18 Espen: No support for this yet. } @@ -373,15 +373,15 @@ void KDialogBase::makeRelay() { if( mTile ) { - connect( mTile, TQT_SIGNAL(pixmapChanged()), TQT_SLOT(updateBackground()) ); + connect( mTile, TQ_SIGNAL(pixmapChanged()), TQ_SLOT(updateBackground()) ); return; } mTile = new KDialogBaseTile; if( mTile ) { - connect( mTile, TQT_SIGNAL(pixmapChanged()), TQT_SLOT(updateBackground()) ); - connect( tqApp, TQT_SIGNAL(aboutToQuit()), mTile, TQT_SLOT(cleanup()) ); + connect( mTile, TQ_SIGNAL(pixmapChanged()), TQ_SLOT(updateBackground()) ); + connect( tqApp, TQ_SIGNAL(aboutToQuit()), mTile, TQ_SLOT(cleanup()) ); } } @@ -395,8 +395,8 @@ void KDialogBase::enableButtonSeparator( bool state ) return; } mActionSep = new KSeparator( this ); - mActionSep->setFocusPolicy(TQ_NoFocus); - mActionSep->setOrientation( mButtonOrientation == Qt::Horizontal ? + mActionSep->setFocusPolicy(TQWidget::NoFocus); + mActionSep->setOrientation( mButtonOrientation == TQt::Horizontal ? TQFrame::HLine : TQFrame::VLine ); mActionSep->show(); } @@ -506,7 +506,7 @@ TQSize KDialogBase::minimumSizeHint() const if( d->mButton.box ) { s2 = d->mButton.box->minimumSize(); - if( mButtonOrientation == Qt::Horizontal ) + if( mButtonOrientation == TQt::Horizontal ) { s1.rwidth() = TQMAX( s1.rwidth(), s2.rwidth() ); s1.rheight() += s2.rheight(); @@ -576,35 +576,35 @@ void KDialogBase::makeButtonBox( int buttonMask, ButtonCode defaultButton, { KPushButton *pb = d->mButton.append( Help, KStdGuiItem::help() ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelp()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotHelp()) ); } if( d->mButton.mask & Default ) { KPushButton *pb = d->mButton.append( Default, KStdGuiItem::defaults() ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefault()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotDefault()) ); } if( d->mButton.mask & Details ) { KPushButton *pb = d->mButton.append( Details, TQString() ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotDetails()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotDetails()) ); setDetails(false); } if( d->mButton.mask & User3 ) { KPushButton *pb = d->mButton.append( User3, user3 ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotUser3()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotUser3()) ); } if( d->mButton.mask & User2 ) { KPushButton *pb = d->mButton.append( User2, user2 ); if( mMessageBoxMode ) { - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotYes()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotYes()) ); } else { - connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUser2()) ); + connect( pb, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotUser2()) ); } } if( d->mButton.mask & User1 ) @@ -612,39 +612,39 @@ void KDialogBase::makeButtonBox( int buttonMask, ButtonCode defaultButton, KPushButton *pb = d->mButton.append( User1, user1 ); if( mMessageBoxMode ) { - connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNo()) ); + connect( pb, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotNo()) ); } else { - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotUser1()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotUser1()) ); } } if( d->mButton.mask & Ok ) { KPushButton *pb = d->mButton.append( Ok, KStdGuiItem::ok() ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotOk()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotOk()) ); } if( d->mButton.mask & Apply ) { KPushButton *pb = d->mButton.append( Apply, KStdGuiItem::apply() ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotApply()) ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(applyPressed()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotApply()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(applyPressed()) ); } if( d->mButton.mask & Try ) { KPushButton *pb = d->mButton.append( Try, i18n( "&Try" ) ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotTry()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotTry()) ); } if( d->mButton.mask & Cancel ) { KPushButton *pb = d->mButton.append( Cancel, KStdGuiItem::cancel() ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotCancel()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotCancel()) ); } if( d->mButton.mask & Close ) { KPushButton *pb = d->mButton.append( Close, KStdGuiItem::close() ); - connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(slotClose()) ); + connect( pb, TQ_SIGNAL(clicked()), TQ_SLOT(slotClose()) ); } if( defaultButton != NoDefault ) @@ -686,7 +686,7 @@ void KDialogBase::setButtonStyle( int style ) layoutMax = 6; layout = layoutRule[ d->mButton.style ]; } - else if (mButtonOrientation == Qt::Horizontal) + else if (mButtonOrientation == TQt::Horizontal) { static const unsigned int layoutRule[5][10] = { @@ -720,7 +720,7 @@ void KDialogBase::setButtonStyle( int style ) } TQBoxLayout *lay; - if( mButtonOrientation == Qt::Horizontal ) + if( mButtonOrientation == TQt::Horizontal ) { lay = new TQBoxLayout( d->mButton.box, TQBoxLayout::LeftToRight, 0, spacingHint()); @@ -1094,8 +1094,8 @@ void KDialogBase::setIconListAllVisible( bool state ) void KDialogBase::slotHelp() { emit helpClicked(); - if ( kapp ) // may be null when used inside designer - kapp->invokeHelp( mAnchor, mHelpApp ); + if ( tdeApp ) // may be null when used inside designer + tdeApp->invokeHelp( mAnchor, mHelpApp ); } @@ -1256,8 +1256,8 @@ void KDialogBase::enableLinkedHelp( bool state ) mUrlHelp->setBackgroundPixmap(*mTile->get()); } mUrlHelp->setMinimumHeight( fontMetrics().height() + marginHint() ); - connect(mUrlHelp,TQT_SIGNAL(leftClickedURL(const TQString &)), - TQT_SLOT(helpClickedSlot(const TQString &))); + connect(mUrlHelp,TQ_SIGNAL(leftClickedURL(const TQString &)), + TQ_SLOT(helpClickedSlot(const TQString &))); mUrlHelp->show(); } else diff --git a/tdeui/kdialogbase.h b/tdeui/kdialogbase.h index 1bc910fd6..d264c525f 100644 --- a/tdeui/kdialogbase.h +++ b/tdeui/kdialogbase.h @@ -190,7 +190,7 @@ class KDialogBaseTile; */ class TDEUI_EXPORT KDialogBase : public KDialog { - Q_OBJECT + TQ_OBJECT public: @@ -575,9 +575,9 @@ class TDEUI_EXPORT KDialogBase : public KDialog * toplevel widget for this particular page. The widget contains a * TQGridLayout layout so the widget children are positioned in a grid. * - * @param n Specifies the number of columns if @p dir is Qt::Horizontal - * or the number of rows if @p dir is Qt::Vertical. - * @param dir Can be Qt::Horizontal or Qt::Vertical. + * @param n Specifies the number of columns if @p dir is TQt::Horizontal + * or the number of rows if @p dir is TQt::Vertical. + * @param dir Can be TQt::Horizontal or TQt::Vertical. * @param itemName String used in the list or as tab item name. * @param header Header text use in the list modes @p Ignored in @p Tabbed * mode. If empty, the item text is used instead. @@ -673,9 +673,9 @@ class TDEUI_EXPORT KDialogBase : public KDialog * constructor where you define the face (Plain, Swallow, Tabbed, * TreeList, IconList). * - * @param n Specifies the number of columns if 'dir' is Qt::Horizontal - * or the number of rows if 'dir' is Qt::Vertical. - * @param dir Can be Qt::Horizontal or Qt::Vertical. + * @param n Specifies the number of columns if 'dir' is TQt::Horizontal + * or the number of rows if 'dir' is TQt::Vertical. + * @param dir Can be TQt::Horizontal or TQt::Vertical. * * @return The main widget or 0 if any of the rules described above * were broken. @@ -898,7 +898,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog */ void setButtonOKText( const TQString &text=TQString::null, const TQString &tooltip=TQString::null, - const TQString &quickhelp=TQString::null ) KDE_DEPRECATED; + const TQString &quickhelp=TQString::null ) TDE_DEPRECATED; /** * Sets the appearance of the Apply button. @@ -928,7 +928,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog */ void setButtonApplyText( const TQString &text=TQString::null, const TQString &tooltip=TQString::null, - const TQString &quickhelp=TQString::null ) KDE_DEPRECATED; + const TQString &quickhelp=TQString::null ) TDE_DEPRECATED; /** * Sets the appearance of the Cancel button. @@ -956,7 +956,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog */ void setButtonCancelText( const TQString &text=TQString::null, const TQString &tooltip=TQString::null, - const TQString &quickhelp=TQString::null ) KDE_DEPRECATED; + const TQString &quickhelp=TQString::null ) TDE_DEPRECATED; /** * Sets the text of any button. @@ -1113,7 +1113,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog * @deprecated * Use backgroundTile() instead. */ - static const TQPixmap *getBackgroundTile() KDE_DEPRECATED; + static const TQPixmap *getBackgroundTile() TDE_DEPRECATED; /** * Sets the background tile. @@ -1142,7 +1142,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog * The results are differences in pixels from the * dialogs corners. */ - void getBorderWidths( int& ulx, int& uly, int& lrx, int& lry ) const KDE_DEPRECATED; + void getBorderWidths( int& ulx, int& uly, int& lrx, int& lry ) const TDE_DEPRECATED; /** * @deprecated @@ -1155,7 +1155,7 @@ class TDEUI_EXPORT KDialogBase : public KDialog * If you need the "overhead" the dialog needs for its elements, * use getBorderWidths(). */ - TQRect getContentsRect() const KDE_DEPRECATED; + TQRect getContentsRect() const TDE_DEPRECATED; /** * Calculate the size hint for the dialog. diff --git a/tdeui/kdialogbase_priv.h b/tdeui/kdialogbase_priv.h index 84db3b84f..59cef2f25 100644 --- a/tdeui/kdialogbase_priv.h +++ b/tdeui/kdialogbase_priv.h @@ -30,7 +30,7 @@ */ class TDEUI_EXPORT KDialogBaseButton : public KPushButton { - Q_OBJECT + TQ_OBJECT public: KDialogBaseButton( const KGuiItem &text, int key, TQWidget *parent=0, @@ -47,7 +47,7 @@ class TDEUI_EXPORT KDialogBaseButton : public KPushButton */ class TDEUI_EXPORT KDialogBaseTile : public TQObject { - Q_OBJECT + TQ_OBJECT public: KDialogBaseTile( TQObject *parent=0, const char *name=0 ); diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp index bf99c6801..8e8b924c2 100644 --- a/tdeui/kdockwidget.cpp +++ b/tdeui/kdockwidget.cpp @@ -43,7 +43,7 @@ #include <tdeglobalsettings.h> #include "config.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <X11/X.h> #include <X11/Xlib.h> #endif @@ -122,7 +122,7 @@ void KDockMainWindow::setMainDockWidget( KDockWidget* mdw ) void KDockMainWindow::setView( TQWidget *view ) { if ( view->isA("KDockWidget") ){ - if ( TQT_BASE_OBJECT(view->parent()) != TQT_BASE_OBJECT(this) ) ((KDockWidget*)view)->applyToWidget( this ); + if ( view->parent() != this ) ((KDockWidget*)view)->applyToWidget( this ); } #ifndef NO_KDE2 @@ -203,7 +203,7 @@ void KDockWidgetHeaderDrag::paintEvent( TQPaintEvent* ) paint.begin( this ); - style().tqdrawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); + style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); paint.end(); } @@ -219,7 +219,7 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name ) #ifdef BORDERLESS_WINDOWS setCursor(TQCursor(ArrowCursor)); #endif - d = new KDockWidgetHeaderPrivate( TQT_TQOBJECT(this) ); + d = new KDockWidgetHeaderPrivate( this ); layout = new TQHBoxLayout( this ); layout->setResizeMode( TQLayout::Minimum ); @@ -230,28 +230,28 @@ KDockWidgetHeader::KDockWidgetHeader( KDockWidget* parent, const char* name ) TQToolTip::add( closeButton, i18n("Close") ); closeButton->setPixmap( style().stylePixmap (TQStyle::SP_TitleBarCloseButton , this)); closeButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); - connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked())); - connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock())); + connect( closeButton, TQ_SIGNAL(clicked()), parent, TQ_SIGNAL(headerCloseButtonClicked())); + connect( closeButton, TQ_SIGNAL(clicked()), parent, TQ_SLOT(undock())); stayButton = new KDockButton_Private( this, "DockStayButton" ); TQToolTip::add( stayButton, i18n("Freeze the window geometry", "Freeze") ); stayButton->setToggleButton( true ); stayButton->setPixmap( const_cast< const char** >(not_close_xpm) ); stayButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); - connect( stayButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStayClicked())); + connect( stayButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotStayClicked())); dockbackButton = new KDockButton_Private( this, "DockbackButton" ); TQToolTip::add( dockbackButton, i18n("Dock this window", "Dock") ); dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm)); dockbackButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); - connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked())); - connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack())); + connect( dockbackButton, TQ_SIGNAL(clicked()), parent, TQ_SIGNAL(headerDockbackButtonClicked())); + connect( dockbackButton, TQ_SIGNAL(clicked()), parent, TQ_SLOT(dockBack())); d->toDesktopButton = new KDockButton_Private( this, "ToDesktopButton" ); TQToolTip::add( d->toDesktopButton, i18n("Detach") ); d->toDesktopButton->setPixmap( const_cast< const char** >(todesktop_xpm)); d->toDesktopButton->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); - connect( d->toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop())); + connect( d->toDesktopButton, TQ_SIGNAL(clicked()), parent, TQ_SLOT(toDesktop())); stayButton->hide(); d->dummy = new TQWidget( this ); @@ -498,7 +498,7 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQP layout->setResizeMode( TQLayout::Minimum ); manager = dockManager; - manager->childDock->append( TQT_TQOBJECT(this) ); + manager->childDock->append( this ); installEventFilter( manager ); eDocking = DockFullDocking; @@ -522,7 +522,7 @@ KDockWidget::KDockWidget( KDockManager* dockManager, const char* name, const TQP setIcon( pixmap); widget = 0L; - TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) ); + TQObject::connect(this, TQ_SIGNAL(hasUndocked()), manager->main, TQ_SLOT(slotDockWidgetUndocked()) ); applyToWidget( parent, TQPoint(0,0) ); } @@ -535,7 +535,7 @@ void KDockWidget::setPixmap(const TQPixmap& pixmap) { dtg->changeTab(this,pixmap,dtg->tabLabel(this)); TQWidget *contWid=parentDockContainer(); if (contWid) { - KDockContainer *x = tqt_dynamic_cast<KDockContainer*>(contWid); + KDockContainer *x = dynamic_cast<KDockContainer*>(contWid); if (x) { x->setPixmap(this,pixmap); } @@ -556,14 +556,14 @@ KDockWidget::~KDockWidget() } if (latestKDockContainer()) { - KDockContainer *x = tqt_dynamic_cast<KDockContainer*>(latestKDockContainer()); + KDockContainer *x = dynamic_cast<KDockContainer*>(latestKDockContainer()); if (x) { x->removeWidget(this); } } emit iMBeingClosed(); - if (manager->d) manager->d->containerDocks.remove(TQT_TQOBJECT(this)); - manager->childDock->remove(TQT_TQOBJECT(this)); + if (manager->d) manager->d->containerDocks.remove(this); + manager->childDock->remove(this); delete pix; delete d; // destroy private data d=0; @@ -574,7 +574,7 @@ void KDockWidget::paintEvent(TQPaintEvent* pe) TQWidget::paintEvent(pe); TQPainter paint; paint.begin( this ); - style().tqdrawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup()); + style().drawPrimitive (TQStyle::PE_Panel, &paint, TQRect(0,0,width(), height()), colorGroup()); paint.end(); } @@ -719,7 +719,7 @@ void KDockWidget::setLatestKDockContainer(TQWidget* container) { if (container) { - if (tqt_dynamic_cast<KDockContainer*>(container)) + if (dynamic_cast<KDockContainer*>(container)) d->container=container; else d->container=0; @@ -729,7 +729,7 @@ void KDockWidget::setLatestKDockContainer(TQWidget* container) TQWidget* KDockWidget::latestKDockContainer() { if (!(d->container)) return 0; - if (tqt_dynamic_cast<KDockContainer*>(d->container.operator->())) return d->container; + if (dynamic_cast<KDockContainer*>(d->container.operator->())) return d->container; return 0; } @@ -778,11 +778,11 @@ void KDockWidget::updateHeader() setCursor(TQCursor(ArrowCursor)); #endif - if ( (TQT_BASE_OBJECT(parent()) == TQT_BASE_OBJECT(manager->main)) || isGroup || (eDocking == KDockWidget::DockNone) ){ + if ( (parent() == manager->main) || isGroup || (eDocking == KDockWidget::DockNone) ){ header->hide(); } else { header->setTopLevel( false ); - if (widget && tqt_dynamic_cast<KDockContainer*>(widget)) + if (widget && dynamic_cast<KDockContainer*>(widget)) header->hide(); else header->show(); @@ -799,7 +799,7 @@ void KDockWidget::updateHeader() void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) { - if ( TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(s) ) + if ( parent() != s ) { hide(); reparent(s, 0, TQPoint(0,0), false); @@ -818,7 +818,7 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) move(p); #ifndef NO_KDE2 -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if (d->transient && d->_parent) XSetTransientForHint( tqt_xdisplay(), winId(), d->_parent->winId() ); @@ -828,7 +828,7 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) #else KWin::setType( winId(), d->windowType ); #endif // BORDERLESS_WINDOW -#endif // Q_WS_X11 +#endif // TQ_WS_X11 #endif } @@ -921,7 +921,7 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos) { if (!parent()) return 0; if (!parent()->inherits("KDockSplitter")) return 0; - Orientation orientation=((pos==DockLeft) || (pos==DockRight)) ? Qt::Vertical:Qt::Horizontal; + Orientation orientation=((pos==DockLeft) || (pos==DockRight)) ? TQt::Vertical:TQt::Horizontal; if (((KDockSplitter*)(parent()))->orientation()==orientation) { KDockWidget *neighbor= @@ -930,15 +930,15 @@ KDockWidget *KDockWidget::findNearestDockWidget(DockPosition pos) static_cast<KDockWidget*>(((KDockSplitter*)(parent()))->getLast()); if (neighbor==this) - return (static_cast<KDockWidget*>(TQT_TQWIDGET(parent()->parent()))->findNearestDockWidget(pos)); + return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos)); else - if (neighbor->getWidget() && (::tqqt_cast<KDockTabGroup*>(neighbor->getWidget()))) + if (neighbor->getWidget() && (::tqt_cast<KDockTabGroup*>(neighbor->getWidget()))) return (KDockWidget*)(((KDockTabGroup*)neighbor->getWidget())->page(0)); else return neighbor; } else - return (static_cast<KDockWidget*>(TQT_TQWIDGET(parent()->parent()))->findNearestDockWidget(pos)); + return (static_cast<KDockWidget*>(parent()->parent())->findNearestDockWidget(pos)); return 0; } @@ -999,7 +999,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, * dock tab group, and our parent isn't a KDockContainer, and we have no explicit * parent dock container...we can't do much yet */ if ( parent() && !parent()->inherits("KDockSplitter") && !parentDockTabGroup() && - !(tqt_dynamic_cast<KDockContainer*>(parent())) && !parentDockContainer()){ + !(dynamic_cast<KDockContainer*>(parent())) && !parentDockContainer()){ // kdDebug(282)<<"KDockWidget::manualDock(): success = false (3)"<<endl; // kdDebug(282)<<parent()->name()<<endl; success = false; @@ -1064,11 +1064,11 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, if (!contWid) contWid=target->widget; if (contWid) { - KDockContainer *cont=tqt_dynamic_cast<KDockContainer*>(contWid); + KDockContainer *cont=dynamic_cast<KDockContainer*>(contWid); if (cont) { if (latestKDockContainer() && (latestKDockContainer()!=contWid)) { - KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(latestKDockContainer()); + KDockContainer* dc = dynamic_cast<KDockContainer*>(latestKDockContainer()); if (dc) { dc->removeWidget(this); } @@ -1124,7 +1124,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, if ( dockPos == KDockWidget::DockCenter ) { KDockTabGroup* tab = new KDockTabGroup( newDock, "_dock_tab"); - TQObject::connect(tab, TQT_SIGNAL(currentChanged(TQWidget*)), d, TQT_SLOT(slotFocusEmbeddedWidget(TQWidget*))); + TQObject::connect(tab, TQ_SIGNAL(currentChanged(TQWidget*)), d, TQ_SLOT(slotFocusEmbeddedWidget(TQWidget*))); newDock->setWidget( tab ); target->applyToWidget( tab ); @@ -1161,13 +1161,13 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos, // if to dock not to the center of the target dockwidget, // dock to newDock KDockSplitter* panner = 0L; - if ( dockPos == KDockWidget::DockTop || dockPos == KDockWidget::DockBottom ) panner = new KDockSplitter( newDock, "_dock_split_", Qt::Horizontal, spliPos ); - if ( dockPos == KDockWidget::DockLeft || dockPos == KDockWidget::DockRight ) panner = new KDockSplitter( newDock, "_dock_split_", Qt::Vertical , spliPos ); + if ( dockPos == KDockWidget::DockTop || dockPos == KDockWidget::DockBottom ) panner = new KDockSplitter( newDock, "_dock_split_", TQt::Horizontal, spliPos ); + if ( dockPos == KDockWidget::DockLeft || dockPos == KDockWidget::DockRight ) panner = new KDockSplitter( newDock, "_dock_split_", TQt::Vertical , spliPos ); newDock->setWidget( panner ); panner->setOpaqueResize(manager->splitterOpaqueResize()); panner->setKeepSize(manager->splitterKeepSize()); - panner->setFocusPolicy( TQ_NoFocus ); + panner->setFocusPolicy( TQWidget::NoFocus ); target->applyToWidget( panner ); applyToWidget( panner ); target->formerDockPos = target->currentDockPos; @@ -1227,7 +1227,7 @@ TQWidget *KDockWidget::parentDockContainer() const { if (!parent()) return 0L; TQWidget* candidate = parentWidget()->parentWidget(); - if (candidate && tqt_dynamic_cast<KDockContainer*>(candidate)) return candidate; + if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate; return 0L; } @@ -1238,7 +1238,7 @@ void KDockWidget::setForcedFixedWidth(int w) setFixedWidth(w); if (!parent()) return; if (parent()->inherits("KDockSplitter")) - ::tqqt_cast<KDockSplitter*>(parent())->setForcedFixedWidth(this,w); + ::tqt_cast<KDockSplitter*>(parent())->setForcedFixedWidth(this,w); } void KDockWidget::setForcedFixedHeight(int h) @@ -1247,7 +1247,7 @@ void KDockWidget::setForcedFixedHeight(int h) setFixedHeight(h); if (!parent()) return; if (parent()->inherits("KDockSplitter")) - ::tqqt_cast<KDockSplitter*>(parent())->setForcedFixedHeight(this,h); + ::tqt_cast<KDockSplitter*>(parent())->setForcedFixedHeight(this,h); } int KDockWidget::forcedFixedWidth() @@ -1270,7 +1270,7 @@ void KDockWidget::restoreFromForcedFixedSize() setMaximumHeight(32000); if (!parent()) return; if (parent()->inherits("KDockSplitter")) - ::tqqt_cast<KDockSplitter*>(parent())->restoreFromForcedFixedSize(this); + ::tqt_cast<KDockSplitter*>(parent())->restoreFromForcedFixedSize(this); } void KDockWidget::toDesktop() @@ -1347,13 +1347,13 @@ void KDockWidget::undock() split->deactivate(); if ( split->getFirst() == parentOfTab ){ split->activate( lastTab ); - if ( ((KDockWidget*)split->parent())->splitterOrientation == Qt::Vertical ) + if ( ((KDockWidget*)split->parent())->splitterOrientation == TQt::Vertical ) emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockLeft ); else emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockTop ); } else { split->activate( 0L, lastTab ); - if ( ((KDockWidget*)split->parent())->splitterOrientation == Qt::Vertical ) + if ( ((KDockWidget*)split->parent())->splitterOrientation == TQt::Vertical ) emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockRight ); else emit ((KDockWidget*)split->getAnother(parentOfTab))->docking( parentOfTab, KDockWidget::DockBottom ); @@ -1382,7 +1382,7 @@ void KDockWidget::undock() { // kdDebug(282)<<"undocked from dockcontainer"<<endl; undockedFromContainer=true; - KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(d->container.operator->()); + KDockContainer* dc = dynamic_cast<KDockContainer*>(d->container.operator->()); if (dc) { dc->undockWidget(this); setFormerBrotherDockWidget(dc->parentDockWidget()); @@ -1449,7 +1449,7 @@ void KDockWidget::setWidget( TQWidget* mw ) { if ( !mw ) return; - if ( TQT_BASE_OBJECT(mw->parent()) != TQT_BASE_OBJECT(this) ){ + if ( mw->parent() != this ){ mw->reparent(this, 0, TQPoint(0,0), false); } @@ -1462,11 +1462,11 @@ void KDockWidget::setWidget( TQWidget* mw ) layout = new TQVBoxLayout( this ); layout->setResizeMode( TQLayout::Minimum ); - KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(widget); + KDockContainer* dc = dynamic_cast<KDockContainer*>(widget); if (dc) { d->isContainer=true; - manager->d->containerDocks.append(TQT_TQOBJECT(this)); + manager->d->containerDocks.append(this); } else { @@ -1505,13 +1505,13 @@ void KDockWidget::setDockTabName( KDockTabGroup* tab ) bool KDockWidget::mayBeHide() const { - bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main)); + bool f = (parent() != manager->main); return ( !isGroup && !isTabGroup && f && isVisible() && ( eDocking != (int)KDockWidget::DockNone ) ); } bool KDockWidget::mayBeShow() const { - bool f = (TQT_BASE_OBJECT(parent()) != TQT_BASE_OBJECT(manager->main)); + bool f = (parent() != manager->main); return ( !isGroup && !isTabGroup && f && !isVisible() ); } @@ -1538,7 +1538,7 @@ void KDockWidget::makeDockVisible() } if (parentDockContainer()) { TQWidget *contWid=parentDockContainer(); - KDockContainer *x = tqt_dynamic_cast<KDockContainer*>(contWid); + KDockContainer *x = dynamic_cast<KDockContainer*>(contWid); if (x) { x->showWidget(this); } @@ -1560,15 +1560,15 @@ void KDockWidget::setFormerBrotherDockWidget(KDockWidget *dockWidget) { formerBrotherDockWidget = dockWidget; if( formerBrotherDockWidget ) - TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), - this, TQT_SLOT(loseFormerBrotherDockWidget()) ); + TQObject::connect( formerBrotherDockWidget, TQ_SIGNAL(iMBeingClosed()), + this, TQ_SLOT(loseFormerBrotherDockWidget()) ); } void KDockWidget::loseFormerBrotherDockWidget() { if( formerBrotherDockWidget ) - TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), - this, TQT_SLOT(loseFormerBrotherDockWidget()) ); + TQObject::disconnect( formerBrotherDockWidget, TQ_SIGNAL(iMBeingClosed()), + this, TQ_SLOT(loseFormerBrotherDockWidget()) ); formerBrotherDockWidget = 0L; repaint(); } @@ -1658,8 +1658,8 @@ KDockManager::KDockManager( TQWidget* mainWindow , const char* name ) menu = new TQPopupMenu(); #endif - connect( menu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotMenuPopup()) ); - connect( menu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuActivated(int)) ); + connect( menu, TQ_SIGNAL(aboutToShow()), TQ_SLOT(slotMenuPopup()) ); + connect( menu, TQ_SIGNAL(activated(int)), TQ_SLOT(slotMenuActivated(int)) ); childDock = new TQObjectList(); childDock->setAutoDelete( false ); @@ -1699,7 +1699,7 @@ void KDockManager::activate() obj->show(); } } - if ( !main->inherits(TQDIALOG_OBJECT_NAME_STRING) ) main->show(); + if ( !main->inherits("TQDialog") ) main->show(); } bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) @@ -1719,7 +1719,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) break; case TQEvent::MouseButtonPress: - if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){ + if ( ((TQMouseEvent*)event)->button() == TQt::LeftButton ){ if ( curdw->eDocking != (int)KDockWidget::DockNone ){ dropCancel = true; curdw->setFocus(); @@ -1744,7 +1744,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) } break; case TQEvent::MouseButtonRelease: - if ( ((TQMouseEvent*)event)->button() == Qt::LeftButton ){ + if ( ((TQMouseEvent*)event)->button() == TQt::LeftButton ){ if ( dragging ){ if ( !dropCancel ) drop(); @@ -1822,7 +1822,7 @@ bool KDockManager::eventFilter( TQObject *obj, TQEvent *event ) if (d->readyToDrag) { d->readyToDrag = false; } - if ( (((TQMouseEvent*)event)->state() == Qt::LeftButton) && + if ( (((TQMouseEvent*)event)->state() == TQt::LeftButton) && (curdw->eDocking != (int)KDockWidget::DockNone) ) { startDrag( curdw); } @@ -1860,9 +1860,9 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) } w = p; } - if ( tqt_find_obj_child( TQT_TQOBJECT(w), "KDockSplitter", "_dock_split_" ) ) return 0L; - if ( tqt_find_obj_child( TQT_TQOBJECT(w), "KDockTabGroup", "_dock_tab" ) ) return 0L; - if (tqt_dynamic_cast<KDockContainer*>(w)) return 0L; + if ( tqt_find_obj_child( w, "KDockSplitter", "_dock_split_" ) ) return 0L; + if ( tqt_find_obj_child( w, "KDockTabGroup", "_dock_tab" ) ) return 0L; + if (dynamic_cast<KDockContainer*>(w)) return 0L; if (!childDockWidgetList) return 0L; if ( childDockWidgetList->find(w) != -1 ) return 0L; @@ -1957,7 +1957,7 @@ void KDockManager::startDrag( KDockWidget* w ) curPos = KDockWidget::DockDesktop; dragging = true; - TQApplication::setOverrideCursor(TQCursor(tqsizeAllCursor)); + TQApplication::setOverrideCursor(TQCursor(TQt::sizeAllCursor)); } void KDockManager::dragMove( KDockWidget* dw, TQPoint pos ) @@ -2213,7 +2213,7 @@ void KDockManager::writeConfig(TQDomElement &base) TQObjectListIt it(*childDock); KDockWidget *obj1; while ( (obj1=(KDockWidget*)it.current()) ) { - if ( TQT_BASE_OBJECT(obj1->parent()) == TQT_BASE_OBJECT(main) ) + if ( obj1->parent() == main ) mainWidgetStr = TQString::fromLatin1(obj1->name()); nList.append(obj1->name()); ++it; @@ -2221,7 +2221,7 @@ void KDockManager::writeConfig(TQDomElement &base) for (TQObjectListIt it(d->containerDocks);it.current();++it) { - KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget); + KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget); if (dc) { dc->prepareSave(nList); } @@ -2241,7 +2241,7 @@ void KDockManager::writeConfig(TQDomElement &base) TQDomElement groupEl; if (obj->d->isContainer) { - KDockContainer* x = tqt_dynamic_cast<KDockContainer*>(obj->widget); + KDockContainer* x = dynamic_cast<KDockContainer*>(obj->widget); if (x) { groupEl=doc.createElement("dockContainer"); x->save(groupEl); @@ -2379,7 +2379,7 @@ void KDockManager::readConfig(TQDomElement &base) if (!(cont->d->isContainer)) { kdDebug(282)<<"restoration of dockContainer is only supported for already existing dock containers"<<endl; } else { - KDockContainer *dc=tqt_dynamic_cast<KDockContainer*>(cont->getWidget()); + KDockContainer *dc=dynamic_cast<KDockContainer*>(cont->getWidget()); if (!dc) kdDebug(282)<<"Error while trying to handle dockcontainer configuration restoration"<<endl; else { dc->load(childEl); @@ -2401,7 +2401,7 @@ void KDockManager::readConfig(TQDomElement &base) KDockWidget *second = getDockWidgetFromName(secondName); if (first && second) { obj = first->manualDock(second, - (orientation == (int)Qt::Vertical)? KDockWidget::DockLeft : KDockWidget::DockTop, + (orientation == (int)TQt::Vertical)? KDockWidget::DockLeft : KDockWidget::DockTop, separatorPos); if (obj) obj->setName(name.latin1()); @@ -2512,7 +2512,7 @@ void KDockManager::removeFromAutoCreateList(KDockWidget* pDockWidget) { if (!autoCreateDock) return; autoCreateDock->setAutoDelete(false); - autoCreateDock->removeRef(TQT_TQOBJECT(pDockWidget)); + autoCreateDock->removeRef(pDockWidget); autoCreateDock->setAutoDelete(true); } @@ -2548,14 +2548,14 @@ void KDockManager::writeConfig( TDEConfig* c, TQString group ) ++it; //debug(" +Add subdock %s", obj->name()); nList.append( obj->name() ); - if ( TQT_BASE_OBJECT(obj->parent()) == TQT_BASE_OBJECT(main) ) + if ( obj->parent() == main ) c->writeEntry( "Main:view", obj->name() ); } // kdDebug(282)<<TQString("list size: %1").arg(nList.count())<<endl; for (TQObjectListIt it(d->containerDocks);it.current();++it) { - KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget); + KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget); if (dc) { dc->prepareSave(nList); } @@ -2571,7 +2571,7 @@ void KDockManager::writeConfig( TDEConfig* c, TQString group ) obj->header->saveConfig( c ); } if (obj->d->isContainer) { - KDockContainer* x = tqt_dynamic_cast<KDockContainer*>(obj->widget); + KDockContainer* x = dynamic_cast<KDockContainer*>(obj->widget); if (x) { x->save(c,group); } @@ -2734,7 +2734,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group ) } if (obj && obj->d->isContainer) { - tqt_dynamic_cast<KDockContainer*>(obj->widget)->load(c,group); + dynamic_cast<KDockContainer*>(obj->widget)->load(c,group); removeFromAutoCreateList(obj); } if ( obj && obj->header){ @@ -2758,7 +2758,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group ) Orientation p = (Orientation)c->readNumEntry( oname + ":orientation" ); if ( first && last ){ - obj = first->manualDock( last, ( p == Qt::Vertical ) ? KDockWidget::DockLeft : KDockWidget::DockTop, sepPos ); + obj = first->manualDock( last, ( p == TQt::Vertical ) ? KDockWidget::DockLeft : KDockWidget::DockTop, sepPos ); if (obj){ obj->setName( oname.latin1() ); } @@ -2774,7 +2774,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group ) KDockWidget* d2 = getDockWidgetFromName( list.current() ); tabDockGroup = d2->manualDock( d1, KDockWidget::DockCenter ); if ( tabDockGroup ){ - KDockTabGroup* tab = tqt_dynamic_cast<KDockTabGroup*>(tabDockGroup->widget); + KDockTabGroup* tab = dynamic_cast<KDockTabGroup*>(tabDockGroup->widget); list.next(); while ( list.current() && tabDockGroup ){ KDockWidget* tabDock = getDockWidgetFromName( list.current() ); @@ -2791,7 +2791,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group ) obj = tabDockGroup; } - if (obj && obj->d->isContainer) tqt_dynamic_cast<KDockContainer*>(obj->widget)->load(c,group); + if (obj && obj->d->isContainer) dynamic_cast<KDockContainer*>(obj->widget)->load(c,group); if ( obj && obj->header){ obj->header->loadConfig( c ); } @@ -2890,7 +2890,7 @@ KDockWidget* KDockManager::getDockWidgetFromName( const TQString& dockName ) if ( autoCreateDock ){ kdDebug(282)<<"Autocreating dock: "<<dockName<<endl; autoCreate = new KDockWidget( this, dockName.latin1(), TQPixmap(TQString("")) ); - autoCreateDock->append( TQT_TQOBJECT(autoCreate) ); + autoCreateDock->append( autoCreate ); } return autoCreate; } @@ -3105,7 +3105,7 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize) #ifndef NO_KDE2 // kdDebug(282)<<"KDockArea::resize"<<endl; #endif - TQObjectList *list=queryList(TQWIDGET_OBJECT_NAME_STRING,0,false); + TQObjectList *list=queryList("TQWidget",0,false); TQObjectListIt it( *list ); // iterate over the buttons TQObject *obj; @@ -3123,7 +3123,7 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize) // TQPtrList<TQObject> list(children()); // TQObject *obj=((TQPtrList<TQObject*>)children())->at(i); TQObject *obj=children()->getFirst(); - if (split = tqt_dynamic_cast<KDockSplitter*>(obj)) + if (split = dynamic_cast<KDockSplitter*>(obj)) { split->setGeometry( TQRect(TQPoint(0,0), size() )); // break; @@ -3179,7 +3179,7 @@ void KDockContainer::activateOverlapMode(int nonOverlapSize) { m_overlapMode=true; if (parentDockWidget() && parentDockWidget()->parent()) { kdDebug(282)<<"KDockContainer::activateOverlapMode: recalculating sizes"<<endl; - KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()-> + KDockSplitter *sp= ::tqt_cast<KDockSplitter*>(parentDockWidget()-> parent()); if (sp) sp->resizeEvent(0); @@ -3191,7 +3191,7 @@ void KDockContainer::deactivateOverlapMode() { m_overlapMode=false; if (parentDockWidget() && parentDockWidget()->parent()) { kdDebug(282)<<"KDockContainer::deactivateOverlapMode: recalculating sizes"<<endl; - KDockSplitter *sp= ::tqqt_cast<KDockSplitter*>(parentDockWidget()-> + KDockSplitter *sp= ::tqt_cast<KDockSplitter*>(parentDockWidget()-> parent()); if (sp) sp->resizeEvent(0); @@ -3280,7 +3280,7 @@ void KDockContainer::prepareSave(TQStringList &names) TQWidget *KDockTabGroup::transientTo() { TQWidget *tT=0; for (int i=0;i<count();i++) { - KDockWidget *dw=::tqqt_cast<KDockWidget*>(page(i)); + KDockWidget *dw=::tqt_cast<KDockWidget*>(page(i)); TQWidget *tmp; if ((tmp=dw->transientTo())) { if (!tT) tT=tmp; diff --git a/tdeui/kdockwidget.h b/tdeui/kdockwidget.h index e6c9bae1a..6c6d48d92 100644 --- a/tdeui/kdockwidget.h +++ b/tdeui/kdockwidget.h @@ -37,7 +37,7 @@ - KDockWidget - IMPORTANT CLASS: the one and only dockwidget class - KDockManager - helper class - KDockMainWindow - IMPORTANT CLASS: a special TDEMainWindow that can have dockwidgets - - KDockArea - like KDockMainWindow but inherits just QWidget + - KDockArea - like KDockMainWindow but inherits just TQWidget IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition! */ @@ -102,7 +102,7 @@ namespace KMDI */ class TDEUI_EXPORT KDockWidgetAbstractHeader : public TQFrame { - Q_OBJECT + TQ_OBJECT public: @@ -152,7 +152,7 @@ private: */ class TDEUI_EXPORT KDockWidgetAbstractHeaderDrag : public TQFrame { - Q_OBJECT + TQ_OBJECT public: @@ -198,7 +198,7 @@ private: */ class TDEUI_EXPORT KDockWidgetHeaderDrag : public KDockWidgetAbstractHeaderDrag { - Q_OBJECT + TQ_OBJECT public: @@ -240,7 +240,7 @@ private: */ class TDEUI_EXPORT KDockWidgetHeader : public KDockWidgetAbstractHeader { - Q_OBJECT + TQ_OBJECT public: @@ -366,7 +366,7 @@ private: */ class TDEUI_EXPORT KDockTabGroup : public TQTabWidget { - Q_OBJECT + TQ_OBJECT public: /** @@ -427,7 +427,7 @@ private: */ class TDEUI_EXPORT KDockWidget: public TQWidget { - Q_OBJECT + TQ_OBJECT friend class KDockManager; friend class KDockSplitter; @@ -448,7 +448,7 @@ public: * @param parent Parent widget * @param strCaption Title of the dockwidget window (shown when toplevel) * @param strTabPageLabel The title of the tab page (shown when in tab page mode), if it is "", only the icon will be shown, if it is 0L, the label is set to strCaption - * @param f Qt::WidgetFlags widget flags + * @param f TQt::WidgetFlags widget flags */ KDockWidget( KDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = TQString::null, @@ -914,7 +914,7 @@ private: */ class TDEUI_EXPORT KDockManager: public TQObject { - Q_OBJECT + TQ_OBJECT friend class KDockWidget; friend class KDockMainWindow; @@ -1313,7 +1313,7 @@ private: */ class TDEUI_EXPORT KDockMainWindow : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT friend class KDockManager; @@ -1330,7 +1330,7 @@ public: * * @param parent Parent widget for the dock main widget * @param name internal object name - * @param f Qt::WidgetFlags widget flags + * @param f TQt::WidgetFlags widget flags */ #ifdef qdoc KDockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); @@ -1484,7 +1484,7 @@ private: class TDEUI_EXPORT KDockArea : public TQWidget { - Q_OBJECT + TQ_OBJECT friend class KDockManager; diff --git a/tdeui/kdockwidget_private.cpp b/tdeui/kdockwidget_private.cpp index a067efe2a..13e5a7ea6 100644 --- a/tdeui/kdockwidget_private.cpp +++ b/tdeui/kdockwidget_private.cpp @@ -61,10 +61,10 @@ void KDockSplitter::activate(TQWidget *c0, TQWidget *c1) divider->setLineWidth(1); divider->raise(); - if (m_orientation == Qt::Horizontal) - divider->setCursor(TQCursor(tqsizeVerCursor)); + if (m_orientation == TQt::Horizontal) + divider->setCursor(TQCursor(TQt::sizeVerCursor)); else - divider->setCursor(TQCursor(tqsizeHorCursor)); + divider->setCursor(TQCursor(TQt::sizeHorCursor)); divider->installEventFilter(this); initialised= true; @@ -173,7 +173,7 @@ void KDockSplitter::setupMinMaxSize() { // Set the minimum and maximum sizes for the KDockSplitter (this) int minx, maxx, miny, maxy; - if (m_orientation == Qt::Horizontal) { + if (m_orientation == TQt::Horizontal) { miny = child0->minimumHeight() + child1->minimumHeight() + 4; maxy = child0->maximumHeight() + child1->maximumHeight() + 4; minx = (child0->minimumWidth() > child1->minimumWidth()) ? child0->minimumWidth() : child1->minimumWidth(); @@ -266,15 +266,15 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) // if (ev && isVisible() && divider->isVisible()) { // real resize event. -// kdDebug(282)<<"mKeepSize : "<< ((m_orientation == Qt::Horizontal) ? "Horizontal":"Vertical") <<endl; +// kdDebug(282)<<"mKeepSize : "<< ((m_orientation == TQt::Horizontal) ? "Horizontal":"Vertical") <<endl; if (mKeepSize) { // keep the splitter on a fixed position. This may be a bit inaccurate, because // xpos saves a proportional value, which means there might occur rounding errors. // However, this works surprising well! - if (m_orientation == Qt::Horizontal) { + if (m_orientation == TQt::Horizontal) { if (ev->oldSize().height() != ev->size().height()) { - if( (c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) { + if( (c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) { // dockwidget is on the bottom. move xpos so that the size from child1 stays xpos = (int)ceil(((double)factor) * checkValue(height() - child1->height() - 4) / height()); } else { @@ -286,7 +286,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) } } else { if (ev->oldSize().width() != width()) { - if( (c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) { + if( (c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) { xpos = (int)ceil(((double)factor) * checkValue(width() - child1->width() - 4) / width()); } else { // xpos should not change @@ -307,7 +307,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) // values. // if ( isVisible()) { - if (m_orientation == Qt::Horizontal) { + if (m_orientation == TQt::Horizontal) { if (fixedHeight0!=-1) xpos = checkValue(fixedHeight0) * factor / height(); else if (fixedHeight1!=-1) @@ -327,16 +327,16 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) /* // --- debugging information --- kdDebug(282) << "isVisible() is : " << isVisible() << endl; - kdDebug(282) << "Orientation : " << (m_orientation==Qt::Horizontal?"Horizontal":"Vertical") + kdDebug(282) << "Orientation : " << (m_orientation==TQt::Horizontal?"Horizontal":"Vertical") << endl; kdDebug(282) << "Splitter visibility : " << divider->isVisible() << endl;; kdDebug(282) << "Splitter procentual pos: " << xpos << endl; if (c0->getWidget()) { - dc=tqt_dynamic_cast<KDockContainer*>(c0->getWidget()); + dc=dynamic_cast<KDockContainer*>(c0->getWidget()); kdDebug(282) << "Child 0 KDockContainer?: " << dc << endl; } if (c1->getWidget()) { - dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()); + dc=dynamic_cast<KDockContainer*>(c1->getWidget()); kdDebug(282) << "Child 1 KDockContainer?: " << dc << endl; } kdDebug(282) << "Child0 : " << child0 << endl; @@ -346,16 +346,16 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) // // handle overlapped widgets only. // - if( ( (m_orientation==Qt::Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) || - ( (m_orientation==Qt::Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) { - if ((c0->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c0->getWidget())) + if( ( (m_orientation==TQt::Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) || + ( (m_orientation==TQt::Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) { + if ((c0->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c0->getWidget())) && (dc->isOverlapMode())) { // child0 ist a KDockContainer int position; child0->show(); child0->raise(); divider->raise(); - if (m_orientation == Qt::Horizontal) { + if (m_orientation == TQt::Horizontal) { position = checkValueOverlapped( height() * xpos / factor, child0 ); child0->setGeometry(0, 0, width(), position); child1->setGeometry(0, dc->m_nonOverlapSize, width(), height()-dc->m_nonOverlapSize); @@ -367,14 +367,14 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) divider->setGeometry(position, 0, 4, height()); } } else { - if ((c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget())) + if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget())) && (dc->isOverlapMode())) { // child1 ist a KDockContainer int position; child1->show(); child1->raise(); divider->raise(); - if (m_orientation == Qt::Horizontal) { + if (m_orientation == TQt::Horizontal) { position = checkValueOverlapped( height() * xpos / factor, child1 ); child0->setGeometry(0, 0, width(), height()-dc->m_nonOverlapSize); child1->setGeometry(0, position+4, width(), height()-position-4); @@ -399,11 +399,11 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) // the child0 and child1 adjoin. // if (stdHandling) { - int position = checkValue( (m_orientation == Qt::Vertical ? width() : height()) * xpos / factor ); + int position = checkValue( (m_orientation == TQt::Vertical ? width() : height()) * xpos / factor ); int diff = 0; - if (m_orientation == Qt::Horizontal) { - if ((c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) { + if (m_orientation == TQt::Horizontal) { + if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) { // bottom is dockcontainer if( divider->isVisible() ) { child0->setGeometry(0, 0, width(), position); @@ -419,7 +419,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) } divider->setGeometry(0, position, width(), 4); } else { - if ((c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) { + if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) { // right is dockcontainer if( divider->isVisible() ) { child0->setGeometry(0, 0, position, height()); @@ -442,7 +442,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev) int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidget) const { if (initialised) { - if (m_orientation == Qt::Vertical) { + if (m_orientation == TQt::Vertical) { if (child0==overlappingWidget) { if (position < child0->minimumWidth() || position > width()) position = child0->minimumWidth(); @@ -450,7 +450,7 @@ int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidge if (position > (width()-child1->minimumWidth()-4) || position < 0) position = width()-child1->minimumWidth()-4; } - } else {// orientation == Qt::Horizontal + } else {// orientation == TQt::Horizontal if (child0==overlappingWidget) { if (position < (child0->minimumHeight()) || position > height()) position = child0->minimumHeight(); @@ -466,7 +466,7 @@ int KDockSplitter::checkValueOverlapped(int position, TQWidget *overlappingWidge int KDockSplitter::checkValue( int position ) const { if (initialised) { - if (m_orientation == Qt::Vertical) { + if (m_orientation == TQt::Vertical) { if (position < child0->minimumWidth()) position = child0->minimumWidth(); if ((width()-4-position) < (child1->minimumWidth())) @@ -481,9 +481,9 @@ int KDockSplitter::checkValue( int position ) const if (position < 0) position = 0; - if ((m_orientation == Qt::Vertical) && (position > width())) + if ((m_orientation == TQt::Vertical) && (position > width())) position = width(); - if ((m_orientation == Qt::Horizontal) && (position > height())) + if ((m_orientation == TQt::Horizontal) && (position > height())) position = height(); return position; @@ -499,7 +499,7 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e) mev= (TQMouseEvent*)e; child0->setUpdatesEnabled(mOpaqueResize); child1->setUpdatesEnabled(mOpaqueResize); - if (m_orientation == Qt::Horizontal) { + if (m_orientation == TQt::Horizontal) { if ((fixedHeight0!=-1) || (fixedHeight1!=-1)) { handled=true; break; @@ -539,7 +539,7 @@ bool KDockSplitter::eventFilter(TQObject *o, TQEvent *e) child0->setUpdatesEnabled(true); child1->setUpdatesEnabled(true); mev= (TQMouseEvent*)e; - if (m_orientation == Qt::Horizontal){ + if (m_orientation == TQt::Horizontal){ if ((fixedHeight0!=-1) || (fixedHeight1!=-1)) { handled=true; break; @@ -625,7 +625,7 @@ KDockButton_Private::KDockButton_Private( TQWidget *parent, const char * name ) :TQPushButton( parent, name ) { moveMouse = false; - setFocusPolicy( TQ_NoFocus ); + setFocusPolicy( TQWidget::NoFocus ); } KDockButton_Private::~KDockButton_Private() @@ -701,7 +701,7 @@ void KDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w) { if (w) { TQWidget* embeddedWdg = ((KDockWidget*)w)->getWidget(); - if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQ_ClickFocus) || (embeddedWdg->focusPolicy() == TQ_StrongFocus))) { + if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) { embeddedWdg->setFocus(); } } diff --git a/tdeui/kdockwidget_private.h b/tdeui/kdockwidget_private.h index a72532e3d..b6cc685d0 100644 --- a/tdeui/kdockwidget_private.h +++ b/tdeui/kdockwidget_private.h @@ -47,7 +47,7 @@ class TDEUI_EXPORT KDockSplitter : public TQWidget // which copies the whole definition of the class to be able to access separatorPosInPercent etc. // This needs real fixing in KDE4. - Q_OBJECT + TQ_OBJECT public: /** * Constructor. @@ -56,7 +56,7 @@ public: * @param orient orientation. Either @p Vertical or @p Horizontal * @param pos procentual position of the splitter. Must be int [0...100]. */ - KDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= Qt::Vertical, int pos= 50); + KDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= TQt::Vertical, int pos= 50); virtual ~KDockSplitter(){} /** @@ -247,7 +247,7 @@ private: */ class TDEUI_EXPORT KDockButton_Private : public TQPushButton { - Q_OBJECT + TQ_OBJECT public: KDockButton_Private( TQWidget *parent=0, const char *name=0 ); ~KDockButton_Private(); @@ -272,7 +272,7 @@ private: */ class KDockWidgetPrivate : public TQObject { - Q_OBJECT + TQ_OBJECT public: KDockWidgetPrivate(); ~KDockWidgetPrivate(); diff --git a/tdeui/kdockwindow.h b/tdeui/kdockwindow.h index 4b7a34049..12aadf4b7 100644 --- a/tdeui/kdockwindow.h +++ b/tdeui/kdockwindow.h @@ -29,9 +29,9 @@ * This class is obsolete, it is provided for compatibility only. * Use KSystemTray instead. */ -class KDE_DEPRECATED KDockWindow : public KSystemTray +class TDE_DEPRECATED KDockWindow : public KSystemTray { - Q_OBJECT + TQ_OBJECT public: KDockWindow( TQWidget* parent = 0, const char* name = 0 ) : KSystemTray( parent, name ) {} diff --git a/tdeui/kdualcolorbutton.cpp b/tdeui/kdualcolorbutton.cpp index 532e4aaaa..44bd6d6f2 100644 --- a/tdeui/kdualcolorbutton.cpp +++ b/tdeui/kdualcolorbutton.cpp @@ -46,8 +46,8 @@ KDualColorButton::KDualColorButton(TQWidget *parent, const char *name, TQWidget* (const unsigned char *)dcolorarrow_bits, true); arrowBitmap->setMask(*arrowBitmap); // heh resetPixmap = new TQPixmap((const char **)dcolorreset_xpm); - fg = TQBrush(Qt::black, Qt::SolidPattern); - bg = TQBrush(Qt::white, Qt::SolidPattern); + fg = TQBrush(TQt::black, TQt::SolidPattern); + bg = TQBrush(TQt::white, TQt::SolidPattern); curColor = Foreground; dragFlag = false; miniCtlFlag = false; @@ -67,8 +67,8 @@ KDualColorButton::KDualColorButton(const TQColor &fgColor, const TQColor &bgColo (const unsigned char *)dcolorarrow_bits, true); arrowBitmap->setMask(*arrowBitmap); resetPixmap = new TQPixmap((const char **)dcolorreset_xpm); - fg = TQBrush(fgColor, Qt::SolidPattern); - bg = TQBrush(bgColor, Qt::SolidPattern); + fg = TQBrush(fgColor, TQt::SolidPattern); + bg = TQBrush(bgColor, TQt::SolidPattern); curColor = Foreground; dragFlag = false; miniCtlFlag = false; @@ -111,7 +111,7 @@ TQSize KDualColorButton::sizeHint() const void KDualColorButton::setForeground(const TQColor &c) { - fg = TQBrush(c, Qt::SolidPattern); + fg = TQBrush(c, TQt::SolidPattern); repaint(false); emit fgChanged(fg.color()); @@ -119,7 +119,7 @@ void KDualColorButton::setForeground(const TQColor &c) void KDualColorButton::setBackground(const TQColor &c) { - bg = TQBrush(c, Qt::SolidPattern); + bg = TQBrush(c, TQt::SolidPattern); repaint(false); emit bgChanged(bg.color()); @@ -128,9 +128,9 @@ void KDualColorButton::setBackground(const TQColor &c) void KDualColorButton::setCurrentColor(const TQColor &c) { if(curColor == Background) - bg = TQBrush(c, Qt::SolidPattern); + bg = TQBrush(c, TQt::SolidPattern); else - fg = TQBrush(c, Qt::SolidPattern); + fg = TQBrush(c, TQt::SolidPattern); repaint(false); } @@ -211,8 +211,8 @@ void KDualColorButton::mousePressEvent(TQMouseEvent *ev) miniCtlFlag = true; } else if(ev->pos().x() < bgRect.x()){ - fg.setColor(Qt::black); - bg.setColor(Qt::white); + fg.setColor(TQt::black); + bg.setColor(TQt::white); emit fgChanged(fg.color()); emit bgChanged(bg.color()); miniCtlFlag = true; diff --git a/tdeui/kdualcolorbutton.h b/tdeui/kdualcolorbutton.h index 2495750f8..15e04d39d 100644 --- a/tdeui/kdualcolorbutton.h +++ b/tdeui/kdualcolorbutton.h @@ -47,7 +47,7 @@ class TQBitmap; */ class TDEUI_EXPORT KDualColorButton : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_ENUMS( DualColor ) TQ_PROPERTY( TQColor foreground READ foreground WRITE setForeground ) TQ_PROPERTY( TQColor background READ background WRITE setBackground ) diff --git a/tdeui/keditcl.h b/tdeui/keditcl.h index aefd3df81..2f84e4622 100644 --- a/tdeui/keditcl.h +++ b/tdeui/keditcl.h @@ -36,7 +36,7 @@ class TQVButtonGroup; class TDEUI_EXPORT KEdGotoLine : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KEdGotoLine( TQWidget *parent=0, const char *name=0, bool modal=true ); @@ -58,7 +58,7 @@ private: /// class TDEUI_EXPORT KEdFind : public KDialogBase { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQString text READ getText WRITE setText ) TQ_PROPERTY( bool caseSensitivity READ case_sensitive WRITE setCaseSensitive ) TQ_PROPERTY( bool direction READ get_direction WRITE setDirection ) @@ -108,7 +108,7 @@ private: /// class TDEUI_EXPORT KEdReplace : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: @@ -170,7 +170,7 @@ private: class TDEUI_EXPORT_DEPRECATED KEdit : public TQMultiLineEdit { - Q_OBJECT + TQ_OBJECT public: /** @@ -403,7 +403,7 @@ protected: private: TQTimer* repaintTimer; - QString killbufferstring; + TQString killbufferstring; TQWidget *parent; KEdFind *srchdialog; KEdReplace *replace_dialog; diff --git a/tdeui/keditcl1.cpp b/tdeui/keditcl1.cpp index a550a7af1..85ccd1c88 100644 --- a/tdeui/keditcl1.cpp +++ b/tdeui/keditcl1.cpp @@ -67,8 +67,8 @@ KEdit::KEdit(TQWidget *_parent, const char *name) setAcceptDrops(true); KCursor::setAutoHideCursor( this, true ); - connect(this, TQT_SIGNAL(cursorPositionChanged(int,int)), - this, TQT_SLOT(slotCursorPositionChanged())); + connect(this, TQ_SIGNAL(cursorPositionChanged(int,int)), + this, TQ_SLOT(slotCursorPositionChanged())); } diff --git a/tdeui/keditcl2.cpp b/tdeui/keditcl2.cpp index 0c147e4b8..3ccb5226b 100644 --- a/tdeui/keditcl2.cpp +++ b/tdeui/keditcl2.cpp @@ -58,8 +58,8 @@ void KEdit::search(){ if( !srchdialog ) { srchdialog = new KEdFind( this, "searchdialog", false); - connect(srchdialog,TQT_SIGNAL(search()),this,TQT_SLOT(search_slot())); - connect(srchdialog,TQT_SIGNAL(done()),this,TQT_SLOT(searchdone_slot())); + connect(srchdialog,TQ_SIGNAL(search()),this,TQ_SLOT(search_slot())); + connect(srchdialog,TQ_SIGNAL(done()),this,TQ_SLOT(searchdone_slot())); } // If we already searched / replaced something before make sure it shows @@ -254,10 +254,10 @@ void KEdit::replace() if( !replace_dialog ) { replace_dialog = new KEdReplace( this, "replace_dialog", false ); - connect(replace_dialog,TQT_SIGNAL(find()),this,TQT_SLOT(replace_search_slot())); - connect(replace_dialog,TQT_SIGNAL(replace()),this,TQT_SLOT(replace_slot())); - connect(replace_dialog,TQT_SIGNAL(replaceAll()),this,TQT_SLOT(replace_all_slot())); - connect(replace_dialog,TQT_SIGNAL(done()),this,TQT_SLOT(replacedone_slot())); + connect(replace_dialog,TQ_SIGNAL(find()),this,TQ_SLOT(replace_search_slot())); + connect(replace_dialog,TQ_SIGNAL(replace()),this,TQ_SLOT(replace_slot())); + connect(replace_dialog,TQ_SIGNAL(replaceAll()),this,TQ_SLOT(replace_all_slot())); + connect(replace_dialog,TQ_SIGNAL(done()),this,TQ_SLOT(replacedone_slot())); } TQString string = replace_dialog->getText(); @@ -715,8 +715,8 @@ KEdFind::KEdFind( TQWidget *parent, const char *name, bool modal ) d->combo->setMinimumWidth(fontMetrics().maxWidth()*20); d->combo->setFocus(); - connect(d->combo, TQT_SIGNAL(textChanged ( const TQString & )), - this,TQT_SLOT(textSearchChanged ( const TQString & ))); + connect(d->combo, TQ_SIGNAL(textChanged ( const TQString & )), + this,TQ_SLOT(textSearchChanged ( const TQString & ))); topLayout->addWidget(d->combo); @@ -734,7 +734,7 @@ KEdFind::KEdFind( TQWidget *parent, const char *name, bool modal ) enableButton( KDialogBase::User1, !d->combo->currentText().isEmpty() ); if ( !modal ) - connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( slotCancel() ) ); + connect( this, TQ_SIGNAL( closeClicked() ), this, TQ_SLOT( slotCancel() ) ); } KEdFind::~KEdFind() @@ -834,7 +834,7 @@ KEdReplace::KEdReplace( TQWidget *parent, const char *name, bool modal ) { setWFlags( WType_TopLevel ); - setButtonBoxOrientation( Qt::Vertical ); + setButtonBoxOrientation( TQt::Vertical ); TQFrame *page = makeMainWidget(); TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); @@ -856,8 +856,8 @@ KEdReplace::KEdReplace( TQWidget *parent, const char *name, bool modal ) d->replaceCombo->setMinimumWidth(fontMetrics().maxWidth()*20); topLayout->addWidget(d->replaceCombo); - connect(d->searchCombo, TQT_SIGNAL(textChanged ( const TQString & )), - this,TQT_SLOT(textSearchChanged ( const TQString & ))); + connect(d->searchCombo, TQ_SIGNAL(textChanged ( const TQString & )), + this,TQ_SLOT(textSearchChanged ( const TQString & ))); TQButtonGroup *group = new TQButtonGroup( i18n("Options"), page ); topLayout->addWidget( group ); diff --git a/tdeui/keditlistbox.cpp b/tdeui/keditlistbox.cpp index 142c4b437..92efce083 100644 --- a/tdeui/keditlistbox.cpp +++ b/tdeui/keditlistbox.cpp @@ -105,10 +105,10 @@ void KEditListBox::init( bool checkAtEntering, int buttons, d->buttons = 0; setButtons( buttons ); - connect(m_lineEdit,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(typedSomething(const TQString&))); + connect(m_lineEdit,TQ_SIGNAL(textChanged(const TQString&)),this,TQ_SLOT(typedSomething(const TQString&))); m_lineEdit->setTrapReturnKey(true); - connect(m_lineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(addItem())); - connect(m_listBox, TQT_SIGNAL(highlighted(int)), TQT_SLOT(enableMoveButtons(int))); + connect(m_lineEdit,TQ_SIGNAL(returnPressed()),this,TQ_SLOT(addItem())); + connect(m_listBox, TQ_SIGNAL(highlighted(int)), TQ_SLOT(enableMoveButtons(int))); // maybe supplied lineedit has some text already typedSomething( m_lineEdit->text() ); @@ -124,7 +124,7 @@ void KEditListBox::setButtons( uint buttons ) servNewButton = new TQPushButton(i18n("&Add"), this); servNewButton->setEnabled(false); servNewButton->show(); - connect(servNewButton, TQT_SIGNAL(clicked()), TQT_SLOT(addItem())); + connect(servNewButton, TQ_SIGNAL(clicked()), TQ_SLOT(addItem())); grid->addWidget(servNewButton, 2, 1); } else if ( ( buttons & Add ) == 0 && servNewButton ) { @@ -136,7 +136,7 @@ void KEditListBox::setButtons( uint buttons ) servRemoveButton = new TQPushButton(i18n("&Remove"), this); servRemoveButton->setEnabled(false); servRemoveButton->show(); - connect(servRemoveButton, TQT_SIGNAL(clicked()), TQT_SLOT(removeItem())); + connect(servRemoveButton, TQ_SIGNAL(clicked()), TQ_SLOT(removeItem())); grid->addWidget(servRemoveButton, 3, 1); } else if ( ( buttons & Remove ) == 0 && servRemoveButton ) { @@ -148,12 +148,12 @@ void KEditListBox::setButtons( uint buttons ) servUpButton = new TQPushButton(i18n("Move &Up"), this); servUpButton->setEnabled(false); servUpButton->show(); - connect(servUpButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemUp())); + connect(servUpButton, TQ_SIGNAL(clicked()), TQ_SLOT(moveItemUp())); servDownButton = new TQPushButton(i18n("Move &Down"), this); servDownButton->setEnabled(false); servDownButton->show(); - connect(servDownButton, TQT_SIGNAL(clicked()), TQT_SLOT(moveItemDown())); + connect(servDownButton, TQ_SIGNAL(clicked()), TQ_SLOT(moveItemDown())); grid->addWidget(servUpButton, 4, 1); grid->addWidget(servDownButton, 5, 1); @@ -418,7 +418,7 @@ void KEditListBox::virtual_hook( int, void* ) KEditListBox::CustomEditor::CustomEditor( KComboBox *combo ) { m_representationWidget = combo; - m_lineEdit = tqt_dynamic_cast<KLineEdit*>( combo->lineEdit() ); + m_lineEdit = dynamic_cast<KLineEdit*>( combo->lineEdit() ); assert( m_lineEdit ); } diff --git a/tdeui/keditlistbox.h b/tdeui/keditlistbox.h index c6930128b..0a986b93e 100644 --- a/tdeui/keditlistbox.h +++ b/tdeui/keditlistbox.h @@ -43,7 +43,7 @@ class KEditListBoxPrivate; */ class TDEUI_EXPORT KEditListBox : public TQGroupBox { - Q_OBJECT + TQ_OBJECT TQ_SETS( Button ) diff --git a/tdeui/kedittoolbar.cpp b/tdeui/kedittoolbar.cpp index 13d928b52..be0d47a51 100644 --- a/tdeui/kedittoolbar.cpp +++ b/tdeui/kedittoolbar.cpp @@ -31,11 +31,11 @@ #include <tqtextstream.h> #include <tdeaction.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdelocale.h> #include <kicontheme.h> #include <kiconloader.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <tdemessagebox.h> #include <kxmlguifactory.h> #include <kseparator.h> @@ -43,7 +43,7 @@ #include <tdelistview.h> #include <kdebug.h> #include <kpushbutton.h> -#include <kprocio.h> +#include <tdeprocio.h> static const char * const lineseparatorstring = I18N_NOOP("--- line separator ---"); static const char * const separatorstring = I18N_NOOP("--- separator ---"); @@ -357,7 +357,7 @@ public: KSeparator *m_comboSeparator; TQLabel * m_helpArea; KPushButton* m_changeIcon; - KProcIO* m_kdialogProcess; + TDEProcIO* m_kdialogProcess; bool m_hasKDialog; }; @@ -422,8 +422,8 @@ void KEditToolbar::init() setMainWidget(m_widget); - connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(acceptOK(bool))); - connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(enableButtonApply(bool))); + connect(m_widget, TQ_SIGNAL(enableOk(bool)), TQ_SLOT(acceptOK(bool))); + connect(m_widget, TQ_SIGNAL(enableOk(bool)), TQ_SLOT(enableButtonApply(bool))); enableButtonApply(false); setMinimumSize(sizeHint()); @@ -499,8 +499,8 @@ void KEditToolbar::slotDefault() setMainWidget(m_widget); m_widget->show(); - connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(acceptOK(bool))); - connect(m_widget, TQT_SIGNAL(enableOk(bool)), TQT_SLOT(enableButtonApply(bool))); + connect(m_widget, TQ_SIGNAL(enableOk(bool)), TQ_SLOT(acceptOK(bool))); + connect(m_widget, TQ_SIGNAL(enableOk(bool)), TQ_SLOT(enableButtonApply(bool))); enableButtonApply(false); emit newToolbarConfig(); @@ -762,8 +762,8 @@ void KEditToolbarWidget::setupLayout() m_toolbarCombo->setEnabled(false); d->m_comboLabel->setBuddy(m_toolbarCombo); d->m_comboSeparator = new KSeparator(this); - connect(m_toolbarCombo, TQT_SIGNAL(activated(const TQString&)), - this, TQT_SLOT(slotToolbarSelected(const TQString&))); + connect(m_toolbarCombo, TQ_SIGNAL(activated(const TQString&)), + this, TQ_SLOT(slotToolbarSelected(const TQString&))); // TQPushButton *new_toolbar = new TQPushButton(i18n("&New"), this); // new_toolbar->setPixmap(BarIcon("document-new", TDEIcon::SizeSmall)); @@ -785,10 +785,10 @@ void KEditToolbarWidget::setupLayout() int column2 = m_inactiveList->addColumn(""); // text m_inactiveList->setSorting( column2 ); inactive_label->setBuddy(m_inactiveList); - connect(m_inactiveList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), - this, TQT_SLOT(slotInactiveSelected(TQListViewItem *))); - connect(m_inactiveList, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )), - this, TQT_SLOT(slotInsertButton())); + connect(m_inactiveList, TQ_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQ_SLOT(slotInactiveSelected(TQListViewItem *))); + connect(m_inactiveList, TQ_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )), + this, TQ_SLOT(slotInsertButton())); // our list of active actions TQLabel *active_label = new TQLabel(i18n("Curr&ent actions:"), this); @@ -804,14 +804,14 @@ void KEditToolbarWidget::setupLayout() m_activeList->setSorting(-1); active_label->setBuddy(m_activeList); - connect(m_inactiveList, TQT_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), - this, TQT_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); - connect(m_activeList, TQT_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), - this, TQT_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); - connect(m_activeList, TQT_SIGNAL(selectionChanged(TQListViewItem *)), - this, TQT_SLOT(slotActiveSelected(TQListViewItem *))); - connect(m_activeList, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )), - this, TQT_SLOT(slotRemoveButton())); + connect(m_inactiveList, TQ_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), + this, TQ_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); + connect(m_activeList, TQ_SIGNAL(dropped(TDEListView*,TQDropEvent*,TQListViewItem*)), + this, TQ_SLOT(slotDropped(TDEListView*,TQDropEvent*,TQListViewItem*))); + connect(m_activeList, TQ_SIGNAL(selectionChanged(TQListViewItem *)), + this, TQ_SLOT(slotActiveSelected(TQListViewItem *))); + connect(m_activeList, TQ_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )), + this, TQ_SLOT(slotRemoveButton())); // "change icon" button d->m_changeIcon = new KPushButton( i18n( "Change &Icon..." ), this ); @@ -819,8 +819,8 @@ void KEditToolbarWidget::setupLayout() d->m_hasKDialog = !kdialogExe.isEmpty(); d->m_changeIcon->setEnabled( d->m_hasKDialog ); - connect( d->m_changeIcon, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( slotChangeIcon() ) ); + connect( d->m_changeIcon, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( slotChangeIcon() ) ); // The buttons in the middle TQIconSet iconSet; @@ -830,26 +830,26 @@ void KEditToolbarWidget::setupLayout() m_upAction->setIconSet( iconSet ); m_upAction->setEnabled(false); m_upAction->setAutoRepeat(true); - connect(m_upAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotUpButton())); + connect(m_upAction, TQ_SIGNAL(clicked()), TQ_SLOT(slotUpButton())); m_insertAction = new TQToolButton(this); iconSet = TQApplication::reverseLayout() ? SmallIconSet( "back" ) : SmallIconSet( "forward" ); m_insertAction->setIconSet( iconSet ); m_insertAction->setEnabled(false); - connect(m_insertAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotInsertButton())); + connect(m_insertAction, TQ_SIGNAL(clicked()), TQ_SLOT(slotInsertButton())); m_removeAction = new TQToolButton(this); iconSet = TQApplication::reverseLayout() ? SmallIconSet( "forward" ) : SmallIconSet( "back" ); m_removeAction->setIconSet( iconSet ); m_removeAction->setEnabled(false); - connect(m_removeAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveButton())); + connect(m_removeAction, TQ_SIGNAL(clicked()), TQ_SLOT(slotRemoveButton())); m_downAction = new TQToolButton(this); iconSet = SmallIconSet( "go-down" ); m_downAction->setIconSet( iconSet ); m_downAction->setEnabled(false); m_downAction->setAutoRepeat(true); - connect(m_downAction, TQT_SIGNAL(clicked()), TQT_SLOT(slotDownButton())); + connect(m_downAction, TQ_SIGNAL(clicked()), TQ_SLOT(slotDownButton())); d->m_helpArea = new TQLabel(this); d->m_helpArea->setAlignment( TQt::WordBreak ); @@ -890,7 +890,7 @@ void KEditToolbarWidget::setupLayout() changeIcon_layout->addStretch( 1 ); list_layout->addLayout(inactive_layout); - list_layout->addLayout(TQT_TQLAYOUT(button_layout)); + list_layout->addLayout(button_layout); list_layout->addLayout(active_layout); top_layout->addLayout(name_layout); @@ -1387,7 +1387,7 @@ void KEditToolbarWidget::slotChangeIcon() if ( d->m_kdialogProcess && d->m_kdialogProcess->isRunning() ) return; - d->m_kdialogProcess = new KProcIO; + d->m_kdialogProcess = new TDEProcIO; TQString kdialogExe = TDEStandardDirs::findExe(TQString::fromLatin1("kdialog")); (*d->m_kdialogProcess) << kdialogExe; (*d->m_kdialogProcess) << "--embed"; @@ -1405,8 +1405,8 @@ void KEditToolbarWidget::slotChangeIcon() m_activeList->setEnabled( false ); // don't change the current item m_toolbarCombo->setEnabled( false ); // don't change the current toolbar - connect( d->m_kdialogProcess, TQT_SIGNAL( processExited( TDEProcess* ) ), - this, TQT_SLOT( slotProcessExited( TDEProcess* ) ) ); + connect( d->m_kdialogProcess, TQ_SIGNAL( processExited( TDEProcess* ) ), + this, TQ_SLOT( slotProcessExited( TDEProcess* ) ) ); } void KEditToolbarWidget::slotProcessExited( TDEProcess* ) diff --git a/tdeui/kedittoolbar.h b/tdeui/kedittoolbar.h index 8afe67352..d59756b71 100644 --- a/tdeui/kedittoolbar.h +++ b/tdeui/kedittoolbar.h @@ -67,7 +67,7 @@ namespace KEditToolbarInternal * { * saveMainWindowSettings( TDEGlobal::config(), "MainWindow" ); * KEditToolbar dlg(actionCollection()); - * connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); + * connect(&dlg,TQ_SIGNAL(newToolbarConfig()),this,TQ_SLOT(slotNewToolbarConfig())); * dlg.exec(); * } * @@ -92,7 +92,7 @@ namespace KEditToolbarInternal * \code * saveMainWindowSettings( TDEGlobal::config(), "MainWindow" ); * KEditToolbar dlg(factory()); - * connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig())); + * connect(&dlg,TQ_SIGNAL(newToolbarConfig()),this,TQ_SLOT(slotNewToolbarConfig())); * dlg.exec(); * * void MyClass::slotNewToolbarConfig() // This is called when OK, Apply or Defaults is clicked @@ -108,7 +108,7 @@ namespace KEditToolbarInternal */ class TDEUI_EXPORT KEditToolbar : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** * Constructor for apps that do not use components. @@ -268,7 +268,7 @@ private: */ class TDEUI_EXPORT KEditToolbarWidget : public TQWidget, virtual public KXMLGUIClient { - Q_OBJECT + TQ_OBJECT public: /** * Constructor. This is the only entry point to this class. You diff --git a/tdeui/khelpmenu.cpp b/tdeui/khelpmenu.cpp index 8ca2022f3..ac2e72601 100644 --- a/tdeui/khelpmenu.cpp +++ b/tdeui/khelpmenu.cpp @@ -41,7 +41,7 @@ #include <tdepopupmenu.h> #include <tdestdaccel.h> #include <kstdaction.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include "kswitchlanguagedialog.h" @@ -89,13 +89,13 @@ KHelpMenu::KHelpMenu( TQWidget *parent, const TDEAboutData *aboutData, if (actions) { - KStdAction::helpContents(this, TQT_SLOT(appHelpActivated()), actions); + KStdAction::helpContents(this, TQ_SLOT(appHelpActivated()), actions); if (showWhatsThis) - KStdAction::whatsThis(this, TQT_SLOT(contextHelpActivated()), actions); - KStdAction::reportBug(this, TQT_SLOT(reportBug()), actions); - KStdAction::aboutApp(this, TQT_SLOT(aboutApplication()), actions); - KStdAction::aboutKDE(this, TQT_SLOT(aboutKDE()), actions); - KStdAction::switchApplicationLanguage(this, TQT_SLOT(switchApplicationLanguage()), actions); + KStdAction::whatsThis(this, TQ_SLOT(contextHelpActivated()), actions); + KStdAction::reportBug(this, TQ_SLOT(reportBug()), actions); + KStdAction::aboutApp(this, TQ_SLOT(aboutApplication()), actions); + KStdAction::aboutKDE(this, TQ_SLOT(aboutKDE()), actions); + KStdAction::switchApplicationLanguage(this, TQ_SLOT(switchApplicationLanguage()), actions); } } @@ -122,60 +122,60 @@ TDEPopupMenu* KHelpMenu::menu() TQString appName = (aboutData)? aboutData->programName() : TQString::fromLatin1(tqApp->name()); mMenu = new TDEPopupMenu(); - connect( mMenu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(menuDestroyed())); + connect( mMenu, TQ_SIGNAL(destroyed()), this, TQ_SLOT(menuDestroyed())); bool need_separator = false; - if (kapp->authorizeTDEAction("help_contents")) + if (tdeApp->authorizeTDEAction("help_contents")) { mMenu->insertItem( BarIcon( "contents", TDEIcon::SizeSmall), TQString(i18n( "%1 &Handbook" ).arg( appName)) ,menuHelpContents ); - mMenu->connectItem( menuHelpContents, this, TQT_SLOT(appHelpActivated()) ); + mMenu->connectItem( menuHelpContents, this, TQ_SLOT(appHelpActivated()) ); mMenu->setAccel( TDEStdAccel::shortcut(TDEStdAccel::Help), menuHelpContents ); need_separator = true; } - if( mShowWhatsThis && kapp->authorizeTDEAction("help_whats_this") ) + if( mShowWhatsThis && tdeApp->authorizeTDEAction("help_whats_this") ) { TQToolButton* wtb = TQWhatsThis::whatsThisButton(0); mMenu->insertItem( wtb->iconSet(),i18n( "What's &This" ), menuWhatsThis); - mMenu->connectItem( menuWhatsThis, this, TQT_SLOT(contextHelpActivated()) ); + mMenu->connectItem( menuWhatsThis, this, TQ_SLOT(contextHelpActivated()) ); delete wtb; mMenu->setAccel( SHIFT + Key_F1, menuWhatsThis ); need_separator = true; } - if (kapp->authorizeTDEAction("help_report_bug") && aboutData && !aboutData->bugAddress().isEmpty() ) + if (tdeApp->authorizeTDEAction("help_report_bug") && aboutData && !aboutData->bugAddress().isEmpty() ) { if (need_separator) mMenu->insertSeparator(); mMenu->insertItem( SmallIcon("bug"), i18n( "&Report Bug/Request Enhancement..." ), menuReportBug ); - mMenu->connectItem( menuReportBug, this, TQT_SLOT(reportBug()) ); + mMenu->connectItem( menuReportBug, this, TQ_SLOT(reportBug()) ); need_separator = true; } - if (kapp->authorizeTDEAction("switch_application_language")) + if (tdeApp->authorizeTDEAction("switch_application_language")) { if (need_separator) mMenu->insertSeparator(); mMenu->insertItem( SmallIcon("locale"), i18n( "Switch application &language..." ), menuSwitchLanguage ); - mMenu->connectItem( menuSwitchLanguage, this, TQT_SLOT(switchApplicationLanguage()) ); + mMenu->connectItem( menuSwitchLanguage, this, TQ_SLOT(switchApplicationLanguage()) ); need_separator = true; } if (need_separator) mMenu->insertSeparator(); - if (kapp->authorizeTDEAction("help_about_app")) + if (tdeApp->authorizeTDEAction("help_about_app")) { - mMenu->insertItem( kapp->miniIcon(), + mMenu->insertItem( tdeApp->miniIcon(), TQString(i18n( "&About %1" ).arg(appName)), menuAboutApp ); - mMenu->connectItem( menuAboutApp, this, TQT_SLOT( aboutApplication() ) ); + mMenu->connectItem( menuAboutApp, this, TQ_SLOT( aboutApplication() ) ); } - if (kapp->authorizeTDEAction("help_about_kde")) + if (tdeApp->authorizeTDEAction("help_about_kde")) { - mMenu->insertItem( SmallIcon("about_kde"), i18n( "About &Trinity" ), menuAboutKDE ); - mMenu->connectItem( menuAboutKDE, this, TQT_SLOT( aboutKDE() ) ); + mMenu->insertItem( SmallIcon("about_kde"), i18n( "About &TDE" ), menuAboutKDE ); + mMenu->connectItem( menuAboutKDE, this, TQ_SLOT( aboutKDE() ) ); } } @@ -186,7 +186,7 @@ TDEPopupMenu* KHelpMenu::menu() void KHelpMenu::appHelpActivated() { - kapp->invokeHelp(); + tdeApp->invokeHelp(); } @@ -197,7 +197,7 @@ void KHelpMenu::aboutApplication() if( !mAboutApp ) { mAboutApp = new TDEAboutApplication( d->mAboutData, mParent, "about", false ); - connect( mAboutApp, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) ); + connect( mAboutApp, TQ_SIGNAL(finished()), this, TQ_SLOT( dialogFinished()) ); } mAboutApp->show(); } @@ -213,7 +213,7 @@ void KHelpMenu::aboutApplication() KDialogBase::Yes, KDialogBase::Yes, KDialogBase::Yes, mParent, "about", false, true, KStdGuiItem::ok() ); - connect( mAboutApp, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) ); + connect( mAboutApp, TQ_SIGNAL(finished()), this, TQ_SLOT( dialogFinished()) ); TQHBox *hbox = new TQHBox( mAboutApp ); mAboutApp->setMainWidget( hbox ); @@ -221,11 +221,11 @@ void KHelpMenu::aboutApplication() hbox->setMargin(KDialog::marginHint()*1); TQLabel *label1 = new TQLabel(hbox); - label1->setPixmap( kapp->icon() ); + label1->setPixmap( tdeApp->icon() ); TQLabel *label2 = new TQLabel(hbox); label2->setText( mAboutAppText ); - mAboutApp->setPlainCaption( i18n("About %1").arg(kapp->caption()) ); + mAboutApp->setPlainCaption( i18n("About %1").arg(tdeApp->caption()) ); mAboutApp->disableResize(); } @@ -239,7 +239,7 @@ void KHelpMenu::aboutKDE() if( !mAboutKDE ) { mAboutKDE = new TDEAboutKDE( mParent, "aboutkde", false ); - connect( mAboutKDE, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) ); + connect( mAboutKDE, TQ_SIGNAL(finished()), this, TQ_SLOT( dialogFinished()) ); } mAboutKDE->show(); } @@ -250,7 +250,7 @@ void KHelpMenu::reportBug() if( !mBugReport ) { mBugReport = new KBugReport( mParent, false, d->mAboutData ); - connect( mBugReport, TQT_SIGNAL(finished()),this,TQT_SLOT( dialogFinished()) ); + connect( mBugReport, TQ_SIGNAL(finished()),this,TQ_SLOT( dialogFinished()) ); } mBugReport->show(); } @@ -260,7 +260,7 @@ void KHelpMenu::switchApplicationLanguage() if ( !d->mSwitchApplicationLanguage ) { d->mSwitchApplicationLanguage = new KSwitchLanguageDialog( mParent, "switchlanguagedialog", false ); - connect( d->mSwitchApplicationLanguage, TQT_SIGNAL(finished()), this, TQT_SLOT( dialogFinished()) ); + connect( d->mSwitchApplicationLanguage, TQ_SIGNAL(finished()), this, TQ_SLOT( dialogFinished()) ); } d->mSwitchApplicationLanguage->show(); } @@ -268,7 +268,7 @@ void KHelpMenu::switchApplicationLanguage() void KHelpMenu::dialogFinished() { - TQTimer::singleShot( 0, this, TQT_SLOT(timerExpired()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(timerExpired()) ); } @@ -308,7 +308,7 @@ void KHelpMenu::contextHelpActivated() TQWidget* w = TQApplication::widgetAt( TQCursor::pos(), true ); while ( w && !w->isTopLevel() && !w->inherits("QXEmbed") ) w = w->parentWidget(); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if ( w && w->inherits("QXEmbed") ) (( QXEmbed*) w )->enterWhatsThisMode(); #endif diff --git a/tdeui/khelpmenu.h b/tdeui/khelpmenu.h index 25e118b5b..ad0e65140 100644 --- a/tdeui/khelpmenu.h +++ b/tdeui/khelpmenu.h @@ -60,7 +60,7 @@ class KHelpMenuPrivate; * * \code * mHelpMenu = new KHelpMenu( this, <someText> ); - * connect( this, TQT_SIGNAL(someSignal()), mHelpMenu,TQT_SLOT(mHelpMenu->aboutKDE())); + * connect( this, TQ_SIGNAL(someSignal()), mHelpMenu,TQ_SLOT(mHelpMenu->aboutKDE())); * \endcode * * IMPORTANT: @@ -97,8 +97,8 @@ class KHelpMenuPrivate; * { * .. * KHelpMenu *helpMenu = new KHelpMenu( this ); - * connect( helpMenu, TQT_SIGNAL(showAboutApplication()), - * this, TQT_SLOT(myDialogSlot())); + * connect( helpMenu, TQ_SIGNAL(showAboutApplication()), + * this, TQ_SLOT(myDialogSlot())); * .. * } * @@ -116,7 +116,7 @@ class KHelpMenuPrivate; * { * KHelpMenu *helpMenu = new KHelpMenu( this ); * TDEPopupMenu *help = mHelpMenu->menu(); - * help->connectItem( KHelpMenu::menuAboutApp, this, TQT_SLOT(myDialogSlot()) ); + * help->connectItem( KHelpMenu::menuAboutApp, this, TQ_SLOT(myDialogSlot()) ); * } * * void MyClass::myDialogSlot() @@ -130,7 +130,7 @@ class KHelpMenuPrivate; class TDEUI_EXPORT KHelpMenu : public TQObject { - Q_OBJECT + TQ_OBJECT public: enum MenuId diff --git a/tdeui/kiconview.cpp b/tdeui/kiconview.cpp index 04b78f389..284cc3386 100644 --- a/tdeui/kiconview.cpp +++ b/tdeui/kiconview.cpp @@ -61,23 +61,23 @@ TDEIconView::TDEIconView( TQWidget *parent, const char *name, WFlags f ) { d = new TDEIconViewPrivate; - connect( this, TQT_SIGNAL( onViewport() ), - this, TQT_SLOT( slotOnViewport() ) ); - connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ), - this, TQT_SLOT( slotOnItem( TQIconViewItem * ) ) ); + connect( this, TQ_SIGNAL( onViewport() ), + this, TQ_SLOT( slotOnViewport() ) ); + connect( this, TQ_SIGNAL( onItem( TQIconViewItem * ) ), + this, TQ_SLOT( slotOnItem( TQIconViewItem * ) ) ); slotSettingsChanged( TDEApplication::SETTINGS_MOUSE ); - if ( kapp ) { // maybe null when used inside designer - connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) ); - kapp->addKipcEventMask( KIPC::SettingsChanged ); + if ( tdeApp ) { // maybe null when used inside designer + connect( tdeApp, TQ_SIGNAL( settingsChanged(int) ), TQ_SLOT( slotSettingsChanged(int) ) ); + tdeApp->addKipcEventMask( KIPC::SettingsChanged ); } m_pCurrentItem = 0L; m_pAutoSelect = new TQTimer( this ); - connect( m_pAutoSelect, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotAutoSelect() ) ); + connect( m_pAutoSelect, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotAutoSelect() ) ); - connect( &d->dragHoldTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotDragHoldTimeout()) ); + connect( &d->dragHoldTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotDragHoldTimeout()) ); } TDEIconView::~TDEIconView() @@ -128,25 +128,25 @@ void TDEIconView::slotSettingsChanged(int category) m_bUseSingle = TDEGlobalSettings::singleClick(); //kdDebug() << "TDEIconView::slotSettingsChanged for mouse, usesingle=" << m_bUseSingle << endl; - disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQIconViewItem *, + disconnect( this, TQ_SIGNAL( mouseButtonClicked( int, TQIconViewItem *, const TQPoint & ) ), - this, TQT_SLOT( slotMouseButtonClicked( int, TQIconViewItem *, + this, TQ_SLOT( slotMouseButtonClicked( int, TQIconViewItem *, const TQPoint & ) ) ); -// disconnect( this, TQT_SIGNAL( doubleClicked( TQIconViewItem *, +// disconnect( this, TQ_SIGNAL( doubleClicked( TQIconViewItem *, // const TQPoint & ) ), -// this, TQT_SLOT( slotExecute( TQIconViewItem *, +// this, TQ_SLOT( slotExecute( TQIconViewItem *, // const TQPoint & ) ) ); if( m_bUseSingle ) { - connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQIconViewItem *, + connect( this, TQ_SIGNAL( mouseButtonClicked( int, TQIconViewItem *, const TQPoint & ) ), - this, TQT_SLOT( slotMouseButtonClicked( int, TQIconViewItem *, + this, TQ_SLOT( slotMouseButtonClicked( int, TQIconViewItem *, const TQPoint & ) ) ); } else { -// connect( this, TQT_SIGNAL( doubleClicked( TQIconViewItem *, +// connect( this, TQ_SIGNAL( doubleClicked( TQIconViewItem *, // const TQPoint & ) ), -// this, TQT_SLOT( slotExecute( TQIconViewItem *, +// this, TQ_SLOT( slotExecute( TQIconViewItem *, // const TQPoint & ) ) ); } @@ -310,7 +310,7 @@ void TDEIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) TQIconViewItem* item = findItem( e->pos() ); if( item ) { - if( (e->button() == Qt::LeftButton) && !m_bUseSingle ) + if( (e->button() == TQt::LeftButton) && !m_bUseSingle ) emitExecute( item, e->globalPos() ); emit doubleClicked( item, e->globalPos() ); @@ -324,7 +324,7 @@ void TDEIconView::slotMouseButtonClicked( int btn, TQIconViewItem *item, const T if( d->doubleClickIgnoreTimer.isActive() ) return; // Ignore double click - if( (btn == Qt::LeftButton) && item ) + if( (btn == TQt::LeftButton) && item ) emitExecute( item, pos ); } @@ -388,7 +388,7 @@ void TDEIconView::cancelPendingHeldSignal() void TDEIconView::wheelEvent( TQWheelEvent *e ) { if (horizontalScrollBar() && (arrangement() == TQIconView::TopToBottom)) { - TQWheelEvent ce(e->pos(), e->delta(), e->state(), Qt::Horizontal); + TQWheelEvent ce(e->pos(), e->delta(), e->state(), TQt::Horizontal); TQApplication::sendEvent( horizontalScrollBar(), &ce); if (ce.isAccepted()) { e->accept(); @@ -757,7 +757,7 @@ void TDEIconViewItem::paintText( TQPainter *p, const TQColorGroup &cg ) p->setPen( TQPen( cg.highlightedText() ) ); } else { - if ( iconView()->itemTextBackground() != Qt::NoBrush ) { + if ( iconView()->itemTextBackground() != TQt::NoBrush ) { p->fillRect( textRect( false ), iconView()->itemTextBackground() ); } p->setPen( cg.text() ); diff --git a/tdeui/kiconview.h b/tdeui/kiconview.h index 8c0cd5a24..f29bf61d4 100644 --- a/tdeui/kiconview.h +++ b/tdeui/kiconview.h @@ -42,7 +42,7 @@ class TDEUI_EXPORT TDEIconView : public TQIconView { friend class TDEIconViewItem; - Q_OBJECT + TQ_OBJECT TQ_ENUMS( Mode ) TQ_PROPERTY( Mode mode READ mode WRITE setMode ) diff --git a/tdeui/kiconviewsearchline.cpp b/tdeui/kiconviewsearchline.cpp index 77b8082ea..f853221ff 100644 --- a/tdeui/kiconviewsearchline.cpp +++ b/tdeui/kiconviewsearchline.cpp @@ -152,15 +152,15 @@ void TDEIconViewSearchLine::setCaseSensitive( bool cs ) void TDEIconViewSearchLine::setIconView( TQIconView *iv ) { if ( d->iconView != NULL ) - disconnect( d->iconView, TQT_SIGNAL( destroyed() ), - this, TQT_SLOT( iconViewDeleted() ) ); + disconnect( d->iconView, TQ_SIGNAL( destroyed() ), + this, TQ_SLOT( iconViewDeleted() ) ); d->iconView = iv; if ( iv != NULL ) { - connect( d->iconView, TQT_SIGNAL( destroyed() ), - this, TQT_SLOT( iconViewDeleted() ) ); + connect( d->iconView, TQ_SIGNAL( destroyed() ), + this, TQ_SLOT( iconViewDeleted() ) ); setEnabled( true ); } else @@ -190,13 +190,13 @@ void TDEIconViewSearchLine::init( TQIconView *iconView ) d->iconView = iconView; - connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( queueSearch( const TQString & ) ) ); + connect( this, TQ_SIGNAL( textChanged( const TQString & ) ), + this, TQ_SLOT( queueSearch( const TQString & ) ) ); if ( iconView != NULL ) { - connect( iconView, TQT_SIGNAL( destroyed() ), - this, TQT_SLOT( iconViewDeleted() ) ); + connect( iconView, TQ_SIGNAL( destroyed() ), + this, TQ_SLOT( iconViewDeleted() ) ); setEnabled( true ); } else @@ -231,7 +231,7 @@ void TDEIconViewSearchLine::queueSearch( const TQString &s ) { d->queuedSearches++; d->search = s; - TQTimer::singleShot( 200, this, TQT_SLOT( activateSearch() ) ); + TQTimer::singleShot( 200, this, TQ_SLOT( activateSearch() ) ); } void TDEIconViewSearchLine::activateSearch() @@ -244,7 +244,7 @@ void TDEIconViewSearchLine::activateSearch() d->queuedSearches = 0; } else { - TQTimer::singleShot( 200, this, TQT_SLOT( activateSearch() ) ); + TQTimer::singleShot( 200, this, TQ_SLOT( activateSearch() ) ); } } diff --git a/tdeui/kiconviewsearchline.h b/tdeui/kiconviewsearchline.h index cef09b3ea..3988a7c9b 100644 --- a/tdeui/kiconviewsearchline.h +++ b/tdeui/kiconviewsearchline.h @@ -37,7 +37,7 @@ class TQIconViewItem; */ class TDEUI_EXPORT TDEIconViewSearchLine : public KLineEdit { - Q_OBJECT + TQ_OBJECT public: diff --git a/tdeui/kinputdialog.cpp b/tdeui/kinputdialog.cpp index 831cf2560..5bf89ae20 100644 --- a/tdeui/kinputdialog.cpp +++ b/tdeui/kinputdialog.cpp @@ -17,10 +17,6 @@ Boston, MA 02110-1301, USA. */ -#ifdef USE_QT4 -#undef Status -#endif // USE_QT4 - #include <tqlayout.h> #include <tqlabel.h> #include <tqvalidator.h> @@ -81,9 +77,9 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, if ( !mask.isEmpty() ) d->m_lineEdit->setInputMask( mask ); - connect( d->m_lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ), - TQT_SLOT( slotEditTextChanged( const TQString & ) ) ); - connect( this, TQT_SIGNAL( user1Clicked() ), d->m_lineEdit, TQT_SLOT( clear() ) ); + connect( d->m_lineEdit, TQ_SIGNAL( textChanged( const TQString & ) ), + TQ_SLOT( slotEditTextChanged( const TQString & ) ) ); + connect( this, TQ_SIGNAL( user1Clicked() ), d->m_lineEdit, TQ_SLOT( clear() ) ); slotEditTextChanged( value ); setMinimumWidth( 350 ); @@ -109,7 +105,7 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, d->m_textEdit->setFocus(); d->m_label->setBuddy( d->m_textEdit ); - connect( this, TQT_SIGNAL( user1Clicked() ), d->m_textEdit, TQT_SLOT( clear() ) ); + connect( this, TQ_SIGNAL( user1Clicked() ), d->m_textEdit, TQ_SLOT( clear() ) ); setMinimumWidth( 400 ); } @@ -180,10 +176,10 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, d->m_comboBox->setCurrentItem( current ); layout->addWidget( d->m_comboBox ); - connect( d->m_comboBox, TQT_SIGNAL( textChanged( const TQString & ) ), - TQT_SLOT( slotUpdateButtons( const TQString & ) ) ); - connect( this, TQT_SIGNAL( user1Clicked() ), - d->m_comboBox, TQT_SLOT( clearEdit() ) ); + connect( d->m_comboBox, TQ_SIGNAL( textChanged( const TQString & ) ), + TQ_SLOT( slotUpdateButtons( const TQString & ) ) ); + connect( this, TQ_SIGNAL( user1Clicked() ), + d->m_comboBox, TQ_SLOT( clearEdit() ) ); slotUpdateButtons( d->m_comboBox->currentText() ); d->m_comboBox->setFocus(); } else { @@ -192,10 +188,10 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, d->m_listBox->setSelected( current, true ); d->m_listBox->ensureCurrentVisible(); layout->addWidget( d->m_listBox, 10 ); - connect( d->m_listBox, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ), - TQT_SLOT( slotOk() ) ); - connect( d->m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ), - TQT_SLOT( slotOk() ) ); + connect( d->m_listBox, TQ_SIGNAL( doubleClicked( TQListBoxItem * ) ), + TQ_SLOT( slotOk() ) ); + connect( d->m_listBox, TQ_SIGNAL( returnPressed( TQListBoxItem * ) ), + TQ_SLOT( slotOk() ) ); d->m_listBox->setFocus(); } @@ -236,10 +232,10 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, } else { - connect( d->m_listBox, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ), - TQT_SLOT( slotOk() ) ); - connect( d->m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ), - TQT_SLOT( slotOk() ) ); + connect( d->m_listBox, TQ_SIGNAL( doubleClicked( TQListBoxItem * ) ), + TQ_SLOT( slotOk() ) ); + connect( d->m_listBox, TQ_SIGNAL( returnPressed( TQListBoxItem * ) ), + TQ_SLOT( slotOk() ) ); TQString text = select.first(); item = d->m_listBox->findItem( text, CaseSensitive|ExactMatch ); @@ -374,7 +370,7 @@ TQString KInputDialog::getItem( const TQString &caption, const TQString &label, editable, parent, name ); if ( !editable) { - connect( dlg.listBox(), TQT_SIGNAL(doubleClicked ( TQListBoxItem *)), &dlg, TQT_SLOT( slotOk())); + connect( dlg.listBox(), TQ_SIGNAL(doubleClicked ( TQListBoxItem *)), &dlg, TQ_SLOT( slotOk())); } bool _ok = ( dlg.exec() == Accepted ); diff --git a/tdeui/kinputdialog.h b/tdeui/kinputdialog.h index d1e148d9a..57140ca80 100644 --- a/tdeui/kinputdialog.h +++ b/tdeui/kinputdialog.h @@ -20,8 +20,6 @@ #ifndef KINPUTDIALOG_H #define KINPUTDIALOG_H -// #include <tqt.h> - #include <kdialogbase.h> class TQValidator; @@ -47,7 +45,7 @@ class KInputDialogPrivate; */ class TDEUI_EXPORT KInputDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT private: diff --git a/tdeui/kjanuswidget.cpp b/tdeui/kjanuswidget.cpp index 513ae2d8a..5344e83ca 100644 --- a/tdeui/kjanuswidget.cpp +++ b/tdeui/kjanuswidget.cpp @@ -115,8 +115,8 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face ) mTreeList->header()->hide(); mTreeList->setRootIsDecorated(true); mTreeList->setSorting( -1 ); - connect( mTreeList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotShowPage()) ); - connect( mTreeList, TQT_SIGNAL(clicked(TQListViewItem *)), TQT_SLOT(slotItemClicked(TQListViewItem *))); + connect( mTreeList, TQ_SIGNAL(selectionChanged()), TQ_SLOT(slotShowPage()) ); + connect( mTreeList, TQ_SIGNAL(clicked(TQListViewItem *)), TQ_SLOT(slotItemClicked(TQListViewItem *))); // // Page area. Title at top with a separator below and a pagestack using @@ -143,8 +143,8 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face ) mIconList->setFont( listFont ); mIconList->verticalScrollBar()->installEventFilter( this ); - connect( mIconList, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotShowPage())); - connect( mIconList, TQT_SIGNAL(onItem(TQListBoxItem *)), TQT_SLOT(slotOnItem(TQListBoxItem *))); + connect( mIconList, TQ_SIGNAL(selectionChanged()), TQ_SLOT(slotShowPage())); + connect( mIconList, TQ_SIGNAL(onItem(TQListBoxItem *)), TQ_SLOT(slotOnItem(TQListBoxItem *))); hbox->addSpacing( KDialog::marginHint() ); page = new TQFrame( this ); @@ -170,8 +170,8 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face ) vbox->addWidget( mTitleSep ); mPageStack = new TQWidgetStack( page ); - connect(mPageStack, TQT_SIGNAL(aboutToShow(TQWidget *)), - TQT_SIGNAL(aboutToShowPage(TQWidget *))); + connect(mPageStack, TQ_SIGNAL(aboutToShow(TQWidget *)), + TQ_SIGNAL(aboutToShowPage(TQWidget *))); vbox->addWidget( mPageStack, 10 ); } else if( mFace == Tabbed ) @@ -180,8 +180,8 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face ) mTabControl = new TQTabWidget( this ); mTabControl->setMargin (KDialog::marginHint()); - connect(mTabControl, TQT_SIGNAL(currentChanged(TQWidget *)), - TQT_SIGNAL(aboutToShowPage(TQWidget *))); + connect(mTabControl, TQ_SIGNAL(currentChanged(TQWidget *)), + TQ_SIGNAL(aboutToShowPage(TQWidget *))); topLayout->addWidget( mTabControl, 10 ); } else if( mFace == Swallow ) @@ -196,8 +196,8 @@ KJanusWidget::KJanusWidget( TQWidget *parent, const char *name, int face ) topLayout->addWidget( mPlainPage, 10 ); } - if ( kapp ) - connect(kapp,TQT_SIGNAL(tdedisplayFontChanged()),TQT_SLOT(slotFontChanged())); + if ( tdeApp ) + connect(tdeApp,TQ_SIGNAL(tdedisplayFontChanged()),TQ_SLOT(slotFontChanged())); mValid = true; setSwallowedWidget(0); // Set default size if 'mFace' is Swallow. @@ -254,7 +254,7 @@ TQFrame *KJanusWidget::addPage( const TQStringList &items, const TQString &heade void KJanusWidget::pageGone( TQObject *obj ) { - removePage( TQT_TQWIDGET( obj ) ); + removePage( static_cast<TQWidget*>( obj ) ); } void KJanusWidget::slotReopen( TQListViewItem * item ) @@ -430,19 +430,19 @@ void KJanusWidget::InsertTreeListItem(const TQStringList &items, const TQPixmap void KJanusWidget::addPageWidget( TQFrame *page, const TQStringList &items, const TQString &header,const TQPixmap &pixmap ) { - connect(page, TQT_SIGNAL(destroyed(TQObject*)), TQT_SLOT(pageGone(TQObject*))); + connect(page, TQ_SIGNAL(destroyed(TQObject*)), TQ_SLOT(pageGone(TQObject*))); if( mFace == Tabbed ) { mTabControl->addTab (page, items.last()); - d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page); - d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex; + d->mIntToPage[d->mNextPageIndex] = page; + d->mPageToInt[page] = d->mNextPageIndex; d->mNextPageIndex++; } else if( mFace == TreeList || mFace == IconList ) { - d->mIntToPage[d->mNextPageIndex] = static_cast<TQWidget*>(page); - d->mPageToInt[static_cast<TQWidget*>(page)] = d->mNextPageIndex; + d->mIntToPage[d->mNextPageIndex] = page; + d->mPageToInt[page] = d->mNextPageIndex; mPageStack->addWidget( page, 0 ); if (items.isEmpty()) { @@ -536,7 +536,7 @@ bool KJanusWidget::setSwallowedWidget( TQWidget *widget ) } else { - if( TQT_BASE_OBJECT(widget->parent()) != TQT_BASE_OBJECT(mSwallowPage) ) + if( widget->parent() != mSwallowPage ) { widget->reparent( mSwallowPage, 0, TQPoint(0,0) ); } @@ -684,7 +684,7 @@ int KJanusWidget::pageIndex( TQWidget *widget ) const // and addGridPage() but not with addPage() which returns a child of // the toplevel page. addPage() returns a TQFrame so I check for that. // - if( widget->isA(TQFRAME_OBJECT_NAME_STRING) ) + if( widget->isA("TQFrame") ) { return d->mPageToInt[widget->parentWidget()]; } @@ -726,7 +726,7 @@ void KJanusWidget::slotItemClicked(TQListViewItem *it) it->setOpen(!it->isOpen()); } -// hack because qt does not support Q_OBJECT in nested classes +// hack because qt does not support TQ_OBJECT in nested classes void KJanusWidget::slotOnItem(TQListBoxItem *qitem) { mIconList->slotOnItem( qitem ); @@ -856,9 +856,9 @@ void KJanusWidget::unfoldTreeList( bool persist ) if( mFace == TreeList ) { if( persist ) - connect( mTreeList, TQT_SIGNAL( collapsed( TQListViewItem * ) ), this, TQT_SLOT( slotReopen( TQListViewItem * ) ) ); + connect( mTreeList, TQ_SIGNAL( collapsed( TQListViewItem * ) ), this, TQ_SLOT( slotReopen( TQListViewItem * ) ) ); else - disconnect( mTreeList, TQT_SIGNAL( collapsed( TQListViewItem * ) ), this, TQT_SLOT( slotReopen( TQListViewItem * ) ) ); + disconnect( mTreeList, TQ_SIGNAL( collapsed( TQListViewItem * ) ), this, TQ_SLOT( slotReopen( TQListViewItem * ) ) ); for( TQListViewItem * item = mTreeList->firstChild(); item; item = item->itemBelow() ) item->setOpen( true ); @@ -878,7 +878,7 @@ void KJanusWidget::addButtonBelowList( const TQString & text, TQObject * recv, c if( ( mFace == TreeList || mFace == IconList ) && d->mListFrame ) { TQPushButton * button = new TQPushButton( text, d->mListFrame, "KJanusWidget::buttonBelowList" ); - connect( button, TQT_SIGNAL( clicked() ), recv, slot ); + connect( button, TQ_SIGNAL( clicked() ), recv, slot ); } } @@ -887,7 +887,7 @@ void KJanusWidget::addButtonBelowList( const KGuiItem & item, TQObject * recv, c if( ( mFace == TreeList || mFace == IconList ) && d->mListFrame ) { KPushButton * button = new KPushButton( item, d->mListFrame, "KJanusWidget::buttonBelowList" ); - connect( button, TQT_SIGNAL( clicked() ), recv, slot ); + connect( button, TQ_SIGNAL( clicked() ), recv, slot ); } } @@ -1017,7 +1017,7 @@ void KJanusWidget::IconListBox::leaveEvent( TQEvent *ev ) } } -// hack because qt does not support Q_OBJECT in nested classes +// hack because qt does not support TQ_OBJECT in nested classes void KJanusWidget::IconListBox::slotOnItem(TQListBoxItem *qitem) { TDEListBox::slotOnItem( qitem ); @@ -1110,14 +1110,14 @@ const TQPixmap &KJanusWidget::IconListItem::defaultPixmap() pix = new TQPixmap( 32, 32 ); TQPainter p( pix ); p.eraseRect( 0, 0, pix->width(), pix->height() ); - p.setPen( Qt::red ); + p.setPen( TQt::red ); p.drawRect ( 0, 0, pix->width(), pix->height() ); p.end(); TQBitmap mask( pix->width(), pix->height(), true ); - mask.fill( Qt::black ); + mask.fill( TQt::black ); p.begin( &mask ); - p.setPen( Qt::white ); + p.setPen( TQt::white ); p.drawRect ( 0, 0, pix->width(), pix->height() ); p.end(); @@ -1149,14 +1149,14 @@ void KJanusWidget::IconListItem::paint( TQPainter *painter ) void KJanusWidget::IconListItem::paintContents( TQPainter *painter ) { TQFontMetrics fm = painter->fontMetrics(); - int ht = fm.boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).height(); + int ht = fm.boundingRect( 0, 0, 0, 0, TQt::AlignCenter, text() ).height(); int wp = mPixmap.width(); int hp = mPixmap.height(); painter->drawPixmap( (mMinimumWidth - wp) / 2, 5, mPixmap ); if( !text().isEmpty() ) { - painter->drawText( 1, hp + 7, mMinimumWidth - 2, ht, Qt::AlignCenter, text() ); + painter->drawText( 1, hp + 7, mMinimumWidth - 2, ht, TQt::AlignCenter, text() ); } } @@ -1168,7 +1168,7 @@ int KJanusWidget::IconListItem::height( const TQListBox *lb ) const } else { - int ht = lb->fontMetrics().boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).height(); + int ht = lb->fontMetrics().boundingRect( 0, 0, 0, 0, TQt::AlignCenter, text() ).height(); return (mPixmap.height() + ht + 10); } } @@ -1176,7 +1176,7 @@ int KJanusWidget::IconListItem::height( const TQListBox *lb ) const int KJanusWidget::IconListItem::width( const TQListBox *lb ) const { - int wt = lb->fontMetrics().boundingRect( 0, 0, 0, 0, Qt::AlignCenter, text() ).width() + 10; + int wt = lb->fontMetrics().boundingRect( 0, 0, 0, 0, TQt::AlignCenter, text() ).width() + 10; int wp = mPixmap.width() + 10; int w = TQMAX( wt, wp ); return TQMAX( w, mMinimumWidth ); diff --git a/tdeui/kjanuswidget.h b/tdeui/kjanuswidget.h index 604765029..1bc8ed332 100644 --- a/tdeui/kjanuswidget.h +++ b/tdeui/kjanuswidget.h @@ -66,7 +66,7 @@ class KGuiItem; */ class TDEUI_EXPORT KJanusWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT private: class IconListBox : public TDEListBox diff --git a/tdeui/kkeybutton.cpp b/tdeui/kkeybutton.cpp index 9b530b751..260cba34b 100644 --- a/tdeui/kkeybutton.cpp +++ b/tdeui/kkeybutton.cpp @@ -26,11 +26,11 @@ #include <tqpainter.h> #include <tdeapplication.h> #include <kdebug.h> -#include <kglobalaccel.h> +#include <tdeglobalaccel.h> #include <tdelocale.h> #include "config.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #define XK_XKB_KEYS #define XK_MISCELLANY #include <X11/Xlib.h> // For x11Event() @@ -46,7 +46,7 @@ const int XKeyRelease = KeyRelease; #undef FocusOut #undef FocusIn #endif // KeyPress -#endif // Q_WS_X11 +#endif // TQ_WS_X11 //static const char* psTemp[] = { // I18N_NOOP("Primary"), I18N_NOOP("Alternate"), I18N_NOOP("Multi-Key") @@ -69,9 +69,9 @@ KKeyButton::KKeyButton(TQWidget *parent, const char *name) : TQPushButton( parent, name ) { d = new KKeyButtonPrivate; - setFocusPolicy( TQ_StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); m_bEditing = false; - connect( this, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureShortcut()) ); + connect( this, TQ_SIGNAL(clicked()), this, TQ_SLOT(captureShortcut()) ); setShortcut( TDEShortcut(), true ); } diff --git a/tdeui/kkeybutton.h b/tdeui/kkeybutton.h index 889319884..53ffee8d9 100644 --- a/tdeui/kkeybutton.h +++ b/tdeui/kkeybutton.h @@ -39,7 +39,7 @@ */ class TDEUI_EXPORT KKeyButton: public TQPushButton { - Q_OBJECT + TQ_OBJECT public: /** @@ -52,7 +52,7 @@ class TDEUI_EXPORT KKeyButton: public TQPushButton virtual ~KKeyButton(); /** @deprecated Use setShortcut( cut, false ) instead */ - void setShortcut( const TDEShortcut& cut ) KDE_DEPRECATED; + void setShortcut( const TDEShortcut& cut ) TDE_DEPRECATED; /// @since 3.1 void setShortcut( const TDEShortcut& cut, bool bQtShortcut ); const TDEShortcut& shortcut() const diff --git a/tdeui/kkeydialog.cpp b/tdeui/kkeydialog.cpp index 35fe0e45f..5c028e4f7 100644 --- a/tdeui/kkeydialog.cpp +++ b/tdeui/kkeydialog.cpp @@ -43,7 +43,7 @@ #include <tdeconfig.h> #include <kdebug.h> #include <tdeglobal.h> -#include <kglobalaccel.h> +#include <tdeglobalaccel.h> #include <kiconloader.h> #include <tdelistviewsearchline.h> #include <tdelocale.h> @@ -54,7 +54,7 @@ #include <tdeaboutdata.h> #include <kstaticdeleter.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #define XK_XKB_KEYS #define XK_MISCELLANY #include <X11/Xlib.h> // For x11Event() @@ -326,7 +326,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) TDEListViewSearchLine* listViewSearch = new TDEListViewSearchLine(this); searchLayout->addWidget(listViewSearch); slbl->setBuddy(listViewSearch); - connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear())); + connect(clearSearch, TQ_SIGNAL(pressed()), listViewSearch, TQ_SLOT(clear())); TQString wtstr = i18n("Search interactively for shortcut names (e.g. Copy) " "or combination of keys (e.g. Ctrl+C) by typing them here."); @@ -340,7 +340,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) // fill up the split list box with the action/key pairs. // TQGridLayout *stackLayout = new TQGridLayout(2, 2, 2); - topLayout->addLayout( TQT_TQLAYOUT(stackLayout), 10 ); + topLayout->addLayout( stackLayout, 10 ); stackLayout->setRowStretch( 1, 10 ); // Only list will stretch d->pList = new TDEListView( this ); @@ -364,13 +364,13 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) d->pList->addColumn(i18n("Shortcut")); d->pList->addColumn(i18n("Alternate")); - connect( d->pList, TQT_SIGNAL(currentChanged(TQListViewItem*)), - TQT_SLOT(slotListItemSelected(TQListViewItem*)) ); + connect( d->pList, TQ_SIGNAL(currentChanged(TQListViewItem*)), + TQ_SLOT(slotListItemSelected(TQListViewItem*)) ); // handle double clicking an item - connect ( d->pList, TQT_SIGNAL ( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), - TQT_SLOT ( captureCurrentItem()) ); - connect ( d->pList, TQT_SIGNAL ( spacePressed( TQListViewItem* )), TQT_SLOT( captureCurrentItem())); + connect ( d->pList, TQ_SIGNAL ( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), + TQ_SLOT ( captureCurrentItem()) ); + connect ( d->pList, TQ_SIGNAL ( spacePressed( TQListViewItem* )), TQ_SLOT( captureCurrentItem())); // // CREATE CHOOSE KEY GROUP // @@ -396,7 +396,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) //grid->addMultiCellWidget( rb, 1, 1, 1, 2 ); grid->addWidget( m_prbNone, 1, 0 ); TQWhatsThis::add( m_prbNone, i18n("The selected action will not be associated with any key.") ); - connect( m_prbNone, TQT_SIGNAL(clicked()), TQT_SLOT(slotNoKey()) ); + connect( m_prbNone, TQ_SIGNAL(clicked()), TQ_SLOT(slotNoKey()) ); m_prbDef = new TQRadioButton( i18n("default key", "De&fault"), d->fCArea ); d->kbGroup->insert( m_prbDef, DefaultKey ); @@ -404,7 +404,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) //grid->addMultiCellWidget( rb, 2, 2, 1, 2 ); grid->addWidget( m_prbDef, 1, 1 ); TQWhatsThis::add( m_prbDef, i18n("This will bind the default key to the selected action. Usually a reasonable choice.") ); - connect( m_prbDef, TQT_SIGNAL(clicked()), TQT_SLOT(slotDefaultKey()) ); + connect( m_prbDef, TQ_SIGNAL(clicked()), TQ_SLOT(slotDefaultKey()) ); m_prbCustom = new TQRadioButton( i18n("C&ustom"), d->fCArea ); d->kbGroup->insert( m_prbCustom, CustomKey ); @@ -413,16 +413,16 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) grid->addWidget( m_prbCustom, 1, 2 ); TQWhatsThis::add( m_prbCustom, i18n("If this option is selected you can create a customized key binding for the" " selected action using the buttons below.") ); - connect( m_prbCustom, TQT_SIGNAL(clicked()), TQT_SLOT(slotCustomKey()) ); + connect( m_prbCustom, TQ_SIGNAL(clicked()), TQ_SLOT(slotCustomKey()) ); - //connect( d->kbGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( keyMode( int ) ) ); + //connect( d->kbGroup, TQ_SIGNAL( clicked( int ) ), TQ_SLOT( keyMode( int ) ) ); TQBoxLayout *pushLayout = new TQHBoxLayout( KDialog::spacingHint() ); grid->addLayout( pushLayout, 1, 3 ); d->pbtnShortcut = new KKeyButton(d->fCArea, "key"); d->pbtnShortcut->setEnabled( false ); - connect( d->pbtnShortcut, TQT_SIGNAL(capturedShortcut(const TDEShortcut&)), TQT_SLOT(capturedShortcut(const TDEShortcut&)) ); + connect( d->pbtnShortcut, TQ_SIGNAL(capturedShortcut(const TDEShortcut&)), TQ_SLOT(capturedShortcut(const TDEShortcut&)) ); grid->addRowSpacing( 1, d->pbtnShortcut->sizeHint().height() + 5 ); wtstr = i18n("Use this button to choose a new shortcut key. Once you click it, " @@ -451,7 +451,7 @@ void KKeyChooser::initGUI( ActionType type, bool bAllowLetterShortcuts ) //d->stdDict->setAutoDelete( true ); //if (type == Application || type == ApplicationGlobal) // readStdKeys(); - connect( kapp, TQT_SIGNAL( settingsChanged( int )), TQT_SLOT( slotSettingsChanged( int ))); + connect( tdeApp, TQ_SIGNAL( settingsChanged( int )), TQ_SLOT( slotSettingsChanged( int ))); if( allChoosers == NULL ) allChoosers = allChoosersDeleter.setObject( allChoosers, new TQValueList< KKeyChooser* > ); allChoosers->append( this ); @@ -1092,7 +1092,7 @@ KKeyDialog::KKeyDialog( KKeyChooser::ActionType type, bool bAllowLetterShortcuts { m_pKeyChooser = new KKeyChooser( this, type, bAllowLetterShortcuts ); setMainWidget( m_pKeyChooser ); - connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) ); + connect( this, TQ_SIGNAL(defaultClicked()), m_pKeyChooser, TQ_SLOT(allDefault()) ); TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); TQSize sz = size(); @@ -1104,7 +1104,7 @@ KKeyDialog::KKeyDialog( bool bAllowLetterShortcuts, TQWidget *parent, const char { m_pKeyChooser = new KKeyChooser( this, KKeyChooser::Application, bAllowLetterShortcuts ); setMainWidget( m_pKeyChooser ); - connect( this, TQT_SIGNAL(defaultClicked()), m_pKeyChooser, TQT_SLOT(allDefault()) ); + connect( this, TQ_SIGNAL(defaultClicked()), m_pKeyChooser, TQ_SLOT(allDefault()) ); TDEConfigGroup group( TDEGlobal::config(), "KKeyDialog Settings" ); TQSize sz = size(); diff --git a/tdeui/kkeydialog.h b/tdeui/kkeydialog.h index af395682e..302d557c4 100644 --- a/tdeui/kkeydialog.h +++ b/tdeui/kkeydialog.h @@ -57,7 +57,7 @@ class KKeyChooserItem; */ class TDEUI_EXPORT KKeyChooser : public TQWidget { - Q_OBJECT + TQ_OBJECT public: enum ActionType { Application, ApplicationGlobal, Standard, Global }; @@ -273,7 +273,7 @@ typedef KKeyChooser KKeyChooser; */ class TDEUI_EXPORT KKeyDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** @@ -377,19 +377,19 @@ public: * @deprecated Obsolete. * Please use KKeyDialog::configure instead */ - static KDE_DEPRECATED int configureKeys( TDEAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) + static TDE_DEPRECATED int configureKeys( TDEAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) { return configure( keys, parent, save_settings ); } /** * @deprecated Obsolete. * Please use KKeyDialog::configure instead */ - static KDE_DEPRECATED int configureKeys( TDEGlobalAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) + static TDE_DEPRECATED int configureKeys( TDEGlobalAccel* keys, bool save_settings = true, TQWidget* parent = 0 ) { return configure( keys, parent, save_settings ); } /** * @deprecated Obsolete. * Please use KKeyDialog::configure instead */ - static KDE_DEPRECATED int configureKeys( TDEActionCollection* coll, const TQString& /*xmlfile*/, + static TDE_DEPRECATED int configureKeys( TDEActionCollection* coll, const TQString& /*xmlfile*/, bool save_settings = true, TQWidget* parent = 0 ) { return configure( coll, parent, save_settings ); } diff --git a/tdeui/klanguagebutton.cpp b/tdeui/klanguagebutton.cpp index abbc4f5d3..ff6695dec 100644 --- a/tdeui/klanguagebutton.cpp +++ b/tdeui/klanguagebutton.cpp @@ -172,10 +172,10 @@ void KLanguageButton::insertSubmenu( const TQIconSet & icon, checkInsertPos( pi, text, index ); pi->insertItem( icon, text, p, count(), index ); m_ids->append( id ); - connect( p, TQT_SIGNAL( activated( int ) ), - TQT_SLOT( slotActivated( int ) ) ); - connect( p, TQT_SIGNAL( highlighted( int ) ), this, - TQT_SLOT( slotHighlighted( int ) ) ); + connect( p, TQ_SIGNAL( activated( int ) ), + TQ_SLOT( slotActivated( int ) ) ); + connect( p, TQ_SIGNAL( highlighted( int ) ), this, + TQ_SLOT( slotHighlighted( int ) ) ); } void KLanguageButton::insertSubmenu( const TQString &text, const TQString &id, @@ -218,10 +218,10 @@ void KLanguageButton::clear() d->button->setPopup( m_popup ); - connect( m_popup, TQT_SIGNAL( activated( int ) ), - TQT_SLOT( slotActivated( int ) ) ); - connect( m_popup, TQT_SIGNAL( highlighted( int ) ), - TQT_SLOT( slotHighlighted( int ) ) ); + connect( m_popup, TQ_SIGNAL( activated( int ) ), + TQ_SLOT( slotActivated( int ) ) ); + connect( m_popup, TQ_SIGNAL( highlighted( int ) ), + TQ_SLOT( slotHighlighted( int ) ) ); if ( !d->staticText ) { diff --git a/tdeui/klanguagebutton.h b/tdeui/klanguagebutton.h index e13ad9566..c5d5cbac8 100644 --- a/tdeui/klanguagebutton.h +++ b/tdeui/klanguagebutton.h @@ -46,7 +46,7 @@ class TQPopupMenu; */ class TDEUI_EXPORT KLanguageButton : public TQWidget { - Q_OBJECT + TQ_OBJECT public: /** @@ -144,7 +144,7 @@ public: */ TQString current() const; /** - * Returns TRUE if the combobox contains id. + * Returns true if the combobox contains id. */ bool contains( const TQString & id ) const; /** diff --git a/tdeui/kled.cpp b/tdeui/kled.cpp index 6b29ac0ca..4f12ec12e 100644 --- a/tdeui/kled.cpp +++ b/tdeui/kled.cpp @@ -225,7 +225,7 @@ KLed::paintFlat() // paint a ROUND FLAT led lamp // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn with a thin gray "border" (pen) - brush.setStyle( Qt::SolidPattern ); + brush.setStyle( TQt::SolidPattern ); brush.setColor( color ); pen.setWidth( scale ); @@ -280,7 +280,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn first - brush.setStyle( Qt::SolidPattern ); + brush.setStyle( TQt::SolidPattern ); brush.setColor( color ); paint.setBrush( brush ); // Assign the brush to the painter @@ -328,7 +328,7 @@ KLed::paintRound() // paint a ROUND RAISED led lamp color = colorGroup().dark(); pen.setColor( color ); // Set the pen accordingly paint.setPen( pen ); // Select pen for drawing - brush.setStyle( Qt::NoBrush ); // Switch off the brush + brush.setStyle( TQt::NoBrush ); // Switch off the brush paint.setBrush( brush ); // This avoids filling of the ellipse paint.drawEllipse( 2, 2, width, width ); @@ -376,7 +376,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp // Set the brush to SolidPattern, this fills the entire area // of the ellipse which is drawn first - brush.setStyle( Qt::SolidPattern ); + brush.setStyle( TQt::SolidPattern ); brush.setColor( color ); paint.setBrush( brush ); // Assign the brush to the painter @@ -421,7 +421,7 @@ KLed::paintSunken() // paint a ROUND SUNKEN led lamp // from the upper left. pen.setWidth( 2 * scale + 1 ); // ### shouldn't this value be smaller for smaller LEDs? - brush.setStyle( (Qt::BrushStyle)NoBrush ); // Switch off the brush + brush.setStyle( (TQt::BrushStyle)NoBrush ); // Switch off the brush paint.setBrush( brush ); // This avoids filling of the ellipse // Set the initial color value to colorGroup().light() (bright) and start @@ -494,8 +494,8 @@ KLed::paintRectFrame(bool raised) TQBrush darkBrush(d->offcolor); int w=width(); int h=height(); - TQColor black=Qt::black; - TQColor white=Qt::white; + TQColor black=TQt::black; + TQColor white=TQt::white; // ----- if(raised) { diff --git a/tdeui/kled.h b/tdeui/kled.h index 7307be06a..cab7586f1 100644 --- a/tdeui/kled.h +++ b/tdeui/kled.h @@ -44,7 +44,7 @@ class TQColor; */ class TDEUI_EXPORT KLed : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_ENUMS( State Shape Look ) TQ_PROPERTY( State state READ state WRITE setState ) TQ_PROPERTY( Shape shape READ shape WRITE setShape ) @@ -195,7 +195,7 @@ public: * @short Toggles LED on->off / off->on. * @deprecated, use #toggle() instead. */ - void toggleState() KDE_DEPRECATED; + void toggleState() TDE_DEPRECATED; /** * Set the color of the widget. @@ -236,7 +236,7 @@ public: * in OFF state. * Defaults to 300. * - * @see QColor + * @see TQColor * * @param darkfactor sets the factor to darken the LED. * @short sets the factor to darken the LED. diff --git a/tdeui/klineedit.cpp b/tdeui/klineedit.cpp index 92afc91fd..c19d22058 100644 --- a/tdeui/klineedit.cpp +++ b/tdeui/klineedit.cpp @@ -136,13 +136,13 @@ void KLineEdit::init() d->autoSuggest = (mode == TDEGlobalSettings::CompletionMan || mode == TDEGlobalSettings::CompletionPopupAuto || mode == TDEGlobalSettings::CompletionAuto); - connect( this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotRestoreSelectionColors())); + connect( this, TQ_SIGNAL(selectionChanged()), this, TQ_SLOT(slotRestoreSelectionColors())); TQPalette p = palette(); if ( !d->previousHighlightedTextColor.isValid() ) - d->previousHighlightedTextColor=p.color(TQPalette::Normal,TQColorGroup::HighlightedText); + d->previousHighlightedTextColor=p.color(TQPalette::Active,TQColorGroup::HighlightedText); if ( !d->previousHighlightColor.isValid() ) - d->previousHighlightColor=p.color(TQPalette::Normal,TQColorGroup::Highlight); + d->previousHighlightColor=p.color(TQPalette::Active,TQColorGroup::Highlight); d->drawClickMsg = false; } @@ -161,7 +161,7 @@ void KLineEdit::setCompletionMode( TDEGlobalSettings::Completion mode ) if ( echoMode() != TQLineEdit::Normal ) mode = TDEGlobalSettings::CompletionNone; // Override the request. - if ( kapp && !kapp->authorize("lineedit_text_completion") ) + if ( tdeApp && !tdeApp->authorize("lineedit_text_completion") ) mode = TDEGlobalSettings::CompletionNone; if ( mode == TDEGlobalSettings::CompletionPopupAuto || @@ -420,10 +420,10 @@ bool KLineEdit::copySqueezedText(bool clipboard) const return false; TQString t = d->squeezedText; t = t.mid(start, end - start); - disconnect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, 0); + disconnect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), this, 0); TQApplication::clipboard()->setText( t, clipboard ? TQClipboard::Clipboard : TQClipboard::Selection ); - connect( TQApplication::clipboard(), TQT_SIGNAL(selectionChanged()), this, - TQT_SLOT(clipboardChanged()) ); + connect( TQApplication::clipboard(), TQ_SIGNAL(selectionChanged()), this, + TQ_SLOT(clipboardChanged()) ); return true; } return false; @@ -526,7 +526,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) { KeyBindingMap keys = getKeyBindings(); TDEGlobalSettings::Completion mode = completionMode(); - bool noModifier = (e->state() == Qt::NoButton || + bool noModifier = (e->state() == TQt::NoButton || e->state() == TQt::ShiftButton || e->state() == TQt::Keypad); @@ -536,7 +536,7 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) { if ( !d->userSelection && hasSelectedText() && ( e->key() == Key_Right || e->key() == Key_Left ) && - e->state()== Qt::NoButton ) + e->state()== TQt::NoButton ) { TQString old_txt = text(); d->disableRestoreSelection = true; @@ -817,18 +817,18 @@ void KLineEdit::keyPressEvent( TQKeyEvent *e ) void KLineEdit::mouseDoubleClickEvent( TQMouseEvent* e ) { - if ( e->button() == Qt::LeftButton ) + if ( e->button() == TQt::LeftButton ) { possibleTripleClick=true; TQTimer::singleShot( TQApplication::doubleClickInterval(),this, - TQT_SLOT(tripleClickTimeout()) ); + TQ_SLOT(tripleClickTimeout()) ); } TQLineEdit::mouseDoubleClickEvent( e ); } void KLineEdit::mousePressEvent( TQMouseEvent* e ) { - if ( possibleTripleClick && e->button() == Qt::LeftButton ) + if ( possibleTripleClick && e->button() == TQt::LeftButton ) { selectAll(); e->accept(); @@ -841,7 +841,7 @@ void KLineEdit::mouseReleaseEvent( TQMouseEvent* e ) { TQLineEdit::mouseReleaseEvent( e ); if (TQApplication::clipboard()->supportsSelection() ) { - if ( e->button() == Qt::LeftButton ) { + if ( e->button() == TQt::LeftButton ) { // Fix copying of squeezed text if needed copySqueezedText( false ); } @@ -876,11 +876,11 @@ TQPopupMenu *KLineEdit::createPopupMenu() // If a completion object is present and the input // widget is not read-only, show the Text Completion // menu item. - if ( compObj() && !isReadOnly() && kapp->authorize("lineedit_text_completion") ) + if ( compObj() && !isReadOnly() && tdeApp->authorize("lineedit_text_completion") ) { TQPopupMenu *subMenu = new TQPopupMenu( popup ); - connect( subMenu, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( completionMenuActivated( int ) ) ); + connect( subMenu, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( completionMenuActivated( int ) ) ); popup->insertSeparator(); popup->insertItem( SmallIconSet("completion"), i18n("Text Completion"), @@ -1006,12 +1006,12 @@ void KLineEdit::dropEvent(TQDropEvent *e) bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev ) { - if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) + if( o == this ) { - KCursor::autoHideEventFilter( TQT_TQOBJECT(this), ev ); + KCursor::autoHideEventFilter( this, ev ); if ( ev->type() == TQEvent::AccelOverride ) { - TQKeyEvent *e = TQT_TQKEYEVENT( ev ); + TQKeyEvent *e = static_cast<TQKeyEvent*>( ev ); if (overrideAccel (e)) { e->accept(); @@ -1020,14 +1020,14 @@ bool KLineEdit::eventFilter( TQObject* o, TQEvent* ev ) } else if( ev->type() == TQEvent::KeyPress ) { - TQKeyEvent *e = TQT_TQKEYEVENT( ev ); + TQKeyEvent *e = static_cast<TQKeyEvent*>( ev ); - if( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) + if( e->key() == TQt::Key_Return || e->key() == TQt::Key_Enter ) { bool trap = d->completionBox && d->completionBox->isVisible(); bool stopEvent = trap || (d->grabReturnKeyEvents && - (e->state() == Qt::NoButton || + (e->state() == TQt::NoButton || e->state() == TQt::Keypad)); // Qt will emit returnPressed() itself if we return false @@ -1088,14 +1088,12 @@ void KLineEdit::setCompletionBox( TDECompletionBox *box ) d->completionBox = box; if ( handleSignals() ) { - connect( d->completionBox, TQT_SIGNAL(highlighted( const TQString& )), - TQT_SLOT(setTextWorkaround( const TQString& )) ); - connect( d->completionBox, TQT_SIGNAL(userCancelled( const TQString& )), - TQT_SLOT(userCancelled( const TQString& )) ); - - // TODO: we need our own slot, and to call setModified(true) if Qt4 has that. - connect( d->completionBox, TQT_SIGNAL( activated( const TQString& )), - TQT_SIGNAL(completionBoxActivated( const TQString& )) ); + connect( d->completionBox, TQ_SIGNAL(highlighted( const TQString& )), + TQ_SLOT(setTextWorkaround( const TQString& )) ); + connect( d->completionBox, TQ_SIGNAL(userCancelled( const TQString& )), + TQ_SLOT(userCancelled( const TQString& )) ); + connect( d->completionBox, TQ_SIGNAL( activated( const TQString& )), + TQ_SIGNAL(completionBoxActivated( const TQString& )) ); } } @@ -1182,7 +1180,7 @@ bool KLineEdit::overrideAccel (const TQKeyEvent* e) int key = e->key(); ButtonState state = e->state(); if ((key == Key_Backtab || key == Key_Tab) && - (state == Qt::NoButton || (state & TQt::ShiftButton))) + (state == TQt::NoButton || (state & TQt::ShiftButton))) { return true; } @@ -1273,12 +1271,12 @@ void KLineEdit::setCompletionObject( TDECompletion* comp, bool hsig ) { TDECompletion *oldComp = compObj(); if ( oldComp && handleSignals() ) - disconnect( oldComp, TQT_SIGNAL( matches( const TQStringList& )), - this, TQT_SLOT( setCompletedItems( const TQStringList& ))); + disconnect( oldComp, TQ_SIGNAL( matches( const TQStringList& )), + this, TQ_SLOT( setCompletedItems( const TQStringList& ))); if ( comp && hsig ) - connect( comp, TQT_SIGNAL( matches( const TQStringList& )), - this, TQT_SLOT( setCompletedItems( const TQStringList& ))); + connect( comp, TQ_SIGNAL( matches( const TQStringList& )), + this, TQ_SLOT( setCompletedItems( const TQStringList& ))); TDECompletionBase::setCompletionObject( comp, hsig ); } diff --git a/tdeui/klineedit.h b/tdeui/klineedit.h index 82179fa05..6c56d6a3a 100644 --- a/tdeui/klineedit.h +++ b/tdeui/klineedit.h @@ -99,7 +99,7 @@ class KURL; * KLineEdit *edit = new KLineEdit( this, "mywidget" ); * TDECompletion *comp = edit->completionObject(); * // Connect to the return pressed signal - optional - * connect(edit,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&))); + * connect(edit,TQ_SIGNAL(returnPressed(const TQString&)),comp,TQ_SLOT(addItem(const TQString&))); * \endcode * * To use a customized completion objects or your @@ -110,7 +110,7 @@ class KURL; * KURLCompletion *comp = new KURLCompletion(); * edit->setCompletionObject( comp ); * // Connect to the return pressed signal - optional - * connect(edit,TQT_SIGNAL(returnPressed(const TQString&)),comp,TQT_SLOT(addItem(const TQString&))); + * connect(edit,TQ_SIGNAL(returnPressed(const TQString&)),comp,TQ_SLOT(addItem(const TQString&))); * \endcode * * Note if you specify your own completion object you have to either delete @@ -127,7 +127,7 @@ class KURL; * edit->setHandleSignals( false ); * * // Set your own key-bindings for a text completion mode. - * edit->setKeyBinding( TDECompletionBase::TextCompletion, Qt::End ); + * edit->setKeyBinding( TDECompletionBase::TextCompletion, TQt::End ); * * // Hide the context (popup) menu * edit->setContextMenuEnabled( false ); @@ -146,7 +146,7 @@ class TDEUI_EXPORT KLineEdit : public TQLineEdit, public TDECompletionBase { friend class KComboBox; - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool contextMenuEnabled READ isContextMenuEnabled WRITE setContextMenuEnabled ) TQ_PROPERTY( bool urlDropsEnabled READ isURLDropsEnabled WRITE setURLDropsEnabled ) TQ_PROPERTY( bool trapEnterKeyEvent READ trapReturnKey WRITE setTrapReturnKey ) diff --git a/tdeui/klineeditdlg.cpp b/tdeui/klineeditdlg.cpp index 8fc0a9a4f..9bdd429ce 100644 --- a/tdeui/klineeditdlg.cpp +++ b/tdeui/klineeditdlg.cpp @@ -46,12 +46,12 @@ KLineEditDlg::KLineEditDlg( const TQString&_text, const TQString& _value, edit = new KLineEdit( plainPage(), 0L ); edit->setMinimumWidth(edit->sizeHint().width() * 3); label->setBuddy(edit); // please "scheck" style - // connect( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(accept()) ); - connect( edit, TQT_SIGNAL(textChanged(const TQString&)), - TQT_SLOT(slotTextChanged(const TQString&)) ); + // connect( edit, TQ_SIGNAL(returnPressed()), TQ_SLOT(accept()) ); + connect( edit, TQ_SIGNAL(textChanged(const TQString&)), + TQ_SLOT(slotTextChanged(const TQString&)) ); topLayout->addWidget( edit, 1 ); - connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotClear()) ); + connect( this, TQ_SIGNAL(user1Clicked()), this, TQ_SLOT(slotClear()) ); edit->setText( _value ); if ( _value.isEmpty() ) { @@ -76,7 +76,7 @@ KLineEditDlg::KLineEditDlg( const TQString&_text, const TQString& _value, edit = new KLineEdit( this, 0L ); edit->setMinimumWidth(edit->sizeHint().width() * 3); - connect( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(accept()) ); + connect( edit, TQ_SIGNAL(returnPressed()), TQ_SLOT(accept()) ); if ( _file_mode ) { completion = new KURLCompletion(); @@ -91,8 +91,8 @@ KLineEditDlg::KLineEditDlg( const TQString&_text, const TQString& _value, if (_file_mode) { TQPushButton *browse = new TQPushButton(i18n("&Browse..."), this); layout->addWidget(browse, 1, 2, AlignCenter); - connect(browse, TQT_SIGNAL(clicked()), - TQT_SLOT(slotBrowse())); + connect(browse, TQ_SIGNAL(clicked()), + TQ_SLOT(slotBrowse())); } TQFrame *hLine = new TQFrame(this); @@ -104,17 +104,17 @@ KLineEditDlg::KLineEditDlg( const TQString&_text, const TQString& _value, TQPushButton *ok = bBox->addButton(KStdGuiItem::ok()); ok->setDefault(true); - connect( ok, TQT_SIGNAL(clicked()), TQT_SLOT(accept())); + connect( ok, TQ_SIGNAL(clicked()), TQ_SLOT(accept())); bBox->addStretch(1); TQPushButton *clear = bBox->addButton(KStdGuiItem::clear()); - connect( clear, TQT_SIGNAL(clicked()), TQT_SLOT(slotClear())); + connect( clear, TQ_SIGNAL(clicked()), TQ_SLOT(slotClear())); bBox->addStretch(1); TQPushButton *cancel = bBox->addButton(KStdGuiItem::cancel()); - connect( cancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect( cancel, TQ_SIGNAL(clicked()), TQ_SLOT(reject())); bBox->layout(); diff --git a/tdeui/klineeditdlg.h b/tdeui/klineeditdlg.h index efa4b4a4a..979f3ad88 100644 --- a/tdeui/klineeditdlg.h +++ b/tdeui/klineeditdlg.h @@ -20,8 +20,6 @@ #ifndef __klineeditdlg_h__ #define __klineeditdlg_h__ -// #include <tqt.h> - #include <kdialogbase.h> class KLineEdit; @@ -39,7 +37,7 @@ class TQValidator; class TDEUI_EXPORT_DEPRECATED KLineEditDlg : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** * Create a dialog that asks for a single line of text. _value is @@ -57,7 +55,7 @@ public: * @param _value Initial value of the inputline * @param parent Parent widget for the line edit dialog */ - KLineEditDlg( const TQString& _text, const TQString& _value, TQWidget *parent ) KDE_DEPRECATED; + KLineEditDlg( const TQString& _text, const TQString& _value, TQWidget *parent ) TDE_DEPRECATED; virtual ~KLineEditDlg(); /** @@ -80,7 +78,7 @@ public: * @param parent The parent widget */ static TQString getText(const TQString &text, const TQString& value, - bool *ok, TQWidget *parent, TQValidator *validator=0 ) KDE_DEPRECATED; + bool *ok, TQWidget *parent, TQValidator *validator=0 ) TDE_DEPRECATED; /** * Static convenience function to get a textual input from the user. @@ -97,7 +95,7 @@ public: static TQString getText(const TQString &caption, const TQString &text, const TQString& value=TQString::null, bool *ok=0, TQWidget *parent=0, - TQValidator *validator=0) KDE_DEPRECATED; + TQValidator *validator=0) TDE_DEPRECATED; public slots: /** diff --git a/tdeui/knuminput.cpp b/tdeui/knuminput.cpp index 46f7f2b5c..0820fd29b 100644 --- a/tdeui/knuminput.cpp +++ b/tdeui/knuminput.cpp @@ -298,9 +298,9 @@ void KIntNumInput::init(int val, int _base) if (_base != 10) m_spin->setValidator(new KIntValidator(this, _base, "KNumInput::KIntValidtr")); - connect(m_spin, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(spinValueChanged(int))); - connect(this, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(slotEmitRelativeValueChanged(int))); + connect(m_spin, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(spinValueChanged(int))); + connect(this, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(slotEmitRelativeValueChanged(int))); setFocusProxy(m_spin); layout(true); @@ -344,10 +344,10 @@ void KIntNumInput::setRange(int lower, int upper, int step, bool slider) m_slider->setRange(lower, upper); else { m_slider = new TQSlider(lower, upper, step, m_spin->value(), - Qt::Horizontal, this); + TQt::Horizontal, this); m_slider->setTickmarks(TQSlider::Below); - connect(m_slider, TQT_SIGNAL(valueChanged(int)), - m_spin, TQT_SLOT(setValue(int))); + connect(m_slider, TQ_SIGNAL(valueChanged(int)), + m_spin, TQ_SLOT(setValue(int))); } // calculate (upper-lower)/10 without overflowing int's: @@ -616,10 +616,10 @@ void KDoubleNumInput::init(double value, double lower, double upper, d->spin = new KDoubleSpinBox( lower, upper, step, value, precision, this, "KDoubleNumInput::d->spin" ); setFocusProxy(d->spin); - connect( d->spin, TQT_SIGNAL(valueChanged(double)), - this, TQT_SIGNAL(valueChanged(double)) ); - connect( this, TQT_SIGNAL(valueChanged(double)), - this, TQT_SLOT(slotEmitRelativeValueChanged(double)) ); + connect( d->spin, TQ_SIGNAL(valueChanged(double)), + this, TQ_SIGNAL(valueChanged(double)) ); + connect( this, TQ_SIGNAL(valueChanged(double)), + this, TQ_SLOT(slotEmitRelativeValueChanged(double)) ); updateLegacyMembers(); @@ -754,8 +754,8 @@ void KDoubleNumInput::setRange(double lower, double upper, double step, if( m_slider ) { // don't update the slider to avoid an endless recursion TQSpinBox * spin = d->spin; - disconnect(spin, TQT_SIGNAL(valueChanged(int)), - m_slider, TQT_SLOT(setValue(int)) ); + disconnect(spin, TQ_SIGNAL(valueChanged(int)), + m_slider, TQ_SLOT(setValue(int)) ); } d->spin->setRange( lower, upper, step, d->spin->precision() ); @@ -771,14 +771,14 @@ void KDoubleNumInput::setRange(double lower, double upper, double step, m_slider->setValue(slvalue); } else { m_slider = new TQSlider(slmin, slmax, slstep, slvalue, - Qt::Horizontal, this); + TQt::Horizontal, this); m_slider->setTickmarks(TQSlider::Below); // feedback line: when one moves, the other moves, too: - connect(m_slider, TQT_SIGNAL(valueChanged(int)), - TQT_SLOT(sliderMoved(int)) ); + connect(m_slider, TQ_SIGNAL(valueChanged(int)), + TQ_SLOT(sliderMoved(int)) ); } - connect(spin, TQT_SIGNAL(valueChanged(int)), - m_slider, TQT_SLOT(setValue(int)) ); + connect(spin, TQ_SIGNAL(valueChanged(int)), + m_slider, TQ_SLOT(setValue(int)) ); // calculate ( slmax - slmin ) / 10 without overflowing ints: int major = calcDiffByTen( slmax, slmin ); if ( !major ) major = slstep; // ### needed? @@ -901,7 +901,7 @@ class KDoubleSpinBoxValidator : public KDoubleValidator { public: KDoubleSpinBoxValidator( double bottom, double top, int decimals, KDoubleSpinBox* sb, const char *name ) - : KDoubleValidator( bottom, top, decimals, TQT_TQOBJECT(sb), name ), spinBox( sb ) { } + : KDoubleValidator( bottom, top, decimals, sb, name ), spinBox( sb ) { } virtual State validate( TQString& str, int& pos ) const; @@ -1011,10 +1011,10 @@ public: KDoubleSpinBox::KDoubleSpinBox( TQWidget * parent, const char * name ) : TQSpinBox( parent, name ) { - editor()->setAlignment( Qt::AlignRight ); + editor()->setAlignment( TQt::AlignRight ); d = new Private(); updateValidator(); - connect( this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)) ); + connect( this, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotValueChanged(int)) ); } KDoubleSpinBox::KDoubleSpinBox( double lower, double upper, double step, @@ -1022,11 +1022,11 @@ KDoubleSpinBox::KDoubleSpinBox( double lower, double upper, double step, TQWidget * parent, const char * name ) : TQSpinBox( parent, name ) { - editor()->setAlignment( Qt::AlignRight ); + editor()->setAlignment( TQt::AlignRight ); d = new Private(); setRange( lower, upper, step, precision ); setValue( value ); - connect( this, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)) ); + connect( this, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotValueChanged(int)) ); } KDoubleSpinBox::~KDoubleSpinBox() { diff --git a/tdeui/knuminput.h b/tdeui/knuminput.h index 4716d8051..c0bd0f935 100644 --- a/tdeui/knuminput.h +++ b/tdeui/knuminput.h @@ -48,7 +48,7 @@ class KIntSpinBox; */ class TDEUI_EXPORT KNumInput : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQString label READ label WRITE setLabel ) public: @@ -187,7 +187,7 @@ private: class TDEUI_EXPORT KIntNumInput : public KNumInput { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int value READ value WRITE setValue ) TQ_PROPERTY( int minValue READ minValue WRITE setMinValue ) @@ -213,7 +213,7 @@ public: * * @param value initial value for the control * @param base numeric base used for display - * @param parent parent QWidget + * @param parent parent TQWidget * @param name internal name for this widget */ KIntNumInput(int value, TQWidget* parent=0, int base = 10, const char *name=0); @@ -232,7 +232,7 @@ public: * @param below append KIntNumInput to the KNumInput chain * @param value initial value for the control * @param base numeric base used for display - * @param parent parent QWidget + * @param parent parent TQWidget * @param name internal name for this widget */ KIntNumInput(KNumInput* below, int value, TQWidget* parent=0, int base = 10, const char *name=0); @@ -433,7 +433,7 @@ class KDoubleLine; class TDEUI_EXPORT KDoubleNumInput : public KNumInput { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( double value READ value WRITE setValue ) TQ_PROPERTY( double minValue READ minValue WRITE setMinValue ) @@ -457,10 +457,10 @@ public: * Constructor * * @param value initial value for the control - * @param parent parent QWidget + * @param parent parent TQWidget * @param name internal name for this widget */ - KDoubleNumInput(double value, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; + KDoubleNumInput(double value, TQWidget *parent=0, const char *name=0) TDE_DEPRECATED; /** * Constructor @@ -470,7 +470,7 @@ public: * @param value initial value for the control * @param step step size to use for up/down arrow clicks * @param precision number of digits after the decimal point - * @param parent parent QWidget + * @param parent parent TQWidget * @param name internal name for this widget * @since 3.1 */ @@ -490,10 +490,10 @@ public: * * @param below * @param value initial value for the control - * @param parent parent QWidget + * @param parent parent TQWidget * @param name internal name for this widget **/ - KDoubleNumInput(KNumInput* below, double value, TQWidget* parent=0, const char* name=0) KDE_DEPRECATED; + KDoubleNumInput(KNumInput* below, double value, TQWidget* parent=0, const char* name=0) TDE_DEPRECATED; /** * Constructor @@ -512,7 +512,7 @@ public: * @param value initial value for the control * @param step step size to use for up/down arrow clicks * @param precision number of digits after the decimal point - * @param parent parent QWidget + * @param parent parent TQWidget * @param name internal name for this widget * @since 3.1 */ @@ -706,7 +706,7 @@ private: */ class TDEUI_EXPORT KIntSpinBox : public TQSpinBox { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int base READ base WRITE setBase ) @@ -836,7 +836,7 @@ private: **/ class TDEUI_EXPORT KDoubleSpinBox : public TQSpinBox { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool acceptLocalizedNumbers READ acceptLocalizedNumbers WRITE setAcceptLocalizedNumbers ) TQ_OVERRIDE( double maxValue READ maxValue WRITE setMaxValue ) diff --git a/tdeui/knumvalidator.cpp b/tdeui/knumvalidator.cpp index 6cf486ad1..62099dd32 100644 --- a/tdeui/knumvalidator.cpp +++ b/tdeui/knumvalidator.cpp @@ -35,7 +35,7 @@ // KIntValidator::KIntValidator ( TQWidget * parent, int base, const char * name ) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) { _base = base; if (_base < 2) _base = 2; @@ -45,7 +45,7 @@ KIntValidator::KIntValidator ( TQWidget * parent, int base, const char * name ) } KIntValidator::KIntValidator ( int bottom, int top, TQWidget * parent, int base, const char * name ) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) { _base = base; if (_base > 36) _base = 36; @@ -162,7 +162,7 @@ public: KFloatValidator::KFloatValidator ( TQWidget * parent, const char * name ) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) { d = new KFloatValidatorPrivate; d->acceptLocalizedNumbers=false; @@ -170,7 +170,7 @@ KFloatValidator::KFloatValidator ( TQWidget * parent, const char * name ) } KFloatValidator::KFloatValidator ( double bottom, double top, TQWidget * parent, const char * name ) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) { d = new KFloatValidatorPrivate; d->acceptLocalizedNumbers=false; @@ -179,7 +179,7 @@ KFloatValidator::KFloatValidator ( double bottom, double top, TQWidget * parent, } KFloatValidator::KFloatValidator ( double bottom, double top, bool localeAware, TQWidget * parent, const char * name ) - : TQValidator(TQT_TQOBJECT(parent), name) + : TQValidator(parent, name) { d = new KFloatValidatorPrivate; d->acceptLocalizedNumbers = localeAware; diff --git a/tdeui/knumvalidator.h b/tdeui/knumvalidator.h index 5c7b31484..fd42a0fa6 100644 --- a/tdeui/knumvalidator.h +++ b/tdeui/knumvalidator.h @@ -179,7 +179,7 @@ class TDEUI_EXPORT KFloatValidator : public TQValidator { **/ class TDEUI_EXPORT KDoubleValidator : public TQDoubleValidator { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool acceptLocalizedNumbers READ acceptLocalizedNumbers WRITE setAcceptLocalizedNumbers ) public: /** Constuct a locale-aware KDoubleValidator with default range diff --git a/tdeui/kpanelapplet.cpp b/tdeui/kpanelapplet.cpp index f88cb5a8a..69483d71c 100644 --- a/tdeui/kpanelapplet.cpp +++ b/tdeui/kpanelapplet.cpp @@ -60,7 +60,7 @@ KPanelApplet::KPanelApplet(const TQString& configFile, Type type, } setBackgroundOrigin( AncestorOrigin ); - d->sharedConfig = TDESharedConfig::openConfig(configFile, kapp && kapp->config()->isImmutable()); + d->sharedConfig = TDESharedConfig::openConfig(configFile, tdeApp && tdeApp->config()->isImmutable()); _config = d->sharedConfig; } @@ -94,12 +94,12 @@ void KPanelApplet::positionChange( Position ) popupDirectionChange( popupDirection() ); } -Qt::Orientation KPanelApplet::orientation() const +TQt::Orientation KPanelApplet::orientation() const { if( _position == pTop || _position == pBottom ) { - return Qt::Horizontal; + return TQt::Horizontal; } else { - return Qt::Vertical; + return TQt::Vertical; } } @@ -146,15 +146,15 @@ void KPanelApplet::watchForFocus(TQWidget* widget, bool watch) if (watch) { - if (d->watchedForFocus.find(TQT_TQOBJECT(widget)) == -1) + if (d->watchedForFocus.find(widget) == -1) { - d->watchedForFocus.append(TQT_TQOBJECT(widget)); + d->watchedForFocus.append(widget); widget->installEventFilter(this); } } - else if (d->watchedForFocus.find(TQT_TQOBJECT(widget)) != -1) + else if (d->watchedForFocus.find(widget) != -1) { - d->watchedForFocus.remove(TQT_TQOBJECT(widget)); + d->watchedForFocus.remove(widget); widget->removeEventFilter(this); } } diff --git a/tdeui/kpanelapplet.h b/tdeui/kpanelapplet.h index a8729e331..2a5d91376 100644 --- a/tdeui/kpanelapplet.h +++ b/tdeui/kpanelapplet.h @@ -55,7 +55,7 @@ class TQPopupMenu; * * \b X-TDE-UniqueApplet \n * - * Similar to TDEApplication and KUniqueApplication there are + * Similar to TDEApplication and TDEUniqueApplication there are * two types of panel applets. Use unique applets when it makes no * sence to run more than one instance of a applet in the panel. A * good example for unique applets is the taskbar applet. Use normal @@ -96,7 +96,7 @@ class TQPopupMenu; **/ class TDEUI_EXPORT KPanelApplet : public TQFrame { - Q_OBJECT + TQ_OBJECT public: @@ -361,7 +361,7 @@ protected: * @deprecated Reimplement positionChange instead. **/ // FIXME: Remove for KDE 4 - virtual KDE_DEPRECATED void orientationChange( Orientation /* orientation*/) {} + virtual TDE_DEPRECATED void orientationChange( Orientation /* orientation*/) {} /** * A convenience method that translates the position of the applet into which @@ -376,7 +376,7 @@ protected: * @deprecated Reimplement positionChange instead. **/ // FIXME: Remove for KDE 4 - virtual KDE_DEPRECATED void popupDirectionChange( Direction /*direction*/ ) {} + virtual TDE_DEPRECATED void popupDirectionChange( Direction /*direction*/ ) {} bool eventFilter(TQObject *, TQEvent *); diff --git a/tdeui/kpanelappmenu.cpp b/tdeui/kpanelappmenu.cpp index 247d844de..e8eb6faa9 100644 --- a/tdeui/kpanelappmenu.cpp +++ b/tdeui/kpanelappmenu.cpp @@ -60,7 +60,7 @@ KPanelAppMenu::KPanelAppMenu(TQObject *parent, const char *name) void KPanelAppMenu::init(const TQPixmap &icon, const TQString &title) { - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); if(!client->isAttached()) client->attach(); TQByteArray sendData, replyData; @@ -86,7 +86,7 @@ void KPanelAppMenu::init(const TQPixmap &icon, const TQString &title) KPanelAppMenu::~KPanelAppMenu() { - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); TQByteArray sendData; TQDataStream stream(sendData, IO_WriteOnly); stream << realObjId; @@ -97,7 +97,7 @@ int KPanelAppMenu::insertItem(const TQPixmap &icon, const TQString &text, int id { if ( id < 0 ) id = panelmenu_get_seq_id(); - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); TQByteArray sendData; TQDataStream stream(sendData, IO_WriteOnly); stream << icon << text << id; @@ -110,7 +110,7 @@ KPanelAppMenu *KPanelAppMenu::insertMenu(const TQPixmap &icon, const TQString &t { if ( id < 0 ) id = panelmenu_get_seq_id(); - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); TQByteArray sendData, replyData; TQCString replyType; TQDataStream stream(sendData, IO_WriteOnly); @@ -135,7 +135,7 @@ int KPanelAppMenu::insertItem(const TQString &text, int id ) { if ( id < 0 ) id = panelmenu_get_seq_id(); - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); TQByteArray sendData; TQDataStream stream(sendData, IO_WriteOnly); stream << text << id; @@ -146,7 +146,7 @@ int KPanelAppMenu::insertItem(const TQString &text, int id ) void KPanelAppMenu::clear() { - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); TQByteArray sendData; client->send("kicker", realObjId, "clear()", sendData); } diff --git a/tdeui/kpanelappmenu.h b/tdeui/kpanelappmenu.h index 56131e290..39b6b8e4e 100644 --- a/tdeui/kpanelappmenu.h +++ b/tdeui/kpanelappmenu.h @@ -36,7 +36,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ class TDEUI_EXPORT KPanelAppMenu : public TQObject, public DCOPObject { - Q_OBJECT + TQ_OBJECT public: /** * Constructs a new menu with the given title. diff --git a/tdeui/kpanelextension.cpp b/tdeui/kpanelextension.cpp index 31fbd4343..d332ba2a1 100644 --- a/tdeui/kpanelextension.cpp +++ b/tdeui/kpanelextension.cpp @@ -98,12 +98,12 @@ void KPanelExtension::action( Action a ) reportBug(); } -Qt::Orientation KPanelExtension::orientation() +TQt::Orientation KPanelExtension::orientation() { if (_position == Left || _position == Right) - return Qt::Vertical; + return TQt::Vertical; else - return Qt::Horizontal; + return TQt::Horizontal; } KPanelExtension::Size KPanelExtension::sizeSetting() const diff --git a/tdeui/kpanelextension.h b/tdeui/kpanelextension.h index f97e85482..c7793f4d1 100644 --- a/tdeui/kpanelextension.h +++ b/tdeui/kpanelextension.h @@ -56,7 +56,7 @@ class KPanelExtensionPrivate; * * \b X-TDE-UniqueExtension \n * - * Similar to TDEApplication and KUniqueApplication there are + * Similar to TDEApplication and TDEUniqueApplication there are * two types of panel extensions. Use unique extensions when it makes no * sence to run more than one instance of an extension in the panel. A * good example for unique extensions is the taskbar extension. Use normal @@ -96,7 +96,7 @@ class KPanelExtensionPrivate; **/ class TDEUI_EXPORT KPanelExtension : public TQFrame { - Q_OBJECT + TQ_OBJECT public: diff --git a/tdeui/kpanelmenu.cpp b/tdeui/kpanelmenu.cpp index 287208b66..f2a3d8f08 100644 --- a/tdeui/kpanelmenu.cpp +++ b/tdeui/kpanelmenu.cpp @@ -59,8 +59,8 @@ void KPanelMenu::init(const TQString& path) setInitialized( false ); d->startPath = path; - connect(this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotExec(int))); - connect(this, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotAboutToShow())); + connect(this, TQ_SIGNAL(activated(int)), TQ_SLOT(slotExec(int))); + connect(this, TQ_SIGNAL(aboutToShow()), TQ_SLOT(slotAboutToShow())); // setup cache timer TDEConfig *config = TDEGlobal::config(); @@ -99,8 +99,8 @@ void KPanelMenu::hideEvent(TQHideEvent *ev) { // start the cache timer if(d->clearDelay) { - disconnect(&(d->t), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotClear())); - connect(&(d->t), TQT_SIGNAL(timeout()), this, TQT_SLOT(slotClear())); + disconnect(&(d->t), TQ_SIGNAL(timeout()), this, TQ_SLOT(slotClear())); + connect(&(d->t), TQ_SIGNAL(timeout()), this, TQ_SLOT(slotClear())); d->t.start(d->clearDelay, true); } TQPopupMenu::hideEvent(ev); diff --git a/tdeui/kpanelmenu.h b/tdeui/kpanelmenu.h index 03b700b82..972fb2bc1 100644 --- a/tdeui/kpanelmenu.h +++ b/tdeui/kpanelmenu.h @@ -52,7 +52,7 @@ class KPanelMenuPrivate; */ class TDEUI_EXPORT KPanelMenu : public TDEPopupMenu { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/kpassdlg.cpp b/tdeui/kpassdlg.cpp index 38f63484f..e9532137f 100644 --- a/tdeui/kpassdlg.cpp +++ b/tdeui/kpassdlg.cpp @@ -41,7 +41,7 @@ #include <tdemessagebox.h> #include <tdeaboutdialog.h> #include <tdeconfig.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kprogress.h> #include <sys/time.h> @@ -230,12 +230,12 @@ void KPasswordDialog::init() lbl->setPixmap(pix); lbl->setAlignment(AlignHCenter|AlignVCenter); lbl->setFixedSize(lbl->sizeHint()); - m_pGrid->addWidget(lbl, 0, 0, (TQ_Alignment)AlignCenter); + m_pGrid->addWidget(lbl, 0, 0, TQt::AlignCenter); } m_pHelpLbl = new TQLabel(m_pMain); m_pHelpLbl->setAlignment(AlignLeft|AlignVCenter|WordBreak); - m_pGrid->addWidget(m_pHelpLbl, 0, 2, (TQ_Alignment)AlignLeft); + m_pGrid->addWidget(m_pHelpLbl, 0, 2, TQt::AlignLeft); m_pGrid->addRowSpacing(1, 10); m_pGrid->setRowStretch(1, 12); @@ -248,7 +248,7 @@ void KPasswordDialog::init() lbl->setAlignment(AlignLeft|AlignVCenter); lbl->setText(i18n("&Password:")); lbl->setFixedSize(lbl->sizeHint()); - m_pGrid->addWidget(lbl, 7, 0, (TQ_Alignment)AlignLeft); + m_pGrid->addWidget(lbl, 7, 0, TQt::AlignLeft); TQHBoxLayout *h_lay = new TQHBoxLayout(); m_pGrid->addLayout(h_lay, 7, 2); @@ -277,9 +277,9 @@ void KPasswordDialog::init() m_Keep = 0; m_keepWarnLbl->hide(); } - connect(cb, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotKeep(bool))); - m_pGrid->addWidget(cb, 9, 2, (TQ_Alignment)(AlignLeft|AlignVCenter)); -// m_pGrid->addWidget(m_keepWarnLbl, 13, 2, (TQ_Alignment)(AlignLeft|AlignVCenter)); + connect(cb, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotKeep(bool))); + m_pGrid->addWidget(cb, 9, 2, TQt::AlignLeft|TQt::AlignVCenter); +// m_pGrid->addWidget(m_keepWarnLbl, 13, 2, TQt::AlignLeft|TQt::AlignVCenter); m_pGrid->addMultiCellWidget(m_keepWarnLbl, 13, 13, 0, 3); } else if (m_Type == NewPassword) { m_pGrid->addRowSpacing(8, 10); @@ -287,7 +287,7 @@ void KPasswordDialog::init() lbl->setAlignment(AlignLeft|AlignVCenter); lbl->setText(i18n("&Verify:")); lbl->setFixedSize(lbl->sizeHint()); - m_pGrid->addWidget(lbl, 9, 0, (TQ_Alignment)AlignLeft); + m_pGrid->addWidget(lbl, 9, 0, TQt::AlignLeft); h_lay = new TQHBoxLayout(); m_pGrid->addLayout(h_lay, 9, 2); @@ -330,8 +330,8 @@ void KPasswordDialog::init() d->m_MatchLabel->setText(i18n("Passwords do not match")); - connect( m_pEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(enableOkBtn()) ); - connect( m_pEdit2, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(enableOkBtn()) ); + connect( m_pEdit, TQ_SIGNAL(textChanged(const TQString&)), TQ_SLOT(enableOkBtn()) ); + connect( m_pEdit2, TQ_SIGNAL(textChanged(const TQString&)), TQ_SLOT(enableOkBtn()) ); enableOkBtn(); } @@ -381,12 +381,12 @@ void KPasswordDialog::addLine(TQString key, TQString value) TQLabel *lbl = new TQLabel(key, m_pMain); lbl->setAlignment(AlignLeft|AlignTop); lbl->setFixedSize(lbl->sizeHint()); - m_pGrid->addWidget(lbl, m_Row+2, 0, (TQ_Alignment)AlignLeft); + m_pGrid->addWidget(lbl, m_Row+2, 0, TQt::AlignLeft); lbl = new TQLabel(value, m_pMain); lbl->setAlignment(AlignTop|WordBreak); lbl->setFixedSize(275, lbl->heightForWidth(275)); - m_pGrid->addWidget(lbl, m_Row+2, 2, (TQ_Alignment)AlignLeft); + m_pGrid->addWidget(lbl, m_Row+2, 2, TQt::AlignLeft); ++m_Row; } @@ -446,7 +446,7 @@ void KPasswordDialog::slotKeep(bool keep) else { m_keepWarnLbl->hide(); } - TQTimer::singleShot(0, this, SLOT(slotLayout())); + TQTimer::singleShot(0, this, TQ_SLOT(slotLayout())); } m_Keep = keep; diff --git a/tdeui/kpassdlg.h b/tdeui/kpassdlg.h index 9272e63c3..3eb2ea100 100644 --- a/tdeui/kpassdlg.h +++ b/tdeui/kpassdlg.h @@ -38,7 +38,7 @@ class TQWidget; class TDEUI_EXPORT KPasswordEdit : public TQLineEdit { - Q_OBJECT + TQ_OBJECT public: enum EchoModes { OneStar, ThreeStars, NoEcho }; @@ -67,7 +67,7 @@ public: * @deprecated, will be removed in KDE 4.0 * Creates a password input widget using echoMode as "echo mode". */ - KPasswordEdit(TQWidget *parent, const char *name, int echoMode) KDE_DEPRECATED; + KPasswordEdit(TQWidget *parent, const char *name, int echoMode) TDE_DEPRECATED; /** * Destructs the widget. @@ -150,7 +150,7 @@ private: class TDEUI_EXPORT KPasswordDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** @@ -192,7 +192,7 @@ public: * possibility to specify a parent. Will be removed in KDE 4.0 */ KPasswordDialog(int type, TQString prompt, bool enableKeep=false, - int extraBttn=0) KDE_DEPRECATED; + int extraBttn=0) TDE_DEPRECATED; // note that this implicitly deprecates the 'prompt' variants of // getPassword() below. i guess the above constructor needs to be extended. diff --git a/tdeui/kpassivepopup.cpp b/tdeui/kpassivepopup.cpp index ce6126314..91a95388f 100644 --- a/tdeui/kpassivepopup.cpp +++ b/tdeui/kpassivepopup.cpp @@ -25,7 +25,7 @@ #include <tdeglobalsettings.h> #include "config.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <netwm.h> #endif @@ -94,10 +94,10 @@ void KPassivePopup::init( int popupStyle ) else if( popupStyle == Balloon ) { setPalette(TQToolTip::palette()); - setAutoMask(TRUE); + setAutoMask(true); } - connect( hideTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( hide() ) ); - connect( this, TQT_SIGNAL( clicked() ), TQT_SLOT( hide() ) ); + connect( hideTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( hide() ) ); + connect( this, TQ_SIGNAL( clicked() ), TQ_SLOT( hide() ) ); } KPassivePopup::~KPassivePopup() @@ -143,7 +143,7 @@ TQVBox * KPassivePopup::standardView(const TQString& caption, TQString sizedCaption = caption; TQString sizedText = text; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 int max_width; NETRootInfo info( tqt_xdisplay(), @@ -172,13 +172,13 @@ TQVBox * KPassivePopup::standardView(const TQString& caption, if ( !sizedCaption.isEmpty() ) { ttl = new TQLabel( sizedCaption, hb ? hb : vb, "title_label" ); TQFont fnt = ttl->font(); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 truncateStringToFit(sizedCaption, fnt, max_width); ttl->setText(sizedCaption); #endif fnt.setBold( true ); ttl->setFont( fnt ); - ttl->setAlignment( Qt::AlignHCenter ); + ttl->setAlignment( TQt::AlignHCenter ); if ( hb ) { hb->setStretchFactor( ttl, 10 ); // enforce centering } @@ -186,7 +186,7 @@ TQVBox * KPassivePopup::standardView(const TQString& caption, if ( !sizedText.isEmpty() ) { msg = new TQLabel( sizedText, vb, "msg_label" ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 TQStringList textLines = TQStringList::split("\n", sizedText, true); for (TQStringList::Iterator it = textLines.begin(); it != textLines.end(); ++it) { truncateStringToFit(*it, msg->font(), max_width); @@ -295,7 +295,7 @@ void KPassivePopup::hideEvent( TQHideEvent * ) TQRect KPassivePopup::defaultArea() const { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 NETRootInfo info( tqt_xdisplay(), NET::NumberOfDesktops | NET::CurrentDesktop | @@ -317,7 +317,7 @@ void KPassivePopup::positionSelf() { TQRect target; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if ( !window ) { target = defaultArea(); } @@ -442,7 +442,7 @@ void KPassivePopup::updateMask() TQBitmap mask( width(), height(), true ); TQPainter p( &mask ); - TQBrush brush( Qt::white, Qt::SolidPattern ); + TQBrush brush( TQt::white, TQt::SolidPattern ); p.setBrush( brush ); int i = 0, z = 0; diff --git a/tdeui/kpassivepopup.h b/tdeui/kpassivepopup.h index 89a05a671..bc1b9ed1c 100644 --- a/tdeui/kpassivepopup.h +++ b/tdeui/kpassivepopup.h @@ -65,7 +65,7 @@ class TQVBox; */ class TDEUI_EXPORT KPassivePopup : public TQFrame { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY (bool autoDelete READ autoDelete WRITE setAutoDelete ) TQ_PROPERTY (int timeout READ timeout WRITE setTimeout ) diff --git a/tdeui/kpixmapio.cpp b/tdeui/kpixmapio.cpp index 47f6c405f..46c0e2aff 100644 --- a/tdeui/kpixmapio.cpp +++ b/tdeui/kpixmapio.cpp @@ -28,16 +28,13 @@ #include <sys/shm.h> #endif -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <X11/X.h> #include <X11/Xlib.h> #include <X11/Xutil.h> #ifdef HAVE_MITSHM #include <X11/extensions/XShm.h> #endif -#ifdef __osf__ -extern "C" int XShmQueryExtension(Display *display); -#endif #else #undef HAVE_MITSHM #endif @@ -51,7 +48,7 @@ struct KPixmapIOPrivate int threshold; int bpp; int byteorder; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 XImage *ximage; #ifdef HAVE_MITSHM XShmSegmentInfo *shminfo; @@ -664,7 +661,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) { uchar *src; TQ_INT32 val, *dst; - TQRgb pixel, *clut = img.tqcolorTable(); + TQRgb pixel, *clut = img.colorTable(); for (y=0; y<height; y++) { src = const_cast<TQImage&>(img).scanLine(y); @@ -721,7 +718,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) { uchar *src; TQ_INT32 val, *dst; - TQRgb pixel, *clut = img.tqcolorTable(); + TQRgb pixel, *clut = img.colorTable(); for (y=0; y<height; y++) { src = const_cast<TQImage&>(img).scanLine(y); @@ -780,7 +777,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) { uchar *src, *dst; int w1 = width/4; - TQRgb *clut = img.tqcolorTable(), d1, d2, d3, d4; + TQRgb *clut = img.colorTable(), d1, d2, d3, d4; for (y=0; y<height; y++) { src = const_cast<TQImage&>(img).scanLine(y); @@ -841,7 +838,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) { uchar *src, *dst; int w1 = width/4; - TQRgb *clut = img.tqcolorTable(), d1, d2, d3, d4; + TQRgb *clut = img.colorTable(), d1, d2, d3, d4; for (y=0; y<height; y++) { src = const_cast<TQImage&>(img).scanLine(y); @@ -878,7 +875,7 @@ void KPixmapIO::convertToXImage(const TQImage &img) } else { uchar *src; - TQRgb *dst, *clut = img.tqcolorTable(); + TQRgb *dst, *clut = img.colorTable(); for (y=0; y<height; y++) { src = const_cast<TQImage&>(img).scanLine(y); diff --git a/tdeui/kpixmapregionselectorwidget.cpp b/tdeui/kpixmapregionselectorwidget.cpp index 7083dac72..a38334cbb 100644 --- a/tdeui/kpixmapregionselectorwidget.cpp +++ b/tdeui/kpixmapregionselectorwidget.cpp @@ -110,7 +110,7 @@ void KPixmapRegionSelectorWidget::updatePixmap() painter.begin(&m_linedPixmap); painter.setRasterOp( TQt::XorROP ); painter.fillRect(0,0,m_linedPixmap.width(), m_linedPixmap.height(), - TQBrush( TQColor(255,255,255), Qt::BDiagPattern) ); + TQBrush( TQColor(255,255,255), TQt::BDiagPattern) ); painter.end(); TQImage image=m_linedPixmap.convertToImage(); @@ -141,13 +141,13 @@ TDEPopupMenu *KPixmapRegionSelectorWidget::createPopupMenu() popup->insertTitle(i18n("Image Operations")); TDEAction *action = new TDEAction(i18n("&Rotate Clockwise"), "object-rotate-right", - 0, TQT_TQOBJECT(this), TQT_SLOT(rotateClockwise()), - TQT_TQOBJECT(popup), "rotateclockwise"); + 0, this, TQ_SLOT(rotateClockwise()), + popup, "rotateclockwise"); action->plug(popup); action = new TDEAction(i18n("Rotate &Counterclockwise"), "object-rotate-left", - 0, TQT_TQOBJECT(this), TQT_SLOT(rotateCounterclockwise()), - TQT_TQOBJECT(popup), "rotatecounterclockwise"); + 0, this, TQ_SLOT(rotateCounterclockwise()), + popup, "rotatecounterclockwise"); action->plug(popup); /* @@ -213,12 +213,12 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) TQMouseEvent *mev= (TQMouseEvent *)(ev); //kdDebug() << TQString("click at %1,%2").arg( mev->x() ).arg( mev->y() ) << endl; - if ( mev->button() == Qt::RightButton ) + if ( mev->button() == TQt::RightButton ) { TDEPopupMenu *popup = createPopupMenu( ); popup->exec( mev->globalPos() ); delete popup; - return TRUE; + return true; }; TQCursor cursor; @@ -227,19 +227,19 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) && m_selectedRegion!=m_originalPixmap.rect() ) { m_state=Moving; - cursor.setShape( Qt::SizeAllCursor ); + cursor.setShape( TQt::SizeAllCursor ); } else { m_state=Resizing; - cursor.setShape( Qt::CrossCursor ); + cursor.setShape( TQt::CrossCursor ); } TQApplication::setOverrideCursor(cursor); m_tempFirstClick=mev->pos(); - return TRUE; + return true; } if ( ev->type() == TQEvent::MouseMove ) @@ -278,7 +278,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) m_selectedRegion.moveBy(0,m_originalPixmap.height()-m_selectedRegion.height()-m_selectedRegion.y()); mouseOutside=true; } - if (mouseOutside) { updatePixmap(); return TRUE; }; + if (mouseOutside) { updatePixmap(); return true; }; m_selectedRegion.moveBy( mev->x()-m_tempFirstClick.x(), mev->y()-m_tempFirstClick.y() ); @@ -297,7 +297,7 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) m_tempFirstClick=mev->pos(); updatePixmap(); } - return TRUE; + return true; } if ( ev->type() == TQEvent::MouseButtonRelease ) @@ -310,11 +310,11 @@ bool KPixmapRegionSelectorWidget::eventFilter(TQObject *obj, TQEvent *ev) m_state=None; TQApplication::restoreOverrideCursor(); - return TRUE; + return true; } TQWidget::eventFilter(obj, ev); - return FALSE; + return false; } TQRect KPixmapRegionSelectorWidget::calcSelectionRectangle( const TQPoint & startPoint, const TQPoint & _endPoint ) @@ -426,7 +426,7 @@ void KPixmapRegionSelectorWidget::setMaximumWidgetSize(int width, int height) { /* We have to resize the pixmap to get it complete on the screen */ TQImage image=m_originalPixmap.convertToImage(); - m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQ_ScaleMin ) ); + m_originalPixmap.convertFromImage( image.smoothScale( width, height, TQImage::ScaleMin ) ); double oldZoomFactor = m_zoomFactor; m_zoomFactor=m_originalPixmap.width()/(double)m_unzoomedPixmap.width(); diff --git a/tdeui/kpixmapregionselectorwidget.h b/tdeui/kpixmapregionselectorwidget.h index 0277a0d10..7d6f37b99 100644 --- a/tdeui/kpixmapregionselectorwidget.h +++ b/tdeui/kpixmapregionselectorwidget.h @@ -43,7 +43,7 @@ class TDEPopupMenu; */ class TDEUI_EXPORT KPixmapRegionSelectorWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: /** * Constructor for a KPixmapRegionSelectorWidget. diff --git a/tdeui/kprogress.cpp b/tdeui/kprogress.cpp index 8fb050a11..5b947cadf 100644 --- a/tdeui/kprogress.cpp +++ b/tdeui/kprogress.cpp @@ -179,8 +179,8 @@ KProgressDialog::KProgressDialog(TQWidget* parent, const char* name, mMinDuration(2000), d(new KProgressDialogPrivate) { -#ifdef Q_WS_X11 - KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); +#ifdef TQ_WS_X11 + KWin::setIcons(winId(), tdeApp->icon(), tdeApp->miniIcon()); #endif mShowTimer = new TQTimer(this); @@ -196,9 +196,9 @@ KProgressDialog::KProgressDialog(TQWidget* parent, const char* name, mProgressBar = new KProgress(mainWidget); layout->addWidget(mProgressBar); - connect(mProgressBar, TQT_SIGNAL(percentageChanged(int)), - this, TQT_SLOT(slotAutoActions(int))); - connect(mShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoShow())); + connect(mProgressBar, TQ_SIGNAL(percentageChanged(int)), + this, TQ_SLOT(slotAutoActions(int))); + connect(mShowTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotAutoShow())); mShowTimer->start(mMinDuration, true); } @@ -215,7 +215,7 @@ void KProgressDialog::slotAutoShow() } show(); - kapp->processEvents(); + tdeApp->processEvents(); } void KProgressDialog::slotCancel() diff --git a/tdeui/kprogress.h b/tdeui/kprogress.h index 49dce88c0..68d88e9cf 100644 --- a/tdeui/kprogress.h +++ b/tdeui/kprogress.h @@ -45,7 +45,7 @@ */ class TDEUI_EXPORT KProgress : public TQProgressBar { - Q_OBJECT + TQ_OBJECT public: /** @@ -78,7 +78,7 @@ public: * @see setValue() */ // ### Remove this KDE 4.0 - int value() const KDE_DEPRECATED; + int value() const TDE_DEPRECATED; /** * Returns @p true if progress text will be displayed, @@ -99,13 +99,13 @@ public: * Use setTotalSteps() instead */ // ### Remove this KDE 4.0 - void setRange(int min, int max) KDE_DEPRECATED; + void setRange(int min, int max) TDE_DEPRECATED; /** * @deprecated Use totalSteps() instead */ // ### Remove this KDE 4.0 - int maxValue() KDE_DEPRECATED; + int maxValue() TDE_DEPRECATED; public slots: @@ -186,7 +186,7 @@ private: */ class TDEUI_EXPORT KProgressDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** @@ -234,7 +234,7 @@ class TDEUI_EXPORT KProgressDialog : public KDialogBase * @deprecated */ // ### Remove this KDE 4.0 - TQString labelText() KDE_DEPRECATED; + TQString labelText() TDE_DEPRECATED; /** * Returns the current dialog text @@ -257,7 +257,7 @@ class TDEUI_EXPORT KProgressDialog : public KDialogBase * @deprecated */ // ### Remove this KDE 4.0 - bool allowCancel() KDE_DEPRECATED; + bool allowCancel() TDE_DEPRECATED; /** * Returns true if the dialog can be canceled, false otherwise @@ -344,7 +344,7 @@ class TDEUI_EXPORT KProgressDialog : public KDialogBase * @deprecated */ // ### Remove this KDE 4.0 - TQString buttonText() KDE_DEPRECATED; + TQString buttonText() TDE_DEPRECATED; /** * Returns the text on the cancel button @@ -362,7 +362,7 @@ class TDEUI_EXPORT KProgressDialog : public KDialogBase * @deprecated */ // ### Remove this KDE 4.0 - int minimumDuration() KDE_DEPRECATED; + int minimumDuration() TDE_DEPRECATED; /** * Returns the wait duration in milliseconds diff --git a/tdeui/kprogressbox.cpp b/tdeui/kprogressbox.cpp index 2472207f4..3c88b2aa5 100644 --- a/tdeui/kprogressbox.cpp +++ b/tdeui/kprogressbox.cpp @@ -67,8 +67,8 @@ KProgressBoxDialog::KProgressBoxDialog(TQWidget* parent, const char* name, mMinDuration(2000), d(new KProgressBoxDialogPrivate) { -#ifdef Q_WS_X11 - KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon()); +#ifdef TQ_WS_X11 + KWin::setIcons(winId(), tdeApp->icon(), tdeApp->miniIcon()); #endif mShowTimer = new TQTimer(this); @@ -86,9 +86,9 @@ KProgressBoxDialog::KProgressBoxDialog(TQWidget* parent, const char* name, mTextBox = new KTextEdit(mainWidget); layout->addWidget(mTextBox); - connect(mProgressBar, TQT_SIGNAL(percentageChanged(int)), - this, TQT_SLOT(slotAutoActions(int))); - connect(mShowTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoShow())); + connect(mProgressBar, TQ_SIGNAL(percentageChanged(int)), + this, TQ_SLOT(slotAutoActions(int))); + connect(mShowTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotAutoShow())); mShowTimer->start(mMinDuration, true); } @@ -105,7 +105,7 @@ void KProgressBoxDialog::slotAutoShow() } show(); - kapp->processEvents(); + tdeApp->processEvents(); } void KProgressBoxDialog::slotCancel() diff --git a/tdeui/kprogressbox.h b/tdeui/kprogressbox.h index 448b37abe..b06e85921 100644 --- a/tdeui/kprogressbox.h +++ b/tdeui/kprogressbox.h @@ -53,7 +53,7 @@ */ class TDEUI_EXPORT KProgressBoxDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** @@ -115,7 +115,7 @@ class TDEUI_EXPORT KProgressBoxDialog : public KDialogBase * @deprecated */ // ### Remove this KDE 4.0 - TQString labelText() KDE_DEPRECATED; + TQString labelText() TDE_DEPRECATED; /** * Returns the current dialog text @@ -145,7 +145,7 @@ class TDEUI_EXPORT KProgressBoxDialog : public KDialogBase * @deprecated */ // ### Remove this KDE 4.0 - bool allowCancel() KDE_DEPRECATED; + bool allowCancel() TDE_DEPRECATED; /** * Returns true if the dialog can be canceled, false otherwise @@ -232,7 +232,7 @@ class TDEUI_EXPORT KProgressBoxDialog : public KDialogBase * @deprecated */ // ### Remove this KDE 4.0 - TQString buttonText() KDE_DEPRECATED; + TQString buttonText() TDE_DEPRECATED; /** * Returns the text on the cancel button @@ -250,7 +250,7 @@ class TDEUI_EXPORT KProgressBoxDialog : public KDialogBase * @deprecated */ // ### Remove this KDE 4.0 - int minimumDuration() KDE_DEPRECATED; + int minimumDuration() TDE_DEPRECATED; /** * Returns the wait duration in milliseconds diff --git a/tdeui/kpushbutton.cpp b/tdeui/kpushbutton.cpp index 6f994dbe3..e4efcf5e2 100644 --- a/tdeui/kpushbutton.cpp +++ b/tdeui/kpushbutton.cpp @@ -104,11 +104,11 @@ void KPushButton::init( const KGuiItem &item ) TQWhatsThis::add( this, item.whatsThis() ); - if (kapp) + if (tdeApp) { - connect( kapp, TQT_SIGNAL( settingsChanged(int) ), - TQT_SLOT( slotSettingsChanged(int) ) ); - kapp->addKipcEventMask( KIPC::SettingsChanged ); + connect( tdeApp, TQ_SIGNAL( settingsChanged(int) ), + TQ_SLOT( slotSettingsChanged(int) ) ); + tdeApp->addKipcEventMask( KIPC::SettingsChanged ); } } @@ -193,7 +193,7 @@ void KPushButton::mouseMoveEvent( TQMouseEvent *e ) return; } - if ( (e->state() & Qt::LeftButton) && + if ( (e->state() & TQt::LeftButton) && (e->pos() - startPos).manhattanLength() > TDEGlobalSettings::dndEventDelay() ) { diff --git a/tdeui/kpushbutton.h b/tdeui/kpushbutton.h index ee7bb3b52..44f174da9 100644 --- a/tdeui/kpushbutton.h +++ b/tdeui/kpushbutton.h @@ -36,7 +36,7 @@ class TQDragObject; */ class TDEUI_EXPORT KPushButton : public TQPushButton { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY(int stdItem READ guiItm WRITE setGuiItm ) TQ_PROPERTY(bool isDragEnabled READ isDragEnabled WRITE setDragEnabled) diff --git a/tdeui/krestrictedline.h b/tdeui/krestrictedline.h index 142bd5444..26af032b8 100644 --- a/tdeui/krestrictedline.h +++ b/tdeui/krestrictedline.h @@ -43,7 +43,7 @@ */ class TDEUI_EXPORT KRestrictedLine : public KLineEdit { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQString validChars READ validChars WRITE setValidChars ) public: @@ -85,7 +85,7 @@ protected: private: /// TQString of valid characters for this line - QString qsValidChars; + TQString qsValidChars; protected: virtual void virtual_hook( int id, void* data ); private: diff --git a/tdeui/krootpixmap.cpp b/tdeui/krootpixmap.cpp index 517821ea1..ac54511f4 100644 --- a/tdeui/krootpixmap.cpp +++ b/tdeui/krootpixmap.cpp @@ -37,7 +37,7 @@ class KRootPixmapData { public: TQWidget *toplevel; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWinModule *twin; #endif }; @@ -67,14 +67,14 @@ void KRootPixmap::init() m_bActive = false; m_bCustomPaint = false; - connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int))); - connect(m_pTimer, TQT_SIGNAL(timeout()), TQT_SLOT(repaint())); -#ifdef Q_WS_X11 - connect(m_pPixmap, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool))); + connect(tdeApp, TQ_SIGNAL(backgroundChanged(int)), TQ_SLOT(slotBackgroundChanged(int))); + connect(m_pTimer, TQ_SIGNAL(timeout()), TQ_SLOT(repaint())); +#ifdef TQ_WS_X11 + connect(m_pPixmap, TQ_SIGNAL(done(bool)), TQ_SLOT(slotDone(bool))); d->twin = new KWinModule( this ); - connect(d->twin, TQT_SIGNAL(windowChanged(WId, unsigned int)), TQT_SLOT(desktopChanged(WId, unsigned int))); - connect(d->twin, TQT_SIGNAL(currentDesktopChanged(int)), TQT_SLOT(desktopChanged(int))); + connect(d->twin, TQ_SIGNAL(windowChanged(WId, unsigned int)), TQ_SLOT(desktopChanged(WId, unsigned int))); + connect(d->twin, TQ_SIGNAL(currentDesktopChanged(int)), TQ_SLOT(desktopChanged(int))); #endif d->toplevel = m_pWidget->topLevelWidget(); @@ -91,7 +91,7 @@ KRootPixmap::~KRootPixmap() int KRootPixmap::currentDesktop() const { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 NETRootInfo rinfo( tqt_xdisplay(), NET::CurrentDesktop ); rinfo.activate(); return rinfo.currentDesktop(); @@ -187,7 +187,7 @@ void KRootPixmap::desktopChanged(int desktop) !wallpaperForDesktop(m_Desk).isNull()) return; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if (KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop() == NET::OnAllDesktops && pixmapName(m_Desk) != pixmapName(desktop)) #endif @@ -196,7 +196,7 @@ void KRootPixmap::desktopChanged(int desktop) void KRootPixmap::desktopChanged( WId window, unsigned int properties ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( !(properties & NET::WMDesktop) || (window != m_pWidget->topLevelWidget()->winId())) return; @@ -232,7 +232,7 @@ void KRootPixmap::repaint(bool force) return; } m_Rect = TQRect(p1, p2); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 m_Desk = KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop(); if ((m_Desk == NET::OnAllDesktops) || (m_Desk == 0)) { m_Desk = currentDesktop(); @@ -254,7 +254,7 @@ void KRootPixmap::repaint(bool force) bool KRootPixmap::isAvailable() const { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 return m_pPixmap->isAvailable(pixmapName(m_Desk)); #else return m_pPixmap->isNull(); @@ -263,7 +263,7 @@ bool KRootPixmap::isAvailable() const TQString KRootPixmap::pixmapName(int desk) { TQString pattern = TQString("DESKTOP%1"); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 int screen_number = DefaultScreen(tqt_xdisplay()); if (screen_number) { pattern = TQString("SCREEN%1-DESKTOP").arg(screen_number) + "%1"; @@ -275,9 +275,9 @@ TQString KRootPixmap::pixmapName(int desk) { void KRootPixmap::enableExports() { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 kdDebug(270) << k_lineinfo << "activating background exports.\n"; - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); if (!client->isAttached()) client->attach(); TQByteArray data; diff --git a/tdeui/krootpixmap.h b/tdeui/krootpixmap.h index 5f279be6d..194d10d3c 100644 --- a/tdeui/krootpixmap.h +++ b/tdeui/krootpixmap.h @@ -15,7 +15,7 @@ #include <tqcolor.h> #include <tdelibs_export.h> -#ifndef Q_WS_QWS //FIXME +#ifndef TQ_WS_QWS //FIXME class TQRect; class TQWidget; @@ -45,7 +45,7 @@ class KRootPixmapData; */ class TDEUI_EXPORT KRootPixmap: public TQObject { - Q_OBJECT + TQ_OBJECT public: /** @@ -97,7 +97,7 @@ public: * Deprecated, use isAvailable() instead. * @deprecated */ - KDE_DEPRECATED bool checkAvailable(bool) { return isAvailable(); } + TDE_DEPRECATED bool checkAvailable(bool) { return isAvailable(); } #endif /** @since 3.2 @@ -235,6 +235,6 @@ private: void init(); }; -#endif // ! Q_WS_QWS +#endif // ! TQ_WS_QWS #endif // __KRootPixmap_h_Included__ diff --git a/tdeui/kruler.cpp b/tdeui/kruler.cpp index fed264981..eac7d8c99 100644 --- a/tdeui/kruler.cpp +++ b/tdeui/kruler.cpp @@ -94,7 +94,7 @@ public: KRuler::KRuler(TQWidget *parent, const char *name) : TQFrame(parent, name), range(INIT_MIN_VALUE, INIT_MAX_VALUE, 1, 10, INIT_VALUE), - dir(Qt::Horizontal) + dir(TQt::Horizontal) { init(); setFixedHeight(FIX_WIDTH); @@ -108,7 +108,7 @@ KRuler::KRuler(Orientation orient, dir(orient) { init(); - if (orient == Qt::Horizontal) + if (orient == TQt::Horizontal) setFixedHeight(FIX_WIDTH); else setFixedWidth(FIX_WIDTH); @@ -123,7 +123,7 @@ KRuler::KRuler(Orientation orient, int widgetWidth, { init(); - if (orient == Qt::Horizontal) + if (orient == TQt::Horizontal) setFixedHeight(widgetWidth); else setFixedWidth(widgetWidth); @@ -362,7 +362,7 @@ KRuler::setEndLabel(const TQString& label) endlabel = label; // premeasure the fontwidth and save it - if (dir == Qt::Vertical) { + if (dir == TQt::Vertical) { TQFont font = this->font(); font.setPointSize(LABEL_SIZE); TQFontMetrics fm(font); @@ -551,7 +551,7 @@ KRuler::slotNewValue(int _value) } // get the rectangular of the old and the new ruler pointer // and repaint only him - if (dir == Qt::Horizontal) { + if (dir == TQt::Horizontal) { TQRect oldrec(-5+oldvalue,10, 11,6); TQRect newrec(-5+_value,10, 11,6); repaint( oldrec.unite(newrec) ); @@ -604,7 +604,7 @@ KRuler::drawContents(TQPainter *p) int value = range.value(), minval = range.minValue(), maxval; - if (dir == Qt::Horizontal) { + if (dir == TQt::Horizontal) { maxval = range.maxValue() + offset_ - (d->lengthFix?(height()-d->endOffset_length):d->endOffset_length); @@ -636,7 +636,7 @@ KRuler::drawContents(TQPainter *p) // draw endlabel if (d->showEndL) { - if (dir == Qt::Horizontal) { + if (dir == TQt::Horizontal) { p->translate( fontOffset, 0 ); p->drawText( END_LABEL_X, END_LABEL_Y, endlabel ); } @@ -659,7 +659,7 @@ KRuler::drawContents(TQPainter *p) if (showtm) { fend = ppm*tmDist; for ( f=offsetmin; f<offsetmax; f+=fend ) { - if (dir == Qt::Horizontal) { + if (dir == TQt::Horizontal) { p->drawLine((int)f, BASE_MARK_X1, (int)f, BASE_MARK_X2); } else { @@ -671,7 +671,7 @@ KRuler::drawContents(TQPainter *p) // draw the little marks fend = ppm*lmDist; for ( f=offsetmin; f<offsetmax; f+=fend ) { - if (dir == Qt::Horizontal) { + if (dir == TQt::Horizontal) { p->drawLine((int)f, LITTLE_MARK_X1, (int)f, LITTLE_MARK_X2); } else { @@ -683,7 +683,7 @@ KRuler::drawContents(TQPainter *p) // draw medium marks fend = ppm*mmDist; for ( f=offsetmin; f<offsetmax; f+=fend ) { - if (dir == Qt::Horizontal) { + if (dir == TQt::Horizontal) { p->drawLine((int)f, MIDDLE_MARK_X1, (int)f, MIDDLE_MARK_X2); } else { @@ -695,7 +695,7 @@ KRuler::drawContents(TQPainter *p) // draw big marks fend = ppm*bmDist; for ( f=offsetmin; f<offsetmax; f+=fend ) { - if (dir == Qt::Horizontal) { + if (dir == TQt::Horizontal) { p->drawLine((int)f, BIG_MARK_X1, (int)f, BIG_MARK_X2); } else { @@ -705,7 +705,7 @@ KRuler::drawContents(TQPainter *p) } if (showem) { // draw end marks - if (dir == Qt::Horizontal) { + if (dir == TQt::Horizontal) { p->drawLine(minval-offset_, END_MARK_X1, minval-offset_, END_MARK_X2); p->drawLine(maxval-offset_, END_MARK_X1, maxval-offset_, END_MARK_X2); } @@ -718,7 +718,7 @@ KRuler::drawContents(TQPainter *p) // draw pointer if (d->showpointer) { TQPointArray pa(4); - if (dir == Qt::Horizontal) { + if (dir == TQt::Horizontal) { pa.setPoints(3, value-5, 10, value+5, 10, value/*+0*/,15); } else { diff --git a/tdeui/kruler.h b/tdeui/kruler.h index 2ad699b5e..6279d567d 100644 --- a/tdeui/kruler.h +++ b/tdeui/kruler.h @@ -69,7 +69,7 @@ */ class TDEUI_EXPORT KRuler : public TQFrame { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int minValue READ minValue WRITE setMinValue ) TQ_PROPERTY( int maxValue READ maxValue WRITE setMaxValue ) TQ_PROPERTY( int value READ value WRITE setValue ) @@ -275,19 +275,19 @@ public: * @deprecated * This method has no effect other than an update. Do not use. **/ - void setValuePerLittleMark(int) KDE_DEPRECATED; + void setValuePerLittleMark(int) TDE_DEPRECATED; /** * @deprecated * This method has no effect other than an update. Do not use. **/ - void setValuePerMediumMark(int) KDE_DEPRECATED; + void setValuePerMediumMark(int) TDE_DEPRECATED; /** * @deprecated * This method has no effect other than an update. Do not use. */ - void setValuePerBigMark(int) KDE_DEPRECATED; + void setValuePerBigMark(int) TDE_DEPRECATED; /** * Show/hide number values of the little marks. diff --git a/tdeui/ksconfig.cpp b/tdeui/ksconfig.cpp index cb211e4df..8a43a5e82 100644 --- a/tdeui/ksconfig.cpp +++ b/tdeui/ksconfig.cpp @@ -101,18 +101,18 @@ KSpellConfig::KSpellConfig( TQWidget *parent, const char *name, TQGridLayout *glay = new TQGridLayout( this, 6, 3, 0, KDialog::spacingHint() ); cb1 = new TQCheckBox( i18n("Create &root/affix combinations" " not in dictionary"), this, "NoRootAffix" ); - connect( cb1, TQT_SIGNAL(toggled(bool)), TQT_SLOT(sNoAff(bool)) ); + connect( cb1, TQ_SIGNAL(toggled(bool)), TQ_SLOT(sNoAff(bool)) ); glay->addMultiCellWidget( cb1, 0, 0, 0, 2 ); cb2 = new TQCheckBox( i18n("Consider run-together &words" " as spelling errors"), this, "RunTogether" ); - connect( cb2, TQT_SIGNAL(toggled(bool)), TQT_SLOT(sRunTogether(bool)) ); + connect( cb2, TQ_SIGNAL(toggled(bool)), TQ_SLOT(sRunTogether(bool)) ); glay->addMultiCellWidget( cb2, 1, 1, 0, 2 ); dictcombo = new TQComboBox( this, "DictFromList" ); dictcombo->setInsertionPolicy( TQComboBox::NoInsertion ); - connect( dictcombo, TQT_SIGNAL (activated(int)), - this, TQT_SLOT (sSetDictionary(int)) ); + connect( dictcombo, TQ_SIGNAL (activated(int)), + this, TQ_SLOT (sSetDictionary(int)) ); glay->addMultiCellWidget( dictcombo, 2, 2, 1, 2 ); dictlist = new TQLabel( dictcombo, i18n("&Dictionary:"), this ); @@ -136,8 +136,8 @@ KSpellConfig::KSpellConfig( TQWidget *parent, const char *name, encodingcombo->insertItem( "CP1251" ); encodingcombo->insertItem( "CP1255" ); - connect( encodingcombo, TQT_SIGNAL(activated(int)), this, - TQT_SLOT(sChangeEncoding(int)) ); + connect( encodingcombo, TQ_SIGNAL(activated(int)), this, + TQ_SLOT(sChangeEncoding(int)) ); glay->addMultiCellWidget( encodingcombo, 3, 3, 1, 2 ); TQLabel *tmpQLabel = new TQLabel( encodingcombo, i18n("&Encoding:"), this); @@ -149,8 +149,8 @@ KSpellConfig::KSpellConfig( TQWidget *parent, const char *name, clientcombo->insertItem( i18n("Aspell") ); clientcombo->insertItem( i18n("Hspell") ); clientcombo->insertItem( i18n("Zemberek") ); - connect( clientcombo, TQT_SIGNAL (activated(int)), this, - TQT_SLOT (sChangeClient(int)) ); + connect( clientcombo, TQ_SIGNAL (activated(int)), this, + TQ_SLOT (sChangeClient(int)) ); glay->addMultiCellWidget( clientcombo, 4, 4, 1, 2 ); tmpQLabel = new TQLabel( clientcombo, i18n("&Client:"), this ); @@ -159,7 +159,7 @@ KSpellConfig::KSpellConfig( TQWidget *parent, const char *name, if( addHelpButton ) { TQPushButton *pushButton = new KPushButton( KStdGuiItem::help(), this ); - connect( pushButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(sHelp()) ); + connect( pushButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(sHelp()) ); glay->addWidget(pushButton, 5, 2); } @@ -926,7 +926,7 @@ KSpellConfig::sSetDictionary (int i) { setDictionary (langfnames[i]); setDictFromList (true); - TQTimer::singleShot( 0, this, TQT_SIGNAL( configChanged() ) ); + TQTimer::singleShot( 0, this, TQ_SIGNAL( configChanged() ) ); } void @@ -974,7 +974,7 @@ void KSpellConfig::activateHelp( void ) void KSpellConfig::sHelp( void ) { - kapp->invokeHelp("configuration", "tdespell"); + tdeApp->invokeHelp("configuration", "tdespell"); } /* diff --git a/tdeui/ksconfig.h b/tdeui/ksconfig.h index b0ca46fd9..21ce54013 100644 --- a/tdeui/ksconfig.h +++ b/tdeui/ksconfig.h @@ -86,7 +86,7 @@ enum KSpellClients { class TDEUI_EXPORT KSpellConfig : public TQWidget { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/kscrollview.cpp b/tdeui/kscrollview.cpp index cf37c4403..f0d77be26 100644 --- a/tdeui/kscrollview.cpp +++ b/tdeui/kscrollview.cpp @@ -40,11 +40,11 @@ struct KScrollView::KScrollViewPrivate { bool scrolling; }; -KScrollView::KScrollView( TQWidget *parent, const char *name, Qt::WFlags f ) +KScrollView::KScrollView( TQWidget *parent, const char *name, TQt::WFlags f ) : TQScrollView( parent, name, f ) { d = new KScrollViewPrivate; - connect(&d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(scrollTick())); + connect(&d->timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(scrollTick())); } KScrollView::~KScrollView() diff --git a/tdeui/kscrollview.h b/tdeui/kscrollview.h index 315ea1c81..7082f3dba 100644 --- a/tdeui/kscrollview.h +++ b/tdeui/kscrollview.h @@ -29,10 +29,10 @@ **/ class TDEUI_EXPORT KScrollView : public TQScrollView { - Q_OBJECT + TQ_OBJECT public: - KScrollView( TQWidget *parent = 0, const char *name = 0, Qt::WFlags f = 0 ); + KScrollView( TQWidget *parent = 0, const char *name = 0, TQt::WFlags f = 0 ); ~KScrollView(); diff --git a/tdeui/kseparator.cpp b/tdeui/kseparator.cpp index c5a4879d8..f97a54080 100644 --- a/tdeui/kseparator.cpp +++ b/tdeui/kseparator.cpp @@ -49,7 +49,7 @@ void KSeparator::setOrientation(int orientation) { switch(orientation) { - case Qt::Vertical: + case TQt::Vertical: case VLine: setFrameStyle( TQFrame::VLine | TQFrame::Sunken ); setMinimumSize(2, 0); @@ -58,7 +58,7 @@ void KSeparator::setOrientation(int orientation) default: kdWarning() << "KSeparator::setOrientation(): invalid orientation, using default orientation HLine" << endl; - case Qt::Horizontal: + case TQt::Horizontal: case HLine: setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); setMinimumSize(0, 2); @@ -95,7 +95,7 @@ void KSeparator::drawFrame(TQPainter *p) } TQStyleOption opt( lineWidth(), midLineWidth() ); - style().tqdrawPrimitive( TQStyle::PE_Separator, p, TQRect( p1, p2 ), g, + style().drawPrimitive( TQStyle::PE_Separator, p, TQRect( p1, p2 ), g, TQStyle::Style_Sunken, opt ); } diff --git a/tdeui/kseparator.h b/tdeui/kseparator.h index f21c4c99b..908a0d57a 100644 --- a/tdeui/kseparator.h +++ b/tdeui/kseparator.h @@ -32,7 +32,7 @@ */ class TDEUI_EXPORT KSeparator : public TQFrame { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int orientation READ orientation WRITE setOrientation ) public: /** diff --git a/tdeui/ksharedpixmap.cpp b/tdeui/ksharedpixmap.cpp index d4d830d57..a6d965dd0 100644 --- a/tdeui/ksharedpixmap.cpp +++ b/tdeui/ksharedpixmap.cpp @@ -20,7 +20,7 @@ #include <tqwindowdefs.h> #include <tqwidget.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <tdeapplication.h> #include <krootprop.h> diff --git a/tdeui/ksharedpixmap.h b/tdeui/ksharedpixmap.h index 29b7821ff..a77e40683 100644 --- a/tdeui/ksharedpixmap.h +++ b/tdeui/ksharedpixmap.h @@ -16,11 +16,7 @@ #include <kpixmap.h> -#ifdef Q_MOC_RUN -#define Q_WS_X11 -#endif // Q_MOC_RUN - -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <tqstring.h> #include <tqpixmap.h> @@ -45,7 +41,7 @@ class TDESharedPixmapPrivate; * An example: copy from a shared pixmap: * \code * TDESharedPixmap *pm = new TDESharedPixmap; - * connect(pm, TQT_SIGNAL(done(bool)), TQT_SLOT(slotDone(bool))); + * connect(pm, TQ_SIGNAL(done(bool)), TQ_SLOT(slotDone(bool))); * pm->loadFromShared("My Pixmap"); * \endcode * @@ -57,7 +53,7 @@ class TDEUI_EXPORT TDESharedPixmap: public TQWidget, public KPixmap { - Q_OBJECT + TQ_OBJECT public: diff --git a/tdeui/ksplashscreen.h b/tdeui/ksplashscreen.h index f4d1c22ef..9980cc203 100644 --- a/tdeui/ksplashscreen.h +++ b/tdeui/ksplashscreen.h @@ -40,7 +40,7 @@ class TQPixmap; */ class TDEUI_EXPORT KSplashScreen : public TQSplashScreen { - Q_OBJECT + TQ_OBJECT public: diff --git a/tdeui/ksqueezedtextlabel.h b/tdeui/ksqueezedtextlabel.h index 586c9b27b..2dfa70bec 100644 --- a/tdeui/ksqueezedtextlabel.h +++ b/tdeui/ksqueezedtextlabel.h @@ -44,7 +44,7 @@ * QLabel */ class TDEUI_EXPORT KSqueezedTextLabel : public TQLabel { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/kstatusbar.cpp b/tdeui/kstatusbar.cpp index daa22f46b..ce6585686 100644 --- a/tdeui/kstatusbar.cpp +++ b/tdeui/kstatusbar.cpp @@ -44,8 +44,8 @@ KStatusBarLabel::KStatusBarLabel( const TQString& text, int _id, setAlignment( AlignHCenter | AlignVCenter | SingleLine ); - connect (this, TQT_SIGNAL(itemPressed(int)), parent, TQT_SIGNAL(pressed(int))); - connect (this, TQT_SIGNAL(itemReleased(int)), parent, TQT_SIGNAL(released(int))); + connect (this, TQ_SIGNAL(itemPressed(int)), parent, TQ_SIGNAL(pressed(int))); + connect (this, TQ_SIGNAL(itemReleased(int)), parent, TQ_SIGNAL(released(int))); } void KStatusBarLabel::mousePressEvent (TQMouseEvent *) diff --git a/tdeui/kstatusbar.h b/tdeui/kstatusbar.h index 2c7574a79..cbf305d83 100644 --- a/tdeui/kstatusbar.h +++ b/tdeui/kstatusbar.h @@ -34,7 +34,7 @@ class KStatusBar; */ class TDEUI_EXPORT KStatusBarLabel : public TQLabel { - Q_OBJECT + TQ_OBJECT public: @@ -86,7 +86,7 @@ signals: */ class TDEUI_EXPORT KStatusBar : public TQStatusBar { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/kstdaction.cpp b/tdeui/kstdaction.cpp index e0bcca2eb..8152a885b 100644 --- a/tdeui/kstdaction.cpp +++ b/tdeui/kstdaction.cpp @@ -60,7 +60,7 @@ TDEAction* create( StdAction id, const char *name, const TQObject *recvr, const case Home: sLabel = i18n("beginning (of line)", "&Home"); break; case Help: sLabel = i18n("show help", "&Help"); break; - case AboutApp: iconName = kapp->miniIconName(); + case AboutApp: iconName = tdeApp->miniIconName(); case Preferences: case HelpContents: { diff --git a/tdeui/kstdaction.h b/tdeui/kstdaction.h index db1199757..28194455b 100644 --- a/tdeui/kstdaction.h +++ b/tdeui/kstdaction.h @@ -52,13 +52,13 @@ class TDEToggleFullScreenAction; * \code * TDEAction *newAct = new TDEAction(i18n("&New"), TQIconSet(BarIcon("document-new")), * TDEStdAccel::shortcut(TDEStdAccel::New), this, - * TQT_SLOT(fileNew()), actionCollection()); + * TQ_SLOT(fileNew()), actionCollection()); * \endcode * * You could drop that and replace it with: * * \code - * TDEAction *newAct = KStdAction::openNew(this, TQT_SLOT(fileNew()), + * TDEAction *newAct = KStdAction::openNew(this, TQ_SLOT(fileNew()), * actionCollection()); * \endcode * @@ -84,7 +84,7 @@ class TDEToggleFullScreenAction; * do something like: * * \code - * (void)KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection(), "my_cut"); + * (void)KStdAction::cut(this, TQ_SLOT(editCut()), actionCollection(), "my_cut"); * \endcode * * Now, in your local XML resource file (e.g., yourappui.rc), simply @@ -102,14 +102,14 @@ class TDEToggleFullScreenAction; * * Another non-standard usage concerns instantiating the action in the * first place. Usually, you would use the member functions as - * shown above (e.g., KStdAction::cut(this, SLOT, parent)). You + * shown above (e.g., KStdAction::cut(this, TQ_SLOT, parent)). You * may, however, do this using the enums provided. This author can't * think of a reason why you would want to, but, hey, if you do, * here's how: * * \code - * (void)KStdAction::action(KStdAction::New, this, TQT_SLOT(fileNew()), actionCollection()); - * (void)KStdAction::action(KStdAction::Cut, this, TQT_SLOT(editCut()), actionCollection()); + * (void)KStdAction::action(KStdAction::New, this, TQ_SLOT(fileNew()), actionCollection()); + * (void)KStdAction::action(KStdAction::Cut, this, TQ_SLOT(editCut()), actionCollection()); * \endcode * * @author Kurt Granroth <granroth@kde.org> @@ -212,7 +212,7 @@ namespace KStdAction * Open a recently used document. The signature of the slot being called * is of the form slotURLSelected( const KURL & ). * @param recvr object to receive slot - * @param slot The TQT_SLOT to invoke when a URL is selected. The slot's + * @param slot The slot to invoke when a URL is selected. The slot's * signature is slotURLSelected( const KURL & ). * @param parent parent widget * @param name name of widget @@ -499,7 +499,7 @@ namespace KStdAction * @since 3.1 */ TDEUI_EXPORT TDEToggleAction *showToolbar(const TQObject *recvr, const char *slot, - TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; + TDEActionCollection* parent, const char *name = 0 ) TDE_DEPRECATED; /** * @obsolete. toolbar actions are created automatically now in the * Settings menu. Don't use this anymore. @@ -507,7 +507,7 @@ namespace KStdAction * Show/Hide the primary toolbar. */ TDEUI_EXPORT TDEToggleToolBarAction *showToolbar(const char* toolBarName, - TDEActionCollection* parent, const char *name = 0 ) KDE_DEPRECATED; + TDEActionCollection* parent, const char *name = 0 ) TDE_DEPRECATED; /** * Show/Hide the statusbar. @@ -532,7 +532,7 @@ namespace KStdAction * Display the configure key bindings dialog. * * Note that you might be able to use the pre-built KXMLGUIFactory's fuction: - * KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection()); + * KStdAction::keyBindings(guiFactory(), TQ_SLOT(configureShortcuts()), actionCollection()); */ TDEUI_EXPORT TDEAction *keyBindings(const TQObject *recvr, const char *slot, TDEActionCollection* parent, const char *name = 0 ); diff --git a/tdeui/kstdaction_p.h b/tdeui/kstdaction_p.h index e9aba5231..827b2adca 100644 --- a/tdeui/kstdaction_p.h +++ b/tdeui/kstdaction_p.h @@ -111,7 +111,7 @@ static const KStdActionInfo g_rgActionInfo[] = { ReportBug, TDEStdAccel::AccelNone, "help_report_bug", I18N_NOOP("&Report Bug/Request Enhancement..."), 0, "bug" }, { SwitchApplicationLanguage, TDEStdAccel::AccelNone, "switch_application_language", I18N_NOOP("Switch application &language..."), 0, "preferences-desktop-locale" }, { AboutApp, TDEStdAccel::AccelNone, "help_about_app", I18N_NOOP("&About %1"), 0, 0 }, - { AboutKDE, TDEStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &Trinity"), 0,"about_kde" }, + { AboutKDE, TDEStdAccel::AccelNone, "help_about_kde", I18N_NOOP("About &TDE"), 0,"about_kde" }, { ActionNone, TDEStdAccel::AccelNone, 0, 0, 0, 0 } }; diff --git a/tdeui/kstdguiitem.cpp b/tdeui/kstdguiitem.cpp index 3091092f5..0ed7241dd 100644 --- a/tdeui/kstdguiitem.cpp +++ b/tdeui/kstdguiitem.cpp @@ -199,7 +199,7 @@ KGuiItem KStdGuiItem::forward( BidiMode useBidi ) TQPair<KGuiItem, KGuiItem> KStdGuiItem::backAndForward() { - return tqMakePair( back( UseRTL ), forward( UseRTL ) ); + return qMakePair( back( UseRTL ), forward( UseRTL ) ); } KGuiItem KStdGuiItem::print() diff --git a/tdeui/kstringvalidator.h b/tdeui/kstringvalidator.h index b23bc87bd..55c00a3ab 100644 --- a/tdeui/kstringvalidator.h +++ b/tdeui/kstringvalidator.h @@ -58,7 +58,7 @@ * @author Marc Mutz <mutz@kde.org> **/ class TDEUI_EXPORT KStringListValidator : public TQValidator { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQStringList stringList READ stringList WRITE setStringList ) TQ_PROPERTY( bool rejecting READ isRejecting WRITE setRejecting ) TQ_PROPERTY( bool fixupEnabled READ isFixupEnabled WRITE setFixupEnabled ) @@ -118,7 +118,7 @@ private: **/ class TDEUI_EXPORT KMimeTypeValidator : public TQValidator { - Q_OBJECT + TQ_OBJECT public: KMimeTypeValidator( TQObject* parent, const char* name=0) : TQValidator( parent, name ) {} diff --git a/tdeui/kswitchlanguagedialog.cpp b/tdeui/kswitchlanguagedialog.cpp index c82ffb83d..0d4563b6f 100644 --- a/tdeui/kswitchlanguagedialog.cpp +++ b/tdeui/kswitchlanguagedialog.cpp @@ -100,7 +100,7 @@ KSwitchLanguageDialog::KSwitchLanguageDialog( topLayout->addLayout(languageHorizontalLayout); d->languagesLayout = new TQGridLayout(0 , 2); - languageHorizontalLayout->addLayout(TQT_TQLAYOUT(d->languagesLayout)); + languageHorizontalLayout->addLayout(d->languagesLayout); languageHorizontalLayout->addStretch(); TQStringList defaultLanguages = d->applicationLanguageList(); @@ -122,7 +122,7 @@ KSwitchLanguageDialog::KSwitchLanguageDialog( KPushButton *addLangButton = new KPushButton(i18n("Add fallback language"), d->page, "addLangButton"); TQToolTip::add(addLangButton, i18n("Adds one more language which will be used if other translations do not contain proper translation")); - connect(addLangButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddLanguageButton())); + connect(addLangButton, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotAddLanguageButton())); addButtonHorizontalLayout->addWidget(addLangButton); addButtonHorizontalLayout->addStretch(); @@ -142,7 +142,7 @@ void KSwitchLanguageDialog::slotAddLanguageButton() void KSwitchLanguageDialog::removeButtonClicked() { - TQObject const *signalSender = TQT_TQOBJECT_CONST(sender()); + TQObject const *signalSender = sender(); if (signalSender == NULL) { @@ -150,7 +150,7 @@ void KSwitchLanguageDialog::removeButtonClicked() return; } - KPushButton *removeButton = const_cast<KPushButton*>(::tqqt_cast<const KPushButton*>(signalSender)); + KPushButton *removeButton = const_cast<KPushButton*>(::tqt_cast<const KPushButton*>(signalSender)); if (removeButton == NULL) { @@ -291,9 +291,9 @@ void KSwitchLanguageDialogPrivate::addLanguageButton(const TQString & languageCo TQObject::connect( languageButton, - TQT_SIGNAL(activated( const TQString &)), + TQ_SIGNAL(activated( const TQString &)), p, - TQT_SLOT(languageOnButtonChanged(const TQString &)) + TQ_SLOT(languageOnButtonChanged(const TQString &)) ); LanguageRowData languageRowData; @@ -305,9 +305,9 @@ void KSwitchLanguageDialogPrivate::addLanguageButton(const TQString & languageCo TQObject::connect( removeButton, - TQT_SIGNAL(clicked()), + TQ_SIGNAL(clicked()), p, - TQT_SLOT(removeButtonClicked()) + TQ_SLOT(removeButtonClicked()) ); } @@ -323,12 +323,12 @@ void KSwitchLanguageDialogPrivate::addLanguageButton(const TQString & languageCo int numRows = languagesLayout->numRows(); TQLabel *languageLabel = new TQLabel(labelText, page); - languagesLayout->addWidget( languageLabel, numRows + 1, 1, (TQ_Alignment)TQt::AlignAuto ); - languagesLayout->addWidget( languageButton, numRows + 1, 2, (TQ_Alignment)TQt::AlignAuto ); + languagesLayout->addWidget( languageLabel, numRows + 1, 1, (TQt::AlignmentFlags)TQt::AlignAuto ); + languagesLayout->addWidget( languageButton, numRows + 1, 2, (TQt::AlignmentFlags)TQt::AlignAuto ); if (primaryLanguage == false) { - languagesLayout->addWidget( removeButton, numRows + 1, 3, (TQ_Alignment)TQt::AlignAuto ); + languagesLayout->addWidget( removeButton, numRows + 1, 3, (TQt::AlignmentFlags)TQt::AlignAuto ); languageRowData.setRowWidgets( languageLabel, diff --git a/tdeui/kswitchlanguagedialog.h b/tdeui/kswitchlanguagedialog.h index 9e0a3ff87..64ffe171c 100644 --- a/tdeui/kswitchlanguagedialog.h +++ b/tdeui/kswitchlanguagedialog.h @@ -37,7 +37,7 @@ class KSwitchLanguageDialogPrivate; class TDEUI_EXPORT KSwitchLanguageDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/ksyntaxhighlighter.cpp b/tdeui/ksyntaxhighlighter.cpp index 9e63fc929..8e46e14ec 100644 --- a/tdeui/ksyntaxhighlighter.cpp +++ b/tdeui/ksyntaxhighlighter.cpp @@ -300,11 +300,11 @@ KDictSpellingHighlighter::KDictSpellingHighlighter( TQTextEdit *textEdit, textEdit->viewport()->installEventFilter( this ); d->rehighlightRequest = new TQTimer(this); - connect( d->rehighlightRequest, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotRehighlight() )); + connect( d->rehighlightRequest, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotRehighlight() )); d->spellTimeout = new TQTimer(this); - connect( d->spellTimeout, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotKSpellNotResponding() )); + connect( d->spellTimeout, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotKSpellNotResponding() )); if ( d->globalConfig ) { d->spellKey = spellKey(); @@ -314,8 +314,8 @@ KDictSpellingHighlighter::KDictSpellingHighlighter( TQTextEdit *textEdit, } else { d->mDict = new TQDict<int>(4001); - connect( d->mSpellConfig, TQT_SIGNAL( configChanged() ), - this, TQT_SLOT( slotLocalSpellConfigChanged() ) ); + connect( d->mSpellConfig, TQ_SIGNAL( configChanged() ), + this, TQ_SLOT( slotLocalSpellConfigChanged() ) ); } slotDictionaryChanged(); @@ -339,8 +339,8 @@ void KDictSpellingHighlighter::slotSpellReady( KSpell *spell ) if ( cg.readEntry("KSpell_DoSpellChecking") != "0" ) { if ( d->globalConfig ) { - connect( d->sDictionaryMonitor, TQT_SIGNAL( destroyed()), - this, TQT_SLOT( slotDictionaryChanged() )); + connect( d->sDictionaryMonitor, TQ_SIGNAL( destroyed()), + this, TQ_SLOT( slotDictionaryChanged() )); } if ( spell != d->spell ) { @@ -352,10 +352,10 @@ void KDictSpellingHighlighter::slotSpellReady( KSpell *spell ) for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { d->spell->addPersonal( *it ); } - connect( spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int )), - this, TQT_SLOT( slotMisspelling( const TQString &, const TQStringList &, unsigned int ))); - connect( spell, TQT_SIGNAL( corrected( const TQString &, const TQString &, unsigned int )), - this, TQT_SLOT( slotCorrected( const TQString &, const TQString &, unsigned int ))); + connect( spell, TQ_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int )), + this, TQ_SLOT( slotMisspelling( const TQString &, const TQStringList &, unsigned int ))); + connect( spell, TQ_SIGNAL( corrected( const TQString &, const TQString &, unsigned int )), + this, TQ_SLOT( slotCorrected( const TQString &, const TQString &, unsigned int ))); d->checksRequested = 0; d->checksDone = 0; d->completeRehighlightRequired = true; @@ -514,7 +514,7 @@ void KDictSpellingHighlighter::slotRehighlight() } if (d->checksDone == d->checksRequested) d->completeRehighlightRequired = false; - TQTimer::singleShot( 0, this, TQT_SLOT( slotAutoDetection() )); + TQTimer::singleShot( 0, this, TQ_SLOT( slotAutoDetection() )); } void KDictSpellingHighlighter::slotDictionaryChanged() @@ -526,7 +526,7 @@ void KDictSpellingHighlighter::slotDictionaryChanged() d->autoDict.clear(); d->spell = new KSpell( 0, i18n( "Incremental Spellcheck" ), this, - TQT_SLOT( slotSpellReady( KSpell * ) ), d->mSpellConfig ); + TQ_SLOT( slotSpellReady( KSpell * ) ), d->mSpellConfig ); } void KDictSpellingHighlighter::slotLocalSpellConfigChanged() @@ -609,7 +609,7 @@ void KDictSpellingHighlighter::slotKSpellNotResponding() bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e) { - if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(textEdit()) && (e->type() == TQEvent::FocusIn)) { + if (o == textEdit() && (e->type() == TQEvent::FocusIn)) { if ( d->globalConfig ) { TQString skey = spellKey(); if ( d->spell && d->spellKey != skey ) { @@ -619,8 +619,8 @@ bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e) } } - if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(textEdit()) && (e->type() == TQEvent::KeyPress)) { - TQKeyEvent *k = TQT_TQKEYEVENT(e); + if (o == textEdit() && (e->type() == TQEvent::KeyPress)) { + TQKeyEvent *k = static_cast<TQKeyEvent*>(e); d->autoReady = true; if (d->rehighlightRequest->isActive()) // try to stay out of the users way d->rehighlightRequest->changeInterval( 500 ); @@ -657,11 +657,11 @@ bool KDictSpellingHighlighter::eventFilter( TQObject *o, TQEvent *e) if ( k->key() == Key_Space || k->key() == Key_Enter || k->key() == Key_Return ) { - TQTimer::singleShot( 0, this, TQT_SLOT( slotAutoDetection() )); + TQTimer::singleShot( 0, this, TQ_SLOT( slotAutoDetection() )); } } - else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(textEdit()->viewport()) && + else if ( o == textEdit()->viewport() && ( e->type() == TQEvent::MouseButtonPress )) { d->autoReady = true; if ( intraWordEditing() ) { diff --git a/tdeui/ksyntaxhighlighter.h b/tdeui/ksyntaxhighlighter.h index 6ac4264ab..45ad7da36 100644 --- a/tdeui/ksyntaxhighlighter.h +++ b/tdeui/ksyntaxhighlighter.h @@ -93,7 +93,7 @@ private: */ class TDEUI_EXPORT KDictSpellingHighlighter : public TQObject, public KSpellingHighlighter { -Q_OBJECT +TQ_OBJECT public: KDictSpellingHighlighter( TQTextEdit *textEdit, diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp index b5baf87dd..192b378b5 100644 --- a/tdeui/ksystemtray.cpp +++ b/tdeui/ksystemtray.cpp @@ -28,7 +28,7 @@ #include "tdelocale.h" #include "tdeaboutdata.h" -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <twin.h> #include <twinmodule.h> #include <qxembed.h> @@ -61,30 +61,30 @@ public: KSystemTray::KSystemTray( TQWidget* parent, const char* name ) : TQLabel( parent, name, (WFlags)WType_TopLevel ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 QXEmbed::initialize(); #endif d = new KSystemTrayPrivate; d->actionCollection = new TDEActionCollection(this); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): tqt_xrootwin() ); #endif setBackgroundMode(X11ParentRelative); setBackgroundOrigin(WindowOrigin); hasQuit = 0; menu = new TDEPopupMenu( this ); - menu->insertTitle( kapp->miniIcon(), kapp->caption() ); + menu->insertTitle( tdeApp->miniIcon(), tdeApp->caption() ); move( -1000, -1000 ); - KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(maybeQuit()), d->actionCollection); + KStdAction::quit(this, TQ_SLOT(maybeQuit()), d->actionCollection); if (parentWidget()) { new TDEAction(i18n("Minimize"), "view-restore", TDEShortcut(), - TQT_TQOBJECT(this), TQT_SLOT( minimizeRestoreAction() ), + this, TQ_SLOT( minimizeRestoreAction() ), d->actionCollection, "minimizeRestore"); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::WindowInfo info = KWin::windowInfo( parentWidget()->winId() ); d->on_all_desktops = info.onAllDesktops(); #else @@ -96,7 +96,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name ) d->on_all_desktops = false; } setCaption( TDEGlobal::instance()->aboutData()->programName()); - setAlignment( alignment() | Qt::AlignVCenter | Qt::AlignHCenter ); + setAlignment( alignment() | TQt::AlignVCenter | TQt::AlignHCenter ); // Handle the possibility that the requested system tray size is something other than 22x22 pixels, per the Free Desktop specifications setScaledContents(true); @@ -148,12 +148,12 @@ void KSystemTray::mousePressEvent( TQMouseEvent *e ) return; switch ( e->button() ) { - case Qt::LeftButton: + case TQt::LeftButton: toggleActive(); break; - case Qt::MidButton: + case TQt::MidButton: // fall through - case Qt::RightButton: + case TQt::RightButton: if ( parentWidget() ) { TDEAction* action = d->actionCollection->action("minimizeRestore"); if ( parentWidget()->isVisible() ) @@ -193,12 +193,12 @@ void KSystemTray::minimizeRestoreAction() void KSystemTray::maybeQuit() { TQString query = i18n("<qt>Are you sure you want to quit <b>%1</b>?</qt>") - .arg(kapp->caption()); + .arg(tdeApp->caption()); if (KMessageBox::warningContinueCancel(this, query, i18n("Confirm Quit From System Tray"), KStdGuiItem::quit(), TQString("systemtrayquit%1") - .arg(kapp->caption())) != + .arg(tdeApp->caption())) != KMessageBox::Continue) { return; @@ -244,7 +244,7 @@ void KSystemTray::activateOrHide() if ( !pw ) return; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::WindowInfo info1 = KWin::windowInfo( pw->winId(), NET::XAWMState | NET::WMState ); // mapped = visible (but possibly obscured) bool mapped = (info1.mappingState() == NET::Visible) && !info1.isMinimized(); @@ -288,7 +288,7 @@ void KSystemTray::minimizeRestore( bool restore ) TQWidget* pw = parentWidget(); if( !pw ) return; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::WindowInfo info = KWin::windowInfo( pw->winId(), NET::WMGeometry | NET::WMDesktop ); if ( restore ) { @@ -314,7 +314,7 @@ TDEActionCollection* KSystemTray::actionCollection() TQPixmap KSystemTray::loadIcon( const TQString &icon, TDEInstance *instance ) { - TDEConfig *appCfg = kapp->config(); + TDEConfig *appCfg = tdeApp->config(); TDEConfigGroupSaver configSaver(appCfg, "System Tray"); int iconWidth = appCfg->readNumEntry("systrayIconWidth", 22); return instance->iconLoader()->loadIcon( icon, TDEIcon::Panel, iconWidth ); @@ -333,7 +333,7 @@ void KSystemTray::setPixmap( const TQPixmap& p ) iconPixmapToSet.convertFromImage(correctedImage); } TQLabel::setPixmap( iconPixmapToSet ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::setIcons( winId(), iconPixmapToSet, TQPixmap()); #endif } diff --git a/tdeui/ksystemtray.h b/tdeui/ksystemtray.h index f7e81c9b1..5c66dc143 100644 --- a/tdeui/ksystemtray.h +++ b/tdeui/ksystemtray.h @@ -62,7 +62,7 @@ class KSystemTrayPrivate; **/ class TDEUI_EXPORT KSystemTray : public TQLabel { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/ktabbar.cpp b/tdeui/ktabbar.cpp index 29479c0e9..ed30bc466 100644 --- a/tdeui/ktabbar.cpp +++ b/tdeui/ktabbar.cpp @@ -43,12 +43,12 @@ KTabBar::KTabBar( TQWidget *parent, const char *name ) setMouseTracking( true ); mEnableCloseButtonTimer = new TQTimer( this ); - connect( mEnableCloseButtonTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( enableCloseButton() ) ); + connect( mEnableCloseButtonTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( enableCloseButton() ) ); mActivateDragSwitchTabTimer = new TQTimer( this ); - connect( mActivateDragSwitchTabTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( activateDragSwitchTab() ) ); + connect( mActivateDragSwitchTabTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( activateDragSwitchTab() ) ); - connect(this, TQT_SIGNAL(layoutChanged()), TQT_SLOT(onLayoutChange())); + connect(this, TQ_SIGNAL(layoutChanged()), TQ_SLOT(onLayoutChange())); } KTabBar::~KTabBar() @@ -87,7 +87,7 @@ void KTabBar::setTabEnabled( int id, bool enabled ) void KTabBar::mouseDoubleClickEvent( TQMouseEvent *e ) { - if( e->button() != Qt::LeftButton ) + if( e->button() != TQt::LeftButton ) return; TQTab *tab = selectTab( e->pos() ); @@ -100,11 +100,11 @@ void KTabBar::mouseDoubleClickEvent( TQMouseEvent *e ) void KTabBar::mousePressEvent( TQMouseEvent *e ) { - if( e->button() == Qt::LeftButton ) { + if( e->button() == TQt::LeftButton ) { mEnableCloseButtonTimer->stop(); mDragStart = e->pos(); } - else if( e->button() == Qt::RightButton ) { + else if( e->button() == TQt::RightButton ) { TQTab *tab = selectTab( e->pos() ); if( tab ) { emit( contextMenu( indexOf( tab->identifier() ), mapToGlobal( e->pos() ) ) ); @@ -116,7 +116,7 @@ void KTabBar::mousePressEvent( TQMouseEvent *e ) void KTabBar::mouseMoveEvent( TQMouseEvent *e ) { - if ( e->state() == Qt::LeftButton ) { + if ( e->state() == TQt::LeftButton ) { TQTab *tab = selectTab( e->pos() ); if ( mDragSwitchTab && tab != mDragSwitchTab ) { mActivateDragSwitchTabTimer->stop(); @@ -134,7 +134,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) } } } - else if ( e->state() == Qt::MidButton ) { + else if ( e->state() == TQt::MidButton ) { if (mReorderStartTab==-1) { int delay = TDEGlobalSettings::dndEventDelay(); TQPoint newPos = e->pos(); @@ -144,7 +144,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) TQTab *tab = selectTab( e->pos() ); if( tab && mTabReorderingEnabled ) { mReorderStartTab = indexOf( tab->identifier() ); - grabMouse( tqsizeAllCursor ); + grabMouse( TQt::sizeAllCursor ); return; } } @@ -201,7 +201,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) mEnableCloseButtonTimer->start( TQApplication::doubleClickInterval(), true ); } mHoverCloseButtonTab = t; - connect( mHoverCloseButton, TQT_SIGNAL( clicked() ), TQT_SLOT( closeButtonClicked() ) ); + connect( mHoverCloseButton, TQ_SIGNAL( clicked() ), TQ_SLOT( closeButtonClicked() ) ); return; } } @@ -230,7 +230,7 @@ void KTabBar::activateDragSwitchTab() void KTabBar::mouseReleaseEvent( TQMouseEvent *e ) { - if( e->button() == Qt::MidButton ) { + if( e->button() == TQt::MidButton ) { if ( mReorderStartTab==-1 ) { TQTab *tab = selectTab( e->pos() ); if( tab ) { @@ -240,7 +240,7 @@ void KTabBar::mouseReleaseEvent( TQMouseEvent *e ) } else { releaseMouse(); - setCursor( tqarrowCursor ); + setCursor( TQt::arrowCursor ); mReorderStartTab=-1; mReorderPreviousTab=-1; } @@ -282,7 +282,7 @@ void KTabBar::dropEvent( TQDropEvent *e ) #ifndef TQT_NO_WHEELEVENT void KTabBar::wheelEvent( TQWheelEvent *e ) { - if ( e->orientation() == Qt::Horizontal ) + if ( e->orientation() == TQt::Horizontal ) return; emit( wheelDelta( e->delta() ) ); @@ -298,9 +298,19 @@ void KTabBar::setTabColor( int id, const TQColor& color ) } } +void KTabBar::resetTabColor( int id ) +{ + TQTab *t = tab(id); + if (t) { + if (mTabColors.contains(id)) + mTabColors.remove(id); + repaint(t->rect(), false); + } +} + const TQColor &KTabBar::tabColor( int id ) const { - if ( mTabColors.contains( id ) ) + if ( mTabColors.contains(id) && mTabColors[id].isValid() ) return mTabColors[id]; return colorGroup().foreground(); @@ -359,7 +369,7 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br, flags |= TQStyle::Style_HasFocus; TQColorGroup cg( colorGroup() ); - if ( mTabColors.contains( t->identifier() ) ) + if ( mTabColors.contains(t->identifier()) && mTabColors[t->identifier()].isValid() ) cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] ); style().drawControl( TQStyle::CE_TabBarLabel, p, this, r, diff --git a/tdeui/ktabbar.h b/tdeui/ktabbar.h index c5ea25c6d..c6602d0c6 100644 --- a/tdeui/ktabbar.h +++ b/tdeui/ktabbar.h @@ -34,7 +34,7 @@ class KTabBarPrivate; */ class TDEUI_EXPORT KTabBar: public TQTabBar { - Q_OBJECT + TQ_OBJECT public: KTabBar( TQWidget* parent=0, const char* name=0 ); @@ -44,6 +44,7 @@ public: const TQColor &tabColor( int ) const; void setTabColor( int, const TQColor& ); + void resetTabColor( int ); virtual int insertTab( TQTab *, int index = -1 ); virtual void removeTab( TQTab * ); diff --git a/tdeui/ktabctl.cpp b/tdeui/ktabctl.cpp index 0ff9f64e4..193e68a38 100644 --- a/tdeui/ktabctl.cpp +++ b/tdeui/ktabctl.cpp @@ -35,7 +35,7 @@ KTabCtl::KTabCtl(TQWidget *parent, const char *name) : TQWidget(parent, name) { tabs = new TQTabBar(this, "_tabbar"); - connect(tabs, TQT_SIGNAL(selected(int)), this, TQT_SLOT(showTab(int))); + connect(tabs, TQ_SIGNAL(selected(int)), this, TQ_SLOT(showTab(int))); tabs->move(2, 1); blBorder = true; diff --git a/tdeui/ktabctl.h b/tdeui/ktabctl.h index 28de4805b..dcd7756e9 100644 --- a/tdeui/ktabctl.h +++ b/tdeui/ktabctl.h @@ -47,7 +47,7 @@ */ class TDEUI_EXPORT KTabCtl : public TQWidget { - Q_OBJECT + TQ_OBJECT public: KTabCtl(TQWidget *parent = 0, const char *name = 0); diff --git a/tdeui/ktabwidget.cpp b/tdeui/ktabwidget.cpp index d6800ab9a..bcccc4c9a 100644 --- a/tdeui/ktabwidget.cpp +++ b/tdeui/ktabwidget.cpp @@ -58,16 +58,16 @@ KTabWidget::KTabWidget( TQWidget *parent, const char *name, WFlags f ) setHoverCloseButtonDelayed(false); - connect(tabBar(), TQT_SIGNAL(contextMenu( int, const TQPoint & )), TQT_SLOT(contextMenu( int, const TQPoint & ))); - connect(tabBar(), TQT_SIGNAL(mouseDoubleClick( int )), TQT_SLOT(mouseDoubleClick( int ))); - connect(tabBar(), TQT_SIGNAL(mouseMiddleClick( int )), TQT_SLOT(mouseMiddleClick( int ))); - connect(tabBar(), TQT_SIGNAL(initiateDrag( int )), TQT_SLOT(initiateDrag( int ))); - connect(tabBar(), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & ))); - connect(tabBar(), TQT_SIGNAL(receivedDropEvent( int, TQDropEvent * )), TQT_SLOT(receivedDropEvent( int, TQDropEvent * ))); - connect(tabBar(), TQT_SIGNAL(moveTab( int, int )), TQT_SLOT(moveTab( int, int ))); - connect(tabBar(), TQT_SIGNAL(closeRequest( int )), TQT_SLOT(closeRequest( int ))); + connect(tabBar(), TQ_SIGNAL(contextMenu( int, const TQPoint & )), TQ_SLOT(contextMenu( int, const TQPoint & ))); + connect(tabBar(), TQ_SIGNAL(mouseDoubleClick( int )), TQ_SLOT(mouseDoubleClick( int ))); + connect(tabBar(), TQ_SIGNAL(mouseMiddleClick( int )), TQ_SLOT(mouseMiddleClick( int ))); + connect(tabBar(), TQ_SIGNAL(initiateDrag( int )), TQ_SLOT(initiateDrag( int ))); + connect(tabBar(), TQ_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & )), TQ_SIGNAL(testCanDecode(const TQDragMoveEvent *, bool & ))); + connect(tabBar(), TQ_SIGNAL(receivedDropEvent( int, TQDropEvent * )), TQ_SLOT(receivedDropEvent( int, TQDropEvent * ))); + connect(tabBar(), TQ_SIGNAL(moveTab( int, int )), TQ_SLOT(moveTab( int, int ))); + connect(tabBar(), TQ_SIGNAL(closeRequest( int )), TQ_SLOT(closeRequest( int ))); #ifndef TQT_NO_WHEELEVENT - connect(tabBar(), TQT_SIGNAL(wheelDelta( int )), TQT_SLOT(wheelDelta( int ))); + connect(tabBar(), TQ_SIGNAL(wheelDelta( int )), TQ_SLOT(wheelDelta( int ))); #endif } @@ -135,6 +135,14 @@ void KTabWidget::setTabColor( TQWidget *w, const TQColor& color ) } } +void KTabWidget::resetTabColor( TQWidget *w ) +{ + TQTab *t = tabBar()->tabAt( indexOf( w ) ); + if (t) { + static_cast<KTabBar*>(tabBar())->resetTabColor( t->identifier() ); + } +} + TQColor KTabWidget::tabColor( TQWidget *w ) const { TQTab *t = tabBar()->tabAt( indexOf( w ) ); @@ -182,7 +190,7 @@ unsigned int KTabWidget::tabBarWidthForMaxChars( uint maxLength ) int iw = 0; if ( tab->iconSet() ) iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4; - x += ( tabBar()->style().tqsizeFromContents( TQStyle::CT_TabBarTab, this, + x += ( tabBar()->style().sizeFromContents( TQStyle::CT_TabBarTab, this, TQSize( TQMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ), TQStyleOption( tab ) ) ).width(); } @@ -328,7 +336,7 @@ void KTabWidget::dropEvent( TQDropEvent *e ) #ifndef TQT_NO_WHEELEVENT void KTabWidget::wheelEvent( TQWheelEvent *e ) { - if ( e->orientation() == Qt::Horizontal ) + if ( e->orientation() == TQt::Horizontal ) return; if ( isEmptyTabbarSpace( e->pos() ) ) @@ -357,7 +365,7 @@ void KTabWidget::wheelDelta(int delta) void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e ) { - if( e->button() != Qt::LeftButton ) + if( e->button() != TQt::LeftButton ) return; if ( isEmptyTabbarSpace( e->pos() ) ) { @@ -369,12 +377,12 @@ void KTabWidget::mouseDoubleClickEvent( TQMouseEvent *e ) void KTabWidget::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == Qt::RightButton ) { + if ( e->button() == TQt::RightButton ) { if ( isEmptyTabbarSpace( e->pos() ) ) { emit( contextMenu( mapToGlobal( e->pos() ) ) ); return; } - } else if ( e->button() == Qt::MidButton ) { + } else if ( e->button() == TQt::MidButton ) { if ( isEmptyTabbarSpace( e->pos() ) ) { emit( mouseMiddleClick() ); return; diff --git a/tdeui/ktabwidget.h b/tdeui/ktabwidget.h index d0a75b38b..1290e6307 100644 --- a/tdeui/ktabwidget.h +++ b/tdeui/ktabwidget.h @@ -35,7 +35,7 @@ class KTabWidgetPrivate; */ class TDEUI_EXPORT KTabWidget : public TQTabWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool tabReorderingEnabled READ isTabReorderingEnabled WRITE setTabReorderingEnabled ) TQ_PROPERTY( bool hoverCloseButton READ hoverCloseButton WRITE setHoverCloseButton ) TQ_PROPERTY( bool hoverCloseButtonDelayed READ hoverCloseButtonDelayed WRITE setHoverCloseButtonDelayed ) @@ -56,6 +56,11 @@ public: void setTabColor( TQWidget *, const TQColor& color ); /*! + Reset the color of the tab of the given widget. + */ + void resetTabColor( TQWidget * ); + + /*! Returns the tab color for the given widget. */ TQColor tabColor( TQWidget * ) const; diff --git a/tdeui/ktextbrowser.cpp b/tdeui/ktextbrowser.cpp index a0331ccf7..b602570be 100644 --- a/tdeui/ktextbrowser.cpp +++ b/tdeui/ktextbrowser.cpp @@ -32,8 +32,8 @@ KTextBrowser::KTextBrowser( TQWidget *parent, const char *name, { // //1999-10-04 Espen Sand: Not required anymore ? - //connect( this, TQT_SIGNAL(highlighted(const TQString &)), - // this, TQT_SLOT(refChanged(const TQString &))); + //connect( this, TQ_SIGNAL(highlighted(const TQString &)), + // this, TQ_SLOT(refChanged(const TQString &))); } KTextBrowser::~KTextBrowser( void ) @@ -64,7 +64,7 @@ void KTextBrowser::setSource( const TQString& name ) { if( !mNotifyClick ) { - kapp->invokeMailer( KURL( name ) ); + tdeApp->invokeMailer( KURL( name ) ); } else { @@ -75,7 +75,7 @@ void KTextBrowser::setSource( const TQString& name ) { if( !mNotifyClick ) { - kapp->invokeBrowser( name ); + tdeApp->invokeBrowser( name ); } else { diff --git a/tdeui/ktextbrowser.h b/tdeui/ktextbrowser.h index 0d6885329..eb79078c9 100644 --- a/tdeui/ktextbrowser.h +++ b/tdeui/ktextbrowser.h @@ -41,7 +41,7 @@ class TDEUI_EXPORT KTextBrowser : public TQTextBrowser { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool notifyClick READ isNotifyClick WRITE setNotifyClick ) public: diff --git a/tdeui/ktextedit.cpp b/tdeui/ktextedit.cpp index 3ebb1375f..22d8dd0ab 100644 --- a/tdeui/ktextedit.cpp +++ b/tdeui/ktextedit.cpp @@ -229,16 +229,16 @@ TQPopupMenu *KTextEdit::createPopupMenu( const TQPoint &pos ) menu->insertSeparator(); id = menu->insertItem( SmallIconSet( "tools-check-spelling" ), i18n( "Check Spelling..." ), - this, TQT_SLOT( checkSpelling() ) ); + this, TQ_SLOT( checkSpelling() ) ); if( text().isEmpty() ) menu->setItemEnabled( id, false ); id = menu->insertItem( i18n( "Auto Spell Check" ), - this, TQT_SLOT( toggleAutoSpellCheck() ) ); + this, TQ_SLOT( toggleAutoSpellCheck() ) ); menu->setItemChecked(id, d->checkSpellingEnabled); menu->insertSeparator(); - id=menu->insertItem(i18n("Allow Tabulations"),this,TQT_SLOT(slotAllowTab())); + id=menu->insertItem(i18n("Allow Tabulations"),this,TQ_SLOT(slotAllowTab())); menu->setItemChecked(id, !tabChangesFocus()); } @@ -332,7 +332,7 @@ void KTextEdit::setReadOnly(bool readOnly) if ( d->customPalette ) { TQPalette p = palette(); - TQColor color = p.color(TQPalette::Normal, TQColorGroup::Base); + TQColor color = p.color(TQPalette::Active, TQColorGroup::Base); p.setColor(TQColorGroup::Base, color); p.setColor(TQColorGroup::Background, color); setPalette( p ); @@ -351,16 +351,16 @@ void KTextEdit::checkSpelling() { delete d->spell; d->spell = new KSpell( this, i18n( "Spell Checking" ), - TQT_TQOBJECT(this), TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true); + this, TQ_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true); - connect( d->spell, TQT_SIGNAL( death() ), - this, TQT_SLOT( spellCheckerFinished() ) ); + connect( d->spell, TQ_SIGNAL( death() ), + this, TQ_SLOT( spellCheckerFinished() ) ); - connect( d->spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ), - this, TQT_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) ); + connect( d->spell, TQ_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ), + this, TQ_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) ); - connect( d->spell, TQT_SIGNAL( corrected( const TQString &, const TQString &, unsigned int ) ), - this, TQT_SLOT( spellCheckerCorrected( const TQString &, const TQString &, unsigned int ) ) ); + connect( d->spell, TQ_SIGNAL( corrected( const TQString &, const TQString &, unsigned int ) ), + this, TQ_SLOT( spellCheckerCorrected( const TQString &, const TQString &, unsigned int ) ) ); } void KTextEdit::spellCheckerMisspelling( const TQString &text, const TQStringList &, unsigned int pos ) @@ -398,7 +398,7 @@ void KTextEdit::spellCheckerFinished() void KTextEdit::slotSpellCheckReady( KSpell *s ) { s->check( text() ); - connect( s, TQT_SIGNAL( done( const TQString & ) ), this, TQT_SLOT( slotSpellCheckDone( const TQString & ) ) ); + connect( s, TQ_SIGNAL( done( const TQString & ) ), this, TQ_SLOT( slotSpellCheckDone( const TQString & ) ) ); } void KTextEdit::slotSpellCheckDone( const TQString &s ) diff --git a/tdeui/ktextedit.h b/tdeui/ktextedit.h index 930409b04..8ba6f382f 100644 --- a/tdeui/ktextedit.h +++ b/tdeui/ktextedit.h @@ -42,7 +42,7 @@ class KSpell; */ class TDEUI_EXPORT KTextEdit : public TQTextEdit { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/ktimewidget.cpp b/tdeui/ktimewidget.cpp index 4d48b2129..aaa0be9e4 100644 --- a/tdeui/ktimewidget.cpp +++ b/tdeui/ktimewidget.cpp @@ -41,8 +41,8 @@ void KTimeWidget::init() d->timeWidget = new TQTimeEdit(this); - connect(d->timeWidget, TQT_SIGNAL(valueChanged(const TQTime &)), - TQT_SIGNAL(valueChanged(const TQTime &))); + connect(d->timeWidget, TQ_SIGNAL(valueChanged(const TQTime &)), + TQ_SIGNAL(valueChanged(const TQTime &))); } void KTimeWidget::setTime(const TQTime & time) diff --git a/tdeui/ktimewidget.h b/tdeui/ktimewidget.h index 9ac6923f3..5d170434b 100644 --- a/tdeui/ktimewidget.h +++ b/tdeui/ktimewidget.h @@ -36,7 +36,7 @@ */ class TDEUI_EXPORT KTimeWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQTime time READ time WRITE setTime ) public: diff --git a/tdeui/ktimezonewidget.cpp b/tdeui/ktimezonewidget.cpp index f6488847f..7fcfe091c 100644 --- a/tdeui/ktimezonewidget.cpp +++ b/tdeui/ktimezonewidget.cpp @@ -22,7 +22,7 @@ #include <tdefile.h> #include <tdelistview.h> #include <tdelocale.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <ktimezones.h> #include <ktimezonewidget.h> #include <tqpixmap.h> diff --git a/tdeui/ktimezonewidget.h b/tdeui/ktimezonewidget.h index 70d63521e..ff044460c 100644 --- a/tdeui/ktimezonewidget.h +++ b/tdeui/ktimezonewidget.h @@ -59,7 +59,7 @@ class KTimezoneWidgetPrivate; class TDEUI_EXPORT KTimezoneWidget : public TDEListView { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/ktip.cpp b/tdeui/ktip.cpp index 1cc520640..7152e18bb 100644 --- a/tdeui/ktip.cpp +++ b/tdeui/ktip.cpp @@ -42,13 +42,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdelocale.h> #include <kpushbutton.h> #include <kseparator.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kstdguiitem.h> #include <ktextbrowser.h> #include <kiconeffect.h> #include <tdeglobalsettings.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <twin.h> #endif @@ -64,7 +64,7 @@ KTipDatabase::KTipDatabase(const TQString &_tipFile) loadTips(tipFile); if (!mTips.isEmpty()) - mCurrent = kapp->random() % mTips.count(); + mCurrent = tdeApp->random() % mTips.count(); } @@ -80,7 +80,7 @@ KTipDatabase::KTipDatabase( const TQStringList& tipsFiles ) addTips( *it ); } if (!mTips.isEmpty()) - mCurrent = kapp->random() % mTips.count(); + mCurrent = tdeApp->random() % mTips.count(); } @@ -189,7 +189,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) img = TQImage(locate("data", "tdewizard/pics/wizard_small.png")); // colorize and check to figure the correct color TDEIconEffect::colorize(img, mBlendedColor, 1.0); - QRgb colPixel( img.pixel(0,0) ); + TQRgb colPixel( img.pixel(0,0) ); mBlendedColor = TQColor(tqRed(colPixel),tqGreen(colPixel),tqBlue(colPixel)); } @@ -204,7 +204,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) mDatabase = db; setCaption(i18n("Tip of the Day")); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::setIcons( winId(), TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 32 ), TDEGlobal::iconLoader()->loadIcon( "idea", TDEIcon::NoGroup, 16 ) ); @@ -268,7 +268,7 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) TQLabel *l = new TQLabel(hbox); l->setPixmap(img); l->setBackgroundColor(mBlendedColor); - l->setAlignment(Qt::AlignRight | Qt::AlignBottom); + l->setAlignment(TQt::AlignRight | TQt::AlignBottom); resize(550, 230); TQSize sh = size(); @@ -301,13 +301,13 @@ KTipDialog::KTipDialog(KTipDatabase *db, TQWidget *parent, const char *name) ok->setDefault(true); hbox2->addWidget(ok); - TDEConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(tdeApp->config(), "TipOfDay"); mTipOnStart->setChecked(config.readBoolEntry("RunOnStart", true)); - connect(next, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextTip())); - connect(prev, TQT_SIGNAL(clicked()), this, TQT_SLOT(prevTip())); - connect(ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); - connect(mTipOnStart, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showOnStart(bool))); + connect(next, TQ_SIGNAL(clicked()), this, TQ_SLOT(nextTip())); + connect(prev, TQ_SIGNAL(clicked()), this, TQ_SLOT(prevTip())); + connect(ok, TQ_SIGNAL(clicked()), this, TQ_SLOT(accept())); + connect(mTipOnStart, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(showOnStart(bool))); ok->setFocus(); @@ -322,7 +322,7 @@ KTipDialog::~KTipDialog() void KTipDialog::showTip(const TQString &tipFile, bool force) { - showTip(kapp->mainWidget(), tipFile, force); + showTip(tdeApp->mainWidget(), tipFile, force); } void KTipDialog::showTip(TQWidget *parent, const TQString &tipFile, bool force) @@ -332,7 +332,7 @@ void KTipDialog::showTip(TQWidget *parent, const TQString &tipFile, bool force) void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bool force) { - TDEConfigGroup configGroup(kapp->config(), "TipOfDay"); + TDEConfigGroup configGroup(tdeApp->config(), "TipOfDay"); const bool runOnStart = configGroup.readBoolEntry("RunOnStart", true); @@ -347,11 +347,11 @@ void KTipDialog::showMultiTip(TQWidget *parent, const TQStringList &tipFiles, bo const int oneDay = 24*60*60; TQDateTime lastShown = configGroup.readDateTimeEntry("TipLastShown"); // Show tip roughly once a week - if (lastShown.secsTo(TQDateTime::currentDateTime()) < (oneDay + (kapp->random() % (10*oneDay)))) + if (lastShown.secsTo(TQDateTime::currentDateTime()) < (oneDay + (tdeApp->random() % (10*oneDay)))) return; } configGroup.writeEntry("TipLastShown", TQDateTime::currentDateTime()); - kapp->config()->sync(); + tdeApp->config()->sync(); if (!hasLastShown) return; // Don't show tip on first start } @@ -418,14 +418,14 @@ static TQString fixTip(TQString tip) void KTipDialog::setShowOnStart(bool on) { - TDEConfigGroup config(kapp->config(), "TipOfDay"); + TDEConfigGroup config(tdeApp->config(), "TipOfDay"); config.writeEntry("RunOnStart", on); config.sync(); } bool KTipDialog::eventFilter(TQObject *o, TQEvent *e) { - if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(mTipText) && e->type()== TQEvent::KeyPress && + if (o == mTipText && e->type()== TQEvent::KeyPress && (((TQKeyEvent *)e)->key() == Key_Return || ((TQKeyEvent *)e)->key() == Key_Space )) accept(); diff --git a/tdeui/ktip.h b/tdeui/ktip.h index a506902bf..b6fe3c0b6 100644 --- a/tdeui/ktip.h +++ b/tdeui/ktip.h @@ -107,7 +107,7 @@ private: */ class TDEUI_EXPORT KTipDialog : public KDialog { - Q_OBJECT + TQ_OBJECT public: /** * Construct a tip dialog. diff --git a/tdeui/kurllabel.cpp b/tdeui/kurllabel.cpp index 539984466..4a296a284 100644 --- a/tdeui/kurllabel.cpp +++ b/tdeui/kurllabel.cpp @@ -37,7 +37,7 @@ public: Private (const TQString& url, KURLLabel* label) : URL (url), LinkColor (TDEGlobalSettings::linkColor()), - HighlightedLinkColor (Qt::red), + HighlightedLinkColor (TQt::red), Tip(url), Cursor (0L), Underline (true), @@ -50,7 +50,7 @@ public: MarginAltered(false), Timer (new TQTimer (label)) { - connect (Timer, TQT_SIGNAL (timeout ()), label, TQT_SLOT (updateColor ())); + connect (Timer, TQ_SIGNAL (timeout ()), label, TQ_SLOT (updateColor ())); } ~Private () @@ -87,7 +87,7 @@ KURLLabel::KURLLabel (const TQString& url, const TQString& text, setFont (font()); setUseCursor (true); setLinkColor (d->LinkColor); - setFocusPolicy( TQ_StrongFocus ); //better accessibility + setFocusPolicy( TQWidget::StrongFocus ); //better accessibility setMouseTracking (true); } @@ -98,7 +98,7 @@ KURLLabel::KURLLabel (TQWidget* parent, const char* name) setFont (font()); setUseCursor (true); setLinkColor (d->LinkColor); - setFocusPolicy( TQ_StrongFocus ); //better accessibility + setFocusPolicy( TQWidget::StrongFocus ); //better accessibility setMouseTracking (true); } @@ -122,17 +122,17 @@ void KURLLabel::mouseReleaseEvent (TQMouseEvent* e) switch (e->button()) { - case Qt::LeftButton: + case TQt::LeftButton: emit leftClickedURL (); emit leftClickedURL (d->URL); break; - case Qt::MidButton: + case TQt::MidButton: emit middleClickedURL (); emit middleClickedURL (d->URL); break; - case Qt::RightButton: + case TQt::RightButton: emit rightClickedURL (); emit rightClickedURL (d->URL); break; @@ -308,7 +308,7 @@ void KURLLabel::enterEvent (TQEvent* e) TQLabel::enterEvent (e); TQRect r( activeRect() ); - if (!r.contains( TQT_TQMOUSEEVENT(e)->pos() )) + if (!r.contains( static_cast<TQMouseEvent*>(e)->pos() )) return; if (!d->AltPixmap.isNull() && pixmap()) @@ -355,7 +355,7 @@ bool KURLLabel::event (TQEvent *e) { // use parentWidget() unless you are a toplevel widget, then try qAapp TQPalette p = parentWidget() ? parentWidget()->palette() : tqApp->palette(); - p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Normal, TQColorGroup::Background)); + p.setBrush(TQColorGroup::Base, p.brush(TQPalette::Active, TQColorGroup::Background)); p.setColor(TQColorGroup::Foreground, palette().active().foreground()); setPalette(p); d->LinkColor = TDEGlobalSettings::linkColor(); @@ -367,13 +367,13 @@ bool KURLLabel::event (TQEvent *e) if (result && hasFocus()) { TQPainter p(this); TQRect r( activeRect() ); - style().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, colorGroup() ); + style().drawPrimitive( TQStyle::PE_FocusRect, &p, r, colorGroup() ); } return result; } else if (e->type() == TQEvent::KeyPress) { - TQKeyEvent* ke = TQT_TQKEYEVENT(e); - if (ke->key() == Qt::Key_Enter || ke->key() == Qt::Key_Return) { + TQKeyEvent* ke = static_cast<TQKeyEvent*>(e); + if (ke->key() == TQt::Key_Enter || ke->key() == TQt::Key_Return) { setLinkColor (d->HighlightedLinkColor); d->Timer->start (300); emit leftClickedURL (); @@ -384,12 +384,12 @@ bool KURLLabel::event (TQEvent *e) } else if (e->type() == TQEvent::MouseButtonPress) { TQRect r( activeRect() ); - d->MousePressed = r.contains(TQT_TQMOUSEEVENT(e)->pos()); + d->MousePressed = r.contains(static_cast<TQMouseEvent*>(e)->pos()); } else if (e->type() == TQEvent::MouseMove) { if (d->Cursor) { TQRect r( activeRect() ); - bool inside = r.contains(TQT_TQMOUSEEVENT(e)->pos()); + bool inside = r.contains(static_cast<TQMouseEvent*>(e)->pos()); if (d->WasInsideRect != inside) { if (inside) TQLabel::setCursor(*d->Cursor); @@ -428,11 +428,11 @@ void KURLLabel::setMargin( int margin ) d->MarginAltered = true; } -void KURLLabel::setFocusPolicy( TQ_FocusPolicy policy ) +void KURLLabel::setFocusPolicy( TQWidget::FocusPolicy policy ) { TQLabel::setFocusPolicy(policy); if (!d->MarginAltered) { - TQLabel::setMargin(policy == TQ_NoFocus ? 0 : 3); //better default : better look when focused + TQLabel::setMargin(policy == TQWidget::NoFocus ? 0 : 3); //better default : better look when focused } } diff --git a/tdeui/kurllabel.h b/tdeui/kurllabel.h index c35d3156b..ab5ff067e 100644 --- a/tdeui/kurllabel.h +++ b/tdeui/kurllabel.h @@ -51,8 +51,8 @@ class TQPixmap; * KURLLabel *address = new KURLLabel(this); * address->setText("My homepage"); * address->setURL("http://www.home.com/~me"); - * connect(address, TQT_SIGNAL(leftClickedURL(const TQString&)), - * TQT_SLOT(processMyURL(const TQString&))); + * connect(address, TQ_SIGNAL(leftClickedURL(const TQString&)), + * TQ_SLOT(processMyURL(const TQString&))); * \endcode * * In this example, the text "My homepage" would be displayed @@ -70,7 +70,7 @@ class TQPixmap; */ class TDEUI_EXPORT KURLLabel : public TQLabel { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY (TQString url READ url WRITE setURL) TQ_PROPERTY (TQString tipText READ tipText WRITE setTipText ) TQ_PROPERTY (TQPixmap altPixmap READ altPixmap WRITE setAltPixmap) @@ -163,7 +163,7 @@ public: */ #ifdef qdoc #else - virtual void setFocusPolicy ( TQ_FocusPolicy policy ); + virtual void setFocusPolicy ( TQWidget::FocusPolicy policy ); #endif /** diff --git a/tdeui/kwhatsthismanager.cpp b/tdeui/kwhatsthismanager.cpp index 46643f6f0..3e0c7e62b 100644 --- a/tdeui/kwhatsthismanager.cpp +++ b/tdeui/kwhatsthismanager.cpp @@ -84,9 +84,9 @@ bool KWhatsThisUndefined::clicked (const TQString& href) body . append ("\nPlease type in your what's this help between these lines: " "\n--%-----------------------------------------------------------------------\n" "\n--%-----------------------------------------------------------------------"); - kapp -> invokeMailer ("quality-whatsthis@kde.org", "", "", subj, body); + tdeApp -> invokeMailer ("quality-whatsthis@kde.org", "", "", subj, body); } - return TRUE; + return true; } void KWhatsThisManager::init () diff --git a/tdeui/kwhatsthismanager_p.h b/tdeui/kwhatsthismanager_p.h index 084c83641..ddc7c0e86 100644 --- a/tdeui/kwhatsthismanager_p.h +++ b/tdeui/kwhatsthismanager_p.h @@ -45,7 +45,7 @@ class TQTextEdit; **/ class TDEUI_EXPORT KWhatsThisManager : public TQObject { - Q_OBJECT + TQ_OBJECT public: static void init (); bool eventFilter (TQObject *o, TQEvent *e); diff --git a/tdeui/kwizard.h b/tdeui/kwizard.h index 56995a2e0..4fafd5933 100644 --- a/tdeui/kwizard.h +++ b/tdeui/kwizard.h @@ -45,7 +45,7 @@ */ class TDEUI_EXPORT KWizard : public TQWizard { - Q_OBJECT + TQ_OBJECT public: /** * Constructor diff --git a/tdeui/kwordwrap.cpp b/tdeui/kwordwrap.cpp index de031c966..471a7227a 100644 --- a/tdeui/kwordwrap.cpp +++ b/tdeui/kwordwrap.cpp @@ -236,9 +236,9 @@ void KWordWrap::drawText( TQPainter *painter, int textX, int textY, int flags ) break; int end = (*it); int x = textX; - if ( flags & Qt::AlignHCenter ) + if ( flags & TQt::AlignHCenter ) x += ( maxwidth - *itw ) / 2; - else if ( flags & Qt::AlignRight ) + else if ( flags & TQt::AlignRight ) x += maxwidth - *itw; painter->drawText( x, textY + y + ascent, m_text.mid( start, end - start + 1 ) ); y += height; @@ -246,9 +246,9 @@ void KWordWrap::drawText( TQPainter *painter, int textX, int textY, int flags ) } // Draw the last line int x = textX; - if ( flags & Qt::AlignHCenter ) + if ( flags & TQt::AlignHCenter ) x += ( maxwidth - *itw ) / 2; - else if ( flags & Qt::AlignRight ) + else if ( flags & TQt::AlignRight ) x += maxwidth - *itw; if ( (d->m_constrainingRect.height() < 0) || ((y + height) <= d->m_constrainingRect.height()) ) { diff --git a/tdeui/kwordwrap.h b/tdeui/kwordwrap.h index 3fb48acd9..803389ed3 100644 --- a/tdeui/kwordwrap.h +++ b/tdeui/kwordwrap.h @@ -91,8 +91,8 @@ public: /** * Draw the text that has been previously wrapped, at position x,y. - * Flags are for alignment, e.g. Qt::AlignHCenter. Default is - * Qt::AlignAuto. + * Flags are for alignment, e.g. TQt::AlignHCenter. Default is + * TQt::AlignAuto. * @param painter the TQPainter to use. * @param x the horizontal position of the text * @param y the vertical position of the text diff --git a/tdeui/kxmlgui.xsd b/tdeui/kxmlgui.xsd index dc2fad341..da7bf04e4 100644 --- a/tdeui/kxmlgui.xsd +++ b/tdeui/kxmlgui.xsd @@ -56,7 +56,7 @@ <xsd:annotation> <xsd:documentation> - The name used for every name and group attribute. Maps to QObject::name() in most cases. + The name used for every name and group attribute. Maps to TQObject::name() in most cases. </xsd:documentation> </xsd:annotation> <xsd:restriction base="xsd:Name"> diff --git a/tdeui/kxmlguibuilder.cpp b/tdeui/kxmlguibuilder.cpp index b02ed5b08..404df80e5 100644 --- a/tdeui/kxmlguibuilder.cpp +++ b/tdeui/kxmlguibuilder.cpp @@ -117,7 +117,7 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ if ( element.tagName().lower() == d->tagMainWindow ) { TDEMainWindow *mainwindow = 0; - if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) ) mainwindow = static_cast<TDEMainWindow *>(d->m_widget); return mainwindow; @@ -127,7 +127,7 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ { KMenuBar *bar; - if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) ) bar = static_cast<TDEMainWindow *>(d->m_widget)->menuBar(); else bar = new KMenuBar( d->m_widget ); @@ -145,12 +145,12 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ // And we don't want to set the parent for a standalone popupmenu, // otherwise its shortcuts appear. TQWidget* p = parent; - while ( p && !::tqqt_cast<TDEMainWindow *>( p ) ) + while ( p && !::tqt_cast<TDEMainWindow *>( p ) ) p = p->parentWidget(); TQCString name = element.attribute( d->attrName ).utf8(); - if (!kapp->authorizeTDEAction(name)) + if (!tdeApp->authorizeTDEAction(name)) return 0; TDEPopupMenu *popup = new TDEPopupMenu( p, name); @@ -181,14 +181,14 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ pix = SmallIconSet( icon, 16, instance ); } - if ( parent && ::tqqt_cast<KMenuBar *>( parent ) ) + if ( parent && ::tqt_cast<KMenuBar *>( parent ) ) { if ( !icon.isEmpty() ) id = static_cast<KMenuBar *>(parent)->insertItem( pix, i18nText, popup, -1, index ); else id = static_cast<KMenuBar *>(parent)->insertItem( i18nText, popup, -1, index ); } - else if ( parent && ::tqqt_cast<TQPopupMenu *>( parent ) ) + else if ( parent && ::tqt_cast<TQPopupMenu *>( parent ) ) { if ( !icon.isEmpty() ) id = static_cast<TQPopupMenu *>(parent)->insertItem( pix, i18nText, popup, -1, index ); @@ -205,13 +205,13 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ TQCString name = element.attribute( d->attrName ).utf8(); - TDEToolBar *bar = static_cast<TDEToolBar*>(TQT_TQWIDGET(d->m_widget->child( name, "TDEToolBar" ))); + TDEToolBar *bar = static_cast<TDEToolBar*>(d->m_widget->child( name, "TDEToolBar" )); if( !bar ) { bar = new TDEToolBar( d->m_widget, name, honor, false ); } - if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) ) { if ( d->m_client && !d->m_client->xmlFile().isEmpty() ) bar->setXMLGUIClient( d->m_client ); @@ -224,7 +224,7 @@ TQWidget *KXMLGUIBuilder::createContainer( TQWidget *parent, int index, const TQ if ( element.tagName().lower() == d->tagStatusBar ) { - if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) ) { TDEMainWindow *mainWin = static_cast<TDEMainWindow *>(d->m_widget); mainWin->statusBar()->show(); @@ -241,26 +241,26 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD { // Warning parent can be 0L - if ( ::tqqt_cast<TQPopupMenu *>( container ) ) + if ( ::tqt_cast<TQPopupMenu *>( container ) ) { if ( parent ) { - if ( ::tqqt_cast<KMenuBar *>( parent ) ) + if ( ::tqt_cast<KMenuBar *>( parent ) ) static_cast<KMenuBar *>(parent)->removeItem( id ); - else if ( ::tqqt_cast<TQPopupMenu *>( parent ) ) + else if ( ::tqt_cast<TQPopupMenu *>( parent ) ) static_cast<TQPopupMenu *>(parent)->removeItem( id ); } delete container; } - else if ( ::tqqt_cast<TDEToolBar *>( container ) ) + else if ( ::tqt_cast<TDEToolBar *>( container ) ) { TDEToolBar *tb = static_cast<TDEToolBar *>( container ); tb->saveState( element ); delete tb; } - else if ( ::tqqt_cast<KMenuBar *>( container ) ) + else if ( ::tqt_cast<KMenuBar *>( container ) ) { KMenuBar *mb = static_cast<KMenuBar *>( container ); mb->hide(); @@ -269,9 +269,9 @@ void KXMLGUIBuilder::removeContainer( TQWidget *container, TQWidget *parent, TQD // sure that TQMainWindow::d->mb does not point to a deleted // menubar object. } - else if ( ::tqqt_cast<KStatusBar *>( container ) ) + else if ( ::tqt_cast<KStatusBar *>( container ) ) { - if ( ::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + if ( ::tqt_cast<TDEMainWindow *>( d->m_widget ) ) container->hide(); else delete static_cast<KStatusBar *>(container); @@ -291,7 +291,7 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo { if ( element.tagName().lower() == d->tagSeparator ) { - if ( ::tqqt_cast<TQPopupMenu *>( parent ) ) + if ( ::tqt_cast<TQPopupMenu *>( parent ) ) { // Don't insert multiple separators in a row TQPopupMenu *menu = static_cast<TQPopupMenu *>(parent); @@ -317,9 +317,9 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo else return menu->insertSeparator( index ); } - else if ( ::tqqt_cast<TQMenuBar *>( parent ) ) + else if ( ::tqt_cast<TQMenuBar *>( parent ) ) return static_cast<TQMenuBar *>(parent)->insertSeparator( index ); - else if ( ::tqqt_cast<TDEToolBar *>( parent ) ) + else if ( ::tqt_cast<TDEToolBar *>( parent ) ) { TDEToolBar *bar = static_cast<TDEToolBar *>( parent ); @@ -351,12 +351,12 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo } else if ( element.tagName().lower() == d->tagTearOffHandle ) { - if ( ::tqqt_cast<TQPopupMenu *>( parent ) && TDEGlobalSettings::insertTearOffHandle()) + if ( ::tqt_cast<TQPopupMenu *>( parent ) && TDEGlobalSettings::insertTearOffHandle()) return static_cast<TQPopupMenu *>(parent)->insertTearOffHandle( -1, index ); } else if ( element.tagName().lower() == d->tagMenuTitle ) { - if ( ::tqqt_cast<TDEPopupMenu *>( parent ) ) + if ( ::tqt_cast<TDEPopupMenu *>( parent ) ) { TQString i18nText; TQCString text = element.text().utf8(); @@ -389,11 +389,11 @@ int KXMLGUIBuilder::createCustomElement( TQWidget *parent, int index, const TQDo void KXMLGUIBuilder::removeCustomElement( TQWidget *parent, int id ) { - if ( ::tqqt_cast<TQPopupMenu *>( parent ) ) + if ( ::tqt_cast<TQPopupMenu *>( parent ) ) static_cast<TQPopupMenu *>(parent)->removeItem( id ); - else if ( ::tqqt_cast<TQMenuBar *>( parent ) ) + else if ( ::tqt_cast<TQMenuBar *>( parent ) ) static_cast<TQMenuBar *>(parent)->removeItem( id ); - else if ( ::tqqt_cast<TDEToolBar *>( parent ) ) + else if ( ::tqt_cast<TDEToolBar *>( parent ) ) static_cast<TDEToolBar *>(parent)->removeItemDelayed( id ); } @@ -421,7 +421,7 @@ void KXMLGUIBuilder::setBuilderInstance( TDEInstance *instance ) void KXMLGUIBuilder::finalizeGUI( KXMLGUIClient * ) { - if ( !d->m_widget || !::tqqt_cast<TDEMainWindow *>( d->m_widget ) ) + if ( !d->m_widget || !::tqt_cast<TDEMainWindow *>( d->m_widget ) ) return; #if 0 TDEToolBar *toolbar = 0; diff --git a/tdeui/kxmlguiclient.cpp b/tdeui/kxmlguiclient.cpp index de015b5a4..b8fd549f5 100644 --- a/tdeui/kxmlguiclient.cpp +++ b/tdeui/kxmlguiclient.cpp @@ -28,8 +28,8 @@ #include <tqregexp.h> #include <tqguardedptr.h> -#include <kinstance.h> -#include <kstandarddirs.h> +#include <tdeinstance.h> +#include <tdestandarddirs.h> #include <kdebug.h> #include <tdeaction.h> #include <tdeapplication.h> @@ -292,7 +292,7 @@ bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, { TQCString name = e.attribute( attrName ).utf8(); // WABA if ( !actionCollection->action( name.data() ) || - (kapp && !kapp->authorizeTDEAction(name))) + (tdeApp && !tdeApp->authorizeTDEAction(name))) { // remove this child as we aren't using it base.removeChild( e ); diff --git a/tdeui/kxmlguifactory.cpp b/tdeui/kxmlguifactory.cpp index 233907b72..bee9683c4 100644 --- a/tdeui/kxmlguifactory.cpp +++ b/tdeui/kxmlguifactory.cpp @@ -34,10 +34,10 @@ #include <tdeaction.h> #include <kdebug.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <tdeglobal.h> #include <tdeshortcut.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kkeydialog.h> using namespace KXMLGUI; @@ -552,7 +552,7 @@ void KXMLGUIFactory::configureAction( TDEAction *action, const TQDomAttr &attrib int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSettings ) { - KKeyDialog dlg( bAllowLetterShortcuts, tqt_dynamic_cast<TQWidget*>(parent()) ); + KKeyDialog dlg( bAllowLetterShortcuts, dynamic_cast<TQWidget*>(parent()) ); TQPtrListIterator<KXMLGUIClient> it( d->m_clients ); KXMLGUIClient *client; while( (client=it.current()) !=0 ) diff --git a/tdeui/kxmlguifactory.h b/tdeui/kxmlguifactory.h index ae726dd9c..775446308 100644 --- a/tdeui/kxmlguifactory.h +++ b/tdeui/kxmlguifactory.h @@ -61,7 +61,7 @@ class BuildHelper; class TDEUI_EXPORT KXMLGUIFactory : public TQObject { friend class KXMLGUI::BuildHelper; - Q_OBJECT + TQ_OBJECT public: /** * Constructs a KXMLGUIFactory. The provided @p builder KXMLGUIBuilder will be called @@ -183,7 +183,7 @@ class TDEUI_EXPORT KXMLGUIFactory : public TQObject * This slot can be connected dirrectly to the action to configure shortcuts. This is very simple to * do that by adding a single line * \code - * KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection() ); + * KStdAction::keyBindings( guiFactory(), TQ_SLOT( configureShortcuts() ), actionCollection() ); * \endcode * * @param bAllowLetterShortcuts Set to false if unmodified alphanumeric diff --git a/tdeui/qxembed.cpp b/tdeui/qxembed.cpp index 6ba25fff7..23076e38d 100644 --- a/tdeui/qxembed.cpp +++ b/tdeui/qxembed.cpp @@ -54,7 +54,7 @@ #include <tqfocusdata.h> // L0001: QXEmbed works only under X windows. -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 # include <X11/X.h> # include <X11/Xlib.h> @@ -199,7 +199,7 @@ static void sendXEmbedMessage( WId window, long message, long detail = 0, ev.xclient.window = window; ev.xclient.message_type = xembed; ev.xclient.format = 32; - ev.xclient.data.l[0] = GET_QT_X_TIME(); + ev.xclient.data.l[0] = get_tqt_x_time(); ev.xclient.data.l[1] = message; ev.xclient.data.l[2] = detail; ev.xclient.data.l[3] = data1; @@ -219,7 +219,7 @@ static void sendClientMessage(Window window, Atom a, long x) ev.xclient.message_type = a; ev.xclient.format = 32; ev.xclient.data.l[0] = x; - ev.xclient.data.l[1] = GET_QT_X_TIME(); + ev.xclient.data.l[1] = get_tqt_x_time(); XSendEvent(tqt_xdisplay(), window, false, NoEventMask, &ev); } @@ -310,7 +310,7 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // active and has just been given the Qt focus (L0614) or // because the widget already had the Qt focus and just became // active (L0615). - if ( TQT_BASE_OBJECT(tqApp->focusWidget()) == TQT_BASE_OBJECT(o) && + if ( tqApp->focusWidget() == o && ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) { TQFocusEvent* fe = (TQFocusEvent*) e; if ( obeyFocus || fe->reason() != TQFocusEvent::ActiveWindow /*|| fe->reason() == TQFocusEvent::Mouse || @@ -319,11 +319,7 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) // Variable `obeyFocus' suggests that this is the result of mouse // activity in the client. The XEMBED_REQUEST_FOCUS message causes // the embedding widget to take the Qt focus (L2085). -#ifdef USE_QT4 - WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->effectiveWinId(); -#else // USE_QT4 WId window = ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->parentWinId; -#endif // USE_QT4 focusMap->remove( tqApp->focusWidget()->topLevelWidget() ); sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS ); } else if ( fe->reason() == TQFocusEvent::ActiveWindow ) { @@ -344,7 +340,7 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) } break; case TQEvent::KeyPress: - if (TQT_BASE_OBJECT(tqApp->focusWidget()) == TQT_BASE_OBJECT(o) && + if (tqApp->focusWidget() == o && ((QPublicWidget*)tqApp->focusWidget()->topLevelWidget())->topData()->embedded ) { // L0620: The following code replaces the Qt code that // handles focus focus changes with the tab key. See the @@ -365,32 +361,20 @@ bool QXEmbedAppFilter::eventFilter( TQObject *o, TQEvent * e) bool tabForward = true; if ( !(k->state() & ControlButton || k->state() & AltButton) ) { if ( k->key() == Key_Backtab || (k->key() == Key_Tab && (k->state() & ShiftButton)) ) { -#ifdef USE_QT4 - res = ((QPublicWidget*)w)->focusNextPrev( tabForward = false ); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Backtab ); res = ((QPublicWidget*)w)->focusNextPrev( tabForward = false ); TQFocusEvent::resetReason(); -#endif // USE_QT4 } else if ( k->key() == Key_Tab ) { -#ifdef USE_QT4 - res = ((QPublicWidget*)w)->focusNextPrev( tabForward = true ); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Tab ); res = ((QPublicWidget*)w)->focusNextPrev( tabForward = true ); TQFocusEvent::resetReason(); -#endif // USE_QT4 } } if (res) { // L0625: We changed the focus because of tab/backtab key // Now check whether we have been looping around. TQFocusData *fd = ((QPublicWidget*)w)->focusData(); -#ifdef USE_QT4 - WId window = ((QPublicWidget*)w->topLevelWidget())->effectiveWinId(); -#else // USE_QT4 WId window = ((QPublicWidget*)w->topLevelWidget())->topData()->parentWinId; -#endif // USE_QT4 TQWidget *cw = 0; TQWidget *fw = fd->home(); if (tabForward && window) { @@ -435,9 +419,9 @@ static int qxembed_x11_event_filter( XEvent* e) long message = e->xclient.data.l[1]; long detail = e->xclient.data.l[2]; // L0671: Keep Qt message time up to date - if ( msgtime > GET_QT_X_TIME() ) - SET_QT_X_TIME(msgtime); - TQWidget* w = TQT_TQWIDGET(TQWidget::find( e->xclient.window )); + if ( msgtime > get_tqt_x_time() ) + set_tqt_x_time(msgtime); + TQWidget* w = TQWidget::find( e->xclient.window ); if ( !w ) break; switch ( message) { @@ -445,12 +429,7 @@ static int qxembed_x11_event_filter( XEvent* e) // L0675: We just have been embedded into a XEMBED aware widget. TQTLWExtra *extra = ((QPublicWidget*)w->topLevelWidget())->topData(); extra->embedded = 1; -#ifdef USE_QT4 - // [FIXME] - printf("[FIXME] WId not set in tdelibs/tdeui/qxembed.cpp\n"); -#else // USE_QT4 extra->parentWinId = e->xclient.data.l[3]; -#endif // USE_QT4 w->topLevelWidget()->show(); break; } @@ -500,7 +479,7 @@ static int qxembed_x11_event_filter( XEvent* e) // L0683: Set focus on saved focus widget if ( focusCurrent ) { focusCurrent->setFocus(); - if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( focusCurrent )) + if( QXEmbed* emb = dynamic_cast< QXEmbed* >( focusCurrent )) emb->updateEmbeddedFocus( true ); } else if ( !w->topLevelWidget()->focusWidget() ) @@ -509,29 +488,19 @@ static int qxembed_x11_event_filter( XEvent* e) case XEMBED_FOCUS_FIRST: { // L0684: Search first widget in tab chain -#ifdef USE_QT4 - w->topLevelWidget()->setFocus(); - ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Tab ); w->topLevelWidget()->setFocus(); ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(true); TQFocusEvent::resetReason(); -#endif // USE_QT4 } break; case XEMBED_FOCUS_LAST: { // L0686: Search last widget in tab chain -#ifdef USE_QT4 - w->topLevelWidget()->setFocus(); - ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Backtab ); w->topLevelWidget()->setFocus(); ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false); TQFocusEvent::resetReason(); -#endif // USE_QT4 } break; default: @@ -544,7 +513,7 @@ static int qxembed_x11_event_filter( XEvent* e) // We first record what the focus widget was // and clear the Qt focus. if ( w->topLevelWidget()->focusWidget() ) { - if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget())) + if( QXEmbed* emb = dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget())) emb->updateEmbeddedFocus( false ); focusMap->insert( w->topLevelWidget(), new TQGuardedPtr<TQWidget>(w->topLevelWidget()->focusWidget() ) ); @@ -556,7 +525,7 @@ static int qxembed_x11_event_filter( XEvent* e) } } else if ( e->xclient.format == 32 && e->xclient.message_type ) { if ( e->xclient.message_type == tqt_wm_protocols ) { - TQWidget* w = TQT_TQWIDGET(TQWidget::find( e->xclient.window )); + TQWidget* w = TQWidget::find( e->xclient.window ); if ( !w ) break; // L0690: This is for the embedding side! @@ -569,8 +538,8 @@ static int qxembed_x11_event_filter( XEvent* e) Atom a = e->xclient.data.l[0]; if ( a == tqt_wm_take_focus ) { // L0695: update Qt message time variable - if ( (ulong) e->xclient.data.l[1] > GET_QT_X_TIME() ) - SET_QT_X_TIME(e->xclient.data.l[1]); + if ( (ulong) e->xclient.data.l[1] > get_tqt_x_time() ) + set_tqt_x_time(e->xclient.data.l[1]); // L0696: There is no problem when the window is not active. // Qt will generate a WindowActivate event that will // do the job (L1310). This does not happen if the @@ -661,7 +630,7 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f) // See L0660, L0671, L0685. initialize(); window = 0; - setFocusPolicy(TQ_StrongFocus); + setFocusPolicy(TQWidget::StrongFocus); setKeyCompression( false ); // L0910: Trick Qt to create extraData(); @@ -694,7 +663,7 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f) if ( tqApp->activeWindow() == topLevelWidget() ) if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(), - RevertToParent, GET_QT_X_TIME() ); + RevertToParent, get_tqt_x_time() ); // L0915: ??? [drag&drop?] setAcceptDrops( true ); } @@ -746,7 +715,7 @@ QXEmbed::~QXEmbed() int revert; XGetInputFocus( tqt_xdisplay(), &focus, &revert ); if( focus == d->focusProxy->winId()) - XSetInputFocus( tqt_xdisplay(), topLevelWidget()->winId(), RevertToParent, GET_QT_X_TIME() ); + XSetInputFocus( tqt_xdisplay(), topLevelWidget()->winId(), RevertToParent, get_tqt_x_time() ); // L01045: Delete our private data. delete d; } @@ -810,13 +779,13 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e) switch ( e->type() ) { case TQEvent::WindowActivate: - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(topLevelWidget()) ) { + if ( o == topLevelWidget() ) { // L1310: Qt thinks the application window has just been activated. // Make sure the X11 focus is on the focus proxy window. See L0686. if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) if (! hasFocus() ) XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(), - RevertToParent, GET_QT_X_TIME() ); + RevertToParent, get_tqt_x_time() ); if (d->xplain) // L1311: Activation has changed. Grab state might change. See L2800. checkGrab(); @@ -826,7 +795,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e) } break; case TQEvent::WindowDeactivate: - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(topLevelWidget()) ) { + if ( o == topLevelWidget() ) { if (d->xplain) // L1321: Activation has changed. Grab state might change. See L2800. checkGrab(); @@ -838,9 +807,9 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e) case TQEvent::Move: { TQWidget* pos = this; - while( TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(o) && TQT_BASE_OBJECT(pos) != TQT_BASE_OBJECT(topLevelWidget())) + while( pos != o && pos != topLevelWidget()) pos = pos->parentWidget(); - if( TQT_BASE_OBJECT(pos) == TQT_BASE_OBJECT(o) ) { + if( pos == o ) { // L1390: Send fake configure notify events whenever the // global position of the client changes. See L2900. TQPoint globalPos = mapToGlobal(TQPoint(0,0)); @@ -900,7 +869,7 @@ void QXEmbed::focusInEvent( TQFocusEvent * e ){ // This is dual safety here because FocusIn implies this. // But see L1581 for an example where this really matters. XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(), - RevertToParent, GET_QT_X_TIME() ); + RevertToParent, get_tqt_x_time() ); if (d->xplain) { // L1520: Qt focus has changed. Grab state might change. See L2800. checkGrab(); @@ -950,7 +919,7 @@ void QXEmbed::focusOutEvent( TQFocusEvent * ){ // Function isActiveWindow() also returns true when a modal // dialog child of this window is active. XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(), - RevertToParent, GET_QT_X_TIME() ); + RevertToParent, get_tqt_x_time() ); } @@ -1168,13 +1137,9 @@ bool QXEmbed::x11Event( XEvent* e) if (d->xplain && d->xgrab) { // L2060: The passive grab has intercepted a mouse click // in the embedded client window. Take the focus. -#ifdef USE_QT4 - setFocus(); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Mouse ); setFocus(); TQFocusEvent::resetReason(); -#endif // USE_QT4 // L2064: Resume X11 event processing. XAllowEvents(tqt_xdisplay(), ReplayPointer, CurrentTime); // L2065: Qt should not know about this. @@ -1213,20 +1178,12 @@ bool QXEmbed::x11Event( XEvent* e) if( ((QPublicWidget*)topLevelWidget())->topData()->embedded ) { focusMap->remove( topLevelWidget() ); focusMap->insert( topLevelWidget(), new TQGuardedPtr<TQWidget>( this )); -#ifdef USE_QT4 - WId window = ((QPublicWidget*)topLevelWidget())->effectiveWinId(); -#else // USE_QT4 WId window = ((QPublicWidget*)topLevelWidget())->topData()->parentWinId; -#endif // USE_QT4 sendXEmbedMessage( window, XEMBED_REQUEST_FOCUS ); } else { -#ifdef USE_QT4 - setFocus(); -#else // USE_QT4 TQFocusEvent::setReason( TQFocusEvent::Mouse ); setFocus(); TQFocusEvent::resetReason(); -#endif // USE_QT4 } break; default: @@ -1318,12 +1275,7 @@ void QXEmbed::embedClientIntoWindow(TQWidget* client, WId window) XReparentWindow(tqt_xdisplay(), client->winId(), window, 0, 0); // L2451: These two lines are redundant. See L0680. ((QXEmbed*)client)->topData()->embedded = true; -#ifdef USE_QT4 - // [FIXME] - printf("[FIXME] WId not set in tdelibs/tdeui/qxembed.cpp\n"); -#else // USE_QT4 ((QXEmbed*)client)->topData()->parentWinId = window; -#endif // USE_QT4 // L2452: This seems redundant because L2020 maps the window. // But calling show() might also set Qt internal flags. client->show(); @@ -1447,4 +1399,4 @@ void QXEmbed::reparent( TQWidget * parent, WFlags f, const TQPoint & p, bool sho // for KDE #include "qxembed.moc" -#endif // Q_WS_X11 +#endif // TQ_WS_X11 diff --git a/tdeui/qxembed.h b/tdeui/qxembed.h index 5c409fd51..c21b96eac 100644 --- a/tdeui/qxembed.h +++ b/tdeui/qxembed.h @@ -25,11 +25,7 @@ #include <tqwidget.h> #include <tdelibs_export.h> -#ifdef Q_MOC_RUN -#define Q_WS_X11 -#endif // Q_MOC_RUN - -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 class QXEmbedData; @@ -61,7 +57,7 @@ class QXEmbedData; */ class TDEUI_EXPORT QXEmbed : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/tdeui/tdeaboutapplication.cpp b/tdeui/tdeaboutapplication.cpp index e9eb2f4b8..8995b01b4 100644 --- a/tdeui/tdeaboutapplication.cpp +++ b/tdeui/tdeaboutapplication.cpp @@ -36,7 +36,7 @@ TDEAboutApplication::TDEAboutApplication( TQWidget *parent, const char *name, bool modal ) :TDEAboutDialog( AbtTabbed|AbtProduct, - kapp ? kapp->caption() : TQString::null, + tdeApp ? tdeApp->caption() : TQString::null, Close, Close, parent, name, modal ) { @@ -60,7 +60,7 @@ void TDEAboutApplication::buildDialog( const TDEAboutData *aboutData ) // //i18n "??" is displayed as (pseudo-)version when no data is known about the application - setProduct( kapp ? kapp->caption() : TQString::null, i18n("??"), TQString::null, TQString::null ); + setProduct( tdeApp ? tdeApp->caption() : TQString::null, i18n("??"), TQString::null, TQString::null ); TDEAboutContainer *appPage = addContainerPage( i18n("&About")); TQString appPageText = @@ -96,8 +96,8 @@ void TDEAboutApplication::buildDialog( const TDEAboutData *aboutData ) url->setText(aboutData->homepage()); url->setURL(aboutData->homepage()); appPage->addWidget( url ); - connect( url, TQT_SIGNAL(leftClickedURL(const TQString &)), - this, TQT_SLOT(openURLSlot(const TQString &))); + connect( url, TQ_SIGNAL(leftClickedURL(const TQString &)), + this, TQ_SLOT(openURLSlot(const TQString &))); } int authorCount = aboutData->authors().count(); diff --git a/tdeui/tdeaboutdialog.cpp b/tdeui/tdeaboutdialog.cpp index d0ab3dc3d..fddcffde4 100644 --- a/tdeui/tdeaboutdialog.cpp +++ b/tdeui/tdeaboutdialog.cpp @@ -96,15 +96,15 @@ TDEAboutContributor::TDEAboutContributor( TQWidget *_parent, const char *wname, kurl->setFloat(true); kurl->setUnderline(true); kurl->setMargin(0); - connect(kurl, TQT_SIGNAL(leftClickedURL(const TQString &)), - TQT_SLOT(emailClickedSlot(const TQString &))); + connect(kurl, TQ_SIGNAL(leftClickedURL(const TQString &)), + TQ_SLOT(emailClickedSlot(const TQString &))); kurl = static_cast<KURLLabel *>(mText[2]); kurl->setFloat(true); kurl->setUnderline(true); kurl->setMargin(0); - connect(kurl, TQT_SIGNAL(leftClickedURL(const TQString &)), - TQT_SLOT(urlClickedSlot(const TQString &))); + connect(kurl, TQ_SIGNAL(leftClickedURL(const TQString &)), + TQ_SLOT(urlClickedSlot(const TQString &))); mLabel[3]->setAlignment( AlignTop ); @@ -227,8 +227,8 @@ void TDEAboutContributor::updateLayout( void ) { if( mShowHeader ) { - gbox->addWidget( TQT_TQWIDGET(mLabel[i]), r, 0, (TQ_Alignment)AlignLeft ); - gbox->addWidget( TQT_TQWIDGET(mText[i]), r, 1, (TQ_Alignment)AlignLeft ); + gbox->addWidget( mLabel[i], r, 0, (TQt::AlignmentFlags)AlignLeft ); + gbox->addWidget( mText[i], r, 1, (TQt::AlignmentFlags)AlignLeft ); mLabel[i]->show(); mText[i]->show(); } @@ -237,11 +237,11 @@ void TDEAboutContributor::updateLayout( void ) mLabel[i]->hide(); if( !i ) { - gbox->addMultiCellWidget( TQT_TQWIDGET(mText[i]), r, r, 0, 1, (TQ_Alignment)AlignLeft ); + gbox->addMultiCellWidget( mText[i], r, r, 0, 1, (TQt::AlignmentFlags)AlignLeft ); } else { - gbox->addWidget( TQT_TQWIDGET(mText[i]), r, 1, (TQ_Alignment)AlignLeft ); + gbox->addWidget( mText[i], r, 1, (TQt::AlignmentFlags)AlignLeft ); } mText[i]->show(); } @@ -359,8 +359,8 @@ TDEAboutContainerBase::TDEAboutContainerBase( int layoutType, TQWidget *_parent, vbox = new TQVBoxLayout( mImageFrame, 1 ); mImageLabel = new KImageTrackLabel( mImageFrame ); - connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )), - TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); + connect( mImageLabel, TQ_SIGNAL(mouseTrack( int, const TQMouseEvent * )), + TQ_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); vbox->addStretch(10); vbox->addWidget( mImageLabel ); vbox->addStretch(10); @@ -386,8 +386,8 @@ TDEAboutContainerBase::TDEAboutContainerBase( int layoutType, TQWidget *_parent, gbox->setColStretch( 2, 10 ); mImageLabel = new KImageTrackLabel( mImageFrame ); - connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )), - TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); + connect( mImageLabel, TQ_SIGNAL(mouseTrack( int, const TQMouseEvent * )), + TQ_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); gbox->addWidget( mImageLabel, 1, 1 ); gbox->activate(); } @@ -410,8 +410,8 @@ TDEAboutContainerBase::TDEAboutContainerBase( int layoutType, TQWidget *_parent, vbox = new TQVBoxLayout( mImageFrame, 1 ); mImageLabel = new KImageTrackLabel( mImageFrame ); - connect( mImageLabel, TQT_SIGNAL(mouseTrack( int, const TQMouseEvent * )), - TQT_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); + connect( mImageLabel, TQ_SIGNAL(mouseTrack( int, const TQMouseEvent * )), + TQ_SLOT( slotMouseTrack( int, const TQMouseEvent * )) ); vbox->addStretch(10); vbox->addWidget( mImageLabel ); vbox->addStretch(10); @@ -475,10 +475,10 @@ TQFrame *TDEAboutContainerBase::addTextPage( const TQString &title, browser->setMinimumHeight( fontMetrics().lineSpacing()*numLines ); vbox->addWidget(browser); - connect(browser, TQT_SIGNAL(urlClick(const TQString &)), - TQT_SLOT(slotUrlClick(const TQString &))); - connect(browser, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), - TQT_SLOT(slotMailClick(const TQString &,const TQString &))); + connect(browser, TQ_SIGNAL(urlClick(const TQString &)), + TQ_SLOT(slotUrlClick(const TQString &))); + connect(browser, TQ_SIGNAL(mailClick(const TQString &,const TQString &)), + TQ_SLOT(slotMailClick(const TQString &,const TQString &))); } else { @@ -527,10 +527,10 @@ TDEAboutContainer *TDEAboutContainerBase::addContainerPage( const TQString &titl innerAlignment ); mPageTab->addTab( container, title ); - connect(container, TQT_SIGNAL(urlClick(const TQString &)), - TQT_SLOT(slotUrlClick(const TQString &))); - connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), - TQT_SLOT(slotMailClick(const TQString &,const TQString &))); + connect(container, TQ_SIGNAL(urlClick(const TQString &)), + TQ_SLOT(slotUrlClick(const TQString &))); + connect(container, TQ_SIGNAL(mailClick(const TQString &,const TQString &)), + TQ_SLOT(slotMailClick(const TQString &,const TQString &))); return container; } @@ -559,10 +559,10 @@ TDEAboutContainer *TDEAboutContainerBase::addScrolledContainerPage( scrollView->addChild( container ); - connect(container, TQT_SIGNAL(urlClick(const TQString &)), - TQT_SLOT(slotUrlClick(const TQString &))); - connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), - TQT_SLOT(slotMailClick(const TQString &,const TQString &))); + connect(container, TQ_SIGNAL(urlClick(const TQString &)), + TQ_SLOT(slotUrlClick(const TQString &))); + connect(container, TQ_SIGNAL(mailClick(const TQString &,const TQString &)), + TQ_SLOT(slotMailClick(const TQString &,const TQString &))); return container; } @@ -591,10 +591,10 @@ TDEAboutContainer *TDEAboutContainerBase::addContainer( int childAlignment, 0, KDialog::spacingHint(), childAlignment, innerAlignment ); mTopLayout->addWidget( container, 0, childAlignment ); - connect(container, TQT_SIGNAL(urlClick(const TQString &)), - TQT_SLOT(slotUrlClick(const TQString &))); - connect(container, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), - TQT_SLOT(slotMailClick(const TQString &,const TQString &))); + connect(container, TQ_SIGNAL(urlClick(const TQString &)), + TQ_SLOT(slotUrlClick(const TQString &))); + connect(container, TQ_SIGNAL(mailClick(const TQString &,const TQString &)), + TQ_SLOT(slotMailClick(const TQString &,const TQString &))); return container; } @@ -693,13 +693,13 @@ void TDEAboutContainerBase::setProduct( const TQString &appName, return; } - if ( kapp ) + if ( tdeApp ) { - mIconLabel->setPixmap( kapp->icon() ); - kdDebug(291) << "setPixmap (iconName): " << kapp->iconName() << endl; + mIconLabel->setPixmap( tdeApp->icon() ); + kdDebug(291) << "setPixmap (iconName): " << tdeApp->iconName() << endl; } else - kdDebug(291) << "no kapp" << endl; + kdDebug(291) << "no tdeApp" << endl; const TQString msg1 = i18n("%1 %2 (Using Trinity %3)").arg(appName).arg(version). arg(TQString::fromLatin1(TDE_VERSION_STRING)); @@ -800,7 +800,7 @@ void TDEAboutContainer::childEvent( TQChildEvent *e ) ++itr; if( o->isWidgetType() ) { - TQT_TQWIDGET(o)->setMinimumWidth( s.width() ); + static_cast<TQWidget*>(o)->setMinimumWidth( s.width() ); } } } @@ -826,7 +826,7 @@ TQSize TDEAboutContainer::sizeHint( void ) const if( o->isWidgetType() ) { ++numChild; - TQWidget* const w= TQT_TQWIDGET(o); + TQWidget* const w= static_cast<TQWidget*>(o); TQSize s = w->minimumSize(); if( s.isEmpty() ) @@ -883,10 +883,10 @@ void TDEAboutContainer::addPerson( const TQString &_name, const TQString &_email TDEAboutContributor* const cont = new TDEAboutContributor( this, "pers", _name, _email, _url, _task, showHeader, showFrame, showBold ); - connect( cont, TQT_SIGNAL( openURL(const TQString&)), - this, TQT_SIGNAL( urlClick(const TQString &))); - connect( cont, TQT_SIGNAL( sendEmail(const TQString &, const TQString &)), - this, TQT_SIGNAL( mailClick(const TQString &, const TQString &))); + connect( cont, TQ_SIGNAL( openURL(const TQString&)), + this, TQ_SIGNAL( urlClick(const TQString &))); + connect( cont, TQ_SIGNAL( sendEmail(const TQString &, const TQString &)), + this, TQ_SIGNAL( mailClick(const TQString &, const TQString &))); } @@ -938,7 +938,7 @@ void TDEAboutContainer::addImage( const TQString &fileName, int alignment ) class TDEAboutContributor : public QFrame { // ############################################################################ - Q_OBJECT + TQ_OBJECT // ---------------------------------------------------------------------------- public: /** The Qt constructor. */ @@ -1011,10 +1011,10 @@ TDEAboutContributor::TDEAboutContributor(TQWidget* parent, const char* n) } setFrameStyle(TQFrame::Panel | TQFrame::Raised); // ----- - connect(email, TQT_SIGNAL(leftClickedURL(const TQString&)), - TQT_SLOT(emailClickedSlot(const TQString&))); - connect(url, TQT_SIGNAL(leftClickedURL(const TQString&)), - TQT_SLOT(urlClickedSlot(const TQString&))); + connect(email, TQ_SIGNAL(leftClickedURL(const TQString&)), + TQ_SLOT(emailClickedSlot(const TQString&))); + connect(url, TQ_SIGNAL(leftClickedURL(const TQString&)), + TQ_SLOT(urlClickedSlot(const TQString&))); // ############################################################ } @@ -1026,7 +1026,7 @@ TDEAboutContributor::setName(const TQString& n) // ############################################################ } -QString +TQString TDEAboutContributor::getName() { // ########################################################### @@ -1041,7 +1041,7 @@ TDEAboutContributor::setURL(const TQString& u) // ########################################################### } -QString +TQString TDEAboutContributor::getURL() { // ########################################################### @@ -1057,7 +1057,7 @@ TDEAboutContributor::setEmail(const TQString& e) // ########################################################### } -QString +TQString TDEAboutContributor::getEmail() { // ########################################################### @@ -1328,14 +1328,14 @@ TDEAboutWidget::TDEAboutWidget(TQWidget *_parent, const char *_name) logo->setFrameStyle(TQFrame::Panel | TQFrame::Raised); version->setAlignment(AlignCenter); // ----- - connect(author, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)), - TQT_SLOT(sendEmailSlot(const TQString&, const TQString&))); - connect(author, TQT_SIGNAL(openURL(const TQString&)), - TQT_SLOT(openURLSlot(const TQString&))); - connect(maintainer, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)), - TQT_SLOT(sendEmailSlot(const TQString&, const TQString&))); - connect(maintainer, TQT_SIGNAL(openURL(const TQString&)), - TQT_SLOT(openURLSlot(const TQString&))); + connect(author, TQ_SIGNAL(sendEmail(const TQString&, const TQString&)), + TQ_SLOT(sendEmailSlot(const TQString&, const TQString&))); + connect(author, TQ_SIGNAL(openURL(const TQString&)), + TQ_SLOT(openURLSlot(const TQString&))); + connect(maintainer, TQ_SIGNAL(sendEmail(const TQString&, const TQString&)), + TQ_SLOT(sendEmailSlot(const TQString&, const TQString&))); + connect(maintainer, TQ_SIGNAL(openURL(const TQString&)), + TQ_SLOT(openURLSlot(const TQString&))); // ################################################################# } @@ -1439,9 +1439,9 @@ TDEAboutWidget::addContributor(const TQString &_name, const TQString &_email, c->setURL(_url); c->setWork(_w); contributors.append(c); - connect(c, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)), - TQT_SLOT(sendEmailSlot(const TQString&, const TQString&))); - connect(c, TQT_SIGNAL(openURL(const TQString&)), TQT_SLOT(openURLSlot(const TQString&))); + connect(c, TQ_SIGNAL(sendEmail(const TQString&, const TQString&)), + TQ_SLOT(sendEmailSlot(const TQString&, const TQString&))); + connect(c, TQ_SIGNAL(openURL(const TQString&)), TQ_SLOT(openURLSlot(const TQString&))); // ############################################################################ } @@ -1515,10 +1515,10 @@ TDEAboutDialog::TDEAboutDialog(TQWidget *_parent, const char *_name, bool modal) tqApp->quit(); } setMainWidget(about); - connect(about, TQT_SIGNAL(sendEmail(const TQString&, const TQString&)), - TQT_SLOT(sendEmailSlot(const TQString&, const TQString&))); - connect(about, TQT_SIGNAL(openURL(const TQString&)), - TQT_SLOT(openURLSlot(const TQString&))); + connect(about, TQ_SIGNAL(sendEmail(const TQString&, const TQString&)), + TQ_SLOT(sendEmailSlot(const TQString&, const TQString&))); + connect(about, TQ_SIGNAL(openURL(const TQString&)), + TQ_SLOT(openURLSlot(const TQString&))); // ################################################################# } @@ -1537,12 +1537,12 @@ TDEAboutDialog::TDEAboutDialog( int layoutType, const TQString &_caption, mContainerBase = new TDEAboutContainerBase( layoutType, this ); setMainWidget(mContainerBase); - connect( mContainerBase, TQT_SIGNAL(urlClick(const TQString &)), - this, TQT_SLOT(openURLSlot(const TQString &))); - connect( mContainerBase, TQT_SIGNAL(mailClick(const TQString &,const TQString &)), - this, TQT_SLOT(sendEmailSlot(const TQString &,const TQString &))); - connect( mContainerBase, TQT_SIGNAL(mouseTrack(int, const TQMouseEvent *)), - this, TQT_SLOT(mouseTrackSlot(int, const TQMouseEvent *))); + connect( mContainerBase, TQ_SIGNAL(urlClick(const TQString &)), + this, TQ_SLOT(openURLSlot(const TQString &))); + connect( mContainerBase, TQ_SIGNAL(mailClick(const TQString &,const TQString &)), + this, TQ_SLOT(sendEmailSlot(const TQString &,const TQString &))); + connect( mContainerBase, TQ_SIGNAL(mouseTrack(int, const TQMouseEvent *)), + this, TQ_SLOT(mouseTrackSlot(int, const TQMouseEvent *))); } @@ -1615,8 +1615,8 @@ void TDEAboutDialog::setVersion(const TQString &_name) void TDEAboutDialog::sendEmailSlot(const TQString& /*name*/, const TQString& email) { - if ( kapp ) - kapp->invokeMailer( email, TQString::null ); + if ( tdeApp ) + tdeApp->invokeMailer( email, TQString::null ); /* kdDebug() << "TDEAboutDialog::sendEmailSlot: request to send an email to " << name << ", " << email << endl; @@ -1626,8 +1626,8 @@ void TDEAboutDialog::sendEmailSlot(const TQString& /*name*/, const TQString& ema void TDEAboutDialog::openURLSlot(const TQString& url) { - if ( kapp ) - kapp->invokeBrowser( url ); + if ( tdeApp ) + tdeApp->invokeBrowser( url ); //kdDebug() << "TDEAboutDialog::openURLSlot: request to open URL " << url << endl; //emit(openURL(url)); } diff --git a/tdeui/tdeaboutdialog.h b/tdeui/tdeaboutdialog.h index 0ebb89174..3e80bb11d 100644 --- a/tdeui/tdeaboutdialog.h +++ b/tdeui/tdeaboutdialog.h @@ -49,7 +49,7 @@ class TDEAboutContainerPrivate; */ class TDEUI_EXPORT TDEAboutContainer : public TQFrame { - Q_OBJECT + TQ_OBJECT public: TDEAboutContainer( TQWidget *parent=0, const char *name=0, @@ -91,7 +91,7 @@ class TDEAboutContributorPrivate; */ class TDEUI_EXPORT TDEAboutContributor : public TQFrame { - Q_OBJECT + TQ_OBJECT public: TDEAboutContributor( TQWidget *parent=0, const char *name=0, @@ -149,7 +149,7 @@ class TDEUI_EXPORT TDEAboutContributor : public TQFrame */ class TDEUI_EXPORT TDEAboutWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: @@ -282,7 +282,7 @@ class TDEAboutDialogPrivate; */ class TDEUI_EXPORT TDEAboutDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** @@ -402,7 +402,7 @@ class TDEUI_EXPORT TDEAboutDialog : public KDialogBase * * @since 3.3 */ - void setIcon( const TQString &fileName ) KDE_DEPRECATED; // KDE4: remove + void setIcon( const TQString &fileName ) TDE_DEPRECATED; // KDE4: remove /** * Overloaded version of setProgramLogo(const TQPixmap& pixmap). diff --git a/tdeui/tdeabouttde.cpp b/tdeui/tdeabouttde.cpp index 64d9fa95b..4fa0e381f 100644 --- a/tdeui/tdeabouttde.cpp +++ b/tdeui/tdeabouttde.cpp @@ -23,7 +23,7 @@ #include <tdeabouttde.h> #include <tdeapplication.h> #include <tdelocale.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> TDEAboutKDE::TDEAboutKDE( TQWidget *parent, const char *name, bool modal ) @@ -85,7 +85,7 @@ TDEAboutKDE::TDEAboutKDE( TQWidget *parent, const char *name, bool modal ) setHelp( TQString::fromLatin1("khelpcenter/main.html"), TQString::null ); setTitle(i18n("Trinity Desktop Environment. Release %1"). arg(TQString::fromLatin1(TDE_VERSION_STRING)) ); - addTextPage( i18n("About Trinity","&About"), text1, true ); + addTextPage( i18n("About TDE","&About"), text1, true ); addTextPage( i18n("&Report Bugs/Request Enhancements"), text2, true ); addTextPage( i18n("&Join the Trinity Team"), text3, true ); addTextPage( i18n("&Support Trinity"), text4, true ); diff --git a/tdeui/tdeaction.cpp b/tdeui/tdeaction.cpp index 63f633d95..bd6f6d83d 100644 --- a/tdeui/tdeaction.cpp +++ b/tdeui/tdeaction.cpp @@ -256,13 +256,13 @@ void TDEAction::initPrivate( const TQString& text, const TDEShortcut& cut, { d->m_cutDefault = cut; - m_parentCollection = tqt_dynamic_cast<TDEActionCollection *>( parent() ); + m_parentCollection = dynamic_cast<TDEActionCollection *>( parent() ); kdDebug(129) << "TDEAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; if ( m_parentCollection ) m_parentCollection->insert( this ); if ( receiver && slot ) - connect( this, TQT_SIGNAL( activated() ), receiver, slot ); + connect( this, TQ_SIGNAL( activated() ), receiver, slot ); if( !cut.isNull() && !qstrcmp( name(), "unnamed" ) ) kdWarning(129) << "TDEAction::initPrivate(): trying to assign a shortcut (" << cut.toStringInternal() << ") to an unnamed action." << endl; @@ -452,7 +452,7 @@ bool TDEAction::setShortcut( const TDEShortcut& cut ) bool TDEAction::updateTDEAccelShortcut( TDEAccel* tdeaccel ) { // Check if action is permitted - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return false; bool b = true; @@ -462,7 +462,7 @@ bool TDEAction::updateTDEAccelShortcut( TDEAccel* tdeaccel ) kdDebug(129) << "Inserting " << name() << ", " << d->text() << ", " << d->plainText() << endl; b = tdeaccel->insert( name(), d->plainText(), TQString::null, d->m_cut, - this, TQT_SLOT(slotActivated()), + this, TQ_SLOT(slotActivated()), isShortcutConfigurable(), isEnabled() ); } } @@ -478,7 +478,7 @@ void TDEAction::insertTDEAccel( TDEAccel* tdeaccel ) if ( !tdeaccel->actions().actionPtr( name() ) ) { if( updateTDEAccelShortcut( tdeaccel ) ) { d->m_tdeaccelList.append( tdeaccel ); - connect( tdeaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); + connect( tdeaccel, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotDestroyed()) ); } } else @@ -496,7 +496,7 @@ void TDEAction::removeTDEAccel( TDEAccel* tdeaccel ) if( (*itr) == tdeaccel ) { tdeaccel->remove( name() ); accelList.remove( itr ); - disconnect( tdeaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); + disconnect( tdeaccel, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotDestroyed()) ); break; } } @@ -515,11 +515,11 @@ void TDEAction::updateShortcut( int i ) int id = itemId( i ); TQWidget* w = container( i ); - if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { + if ( ::tqt_cast<TQPopupMenu *>( w ) ) { TQPopupMenu* menu = static_cast<TQPopupMenu*>(w); updateShortcut( menu, id ); } - else if ( ::tqqt_cast<TQMenuBar *>( w ) ) + else if ( ::tqt_cast<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->setAccel( d->m_cut.keyCodeQt(), id ); } @@ -616,7 +616,7 @@ void TDEAction::updateToolTip( int i ) { TQWidget *w = container( i ); - if ( ::tqqt_cast<TDEToolBar *>( w ) ) + if ( ::tqt_cast<TDEToolBar *>( w ) ) TQToolTip::add( static_cast<TDEToolBar*>(w)->getWidget( itemId( i ) ), d->toolTip() ); } @@ -644,12 +644,12 @@ int TDEAction::plug( TQWidget *w, int index ) #endif // Check if action is permitted - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; plugShortcut(); - if ( ::tqqt_cast<TQPopupMenu *>( w ) ) + if ( ::tqt_cast<TQPopupMenu *>( w ) ) { TQPopupMenu* menu = static_cast<TQPopupMenu*>( w ); int id; @@ -664,12 +664,12 @@ int TDEAction::plug( TQWidget *w, int index ) else instance = TDEGlobal::instance(); id = menu->insertItem( d->iconSet( TDEIcon::Small, 0, instance ), d->text(), this,//dsweet - TQT_SLOT( slotPopupActivated() ), keyQt, + TQ_SLOT( slotPopupActivated() ), keyQt, -1, index ); } else id = menu->insertItem( d->text(), this, - TQT_SLOT( slotPopupActivated() ), + TQ_SLOT( slotPopupActivated() ), keyQt, -1, index ); // If the shortcut is already in a TDEAccel object, then @@ -686,14 +686,14 @@ int TDEAction::plug( TQWidget *w, int index ) menu->TQMenuData::setWhatsThis( id, whatsThisWithIcon() ); addContainer( menu, id ); - connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( menu, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); if ( m_parentCollection ) m_parentCollection->connectHighlight( menu, this ); return d->m_containers.count() - 1; } - else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + else if ( ::tqt_cast<TDEToolBar *>( w ) ) { TDEToolBar *bar = static_cast<TDEToolBar *>( w ); @@ -706,8 +706,8 @@ int TDEAction::plug( TQWidget *w, int index ) if ( icon().isEmpty() && !iconSet().pixmap().isNull() ) // old code using TQIconSet directly { - bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, - TQT_SLOT( slotButtonClicked(int, TQt::ButtonState) ), + bar->insertButton( iconSet().pixmap(), id_, TQ_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, + TQ_SLOT( slotButtonClicked(int, TQt::ButtonState) ), d->isEnabled(), d->plainText(), index ); } else @@ -715,8 +715,8 @@ int TDEAction::plug( TQWidget *w, int index ) TQString icon = d->iconName(); if ( icon.isEmpty() ) icon = "unknown"; - bar->insertButton( icon, id_, TQT_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, - TQT_SLOT( slotButtonClicked(int, TQt::ButtonState) ), + bar->insertButton( icon, id_, TQ_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, + TQ_SLOT( slotButtonClicked(int, TQt::ButtonState) ), d->isEnabled(), d->plainText(), index, instance ); } @@ -731,7 +731,7 @@ int TDEAction::plug( TQWidget *w, int index ) addContainer( bar, id_ ); - connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( bar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); if ( m_parentCollection ) m_parentCollection->connectHighlight( bar, this ); @@ -749,17 +749,17 @@ void TDEAction::unplug( TQWidget *w ) return; int id = itemId( i ); - if ( ::tqqt_cast<TQPopupMenu *>( w ) ) + if ( ::tqt_cast<TQPopupMenu *>( w ) ) { TQPopupMenu *menu = static_cast<TQPopupMenu *>( w ); menu->removeItem( id ); } - else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + else if ( ::tqt_cast<TDEToolBar *>( w ) ) { TDEToolBar *bar = static_cast<TDEToolBar *>( w ); bar->removeItemDelayed( id ); } - else if ( ::tqqt_cast<TQMenuBar *>( w ) ) + else if ( ::tqt_cast<TQMenuBar *>( w ) ) { TQMenuBar *bar = static_cast<TQMenuBar *>( w ); bar->removeItem( id ); @@ -791,10 +791,10 @@ void TDEAction::plugAccel(TDEAccel *kacc, bool configurable) d->m_tdeaccel = kacc; d->m_tdeaccel->insert(name(), d->plainText(), TQString::null, TDEShortcut(d->m_cut), - this, TQT_SLOT(slotActivated()), + this, TQ_SLOT(slotActivated()), configurable, isEnabled()); - connect(d->m_tdeaccel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed())); - //connect(d->m_tdeaccel, TQT_SIGNAL(keycodeChanged()), this, TQT_SLOT(slotKeycodeChanged())); + connect(d->m_tdeaccel, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotDestroyed())); + //connect(d->m_tdeaccel, TQ_SIGNAL(keycodeChanged()), this, TQ_SLOT(slotKeycodeChanged())); } else { @@ -822,7 +822,7 @@ void TDEAction::plugMainWindowAccel( TQWidget *w ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - TDEMainWindow * mw = tqt_dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow + TDEMainWindow * mw = dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow if (mw) plugAccel( mw->accel() ); else @@ -863,11 +863,11 @@ void TDEAction::updateEnabled( int i ) { TQWidget *w = container( i ); - if ( ::tqqt_cast<TQPopupMenu *>( w ) ) + if ( ::tqt_cast<TQPopupMenu *>( w ) ) static_cast<TQPopupMenu*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); - else if ( ::tqqt_cast<TQMenuBar *>( w ) ) + else if ( ::tqt_cast<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); - else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + else if ( ::tqt_cast<TDEToolBar *>( w ) ) static_cast<TDEToolBar*>(w)->setItemEnabled( itemId( i ), d->isEnabled() ); } @@ -909,18 +909,18 @@ void TDEAction::updateText( int i ) { TQWidget *w = container( i ); - if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { + if ( ::tqt_cast<TQPopupMenu *>( w ) ) { int id = itemId( i ); static_cast<TQPopupMenu*>(w)->changeItem( id, d->text() ); if (!d->m_cut.isNull()) updateShortcut( static_cast<TQPopupMenu*>(w), id ); } - else if ( ::tqqt_cast<TQMenuBar *>( w ) ) + else if ( ::tqt_cast<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->changeItem( itemId( i ), d->text() ); - else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + else if ( ::tqt_cast<TDEToolBar *>( w ) ) { TQWidget *button = static_cast<TDEToolBar *>(w)->getWidget( itemId( i ) ); - if ( ::tqqt_cast<TDEToolBarButton *>( button ) ) + if ( ::tqt_cast<TDEToolBarButton *>( button ) ) static_cast<TDEToolBarButton *>(button)->setText( d->plainText() ); } } @@ -949,15 +949,15 @@ void TDEAction::updateIcon( int id ) { TQWidget* w = container( id ); - if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { + if ( ::tqt_cast<TQPopupMenu *>( w ) ) { int itemId_ = itemId( id ); static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet( TDEIcon::Small ), d->text() ); if (!d->m_cut.isNull()) updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ ); } - else if ( ::tqqt_cast<TQMenuBar *>( w ) ) + else if ( ::tqt_cast<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet( TDEIcon::Small ), d->text() ); - else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + else if ( ::tqt_cast<TDEToolBar *>( w ) ) static_cast<TDEToolBar *>(w)->setButtonIcon( itemId( id ), d->iconName() ); } @@ -980,16 +980,16 @@ void TDEAction::updateIconSet( int id ) { TQWidget *w = container( id ); - if ( ::tqqt_cast<TQPopupMenu *>( w ) ) + if ( ::tqt_cast<TQPopupMenu *>( w ) ) { int itemId_ = itemId( id ); static_cast<TQPopupMenu*>(w)->changeItem( itemId_, d->iconSet(), d->text() ); if (!d->m_cut.isNull()) updateShortcut( static_cast<TQPopupMenu*>(w), itemId_ ); } - else if ( ::tqqt_cast<TQMenuBar *>( w ) ) + else if ( ::tqt_cast<TQMenuBar *>( w ) ) static_cast<TQMenuBar*>(w)->changeItem( itemId( id ), d->iconSet(), d->text() ); - else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + else if ( ::tqt_cast<TDEToolBar *>( w ) ) { if ( icon().isEmpty() && d->hasIcon() ) // only if there is no named icon ( scales better ) static_cast<TDEToolBar *>(w)->setButtonIconSet( itemId( id ), d->iconSet() ); @@ -1057,12 +1057,12 @@ TQWidget* TDEAction::container( int index ) const TDEToolBar* TDEAction::toolBar( int index ) const { - return tqt_dynamic_cast<TDEToolBar *>( d->m_containers[ index ].m_container ); + return dynamic_cast<TDEToolBar *>( d->m_containers[ index ].m_container ); } TQPopupMenu* TDEAction::popupMenu( int index ) const { - return tqt_dynamic_cast<TQPopupMenu *>( d->m_containers[ index ].m_container ); + return dynamic_cast<TQPopupMenu *>( d->m_containers[ index ].m_container ); } TQWidget* TDEAction::representative( int index ) const @@ -1103,17 +1103,17 @@ void TDEAction::addContainer( TQWidget* c, TQWidget* w ) void TDEAction::activate() { - emit activated( TDEAction::EmulatedActivation, Qt::NoButton ); + emit activated( TDEAction::EmulatedActivation, TQt::NoButton ); slotActivated(); } void TDEAction::slotActivated() { - const TQObject *senderObj = TQT_TQOBJECT_CONST(sender()); + const TQObject *senderObj = sender(); if ( senderObj ) { - if ( ::tqqt_cast<TDEAccelPrivate *>( senderObj ) ) - emit activated( TDEAction::AccelActivation, Qt::NoButton ); + if ( ::tqt_cast<TDEAccelPrivate *>( senderObj ) ) + emit activated( TDEAction::AccelActivation, TQt::NoButton ); } emit activated(); } @@ -1124,16 +1124,16 @@ void TDEAction::slotActivated() // only called by QPopupMenus, we plugged us in. void TDEAction::slotPopupActivated() { - if( ::tqqt_cast<TQSignal *>(sender())) + if( ::tqt_cast<TQSignal *>(sender())) { - int id = tqt_dynamic_cast<const TQSignal *>(sender())->value().toInt(); + int id = dynamic_cast<const TQSignal *>(sender())->value().toInt(); int pos = findContainer(id); if(pos != -1) { - TQPopupMenu* qpm = tqt_dynamic_cast<TQPopupMenu *>( container(pos) ); + TQPopupMenu* qpm = dynamic_cast<TQPopupMenu *>( container(pos) ); if(qpm) { - TDEPopupMenu* kpm = tqt_dynamic_cast<TDEPopupMenu *>( qpm ); + TDEPopupMenu* kpm = dynamic_cast<TDEPopupMenu *>( qpm ); TQt::ButtonState state; if ( kpm ) // TDEPopupMenu? Nice, it stores the state. state = kpm->state(); @@ -1149,7 +1149,7 @@ void TDEAction::slotPopupActivated() } kdWarning(129)<<"Don't connect TDEAction::slotPopupActivated() to anything, expect into QPopupMenus which are in containers. Use slotActivated instead."<<endl; - emit activated( TDEAction::PopupMenuActivation, Qt::NoButton ); + emit activated( TDEAction::PopupMenuActivation, TQt::NoButton ); slotActivated(); } @@ -1159,7 +1159,7 @@ void TDEAction::slotButtonClicked( int, TQt::ButtonState state ) emit activated( TDEAction::ToolBarActivation, state ); // RightButton isn't really an activation - if ( ( state & Qt::LeftButton ) || ( state & Qt::MidButton ) ) + if ( ( state & TQt::LeftButton ) || ( state & TQt::MidButton ) ) slotActivated(); } @@ -1167,7 +1167,7 @@ void TDEAction::slotButtonClicked( int, TQt::ButtonState state ) void TDEAction::slotDestroyed() { kdDebug(129) << "TDEAction::slotDestroyed(): this = " << this << ", name = \"" << name() << "\", sender = " << sender() << endl; - const TQObject* const o = TQT_TQOBJECT_CONST(sender()); + const TQObject* const o = sender(); #ifndef KDE_NO_COMPAT // KDE 4: remove if ( o == d->m_tdeaccel ) @@ -1184,7 +1184,7 @@ void TDEAction::slotDestroyed() { if ( o == *itr ) { - disconnect( *itr, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotDestroyed()) ); + disconnect( *itr, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotDestroyed()) ); accelList.remove(itr); return; } @@ -1193,7 +1193,7 @@ void TDEAction::slotDestroyed() int i; do { - i = findContainer( TQT_TQWIDGET_CONST( static_cast<const QObject*>(o) ) ); + i = findContainer( static_cast<const TQWidget*>(o) ); if ( i != -1 ) removeContainer( i ); } while ( i != -1 ); diff --git a/tdeui/tdeaction.h b/tdeui/tdeaction.h index cc803022f..723522d58 100644 --- a/tdeui/tdeaction.h +++ b/tdeui/tdeaction.h @@ -109,12 +109,12 @@ class TDEMainWindow; * * \code * TQSignalMapper *desktopNumberMapper = new TQSignalMapper( this ); - * connect( desktopNumberMapper, TQT_SIGNAL( mapped( int ) ), - * this, TQT_SLOT( moveWindowToDesktop( int ) ) ); + * connect( desktopNumberMapper, TQ_SIGNAL( mapped( int ) ), + * this, TQ_SLOT( moveWindowToDesktop( int ) ) ); * * for ( uint i = 0; i < numberOfDesktops; ++i ) { * TDEAction *desktopAction = new TDEAction( i18n( "Move Window to Desktop %i" ).arg( i ), ... ); - * connect( desktopAction, TQT_SIGNAL( activated() ), desktopNumberMapper, TQT_SLOT( map() ) ); + * connect( desktopAction, TQ_SIGNAL( activated() ), desktopNumberMapper, TQ_SLOT( map() ) ); * desktopNumberMapper->setMapping( desktopAction, i ); * } * \endcode @@ -135,7 +135,7 @@ class TDEMainWindow; * \code * TDEAction *newAct = new TDEAction(i18n("&New"), "document-new", * TDEStdAccel::shortcut(TDEStdAccel::New), - * this, TQT_SLOT(fileNew()), + * this, TQ_SLOT(fileNew()), * actionCollection(), "new"); * \endcode * This line creates our action. It says that wherever this action is @@ -202,7 +202,7 @@ class TDEMainWindow; class TDEUI_EXPORT TDEAction : public TQObject { friend class TDEActionCollection; - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int containerCount READ containerCount ) TQ_PROPERTY( TQString plainText READ plainText ) TQ_PROPERTY( TQString text READ text WRITE setText ) @@ -215,7 +215,7 @@ class TDEUI_EXPORT TDEAction : public TQObject public: /** * Constructs an action with text, potential keyboard - * shortcut, and a TQT_SLOT to call when this action is invoked by + * shortcut, and a slot to call when this action is invoked by * the user. * * If you do not want or have a keyboard shortcut, @@ -228,8 +228,8 @@ public: * * @param text The text that will be displayed. * @param cut The corresponding keyboard shortcut. - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -239,7 +239,7 @@ public: /** * Constructs an action with text, icon, potential keyboard - * shortcut, and a TQT_SLOT to call when this action is invoked by + * shortcut, and a slot to call when this action is invoked by * the user. * * If you do not want or have a keyboard shortcut, set the @@ -251,8 +251,8 @@ public: * @param text The text that will be displayed. * @param pix The icon to display. * @param cut The corresponding keyboard shortcut. - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -262,7 +262,7 @@ public: /** * Constructs an action with text, icon, potential keyboard - * shortcut, and a TQT_SLOT to call when this action is invoked by + * shortcut, and a slot to call when this action is invoked by * the user. The icon is loaded on demand later based on where it * is plugged in. * @@ -275,8 +275,8 @@ public: * @param text The text that will be displayed. * @param pix The icon to display. * @param cut The corresponding keyboard shortcut (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -290,8 +290,8 @@ public: * * @param item The KGuiItem with the label and (optional) icon. * @param cut The corresponding keyboard shortcut (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -364,7 +364,7 @@ public: * the TDEAccel configuration dialog (this is somehow deprecated since * there is now a TDEAction key configuration dialog). */ - virtual void plugAccel(TDEAccel *accel, bool configurable = true) KDE_DEPRECATED; + virtual void plugAccel(TDEAccel *accel, bool configurable = true) TDE_DEPRECATED; /** * "Unplug" or remove this action from a given widget. @@ -384,7 +384,7 @@ public: * @deprecated. Complement method to plugAccel(). * Disconnect this action from the TDEAccel. */ - virtual void unplugAccel() KDE_DEPRECATED; + virtual void unplugAccel() TDE_DEPRECATED; /** * returns whether the action is plugged into any container widget or not. @@ -640,7 +640,7 @@ public: * @deprecated. Use shortcut(). * Get the keyboard accelerator associated with this action. */ - int accel() const KDE_DEPRECATED; + int accel() const TDE_DEPRECATED; TQString statusText() const { return toolTip(); } @@ -649,7 +649,7 @@ public: * @deprecated. Use setShortcut(). * Sets the keyboard accelerator associated with this action. */ - void setAccel( int key ) KDE_DEPRECATED; + void setAccel( int key ) TDE_DEPRECATED; /** * @deprecated. Use setToolTip instead (they do the same thing now). diff --git a/tdeui/tdeactionclasses.cpp b/tdeui/tdeactionclasses.cpp index a1e9f28a3..b068477de 100644 --- a/tdeui/tdeactionclasses.cpp +++ b/tdeui/tdeactionclasses.cpp @@ -54,7 +54,7 @@ #include <tdetoolbar.h> #include <tdetoolbarbutton.h> #include <kurl.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kstringhandler.h> class TDEToggleAction::TDEToggleActionPrivate @@ -137,19 +137,19 @@ TDEToggleAction::~TDEToggleAction() int TDEToggleAction::plug( TQWidget* widget, int index ) { - if ( !::tqqt_cast<TQPopupMenu *>( widget ) && !::tqqt_cast<TDEToolBar *>( widget ) ) + if ( !::tqt_cast<TQPopupMenu *>( widget ) && !::tqt_cast<TDEToolBar *>( widget ) ) { kdWarning() << "Can not plug TDEToggleAction in " << widget->className() << endl; return -1; } - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; int _index = TDEAction::plug( widget, index ); if ( _index == -1 ) return _index; - if ( ::tqqt_cast<TDEToolBar *>( widget ) ) { + if ( ::tqt_cast<TDEToolBar *>( widget ) ) { TDEToolBar *bar = static_cast<TDEToolBar *>( widget ); bar->setToggle( itemId( _index ), true ); @@ -180,7 +180,7 @@ void TDEToggleAction::setChecked( bool c ) if ( !list.isEmpty() ) { TQObjectListIt it( list ); for( ; it.current(); ++it ) { - if ( ::tqqt_cast<TDEToggleAction *>( it.current() ) && it.current() != this && + if ( ::tqt_cast<TDEToggleAction *>( it.current() ) && it.current() != this && static_cast<TDEToggleAction*>(it.current())->exclusiveGroup() == exclusiveGroup() ) { TDEToggleAction *a = static_cast<TDEToggleAction*>(it.current()); if( a->isChecked() ) { @@ -197,7 +197,7 @@ void TDEToggleAction::updateChecked( int id ) { TQWidget *w = container( id ); - if ( ::tqqt_cast<TQPopupMenu *>( w ) ) { + if ( ::tqt_cast<TQPopupMenu *>( w ) ) { TQPopupMenu* pm = static_cast<TQPopupMenu*>(w); int itemId_ = itemId( id ); if ( !d->m_checkedGuiItem ) @@ -219,12 +219,12 @@ void TDEToggleAction::updateChecked( int id ) updateShortcut( pm, itemId_ ); } } - else if ( ::tqqt_cast<TQMenuBar *>( w ) ) // not handled in plug... + else if ( ::tqt_cast<TQMenuBar *>( w ) ) // not handled in plug... static_cast<TQMenuBar*>(w)->setItemChecked( itemId( id ), d->m_checked ); - else if ( ::tqqt_cast<TDEToolBar *>( w ) ) + else if ( ::tqt_cast<TDEToolBar *>( w ) ) { TQWidget* r = static_cast<TDEToolBar*>( w )->getButton( itemId( id ) ); - if ( r && ::tqqt_cast<TDEToolBarButton *>( r ) ) { + if ( r && ::tqt_cast<TDEToolBarButton *>( r ) ) { static_cast<TDEToolBar*>( w )->setButton( itemId( id ), d->m_checked ); if ( d->m_checkedGuiItem && d->m_checkedGuiItem->hasIcon() ) { const KGuiItem* gui = d->m_checked ? d->m_checkedGuiItem : &guiItem(); @@ -322,12 +322,12 @@ void TDERadioAction::slotActivated() { if ( isChecked() ) { - const TQObject *senderObj = TQT_TQOBJECT_CONST(sender()); + const TQObject *senderObj = sender(); - if ( !senderObj || !::tqqt_cast<const TDEToolBarButton *>( senderObj ) ) + if ( !senderObj || !::tqt_cast<const TDEToolBarButton *>( senderObj ) ) return; - const_cast<TDEToolBarButton *>( static_cast<const TDEToolBarButton *>( TQT_TQWIDGET_CONST(senderObj) ) )->on( true ); + const_cast<TDEToolBarButton *>( static_cast<const TDEToolBarButton *>( senderObj ) )->on( true ); return; } @@ -507,7 +507,7 @@ void TDESelectAction::setupMenu() const for( uint id = 0; it != d->m_list.end(); ++it, ++id ) { TQString text = *it; if ( !text.isEmpty() ) - d->m_menu->insertItem( d->makeMenuText( text ), this, TQT_SLOT( slotActivated( int ) ), 0, id ); + d->m_menu->insertItem( d->makeMenuText( text ), this, TQ_SLOT( slotActivated( int ) ), 0, id ); else d->m_menu->insertSeparator(); } @@ -537,10 +537,10 @@ void TDESelectAction::changeItem( int id, int index, const TQString& text) return; TQWidget* w = container( id ); - if ( ::tqqt_cast<TDEToolBar *>( w ) ) + if ( ::tqt_cast<TDEToolBar *>( w ) ) { TQWidget* r = (static_cast<TDEToolBar*>( w ))->getWidget( itemId( id ) ); - if ( ::tqqt_cast<TQComboBox *>( r ) ) + if ( ::tqt_cast<TQComboBox *>( r ) ) { TQComboBox *b = static_cast<TQComboBox*>( r ); b->changeItem(text, index ); @@ -587,9 +587,9 @@ void TDESelectAction::updateCurrentItem( int id ) return; TQWidget* w = container( id ); - if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + if ( ::tqt_cast<TDEToolBar *>( w ) ) { TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); - if ( ::tqqt_cast<TQComboBox *>( r ) ) { + if ( ::tqt_cast<TQComboBox *>( r ) ) { TQComboBox *b = static_cast<TQComboBox*>( r ); b->setCurrentItem( d->m_current ); } @@ -604,9 +604,9 @@ int TDESelectAction::comboWidth() const void TDESelectAction::updateComboWidth( int id ) { TQWidget* w = container( id ); - if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + if ( ::tqt_cast<TDEToolBar *>( w ) ) { TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); - if ( ::tqqt_cast<TQComboBox *>( r ) ) { + if ( ::tqt_cast<TQComboBox *>( r ) ) { TQComboBox *cb = static_cast<TQComboBox*>( r ); cb->setMinimumWidth( d->m_comboWidth ); cb->setMaximumWidth( d->m_comboWidth ); @@ -618,9 +618,9 @@ void TDESelectAction::updateItems( int id ) { kdDebug(129) << "TDEAction::updateItems( " << id << ", lst )" << endl; // remove -- ellis TQWidget* w = container( id ); - if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + if ( ::tqt_cast<TDEToolBar *>( w ) ) { TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); - if ( ::tqqt_cast<TQComboBox *>( r ) ) { + if ( ::tqt_cast<TQComboBox *>( r ) ) { TQComboBox *cb = static_cast<TQComboBox*>( r ); cb->clear(); TQStringList lst = comboItems(); @@ -638,10 +638,10 @@ void TDESelectAction::updateItems( int id ) int TDESelectAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; kdDebug(129) << "TDESelectAction::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis - if ( ::tqqt_cast<TQPopupMenu *>( widget) ) + if ( ::tqt_cast<TQPopupMenu *>( widget) ) { // Create the PopupMenu and store it in m_menu (void)popupMenu(); @@ -661,23 +661,23 @@ int TDESelectAction::plug( TQWidget *widget, int index ) menu->TQMenuData::setWhatsThis( id, wth ); addContainer( menu, id ); - connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( menu, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); return containerCount() - 1; } - else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) + else if ( ::tqt_cast<TDEToolBar *>( widget ) ) { TDEToolBar* bar = static_cast<TDEToolBar*>( widget ); int id_ = TDEAction::getToolButtonID(); bar->insertCombo( comboItems(), id_, isEditable(), - TQT_SIGNAL( activated( const TQString & ) ), this, - TQT_SLOT( slotActivated( const TQString & ) ), isEnabled(), + TQ_SIGNAL( activated( const TQString & ) ), this, + TQ_SLOT( slotActivated( const TQString & ) ), isEnabled(), toolTip(), -1, index ); TQComboBox *cb = bar->getCombo( id_ ); if ( cb ) { - if (!isEditable()) cb->setFocusPolicy(TQ_NoFocus); + if (!isEditable()) cb->setFocusPolicy(TQWidget::NoFocus); cb->setMinimumWidth( cb->sizeHint().width() ); if ( d->m_comboWidth > 0 ) { @@ -691,13 +691,13 @@ int TDESelectAction::plug( TQWidget *widget, int index ) addContainer( bar, id_ ); - connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( bar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); updateCurrentItem( containerCount() - 1 ); return containerCount() - 1; } - else if ( ::tqqt_cast<TQMenuBar *>( widget ) ) + else if ( ::tqt_cast<TQMenuBar *>( widget ) ) { // Create the PopupMenu and store it in m_menu (void)popupMenu(); @@ -713,7 +713,7 @@ int TDESelectAction::plug( TQWidget *widget, int index ) menu->TQMenuData::setWhatsThis( id, wth ); addContainer( menu, id ); - connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( menu, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); return containerCount() - 1; } @@ -754,9 +754,9 @@ void TDESelectAction::clear() void TDESelectAction::updateClear( int id ) { TQWidget* w = container( id ); - if ( ::tqqt_cast<TDEToolBar *>( w ) ) { + if ( ::tqt_cast<TDEToolBar *>( w ) ) { TQWidget* r = static_cast<TDEToolBar*>( w )->getWidget( itemId( id ) ); - if ( ::tqqt_cast<TQComboBox *>( r ) ) { + if ( ::tqt_cast<TQComboBox *>( r ) ) { TQComboBox *b = static_cast<TQComboBox*>( r ); b->clear(); } @@ -771,7 +771,7 @@ void TDESelectAction::slotActivated( int id ) setCurrentItem( id ); // Delay this. Especially useful when the slot connected to activated() will re-create // the menu, e.g. in the recent files action. This prevents a crash. - TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( slotActivated() ) ); } void TDESelectAction::slotActivated( const TQString &text ) @@ -793,7 +793,7 @@ void TDESelectAction::slotActivated( const TQString &text ) setCurrentItem( comboItems().findIndex( text ) ); // Delay this. Especially useful when the slot connected to activated() will re-create // the menu, e.g. in the recent files action. This prevents a crash. - TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) ); + TQTimer::singleShot( 0, this, TQ_SLOT( slotActivated() ) ); } void TDESelectAction::slotActivated() @@ -858,7 +858,7 @@ TDEListAction::TDEListAction( const TQString& text, const TDEShortcut& cut, { d = new TDEListActionPrivate; if ( receiver ) - connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); + connect( this, TQ_SIGNAL( activated( int ) ), receiver, slot ); } TDEListAction::TDEListAction( const TQString& text, const TQIconSet& pix, @@ -885,7 +885,7 @@ TDEListAction::TDEListAction( const TQString& text, const TQIconSet& pix, { d = new TDEListActionPrivate; if ( receiver ) - connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); + connect( this, TQ_SIGNAL( activated( int ) ), receiver, slot ); } TDEListAction::TDEListAction( const TQString& text, const TQString& pix, @@ -896,7 +896,7 @@ TDEListAction::TDEListAction( const TQString& text, const TQString& pix, { d = new TDEListActionPrivate; if ( receiver ) - connect( this, TQT_SIGNAL( activated( int ) ), receiver, slot ); + connect( this, TQ_SIGNAL( activated( int ) ), receiver, slot ); } TDEListAction::TDEListAction( TQObject* parent, const char* name ) @@ -970,7 +970,7 @@ TDERecentFilesAction::TDERecentFilesAction( const TQString& text, init(); if ( receiver ) - connect( this, TQT_SIGNAL(urlSelected(const KURL&)), + connect( this, TQ_SIGNAL(urlSelected(const KURL&)), receiver, slot ); } @@ -1015,7 +1015,7 @@ TDERecentFilesAction::TDERecentFilesAction( const TQString& text, init(); if ( receiver ) - connect( this, TQT_SIGNAL(urlSelected(const KURL&)), + connect( this, TQ_SIGNAL(urlSelected(const KURL&)), receiver, slot ); } @@ -1034,7 +1034,7 @@ TDERecentFilesAction::TDERecentFilesAction( const TQString& text, init(); if ( receiver ) - connect( this, TQT_SIGNAL(urlSelected(const KURL&)), + connect( this, TQ_SIGNAL(urlSelected(const KURL&)), receiver, slot ); } @@ -1052,10 +1052,10 @@ void TDERecentFilesAction::init() { TDERecentFilesAction *that = const_cast<TDERecentFilesAction*>(this); that->d->m_popup = new TDEPopupMenu; - connect(d->m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow())); - connect(d->m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int))); - connect( this, TQT_SIGNAL( activated( const TQString& ) ), - this, TQT_SLOT( itemSelected( const TQString& ) ) ); + connect(d->m_popup, TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(menuAboutToShow())); + connect(d->m_popup, TQ_SIGNAL(activated(int)), this, TQ_SLOT(menuItemActivated(int))); + connect( this, TQ_SIGNAL( activated( const TQString& ) ), + this, TQ_SLOT( itemSelected( const TQString& ) ) ); setMenuAccelsEnabled( false ); } @@ -1268,11 +1268,11 @@ void TDERecentFilesAction::menuAboutToShow() int TDERecentFilesAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; // This is very related to TDEActionMenu::plug. // In fact this class could be an interesting base class for TDEActionMenu - if ( ::tqqt_cast<TDEToolBar *>( widget ) ) + if ( ::tqt_cast<TDEToolBar *>( widget ) ) { TDEToolBar *bar = (TDEToolBar *)widget; @@ -1284,13 +1284,13 @@ int TDERecentFilesAction::plug( TQWidget *widget, int index ) else instance = TDEGlobal::instance(); - bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, - TQT_SLOT( slotClicked() ), isEnabled(), plainText(), + bar->insertButton( icon(), id_, TQ_SIGNAL( clicked() ), this, + TQ_SLOT( slotClicked() ), isEnabled(), plainText(), index, instance ); addContainer( bar, id_ ); - connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( bar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); bar->setDelayedPopup( id_, d->m_popup, true); @@ -1524,22 +1524,22 @@ void TDEFontAction::setFont( const TQString &family ) int TDEFontAction::plug( TQWidget *w, int index ) { - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; - if ( ::tqqt_cast<TDEToolBar *>( w ) ) + if ( ::tqt_cast<TDEToolBar *>( w ) ) { TDEToolBar* bar = static_cast<TDEToolBar*>( w ); int id_ = TDEAction::getToolButtonID(); TDEFontCombo *cb = new TDEFontCombo( items(), bar ); - connect( cb, TQT_SIGNAL( activated( const TQString & ) ), - TQT_SLOT( slotActivated( const TQString & ) ) ); + connect( cb, TQ_SIGNAL( activated( const TQString & ) ), + TQ_SLOT( slotActivated( const TQString & ) ) ); cb->setEnabled( isEnabled() ); bar->insertWidget( id_, comboWidth(), cb, index ); cb->setMinimumWidth( cb->sizeHint().width() ); addContainer( bar, id_ ); - connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( bar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); updateCurrentItem( containerCount() - 1 ); @@ -1793,10 +1793,10 @@ void TDEActionMenu::setStickyMenu(bool sticky) { int TDEActionMenu::plug( TQWidget* widget, int index ) { - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; kdDebug(129) << "TDEActionMenu::plug( " << widget << ", " << index << " )" << endl; // remove -- ellis - if ( ::tqqt_cast<TQPopupMenu *>( widget ) ) + if ( ::tqt_cast<TQPopupMenu *>( widget ) ) { TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget ); int id; @@ -1809,22 +1809,22 @@ int TDEActionMenu::plug( TQWidget* widget, int index ) menu->setItemEnabled( id, false ); addContainer( menu, id ); - connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( menu, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); if ( m_parentCollection ) m_parentCollection->connectHighlight( menu, this ); return containerCount() - 1; } - else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) + else if ( ::tqt_cast<TDEToolBar *>( widget ) ) { TDEToolBar *bar = static_cast<TDEToolBar *>( widget ); int id_ = TDEAction::getToolButtonID(); if ( icon().isEmpty() && !iconSet().isNull() ) - bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( clicked() ), this, - TQT_SLOT( slotActivated() ), isEnabled(), plainText(), + bar->insertButton( iconSet().pixmap(), id_, TQ_SIGNAL( clicked() ), this, + TQ_SLOT( slotActivated() ), isEnabled(), plainText(), index ); else { @@ -1835,8 +1835,8 @@ int TDEActionMenu::plug( TQWidget* widget, int index ) else instance = TDEGlobal::instance(); - bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, - TQT_SLOT( slotActivated() ), isEnabled(), plainText(), + bar->insertButton( icon(), id_, TQ_SIGNAL( clicked() ), this, + TQ_SLOT( slotActivated() ), isEnabled(), plainText(), index, instance ); } @@ -1845,7 +1845,7 @@ int TDEActionMenu::plug( TQWidget* widget, int index ) if (!whatsThis().isEmpty()) TQWhatsThis::add( bar->getButton(id_), whatsThis() ); - connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( bar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); if (delayed()) { bar->setDelayedPopup( id_, popupMenu(), stickyMenu() ); @@ -1858,7 +1858,7 @@ int TDEActionMenu::plug( TQWidget* widget, int index ) return containerCount() - 1; } - else if ( ::tqqt_cast<TQMenuBar *>( widget ) ) + else if ( ::tqt_cast<TQMenuBar *>( widget ) ) { TQMenuBar *bar = static_cast<TQMenuBar *>( widget ); @@ -1870,7 +1870,7 @@ int TDEActionMenu::plug( TQWidget* widget, int index ) bar->setItemEnabled( id, false ); addContainer( bar, id ); - connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( bar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); return containerCount() - 1; } @@ -1939,19 +1939,19 @@ void TDEToolBarPopupAction::setStickyMenu(bool sticky) { int TDEToolBarPopupAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; // This is very related to TDEActionMenu::plug. // In fact this class could be an interesting base class for TDEActionMenu - if ( ::tqqt_cast<TDEToolBar *>( widget ) ) + if ( ::tqt_cast<TDEToolBar *>( widget ) ) { TDEToolBar *bar = (TDEToolBar *)widget; int id_ = TDEAction::getToolButtonID(); if ( icon().isEmpty() && !iconSet().isNull() ) { - bar->insertButton( iconSet().pixmap(), id_, TQT_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, - TQT_SLOT( slotButtonClicked(int, TQt::ButtonState) ), + bar->insertButton( iconSet().pixmap(), id_, TQ_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, + TQ_SLOT( slotButtonClicked(int, TQt::ButtonState) ), isEnabled(), plainText(), index ); } else { @@ -1961,15 +1961,15 @@ int TDEToolBarPopupAction::plug( TQWidget *widget, int index ) else instance = TDEGlobal::instance(); - bar->insertButton( icon(), id_, TQT_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, - TQT_SLOT( slotButtonClicked(int, TQt::ButtonState) ), + bar->insertButton( icon(), id_, TQ_SIGNAL( buttonClicked(int, TQt::ButtonState) ), this, + TQ_SLOT( slotButtonClicked(int, TQt::ButtonState) ), isEnabled(), plainText(), index, instance ); } addContainer( bar, id_ ); - connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( bar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); if (delayed()) { bar->setDelayedPopup( id_, popupMenu(), stickyMenu() ); @@ -2018,7 +2018,7 @@ TDEToggleToolBarAction::~TDEToggleToolBarAction() int TDEToggleToolBarAction::plug( TQWidget* w, int index ) { - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; if ( !m_toolBar ) { @@ -2028,7 +2028,7 @@ int TDEToggleToolBarAction::plug( TQWidget* w, int index ) while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store tl = n; - TDEMainWindow * mw = tqt_dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow + TDEMainWindow * mw = dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow if ( mw ) m_toolBar = mw->toolBar( m_toolBarName ); @@ -2036,9 +2036,9 @@ int TDEToggleToolBarAction::plug( TQWidget* w, int index ) if( m_toolBar ) { setChecked( m_toolBar->isVisible() ); - connect( m_toolBar, TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SLOT(setChecked(bool)) ); + connect( m_toolBar, TQ_SIGNAL(visibilityChanged(bool)), this, TQ_SLOT(setChecked(bool)) ); // Also emit toggled when the toolbar's visibility changes (see comment in header) - connect( m_toolBar, TQT_SIGNAL(visibilityChanged(bool)), this, TQT_SIGNAL(toggled(bool)) ); + connect( m_toolBar, TQ_SIGNAL(visibilityChanged(bool)), this, TQ_SIGNAL(toggled(bool)) ); } else { setEnabled( false ); } @@ -2055,7 +2055,7 @@ void TDEToggleToolBarAction::setChecked( bool c ) m_toolBar->hide(); } TQMainWindow* mw = m_toolBar->mainWindow(); - if ( mw && ::tqqt_cast<TDEMainWindow *>( mw ) ) + if ( mw && ::tqt_cast<TDEMainWindow *>( mw ) ) static_cast<TDEMainWindow *>( mw )->setSettingsDirty(); } TDEToggleAction::setChecked( c ); @@ -2103,7 +2103,7 @@ void TDEToggleFullScreenAction::setChecked( bool c ) bool TDEToggleFullScreenAction::eventFilter( TQObject* o, TQEvent* e ) { - if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(window) ) + if( o == window ) if( e->type() == TQEvent::WindowStateChange ) { if( window->isFullScreen() != isChecked()) @@ -2122,7 +2122,7 @@ KWidgetAction::KWidgetAction( TQWidget* widget, , m_widget( widget ) , m_autoSized( false ) { - connect( this, TQT_SIGNAL(enabled(bool)), widget, TQT_SLOT(setEnabled(bool)) ); + connect( this, TQ_SIGNAL(enabled(bool)), widget, TQ_SLOT(setEnabled(bool)) ); } KWidgetAction::~KWidgetAction() @@ -2150,10 +2150,10 @@ void KWidgetAction::setAutoSized( bool autoSized ) int KWidgetAction::plug( TQWidget* w, int index ) { - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; - if ( !::tqqt_cast<TDEToolBar *>( w ) ) { + if ( !::tqt_cast<TDEToolBar *>( w ) ) { kdError() << "KWidgetAction::plug: KWidgetAction must be plugged into TDEToolBar." << endl; return -1; } @@ -2173,8 +2173,8 @@ int KWidgetAction::plug( TQWidget* w, int index ) TQWhatsThis::add( m_widget, whatsThis() ); addContainer( toolBar, id ); - connect( toolBar, TQT_SIGNAL( toolbarDestroyed() ), this, TQT_SLOT( slotToolbarDestroyed() ) ); - connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( toolBar, TQ_SIGNAL( toolbarDestroyed() ), this, TQ_SLOT( slotToolbarDestroyed() ) ); + connect( toolBar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); return containerCount() - 1; } @@ -2187,7 +2187,7 @@ void KWidgetAction::unplug( TQWidget *w ) TDEToolBar* toolBar = (TDEToolBar*)m_widget->parent(); if ( toolBar == w ) { - disconnect( toolBar, TQT_SIGNAL( toolbarDestroyed() ), this, TQT_SLOT( slotToolbarDestroyed() ) ); + disconnect( toolBar, TQ_SIGNAL( toolbarDestroyed() ), this, TQ_SLOT( slotToolbarDestroyed() ) ); m_widget->reparent( 0L, TQPoint(), false /*showIt*/ ); } TDEAction::unplug( w ); @@ -2217,18 +2217,18 @@ TDEActionSeparator::~TDEActionSeparator() int TDEActionSeparator::plug( TQWidget *widget, int index ) { - if ( ::tqqt_cast<TQPopupMenu *>( widget) ) + if ( ::tqt_cast<TQPopupMenu *>( widget) ) { TQPopupMenu* menu = static_cast<TQPopupMenu*>( widget ); int id = menu->insertSeparator( index ); addContainer( menu, id ); - connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( menu, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); return containerCount() - 1; } - else if ( ::tqqt_cast<TQMenuBar *>( widget ) ) + else if ( ::tqt_cast<TQMenuBar *>( widget ) ) { TQMenuBar *menuBar = static_cast<TQMenuBar *>( widget ); @@ -2236,11 +2236,11 @@ int TDEActionSeparator::plug( TQWidget *widget, int index ) addContainer( menuBar, id ); - connect( menuBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( menuBar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); return containerCount() - 1; } - else if ( ::tqqt_cast<TDEToolBar *>( widget ) ) + else if ( ::tqt_cast<TDEToolBar *>( widget ) ) { TDEToolBar *toolBar = static_cast<TDEToolBar *>( widget ); @@ -2248,7 +2248,7 @@ int TDEActionSeparator::plug( TQWidget *widget, int index ) addContainer( toolBar, id ); - connect( toolBar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( toolBar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); return containerCount() - 1; } @@ -2265,8 +2265,8 @@ TDEPasteTextAction::TDEPasteTextAction( const TQString& text, : TDEAction( text, icon, cut, receiver, slot, parent, name ) { m_popup = new TDEPopupMenu; - connect(m_popup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(menuAboutToShow())); - connect(m_popup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuItemActivated(int))); + connect(m_popup, TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(menuAboutToShow())); + connect(m_popup, TQ_SIGNAL(activated(int)), this, TQ_SLOT(menuItemActivated(int))); m_popup->setCheckable(true); m_mixedMode = true; } @@ -2283,9 +2283,9 @@ void TDEPasteTextAction::setMixedMode(bool mode) int TDEPasteTextAction::plug( TQWidget *widget, int index ) { - if (kapp && !kapp->authorizeTDEAction(name())) + if (tdeApp && !tdeApp->authorizeTDEAction(name())) return -1; - if ( ::tqqt_cast<TDEToolBar *>( widget ) ) + if ( ::tqt_cast<TDEToolBar *>( widget ) ) { TDEToolBar *bar = (TDEToolBar *)widget; @@ -2297,13 +2297,13 @@ int TDEPasteTextAction::plug( TQWidget *widget, int index ) else instance = TDEGlobal::instance(); - bar->insertButton( icon(), id_, TQT_SIGNAL( clicked() ), this, - TQT_SLOT( slotActivated() ), isEnabled(), plainText(), + bar->insertButton( icon(), id_, TQ_SIGNAL( clicked() ), this, + TQ_SLOT( slotActivated() ), isEnabled(), plainText(), index, instance ); addContainer( bar, id_ ); - connect( bar, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); + connect( bar, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( slotDestroyed() ) ); bar->setDelayedPopup( id_, m_popup, true ); @@ -2320,7 +2320,7 @@ void TDEPasteTextAction::menuAboutToShow() { m_popup->clear(); TQStringList list; - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); if (client->isAttached() && client->isApplicationRegistered("klipper")) { DCOPRef klipper("klipper","klipper"); DCOPReply reply = klipper.call("getClipboardHistoryMenu"); @@ -2346,7 +2346,7 @@ void TDEPasteTextAction::menuAboutToShow() void TDEPasteTextAction::menuItemActivated( int id) { - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); if (client->isAttached() && client->isApplicationRegistered("klipper")) { DCOPRef klipper("klipper","klipper"); DCOPReply reply = klipper.call("getClipboardHistoryItem(int)", m_popup->indexOf(id)); @@ -2357,7 +2357,7 @@ void TDEPasteTextAction::menuItemActivated( int id) if (reply.isValid()) kdDebug(129) << "Clipboard: " << TQString(tqApp->clipboard()->text(TQClipboard::Clipboard)) << endl; } - TQTimer::singleShot(20, this, TQT_SLOT(slotActivated())); + TQTimer::singleShot(20, this, TQ_SLOT(slotActivated())); } void TDEPasteTextAction::slotActivated() diff --git a/tdeui/tdeactionclasses.h b/tdeui/tdeactionclasses.h index 86594f179..52d155710 100644 --- a/tdeui/tdeactionclasses.h +++ b/tdeui/tdeactionclasses.h @@ -67,7 +67,7 @@ class TDEMainWindow; */ class TDEUI_EXPORT TDEToggleAction : public TDEAction { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool checked READ isChecked WRITE setChecked ) TQ_PROPERTY( TQString exclusiveGroup READ exclusiveGroup WRITE setExclusiveGroup ) @@ -88,8 +88,8 @@ public: /** * @param text The text that will be displayed. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -120,8 +120,8 @@ public: * @param text The text that will be displayed. * @param pix The icons that go with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -132,8 +132,8 @@ public: * @param text The text that will be displayed. * @param pix The dynamically loaded icon that goes with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -230,7 +230,7 @@ private: */ class TDEUI_EXPORT TDERadioAction : public TDEToggleAction { - Q_OBJECT + TQ_OBJECT public: /** @@ -248,8 +248,8 @@ public: /** * @param text The text that will be displayed. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -280,8 +280,8 @@ public: * @param text The text that will be displayed. * @param pix The icons that go with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -292,8 +292,8 @@ public: * @param text The text that will be displayed. * @param pix The dynamically loaded icon that goes with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -330,7 +330,7 @@ private: */ class TDEUI_EXPORT TDESelectAction : public TDEAction { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int currentItem READ currentItem WRITE setCurrentItem ) TQ_PROPERTY( TQStringList items READ items WRITE setItems ) @@ -355,8 +355,8 @@ public: /** * @param text The text that will be displayed. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -387,8 +387,8 @@ public: * @param text The text that will be displayed. * @param pix The icons that go with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -399,8 +399,8 @@ public: * @param text The text that will be displayed. * @param pix The dynamically loaded icon that goes with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -483,7 +483,7 @@ public: * @deprecated See setMenuAccelsEnabled . * @since 3.1 */ - void setRemoveAmpersandsInCombo( bool b ) KDE_DEPRECATED; + void setRemoveAmpersandsInCombo( bool b ) TDE_DEPRECATED; /// @since 3.1 bool removeAmpersandsInCombo() const; @@ -583,7 +583,7 @@ private: */ class TDEUI_EXPORT_DEPRECATED TDEListAction : public TDESelectAction { - Q_OBJECT + TQ_OBJECT public: /** @@ -602,8 +602,8 @@ public: /** * @param text The text that will be displayed. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -634,8 +634,8 @@ public: * @param text The text that will be displayed. * @param pix The icons that go with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -647,8 +647,8 @@ public: * @param text The text that will be displayed. * @param pix The dynamically loaded icon that goes with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -699,7 +699,7 @@ private: */ class TDEUI_EXPORT TDERecentFilesAction : public TDEListAction // TODO public TDESelectAction { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( uint maxItems READ maxItems WRITE setMaxItems ) public: @@ -717,8 +717,8 @@ public: /** * @param text The text that will be displayed. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke when a URL is selected. + * @param receiver The slot's parent. + * @param slot The slot to invoke when a URL is selected. * Its signature is of the form slotURLSelected( const KURL & ). * @param parent This action's parent. * @param name An internal name for this action. @@ -757,8 +757,8 @@ public: * @param text The text that will be displayed. * @param pix The icons that go with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke when a URL is selected. + * @param receiver The slot's parent. + * @param slot The slot to invoke when a URL is selected. * Its signature is of the form slotURLSelected( const KURL & ). * @param parent This action's parent. * @param name An internal name for this action. @@ -773,8 +773,8 @@ public: * @param text The text that will be displayed. * @param pix The dynamically loaded icon that goes with this action. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke when a URL is selected. + * @param receiver The slot's parent. + * @param slot The slot to invoke when a URL is selected. * Its signature is of the form slotURLSelected( const KURL & ). * @param parent This action's parent. * @param name An internal name for this action. @@ -909,7 +909,7 @@ private: class TDEUI_EXPORT TDEFontAction : public TDESelectAction { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQString font READ font WRITE setFont ) public: @@ -960,7 +960,7 @@ private: class TDEUI_EXPORT TDEFontSizeAction : public TDESelectAction { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int fontSize READ fontSize WRITE setFontSize ) public: @@ -1019,7 +1019,7 @@ private: */ class TDEUI_EXPORT TDEActionMenu : public TDEAction { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool delayed READ delayed WRITE setDelayed ) TQ_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu ) @@ -1093,7 +1093,7 @@ private: */ class TDEUI_EXPORT TDEToolBarPopupAction : public TDEAction { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool delayed READ delayed WRITE setDelayed ) TQ_PROPERTY( bool stickyMenu READ stickyMenu WRITE setStickyMenu ) @@ -1124,8 +1124,8 @@ public: * @param text The text that will be displayed. * @param icon The icon to display. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's owner. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's owner. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -1143,8 +1143,8 @@ public: * * @param item The text and icon that will be displayed. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's owner. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's owner. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -1216,7 +1216,7 @@ private: */ class TDEUI_EXPORT TDEToggleToolBarAction : public TDEToggleAction { - Q_OBJECT + TQ_OBJECT public: /** @@ -1263,14 +1263,14 @@ private: */ class TDEUI_EXPORT TDEToggleFullScreenAction : public TDEToggleAction { - Q_OBJECT + TQ_OBJECT public: /** * Create a TDEToggleFullScreenAction * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param window the window that will switch to/from full screen mode * @param name An internal name for this action. @@ -1308,7 +1308,7 @@ private: */ class TDEUI_EXPORT KWidgetAction : public TDEAction { - Q_OBJECT + TQ_OBJECT public: /** @@ -1353,7 +1353,7 @@ private: class TDEUI_EXPORT TDEActionSeparator : public TDEAction { - Q_OBJECT + TQ_OBJECT public: TDEActionSeparator( TQObject* parent = 0, const char* name = 0 ); @@ -1380,7 +1380,7 @@ private: */ class TDEUI_EXPORT TDEPasteTextAction: public TDEAction { - Q_OBJECT + TQ_OBJECT public: /** @@ -1393,8 +1393,8 @@ public: * @param text The text that will be displayed. * @param icon The icon to display. * @param cut The corresponding keyboard accelerator (shortcut). - * @param receiver The SLOT's owner. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's owner. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ diff --git a/tdeui/tdeactioncollection.cpp b/tdeui/tdeactioncollection.cpp index 98e8264b6..7f4fe0191 100644 --- a/tdeui/tdeactioncollection.cpp +++ b/tdeui/tdeactioncollection.cpp @@ -110,7 +110,7 @@ TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, kdWarning(129) << "TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis kdDebug(129) << kdBacktrace() << endl; d = new TDEActionCollectionPrivate; - TQWidget* w = tqt_dynamic_cast<TQWidget*>( parent ); + TQWidget* w = dynamic_cast<TQWidget*>( parent ); if( w ) setWidget( w ); //d->m_bOneTDEAccelOnly = (d->m_tdeaccelList.count() > 0); @@ -501,21 +501,21 @@ void TDEActionCollection::connectHighlight( TQWidget *container, TDEAction *acti { actionList = new TQPtrList<TDEAction>; - if ( ::tqqt_cast<TQPopupMenu *>( container ) ) + if ( ::tqt_cast<TQPopupMenu *>( container ) ) { - connect( container, TQT_SIGNAL( highlighted( int ) ), - this, TQT_SLOT( slotMenuItemHighlighted( int ) ) ); - connect( container, TQT_SIGNAL( aboutToHide() ), - this, TQT_SLOT( slotMenuAboutToHide() ) ); + connect( container, TQ_SIGNAL( highlighted( int ) ), + this, TQ_SLOT( slotMenuItemHighlighted( int ) ) ); + connect( container, TQ_SIGNAL( aboutToHide() ), + this, TQ_SLOT( slotMenuAboutToHide() ) ); } - else if ( ::tqqt_cast<TDEToolBar *>( container ) ) + else if ( ::tqt_cast<TDEToolBar *>( container ) ) { - connect( container, TQT_SIGNAL( highlighted( int, bool ) ), - this, TQT_SLOT( slotToolBarButtonHighlighted( int, bool ) ) ); + connect( container, TQ_SIGNAL( highlighted( int, bool ) ), + this, TQ_SLOT( slotToolBarButtonHighlighted( int, bool ) ) ); } - connect( container, TQT_SIGNAL( destroyed() ), - this, TQT_SLOT( slotDestroyed() ) ); + connect( container, TQ_SIGNAL( destroyed() ), + this, TQ_SLOT( slotDestroyed() ) ); d->m_dctHighlightContainers.insert( container, actionList ); } @@ -547,7 +547,7 @@ void TDEActionCollection::slotMenuItemHighlighted( int id ) if ( d->m_currentHighlightAction ) emit actionHighlighted( d->m_currentHighlightAction, false ); - TQWidget *container = const_cast<TQWidget*>(TQT_TQWIDGET_CONST( sender() )); + TQWidget *container = static_cast<TQWidget *>( const_cast<TQObject *>( sender() )); d->m_currentHighlightAction = findAction( container, id ); @@ -581,7 +581,7 @@ void TDEActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) if ( !d->m_highlight ) return; - TQWidget *container = const_cast<TQWidget*>(TQT_TQWIDGET_CONST( sender() )); + TQWidget *container = static_cast<TQWidget *>( const_cast<TQObject *>( sender() )); TDEAction *action = findAction( container, id ); @@ -606,7 +606,7 @@ void TDEActionCollection::slotToolBarButtonHighlighted( int id, bool highlight ) void TDEActionCollection::slotDestroyed() { - d->m_dctHighlightContainers.remove( reinterpret_cast<void *>( const_cast<TQObject*>(TQT_TQOBJECT_CONST(sender())) ) ); + d->m_dctHighlightContainers.remove( reinterpret_cast<void *>( const_cast<TQObject*>(sender()) ) ); } TDEAction *TDEActionCollection::findAction( TQWidget *container, int id ) diff --git a/tdeui/tdeactioncollection.h b/tdeui/tdeactioncollection.h index ae6fd6575..a2b3758b8 100644 --- a/tdeui/tdeactioncollection.h +++ b/tdeui/tdeactioncollection.h @@ -69,10 +69,10 @@ typedef TQValueList<TDEAction *> TDEActionPtrList; * * \code * actionCollection()->setHighlightingEnabled(true); - * connect(actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ), - * statusBar(), TQT_SLOT( message( const TQString & ) ) ); - * connect(actionCollection(), TQT_SIGNAL( clearStatusText() ), - * statusBar(), TQT_SLOT( clear() ) ); + * connect(actionCollection(), TQ_SIGNAL( actionStatusText( const TQString & ) ), + * statusBar(), TQ_SLOT( message( const TQString & ) ) ); + * connect(actionCollection(), TQ_SIGNAL( clearStatusText() ), + * statusBar(), TQ_SLOT( clear() ) ); * \endcode */ class TDEUI_EXPORT TDEActionCollection : public TQObject @@ -80,7 +80,7 @@ class TDEUI_EXPORT TDEActionCollection : public TQObject friend class TDEAction; friend class KXMLGUIClient; - Q_OBJECT + TQ_OBJECT public: TDEActionCollection( TQWidget *parent, const char *name = 0, TDEInstance *instance = 0 ); @@ -143,9 +143,9 @@ public: //bool ownsTDEAccel() const; /** @deprecated Deprecated because of ambiguous name. Use tdeaccel() */ - virtual TDEAccel* accel() KDE_DEPRECATED; + virtual TDEAccel* accel() TDE_DEPRECATED; /** @deprecated Deprecated because of ambiguous name. Use tdeaccel() */ - virtual const TDEAccel* accel() const KDE_DEPRECATED; + virtual const TDEAccel* accel() const TDE_DEPRECATED; /** Returns the TDEAccel object of the most recently set widget. */ TDEAccel* tdeaccel(); diff --git a/tdeui/tdeactionselector.cpp b/tdeui/tdeactionselector.cpp index 9583775c4..4ac8ac71d 100644 --- a/tdeui/tdeactionselector.cpp +++ b/tdeui/tdeactionselector.cpp @@ -99,18 +99,18 @@ TDEActionSelector::TDEActionSelector( TQWidget *parent, const char *name ) loadIcons(); - connect( d->btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonAddClicked()) ); - connect( d->btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonRemoveClicked()) ); - connect( d->btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonUpClicked()) ); - connect( d->btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonDownClicked()) ); - connect( d->availableListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), - this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) ); - connect( d->selectedListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), - this, TQT_SLOT(itemDoubleClicked(TQListBoxItem*)) ); - connect( d->availableListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)), - this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) ); - connect( d->selectedListBox, TQT_SIGNAL(currentChanged(TQListBoxItem*)), - this, TQT_SLOT(slotCurrentChanged(TQListBoxItem *)) ); + connect( d->btnAdd, TQ_SIGNAL(clicked()), this, TQ_SLOT(buttonAddClicked()) ); + connect( d->btnRemove, TQ_SIGNAL(clicked()), this, TQ_SLOT(buttonRemoveClicked()) ); + connect( d->btnUp, TQ_SIGNAL(clicked()), this, TQ_SLOT(buttonUpClicked()) ); + connect( d->btnDown, TQ_SIGNAL(clicked()), this, TQ_SLOT(buttonDownClicked()) ); + connect( d->availableListBox, TQ_SIGNAL(doubleClicked(TQListBoxItem*)), + this, TQ_SLOT(itemDoubleClicked(TQListBoxItem*)) ); + connect( d->selectedListBox, TQ_SIGNAL(doubleClicked(TQListBoxItem*)), + this, TQ_SLOT(itemDoubleClicked(TQListBoxItem*)) ); + connect( d->availableListBox, TQ_SIGNAL(currentChanged(TQListBoxItem*)), + this, TQ_SLOT(slotCurrentChanged(TQListBoxItem *)) ); + connect( d->selectedListBox, TQ_SIGNAL(currentChanged(TQListBoxItem*)), + this, TQ_SLOT(slotCurrentChanged(TQListBoxItem *)) ); d->availableListBox->installEventFilter( this ); d->selectedListBox->installEventFilter( this ); @@ -392,7 +392,7 @@ bool TDEActionSelector::eventFilter( TQObject *o, TQEvent *e ) } return true; } - else if ( o->inherits( TQLISTBOX_OBJECT_NAME_STRING ) ) + else if ( o->inherits( "TQListBox" ) ) { switch ( ((TQKeyEvent*)e)->key() ) { diff --git a/tdeui/tdeactionselector.h b/tdeui/tdeactionselector.h index 6aeaac3d8..d9ee62873 100644 --- a/tdeui/tdeactionselector.h +++ b/tdeui/tdeactionselector.h @@ -77,7 +77,7 @@ class TDEActionSelectorPrivate; */ class TDEUI_EXPORT TDEActionSelector : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_ENUMS( ButtonIconSize InsertionPolicy ) TQ_PROPERTY( bool moveOnDoubleClick READ moveOnDoubleClick WRITE setMoveOnDoubleClick ) TQ_PROPERTY( bool keyboardEnabled READ keyboardEnabled WRITE setKeyboardEnabled ) diff --git a/tdeui/tdecmodule.cpp b/tdeui/tdecmodule.cpp index d447ec17e..7b6670b9e 100644 --- a/tdeui/tdecmodule.cpp +++ b/tdeui/tdecmodule.cpp @@ -28,7 +28,7 @@ #include <tdeconfigdialogmanager.h> #include <kdebug.h> #include <tdeglobal.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <tdelocale.h> #include "tdecmodule.h" @@ -98,7 +98,7 @@ void TDECModule::init() TDEConfigDialogManager* TDECModule::addConfig( TDEConfigSkeleton *config, TQWidget* widget ) { TDEConfigDialogManager* manager = new TDEConfigDialogManager( widget, config, name() ); - connect( manager, TQT_SIGNAL( widgetModified() ), TQT_SLOT( widgetChanged() )); + connect( manager, TQ_SIGNAL( widgetModified() ), TQ_SLOT( widgetChanged() )); d->managers.append( manager ); return manager; } diff --git a/tdeui/tdecmodule.h b/tdeui/tdecmodule.h index 186ee6656..920769d33 100644 --- a/tdeui/tdecmodule.h +++ b/tdeui/tdecmodule.h @@ -68,7 +68,7 @@ class TDEInstance; */ class TDEUI_EXPORT TDECModule : public TQWidget { - Q_OBJECT + TQ_OBJECT public: diff --git a/tdeui/tdecompletionbox.cpp b/tdeui/tdecompletionbox.cpp index a8a2bd237..9ff9b95e5 100644 --- a/tdeui/tdecompletionbox.cpp +++ b/tdeui/tdecompletionbox.cpp @@ -61,19 +61,19 @@ TDECompletionBox::TDECompletionBox( TQWidget *parent, const char *name ) if ( parent ) setFocusProxy( parent ); else - setFocusPolicy( TQ_NoFocus ); + setFocusPolicy( TQWidget::NoFocus ); setVScrollBarMode( Auto ); setHScrollBarMode( AlwaysOff ); - connect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem * )), - TQT_SLOT( slotActivated( TQListBoxItem * )) ); + connect( this, TQ_SIGNAL( doubleClicked( TQListBoxItem * )), + TQ_SLOT( slotActivated( TQListBoxItem * )) ); // grmbl, just TQListBox workarounds :[ Thanks Volker. - connect( this, TQT_SIGNAL( currentChanged( TQListBoxItem * )), - TQT_SLOT( slotCurrentChanged() )); - connect( this, TQT_SIGNAL( clicked( TQListBoxItem * )), - TQT_SLOT( slotItemClicked( TQListBoxItem * )) ); + connect( this, TQ_SIGNAL( currentChanged( TQListBoxItem * )), + TQ_SLOT( slotCurrentChanged() )); + connect( this, TQ_SIGNAL( clicked( TQListBoxItem * )), + TQ_SLOT( slotItemClicked( TQListBoxItem * )) ); } TDECompletionBox::~TDECompletionBox() @@ -109,13 +109,13 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) { int type = e->type(); - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->m_parent) ) { + if ( o == d->m_parent ) { if ( isVisible() ) { if ( type == TQEvent::KeyPress ) { - TQKeyEvent *ev = TQT_TQKEYEVENT( e ); + TQKeyEvent *ev = static_cast<TQKeyEvent*>( e ); switch ( ev->key() ) { case Key_BackTab: - if ( d->tabHandling && (ev->state() == Qt::NoButton || + if ( d->tabHandling && (ev->state() == TQt::NoButton || (ev->state() & ShiftButton)) ) { up(); ev->accept(); @@ -123,7 +123,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) } break; case Key_Tab: - if ( d->tabHandling && (ev->state() == Qt::NoButton) ) { + if ( d->tabHandling && (ev->state() == TQt::NoButton) ) { down(); // Only on TAB!! ev->accept(); return true; @@ -185,7 +185,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) else if ( type == TQEvent::AccelOverride ) { // Override any acceleartors that match // the key sequences we use here... - TQKeyEvent *ev = TQT_TQKEYEVENT( e ); + TQKeyEvent *ev = static_cast<TQKeyEvent*>( e ); switch ( ev->key() ) { case Key_Down: case Key_Up: @@ -199,7 +199,7 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) break; case Key_Tab: case Key_BackTab: - if ( ev->state() == Qt::NoButton || + if ( ev->state() == TQt::NoButton || (ev->state() & ShiftButton)) { ev->accept(); @@ -230,11 +230,11 @@ bool TDECompletionBox::eventFilter( TQObject *o, TQEvent *e ) // any mouse-click on something else than "this" makes us hide else if ( type == TQEvent::MouseButtonPress ) { - TQMouseEvent *ev = TQT_TQMOUSEEVENT( e ); + TQMouseEvent *ev = static_cast<TQMouseEvent*>( e ); if ( !rect().contains( ev->pos() )) // this widget hide(); - if ( !d->emitSelected && currentItem() && !::tqqt_cast<TQScrollBar*>(o) ) + if ( !d->emitSelected && currentItem() && !::tqt_cast<TQScrollBar*>(o) ) { emit highlighted( currentText() ); hide(); @@ -343,9 +343,9 @@ TQRect TDECompletionBox::calculateGeometry() const // to adjust it. Do that here as well, for consistency const TQObject* combo; if ( d->m_parent && (combo = d->m_parent->parent() ) && - combo->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) ) + combo->inherits("TQComboBox") ) { - const TQComboBox* cb = static_cast<const TQComboBox*>(TQT_TQWIDGET_CONST(combo)); + const TQComboBox* cb = static_cast<const TQComboBox*>(combo); //Expand to the combo width w = TQMAX( w, cb->width() ); diff --git a/tdeui/tdecompletionbox.h b/tdeui/tdecompletionbox.h index b804411b1..e3f74e819 100644 --- a/tdeui/tdecompletionbox.h +++ b/tdeui/tdecompletionbox.h @@ -42,7 +42,7 @@ class TQEvent; */ class TDEUI_EXPORT TDECompletionBox : public TDEListBox { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool isTabHandling READ isTabHandling WRITE setTabHandling ) TQ_PROPERTY(TQString cancelledText READ cancelledText WRITE setCancelledText) TQ_PROPERTY( bool activateOnSelect READ activateOnSelect WRITE setActivateOnSelect ) diff --git a/tdeui/tdeconfigdialog.cpp b/tdeui/tdeconfigdialog.cpp index df43defc5..274355910 100644 --- a/tdeui/tdeconfigdialog.cpp +++ b/tdeui/tdeconfigdialog.cpp @@ -65,11 +65,11 @@ TDEConfigDialog::TDEConfigDialog( TQWidget *parent, const char *name, setName(genericName); } - connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(updateSettings())); - connect(this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(updateSettings())); - connect(this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(updateButtons())); - connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateWidgetsDefault())); - connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(updateButtons())); + connect(this, TQ_SIGNAL(okClicked()), this, TQ_SLOT(updateSettings())); + connect(this, TQ_SIGNAL(applyClicked()), this, TQ_SLOT(updateSettings())); + connect(this, TQ_SIGNAL(applyClicked()), this, TQ_SLOT(updateButtons())); + connect(this, TQ_SIGNAL(defaultClicked()), this, TQ_SLOT(updateWidgetsDefault())); + connect(this, TQ_SIGNAL(defaultClicked()), this, TQ_SLOT(updateButtons())); d->manager = new TDEConfigDialogManager(this, config); setupManagerConnections(d->manager); @@ -150,12 +150,12 @@ void TDEConfigDialog::addPageInternal(TQWidget *page, void TDEConfigDialog::setupManagerConnections(TDEConfigDialogManager *manager) { - connect(manager, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(settingsChangedSlot())); - connect(manager, TQT_SIGNAL(widgetModified()), this, TQT_SLOT(updateButtons())); + connect(manager, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(settingsChangedSlot())); + connect(manager, TQ_SIGNAL(widgetModified()), this, TQ_SLOT(updateButtons())); - connect(this, TQT_SIGNAL(okClicked()), manager, TQT_SLOT(updateSettings())); - connect(this, TQT_SIGNAL(applyClicked()), manager, TQT_SLOT(updateSettings())); - connect(this, TQT_SIGNAL(defaultClicked()), manager, TQT_SLOT(updateWidgetsDefault())); + connect(this, TQ_SIGNAL(okClicked()), manager, TQ_SLOT(updateSettings())); + connect(this, TQ_SIGNAL(applyClicked()), manager, TQ_SLOT(updateSettings())); + connect(this, TQ_SIGNAL(defaultClicked()), manager, TQ_SLOT(updateWidgetsDefault())); } TDEConfigDialog* TDEConfigDialog::exists(const char* name) diff --git a/tdeui/tdeconfigdialog.h b/tdeui/tdeconfigdialog.h index 3eeed5b6f..6ce44da22 100644 --- a/tdeui/tdeconfigdialog.h +++ b/tdeui/tdeconfigdialog.h @@ -52,8 +52,8 @@ class TDEConfigDialogManager; * TDEConfigDialog *dialog = new TDEConfigDialog(this, "settings", MySettings::self(), KDialogBase::IconList); * dialog->addPage(new General(0, "General"), i18n("General") ); * dialog->addPage(new Appearance(0, "Style"), i18n("Appearance") ); - * connect(dialog, TQT_SIGNAL(settingsChanged()), mainWidget, TQT_SLOT(loadSettings())); - * connect(dialog, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT(loadSettings())); + * connect(dialog, TQ_SIGNAL(settingsChanged()), mainWidget, TQ_SLOT(loadSettings())); + * connect(dialog, TQ_SIGNAL(settingsChanged()), this, TQ_SLOT(loadSettings())); * dialog->show(); * } * \endcode @@ -70,7 +70,7 @@ class TDEConfigDialogManager; * @since 3.2 */ class TDEUI_EXPORT TDEConfigDialog : public KDialogBase { -Q_OBJECT +TQ_OBJECT signals: /** diff --git a/tdeui/tdefontcombo.cpp b/tdeui/tdefontcombo.cpp index cc3b090b7..31cc23849 100644 --- a/tdeui/tdefontcombo.cpp +++ b/tdeui/tdefontcombo.cpp @@ -283,7 +283,7 @@ void TDEFontCombo::init() setInsertionPolicy(NoInsertion); setAutoCompletion(true); setSize(12); - connect( this, TQT_SIGNAL(highlighted(int)), TQT_SLOT(slotModified(int))); + connect( this, TQ_SIGNAL(highlighted(int)), TQ_SLOT(slotModified(int))); } TDEFontCombo::~TDEFontCombo() diff --git a/tdeui/tdefontcombo.h b/tdeui/tdefontcombo.h index 308b7e047..2ddf7f638 100644 --- a/tdeui/tdefontcombo.h +++ b/tdeui/tdefontcombo.h @@ -34,7 +34,7 @@ */ class TDEUI_EXPORT TDEFontCombo : public KComboBox { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY(TQString family READ currentFont WRITE setCurrentFont) TQ_PROPERTY(bool bold READ bold WRITE setBold DESIGNABLE true) TQ_PROPERTY(bool italic READ italic WRITE setItalic DESIGNABLE true) diff --git a/tdeui/tdefontdialog.cpp b/tdeui/tdefontdialog.cpp index 0da56a93b..b903a3a90 100644 --- a/tdeui/tdefontdialog.cpp +++ b/tdeui/tdefontdialog.cpp @@ -51,7 +51,7 @@ #include <tqlineedit.h> #include <tdelistbox.h> #include <tdelocale.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kdebug.h> #include <knuminput.h> @@ -85,8 +85,8 @@ class TDEFontChooser::TDEFontChooserPrivate { public: TDEFontChooserPrivate() - { m_palette.setColor(TQPalette::Active, TQColorGroup::Text, Qt::black); - m_palette.setColor(TQPalette::Active, TQColorGroup::Base, Qt::white); } + { m_palette.setColor(TQPalette::Active, TQColorGroup::Text, TQt::black); + m_palette.setColor(TQPalette::Active, TQColorGroup::Base, TQt::white); } TQPalette m_palette; }; @@ -131,8 +131,8 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, familyLayout->addSpacing( checkBoxGap ); if (diff) { familyCheckbox = new TQCheckBox(i18n("Font"), page); - connect(familyCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggled_checkbox())); - familyLayout->addWidget(familyCheckbox, 0, Qt::AlignLeft); + connect(familyCheckbox, TQ_SIGNAL(toggled(bool)), TQ_SLOT(toggled_checkbox())); + familyLayout->addWidget(familyCheckbox, 0, TQt::AlignLeft); TQString familyCBToolTipText = i18n("Change font family?"); TQString familyCBWhatsThisText = @@ -143,15 +143,15 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, } else { familyCheckbox = 0; familyLabel = new TQLabel( i18n("Font:"), page, "familyLabel" ); - familyLayout->addWidget(familyLabel, 1, Qt::AlignLeft); + familyLayout->addWidget(familyLabel, 1, TQt::AlignLeft); } gridLayout->addLayout(familyLayout, row, 0 ); TQHBoxLayout *styleLayout = new TQHBoxLayout(); if (diff) { styleCheckbox = new TQCheckBox(i18n("Font style"), page); - connect(styleCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggled_checkbox())); - styleLayout->addWidget(styleCheckbox, 0, Qt::AlignLeft); + connect(styleCheckbox, TQ_SIGNAL(toggled(bool)), TQ_SLOT(toggled_checkbox())); + styleLayout->addWidget(styleCheckbox, 0, TQt::AlignLeft); TQString styleCBToolTipText = i18n("Change font style?"); TQString styleCBWhatsThisText = @@ -162,7 +162,7 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, } else { styleCheckbox = 0; styleLabel = new TQLabel( i18n("Font style:"), page, "styleLabel"); - styleLayout->addWidget(styleLabel, 1, Qt::AlignLeft); + styleLayout->addWidget(styleLabel, 1, TQt::AlignLeft); } styleLayout->addSpacing( checkBoxGap ); gridLayout->addLayout(styleLayout, row, 1 ); @@ -170,8 +170,8 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, TQHBoxLayout *sizeLayout = new TQHBoxLayout(); if (diff) { sizeCheckbox = new TQCheckBox(i18n("Size"),page); - connect(sizeCheckbox, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggled_checkbox())); - sizeLayout->addWidget(sizeCheckbox, 0, Qt::AlignLeft); + connect(sizeCheckbox, TQ_SIGNAL(toggled(bool)), TQ_SLOT(toggled_checkbox())); + sizeLayout->addWidget(sizeCheckbox, 0, TQt::AlignLeft); TQString sizeCBToolTipText = i18n("Change font size?"); TQString sizeCBWhatsThisText = @@ -182,7 +182,7 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, } else { sizeCheckbox = 0; sizeLabel = new TQLabel( i18n("Size:"), page, "sizeLabel"); - sizeLayout->addWidget(sizeLabel, 1, Qt::AlignLeft); + sizeLayout->addWidget(sizeLabel, 1, TQt::AlignLeft); } sizeLayout->addSpacing( checkBoxGap ); sizeLayout->addSpacing( checkBoxGap ); // prevent label from eating border @@ -200,8 +200,8 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, i18n("Here you can choose the font family to be used." ); TQWhatsThis::add( familyListBox, fontFamilyWhatsThisText ); TQWhatsThis::add(diff?(TQWidget *) familyCheckbox:(TQWidget *) familyLabel, fontFamilyWhatsThisText ); - connect(familyListBox, TQT_SIGNAL(highlighted(const TQString &)), - TQT_SLOT(family_chosen_slot(const TQString &))); + connect(familyListBox, TQ_SIGNAL(highlighted(const TQString &)), + TQ_SLOT(family_chosen_slot(const TQString &))); if(!fontList.isEmpty()) { familyListBox->insertStringList(fontList); @@ -230,8 +230,8 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, styleListBox->setMinimumHeight( minimumListHeight( styleListBox, visibleListSize ) ); - connect(styleListBox, TQT_SIGNAL(highlighted(const TQString &)), - TQT_SLOT(style_chosen_slot(const TQString &))); + connect(styleListBox, TQ_SIGNAL(highlighted(const TQString &)), + TQ_SLOT(style_chosen_slot(const TQString &))); sizeListBox = new TDEListBox( page, "sizeListBox"); @@ -258,7 +258,7 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, sizeLayout2->setColStretch( 1, 1 ); // to prevent text from eating the right border sizeLayout2->addMultiCellWidget( sizeOfFont, 0, 0, 0, 1); sizeLayout2->addMultiCellWidget(sizeListBox, 1,1, 0,1); - sizeLayout2->addWidget(sizeIsRelativeCheckBox, 2, 0, Qt::AlignLeft); + sizeLayout2->addWidget(sizeIsRelativeCheckBox, 2, 0, TQt::AlignLeft); TQWhatsThis::add( sizeIsRelativeCheckBox, sizeIsRelativeCBWhatsThisText ); TQToolTip::add( sizeIsRelativeCheckBox, sizeIsRelativeCBToolTipText ); } @@ -280,11 +280,11 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, sizeListBox->setMinimumHeight( minimumListHeight( sizeListBox, visibleListSize ) ); - connect( sizeOfFont, TQT_SIGNAL( valueChanged(int) ), - TQT_SLOT(size_value_slot(int))); + connect( sizeOfFont, TQ_SIGNAL( valueChanged(int) ), + TQ_SLOT(size_value_slot(int))); - connect( sizeListBox, TQT_SIGNAL(highlighted(const TQString&)), - TQT_SLOT(size_chosen_slot(const TQString&)) ); + connect( sizeListBox, TQ_SIGNAL(highlighted(const TQString&)), + TQ_SLOT(size_chosen_slot(const TQString&)) ); sizeListBox->setSelected(sizeListBox->findItem(TQString::number(10)), true); // default to 10pt. row ++; @@ -296,14 +296,14 @@ TDEFontChooser::TDEFontChooser(TQWidget *parent, const char *name, //i18n: This is a classical test phrase. (It contains all letters from A to Z.) sampleEdit->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog")); sampleEdit->setMinimumHeight( sampleEdit->fontMetrics().lineSpacing() ); - sampleEdit->setAlignment(Qt::AlignCenter); + sampleEdit->setAlignment(TQt::AlignCenter); gridLayout->addMultiCellWidget(sampleEdit, 4, 4, 0, 2); TQString sampleEditWhatsThisText = i18n("This sample text illustrates the current settings. " "You may edit it to test special characters." ); TQWhatsThis::add( sampleEdit, sampleEditWhatsThisText ); - connect(this, TQT_SIGNAL(fontSelected(const TQFont &)), - TQT_SLOT(displaySample(const TQFont &))); + connect(this, TQ_SIGNAL(fontSelected(const TQFont &)), + TQ_SLOT(displaySample(const TQFont &))); TQVBoxLayout *vbox; if( makeFrame ) @@ -473,8 +473,18 @@ TQString TDEFontChooser::style_name(const TQString &style) void TDEFontChooser::family_chosen_slot(const TQString& family) { + TQString currentFamily; + if (family.isEmpty()) + { + currentFamily = familyListBox->currentText(); + } + else + { + currentFamily = family; + } + TQFontDatabase dbase; - TQStringList styles = dbase.styles(family); + TQStringList styles = dbase.styles(currentFamily); styleListBox->clear(); currentStyles.clear(); for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { @@ -492,12 +502,21 @@ void TDEFontChooser::family_chosen_slot(const TQString& family) styleListBox->blockSignals(true); TQListBoxItem *item = styleListBox->findItem(selectedStyle); if (item) + { styleListBox->setSelected(styleListBox->findItem(selectedStyle), true); + } else + { styleListBox->setSelected(0, true); + } styleListBox->blockSignals(false); style_chosen_slot(TQString::null); + + if (!family.isEmpty() ) + { + selectedFamily = family; + } } void TDEFontChooser::size_chosen_slot(const TQString& size){ @@ -685,6 +704,15 @@ void TDEFontChooser::getFontList( TQStringList &list, uint fontListCriteria) list = lstSys; } +void TDEFontChooser::setFamilyList( TQStringList list ) +{ + familyListBox->blockSignals(true); + familyListBox->clear(); + familyListBox->insertStringList(list); + setFont( TDEGlobalSettings::generalFont(), usingFixed ); + familyListBox->blockSignals(false); +} + void TDEFontChooser::addFont( TQStringList &list, const char *xfont ) { const char *ptr = strchr( xfont, '-' ); diff --git a/tdeui/tdefontdialog.h b/tdeui/tdefontdialog.h index 66d202700..0946c1b6e 100644 --- a/tdeui/tdefontdialog.h +++ b/tdeui/tdefontdialog.h @@ -53,7 +53,7 @@ class KIntNumInput; */ class TDEUI_EXPORT TDEFontChooser : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQFont font READ font WRITE setFont ) public: @@ -250,6 +250,14 @@ public: static void getFontList( TQStringList &list, uint fontListCriteria); /** + * + * Fill the font family list of the TDEFontChooser + * + * @param list The font list. + */ + void setFamilyList( TQStringList list ); + + /** * Reimplemented for internal reasons. */ virtual TQSize sizeHint( void ) const; @@ -300,8 +308,9 @@ private: TQFont selFont; + TQString selectedFamily; TQString selectedStyle; - int selectedSize; + int selectedSize; TQMap<TQString, TQString> currentStyles; bool usingFixed; @@ -338,7 +347,7 @@ private: * @version $Id$ */ class TDEUI_EXPORT TDEFontDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/tdefontrequester.cpp b/tdeui/tdefontrequester.cpp index 2cabede01..d5dd3b08c 100644 --- a/tdeui/tdefontrequester.cpp +++ b/tdeui/tdefontrequester.cpp @@ -43,7 +43,7 @@ TDEFontRequester::TDEFontRequester( TQWidget *parent, const char *name, layout->addWidget( m_sampleLabel, 1 ); layout->addWidget( m_button ); - connect( m_button, TQT_SIGNAL( clicked() ), TQT_SLOT( buttonClicked() ) ); + connect( m_button, TQ_SIGNAL( clicked() ), TQ_SLOT( buttonClicked() ) ); displaySampleText(); setToolTip(); diff --git a/tdeui/tdefontrequester.h b/tdeui/tdefontrequester.h index 9d324545a..ef0a17c59 100644 --- a/tdeui/tdefontrequester.h +++ b/tdeui/tdefontrequester.h @@ -43,7 +43,7 @@ class TQPushButton; */ class TDEUI_EXPORT TDEFontRequester : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQString title READ title WRITE setTitle ) TQ_PROPERTY( TQString sampleText READ sampleText WRITE setSampleText ) diff --git a/tdeui/tdelistbox.cpp b/tdeui/tdelistbox.cpp index 0e4c5d520..186987836 100644 --- a/tdeui/tdelistbox.cpp +++ b/tdeui/tdelistbox.cpp @@ -30,22 +30,22 @@ TDEListBox::TDEListBox( TQWidget *parent, const char *name, WFlags f ) : TQListBox( parent, name, f ), d(0) { - connect( this, TQT_SIGNAL( onViewport() ), - this, TQT_SLOT( slotOnViewport() ) ); - connect( this, TQT_SIGNAL( onItem( TQListBoxItem * ) ), - this, TQT_SLOT( slotOnItem( TQListBoxItem * ) ) ); + connect( this, TQ_SIGNAL( onViewport() ), + this, TQ_SLOT( slotOnViewport() ) ); + connect( this, TQ_SIGNAL( onItem( TQListBoxItem * ) ), + this, TQ_SLOT( slotOnItem( TQListBoxItem * ) ) ); slotSettingsChanged(TDEApplication::SETTINGS_MOUSE); - if (kapp) + if (tdeApp) { - connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) ); - kapp->addKipcEventMask( KIPC::SettingsChanged ); + connect( tdeApp, TQ_SIGNAL( settingsChanged(int) ), TQ_SLOT( slotSettingsChanged(int) ) ); + tdeApp->addKipcEventMask( KIPC::SettingsChanged ); } m_pCurrentItem = 0L; m_pAutoSelect = new TQTimer( this ); - connect( m_pAutoSelect, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotAutoSelect() ) ); + connect( m_pAutoSelect, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotAutoSelect() ) ); } void TDEListBox::slotOnItem( TQListBoxItem *item ) @@ -75,27 +75,27 @@ void TDEListBox::slotSettingsChanged(int category) return; m_bUseSingle = TDEGlobalSettings::singleClick(); - disconnect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, + disconnect( this, TQ_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ), - this, TQT_SLOT( slotMouseButtonClicked( int, TQListBoxItem *, + this, TQ_SLOT( slotMouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ) ); -// disconnect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem *, +// disconnect( this, TQ_SIGNAL( doubleClicked( TQListBoxItem *, // const TQPoint & ) ), -// this, TQT_SLOT( slotExecute( TQListBoxItem *, +// this, TQ_SLOT( slotExecute( TQListBoxItem *, // const TQPoint & ) ) ); if( m_bUseSingle ) { - connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, + connect( this, TQ_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ), - this, TQT_SLOT( slotMouseButtonClicked( int, TQListBoxItem *, + this, TQ_SLOT( slotMouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ) ); } else { -// connect( this, TQT_SIGNAL( doubleClicked( TQListBoxItem *, +// connect( this, TQ_SIGNAL( doubleClicked( TQListBoxItem *, // const TQPoint & ) ), -// this, TQT_SLOT( slotExecute( TQListBoxItem *, +// this, TQ_SLOT( slotExecute( TQListBoxItem *, // const TQPoint & ) ) ); } @@ -249,14 +249,14 @@ void TDEListBox::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) if( item ) { emit doubleClicked( item, e->globalPos() ); - if( (e->button() == Qt::LeftButton) && !m_bUseSingle ) + if( (e->button() == TQt::LeftButton) && !m_bUseSingle ) emitExecute( item, e->globalPos() ); } } void TDEListBox::slotMouseButtonClicked( int btn, TQListBoxItem *item, const TQPoint &pos ) { - if( (btn == Qt::LeftButton) && item ) + if( (btn == TQt::LeftButton) && item ) emitExecute( item, pos ); } diff --git a/tdeui/tdelistbox.h b/tdeui/tdelistbox.h index e7666af32..591349320 100644 --- a/tdeui/tdelistbox.h +++ b/tdeui/tdelistbox.h @@ -39,7 +39,7 @@ **/ class TDEUI_EXPORT TDEListBox : public TQListBox { - Q_OBJECT + TQ_OBJECT public: TDEListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); diff --git a/tdeui/tdelistview.cpp b/tdeui/tdelistview.cpp index c0c52ce48..0d46f49be 100644 --- a/tdeui/tdelistview.cpp +++ b/tdeui/tdelistview.cpp @@ -109,9 +109,9 @@ public: initialFileManagerItem(0) { renameable.append(0); - connect(editor, TQT_SIGNAL(done(TQListViewItem*,int)), listview, TQT_SLOT(doneEditing(TQListViewItem*,int))); - connect(editor, TQT_SIGNAL(renameNext(TQListViewItem*,int)), listview, TQT_SLOT(renameNextProxy(TQListViewItem*,int))); - connect(editor, TQT_SIGNAL(renamePrev(TQListViewItem*,int)), listview, TQT_SLOT(renamePrevProxy(TQListViewItem*,int))); + connect(editor, TQ_SIGNAL(done(TQListViewItem*,int)), listview, TQ_SLOT(doneEditing(TQListViewItem*,int))); + connect(editor, TQ_SIGNAL(renameNext(TQListViewItem*,int)), listview, TQ_SLOT(renameNextProxy(TQListViewItem*,int))); + connect(editor, TQ_SIGNAL(renamePrev(TQListViewItem*,int)), listview, TQ_SLOT(renamePrevProxy(TQListViewItem*,int))); } ~TDEListViewPrivate () @@ -189,9 +189,9 @@ TDEListViewLineEdit::TDEListViewLineEdit(TDEListView *parent) { setFrame( false ); hide(); - connect( parent, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotSelectionChanged() )); - connect( parent, TQT_SIGNAL( itemRemoved( TQListViewItem * ) ), - TQT_SLOT( slotItemRemoved( TQListViewItem * ) )); + connect( parent, TQ_SIGNAL( selectionChanged() ), TQ_SLOT( slotSelectionChanged() )); + connect( parent, TQ_SIGNAL( itemRemoved( TQListViewItem * ) ), + TQ_SLOT( slotItemRemoved( TQListViewItem * ) )); } TDEListViewLineEdit::~TDEListViewLineEdit() @@ -344,7 +344,7 @@ bool TDEListViewLineEdit::event(TQEvent *pe) keyPressEvent(k); return true; } - else if ((k->key() == Qt::Key_Backtab || k->key() == Qt::Key_Tab) && + else if ((k->key() == TQt::Key_Backtab || k->key() == TQt::Key_Tab) && p->tabOrderedRenaming() && p->itemsRenameable() && !(k->state() & ControlButton || k->state() & AltButton)) { @@ -374,11 +374,11 @@ void TDEListViewLineEdit::keyPressEvent(TQKeyEvent *e) emit renamePrev(i,c); } } - else if (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) + else if (e->key() == TQt::Key_Return || e->key() == TQt::Key_Enter) terminate(true); - else if(e->key() == Qt::Key_Escape) + else if(e->key() == TQt::Key_Escape) terminate(false); - else if (e->key() == Qt::Key_Down || e->key() == Qt::Key_Up) + else if (e->key() == TQt::Key_Down || e->key() == TQt::Key_Up) { terminate(true); KLineEdit::keyPressEvent(e); @@ -459,42 +459,42 @@ TDEListView::TDEListView( TQWidget *parent, const char *name ) { setDragAutoScroll(true); - connect( this, TQT_SIGNAL( onViewport() ), - this, TQT_SLOT( slotOnViewport() ) ); - connect( this, TQT_SIGNAL( onItem( TQListViewItem * ) ), - this, TQT_SLOT( slotOnItem( TQListViewItem * ) ) ); + connect( this, TQ_SIGNAL( onViewport() ), + this, TQ_SLOT( slotOnViewport() ) ); + connect( this, TQ_SIGNAL( onItem( TQListViewItem * ) ), + this, TQ_SLOT( slotOnItem( TQListViewItem * ) ) ); - connect (this, TQT_SIGNAL(contentsMoving(int,int)), - this, TQT_SLOT(cleanDropVisualizer())); - connect (this, TQT_SIGNAL(contentsMoving(int,int)), - this, TQT_SLOT(cleanItemHighlighter())); + connect (this, TQ_SIGNAL(contentsMoving(int,int)), + this, TQ_SLOT(cleanDropVisualizer())); + connect (this, TQ_SIGNAL(contentsMoving(int,int)), + this, TQ_SLOT(cleanItemHighlighter())); slotSettingsChanged(TDEApplication::SETTINGS_MOUSE); - if (kapp) + if (tdeApp) { - connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) ); - kapp->addKipcEventMask( KIPC::SettingsChanged ); + connect( tdeApp, TQ_SIGNAL( settingsChanged(int) ), TQ_SLOT( slotSettingsChanged(int) ) ); + tdeApp->addKipcEventMask( KIPC::SettingsChanged ); } - connect(&d->autoSelect, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotAutoSelect() ) ); - connect(&d->dragExpand, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotDragExpand() ) ); + connect(&d->autoSelect, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotAutoSelect() ) ); + connect(&d->dragExpand, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotDragExpand() ) ); // context menu handling if (d->showContextMenusOnPress) { - connect (this, TQT_SIGNAL (rightButtonPressed (TQListViewItem*, const TQPoint&, int)), - this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); + connect (this, TQ_SIGNAL (rightButtonPressed (TQListViewItem*, const TQPoint&, int)), + this, TQ_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); } else { - connect (this, TQT_SIGNAL (rightButtonClicked (TQListViewItem*, const TQPoint&, int)), - this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); + connect (this, TQ_SIGNAL (rightButtonClicked (TQListViewItem*, const TQPoint&, int)), + this, TQ_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); } - connect (this, TQT_SIGNAL (menuShortCutPressed (TDEListView*, TQListViewItem*)), - this, TQT_SLOT (emitContextMenu (TDEListView*, TQListViewItem*))); + connect (this, TQ_SIGNAL (menuShortCutPressed (TDEListView*, TQListViewItem*)), + this, TQ_SLOT (emitContextMenu (TDEListView*, TQListViewItem*))); d->alternateBackground = TDEGlobalSettings::alternateBackgroundColor(); } @@ -585,12 +585,12 @@ void TDEListView::slotSettingsChanged(int category) d->dragDelay = TDEGlobalSettings::dndEventDelay(); d->bUseSingle = TDEGlobalSettings::singleClick(); - disconnect(this, TQT_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)), - this, TQT_SLOT (slotMouseButtonClicked (int, TQListViewItem*, const TQPoint &, int))); + disconnect(this, TQ_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)), + this, TQ_SLOT (slotMouseButtonClicked (int, TQListViewItem*, const TQPoint &, int))); if( d->bUseSingle ) - connect (this, TQT_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)), - this, TQT_SLOT (slotMouseButtonClicked( int, TQListViewItem*, const TQPoint &, int))); + connect (this, TQ_SIGNAL (mouseButtonClicked (int, TQListViewItem*, const TQPoint &, int)), + this, TQ_SLOT (slotMouseButtonClicked( int, TQListViewItem*, const TQPoint &, int))); d->bChangeCursorOverItem = TDEGlobalSettings::changeCursorOverIcon(); if ( !d->disableAutoSelection ) @@ -607,17 +607,17 @@ void TDEListView::slotSettingsChanged(int category) if (d->showContextMenusOnPress) { - disconnect (0L, 0L, this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); + disconnect (0L, 0L, this, TQ_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); - connect(this, TQT_SIGNAL (rightButtonPressed (TQListViewItem*, const TQPoint&, int)), - this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); + connect(this, TQ_SIGNAL (rightButtonPressed (TQListViewItem*, const TQPoint&, int)), + this, TQ_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); } else { - disconnect (0L, 0L, this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); + disconnect (0L, 0L, this, TQ_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); - connect(this, TQT_SIGNAL (rightButtonClicked (TQListViewItem*, const TQPoint&, int)), - this, TQT_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); + connect(this, TQ_SIGNAL (rightButtonClicked (TQListViewItem*, const TQPoint&, int)), + this, TQ_SLOT (emitContextMenu (TQListViewItem*, const TQPoint&, int))); } break; @@ -828,7 +828,7 @@ void TDEListView::contentsMousePressEvent( TQMouseEvent *e ) treeStepSize() * ( at->depth() + ( rootIsDecorated() ? 1 : 0) ) + itemMargin() ) && ( p.x() >= header()->cellPos( header()->mapToActual( 0 ) ) ); - if (e->button() == Qt::LeftButton && !rootDecoClicked) + if (e->button() == TQt::LeftButton && !rootDecoClicked) { //Start a drag d->startDragPos = e->pos(); @@ -885,7 +885,7 @@ void TDEListView::contentsMouseMoveEvent( TQMouseEvent *e ) void TDEListView::contentsMouseReleaseEvent( TQMouseEvent *e ) { - if (e->button() == Qt::LeftButton) + if (e->button() == TQt::LeftButton) { // If the row was already selected, maybe we want to start an in-place editing if ( d->pressedOnSelected && itemsRenameable() ) @@ -921,7 +921,7 @@ void TDEListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) // We don't want to call the parent method because it does setOpen, // whereas we don't do it in single click mode... (David) //TQListView::contentsMouseDoubleClickEvent( e ); - if ( !e || e->button() != Qt::LeftButton ) { + if ( !e || e->button() != TQt::LeftButton ) { return; } @@ -934,7 +934,7 @@ void TDEListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) if( item ) { emit doubleClicked( item, e->globalPos(), col ); - if( (e->button() == Qt::LeftButton) && !d->bUseSingle ) { + if( (e->button() == TQt::LeftButton) && !d->bUseSingle ) { emitExecute( item, e->globalPos(), col ); } } @@ -942,7 +942,7 @@ void TDEListView::contentsMouseDoubleClickEvent ( TQMouseEvent *e ) void TDEListView::slotMouseButtonClicked( int btn, TQListViewItem *item, const TQPoint &pos, int c ) { - if( (btn == Qt::LeftButton) && item ) { + if( (btn == TQt::LeftButton) && item ) { emitExecute(item, pos, c); } } @@ -1399,7 +1399,7 @@ TQRect TDEListView::drawItemHighlighter(TQPainter *painter, TQListViewItem *item r = itemRect(item); r.setLeft(r.left()+(item->depth()+(rootIsDecorated() ? 1 : 0))*treeStepSize()); if (painter) - style().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, r, colorGroup(), + style().drawPrimitive(TQStyle::PE_FocusRect, painter, r, colorGroup(), TQStyle::Style_FocusAtBorder, colorGroup().highlight()); } @@ -1601,7 +1601,7 @@ void TDEListView::fileManagerKeyPressEvent (TQKeyEvent* e) } if (((!selectedItems) || ((selectedItems==1) && (d->selectedUsingMouse))) - && (e_state==Qt::NoButton) + && (e_state==TQt::NoButton) && ((e->key()==Key_Down) || (e->key()==Key_Up) || (e->key()==Key_Next) @@ -2152,7 +2152,7 @@ void TDEListView::viewportPaintEvent(TQPaintEvent *e) TQPainter painter(viewport()); // This is where we actually draw the drop-highlighter - style().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(), + style().drawPrimitive(TQStyle::PE_FocusRect, &painter, d->mOldDropHighlighter, colorGroup(), TQStyle::Style_FocusAtBorder); } d->painting = false; @@ -2456,7 +2456,7 @@ TQColor TDEListViewItem::backgroundColor(int column) // calculate a different color if the current column is sorted (only if more than 1 column) if ( (view->columns() > 1) && view->shadeSortColumn() && (column == view->columnSorted()) ) { - if ( color == Qt::black ) + if ( color == TQt::black ) color = TQColor(55, 55, 55); // dark gray else { @@ -2569,7 +2569,7 @@ void TDEListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column } /*! - If \a select is TRUE, all the items get selected; otherwise all + If \a select is true, all the items get selected; otherwise all the items get unselected. This only works in the selection modes \c Multi and \c Extended. In \c Single and \c NoSelection mode the selection of the current item is just set to \a select. @@ -2579,25 +2579,19 @@ void TDEListView::selectAll( bool select ) { if ( ((SelectionModeExt)selectionMode() == Multi) || ((SelectionModeExt)selectionMode() == Extended) ) { bool b = signalsBlocked(); - blockSignals( TRUE ); - bool anything = FALSE; + blockSignals( true ); + bool anything = false; TQListViewItemIterator it( this ); while ( it.current() ) { TQListViewItem *i = it.current(); - if ( select == TRUE ) { - if ( (bool)i->isVisible() == TRUE ) { - i->setSelected( TRUE ); - anything = TRUE; - } - if ( (bool)i->isVisible() == FALSE ) { - i->setSelected( FALSE ); - anything = TRUE; - } + if ( select ) { + i->setSelected( i->isVisible() ); + anything = true; } else { - if ( (bool)i->isSelected() != select ) { + if ( i->isSelected() != select ) { i->setSelected( select ); - anything = TRUE; + anything = true; } } ++it; @@ -2605,7 +2599,7 @@ void TDEListView::selectAll( bool select ) blockSignals( b ); if ( anything ) { emit selectionChanged(); -// d->useDoubleBuffer = TRUE; +// d->useDoubleBuffer = true; triggerUpdate(); } } else if ( currentItem() ) { diff --git a/tdeui/tdelistview.h b/tdeui/tdelistview.h index 6b02b6891..fa51c9b3b 100644 --- a/tdeui/tdelistview.h +++ b/tdeui/tdelistview.h @@ -85,7 +85,7 @@ class TDEUI_EXPORT TDEListView : public TQListView { friend class TDEListViewItem; - Q_OBJECT + TQ_OBJECT TQ_ENUMS( SelectionModeExt ) TQ_PROPERTY( bool fullWidth READ fullWidth WRITE setFullWidth ) @@ -286,7 +286,7 @@ public: * Do not use. * @deprecated */ - bool createChildren() const KDE_DEPRECATED; + bool createChildren() const TDE_DEPRECATED; /** * @return true if drawing of the drop-highlighter has been enabled. False by default. @@ -329,7 +329,7 @@ public: * @deprecated * @see setFullWidth() */ - void setFullWidth() KDE_DEPRECATED; + void setFullWidth() TDE_DEPRECATED; /** * Let the last column fit exactly all the available width. @@ -435,15 +435,15 @@ public: bool shadeSortColumn(void) const; /** - * @param enable TRUE if small execute area should be used (e.g. KonqListViewItem), FALSE if not. - * The default is FALSE to match TQt3 behaviour. + * @param enable true if small execute area should be used (e.g. KonqListViewItem), false if not. + * The default is false to match TQt behaviour. * * @since 14.0 */ void setUseSmallExecuteArea(bool enable); /** - * @return TRUE if small execute area is in use, FALSE if not. + * @return true if small execute area is in use, false if not. * * @since 14.0 */ @@ -723,7 +723,7 @@ public slots: * Do not use. * @deprecated */ - virtual void setCreateChildren(bool b) KDE_DEPRECATED; + virtual void setCreateChildren(bool b) TDE_DEPRECATED; /** * Set the selection mode. @@ -1165,7 +1165,7 @@ public: /** * returns the background color for this item */ - const TQColor &backgroundColor() KDE_DEPRECATED; // #### should be removed in 4.0; use below instead + const TQColor &backgroundColor() TDE_DEPRECATED; // #### should be removed in 4.0; use below instead /** * returns the background color for this item at given column diff --git a/tdeui/tdelistviewlineedit.h b/tdeui/tdelistviewlineedit.h index 0a87394ab..b7c166096 100644 --- a/tdeui/tdelistviewlineedit.h +++ b/tdeui/tdelistviewlineedit.h @@ -28,7 +28,7 @@ **/ class TDEUI_EXPORT TDEListViewLineEdit : public KLineEdit { -Q_OBJECT +TQ_OBJECT public: TDEListViewLineEdit(TDEListView *parent); ~TDEListViewLineEdit(); diff --git a/tdeui/tdelistviewsearchline.cpp b/tdeui/tdelistviewsearchline.cpp index 50ad3d276..88ac3746c 100644 --- a/tdeui/tdelistviewsearchline.cpp +++ b/tdeui/tdelistviewsearchline.cpp @@ -63,15 +63,15 @@ TDEListViewSearchLine::TDEListViewSearchLine(TQWidget *parent, TDEListView *list d->listView = listView; - connect(this, TQT_SIGNAL(textChanged(const TQString &)), - this, TQT_SLOT(queueSearch(const TQString &))); + connect(this, TQ_SIGNAL(textChanged(const TQString &)), + this, TQ_SLOT(queueSearch(const TQString &))); if(listView) { - connect(listView, TQT_SIGNAL(destroyed()), - this, TQT_SLOT(listViewDeleted())); + connect(listView, TQ_SIGNAL(destroyed()), + this, TQ_SLOT(listViewDeleted())); - connect(listView, TQT_SIGNAL(itemAdded(TQListViewItem *)), - this, TQT_SLOT(itemAdded(TQListViewItem *))); + connect(listView, TQ_SIGNAL(itemAdded(TQListViewItem *)), + this, TQ_SLOT(itemAdded(TQListViewItem *))); } else setEnabled(false); @@ -84,8 +84,8 @@ TDEListViewSearchLine::TDEListViewSearchLine(TQWidget *parent, const char *name) d->listView = 0; - connect(this, TQT_SIGNAL(textChanged(const TQString &)), - this, TQT_SLOT(queueSearch(const TQString &))); + connect(this, TQ_SIGNAL(textChanged(const TQString &)), + this, TQ_SLOT(queueSearch(const TQString &))); setEnabled(false); } @@ -178,21 +178,21 @@ void TDEListViewSearchLine::setSearchColumns(const TQValueList<int> &columns) void TDEListViewSearchLine::setListView(TDEListView *lv) { if(d->listView) { - disconnect(d->listView, TQT_SIGNAL(destroyed()), - this, TQT_SLOT(listViewDeleted())); + disconnect(d->listView, TQ_SIGNAL(destroyed()), + this, TQ_SLOT(listViewDeleted())); - disconnect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)), - this, TQT_SLOT(itemAdded(TQListViewItem *))); + disconnect(d->listView, TQ_SIGNAL(itemAdded(TQListViewItem *)), + this, TQ_SLOT(itemAdded(TQListViewItem *))); } d->listView = lv; if(lv) { - connect(d->listView, TQT_SIGNAL(destroyed()), - this, TQT_SLOT(listViewDeleted())); + connect(d->listView, TQ_SIGNAL(destroyed()), + this, TQ_SLOT(listViewDeleted())); - connect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)), - this, TQT_SLOT(itemAdded(TQListViewItem *))); + connect(d->listView, TQ_SIGNAL(itemAdded(TQListViewItem *)), + this, TQ_SLOT(itemAdded(TQListViewItem *))); } setEnabled(bool(lv)); @@ -237,7 +237,7 @@ TQPopupMenu *TDEListViewSearchLine::createPopupMenu() if (d->listView->columns()>1) { TQPopupMenu *subMenu = new TQPopupMenu(popup); - connect(subMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(searchColumnsMenuActivated(int))); + connect(subMenu, TQ_SIGNAL(activated(int)), this, TQ_SLOT(searchColumnsMenuActivated(int))); popup->insertSeparator(); popup->insertItem(i18n("Search Columns"), subMenu); @@ -285,7 +285,7 @@ void TDEListViewSearchLine::queueSearch(const TQString &search) { d->queuedSearches++; d->search = search; - TQTimer::singleShot(200, this, TQT_SLOT(activateSearch())); + TQTimer::singleShot(200, this, TQ_SLOT(activateSearch())); } void TDEListViewSearchLine::activateSearch() @@ -425,7 +425,7 @@ TDEListViewSearchLineWidget::TDEListViewSearchLineWidget(TDEListView *listView, setSpacing(5); - TQTimer::singleShot(0, this, TQT_SLOT(createWidgets())); + TQTimer::singleShot(0, this, TQ_SLOT(createWidgets())); } TDEListViewSearchLineWidget::~TDEListViewSearchLineWidget() @@ -460,7 +460,7 @@ void TDEListViewSearchLineWidget::createWidgets() label->setBuddy(d->searchLine); label->show(); - connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear())); + connect(d->clearButton, TQ_SIGNAL(clicked()), d->searchLine, TQ_SLOT(clear())); } TDEListViewSearchLine *TDEListViewSearchLineWidget::searchLine() const @@ -470,7 +470,7 @@ TDEListViewSearchLine *TDEListViewSearchLineWidget::searchLine() const void TDEListViewSearchLineWidget::positionInToolBar() { - TDEToolBar *toolBar = tqt_dynamic_cast<TDEToolBar *>(parent()); + TDEToolBar *toolBar = dynamic_cast<TDEToolBar *>(parent()); if(toolBar) { diff --git a/tdeui/tdelistviewsearchline.h b/tdeui/tdelistviewsearchline.h index cf02c492c..aeac7d668 100644 --- a/tdeui/tdelistviewsearchline.h +++ b/tdeui/tdelistviewsearchline.h @@ -46,7 +46,7 @@ class TQToolButton; class TDEUI_EXPORT TDEListViewSearchLine : public KLineEdit { - Q_OBJECT + TQ_OBJECT public: @@ -218,7 +218,7 @@ private: */ class TDEUI_EXPORT TDEListViewSearchLineWidget : public TQHBox { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/tdemainwindow.cpp b/tdeui/tdemainwindow.cpp index 225b910e4..a62633930 100644 --- a/tdeui/tdemainwindow.cpp +++ b/tdeui/tdemainwindow.cpp @@ -47,9 +47,9 @@ #include <tdemainwindow.h> #include <tdelocale.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kstaticdeleter.h> -#if defined Q_WS_X11 +#if defined TQ_WS_X11 #include <netwm.h> #endif @@ -93,7 +93,7 @@ public: } bool saveState( TQSessionManager& ) { - TDEConfig* config = TDEApplication::kApplication()->sessionConfig(); + TDEConfig* config = tdeApp->sessionConfig(); if ( TDEMainWindow::memberList->first() ){ // According to Jochen Wilhelmy <digisnap@cs.tu-berlin.de>, this // hook is useful for better document orientation @@ -126,7 +126,7 @@ public: TQApplication::sendEvent( window, &e ); canceled = !e.isAccepted(); /* Don't even think_about deleting widgets with - Qt::WDestructiveClose flag set at this point. We + TQt::WDestructiveClose flag set at this point. We are faking a close event, but we are *not*_ closing the window. The purpose of the faked close event is to prepare the application so it @@ -182,9 +182,9 @@ void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) KWhatsThisManager::init (); setDockMenuEnabled( false ); mHelpMenu = 0; - kapp->setTopWidget( this ); + tdeApp->setTopWidget( this ); actionCollection()->setWidget( this ); - connect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(shuttingDown())); + connect(tdeApp, TQ_SIGNAL(shutDown()), this, TQ_SLOT(shuttingDown())); if( !memberList ) memberList = new TQPtrList<TDEMainWindow>; @@ -196,7 +196,7 @@ void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) int unusedNumber; if ( !name ) { // no name given - objname = kapp->instanceName() + "-mainwindow#"; + objname = tdeApp->instanceName() + "-mainwindow#"; s = objname + '1'; // start adding number immediately unusedNumber = 1; } @@ -213,7 +213,7 @@ void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) unusedNumber = 0; // add numbers only when needed } for(;;) { - TQWidgetList* list = kapp->topLevelWidgets(); + TQWidgetList* list = tdeApp->topLevelWidgets(); TQWidgetListIt it( *list ); bool found = false; for( TQWidget* w = it.current(); @@ -246,13 +246,13 @@ void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) d->shuttingDown = false; if ((d->care_about_geometry = being_first)) { being_first = false; - if ( kapp->geometryArgument().isNull() ) // if there is no geometry, it doesn't matter + if ( tdeApp->geometryArgument().isNull() ) // if there is no geometry, it doesn't matter d->care_about_geometry = false; else parseGeometry(false); } - setCaption( kapp->caption() ); + setCaption( tdeApp->caption() ); if ( cflags & NoDCOPObject) d->m_interface = 0; else @@ -260,13 +260,13 @@ void TDEMainWindow::initTDEMainWindow(const char *name, int cflags) if ( cflags & NewRefCountMode ) { d->newStyleRefCounting = true; - kapp->ref(); + tdeApp->ref(); } else { d->newStyleRefCounting = false; } - if (!kapp->authorize("movable_toolbars")) + if (!tdeApp->authorize("movable_toolbars")) setDockWindowsMovable(false); } @@ -287,13 +287,13 @@ void TDEMainWindow::setupToolbarMenuActions() void TDEMainWindow::parseGeometry(bool parsewidth) { - assert ( !kapp->geometryArgument().isNull() ); + assert ( !tdeApp->geometryArgument().isNull() ); assert ( d->care_about_geometry ); -#if defined Q_WS_X11 +#if defined TQ_WS_X11 int x, y; int w, h; - int m = XParseGeometry( kapp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h); + int m = XParseGeometry( tdeApp->geometryArgument().latin1(), &x, &y, (unsigned int*)&w, (unsigned int*)&h); if (parsewidth) { TQSize minSize = minimumSize(); TQSize maxSize = maximumSize(); @@ -340,8 +340,8 @@ TDEPopupMenu* TDEMainWindow::helpMenu( const TQString &aboutAppText, bool showWh if ( !mHelpMenu ) return 0; - connect( mHelpMenu, TQT_SIGNAL( showAboutApplication() ), - this, TQT_SLOT( showAboutApplication() ) ); + connect( mHelpMenu, TQ_SIGNAL( showAboutApplication() ), + this, TQ_SLOT( showAboutApplication() ) ); } return mHelpMenu->menu(); @@ -351,8 +351,8 @@ TDEPopupMenu* TDEMainWindow::customHelpMenu( bool showWhatsThis ) { if( !mHelpMenu ) { mHelpMenu = new KHelpMenu( this, TQString::null, showWhatsThis ); - connect( mHelpMenu, TQT_SIGNAL( showAboutApplication() ), - this, TQT_SLOT( showAboutApplication() ) ); + connect( mHelpMenu, TQ_SIGNAL( showAboutApplication() ), + this, TQ_SLOT( showAboutApplication() ) ); } return mHelpMenu->menu(); @@ -360,9 +360,9 @@ TDEPopupMenu* TDEMainWindow::customHelpMenu( bool showWhatsThis ) bool TDEMainWindow::canBeRestored( int number ) { - if ( !kapp->isRestored() ) + if ( !tdeApp->isRestored() ) return false; - TDEConfig *config = kapp->sessionConfig(); + TDEConfig *config = tdeApp->sessionConfig(); if ( !config ) return false; config->setGroup( TQString::fromLatin1("Number") ); @@ -372,9 +372,9 @@ bool TDEMainWindow::canBeRestored( int number ) const TQString TDEMainWindow::classNameOfToplevel( int number ) { - if ( !kapp->isRestored() ) + if ( !tdeApp->isRestored() ) return TQString::null; - TDEConfig *config = kapp->sessionConfig(); + TDEConfig *config = tdeApp->sessionConfig(); if ( !config ) return TQString::null; TQString s; @@ -403,7 +403,7 @@ void TDEMainWindow::hide() d->hiddenDockWindows.clear(); - TQObjectList *list = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); + TQObjectList *list = queryList( "TQDockWindow" ); for( TQObjectListIt it( *list ); it.current(); ++it ) { TQDockWindow *dw = (TQDockWindow*)it.current(); if ( dw->isTopLevel() && dw->isVisible() ) { @@ -421,7 +421,7 @@ bool TDEMainWindow::restore( int number, bool show ) { if ( !canBeRestored( number ) ) return false; - TDEConfig *config = kapp->sessionConfig(); + TDEConfig *config = tdeApp->sessionConfig(); if ( readPropertiesInternal( config, number ) ){ if ( show ) TDEMainWindow::show(); @@ -433,7 +433,7 @@ bool TDEMainWindow::restore( int number, bool show ) KXMLGUIFactory *TDEMainWindow::guiFactory() { if ( !factory_ ) - factory_ = new KXMLGUIFactory( this, TQT_TQOBJECT(this), "guifactory" ); + factory_ = new KXMLGUIFactory( this, this, "guifactory" ); return factory_; } @@ -441,7 +441,7 @@ int TDEMainWindow::configureToolbars() { saveMainWindowSettings(TDEGlobal::config()); KEditToolbar dlg(actionCollection(), xmlFile(), true, this); - connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(saveNewToolbarConfig())); + connect(&dlg, TQ_SIGNAL(newToolbarConfig()), TQ_SLOT(saveNewToolbarConfig())); return dlg.exec(); } @@ -458,7 +458,7 @@ void TDEMainWindow::setupGUI( int options, const TQString & xmlfile ) { void TDEMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & xmlfile ) { if( options & Keys ){ KStdAction::keyBindings(guiFactory(), - TQT_SLOT(configureShortcuts()), actionCollection()); + TQ_SLOT(configureShortcuts()), actionCollection()); } if( (options & StatusBar) && internalStatusBar() ){ @@ -467,8 +467,8 @@ void TDEMainWindow::setupGUI( TQSize defaultSize, int options, const TQString & if( options & ToolBar ){ setStandardToolBarMenuEnabled( true ); - KStdAction::configureToolbars(TQT_TQOBJECT(this), - TQT_SLOT(configureToolbars() ), actionCollection()); + KStdAction::configureToolbars(this, + TQ_SLOT(configureToolbars() ), actionCollection()); } if( options & Create ){ @@ -589,18 +589,18 @@ bool TDEMainWindow::isHelpMenuEnabled() void TDEMainWindow::setCaption( const TQString &caption ) { - setPlainCaption( kapp->makeStdCaption(caption) ); + setPlainCaption( tdeApp->makeStdCaption(caption) ); } void TDEMainWindow::setCaption( const TQString &caption, bool modified ) { - setPlainCaption( kapp->makeStdCaption(caption, true, modified) ); + setPlainCaption( tdeApp->makeStdCaption(caption, true, modified) ); } void TDEMainWindow::setPlainCaption( const TQString &caption ) { TQMainWindow::setCaption( caption ); -#if defined Q_WS_X11 +#if defined TQ_WS_X11 NETWinInfo info( tqt_xdisplay(), winId(), tqt_xrootwin(), 0 ); info.setName( caption.utf8().data() ); #endif @@ -657,11 +657,11 @@ void TDEMainWindow::closeEvent ( TQCloseEvent *e ) } if ( !no_query_exit && not_withdrawn <= 0 ) { // last window close accepted? - if ( queryExit() && !kapp->sessionSaving() && !d->shuttingDown ) { // Yes, Quit app? + if ( queryExit() && !tdeApp->sessionSaving() && !d->shuttingDown ) { // Yes, Quit app? // don't call queryExit() twice - disconnect(kapp, TQT_SIGNAL(shutDown()), this, TQT_SLOT(shuttingDown())); + disconnect(tdeApp, TQ_SIGNAL(shutDown()), this, TQ_SLOT(shuttingDown())); d->shuttingDown = true; - kapp->deref(); // ...and quit application. + tdeApp->deref(); // ...and quit application. } else { // cancel closing, it's stupid to end up with no windows at all.... e->ignore(); @@ -804,9 +804,9 @@ bool TDEMainWindow::isStandardToolBarMenuEnabled() const void TDEMainWindow::createStandardStatusBarAction(){ if(!d->showStatusBarAction){ - d->showStatusBarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(setSettingsDirty()), actionCollection()); + d->showStatusBarAction = KStdAction::showStatusbar(this, TQ_SLOT(setSettingsDirty()), actionCollection()); KStatusBar *sb = statusBar(); // Creates statusbar if it doesn't exist already. - connect(d->showStatusBarAction, TQT_SIGNAL(toggled(bool)), sb, TQT_SLOT(setShown(bool))); + connect(d->showStatusBarAction, TQ_SIGNAL(toggled(bool)), sb, TQ_SLOT(setShown(bool))); d->showStatusBarAction->setChecked(sb->isHidden()); } } @@ -913,7 +913,7 @@ void TDEMainWindow::saveWindowSize( TDEConfig * config ) const int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); int w, h; -#if defined Q_WS_X11 +#if defined TQ_WS_X11 // save maximalization as desktop size + 1 in that direction KWin::WindowInfo info = KWin::windowInfo( winId(), NET::WMState ); w = info.state() & NET::MaxHoriz ? desk.width() + 1 : width(); @@ -963,7 +963,7 @@ void TDEMainWindow::restoreWindowSize( TDEConfig * config ) } } if ( !size.isEmpty() ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 int state = 0; if (size.width() > desk.width()) { state = state | NET::MaxHoriz; @@ -1017,7 +1017,7 @@ void TDEMainWindow::setSettingsDirty() if ( !d->settingsTimer ) { d->settingsTimer = new TQTimer( this ); - connect( d->settingsTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( saveAutoSaveSettings() ) ); + connect( d->settingsTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( saveAutoSaveSettings() ) ); } d->settingsTimer->start( 500, true ); } @@ -1039,10 +1039,10 @@ void TDEMainWindow::setAutoSaveSettings( const TQString & groupName, bool saveWi d->autoSaveGroup = groupName; d->autoSaveWindowSize = saveWindowSize; // Get notified when the user moves a toolbar around - disconnect( this, TQT_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ), - this, TQT_SLOT( setSettingsDirty() ) ); - connect( this, TQT_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ), - this, TQT_SLOT( setSettingsDirty() ) ); + disconnect( this, TQ_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ), + this, TQ_SLOT( setSettingsDirty() ) ); + connect( this, TQ_SIGNAL( dockWindowPositionChanged( TQDockWindow * ) ), + this, TQ_SLOT( setSettingsDirty() ) ); // Now read the previously saved settings applyMainWindowSettings( TDEGlobal::config(), groupName ); @@ -1216,7 +1216,7 @@ TQSize TDEMainWindow::sizeForCentralWidgetSize(TQSize size) break; case TDEToolBar::Flat: - size += TQSize(0, 3+kapp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); + size += TQSize(0, 3+tdeApp->style().pixelMetric( TQStyle::PM_DockWindowHandleExtent )); break; default: @@ -1244,7 +1244,7 @@ TQSize TDEMainWindow::sizeForCentralWidgetSize(TQSize size) void TDEMainWindow::setIcon( const TQPixmap& p ) { TQMainWindow::setIcon( p ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 // Qt3 doesn't support _NET_WM_ICON, but TDEApplication::setTopWidget(), which // is used by TDEMainWindow, sets it KWin::setIcons( winId(), p, TQPixmap()); diff --git a/tdeui/tdemainwindow.h b/tdeui/tdemainwindow.h index 856590ab9..82b29e548 100644 --- a/tdeui/tdemainwindow.h +++ b/tdeui/tdemainwindow.h @@ -98,7 +98,7 @@ class DCOPObject; class TDEUI_EXPORT TDEMainWindow : public TQMainWindow, public KXMLGUIBuilder, virtual public KXMLGUIClient { friend class KMWSessionManaged; - Q_OBJECT + TQ_OBJECT public: /** @@ -235,7 +235,7 @@ public: * * That means clients could simply do the following: * \code - * if (kapp->isRestored()){ + * if (tdeApp->isRestored()){ * int n = 1; * while (TDEMainWindow::canBeRestored(n)){ * (new childMW)->restore(n); @@ -260,7 +260,7 @@ public: * for backwards compatibility with 3.1 and 3.0 branches: * * \code - * if (kapp->isRestored()) + * if (tdeApp->isRestored()) * RESTORE(childMW) * else { * // create default application as usual @@ -275,7 +275,7 @@ public: * use the templated kRestoreMainWindows global functions: * * \code - * if (kapp->isRestored()) + * if (tdeApp->isRestored()) * kRestoreMainWindows< childMW1, childMW2, childMW3 >(); * else { * // create default application as usual @@ -541,8 +541,8 @@ public: * this function) a connection needs to be made to let TDEMainWindow * know when that status (hidden/shown) of the statusbar has changed. * For example: - * connect(action, TQT_SIGNAL(activated()), - * tdemainwindow, TQT_SLOT(setSettingsDirty())); + * connect(action, TQ_SIGNAL(activated()), + * tdemainwindow, TQ_SLOT(setSettingsDirty())); * Otherwise the status (hidden/show) of the statusbar might not be saved * by TDEMainWindow. * @since 3.2 @@ -668,7 +668,7 @@ public: * */ // KDE4 to be removed - TQSize sizeForCentralWidgetSize(TQSize size) KDE_DEPRECATED; + TQSize sizeForCentralWidgetSize(TQSize size) TDE_DEPRECATED; /** * @internal @@ -683,7 +683,7 @@ public slots: * This slot can be connected dirrectly to the action to configure shortcuts. * This is very simple to do that by adding a single line * \code - * KStdAction::configureToolbars( guiFactory(), TQT_SLOT( configureToolbars() ), + * KStdAction::configureToolbars( guiFactory(), TQ_SLOT( configureToolbars() ), * actionCollection() ); * \endcode * @@ -734,8 +734,8 @@ public slots: * \code * TDEIconLoader &loader = *TDEGlobal::iconLoader(); * TQPixmap pixmap = loader.loadIcon( "help" ); - * toolBar(0)->insertButton( pixmap, 0, TQT_SIGNAL(clicked()), - * this, TQT_SLOT(appHelpActivated()), true, i18n("Help") ); + * toolBar(0)->insertButton( pixmap, 0, TQ_SIGNAL(clicked()), + * this, TQ_SLOT(appHelpActivated()), true, i18n("Help") ); * \endcode * */ diff --git a/tdeui/tdemainwindowiface.cpp b/tdeui/tdemainwindowiface.cpp index 0404249b0..a3c6c2282 100644 --- a/tdeui/tdemainwindowiface.cpp +++ b/tdeui/tdemainwindowiface.cpp @@ -34,7 +34,7 @@ TDEMainWindowInterface::TDEMainWindowInterface(TDEMainWindow * mainWindow) { m_MainWindow = mainWindow; m_dcopActionProxy = new KDCOPActionProxy( m_MainWindow->actionCollection(), this ); - m_dcopPropertyProxy = new KDCOPPropertyProxy(TQT_TQOBJECT(m_MainWindow)); + m_dcopPropertyProxy = new KDCOPPropertyProxy(m_MainWindow); } TDEMainWindowInterface::~TDEMainWindowInterface() @@ -122,7 +122,7 @@ TQCString TDEMainWindowInterface::actionToolTip( TQCString action) DCOPRef TDEMainWindowInterface::action( const TQCString &name ) { - return DCOPRef( kapp->dcopClient()->appId(), m_dcopActionProxy->actionObjectId( name ) ); + return DCOPRef( tdeApp->dcopClient()->appId(), m_dcopActionProxy->actionObjectId( name ) ); } TQMap<TQCString,DCOPRef> TDEMainWindowInterface::actionMap() diff --git a/tdeui/tdemenubar.cpp b/tdeui/tdemenubar.cpp index 0a5fe0188..c64e2c188 100644 --- a/tdeui/tdemenubar.cpp +++ b/tdeui/tdemenubar.cpp @@ -40,7 +40,7 @@ #include <kdebug.h> #include <kmanagerselection.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <twin.h> #include <twinmodule.h> #include <qxembed.h> @@ -74,7 +74,7 @@ public: : forcedTopLevel( false ), topLevel( false ), wasTopLevel( false ), -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 selection( NULL ), #endif min_size( 0, 0 ) @@ -82,7 +82,7 @@ public: } ~KMenuBarPrivate() { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 delete selection; #endif } @@ -93,7 +93,7 @@ public: int lineWidth; // dtto int margin; // dtto bool fallback_mode; // dtto -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 TDESelectionWatcher* selection; #endif TQTimer selection_timer; @@ -101,7 +101,7 @@ public: static Atom makeSelectionAtom(); }; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 static Atom selection_atom = None; static Atom msg_type_atom = None; @@ -121,7 +121,7 @@ void initAtoms() Atom KMenuBar::KMenuBarPrivate::makeSelectionAtom() { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( selection_atom == None ) initAtoms(); return selection_atom; @@ -133,19 +133,19 @@ Atom KMenuBar::KMenuBarPrivate::makeSelectionAtom() KMenuBar::KMenuBar(TQWidget *parent, const char *name) : TQMenuBar(parent, name) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 QXEmbed::initialize(); #endif d = new KMenuBarPrivate; - connect( &d->selection_timer, TQT_SIGNAL( timeout()), - this, TQT_SLOT( selectionTimeout())); + connect( &d->selection_timer, TQ_SIGNAL( timeout()), + this, TQ_SLOT( selectionTimeout())); - connect( tqApp->desktop(), TQT_SIGNAL( resized( int )), TQT_SLOT( updateFallbackSize())); + connect( tqApp->desktop(), TQ_SIGNAL( resized( int )), TQ_SLOT( updateFallbackSize())); - if ( kapp ) + if ( tdeApp ) // toolbarAppearanceChanged(int) is sent when changing macstyle - connect( kapp, TQT_SIGNAL(toolbarAppearanceChanged(int)), - this, TQT_SLOT(slotReadConfig())); + connect( tdeApp, TQ_SIGNAL(toolbarAppearanceChanged(int)), + this, TQ_SLOT(slotReadConfig())); slotReadConfig(); } @@ -176,13 +176,13 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) d->topLevel = top_level; if ( isTopLevelMenu() ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 d->selection = new TDESelectionWatcher( KMenuBarPrivate::makeSelectionAtom(), DefaultScreen( tqt_xdisplay())); - connect( d->selection, TQT_SIGNAL( newOwner( Window )), - this, TQT_SLOT( updateFallbackSize())); - connect( d->selection, TQT_SIGNAL( lostOwner()), - this, TQT_SLOT( updateFallbackSize())); + connect( d->selection, TQ_SIGNAL( newOwner( Window )), + this, TQ_SLOT( updateFallbackSize())); + connect( d->selection, TQ_SIGNAL( lostOwner()), + this, TQ_SLOT( updateFallbackSize())); #endif d->frameStyle = frameStyle(); d->lineWidth = lineWidth(); @@ -190,7 +190,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) d->fallback_mode = false; bool wasShown = !isHidden(); reparent( parentWidget(), (WFlags)(WType_TopLevel | WStyle_Tool | WStyle_Customize | WStyle_NoBorder), TQPoint(0,0), false ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::setType( winId(), NET::TopMenu ); if( parentWidget()) XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); @@ -206,7 +206,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level) show(); } else { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 delete d->selection; d->selection = NULL; #endif @@ -244,7 +244,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) { if ( d->topLevel ) { - if ( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget()) ) + if ( parentWidget() && obj == parentWidget()->topLevelWidget() ) { if( ev->type() == TQEvent::Resize ) return false; // ignore resizing of parent, TQMenuBar would try to adjust size @@ -257,20 +257,20 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) // will update the state properly setTopLevelMenuInternal( d->topLevel ); } - if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()) && ev->type() == TQEvent::Reparent ) + if( parentWidget() && obj == parentWidget() && ev->type() == TQEvent::Reparent ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #else //TODO: WIN32? #endif setShown( parentWidget()->isTopLevel() || parentWidget()->isVisible()); } - if( parentWidget() && !parentWidget()->isTopLevel() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget())) + if( parentWidget() && !parentWidget()->isTopLevel() && obj == parentWidget()) { // if the parent is not toplevel, KMenuBar needs to match its visibility status if( ev->type() == TQEvent::Show ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId()); #else //TODO: WIN32? @@ -283,7 +283,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev) } else { - if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()->topLevelWidget())) + if( parentWidget() && obj == parentWidget()->topLevelWidget()) { if( ev->type() == TQEvent::WindowStateChange && !parentWidget()->topLevelWidget()->isFullScreen() ) @@ -303,7 +303,7 @@ void KMenuBar::updateFallbackSize() { if( !d->topLevel ) return; -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( d->selection->owner() != None ) #endif { // somebody is managing us, don't mess anything, undo changes @@ -333,14 +333,14 @@ void KMenuBar::selectionTimeout() int screen = xineramaConfig.readNumEntry("MenubarScreen", TQApplication::desktop()->screenNumber(TQPoint(0,0)) ); TQRect area; - if (kapp->desktop()->numScreens() < 2) - area = kapp->desktop()->geometry(); + if (tdeApp->desktop()->numScreens() < 2) + area = tdeApp->desktop()->geometry(); else - area = kapp->desktop()->screenGeometry(screen); + area = tdeApp->desktop()->screenGeometry(screen); int margin = 0; move(area.left() - margin, area.top() - margin); setFixedSize(area.width() + 2* margin , heightForWidth( area.width() + 2 * margin ) ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 int strut_height = height() - margin; if( strut_height < 0 ) strut_height = 0; @@ -426,7 +426,7 @@ TQSize KMenuBar::sizeHint() const return TQSize( w, h ); } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 bool KMenuBar::x11Event( XEvent* ev ) { if( ev->type == ClientMessage && ev->xclient.message_type == msg_type_atom diff --git a/tdeui/tdemenubar.h b/tdeui/tdemenubar.h index 18ee3bf90..07345978d 100644 --- a/tdeui/tdemenubar.h +++ b/tdeui/tdemenubar.h @@ -41,7 +41,7 @@ class TDEUI_EXPORT KMenuBar : public TQMenuBar { - Q_OBJECT + TQ_OBJECT public: @@ -91,7 +91,7 @@ protected: virtual void showEvent( TQShowEvent* ); virtual void resizeEvent( TQResizeEvent* ); virtual bool eventFilter(TQObject *, TQEvent *); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 virtual bool x11Event( XEvent* ); #endif virtual void closeEvent( TQCloseEvent* ); diff --git a/tdeui/tdemessagebox.cpp b/tdeui/tdemessagebox.cpp index 3208e94d8..b92e32488 100644 --- a/tdeui/tdemessagebox.cpp +++ b/tdeui/tdemessagebox.cpp @@ -45,7 +45,7 @@ #include <kiconloader.h> #include <tdeglobalsettings.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include <X11/Xlib.h> #endif @@ -164,7 +164,7 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon, if (!icon.isNull()) label1->setPixmap(icon); - lay->addWidget( label1, 0, Qt::AlignCenter ); + lay->addWidget( label1, 0, TQt::AlignCenter ); lay->addSpacing(KDialog::spacingHint()); // Enforce <p>text</p> otherwise the word-wrap doesn't work well TQString qt_text = qrichtextify( text ); @@ -214,8 +214,8 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon, KActiveLabel *label2 = new KActiveLabel( qt_text, contents ); if (!(options & KMessageBox::AllowLink)) { - TQObject::disconnect(label2, TQT_SIGNAL(linkClicked(const TQString &)), - label2, TQT_SLOT(openLink(const TQString &))); + TQObject::disconnect(label2, TQ_SIGNAL(linkClicked(const TQString &)), + label2, TQ_SLOT(openLink(const TQString &))); } // We add 10 pixels extra to compensate for some KActiveLabel margins. @@ -250,8 +250,8 @@ int KMessageBox::createKMessageBox(KDialogBase *dialog, TQPixmap icon, label3->setMinimumSize(label3->sizeHint()); if (!(options & KMessageBox::AllowLink)) { - TQObject::disconnect(label3, TQT_SIGNAL(linkClicked(const TQString &)), - label3, TQT_SLOT(openLink(const TQString &))); + TQObject::disconnect(label3, TQ_SIGNAL(linkClicked(const TQString &)), + label3, TQ_SLOT(openLink(const TQString &))); } } else { TQTextEdit* te = new TQTextEdit(details, TQString::null, detailsGroup); @@ -423,7 +423,7 @@ KMessageBox::questionYesNoListWId(WId parent_id, const TQString &text, if ( !shouldBeShownYesNo(dontAskAgainName, res) ) return res; - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Question") : caption, KDialogBase::Yes | KDialogBase::No, @@ -432,7 +432,7 @@ KMessageBox::questionYesNoListWId(WId parent_id, const TQString &text, buttonYes, buttonNo); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -474,7 +474,7 @@ KMessageBox::questionYesNoCancelWId(WId parent_id, if ( !shouldBeShownYesNo(dontAskAgainName, res) ) return res; - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Question") : caption, KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel, @@ -483,7 +483,7 @@ KMessageBox::questionYesNoCancelWId(WId parent_id, buttonYes, buttonNo); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -556,7 +556,7 @@ KMessageBox::warningYesNoListWId(WId parent_id, const TQString &text, if ( !shouldBeShownYesNo(dontAskAgainName, res) ) return res; - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Warning") : caption, KDialogBase::Yes | KDialogBase::No, @@ -565,7 +565,7 @@ KMessageBox::warningYesNoListWId(WId parent_id, const TQString &text, buttonYes, buttonNo); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -628,7 +628,7 @@ KMessageBox::warningContinueCancelListWId(WId parent_id, const TQString &text, if ( !shouldBeShownContinue(dontAskAgainName) ) return Continue; - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Warning") : caption, KDialogBase::Yes | KDialogBase::No, @@ -637,7 +637,7 @@ KMessageBox::warningContinueCancelListWId(WId parent_id, const TQString &text, buttonContinue, KStdGuiItem::cancel() ); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -704,7 +704,7 @@ KMessageBox::warningYesNoCancelListWId(WId parent_id, const TQString &text, if ( !shouldBeShownYesNo(dontAskAgainName, res) ) return res; - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Warning") : caption, KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel, @@ -713,7 +713,7 @@ KMessageBox::warningYesNoCancelListWId(WId parent_id, const TQString &text, buttonYes, buttonNo); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -755,7 +755,7 @@ void KMessageBox::errorListWId(WId parent_id, const TQString &text, const TQStringList &strlist, const TQString &caption, int options) { - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Error") : caption, KDialogBase::Yes, @@ -764,7 +764,7 @@ KMessageBox::errorListWId(WId parent_id, const TQString &text, const TQStringLi KStdGuiItem::ok() ); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -785,7 +785,7 @@ KMessageBox::detailedErrorWId(WId parent_id, const TQString &text, const TQString &details, const TQString &caption, int options) { - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Error") : caption, KDialogBase::Yes | KDialogBase::Details, @@ -794,7 +794,7 @@ KMessageBox::detailedErrorWId(WId parent_id, const TQString &text, KStdGuiItem::ok() ); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -832,7 +832,7 @@ void KMessageBox::sorryWId(WId parent_id, const TQString &text, const TQString &caption, int options) { - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Sorry") : caption, KDialogBase::Yes, @@ -841,7 +841,7 @@ KMessageBox::sorryWId(WId parent_id, const TQString &text, KStdGuiItem::ok() ); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -862,7 +862,7 @@ KMessageBox::detailedSorryWId(WId parent_id, const TQString &text, const TQString &details, const TQString &caption, int options) { - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Sorry") : caption, KDialogBase::Yes | KDialogBase::Details, @@ -871,7 +871,7 @@ KMessageBox::detailedSorryWId(WId parent_id, const TQString &text, KStdGuiItem::ok() ); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -908,7 +908,7 @@ KMessageBox::informationListWId(WId parent_id,const TQString &text, const TQStri if ( !shouldBeShownContinue(dontShowAgainName) ) return; - TQWidget* parent = TQT_TQWIDGET(TQWidget::find( parent_id )); + TQWidget* parent = TQWidget::find( parent_id ); KDialogBase *dialog= new KDialogBase( caption.isEmpty() ? i18n("Information") : caption, KDialogBase::Yes, @@ -917,7 +917,7 @@ KMessageBox::informationListWId(WId parent_id,const TQString &text, const TQStri KStdGuiItem::ok() ); if( options & PlainCaption ) dialog->setPlainCaption( caption ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 if( parent == NULL && parent_id ) XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id ); #endif @@ -972,7 +972,7 @@ KMessageBox::about(TQWidget *parent, const TQString &text, { TQString _caption = caption; if (_caption.isEmpty()) - _caption = i18n("About %1").arg(kapp->caption()); + _caption = i18n("About %1").arg(tdeApp->caption()); KDialogBase *dialog = new KDialogBase( caption, @@ -981,7 +981,7 @@ KMessageBox::about(TQWidget *parent, const TQString &text, parent, "about", true, true, KStdGuiItem::ok() ); - TQPixmap ret = TDEApplication::kApplication()->icon(); + TQPixmap ret = tdeApp->icon(); if (ret.isNull()) ret = TQMessageBox::standardIcon(TQMessageBox::Information); dialog->setIcon(ret); diff --git a/tdeui/tdepassivepopupstack.cpp b/tdeui/tdepassivepopupstack.cpp index 9f116059f..cef63db18 100644 --- a/tdeui/tdepassivepopupstack.cpp +++ b/tdeui/tdepassivepopupstack.cpp @@ -60,9 +60,9 @@ KPassivePopup* TDEPassivePopupStackContainer::displayMessage(TQString title, TQS leftCorner.setX(mRightOfStack-popupSize.width()); leftCorner.setY(mTopOfStack); } - connect(popup, SIGNAL(hidden(KPassivePopup*)), this, SLOT(popupClosed(KPassivePopup*))); - connect(popup, SIGNAL(clicked(TQPoint)), this, SLOT(popupClicked(TQPoint))); - connect(popup, SIGNAL(destroyed(TQObject*)), this, SLOT(popupDestroyed(TQObject*))); + connect(popup, TQ_SIGNAL(hidden(KPassivePopup*)), this, TQ_SLOT(popupClosed(KPassivePopup*))); + connect(popup, TQ_SIGNAL(clicked(TQPoint)), this, TQ_SLOT(popupClicked(TQPoint))); + connect(popup, TQ_SIGNAL(destroyed(TQObject*)), this, TQ_SLOT(popupDestroyed(TQObject*))); mPopupList.append(popup); mPopupIDMap[popup] = id; popup->show(leftCorner); @@ -104,4 +104,4 @@ void TDEPassivePopupStackContainer::popupDestroyed(TQObject* object) { } } -#include "tdepassivepopupstack.moc"
\ No newline at end of file +#include "tdepassivepopupstack.moc" diff --git a/tdeui/tdepassivepopupstack.h b/tdeui/tdepassivepopupstack.h index 61ef209e1..13ac29f44 100644 --- a/tdeui/tdepassivepopupstack.h +++ b/tdeui/tdepassivepopupstack.h @@ -32,7 +32,7 @@ typedef TQMap<KPassivePopup*, TQString> TQStringPopupIDMap; class TDEUI_EXPORT TDEPassivePopupStackContainer : public TQWidget { - Q_OBJECT + TQ_OBJECT public: TDEPassivePopupStackContainer(TQWidget *parent=0, const char *name=0); diff --git a/tdeui/tdepopupmenu.cpp b/tdeui/tdepopupmenu.cpp index 3fd8a90e2..7c024e31a 100644 --- a/tdeui/tdepopupmenu.cpp +++ b/tdeui/tdepopupmenu.cpp @@ -21,10 +21,6 @@ #include <tqtimer.h> #include <tqfontmetrics.h> -#ifdef USE_QT4 -#undef None -#endif // USE_QT4 - #include <tqstyle.h> #include "tdepopupmenu.h" @@ -90,7 +86,7 @@ void TDEPopupTitle::paintEvent(TQPaintEvent *) { TQRect r(rect()); TQPainter p(this); - kapp->style().tqdrawPrimitive(TQStyle::PE_HeaderSectionMenu, &p, r, palette().active()); + tdeApp->style().drawPrimitive(TQStyle::PE_HeaderSectionMenu, &p, r, palette().active()); if (!miniicon.isNull()) p.drawPixmap(4, (r.height()-miniicon.height())/2, miniicon); @@ -128,7 +124,7 @@ public: , shortcuts(false) , autoExec(false) , lastHitIndex(-1) - , state(Qt::NoButton) + , state(TQt::NoButton) , m_ctxMenu(0) {} @@ -168,7 +164,7 @@ TDEPopupMenu::TDEPopupMenu(TQWidget *parent, const char *name) { d = new TDEPopupMenuPrivate; resetKeyboardVars(); - connect(&(d->clearTimer), TQT_SIGNAL(timeout()), TQT_SLOT(resetKeyboardVars())); + connect(&(d->clearTimer), TQ_SIGNAL(timeout()), TQ_SLOT(resetKeyboardVars())); } TDEPopupMenu::~TDEPopupMenu() @@ -278,7 +274,7 @@ void TDEPopupMenu::closeEvent(TQCloseEvent*e) void TDEPopupMenu::activateItemAt(int index) { - d->state = Qt::NoButton; + d->state = TQt::NoButton; TQPopupMenu::activateItemAt(index); } @@ -289,7 +285,7 @@ TQt::ButtonState TDEPopupMenu::state() const void TDEPopupMenu::keyPressEvent(TQKeyEvent* e) { - d->state = Qt::NoButton; + d->state = TQt::NoButton; if (!d->shortcuts) { // continue event processing by Qpopup //e->ignore(); @@ -518,7 +514,7 @@ TQPopupMenu* TDEPopupMenu::contextMenu() if (!d->m_ctxMenu) { d->m_ctxMenu = new TQPopupMenu(this); - connect(d->m_ctxMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(ctxMenuHiding())); + connect(d->m_ctxMenu, TQ_SIGNAL(aboutToHide()), this, TQ_SLOT(ctxMenuHiding())); } return d->m_ctxMenu; @@ -563,7 +559,7 @@ void TDEPopupMenu::showCtxMenu(TQPoint pos) TQPopupMenu* subMenu = item->popup(); if (subMenu) { - disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu())); + disconnect(subMenu, TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(ctxMenuHideShowingMenu())); } } @@ -580,8 +576,8 @@ void TDEPopupMenu::showCtxMenu(TQPoint pos) TQPopupMenu* subMenu = findItem(TDEPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { - connect(subMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(ctxMenuHideShowingMenu())); - TQTimer::singleShot(100, subMenu, TQT_SLOT(hide())); + connect(subMenu, TQ_SIGNAL(aboutToShow()), TQ_SLOT(ctxMenuHideShowingMenu())); + TQTimer::singleShot(100, subMenu, TQ_SLOT(hide())); } if (!TDEPopupMenuPrivate::s_continueCtxMenuShow) @@ -592,7 +588,7 @@ void TDEPopupMenu::showCtxMenu(TQPoint pos) TDEPopupMenuPrivate::s_contextedMenu = this; d->m_ctxMenu->popup(this->mapToGlobal(pos)); - connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int))); + connect(this, TQ_SIGNAL(highlighted(int)), this, TQ_SLOT(itemHighlighted(int))); } /* @@ -607,7 +603,7 @@ void TDEPopupMenu::ctxMenuHideShowingMenu() TQPopupMenu* subMenu = item->popup(); if (subMenu) { - TQTimer::singleShot(0, subMenu, TQT_SLOT(hide())); + TQTimer::singleShot(0, subMenu, TQ_SLOT(hide())); } } } @@ -619,11 +615,11 @@ void TDEPopupMenu::ctxMenuHiding() TQPopupMenu* subMenu = findItem(TDEPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { - disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu())); + disconnect(subMenu, TQ_SIGNAL(aboutToShow()), this, TQ_SLOT(ctxMenuHideShowingMenu())); } } - disconnect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(itemHighlighted(int))); + disconnect(this, TQ_SIGNAL(highlighted(int)), this, TQ_SLOT(itemHighlighted(int))); TDEPopupMenuPrivate::s_continueCtxMenuShow = true; } diff --git a/tdeui/tdepopupmenu.h b/tdeui/tdepopupmenu.h index 7f84a5fc5..d0bc0b49b 100644 --- a/tdeui/tdepopupmenu.h +++ b/tdeui/tdepopupmenu.h @@ -37,7 +37,7 @@ */ class TDEUI_EXPORT TDEPopupTitle : public TQWidget { - Q_OBJECT + TQ_OBJECT public: /** @@ -51,14 +51,14 @@ public: */ TDEPopupTitle(KPixmapEffect::GradientType gradient, const TQColor &color, const TQColor &textColor, TQWidget *parent=0, - const char *name=0) KDE_DEPRECATED; + const char *name=0) TDE_DEPRECATED; /** * @deprecated * Constructs a title widget with the specified pixmap and colors. */ TDEPopupTitle(const KPixmap &background, const TQColor &color, const TQColor &textColor, TQWidget *parent=0, - const char *name=0) KDE_DEPRECATED; + const char *name=0) TDE_DEPRECATED; /** * Sets the title string and optional icon for the title widget. * @@ -121,7 +121,7 @@ private: * @author Hamish Rodda <rodda@kde.org> */ class TDEUI_EXPORT TDEPopupMenu : public TQPopupMenu { - Q_OBJECT + TQ_OBJECT public: /** @@ -191,14 +191,14 @@ public: * Obsolete method provided for backwards compatibility only. Use the * normal constructor and insertTitle instead. */ - TDEPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) KDE_DEPRECATED; + TDEPopupMenu(const TQString &title, TQWidget *parent=0, const char *name=0) TDE_DEPRECATED; /** * @deprecated * Obsolete method provided for backwards compatibility only. Use * insertTitle and changeTitle instead. */ - void setTitle(const TQString &title) KDE_DEPRECATED; + void setTitle(const TQString &title) TDE_DEPRECATED; /** * Returns the context menu associated with this menu diff --git a/tdeui/tdeselect.cpp b/tdeui/tdeselect.cpp index 272f7a144..3d453f01e 100644 --- a/tdeui/tdeselect.cpp +++ b/tdeui/tdeselect.cpp @@ -122,7 +122,7 @@ void KXYSelector::paintEvent( TQPaintEvent *ev ) TQPainter painter; painter.begin( this ); - style().tqdrawPrimitive(TQStyle::PE_Panel, &painter, + style().drawPrimitive(TQStyle::PE_Panel, &painter, borderRect, colorGroup(), TQStyle::Style_Sunken); @@ -160,7 +160,7 @@ void KXYSelector::mouseMoveEvent( TQMouseEvent *e ) void KXYSelector::wheelEvent( TQWheelEvent *e ) { - if ( e->orientation() == Qt::Horizontal ) + if ( e->orientation() == TQt::Horizontal ) setValues( xValue() + e->delta()/120, yValue() ); else setValues( xValue(), yValue() + e->delta()/120 ); @@ -238,7 +238,7 @@ void KXYSelector::drawCursor( TQPainter *p, int xp, int yp ) TDESelector::TDESelector( TQWidget *parent, const char *name ) : TQWidget( parent, name ), TQRangeControl() { - _orientation = Qt::Horizontal; + _orientation = TQt::Horizontal; _indent = true; } @@ -258,7 +258,7 @@ TQRect TDESelector::contentsRect() const { int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; - if ( orientation() == Qt::Vertical ) + if ( orientation() == TQt::Vertical ) return TQRect( w, iw, width() - w * 2 - 5, height() - 2 * iw ); else return TQRect( iw, w, width() - 2 * iw, height() - w * 2 - 5 ); @@ -277,11 +277,11 @@ void TDESelector::paintEvent( TQPaintEvent * ) if ( indent() ) { TQRect r = rect(); - if ( orientation() == Qt::Vertical ) + if ( orientation() == TQt::Vertical ) r.addCoords(0, iw - w, -iw, w - iw); else r.addCoords(iw - w, 0, w - iw, -iw); - style().tqdrawPrimitive(TQStyle::PE_Panel, &painter, + style().drawPrimitive(TQStyle::PE_Panel, &painter, r, colorGroup(), TQStyle::Style_Sunken); } @@ -332,7 +332,7 @@ void TDESelector::moveArrow( const TQPoint &pos ) int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; - if ( orientation() == Qt::Vertical ) + if ( orientation() == TQt::Vertical ) val = ( maxValue() - minValue() ) * (height()-pos.y()-5+w) / (height()-iw*2) + minValue(); else @@ -348,7 +348,7 @@ TQPoint TDESelector::calcArrowPos( int val ) int w = style().pixelMetric(TQStyle::PM_DefaultFrameWidth); int iw = (w < 5) ? 5 : w; - if ( orientation() == Qt::Vertical ) + if ( orientation() == TQt::Vertical ) { p.setY( height() - ( (height()-2*iw) * val / ( maxValue() - minValue() ) + 5 ) ); @@ -377,7 +377,7 @@ void TDESelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) painter->setBrush( TQBrush( colorGroup().buttonText() ) ); array.setPoint( 0, pos.x()+0, pos.y()+0 ); array.setPoint( 1, pos.x()+5, pos.y()+5 ); - if ( orientation() == Qt::Vertical ) + if ( orientation() == TQt::Vertical ) { array.setPoint( 2, pos.x()+5, pos.y()-5 ); } @@ -390,7 +390,7 @@ void TDESelector::drawArrow( TQPainter *painter, bool show, const TQPoint &pos ) } else { - if ( orientation() == Qt::Vertical ) + if ( orientation() == TQt::Vertical ) { repaint(pos.x(), pos.y()-5, 6, 11, true); } @@ -442,7 +442,7 @@ void KGradientSelector::drawContents( TQPainter *painter ) int greenDiff = color2.green() - color1.green(); int blueDiff = color2.blue() - color1.blue(); - if ( orientation() == Qt::Vertical ) + if ( orientation() == TQt::Vertical ) { for ( int y = 0; y < image.height(); y++ ) { @@ -488,7 +488,7 @@ void KGradientSelector::drawContents( TQPainter *painter ) painter->drawPixmap( contentsRect().x(), contentsRect().y(), p ); - if ( orientation() == Qt::Vertical ) + if ( orientation() == TQt::Vertical ) { int yPos = contentsRect().top() + painter->fontMetrics().ascent() + 2; int xPos = contentsRect().left() + (contentsRect().width() - diff --git a/tdeui/tdeselect.h b/tdeui/tdeselect.h index 19321da1b..748b5897a 100644 --- a/tdeui/tdeselect.h +++ b/tdeui/tdeselect.h @@ -42,7 +42,7 @@ */ class TDEUI_EXPORT KXYSelector : public TQWidget { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int xValue READ xValue WRITE setXValue ) TQ_PROPERTY( int yValue READ yValue WRITE setYValue ) @@ -158,7 +158,7 @@ private: */ class TDEUI_EXPORT TDESelector : public TQWidget, public TQRangeControl { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( int value READ value WRITE setValue ) TQ_PROPERTY( int minValue READ minValue WRITE setMinValue ) TQ_PROPERTY( int maxValue READ maxValue WRITE setMaxValue ) @@ -292,7 +292,7 @@ private: **/ class TDEUI_EXPORT KGradientSelector : public TDESelector { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( TQColor firstColor READ firstColor WRITE setFirstColor ) TQ_PROPERTY( TQColor secondColor READ secondColor WRITE setSecondColor ) diff --git a/tdeui/tdeshortcutdialog.cpp b/tdeui/tdeshortcutdialog.cpp index 4d95970b6..f808cd5b3 100644 --- a/tdeui/tdeshortcutdialog.cpp +++ b/tdeui/tdeshortcutdialog.cpp @@ -21,7 +21,7 @@ #include <tqvariant.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #define XK_XKB_KEYS #define XK_MISCELLANY #include <X11/Xlib.h> // For x11Event() @@ -37,7 +37,7 @@ #undef FocusOut #undef FocusIn #endif -#elif defined(Q_WS_WIN) +#elif defined(TQ_WS_WIN) # include <kkeyserver.h> #endif @@ -91,21 +91,21 @@ TDEShortcutDialog::TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShort m_simple->m_btnClearShortcut->setPixmap( SmallIcon( "locationbar_erase" ) ); m_adv->m_btnClearPrimary->setPixmap( SmallIcon( "locationbar_erase" ) ); m_adv->m_btnClearAlternate->setPixmap( SmallIcon( "locationbar_erase" ) ); - connect(m_simple->m_btnClearShortcut, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotClearShortcut())); - connect(m_adv->m_btnClearPrimary, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotClearPrimary())); - connect(m_adv->m_btnClearAlternate, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotClearAlternate())); - - connect(m_adv->m_txtPrimary, TQT_SIGNAL(clicked()), - m_adv->m_btnPrimary, TQT_SLOT(animateClick())); - connect(m_adv->m_txtAlternate, TQT_SIGNAL(clicked()), - m_adv->m_btnAlternate, TQT_SLOT(animateClick())); - connect(m_adv->m_btnPrimary, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectPrimary())); - connect(m_adv->m_btnAlternate, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectAlternate())); + connect(m_simple->m_btnClearShortcut, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotClearShortcut())); + connect(m_adv->m_btnClearPrimary, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotClearPrimary())); + connect(m_adv->m_btnClearAlternate, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotClearAlternate())); + + connect(m_adv->m_txtPrimary, TQ_SIGNAL(clicked()), + m_adv->m_btnPrimary, TQ_SLOT(animateClick())); + connect(m_adv->m_txtAlternate, TQ_SIGNAL(clicked()), + m_adv->m_btnAlternate, TQ_SLOT(animateClick())); + connect(m_adv->m_btnPrimary, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectPrimary())); + connect(m_adv->m_btnAlternate, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectAlternate())); KGuiItem ok = KStdGuiItem::ok(); ok.setText( i18n( "OK" ) ); @@ -121,8 +121,8 @@ TDEShortcutDialog::TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShort s_showMore = TDEConfigGroup(TDEGlobal::config(), "General").readBoolEntry("ShowAlternativeShortcutConfig", s_showMore); updateDetails(); - #ifdef Q_WS_X11 - kapp->installX11EventFilter( this ); // Allow button to capture X Key Events. + #ifdef TQ_WS_X11 + tdeApp->installX11EventFilter( this ); // Allow button to capture X Key Events. #endif } @@ -219,7 +219,7 @@ void TDEShortcutDialog::updateDetails() m_simple->m_txtShortcut->setFocus(); m_adv->m_btnMultiKey->setChecked( false ); } - kapp->processEvents(); + tdeApp->processEvents(); adjustSize(); } @@ -276,7 +276,7 @@ void TDEShortcutDialog::slotMultiKeyMode( bool bOn ) } } -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 /* we don't use the generic Qt code on X11 because it allows us to grab the keyboard so that all keypresses are seen */ @@ -387,7 +387,7 @@ void TDEShortcutDialog::x11KeyReleaseEvent( XEvent* pEvent ) updateShortcutDisplay(); } } -#elif defined(Q_WS_WIN) +#elif defined(TQ_WS_WIN) void TDEShortcutDialog::keyPressEvent( TQKeyEvent * e ) { kdDebug() << e->text() << " " << (int)e->text()[0].latin1()<< " " << (int)e->ascii() << endl; @@ -442,7 +442,7 @@ void TDEShortcutDialog::keyPressEvent( TQKeyEvent * e ) updateShortcutDisplay(); if( !m_adv->m_btnMultiKey->isChecked() ) - TQTimer::singleShot(500, this, TQT_SLOT(accept())); + TQTimer::singleShot(500, this, TQ_SLOT(accept())); } return; } @@ -520,7 +520,7 @@ void TDEShortcutDialog::keyPressed( KKey key ) updateShortcutDisplay(); if( !m_adv->m_btnMultiKey->isChecked() ) - TQTimer::singleShot(500, this, TQT_SLOT(accept())); + TQTimer::singleShot(500, this, TQ_SLOT(accept())); } #include "tdeshortcutdialog.moc" diff --git a/tdeui/tdeshortcutdialog.h b/tdeui/tdeshortcutdialog.h index afad6fda2..348996878 100644 --- a/tdeui/tdeshortcutdialog.h +++ b/tdeui/tdeshortcutdialog.h @@ -40,7 +40,7 @@ class TDEShortcutDialogAdvanced; */ class TDEUI_EXPORT TDEShortcutDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: TDEShortcutDialog( const TDEShortcut& shortcut, bool bQtShortcut, TQWidget* parent = 0, const char* name = 0 ); ~TDEShortcutDialog(); @@ -67,13 +67,13 @@ private: void keyPressed( KKey key ); void updateDetails(); - #ifdef Q_WS_X11 + #ifdef TQ_WS_X11 virtual bool x11Event( XEvent *pEvent ); //void x11EventKeyPress( XEvent *pEvent ); void x11KeyPressEvent( XEvent* pEvent ); void x11KeyReleaseEvent( XEvent* pEvent ); #endif - #ifdef Q_WS_WIN + #ifdef TQ_WS_WIN virtual void keyPressEvent( TQKeyEvent * e ); virtual bool event(TQEvent * e); #endif diff --git a/tdeui/tdespell.cpp b/tdeui/tdespell.cpp index e5d21d45b..a7792eaf7 100644 --- a/tdeui/tdespell.cpp +++ b/tdeui/tdespell.cpp @@ -44,7 +44,7 @@ #include "tdespell.h" #include "tdespelldlg.h" #include <twin.h> -#include <kprocio.h> +#include <tdeprocio.h> #define MAXLINELENGTH 10000 #undef IGNORE //fix possible conflict @@ -96,11 +96,11 @@ public: */ -// Connects a slot to KProcIO's output signal -#define OUTPUT(x) (connect (proc, TQT_SIGNAL (readReady(KProcIO *)), this, TQT_SLOT (x(KProcIO *)))) +// Connects a slot to TDEProcIO's output signal +#define OUTPUT(x) (connect (proc, TQ_SIGNAL (readReady(TDEProcIO *)), this, TQ_SLOT (x(TDEProcIO *)))) // Disconnect a slot from... -#define NOOUTPUT(x) (disconnect (proc, TQT_SIGNAL (readReady(KProcIO *)), this, TQT_SLOT (x(KProcIO *)))) +#define NOOUTPUT(x) (disconnect (proc, TQ_SIGNAL (readReady(TDEProcIO *)), this, TQ_SLOT (x(TDEProcIO *)))) @@ -296,11 +296,11 @@ KSpell::startIspell() if (trystart == 0) //don't connect these multiple times { - connect( proc, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), - this, TQT_SLOT(ispellErrors(TDEProcess *, char *, int)) ); + connect( proc, TQ_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + this, TQ_SLOT(ispellErrors(TDEProcess *, char *, int)) ); - connect( proc, TQT_SIGNAL(processExited(TDEProcess *)), - this, TQT_SLOT(ispellExit (TDEProcess *)) ); + connect( proc, TQ_SIGNAL(processExited(TDEProcess *)), + this, TQ_SLOT(ispellExit (TDEProcess *)) ); OUTPUT(KSpell2); } @@ -308,7 +308,7 @@ KSpell::startIspell() if ( !proc->start() ) { m_status = Error; - TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath())); + TQTimer::singleShot( 0, this, TQ_SLOT(emitDeath())); } } @@ -319,7 +319,7 @@ KSpell::ispellErrors( TDEProcess *, char *buffer, int buflen ) // kdDebug(750) << "ispellErrors [" << buffer << "]\n" << endl; } -void KSpell::KSpell2( KProcIO * ) +void KSpell::KSpell2( TDEProcIO * ) { TQString line; @@ -331,14 +331,14 @@ void KSpell::KSpell2( KProcIO * ) if ( proc->readln( line, true ) == -1 ) { - TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(emitDeath()) ); return; } if ( line[0] != '@' ) //@ indicates that ispell is working fine { - TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(emitDeath()) ); return; } @@ -346,7 +346,7 @@ void KSpell::KSpell2( KProcIO * ) if ( !ignore("kde") ) { kdDebug(750) << "@KDE was false" << endl; - TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(emitDeath()) ); return; } @@ -354,7 +354,7 @@ void KSpell::KSpell2( KProcIO * ) if ( !ignore("linux") ) { kdDebug(750) << "@Linux was false" << endl; - TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(emitDeath()) ); return; } @@ -375,13 +375,13 @@ KSpell::setUpDialog( bool reallyuseprogressbar ) progressbar && reallyuseprogressbar, modaldlg ); ksdlg->setCaption( caption ); - connect( ksdlg, TQT_SIGNAL(command(int)), - this, TQT_SLOT(slotStopCancel(int)) ); - connect( this, TQT_SIGNAL(progress(unsigned int)), - ksdlg, TQT_SLOT(slotProgress(unsigned int)) ); + connect( ksdlg, TQ_SIGNAL(command(int)), + this, TQ_SLOT(slotStopCancel(int)) ); + connect( this, TQ_SIGNAL(progress(unsigned int)), + ksdlg, TQ_SLOT(slotProgress(unsigned int)) ); -#ifdef Q_WS_X11 // FIXME(E): Implement for Qt/Embedded - KWin::setIcons( ksdlg->winId(), kapp->icon(), kapp->miniIcon() ); +#ifdef TQ_WS_X11 // FIXME(E): Implement for Qt/Embedded + KWin::setIcons( ksdlg->winId(), tdeApp->icon(), tdeApp->miniIcon() ); #endif if ( modaldlg ) ksdlg->setFocus(); @@ -488,7 +488,7 @@ bool KSpell::checkWord( const TQString & buffer, bool _usedialog ) return false; } ///set the dialog signal handler - dialog3slot = TQT_SLOT(checkWord3()); + dialog3slot = TQ_SLOT(checkWord3()); usedialog = _usedialog; setUpDialog( false ); @@ -503,7 +503,7 @@ bool KSpell::checkWord( const TQString & buffer, bool _usedialog ) while (proc->readln( blank_line, true ) != -1); // eat spurious blanks OUTPUT(checkWord2); - // connect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (checkWord3())); + // connect (this, TQ_SIGNAL (dialog3()), this, TQ_SLOT (checkWord3())); proc->writeStdin(TQString("%")); // turn off terse mode proc->writeStdin( buffer ); // send the word to ispell @@ -532,7 +532,7 @@ bool KSpell::checkWord( const TQString & buffer, bool _usedialog, bool suggest ) ///set the dialog signal handler if ( !suggest ) { - dialog3slot = TQT_SLOT(checkWord3()); + dialog3slot = TQ_SLOT(checkWord3()); usedialog = _usedialog; setUpDialog( false ); if ( _usedialog ) @@ -547,7 +547,7 @@ bool KSpell::checkWord( const TQString & buffer, bool _usedialog, bool suggest ) while (proc->readln( blank_line, true ) != -1); // eat spurious blanks OUTPUT(checkWord2); - // connect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (checkWord3())); + // connect (this, TQ_SIGNAL (dialog3()), this, TQ_SLOT (checkWord3())); proc->writeStdin(TQString("%")); // turn off terse mode proc->writeStdin( buffer ); // send the word to ispell @@ -555,7 +555,7 @@ bool KSpell::checkWord( const TQString & buffer, bool _usedialog, bool suggest ) return true; } -void KSpell::checkWord2( KProcIO* ) +void KSpell::checkWord2( TDEProcIO* ) { TQString word; TQString line; @@ -578,7 +578,7 @@ void KSpell::checkWord2( KProcIO* ) if ( mistake && usedialog ) { cwword = word; - dialog( word, sugg, TQT_SLOT(checkWord3()) ); + dialog( word, sugg, TQ_SLOT(checkWord3()) ); d->checkNextTimer->start( 0, true ); return; } @@ -608,7 +608,7 @@ void KSpell::checkNext() } } -void KSpell::suggestWord( KProcIO * ) +void KSpell::suggestWord( TDEProcIO * ) { TQString word; TQString line; @@ -626,14 +626,14 @@ void KSpell::suggestWord( KProcIO * ) if ( mistake && usedialog ) { cwword=word; - dialog( word, sugg, TQT_SLOT(checkWord3()) ); + dialog( word, sugg, TQ_SLOT(checkWord3()) ); return; } } void KSpell::checkWord3() { - disconnect( this, TQT_SIGNAL(dialog3()), this, TQT_SLOT(checkWord3()) ); + disconnect( this, TQ_SIGNAL(dialog3()), this, TQ_SLOT(checkWord3()) ); emit corrected( cwword, replacement(), 0L ); } @@ -792,7 +792,7 @@ bool KSpell::checkList (TQStringList *_wordlist, bool _usedialog) setUpDialog(); //set the dialog signal handler - dialog3slot = TQT_SLOT (checkList4 ()); + dialog3slot = TQ_SLOT (checkList4 ()); proc->writeStdin (TQString("%")); // turn off terse mode & check one word at a time @@ -800,14 +800,14 @@ bool KSpell::checkList (TQStringList *_wordlist, bool _usedialog) lastpos = -1; checkList2(); - // when checked, KProcIO calls checkList3a + // when checked, TDEProcIO calls checkList3a OUTPUT(checkList3a); return true; } void KSpell::checkList2 () - // send one word from the list to KProcIO + // send one word from the list to TDEProcIO // invoked first time by checkList, later by checkListReplaceCurrent and checkList4 { // send next word @@ -837,8 +837,8 @@ void KSpell::checkList2 () } } -void KSpell::checkList3a (KProcIO *) - // invoked by KProcIO, when data from ispell are read +void KSpell::checkList3a (TDEProcIO *) + // invoked by TDEProcIO, when data from ispell are read { //kdDebug(750) << "start of checkList3a" << endl; @@ -883,7 +883,7 @@ void KSpell::checkList3a (KProcIO *) cwword = word; dlgon = true; // show the dialog - dialog( word, sugg, TQT_SLOT(checkList4()) ); + dialog( word, sugg, TQ_SLOT(checkList4()) ); return; } else @@ -930,7 +930,7 @@ void KSpell::checkList4 () dlgon=false; TQString old; - disconnect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (checkList4())); + disconnect (this, TQ_SIGNAL (dialog3()), this, TQ_SLOT (checkList4())); //others should have been processed by dialog() already switch (dlgresult) @@ -961,7 +961,7 @@ void KSpell::checkList4 () //proc->disconnect(); //proc->kill(); //delete proc; - //proc = new KProcIO( codec ); + //proc = new TDEProcIO( codec ); //startIspell(); return; }; @@ -980,7 +980,7 @@ bool KSpell::check( const TQString &_buffer, bool _usedialog ) usedialog = _usedialog; setUpDialog(); //set the dialog signal handler - dialog3slot = TQT_SLOT(check3()); + dialog3slot = TQ_SLOT(check3()); kdDebug(750) << "KS: check" << endl; origbuffer = _buffer; @@ -1006,7 +1006,7 @@ bool KSpell::check( const TQString &_buffer, bool _usedialog ) newbuffer = origbuffer; - // KProcIO calls check2 when read from ispell + // TDEProcIO calls check2 when read from ispell OUTPUT( check2 ); proc->writeStdin(TQString("!")); @@ -1033,8 +1033,8 @@ bool KSpell::check( const TQString &_buffer, bool _usedialog ) } -void KSpell::check2( KProcIO * ) - // invoked by KProcIO when read from ispell +void KSpell::check2( TDEProcIO * ) + // invoked by TDEProcIO when read from ispell { int e, tempe; TQString word; @@ -1090,7 +1090,7 @@ void KSpell::check2( KProcIO * ) //kdDebug(750) << "(Before dialog) word=[" << word << "] cwword =[" << cwword << "]\n" << endl; if ( usedialog ) { // show the word in the dialog - dialog( word, sugg, TQT_SLOT(check3()) ); + dialog( word, sugg, TQ_SLOT(check3()) ); } else { // No dialog, just emit misspelling and continue d->m_bNoMisspellingsEncountered = false; @@ -1152,7 +1152,7 @@ void KSpell::check2( KProcIO * ) void KSpell::check3 () // evaluates the return value of the dialog { - disconnect (this, TQT_SIGNAL (dialog3()), this, TQT_SLOT (check3())); + disconnect (this, TQ_SIGNAL (dialog3()), this, TQ_SLOT (check3())); kdDebug(750) << "check3 [" << cwword << "] [" << replacement() << "] " << dlgresult << endl; //others should have been processed by dialog() already @@ -1199,7 +1199,7 @@ KSpell::slotStopCancel (int result) if (!dialog3slot.isEmpty()) { dlgresult=result; - connect (this, TQT_SIGNAL (dialog3()), this, dialog3slot.ascii()); + connect (this, TQ_SIGNAL (dialog3()), this, dialog3slot.ascii()); emit dialog3(); } } @@ -1211,7 +1211,7 @@ void KSpell::dialog( const TQString & word, TQStringList & sugg, const char *_sl dialog3slot = _slot; dialogwillprocess = true; - connect( ksdlg, TQT_SIGNAL(command(int)), this, TQT_SLOT(dialog2(int)) ); + connect( ksdlg, TQ_SIGNAL(command(int)), this, TQ_SLOT(dialog2(int)) ); TQString tmpBuf = newbuffer; kdDebug(750)<<" position = "<<lastpos<<endl; @@ -1238,7 +1238,7 @@ void KSpell::dialog2( int result ) { TQString qs; - disconnect( ksdlg, TQT_SIGNAL(command(int)), this, TQT_SLOT(dialog2(int)) ); + disconnect( ksdlg, TQ_SIGNAL(command(int)), this, TQ_SLOT(dialog2(int)) ); dialogwillprocess = false; dlgresult = result; ksdlg->standby(); @@ -1277,7 +1277,7 @@ void KSpell::dialog2( int result ) break; } - connect( this, TQT_SIGNAL(dialog3()), this, dialog3slot.ascii() ); + connect( this, TQ_SIGNAL(dialog3()), this, dialog3slot.ascii() ); emit dialog3(); } @@ -1334,7 +1334,7 @@ void KSpell::ispellExit( TDEProcess* ) return; // Dead already kdDebug(750) << "Death" << endl; - TQTimer::singleShot( 0, this, TQT_SLOT(emitDeath()) ); + TQTimer::singleShot( 0, this, TQ_SLOT(emitDeath()) ); } // This is always called from the event loop to make @@ -1403,7 +1403,7 @@ KSpell::modalCheck( TQString& text, KSpellConfig* _kcs ) 0, _kcs, true, true ); while (spell->status()!=Finished) - kapp->processEvents(); + tdeApp->processEvents(); text = modaltext; @@ -1423,12 +1423,12 @@ void KSpell::slotModalReady() //kdDebug(750) << "MODAL READY------------------" << endl; Q_ASSERT( m_status == Running ); - connect( this, TQT_SIGNAL( done( const TQString & ) ), - this, TQT_SLOT( slotModalDone( const TQString & ) ) ); - TQObject::connect( this, TQT_SIGNAL( corrected( const TQString&, const TQString&, unsigned int ) ), - this, TQT_SLOT( slotSpellCheckerCorrected( const TQString&, const TQString &, unsigned int ) ) ); - TQObject::connect( this, TQT_SIGNAL( death() ), - this, TQT_SLOT( slotModalSpellCheckerFinished( ) ) ); + connect( this, TQ_SIGNAL( done( const TQString & ) ), + this, TQ_SLOT( slotModalDone( const TQString & ) ) ); + TQObject::connect( this, TQ_SIGNAL( corrected( const TQString&, const TQString&, unsigned int ) ), + this, TQ_SLOT( slotSpellCheckerCorrected( const TQString&, const TQString &, unsigned int ) ) ); + TQObject::connect( this, TQ_SIGNAL( death() ), + this, TQ_SLOT( slotModalSpellCheckerFinished( ) ) ); check( modaltext ); } @@ -1463,8 +1463,8 @@ void KSpell::initialize( TQWidget *_parent, const TQString &_caption, d->checking = false; d->aspellV6 = false; d->checkNextTimer = new TQTimer( this ); - connect( d->checkNextTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( checkNext() )); + connect( d->checkNextTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( checkNext() )); autoDelete = false; modaldlg = _modal; progressbar = _progressbar; @@ -1559,12 +1559,12 @@ void KSpell::initialize( TQWidget *_parent, const TQString &_caption, if ( obj && slot ) // caller wants to know when tdespell is ready - connect( this, TQT_SIGNAL(ready(KSpell *)), obj, slot); + connect( this, TQ_SIGNAL(ready(KSpell *)), obj, slot); else // Hack for modal spell checking - connect( this, TQT_SIGNAL(ready(KSpell *)), this, TQT_SLOT(slotModalReady()) ); + connect( this, TQ_SIGNAL(ready(KSpell *)), this, TQ_SLOT(slotModalReady()) ); - proc = new KProcIO( codec ); + proc = new TDEProcIO( codec ); startIspell(); } diff --git a/tdeui/tdespell.h b/tdeui/tdespell.h index f09571004..fd56928b5 100644 --- a/tdeui/tdespell.h +++ b/tdeui/tdespell.h @@ -27,7 +27,7 @@ #include <tdelibs_export.h> class TQTextCodec; -class KProcIO; +class TDEProcIO; class TDEProcess; class KSpellDlg; @@ -45,7 +45,7 @@ class KSpellDlg; class TDEUI_EXPORT KSpell : public TQObject { - Q_OBJECT + TQ_OBJECT public: @@ -310,7 +310,7 @@ public: * Your application's GUI will still be updated, however. * */ - static int modalCheck( TQString& text ) KDE_DEPRECATED; + static int modalCheck( TQString& text ) TDE_DEPRECATED; /** * Performs a synchronous spellcheck. @@ -447,18 +447,18 @@ signals: protected slots: - /* All of those signals from KProcIO get sent here. */ - void KSpell2 (KProcIO *); - void checkWord2 (KProcIO *); + /* All of those signals from TDEProcIO get sent here. */ + void KSpell2 (TDEProcIO *); + void checkWord2 (TDEProcIO *); void checkWord3 (); - void check2 (KProcIO *); + void check2 (TDEProcIO *); void checkList2 (); - void checkList3a (KProcIO *); + void checkList3a (TDEProcIO *); void checkListReplaceCurrent (); void checkList4 (); void dialog2 (int dlgresult); void check3 (); - void suggestWord( KProcIO * ); + void suggestWord( TDEProcIO * ); void slotStopCancel (int); void ispellExit (TDEProcess *); @@ -492,7 +492,7 @@ signals: protected: - KProcIO *proc; + TDEProcIO *proc; TQWidget *parent; KSpellConfig *ksconfig; KSpellDlg *ksdlg; diff --git a/tdeui/tdespelldlg.cpp b/tdeui/tdespelldlg.cpp index 9e8206505..f111eb50f 100644 --- a/tdeui/tdespelldlg.cpp +++ b/tdeui/tdespelldlg.cpp @@ -60,44 +60,44 @@ KSpellDlg::KSpellDlg( TQWidget * parent, const char * name, bool _progressbar, b d->ui = new KSpellUI( this ); setMainWidget( d->ui ); - connect( d->ui->m_replaceBtn, TQT_SIGNAL(clicked()), - this, TQT_SLOT(replace())); - connect( this, TQT_SIGNAL(ready(bool)), - d->ui->m_replaceBtn, TQT_SLOT(setEnabled(bool)) ); + connect( d->ui->m_replaceBtn, TQ_SIGNAL(clicked()), + this, TQ_SLOT(replace())); + connect( this, TQ_SIGNAL(ready(bool)), + d->ui->m_replaceBtn, TQ_SLOT(setEnabled(bool)) ); - connect( d->ui->m_replaceAllBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(replaceAll())); - connect(this, TQT_SIGNAL(ready(bool)), d->ui->m_replaceAllBtn, TQT_SLOT(setEnabled(bool))); + connect( d->ui->m_replaceAllBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(replaceAll())); + connect(this, TQ_SIGNAL(ready(bool)), d->ui->m_replaceAllBtn, TQ_SLOT(setEnabled(bool))); - connect( d->ui->m_skipBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(ignore())); - connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_skipBtn, TQT_SLOT(setEnabled(bool))); + connect( d->ui->m_skipBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(ignore())); + connect( this, TQ_SIGNAL(ready(bool)), d->ui->m_skipBtn, TQ_SLOT(setEnabled(bool))); - connect( d->ui->m_skipAllBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(ignoreAll())); - connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_skipAllBtn, TQT_SLOT(setEnabled(bool))); + connect( d->ui->m_skipAllBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(ignoreAll())); + connect( this, TQ_SIGNAL(ready(bool)), d->ui->m_skipAllBtn, TQ_SLOT(setEnabled(bool))); - connect( d->ui->m_addBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(add())); - connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_addBtn, TQT_SLOT(setEnabled(bool))); + connect( d->ui->m_addBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(add())); + connect( this, TQ_SIGNAL(ready(bool)), d->ui->m_addBtn, TQ_SLOT(setEnabled(bool))); - connect( d->ui->m_suggestBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(suggest())); - connect( this, TQT_SIGNAL(ready(bool)), d->ui->m_suggestBtn, TQT_SLOT(setEnabled(bool)) ); + connect( d->ui->m_suggestBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(suggest())); + connect( this, TQ_SIGNAL(ready(bool)), d->ui->m_suggestBtn, TQ_SLOT(setEnabled(bool)) ); d->ui->m_suggestBtn->hide(); - connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(stop())); + connect(this, TQ_SIGNAL(user1Clicked()), this, TQ_SLOT(stop())); - connect( d->ui->m_replacement, TQT_SIGNAL(textChanged(const TQString &)), - TQT_SLOT(textChanged(const TQString &)) ); + connect( d->ui->m_replacement, TQ_SIGNAL(textChanged(const TQString &)), + TQ_SLOT(textChanged(const TQString &)) ); - connect( d->ui->m_replacement, TQT_SIGNAL(returnPressed()), TQT_SLOT(replace()) ); - connect( d->ui->m_suggestions, TQT_SIGNAL(selectionChanged(TQListViewItem*)), - TQT_SLOT(slotSelectionChanged(TQListViewItem*)) ); + connect( d->ui->m_replacement, TQ_SIGNAL(returnPressed()), TQ_SLOT(replace()) ); + connect( d->ui->m_suggestions, TQ_SIGNAL(selectionChanged(TQListViewItem*)), + TQ_SLOT(slotSelectionChanged(TQListViewItem*)) ); - connect( d->ui->m_suggestions, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), - TQT_SLOT( replace() ) ); + connect( d->ui->m_suggestions, TQ_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), + TQ_SLOT( replace() ) ); d->spellConfig = new KSpellConfig( 0, 0 ,0, false ); d->spellConfig->fillDicts( d->ui->m_language ); - connect( d->ui->m_language, TQT_SIGNAL(activated(int)), - d->spellConfig, TQT_SLOT(sSetDictionary(int)) ); - connect( d->spellConfig, TQT_SIGNAL(configChanged()), - TQT_SLOT(slotConfigChanged()) ); + connect( d->ui->m_language, TQ_SIGNAL(activated(int)), + d->spellConfig, TQ_SLOT(sSetDictionary(int)) ); + connect( d->spellConfig, TQ_SIGNAL(configChanged()), + TQ_SLOT(slotConfigChanged()) ); setHelp( "spelldlg", "tdespell" ); setMinimumSize( sizeHint() ); diff --git a/tdeui/tdespelldlg.h b/tdeui/tdespelldlg.h index c4731800f..565464c4e 100644 --- a/tdeui/tdespelldlg.h +++ b/tdeui/tdespelldlg.h @@ -45,7 +45,7 @@ enum KS_RESULT { class TDEUI_EXPORT KSpellDlg : public KDialogBase { - Q_OBJECT + TQ_OBJECT class KSpellDlgPrivate; KSpellDlgPrivate *d; diff --git a/tdeui/tdetoolbar.cpp b/tdeui/tdetoolbar.cpp index 7c6902fed..6f93db4fc 100644 --- a/tdeui/tdetoolbar.cpp +++ b/tdeui/tdetoolbar.cpp @@ -149,8 +149,8 @@ TDEToolBarSeparator::TDEToolBarSeparator(Orientation o , bool l, TQToolBar *pare const char* name ) :TQFrame( parent, name ), line( l ) { - connect( parent, TQT_SIGNAL(orientationChanged(Orientation)), - this, TQT_SLOT(setOrientation(Orientation)) ); + connect( parent, TQ_SIGNAL(orientationChanged(Orientation)), + this, TQ_SLOT(setOrientation(Orientation)) ); setOrientation( o ); setBackgroundMode( parent->backgroundMode() ); setBackgroundOrigin( ParentOrigin ); @@ -167,10 +167,10 @@ void TDEToolBarSeparator::drawContents( TQPainter* p ) if ( line ) { TQStyle::SFlags flags = TQStyle::Style_Default; - if ( orientation() == Qt::Horizontal ) + if ( orientation() == TQt::Horizontal ) flags = flags | TQStyle::Style_Horizontal; - style().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator, p, + style().drawPrimitive(TQStyle::PE_DockWindowSeparator, p, contentsRect(), colorGroup(), flags); } else { TQFrame::drawContents(p); @@ -185,7 +185,7 @@ void TDEToolBarSeparator::styleChange( TQStyle& ) TQSize TDEToolBarSeparator::sizeHint() const { int dim = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent, this ); - return orientation() == Qt::Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 ); + return orientation() == TQt::Vertical ? TQSize( 0, dim ) : TQSize( dim, 0 ); } TQSizePolicy TDEToolBarSeparator::sizePolicy() const @@ -195,7 +195,7 @@ TQSizePolicy TDEToolBarSeparator::sizePolicy() const TDEToolBar::TDEToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) : TQToolBar( TQString::fromLatin1( name ), - tqt_dynamic_cast<TQMainWindow*>(parent), + dynamic_cast<TQMainWindow*>(parent), parent, false, name ? name : "mainToolBar") { @@ -232,16 +232,16 @@ void TDEToolBar::init( bool readConfig, bool honorStyle ) d->m_honorStyle = honorStyle; context = 0; layoutTimer = new TQTimer( this ); - connect( layoutTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( rebuildLayout() ) ); - connect( &(d->repaintTimer), TQT_SIGNAL( timeout() ), - this, TQT_SLOT( slotRepaint() ) ); + connect( layoutTimer, TQ_SIGNAL( timeout() ), + this, TQ_SLOT( rebuildLayout() ) ); + connect( &(d->repaintTimer), TQ_SIGNAL( timeout() ), + this, TQ_SLOT( slotRepaint() ) ); - if ( kapp ) { // may be null when started inside designer - connect(kapp, TQT_SIGNAL(toolbarAppearanceChanged(int)), this, TQT_SLOT(slotAppearanceChanged())); + if ( tdeApp ) { // may be null when started inside designer + connect(tdeApp, TQ_SIGNAL(toolbarAppearanceChanged(int)), this, TQ_SLOT(slotAppearanceChanged())); // request notification of changes in icon style - kapp->addKipcEventMask(KIPC::IconChanged); - connect(kapp, TQT_SIGNAL(iconChanged(int)), this, TQT_SLOT(slotIconChanged(int))); + tdeApp->addKipcEventMask(KIPC::IconChanged); + connect(tdeApp, TQ_SIGNAL(iconChanged(int)), this, TQ_SLOT(slotIconChanged(int))); } // finally, read in our configurable settings @@ -249,11 +249,11 @@ void TDEToolBar::init( bool readConfig, bool honorStyle ) slotReadConfig(); if ( mainWindow() ) - connect( mainWindow(), TQT_SIGNAL( toolBarPositionChanged( TQToolBar * ) ), - this, TQT_SLOT( toolBarPosChanged( TQToolBar * ) ) ); + connect( mainWindow(), TQ_SIGNAL( toolBarPositionChanged( TQToolBar * ) ), + this, TQ_SLOT( toolBarPosChanged( TQToolBar * ) ) ); // Hack to make sure we recalculate our size when we dock. - connect( this, TQT_SIGNAL(placeChanged(TQDockWindow::Place)), TQT_SLOT(rebuildLayout()) ); + connect( this, TQ_SIGNAL(placeChanged(TQDockWindow::Place)), TQ_SLOT(rebuildLayout()) ); } int TDEToolBar::insertButton(const TQString& icon, int id, bool enabled, @@ -422,7 +422,7 @@ int TDEToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slo insertWidgetInternal( anim, index, id ); if ( receiver ) - connect( anim, TQT_SIGNAL(clicked()), receiver, slot); + connect( anim, TQ_SIGNAL(clicked()), receiver, slot); return index; } @@ -432,7 +432,7 @@ KAnimWidget *TDEToolBar::animatedWidget( int id ) Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - KAnimWidget *aw = tqt_dynamic_cast<KAnimWidget *>(*it); + KAnimWidget *aw = dynamic_cast<KAnimWidget *>(*it); if ( aw ) return aw; TQObjectList *l = queryList( "KAnimWidget" ); @@ -442,7 +442,7 @@ KAnimWidget *TDEToolBar::animatedWidget( int id ) } for ( TQObject *o = l->first(); o; o = l->next() ) { - KAnimWidget *aw = tqt_dynamic_cast<KAnimWidget *>(o); + KAnimWidget *aw = dynamic_cast<KAnimWidget *>(o); if ( aw ) { delete l; @@ -615,7 +615,7 @@ KComboBox * TDEToolBar::getCombo(int id) Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - return tqt_dynamic_cast<KComboBox *>( *it ); + return dynamic_cast<KComboBox *>( *it ); } @@ -624,7 +624,7 @@ KLineEdit * TDEToolBar::getLined (int id) Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - return tqt_dynamic_cast<KLineEdit *>( *it ); + return dynamic_cast<KLineEdit *>( *it ); } @@ -633,7 +633,7 @@ TDEToolBarButton * TDEToolBar::getButton (int id) Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; - return tqt_dynamic_cast<TDEToolBarButton *>( *it ); + return dynamic_cast<TDEToolBarButton *>( *it ); } @@ -947,7 +947,7 @@ void TDEToolBar::setFlat (bool flag) else mainWindow()->moveDockWindow( this, DockTop ); // And remember to save the new look later - TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); + TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } @@ -1093,7 +1093,7 @@ void TDEToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup) // reappear at the same position the next time. // The whole set of indexes has to be saved. //kdDebug(220) << name() << " writing index " << index << endl; - TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); + TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow()); // don't save if there's only one toolbar // Don't use kmw->toolBarIterator() because you might @@ -1133,7 +1133,7 @@ void TDEToolBar::setXMLGUIClient( KXMLGUIClient *client ) void TDEToolBar::setText( const TQString & txt ) { - setLabel( txt + " (" + kapp->caption() + ") " ); + setLabel( txt + " (" + tdeApp->caption() + ") " ); } @@ -1145,12 +1145,12 @@ TQString TDEToolBar::text() const void TDEToolBar::doConnections( TDEToolBarButton *button ) { - connect(button, TQT_SIGNAL(clicked(int)), this, TQT_SIGNAL( clicked( int ) ) ); - connect(button, TQT_SIGNAL(doubleClicked(int)), this, TQT_SIGNAL( doubleClicked( int ) ) ); - connect(button, TQT_SIGNAL(released(int)), this, TQT_SIGNAL( released( int ) ) ); - connect(button, TQT_SIGNAL(pressed(int)), this, TQT_SIGNAL( pressed( int ) ) ); - connect(button, TQT_SIGNAL(toggled(int)), this, TQT_SIGNAL( toggled( int ) ) ); - connect(button, TQT_SIGNAL(highlighted(int, bool)), this, TQT_SIGNAL( highlighted( int, bool ) ) ); + connect(button, TQ_SIGNAL(clicked(int)), this, TQ_SIGNAL( clicked( int ) ) ); + connect(button, TQ_SIGNAL(doubleClicked(int)), this, TQ_SIGNAL( doubleClicked( int ) ) ); + connect(button, TQ_SIGNAL(released(int)), this, TQ_SIGNAL( released( int ) ) ); + connect(button, TQ_SIGNAL(pressed(int)), this, TQ_SIGNAL( pressed( int ) ) ); + connect(button, TQ_SIGNAL(toggled(int)), this, TQ_SIGNAL( toggled( int ) ) ); + connect(button, TQ_SIGNAL(highlighted(int, bool)), this, TQ_SIGNAL( highlighted( int, bool ) ) ); } void TDEToolBar::mousePressEvent ( TQMouseEvent *m ) @@ -1159,7 +1159,7 @@ void TDEToolBar::mousePressEvent ( TQMouseEvent *m ) return; TQMainWindow *mw = mainWindow(); if ( mw->toolBarsMovable() && d->m_enableContext ) { - if ( m->button() == Qt::RightButton ) { + if ( m->button() == TQt::RightButton ) { TQGuardedPtr<TDEToolBar> guard( this ); int i = contextMenu()->exec( m->globalPos(), 0 ); // "Configure Toolbars" recreates toolbars, so we might not exist anymore. @@ -1204,7 +1204,7 @@ void TDEToolBar::mousePressEvent ( TQMouseEvent *m ) else return; // assume this was an action handled elsewhere, no need for setSettingsDirty() } - TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mw); + TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mw); if ( kmw ) kmw->setSettingsDirty(); } @@ -1238,17 +1238,17 @@ void TDEToolBar::rebuildLayout() for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( w == rightAligned ) continue; - TDEToolBarSeparator *ktbs = tqt_dynamic_cast<TDEToolBarSeparator *>(w); + TDEToolBarSeparator *ktbs = dynamic_cast<TDEToolBarSeparator *>(w); if ( ktbs && !ktbs->showLine() ) { - l->addSpacing( orientation() == Qt::Vertical ? w->sizeHint().height() : w->sizeHint().width() ); + l->addSpacing( orientation() == TQt::Vertical ? w->sizeHint().height() : w->sizeHint().width() ); w->hide(); continue; } - if ( tqt_dynamic_cast<TQPopupMenu *>(w) ) // w is a QPopupMenu? + if ( dynamic_cast<TQPopupMenu *>(w) ) // w is a QPopupMenu? continue; l->addWidget( w ); w->show(); - if ((orientation() == Qt::Horizontal) && tqt_dynamic_cast<TQLineEdit *>(w)) // w is TQLineEdit ? + if ((orientation() == TQt::Horizontal) && dynamic_cast<TQLineEdit *>(w)) // w is TQLineEdit ? l->addSpacing(2); // A little bit extra spacing behind it. } if ( rightAligned ) { @@ -1270,14 +1270,14 @@ void TDEToolBar::rebuildLayout() void TDEToolBar::childEvent( TQChildEvent *e ) { if ( e->child()->isWidgetType() ) { - TQWidget * w = tqt_dynamic_cast<TQWidget *>(e->child()); + TQWidget * w = dynamic_cast<TQWidget *>(e->child()); if (!w || !(::qstrcmp( "qt_dockwidget_internal", w->name()))) { TQToolBar::childEvent( e ); return; } if ( e->type() == TQEvent::ChildInserted ) { - if ( !tqt_dynamic_cast<TQPopupMenu *>(w)) { // e->child() is not a QPopupMenu + if ( !dynamic_cast<TQPopupMenu *>(w)) { // e->child() is not a QPopupMenu // prevent items that have been explicitly inserted by insert*() from // being inserted again if ( !widget2id.contains( w ) ) @@ -1309,8 +1309,8 @@ void TDEToolBar::insertWidgetInternal( TQWidget *w, int &index, int id ) // we can't have it in widgets, or something is really wrong //widgets.removeRef( w ); - connect( w, TQT_SIGNAL( destroyed() ), - this, TQT_SLOT( widgetDestroyed() ) ); + connect( w, TQ_SIGNAL( destroyed() ), + this, TQ_SLOT( widgetDestroyed() ) ); if ( index == -1 || index > (int)widgets.count() ) { index = (int)widgets.count(); widgets.append( w ); @@ -1337,7 +1337,7 @@ void TDEToolBar::setStretchableWidget( TQWidget *w ) TQSizePolicy TDEToolBar::sizePolicy() const { - if ( orientation() == Qt::Horizontal ) + if ( orientation() == TQt::Horizontal ) return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); else return TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding ); @@ -1350,7 +1350,7 @@ TQSize TDEToolBar::sizeHint() const ncThis->polish(); - int margin = static_cast<TQWidget*>(ncThis)->layout()->margin() + frameWidth(); + int margin = ncThis->layout()->margin() + frameWidth(); switch( barPos() ) { case TDEToolBar::Top: @@ -1367,7 +1367,7 @@ TQSize TDEToolBar::sizeHint() const minSize = minSize.expandedTo(TQSize(0, sh.height())); minSize += TQSize(sh.width()+1, 0); - if (tqt_dynamic_cast<TQLineEdit *>(w)) // w is a TQLineEdit ? + if (dynamic_cast<TQLineEdit *>(w)) // w is a TQLineEdit ? minSize += TQSize(2, 0); // A little bit extra spacing behind it. } @@ -1478,7 +1478,7 @@ void TDEToolBar::slotAppearanceChanged() applyAppearanceSettings(TDEGlobal::config(), TQString::null, true /* lose local settings */ ); // And remember to save the new look later - TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); + TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } @@ -1750,7 +1750,7 @@ void TDEToolBar::toolBarPosChanged( TQToolBar *tb ) if ( d->oldPos == DockMinimized ) rebuildLayout(); d->oldPos = (TQMainWindow::ToolBarDock)barPos(); - TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); + TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw ) kmw->setSettingsDirty(); } @@ -2125,10 +2125,10 @@ TDEPopupMenu *TDEToolBar::contextMenu() context->setItemChecked(CONTEXT_ICONS, true); context->insertItem( i18n("Icon Size"), size ); - connect( context, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( slotContextAboutToShow() ) ); + connect( context, TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( slotContextAboutToShow() ) ); // Unplugging a submenu from abouttohide leads to the popupmenu floating around // So better simply call that code from after exec() returns (DF) - //connect( context, TQT_SIGNAL( aboutToHide() ), this, TQT_SLOT( slotContextAboutToHide() ) ); + //connect( context, TQ_SIGNAL( aboutToHide() ), this, TQ_SLOT( slotContextAboutToHide() ) ); return context; } @@ -2139,7 +2139,7 @@ void TDEToolBar::slotContextAboutToShow() // and ToolBarHandler::setupActions() deletes it, so better not keep it around. // So we currently plug/unplug the last two actions of the menu. // Another way would be to keep around the actions and plug them all into a (new each time) popupmenu. - TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); + TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw ) { kmw->setupToolbarMenuActions(); // Only allow hiding a toolbar if the action is also plugged somewhere else (e.g. menubar) @@ -2219,7 +2219,7 @@ void TDEToolBar::slotContextAboutToHide() { // We have to unplug whatever slotContextAboutToShow plugged into the menu. // Unplug the toolbar menu action - TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); + TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow()); if ( kmw && kmw->toolBarMenuAction() ) if ( kmw->toolBarMenuAction()->containerCount() > 1 ) kmw->toolBarMenuAction()->unplug(context); @@ -2237,7 +2237,7 @@ void TDEToolBar::slotContextAboutToHide() TQPtrListIterator<TQWidget> it( widgets ); TQWidget *wdg; while ( ( wdg = it.current() ) != 0 ) { - if ( wdg->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) ) + if ( wdg->inherits( "TQToolButton" ) ) static_cast<TQToolButton*>( wdg )->setDown( false ); ++it; } diff --git a/tdeui/tdetoolbar.h b/tdeui/tdetoolbar.h index f59d78174..c2b9d865b 100644 --- a/tdeui/tdetoolbar.h +++ b/tdeui/tdetoolbar.h @@ -57,7 +57,7 @@ class TDEToolBarPrivate; class TDEUI_EXPORT TDEToolBarSeparator : public TQFrame { - Q_OBJECT + TQ_OBJECT public: TDEToolBarSeparator( Orientation, bool l, TQToolBar *parent, const char* name=0 ); @@ -103,7 +103,7 @@ private: class TDEUI_EXPORT TDEToolBar : public TQToolBar { - Q_OBJECT + TQ_OBJECT TQ_ENUMS( IconText BarPosition ) TQ_PROPERTY( IconText iconText READ iconText WRITE setIconText ) @@ -466,8 +466,8 @@ public: * You will insert a normal button with connection (or use signals from * toolbar): * \code - * bar->insertButton(icon, id, TQT_SIGNAL(clicked ()), this, - * TQT_SLOT (slotClick()), true, "click or wait for popup"); + * bar->insertButton(icon, id, TQ_SIGNAL(clicked ()), this, + * TQ_SLOT (slotClick()), true, "click or wait for popup"); * \endcode * And then add a delayed popup: * \code @@ -645,7 +645,7 @@ public: * You can do with this whatever you want, * except change its height (hardcoded). If you change its width * you will probably have to call TQToolBar::updateRects(true) - * @see QWidget + * @see TQWidget * @see updateRects() */ TQWidget *getWidget (int id); // ### KDE4: make this const! @@ -733,7 +733,7 @@ public: * Enable or disable moving of toolbar. * @deprecated use setMovingEnabled(bool) instead. */ - void enableMoving(bool flag = true) KDE_DEPRECATED; + void enableMoving(bool flag = true) TDE_DEPRECATED; /** * Set position of toolbar. @@ -755,13 +755,13 @@ public: * @see BarStatus * @deprecated */ - bool enable(BarStatus stat) KDE_DEPRECATED; + bool enable(BarStatus stat) TDE_DEPRECATED; /** * Use setMaximumHeight() instead. * @deprecated */ - void setMaxHeight (int h) KDE_DEPRECATED; // Set max height for vertical toolbars + void setMaxHeight (int h) TDE_DEPRECATED; // Set max height for vertical toolbars /** * Returns the value set with setMaxHeight(). @@ -769,14 +769,14 @@ public: * Use maximumHeight() instead. * @return the value set with setMaxHeight(). */ - int maxHeight() KDE_DEPRECATED; + int maxHeight() TDE_DEPRECATED; /** * Use setMaximumWidth() instead. * Set maximal width of horizontal (top or bottom) toolbar. * @deprecated */ - void setMaxWidth (int dw) KDE_DEPRECATED; + void setMaxWidth (int dw) TDE_DEPRECATED; /** * Returns the value set with setMaxWidth(). @@ -784,7 +784,7 @@ public: * @return the value set with setMaxWidth(). * @deprecated */ - int maxWidth() KDE_DEPRECATED; + int maxWidth() TDE_DEPRECATED; /** * Set title for toolbar when it floats. @@ -798,7 +798,7 @@ public: * Use setMovingEnabled(bool) instead. * @deprecated */ - void enableFloating (bool flag) KDE_DEPRECATED; + void enableFloating (bool flag) TDE_DEPRECATED; /** * Set the kind of painting for buttons. diff --git a/tdeui/tdetoolbarbutton.cpp b/tdeui/tdetoolbarbutton.cpp index 791b47db1..1c3f550db 100644 --- a/tdeui/tdetoolbarbutton.cpp +++ b/tdeui/tdetoolbarbutton.cpp @@ -123,21 +123,21 @@ TDEToolBarButton::TDEToolBarButton( const TQString& _icon, int _id, TQToolButton::setTextLabel(_txt); d->m_instance = _instance; - d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_parent); + d->m_parent = dynamic_cast<TDEToolBar*>(_parent); if (d->m_parent) { - connect(d->m_parent, TQT_SIGNAL( modechange() ), - this, TQT_SLOT( modeChange() )); + connect(d->m_parent, TQ_SIGNAL( modechange() ), + this, TQ_SLOT( modeChange() )); } - setFocusPolicy( TQ_NoFocus ); + setFocusPolicy( TQWidget::NoFocus ); // connect all of our slots and start trapping events - connect(this, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( slotClicked() ) ); - connect(this, TQT_SIGNAL( pressed() ), - this, TQT_SLOT( slotPressed() ) ); - connect(this, TQT_SIGNAL( released() ), - this, TQT_SLOT( slotReleased() ) ); + connect(this, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( slotClicked() ) ); + connect(this, TQ_SIGNAL( pressed() ), + this, TQ_SLOT( slotPressed() ) ); + connect(this, TQ_SIGNAL( released() ), + this, TQ_SLOT( slotReleased() ) ); installEventFilter(this); d->m_iconName = _icon; @@ -156,21 +156,21 @@ TDEToolBarButton::TDEToolBarButton( const TQPixmap& pixmap, int _id, d->m_id = _id; TQToolButton::setTextLabel(txt); - d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_parent); + d->m_parent = dynamic_cast<TDEToolBar*>(_parent); if (d->m_parent) { - connect(d->m_parent, TQT_SIGNAL( modechange() ), - this, TQT_SLOT( modeChange() )); + connect(d->m_parent, TQ_SIGNAL( modechange() ), + this, TQ_SLOT( modeChange() )); } - setFocusPolicy( TQ_NoFocus ); + setFocusPolicy( TQWidget::NoFocus ); // connect all of our slots and start trapping events - connect(this, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( slotClicked() )); - connect(this, TQT_SIGNAL( pressed() ), - this, TQT_SLOT( slotPressed() )); - connect(this, TQT_SIGNAL( released() ), - this, TQT_SLOT( slotReleased() )); + connect(this, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( slotClicked() )); + connect(this, TQ_SIGNAL( pressed() ), + this, TQ_SLOT( slotPressed() )); + connect(this, TQ_SIGNAL( released() ), + this, TQ_SLOT( slotReleased() )); installEventFilter(this); // set our pixmap and do our initial setup @@ -251,7 +251,7 @@ void TDEToolBarButton::modeChange() break; } - mysize = style().tqsizeFromContents(TQStyle::CT_ToolButton, this, mysize). + mysize = style().sizeFromContents(TQStyle::CT_ToolButton, this, mysize). expandedTo(TQApplication::globalStrut()); // make sure that this isn't taller then it is wide @@ -410,7 +410,7 @@ void TDEToolBarButton::enterEvent(TQEvent *) bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev) { - if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this)) + if (o == this) { // Popup the menu when the left mousebutton is pressed and the mouse @@ -419,12 +419,12 @@ bool TDEToolBarButton::eventFilter(TQObject *o, TQEvent *ev) { if (ev->type() == TQEvent::MouseButtonPress) { - TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); + TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev); d->m_mousePressPos = mev->pos(); } else if (ev->type() == TQEvent::MouseMove) { - TQMouseEvent* mev = TQT_TQMOUSEEVENT(ev); + TQMouseEvent* mev = static_cast<TQMouseEvent*>(ev); if ((mev->pos() - d->m_mousePressPos).manhattanLength() > TDEGlobalSettings::dndEventDelay()) { @@ -455,10 +455,10 @@ void TDEToolBarButton::mousePressEvent( TQMouseEvent * e ) { d->m_buttonDown = true; - if ( e->button() == Qt::MidButton ) + if ( e->button() == TQt::MidButton ) { // Get TQToolButton to show the button being down while pressed - TQMouseEvent ev( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), Qt::LeftButton, e->state() ); + TQMouseEvent ev( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), TQt::LeftButton, e->state() ); TQToolButton::mousePressEvent(&ev); return; } @@ -468,9 +468,9 @@ void TDEToolBarButton::mousePressEvent( TQMouseEvent * e ) void TDEToolBarButton::mouseReleaseEvent( TQMouseEvent * e ) { TQt::ButtonState state = TQt::ButtonState(e->button() | (e->state() & KeyButtonMask)); - if ( e->button() == Qt::MidButton ) + if ( e->button() == TQt::MidButton ) { - TQMouseEvent ev( TQEvent::MouseButtonRelease, e->pos(), e->globalPos(), Qt::LeftButton, e->state() ); + TQMouseEvent ev( TQEvent::MouseButtonRelease, e->pos(), e->globalPos(), TQt::LeftButton, e->state() ); TQToolButton::mouseReleaseEvent(&ev); } else @@ -628,7 +628,7 @@ void TDEToolBarButton::drawButton( TQPainter *_painter ) if (isDown()) arrowFlags |= TQStyle::Style_Down; if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled; - style().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter, + style().drawPrimitive(TQStyle::PE_ArrowDown, _painter, TQRect(width()-7, height()-7, 7, 7), colorGroup(), arrowFlags, TQStyleOption() ); } @@ -676,8 +676,8 @@ void TDEToolBarButton::slotClicked() // emit buttonClicked when the button was clicked while being in an extension popupmenu if ( d->m_parent && !d->m_parent->rect().contains( geometry().center() ) ) { ButtonState state = TDEApplication::keyboardMouseState(); - if ( ( state & Qt::MouseButtonMask ) == Qt::NoButton ) - state = ButtonState( Qt::LeftButton | state ); + if ( ( state & TQt::MouseButtonMask ) == TQt::NoButton ) + state = ButtonState( TQt::LeftButton | state ); emit buttonClicked( d->m_id, state ); // Doesn't work with MidButton } } @@ -734,9 +734,9 @@ void TDEToolBarButton::setToggle(bool flag) { setToggleButton(flag); if (flag) - connect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); + connect(this, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotToggled())); else - disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); + disconnect(this, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotToggled())); } TQSize TDEToolBarButton::sizeHint() const diff --git a/tdeui/tdetoolbarbutton.h b/tdeui/tdetoolbarbutton.h index 16831b0d7..a7b1addf9 100644 --- a/tdeui/tdetoolbarbutton.h +++ b/tdeui/tdetoolbarbutton.h @@ -43,7 +43,7 @@ class TQPainter; */ class TDEUI_EXPORT TDEToolBarButton : public TQToolButton { - Q_OBJECT + TQ_OBJECT public: @@ -101,7 +101,7 @@ public: * @param pixmap The active pixmap */ // this one is from TQButton, so #ifdef-ing it out doesn't break BC - virtual void setPixmap(const TQPixmap &pixmap) KDE_DEPRECATED; + virtual void setPixmap(const TQPixmap &pixmap) TDE_DEPRECATED; /** * @deprecated @@ -110,7 +110,7 @@ public: * * @param pixmap The pixmap to use as the default (normal) one */ - void setDefaultPixmap(const TQPixmap& pixmap) KDE_DEPRECATED; + void setDefaultPixmap(const TQPixmap& pixmap) TDE_DEPRECATED; /** * @deprecated @@ -119,7 +119,7 @@ public: * * @param pixmap The pixmap to use when disabled */ - void setDisabledPixmap(const TQPixmap& pixmap) KDE_DEPRECATED; + void setDisabledPixmap(const TQPixmap& pixmap) TDE_DEPRECATED; #endif /** @@ -162,7 +162,7 @@ public: * @param generate If true, then the other icons are automagically * generated from this one */ - KDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); } + TDE_DEPRECATED void setIcon(const TQString &icon, bool generate ) { Q_UNUSED(generate); setIcon( icon ); } /** * @deprecated @@ -171,7 +171,7 @@ public: * * @param icon The icon to use as the default (normal) one */ - void setDefaultIcon(const TQString& icon) KDE_DEPRECATED; + void setDefaultIcon(const TQString& icon) TDE_DEPRECATED; /** * @deprecated @@ -180,7 +180,7 @@ public: * * @param icon The icon to use when disabled */ - void setDisabledIcon(const TQString& icon) KDE_DEPRECATED; + void setDisabledIcon(const TQString& icon) TDE_DEPRECATED; #endif /** diff --git a/tdeui/tdetoolbarhandler.cpp b/tdeui/tdetoolbarhandler.cpp index dd9cf7087..aff328aca 100644 --- a/tdeui/tdetoolbarhandler.cpp +++ b/tdeui/tdetoolbarhandler.cpp @@ -51,7 +51,7 @@ namespace TQPtrListIterator<TQDockWindow> dockWindowIt( dockWindows ); for ( ; dockWindowIt.current(); ++dockWindowIt ) { - TDEToolBar *toolBar = tqt_dynamic_cast<TDEToolBar *>( dockWindowIt.current() ); + TDEToolBar *toolBar = dynamic_cast<TDEToolBar *>( dockWindowIt.current() ); if ( !toolBar ) continue; @@ -177,11 +177,11 @@ void ToolBarHandler::setupActions() /* for ( TQPtrListIterator<TDEToolBar> toolBarIt( m_toolBars ); toolBarIt.current(); ++toolBarIt ) - connect( toolBarIt.current(), TQT_SIGNAL( destroyed() ), - this, TQT_SLOT( setupActions() ) ); + connect( toolBarIt.current(), TQ_SIGNAL( destroyed() ), + this, TQ_SLOT( setupActions() ) ); */ - if (kapp && kapp->authorizeTDEAction("options_show_toolbar")) + if (tdeApp && tdeApp->authorizeTDEAction("options_show_toolbar")) plugActionList( actionListName, m_actions ); connectToActionContainers(); @@ -198,8 +198,8 @@ void ToolBarHandler::init( TDEMainWindow *mainWindow ) d = 0; m_mainWindow = mainWindow; - connect( m_mainWindow->guiFactory(), TQT_SIGNAL( clientAdded( KXMLGUIClient * ) ), - this, TQT_SLOT( clientAdded( KXMLGUIClient * ) ) ); + connect( m_mainWindow->guiFactory(), TQ_SIGNAL( clientAdded( KXMLGUIClient * ) ), + this, TQ_SLOT( clientAdded( KXMLGUIClient * ) ) ); /* re-use an existing resource file if it exists. can happen if the user launches the * toolbar editor */ @@ -232,12 +232,12 @@ void ToolBarHandler::connectToActionContainer( TDEAction *action ) void ToolBarHandler::connectToActionContainer( TQWidget *container ) { - TQPopupMenu *popupMenu = tqt_dynamic_cast<TQPopupMenu *>( container ); + TQPopupMenu *popupMenu = dynamic_cast<TQPopupMenu *>( container ); if ( !popupMenu ) return; - connect( popupMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupActions() ) ); + connect( popupMenu, TQ_SIGNAL( aboutToShow() ), + this, TQ_SLOT( setupActions() ) ); } #include "tdetoolbarhandler.moc" diff --git a/tdeui/tdetoolbarhandler.h b/tdeui/tdetoolbarhandler.h index fe25ace98..aea84b84b 100644 --- a/tdeui/tdetoolbarhandler.h +++ b/tdeui/tdetoolbarhandler.h @@ -33,7 +33,7 @@ namespace KDEPrivate class ToolBarHandler : public TQObject, public KXMLGUIClient { - Q_OBJECT + TQ_OBJECT public: ToolBarHandler( TDEMainWindow *mainWindow, const char *name = 0 ); ToolBarHandler( TDEMainWindow *mainWindow, TQObject *parent, const char *name = 0 ); diff --git a/tdeui/tdetoolbarlabelaction.cpp b/tdeui/tdetoolbarlabelaction.cpp index 07cfbb731..e75e0a755 100644 --- a/tdeui/tdetoolbarlabelaction.cpp +++ b/tdeui/tdetoolbarlabelaction.cpp @@ -85,8 +85,8 @@ void TDEToolBarLabelAction::init() konq_misc.cpp */ d->m_label->setBackgroundMode(TQt::PaletteButton); d->m_label->setAlignment((TQApplication::reverseLayout() - ? Qt::AlignRight : Qt::AlignLeft) | - Qt::AlignVCenter | TQt::ShowPrefix ); + ? TQt::AlignRight : TQt::AlignLeft) | + TQt::AlignVCenter | TQt::ShowPrefix ); d->m_label->adjustSize(); } diff --git a/tdeui/tdetoolbarlabelaction.h b/tdeui/tdetoolbarlabelaction.h index c330c9254..801f0ed78 100644 --- a/tdeui/tdetoolbarlabelaction.h +++ b/tdeui/tdetoolbarlabelaction.h @@ -35,11 +35,11 @@ class TQLabel; * * KHistoryCombo* findCombo = new KHistoryCombo(true, this); * KWidgetAction* action - * = new KWidgetAction(findCombo, i18n("F&ind Combo"), Qt::Key_F6, this, - * TQT_SLOT(slotFocus()), actionCollection(), "find_combo"); + * = new KWidgetAction(findCombo, i18n("F&ind Combo"), TQt::Key_F6, this, + * TQ_SLOT(slotFocus()), actionCollection(), "find_combo"); * * new TDEToolBarLabelAction(findCombo, i18n("F&ind "), 0, this, - * TQT_SLOT(slotFocus()), actionCollection(), + * TQ_SLOT(slotFocus()), actionCollection(), * "find_label"); * * \endcode @@ -54,8 +54,8 @@ public: * * @param text The label's and the action's text. * @param cut The action's shortcut. - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -70,8 +70,8 @@ public: * typed. * @param text The label's and the action's text. * @param cut The action's shortcut. - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ @@ -93,8 +93,8 @@ public: * * @param label the label which is displayed in the toolbar. * @param cut The action's shortcut. - * @param receiver The SLOT's parent. - * @param slot The TQT_SLOT to invoke to execute this action. + * @param receiver The slot's parent. + * @param slot The slot to invoke to execute this action. * @param parent This action's parent. * @param name An internal name for this action. */ diff --git a/tdeui/tdetoolbarradiogroup.cpp b/tdeui/tdetoolbarradiogroup.cpp index 937354357..0f5febb0a 100644 --- a/tdeui/tdetoolbarradiogroup.cpp +++ b/tdeui/tdetoolbarradiogroup.cpp @@ -36,7 +36,7 @@ TDEToolBarRadioGroup::TDEToolBarRadioGroup (TDEToolBar *_parent, const char *_na { buttons = new TDEToolBarButtonList(); tb = _parent; - connect (tb, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(slotToggled(int))); + connect (tb, TQ_SIGNAL(toggled(int)), this, TQ_SLOT(slotToggled(int))); } TDEToolBarRadioGroup::~TDEToolBarRadioGroup() diff --git a/tdeui/tdetoolbarradiogroup.h b/tdeui/tdetoolbarradiogroup.h index d262aa539..5df8c5a20 100644 --- a/tdeui/tdetoolbarradiogroup.h +++ b/tdeui/tdetoolbarradiogroup.h @@ -48,7 +48,7 @@ class TDEToolBarRadioGroupPrivate; */ class TDEUI_EXPORT TDEToolBarRadioGroup : public TQObject { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/tests/go.png b/tdeui/tests/go.png Binary files differindex 67aeab641..65b83a303 100644..100755 --- a/tdeui/tests/go.png +++ b/tdeui/tests/go.png diff --git a/tdeui/tests/itemcontainertest.cpp b/tdeui/tests/itemcontainertest.cpp index c3b6d1ddc..7226eb6f5 100644 --- a/tdeui/tests/itemcontainertest.cpp +++ b/tdeui/tests/itemcontainertest.cpp @@ -66,7 +66,7 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) hBox->addSpacing( 5 ); //Selection mode selection - m_pbgMode = new TQButtonGroup( 1, Qt::Horizontal, "Selection Mode", this); + m_pbgMode = new TQButtonGroup( 1, TQt::Horizontal, "Selection Mode", this); m_pbgMode->insert(new TQRadioButton("NoSlection", m_pbgMode), TopLevel::NoSelection ); m_pbgMode->insert(new TQRadioButton("Single", m_pbgMode), TopLevel::Single ); m_pbgMode->insert(new TQRadioButton("Multi", m_pbgMode), TopLevel::Multi ); @@ -74,52 +74,52 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) m_pbgMode->setExclusive( true ); vBox->addWidget( m_pbgMode ); - connect( m_pbgMode, TQT_SIGNAL( clicked( int ) ), - this, TQT_SLOT( slotSwitchMode( int ) ) ); + connect( m_pbgMode, TQ_SIGNAL( clicked( int ) ), + this, TQ_SLOT( slotSwitchMode( int ) ) ); //Signal labels - TQGroupBox* gbWiget = new TQGroupBox( 1, Qt::Horizontal, "Widget", this); + TQGroupBox* gbWiget = new TQGroupBox( 1, TQt::Horizontal, "Widget", this); m_plblWidget = new TQLabel( gbWiget ); vBox->addWidget( gbWiget ); - TQGroupBox* gbSignal = new TQGroupBox( 1, Qt::Horizontal, "emitted Signal", this); + TQGroupBox* gbSignal = new TQGroupBox( 1, TQt::Horizontal, "emitted Signal", this); m_plblSignal = new TQLabel( gbSignal ); vBox->addWidget( gbSignal ); - TQGroupBox* gbItem = new TQGroupBox( 1, Qt::Horizontal, "on Item", this); + TQGroupBox* gbItem = new TQGroupBox( 1, TQt::Horizontal, "on Item", this); m_plblItem = new TQLabel( gbItem ); vBox->addWidget( gbItem ); - TQButtonGroup* bgListView = new TQButtonGroup( 1, Qt::Horizontal, "TDEListView", this); + TQButtonGroup* bgListView = new TQButtonGroup( 1, TQt::Horizontal, "TDEListView", this); TQCheckBox* cbListView = new TQCheckBox("Single Column", bgListView); vBox->addWidget( bgListView ); - connect( cbListView, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SLOT( slotToggleSingleColumn( bool ) ) ); + connect( cbListView, TQ_SIGNAL( toggled( bool ) ), + this, TQ_SLOT( slotToggleSingleColumn( bool ) ) ); TDEGlobal::config()->reparseConfiguration(); //Create IconView - TQGroupBox* gbIconView = new TQGroupBox( 1, Qt::Horizontal, "TDEIconView", this); + TQGroupBox* gbIconView = new TQGroupBox( 1, TQt::Horizontal, "TDEIconView", this); m_pIconView = new TDEIconView( gbIconView ); hBox->addWidget( gbIconView ); hBox->addSpacing( 5 ); - connect( m_pIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), - this, TQT_SLOT( slotIconViewExec( TQIconViewItem* ) ) ); + connect( m_pIconView, TQ_SIGNAL( executed( TQIconViewItem* ) ), + this, TQ_SLOT( slotIconViewExec( TQIconViewItem* ) ) ); //Create ListView - TQGroupBox* gbListView = new TQGroupBox( 1, Qt::Horizontal, "TDEListView", this); + TQGroupBox* gbListView = new TQGroupBox( 1, TQt::Horizontal, "TDEListView", this); m_pListView = new TDEListView( gbListView ); m_pListView->addColumn("Item"); m_pListView->addColumn("Text"); hBox->addWidget( gbListView ); hBox->addSpacing( 5 ); - connect( m_pListView, TQT_SIGNAL( executed( TQListViewItem* ) ), - this, TQT_SLOT( slotListViewExec( TQListViewItem* ) ) ); + connect( m_pListView, TQ_SIGNAL( executed( TQListViewItem* ) ), + this, TQ_SLOT( slotListViewExec( TQListViewItem* ) ) ); //Create ListBox - TQGroupBox* gbListBox = new TQGroupBox( 1, Qt::Horizontal, "TDEListBox", this); + TQGroupBox* gbListBox = new TQGroupBox( 1, TQt::Horizontal, "TDEListBox", this); m_pListBox = new TDEListBox( gbListBox ); hBox->addWidget( gbListBox ); - connect( m_pListBox, TQT_SIGNAL( executed( TQListBoxItem* ) ), - this, TQT_SLOT( slotListBoxExec( TQListBoxItem* ) ) ); + connect( m_pListBox, TQ_SIGNAL( executed( TQListBoxItem* ) ), + this, TQ_SLOT( slotListBoxExec( TQListBoxItem* ) ) ); //Initialize buttons cbListView->setChecked( !m_pListView->allColumnsShowFocus() ); @@ -137,10 +137,10 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) new TQListBoxPixmap( m_pListBox, TQPixmap(item_xpm), TQString("Item%1").arg(i)); } - connect( m_pIconView, TQT_SIGNAL( clicked( TQIconViewItem* ) ), - this, TQT_SLOT( slotClicked( TQIconViewItem* ) ) ); - connect( m_pIconView, TQT_SIGNAL( doubleClicked( TQIconViewItem* ) ), - this, TQT_SLOT( slotDoubleClicked( TQIconViewItem* ) ) ); + connect( m_pIconView, TQ_SIGNAL( clicked( TQIconViewItem* ) ), + this, TQ_SLOT( slotClicked( TQIconViewItem* ) ) ); + connect( m_pIconView, TQ_SIGNAL( doubleClicked( TQIconViewItem* ) ), + this, TQ_SLOT( slotDoubleClicked( TQIconViewItem* ) ) ); } void TopLevel::slotSwitchMode( int id ) diff --git a/tdeui/tests/itemcontainertest.h b/tdeui/tests/itemcontainertest.h index cb6cc3a51..bb8c7fefc 100644 --- a/tdeui/tests/itemcontainertest.h +++ b/tdeui/tests/itemcontainertest.h @@ -11,7 +11,7 @@ class TQLabel; class TopLevel : public TQWidget { - Q_OBJECT + TQ_OBJECT public: TopLevel( TQWidget *parent=0, const char *name=0 ); diff --git a/tdeui/tests/kblendtest.cpp b/tdeui/tests/kblendtest.cpp index 4672b76ee..6484791b5 100644 --- a/tdeui/tests/kblendtest.cpp +++ b/tdeui/tests/kblendtest.cpp @@ -28,7 +28,7 @@ void KBlendWidget::paintEvent(TQPaintEvent */*ev*/) image = TQImage("testimage.png"); TQPainter p(this); - p.setPen(Qt::black); + p.setPen(TQt::black); // you see here use of anti_dir param (blend from down to up, here) time.start(); diff --git a/tdeui/tests/kbuttonboxtest.cpp b/tdeui/tests/kbuttonboxtest.cpp index c9eb1134b..3390ce5f3 100644 --- a/tdeui/tests/kbuttonboxtest.cpp +++ b/tdeui/tests/kbuttonboxtest.cpp @@ -37,16 +37,16 @@ int main(int argc, char **argv) { "the window!\n" "Press OK or Cancel when done" , w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setAlignment(TQt::AlignVCenter|TQt::AlignLeft|TQt::WordBreak); l->setMinimumSize(l->sizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); TQPushButton *b = bbox->addButton("OK"); b->setDefault(true); - w->connect(b, TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); - w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); + w->connect(b, TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); + w->connect(bbox->addButton("Cancel"), TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); bbox->addStretch(1); bbox->addButton("Help"); @@ -65,17 +65,17 @@ int main(int argc, char **argv) { TQLabel *l = new TQLabel("Another common dialog\n\n"\ "OK and Cancel are right aligned\n"\ "Try resizing the window!", w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setAlignment(TQt::AlignVCenter|TQt::AlignLeft|TQt::WordBreak); l->setMinimumSize(l->sizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); bbox->addStretch(1); TQPushButton *b = bbox->addButton("OK"); b->setDefault(true); - w->connect(b, TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); - w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); + w->connect(b, TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); + w->connect(bbox->addButton("Cancel"), TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); bbox->layout(); tl->addWidget(bbox,0); tl->activate(); @@ -91,17 +91,17 @@ int main(int argc, char **argv) { TQLabel *l = new TQLabel("Another common dialog\n\n"\ "OK and Cancel are middle aligned\n"\ "Try resizing the window!", w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setAlignment(TQt::AlignVCenter|TQt::AlignLeft|TQt::WordBreak); l->setMinimumSize(l->sizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); bbox->addStretch(1); TQPushButton *b = bbox->addButton("OK"); b->setDefault(true); - w->connect(b, TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); - w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); + w->connect(b, TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); + w->connect(bbox->addButton("Cancel"), TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); bbox->addStretch(1); bbox->layout(); tl->addWidget(bbox,0); @@ -120,17 +120,17 @@ int main(int argc, char **argv) { "the maximum width for all buttons\n" "since it will look ugly -- " "anyway, it works", w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setAlignment(TQt::AlignVCenter|TQt::AlignLeft|TQt::WordBreak); l->setMinimumSize(l->sizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); bbox->addStretch(1); TQPushButton *b = bbox->addButton("OK"); b->setDefault(true); - w->connect(b, TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); - w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); + w->connect(b, TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); + w->connect(bbox->addButton("Cancel"), TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); bbox->addButton("Push me and I give you a banana"); bbox->addStretch(1); @@ -152,17 +152,17 @@ int main(int argc, char **argv) { "prevent this strange effect as seen\n" "the former example!" ,w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setAlignment(TQt::AlignVCenter|TQt::AlignLeft|TQt::WordBreak); l->setMinimumSize(l->sizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w); bbox->addStretch(1); TQPushButton *b = bbox->addButton("OK"); b->setDefault(true); - w->connect(b, TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); - w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); + w->connect(b, TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); + w->connect(bbox->addButton("Cancel"), TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); bbox->addButton("Push me and I give you a banana", true); bbox->addStretch(1); @@ -182,16 +182,16 @@ int main(int argc, char **argv) { "to make vertically aligned buttons\n" "too?" ,w); - l->setAlignment(Qt::AlignVCenter|Qt::AlignLeft|Qt::WordBreak); + l->setAlignment(TQt::AlignVCenter|TQt::AlignLeft|TQt::WordBreak); l->setMinimumSize(l->sizeHint()); tl->addWidget(l,1); KButtonBox *bbox = new KButtonBox(w, KButtonBox::Vertical); TQPushButton *b = bbox->addButton("OK"); b->setDefault(true); - w->connect(b, TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); - w->connect(bbox->addButton("Cancel"), TQT_SIGNAL(clicked()), - w, TQT_SLOT(accept())); + w->connect(b, TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); + w->connect(bbox->addButton("Cancel"), TQ_SIGNAL(clicked()), + w, TQ_SLOT(accept())); bbox->addStretch(1); bbox->layout(); diff --git a/tdeui/tests/kcolordlgtest.cpp b/tdeui/tests/kcolordlgtest.cpp index dbe39484c..a7738a7ed 100644 --- a/tdeui/tests/kcolordlgtest.cpp +++ b/tdeui/tests/kcolordlgtest.cpp @@ -33,7 +33,7 @@ int main( int argc, char *argv[] ) aConfig.setGroup( "KColorDialog-test" ); color = aConfig.readColorEntry( "Chosen" ); - int nRet = KColorDialog::getColor( color, Qt::red /*testing default color*/ ); + int nRet = KColorDialog::getColor( color, TQt::red /*testing default color*/ ); aConfig.writeEntry( "Chosen", color ); return nRet; diff --git a/tdeui/tests/kcolortest.cpp b/tdeui/tests/kcolortest.cpp index 243de265b..09b4a56c1 100644 --- a/tdeui/tests/kcolortest.cpp +++ b/tdeui/tests/kcolortest.cpp @@ -25,7 +25,7 @@ void KColorWidget::paintEvent(TQPaintEvent *) { if(!pixmap.isNull()) bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } void KColorWidget::doIntensityLoop() @@ -46,11 +46,11 @@ void KColorWidget::doIntensityLoop() KImageEffect::intensity(image, -1./max); else { uint *qptr=(uint *)image.bits(); - QRgb qrgb; + TQRgb qrgb; int size=pixmap.width()*pixmap.height(); for (int i=0;i<size; i++, qptr++) { - qrgb=*(QRgb *)qptr; + qrgb=*(TQRgb *)qptr; *qptr=tqRgb((int)(tqRed(qrgb)*1./max), (int)(tqGreen(qrgb)*1./max), (int)(tqBlue(qrgb)*1./max)); @@ -58,7 +58,7 @@ void KColorWidget::doIntensityLoop() } pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } stop = t.elapsed(); tqDebug ("Total fullscreen %s dim time for %d steps : %f s", @@ -71,7 +71,7 @@ void KColorWidget::doIntensityLoop() KImageEffect::fade(image, 1./max, black); pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } } stop = t.elapsed(); @@ -87,14 +87,14 @@ void KColorWidget::doIntensityLoop() KImageEffect::intensity(image, 1./max); pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } for(count=0; count < max; ++count){ KImageEffect::intensity(image, -1./max); pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } image = original; image.detach(); @@ -103,13 +103,13 @@ void KColorWidget::doIntensityLoop() KImageEffect::channelIntensity(image, -1./max, KImageEffect::Red); pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } for(count=0; count < max; ++count){ KImageEffect::channelIntensity(image, 1./max, KImageEffect::Red); pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } image = original; image.detach(); @@ -118,13 +118,13 @@ void KColorWidget::doIntensityLoop() KImageEffect::channelIntensity(image, -1./max, KImageEffect::Green); pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } for(count=0; count < max; ++count){ KImageEffect::channelIntensity(image, 1./max, KImageEffect::Green); pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } image = original; image.detach(); @@ -133,13 +133,13 @@ void KColorWidget::doIntensityLoop() KImageEffect::channelIntensity(image, -1./max, KImageEffect::Blue); pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } for(count=0; count < max; ++count){ KImageEffect::channelIntensity(image, 1./max, KImageEffect::Blue); pixmap.convertFromImage(image); bitBlt(this, 0, 0, &pixmap, 0, 0, pixmap.width(), pixmap.height(), - Qt::CopyROP, true); + TQt::CopyROP, true); } } } diff --git a/tdeui/tests/kcomboboxtest.cpp b/tdeui/tests/kcomboboxtest.cpp index d2b59a4c2..c72e0a43c 100644 --- a/tdeui/tests/kcomboboxtest.cpp +++ b/tdeui/tests/kcomboboxtest.cpp @@ -11,7 +11,7 @@ #include <kdialog.h> #include <tdelocale.h> #include <kiconloader.h> -#include <ksimpleconfig.h> +#include <tdesimpleconfig.h> #include <tqpushbutton.h> #include <tqlayout.h> @@ -40,8 +40,8 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) m_qc = new TQComboBox(hbox, "QtReadOnlyCombo" ); lbl->setBuddy (m_qc); - TQObject::connect (m_qc, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int))); - TQObject::connect (m_qc, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT (slotActivated(const TQString&))); + TQObject::connect (m_qc, TQ_SIGNAL(activated(int)), TQ_SLOT(slotActivated(int))); + TQObject::connect (m_qc, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT (slotActivated(const TQString&))); vbox->addWidget (hbox); // Read-only combobox @@ -53,8 +53,8 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) m_ro = new KComboBox(hbox, "ReadOnlyCombo" ); lbl->setBuddy (m_ro); m_ro->setCompletionMode( TDEGlobalSettings::CompletionAuto ); - TQObject::connect (m_ro, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int))); - TQObject::connect (m_ro, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT (slotActivated(const TQString&))); + TQObject::connect (m_ro, TQ_SIGNAL(activated(int)), TQ_SLOT(slotActivated(int))); + TQObject::connect (m_ro, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT (slotActivated(const TQString&))); vbox->addWidget (hbox); // Read-write combobox @@ -68,10 +68,10 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) m_rw->setDuplicatesEnabled( true ); m_rw->setInsertionPolicy( TQComboBox::NoInsertion ); m_rw->setTrapReturnKey( true ); - TQObject::connect (m_rw, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int))); - TQObject::connect (m_rw, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotActivated(const TQString&))); - TQObject::connect (m_rw, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed())); - TQObject::connect (m_rw, TQT_SIGNAL(returnPressed(const TQString&)), TQT_SLOT(slotReturnPressed(const TQString&))); + TQObject::connect (m_rw, TQ_SIGNAL(activated(int)), TQ_SLOT(slotActivated(int))); + TQObject::connect (m_rw, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT(slotActivated(const TQString&))); + TQObject::connect (m_rw, TQ_SIGNAL(returnPressed()), TQ_SLOT(slotReturnPressed())); + TQObject::connect (m_rw, TQ_SIGNAL(returnPressed(const TQString&)), TQ_SLOT(slotReturnPressed(const TQString&))); vbox->addWidget (hbox); // History combobox... @@ -84,9 +84,9 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) lbl->setBuddy (m_hc); m_hc->setDuplicatesEnabled( true ); m_hc->setInsertionPolicy( TQComboBox::NoInsertion ); - TQObject::connect (m_hc, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int))); - TQObject::connect (m_hc, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotActivated(const TQString&))); - TQObject::connect (m_hc, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed())); + TQObject::connect (m_hc, TQ_SIGNAL(activated(int)), TQ_SLOT(slotActivated(int))); + TQObject::connect (m_hc, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT(slotActivated(const TQString&))); + TQObject::connect (m_hc, TQ_SIGNAL(returnPressed()), TQ_SLOT(slotReturnPressed())); vbox->addWidget (hbox); m_hc->setTrapReturnKey(true); @@ -99,19 +99,19 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) m_konqc = new KComboBox( true, hbox, "KonqyCombo" ); lbl->setBuddy (m_konqc); m_konqc->setMaxCount( 10 ); - TQObject::connect (m_konqc, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int))); - TQObject::connect (m_konqc, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT (slotActivated(const TQString&))); - TQObject::connect (m_konqc, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotReturnPressed())); + TQObject::connect (m_konqc, TQ_SIGNAL(activated(int)), TQ_SLOT(slotActivated(int))); + TQObject::connect (m_konqc, TQ_SIGNAL(activated(const TQString&)), TQ_SLOT (slotActivated(const TQString&))); + TQObject::connect (m_konqc, TQ_SIGNAL(returnPressed()), TQ_SLOT(slotReturnPressed())); vbox->addWidget (hbox); // Create an exit button hbox = new TQHBox (this); m_btnExit = new TQPushButton( "E&xit", hbox ); - TQObject::connect( m_btnExit, TQT_SIGNAL(clicked()), TQT_SLOT(quitApp()) ); + TQObject::connect( m_btnExit, TQ_SIGNAL(clicked()), TQ_SLOT(quitApp()) ); // Create a disable button... m_btnEnable = new TQPushButton( "Disa&ble", hbox ); - TQObject::connect (m_btnEnable, TQT_SIGNAL(clicked()), TQT_SLOT(slotDisable())); + TQObject::connect (m_btnEnable, TQ_SIGNAL(clicked()), TQ_SLOT(slotDisable())); vbox->addWidget (hbox); @@ -137,7 +137,7 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) m_hc->completionObject()->setItems( list ); // Setup konq's combobox - KSimpleConfig historyConfig( "konq_history" ); + TDESimpleConfig historyConfig( "konq_history" ); historyConfig.setGroup( "Location Bar" ); TDECompletion * s_pCompletion = new TDECompletion; s_pCompletion->setOrder( TDECompletion::Weighted ); @@ -150,7 +150,7 @@ KComboBoxTest::KComboBoxTest(TQWidget* widget, const char* name ) m_konqc->setCurrentItem( m_konqc->count()-1 ); m_timer = new TQTimer (this); - connect (m_timer, TQT_SIGNAL (timeout()), TQT_SLOT (slotTimeout())); + connect (m_timer, TQ_SIGNAL (timeout()), TQ_SLOT (slotTimeout())); } KComboBoxTest::~KComboBoxTest() @@ -212,7 +212,7 @@ void KComboBoxTest::slotReturnPressed(const TQString& item) void KComboBoxTest::quitApp() { - kapp->closeAllWindows(); + tdeApp->closeAllWindows(); } int main ( int argc, char **argv) diff --git a/tdeui/tests/kcomboboxtest.h b/tdeui/tests/kcomboboxtest.h index 6566c9097..577b09080 100644 --- a/tdeui/tests/kcomboboxtest.h +++ b/tdeui/tests/kcomboboxtest.h @@ -11,7 +11,7 @@ class KComboBox; class KComboBoxTest : public TQWidget { - Q_OBJECT + TQ_OBJECT public: KComboBoxTest ( TQWidget *parent=0, const char *name=0 ); diff --git a/tdeui/tests/kcompletiontest.cpp b/tdeui/tests/kcompletiontest.cpp index 261534465..a6c010fc7 100644 --- a/tdeui/tests/kcompletiontest.cpp +++ b/tdeui/tests/kcompletiontest.cpp @@ -38,11 +38,11 @@ Form1::Form1( TQWidget* parent, const char* name ) GroupBox1 = new TQGroupBox( this, "GroupBox1" ); GroupBox1->setTitle( "Completion Test" ); - GroupBox1->setColumnLayout(0, Qt::Vertical ); + GroupBox1->setColumnLayout(0, TQt::Vertical ); GroupBox1->layout()->setSpacing( 0 ); GroupBox1->layout()->setMargin( 0 ); GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() ); - GroupBox1Layout->setAlignment( Qt::AlignTop ); + GroupBox1Layout->setAlignment( TQt::AlignTop ); GroupBox1Layout->setSpacing( 6 ); GroupBox1Layout->setMargin( 11 ); @@ -74,8 +74,8 @@ Form1::Form1( TQWidget* parent, const char* name ) combo->setCompletionObject( edit->completionObject() ); // combo->setMaxCount( 5 ); combo->setHistoryItems( defaultItems(), true ); - connect( combo, TQT_SIGNAL( activated( const TQString& )), - combo, TQT_SLOT( addToHistory( const TQString& ))); + connect( combo, TQ_SIGNAL( activated( const TQString& )), + combo, TQ_SLOT( addToHistory( const TQString& ))); TQToolTip::add( combo, "KHistoryCombo" ); Layout2->addWidget( combo ); @@ -84,7 +84,7 @@ Form1::Form1( TQWidget* parent, const char* name ) PushButton1 = new TQPushButton( GroupBox1, "PushButton1" ); PushButton1->setText( "Add" ); - connect( PushButton1, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() )); + connect( PushButton1, TQ_SIGNAL( clicked() ), TQ_SLOT( slotAdd() )); Layout2->addWidget( PushButton1 ); Layout9->addLayout( Layout2 ); @@ -96,7 +96,7 @@ Form1::Form1( TQWidget* parent, const char* name ) PushButton1_4 = new TQPushButton( GroupBox1, "PushButton1_4" ); PushButton1_4->setText( "Remove" ); - connect( PushButton1_4, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemove() )); + connect( PushButton1_4, TQ_SIGNAL( clicked() ), TQ_SLOT( slotRemove() )); Layout3->addWidget( PushButton1_4 ); Layout9->addLayout( Layout3 ); @@ -106,8 +106,8 @@ Form1::Form1( TQWidget* parent, const char* name ) ListBox1 = new TQListBox( GroupBox1, "ListBox1" ); Layout8->addWidget( ListBox1 ); - connect( ListBox1, TQT_SIGNAL( highlighted( const TQString& )), - TQT_SLOT( slotHighlighted( const TQString& ))); + connect( ListBox1, TQ_SIGNAL( highlighted( const TQString& )), + TQ_SLOT( slotHighlighted( const TQString& ))); TQToolTip::add( ListBox1, "Contains the contents of the completion object.\n:x is the weighting, i.e. how often an item has been inserted"); Layout7 = new TQVBoxLayout; @@ -116,13 +116,13 @@ Form1::Form1( TQWidget* parent, const char* name ) PushButton1_3 = new TQPushButton( GroupBox1, "PushButton1_3" ); PushButton1_3->setText( "Completion items" ); - connect( PushButton1_3, TQT_SIGNAL( clicked() ), TQT_SLOT( slotList() )); + connect( PushButton1_3, TQ_SIGNAL( clicked() ), TQ_SLOT( slotList() )); Layout7->addWidget( PushButton1_3 ); PushButton1_2 = new TQPushButton( GroupBox1, "PushButton1_2" ); PushButton1_2->setText( "Clear" ); - connect( PushButton1_2, TQT_SIGNAL( clicked() ), - edit->completionObject(), TQT_SLOT( clear() )); + connect( PushButton1_2, TQ_SIGNAL( clicked() ), + edit->completionObject(), TQ_SLOT( clear() )); Layout7->addWidget( PushButton1_2 ); Layout8->addLayout( Layout7 ); Layout9->addLayout( Layout8 ); diff --git a/tdeui/tests/kcompletiontest.h b/tdeui/tests/kcompletiontest.h index 9443401eb..03cb6ed2a 100644 --- a/tdeui/tests/kcompletiontest.h +++ b/tdeui/tests/kcompletiontest.h @@ -27,7 +27,7 @@ class KLineEdit; class Form1 : public TQWidget { - Q_OBJECT + TQ_OBJECT public: Form1( TQWidget* parent = 0, const char* name = 0 ); diff --git a/tdeui/tests/kdesattest.cpp b/tdeui/tests/kdesattest.cpp index 8eab0b125..3daf22b08 100644 --- a/tdeui/tests/kdesattest.cpp +++ b/tdeui/tests/kdesattest.cpp @@ -15,7 +15,7 @@ KDesatWidget::KDesatWidget(TQWidget *parent, const char *name) slide = new KDoubleNumInput(700, this, "desat"); slide->setRange(0, 1, 0.001); slide->setLabel("Desaturate: ", AlignVCenter | AlignLeft); - connect(slide,TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(change(double))); + connect(slide,TQ_SIGNAL(valueChanged(double)), this, TQ_SLOT(change(double))); resize(image.width()*2, image.height() + slide->height()); slide->setGeometry(0, image.height(), image.width()*2, slide->height()); @@ -33,7 +33,7 @@ void KDesatWidget::paintEvent(TQPaintEvent */*ev*/) TQString say; TQPainter p(this); - p.setPen(Qt::black); + p.setPen(TQt::black); // original image time.start(); diff --git a/tdeui/tests/kdesattest.h b/tdeui/tests/kdesattest.h index 8e04c08c6..4faaa2798 100644 --- a/tdeui/tests/kdesattest.h +++ b/tdeui/tests/kdesattest.h @@ -13,7 +13,7 @@ class KDesatWidget : public TQWidget { -Q_OBJECT +TQ_OBJECT public: KDesatWidget(TQWidget *parent=0, const char *name=0); diff --git a/tdeui/tests/kdocktest.cpp b/tdeui/tests/kdocktest.cpp index 538e2b888..57b8d2a08 100644 --- a/tdeui/tests/kdocktest.cpp +++ b/tdeui/tests/kdocktest.cpp @@ -18,7 +18,7 @@ DockTest::DockTest( TQWidget* parent ) m_blueDock->setCaption( "Blue" ); m_blueDock->setGeometry( 50, 50, 100, 100 ); TQWidget *l = new TQWidget( m_blueDock ); - l->setBackgroundColor( Qt::blue ); + l->setBackgroundColor( TQt::blue ); l->setMinimumSize( 100,100 ); m_blueDock->setWidget( l ); @@ -32,7 +32,7 @@ DockTest::DockTest( TQWidget* parent ) m_redDock->setCaption( "Red" ); m_redDock->setGeometry( 50, 50, 100, 100 ); l = new TQWidget( m_redDock ); - l->setBackgroundColor( Qt::red ); + l->setBackgroundColor( TQt::red ); l->setMinimumSize( 100,100 ); m_redDock->setWidget( l ); m_redDock->manualDock( m_blueDock, KDockWidget::DockLeft, 3000 ); @@ -45,7 +45,7 @@ DockTest::DockTest( TQWidget* parent ) m_yellowDock->setCaption( "Yellow" ); m_yellowDock->setGeometry( 50, 50, 100, 100 ); l = new TQWidget( m_yellowDock ); - l->setBackgroundColor( Qt::yellow ); + l->setBackgroundColor( TQt::yellow ); l->setMinimumSize( 100,100 ); m_yellowDock->setWidget( l ); m_yellowDock->manualDock( m_blueDock, KDockWidget::DockTop, 5000 ); diff --git a/tdeui/tests/kdocktest.h b/tdeui/tests/kdocktest.h index f23d22a35..d38ac029a 100644 --- a/tdeui/tests/kdocktest.h +++ b/tdeui/tests/kdocktest.h @@ -6,7 +6,7 @@ class TQWidget; class DockTest : public KDockArea { - Q_OBJECT + TQ_OBJECT public: DockTest( TQWidget* parent=0 ); diff --git a/tdeui/tests/kdockwidgetdemo.cpp b/tdeui/tests/kdockwidgetdemo.cpp index a922acf2d..e1583fa4a 100644 --- a/tdeui/tests/kdockwidgetdemo.cpp +++ b/tdeui/tests/kdockwidgetdemo.cpp @@ -81,7 +81,7 @@ static const char *preview_xpm[] = { SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const char* name ) :TQDialog(0L,name,true) { - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup( TQString::fromLatin1("SFileDialogData:") + name ); if ( initially.isNull() ){ initially = config->readPathEntry( "InitiallyDir", TQDir::currentDirPath() ); @@ -116,8 +116,8 @@ SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const fd->reparent(d_fd, TQPoint(0,0)); d_fd->setWidget( fd ); - connect( dirView, TQT_SIGNAL( folderSelected( const TQString & ) ), fd, TQT_SLOT( setDir2( const TQString & ) ) ); - connect( fd, TQT_SIGNAL( dirEntered( const TQString & ) ), dirView, TQT_SLOT( setDir( const TQString & ) ) ); + connect( dirView, TQ_SIGNAL( folderSelected( const TQString & ) ), fd, TQ_SLOT( setDir2( const TQString & ) ) ); + connect( fd, TQ_SIGNAL( dirEntered( const TQString & ) ), dirView, TQ_SLOT( setDir( const TQString & ) ) ); d_fd->setDockSite( KDockWidget::DockTop|KDockWidget::DockLeft|KDockWidget::DockRight|KDockWidget::DockBottom ); d_fd->setEnableDocking(KDockWidget::DockNone); @@ -128,16 +128,16 @@ SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const d_dirView->manualDock( d_fd, KDockWidget::DockLeft, 20 ); d_preview->manualDock( d_fd, KDockWidget::DockBottom, 70 ); - connect(fd, TQT_SIGNAL(fileHighlighted(const TQString&)), preview, TQT_SLOT(showPreview(const TQString&))); - connect(fd, TQT_SIGNAL(signalDone(int)), this, TQT_SLOT(done(int))); + connect(fd, TQ_SIGNAL(fileHighlighted(const TQString&)), preview, TQ_SLOT(showPreview(const TQString&))); + connect(fd, TQ_SIGNAL(signalDone(int)), this, TQ_SLOT(done(int))); - connect(fd, TQT_SIGNAL(dirEntered(const TQString&)), this, TQT_SLOT(changeDir(const TQString&))); - connect(dirView, TQT_SIGNAL(folderSelected(const TQString&)), this, TQT_SLOT(changeDir(const TQString&))); + connect(fd, TQ_SIGNAL(dirEntered(const TQString&)), this, TQ_SLOT(changeDir(const TQString&))); + connect(dirView, TQ_SIGNAL(folderSelected(const TQString&)), this, TQ_SLOT(changeDir(const TQString&))); b_tree = new TQToolButton( fd ); TQToolTip::add( b_tree, "Show/Hide Tree" ); b_tree->setPixmap( TQPixmap( dir_tree_xpm ) ); - connect( b_tree, TQT_SIGNAL(clicked()), d_dirView, TQT_SLOT(changeHideShowState()) ); + connect( b_tree, TQ_SIGNAL(clicked()), d_dirView, TQ_SLOT(changeHideShowState()) ); b_tree->setToggleButton(true); b_tree->setOn(true); fd->addToolButton( b_tree, true ); @@ -145,13 +145,13 @@ SFileDialog::SFileDialog( TQString initially, const TQStringList& filter, const b_preview = new TQToolButton( fd ); TQToolTip::add( b_preview, "Show/Hide Preview" ); b_preview->setPixmap( TQPixmap( preview_xpm ) ); - connect( b_preview, TQT_SIGNAL(clicked()), d_preview, TQT_SLOT(changeHideShowState()) ); + connect( b_preview, TQ_SIGNAL(clicked()), d_preview, TQ_SLOT(changeHideShowState()) ); b_preview->setToggleButton(true); b_preview->setOn(true); fd->addToolButton( b_preview ); - connect( dockManager, TQT_SIGNAL(change()), this, TQT_SLOT(dockChange())); - connect( dockManager, TQT_SIGNAL(setDockDefaultPos(KDockWidget*)), this, TQT_SLOT(setDockDefaultPos(KDockWidget*))); + connect( dockManager, TQ_SIGNAL(change()), this, TQ_SLOT(dockChange())); + connect( dockManager, TQ_SIGNAL(setDockDefaultPos(KDockWidget*)), this, TQ_SLOT(setDockDefaultPos(KDockWidget*))); setCaption("Open File"); resize(550,450); tqDebug("read config"); @@ -166,7 +166,7 @@ void SFileDialog::dockChange() SFileDialog::~SFileDialog() { - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup( TQString("SFileDialogData:") + name() ); config->writeEntry( "Bookmarks", fd->getBookmark() ); @@ -188,7 +188,7 @@ void SFileDialog::setDockDefaultPos( KDockWidget* d ) void SFileDialog::changeDir( const TQString& f ) { if ( !f.isEmpty() ){ - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup( TQString("SFileDialogData:") + name() ); config->writePathEntry( "InitiallyDir", f ); } @@ -403,7 +403,7 @@ CustomFileDialog::CustomFileDialog( TQWidget* parent ) TQToolTip::add( p, tr( "Bookmarks" ) ); bookmarkMenu = new TQPopupMenu( this ); - connect( bookmarkMenu, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( bookmarkChosen( int ) ) ); + connect( bookmarkMenu, TQ_SIGNAL( activated( int ) ), this, TQ_SLOT( bookmarkChosen( int ) ) ); addId = bookmarkMenu->insertItem( "Add bookmark" ); clearId = bookmarkMenu->insertItem( TQPixmap(folder_trash), "Clear bookmarks" ); bookmarkMenu->insertSeparator(); @@ -416,7 +416,7 @@ CustomFileDialog::CustomFileDialog( TQWidget* parent ) TQToolTip::add( b, tr( "Go Home!" ) ); b->setPixmap( TQPixmap( homepage_xpm ) ); - connect( b, TQT_SIGNAL( clicked() ), this, TQT_SLOT( goHome() ) ); + connect( b, TQ_SIGNAL( clicked() ), this, TQ_SLOT( goHome() ) ); addToolButton( b ); } @@ -695,12 +695,12 @@ TQString Directory::text( int column ) const DirectoryView::DirectoryView( TQWidget *parent, const char *name ) :TQListView( parent, name ) { - connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ), - this, TQT_SLOT( slotFolderSelected( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( slotFolderSelected( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), - this, TQT_SLOT( slotFolderSelected( TQListViewItem * ) ) ); + connect( this, TQ_SIGNAL( clicked( TQListViewItem * ) ), + this, TQ_SLOT( slotFolderSelected( TQListViewItem * ) ) ); + connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQ_SLOT( slotFolderSelected( TQListViewItem * ) ) ); + connect( this, TQ_SIGNAL( returnPressed( TQListViewItem * ) ), + this, TQ_SLOT( slotFolderSelected( TQListViewItem * ) ) ); setAcceptDrops( true ); viewport()->setAcceptDrops( true ); diff --git a/tdeui/tests/kdockwidgetdemo.h b/tdeui/tests/kdockwidgetdemo.h index b6f029cd5..f3227fb86 100644 --- a/tdeui/tests/kdockwidgetdemo.h +++ b/tdeui/tests/kdockwidgetdemo.h @@ -29,7 +29,7 @@ class Preview; class DirectoryView; class SFileDialog : public TQDialog -{Q_OBJECT +{TQ_OBJECT public: SFileDialog( TQString initially = TQString::null, @@ -87,7 +87,7 @@ private: }; class DirectoryView : public TQListView -{Q_OBJECT +{TQ_OBJECT public: DirectoryView( TQWidget *parent = 0, const char *name = 0 ); virtual void setOpen ( TQListViewItem *, bool ); @@ -108,7 +108,7 @@ private: }; /******************************************************************************************************/ class PixmapView : public TQScrollView -{Q_OBJECT +{TQ_OBJECT public: PixmapView( TQWidget *parent ); void setPixmap( const TQPixmap &pix ); @@ -119,7 +119,7 @@ private: }; class Preview : public TQWidgetStack -{Q_OBJECT +{TQ_OBJECT public: Preview( TQWidget *parent ); @@ -133,7 +133,7 @@ private: }; class CustomFileDialog : public TQFileDialog -{Q_OBJECT +{TQ_OBJECT public: CustomFileDialog( TQWidget* parent ); ~CustomFileDialog(); diff --git a/tdeui/tests/kdockwidgettest.cpp b/tdeui/tests/kdockwidgettest.cpp index aacac19a0..154d02463 100644 --- a/tdeui/tests/kdockwidgettest.cpp +++ b/tdeui/tests/kdockwidgettest.cpp @@ -101,7 +101,7 @@ DockApplication::DockApplication( const char* name ) l->setBackgroundColor(white); l->setMinimumSize(100,100); dock5->setWidget(l); - if (::tqqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 5"); + if (::tqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 5"); /*****************************************************/ /*****************************************************/ @@ -112,7 +112,7 @@ DockApplication::DockApplication( const char* name ) l->setBackgroundColor(white); l->setMinimumSize(100,100); dock6->setWidget(l); - if (::tqqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 6"); + if (::tqt_cast<KDockContainer*>(l)) tqDebug("KDockContainer created for dock 6"); /*****************************************************/ @@ -120,12 +120,12 @@ DockApplication::DockApplication( const char* name ) TQPushButton* b1 = new TQPushButton(mainW); b1->setGeometry(10, 10, 250, 25); b1->setText("write dock config"); - connect(b1, TQT_SIGNAL(clicked()), TQT_SLOT(wConfig())); + connect(b1, TQ_SIGNAL(clicked()), TQ_SLOT(wConfig())); TQPushButton* b2 = new TQPushButton(mainW); b2->setGeometry(10, 35, 250, 25); b2->setText("read dock config"); - connect(b2, TQT_SIGNAL(clicked()), TQT_SLOT(rConfig())); + connect(b2, TQ_SIGNAL(clicked()), TQ_SLOT(rConfig())); m_bname = new TQPushButton(mainW); m_bname->setGeometry(10, 60, 250, 25); @@ -134,12 +134,12 @@ DockApplication::DockApplication( const char* name ) TQPushButton *b3 = new TQPushButton(mainW); b3->setGeometry(10,95,250,25); b3->setText("change the icon of the green widget"); - connect(b3,TQT_SIGNAL(clicked()), TQT_SLOT(gSetPix1())); + connect(b3,TQ_SIGNAL(clicked()), TQ_SLOT(gSetPix1())); TQPushButton *b4 = new TQPushButton(mainW); b4->setGeometry(10,130,250,25); b4->setText("remove icon "); - connect(b4,TQT_SIGNAL(clicked()), TQT_SLOT(gSetPix2())); + connect(b4,TQ_SIGNAL(clicked()), TQ_SLOT(gSetPix2())); setGeometry(200, 100, 500, 300); @@ -170,11 +170,11 @@ void DockApplication::initMenuBar() TQPixmap p(folder); TQPopupMenu *file_menu = new TQPopupMenu(); - file_menu->insertItem(p, "Change Green Widget Caption", this, TQT_SLOT(cap()) ); + file_menu->insertItem(p, "Change Green Widget Caption", this, TQ_SLOT(cap()) ); file_menu->insertSeparator(); - file_menu->insertItem(p, "Set Green Widget as MainDockWidget", this, TQT_SLOT(greenMain()) ); - file_menu->insertItem(p, "Set Blue Widget as MainDockWidget", this, TQT_SLOT(blueMain()) ); - file_menu->insertItem(p, "Set NULL as MainDockWidget", this, TQT_SLOT(nullMain()) ); + file_menu->insertItem(p, "Set Green Widget as MainDockWidget", this, TQ_SLOT(greenMain()) ); + file_menu->insertItem(p, "Set Blue Widget as MainDockWidget", this, TQ_SLOT(blueMain()) ); + file_menu->insertItem(p, "Set NULL as MainDockWidget", this, TQ_SLOT(nullMain()) ); KMenuBar* menu_bar = menuBar(); menu_bar->insertItem( "&Test", file_menu ); diff --git a/tdeui/tests/kdockwidgettest.h b/tdeui/tests/kdockwidgettest.h index 4cc952857..315c23267 100644 --- a/tdeui/tests/kdockwidgettest.h +++ b/tdeui/tests/kdockwidgettest.h @@ -22,7 +22,7 @@ class TQPushButton; class DockApplication : public KDockMainWindow -{Q_OBJECT +{TQ_OBJECT public: DockApplication( const char* name ); ~DockApplication(); @@ -57,7 +57,7 @@ private: class CTW:public TQTabWidget,public KDockContainer { - Q_OBJECT + TQ_OBJECT public: CTW(TQWidget *parent):TQTabWidget(parent,"MyDockContainer"),KDockContainer(){insertTab(new TQLabel("BLAH",this),"BLUP");} virtual ~CTW(){;} diff --git a/tdeui/tests/kdualcolortest.cpp b/tdeui/tests/kdualcolortest.cpp index 512bfc610..a9be04cac 100644 --- a/tdeui/tests/kdualcolortest.cpp +++ b/tdeui/tests/kdualcolortest.cpp @@ -12,12 +12,12 @@ KDualColorWidget::KDualColorWidget(TQWidget *parent, const char *name) KDualColorButton *colorBtn = new KDualColorButton(lbl->colorGroup().text(), lbl->colorGroup().background(), this); - connect(colorBtn, TQT_SIGNAL(fgChanged(const TQColor &)), - TQT_SLOT(slotFgChanged(const TQColor &))); - connect(colorBtn, TQT_SIGNAL(bgChanged(const TQColor &)), - TQT_SLOT(slotBgChanged(const TQColor &))); - connect(colorBtn, TQT_SIGNAL(currentChanged(KDualColorButton::DualColor)), - TQT_SLOT(slotCurrentChanged(KDualColorButton::DualColor))); + connect(colorBtn, TQ_SIGNAL(fgChanged(const TQColor &)), + TQ_SLOT(slotFgChanged(const TQColor &))); + connect(colorBtn, TQ_SIGNAL(bgChanged(const TQColor &)), + TQ_SLOT(slotBgChanged(const TQColor &))); + connect(colorBtn, TQ_SIGNAL(currentChanged(KDualColorButton::DualColor)), + TQ_SLOT(slotCurrentChanged(KDualColorButton::DualColor))); TQHBoxLayout *layout = new TQHBoxLayout(this, 5); layout->addWidget(colorBtn, 0); diff --git a/tdeui/tests/kdualcolortest.h b/tdeui/tests/kdualcolortest.h index 2c38b7af0..bfea58493 100644 --- a/tdeui/tests/kdualcolortest.h +++ b/tdeui/tests/kdualcolortest.h @@ -6,7 +6,7 @@ class KDualColorWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: KDualColorWidget(TQWidget *parent=0, const char *name=0); protected slots: diff --git a/tdeui/tests/kgradienttest.cpp b/tdeui/tests/kgradienttest.cpp index 4ee8c0f93..f828e31f7 100644 --- a/tdeui/tests/kgradienttest.cpp +++ b/tdeui/tests/kgradienttest.cpp @@ -13,13 +13,13 @@ void KGradientWidget::paintEvent(TQPaintEvent */*ev*/) int it, ft; TQString say; - TQColor ca = Qt::black, cb = Qt::blue; + TQColor ca = TQt::black, cb = TQt::blue; int x = 0, y = 0; pix.resize(width()/cols, height()/rows); TQPainter p(this); - p.setPen(Qt::white); + p.setPen(TQt::white); // draw once, so that the benchmarking be fair :-) KPixmapEffect::gradient(pix,ca, cb, KPixmapEffect::VerticalGradient); diff --git a/tdeui/tests/khashtest.cpp b/tdeui/tests/khashtest.cpp index d392fcbc5..d2829606e 100644 --- a/tdeui/tests/khashtest.cpp +++ b/tdeui/tests/khashtest.cpp @@ -21,7 +21,7 @@ void KHashWidget::paintEvent(TQPaintEvent * /*ev*/) pix.resize(width()/cols, height()/rows); TQPainter p(this); - p.setPen(Qt::white); + p.setPen(TQt::white); // draw once, so that the benchmarking be fair :-) KPixmapEffect::gradient(pix,ca, cb, KPixmapEffect::VerticalGradient); @@ -86,9 +86,9 @@ void KHashWidget::paintEvent(TQPaintEvent * /*ev*/) pix.resize(width()/cols, height()/rows); say.setNum( ft - it); say += " ms, CrossDiagonal"; p.drawPixmap(x*width()/cols, y*height()/rows, pix); - p.setPen(Qt::blue); + p.setPen(TQt::blue); p.drawText(5+(x++)*width()/cols, 15+y*height()/rows, say); - p.setPen(Qt::white); + p.setPen(TQt::white); y++; // next row diff --git a/tdeui/tests/khashtest.h b/tdeui/tests/khashtest.h index 05de5c435..ea1c161aa 100644 --- a/tdeui/tests/khashtest.h +++ b/tdeui/tests/khashtest.h @@ -12,7 +12,7 @@ class KHashWidget : public TQWidget { - Q_OBJECT + TQ_OBJECT public: KHashWidget(TQWidget *parent=0, const char *name=0) diff --git a/tdeui/tests/kjanuswidgettest.cpp b/tdeui/tests/kjanuswidgettest.cpp index 71e72fb13..798145f47 100644 --- a/tdeui/tests/kjanuswidgettest.cpp +++ b/tdeui/tests/kjanuswidgettest.cpp @@ -18,7 +18,7 @@ int main(int argc, char** argv) TQCheckBox* cb2 = new TQCheckBox( "a", page2 ); janus->show(); - TQObject::connect( &app, TQT_SIGNAL( lastWindowClosed() ), &app, TQT_SLOT( quit() ) ); + TQObject::connect( &app, TQ_SIGNAL( lastWindowClosed() ), &app, TQ_SLOT( quit() ) ); return app.exec(); } diff --git a/tdeui/tests/kledtest.cpp b/tdeui/tests/kledtest.cpp index 8a16c122f..4694bd2c9 100644 --- a/tdeui/tests/kledtest.cpp +++ b/tdeui/tests/kledtest.cpp @@ -22,7 +22,7 @@ KLedTest::KLedTest(TQWidget* parent) if (kled_round) { //KLed l(KLed::red, &qw); // create lamp //KLed l(KLed::blue, &qw); // create lamp - l = new KLed(Qt::green, this); // create lamp + l = new KLed(TQt::green, this); // create lamp //KLed l(KLed::yellow, &qw); // create lamp //KLed l(KLed::orange, &qw); // create lamp @@ -42,9 +42,9 @@ KLedTest::KLedTest(TQWidget* parent) t_toggle.start(1000, false); t_color.start(3500, false); t_look.start(3500, false); - TQObject::connect(&t_toggle, TQT_SIGNAL(timeout()), l, TQT_SLOT(toggle())); - TQObject::connect(&t_color, TQT_SIGNAL(timeout()), this, TQT_SLOT(nextColor())); - TQObject::connect(&t_look, TQT_SIGNAL(timeout()), this, TQT_SLOT(nextLook())); + TQObject::connect(&t_toggle, TQ_SIGNAL(timeout()), l, TQ_SLOT(toggle())); + TQObject::connect(&t_color, TQ_SIGNAL(timeout()), this, TQ_SLOT(nextColor())); + TQObject::connect(&t_look, TQ_SIGNAL(timeout()), this, TQ_SLOT(nextLook())); l->show(); resize(240,140); } @@ -55,7 +55,7 @@ KLedTest::KLedTest(TQWidget* parent) for( int look=0; (int)look<3; look=(KLed::Look)(look+1)) { for(state=KLed::Off; (int)state<2; state=(KLed::State)(state+1)) { - leds[index]=new KLed(Qt::yellow, state, + leds[index]=new KLed(TQt::yellow, state, (KLed::Look)(look+1), (KLed::Shape)(shape+1), this); leds[index]->setGeometry(x, y, LedWidth, LedHeight); @@ -66,7 +66,7 @@ KLedTest::KLedTest(TQWidget* parent) y+=Grid+LedHeight; } setFixedSize(x+Grid, y+Grid); - connect(&timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout())); + connect(&timer, TQ_SIGNAL(timeout()), TQ_SLOT(timeout())); timer.start(500); } } diff --git a/tdeui/tests/kledtest.h b/tdeui/tests/kledtest.h index 5652e306e..dce5fb3a8 100644 --- a/tdeui/tests/kledtest.h +++ b/tdeui/tests/kledtest.h @@ -8,7 +8,7 @@ class KLedTest : public TQWidget { - Q_OBJECT + TQ_OBJECT protected: TQTimer timer; KLed *leds[/*KLed::NoOfShapes*/2* /*KLed::NoOfLooks*/3* /*KLed::NoOfStates*/2]; diff --git a/tdeui/tests/klineedittest.cpp b/tdeui/tests/klineedittest.cpp index 20e9b6ca8..e22ea882e 100644 --- a/tdeui/tests/klineedittest.cpp +++ b/tdeui/tests/klineedittest.cpp @@ -31,28 +31,28 @@ KLineEditTest::KLineEditTest (TQWidget* widget, const char* name ) m_lineedit->completionObject()->setItems( list ); m_lineedit->setFixedSize(500,30); m_lineedit->setEnableSqueezedText( true ); - connect( m_lineedit, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotReturnPressed() ) ); - connect( m_lineedit, TQT_SIGNAL( returnPressed(const TQString&) ), - TQT_SLOT( slotReturnPressed(const TQString&) ) ); + connect( m_lineedit, TQ_SIGNAL( returnPressed() ), TQ_SLOT( slotReturnPressed() ) ); + connect( m_lineedit, TQ_SIGNAL( returnPressed(const TQString&) ), + TQ_SLOT( slotReturnPressed(const TQString&) ) ); TQHBox *hbox = new TQHBox (this); m_btnExit = new TQPushButton( "E&xit", hbox ); m_btnExit->setFixedSize(100,30); - connect( m_btnExit, TQT_SIGNAL( clicked() ), TQT_SLOT( quitApp() ) ); + connect( m_btnExit, TQ_SIGNAL( clicked() ), TQ_SLOT( quitApp() ) ); m_btnReadOnly = new TQPushButton( "&Read Only", hbox ); m_btnReadOnly->setToggleButton (true); m_btnReadOnly->setFixedSize(100,30); - connect( m_btnReadOnly, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotReadOnly(bool) ) ); + connect( m_btnReadOnly, TQ_SIGNAL( toggled(bool) ), TQ_SLOT( slotReadOnly(bool) ) ); m_btnEnable = new TQPushButton( "Dis&able", hbox ); m_btnEnable->setToggleButton (true); m_btnEnable->setFixedSize(100,30); - connect( m_btnEnable, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotEnable(bool) ) ); + connect( m_btnEnable, TQ_SIGNAL( toggled(bool) ), TQ_SLOT( slotEnable(bool) ) ); m_btnHide = new TQPushButton( "Hi&de", hbox ); m_btnHide->setFixedSize(100,30); - connect( m_btnHide, TQT_SIGNAL( clicked() ), TQT_SLOT( slotHide() ) ); + connect( m_btnHide, TQ_SIGNAL( clicked() ), TQ_SLOT( slotHide() ) ); layout->addWidget( m_lineedit ); layout->addWidget( hbox ); @@ -65,7 +65,7 @@ KLineEditTest::~KLineEditTest() void KLineEditTest::quitApp() { - kapp->closeAllWindows(); + tdeApp->closeAllWindows(); } void KLineEditTest::show() @@ -113,7 +113,7 @@ void KLineEditTest::slotHide() m_btnHide->setEnabled( false ); m_lineedit->setText( "My dog ate the homework, whaaaaaaaaaaaaaaaaaaaaaaa" "aaaaaaaaaaaaaaaaaaaaaaaaa! I want my mommy!" ); - TQTimer::singleShot( 1000, this, TQT_SLOT(show()) ); + TQTimer::singleShot( 1000, this, TQ_SLOT(show()) ); } int main ( int argc, char **argv) diff --git a/tdeui/tests/klineedittest.h b/tdeui/tests/klineedittest.h index 6fee4dbc4..63cb1d459 100644 --- a/tdeui/tests/klineedittest.h +++ b/tdeui/tests/klineedittest.h @@ -11,7 +11,7 @@ class KLineEdit; class KLineEditTest : public TQWidget { - Q_OBJECT + TQ_OBJECT public: KLineEditTest( TQWidget *parent=0, const char *name=0 ); diff --git a/tdeui/tests/knuminputtest.cpp b/tdeui/tests/knuminputtest.cpp index 9a333dfda..8e99df1b9 100644 --- a/tdeui/tests/knuminputtest.cpp +++ b/tdeui/tests/knuminputtest.cpp @@ -26,7 +26,7 @@ void TopLevel::slotPrint( double n ) { kdDebug() << "slotPrint( " << n << " )" << endl; } -#define conn(x,y) connect( x, TQT_SIGNAL(valueChanged(y)), TQT_SLOT(slotPrint(y))) +#define conn(x,y) connect( x, TQ_SIGNAL(valueChanged(y)), TQ_SLOT(slotPrint(y))) TopLevel::TopLevel(TQWidget *parent, const char *name) : TQWidget(parent, name) { @@ -67,10 +67,10 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) i6->setLabel("Height (should be 2xWidth):"); i6->setRange(0, 200, 1, false); i6->setReferencePoint( 10 ); - connect( i5, TQT_SIGNAL(relativeValueChanged(double)), - i6, TQT_SLOT(setRelativeValue(double)) ); - connect( i6, TQT_SIGNAL(relativeValueChanged(double)), - i5, TQT_SLOT(setRelativeValue(double)) ); + connect( i5, TQ_SIGNAL(relativeValueChanged(double)), + i6, TQ_SLOT(setRelativeValue(double)) ); + connect( i6, TQ_SIGNAL(relativeValueChanged(double)), + i5, TQ_SLOT(setRelativeValue(double)) ); i7 = new KIntNumInput(i6, 0, b1, 10); i7->setLabel("math test:", AlignVCenter|AlignLeft ); @@ -119,10 +119,10 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) d7 = new KDoubleNumInput(d6, -30, 30, 0, 0.001, 3, b2, "d7"); d7->setReferencePoint( -3 ); - connect( d6, TQT_SIGNAL(relativeValueChanged(double)), - d7, TQT_SLOT(setRelativeValue(double)) ); - connect( d7, TQT_SIGNAL(relativeValueChanged(double)), - d6, TQT_SLOT(setRelativeValue(double)) ); + connect( d6, TQ_SIGNAL(relativeValueChanged(double)), + d7, TQ_SLOT(setRelativeValue(double)) ); + connect( d7, TQ_SIGNAL(relativeValueChanged(double)), + d6, TQ_SLOT(setRelativeValue(double)) ); l->addWidget(b2); } diff --git a/tdeui/tests/knuminputtest.h b/tdeui/tests/knuminputtest.h index 32a9e9098..e5d1c6d7f 100644 --- a/tdeui/tests/knuminputtest.h +++ b/tdeui/tests/knuminputtest.h @@ -8,7 +8,7 @@ class KDoubleNumInput; class TopLevel : public TQWidget { - Q_OBJECT + TQ_OBJECT public: TopLevel( TQWidget *parent=0, const char *name=0 ); diff --git a/tdeui/tests/kpanelmenutest.cpp b/tdeui/tests/kpanelmenutest.cpp index a14cb3366..0c4bff8a6 100644 --- a/tdeui/tests/kpanelmenutest.cpp +++ b/tdeui/tests/kpanelmenutest.cpp @@ -1,6 +1,6 @@ #include "kpanelmenutest.h" #include <tdeapplication.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <dcopclient.h> TestWidget::TestWidget(TQWidget *parent, const char *name) @@ -15,8 +15,8 @@ TestWidget::TestWidget(TQWidget *parent, const char *name) KPanelAppMenu *ssub = subMenu->insertMenu(locate("mini", "x.png"), "One more"); - connect(testMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuCalled(int))); - connect(subMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotSubMenuCalled(int))); + connect(testMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(slotMenuCalled(int))); + connect(subMenu, TQ_SIGNAL(activated(int)), TQ_SLOT(slotSubMenuCalled(int))); init(); setText("We added \"Client Test\" to kicker. Click the TDE Menu to check."); diff --git a/tdeui/tests/kpanelmenutest.h b/tdeui/tests/kpanelmenutest.h index 361ae545a..f6c81eac8 100644 --- a/tdeui/tests/kpanelmenutest.h +++ b/tdeui/tests/kpanelmenutest.h @@ -6,7 +6,7 @@ class TestWidget : public TQLabel { - Q_OBJECT + TQ_OBJECT public: TestWidget(TQWidget *parent=0, const char *name=0); ~TestWidget(){delete testMenu;} diff --git a/tdeui/tests/krulertest.cpp b/tdeui/tests/krulertest.cpp index 628c5096e..28bc2a362 100644 --- a/tdeui/tests/krulertest.cpp +++ b/tdeui/tests/krulertest.cpp @@ -76,14 +76,14 @@ KRulerTest::KRulerTest( const char *name ) vruler->setOffset( 0 ); vruler->setRange( 0, 1000 ); - connect( bigwidget, TQT_SIGNAL(newXPos(int)), - hruler, TQT_SLOT(slotNewValue(int)) ); - connect( bigwidget, TQT_SIGNAL(newYPos(int)), - vruler, TQT_SLOT(slotNewValue(int)) ); - connect( bigwidget, TQT_SIGNAL(newWidth(int)), - TQT_SLOT(slotNewWidth(int)) ); - connect( bigwidget, TQT_SIGNAL(newHeight(int)), - TQT_SLOT(slotNewHeight(int)) ); + connect( bigwidget, TQ_SIGNAL(newXPos(int)), + hruler, TQ_SLOT(slotNewValue(int)) ); + connect( bigwidget, TQ_SIGNAL(newYPos(int)), + vruler, TQ_SLOT(slotNewValue(int)) ); + connect( bigwidget, TQ_SIGNAL(newWidth(int)), + TQ_SLOT(slotNewWidth(int)) ); + connect( bigwidget, TQ_SIGNAL(newHeight(int)), + TQ_SLOT(slotNewHeight(int)) ); layout->addWidget(miniwidget, 0, 0); layout->addWidget(hruler, 0, 1); @@ -101,38 +101,38 @@ KRulerTest::KRulerTest( const char *name ) showTM->adjustSize(); showTM->move(5,15); showTM->setChecked(true); - connect(showTM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetTinyMarks(bool)) ); + connect(showTM, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotSetTinyMarks(bool)) ); showLM = new TQCheckBox("show little marks", showMarks); showLM->adjustSize(); showLM->move(5,35); showLM->setChecked(true); - connect(showLM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetLittleMarks(bool)) ); + connect(showLM, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotSetLittleMarks(bool)) ); showMM = new TQCheckBox("show medium marks", showMarks); showMM->adjustSize(); showMM->move(5,55); showMM->setChecked(true); - connect(showMM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetMediumMarks(bool)) ); + connect(showMM, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotSetMediumMarks(bool)) ); showBM = new TQCheckBox("show big marks", showMarks); showBM->adjustSize(); showBM->move(5,75); showBM->setChecked(true); - connect(showBM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetBigMarks(bool)) ); + connect(showBM, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotSetBigMarks(bool)) ); showEM = new TQCheckBox("show end marks", showMarks); showEM->adjustSize(); showEM->move(5,95); showEM->setChecked(true); - connect(showEM, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetEndMarks(bool)) ); + connect(showEM, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotSetEndMarks(bool)) ); showPT = new TQCheckBox("show ruler pointer", showMarks); showPT->adjustSize(); showPT->move(5,115); showPT->setChecked(true); - connect(showPT, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotSetRulerPointer(bool)) ); + connect(showPT, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotSetRulerPointer(bool)) ); fixLen = new TQCheckBox("fix ruler length", showMarks); fixLen->adjustSize(); fixLen->move(5,135); fixLen->setChecked(true); - connect(fixLen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotFixRulerLength(bool)) ); - connect(fixLen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCheckLength(bool)) ); + connect(fixLen, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotFixRulerLength(bool)) ); + connect(fixLen, TQ_SIGNAL(toggled(bool)), TQ_SLOT(slotCheckLength(bool)) ); lineEdit = new TQGroupBox("Value of begin/end", bigwidget); lineEdit->setFixedSize(140, 80); @@ -141,26 +141,26 @@ KRulerTest::KRulerTest( const char *name ) beginMark->setRange(-1000, 1000, 1, false); beginMark->move(5, 15); beginMark->setFixedSize(beginMark->sizeHint()); - connect(beginMark, TQT_SIGNAL(valueChanged(int)), - hruler, TQT_SLOT(slotNewOffset(int)) ); - connect(beginMark, TQT_SIGNAL(valueChanged(int)), - vruler, TQT_SLOT(slotNewOffset(int)) ); + connect(beginMark, TQ_SIGNAL(valueChanged(int)), + hruler, TQ_SLOT(slotNewOffset(int)) ); + connect(beginMark, TQ_SIGNAL(valueChanged(int)), + vruler, TQ_SLOT(slotNewOffset(int)) ); endMark = new KIntNumInput(0, lineEdit); endMark->setRange(-1000, 1000, 1, false); endMark->move(5, 35); endMark->setFixedSize(endMark->sizeHint()); - connect(endMark, TQT_SIGNAL(valueChanged(int)), - hruler, TQT_SLOT(slotEndOffset(int)) ); - connect(endMark, TQT_SIGNAL(valueChanged(int)), - vruler, TQT_SLOT(slotEndOffset(int)) ); + connect(endMark, TQ_SIGNAL(valueChanged(int)), + hruler, TQ_SLOT(slotEndOffset(int)) ); + connect(endMark, TQ_SIGNAL(valueChanged(int)), + vruler, TQ_SLOT(slotEndOffset(int)) ); lengthInput = new KIntNumInput(0, lineEdit); lengthInput->setRange(-1000, 1000, 1, false); lengthInput->move(5, 55); lengthInput->setFixedSize(lengthInput->sizeHint()); - connect(lengthInput, TQT_SIGNAL(valueChanged(int)), - hruler, TQT_SLOT(slotEndOffset(int)) ); - connect(lengthInput, TQT_SIGNAL(valueChanged(int)), - vruler, TQT_SLOT(slotEndOffset(int)) ); + connect(lengthInput, TQ_SIGNAL(valueChanged(int)), + hruler, TQ_SLOT(slotEndOffset(int)) ); + connect(lengthInput, TQ_SIGNAL(valueChanged(int)), + vruler, TQ_SLOT(slotEndOffset(int)) ); vertrot = new TQGroupBox("Value of rotate translate for Vert.", bigwidget); @@ -171,22 +171,22 @@ KRulerTest::KRulerTest( const char *name ) transX->move(5, 15); transX->setFixedSize(transX->sizeHint()); //transX->setLabel("transx", AlignLeft); - connect(transX, TQT_SIGNAL(valueChanged(double)), - TQT_SLOT(slotSetXTrans(double)) ); + connect(transX, TQ_SIGNAL(valueChanged(double)), + TQ_SLOT(slotSetXTrans(double)) ); transY = new KDoubleNumInput(-12.0, vertrot); transY->setRange(-1000, 1000, 1, false); transY->move(5, 35); transY->setFixedSize(transY->sizeHint()); //transY->setLabel("transy", AlignLeft); - connect(transY, TQT_SIGNAL(valueChanged(double)), - TQT_SLOT(slotSetYTrans(double)) ); + connect(transY, TQ_SIGNAL(valueChanged(double)), + TQ_SLOT(slotSetYTrans(double)) ); rotV = new KDoubleNumInput(90.0, vertrot); rotV->setRange(-1000, 1000, 1, false); rotV->move(5, 55); rotV->setFixedSize(rotV->sizeHint()); //rotV->setLabel("rot", AlignLeft); - connect(rotV, TQT_SIGNAL(valueChanged(double)), - TQT_SLOT(slotSetRotate(double)) ); + connect(rotV, TQ_SIGNAL(valueChanged(double)), + TQ_SLOT(slotSetRotate(double)) ); metricstyle = new TQButtonGroup("metric styles", bigwidget); @@ -212,7 +212,7 @@ KRulerTest::KRulerTest( const char *name ) mmetric->adjustSize(); mmetric->move(5,95); metricstyle->insert(mmetric, (int)KRuler::Metres); - connect ( metricstyle, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotSetMStyle(int)) ); + connect ( metricstyle, TQ_SIGNAL(clicked(int)), TQ_SLOT(slotSetMStyle(int)) ); setCentralWidget(mainframe); diff --git a/tdeui/tests/krulertest.h b/tdeui/tests/krulertest.h index 0175db3aa..1bcc5ade1 100644 --- a/tdeui/tests/krulertest.h +++ b/tdeui/tests/krulertest.h @@ -19,7 +19,7 @@ class TQGroupBox; class MouseWidget : public TQFrame { -Q_OBJECT +TQ_OBJECT public: MouseWidget( TQWidget *parent=0, const char *name=0, WFlags f=0 ); @@ -42,7 +42,7 @@ private: class KRulerTest : public TDEMainWindow { -Q_OBJECT +TQ_OBJECT public: KRulerTest( const char *name = 0L ); ~KRulerTest(); diff --git a/tdeui/tests/kstatusbartest.cpp b/tdeui/tests/kstatusbartest.cpp index 0a8c6d10c..47b432a37 100644 --- a/tdeui/tests/kstatusbartest.cpp +++ b/tdeui/tests/kstatusbartest.cpp @@ -22,8 +22,8 @@ testWindow::testWindow (TQWidget *, const char *name) menuBar = new KMenuBar (this); fileMenu = new TQPopupMenu; menuBar->insertItem ("&File", fileMenu); - fileMenu->insertItem ("&Exit", TDEApplication::kApplication(), - TQT_SLOT( quit() ), ALT + Key_Q ); + fileMenu->insertItem ("&Exit", tdeApp, + TQ_SLOT( quit() ), ALT + Key_Q ); statusbar = new KStatusBar (this); statusbar->insertItem("Zoom: XXXX", 0); statusbar->insertItem("XXX", 1); @@ -34,14 +34,14 @@ testWindow::testWindow (TQWidget *, const char *name) insert = true; statusbar->changeItem("Line: 13567", 2); - connect (statusbar, TQT_SIGNAL(pressed(int)), this, TQT_SLOT(slotPress(int))); - connect (statusbar, TQT_SIGNAL(released(int)), this, TQT_SLOT(slotClick(int))); + connect (statusbar, TQ_SIGNAL(pressed(int)), this, TQ_SLOT(slotPress(int))); + connect (statusbar, TQ_SIGNAL(released(int)), this, TQ_SLOT(slotClick(int))); widget = new TQMultiLineEdit (this); setCentralWidget(widget); - setCaption( TDEApplication::kApplication()->caption() ); + setCaption( tdeApp->caption() ); smenu = new TQPopupMenu; @@ -53,7 +53,7 @@ testWindow::testWindow (TQWidget *, const char *name) smenu->insertItem("400%"); smenu->insertItem("oo%"); - connect (smenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotMenu(int))); + connect (smenu, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotMenu(int))); } void testWindow::slotClick(int id) diff --git a/tdeui/tests/kstatusbartest.h b/tdeui/tests/kstatusbartest.h index 712f24352..d61f3b422 100644 --- a/tdeui/tests/kstatusbartest.h +++ b/tdeui/tests/kstatusbartest.h @@ -10,7 +10,7 @@ class TQMultiLineEdit; class testWindow : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: testWindow (TQWidget *parent=0, const char *name=0); diff --git a/tdeui/tests/ktabctltest.cpp b/tdeui/tests/ktabctltest.cpp index 05fe2aeb3..27229e436 100644 --- a/tdeui/tests/ktabctltest.cpp +++ b/tdeui/tests/ktabctltest.cpp @@ -43,10 +43,10 @@ TopLevel::TopLevel(TQWidget *parent, const char *name) */ test = new KTabCtl(this, "test"); - connect(test, TQT_SIGNAL(tabSelected(int)), this, TQT_SLOT(tabChanged(int))); + connect(test, TQ_SIGNAL(tabSelected(int)), this, TQ_SLOT(tabChanged(int))); TQWidget *w = new TQWidget(test, "_page1"); TQPushButton *bt = new TQPushButton("Click me to quit", w, "_bt1"); - connect(bt, TQT_SIGNAL(clicked()), this, TQT_SLOT(okPressed())); + connect(bt, TQ_SIGNAL(clicked()), this, TQ_SLOT(okPressed())); bt->adjustSize(); bt->move(20, 20); test->addTab(w, "Seite 1"); diff --git a/tdeui/tests/ktabctltest.h b/tdeui/tests/ktabctltest.h index 6dd3b932a..fe327c4c1 100644 --- a/tdeui/tests/ktabctltest.h +++ b/tdeui/tests/ktabctltest.h @@ -12,7 +12,7 @@ class TQMultiLineEdit; class TopLevel : public TQWidget { - Q_OBJECT + TQ_OBJECT public: TopLevel( TQWidget *parent=0, const char *name=0 ); diff --git a/tdeui/tests/ktabwidgettest.cpp b/tdeui/tests/ktabwidgettest.cpp index 64d2795fc..362df8558 100644 --- a/tdeui/tests/ktabwidgettest.cpp +++ b/tdeui/tests/ktabwidgettest.cpp @@ -21,21 +21,21 @@ Test::Test( TQWidget* parent, const char *name ) mWidget->addTab( new TQLabel( "Testlabel 2", mWidget ), "Two" ); mWidget->addTab( new TQWidget( mWidget), SmallIcon( "konsole" ), "Three" ); mWidget->addTab( new TQWidget( mWidget), "Four" ); - mWidget->setTabColor( mWidget->page(0), Qt::red ); - mWidget->setTabColor( mWidget->page(1), Qt::blue ); - - connect( mWidget, TQT_SIGNAL( currentChanged( TQWidget * ) ), TQT_SLOT( currentChanged( TQWidget * ) ) ); - connect( mWidget, TQT_SIGNAL( contextMenu( TQWidget *, const TQPoint & )), TQT_SLOT(contextMenu( TQWidget *, const TQPoint & ))); - connect( mWidget, TQT_SIGNAL( contextMenu( const TQPoint & )), TQT_SLOT(tabbarContextMenu( const TQPoint & ))); - connect( mWidget, TQT_SIGNAL( mouseDoubleClick( TQWidget * )), TQT_SLOT(mouseDoubleClick( TQWidget * ))); - connect( mWidget, TQT_SIGNAL( mouseMiddleClick() ), TQT_SLOT(addTab() )); - connect( mWidget, TQT_SIGNAL( mouseMiddleClick( TQWidget * )), TQT_SLOT(mouseMiddleClick( TQWidget * ))); - connect( mWidget, TQT_SIGNAL( closeRequest( TQWidget * )), TQT_SLOT(mouseMiddleClick( TQWidget * ))); - connect( mWidget, TQT_SIGNAL( testCanDecode(const TQDragMoveEvent *, bool & )), TQT_SLOT(testCanDecode(const TQDragMoveEvent *, bool & ))); - connect( mWidget, TQT_SIGNAL( receivedDropEvent( TQDropEvent * )), TQT_SLOT(receivedDropEvent( TQDropEvent * ))); - connect( mWidget, TQT_SIGNAL( receivedDropEvent( TQWidget *, TQDropEvent * )), TQT_SLOT(receivedDropEvent( TQWidget *, TQDropEvent * ))); - connect( mWidget, TQT_SIGNAL( initiateDrag( TQWidget * )), TQT_SLOT(initiateDrag( TQWidget * ))); - connect( mWidget, TQT_SIGNAL( movedTab( int, int )), TQT_SLOT(movedTab( int, int ))); + mWidget->setTabColor( mWidget->page(0), TQt::red ); + mWidget->setTabColor( mWidget->page(1), TQt::blue ); + + connect( mWidget, TQ_SIGNAL( currentChanged( TQWidget * ) ), TQ_SLOT( currentChanged( TQWidget * ) ) ); + connect( mWidget, TQ_SIGNAL( contextMenu( TQWidget *, const TQPoint & )), TQ_SLOT(contextMenu( TQWidget *, const TQPoint & ))); + connect( mWidget, TQ_SIGNAL( contextMenu( const TQPoint & )), TQ_SLOT(tabbarContextMenu( const TQPoint & ))); + connect( mWidget, TQ_SIGNAL( mouseDoubleClick( TQWidget * )), TQ_SLOT(mouseDoubleClick( TQWidget * ))); + connect( mWidget, TQ_SIGNAL( mouseMiddleClick() ), TQ_SLOT(addTab() )); + connect( mWidget, TQ_SIGNAL( mouseMiddleClick( TQWidget * )), TQ_SLOT(mouseMiddleClick( TQWidget * ))); + connect( mWidget, TQ_SIGNAL( closeRequest( TQWidget * )), TQ_SLOT(mouseMiddleClick( TQWidget * ))); + connect( mWidget, TQ_SIGNAL( testCanDecode(const TQDragMoveEvent *, bool & )), TQ_SLOT(testCanDecode(const TQDragMoveEvent *, bool & ))); + connect( mWidget, TQ_SIGNAL( receivedDropEvent( TQDropEvent * )), TQ_SLOT(receivedDropEvent( TQDropEvent * ))); + connect( mWidget, TQ_SIGNAL( receivedDropEvent( TQWidget *, TQDropEvent * )), TQ_SLOT(receivedDropEvent( TQWidget *, TQDropEvent * ))); + connect( mWidget, TQ_SIGNAL( initiateDrag( TQWidget * )), TQ_SLOT(initiateDrag( TQWidget * ))); + connect( mWidget, TQ_SIGNAL( movedTab( int, int )), TQ_SLOT(movedTab( int, int ))); mWidget->setTabReorderingEnabled( true ); TQWidget * grid = new TQWidget(this); @@ -43,53 +43,53 @@ Test::Test( TQWidget* parent, const char *name ) TQPushButton * addTab = new TQPushButton( "Add Tab", grid ); gridlayout->addWidget( addTab, 0, 0 ); - connect( addTab, TQT_SIGNAL( clicked() ), TQT_SLOT( addTab() ) ); + connect( addTab, TQ_SIGNAL( clicked() ), TQ_SLOT( addTab() ) ); TQPushButton * removeTab = new TQPushButton( "Remove Current Tab", grid ); gridlayout->addWidget( removeTab, 0, 1 ); - connect( removeTab, TQT_SIGNAL( clicked() ), TQT_SLOT( removeCurrentTab() ) ); + connect( removeTab, TQ_SIGNAL( clicked() ), TQ_SLOT( removeCurrentTab() ) ); mLeftButton = new TQCheckBox( "Show left button", grid ); gridlayout->addWidget( mLeftButton, 1, 0 ); - connect( mLeftButton, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleLeftButton(bool) ) ); + connect( mLeftButton, TQ_SIGNAL( toggled(bool) ), TQ_SLOT( toggleLeftButton(bool) ) ); mLeftButton->setChecked(true); TQCheckBox * leftPopup = new TQCheckBox( "Enable left popup", grid ); gridlayout->addWidget( leftPopup, 2, 0 ); - connect( leftPopup, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleLeftPopup(bool) ) ); + connect( leftPopup, TQ_SIGNAL( toggled(bool) ), TQ_SLOT( toggleLeftPopup(bool) ) ); leftPopup->setChecked(true); mRightButton = new TQCheckBox( "Show right button", grid ); gridlayout->addWidget( mRightButton, 1, 1 ); - connect( mRightButton, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleRightButton(bool) ) ); + connect( mRightButton, TQ_SIGNAL( toggled(bool) ), TQ_SLOT( toggleRightButton(bool) ) ); mRightButton->setChecked(true); TQCheckBox * rightPopup = new TQCheckBox( "Enable right popup", grid ); gridlayout->addWidget( rightPopup, 2, 1 ); - connect( rightPopup, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleRightPopup(bool) ) ); + connect( rightPopup, TQ_SIGNAL( toggled(bool) ), TQ_SLOT( toggleRightPopup(bool) ) ); rightPopup->setChecked(true); mTabsBottom = new TQCheckBox( "Show tabs at bottom", grid ); gridlayout->addWidget( mTabsBottom, 3, 0 ); - connect( mTabsBottom, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabPosition(bool) ) ); + connect( mTabsBottom, TQ_SIGNAL( toggled(bool) ), TQ_SLOT( toggleTabPosition(bool) ) ); TQCheckBox * tabshape = new TQCheckBox( "Triangular tab shape", grid ); gridlayout->addWidget( tabshape, 3, 1 ); - connect( tabshape, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleTabShape(bool) ) ); + connect( tabshape, TQ_SIGNAL( toggled(bool) ), TQ_SLOT( toggleTabShape(bool) ) ); TQCheckBox *tabClose = new TQCheckBox( "Close button on icon hover", grid ); gridlayout->addWidget( tabClose, 4, 0 ); - connect( tabClose, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( toggleCloseButtons(bool) ) ); + connect( tabClose, TQ_SIGNAL( toggled(bool) ), TQ_SLOT( toggleCloseButtons(bool) ) ); tabClose->setChecked(true); TQCheckBox * showlabels = new TQCheckBox( "Show labels", grid ); gridlayout->addWidget( showlabels, 4, 1 ); - connect( showlabels, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( toggleLabels(bool) ) ); + connect( showlabels, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( toggleLabels(bool) ) ); } void Test::currentChanged(TQWidget* w) { - mWidget->setTabColor( w, Qt::black ); + mWidget->setTabColor( w, TQt::black ); } void Test::addTab() @@ -137,7 +137,7 @@ void Test::toggleLeftButton(bool state) if (state) { if (!mLeftWidget) { mLeftWidget = new TQToolButton( mWidget ); - connect( mLeftWidget, TQT_SIGNAL( clicked() ), TQT_SLOT( addTab() ) ); + connect( mLeftWidget, TQ_SIGNAL( clicked() ), TQ_SLOT( addTab() ) ); mLeftWidget->setIconSet( SmallIcon( "tab_new" ) ); mLeftWidget->setTextLabel("New"); mLeftWidget->setTextPosition(TQToolButton::Right); @@ -162,7 +162,7 @@ void Test::toggleLeftPopup(bool state) mLeftPopup->insertSeparator(); mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Button Tab", 1); mLeftPopup->insertItem(SmallIcon( "tab_new" ), "Label Tab", 2); - connect(mLeftPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(leftPopupActivated(int))); + connect(mLeftPopup, TQ_SIGNAL(activated(int)), TQ_SLOT(leftPopupActivated(int))); } mLeftWidget->setPopup(mLeftPopup); } @@ -188,7 +188,7 @@ void Test::toggleRightButton(bool state) if (state) { if ( !mRightWidget) { mRightWidget = new TQToolButton( mWidget ); - TQObject::connect( mRightWidget, TQT_SIGNAL( clicked() ), TQT_SLOT( removeCurrentTab() ) ); + TQObject::connect( mRightWidget, TQ_SIGNAL( clicked() ), TQ_SLOT( removeCurrentTab() ) ); mRightWidget->setIconSet( SmallIcon( "tab_remove" ) ); mRightWidget->setTextLabel("Close"); mRightWidget->setTextPosition(TQToolButton::Right); @@ -212,7 +212,7 @@ void Test::toggleRightPopup(bool state) mRightPopup->insertSeparator(); mRightPopup->insertItem(SmallIcon( "tab_remove" ), "Most Left Tab", 0); mRightPopup->insertItem(SmallIcon( "tab_remove" ), "Most Right Tab", 2); - connect(mRightPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(rightPopupActivated(int))); + connect(mRightPopup, TQ_SIGNAL(activated(int)), TQ_SLOT(rightPopupActivated(int))); } mRightWidget->setPopup(mRightPopup); } @@ -264,7 +264,7 @@ void Test::contextMenu(TQWidget *w, const TQPoint &p) mContextPopup->insertSeparator(); mContextPopup->insertItem( mWidget->isTabEnabled(w) ? "Disable Tab" : "Enable Tab", 2); mContextPopup->insertItem( mWidget->tabToolTip(w).isEmpty() ? "Set Tooltip" : "Remove Tooltip", 3); - connect(mContextPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(contextMenuActivated(int))); + connect(mContextPopup, TQ_SIGNAL(activated(int)), TQ_SLOT(contextMenuActivated(int))); mContextWidget = w; mContextPopup->popup(p); @@ -300,7 +300,7 @@ void Test::tabbarContextMenu(const TQPoint &p) mTabbarContextPopup->insertItem(SmallIcon( "tab_remove" ), mRightWidget->isVisible() ? "Hide \"Remove\" Button" : "Show \"Remove\" Button", 1); mTabbarContextPopup->insertSeparator(); mTabbarContextPopup->insertItem(mWidget->tabPosition()==TQTabWidget::Top ? "Put Tabbar to Bottom" : "Put Tabbar to Top", 2); - connect(mTabbarContextPopup, TQT_SIGNAL(activated(int)), TQT_SLOT(tabbarContextMenuActivated(int))); + connect(mTabbarContextPopup, TQ_SIGNAL(activated(int)), TQ_SLOT(tabbarContextMenuActivated(int))); mTabbarContextPopup->popup(p); } @@ -326,7 +326,7 @@ void Test::mouseDoubleClick(TQWidget *w) mWidget->label( mWidget->indexOf( w ) ), &ok, this ); if ( ok && !text.isEmpty() ) { mWidget->changeTab( w, text ); - mWidget->setTabColor( w, Qt::green ); + mWidget->setTabColor( w, TQt::green ); } } diff --git a/tdeui/tests/ktabwidgettest.h b/tdeui/tests/ktabwidgettest.h index 7c178bd32..eba95ef7b 100644 --- a/tdeui/tests/ktabwidgettest.h +++ b/tdeui/tests/ktabwidgettest.h @@ -15,7 +15,7 @@ class Test : public TQVBox { - Q_OBJECT + TQ_OBJECT public: Test( TQWidget* parent=0, const char *name =0 ); diff --git a/tdeui/tests/kunbalancedgrdtest.cpp b/tdeui/tests/kunbalancedgrdtest.cpp index 40904000b..839a9c71a 100644 --- a/tdeui/tests/kunbalancedgrdtest.cpp +++ b/tdeui/tests/kunbalancedgrdtest.cpp @@ -20,13 +20,13 @@ void KGradientWidget::paintEvent(TQPaintEvent *) int it, ft; TQString say; - TQColor ca = Qt::black, cb = Qt::cyan; + TQColor ca = TQt::black, cb = TQt::cyan; int x = 0, y = 0; pix.resize(width()/cols, height()/rows); TQPainter p(this); - p.setPen(Qt::white); + p.setPen(TQt::white); // draw once, so that the benchmarking be fair :-) KPixmapEffect::unbalancedGradient(pix,ca, cb, @@ -138,8 +138,8 @@ myTopWidget::myTopWidget (TQWidget *parent, const char *name) ySlider = new TQSlider ( -200, 200, 1, 100, TQSlider::Horizontal, this); lay->addWidget(ySlider, 1, 2); - connect(xSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(rebalance())); - connect(ySlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(rebalance())); + connect(xSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(rebalance())); + connect(ySlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(rebalance())); rebalance(); diff --git a/tdeui/tests/kunbalancedgrdtest.h b/tdeui/tests/kunbalancedgrdtest.h index 8b7893772..db4c99f80 100644 --- a/tdeui/tests/kunbalancedgrdtest.h +++ b/tdeui/tests/kunbalancedgrdtest.h @@ -30,7 +30,7 @@ private: class myTopWidget: public TQWidget { - Q_OBJECT + TQ_OBJECT public: myTopWidget(TQWidget *parent=0, const char *name=0); diff --git a/tdeui/tests/kwizardtest.cpp b/tdeui/tests/kwizardtest.cpp index 0635188d0..591e71d7e 100644 --- a/tdeui/tests/kwizardtest.cpp +++ b/tdeui/tests/kwizardtest.cpp @@ -27,17 +27,17 @@ int main(int argc, char **argv) { TDEApplication a(argc,argv,"kwizardtest"); KWizard *wiz = new KWizard(0, "kwizardtest", false); - TQObject::connect((TQObject*) wiz->cancelButton(), TQT_SIGNAL(clicked()), - &a, TQT_SLOT(quit())); - TQObject::connect((TQObject*) wiz->finishButton(), TQT_SIGNAL(clicked()), - &a, TQT_SLOT(quit())); + TQObject::connect((TQObject*) wiz->cancelButton(), TQ_SIGNAL(clicked()), + &a, TQ_SLOT(quit())); + TQObject::connect((TQObject*) wiz->finishButton(), TQ_SIGNAL(clicked()), + &a, TQ_SLOT(quit())); for(int i = 1; i < 11; i++) { TQWidget *p = new TQWidget; TQString msg = TQString("This is page %1 out of 10").arg(i); TQLabel *label = new TQLabel(msg, p); TQHBoxLayout *layout = new TQHBoxLayout(p, 5); - label->setAlignment(Qt::AlignCenter); + label->setAlignment(TQt::AlignCenter); label->setFixedSize(300, 200); layout->addWidget(label); TQString title = TQString("%1. page").arg(i); diff --git a/tdeui/tests/kxmlguitest.cpp b/tdeui/tests/kxmlguitest.cpp index b72e9dc68..10dbe0844 100644 --- a/tdeui/tests/kxmlguitest.cpp +++ b/tdeui/tests/kxmlguitest.cpp @@ -7,7 +7,7 @@ #include <tdeaction.h> #include <kdebug.h> #include <kstdaction.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tqlineedit.h> #include <tqdir.h> @@ -48,7 +48,7 @@ int main( int argc, char **argv ) Client *part = new Client; (void)new TDEAction( "decfont", "zoom-out", 0, 0, 0, part->actionCollection(), "decFontSizes" ); - (void)new TDEAction( "sec", "unlock", Qt::ALT + Qt::Key_1, part, TQT_SLOT( slotSec() ), part->actionCollection(), "security" ); + (void)new TDEAction( "sec", "unlock", TQt::ALT + TQt::Key_1, part, TQ_SLOT( slotSec() ), part->actionCollection(), "security" ); part->setXMLFile( "./kxmlguitest_part.rc" ); diff --git a/tdeui/tests/kxmlguitest.h b/tdeui/tests/kxmlguitest.h index bc88711f7..9d1789301 100644 --- a/tdeui/tests/kxmlguitest.h +++ b/tdeui/tests/kxmlguitest.h @@ -6,7 +6,7 @@ class Client : public TQObject, public KXMLGUIClient { - Q_OBJECT + TQ_OBJECT public: Client() {} diff --git a/tdeui/tests/qxembedtest.cpp b/tdeui/tests/qxembedtest.cpp index 4965e5487..fe6c9aef9 100644 --- a/tdeui/tests/qxembedtest.cpp +++ b/tdeui/tests/qxembedtest.cpp @@ -25,10 +25,10 @@ main(int argc, char**argv) TQApplication a(argc,argv); - TQWidget *main = new TQVBox(NULL,"main",Qt::WDestructiveClose); + TQWidget *main = new TQVBox(NULL,"main",TQt::WDestructiveClose); TQWidget *top = new TQHBox(main); TQPushButton *quit = new TQPushButton("Quit", top); - TQObject::connect( quit, TQT_SIGNAL(clicked()), main, TQT_SLOT(close()) ); + TQObject::connect( quit, TQ_SIGNAL(clicked()), main, TQ_SLOT(close()) ); TQLineEdit *edit = new TQLineEdit(top); edit->setText( "Just to see focus changes"); QXEmbed *embed = new QXEmbed(main); diff --git a/tdeui/tests/tdeactiontest.cpp b/tdeui/tests/tdeactiontest.cpp index e892bb306..676872e96 100644 --- a/tdeui/tests/tdeactiontest.cpp +++ b/tdeui/tests/tdeactiontest.cpp @@ -10,7 +10,7 @@ int main( int argc, char **argv ) { TDEApplication app( argc, argv, "tdeactiontest" ); - TDEActionCollection coll( static_cast<TQObject *>( 0 ) ); + TDEActionCollection coll( 0 ); TQGuardedPtr<TDEAction> action1 = new TDERadioAction("test",0, &coll); TQGuardedPtr<TDEAction> action2 = new TDERadioAction("test",0, &coll); diff --git a/tdeui/tests/tdemainwindowrestoretest.cpp b/tdeui/tests/tdemainwindowrestoretest.cpp index 559348ec0..453550b16 100644 --- a/tdeui/tests/tdemainwindowrestoretest.cpp +++ b/tdeui/tests/tdemainwindowrestoretest.cpp @@ -16,7 +16,7 @@ int main( int argc, char * argv[] ) { TDEApplication app( argc, argv, "tdemainwindowrestoretest" ); - if ( kapp->isRestored() ) { + if ( tdeApp->isRestored() ) { kRestoreMainWindows< MainWin1, MainWin2, MainWin3 >(); kRestoreMainWindows< MainWin4, MainWin5 >(); RESTORE(MainWin6); diff --git a/tdeui/tests/tdemainwindowrestoretest.h b/tdeui/tests/tdemainwindowrestoretest.h index d0279cdae..5e6531dbb 100644 --- a/tdeui/tests/tdemainwindowrestoretest.h +++ b/tdeui/tests/tdemainwindowrestoretest.h @@ -4,42 +4,42 @@ #include <tdemainwindow.h> class MainWin1 : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: MainWin1() : TDEMainWindow() {} virtual ~MainWin1() {} }; class MainWin2 : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: MainWin2() : TDEMainWindow() {} virtual ~MainWin2() {} }; class MainWin3 : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: MainWin3() : TDEMainWindow() {} virtual ~MainWin3() {} }; class MainWin4 : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: MainWin4() : TDEMainWindow() {} virtual ~MainWin4() {} }; class MainWin5 : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: MainWin5() : TDEMainWindow() {} virtual ~MainWin5() {} }; class MainWin6 : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: MainWin6() : TDEMainWindow() {} virtual ~MainWin6() {} diff --git a/tdeui/tests/tdemainwindowtest.cpp b/tdeui/tests/tdemainwindowtest.cpp index bf92dc11c..ffaaa8862 100644 --- a/tdeui/tests/tdemainwindowtest.cpp +++ b/tdeui/tests/tdemainwindowtest.cpp @@ -9,7 +9,7 @@ MainWindow::MainWindow() { - TQTimer::singleShot( 2*1000, this, TQT_SLOT( showMessage() ) ); + TQTimer::singleShot( 2*1000, this, TQ_SLOT( showMessage() ) ); setCentralWidget( new TQLabel( "foo", this ) ); diff --git a/tdeui/tests/tdemainwindowtest.h b/tdeui/tests/tdemainwindowtest.h index 5512c7f9f..3bf613aaf 100644 --- a/tdeui/tests/tdemainwindowtest.h +++ b/tdeui/tests/tdemainwindowtest.h @@ -5,7 +5,7 @@ class MainWindow : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: MainWindow(); diff --git a/tdeui/tests/tdepopuptest.cpp b/tdeui/tests/tdepopuptest.cpp index f9a97bad4..637031443 100644 --- a/tdeui/tests/tdepopuptest.cpp +++ b/tdeui/tests/tdepopuptest.cpp @@ -24,7 +24,7 @@ public: menu->insertItem("Item1"); menu->insertItem("Item2"); menu->insertSeparator(); - menu->insertItem("Quit", tqApp, TQT_SLOT(quit())); + menu->insertItem("Quit", tqApp, TQ_SLOT(quit())); } }; diff --git a/tdeui/tests/tdetoolbarlabelactiontest.cpp b/tdeui/tests/tdetoolbarlabelactiontest.cpp index 7c6222a11..0e39a9f59 100644 --- a/tdeui/tests/tdetoolbarlabelactiontest.cpp +++ b/tdeui/tests/tdetoolbarlabelactiontest.cpp @@ -22,7 +22,7 @@ #include <tdemainwindow.h> #include <klineedit.h> #include <tdelistview.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdetoolbarlabelaction.h> #include <ksqueezedtextlabel.h> #include <kdebug.h> diff --git a/tdeui/tests/testimage.png b/tdeui/tests/testimage.png Binary files differindex ba9a8e39e..6ce627bcf 100644 --- a/tdeui/tests/testimage.png +++ b/tdeui/tests/testimage.png diff --git a/tdeui/tests/twindowtest.cpp b/tdeui/tests/twindowtest.cpp index f826f13b0..2f43c15d8 100644 --- a/tdeui/tests/twindowtest.cpp +++ b/tdeui/tests/twindowtest.cpp @@ -55,14 +55,14 @@ setAutoSaveSettings(); menuBar->insertItem ("&File", fileMenu); // We insert item "Exit" with accelerator ALT-Q, and connect // it to application's exit-slot. - fileMenu->insertItem ("&Exit", TDEApplication::kApplication(), - TQT_SLOT( quit() ), ALT + Key_Q ); + fileMenu->insertItem ("&Exit", tdeApp, + TQ_SLOT( quit() ), ALT + Key_Q ); // Another popup... toolBarMenu = new TQPopupMenu; menuBar->insertItem ("&Toolbars", toolBarMenu); - toolBarMenu->insertItem ("(Un)Hide tollbar 1", this, TQT_SLOT(slotHide1())); - toolBarMenu->insertItem ("(Un)Hide tollbar 2", this, TQT_SLOT(slotHide2())); + toolBarMenu->insertItem ("(Un)Hide tollbar 1", this, TQ_SLOT(slotHide1())); + toolBarMenu->insertItem ("(Un)Hide tollbar 2", this, TQ_SLOT(slotHide2())); itemsMenu = new TQPopupMenu; menuBar->insertItem ("&Items", itemsMenu); @@ -71,15 +71,15 @@ setAutoSaveSettings(); lineL = true; // Lined is enabled greenF = false; // Frame not inserted - itemsMenu->insertItem ("delete/insert exit button", this, TQT_SLOT(slotExit())); - itemsMenu->insertItem ("insert/delete green frame!", this, TQT_SLOT(slotFrame())); - itemsMenu->insertItem ("enable/disable Lined", this, TQT_SLOT(slotLined())); - itemsMenu->insertItem ("Toggle fileNew", this, TQT_SLOT(slotNew())); - itemsMenu->insertItem ("Clear comboBox", this, TQT_SLOT(slotClearCombo())); - itemsMenu->insertItem ("Insert List in Combo", this, TQT_SLOT(slotInsertListInCombo())); - itemsMenu->insertItem ("Make item 3 curent", this, TQT_SLOT(slotMakeItem3Current())); - //itemsMenu->insertItem ("Insert clock!", this, TQT_SLOT(slotInsertClock())); - itemsMenu->insertItem ("Important!", this, TQT_SLOT(slotImportant())); + itemsMenu->insertItem ("delete/insert exit button", this, TQ_SLOT(slotExit())); + itemsMenu->insertItem ("insert/delete green frame!", this, TQ_SLOT(slotFrame())); + itemsMenu->insertItem ("enable/disable Lined", this, TQ_SLOT(slotLined())); + itemsMenu->insertItem ("Toggle fileNew", this, TQ_SLOT(slotNew())); + itemsMenu->insertItem ("Clear comboBox", this, TQ_SLOT(slotClearCombo())); + itemsMenu->insertItem ("Insert List in Combo", this, TQ_SLOT(slotInsertListInCombo())); + itemsMenu->insertItem ("Make item 3 curent", this, TQ_SLOT(slotMakeItem3Current())); + //itemsMenu->insertItem ("Insert clock!", this, TQ_SLOT(slotInsertClock())); + itemsMenu->insertItem ("Important!", this, TQ_SLOT(slotImportant())); menuBar->insertSeparator(); helpMenu = new KHelpMenu(this, "KWindowTest was programmed by Sven Radej"); @@ -113,30 +113,30 @@ setAutoSaveSettings(); // First four buttons pix = BarIcon("document-new"); - itemId = tb->insertButton(pix, 0, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew()), + itemId = tb->insertButton(pix, 0, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotNew()), true, "Create.. (toggles upper button)", 50); pix = BarIcon("document-open"); - tb->insertButton(pix, 1, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpen()), + tb->insertButton(pix, 1, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotOpen()), false, "Open"); pix = BarIcon("filefloppy"); - tb->insertButton(pix, 2, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSave()), + tb->insertButton(pix, 2, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSave()), true, "Save (beep or delayed popup)"); tb->setDelayedPopup(2, itemsMenu); pix = BarIcon("document-print"); - tb->insertButton(pix, 3, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPrint()), + tb->insertButton(pix, 3, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotPrint()), true, "Print (enables/disables open)"); // And a combobox // arguments: text (or strList), ID, writable, signal, object, slot, enabled, // tooltiptext, size - tb->insertCombo (TQString("one"), 4, true, TQT_SIGNAL(activated(const TQString&)), this, - TQT_SLOT(slotList(const TQString&)), true, "ComboBox", 150); + tb->insertCombo (TQString("one"), 4, true, TQ_SIGNAL(activated(const TQString&)), this, + TQ_SLOT(slotList(const TQString&)), true, "ComboBox", 150); // Then one line editor // arguments: text, id, signal, object (this), slot, enabled, tooltiptext, size - tb->insertLined ("ftp://ftp.kde.org/pub/kde", 5, TQT_SIGNAL(returnPressed()), this, - TQT_SLOT(slotReturn()), true, "Location", 200); + tb->insertLined ("ftp://ftp.kde.org/pub/kde", 5, TQ_SIGNAL(returnPressed()), this, + TQ_SLOT(slotReturn()), true, "Location", 200); // Set this Lined to auto size itself. Note that only one item (Lined or Combo) // Can be set to autosize; If you specify more of them only last (according to @@ -148,8 +148,8 @@ setAutoSaveSettings(); // Now add another button and align it right pix = BarIcon("system-log-out"); - tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), TDEApplication::kApplication(), - TQT_SLOT( quit() ), true, "Exit"); + tb->insertButton(pix, 6, TQ_SIGNAL(clicked()), tdeApp, + TQ_SLOT( quit() ), true, "Exit"); tb->alignItemRight (6); // Another toolbar @@ -159,16 +159,16 @@ setAutoSaveSettings(); pix = BarIcon("document-new"); tb1->insertButton(pix, 0, true, "Create new file2 (Toggle)"); tb1->setToggle(0); - tb1->addConnection (0, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggle(bool))); + tb1->addConnection (0, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(slotToggle(bool))); pix = BarIcon("document-open"); - tb1->insertButton(pix, 1, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOpen()), + tb1->insertButton(pix, 1, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotOpen()), true, "Open (starts progres in sb)"); tb1->insertSeparator (); pix = BarIcon("filefloppy"); - tb1->insertButton(pix, 2, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSave()), + tb1->insertButton(pix, 2, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSave()), true, "Save file2 (autorepeat)"); tb1->setAutoRepeat(2); @@ -201,7 +201,7 @@ setAutoSaveSettings(); rg->addButton(6); rg->addButton(7); - connect (tb1, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(slotToggled(int))); + connect (tb1, TQ_SIGNAL(toggled(int)), this, TQ_SLOT(slotToggled(int))); // Set caption for floating toolbars tb->setTitle ("Toolbar 1"); @@ -216,8 +216,8 @@ setAutoSaveSettings(); //addToolBar (tb1); //addToolBar (tb); - connect (tb, TQT_SIGNAL(highlighted(int,bool)), this, TQT_SLOT(slotMessage(int, bool))); - connect (tb1, TQT_SIGNAL(highlighted(int, bool)), this, TQT_SLOT(slotMessage(int, bool))); + connect (tb, TQ_SIGNAL(highlighted(int,bool)), this, TQ_SLOT(slotMessage(int, bool))); + connect (tb1, TQ_SIGNAL(highlighted(int, bool)), this, TQ_SLOT(slotMessage(int, bool))); // Floating is enabled by default, so you don't need this. // tb->enableFloating(true); @@ -243,7 +243,7 @@ setAutoSaveSettings(); completions->insertItem("/home/"); completions->insertItem("/vmlinuz :-)"); - connect (completions, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotCompletionsMenu(int))); + connect (completions, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotCompletionsMenu(int))); pr = 0; } /***********************************/ @@ -273,7 +273,7 @@ void testWindow::slotOpen() // statusBar->message(pr); timer = new TQTimer (pr); - connect (timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotGoGoGoo())); + connect (timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotGoGoGoo())); timer->start(100); } @@ -291,7 +291,7 @@ void testWindow::slotGoGoGoo() void testWindow::slotSave() { - kapp->beep(); + tdeApp->beep(); statusBar->changeItem("Saving properties...", 0); } @@ -408,8 +408,8 @@ void testWindow::slotExit () { TQPixmap pix; pix = BarIcon("system-log-out"); - tb->insertButton(pix, 6, TQT_SIGNAL(clicked()), TDEApplication::kApplication(), - TQT_SLOT( quit() ), true, "Exit"); + tb->insertButton(pix, 6, TQ_SIGNAL(clicked()), tdeApp, + TQ_SLOT( quit() ), true, "Exit"); tb->alignItemRight (6); exitB = true; } diff --git a/tdeui/tests/twindowtest.h b/tdeui/tests/twindowtest.h index d1d9d460e..12cc0f297 100644 --- a/tdeui/tests/twindowtest.h +++ b/tdeui/tests/twindowtest.h @@ -15,7 +15,7 @@ class KHelpMenu; class testWindow : public TDEMainWindow { - Q_OBJECT + TQ_OBJECT public: testWindow (TQWidget *parent=0, const char *name=0); diff --git a/tdeui/twindowinfo.cpp b/tdeui/twindowinfo.cpp index 436aa5227..ec1a448c5 100644 --- a/tdeui/twindowinfo.cpp +++ b/tdeui/twindowinfo.cpp @@ -67,12 +67,12 @@ void KWindowInfo::message( const TQString &text, const TQPixmap &pix, int timeou if ( timeout < 0 ) timeout = DEFAULT_MESSAGE_TIMEOUT; if ( timeout != 0 ) - TQTimer::singleShot( timeout, this, TQT_SLOT( restore() ) ); + TQTimer::singleShot( timeout, this, TQ_SLOT( restore() ) ); } void KWindowInfo::permanent( const TQString &text ) { -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 oldMiniIcon = KWin::icon( win->winId(), 16, 16, true ); oldIcon = KWin::icon( win->winId(), 34, 34, false ); if ( oldIcon.isNull() ) @@ -85,7 +85,7 @@ void KWindowInfo::permanent( const TQString &text ) void KWindowInfo::permanent( const TQString &text, const TQPixmap &pix ) { if ( !oldText.isNull() ) { - TQObjectList *l = queryList( TQTIMER_OBJECT_NAME_STRING ); + TQObjectList *l = queryList( "TQTimer" ); TQObjectListIt it( *l ); TQObject *obj; @@ -117,7 +117,7 @@ void KWindowInfo::display( const TQString &text, const TQPixmap &pix ) win->setCaption( text ); win->setIcon( icon ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::setIcons( win->winId(), icon, icon ); #endif } @@ -135,7 +135,7 @@ void KWindowInfo::save() } oldText = win->caption(); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 oldMiniIcon = KWin::icon( win->winId(), 16, 16, true ); oldIcon = KWin::icon( win->winId(), 34, 34, false ); if ( oldIcon.isNull() ) @@ -162,7 +162,7 @@ void KWindowInfo::restore() } win->setIcon( oldIcon ); -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 KWin::setIcons( win->winId(), oldIcon, oldMiniIcon ); #endif win->setCaption( oldText ); diff --git a/tdeui/twindowinfo.h b/tdeui/twindowinfo.h index d15942b47..26a274aa1 100644 --- a/tdeui/twindowinfo.h +++ b/tdeui/twindowinfo.h @@ -38,7 +38,7 @@ */ class TDEUI_EXPORT KWindowInfo : public TQObject { - Q_OBJECT + TQ_OBJECT public: /** diff --git a/tdeui/twindowlistmenu.cpp b/tdeui/twindowlistmenu.cpp index bc2df2f66..5c1f977bb 100644 --- a/tdeui/twindowlistmenu.cpp +++ b/tdeui/twindowlistmenu.cpp @@ -24,7 +24,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tqglobal.h> -#ifdef Q_WS_X11 +#ifdef TQ_WS_X11 #include "config.h" #include <tqpainter.h> @@ -85,9 +85,9 @@ int NameSortedInfoList::compareItems( TQPtrCollection::Item s1, TQPtrCollection: KWindowListMenu::KWindowListMenu(TQWidget *parent, const char *name) : TDEPopupMenu(parent, name) { - twin_module = new KWinModule(TQT_TQOBJECT(this)); + twin_module = new KWinModule(this); - connect(this, TQT_SIGNAL(activated(int)), TQT_SLOT(slotExec(int))); + connect(this, TQ_SIGNAL(activated(int)), TQ_SLOT(slotExec(int))); } KWindowListMenu::~KWindowListMenu() @@ -121,15 +121,15 @@ void KWindowListMenu::init() // Make sure the popup is not too wide, otherwise clicking in the middle of kdesktop // wouldn't leave any place for the popup, and release would activate some menu entry. - int maxwidth = kapp->desktop()->screenGeometry( this ).width() / 2 - 100; + int maxwidth = tdeApp->desktop()->screenGeometry( this ).width() / 2 - 100; clear(); map.clear(); int unclutter = insertItem( i18n("Unclutter Windows"), - this, TQT_SLOT( slotUnclutterWindows() ) ); + this, TQ_SLOT( slotUnclutterWindows() ) ); int cascade = insertItem( i18n("Cascade Windows"), - this, TQT_SLOT( slotCascadeWindows() ) ); + this, TQ_SLOT( slotCascadeWindows() ) ); // if we only have one desktop we won't be showing titles, so put a separator in if (nd == 1) @@ -242,16 +242,16 @@ void KWindowListMenu::selectActiveWindow() void KWindowListMenu::slotUnclutterWindows() { - kapp->dcopClient()->send(twinName(), "KWinInterface", "unclutterDesktop()", TQString("")); + tdeApp->dcopClient()->send(twinName(), "KWinInterface", "unclutterDesktop()", TQString("")); } void KWindowListMenu::slotCascadeWindows() { - kapp->dcopClient()->send(twinName(), "KWinInterface", "cascadeDesktop()", TQString("")); + tdeApp->dcopClient()->send(twinName(), "KWinInterface", "cascadeDesktop()", TQString("")); } void KWindowListMenu::virtual_hook( int id, void* data ) { TDEPopupMenu::virtual_hook( id, data ); } -#endif // Q_WS_X11 +#endif // TQ_WS_X11 diff --git a/tdeui/twindowlistmenu.h b/tdeui/twindowlistmenu.h index 20da236f1..0e7884e39 100644 --- a/tdeui/twindowlistmenu.h +++ b/tdeui/twindowlistmenu.h @@ -28,18 +28,14 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <tdepopupmenu.h> #include <tqmap.h> -#ifdef Q_MOC_RUN -#define Q_WS_X11 -#endif // Q_MOC_RUN - -#ifdef Q_WS_X11 // not yet available for non-X11 +#ifdef TQ_WS_X11 // not yet available for non-X11 class KWinModule; class KWindowListMenuPrivate; class TDEUI_EXPORT KWindowListMenu : public TDEPopupMenu { - Q_OBJECT + TQ_OBJECT public: KWindowListMenu( TQWidget *parent = 0, const char *name = 0 ); @@ -69,6 +65,6 @@ private: KWindowListMenuPrivate *d; }; -#endif // Q_WS_X11 +#endif // TQ_WS_X11 #endif |
