diff options
Diffstat (limited to 'kpresenter/KPrBackDia.cpp')
| -rw-r--r-- | kpresenter/KPrBackDia.cpp | 162 | 
1 files changed, 81 insertions, 81 deletions
diff --git a/kpresenter/KPrBackDia.cpp b/kpresenter/KPrBackDia.cpp index ebee42636..41f940a61 100644 --- a/kpresenter/KPrBackDia.cpp +++ b/kpresenter/KPrBackDia.cpp @@ -24,15 +24,15 @@  #include "KPrDocument.h"  #include "KPrPage.h" -#include <qlabel.h> -#include <qpainter.h> -#include <qcombobox.h> -#include <qslider.h> -#include <qlayout.h> -#include <qtabwidget.h> -#include <qvbox.h> -#include <qcheckbox.h> -#include <qdatetime.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqcombobox.h> +#include <tqslider.h> +#include <tqlayout.h> +#include <tqtabwidget.h> +#include <tqvbox.h> +#include <tqcheckbox.h> +#include <tqdatetime.h>  #include <kcolorbutton.h>  #include <klocale.h> @@ -43,8 +43,8 @@  #include <KoPicture.h> -KPrBackPreview::KPrBackPreview( QWidget *parent, KPrPage *page ) -    : QFrame( parent ) +KPrBackPreview::KPrBackPreview( TQWidget *tqparent, KPrPage *page ) +    : TQFrame( tqparent )  {      setFrameStyle( WinPanel | Sunken );      back = new KPrBackGround( page ); @@ -56,22 +56,22 @@ KPrBackPreview::~KPrBackPreview()      delete back;  } -void KPrBackPreview::drawContents( QPainter *p ) +void KPrBackPreview::drawContents( TQPainter *p )  { -    QFrame::drawContents( p ); +    TQFrame::drawContents( p );      p->save();      p->translate( contentsRect().x(), contentsRect().y() );      back->drawBackground( p, contentsRect().size(), contentsRect(), false );      p->restore();  } -KPrBackDialog::KPrBackDialog( QWidget* parent, const char* name, -                  BackType backType, const QColor &backColor1, -                  const QColor &backColor2, BCType _bcType, +KPrBackDialog::KPrBackDialog( TQWidget* tqparent, const char* name, +                  BackType backType, const TQColor &backColor1, +                  const TQColor &backColor2, BCType _bcType,                    const KoPicture &backPic,                    BackView backPicView, bool _unbalanced,                    int _xfactor, int _yfactor, KPrPage *_page ) -    : KDialogBase( parent, name, true, "",KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel| +    : KDialogBase( tqparent, name, true, "",KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel|                     KDialogBase::User1|KDialogBase::User2 ),        m_useMasterBackground( 0 ), m_picture(backPic),m_oldpicture(backPic), m_page( _page )  { @@ -87,45 +87,45 @@ KPrBackDialog::KPrBackDialog( QWidget* parent, const char* name,      oldXFactor=_xfactor;      oldYFactor=_yfactor; -    QWidget *page = new QWidget( this ); +    TQWidget *page = new TQWidget( this );      setMainWidget(page); -    QVBoxLayout *layout = new QVBoxLayout( page, 0, spacingHint() ); +    TQVBoxLayout *tqlayout = new TQVBoxLayout( page, 0, spacingHint() ); -    QHBoxLayout *hbox = new QHBoxLayout( layout ); +    TQHBoxLayout *hbox = new TQHBoxLayout( tqlayout );      hbox->setSpacing( KDialog::spacingHint() ); -    QVBoxLayout *vbox = new QVBoxLayout( hbox ); +    TQVBoxLayout *vbox = new TQVBoxLayout( hbox );      vbox->setSpacing( KDialog::spacingHint() );      if ( !m_page->isMasterPage() )      { -        m_useMasterBackground = new QCheckBox( i18n( "Use slide master background" ), page ); -        connect( m_useMasterBackground, SIGNAL( clicked() ), -                 this, SLOT( updateConfiguration() ) ); +        m_useMasterBackground = new TQCheckBox( i18n( "Use slide master background" ), page ); +        connect( m_useMasterBackground, TQT_SIGNAL( clicked() ), +                 this, TQT_SLOT( updateConfiguration() ) );          m_useMasterBackground->setChecked( m_page->useMasterBackground() );          vbox->addWidget( m_useMasterBackground );      } -    vbox->addWidget( new QLabel( i18n( "Background type:" ), page ) ); +    vbox->addWidget( new TQLabel( i18n( "Background type:" ), page ) ); -    backCombo = new QComboBox( false, page ); +    backCombo = new TQComboBox( false, page );      backCombo->insertItem( i18n( "Color/Gradient" ) );      backCombo->insertItem( i18n( "Picture" ) );      backCombo->setCurrentItem( (int)backType ); -    connect( backCombo, SIGNAL( activated( int ) ), -             this, SLOT( changeComboText(int) ) ); +    connect( backCombo, TQT_SIGNAL( activated( int ) ), +             this, TQT_SLOT( changeComboText(int) ) );      vbox->addWidget( backCombo ); -    tabWidget = new QTabWidget( page ); +    tabWidget = new TQTabWidget( page );      vbox->addWidget( tabWidget );      // color/gradient tab --------------- -    QVBox *colorTab = new QVBox( tabWidget ); +    TQVBox *colorTab = new TQVBox( tabWidget );      colorTab->setSpacing( KDialog::spacingHint() );      colorTab->setMargin( 5 ); -    cType = new QComboBox( false, colorTab ); +    cType = new TQComboBox( false, colorTab );      cType->insertItem( i18n( "Plain" ) );      cType->insertItem( i18n( "Vertical Gradient" ) );      cType->insertItem( i18n( "Horizontal Gradient" ) ); @@ -136,69 +136,69 @@ KPrBackDialog::KPrBackDialog( QWidget* parent, const char* name,      cType->insertItem( i18n( "PipeCross Gradient" ) );      cType->insertItem( i18n( "Pyramid Gradient" ) );      cType->setCurrentItem( _bcType ); -    connect( cType, SIGNAL( activated( int ) ), -             this, SLOT( updateConfiguration() ) ); +    connect( cType, TQT_SIGNAL( activated( int ) ), +             this, TQT_SLOT( updateConfiguration() ) );      color1Choose = new KColorButton( backColor1, colorTab ); -    connect( color1Choose, SIGNAL( changed( const QColor& ) ), -             this, SLOT( updateConfiguration() ) ); +    connect( color1Choose, TQT_SIGNAL( changed( const TQColor& ) ), +             this, TQT_SLOT( updateConfiguration() ) );      color2Choose = new KColorButton( backColor2, colorTab ); -    connect( color2Choose, SIGNAL( changed( const QColor& ) ), -             this, SLOT( updateConfiguration() ) ); +    connect( color2Choose, TQT_SIGNAL( changed( const TQColor& ) ), +             this, TQT_SLOT( updateConfiguration() ) ); -    unbalanced = new QCheckBox( i18n( "Unbalanced" ), colorTab ); -    connect( unbalanced, SIGNAL( clicked() ), -             this, SLOT( updateConfiguration() ) ); +    unbalanced = new TQCheckBox( i18n( "Unbalanced" ), colorTab ); +    connect( unbalanced, TQT_SIGNAL( clicked() ), +             this, TQT_SLOT( updateConfiguration() ) );      unbalanced->setChecked( _unbalanced ); -    labXFactor =new QLabel( i18n( "X-factor:" ), colorTab ); +    labXFactor =new TQLabel( i18n( "X-factor:" ), colorTab ); -    xfactor = new QSlider( -200, 200, 1, 100, QSlider::Horizontal, colorTab ); -    connect( xfactor, SIGNAL( valueChanged( int ) ), -             this, SLOT( updateConfiguration() ) ); +    xfactor = new TQSlider( -200, 200, 1, 100, Qt::Horizontal, colorTab ); +    connect( xfactor, TQT_SIGNAL( valueChanged( int ) ), +             this, TQT_SLOT( updateConfiguration() ) );      xfactor->setValue( _xfactor ); -    labYFactor=new QLabel( i18n( "Y-factor:" ), colorTab ); +    labYFactor=new TQLabel( i18n( "Y-factor:" ), colorTab ); -    yfactor = new QSlider( -200, 200, 1, 100, QSlider::Horizontal, colorTab ); -    connect( yfactor, SIGNAL( valueChanged( int ) ), -             this, SLOT( updateConfiguration() ) ); +    yfactor = new TQSlider( -200, 200, 1, 100, Qt::Horizontal, colorTab ); +    connect( yfactor, TQT_SIGNAL( valueChanged( int ) ), +             this, TQT_SLOT( updateConfiguration() ) );      yfactor->setValue( _yfactor );      tabWidget->addTab( colorTab, i18n( "Color/Gradient" ) );      // picture tab --------------------- -    QVBox *picTab = new QVBox( tabWidget ); +    TQVBox *picTab = new TQVBox( tabWidget );      picTab->setSpacing( KDialog::spacingHint() );      picTab->setMargin( 5 ); -    QLabel *l = new QLabel( i18n( "View mode:" ), picTab ); -    l->setFixedHeight( l->sizeHint().height() ); +    TQLabel *l = new TQLabel( i18n( "View mode:" ), picTab ); +    l->setFixedHeight( l->tqsizeHint().height() ); -    picView = new QComboBox( false, picTab ); +    picView = new TQComboBox( false, picTab );      picView->insertItem( i18n( "Scaled" ) );      picView->insertItem( i18n( "Centered" ) );      picView->insertItem( i18n( "Tiled" ) );      picView->setCurrentItem( (int)backPicView ); -    connect( picView, SIGNAL( activated( int ) ), -             this, SLOT( updateConfiguration() ) ); +    connect( picView, TQT_SIGNAL( activated( int ) ), +             this, TQT_SLOT( updateConfiguration() ) ); -    picChooseLabel = new QLabel( i18n("&Location:"), picTab ); -    picChooseLabel->setFixedHeight( picChooseLabel->sizeHint().height() ); +    picChooseLabel = new TQLabel( i18n("&Location:"), picTab ); +    picChooseLabel->setFixedHeight( picChooseLabel->tqsizeHint().height() );      picChoose = new KURLRequester( picTab, "picChoose" ); -    picChoose->setFixedHeight( picChoose->sizeHint().height() ); +    picChoose->setFixedHeight( picChoose->tqsizeHint().height() );      picChoose->setMode( KFile::ExistingOnly ); -    connect( picChoose, SIGNAL( openFileDialog( KURLRequester * ) ), -             SLOT( aboutToSelectPic() ) ); -    connect( picChoose, SIGNAL( urlSelected( const QString & ) ), -             SLOT( afterSelectPic( const QString & ) ) ); +    connect( picChoose, TQT_SIGNAL( openFileDialog( KURLRequester * ) ), +             TQT_SLOT( aboutToSelectPic() ) ); +    connect( picChoose, TQT_SIGNAL( urlSelected( const TQString & ) ), +             TQT_SLOT( afterSelectPic( const TQString & ) ) );      picChooseLabel->setBuddy( picChoose ); -    (void)new QWidget( picTab ); +    (void)new TQWidget( picTab );      tabWidget->addTab( picTab, i18n( "Picture" ) ); @@ -209,18 +209,18 @@ KPrBackDialog::KPrBackDialog( QWidget* parent, const char* name,      // ------------------------ buttons -    connect( this, SIGNAL( okClicked() ), -             this, SLOT( Ok() ) ); -    connect( this, SIGNAL( applyClicked() ), -             this, SLOT( Apply() ) ); -    connect( this, SIGNAL(  user1Clicked() ), -             this, SLOT( ApplyGlobal() ) ); +    connect( this, TQT_SIGNAL( okClicked() ), +             this, TQT_SLOT( Ok() ) ); +    connect( this, TQT_SIGNAL( applyClicked() ), +             this, TQT_SLOT( Apply() ) ); +    connect( this, TQT_SIGNAL(  user1Clicked() ), +             this, TQT_SLOT( ApplyGlobal() ) ); -    connect( this, SIGNAL(  user2Clicked() ), -             this, SLOT( slotReset() ) ); +    connect( this, TQT_SIGNAL(  user2Clicked() ), +             this, TQT_SLOT( slotReset() ) ); -    connect( this, SIGNAL( okClicked() ), -             this, SLOT( accept() ) ); +    connect( this, TQT_SIGNAL( okClicked() ), +             this, TQT_SLOT( accept() ) );      setButtonText(KDialogBase::User1,i18n( "Apply &Global" ));      setButtonText(KDialogBase::User2,i18n( "&Reset" ));      picChanged = true; @@ -242,7 +242,7 @@ void KPrBackDialog::slotReset()      if ( !m_picture.isNull() )          picChoose->setURL( m_picture.getKey().filename() );      else -        picChoose->setURL( QString::null ); +        picChoose->setURL( TQString() );      picView->setCurrentItem( (int)oldBackPicView );      unbalanced->setChecked( oldUnbalanced ); @@ -258,9 +258,9 @@ void KPrBackDialog::changeComboText(int _p)      updateConfiguration();  } -void KPrBackDialog::showEvent( QShowEvent *e ) +void KPrBackDialog::showEvent( TQShowEvent *e )  { -    QDialog::showEvent( e ); +    TQDialog::showEvent( e );      lockUpdate = false;      updateConfiguration();  } @@ -313,7 +313,7 @@ void KPrBackDialog::updateConfiguration()      {          kdDebug(33001) << "set backgound to master" << endl;          preview->backGround()->setBackGround( m_page->masterPage()->background()->getBackGround() ); -        preview->repaint( true ); +        preview->tqrepaint( true );      }      else      { @@ -331,7 +331,7 @@ void KPrBackDialog::updateConfiguration()          preview->backGround()->setBackType( getBackType() );          if ( preview->isVisible() && isVisible() ) {              preview->backGround()->reload(); // ### TODO: instead of reloading, load or remove the picture correctly. -            preview->repaint( true ); +            preview->tqrepaint( true );          }          picChanged  = false; @@ -348,12 +348,12 @@ BackView KPrBackDialog::getBackView() const      return (BackView)picView->currentItem();  } -QColor KPrBackDialog::getBackColor1() const +TQColor KPrBackDialog::getBackColor1() const  {      return color1Choose->color();  } -QColor KPrBackDialog::getBackColor2() const +TQColor KPrBackDialog::getBackColor2() const  {      return color2Choose->color();  } @@ -394,7 +394,7 @@ bool KPrBackDialog::useMasterBackground() const  void KPrBackDialog::aboutToSelectPic()  { -    QStringList mimetypes; +    TQStringList mimetypes;      mimetypes += KImageIO::mimeTypes( KImageIO::Reading );      mimetypes += KoPictureFilePreview::clipartMimeTypes(); @@ -402,7 +402,7 @@ void KPrBackDialog::aboutToSelectPic()      picChoose->fileDialog()->setPreviewWidget( new KoPictureFilePreview( picChoose->fileDialog() ) );  } -void KPrBackDialog::afterSelectPic( const QString &url ) +void KPrBackDialog::afterSelectPic( const TQString &url )  {      KoPicture picture;      picture.setKeyAndDownloadPicture(url, tabWidget);  | 
