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/KPrPgConfDia.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/KPrPgConfDia.cpp')
-rw-r--r-- | kpresenter/KPrPgConfDia.cpp | 158 |
1 files changed, 79 insertions, 79 deletions
diff --git a/kpresenter/KPrPgConfDia.cpp b/kpresenter/KPrPgConfDia.cpp index ccb12719..378b8990 100644 --- a/kpresenter/KPrPgConfDia.cpp +++ b/kpresenter/KPrPgConfDia.cpp @@ -23,56 +23,56 @@ #include "KPrDocument.h" #include "KPrPage.h" -#include <qbuttongroup.h> -#include <qhbuttongroup.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qhbox.h> -#include <qvbox.h> -#include <qvgroupbox.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qpen.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qvaluelist.h> -#include <qvbuttongroup.h> -#include <qwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqhbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqhbox.h> +#include <tqvbox.h> +#include <tqvgroupbox.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpen.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqvaluelist.h> +#include <tqvbuttongroup.h> +#include <tqwhatsthis.h> #include <kcolorbutton.h> #include <kglobal.h> #include <klocale.h> #include <knuminput.h> -#include <qslider.h> +#include <tqslider.h> -KPrPgConfDia::KPrPgConfDia( QWidget* parent, KPrDocument* doc ) +KPrPgConfDia::KPrPgConfDia( TQWidget* tqparent, KPrDocument* doc ) : KDialogBase( KDialogBase::Tabbed, i18n("Configure Slide Show"), - Ok|Cancel, Ok, parent, "pgConfDia", true ), + Ok|Cancel, Ok, tqparent, "pgConfDia", true ), m_doc( doc ) { setupPageGeneral(); setupPageSlides(); - connect( this, SIGNAL( okClicked() ), this, SLOT( confDiaOk() ) ); - connect( this, SIGNAL( okClicked() ), this, SLOT( accept() ) ); + connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( confDiaOk() ) ); + connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( accept() ) ); } void KPrPgConfDia::setupPageGeneral() { - QFrame* generalPage = addPage( i18n("&General") ); - QWhatsThis::add( generalPage, i18n("<p>This dialog allows you to configure how the slideshow " + TQFrame* generalPage = addPage( i18n("&General") ); + TQWhatsThis::add( generalPage, i18n("<p>This dialog allows you to configure how the slideshow " "will be displayed, including whether the slides are " "automatically sequenced or manually controlled, and also " "allows you to configure a <em>drawing pen</em> that can " "be used during the display of the presentation to add " "additional information or to emphasise particular points.</p>") ); - QVBoxLayout *generalLayout = new QVBoxLayout( generalPage, 0, KDialog::spacingHint() ); + TQVBoxLayout *generalLayout = new TQVBoxLayout( generalPage, 0, KDialog::spacingHint() ); - QVButtonGroup *switchGroup = new QVButtonGroup( i18n("&Transition Type"), generalPage ); + TQVButtonGroup *switchGroup = new TQVButtonGroup( i18n("&Transition Type"), generalPage ); generalLayout->addWidget( switchGroup ); - QWhatsThis::add( switchGroup, i18n("<li><p>If you select <b>Manual transition to next step or slide</b> " + TQWhatsThis::add( switchGroup, i18n("<li><p>If you select <b>Manual transition to next step or slide</b> " "then each transition and effect on a slide, or transition from " "one slide to the next, will require an action. Typically this " "action will be a mouse click, or the space bar.</p></li>" @@ -83,14 +83,14 @@ void KPrPgConfDia::setupPageGeneral() "of sequencing is controlled using the slider below. This also " "enables the option to automatically loop back to the first " "slide after the last slide has been shown.</p></li>") ); - m_manualButton = new QRadioButton( i18n("&Manual transition to next step or slide"), switchGroup ); + m_manualButton = new TQRadioButton( i18n("&Manual transition to next step or slide"), switchGroup ); m_manualButton->setChecked( m_doc->spManualSwitch() ); - m_autoButton = new QRadioButton( i18n("&Automatic transition to next step or slide"), switchGroup ); + m_autoButton = new TQRadioButton( i18n("&Automatic transition to next step or slide"), switchGroup ); m_autoButton->setChecked( !m_doc->spManualSwitch() ); - infiniteLoop = new QCheckBox( i18n( "&Infinite loop" ), generalPage ); + infiniteLoop = new TQCheckBox( i18n( "&Infinite loop" ), generalPage ); generalLayout->addWidget( infiniteLoop ); - QWhatsThis::add( infiniteLoop, i18n("<p>If this checkbox is selected, then the slideshow " + TQWhatsThis::add( infiniteLoop, i18n("<p>If this checkbox is selected, then the slideshow " "will restart at the first slide after the last slide " "has been displayed. It is only available if the " "<b>Automatic transition to next step or slide</b> " @@ -98,22 +98,22 @@ void KPrPgConfDia::setupPageGeneral() "useful if you are running a promotional display.</p>") ); infiniteLoop->setEnabled( !m_doc->spManualSwitch() ); - connect( m_autoButton, SIGNAL( toggled(bool) ), infiniteLoop, SLOT( setEnabled(bool) ) ); - connect( m_autoButton, SIGNAL( toggled(bool) ), infiniteLoop, SLOT( setChecked(bool) ) ); + connect( m_autoButton, TQT_SIGNAL( toggled(bool) ), infiniteLoop, TQT_SLOT( setEnabled(bool) ) ); + connect( m_autoButton, TQT_SIGNAL( toggled(bool) ), infiniteLoop, TQT_SLOT( setChecked(bool) ) ); - endOfPresentationSlide = new QCheckBox( i18n( "&Show 'End of presentation' slide" ), generalPage ); + endOfPresentationSlide = new TQCheckBox( i18n( "&Show 'End of presentation' slide" ), generalPage ); generalLayout->addWidget( endOfPresentationSlide ); - QWhatsThis::add( endOfPresentationSlide, i18n("<p>If this checkbox is selected, when the slideshow " + TQWhatsThis::add( endOfPresentationSlide, i18n("<p>If this checkbox is selected, when the slideshow " "has finished a black slideshow containing the " "message 'End of presentation. Click to exit' will " "be shown.") ); endOfPresentationSlide->setChecked( m_doc->spShowEndOfPresentationSlide() ); endOfPresentationSlide->setDisabled( infiniteLoop->isEnabled() && getInfiniteLoop() ); - connect( infiniteLoop, SIGNAL( toggled(bool) ), endOfPresentationSlide, SLOT( setDisabled(bool) ) ); + connect( infiniteLoop, TQT_SIGNAL( toggled(bool) ), endOfPresentationSlide, TQT_SLOT( setDisabled(bool) ) ); - presentationDuration = new QCheckBox( i18n( "Measure presentation &duration" ), generalPage ); + presentationDuration = new TQCheckBox( i18n( "Measure presentation &duration" ), generalPage ); generalLayout->addWidget( presentationDuration ); - QWhatsThis::add( presentationDuration, i18n("<p>If this checkbox is selected, the time that " + TQWhatsThis::add( presentationDuration, i18n("<p>If this checkbox is selected, the time that " "each slide was displayed for, and the total time " "for the presentation will be measured.</p> " "<p>The times will be displayed at the end of the " @@ -126,27 +126,27 @@ void KPrPgConfDia::setupPageGeneral() // presentation pen (color and width) - QGroupBox* penGroup = new QGroupBox( 2, Qt::Horizontal, i18n("Presentation Pen") , generalPage ); + TQGroupBox* penGroup = new TQGroupBox( 2, Qt::Horizontal, i18n("Presentation Pen") , generalPage ); generalLayout->addWidget( penGroup ); - QWhatsThis::add( penGroup, i18n("<p>This part of the dialog allows you to configure the " + TQWhatsThis::add( penGroup, i18n("<p>This part of the dialog allows you to configure the " "<em>drawing mode</em>, which allows you to add additional " "information, emphasise particular content, or to correct " "errors during the presentation by drawing on the slides " "using the mouse.</p>" "<p>You can configure the color of the drawing pen and the " "width of the pen.</p>" ) ); - penGroup->layout()->setSpacing(KDialog::marginHint()); - penGroup->layout()->setMargin(KDialog::spacingHint()); - //QGridLayout *grid = new QGridLayout(penGroup->layout(), 3, 2 ); + penGroup->tqlayout()->setSpacing(KDialog::marginHint()); + penGroup->tqlayout()->setMargin(KDialog::spacingHint()); + //TQGridLayout *grid = new TQGridLayout(penGroup->tqlayout(), 3, 2 ); - QLabel* label = new QLabel( i18n( "Color:" ), penGroup ); + TQLabel* label = new TQLabel( i18n( "Color:" ), penGroup ); //grid->addWidget( label, 0, 0 ); penColor = new KColorButton( m_doc->presPen().color(), m_doc->presPen().color(), penGroup ); //grid->addWidget( penColor, 0, 1 ); - label = new QLabel( i18n( "Width:" ), penGroup ); + label = new TQLabel( i18n( "Width:" ), penGroup ); // grid->addWidget( label, 1, 0 ); - penWidth = new QSpinBox( 1, 10, 1, penGroup ); + penWidth = new TQSpinBox( 1, 10, 1, penGroup ); penWidth->setSuffix( i18n(" pt") ); penWidth->setValue( m_doc->presPen().width() ); //grid->addWidget( penWidth, 1, 1 ); @@ -156,33 +156,33 @@ void KPrPgConfDia::setupPageGeneral() void KPrPgConfDia::setupPageSlides() { - QFrame* slidesPage = addPage( i18n("&Slides") ); - QWhatsThis::add( slidesPage, i18n("<p>This dialog allows you to configure which slides " + TQFrame* slidesPage = addPage( i18n("&Slides") ); + TQWhatsThis::add( slidesPage, i18n("<p>This dialog allows you to configure which slides " "are used in the presentation. Slides that are not " "selected will not be displayed during the slide " "show.</p>") ); - QGridLayout *slidesLayout = new QGridLayout( slidesPage,7 , 2, 0, KDialog::spacingHint()); + TQGridLayout *slidesLayout = new TQGridLayout( slidesPage,7 , 2, 0, KDialog::spacingHint()); - QButtonGroup *group=new QVButtonGroup( slidesPage ); + TQButtonGroup *group=new TQVButtonGroup( slidesPage ); group->setRadioButtonExclusive( true ); - m_customSlide = new QRadioButton( i18n( "Custom slide show" ), group, "customslide" ); + m_customSlide = new TQRadioButton( i18n( "Custom slide show" ), group, "customslide" ); - connect( m_customSlide, SIGNAL( clicked () ), this, SLOT( radioButtonClicked() ) ); + connect( m_customSlide, TQT_SIGNAL( clicked () ), this, TQT_SLOT( radioButtonClicked() ) ); - QHBox *box = new QHBox( group ); + TQHBox *box = new TQHBox( group ); - m_labelCustomSlide = new QLabel( i18n( "Custom slide:" ),box ); + m_labelCustomSlide = new TQLabel( i18n( "Custom slide:" ),box ); - m_customSlideCombobox = new QComboBox( box ); + m_customSlideCombobox = new TQComboBox( box ); m_customSlideCombobox->insertStringList( m_doc->presentationList() ); - m_selectedSlide = new QRadioButton( i18n( "Selected pages:" ), group, "selectedslide" ); + m_selectedSlide = new TQRadioButton( i18n( "Selected pages:" ), group, "selectedslide" ); slidesLayout->addMultiCellWidget( group, 0,2,0,1 ); - connect( m_selectedSlide, SIGNAL( clicked () ), this, SLOT( radioButtonClicked() ) ); + connect( m_selectedSlide, TQT_SIGNAL( clicked () ), this, TQT_SLOT( radioButtonClicked() ) ); - slides = new QListView( slidesPage ); + slides = new TQListView( slidesPage ); slidesLayout->addMultiCellWidget( slides, 3, 3, 0, 1 ); slidesLayout->setRowStretch( 3, 10 ); slides->addColumn( i18n("Slide") ); @@ -192,24 +192,24 @@ void KPrPgConfDia::setupPageSlides() for ( int i = m_doc->getPageNums() - 1; i >= 0; --i ) { KPrPage *page=m_doc->pageList().at( i ); - QCheckListItem* item = new QCheckListItem( slides, + TQCheckListItem* item = new TQCheckListItem( slides, page->pageTitle(), - QCheckListItem::CheckBox ); + TQCheckListItem::CheckBox ); item->setOn( page->isSlideSelected() ); } - QHBox* buttonGroup = new QHBox( slidesPage ); + TQHBox* buttonGroup = new TQHBox( slidesPage ); buttonGroup->setSpacing( KDialog::spacingHint() ); - QPushButton* selectAllButton = new QPushButton( i18n( "Select &All" ), buttonGroup ); - connect( selectAllButton, SIGNAL( clicked() ), this, SLOT( selectAllSlides() ) ); + TQPushButton* selectAllButton = new TQPushButton( i18n( "Select &All" ), buttonGroup ); + connect( selectAllButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( selectAllSlides() ) ); - QPushButton* deselectAllButton = new QPushButton( i18n( "&Deselect All" ), buttonGroup ); - connect( deselectAllButton, SIGNAL( clicked() ), this, SLOT( deselectAllSlides() ) ); + TQPushButton* deselectAllButton = new TQPushButton( i18n( "&Deselect All" ), buttonGroup ); + connect( deselectAllButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deselectAllSlides() ) ); - QWidget* spacer = new QWidget( buttonGroup ); + TQWidget* spacer = new TQWidget( buttonGroup ); - spacer->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) ); + spacer->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) ); slidesLayout->addMultiCellWidget( buttonGroup, 4, 4, 0, 1 ); if ( !m_doc->presentationName().isEmpty() ) @@ -269,19 +269,19 @@ bool KPrPgConfDia::getPresentationDuration() const return presentationDuration->isChecked(); } -QPen KPrPgConfDia::getPen() const +TQPen KPrPgConfDia::getPen() const { - return QPen( penColor->color(), penWidth->value() ); + return TQPen( penColor->color(), penWidth->value() ); } -QValueList<bool> KPrPgConfDia::getSelectedSlides() const +TQValueList<bool> KPrPgConfDia::getSelectedSlides() const { - QValueList<bool> selectedSlides; + TQValueList<bool> selectedSlides; - QListViewItem *item = slides->firstChild(); + TQListViewItem *item = slides->firstChild(); while( item ) { - QCheckListItem *checkItem = dynamic_cast<QCheckListItem*>( item ); + TQCheckListItem *checkItem = dynamic_cast<TQCheckListItem*>( item ); bool selected = false; if( checkItem ) selected = checkItem->isOn(); item = item->nextSibling(); @@ -292,10 +292,10 @@ QValueList<bool> KPrPgConfDia::getSelectedSlides() const void KPrPgConfDia::selectAllSlides() { - QListViewItem *item = slides->firstChild(); + TQListViewItem *item = slides->firstChild(); while( item ) { - QCheckListItem *checkItem = dynamic_cast<QCheckListItem*>( item ); + TQCheckListItem *checkItem = dynamic_cast<TQCheckListItem*>( item ); if( checkItem ) checkItem->setOn( true ); item = item->nextSibling(); } @@ -303,21 +303,21 @@ void KPrPgConfDia::selectAllSlides() void KPrPgConfDia::deselectAllSlides() { - QListViewItem *item = slides->firstChild(); + TQListViewItem *item = slides->firstChild(); while( item ) { - QCheckListItem *checkItem = dynamic_cast<QCheckListItem*>( item ); + TQCheckListItem *checkItem = dynamic_cast<TQCheckListItem*>( item ); if( checkItem ) checkItem->setOn( false ); item = item->nextSibling(); } } -QString KPrPgConfDia::presentationName() const +TQString KPrPgConfDia::presentationName() const { if ( m_customSlide->isChecked() ) return m_customSlideCombobox->currentText(); else - return QString::null; + return TQString(); } #include "KPrGradient.h" |