diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 19:37:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 19:37:06 +0000 |
commit | 968af1d235ac30d737991b269156bee5dc99d318 (patch) | |
tree | 19b118fa5380087e10cb728be545760791ce0676 /src/knutmainwindow.cpp | |
parent | aea4882f3b37f17c5b56bc77667e683c52254c30 (diff) | |
download | knutclient-968af1d235ac30d737991b269156bee5dc99d318.tar.gz knutclient-968af1d235ac30d737991b269156bee5dc99d318.zip |
TQt4 port knutclient
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knutclient@1238881 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/knutmainwindow.cpp')
-rw-r--r-- | src/knutmainwindow.cpp | 214 |
1 files changed, 107 insertions, 107 deletions
diff --git a/src/knutmainwindow.cpp b/src/knutmainwindow.cpp index c5aaf16..adeab69 100644 --- a/src/knutmainwindow.cpp +++ b/src/knutmainwindow.cpp @@ -28,19 +28,19 @@ #include <kprogress.h> -#include <qfont.h> -#include <qpalette.h> -#include <qbrush.h> -#include <qcolor.h> -#include <qstring.h> -#include <qscrollview.h> -#include <qlayout.h> -#include <qiconset.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qlabel.h> -#include <qsplitter.h> -//#include <qprogressbar.h> +#include <tqfont.h> +#include <tqpalette.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqstring.h> +#include <tqscrollview.h> +#include <tqlayout.h> +#include <tqiconset.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqlabel.h> +#include <tqsplitter.h> +//#include <tqprogressbar.h> @@ -60,7 +60,7 @@ const char *descrOfConnection = I18N_NOOP("test of conection from 5"); -KNutMainWindow::KNutMainWindow(QStringList *tListKNutEvent, KNutVarData::upsInfoDef* tActiveUpsInfo, KNutVarData::SettingDataDef* tSettingData, KNutUpsData* tUpsRecords, KNutVarData* tAnalogRecords, QWidget* parent, const char *name) : KMainWindow(parent, name), +KNutMainWindow::KNutMainWindow(TQStringList *tListKNutEvent, KNutVarData::upsInfoDef* tActiveUpsInfo, KNutVarData::SettingDataDef* tSettingData, KNutUpsData* tUpsRecords, KNutVarData* tAnalogRecords, TQWidget* tqparent, const char *name) : KMainWindow(tqparent, name), m_listKNutEvent(tListKNutEvent), m_activeUpsInfo(tActiveUpsInfo),m_settingData (tSettingData), m_upsRecords(tUpsRecords), m_analogRecords (tAnalogRecords) { @@ -87,41 +87,41 @@ KNutMainWindow::KNutMainWindow(QStringList *tListKNutEvent, KNutVarData::upsInfo //sets palette for analog panels // nastavime paletu pro analogove panely if (m_settingData->customBAnalogColor) { - m_aPanelPalette.setColor(QPalette::Active,QColorGroup::Background,m_settingData->aPanelBackgroundColor); - m_aPanelPalette.setColor(QPalette::Inactive,QColorGroup::Background,m_settingData->aPanelBackgroundColor); + m_aPanelPalette.setColor(TQPalette::Active,TQColorGroup::Background,m_settingData->aPanelBackgroundColor); + m_aPanelPalette.setColor(TQPalette::Inactive,TQColorGroup::Background,m_settingData->aPanelBackgroundColor); } if (m_settingData->customBColor) { - m_areaPalette.setColor(QPalette::Active,QColorGroup::Background,m_settingData->mainBackgroundColor); - m_areaPalette.setColor(QPalette::Inactive,QColorGroup::Background,m_settingData->mainBackgroundColor); + m_areaPalette.setColor(TQPalette::Active,TQColorGroup::Background,m_settingData->mainBackgroundColor); + m_areaPalette.setColor(TQPalette::Inactive,TQColorGroup::Background,m_settingData->mainBackgroundColor); } // makes main area // Vytvorime hlavni plochu - m_area = new QLabel (this); + m_area = new TQLabel (this); setCentralWidget (m_area); - QHBoxLayout* mainLayout = new QHBoxLayout(m_area); - m_mainSplit = new QSplitter(Qt::Horizontal,m_area); + TQHBoxLayout* mainLayout = new TQHBoxLayout(m_area); + m_mainSplit = new TQSplitter(Qt::Horizontal,m_area); m_mainSplit->setOpaqueResize(true); mainLayout->addWidget(m_mainSplit); if (m_settingData->customBPanelColor) { - m_mPanelPalette.setColor(QPalette::Active,QColorGroup::Background,m_settingData->mPanelBackgroundColor); - m_mPanelPalette.setColor(QPalette::Inactive,QColorGroup::Background,m_settingData->mPanelBackgroundColor); + m_mPanelPalette.setColor(TQPalette::Active,TQColorGroup::Background,m_settingData->mPanelBackgroundColor); + m_mPanelPalette.setColor(TQPalette::Inactive,TQColorGroup::Background,m_settingData->mPanelBackgroundColor); } - QScrollView* panelSV = new QScrollView(m_mainSplit,"panelSV"); + TQScrollView* panelSV = new TQScrollView(m_mainSplit,"panelSV"); if (m_settingData->customFont) m_frontPanel = new KNutFrontPanel (&m_mPanelPalette,m_mainSplit,m_settingData->panelFlags,&(m_settingData->mPanelFont),"FrontPanel"); else m_frontPanel = new KNutFrontPanel (&m_mPanelPalette,m_mainSplit,m_settingData->panelFlags,&(m_settingData->systemFont),"FrontPanel"); panelSV->addChild(m_frontPanel); - panelSV->setResizePolicy ( QScrollView::AutoOneFit ) ; - m_mainSplit->setResizeMode (panelSV,QSplitter::FollowSizeHint); + panelSV->setResizePolicy ( TQScrollView::AutoOneFit ) ; + m_mainSplit->setResizeMode (panelSV,TQSplitter::FollowSizeHint); m_panelMeter = new KNutPanelMeter(m_aPanelPalette,m_activeUpsInfo,m_settingData,m_analogRecords,m_mainSplit); - m_mainSplit->setResizeMode (m_panelMeter,QSplitter::Stretch ); + m_mainSplit->setResizeMode (m_panelMeter,TQSplitter::Stretch ); m_area->setPalette(m_areaPalette); m_panelMeter->setPalette(m_areaPalette); @@ -146,12 +146,12 @@ KNutMainWindow::KNutMainWindow(QStringList *tListKNutEvent, KNutVarData::upsInfo -void KNutMainWindow::addComboStatusItem (const QString text, const QString name) { +void KNutMainWindow::addComboStatusItem (const TQString text, const TQString name) { if (m_infoCombo->count() >= (int)knc::maxCountKNutEvent) m_infoCombo->removeItem(0); if (m_listKNutEvent->count() > knc::maxCountKNutEvent) m_listKNutEvent->remove(m_listKNutEvent->begin()); - QString dateTime(QDate::currentDate().toString()); - dateTime +=" " + QTime::currentTime().toString(); + TQString dateTime(TQDate::tqcurrentDate().toString()); + dateTime +=" " + TQTime::currentTime().toString(); if (name.isEmpty()) { m_infoCombo->insertItem(dateTime+" "+text); m_listKNutEvent->append(dateTime+" "+text); @@ -182,10 +182,10 @@ void KNutMainWindow::setConfig (unsigned int changeSetting) { //qDebug ("KNutMainWindow::setConfig"); KNutVarData::VarStrucDef analogMemberData; - bool repaintVoltagePanels = false; - bool repaintFrequencyPanels = false; - bool repaintAllPanels = false; - bool repaintOAPanels = false; + bool tqrepaintVoltagePanels = false; + bool tqrepaintFrequencyPanels = false; + bool tqrepaintAllPanels = false; + bool tqrepaintOAPanels = false; // Main Setting @@ -195,23 +195,23 @@ void KNutMainWindow::setConfig (unsigned int changeSetting) { if (!m_settingData->customBColor) { // nastavime barvu pozadi podle systemu m_area->setPalette (m_mainPalette); // we set background color based on system m_panelMeter->setPalette (m_mainPalette); - repaint(); + tqrepaint(); } else { - m_areaPalette.setColor(QPalette::Active,QColorGroup::Background,m_settingData->mainBackgroundColor); - m_areaPalette.setColor(QPalette::Inactive,QColorGroup::Background,m_settingData->mainBackgroundColor); + m_areaPalette.setColor(TQPalette::Active,TQColorGroup::Background,m_settingData->mainBackgroundColor); + m_areaPalette.setColor(TQPalette::Inactive,TQColorGroup::Background,m_settingData->mainBackgroundColor); m_area->setPalette (m_areaPalette); m_panelMeter->setPalette (m_areaPalette); - repaint(); + tqrepaint(); } } else { if (changeSetting & KNutPrefDlg::ChangeMBColor ) { - m_areaPalette.setColor(QPalette::Active,QColorGroup::Background,m_settingData->mainBackgroundColor); - m_areaPalette.setColor(QPalette::Inactive,QColorGroup::Background,m_settingData->mainBackgroundColor); + m_areaPalette.setColor(TQPalette::Active,TQColorGroup::Background,m_settingData->mainBackgroundColor); + m_areaPalette.setColor(TQPalette::Inactive,TQColorGroup::Background,m_settingData->mainBackgroundColor); m_area->setPalette (m_areaPalette); m_panelMeter->setPalette (m_areaPalette); - repaint(); + tqrepaint(); } } @@ -236,8 +236,8 @@ void KNutMainWindow::setConfig (unsigned int changeSetting) { m_analogRecords->setFrequency(50); } m_analogRecords->setXfer(m_lowXfer,m_highXfer); - repaintVoltagePanels = true; - repaintFrequencyPanels = true; + tqrepaintVoltagePanels = true; + tqrepaintFrequencyPanels = true; } } else { @@ -246,12 +246,12 @@ void KNutMainWindow::setConfig (unsigned int changeSetting) { if ((changeSetting & KNutPrefDlg::ChangeVoltage) || ((changeSetting & KNutPrefDlg::ChangeXFer))) { // byla aktivovana zmena napeti nebo zmena xfer a zaroven ho ups podporuje m_analogRecords->setVoltage(m_settingData->inputVoltage); - repaintVoltagePanels=true; + tqrepaintVoltagePanels=true; } if ((changeSetting & KNutPrefDlg::ChangeFrequency) || ((changeSetting & KNutPrefDlg::ChangeXFer))) { // byla aktivovana zmena napeti nebo zmena xfer a zaroven ho ups podporuje m_analogRecords->setFrequency(m_settingData->inputFrequency); - repaintFrequencyPanels=true; + tqrepaintFrequencyPanels=true; } } } @@ -265,14 +265,14 @@ void KNutMainWindow::setConfig (unsigned int changeSetting) { if ((changeSetting & KNutPrefDlg::ChangeCustomAPanelBColor) || // barva panelu je zmenena, panel color is changed (changeSetting & KNutPrefDlg::ChangeAPBColor)) { if (m_settingData->customBAnalogColor) { - m_aPanelPalette.setColor(QPalette::Active,QColorGroup::Background,m_settingData->aPanelBackgroundColor); - m_aPanelPalette.setColor(QPalette::Inactive,QColorGroup::Background,m_settingData->aPanelBackgroundColor); - repaintAllPanels=true; + m_aPanelPalette.setColor(TQPalette::Active,TQColorGroup::Background,m_settingData->aPanelBackgroundColor); + m_aPanelPalette.setColor(TQPalette::Inactive,TQColorGroup::Background,m_settingData->aPanelBackgroundColor); + tqrepaintAllPanels=true; m_panelMeter->setAnalogBG(m_aPanelPalette); } else { m_aPanelPalette = m_mainPalette; - repaintAllPanels=true; + tqrepaintAllPanels=true; m_panelMeter->setAnalogBG(m_aPanelPalette); } } @@ -280,17 +280,17 @@ void KNutMainWindow::setConfig (unsigned int changeSetting) { if ((changeSetting & KNutPrefDlg::ChangeCustomAPanelOColor) || // je provedena zmena barvy panelu (changeSetting & KNutPrefDlg::ChangeAPOColor)) { if (m_settingData->customOAnalogColor) { - repaintAllPanels=true; - repaintOAPanels=true; + tqrepaintAllPanels=true; + tqrepaintOAPanels=true; } else { - repaintAllPanels=true; - repaintOAPanels=true; + tqrepaintAllPanels=true; + tqrepaintOAPanels=true; } } // regeneration of panel uses for setting Main and setting Analog // pregenerovani panelu slozi pro setting Main a setting Analog - m_panelMeter->repaintAnalogPanels (repaintFrequencyPanels, repaintVoltagePanels, repaintAllPanels); + m_panelMeter->tqrepaintAnalogPanels (tqrepaintFrequencyPanels, tqrepaintVoltagePanels, tqrepaintAllPanels); if (m_activeUpsInfo->record.name != "") { m_panelMeter->setSize(); @@ -311,15 +311,15 @@ void KNutMainWindow::setConfig (unsigned int changeSetting) { m_frontPanel->setPalette (m_mainPalette); } else { - m_mPanelPalette.setColor(QPalette::Active,QColorGroup::Background,m_settingData->mPanelBackgroundColor); - m_mPanelPalette.setColor(QPalette::Inactive,QColorGroup::Background,m_settingData->mPanelBackgroundColor); + m_mPanelPalette.setColor(TQPalette::Active,TQColorGroup::Background,m_settingData->mPanelBackgroundColor); + m_mPanelPalette.setColor(TQPalette::Inactive,TQColorGroup::Background,m_settingData->mPanelBackgroundColor); m_frontPanel->setPalette (m_mPanelPalette); } } else { if (changeSetting & KNutPrefDlg::ChangeMPBColor ) { - m_mPanelPalette.setColor(QPalette::Active,QColorGroup::Background,m_settingData->mPanelBackgroundColor); - m_mPanelPalette.setColor(QPalette::Inactive,QColorGroup::Background,m_settingData->mPanelBackgroundColor); + m_mPanelPalette.setColor(TQPalette::Active,TQColorGroup::Background,m_settingData->mPanelBackgroundColor); + m_mPanelPalette.setColor(TQPalette::Inactive,TQColorGroup::Background,m_settingData->mPanelBackgroundColor); m_frontPanel->setPalette (m_mPanelPalette); } } @@ -335,7 +335,7 @@ void KNutMainWindow::setConfig (unsigned int changeSetting) { // Font panel setting if (changeSetting & KNutPrefDlg::ChangeAnalogFont ) { - QFont newAnalogFont; + TQFont newAnalogFont; if (m_settingData->customFont) { newAnalogFont=m_settingData->aPanelFont; } @@ -346,7 +346,7 @@ void KNutMainWindow::setConfig (unsigned int changeSetting) { m_panelMeter->slotSetPanelsFont(newAnalogFont); } if (changeSetting & KNutPrefDlg::ChangePanelFont ) { - QFont newPanelFont; + TQFont newPanelFont; if (m_settingData->customFont) { m_frontPanel->slotSetPanelFont(m_settingData->mPanelFont); } @@ -367,9 +367,9 @@ void KNutMainWindow::showUpsData (void) { if ((m_activeUpsInfo->upsNet != 0L) && (!m_activeUpsInfo->netError) && (m_activeUpsInfo->upsDriverState == knc::connected)) { int runtimeVal; - QString nutStringVar; + TQString nutStringVar; bool okFloat; -// activeUpsInfo->oldStatus=KNutNet::initStatus; +// activeUpsInfo->oldtqStatus=KNutNet::inittqStatus; // Nastaveni nemenych dat jsou precteny pouze jednou, predpoklada se jejich nemenost // setting of unchange data, ones are reading only one. @@ -388,7 +388,7 @@ void KNutMainWindow::showUpsData (void) { m_firmrev = m_activeUpsInfo->upsNet->readStringVar("ups.firmware"); break; } - QString allUpsName = m_manufacturer + " " + m_upsModel; + TQString allUpsName = m_manufacturer + " " + m_upsModel; m_frontPanel->setAllNameUps (allUpsName); m_frontPanel->setMFRUps (m_manufacturer); m_frontPanel->setNameUps (m_upsModel); @@ -414,9 +414,9 @@ void KNutMainWindow::showUpsData (void) { m_existLowHighXfer = true; } } - int upsStatus=0; - if ((upsStatus = m_activeUpsInfo->upsNet->readStatus ()) != -1) - m_frontPanel->setPanel(upsStatus); + int upstqStatus=0; + if ((upstqStatus = m_activeUpsInfo->upsNet->readtqStatus ()) != -1) + m_frontPanel->setPanel(upstqStatus); if ( !m_activeUpsInfo->upsNet->existName(m_activeUpsInfo->runtimeVar)) { nutStringVar = m_activeUpsInfo->upsNet->readStringVar(m_activeUpsInfo->runtimeVar); @@ -451,14 +451,14 @@ void KNutMainWindow::showUpsData (void) { //qDebug ("KNutMainWindow::showUpsData 1"); m_panelMeter->activateAnalogs(); // makes panel and makes background of panel - repaintAnalogs(false); + tqrepaintAnalogs(false); //qDebug ("KNutMainWindow::showUpsData 2"); m_panelMeter->setSize(true); //qDebug ("KNutMainWindow::showUpsData 3"); m_mainSplit->refresh(); - // doesn't repaint analog pointers, because pointers will be repainted twice + // doesn't tqrepaint analog pointers, because pointers will be tqrepainted twice //qDebug ("KNutMainWindow::showUpsData 4"); -// repaintAnalogs(false); // don't make this +// tqrepaintAnalogs(false); // don't make this //qDebug ("KNutMainWindow::showUpsData 5"); } else { @@ -479,12 +479,12 @@ void KNutMainWindow::hideUpsData (void) { m_frontPanel->cleanPanel(); } -void KNutMainWindow::setCombo (QString name) { +void KNutMainWindow::setCombo (TQString name) { if (toolBar(0)->getCombo(1)->currentText() != name) toolBar(0)->getCombo(1)->setCurrentText(name); } -void KNutMainWindow::repaintPanel (void) { - QString nutStringVar; +void KNutMainWindow::tqrepaintPanel (void) { + TQString nutStringVar; if (m_activeUpsInfo->upsNet == 0) return; if (!m_activeUpsInfo->upsNet->existName(m_activeUpsInfo->runtimeVar)) { @@ -494,23 +494,23 @@ void KNutMainWindow::repaintPanel (void) { } else m_frontPanel->setRuntime(knc::numberVarError); // precteme status a nastavime zarovky panelu - int status = m_activeUpsInfo->upsNet->readStatus(); + int status = m_activeUpsInfo->upsNet->readtqStatus(); m_frontPanel->setPanel(status); } /// je volan vzdy po timeoutu /// this function is called after timeout always -void KNutMainWindow::repaintAnalogs ( bool run ) { -//qDebug ("KNutMainWindow::repaintAnalogs"); +void KNutMainWindow::tqrepaintAnalogs ( bool run ) { +//qDebug ("KNutMainWindow::tqrepaintAnalogs"); - QString nutStringVar; + TQString nutStringVar; float numVar; bool newRange = false; if ((m_settingData->lowHighXfer) && (m_existLowHighXfer)) { - QString nutStringVar; + TQString nutStringVar; nutStringVar = m_activeUpsInfo->upsNet->readStringVar(m_activeUpsInfo->lowxferVar); if (! nutStringVar.isEmpty()) { @@ -528,7 +528,7 @@ void KNutMainWindow::repaintAnalogs ( bool run ) { } } -//qDebug ("KNutMainWindow::repaintAnalogs 1"); +//qDebug ("KNutMainWindow::tqrepaintAnalogs 1"); for (int i=0; i< knc::NumberOfVars; i++) { if (m_activeUpsInfo->record.upsVarCode[i] != 0) { // jistota pokud by nam to nekde propadlo @@ -540,17 +540,17 @@ void KNutMainWindow::repaintAnalogs ( bool run ) { nutStringVar = m_activeUpsInfo->upsNet->readStringVar ((char *)nameUpsVars2[m_activeUpsInfo->record.upsVarCode[i]]); break; } -//qDebug ("KNutMainWindow::repaintAnalogs 2 "); +//qDebug ("KNutMainWindow::tqrepaintAnalogs 2 "); if (nutStringVar.isEmpty()) numVar=0; else numVar = nutStringVar.toFloat(); - m_panelMeter->repaintScaleAnalogPanel (i, numVar); - if (newRange) m_panelMeter->repaintAnalogPanels (true, true, false); //freq volt - m_panelMeter->repaintAnalogPointer(i,numVar,run); + m_panelMeter->tqrepaintScaleAnalogPanel (i, numVar); + if (newRange) m_panelMeter->tqrepaintAnalogPanels (true, true, false); //freq volt + m_panelMeter->tqrepaintAnalogPointer(i,numVar,run); } } // end for -//qDebug ("KNutMainWindow::repaintAnalogs 3 "); +//qDebug ("KNutMainWindow::tqrepaintAnalogs 3 "); } @@ -588,7 +588,7 @@ void KNutMainWindow::hideConnectPB ( void ) { /*********************************************************************************************/ -//this SLOT is for older KDE only +//this TQT_SLOT is for older KDE only void KNutMainWindow::slotShowToolBar(void) { if(toolBar("mainToolBar")->isVisible()) toolBar("mainToolBar")->hide(); @@ -639,12 +639,12 @@ void KNutMainWindow::slotRefreshConnection(void) { } -void KNutMainWindow::slotChangeRWVars ( QString ) { +void KNutMainWindow::slotChangeRWVars ( TQString ) { } -void KNutMainWindow::closeEvent( QCloseEvent *e ){ +void KNutMainWindow::closeEvent( TQCloseEvent *e ){ m_settingData->activatedMainWindow=false; //information about state of mainWindow e->accept(); @@ -669,7 +669,7 @@ void KNutMainWindow::slotCloseKnutClient (void) { - void KNutMainWindow::slotChangeUPS (const QString &name) { + void KNutMainWindow::slotChangeUPS (const TQString &name) { emit UPSChanged (name); } @@ -691,7 +691,7 @@ void KNutMainWindow::initStatusBar ( void ) { // sets main message if statusbar // nastavime hlavni hlaseni v statusbaru - // QString progressString("%v ");// += descrOfConnection; + // TQString progressString("%v ");// += descrOfConnection; // progressString.append(descrOfConnection); m_progressFormatString.append("%v "); @@ -713,22 +713,22 @@ void KNutMainWindow::initStatusBar ( void ) { void KNutMainWindow::initStatusBarMessage ( void ) { // loads data into comboBox - QStringList::iterator it; + TQStringList::iterator it; for ( it = m_listKNutEvent->begin(); it != m_listKNutEvent->end(); ++it ) { m_infoCombo->insertItem((*it)); } - statusBar()-> setItemAlignment(0,Qt::AlignHCenter|Qt::AlignVCenter); + statusBar()-> setItemAlignment(0,TQt::AlignHCenter|TQt::AlignVCenter); m_infoCombo->setCurrentItem(m_infoCombo->count()-1); } void KNutMainWindow::initToolBar ( void ) { - QLabel *upsNazev = new QLabel ("UPS : ",toolBar("mainToolBar")); + TQLabel *upsNazev = new TQLabel ("UPS : ",toolBar("mainToolBar")); // upsNazev is connected on toolBaar, dosn't need to call desctructor - toolBar ("mainToolBar")->insertWidget (0,upsNazev->sizeHint().width(),upsNazev); - toolBar ("mainToolBar")->insertCombo("",1,false, SIGNAL (activated (const QString &)),this,SLOT (slotChangeUPS (const QString &))); + toolBar ("mainToolBar")->insertWidget (0,upsNazev->tqsizeHint().width(),upsNazev); + toolBar ("mainToolBar")->insertCombo("",1,false, TQT_SIGNAL (activated (const TQString &)),TQT_TQOBJECT(this), TQT_SLOT (slotChangeUPS (const TQString &))); // bude se pouze vybirat-------------------^^^ KComboBox *combo = toolBar("mainToolBar")->getCombo(1); combo->clear(); @@ -741,16 +741,16 @@ void KNutMainWindow::initToolBar ( void ) { void KNutMainWindow::initAction ( void ) { // KAction and KStdAction must be to make before command createGUI, function initToolBar is runed after create GUI - m_quit = KStdAction::quit (this, SLOT (slotCloseKnutClient()), actionCollection()); + m_quit = KStdAction::quit (TQT_TQOBJECT(this), TQT_SLOT (slotCloseKnutClient()), actionCollection()); m_quit->setStatusText(i18n("Quits the application")); - m_preferencesUps = KStdAction::preferences (this, SLOT (slotPreferencesUps()), actionCollection(),"options_configure"); - new KAction(i18n("&Showing UPS variables and commands"),0,this,SLOT(slotPrintUPSVars()),actionCollection(),"printupsvars"); - new KAction(i18n("&Running instant commands"),0,this,SLOT(slotInstComms()),actionCollection(),"instcomms"); - new KAction(i18n("Setting R&W variables"),0,this,SLOT(slotRWVars()),actionCollection(),"rwvars"); + m_preferencesUps = KStdAction::preferences (TQT_TQOBJECT(this), TQT_SLOT (slotPreferencesUps()), actionCollection(),"options_configure"); + new KAction(i18n("&Showing UPS variables and commands"),0,TQT_TQOBJECT(this), TQT_SLOT(slotPrintUPSVars()),actionCollection(),"printupsvars"); + new KAction(i18n("&Running instant commands"),0,TQT_TQOBJECT(this), TQT_SLOT(slotInstComms()),actionCollection(),"instcomms"); + new KAction(i18n("Setting R&W variables"),0,TQT_TQOBJECT(this), TQT_SLOT(slotRWVars()),actionCollection(),"rwvars"); /////////////////// -// KStdAction::showToolbar (this, SLOT (slotShowToolBar()), actionCollection()); +// KStdAction::showToolbar (TQT_TQOBJECT(this), TQT_SLOT (slotShowToolBar()), actionCollection()); // setStandardToolBarMenuEnabled(true); since KDE version 3.1 // since version 3.1 @@ -760,25 +760,25 @@ void KNutMainWindow::initAction ( void ) { #if KDE_VERSION_MINOR >= 1 setStandardToolBarMenuEnabled(true); #else - KStdAction::showToolbar (this, SLOT (slotShowToolBar()), actionCollection()); + KStdAction::showToolbar (TQT_TQOBJECT(this), TQT_SLOT (slotShowToolBar()), actionCollection()); #endif #else - KStdAction::showToolbar (this, SLOT (slotShowToolBar()), actionCollection()); + KStdAction::showToolbar (TQT_TQOBJECT(this), TQT_SLOT (slotShowToolBar()), actionCollection()); #endif #else - KStdAction::showToolbar (this, SLOT (slotShowToolBar()), actionCollection()); + KStdAction::showToolbar (TQT_TQOBJECT(this), TQT_SLOT (slotShowToolBar()), actionCollection()); #endif #else - KStdAction::showToolbar (this, SLOT (slotShowToolBar()), actionCollection()); + KStdAction::showToolbar (TQT_TQOBJECT(this), TQT_SLOT (slotShowToolBar()), actionCollection()); #endif - KStdAction::showStatusbar (this, SLOT (slotShowStatusBar()), actionCollection()); + KStdAction::showStatusbar (TQT_TQOBJECT(this), TQT_SLOT (slotShowStatusBar()), actionCollection()); - m_descriptionAction = new KToggleAction(i18n("&Using descriptions"),0,this,SLOT(slotDescription()),actionCollection(),"use_description"); + m_descriptionAction = new KToggleAction(i18n("&Using descriptions"),0,TQT_TQOBJECT(this), TQT_SLOT(slotDescription()),actionCollection(),"use_description"); - KStdAction::keyBindings( this, SLOT(slotConfigureKeys()),actionCollection()); - new KAction (i18n("Reconnect"),"reload",Key_F5,this,SLOT(slotRefreshConnection()),actionCollection(),"reconnect"); + KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT(slotConfigureKeys()),actionCollection()); + new KAction (i18n("Reconnect"),"reload",Key_F5,TQT_TQOBJECT(this), TQT_SLOT(slotRefreshConnection()),actionCollection(),"reconnect"); } void KNutMainWindow::initVars ( void ) { |