diff options
Diffstat (limited to 'lib/kofficeui/KoContextCelp.cpp')
-rw-r--r-- | lib/kofficeui/KoContextCelp.cpp | 266 |
1 files changed, 133 insertions, 133 deletions
diff --git a/lib/kofficeui/KoContextCelp.cpp b/lib/kofficeui/KoContextCelp.cpp index ae28b61e..830dded4 100644 --- a/lib/kofficeui/KoContextCelp.cpp +++ b/lib/kofficeui/KoContextCelp.cpp @@ -19,12 +19,12 @@ #include "KoContextCelp.h" -#include <qpainter.h> -#include <qregion.h> -#include <qfont.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qsimplerichtext.h> +#include <tqpainter.h> +#include <tqregion.h> +#include <tqfont.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqsimplerichtext.h> #include <kpixmap.h> #include <klocale.h> @@ -32,12 +32,12 @@ #include <kiconloader.h> #include <kcursor.h> #include <kapplication.h> -#include <qstring.h> +#include <tqstring.h> -KoVerticalLabel::KoVerticalLabel( QWidget* parent, const char* name ) - : QWidget( parent, name, Qt::WRepaintNoErase ) +KoVerticalLabel::KoVerticalLabel( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name, TQt::WRepaintNoErase ) { - QFont f( font() ); + TQFont f( font() ); f.setPointSize( f.pointSize() + 2 ); f.setBold( true ); setFont( f ); @@ -48,24 +48,24 @@ KoVerticalLabel::~KoVerticalLabel() { } // KoVerticalLabel::~KoVerticalLabel -void KoVerticalLabel::setText( const QString& text ) +void KoVerticalLabel::setText( const TQString& text ) { m_text = text; - QFontMetrics fm( font() ); + TQFontMetrics fm( font() ); setMinimumSize( fm.height() + 2, fm.width( m_text ) + 4 ); update(); } // KoVerticalLabel::setText -void KoVerticalLabel::paintEvent( QPaintEvent* ) +void KoVerticalLabel::paintEvent( TQPaintEvent* ) { KPixmap pm; pm.resize( height(), width() ); - QPainter p( &pm ); - p.fillRect( 0, 0, height(), width(), colorGroup().background() ); + TQPainter p( &pm ); + p.fillRect( 0, 0, height(), width(), tqcolorGroup().background() ); p.setFont( font() ); p.drawText( 0, 0, height(), width(), AlignCenter, m_text ); p.end(); - QPainter ap( this ); + TQPainter ap( this ); ap.rotate( 270. ); ap.translate( -height(), 0 ); ap.drawPixmap( 0, 0, pm ); @@ -74,30 +74,30 @@ void KoVerticalLabel::paintEvent( QPaintEvent* ) static unsigned char upbits[] = { 0xc, 0x1e, 0x3f, 0x3f }; static unsigned char downbits[] = { 0x3f, 0x3f, 0x1e, 0xc }; -KoHelpNavButton::KoHelpNavButton( NavDirection d, QWidget* parent ) - : QWidget( parent ) +KoHelpNavButton::KoHelpNavButton( NavDirection d, TQWidget* tqparent ) + : TQWidget( tqparent ) { m_pressed = false; - m_bitmap = QBitmap( 8, 4, ( d == Up ? upbits : downbits ), true ); + m_bitmap = TQBitmap( 8, 4, ( d == Up ? upbits : downbits ), true ); m_bitmap.setMask( m_bitmap ); setFixedSize( 8, 6 ); setBackgroundMode( PaletteLight ); } // KoHelpNavButton::KoHelpNavButton -void KoHelpNavButton::paintEvent( QPaintEvent* ) +void KoHelpNavButton::paintEvent( TQPaintEvent* ) { - QPainter p( this ); + TQPainter p( this ); if ( isEnabled() ) { if ( m_pressed ) - p.setPen( colorGroup().highlight() ); + p.setPen( tqcolorGroup().highlight() ); else - p.setPen( colorGroup().text() ); + p.setPen( tqcolorGroup().text() ); p.drawPixmap( 1, 1, m_bitmap ); } } // KoHelpNavButton::paintEvent -void KoHelpNavButton::enterEvent( QEvent* ) +void KoHelpNavButton::enterEvent( TQEvent* ) { if ( isEnabled() ) emit pressed(); @@ -105,7 +105,7 @@ void KoHelpNavButton::enterEvent( QEvent* ) update(); } // KoHelpNavButton::enterEvent -void KoHelpNavButton::leaveEvent( QEvent* ) +void KoHelpNavButton::leaveEvent( TQEvent* ) { if ( isEnabled() ) emit released(); @@ -117,39 +117,39 @@ static unsigned char notstickybits[] = { 0x8, 0x1e, 0xc, 0xa, 0x1 }; static unsigned char stickybits[] = { 0xe, 0x11, 0x15, 0x11, 0xe }; static unsigned char closebits[] = { 0x11, 0xa, 0x4, 0xa, 0x11 }; -KoTinyButton::KoTinyButton( Action a, QWidget* parent ) - : QWidget( parent ), m_action( a ) +KoTinyButton::KoTinyButton( Action a, TQWidget* tqparent ) + : TQWidget( tqparent ), m_action( a ) { m_pressed = false; m_toggled = false; switch ( a ) { case Sticky: - m_bitmap = QBitmap( 5, 5, notstickybits, true ); + m_bitmap = TQBitmap( 5, 5, notstickybits, true ); break; default: - m_bitmap = QBitmap( 5, 5, closebits, true ); + m_bitmap = TQBitmap( 5, 5, closebits, true ); } m_bitmap.setMask( m_bitmap ); setMinimumSize( 7, 7 ); setBackgroundMode( PaletteBackground ); } // KoTinyButton::KoTinyButton -void KoTinyButton::paintEvent( QPaintEvent* ) +void KoTinyButton::paintEvent( TQPaintEvent* ) { - QPainter p( this ); + TQPainter p( this ); if ( isEnabled() ) { if ( m_pressed ) - p.setPen( colorGroup().highlight() ); + p.setPen( tqcolorGroup().highlight() ); else - p.setPen( colorGroup().text() ); + p.setPen( tqcolorGroup().text() ); p.drawPixmap( width() / 2 - 2, 1, m_bitmap ); } } // KoTinyButton::paintEvent -void KoTinyButton::mousePressEvent( QMouseEvent* ) +void KoTinyButton::mousePressEvent( TQMouseEvent* ) { if ( isEnabled() ) { @@ -158,7 +158,7 @@ void KoTinyButton::mousePressEvent( QMouseEvent* ) } } // KoTinyButton::mousePressEvent -void KoTinyButton::mouseReleaseEvent( QMouseEvent* ) +void KoTinyButton::mouseReleaseEvent( TQMouseEvent* ) { if ( isEnabled() && m_pressed ) { @@ -171,7 +171,7 @@ void KoTinyButton::mouseReleaseEvent( QMouseEvent* ) //switch ( m_action ) //{ // case Sticky: - m_bitmap = QBitmap( 5, 5, ( m_toggled ? stickybits : notstickybits ), true ); + m_bitmap = TQBitmap( 5, 5, ( m_toggled ? stickybits : notstickybits ), true ); //} m_bitmap.setMask( m_bitmap ); } @@ -179,12 +179,12 @@ void KoTinyButton::mouseReleaseEvent( QMouseEvent* ) } } // KoTinyButton::mouseReleaseEvent -KoHelpView::KoHelpView( QWidget* parent ) - : QWidget( parent ) +KoHelpView::KoHelpView( TQWidget* tqparent ) + : TQWidget( tqparent ) { currentText = 0L; setBackgroundMode( PaletteLight ); - parent->installEventFilter( this ); + tqparent->installEventFilter( this ); setMouseTracking( true ); } // KoHelpView::KoHelpView @@ -194,16 +194,16 @@ KoHelpView::~KoHelpView() delete currentText; } // KoHelpView::~KoHelpView -void KoHelpView::setText( const QString& text ) +void KoHelpView::setText( const TQString& text ) { if ( currentText ) delete currentText; - currentText = new QSimpleRichText( text, font() ); + currentText = new TQSimpleRichText( text, font() ); currentText->setWidth( width() ); setFixedHeight( currentText->height() ); } // KoHelpView::setText -void KoHelpView::mousePressEvent( QMouseEvent* e ) +void KoHelpView::mousePressEvent( TQMouseEvent* e ) { currentAnchor = currentText->anchorAt( e->pos() ); if ( !currentAnchor.isEmpty() ) @@ -212,7 +212,7 @@ void KoHelpView::mousePressEvent( QMouseEvent* e ) e->ignore(); } // KoHelpView::mousePressEvent -void KoHelpView::mouseReleaseEvent( QMouseEvent* e ) +void KoHelpView::mouseReleaseEvent( TQMouseEvent* e ) { if ( ( !currentAnchor.isEmpty() ) && ( currentAnchor == currentText->anchorAt( e->pos() ) ) ) { @@ -224,10 +224,10 @@ void KoHelpView::mouseReleaseEvent( QMouseEvent* e ) else if (currentAnchor.startsWith("help://")) { // that's the useful version of a help link - QString helpapp=currentAnchor.right(currentAnchor.length()-7); - QString helpanchor; + TQString helpapp=currentAnchor.right(currentAnchor.length()-7); + TQString helpanchor; int pos; - if ((pos=helpapp.find("#"))!=-1) { + if ((pos=helpapp.tqfind("#"))!=-1) { helpanchor=helpapp.right(helpapp.length()-pos-1); helpapp=helpapp.left(pos); } @@ -241,7 +241,7 @@ void KoHelpView::mouseReleaseEvent( QMouseEvent* e ) e->ignore(); } // KoHelpView::mouseReleaseEvent -void KoHelpView::mouseMoveEvent( QMouseEvent* e ) +void KoHelpView::mouseMoveEvent( TQMouseEvent* e ) { if ( !currentText->anchorAt( e->pos() ).isEmpty() ) setCursor( KCursor::handCursor() ); @@ -249,11 +249,11 @@ void KoHelpView::mouseMoveEvent( QMouseEvent* e ) setCursor( KCursor::arrowCursor() ); } // KoHelpView::mouseMove -bool KoHelpView::eventFilter( QObject*, QEvent* e ) +bool KoHelpView::eventFilter( TQObject*, TQEvent* e ) { - if ( ( currentText ) && ( e->type() == QEvent::Resize ) ) + if ( ( currentText ) && ( e->type() == TQEvent::Resize ) ) { - setFixedWidth( ( (QResizeEvent*)e )->size().width() ); + setFixedWidth( ( (TQResizeEvent*)e )->size().width() ); currentText->setWidth( width() ); setFixedHeight( currentText->height() ); @@ -262,23 +262,23 @@ bool KoHelpView::eventFilter( QObject*, QEvent* e ) return false; } // KoHelpView::resizeEvent -void KoHelpView::paintEvent( QPaintEvent* ) +void KoHelpView::paintEvent( TQPaintEvent* ) { - QPainter p( this ); - currentText->draw( &p, 0, 0, QRect(), colorGroup() ); + TQPainter p( this ); + currentText->draw( &p, 0, 0, TQRect(), tqcolorGroup() ); } // KoHelpView::paintEvent -KoHelpWidget::KoHelpWidget( QString help, QWidget* parent ) - : QWidget( parent ) +KoHelpWidget::KoHelpWidget( TQString help, TQWidget* tqparent ) + : TQWidget( tqparent ) { - QGridLayout* layout = new QGridLayout( this, 3, 3 ); - layout->setMargin( 2 ); - layout->addWidget( m_upButton = new KoHelpNavButton( KoHelpNavButton::Up, this ), 0, 1, AlignHCenter ); - layout->addWidget( m_helpViewport = new QWidget( this ), 1, 1 ); - layout->addWidget( m_downButton = new KoHelpNavButton( KoHelpNavButton::Down, this ), 2, 1, AlignHCenter ); - layout->addColSpacing( 0, 5 ); - layout->addColSpacing( 2, 5 ); - layout->setColStretch( 1, 1 ); + TQGridLayout* tqlayout = new TQGridLayout( this, 3, 3 ); + tqlayout->setMargin( 2 ); + tqlayout->addWidget( m_upButton = new KoHelpNavButton( KoHelpNavButton::Up, this ), 0, 1, AlignHCenter ); + tqlayout->addWidget( m_helpViewport = new TQWidget( this ), 1, 1 ); + tqlayout->addWidget( m_downButton = new KoHelpNavButton( KoHelpNavButton::Down, this ), 2, 1, AlignHCenter ); + tqlayout->addColSpacing( 0, 5 ); + tqlayout->addColSpacing( 2, 5 ); + tqlayout->setColStretch( 1, 1 ); m_helpView = new KoHelpView( m_helpViewport ); m_helpViewport->setBackgroundMode( PaletteLight ); @@ -286,11 +286,11 @@ KoHelpWidget::KoHelpWidget( QString help, QWidget* parent ) setBackgroundMode( PaletteLight ); - connect( m_upButton, SIGNAL( pressed() ), this, SLOT( startScrollingUp() ) ); - connect( m_downButton, SIGNAL( pressed() ), this, SLOT( startScrollingDown() ) ); - connect( m_upButton, SIGNAL( released() ), this, SLOT( stopScrolling() ) ); - connect( m_downButton, SIGNAL( released() ), this, SLOT( stopScrolling() ) ); - connect( m_helpView, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) ); + connect( m_upButton, TQT_SIGNAL( pressed() ), this, TQT_SLOT( startScrollingUp() ) ); + connect( m_downButton, TQT_SIGNAL( pressed() ), this, TQT_SLOT( startScrollingDown() ) ); + connect( m_upButton, TQT_SIGNAL( released() ), this, TQT_SLOT( stopScrolling() ) ); + connect( m_downButton, TQT_SIGNAL( released() ), this, TQT_SLOT( stopScrolling() ) ); + connect( m_helpView, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) ); } // KoHelpWidget::KoHelpWidget void KoHelpWidget::updateButtons() @@ -299,7 +299,7 @@ void KoHelpWidget::updateButtons() m_downButton->setEnabled( m_helpViewport->height() - m_ypos < m_helpView->height() ); } // KoHelpWidget::updateButtons -void KoHelpWidget::setText( QString text ) +void KoHelpWidget::setText( TQString text ) { m_helpView->setText( text ); m_helpView->move( 0, 0 ); @@ -307,7 +307,7 @@ void KoHelpWidget::setText( QString text ) updateButtons(); } // KoHelpWidget::setText -void KoHelpWidget::resizeEvent( QResizeEvent* ) +void KoHelpWidget::resizeEvent( TQResizeEvent* ) { updateButtons(); } // KoHelpWidget::resizeEvent @@ -354,7 +354,7 @@ void KoHelpWidget::scrollDown() } } // KoHelpWidget::scrollUp() -void KoHelpWidget::timerEvent( QTimerEvent* ) +void KoHelpWidget::timerEvent( TQTimerEvent* ) { if ( m_scrollDown ) scrollDown(); @@ -364,63 +364,63 @@ void KoHelpWidget::timerEvent( QTimerEvent* ) void KoHelpWidget::stopScrolling() { - killTimers(); + TQT_TQOBJECT(this)->killTimers(); } // KoHelpWidget::stopScrolling -KoContextHelpPopup::KoContextHelpPopup( QWidget* parent ) - : QWidget( parent, "", WType_Dialog | WStyle_Customize | WStyle_NoBorder ) +KoContextHelpPopup::KoContextHelpPopup( TQWidget* tqparent ) + : TQWidget( tqparent, "", WType_Dialog | WStyle_Customize | WStyle_NoBorder ) { - QGridLayout* layout = new QGridLayout( this ); - QHBoxLayout* buttonLayout; - layout->addWidget( m_helpIcon = new QLabel( this ), 0, 0 ); - layout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); - buttonLayout = new QHBoxLayout( layout ); - //layout->addLayout( buttonLayout, 2, 0 ); - layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 2, 1, 1 ); + TQGridLayout* tqlayout = new TQGridLayout( this ); + TQHBoxLayout* buttonLayout; + tqlayout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); + tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); + buttonLayout = new TQHBoxLayout( tqlayout ); + //tqlayout->addLayout( buttonLayout, 2, 0 ); + tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 2, 1, 1 ); buttonLayout->add( m_close = new KoTinyButton( KoTinyButton::Close, this ) ); buttonLayout->add( m_sticky = new KoTinyButton( KoTinyButton::Sticky, this ) ); - layout->addColSpacing( 2, 2 ); - layout->addRowSpacing( 3, 2 ); - layout->setMargin( 3 ); - layout->setSpacing( 1 ); - layout->setRowStretch( 1, 1 ); + tqlayout->addColSpacing( 2, 2 ); + tqlayout->addRowSpacing( 3, 2 ); + tqlayout->setMargin( 3 ); + tqlayout->setSpacing( 1 ); + tqlayout->setRowStretch( 1, 1 ); buttonLayout->setSpacing( 1 ); setMinimumSize( 180, 180 ); m_isSticky = false; - setFocusPolicy( StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); - connect( m_close, SIGNAL( clicked() ), this, SIGNAL( wantsToBeClosed() ) ); - connect( m_sticky, SIGNAL( toggled( bool ) ), this, SLOT( setSticky( bool ) ) ); - connect( m_helpViewer, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) ); + connect( m_close, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( wantsToBeClosed() ) ); + connect( m_sticky, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( setSticky( bool ) ) ); + connect( m_helpViewer, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) ); } // KoContextHelpPopup::KoContextHelpPopup KoContextHelpPopup::~KoContextHelpPopup() { } // KoContextHelpPopup::~KoContextHelpPopup -void KoContextHelpPopup::setContextHelp( const QString& title, const QString& text, const QPixmap* icon ) +void KoContextHelpPopup::setContextHelp( const TQString& title, const TQString& text, const TQPixmap* icon ) { m_helpIcon->setPixmap( icon ? *icon : BarIcon( "help" ) ); m_helpTitle->setText( title ); m_helpViewer->setText( text ); } // KoContextHelpPopup::updateHelp -void KoContextHelpPopup::mousePressEvent( QMouseEvent* e ) +void KoContextHelpPopup::mousePressEvent( TQMouseEvent* e ) { m_mousePos = e->globalPos() - pos(); } // KoContextHelpPopup::mousePressEvent -void KoContextHelpPopup::mouseMoveEvent( QMouseEvent* e ) +void KoContextHelpPopup::mouseMoveEvent( TQMouseEvent* e ) { move( e->globalPos() - m_mousePos ); } // KoContextHelpPopup::mouseMoveEvent -void KoContextHelpPopup::resizeEvent( QResizeEvent* ) +void KoContextHelpPopup::resizeEvent( TQResizeEvent* ) { - QBitmap mask( width(), height() ); - QPointArray a; - QPainter p( &mask ); + TQBitmap tqmask( width(), height() ); + TQPointArray a; + TQPainter p( &tqmask ); p.fillRect( 0, 0, width(), height(), color1 ); p.setPen( color0 ); p.setBrush( color0 ); @@ -439,18 +439,18 @@ void KoContextHelpPopup::resizeEvent( QResizeEvent* ) p.drawPoint( width() - 5, height() - 3 ); p.drawPoint( width() - 3, height() - 5 ); p.setPen( NoPen ); - p.setBrush( QBrush( color0, Dense4Pattern ) ); + p.setBrush( TQBrush( color0, Dense4Pattern ) ); p.drawRect( 0, height() - 2, width() - 1, height() - 1 ); p.drawRect( width() - 2, 0, width() - 1, height() - 1 ); p.drawRect( width() - 4, height() - 4, width() - 2, height() - 2 ); p.end(); - setMask( QRegion( mask ) ); + setMask( TQRegion( tqmask ) ); } // KoContextHelpPopup::resizeEvent -void KoContextHelpPopup::paintEvent( QPaintEvent* ) +void KoContextHelpPopup::paintEvent( TQPaintEvent* ) { - QPainter p( this ); - p.fillRect( 0, 0, width(), height(), colorGroup().light() ); + TQPainter p( this ); + p.fillRect( 0, 0, width(), height(), tqcolorGroup().light() ); p.setPen( black ); p.drawRect( 0, 0, width(), height() ); p.fillRect( width() - 3, 0, width() - 1, height() - 1, black ); @@ -471,7 +471,7 @@ void KoContextHelpPopup::windowActivationChange( bool ) emit wantsToBeClosed(); } // KoContestHelpPopup::windowActivationChange -void KoContextHelpPopup::keyPressEvent( QKeyEvent* e ) +void KoContextHelpPopup::keyPressEvent( TQKeyEvent* e ) { switch ( e->key() ) { @@ -492,7 +492,7 @@ void KoContextHelpPopup::keyPressEvent( QKeyEvent* e ) } } // KoContextHelpPopup::keyPressEvent -void KoContextHelpPopup::keyReleaseEvent( QKeyEvent* e ) +void KoContextHelpPopup::keyReleaseEvent( TQKeyEvent* e ) { switch ( e->key() ) { @@ -507,13 +507,13 @@ void KoContextHelpPopup::keyReleaseEvent( QKeyEvent* e ) } } // KoContextHelpPopup::keyPressEvent -KoContextHelpAction::KoContextHelpAction( KActionCollection* parent, QWidget* /*popupParent*/ ) - : KToggleAction( i18n( "Context Help" ), BarIcon( "help" ), KShortcut( "CTRL+SHIFT+F1" ), 0, 0, parent, "help_context" ) +KoContextHelpAction::KoContextHelpAction( KActionCollection* tqparent, TQWidget* /*popupParent*/ ) + : KToggleAction( i18n( "Context Help" ), BarIcon( "help" ), KShortcut( "CTRL+SHIFT+F1" ), 0, 0, tqparent, "help_context" ) { m_popup = new KoContextHelpPopup( 0L ); - connect( m_popup, SIGNAL( wantsToBeClosed() ), this, SLOT( closePopup() ) ); - connect( this, SIGNAL( toggled( bool ) ), m_popup, SLOT( setShown( bool ) ) ); - connect( m_popup, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) ); + connect( m_popup, TQT_SIGNAL( wantsToBeClosed() ), this, TQT_SLOT( closePopup() ) ); + connect( this, TQT_SIGNAL( toggled( bool ) ), m_popup, TQT_SLOT( setShown( bool ) ) ); + connect( m_popup, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) ); } // KoContextHelpAction::KoContextHelpAction KoContextHelpAction::~KoContextHelpAction() @@ -521,7 +521,7 @@ KoContextHelpAction::~KoContextHelpAction() delete m_popup; } // KoContextHelpAction::~KoContextHelpAction -void KoContextHelpAction::updateHelp( const QString& title, const QString& text, const QPixmap* icon ) +void KoContextHelpAction::updateHelp( const TQString& title, const TQString& text, const TQPixmap* icon ) { m_popup->setContextHelp( title, text, icon ); } // KoContextHelpAction::updateHelp @@ -533,28 +533,28 @@ void KoContextHelpAction::closePopup() } // KoContextHelpAction::closePopup -KoContextHelpWidget::KoContextHelpWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ) +KoContextHelpWidget::KoContextHelpWidget( TQWidget* tqparent, const char* name ) + : TQWidget( tqparent, name ) { setCaption( i18n( "Context Help" ) ); - QGridLayout* layout = new QGridLayout( this ); - layout->addWidget( m_helpIcon = new QLabel( this ), 0, 0 ); - layout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); - layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 1, 1, 1 ); - layout->setMargin( 2 ); - layout->setSpacing( 1 ); - layout->setRowStretch( 1, 1 ); + TQGridLayout* tqlayout = new TQGridLayout( this ); + tqlayout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); + tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); + tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 1, 1, 1 ); + tqlayout->setMargin( 2 ); + tqlayout->setSpacing( 1 ); + tqlayout->setRowStretch( 1, 1 ); this->setMinimumSize( 180, 120 ); this->show(); setContextHelp( i18n( "Context Help" ), i18n( "Here will be shown help according to your actions" ), 0 ); - connect( m_helpViewer, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) ); + connect( m_helpViewer, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) ); } // KoContextHelpWidget::KoContextHelpWidget KoContextHelpWidget::~KoContextHelpWidget() { } // KoContextHelpWidget::~KoContextHelpWidget -void KoContextHelpWidget::setContextHelp( const QString& title, const QString& text, const QPixmap* icon ) +void KoContextHelpWidget::setContextHelp( const TQString& title, const TQString& text, const TQPixmap* icon ) { m_helpIcon->setPixmap( icon ? *icon : BarIcon( "help" ) ); m_helpTitle->setText( title ); @@ -562,30 +562,30 @@ void KoContextHelpWidget::setContextHelp( const QString& title, const QString& t } // KoContextHelpWidget::updateHelp -KoContextHelpDocker::KoContextHelpDocker( QWidget* parent, const char* name ) - : QDockWindow( parent, name ) +KoContextHelpDocker::KoContextHelpDocker( TQWidget* tqparent, const char* name ) + : TQDockWindow( tqparent, name ) { setCaption( i18n( "Context Help" ) ); - QWidget* mainWidget = new QWidget( this ); - QGridLayout* layout = new QGridLayout( mainWidget ); - layout->addWidget( m_helpIcon = new QLabel( mainWidget ), 0, 0 ); - layout->addWidget( m_helpTitle = new KoVerticalLabel( mainWidget ), 1, 0 ); - layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", mainWidget ), 0, 1, 1, 1 ); - layout->setMargin( 2 ); - layout->setSpacing( 1 ); - layout->setRowStretch( 1, 1 ); + TQWidget* mainWidget = new TQWidget( this ); + TQGridLayout* tqlayout = new TQGridLayout( mainWidget ); + tqlayout->addWidget( m_helpIcon = new TQLabel( mainWidget ), 0, 0 ); + tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( mainWidget ), 1, 0 ); + tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", mainWidget ), 0, 1, 1, 1 ); + tqlayout->setMargin( 2 ); + tqlayout->setSpacing( 1 ); + tqlayout->setRowStretch( 1, 1 ); mainWidget->setMinimumSize( 180, 120 ); mainWidget->show(); setWidget( mainWidget ); setContextHelp( i18n( "Context Help" ), i18n( "Here will be shown help according to your actions" ), 0 ); - connect( m_helpViewer, SIGNAL( linkClicked( const QString& ) ), this, SIGNAL( linkClicked( const QString& ) ) ); + connect( m_helpViewer, TQT_SIGNAL( linkClicked( const TQString& ) ), this, TQT_SIGNAL( linkClicked( const TQString& ) ) ); } // KoContextHelpDocker::KoContextHelpDocker KoContextHelpDocker::~KoContextHelpDocker() { } // KoContextHelpDocker::~KoContextHelpDocker -void KoContextHelpDocker::setContextHelp( const QString& title, const QString& text, const QPixmap* icon ) +void KoContextHelpDocker::setContextHelp( const TQString& title, const TQString& text, const TQPixmap* icon ) { m_helpIcon->setPixmap( icon ? *icon : BarIcon( "help" ) ); m_helpTitle->setText( title ); |