summaryrefslogtreecommitdiffstats
path: root/src/knutclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/knutclient.cpp')
-rw-r--r--src/knutclient.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/knutclient.cpp b/src/knutclient.cpp
index 0acbe3a..db05933 100644
--- a/src/knutclient.cpp
+++ b/src/knutclient.cpp
@@ -257,7 +257,7 @@ void KNutClient::slotFirstConnection (void) {
if ((m_mainUpsInfo.upsNet->getState() == KNutNet::Connected) && (!m_mainUpsInfo.errorUpsData)) {
showStatusEvent();
// getUpsVars loads informations about variables, but their values too
- m_upsTimer->start( m_mainUpsInfo.record.delay, TRUE ); // nastartujeme casovac - starts timer
+ m_upsTimer->start( m_mainUpsInfo.record.delay, true ); // nastartujeme casovac - starts timer
}
}
@@ -282,7 +282,7 @@ void KNutClient::slotErrorConnection (int error) {
if (m_mainUpsInfo.reconnectCount > countNextConnDelay) m_mainUpsInfo.reconnectCount = countNextConnDelay;
addEventString(i18n("The connection failed. The next connection will make after %1 sec.").arg(nextConnDelay[m_mainUpsInfo.reconnectCount-1]),m_mainUpsInfo.record.name);
- m_reconnectTimer->start( nextConnDelay[m_mainUpsInfo.reconnectCount-1]*1000, TRUE ); // starts reconnect timer again
+ m_reconnectTimer->start( nextConnDelay[m_mainUpsInfo.reconnectCount-1]*1000, true ); // starts reconnect timer again
}
else {
//tqDebug ("KNutClient::slotErrorConnection (3)");
@@ -335,9 +335,9 @@ void KNutClient::initVars (void) {
KNutUpsData::upsRecordDef upsData; // structure includes informations about UPS // struktura obsahuje udaje o UPS
TQFont appFont = kapp->font(); // systemovy font pri startu
kapp->config()->setGroup ("");
- settingData.areYouSure=kapp->config()->readBoolEntry("AreYouSure",FALSE);
+ settingData.areYouSure=kapp->config()->readBoolEntry("AreYouSure",false);
- int helpInt=kapp->config()->readNumEntry("UseMainWindow",TRUE);
+ int helpInt=kapp->config()->readNumEntry("UseMainWindow",1);
//std::cout << "readNumEntry " << helpInt << "--" << std::endl;
switch (helpInt) {
@@ -347,27 +347,27 @@ void KNutClient::initVars (void) {
}
- settingData.useMessageWindow=kapp->config()->readBoolEntry("UseMessageWindow",FALSE);
- settingData.activatedMainWindow=kapp->config()->readBoolEntry("PreviousMainWindow",FALSE);
+ settingData.useMessageWindow=kapp->config()->readBoolEntry("UseMessageWindow",false);
+ settingData.activatedMainWindow=kapp->config()->readBoolEntry("PreviousMainWindow",false);
settingData.x=kapp->config()->readNumEntry("PosX",0);
settingData.y=kapp->config()->readNumEntry("PosY",0);
settingData.width=kapp->config()->readNumEntry("Width",300);
settingData.height=kapp->config()->readNumEntry("Height",200);
- settingData.useDescription=kapp->config()->readBoolEntry("UseDescription",FALSE);
+ settingData.useDescription=kapp->config()->readBoolEntry("UseDescription",false);
settingData.countCols=kapp->config()->readNumEntry("NumberOfCols",knc::DefaultCountCols);
settingData.panelFlags=kapp->config()->readUnsignedNumEntry("PanelFlags",KNutFrontPanel::DefaultPanelFlags);
settingData.inputFrequency=kapp->config()->readNumEntry("InputFrequency",knc::DefaultInputFrequency);
settingData.inputVoltage=kapp->config()->readNumEntry("InputVoltage",knc::DefaultInputVoltage);
- settingData.lowHighXfer=kapp->config()->readBoolEntry("LowHighXfer",FALSE);
- settingData.customFont=kapp->config()->readBoolEntry("CustomFont",FALSE);
+ settingData.lowHighXfer=kapp->config()->readBoolEntry("LowHighXfer",false);
+ settingData.customFont=kapp->config()->readBoolEntry("CustomFont",false);
settingData.aPanelFont=kapp->config()->readFontEntry("AnalogPanelFont",&appFont);
settingData.mPanelFont=kapp->config()->readFontEntry("MainPanelFont",&appFont);
int upsCount=kapp->config()->readNumEntry("NumberOfUpsRecords",0);
- settingData.customBColor=kapp->config()->readBoolEntry("CustomBColor",FALSE);
+ settingData.customBColor=kapp->config()->readBoolEntry("CustomBColor",false);
settingData.mainBackgroundColor=kapp->config()->readColorEntry ("MainBackGroundColor",& DEFAULT_BG_COLOR);
- settingData.customBPanelColor=kapp->config()->readBoolEntry("CustomBPanelColor",FALSE);
- settingData.customBAnalogColor=kapp->config()->readBoolEntry("CustomBAnalogColor",FALSE);
- settingData.customOAnalogColor=kapp->config()->readBoolEntry("CustomOAnalogColor",FALSE);
+ settingData.customBPanelColor=kapp->config()->readBoolEntry("CustomBPanelColor",false);
+ settingData.customBAnalogColor=kapp->config()->readBoolEntry("CustomBAnalogColor",false);
+ settingData.customOAnalogColor=kapp->config()->readBoolEntry("CustomOAnalogColor",false);
settingData.mPanelBackgroundColor=kapp->config()->readColorEntry ("MPanelBackGroundColor",& DEFAULT_BG_COLOR);
settingData.aPanelBackgroundColor=kapp->config()->readColorEntry ("APanelBackGroundColor",& DEFAULT_BG_COLOR);
settingData.analogFingerColor=kapp->config()->readColorEntry ("AnalogFingerColor",& DEFAULT_FINGER_COLOR);
@@ -377,7 +377,7 @@ void KNutClient::initVars (void) {
settingData.analogScaleColor=kapp->config()->readColorEntry ("AnalogScaleColor",& DEFAULT_SCALE_COLOR);
settingData.analogFontColor=kapp->config()->readColorEntry ("AnalogFontColor",& DEFAULT_FONT_COLOR);
settingData.toolTipFlags=kapp->config()->readUnsignedNumEntry("ToolTipFlags",KNutDock::DefaultToolTipFlags);
- settingData.customTDEIconColor=kapp->config()->readBoolEntry("CustomTDEIconColor",FALSE);
+ settingData.customTDEIconColor=kapp->config()->readBoolEntry("CustomTDEIconColor",false);
settingData.kIconBackgroundColor=kapp->config()->readColorEntry ("TDEIconBackGroundColor",& DEFAULT_KICON_COLOR);
settingData.typeOfTDEIcon=kapp->config()->readBoolEntry("TypeOfTDEIcon", KNutDock::pictureKI);
settingData.typeDigitalProcessing=kapp->config()->readNumEntry("DigitalProcessingOfPointers", 2);
@@ -756,7 +756,7 @@ void KNutClient::slotTimeout (void) {
if (m_myDock) m_myDock->clearDockValues();
}
if (m_myDock) m_myDock->repaintDock();
- m_upsTimer->start( m_mainUpsInfo.record.delay, TRUE ); // nastartujem znovu
+ m_upsTimer->start( m_mainUpsInfo.record.delay, true ); // nastartujem znovu
}
@@ -784,7 +784,7 @@ void KNutClient::slotConnectionClosed(void) {
m_mainUpsInfo.reconnecting = true;
m_mainUpsInfo.reconnectCount = 1;
- m_reconnectTimer->start( nextConnDelay[0]*1000, TRUE ); // start timer for reconnect delay
+ m_reconnectTimer->start( nextConnDelay[0]*1000, true ); // start timer for reconnect delay
}
void KNutClient::showStatusEvent(void) {
@@ -987,7 +987,7 @@ void KNutClient::slotSetConfig (unsigned int changeSetting) {
m_mainUpsInfo.upsNet->open();
// if ((mainUpsInfo.upsNet->getState() == KNutNet::Connected) && (!mainUpsInfo.errorUpsData)) {
// showStatusEvent();
-// upsTimer->start( mainUpsInfo.record.delay, TRUE ); // nastartujeme casovac
+// upsTimer->start( mainUpsInfo.record.delay, true ); // nastartujeme casovac
// }
}
@@ -1180,7 +1180,7 @@ void KNutClient::slotActiveMainWindow (void) {
getUpsData();
makeMainWindow();
if (m_myDock) m_myDock->repaintDock(m_mainUpsInfo.netError);
- m_upsTimer->start( 1, TRUE ); // nastartujem znovu
+ m_upsTimer->start( 1, true ); // nastartujem znovu
// 1 proto aby se zpracovali pripadne udalosti o zruseni spojeni
}
else {
@@ -1210,7 +1210,7 @@ void KNutClient::closeMainWindow (void) {
m_upsTimer->stop();
mainWindow->close();
mainWindow=0;
- m_upsTimer->start( 1, TRUE ); // starts timer // nastartujeme casovac
+ m_upsTimer->start( 1, true ); // starts timer // nastartujeme casovac
}
}