diff options
Diffstat (limited to 'kspread/dialogs/kspread_dlg_conditional.cc')
-rw-r--r-- | kspread/dialogs/kspread_dlg_conditional.cc | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/kspread/dialogs/kspread_dlg_conditional.cc b/kspread/dialogs/kspread_dlg_conditional.cc index e9289d3f..b19900c1 100644 --- a/kspread/dialogs/kspread_dlg_conditional.cc +++ b/kspread/dialogs/kspread_dlg_conditional.cc @@ -41,28 +41,28 @@ #include <KoGlobal.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> using namespace KSpread; -ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +ConditionalWidget::ConditionalWidget( TQWidget* tqparent, const char* name, WFlags fl ) + : TQWidget( tqparent, name, fl ) { - QGridLayout * Form1Layout = new QGridLayout( this, 1, 1, 11, 6, "Form1Layout"); + TQGridLayout * Form1Layout = new TQGridLayout( this, 1, 1, 11, 6, "Form1Layout"); - QGroupBox * groupBox1_3 = new QGroupBox( this, "groupBox1_3" ); + TQGroupBox * groupBox1_3 = new TQGroupBox( this, "groupBox1_3" ); groupBox1_3->setColumnLayout(0, Qt::Vertical ); - groupBox1_3->layout()->setSpacing( KDialog::spacingHint() ); - groupBox1_3->layout()->setMargin( KDialog::marginHint() ); - QGridLayout * groupBox1_3Layout = new QGridLayout( groupBox1_3->layout() ); - groupBox1_3Layout->setAlignment( Qt::AlignTop ); + groupBox1_3->tqlayout()->setSpacing( KDialog::spacingHint() ); + groupBox1_3->tqlayout()->setMargin( KDialog::marginHint() ); + TQGridLayout * groupBox1_3Layout = new TQGridLayout( groupBox1_3->tqlayout() ); + groupBox1_3Layout->tqsetAlignment( TQt::AlignTop ); - QLabel * textLabel1_3 = new QLabel( groupBox1_3, "textLabel1_3" ); + TQLabel * textLabel1_3 = new TQLabel( groupBox1_3, "textLabel1_3" ); groupBox1_3Layout->addWidget( textLabel1_3, 0, 0 ); - m_condition_3 = new QComboBox( false, groupBox1_3, "m_condition_3" ); + m_condition_3 = new TQComboBox( false, groupBox1_3, "m_condition_3" ); groupBox1_3Layout->addWidget( m_condition_3, 0, 1 ); m_firstValue_3 = new KLineEdit( groupBox1_3, "m_firstValue_3" ); @@ -73,38 +73,38 @@ ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags m_secondValue_3->setEnabled( false ); groupBox1_3Layout->addWidget( m_secondValue_3, 0, 3 ); - m_style_3 = new QComboBox( false, groupBox1_3, "m_style_3" ); + m_style_3 = new TQComboBox( false, groupBox1_3, "m_style_3" ); m_style_3->setEnabled( false ); groupBox1_3Layout->addWidget( m_style_3, 1, 1 ); - QLabel * textLabel2_3 = new QLabel( groupBox1_3, "textLabel2_3" ); + TQLabel * textLabel2_3 = new TQLabel( groupBox1_3, "textLabel2_3" ); groupBox1_3Layout->addWidget( textLabel2_3, 1, 0 ); - QSpacerItem * spacer = new QSpacerItem( 41, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem * spacer = new TQSpacerItem( 41, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); groupBox1_3Layout->addItem( spacer, 1, 2 ); - QSpacerItem * spacer_2 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem * spacer_2 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); groupBox1_3Layout->addItem( spacer_2, 1, 3 ); Form1Layout->addWidget( groupBox1_3, 2, 0 ); - QGroupBox * groupBox1_2 = new QGroupBox( this, "groupBox1_2" ); + TQGroupBox * groupBox1_2 = new TQGroupBox( this, "groupBox1_2" ); groupBox1_2->setColumnLayout(0, Qt::Vertical ); - groupBox1_2->layout()->setSpacing( KDialog::spacingHint() ); - groupBox1_2->layout()->setMargin( KDialog::marginHint() ); + groupBox1_2->tqlayout()->setSpacing( KDialog::spacingHint() ); + groupBox1_2->tqlayout()->setMargin( KDialog::marginHint() ); - QGridLayout * groupBox1_2Layout = new QGridLayout( groupBox1_2->layout() ); - groupBox1_2Layout->setAlignment( Qt::AlignTop ); + TQGridLayout * groupBox1_2Layout = new TQGridLayout( groupBox1_2->tqlayout() ); + groupBox1_2Layout->tqsetAlignment( TQt::AlignTop ); - QLabel * textLabel1_2 = new QLabel( groupBox1_2, "textLabel1_2" ); + TQLabel * textLabel1_2 = new TQLabel( groupBox1_2, "textLabel1_2" ); groupBox1_2Layout->addWidget( textLabel1_2, 0, 0 ); - QLabel * textLabel2_2 = new QLabel( groupBox1_2, "textLabel2_2" ); + TQLabel * textLabel2_2 = new TQLabel( groupBox1_2, "textLabel2_2" ); groupBox1_2Layout->addWidget( textLabel2_2, 1, 0 ); - m_condition_2 = new QComboBox( false, groupBox1_2, "m_condition_2" ); + m_condition_2 = new TQComboBox( false, groupBox1_2, "m_condition_2" ); groupBox1_2Layout->addWidget( m_condition_2, 0, 1 ); - m_style_2 = new QComboBox( false, groupBox1_2, "m_style_2" ); + m_style_2 = new TQComboBox( false, groupBox1_2, "m_style_2" ); m_style_2->setEnabled( false ); groupBox1_2Layout->addWidget( m_style_2, 1, 1 ); @@ -117,30 +117,30 @@ ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags groupBox1_2Layout->addWidget( m_secondValue_2, 0, 3 ); - QSpacerItem * spacer_3 = new QSpacerItem( 41, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem * spacer_3 = new TQSpacerItem( 41, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); groupBox1_2Layout->addItem( spacer_3, 1, 2 ); - QSpacerItem * spacer_4 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem * spacer_4 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); groupBox1_2Layout->addItem( spacer_4, 1, 3 ); Form1Layout->addWidget( groupBox1_2, 1, 0 ); - QGroupBox * groupBox1_1 = new QGroupBox( this, "groupBox1_1" ); + TQGroupBox * groupBox1_1 = new TQGroupBox( this, "groupBox1_1" ); groupBox1_1->setColumnLayout(0, Qt::Vertical ); - groupBox1_1->layout()->setSpacing( KDialog::spacingHint() ); - groupBox1_1->layout()->setMargin( KDialog::marginHint() ); + groupBox1_1->tqlayout()->setSpacing( KDialog::spacingHint() ); + groupBox1_1->tqlayout()->setMargin( KDialog::marginHint() ); - QGridLayout * groupBox1_1Layout = new QGridLayout( groupBox1_1->layout() ); - groupBox1_1Layout->setAlignment( Qt::AlignTop ); + TQGridLayout * groupBox1_1Layout = new TQGridLayout( groupBox1_1->tqlayout() ); + groupBox1_1Layout->tqsetAlignment( TQt::AlignTop ); - QLabel * textLabel1_1 = new QLabel( groupBox1_1, "textLabel1_2_2" ); + TQLabel * textLabel1_1 = new TQLabel( groupBox1_1, "textLabel1_2_2" ); groupBox1_1Layout->addWidget( textLabel1_1, 0, 0 ); - QLabel * textLabel2_1 = new QLabel( groupBox1_1, "textLabel2_2_2" ); + TQLabel * textLabel2_1 = new TQLabel( groupBox1_1, "textLabel2_2_2" ); groupBox1_1Layout->addWidget( textLabel2_1, 1, 0 ); - m_condition_1 = new QComboBox( false, groupBox1_1, "m_condition_1" ); + m_condition_1 = new TQComboBox( false, groupBox1_1, "m_condition_1" ); groupBox1_1Layout->addWidget( m_condition_1, 0, 1 ); - m_style_1 = new QComboBox( false, groupBox1_1, "m_style_1" ); + m_style_1 = new TQComboBox( false, groupBox1_1, "m_style_1" ); m_style_1->setEnabled( false ); groupBox1_1Layout->addWidget( m_style_1, 1, 1 ); @@ -152,16 +152,16 @@ ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags m_secondValue_1->setEnabled( false ); groupBox1_1Layout->addWidget( m_secondValue_1, 0, 3 ); - QSpacerItem * spacer_5 = new QSpacerItem( 41, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem * spacer_5 = new TQSpacerItem( 41, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); groupBox1_1Layout->addItem( spacer_5, 1, 2 ); - QSpacerItem * spacer_6 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem * spacer_6 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); groupBox1_1Layout->addItem( spacer_6, 1, 3 ); Form1Layout->addWidget( groupBox1_1, 0, 0 ); - resize( QSize(702, 380).expandedTo( minimumSizeHint() ) ); + resize( TQSize(702, 380).expandedTo( tqminimumSizeHint() ) ); clearWState( WState_Polished ); - QStringList list; + TQStringList list; list += i18n( "<none>" ); list += i18n( "equal to" ); list += i18n( "greater than" ); @@ -189,16 +189,16 @@ ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags textLabel2_2->setText( i18n( "Cell style" ) ); textLabel2_3->setText( i18n( "Cell style" ) ); - connect( m_condition_1, SIGNAL( highlighted( const QString & ) ), this, SLOT( slotTextChanged1( const QString & ) ) ); - connect( m_condition_2, SIGNAL( highlighted( const QString & ) ), this, SLOT( slotTextChanged2( const QString & ) ) ); - connect( m_condition_3, SIGNAL( highlighted( const QString & ) ), this, SLOT( slotTextChanged3( const QString & ) ) ); + connect( m_condition_1, TQT_SIGNAL( highlighted( const TQString & ) ), this, TQT_SLOT( slotTextChanged1( const TQString & ) ) ); + connect( m_condition_2, TQT_SIGNAL( highlighted( const TQString & ) ), this, TQT_SLOT( slotTextChanged2( const TQString & ) ) ); + connect( m_condition_3, TQT_SIGNAL( highlighted( const TQString & ) ), this, TQT_SLOT( slotTextChanged3( const TQString & ) ) ); } ConditionalWidget::~ConditionalWidget() { } -void ConditionalWidget::slotTextChanged1( const QString & text ) +void ConditionalWidget::slotTextChanged1( const TQString & text ) { if ( text == i18n( "<none>" ) ) { @@ -223,7 +223,7 @@ void ConditionalWidget::slotTextChanged1( const QString & text ) } } -void ConditionalWidget::slotTextChanged2( const QString & text ) +void ConditionalWidget::slotTextChanged2( const TQString & text ) { if ( text == i18n( "<none>" ) ) { @@ -248,7 +248,7 @@ void ConditionalWidget::slotTextChanged2( const QString & text ) } } -void ConditionalWidget::slotTextChanged3( const QString & text ) +void ConditionalWidget::slotTextChanged3( const TQString & text ) { if ( text == i18n( "<none>" ) ) { @@ -276,22 +276,22 @@ void ConditionalWidget::slotTextChanged3( const QString & text ) * ConditionalDialog * Sets conditional cell formattings. */ -ConditionalDialog::ConditionalDialog( View * parent, const char * name, - const QRect & marker ) - : KDialogBase( parent, name, true, "", KDialogBase::Ok | KDialogBase::Cancel, +ConditionalDialog::ConditionalDialog( View * tqparent, const char * name, + const TQRect & marker ) + : KDialogBase( tqparent, name, true, "", KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, false ), - m_view( parent ), + m_view( tqparent ), m_dlg( new ConditionalWidget( this ) ), m_marker( marker ) { - QStringList list( m_view->doc()->styleManager()->styleNames() ); + TQStringList list( m_view->doc()->styleManager()->styleNames() ); m_dlg->m_style_1->insertStringList( list ); m_dlg->m_style_2->insertStringList( list ); m_dlg->m_style_3->insertStringList( list ); setCaption( i18n( "Conditional Cell Attributes" ) ); - setButtonBoxOrientation( Vertical ); + setButtonBoxOrientation(Qt::Vertical ); setMainWidget( m_dlg ); init(); @@ -299,13 +299,13 @@ ConditionalDialog::ConditionalDialog( View * parent, const char * name, void ConditionalDialog::init() { - QValueList<Conditional> conditionList; - QValueList<Conditional> otherList; + TQValueList<Conditional> conditionList; + TQValueList<Conditional> otherList; bool found; int numCondition; - QValueList<Conditional>::iterator it1; - QValueList<Conditional>::iterator it2; + TQValueList<Conditional>::iterator it1; + TQValueList<Conditional>::iterator it2; Cell * obj = m_view->activeSheet()->cellAt( m_marker.left(), m_marker.top() ); @@ -415,11 +415,11 @@ void ConditionalDialog::init() void ConditionalDialog::init( Conditional const & tmp, int numCondition ) { kdDebug() << "Adding " << numCondition << endl; - QComboBox * cb = 0; - QComboBox * sb = 0; + TQComboBox * cb = 0; + TQComboBox * sb = 0; KLineEdit * kl1 = 0; KLineEdit * kl2 = 0; - QString value; + TQString value; switch( numCondition ) { @@ -517,7 +517,7 @@ void ConditionalDialog::init( Conditional const & tmp, int numCondition ) } } -Conditional::Type ConditionalDialog::typeOfCondition( QComboBox const * const cb ) const +Conditional::Type ConditionalDialog::typeOfCondition( TQComboBox const * const cb ) const { Conditional::Type result = Conditional::None; switch( cb->currentItem() ) @@ -593,9 +593,9 @@ bool ConditionalDialog::checkInputData() return true; } -bool ConditionalDialog::getCondition( Conditional & newCondition, const QComboBox * cb, +bool ConditionalDialog::getCondition( Conditional & newCondition, const TQComboBox * cb, const KLineEdit * edit1, const KLineEdit * edit2, - const QComboBox * sb, Style * style ) + const TQComboBox * sb, Style * style ) { if ( !cb->isEnabled() ) return false; @@ -607,9 +607,9 @@ bool ConditionalDialog::getCondition( Conditional & newCondition, const QComboBo bool ok = false; double d1 = edit1->text().toDouble( &ok ); double d2 = 0.0; - QString * s1 = 0; - QString * s2 = 0; - QString * sn = 0; + TQString * s1 = 0; + TQString * s2 = 0; + TQString * sn = 0; if ( ok ) { @@ -620,12 +620,12 @@ bool ConditionalDialog::getCondition( Conditional & newCondition, const QComboBo else { d1 = 0.0; - s1 = new QString( edit1->text() ); + s1 = new TQString( edit1->text() ); if ( edit2->isEnabled() ) - s2 = new QString( edit2->text() ); + s2 = new TQString( edit2->text() ); } - sn = new QString( sb->currentText() ); + sn = new TQString( sb->currentText() ); newCondition.val1 = d1; newCondition.val2 = d2; @@ -651,7 +651,7 @@ void ConditionalDialog::slotOk() m_view->doc()->emitBeginOperation( false ); StyleManager * manager = m_view->doc()->styleManager(); - QValueList<Conditional> newList; + TQValueList<Conditional> newList; Conditional newCondition; |