diff options
Diffstat (limited to 'kpercentage/kpercentage/kpercentmain.cpp')
-rw-r--r-- | kpercentage/kpercentage/kpercentmain.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/kpercentage/kpercentage/kpercentmain.cpp b/kpercentage/kpercentage/kpercentmain.cpp index 93ed2cbc..67f4a687 100644 --- a/kpercentage/kpercentage/kpercentmain.cpp +++ b/kpercentage/kpercentage/kpercentmain.cpp @@ -55,15 +55,15 @@ KPercentMain::KPercentMain( TQWidget *parent, const char *name ) : KIntValidator *validLine = new KIntValidator( this ); line_edit_percentage = new TQLineEdit( this, "line_edit_percentage" ); - line_edit_percentage->tqsetAlignment( int( TQLineEdit::AlignHCenter ) ); + line_edit_percentage->setAlignment( int( TQLineEdit::AlignHCenter ) ); line_edit_percentage->setValidator( validLine ); line_edit_basevalue = new TQLineEdit( this, "line_edit_basevalue" ); - line_edit_basevalue->tqsetAlignment( int( TQLineEdit::AlignHCenter ) ); + line_edit_basevalue->setAlignment( int( TQLineEdit::AlignHCenter ) ); line_edit_basevalue->setValidator( validLine ); line_edit_percentvalue = new TQLineEdit( this, "line_edit_percentvalue" ); - line_edit_percentvalue->tqsetAlignment( int( TQLineEdit::AlignHCenter ) ); + line_edit_percentvalue->setAlignment( int( TQLineEdit::AlignHCenter ) ); line_edit_percentvalue->setValidator( validLine ); progress_bar_count = new TQProgressBar( this, "progress_bar_count" ); @@ -119,51 +119,51 @@ KPercentMain::KPercentMain( TQWidget *parent, const char *name ) : label_count->setBackgroundOrigin( TQDialog::ParentOrigin ); ////// - // begin tqlayouting + // begin layouting ////// - TQVBoxLayout *main_tqlayout = new TQVBoxLayout ( this, 0, -1, "main_tqlayout" ); - main_tqlayout->setMargin( 20 ); - main_tqlayout->setSpacing( 10 ); + TQVBoxLayout *main_layout = new TQVBoxLayout ( this, 0, -1, "main_layout" ); + main_layout->setMargin( 20 ); + main_layout->setSpacing( 10 ); - TQHBoxLayout *label_number_tqlayout = new TQHBoxLayout ( main_tqlayout, -1, "label_number_tqlayout" ); - label_number_tqlayout->addWidget( label_number ); - label_number_tqlayout->addStretch(); + TQHBoxLayout *label_number_layout = new TQHBoxLayout ( main_layout, -1, "label_number_layout" ); + label_number_layout->addWidget( label_number ); + label_number_layout->addStretch(); - TQHBoxLayout *line_edit_tqlayout = new TQHBoxLayout ( main_tqlayout, -1, "line_edit_tqlayout" ); + TQHBoxLayout *line_edit_layout = new TQHBoxLayout ( main_layout, -1, "line_edit_layout" ); - line_edit_tqlayout->addWidget( line_edit_percentage ); - line_edit_tqlayout->addWidget( label_1 ); - line_edit_tqlayout->addWidget( line_edit_basevalue ); - line_edit_tqlayout->addWidget( label_2 ); - line_edit_tqlayout->addWidget( line_edit_percentvalue ); - line_edit_tqlayout->addStretch(); + line_edit_layout->addWidget( line_edit_percentage ); + line_edit_layout->addWidget( label_1 ); + line_edit_layout->addWidget( line_edit_basevalue ); + line_edit_layout->addWidget( label_2 ); + line_edit_layout->addWidget( line_edit_percentvalue ); + line_edit_layout->addStretch(); - main_tqlayout->addStretch(); + main_layout->addStretch(); - TQHBoxLayout *bottom_tqlayout = new TQHBoxLayout( main_tqlayout, -1, "bottom_tqlayout" ); + TQHBoxLayout *bottom_layout = new TQHBoxLayout( main_layout, -1, "bottom_layout" ); - TQVBoxLayout *current_state_tqlayout = new TQVBoxLayout ( bottom_tqlayout, -1, "current_state_tqlayout" ); + TQVBoxLayout *current_state_layout = new TQVBoxLayout ( bottom_layout, -1, "current_state_layout" ); - TQHBoxLayout *label_count_tqlayout = new TQHBoxLayout ( current_state_tqlayout, -1, "label_count_tqlayout" ); - label_count_tqlayout->addWidget( label_count ); - label_count_tqlayout->addStretch(); + TQHBoxLayout *label_count_layout = new TQHBoxLayout ( current_state_layout, -1, "label_count_layout" ); + label_count_layout->addWidget( label_count ); + label_count_layout->addStretch(); - current_state_tqlayout->addSpacing( 10 ); - current_state_tqlayout->addWidget( progress_bar_count ); + current_state_layout->addSpacing( 10 ); + current_state_layout->addWidget( progress_bar_count ); - TQHBoxLayout *right_wrong_tqlayout = new TQHBoxLayout( current_state_tqlayout, -1, "right_wrong_tqlayout" ); + TQHBoxLayout *right_wrong_layout = new TQHBoxLayout( current_state_layout, -1, "right_wrong_layout" ); - right_wrong_tqlayout->addWidget( label_right ); - right_wrong_tqlayout->addWidget( progress_bar_right_wrong ); - right_wrong_tqlayout->addWidget( label_wrong ); + right_wrong_layout->addWidget( label_right ); + right_wrong_layout->addWidget( progress_bar_right_wrong ); + right_wrong_layout->addWidget( label_wrong ); - bottom_tqlayout->addSpacing( 40 ); + bottom_layout->addSpacing( 40 ); - TQVBoxLayout *button_tqlayout = new TQVBoxLayout ( bottom_tqlayout, -1, "button_tqlayout" ); + TQVBoxLayout *button_layout = new TQVBoxLayout ( bottom_layout, -1, "button_layout" ); - button_tqlayout->addWidget( push_button_apply ); - button_tqlayout->addSpacing( 10 ); - button_tqlayout->addWidget( push_button_cancel ); + button_layout->addWidget( push_button_apply ); + button_layout->addSpacing( 10 ); + button_layout->addWidget( push_button_cancel ); // END LAYOUT // -------------------------------------------------------- @@ -227,7 +227,7 @@ void KPercentMain::newTask() { selection = selected_type; // or take the preselected one } - // set the right line_edit_tqlayout for input + // set the right line_edit_layout for input switch ( selection ) { case SEL_PERCENTAGE: @@ -244,7 +244,7 @@ void KPercentMain::newTask() showNumbers(); // delete this one line_edit_input->clear(); - // make the line_edit_tqlayout accessable + // make the line_edit_layout accessable line_edit_input->setFocusPolicy( StrongFocus ); // set the focus on it line_edit_input->setFocus(); @@ -258,7 +258,7 @@ bool KPercentMain::validateTask() return ( getPercentage() * getBasevalue() == 100 * getPercentvalue() ); } -/** gets the numbers from the line_edit_tqlayouts */ +/** gets the numbers from the line_edit_layouts */ int KPercentMain::getPercentage() { return line_edit_percentage->text().toInt(); // check for valid input is omitted (slotApplyInput) @@ -310,7 +310,7 @@ void KPercentMain::slotApplyInput() } } -/** inserts the numbers of a new task in the line_edit_tqlayouts */ +/** inserts the numbers of a new task in the line_edit_layouts */ void KPercentMain::showNumbers() { line_edit_percentage->setText( TQString::number( percentage[ count ] ) ); |