diff options
Diffstat (limited to 'kdm')
27 files changed, 175 insertions, 175 deletions
diff --git a/kdm/confproc.pl b/kdm/confproc.pl index 88be28847..ad685d284 100755 --- a/kdm/confproc.pl +++ b/kdm/confproc.pl @@ -207,12 +207,12 @@ my %th = ( "bool" => [ "C_TYPE_INT", " | C_BOOL", "int\t", "bool\t", "GetCfgInt", "GetCfgInt" ], "enum" => [ "C_TYPE_INT", " | C_ENUM", "int\t", "", "GetCfgInt", "" ], "group" => [ "C_TYPE_INT", " | C_GRP", "int\t", "", "GetCfgInt", "" ], - "string" => [ "C_TYPE_STR", "", "char\t*", "QString\t", "GetCfgStr", "GetCfgQStr" ], - "path" => [ "C_TYPE_STR", " | C_PATH", "char\t*", "QString\t", "GetCfgStr", "GetCfgQStr" ], - "list" => [ "C_TYPE_ARGV", "", "char\t**", "QStringList\t", "GetCfgStrArr", "GetCfgQStrList" ] + "string" => [ "C_TYPE_STR", "", "char\t*", "TQString\t", "GetCfgStr", "GetCfgQStr" ], + "path" => [ "C_TYPE_STR", " | C_PATH", "char\t*", "TQString\t", "GetCfgStr", "GetCfgQStr" ], + "list" => [ "C_TYPE_ARGV", "", "char\t**", "TQStringList\t", "GetCfgStrArr", "GetCfgQStrList" ] ); -my @tl = ("QFont\t", "QStringList\t", "QString\t", "char\t**", "char\t*", "int\t", "bool\t"); +my @tl = ("QFont\t", "TQStringList\t", "TQString\t", "char\t**", "char\t*", "int\t", "bool\t"); sub init_defs($) { diff --git a/kdm/kfrontend/kchooser.cpp b/kdm/kfrontend/kchooser.cpp index df602efea..c76f041e2 100644 --- a/kdm/kfrontend/kchooser.cpp +++ b/kdm/kfrontend/kchooser.cpp @@ -59,7 +59,7 @@ ChooserDlg::ChooserDlg() TQBoxLayout *vbox = new TQVBoxLayout( this, 10, 10 ); TQLabel *title = new TQLabel( i18n("XDMCP Host Menu"), this ); - title->setAlignment( AlignCenter ); + title->tqsetAlignment( AlignCenter ); vbox->addWidget( title ); host_view = new TQListView( this, "hosts" ); @@ -106,7 +106,7 @@ ChooserDlg::ChooserDlg() vbox->addWidget( consoleView ); #endif - sn = new TQSocketNotifier( rfd, TQSocketNotifier::Read, this ); + sn = new TQSocketNotifier( rfd, TQSocketNotifier::Read, TQT_TQOBJECT(this) ); connect( sn, TQT_SIGNAL(activated( int )), TQT_SLOT(slotReadPipe()) ); connect( pingButton, TQT_SIGNAL(clicked()), TQT_SLOT(pingHosts()) ); @@ -145,14 +145,14 @@ void ChooserDlg::pingHosts() void ChooserDlg::accept() { - if (focusWidget() == iline) { + if (tqfocusWidget() == iline) { if (!iline->text().isEmpty()) { GSendInt( G_Ch_DirectChoice ); GSendStr( iline->text().latin1() ); iline->clear(); } return; - } else /*if (focusWidget() == host_view)*/ { + } else /*if (tqfocusWidget() == host_view)*/ { TQListViewItem *item = host_view->currentItem(); if (item) { GSendInt( G_Ready ); @@ -170,7 +170,7 @@ TQString ChooserDlg::recvStr() { char *arr = GRecvStr(); if (arr) { - TQString str = TQString::fromLatin1( arr ); + TQString str = TQString::tqfromLatin1( arr ); free( arr ); return str; } else diff --git a/kdm/kfrontend/kconsole.cpp b/kdm/kfrontend/kconsole.cpp index 6c2ab09ab..5bc159244 100644 --- a/kdm/kfrontend/kconsole.cpp +++ b/kdm/kfrontend/kconsole.cpp @@ -163,7 +163,7 @@ KConsole::slotData() verticalScrollBar()->maxValue()); TQString str( TQString::fromLocal8Bit( buffer, n ).remove( '\r' ) ); int pos, opos; - for (opos = 0; (pos = str.find( '\n', opos )) >= 0; opos = pos + 1) { + for (opos = 0; (pos = str.tqfind( '\n', opos )) >= 0; opos = pos + 1) { if (paragraphs() == 100) removeParagraph( 0 ); if (!leftover.isEmpty()) { diff --git a/kdm/kfrontend/kdm_greet.c b/kdm/kfrontend/kdm_greet.c index b03d96e15..7a75330b0 100644 --- a/kdm/kfrontend/kdm_greet.c +++ b/kdm/kfrontend/kdm_greet.c @@ -700,11 +700,11 @@ restore_modifiers( void ) } void -setCursor( Display *mdpy, int window, int shape ) +setCursor( Display *mdpy, int window, int tqshape ) { Cursor xcursor; - if ((xcursor = XCreateFontCursor( mdpy, shape ))) { + if ((xcursor = XCreateFontCursor( mdpy, tqshape ))) { XDefineCursor( mdpy, window, xcursor ); XFreeCursor( mdpy, xcursor ); XFlush( mdpy ); diff --git a/kdm/kfrontend/kdm_greet.h b/kdm/kfrontend/kdm_greet.h index df325c28d..d68ee8604 100644 --- a/kdm/kfrontend/kdm_greet.h +++ b/kdm/kfrontend/kdm_greet.h @@ -77,7 +77,7 @@ int PingServer( struct _XDisplay *dpy ); void setup_modifiers( struct _XDisplay *mdpy, int numlock ); void restore_modifiers( void ); -void setCursor( struct _XDisplay *mdpy, int window, int shape ); +void setCursor( struct _XDisplay *mdpy, int window, int tqshape ); extern int rfd; /* for select() loops */ diff --git a/kdm/kfrontend/kdmadmindialog.cpp b/kdm/kfrontend/kdmadmindialog.cpp index 637d6dd90..42459ad60 100644 --- a/kdm/kfrontend/kdmadmindialog.cpp +++ b/kdm/kfrontend/kdmadmindialog.cpp @@ -75,10 +75,10 @@ KDMAdmin::KDMAdmin( const TQString &user, TQWidget *_parent ) box->addWidget( new KSeparator( KSeparator::HLine, this ) ); okButton = new KPushButton( KStdGuiItem::ok(), this ); - okButton->setSizePolicy( fp ); + okButton->tqsetSizePolicy( fp ); okButton->setDefault( true ); cancelButton = new KPushButton( KStdGuiItem::cancel(), this ); - cancelButton->setSizePolicy( fp ); + cancelButton->tqsetSizePolicy( fp ); hlay = new TQHBoxLayout( box ); hlay->addStretch( 1 ); @@ -103,7 +103,7 @@ void KDMAdmin::slotActivatePlugMenu() { TQPopupMenu *cmnu = verify->getPlugMenu(); - TQSize sh( cmnu->sizeHint() / 2 ); + TQSize sh( cmnu->tqsizeHint() / 2 ); cmnu->exec( geometry().center() - TQPoint( sh.width(), sh.height() ) ); } diff --git a/kdm/kfrontend/kdmclock.cpp b/kdm/kfrontend/kdmclock.cpp index 88cd53970..87e6a32ba 100644 --- a/kdm/kfrontend/kdmclock.cpp +++ b/kdm/kfrontend/kdmclock.cpp @@ -50,7 +50,7 @@ KdmClock::KdmClock( TQWidget *parent, const char *name ) mBorder = false;//config->readNumEntry( "border", FALSE ); //config->setGroup( "Font" ); - mFont.setFamily( TQString::fromLatin1("Utopia")/*config->readEntry( "Family", "Utopia")*/ ); + mFont.setFamily( TQString::tqfromLatin1("Utopia")/*config->readEntry( "Family", "Utopia")*/ ); mFont.setPointSize( 51/*config->readNumEntry( "Point Size", 51)*/ ); mFont.setWeight( 75/*config->readNumEntry( "Weight", 75)*/ ); mFont.setItalic( TRUE/*config->readNumEntry( "Italic",TRUE )*/ ); @@ -76,19 +76,19 @@ KdmClock::KdmClock( TQWidget *parent, const char *name ) //setBackgroundOrigin( WindowOrigin ); mBackgroundBrush = backgroundBrush(); setBackgroundMode( NoBackground ); - repaint(); + tqrepaint(); } void KdmClock::showEvent( TQShowEvent * ) { - repaint(); + tqrepaint(); } void KdmClock::timeout() { - repaint(); + tqrepaint(); } void KdmClock::paintEvent( TQPaintEvent * ) diff --git a/kdm/kfrontend/kdmconfig.cpp b/kdm/kfrontend/kdmconfig.cpp index 15a63fa67..0916eb881 100644 --- a/kdm/kfrontend/kdmconfig.cpp +++ b/kdm/kfrontend/kdmconfig.cpp @@ -41,7 +41,7 @@ TQString _stsFile; bool _isLocal; bool _authorized; -static QString +static TQString GetCfgQStr( int id ) { char *tmp = GetCfgStr( id ); @@ -50,7 +50,7 @@ GetCfgQStr( int id ) return qs; } -static QStringList +static TQStringList GetCfgQStrList( int id ) { int i, len; @@ -65,14 +65,14 @@ GetCfgQStrList( int id ) } // Based on kconfigbase.cpp -static QFont +static TQFont Str2Font( const TQString &aValue ) { uint nFontBits; TQFont aRetFont; TQString chStr; - TQStringList sl = TQStringList::split( TQString::fromLatin1(","), aValue ); + TQStringList sl = TQStringList::split( TQString::tqfromLatin1(","), aValue ); if (sl.count() == 1) { /* X11 font spec */ @@ -160,7 +160,7 @@ decodeSess( dpySpec *sess, TQString &user, TQString &loc ) sess->vt ? TQString("vt%1").arg( sess->vt ) : #endif - TQString::fromLatin1( *sess->from ? sess->from : sess->display ); + TQString::tqfromLatin1( *sess->from ? sess->from : sess->display ); } else { user = !sess->user ? @@ -174,6 +174,6 @@ decodeSess( dpySpec *sess, TQString &user, TQString &loc ) sess->vt ? TQString("%1, vt%2").arg( sess->display ).arg( sess->vt ) : #endif - TQString::fromLatin1( sess->display ); + TQString::tqfromLatin1( sess->display ); } } diff --git a/kdm/kfrontend/kdmshutdown.cpp b/kdm/kfrontend/kdmshutdown.cpp index dcd8a4cf1..8a556d2c8 100644 --- a/kdm/kfrontend/kdmshutdown.cpp +++ b/kdm/kfrontend/kdmshutdown.cpp @@ -115,7 +115,7 @@ KDMShutdownBase::complete( TQWidget *prevWidget ) hlay->addStretch( 1 ); if (mayOk) { okButton = new KPushButton( KStdGuiItem::ok(), this ); - okButton->setSizePolicy( fp ); + okButton->tqsetSizePolicy( fp ); okButton->setDefault( true ); hlay->addWidget( okButton ); hlay->addStretch( 1 ); @@ -124,13 +124,13 @@ KDMShutdownBase::complete( TQWidget *prevWidget ) if (maySched) { KPushButton *schedButton = new KPushButton( KGuiItem( i18n("&Schedule...") ), this ); - schedButton->setSizePolicy( fp ); + schedButton->tqsetSizePolicy( fp ); hlay->addWidget( schedButton ); hlay->addStretch( 1 ); connect( schedButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotSched()) ); } cancelButton = new KPushButton( KStdGuiItem::cancel(), this ); - cancelButton->setSizePolicy( fp ); + cancelButton->tqsetSizePolicy( fp ); if (!mayOk) cancelButton->setDefault( true ); hlay->addWidget( cancelButton ); @@ -147,7 +147,7 @@ KDMShutdownBase::slotActivatePlugMenu() TQPopupMenu *cmnu = verify->getPlugMenu(); if (!cmnu) return; - TQSize sh( cmnu->sizeHint() / 2 ); + TQSize sh( cmnu->tqsizeHint() / 2 ); cmnu->exec( geometry().center() - TQPoint( sh.width(), sh.height() ) ); } } @@ -268,11 +268,11 @@ KDMShutdown::KDMShutdown( int _uid, TQWidget *_parent ) TQWidget *hlp = new TQWidget( howGroup ); targets = new TQComboBox( hlp ); for (int i = 0; tlist[i]; i++) - targets->insertItem( TQString::fromLocal8Bit( tlist[i] ) ); + targets->insertItem( TQString(TQString::fromLocal8Bit( tlist[i] )) ); freeStrArr( tlist ); targets->setCurrentItem( oldTarget == -1 ? defaultTarget : oldTarget ); TQHBoxLayout *hb = new TQHBoxLayout( hlp, 0, KDsh ); - int spc = kapp->style().pixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ) + int spc = kapp->tqstyle().tqpixelMetric( TQStyle::PM_ExclusiveIndicatorWidth ) + howGroup->insideSpacing(); hb->addSpacing( spc ); hb->addWidget( targets ); @@ -280,7 +280,7 @@ KDMShutdown::KDMShutdown( int _uid, TQWidget *_parent ) } GSet( 0 ); - howGroup->setSizePolicy( fp ); + howGroup->tqsetSizePolicy( fp ); schedGroup = new TQGroupBox( i18n("Scheduling"), this ); hlay->addWidget( schedGroup, 0, AlignTop ); @@ -300,13 +300,13 @@ KDMShutdown::KDMShutdown( int _uid, TQWidget *_parent ) TQGridLayout *grid = new TQGridLayout( schedGroup, 0, 0, KDmh, KDsh ); grid->addRowSpacing( 0, schedGroup->fontMetrics().height() - 5 ); - grid->addWidget( lab1, 1, 0, AlignRight ); + grid->addWidget( lab1, 1, 0, Qt::AlignRight ); grid->addWidget( le_start, 1, 1 ); - grid->addWidget( lab2, 2, 0, AlignRight ); + grid->addWidget( lab2, 2, 0, Qt::AlignRight ); grid->addWidget( le_timeout, 2, 1 ); grid->addMultiCellWidget( cb_force, 3,3, 0,1 ); - schedGroup->setSizePolicy( fp ); + schedGroup->tqsetSizePolicy( fp ); le_start->setText( "0" ); if (_defSdMode == SHUT_SCHEDULE) @@ -477,7 +477,7 @@ KDMSlimShutdown::KDMSlimShutdown( TQWidget *_parent ) if(doUbuntuLogout) { lfrm->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised ); - lfrm->setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth, lfrm ) ); + lfrm->setLineWidth( tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth, lfrm ) ); // we need to set the minimum size for the logout box, since it // gets too small if there isn't all options available lfrm->setMinimumSize(300,120); @@ -487,13 +487,13 @@ KDMSlimShutdown::KDMSlimShutdown( TQWidget *_parent ) // first line of buttons hbuttonbox = new TQHBoxLayout( vbox, 8 * KDialog::spacingHint() ); - hbuttonbox->setAlignment( Qt::AlignHCenter ); + hbuttonbox->tqsetAlignment( Qt::AlignHCenter ); // Reboot FlatButton* btnReboot = new FlatButton( lfrm ); btnReboot->setTextLabel( i18n("&Restart"), false ); btnReboot->setPixmap( DesktopIcon( "reload") ); - int i = btnReboot->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 + int i = btnReboot->textLabel().tqfind( TQRegExp("\\&"), 0 ); // i == 1 btnReboot->setAccel( "ALT+" + btnReboot->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnReboot); connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot())); @@ -524,14 +524,14 @@ KDMSlimShutdown::KDMSlimShutdown( TQWidget *_parent ) FlatButton* btnHalt = new FlatButton( lfrm ); btnHalt->setTextLabel( i18n("&Turn Off"), false ); btnHalt->setPixmap( DesktopIcon( "exit") ); - i = btnHalt->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 + i = btnHalt->textLabel().tqfind( TQRegExp("\\&"), 0 ); // i == 1 btnHalt->setAccel( "ALT+" + btnHalt->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnHalt ); connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt())); // cancel buttonbox TQHBoxLayout* hbuttonbox2 = new TQHBoxLayout( vbox, 8 * KDialog::spacingHint() ); - hbuttonbox2->setAlignment( Qt::AlignRight ); + hbuttonbox2->tqsetAlignment( Qt::AlignRight ); // Back to kdm KSMPushButton* btnBack = new KSMPushButton( KStdGuiItem::cancel(), lfrm ); @@ -744,7 +744,7 @@ void FlatButton::init() setUsesBigPixmap(true); setAutoRaise(true); setTextPosition( TQToolButton::Under ); - setFocusPolicy(TQWidget::StrongFocus); + setFocusPolicy(TQ_StrongFocus); } @@ -816,7 +816,7 @@ KDMConfShutdown::KDMConfShutdown( int _uid, dpySpec *sess, int type, const char .arg( os ? i18n("<br>(Next boot: %1)") .arg( TQString::fromLocal8Bit( os ) ) : - TQString::null ), + TQString() ), this ) ); if (sess) { @@ -876,13 +876,13 @@ KDMCancelShutdown::KDMCancelShutdown( int how, int start, int timeout, strt = i18n("now"); else { qdt.setTime_t( start ); - strt = qdt.toString( LocalDate ); + strt = qdt.toString( Qt::LocalDate ); } if (timeout == TO_INF) end = i18n("infinite"); else { qdt.setTime_t( timeout ); - end = qdt.toString( LocalDate ); + end = qdt.toString( Qt::LocalDate ); } TQString trg = i18n("Owner: %1" @@ -900,7 +900,7 @@ KDMCancelShutdown::KDMCancelShutdown( int how, int start, int timeout, .arg( strt ).arg( end ) .arg( os ? i18n("\nNext boot: %1").arg( TQString::fromLocal8Bit( os ) ) : - TQString::null ); + TQString() ); if (timeout != TO_INF) trg += i18n("\nAfter timeout: %1") .arg( force == SHUT_FORCE ? diff --git a/kdm/kfrontend/kdmshutdown.h b/kdm/kfrontend/kdmshutdown.h index c9084c153..18fda2e9a 100644 --- a/kdm/kfrontend/kdmshutdown.h +++ b/kdm/kfrontend/kdmshutdown.h @@ -213,7 +213,7 @@ private: }; -class FlatButton : public QToolButton +class FlatButton : public TQToolButton { Q_OBJECT diff --git a/kdm/kfrontend/kfdialog.cpp b/kdm/kfrontend/kfdialog.cpp index 78359e237..5052e7165 100644 --- a/kdm/kfrontend/kfdialog.cpp +++ b/kdm/kfrontend/kfdialog.cpp @@ -59,7 +59,7 @@ FDialog::resizeEvent( TQResizeEvent *e ) void FDialog::adjustGeometry() { - TQDesktopWidget *dsk = qApp->desktop(); + TQDesktopWidget *dsk = tqApp->desktop(); if (_greeterScreen < 0) _greeterScreen = _greeterScreen == -2 ? @@ -74,7 +74,7 @@ FDialog::adjustGeometry() adjustSize(); } - if (parentWidget()) + if (tqparentWidget()) return; TQRect grt( rect() ); @@ -140,10 +140,10 @@ KFMsgBox::KFMsgBox( TQWidget *parent, TQMessageBox::Icon type, const TQString &t TQLabel *label2 = new TQLabel( text, this ); TQRect d = KGlobalSettings::desktopGeometry(this); if ( label2->fontMetrics().size( 0, text).width() > d.width() * 3 / 5) - label2->setAlignment(Qt::WordBreak | Qt::AlignAuto ); + label2->tqsetAlignment(TQt::WordBreak | TQt::AlignAuto ); KPushButton *button = new KPushButton( KStdGuiItem::ok(), this ); button->setDefault( true ); - button->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); + button->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ) ); connect( button, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); TQGridLayout *grid = new TQGridLayout( this, 2, 2, 10 ); diff --git a/kdm/kfrontend/kgapp.cpp b/kdm/kfrontend/kgapp.cpp index 50e65e916..027e9a693 100644 --- a/kdm/kfrontend/kgapp.cpp +++ b/kdm/kfrontend/kgapp.cpp @@ -201,7 +201,7 @@ kg_main( const char *argv0 ) } if (cmd == G_ErrorGreet) { - if (KGVerify::handleFailVerify( qApp->desktop()->screen( _greeterScreen ) )) + if (KGVerify::handleFailVerify( TQT_TQWIDGET(tqApp->desktop()->screen( _greeterScreen )) )) break; _autoLoginDelay = 0; cmd = G_Greet; diff --git a/kdm/kfrontend/kgdialog.cpp b/kdm/kfrontend/kgdialog.cpp index f4ed918c6..e3d060643 100644 --- a/kdm/kfrontend/kgdialog.cpp +++ b/kdm/kfrontend/kgdialog.cpp @@ -133,8 +133,8 @@ KGDialog::inserten( const TQString& txt, int accel, TQPopupMenu *cmnu ) void KGDialog::slotActivateMenu( int id ) { - TQPopupMenu *cmnu = optMenu->findItem( id )->popup(); - TQSize sh( cmnu->sizeHint() / 2 ); + TQPopupMenu *cmnu = optMenu->tqfindItem( id )->popup(); + TQSize sh( cmnu->tqsizeHint() / 2 ); cmnu->exec( geometry().center() - TQPoint( sh.width(), sh.height() ) ); } diff --git a/kdm/kfrontend/kgreeter.cpp b/kdm/kfrontend/kgreeter.cpp index bd2e2651a..2e5da21a2 100644 --- a/kdm/kfrontend/kgreeter.cpp +++ b/kdm/kfrontend/kgreeter.cpp @@ -79,7 +79,7 @@ class UserListView : public KListView { : KListView( parent, name ) , themed(_them), cachedSizeHint( -1, 0 ) { - setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ); + tqsetSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Ignored ); header()->hide(); addColumn( TQString::null ); setColumnAlignment( 0, AlignVCenter ); @@ -105,10 +105,10 @@ class UserListView : public KListView { return sum; } public: - virtual TQSize sizeHint() const + virtual TQSize tqsizeHint() const { if (themed) - return KListView::sizeHint(); + return KListView::tqsizeHint(); if (!cachedSizeHint.isValid()) { constPolish(); @@ -119,7 +119,7 @@ public: maxw = thisw; } cachedSizeHint.setWidth( - style().pixelMetric( TQStyle::PM_ScrollBarExtent ) + + tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent ) + frameWidth() * 2 + maxw ); } return cachedSizeHint; @@ -133,14 +133,14 @@ public: // painting of list background for now. return KListView::paintEmptyArea(p, rect ); - const TQPixmap *pm = paletteBackgroundPixmap(); + const TQPixmap *pm = TQT_TQPIXMAP_CONST(paletteBackgroundPixmap()); if (!pm || pm->isNull()) return; kdDebug() << "paintEmpty " << rect << endl; TQRect devRect = p->xForm( rect ); kdDebug() << "paintEmpty2 " << devRect << endl; - p->drawPixmap(0, 0, *pm, devRect.left(), devRect.top() ); + p->tqdrawPixmap(0, 0, *pm, devRect.left(), devRect.top() ); } TQPixmap background; @@ -207,7 +207,7 @@ void KGreeter::readFacesList() if ( line.isEmpty() ) continue; TQString icon; - int index = line.find( ' ' ); + int index = line.tqfind( ' ' ); if ( index > 0 ) { icon = line.left( index ); line = line.mid( index ); @@ -235,12 +235,12 @@ class UserListViewItem : public KListViewItem { parent->cachedSizeHint.setWidth( -1 ); } - virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { if (((UserListView*)listView())->themed) - TQListViewItem::paintCell(p, cg, column, width, alignment); + TQListViewItem::paintCell(p, cg, column, width, tqalignment); else - KListViewItem::paintCell(p, cg, column, width, alignment); + KListViewItem::paintCell(p, cg, column, width, tqalignment); } TQString login; @@ -277,7 +277,7 @@ KGreeter::insertUser( const TQImage &default_pix, dp ^= 1; TQCString fn = !dp ? TQCString( ps->pw_dir ) + '/' : - TQFile::encodeName( _faceDir + '/' + username ); + TQCString(TQFile::encodeName( _faceDir + '/' + username )); fn += ".face.icon"; int fd, ico; if ((fd = open( fn.data(), O_RDONLY | O_NONBLOCK )) < 0) { @@ -302,7 +302,7 @@ KGreeter::insertUser( const TQImage &default_pix, TQBuffer buf( fc ); buf.open( IO_ReadOnly ); TQImageIO ir; - ir.setIODevice( &buf ); + ir.setIODevice( TQT_TQIODEVICE(&buf) ); if (!ir.read()) { LogInfo( "%s is no valid image\n", fn.data() ); continue; @@ -310,7 +310,7 @@ KGreeter::insertUser( const TQImage &default_pix, p = ir.image(); TQSize ns( 48, 48 ); if (p.size() != ns) - p = p.convertDepth( 32 ).smoothScale( ns, TQImage::ScaleMin ); + p = p.convertDepth( 32 ).smoothScale( ns, TQ_ScaleMin ); break; } while (--nd >= 0); @@ -319,7 +319,7 @@ KGreeter::insertUser( const TQImage &default_pix, if ( randomFace.isNull() ) { TQStringList::size_type index = 0; for ( size_t i = 0; i < username.length(); ++i ) - index += ( 0x7f - username.at( i ).latin1() ) % 37; + index += ( 0x7f - username.tqat( i ).latin1() ) % 37; randomFace = randomFaces[ index % randomFaces.count() ]; } p.load( _faceDir + "/../pics/users/" + randomFace + ".png" ); @@ -329,7 +329,7 @@ KGreeter::insertUser( const TQImage &default_pix, p = default_pix; TQString realname = KStringHandler::from8Bit( ps->pw_gecos ); - realname.truncate( realname.find( ',' ) ); + realname.truncate( realname.tqfind( ',' ) ); if (realname.isEmpty() || realname == username) new UserListViewItem( userView, username, TQPixmap( p ), username ); else { @@ -343,7 +343,7 @@ KGreeter::insertUser( const TQImage &default_pix, class KCStringList : public TQValueList<TQCString> { public: - bool contains( const char *str ) const + bool tqcontains( const char *str ) const { for (ConstIterator it = begin(); it != end(); ++it) if (*it == str) @@ -355,9 +355,9 @@ class KCStringList : public TQValueList<TQCString> { class UserList { public: UserList( char **in ); - bool hasUser( const char *str ) const { return users.contains( str ); } + bool hasUser( const char *str ) const { return users.tqcontains( str ); } bool hasGroup( gid_t gid ) const - { return groups.find( gid ) != groups.end(); } + { return groups.tqfind( gid ) != groups.end(); } bool hasGroups() const { return !groups.isEmpty(); } KCStringList users; @@ -396,7 +396,7 @@ KGreeter::insertUsers(int limit_users) TQSize ns( 48, 48 ); if (default_pix.size() != ns) default_pix = - default_pix.convertDepth( 32 ).smoothScale( ns, TQImage::ScaleMin ); + default_pix.convertDepth( 32 ).smoothScale( ns, TQ_ScaleMin ); } if (_showUsers == SHOW_ALL) { UserList noUsers( _noUsers ); @@ -412,7 +412,7 @@ KGreeter::insertUsers(int limit_users) !noUsers.hasGroup( ps->pw_gid )) { TQString username( TQFile::decodeName( ps->pw_name ) ); - if (!dupes.find( username )) { + if (!dupes.tqfind( username )) { dupes.insert( username, (int *)-1 ); toinsert.append( username ); @@ -443,7 +443,7 @@ KGreeter::insertUsers(int limit_users) // !noUsers.hasGroup( ps->pw_gid )) // { // TQString username( TQFile::decodeName( ent->ut_user ) ); -// if (!dupes.find( username )) { +// if (!dupes.tqfind( username )) { // dupes.insert( username, (int *)-1 ); // toinsert.append( username ); // count++; @@ -477,7 +477,7 @@ KGreeter::insertUsers(int limit_users) users.hasGroup( ps->pw_gid ))) { TQString username( TQFile::decodeName( ps->pw_name ) ); - if (!dupes.find( username )) { + if (!dupes.tqfind( username )) { dupes.insert( username, (int *)-1 ); insertUser( default_pix, username, ps ); } @@ -786,14 +786,14 @@ KStdGreeter::KStdGreeter() i18n("This display requires no X authorization.\n" "This means that anybody can connect to it,\n" "open windows on it or intercept your input.") ); - complainLabel->setAlignment( AlignCenter ); + complainLabel->tqsetAlignment( AlignCenter ); complainLabel->setFont( _failFont ); complainLabel->setPaletteForegroundColor( Qt::red ); inner_box->addWidget( complainLabel ); } if (!_greetString.isEmpty()) { TQLabel *welcomeLabel = new TQLabel( _greetString, this ); - welcomeLabel->setAlignment( AlignCenter ); + welcomeLabel->tqsetAlignment( AlignCenter ); welcomeLabel->setFont( _greetFont ); inner_box->addWidget( welcomeLabel ); } diff --git a/kdm/kfrontend/kgverify.cpp b/kdm/kfrontend/kgverify.cpp index 98abb4fb5..b80f63279 100644 --- a/kdm/kfrontend/kgverify.cpp +++ b/kdm/kfrontend/kgverify.cpp @@ -148,9 +148,9 @@ TQString // public KGVerify::pluginName() const { TQString name( greetPlugins[pluginList[curPlugin]].library->fileName() ); - uint st = name.findRev( '/' ) + 1; - uint en = name.find( '.', st ); - if (en - st > 7 && TQConstString( name.unicode() + st, 7 ).string() == "kgreet_") + uint st = name.tqfindRev( '/' ) + 1; + uint en = name.tqfind( '.', st ); + if (en - st > 7 && TQConstString( name.tqunicode() + st, 7 ).string() == "kgreet_") st += 7; return name.mid( st, en - st ); } @@ -163,7 +163,7 @@ showWidgets( TQLayoutItem *li ) if ((w = li->widget())) w->show(); - else if ((l = li->layout())) { + else if ((l = li->tqlayout())) { TQLayoutIterator it = l->iterator(); for (TQLayoutItem *itm = it.current(); itm; itm = ++it) showWidgets( itm ); @@ -849,7 +849,7 @@ KGVerify::getConf( void *, const char *key, const TQVariant &dflt ) if (!qstrcmp( key, "EchoMode" )) return TQVariant( _echoMode ); else { - TQString fkey = TQString::fromLatin1( key ) + '='; + TQString fkey = TQString::tqfromLatin1( key ) + '='; for (TQStringList::ConstIterator it = _pluginOptions.begin(); it != _pluginOptions.end(); ++it) if ((*it).startsWith( fkey )) @@ -923,11 +923,11 @@ KGStdVerify::KGStdVerify( KGVerifyHandler *_handler, TQWidget *_parent, , failedLabelState( 0 ) { grid = new TQGridLayout; - grid->setAlignment( AlignCenter ); + grid->tqsetAlignment( AlignCenter ); failedLabel = new TQLabel( parent ); failedLabel->setFont( _failFont ); - grid->addWidget( failedLabel, 1, 0, AlignCenter ); + grid->addWidget( failedLabel, 1, 0, Qt::AlignCenter ); updateLockStatus(); } @@ -1080,10 +1080,10 @@ KGChTok::KGChTok( TQWidget *_parent, const TQString &user, { TQSizePolicy fp( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); okButton = new KPushButton( KStdGuiItem::ok(), this ); - okButton->setSizePolicy( fp ); + okButton->tqsetSizePolicy( fp ); okButton->setDefault( true ); cancelButton = new KPushButton( KStdGuiItem::cancel(), this ); - cancelButton->setSizePolicy( fp ); + cancelButton->tqsetSizePolicy( fp ); verify = new KGStdVerify( this, this, cancelButton, user, pluginList, func, ctx ); verify->selectPlugin( curPlugin ); diff --git a/kdm/kfrontend/kgverify.h b/kdm/kfrontend/kgverify.h index 0276b2f97..0d76b5e7f 100644 --- a/kdm/kfrontend/kgverify.h +++ b/kdm/kfrontend/kgverify.h @@ -184,7 +184,7 @@ class KGStdVerify : public KGVerify { const PluginList &pluginList, KGreeterPlugin::Function func, KGreeterPlugin::Context ctx ); virtual ~KGStdVerify(); - TQLayout *getLayout() const { return grid; } + TQLayout *getLayout() const { return TQT_TQLAYOUT(grid); } void selectPlugin( int id ); protected: diff --git a/kdm/kfrontend/krootimage.cpp b/kdm/kfrontend/krootimage.cpp index 67b575c5f..a92c6aab1 100644 --- a/kdm/kfrontend/krootimage.cpp +++ b/kdm/kfrontend/krootimage.cpp @@ -60,8 +60,8 @@ MyApplication::MyApplication( const char *conf ) void MyApplication::renderDone() { - desktop()->setBackgroundPixmap( renderer.pixmap() ); - desktop()->repaint( true ); + TQT_TQWIDGET(desktop())->setBackgroundPixmap( renderer.pixmap() ); + TQT_TQWIDGET(desktop())->tqrepaint( true ); renderer.saveCacheFile(); renderer.cleanup(); for (unsigned i=0; i<renderer.numRenderers(); ++i) diff --git a/kdm/kfrontend/themer/kdmitem.cpp b/kdm/kfrontend/themer/kdmitem.cpp index a171bd1bb..3d81de58a 100644 --- a/kdm/kfrontend/themer/kdmitem.cpp +++ b/kdm/kfrontend/themer/kdmitem.cpp @@ -214,7 +214,7 @@ KdmItem::setWidget( TQWidget *widget ) myWidget->show(); // Remove borders so that it blends nicely with the theme background - TQFrame* frame = ::qt_cast<TQFrame *>( widget ); + TQFrame* frame = ::tqqt_cast<TQFrame *>( widget ); if (frame) frame->setFrameStyle( TQFrame::NoFrame ); @@ -278,7 +278,7 @@ KdmItem::setGeometry( const TQRect &newGeometry, bool force ) if (fixedManager && !fixedManager->isEmpty()) fixedManager->update( newGeometry, force ); - // TODO send *selective* repaint signal + // TODO send *selective* tqrepaint signal } void @@ -295,8 +295,8 @@ KdmItem::paint( TQPainter *p, const TQRect &rect ) // Maybe set a darker version of the background instead of an exact copy? if ( myWidget && myWidget->isA( "KListView" ) ) { TQPixmap copy( myWidget->size() ); - kdDebug() << myWidget->geometry() << " " << area << " " << myWidget->size() << endl; - bitBlt( ©, TQPoint( 0, 0), p->device(), myWidget->geometry(), Qt::CopyROP ); + kdDebug() << myWidget->tqgeometry() << " " << area << " " << myWidget->size() << endl; + bitBlt( ©, TQPoint( 0, 0), p->device(), myWidget->geometry(), TQt::CopyROP ); // Lighten it slightly TQImage lightVersion; lightVersion = copy.convertToImage(); @@ -368,7 +368,7 @@ KdmItem::mouseEvent( int x, int y, bool pressed, bool released ) } ItemState oldState = state; - if (area.contains( x, y )) { + if (area.tqcontains( x, y )) { if (released && oldState == Sactive) { if (buttonParent) emit activated( id ); @@ -414,22 +414,22 @@ KdmItem::statusChanged() // BEGIN protected inheritable -QSize -KdmItem::sizeHint() +TQSize +KdmItem::tqsizeHint() { if (myWidget) return myWidget->size(); if (myLayoutItem) - return myLayoutItem->sizeHint(); + return myLayoutItem->tqsizeHint(); int w = pos.wType == DTpixel ? kAbs( pos.width ) : -1, h = pos.hType == DTpixel ? kAbs( pos.height ) : -1; return TQSize( w, h ); } -QRect +TQRect KdmItem::placementHint( const TQRect &parentRect ) { - TQSize hintedSize = sizeHint(); + TQSize hintedSize = tqsizeHint(); TQSize boxHint; int x = parentRect.left(), @@ -446,7 +446,7 @@ KdmItem::placementHint( const TQRect &parentRect ) else { if (!boxManager) return parentRect; - boxHint = boxManager->sizeHint(); + boxHint = boxManager->tqsizeHint(); } kdDebug() << timestamp() << " boxHint " << boxHint << endl; } @@ -456,21 +456,21 @@ KdmItem::placementHint( const TQRect &parentRect ) else if (pos.xType == DTnpixel) x = parentRect.right() - pos.x; else if (pos.xType == DTpercent) - x += qRound( parentRect.width() / 100.0 * pos.x ); + x += tqRound( parentRect.width() / 100.0 * pos.x ); if (pos.yType == DTpixel) y += pos.y; else if (pos.yType == DTnpixel) y = parentRect.bottom() - pos.y; else if (pos.yType == DTpercent) - y += qRound( parentRect.height() / 100.0 * pos.y ); + y += tqRound( parentRect.height() / 100.0 * pos.y ); if (pos.wType == DTpixel) w = pos.width; else if (pos.wType == DTnpixel) w -= pos.width; else if (pos.wType == DTpercent) - w = qRound( parentRect.width() / 100.0 * pos.width ); + w = tqRound( parentRect.width() / 100.0 * pos.width ); else if (pos.wType == DTbox) w = boxHint.width(); else if (hintedSize.width() > 0) @@ -483,7 +483,7 @@ KdmItem::placementHint( const TQRect &parentRect ) else if (pos.hType == DTnpixel) h -= pos.height; else if (pos.hType == DTpercent) - h = qRound( parentRect.height() / 100.0 * pos.height ); + h = tqRound( parentRect.height() / 100.0 * pos.height ); else if (pos.hType == DTbox) h = boxHint.height(); else if (hintedSize.height() > 0) { @@ -496,7 +496,7 @@ KdmItem::placementHint( const TQRect &parentRect ) // we choose to take the hinted size, but it's better to listen to the aspect ratio if (pos.wType == DTnone && pos.hType != DTnone && h && w) { - w = qRound(float(hintedSize.width() * h) / hintedSize.height()); + w = tqRound(float(hintedSize.width() * h) / hintedSize.height()); } // defaults to center @@ -504,13 +504,13 @@ KdmItem::placementHint( const TQRect &parentRect ) // anchor the rect to an edge / corner if (pos.anchor.length() > 0 && pos.anchor.length() < 3) { - if (pos.anchor.find( 'n' ) >= 0) + if (pos.anchor.tqfind( 'n' ) >= 0) dy = 0; - if (pos.anchor.find( 's' ) >= 0) + if (pos.anchor.tqfind( 's' ) >= 0) dy = -h; - if (pos.anchor.find( 'w' ) >= 0) + if (pos.anchor.tqfind( 'w' ) >= 0) dx = 0; - if (pos.anchor.find( 'e' ) >= 0) + if (pos.anchor.tqfind( 'e' ) >= 0) dx = -w; } // KdmItem *p = static_cast<KdmItem*>( parent() ); @@ -555,11 +555,11 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType ) if (s == "box") { // box value dType = DTbox; val = 0; - } else if ((p = s.find( '%' )) >= 0) { // percent value + } else if ((p = s.tqfind( '%' )) >= 0) { // percent value dType = DTpercent; TQString sCopy = s; sCopy.remove( p, 1 ); - sCopy.replace( ',', '.' ); + sCopy.tqreplace( ',', '.' ); val = (int)sCopy.toDouble(); } else { // int value dType = DTpixel; @@ -568,7 +568,7 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType ) sCopy.remove( 0, 1 ); dType = DTnpixel; } - sCopy.replace( ',', '.' ); + sCopy.tqreplace( ',', '.' ); val = (int)sCopy.toDouble(); } } @@ -576,7 +576,7 @@ KdmItem::parseAttribute( const TQString &s, int &val, enum DataType &dType ) void KdmItem::parseFont( const TQString &s, TQFont &font ) { - int splitAt = s.findRev( ' ' ); + int splitAt = s.tqfindRev( ' ' ); if (splitAt < 1) return; font.setFamily( s.left( splitAt ) ); @@ -614,16 +614,16 @@ KdmItem::setFixedLayout( const TQDomNode &node ) } TQWidget * -KdmItem::parentWidget() const +KdmItem::tqparentWidget() const { if (myWidget) return myWidget; if (!this->parent()) return 0; - if (parent()->qt_cast("TQWidget")) + if (tqparent()->tqqt_cast("TQWidget")) return (TQWidget*)parent(); - return ((KdmItem*)parent())->parentWidget(); + return ((KdmItem*)parent())->tqparentWidget(); } #include "kdmitem.moc" diff --git a/kdm/kfrontend/themer/kdmitem.h b/kdm/kfrontend/themer/kdmitem.h index 230ed71c4..31d4fcfa2 100644 --- a/kdm/kfrontend/themer/kdmitem.h +++ b/kdm/kfrontend/themer/kdmitem.h @@ -96,7 +96,7 @@ public: /** * Fixup the geometry of an item and its children (even if fixed - * or boxed ones). Note that this will generate repaint signals + * or boxed ones). Note that this will generate tqrepaint signals * when needed. The default implementation should fit all needs. */ virtual void setGeometry( const TQRect &newGeometry, bool force ); @@ -109,7 +109,7 @@ public: void paint( TQPainter *painter, const TQRect &boundaries ); /** - * Update representation of contents and repaint. + * Update representation of contents and tqrepaint. */ virtual void update(); @@ -120,7 +120,7 @@ public: void mouseEvent( int x, int y, bool pressed = false, bool released = false ); /** - * Similar to sizeHint(..), this returns the area of the item + * Similar to tqsizeHint(..), this returns the area of the item * given the @p parentGeometry. The default implementation * takes into account geometric constraints and layoutings. * @param parentGeometry the geometry of the caller item or a @@ -147,7 +147,7 @@ public: TQString baseDir() const { if (basedir.isEmpty() && parent()) - return static_cast<KdmItem *>( parent()->qt_cast( "KdmItem" ) )->baseDir(); + return static_cast<KdmItem *>( tqparent()->tqqt_cast( "KdmItem" ) )->baseDir(); return basedir; } @@ -163,7 +163,7 @@ public: bool isExplicitlyHidden() const { return isShown == ExplicitlyHidden; } TQRect rect() const { return area; } - TQWidget *parentWidget() const; + TQWidget *tqparentWidget() const; TQString getId() const { return id; } signals: @@ -181,7 +181,7 @@ protected: * @return (-1,-1) if no size can be determined (so it should * default to parent's size). */ - virtual TQSize sizeHint(); + virtual TQSize tqsizeHint(); /** * Low level graphical function to paint the item. @@ -195,7 +195,7 @@ protected: /** * Called when item changes its 'state' variable. This must - * handle item's repaint. + * handle item's tqrepaint. */ virtual void statusChanged(); diff --git a/kdm/kfrontend/themer/kdmlabel.cpp b/kdm/kfrontend/themer/kdmlabel.cpp index e83ae9dc7..55a993988 100644 --- a/kdm/kfrontend/themer/kdmlabel.cpp +++ b/kdm/kfrontend/themer/kdmlabel.cpp @@ -96,7 +96,7 @@ KdmLabel::KdmLabel( KdmItem *parent, const TQDomNode &node, const char *name ) } // Check if this is a timer label) - label.isTimer = label.text.find( "%c" ) >= 0; + label.isTimer = label.text.tqfind( "%c" ) >= 0; if (label.isTimer) { timer = new TQTimer( this ); timer->start( 1000 ); @@ -110,13 +110,13 @@ KdmLabel::setTextInt( const TQString &txt) { // TODO: catch && cText = txt; - cAccel = txt.find('&'); + cAccel = txt.tqfind('&'); delete myAccel; myAccel = 0; if (cAccel != -1) { cText.remove('&'); - myAccel = new TQAccel(parentWidget()); - myAccel->insertItem(ALT + UNICODE_ACCEL + cText.at(cAccel).lower().unicode()); + myAccel = new TQAccel(tqparentWidget()); + myAccel->insertItem(ALT + UNICODE_ACCEL + cText.tqat(cAccel).lower().tqunicode()); connect(myAccel, TQT_SIGNAL(activated(int)), TQT_SLOT(slotAccel())); } } @@ -137,8 +137,8 @@ KdmLabel::setText( const TQString &txt ) setTextInt( lookupText( label.text ) ); } -QSize -KdmLabel::sizeHint() +TQSize +KdmLabel::tqsizeHint() { // choose the correct label class struct LabelStruct::LabelClass *l = &label.normal; @@ -231,7 +231,7 @@ static const struct { { "login", I18N_NOOP("Login") } }; -QString +TQString KdmLabel::lookupStock( const TQString &stock ) { //FIXME add key accels! @@ -245,12 +245,12 @@ KdmLabel::lookupStock( const TQString &stock ) return stock; } -QString +TQString KdmLabel::lookupText( const TQString &t ) { TQString text = t; - text.replace( '_', '&' ); + text.tqreplace( '_', '&' ); TQMap<TQChar,TQString> m; struct utsname uts; @@ -268,7 +268,7 @@ KdmLabel::lookupText( const TQString &t ) m['s'] = KThemedGreeter::timedUser; // xgettext:no-c-format KGlobal::locale()->setDateFormat( i18n("date format", "%a %d %B") ); - m['c'] = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), false, false ); + m['c'] = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), false, false ); return KMacroExpander::expandMacros( text, m ); } diff --git a/kdm/kfrontend/themer/kdmlabel.h b/kdm/kfrontend/themer/kdmlabel.h index 1ec2f88ec..33ce1cc00 100644 --- a/kdm/kfrontend/themer/kdmlabel.h +++ b/kdm/kfrontend/themer/kdmlabel.h @@ -42,7 +42,7 @@ public: protected: // reimplemented; returns the minimum size of rendered text - virtual TQSize sizeHint(); + virtual TQSize tqsizeHint(); // draw the label virtual void drawContents( TQPainter *p, const TQRect &r ); diff --git a/kdm/kfrontend/themer/kdmlayout.cpp b/kdm/kfrontend/themer/kdmlayout.cpp index b17d2e7b7..83a4ea377 100644 --- a/kdm/kfrontend/themer/kdmlayout.cpp +++ b/kdm/kfrontend/themer/kdmlayout.cpp @@ -74,7 +74,7 @@ KdmLayoutBox::update( const TQRect &parentGeometry, bool force ) // Check if box size was computed. If not compute it // TODO check if this prevents updating changing items // if (!hintedSize.isValid()) -// sizeHint(); +// tqsizeHint(); // kdDebug() << this << " hintedSize " << hintedSize << endl; @@ -114,30 +114,30 @@ KdmLayoutBox::update( const TQRect &parentGeometry, bool force ) if ((*it)->isExplicitlyHidden()) continue; - TQRect temp = childrenRect, itemRect; + TQRect temp = childrenRect, tqitemRect; if (box.isVertical) { temp.setHeight( 0 ); - itemRect = (*it)->placementHint( temp ); - temp.setHeight( itemRect.height() ); - childrenRect.setTop( childrenRect.top() + itemRect.size().height() + box.spacing ); + tqitemRect = (*it)->placementHint( temp ); + temp.setHeight( tqitemRect.height() ); + childrenRect.setTop( childrenRect.top() + tqitemRect.size().height() + box.spacing ); } else { temp.setWidth( 0 ); - itemRect = (*it)->placementHint( temp ); - kdDebug() << this << " placementHint " << *it << " " << temp << " " << itemRect << endl; - temp.setWidth( itemRect.width() ); - childrenRect.setLeft( childrenRect.left() + itemRect.size().width() + box.spacing ); + tqitemRect = (*it)->placementHint( temp ); + kdDebug() << this << " placementHint " << *it << " " << temp << " " << tqitemRect << endl; + temp.setWidth( tqitemRect.width() ); + childrenRect.setLeft( childrenRect.left() + tqitemRect.size().width() + box.spacing ); kdDebug() << timestamp() << " childrenRect after " << *it << " " << childrenRect << endl; } - itemRect = (*it)->placementHint( temp ); - kdDebug() << this << " placementHint2 " << *it << " " << temp << " " << itemRect << endl; - (*it)->setGeometry( itemRect, force ); + tqitemRect = (*it)->placementHint( temp ); + kdDebug() << this << " placementHint2 " << *it << " " << temp << " " << tqitemRect << endl; + (*it)->setGeometry( tqitemRect, force ); } } } //FIXME truly experimental (is so close to greeter_geometry.c) -QSize -KdmLayoutBox::sizeHint() +TQSize +KdmLayoutBox::tqsizeHint() { // Sum up area taken by children int w = 0, h = 0; diff --git a/kdm/kfrontend/themer/kdmlayout.h b/kdm/kfrontend/themer/kdmlayout.h index 4c73e9a1b..69b515d67 100644 --- a/kdm/kfrontend/themer/kdmlayout.h +++ b/kdm/kfrontend/themer/kdmlayout.h @@ -80,7 +80,7 @@ public: // Computes the size hint of the box, telling which is the // smallest size inside which boxed items will fit - TQSize sizeHint(); + TQSize tqsizeHint(); private: struct { diff --git a/kdm/kfrontend/themer/kdmpixmap.cpp b/kdm/kfrontend/themer/kdmpixmap.cpp index 0fcbc065c..2322312e8 100644 --- a/kdm/kfrontend/themer/kdmpixmap.cpp +++ b/kdm/kfrontend/themer/kdmpixmap.cpp @@ -96,8 +96,8 @@ KdmPixmap::KdmPixmap( KdmItem *parent, const TQDomNode &node, const char *name ) loadPixmap( &pixmap.normal ); } -QSize -KdmPixmap::sizeHint() +TQSize +KdmPixmap::tqsizeHint() { // choose the correct pixmap class PixmapStruct::PixmapClass * pClass = &pixmap.normal; @@ -108,7 +108,7 @@ KdmPixmap::sizeHint() // use the pixmap size as the size hint if (!pClass->pixmap.isNull()) return pClass->pixmap.size(); - return KdmItem::sizeHint(); + return KdmItem::tqsizeHint(); } void @@ -163,11 +163,11 @@ KdmPixmap::loadPixmap( PixmapStruct::PixmapClass *pClass ) TQString fullpath = pClass->fullpath; kdDebug() << timestamp() << " load " << fullpath << endl; - int index = fullpath.findRev('.'); + int index = fullpath.tqfindRev('.'); TQString ext = fullpath.right(fullpath.length() - index); fullpath = fullpath.left(index); kdDebug() << timestamp() << " ext " << ext << " " << fullpath << endl; - TQString testpath = TQString("-%1x%2").arg(area.width()).arg(area.height()) + ext; + TQString testpath = TQString("-%1x%2").tqarg(area.width()).arg(area.height()) + ext; kdDebug() << timestamp() << " testing for " << fullpath + testpath << endl; if (KStandardDirs::exists(fullpath + testpath)) pClass->pixmap.load(fullpath + testpath); @@ -268,11 +268,11 @@ KdmPixmap::drawContents( TQPainter *p, const TQRect &r ) QRgb *ls = (QRgb *)scaledImage.scanLine( y ); for (int x = 0; x < w; ++x) { QRgb l = ls[x]; - int r = int( qRed( l ) * tint_red ); - int g = int( qGreen( l ) * tint_green ); - int b = int( qBlue( l ) * tint_blue ); - int a = int( qAlpha( l ) * tint_alpha ); - ls[x] = qRgba( r, g, b, a ); + int r = int( tqRed( l ) * tint_red ); + int g = int( tqGreen( l ) * tint_green ); + int b = int( tqBlue( l ) * tint_blue ); + int a = int( tqAlpha( l ) * tint_alpha ); + ls[x] = tqRgba( r, g, b, a ); } } diff --git a/kdm/kfrontend/themer/kdmpixmap.h b/kdm/kfrontend/themer/kdmpixmap.h index a12c9fea4..d49394bc9 100644 --- a/kdm/kfrontend/themer/kdmpixmap.h +++ b/kdm/kfrontend/themer/kdmpixmap.h @@ -42,7 +42,7 @@ public: protected: // reimplemented; returns the size of loaded pixmap - virtual TQSize sizeHint(); + virtual TQSize tqsizeHint(); // draw the pixmap virtual void drawContents( TQPainter *p, const TQRect &r ); diff --git a/kdm/kfrontend/themer/kdmthemer.cpp b/kdm/kfrontend/themer/kdmthemer.cpp index 9e6db33db..f95343787 100644 --- a/kdm/kfrontend/themer/kdmthemer.cpp +++ b/kdm/kfrontend/themer/kdmthemer.cpp @@ -131,19 +131,19 @@ KdmThemer::widgetEvent( TQEvent *e ) switch (e->type()) { case TQEvent::MouseMove: { - TQMouseEvent *me = static_cast<TQMouseEvent *>(e); + TQMouseEvent *me = TQT_TQMOUSEEVENT(e); rootItem->mouseEvent( me->x(), me->y() ); } break; case TQEvent::MouseButtonPress: { - TQMouseEvent *me = static_cast<TQMouseEvent *>(e); + TQMouseEvent *me = TQT_TQMOUSEEVENT(e); rootItem->mouseEvent( me->x(), me->y(), true ); } break; case TQEvent::MouseButtonRelease: { - TQMouseEvent *me = static_cast<TQMouseEvent *>(e); + TQMouseEvent *me = TQT_TQMOUSEEVENT(e); rootItem->mouseEvent( me->x(), me->y(), false, true ); } break; @@ -156,7 +156,7 @@ KdmThemer::widgetEvent( TQEvent *e ) break; case TQEvent::Paint: { - TQRect paintRect = static_cast<TQPaintEvent *>(e)->rect(); + TQRect paintRect = TQT_TQPAINTEVENT(e)->rect(); kdDebug() << timestamp() << " paint on: " << paintRect << endl; if (!backBuffer) @@ -223,7 +223,7 @@ KdmThemer::generateItems( KdmItem *parent, const TQDomNode &node ) TQString id = el.attribute("id"); if (id.startsWith("plugin-specific-")) { id = id.mid(strlen("plugin-specific-")); - if (!_pluginsLogin.contains(id)) + if (!_pluginsLogin.tqcontains(id)) continue; } @@ -281,7 +281,7 @@ bool KdmThemer::willDisplay( const TQDomNode &node ) TQStringList modeList = TQStringList::split( ",", modes ); // If current mode isn't in this list, do not display item - if (modeList.find( m_currentMode ) == modeList.end()) + if (modeList.tqfind( m_currentMode ) == modeList.end()) return false; } @@ -314,13 +314,13 @@ void KdmThemer::showStructure( TQObject *obj ) { - const TQObjectList *wlist = obj->children(); + const TQObjectList wlist = obj->childrenListObject(); static int counter = 0; if (counter == 0) kdDebug() << timestamp() << " \n\n<======= Widget tree =================" << endl; - if (wlist) { + if (!wlist.isEmpty()) { counter++; - TQObjectListIterator it( *wlist ); + TQObjectListIterator it( wlist ); TQObject *object; while ((object = it.current()) != 0) { @@ -358,7 +358,7 @@ KdmThemer::slotActivated( const TQString &id ) return; item->widget()->setFocus(); - TQLineEdit *le = (TQLineEdit*)item->widget()->qt_cast("TQLineEdit"); + TQLineEdit *le = (TQLineEdit*)item->widget()->tqqt_cast("TQLineEdit"); if (le) le->selectAll(); } @@ -377,8 +377,8 @@ KdmThemer::slotPaintRoot() back_item->paint( &painter, back_item->rect()); painter.end(); - TQApplication::desktop()->screen()->setErasePixmap(pm); - TQApplication::desktop()->screen()->erase(); + TQT_TQWIDGET(TQApplication::desktop()->screen())->setErasePixmap(pm); + TQT_TQWIDGET(TQApplication::desktop()->screen())->erase(); } #include "kdmthemer.moc" diff --git a/kdm/kfrontend/themer/kdmthemer.h b/kdm/kfrontend/themer/kdmthemer.h index 6dc2318dd..0c4cd3753 100644 --- a/kdm/kfrontend/themer/kdmthemer.h +++ b/kdm/kfrontend/themer/kdmthemer.h @@ -60,9 +60,9 @@ public: bool isOK() { return rootItem != 0; } /* - * Gives a sizeHint to the widget (parent size) + * Gives a tqsizeHint to the widget (parent size) */ - //TQSize sizeHint() const{ return parentWidget()->size(); } + //TQSize tqsizeHint() const{ return tqparentWidget()->size(); } /* * Takes a shot of the current widget |