diff options
Diffstat (limited to 'src/popupMessage.cpp')
-rw-r--r-- | src/popupMessage.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/src/popupMessage.cpp b/src/popupMessage.cpp index d14c171..adff918 100644 --- a/src/popupMessage.cpp +++ b/src/popupMessage.cpp @@ -47,18 +47,18 @@ #include <kpushbutton.h> #include <kstdguiitem.h> -#include <qfont.h> -#include <qframe.h> -#include <qlabel.h> -#include <qmessagebox.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qcheckbox.h> +#include <ntqfont.h> +#include <ntqframe.h> +#include <ntqlabel.h> +#include <ntqmessagebox.h> +#include <ntqpainter.h> +#include <ntqtimer.h> +#include <ntqcheckbox.h> namespace KDE { -PopupMessage::PopupMessage( QWidget *parent, QWidget *anchor, int timeout, const char *name ) +PopupMessage::PopupMessage( TQWidget *parent, TQWidget *anchor, int timeout, const char *name ) : OverlayWidget( parent, anchor, name ) , m_anchor( anchor ) , m_parent( parent ) @@ -74,41 +74,41 @@ PopupMessage::PopupMessage( QWidget *parent, QWidget *anchor, int timeout, const , m_name( name ) { - setFrameStyle( QFrame::Panel | QFrame::Raised ); - setFrameShape( QFrame::StyledPanel ); - setWFlags( Qt::WX11BypassWM ); + setFrameStyle( TQFrame::Panel | TQFrame::Raised ); + setFrameShape( TQFrame::StyledPanel ); + setWFlags( TQt::WX11BypassWM ); - QHBoxLayout *hbox; - QLabel *label; + TQHBoxLayout *hbox; + TQLabel *label; KActiveLabel *alabel; - m_layout = new QVBoxLayout( this, 9 /*margin*/, 6 /*spacing*/ ); + m_layout = new TQVBoxLayout( this, 9 /*margin*/, 6 /*spacing*/ ); - hbox = new QHBoxLayout( m_layout, 12 ); + hbox = new TQHBoxLayout( m_layout, 12 ); - hbox->addWidget( m_countdownFrame = new QFrame( this, "counterVisual" ) ); + hbox->addWidget( m_countdownFrame = new TQFrame( this, "counterVisual" ) ); m_countdownFrame->setFixedWidth( fontMetrics().width( "X" ) ); - m_countdownFrame->setFrameStyle( QFrame::Plain | QFrame::Box ); + m_countdownFrame->setFrameStyle( TQFrame::Plain | TQFrame::Box ); m_countdownFrame->setPaletteForegroundColor( paletteBackgroundColor().dark() ); - label = new QLabel( this, "image" ); + label = new TQLabel( this, "image" ); hbox->add( label ); alabel = new KActiveLabel( this, "label" ); - alabel->setTextFormat( Qt::RichText ); - alabel->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred ); + alabel->setTextFormat( TQt::RichText ); + alabel->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); hbox->add( alabel ); - hbox = new QHBoxLayout( m_layout ); + hbox = new TQHBoxLayout( m_layout ); if (configurableType()){ - hbox->add( new QCheckBox( this, "showWarnings" ) ); - static_cast<QCheckBox*>(child( "showWarnings" ))->setText(QString("%1 in Future.").arg(m_name)); - static_cast<QCheckBox*>(child( "showWarnings" ))->setChecked(TRUE); + hbox->add( new TQCheckBox( this, "showWarnings" ) ); + static_cast<TQCheckBox*>(child( "showWarnings" ))->setText(TQString("%1 in Future.").arg(m_name)); + static_cast<TQCheckBox*>(child( "showWarnings" ))->setChecked(TRUE); connect( child( "showWarnings" ), SIGNAL(toggled( bool )), SLOT(toggled( bool )) ); } - hbox->addItem( new QSpacerItem( 4, 4, QSizePolicy::Expanding, QSizePolicy::Preferred ) ); + hbox->addItem( new TQSpacerItem( 4, 4, TQSizePolicy::Expanding, TQSizePolicy::Preferred ) ); hbox->add( new KPushButton( KStdGuiItem::yes(), this, "yesButton" ) ); hbox->add( new KPushButton( KStdGuiItem::no(), this, "closeButton" ) ); hbox->add( new KPushButton( KStdGuiItem::ok(), this, "okButton" ) ); @@ -119,7 +119,7 @@ PopupMessage::PopupMessage( QWidget *parent, QWidget *anchor, int timeout, const } -void PopupMessage::addWidget( QWidget *widget ) +void PopupMessage::addWidget( TQWidget *widget ) { m_layout->add( widget ); adjustSize(); @@ -145,25 +145,25 @@ void PopupMessage::showOkButton( const bool show ) void PopupMessage::showCounter( const bool show ) { m_showCounter = show; - static_cast<QFrame*>(child( "counterVisual" ))->setShown( show ); + static_cast<TQFrame*>(child( "counterVisual" ))->setShown( show ); adjustSize(); } -void PopupMessage::setText( const QString &text ) +void PopupMessage::setText( const TQString &text ) { static_cast<KActiveLabel*>(child( "label" ))->setText( text ); adjustSize(); } -void PopupMessage::setImage( const QString &location ) +void PopupMessage::setImage( const TQString &location ) { - static_cast<QLabel*>(child( "image" ))->setPixmap( QPixmap( location ) ); + static_cast<TQLabel*>(child( "image" ))->setPixmap( TQPixmap( location ) ); adjustSize(); } -void PopupMessage::setImage( const QPixmap &pix ) +void PopupMessage::setImage( const TQPixmap &pix ) { - static_cast<QLabel*>(child( "image" ))->setPixmap( pix ); + static_cast<TQLabel*>(child( "image" ))->setPixmap( pix ); adjustSize(); } @@ -198,7 +198,7 @@ void PopupMessage::close() //SLOT void PopupMessage::toggled( bool on) //SLOT { - QString mtype = QString("%1").arg(m_name); + TQString mtype = TQString("%1").arg(m_name); if (mtype.contains("Usage")) TorkConfig::setShowUsageWarnings(on); @@ -216,7 +216,7 @@ void PopupMessage::toggled( bool on) //SLOT bool PopupMessage::configurableType() //SLOT { - QString mtype = QString(m_name); + TQString mtype = TQString(m_name); if ((mtype.contains("Usage")) || (mtype.contains("DNS")) || (mtype.contains("Security")) @@ -252,7 +252,7 @@ void PopupMessage::display() //SLOT // Protected //////////////////////////////////////////////////////////////////////// -void PopupMessage::timerEvent( QTimerEvent* ) +void PopupMessage::timerEvent( TQTimerEvent* ) { switch( m_maskEffect ) { @@ -278,10 +278,10 @@ void PopupMessage::countDown() return; } - QFrame *&h = m_countdownFrame; + TQFrame *&h = m_countdownFrame; if( m_counter < h->height() - 3 ) - QPainter( h ).fillRect( 2, 2, h->width() - 4, m_counter, palette().active().highlight() ); + TQPainter( h ).fillRect( 2, 2, h->width() - 4, m_counter, palette().active().highlight() ); if( !hasMouse() ) m_counter++; @@ -304,19 +304,19 @@ void PopupMessage::dissolveMask() if( m_stage == 1 ) { repaint( false ); - QPainter maskPainter(&m_mask); + TQPainter maskPainter(&m_mask); - m_mask.fill(Qt::black); + m_mask.fill(TQt::black); - maskPainter.setBrush(Qt::white); - maskPainter.setPen(Qt::white); + maskPainter.setBrush(TQt::white); + maskPainter.setPen(TQt::white); maskPainter.drawRect( m_mask.rect() ); m_dissolveSize += m_dissolveDelta; if( m_dissolveSize > 0 ) { - maskPainter.setRasterOp( Qt::EraseROP ); + maskPainter.setRasterOp( TQt::EraseROP ); int x, y, s; const int size = 16; |