From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ksmserver/shutdowndlg.cpp | 230 +++++++++++++++++++++++----------------------- 1 file changed, 115 insertions(+), 115 deletions(-) (limited to 'ksmserver/shutdowndlg.cpp') diff --git a/ksmserver/shutdowndlg.cpp b/ksmserver/shutdowndlg.cpp index 25e4aaf30..7b0493559 100644 --- a/ksmserver/shutdowndlg.cpp +++ b/ksmserver/shutdowndlg.cpp @@ -7,26 +7,26 @@ Copyright (C) 2000 Matthias Ettrich #include #include "shutdowndlg.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -63,7 +63,7 @@ Copyright (C) 2000 Matthias Ettrich KSMShutdownFeedback * KSMShutdownFeedback::s_pSelf = 0L; KSMShutdownFeedback::KSMShutdownFeedback() - : QWidget( 0L, "feedbackwidget", WType_Popup ), + : TQWidget( 0L, "feedbackwidget", WType_Popup ), m_currentY( 0 ), m_grayOpacity( 0.0f ), m_compensation( 0.0f ), @@ -74,11 +74,11 @@ KSMShutdownFeedback::KSMShutdownFeedback() m_pmio() { - m_grayImage = QImage::QImage(); - m_unfadedImage = QImage::QImage(); + m_grayImage = TQImage::TQImage(); + m_unfadedImage = TQImage::TQImage(); resize(0, 0); setShown(true); - QTimer::singleShot( 500, this, SLOT( slotPaintEffect() ) ); + TQTimer::singleShot( 500, this, TQT_SLOT( slotPaintEffect() ) ); } // called after stopping shutdown-feedback -> smooth fade-back to color-mode @@ -111,11 +111,11 @@ void KSMShutdownFeedback::slotPaintEffect() // logout-UI would be too much delayed... if ( m_grayImage.isNull() ) { - setBackgroundMode( QWidget::NoBackground ); - setGeometry( QApplication::desktop()->geometry() ); + setBackgroundMode( TQWidget::NoBackground ); + setGeometry( TQApplication::desktop()->geometry() ); m_root.resize( width(), height() ); // for the default logout - m_grayImage = QPixmap::grabWindow(qt_xrootwin(), 0, 0, QApplication::desktop()->width(), QApplication::desktop()->height()).convertToImage(); + m_grayImage = TQPixmap::grabWindow(qt_xrootwin(), 0, 0, TQApplication::desktop()->width(), TQApplication::desktop()->height()).convertToImage(); m_unfadedImage = m_grayImage.copy(); register uchar * r = m_grayImage.bits(); register uchar * g = m_grayImage.bits() + 1; @@ -169,12 +169,12 @@ void KSMShutdownFeedback::slotPaintEffect() { if( y1 > 0 && y1 < imgHeight && y1-m_rowsDone > 0 && m_rowsDone < imgHeight ) { - QImage img( imgWidth, y1-m_rowsDone, 32 ); + TQImage img( imgWidth, y1-m_rowsDone, 32 ); memcpy( img.bits(), m_grayImage.scanLine( m_rowsDone ), imgWidth*(y1-m_rowsDone)*4 ); // conversion is slow as hell if desktop-depth != 24bpp... //Pixmap pm = m_pmio.convertToPixmap( img ); //bitBlt( this, 0, m_rowsDone, &pm ); -// QImage pm = m_pmio.convertToImage( img ); +// TQImage pm = m_pmio.convertToImage( img ); bitBlt( this, 0, m_rowsDone, &img ); m_rowsDone = y1; } @@ -184,10 +184,10 @@ void KSMShutdownFeedback::slotPaintEffect() // when fading back we have to blit area which isnt gray anymore to unfaded image if( y2 > 0 && y2 < imgHeight && m_rowsDone > y2 ) { - QImage img( imgWidth, m_rowsDone-y2, 32 ); + TQImage img( imgWidth, m_rowsDone-y2, 32 ); memcpy( img.bits(), m_unfadedImage.scanLine( y2 ), imgWidth*(m_rowsDone-y2)*4 ); // conversion is slow as hell if desktop-depth != 24bpp... - //QPixmap pm = m_pmio.convertToPixmap( img ); + //TQPixmap pm = m_pmio.convertToPixmap( img ); //bitBlt( this, 0, y2, &pm ); bitBlt( this, 0, y2, &img ); m_rowsDone = y2; @@ -199,7 +199,7 @@ void KSMShutdownFeedback::slotPaintEffect() start_y1 = 0; if( y2 > start_y1 ) { - QImage img( imgWidth, y2-start_y1, 32 ); + TQImage img( imgWidth, y2-start_y1, 32 ); memcpy( img.bits(), m_grayImage.scanLine( start_y1 ), ( y2-start_y1 ) * imgWidth * 4 ); register uchar * rs = m_unfadedImage.scanLine( start_y1 ); register uchar * gs = rs + 1; @@ -222,59 +222,59 @@ void KSMShutdownFeedback::slotPaintEffect() } } // conversion is slow as hell if desktop-depth != 24bpp... - //QPixmap pm = m_pmio.convertToPixmap( img ); + //TQPixmap pm = m_pmio.convertToPixmap( img ); //bitBlt( this, 0, start_y1, &pm ); bitBlt( this, 0, start_y1, &img ); } - QTimer::singleShot( 5, this, SLOT( slotPaintEffect() ) ); + TQTimer::singleShot( 5, this, TQT_SLOT( slotPaintEffect() ) ); } // standard logout fade else { if ( m_currentY >= height() ) { - if ( backgroundMode() == QWidget::NoBackground ) { - setBackgroundMode( QWidget::NoBackground ); + if ( backgroundMode() == TQWidget::NoBackground ) { + setBackgroundMode( TQWidget::NoBackground ); setBackgroundPixmap( m_root ); } return; } KPixmap pixmap; - pixmap = QPixmap::grabWindow( qt_xrootwin(), 0, m_currentY, width(), 10 ); - QImage image = pixmap.convertToImage(); + pixmap = TQPixmap::grabWindow( qt_xrootwin(), 0, m_currentY, width(), 10 ); + TQImage image = pixmap.convertToImage(); KImageEffect::blend( Qt::black, image, 0.4 ); KImageEffect::toGray( image, true ); pixmap.convertFromImage( image ); bitBlt( this, 0, m_currentY, &pixmap ); bitBlt( &m_root, 0, m_currentY, &pixmap ); m_currentY += 10; - QTimer::singleShot( 1, this, SLOT( slotPaintEffect() ) ); + TQTimer::singleShot( 1, this, TQT_SLOT( slotPaintEffect() ) ); } } ////// -KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, +KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent, bool maysd, KApplication::ShutdownType sdtype ) - : QDialog( parent, 0, TRUE, WType_Popup ), targets(0) + : TQDialog( parent, 0, TRUE, WType_Popup ), targets(0) // this is a WType_Popup on purpose. Do not change that! Not // having a popup here has severe side effects. { - QVBoxLayout* vbox = new QVBoxLayout( this ); + TQVBoxLayout* vbox = new TQVBoxLayout( this ); - QFrame* frame = new QFrame( this ); - frame->setFrameStyle( QFrame::StyledPanel | QFrame::Raised ); - frame->setLineWidth( style().pixelMetric( QStyle::PM_DefaultFrameWidth, frame ) ); + TQFrame* frame = new TQFrame( this ); + frame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised ); + frame->setLineWidth( style().pixelMetric( TQStyle::PM_DefaultFrameWidth, frame ) ); // we need to set the minimum size for the logout box, since it // gets too small if there isn't all options available frame->setMinimumWidth(400); vbox->addWidget( frame ); - vbox = new QVBoxLayout( frame, 2 * KDialog::marginHint(), + vbox = new TQVBoxLayout( frame, 2 * KDialog::marginHint(), 2 * KDialog::spacingHint() ); // default factor @@ -288,8 +288,8 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, factor = 8; } else { - QLabel* label = new QLabel( i18n("End Session for \"%1\"").arg(KUser().loginName()), frame ); - QFont fnt = label->font(); + TQLabel* label = new TQLabel( i18n("End Session for \"%1\"").arg(KUser().loginName()), frame ); + TQFont fnt = label->font(); fnt.setBold( true ); fnt.setPointSize( fnt.pointSize() * 3 / 2 ); label->setFont( fnt ); @@ -298,41 +298,41 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, // for the basic layout, within this box either the ubuntu dialog or // standard konqy+buttons will be placed. - QHBoxLayout* hbox = new QHBoxLayout( vbox, factor * KDialog::spacingHint() ); + TQHBoxLayout* hbox = new TQHBoxLayout( vbox, factor * KDialog::spacingHint() ); // from here on we have to adapt to the two different dialogs - QFrame* lfrm; - QVBoxLayout* buttonlay; - QHBoxLayout* hbuttonbox; - QFont btnFont; + TQFrame* lfrm; + TQVBoxLayout* buttonlay; + TQHBoxLayout* hbuttonbox; + TQFont btnFont; if(doUbuntuLogout) { // first line of buttons - hbuttonbox = new QHBoxLayout( hbox, factor * KDialog::spacingHint() ); + hbuttonbox = new TQHBoxLayout( hbox, factor * KDialog::spacingHint() ); hbuttonbox->setAlignment( Qt::AlignHCenter ); // End session FlatButton* btnLogout = new FlatButton( frame ); - btnLogout->setTextLabel( QString("&") + i18n("Log out"), false ); + btnLogout->setTextLabel( TQString("&") + i18n("Log out"), false ); btnLogout->setPixmap( DesktopIcon( "back") ); - int i = btnLogout->textLabel().find( QRegExp("\\&"), 0 ); // i == 1 + int i = btnLogout->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnLogout->setAccel( "ALT+" + btnLogout->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnLogout ); - connect(btnLogout, SIGNAL(clicked()), SLOT(slotLogout())); + connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout())); } else { // konqy - lfrm = new QFrame( frame ); - lfrm->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + lfrm = new TQFrame( frame ); + lfrm->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); hbox->addWidget( lfrm, AlignCenter ); - buttonlay = new QVBoxLayout( hbox, factor * KDialog::spacingHint() ); + buttonlay = new TQVBoxLayout( hbox, factor * KDialog::spacingHint() ); buttonlay->setAlignment( Qt::AlignHCenter ); - QLabel* icon = new QLabel( lfrm ); + TQLabel* icon = new TQLabel( lfrm ); icon->setPixmap( UserIcon( "shutdownkonq" ) ); lfrm->setFixedSize( icon->sizeHint()); icon->setFixedSize( icon->sizeHint()); @@ -342,7 +342,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, KPushButton* btnLogout = new KPushButton( KGuiItem( i18n("&End Current Session"), "undo"), frame ); btnFont = btnLogout->font(); buttonlay->addWidget( btnLogout ); - connect(btnLogout, SIGNAL(clicked()), SLOT(slotLogout())); + connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout())); } @@ -425,10 +425,10 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, FlatButton* btnSuspend = new FlatButton( frame ); btnSuspend->setTextLabel( i18n("&Suspend"), false ); btnSuspend->setPixmap( DesktopIcon( "suspend") ); - int i = btnSuspend->textLabel().find( QRegExp("\\&"), 0 ); // i == 1 + int i = btnSuspend->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnSuspend->setAccel( "ALT+" + btnSuspend->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnSuspend); - connect(btnSuspend, SIGNAL(clicked()), SLOT(slotSuspend())); + connect(btnSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotSuspend())); } if (canHibernate && !disableHibernate) @@ -437,27 +437,27 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, FlatButton* btnHibernate = new FlatButton( frame ); btnHibernate->setTextLabel( i18n("&Hibernate"), false ); btnHibernate->setPixmap( DesktopIcon( "hibernate") ); - int i = btnHibernate->textLabel().find( QRegExp("\\&"), 0 ); // i == 1 + int i = btnHibernate->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnHibernate->setAccel( "ALT+" + btnHibernate->textLabel().lower()[i+1] ) ; hbuttonbox->addWidget ( btnHibernate); - connect(btnHibernate, SIGNAL(clicked()), SLOT(slotHibernate())); + connect(btnHibernate, TQT_SIGNAL(clicked()), TQT_SLOT(slotHibernate())); } // Separator (within buttonlay) vbox->addWidget( new KSeparator( frame ) ); // bottom buttons - QHBoxLayout* hbuttonbox2 = new QHBoxLayout( vbox, factor * KDialog::spacingHint() ); + TQHBoxLayout* hbuttonbox2 = new TQHBoxLayout( vbox, factor * KDialog::spacingHint() ); hbuttonbox2->setAlignment( Qt::AlignHCenter ); // Reboot FlatButton* btnReboot = new FlatButton( frame ); btnReboot->setTextLabel( i18n("&Restart"), false ); btnReboot->setPixmap( DesktopIcon( "reload") ); - int i = btnReboot->textLabel().find( QRegExp("\\&"), 0 ); // i == 1 + int i = btnReboot->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnReboot->setAccel( "ALT+" + btnReboot->textLabel().lower()[i+1] ) ; hbuttonbox2->addWidget ( btnReboot); - connect(btnReboot, SIGNAL(clicked()), SLOT(slotReboot())); + connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot())); if ( sdtype == KApplication::ShutdownTypeReboot ) btnReboot->setFocus(); @@ -465,14 +465,14 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, int def, cur; if ( DM().bootOptions( rebootOptions, def, cur ) ) { btnReboot->setPopupDelay(300); // visually add dropdown - targets = new QPopupMenu( frame ); + targets = new TQPopupMenu( frame ); if ( cur == -1 ) cur = def; int index = 0; - for (QStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index) + for (TQStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index) { - QString label = (*it); + TQString label = (*it); label=label.replace('&',"&&"); if (index == cur) targets->insertItem( label + i18n("current option in boot loader", " (current)"), index); @@ -481,7 +481,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, } btnReboot->setPopup(targets); - connect( targets, SIGNAL(activated(int)), SLOT(slotReboot(int)) ); + connect( targets, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReboot(int)) ); } // BAD CARMA .. this code is copied line by line from standard konqy dialog [EOF] @@ -489,21 +489,21 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, FlatButton* btnHalt = new FlatButton( frame ); btnHalt->setTextLabel( i18n("&Turn Off"), false ); btnHalt->setPixmap( DesktopIcon( "exit") ); - i = btnHalt->textLabel().find( QRegExp("\\&"), 0 ); // i == 1 + i = btnHalt->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 btnHalt->setAccel( "ALT+" + btnHalt->textLabel().lower()[i+1] ) ; hbuttonbox2->addWidget ( btnHalt ); - connect(btnHalt, SIGNAL(clicked()), SLOT(slotHalt())); + connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt())); if ( sdtype == KApplication::ShutdownTypeHalt ) btnHalt->setFocus(); // cancel buttonbox - QHBoxLayout* hbuttonbox3 = new QHBoxLayout( vbox, factor * KDialog::spacingHint() ); + TQHBoxLayout* hbuttonbox3 = new TQHBoxLayout( vbox, factor * KDialog::spacingHint() ); hbuttonbox3->setAlignment( Qt::AlignRight ); // Back to Desktop KSMPushButton* btnBack = new KSMPushButton( KStdGuiItem::cancel(), frame ); hbuttonbox3->addWidget( btnBack ); - connect(btnBack, SIGNAL(clicked()), SLOT(reject())); + connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); } else @@ -512,7 +512,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, KPushButton* btnHalt = new KPushButton( KGuiItem( i18n("&Turn Off Computer"), "exit"), frame ); btnHalt->setFont( btnFont ); buttonlay->addWidget( btnHalt ); - connect(btnHalt, SIGNAL(clicked()), SLOT(slotHalt())); + connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt())); if ( sdtype == KApplication::ShutdownTypeHalt ) btnHalt->setFocus(); @@ -521,21 +521,21 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, btnReboot->setFont( btnFont ); buttonlay->addWidget( btnReboot ); - connect(btnReboot, SIGNAL(clicked()), SLOT(slotReboot())); + connect(btnReboot, TQT_SIGNAL(clicked()), TQT_SLOT(slotReboot())); if ( sdtype == KApplication::ShutdownTypeReboot ) btnReboot->setFocus(); // this section is copied as-is into ubuntulogout as well int def, cur; if ( DM().bootOptions( rebootOptions, def, cur ) ) { - targets = new QPopupMenu( frame ); + targets = new TQPopupMenu( frame ); if ( cur == -1 ) cur = def; int index = 0; - for (QStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index) + for (TQStringList::ConstIterator it = rebootOptions.begin(); it != rebootOptions.end(); ++it, ++index) { - QString label = (*it); + TQString label = (*it); label=label.replace('&',"&&"); if (index == cur) targets->insertItem( label + i18n("current option in boot loader", " (current)"), index); @@ -544,7 +544,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, } btnReboot->setPopup(targets); - connect( targets, SIGNAL(activated(int)), SLOT(slotReboot(int)) ); + connect( targets, TQT_SIGNAL(activated(int)), TQT_SLOT(slotReboot(int)) ); } @@ -553,7 +553,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, KPushButton* btnSuspend = new KPushButton( KGuiItem( i18n("&Suspend Computer"), "suspend"), frame ); btnSuspend->setFont( btnFont ); buttonlay->addWidget( btnSuspend ); - connect(btnSuspend, SIGNAL(clicked()), SLOT(slotSuspend())); + connect(btnSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotSuspend())); } if (canHibernate && !disableHibernate) @@ -561,7 +561,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, KPushButton* btnHibernate = new KPushButton( KGuiItem( i18n("&Hibernate Computer"), "hibernate"), frame ); btnHibernate->setFont( btnFont ); buttonlay->addWidget( btnHibernate ); - connect(btnHibernate, SIGNAL(clicked()), SLOT(slotHibernate())); + connect(btnHibernate, TQT_SIGNAL(clicked()), TQT_SLOT(slotHibernate())); } buttonlay->addStretch( 1 ); @@ -572,7 +572,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, // Back to Desktop KPushButton* btnBack = new KPushButton( KStdGuiItem::cancel(), frame ); buttonlay->addWidget( btnBack ); - connect(btnBack, SIGNAL(clicked()), SLOT(reject())); + connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); } @@ -582,14 +582,14 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, if(doUbuntuLogout) { // cancel buttonbox - QHBoxLayout* hbuttonbox3 = new QHBoxLayout( vbox, factor * KDialog::spacingHint() ); + TQHBoxLayout* hbuttonbox3 = new TQHBoxLayout( vbox, factor * KDialog::spacingHint() ); hbuttonbox3->setAlignment( Qt::AlignRight ); // Back to Desktop KSMPushButton* btnBack = new KSMPushButton( KStdGuiItem::cancel(), frame ); hbuttonbox3->addWidget( btnBack ); - connect(btnBack, SIGNAL(clicked()), SLOT(reject())); + connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); } else { @@ -600,7 +600,7 @@ KSMShutdownDlg::KSMShutdownDlg( QWidget* parent, KPushButton* btnBack = new KPushButton( KStdGuiItem::cancel(), frame ); buttonlay->addWidget( btnBack ); - connect(btnBack, SIGNAL(clicked()), SLOT(reject())); + connect(btnBack, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); } @@ -632,7 +632,7 @@ void KSMShutdownDlg::slotLogout() void KSMShutdownDlg::slotReboot() { // no boot option selected -> current - m_bootOption = QString::null; + m_bootOption = TQString::null; m_shutdownType = KApplication::ShutdownTypeReboot; accept(); } @@ -648,7 +648,7 @@ void KSMShutdownDlg::slotReboot(int opt) void KSMShutdownDlg::slotHalt() { - m_bootOption = QString::null; + m_bootOption = TQString::null; m_shutdownType = KApplication::ShutdownTypeHalt; accept(); } @@ -700,7 +700,7 @@ void KSMShutdownDlg::slotHibernate() reject(); // continue on resume } -bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, QString& bootOption ) +bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sdtype, TQString& bootOption ) { kapp->enableStyles(); KSMShutdownDlg* l = new KSMShutdownDlg( 0, @@ -708,8 +708,8 @@ bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sd maysd, sdtype ); // Show dialog (will save the background in showEvent) - QSize sh = l->sizeHint(); - QRect rect = KGlobalSettings::desktopGeometry(QCursor::pos()); + TQSize sh = l->sizeHint(); + TQRect rect = KGlobalSettings::desktopGeometry(TQCursor::pos()); l->move(rect.x() + (rect.width() - sh.width())/2, rect.y() + (rect.height() - sh.height())/2); @@ -724,17 +724,17 @@ bool KSMShutdownDlg::confirmShutdown( bool maysd, KApplication::ShutdownType& sd } KSMDelayedPushButton::KSMDelayedPushButton( const KGuiItem &item, - QWidget *parent, + TQWidget *parent, const char *name) : KPushButton( item, parent, name), pop(0), popt(0) { - connect(this, SIGNAL(pressed()), SLOT(slotPressed())); - connect(this, SIGNAL(released()), SLOT(slotReleased())); - popt = new QTimer(this); - connect(popt, SIGNAL(timeout()), SLOT(slotTimeout())); + connect(this, TQT_SIGNAL(pressed()), TQT_SLOT(slotPressed())); + connect(this, TQT_SIGNAL(released()), TQT_SLOT(slotReleased())); + popt = new TQTimer(this); + connect(popt, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout())); } -void KSMDelayedPushButton::setPopup(QPopupMenu *p) +void KSMDelayedPushButton::setPopup(TQPopupMenu *p) { pop = p; setIsMenuButton(p != 0); @@ -743,7 +743,7 @@ void KSMDelayedPushButton::setPopup(QPopupMenu *p) void KSMDelayedPushButton::slotPressed() { if (pop) - popt->start(QApplication::startDragTime()); + popt->start(TQApplication::startDragTime()); } void KSMDelayedPushButton::slotReleased() @@ -753,16 +753,16 @@ void KSMDelayedPushButton::slotReleased() void KSMDelayedPushButton::slotTimeout() { - QPoint bl = mapToGlobal(rect().bottomLeft()); - QWidget *par = (QWidget*)parent(); - QPoint br = par->mapToGlobal(par->rect().bottomRight()); + TQPoint bl = mapToGlobal(rect().bottomLeft()); + TQWidget *par = (TQWidget*)parent(); + TQPoint br = par->mapToGlobal(par->rect().bottomRight()); pop->popup( bl ); popt->stop(); setDown(false); } KSMPushButton::KSMPushButton( const KGuiItem &item, - QWidget *parent, + TQWidget *parent, const char *name) : KPushButton( item, parent, name), m_pressed(false) @@ -772,7 +772,7 @@ KSMPushButton::KSMPushButton( const KGuiItem &item, } -void KSMPushButton::keyPressEvent( QKeyEvent* e ) +void KSMPushButton::keyPressEvent( TQKeyEvent* e ) { switch ( e->key() ) { @@ -790,11 +790,11 @@ switch ( e->key() ) e->ignore(); } - QPushButton::keyPressEvent(e); + TQPushButton::keyPressEvent(e); } -void KSMPushButton::keyReleaseEvent( QKeyEvent* e ) +void KSMPushButton::keyReleaseEvent( TQKeyEvent* e ) { switch ( e->key() ) { @@ -821,8 +821,8 @@ void KSMPushButton::keyReleaseEvent( QKeyEvent* e ) -FlatButton::FlatButton( QWidget *parent, const char *name ) - : QToolButton( parent, name/*, WNoAutoErase*/ ), +FlatButton::FlatButton( TQWidget *parent, const char *name ) + : TQToolButton( parent, name/*, WNoAutoErase*/ ), m_pressed(false) { init(); @@ -837,12 +837,12 @@ void FlatButton::init() setUsesTextLabel(true); setUsesBigPixmap(true); setAutoRaise(true); - setTextPosition( QToolButton::Under ); - setFocusPolicy(QWidget::StrongFocus); + setTextPosition( TQToolButton::Under ); + setFocusPolicy(TQWidget::StrongFocus); } -void FlatButton::keyPressEvent( QKeyEvent* e ) +void FlatButton::keyPressEvent( TQKeyEvent* e ) { switch ( e->key() ) { @@ -860,11 +860,11 @@ void FlatButton::keyPressEvent( QKeyEvent* e ) e->ignore(); } - QToolButton::keyPressEvent(e); + TQToolButton::keyPressEvent(e); } -void FlatButton::keyReleaseEvent( QKeyEvent* e ) +void FlatButton::keyReleaseEvent( TQKeyEvent* e ) { switch ( e->key() ) { -- cgit v1.2.3