summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrCustomSlideShowDia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrCustomSlideShowDia.cpp')
-rw-r--r--kpresenter/KPrCustomSlideShowDia.cpp178
1 files changed, 89 insertions, 89 deletions
diff --git a/kpresenter/KPrCustomSlideShowDia.cpp b/kpresenter/KPrCustomSlideShowDia.cpp
index 004652b9..19072278 100644
--- a/kpresenter/KPrCustomSlideShowDia.cpp
+++ b/kpresenter/KPrCustomSlideShowDia.cpp
@@ -17,14 +17,14 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qapplication.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -40,40 +40,40 @@ KPrCustomSlideShowDia::KPrCustomSlideShowDia( KPrView* _view, KPrDocument *_doc,
: KDialogBase( _view, name, true, i18n("Custom Slide Show"), Ok|Cancel ), m_doc( _doc ), m_view( _view )
, m_customSlideShowMap( m_doc->customSlideShows() )
{
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- QGridLayout *grid1 = new QGridLayout( page,10,3,KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid1 = new TQGridLayout( page,10,3,KDialog::marginHint(), KDialog::spacingHint());
- list=new QListBox(page);
+ list=new TQListBox(page);
grid1->addMultiCellWidget(list,0,8,0,0);
- m_pAdd=new QPushButton(i18n("&Add..."),page);
+ m_pAdd=new TQPushButton(i18n("&Add..."),page);
grid1->addWidget(m_pAdd,1,2);
- m_pModify=new QPushButton(i18n("&Modify..."),page);
+ m_pModify=new TQPushButton(i18n("&Modify..."),page);
grid1->addWidget(m_pModify,2,2);
- m_pRemove=new QPushButton(i18n("&Remove"),page);
+ m_pRemove=new TQPushButton(i18n("&Remove"),page);
grid1->addWidget(m_pRemove,3,2);
- m_pCopy=new QPushButton(i18n("Co&py"),page);
+ m_pCopy=new TQPushButton(i18n("Co&py"),page);
grid1->addWidget(m_pCopy,4,2);
- m_pTest=new QPushButton(i18n("Test"),page);
+ m_pTest=new TQPushButton(i18n("Test"),page);
grid1->addWidget(m_pTest,5,2);
- connect( m_pRemove, SIGNAL( clicked() ), this, SLOT( slotRemove() ) );
- connect( m_pAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
- connect( m_pModify, SIGNAL( clicked() ), this, SLOT( slotModify() ) );
- connect( m_pCopy, SIGNAL( clicked() ), this, SLOT( slotCopy() ) );
- connect( m_pTest, SIGNAL( clicked() ), this, SLOT( slotTest() ) );
+ connect( m_pRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemove() ) );
+ connect( m_pAdd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAdd() ) );
+ connect( m_pModify, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotModify() ) );
+ connect( m_pCopy, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCopy() ) );
+ connect( m_pTest, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotTest() ) );
- connect( list, SIGNAL(doubleClicked(QListBoxItem *)),this,SLOT(slotDoubleClicked(QListBoxItem *)));
- connect( list, SIGNAL(clicked ( QListBoxItem * )),this,SLOT(slotTextClicked(QListBoxItem * )));
+ connect( list, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),this,TQT_SLOT(slotDoubleClicked(TQListBoxItem *)));
+ connect( list, TQT_SIGNAL(clicked ( TQListBoxItem * )),this,TQT_SLOT(slotTextClicked(TQListBoxItem * )));
- connect( m_view, SIGNAL( presentationFinished() ), this, SLOT( slotPresentationFinished() ) );
+ connect( m_view, TQT_SIGNAL( presentationFinished() ), this, TQT_SLOT( slotPresentationFinished() ) );
init();
updateButton();
@@ -107,12 +107,12 @@ void KPrCustomSlideShowDia::updateButton()
m_pTest->setEnabled( state );
}
-void KPrCustomSlideShowDia::slotTextClicked(QListBoxItem*)
+void KPrCustomSlideShowDia::slotTextClicked(TQListBoxItem*)
{
updateButton();
}
-void KPrCustomSlideShowDia::slotDoubleClicked(QListBoxItem *)
+void KPrCustomSlideShowDia::slotDoubleClicked(TQListBoxItem *)
{
updateButton();
slotModify();
@@ -125,13 +125,13 @@ void KPrCustomSlideShowDia::slotPresentationFinished()
}
-void KPrCustomSlideShowDia::hideEvent( QHideEvent* )
+void KPrCustomSlideShowDia::hideEvent( TQHideEvent* )
{
}
void KPrCustomSlideShowDia::slotTest()
{
- QListBoxItem *item = list->selectedItem();
+ TQListBoxItem *item = list->selectedItem();
if ( item )
{
m_doc->testCustomSlideShow( m_customSlideShowMap[item->text()], m_view );
@@ -141,7 +141,7 @@ void KPrCustomSlideShowDia::slotTest()
void KPrCustomSlideShowDia::slotAdd()
{
- QStringList listCustomName;
+ TQStringList listCustomName;
CustomSlideShowMap::Iterator it( m_customSlideShowMap.begin() ) ;
for ( ; it != m_customSlideShowMap.end(); ++it )
{
@@ -178,10 +178,10 @@ void KPrCustomSlideShowDia::slotOk()
void KPrCustomSlideShowDia::slotModify()
{
- QListBoxItem *item = list->selectedItem();
+ TQListBoxItem *item = list->selectedItem();
if ( item )
{
- QStringList listCustomName;
+ TQStringList listCustomName;
CustomSlideShowMap::ConstIterator it( m_customSlideShowMap.begin() );
for ( ; it != m_customSlideShowMap.end(); ++it )
{
@@ -205,16 +205,16 @@ void KPrCustomSlideShowDia::slotModify()
void KPrCustomSlideShowDia::slotCopy()
{
- QListBoxItem *item = list->selectedItem();
+ TQListBoxItem *item = list->selectedItem();
if ( item )
{
- QString str( list->selectedItem()->text() );
+ TQString str( list->selectedItem()->text() );
str+=i18n( "(Copy %1)" );
for ( int i =1;; ++i )
{
if ( !uniqueName( i, str ) )
{
- str = str.arg( i );
+ str = str.tqarg( i );
m_customSlideShowMap.insert( str, m_customSlideShowMap[item->text()] );
list->insertItem( str );
break;
@@ -223,9 +223,9 @@ void KPrCustomSlideShowDia::slotCopy()
}
}
-bool KPrCustomSlideShowDia::uniqueName( int val, const QString & name ) const
+bool KPrCustomSlideShowDia::uniqueName( int val, const TQString & name ) const
{
- QString str = name.arg( val );
+ TQString str = name.tqarg( val );
for ( int i= 0; i < ( int )list->count(); ++i )
{
if ( list->text ( i ) == str )
@@ -235,48 +235,48 @@ bool KPrCustomSlideShowDia::uniqueName( int val, const QString & name ) const
}
-KPrCustomSlideShowItem::KPrCustomSlideShowItem( QListBox * listbox, KPrPage * page )
-: QListBoxText( listbox, page->pageTitle() )
+KPrCustomSlideShowItem::KPrCustomSlideShowItem( TQListBox * listbox, KPrPage * page )
+: TQListBoxText( listbox, page->pageTitle() )
, m_page( page )
{
}
KPrCustomSlideShowItem::KPrCustomSlideShowItem( KPrPage * page )
-: QListBoxText( page->pageTitle() )
+: TQListBoxText( page->pageTitle() )
, m_page( page )
{
}
-KPrCustomSlideShowItem::KPrCustomSlideShowItem( QListBox * listbox, KPrPage * page, QListBoxItem * after )
-: QListBoxText( listbox, page->pageTitle(), after )
+KPrCustomSlideShowItem::KPrCustomSlideShowItem( TQListBox * listbox, KPrPage * page, TQListBoxItem * after )
+: TQListBoxText( listbox, page->pageTitle(), after )
, m_page( page )
{
}
-KPrDefineCustomSlideShow::KPrDefineCustomSlideShow( QWidget* parent, QStringList &_listNameSlideShow,
- const QPtrList<KPrPage> &pages, const char *name )
-: KDialogBase( parent, name, true, i18n("Define Custom Slide Show"), Ok|Cancel )
+KPrDefineCustomSlideShow::KPrDefineCustomSlideShow( TQWidget* tqparent, TQStringList &_listNameSlideShow,
+ const TQPtrList<KPrPage> &pages, const char *name )
+: KDialogBase( tqparent, name, true, i18n("Define Custom Slide Show"), Ok|Cancel )
, listNameCustomSlideShow( _listNameSlideShow )
{
init();
- for ( QPtrList<KPrPage>::ConstIterator it = pages.begin(); it != pages.end(); ++it )
+ for ( TQPtrList<KPrPage>::ConstIterator it = pages.begin(); it != pages.end(); ++it )
{
listSlide->insertItem( new KPrCustomSlideShowItem( *it ) );
}
}
-KPrDefineCustomSlideShow::KPrDefineCustomSlideShow( QWidget* parent, const QString &_customName, QStringList &_listNameSlideShow,
- const QPtrList<KPrPage> &pages, QValueList<KPrPage *> &customPages, const char* name )
-: KDialogBase( parent, name, true, i18n("Define Custom Slide Show"), Ok|Cancel )
+KPrDefineCustomSlideShow::KPrDefineCustomSlideShow( TQWidget* tqparent, const TQString &_customName, TQStringList &_listNameSlideShow,
+ const TQPtrList<KPrPage> &pages, TQValueList<KPrPage *> &customPages, const char* name )
+: KDialogBase( tqparent, name, true, i18n("Define Custom Slide Show"), Ok|Cancel )
, listNameCustomSlideShow( _listNameSlideShow )
{
init();
m_name->setText( _customName );
- for ( QPtrList<KPrPage>::ConstIterator it = pages.begin(); it != pages.end(); ++it )
+ for ( TQPtrList<KPrPage>::ConstIterator it = pages.begin(); it != pages.end(); ++it )
{
listSlide->insertItem( new KPrCustomSlideShowItem( *it ) );
}
- for ( QValueList<KPrPage *>::ConstIterator it = customPages.begin(); it != customPages.end(); ++it )
+ for ( TQValueList<KPrPage *>::ConstIterator it = customPages.begin(); it != customPages.end(); ++it )
{
listSlideShow->insertItem( new KPrCustomSlideShowItem( *it ) );
}
@@ -284,49 +284,49 @@ KPrDefineCustomSlideShow::KPrDefineCustomSlideShow( QWidget* parent, const QStri
void KPrDefineCustomSlideShow::init()
{
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- QVBoxLayout *lov = new QVBoxLayout( page );
+ TQVBoxLayout *lov = new TQVBoxLayout( page );
lov->setSpacing( KDialog::spacingHint() );
- QHBoxLayout *loh = new QHBoxLayout( lov );
+ TQHBoxLayout *loh = new TQHBoxLayout( lov );
- QLabel *lab = new QLabel( i18n( "Name:" ), page );
+ TQLabel *lab = new TQLabel( i18n( "Name:" ), page );
loh->addWidget( lab );
- m_name = new QLineEdit( page );
+ m_name = new TQLineEdit( page );
loh->addWidget( m_name );
- QHBoxLayout *lo = new QHBoxLayout( lov );
+ TQHBoxLayout *lo = new TQHBoxLayout( lov );
lo->setSpacing( KDialog::spacingHint() );
- QVBoxLayout *loAv = new QVBoxLayout( lo );
- lab = new QLabel( i18n("Existing slides:"), page );
+ TQVBoxLayout *loAv = new TQVBoxLayout( lo );
+ lab = new TQLabel( i18n("Existing slides:"), page );
loAv->addWidget( lab );
- listSlide = new QListBox( page );
+ listSlide = new TQListBox( page );
loAv->addWidget( listSlide );
lab->setBuddy( listSlide );
- QVBoxLayout *loHBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loHBtns = new TQVBoxLayout( lo );
loHBtns->addStretch( 1 );
- m_insertSlide = new QToolButton( page );
+ m_insertSlide = new TQToolButton( page );
loHBtns->addWidget( m_insertSlide );
- m_removeSlide = new QToolButton( page );
+ m_removeSlide = new TQToolButton( page );
loHBtns->addWidget( m_removeSlide );
loHBtns->addStretch( 1 );
- QVBoxLayout *loS = new QVBoxLayout( lo );
- lab = new QLabel( i18n("Selected slides:"), page );
+ TQVBoxLayout *loS = new TQVBoxLayout( lo );
+ lab = new TQLabel( i18n("Selected slides:"), page );
loS->addWidget( lab );
- listSlideShow = new QListBox( page );
+ listSlideShow = new TQListBox( page );
loS->addWidget( listSlideShow );
lab->setBuddy( listSlideShow );
- QVBoxLayout *loVBtns = new QVBoxLayout( lo );
+ TQVBoxLayout *loVBtns = new TQVBoxLayout( lo );
loVBtns->addStretch( 1 );
- m_moveUpSlide = new QToolButton( page );
+ m_moveUpSlide = new TQToolButton( page );
m_moveUpSlide->setAutoRepeat( true );
loVBtns->addWidget( m_moveUpSlide );
- m_moveDownSlide = new QToolButton( page );
+ m_moveDownSlide = new TQToolButton( page );
m_moveDownSlide->setAutoRepeat( true );
loVBtns->addWidget( m_moveDownSlide );
loVBtns->addStretch( 1 );
@@ -334,17 +334,17 @@ void KPrDefineCustomSlideShow::init()
m_name->setFocus();
- connect( m_insertSlide, SIGNAL(clicked()), this, SLOT(slotMoveInsertSlide() ) );
- connect( m_removeSlide, SIGNAL(clicked()), this, SLOT(slotMoveRemoveSlide()) );
- connect( m_moveUpSlide, SIGNAL(clicked()), this, SLOT( slotMoveUpSlide() ) );
- connect( m_moveDownSlide, SIGNAL(clicked()), this, SLOT(slotMoveDownSlide()) );
- connect( m_name, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slideNameChanged( const QString & ) ) );
- connect( listSlideShow, SIGNAL( clicked ( QListBoxItem * ) ), this, SLOT( updateButton() ) );
- connect( listSlide, SIGNAL( clicked ( QListBoxItem * ) ), this, SLOT( updateButton() ) );
- connect( listSlide, SIGNAL( doubleClicked ( QListBoxItem * ) ), this, SLOT( slotMoveInsertSlide() ) );
- connect( listSlideShow, SIGNAL( doubleClicked( QListBoxItem * ) ), this, SLOT( slotMoveRemoveSlide() ) );
- m_insertSlide->setIconSet( SmallIconSet( ( QApplication::reverseLayout() ? "back" : "forward" ) ) );
- m_removeSlide->setIconSet( SmallIconSet( ( QApplication::reverseLayout() ? "forward" : "back") ) );
+ connect( m_insertSlide, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveInsertSlide() ) );
+ connect( m_removeSlide, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveRemoveSlide()) );
+ connect( m_moveUpSlide, TQT_SIGNAL(clicked()), this, TQT_SLOT( slotMoveUpSlide() ) );
+ connect( m_moveDownSlide, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveDownSlide()) );
+ connect( m_name, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slideNameChanged( const TQString & ) ) );
+ connect( listSlideShow, TQT_SIGNAL( clicked ( TQListBoxItem * ) ), this, TQT_SLOT( updateButton() ) );
+ connect( listSlide, TQT_SIGNAL( clicked ( TQListBoxItem * ) ), this, TQT_SLOT( updateButton() ) );
+ connect( listSlide, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), this, TQT_SLOT( slotMoveInsertSlide() ) );
+ connect( listSlideShow, TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ), this, TQT_SLOT( slotMoveRemoveSlide() ) );
+ m_insertSlide->setIconSet( SmallIconSet( ( TQApplication::reverseLayout() ? "back" : "forward" ) ) );
+ m_removeSlide->setIconSet( SmallIconSet( ( TQApplication::reverseLayout() ? "forward" : "back") ) );
m_moveUpSlide->setIconSet( SmallIconSet( "up" ) );
m_moveDownSlide->setIconSet( SmallIconSet( "down" ) );
@@ -354,7 +354,7 @@ void KPrDefineCustomSlideShow::init()
}
-void KPrDefineCustomSlideShow::slideNameChanged( const QString & _name)
+void KPrDefineCustomSlideShow::slideNameChanged( const TQString & _name)
{
enableButtonOK( !_name.isEmpty() );
}
@@ -372,7 +372,7 @@ void KPrDefineCustomSlideShow::slotMoveUpSlide()
{
int c = listSlideShow->currentItem();
if ( c < 1 ) return;
- QListBoxItem *item = listSlideShow->item( c );
+ TQListBoxItem *item = listSlideShow->item( c );
listSlideShow->takeItem( item );
listSlideShow->insertItem( item, c-1 );
listSlideShow->setCurrentItem( item );
@@ -384,7 +384,7 @@ void KPrDefineCustomSlideShow::slotMoveDownSlide()
{
int c = listSlideShow->currentItem();
if ( c < 0 || c == int( listSlideShow->count() ) - 1 ) return;
- QListBoxItem *item = listSlideShow->item( c );
+ TQListBoxItem *item = listSlideShow->item( c );
listSlideShow->takeItem( item );
listSlideShow->insertItem( item, c+1 );
listSlideShow->setCurrentItem( item );
@@ -394,7 +394,7 @@ void KPrDefineCustomSlideShow::slotMoveDownSlide()
void KPrDefineCustomSlideShow::slotMoveRemoveSlide()
{
// move all selected items from selected to available listbox
- QListBoxItem *item = listSlideShow->firstItem();
+ TQListBoxItem *item = listSlideShow->firstItem();
while ( item ) {
if ( item->isSelected() ) {
listSlideShow->takeItem( item );
@@ -406,7 +406,7 @@ void KPrDefineCustomSlideShow::slotMoveRemoveSlide()
void KPrDefineCustomSlideShow::slotMoveInsertSlide()
{
- QListBoxItem *item = listSlide->firstItem();
+ TQListBoxItem *item = listSlide->firstItem();
while ( item ) {
if ( item->isSelected() ) {
KPrCustomSlideShowItem * i = dynamic_cast<KPrCustomSlideShowItem *>( item );
@@ -421,10 +421,10 @@ void KPrDefineCustomSlideShow::slotMoveInsertSlide()
updateButton();
}
-QValueList<KPrPage *> KPrDefineCustomSlideShow::customSlides()
+TQValueList<KPrPage *> KPrDefineCustomSlideShow::customSlides()
{
- QValueList<KPrPage *> pages;
- QListBoxItem *item = listSlideShow->firstItem();
+ TQValueList<KPrPage *> pages;
+ TQListBoxItem *item = listSlideShow->firstItem();
while ( item )
{
KPrCustomSlideShowItem * i = dynamic_cast<KPrCustomSlideShowItem *>( item );
@@ -437,7 +437,7 @@ QValueList<KPrPage *> KPrDefineCustomSlideShow::customSlides()
return pages;
}
-QString KPrDefineCustomSlideShow::customSlideShowName() const
+TQString KPrDefineCustomSlideShow::customSlideShowName() const
{
return m_name->text();
}
@@ -445,7 +445,7 @@ QString KPrDefineCustomSlideShow::customSlideShowName() const
void KPrDefineCustomSlideShow::slotOk()
{
- if ( listNameCustomSlideShow.contains( m_name->text() ) )
+ if ( listNameCustomSlideShow.tqcontains( m_name->text() ) )
{
KMessageBox::error(this, i18n("Custom Slide Show name is already used."), i18n("Define Custom Slide Show"));
}