diff options
Diffstat (limited to 'kbruch/src/mainqtwidget.cpp')
-rw-r--r-- | kbruch/src/mainqtwidget.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/kbruch/src/mainqtwidget.cpp b/kbruch/src/mainqtwidget.cpp index 3ac59d46..7212f56a 100644 --- a/kbruch/src/mainqtwidget.cpp +++ b/kbruch/src/mainqtwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - mainqtwidget.cpp - The main Qt/KDE window + mainqtwidget.cpp - The main TQt/KDE window ------------------- begin : Tue Mar 16 00:00:00 CET 2003 copyright : (C) 2003-2004 by Sebastian Stein @@ -46,10 +46,10 @@ /* ------ public member functions ------ */ -MainQtWidget::MainQtWidget() +MainTQtWidget::MainTQtWidget() { #ifdef DEBUG - kdDebug() << "constructor MainQtWidget" << endl; + kdDebug() << "constructor MainTQtWidget" << endl; #endif // get the settings @@ -62,7 +62,7 @@ MainQtWidget::MainQtWidget() // we split the main view into 2 parts, one for the tasks, one for the // statistics - TQSplitter* splitter = new TQSplitter(TQSplitter::Horizontal, this,"TQSplitter"); + TQSplitter* splitter = new TQSplitter(Qt::Horizontal, this,TQSPLITTER_OBJECT_NAME_STRING); setCentralWidget(splitter); // the iconlist, where the user can choose the different exercises @@ -109,21 +109,21 @@ MainQtWidget::MainQtWidget() #if (KDE_VERSION_MINOR>=3) && (KDE_VERSION_MAJOR>=3) #else - resize(TQSize(QMAX(toolBar()->sizeHint().width(), sizeHint().width()), sizeHint().height())); + resize(TQSize(TQMAX(toolBar()->tqsizeHint().width(), tqsizeHint().width()), tqsizeHint().height())); #endif // now show the last exercise m_exercises->showPage(SettingsClass::activeExercise()); slotAboutToShowPage(m_exercises->pageWidget(m_exercises->activePageIndex())); } -MainQtWidget::~MainQtWidget() +MainTQtWidget::~MainTQtWidget() { } /* ------ private member functions ------ */ -void MainQtWidget::readOptions() +void MainTQtWidget::readOptions() { m_addSub = SettingsClass::addsub(); m_mulDiv = SettingsClass::muldiv(); @@ -138,7 +138,7 @@ void MainQtWidget::readOptions() } } -void MainQtWidget::writeOptions() +void MainTQtWidget::writeOptions() { SettingsClass::setActiveExercise(m_exercises->activePageIndex()); @@ -151,23 +151,23 @@ void MainQtWidget::writeOptions() SettingsClass::writeConfig(); } -void MainQtWidget::setupActions() +void MainTQtWidget::setupActions() { // new task action m_NewTaskAction = new KAction(i18n("&New"), "filenew", KStdAccel::shortcut(KStdAccel::New), - this, TQT_SLOT(NewTask()), + TQT_TQOBJECT(this), TQT_SLOT(NewTask()), actionCollection(), "NewTask"); // quit action - KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); // - KStdAction::preferences(this, TQT_SLOT( slotPrefs() ), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotPrefs() ), actionCollection()); // a label just describing the Number of terms ComboBox m_NrOfTermsLabel = new TQLabel(i18n("Terms:"), 0, "kde toolbar widget"); m_NrOfTermsLabelAction = new KWidgetAction(m_NrOfTermsLabel, i18n("Terms:"), ALT+Key_E, - this, TQT_SLOT(NrOfTermsBoxSlot()), + TQT_TQOBJECT(this), TQT_SLOT(NrOfTermsBoxSlot()), actionCollection(), "NrOfTermsLabelAction"); // the ComboBox holding possible values for term number @@ -179,15 +179,15 @@ void MainQtWidget::setupActions() m_NrOfTermsBox->setCurrentItem(m_nrRatios - 2); TQToolTip::add( m_NrOfTermsBox, i18n( "The number of terms you want" ) ); TQWhatsThis::add( m_NrOfTermsBox, i18n( "Choose the number of terms (2, 3, 4 or 5) you want for calculating fractions." ) ); - m_NrOfTermsBoxAction = new KWidgetAction(m_NrOfTermsBox, i18n("Number of Terms"), ALT+Key_E, this, TQT_SLOT(NrOfTermsBoxSlot()), actionCollection(), "NrOfTermsBoxAction"); + m_NrOfTermsBoxAction = new KWidgetAction(m_NrOfTermsBox, i18n("Number of Terms"), ALT+Key_E, TQT_TQOBJECT(this), TQT_SLOT(NrOfTermsBoxSlot()), actionCollection(), "NrOfTermsBoxAction"); // now connect the ComboBox's signal textChanged() to the slot function - TQObject::connect(m_NrOfTermsBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(NrOfTermsBoxSlot())); + TQObject::connect(m_NrOfTermsBox, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(NrOfTermsBoxSlot())); // a label just describing the max. main denominator ComboBox m_MaxMainDenominatorLabel = new TQLabel(i18n("Max. main denominator:"), 0, "kde toolbar widget"); m_MaxMainDenominatorLabelAction = new KWidgetAction(m_MaxMainDenominatorLabel, i18n("Max. main denominator:"), ALT+Key_D, - this, TQT_SLOT(MaxMainDenominatorBoxSlot()), + TQT_TQOBJECT(this), TQT_SLOT(MaxMainDenominatorBoxSlot()), actionCollection(), "MaxMainDenominatorLabelAction"); // the ComboBox holding possible values for the max. main denominator @@ -209,7 +209,7 @@ void MainQtWidget::setupActions() case 50 : m_MaxMainDenominatorBox->setCurrentItem(3); break; } - m_MaxMainDenominatorBoxAction = new KWidgetAction(m_MaxMainDenominatorBox, i18n("Maximal Main Denominator"), ALT+Key_D, this, TQT_SLOT(MaxMainDenominatorBoxSlot()), actionCollection(), "MaxMainDenominatorBoxAction"); + m_MaxMainDenominatorBoxAction = new KWidgetAction(m_MaxMainDenominatorBox, i18n("Maximal Main Denominator"), ALT+Key_D, TQT_TQOBJECT(this), TQT_SLOT(MaxMainDenominatorBoxSlot()), actionCollection(), "MaxMainDenominatorBoxAction"); // now connect the ComboBox's signal textChanged() to the slot function TQObject::connect(m_MaxMainDenominatorBox, TQT_SIGNAL(activated(int)), @@ -218,7 +218,7 @@ void MainQtWidget::setupActions() // a label just describing the operation ComboBox m_OperationLabel = new TQLabel(i18n("Operations:"), 0, "kde toolbar widget"); m_OperationLabelAction = new KWidgetAction(m_OperationLabel, i18n("Operations:"), ALT+Key_O, - this, TQT_SLOT(OperationBoxSlot()), + TQT_TQOBJECT(this), TQT_SLOT(OperationBoxSlot()), actionCollection(), "OperationLabelAction"); // the ComboBox holding possible combinations for operations @@ -236,14 +236,14 @@ void MainQtWidget::setupActions() } TQToolTip::add( m_OperationBox, i18n( "The operations you want" ) ); TQWhatsThis::add( m_OperationBox, i18n( "Choose the type of operations you want for calculating fractions: Addition/Substraction, Multiplication/Division or All Operations Mixed. If you choose All Operations Mixed, the program will randomly choose addition, substraction, multiplication and/or division." ) ); - m_OperationBoxAction = new KWidgetAction(m_OperationBox, i18n("Operations:"), ALT+Key_O, this, TQT_SLOT(OperationBoxSlot()), actionCollection(), "OperationBoxAction"); + m_OperationBoxAction = new KWidgetAction(m_OperationBox, i18n("Operations:"), ALT+Key_O, TQT_TQOBJECT(this), TQT_SLOT(OperationBoxSlot()), actionCollection(), "OperationBoxAction"); // now connect the ComboBox's signal textChanged() to the slot function TQObject::connect(m_OperationBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(OperationBoxSlot())); #if (KDE_VERSION_MINOR>=3) && (KDE_VERSION_MAJOR>=3) if (!initialGeometrySet()) - resize( TQSize(725, 330).expandedTo(minimumSizeHint())); + resize( TQSize(725, 330).expandedTo(tqminimumSizeHint())); setupGUI(ToolBar | Keys | StatusBar | Create); setAutoSaveSettings(); #endif @@ -252,10 +252,10 @@ void MainQtWidget::setupActions() /* ------ private slots ------ */ -void MainQtWidget::NewTask() +void MainTQtWidget::NewTask() { #ifdef DEBUG - kdDebug() << "NewTask MainQtWidget" << endl; + kdDebug() << "NewTask MainTQtWidget" << endl; kdDebug() << "pageIndex(m_taskview): " << m_exercises->pageIndex(m_taskview) << endl; kdDebug() << "pageIndex(m_exerciseCompare): " << m_exercises->pageIndex(m_exerciseCompare) << endl; kdDebug() << "pageIndex(m_exerciseConvert): " << m_exercises->pageIndex(m_exerciseConvert) << endl; @@ -307,10 +307,10 @@ void MainQtWidget::NewTask() return; } -void MainQtWidget::NrOfTermsBoxSlot() +void MainTQtWidget::NrOfTermsBoxSlot() { #ifdef DEBUG - kdDebug() << "MainQtWidget::NrOfTermsBoxSlot()" << endl; + kdDebug() << "MainTQtWidget::NrOfTermsBoxSlot()" << endl; #endif TQString curr_nr = m_NrOfTermsBox->currentText(); m_MaxMainDenominatorBox->clear(); @@ -363,10 +363,10 @@ void MainQtWidget::NrOfTermsBoxSlot() (void) m_taskview->setTaskParameters(m_addSub, m_mulDiv, m_nrRatios, m_maxMainDenominator); } -void MainQtWidget::MaxMainDenominatorBoxSlot() +void MainTQtWidget::MaxMainDenominatorBoxSlot() { #ifdef DEBUG - kdDebug() << "MainQtWidget::MaxMainDenominatorBoxSlot()" << endl; + kdDebug() << "MainTQtWidget::MaxMainDenominatorBoxSlot()" << endl; #endif // get the max. size from the ComboBox, convert it to a number and store @@ -378,10 +378,10 @@ void MainQtWidget::MaxMainDenominatorBoxSlot() (void) m_taskview->setTaskParameters(m_addSub, m_mulDiv, m_nrRatios, m_maxMainDenominator); } -void MainQtWidget::OperationBoxSlot() +void MainTQtWidget::OperationBoxSlot() { #ifdef DEBUG - kdDebug() << "MainQtWidget::OperationBoxSlot()" << endl; + kdDebug() << "MainTQtWidget::OperationBoxSlot()" << endl; #endif int index = m_OperationBox->currentItem(); // get selected item @@ -413,7 +413,7 @@ void MainQtWidget::OperationBoxSlot() (void) m_taskview->setTaskParameters(m_addSub, m_mulDiv, m_nrRatios, m_maxMainDenominator); } -void MainQtWidget::slotPrefs() +void MainTQtWidget::slotPrefs() { // do not show dialog twice if (KConfigDialog::showDialog("settings")) @@ -444,7 +444,7 @@ void MainQtWidget::slotPrefs() return; } -void MainQtWidget::slotApplySettings() +void MainTQtWidget::slotApplySettings() { // update the task view m_taskview->update(); @@ -455,10 +455,10 @@ void MainQtWidget::slotApplySettings() return; } -void MainQtWidget::slotAboutToShowPage(TQWidget * page) +void MainTQtWidget::slotAboutToShowPage(TQWidget * page) { #ifdef DEBUG - kdDebug() << "slotAboutToShowPage MainQtWidget" << endl; + kdDebug() << "slotAboutToShowPage MainTQtWidget" << endl; kdDebug() << "pageIndex(m_taskview): " << m_exercises->pageIndex(m_taskview) << endl; kdDebug() << "pageIndex(m_exerciseCompare): " << m_exercises->pageIndex(m_exerciseCompare) << endl; kdDebug() << "pageIndex(m_exerciseConvert): " << m_exercises->pageIndex(m_exerciseConvert) << endl; @@ -480,7 +480,7 @@ void MainQtWidget::slotAboutToShowPage(TQWidget * page) return; } -bool MainQtWidget::queryExit() +bool MainTQtWidget::queryExit() { writeOptions(); return true; |