diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kpresenter/KPrGotoPage.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpresenter/KPrGotoPage.cpp')
-rw-r--r-- | kpresenter/KPrGotoPage.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kpresenter/KPrGotoPage.cpp b/kpresenter/KPrGotoPage.cpp index 44f372d1..6cbb97a7 100644 --- a/kpresenter/KPrGotoPage.cpp +++ b/kpresenter/KPrGotoPage.cpp @@ -20,10 +20,10 @@ #include "KPrGotoPage.h" -#include <qlabel.h> -#include <qlistbox.h> -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kdialog.h> @@ -32,60 +32,60 @@ #include "KPrPage.h" KPrGotoPage::KPrGotoPage( const KPrDocument *doc, - const QValueList<int> &slides, int start, - QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, i18n("Goto Slide..."), Ok|Cancel), + const TQValueList<int> &slides, int start, + TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, i18n("Goto Slide..."), Ok|Cancel), oldPage(start) { - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QVBoxLayout *ml = new QVBoxLayout( page, KDialog::marginHint(), + TQVBoxLayout *ml = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint()); - QLabel *label = new QLabel( i18n( "Go to slide:" ), page ); + TQLabel *label = new TQLabel( i18n( "Go to slide:" ), page ); ml->addWidget( label ); - spinbox = new QListBox( page ); - connect( spinbox, SIGNAL(doubleClicked( QListBoxItem* )), - this, SLOT(accept()) ); - connect( spinbox, SIGNAL(returnPressed( QListBoxItem* )), - this, SLOT(accept()) ); + spinbox = new TQListBox( page ); + connect( spinbox, TQT_SIGNAL(doubleClicked( TQListBoxItem* )), + this, TQT_SLOT(accept()) ); + connect( spinbox, TQT_SIGNAL(returnPressed( TQListBoxItem* )), + this, TQT_SLOT(accept()) ); ml->addWidget( spinbox ); - QPtrList<KPrPage> pageList = doc->getPageList(); // because of const doc, we can't do doc->pageList()->at() - QValueList<int>::ConstIterator it = slides.begin(); + TQPtrList<KPrPage> pageList = doc->getPageList(); // because of const doc, we can't do doc->pageList()->at() + TQValueList<int>::ConstIterator it = slides.begin(); for ( ; it != slides.end(); ++it ) { - QString t( pageList.at( (*it) - 1 )->pageTitle() ); + TQString t( pageList.at( (*it) - 1 )->pageTitle() ); // cut ultra long titles... if(t.length() > 30) { t.truncate(30); t+="..."; } - spinbox->insertItem( QString( "%1 - %2" ).arg( *it ).arg( t ), -1 ); + spinbox->insertItem( TQString( "%1 - %2" ).tqarg( *it ).tqarg( t ), -1 ); if ( *it == start ) spinbox->setCurrentItem( spinbox->count()-1 ); } - if ( parent ) - parent->setCursor( Qt::forbiddenCursor ); + if ( tqparent ) + tqparent->setCursor( TQt::forbiddenCursor ); } int KPrGotoPage::gotoPage( const KPrDocument *doc, - const QValueList<int> &slides, int start, - QWidget *parent) + const TQValueList<int> &slides, int start, + TQWidget *tqparent) { - KPrGotoPage dia( doc, slides, start,parent, 0L ); + KPrGotoPage dia( doc, slides, start,tqparent, 0L ); dia.exec(); dia.resetCursor(); return dia.page(); } int KPrGotoPage::page() const { - if(result()==QDialog::Accepted) - return spinbox->currentText().left( spinbox->currentText().find( "-" ) - 1 ).toInt(); + if(result()==TQDialog::Accepted) + return spinbox->currentText().left( spinbox->currentText().tqfind( "-" ) - 1 ).toInt(); return oldPage; } void KPrGotoPage::resetCursor() { - if ( parentWidget() ) - parentWidget()->setCursor( Qt::blankCursor ); + if ( tqparentWidget() ) + tqparentWidget()->setCursor( TQt::blankCursor ); } |