summaryrefslogtreecommitdiffstats
path: root/src/knutpanelmeter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/knutpanelmeter.cpp')
-rw-r--r--src/knutpanelmeter.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/knutpanelmeter.cpp b/src/knutpanelmeter.cpp
index e27a246..ab1b921 100644
--- a/src/knutpanelmeter.cpp
+++ b/src/knutpanelmeter.cpp
@@ -19,9 +19,9 @@
#include <kdebug.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfont.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfont.h>
#include <math.h>
@@ -35,16 +35,16 @@ extern const char *nameUpsVars1[];
extern const char *nameUpsVars2[];
-KNutPanelMeter::KNutPanelMeter(QPalette aPanelPalette, KNutVarData::upsInfoDef* activeUpsInfo, KNutVarData::SettingDataDef* settingData, KNutVarData* analogRecords, QWidget *parent, const char *name ) : QScrollView(parent,name,Qt::WResizeNoErase|Qt::WStaticContents) {
+KNutPanelMeter::KNutPanelMeter(TQPalette aPanelPalette, KNutVarData::upsInfoDef* activeUpsInfo, KNutVarData::SettingDataDef* settingData, KNutVarData* analogRecords, TQWidget *tqparent, const char *name ) : TQScrollView(tqparent,name,TQt::WResizeNoErase|TQt::WStaticContents) {
m_settingData = settingData;
m_activeUpsInfo = activeUpsInfo;
m_analogRecords = analogRecords;
m_aPanelPalette = aPanelPalette;
- m_analogArea = new QLabel(this->viewport());
+ m_analogArea = new TQLabel(this->viewport());
addChild(m_analogArea);
- setResizePolicy ( QScrollView::AutoOneFit ) ;
+ setResizePolicy ( TQScrollView::AutoOneFit ) ;
////NUTNO PAK UPRAVIT ACTIVATE A DEAKTIVATE ANALOGS
@@ -114,7 +114,7 @@ void KNutPanelMeter::activateAnalogs (void) {
m_analogPanels->scaleEnd[i]=analogMemberData.end;
m_analogPanels->scaleStart[i]=analogMemberData.start;
- QColor analogFingerColor, analogScaleColor, analogFontColor;
+ TQColor analogFingerColor, analogScaleColor, analogFontColor;
if (m_settingData->customOAnalogColor) {
analogFingerColor = m_settingData->analogFingerColor;
analogScaleColor = m_settingData->analogScaleColor;
@@ -154,9 +154,9 @@ void KNutPanelMeter::activateAnalogs (void) {
}
//qDebug ( "KNutPanelMeter::activateAnalogs 1" );
- m_analogArea->repaint(); //repaint all analog panels, background was made already
+ m_analogArea->tqrepaint(); //tqrepaint all analog panels, background was made already
//qDebug ("KNutPanelMeter::activateAnalogs - end");
-// analogSV->resizeContents(sizeHint().width(),sizeHint().height());
+// analogSV->resizeContents(tqsizeHint().width(),tqsizeHint().height());
}
@@ -189,10 +189,10 @@ void KNutPanelMeter::setSize (bool showPanels) {
m_analogArea->setMinimumSize (m_widthArea,m_heightArea);
adjustSize();
resizeContents(m_widthArea,m_heightArea);
- repaint();
+ tqrepaint();
}
-void KNutPanelMeter::repaintScaleAnalogPanel (int panelNumber, float value) {
+void KNutPanelMeter::tqrepaintScaleAnalogPanel (int panelNumber, float value) {
if (m_analogPanels->upsAnalogs[panelNumber] != 0L){
switch (m_activeUpsInfo->record.upsVarCode[panelNumber]) {
@@ -229,7 +229,7 @@ void KNutPanelMeter::repaintScaleAnalogPanel (int panelNumber, float value) {
m_analogPanels->upsAnalogs[panelNumber]->setPointer(value); // jistota pokud by nam to nekde propadlo
m_analogPanels->upsAnalogs[panelNumber]->hide();// schovame analogovy panel hides analog panel
m_analogPanels->upsAnalogs[panelNumber]->setRange (m_analogPanels->scaleStart[panelNumber],m_analogPanels->scaleEnd[panelNumber]);
- m_analogPanels->upsAnalogs[panelNumber]->repaint(); // prekreslime , repaints panel
+ m_analogPanels->upsAnalogs[panelNumber]->tqrepaint(); // prekreslime , tqrepaints panel
m_analogPanels->upsAnalogs[panelNumber]->show(); //zobrazime merak shows analog panel
}
}
@@ -241,14 +241,14 @@ void KNutPanelMeter::repaintScaleAnalogPanel (int panelNumber, float value) {
-void KNutPanelMeter::repaintAnalogPointer (int panelNumber, float value, bool run) {
+void KNutPanelMeter::tqrepaintAnalogPointer (int panelNumber, float value, bool run) {
if (m_analogPanels->upsAnalogs[panelNumber] != 0L)
m_analogPanels->upsAnalogs[panelNumber]->setPointer (value,run); // nastavi hodnotu rucicky
}
-void KNutPanelMeter::setAnalogBG(QPalette aPanelPalette) {
+void KNutPanelMeter::setAnalogBG(TQPalette aPanelPalette) {
m_aPanelPalette = aPanelPalette;
for (int i=0; i< knc::NumberOfVars; i++) {
@@ -269,7 +269,7 @@ void KNutPanelMeter::changeAnalogPanelsDigProcessing (void) {
}
-void KNutPanelMeter::repaintAnalogPanels (bool repaintFrequencyPanels, bool repaintVoltagePanels, bool repaintAllPanels) {
+void KNutPanelMeter::tqrepaintAnalogPanels (bool tqrepaintFrequencyPanels, bool tqrepaintVoltagePanels, bool tqrepaintAllPanels) {
KNutVarData::VarStrucDef analogMemberData;
@@ -281,10 +281,10 @@ KNutVarData::VarStrucDef analogMemberData;
//if upsAnalogs[x] is set to zero, this upsAnalog is not used
// record.upsVarCode contain list of code of analog meter
// 0 is code for none analog meter, 1 for Input Voltage, 2 for Battery Charge,
- if (((m_activeUpsInfo->record.upsVarCode[i] == knc::VarAcfreq) && (repaintFrequencyPanels)) ||
- ((m_activeUpsInfo->record.upsVarCode[i] == knc::VarOutFreq) && (repaintFrequencyPanels)) ||
+ if (((m_activeUpsInfo->record.upsVarCode[i] == knc::VarAcfreq) && (tqrepaintFrequencyPanels)) ||
+ ((m_activeUpsInfo->record.upsVarCode[i] == knc::VarOutFreq) && (tqrepaintFrequencyPanels)) ||
(((m_activeUpsInfo->record.upsVarCode[i] == knc::VarUtility) ||
- (m_activeUpsInfo->record.upsVarCode[i] == knc::VarOutVolt)) && (repaintVoltagePanels))) {
+ (m_activeUpsInfo->record.upsVarCode[i] == knc::VarOutVolt)) && (tqrepaintVoltagePanels))) {
analogMemberData=m_analogRecords->getData (m_activeUpsInfo->record.upsVarCode[i]); // nacteme data
@@ -297,12 +297,12 @@ KNutVarData::VarStrucDef analogMemberData;
} // end if (!
}// end for (int i=0
- m_analogPanels->upsAnalogs[i]->makeBackground(false); // repaints analog meter
- m_analogPanels->upsAnalogs[i]->repaintPointer(false); // repaints analog meter
- m_analogPanels->upsAnalogs[i]->repaint(); // repaints analog meter
+ m_analogPanels->upsAnalogs[i]->makeBackground(false); // tqrepaints analog meter
+ m_analogPanels->upsAnalogs[i]->tqrepaintPointer(false); // tqrepaints analog meter
+ m_analogPanels->upsAnalogs[i]->tqrepaint(); // tqrepaints analog meter
m_analogPanels->upsAnalogs[i]->show(); // shows analog meter
} // end if (((activeUpsInfo
- if (repaintAllPanels) {
+ if (tqrepaintAllPanels) {
if (m_settingData->customOAnalogColor) {
m_analogPanels->upsAnalogs[i]->setPointerColor(m_settingData->analogFingerColor);
m_analogPanels->upsAnalogs[i]->setArcColor(1,m_settingData->analogOKColor);
@@ -317,7 +317,7 @@ KNutVarData::VarStrucDef analogMemberData;
m_analogPanels->upsAnalogs[i]->setScaleColor (DEFAULT_SCALE_COLOR);
m_analogPanels->upsAnalogs[i]->setFontColor (DEFAULT_FONT_COLOR);
}
- m_analogPanels->upsAnalogs[i]->repaintAll();
+ m_analogPanels->upsAnalogs[i]->tqrepaintAll();
}
}
} // end for
@@ -334,13 +334,13 @@ void KNutPanelMeter::zeroingPanels (void) {
-QSize KNutPanelMeter::sizeHint (void){
+TQSize KNutPanelMeter::tqsizeHint (void){
- return QSize(m_widthArea,m_heightArea);
+ return TQSize(m_widthArea,m_heightArea);
}
-void KNutPanelMeter::slotSetPanelsFont(QFont newFont) {
+void KNutPanelMeter::slotSetPanelsFont(TQFont newFont) {
for (int i=0; i< knc::NumberOfVars; i++) {
if ((m_activeUpsInfo->record.upsVarCode[i]) && (m_analogPanels->upsAnalogs[i])) {