diff options
Diffstat (limited to 'lib/kofficeui/KoContextCelp.cpp')
-rw-r--r-- | lib/kofficeui/KoContextCelp.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/lib/kofficeui/KoContextCelp.cpp b/lib/kofficeui/KoContextCelp.cpp index 82f786e8..b893037c 100644 --- a/lib/kofficeui/KoContextCelp.cpp +++ b/lib/kofficeui/KoContextCelp.cpp @@ -23,7 +23,7 @@ #include <tqregion.h> #include <tqfont.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqsimplerichtext.h> #include <kpixmap.h> @@ -61,7 +61,7 @@ void KoVerticalLabel::paintEvent( TQPaintEvent* ) KPixmap pm; pm.resize( height(), width() ); TQPainter p( &pm ); - p.fillRect( 0, 0, height(), width(), tqcolorGroup().background() ); + p.fillRect( 0, 0, height(), width(), colorGroup().background() ); p.setFont( font() ); p.drawText( 0, 0, height(), width(), AlignCenter, m_text ); p.end(); @@ -90,9 +90,9 @@ void KoHelpNavButton::paintEvent( TQPaintEvent* ) if ( isEnabled() ) { if ( m_pressed ) - p.setPen( tqcolorGroup().highlight() ); + p.setPen( colorGroup().highlight() ); else - p.setPen( tqcolorGroup().text() ); + p.setPen( colorGroup().text() ); p.drawPixmap( 1, 1, m_bitmap ); } } // KoHelpNavButton::paintEvent @@ -142,9 +142,9 @@ void KoTinyButton::paintEvent( TQPaintEvent* ) if ( isEnabled() ) { if ( m_pressed ) - p.setPen( tqcolorGroup().highlight() ); + p.setPen( colorGroup().highlight() ); else - p.setPen( tqcolorGroup().text() ); + p.setPen( colorGroup().text() ); p.drawPixmap( width() / 2 - 2, 1, m_bitmap ); } } // KoTinyButton::paintEvent @@ -265,20 +265,20 @@ bool KoHelpView::eventFilter( TQObject*, TQEvent* e ) void KoHelpView::paintEvent( TQPaintEvent* ) { TQPainter p( this ); - currentText->draw( &p, 0, 0, TQRect(), tqcolorGroup() ); + currentText->draw( &p, 0, 0, TQRect(), colorGroup() ); } // KoHelpView::paintEvent KoHelpWidget::KoHelpWidget( TQString help, TQWidget* parent ) : TQWidget( parent ) { - 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 ); + TQGridLayout* layout = new TQGridLayout( this, 3, 3 ); + layout->setMargin( 2 ); + layout->addWidget( m_upButton = new KoHelpNavButton( KoHelpNavButton::Up, this ), 0, 1, AlignHCenter ); + layout->addWidget( m_helpViewport = new TQWidget( 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 ); m_helpView = new KoHelpView( m_helpViewport ); m_helpViewport->setBackgroundMode( PaletteLight ); @@ -370,20 +370,20 @@ void KoHelpWidget::stopScrolling() KoContextHelpPopup::KoContextHelpPopup( TQWidget* parent ) : TQWidget( parent, "", WType_Dialog | WStyle_Customize | WStyle_NoBorder ) { - TQGridLayout* tqlayout = new TQGridLayout( this ); + TQGridLayout* layout = 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 ); + layout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); + layout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); + buttonLayout = new TQHBoxLayout( layout ); + //layout->addLayout( buttonLayout, 2, 0 ); + layout->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 ) ); - tqlayout->addColSpacing( 2, 2 ); - tqlayout->addRowSpacing( 3, 2 ); - tqlayout->setMargin( 3 ); - tqlayout->setSpacing( 1 ); - tqlayout->setRowStretch( 1, 1 ); + layout->addColSpacing( 2, 2 ); + layout->addRowSpacing( 3, 2 ); + layout->setMargin( 3 ); + layout->setSpacing( 1 ); + layout->setRowStretch( 1, 1 ); buttonLayout->setSpacing( 1 ); setMinimumSize( 180, 180 ); @@ -450,7 +450,7 @@ void KoContextHelpPopup::resizeEvent( TQResizeEvent* ) void KoContextHelpPopup::paintEvent( TQPaintEvent* ) { TQPainter p( this ); - p.fillRect( 0, 0, width(), height(), tqcolorGroup().light() ); + p.fillRect( 0, 0, width(), height(), colorGroup().light() ); p.setPen( black ); p.drawRect( 0, 0, width(), height() ); p.fillRect( width() - 3, 0, width() - 1, height() - 1, black ); @@ -537,13 +537,13 @@ KoContextHelpWidget::KoContextHelpWidget( TQWidget* parent, const char* name ) : TQWidget( parent, name ) { setCaption( i18n( "Context Help" ) ); - 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 ); + TQGridLayout* layout = new TQGridLayout( this ); + layout->addWidget( m_helpIcon = new TQLabel( 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 ); this->setMinimumSize( 180, 120 ); this->show(); setContextHelp( i18n( "Context Help" ), i18n( "Here will be shown help according to your actions" ), 0 ); @@ -567,13 +567,13 @@ KoContextHelpDocker::KoContextHelpDocker( TQWidget* parent, const char* name ) { setCaption( i18n( "Context Help" ) ); 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 ); + TQGridLayout* layout = new TQGridLayout( mainWidget ); + layout->addWidget( m_helpIcon = new TQLabel( 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 ); mainWidget->setMinimumSize( 180, 120 ); mainWidget->show(); setWidget( mainWidget ); |