|
|
|
@ -150,7 +150,7 @@ void KNutMainWindow::addComboStatusItem (const TQString text, const TQString nam
|
|
|
|
|
if (m_infoCombo->count() >= (int)knc::maxCountKNutEvent) m_infoCombo->removeItem(0);
|
|
|
|
|
if (m_listKNutEvent->count() > knc::maxCountKNutEvent) m_listKNutEvent->remove(m_listKNutEvent->begin());
|
|
|
|
|
|
|
|
|
|
TQString dateTime(TQDate::tqcurrentDate().toString());
|
|
|
|
|
TQString dateTime(TQDate::currentDate().toString());
|
|
|
|
|
dateTime +=" " + TQTime::currentTime().toString();
|
|
|
|
|
if (name.isEmpty()) {
|
|
|
|
|
m_infoCombo->insertItem(dateTime+" "+text);
|
|
|
|
@ -369,7 +369,7 @@ void KNutMainWindow::showUpsData (void) {
|
|
|
|
|
int runtimeVal;
|
|
|
|
|
TQString nutStringVar;
|
|
|
|
|
bool okFloat;
|
|
|
|
|
// activeUpsInfo->oldtqStatus=KNutNet::inittqStatus;
|
|
|
|
|
// activeUpsInfo->oldStatus=KNutNet::initStatus;
|
|
|
|
|
|
|
|
|
|
// Nastaveni nemenych dat jsou precteny pouze jednou, predpoklada se jejich nemenost
|
|
|
|
|
// setting of unchange data, ones are reading only one.
|
|
|
|
@ -414,9 +414,9 @@ void KNutMainWindow::showUpsData (void) {
|
|
|
|
|
m_existLowHighXfer = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int upstqStatus=0;
|
|
|
|
|
if ((upstqStatus = m_activeUpsInfo->upsNet->readtqStatus ()) != -1)
|
|
|
|
|
m_frontPanel->setPanel(upstqStatus);
|
|
|
|
|
int upsStatus=0;
|
|
|
|
|
if ((upsStatus = m_activeUpsInfo->upsNet->readStatus ()) != -1)
|
|
|
|
|
m_frontPanel->setPanel(upsStatus);
|
|
|
|
|
|
|
|
|
|
if ( !m_activeUpsInfo->upsNet->existName(m_activeUpsInfo->runtimeVar)) {
|
|
|
|
|
nutStringVar = m_activeUpsInfo->upsNet->readStringVar(m_activeUpsInfo->runtimeVar);
|
|
|
|
@ -494,7 +494,7 @@ void KNutMainWindow::repaintPanel (void) {
|
|
|
|
|
}
|
|
|
|
|
else m_frontPanel->setRuntime(knc::numberVarError);
|
|
|
|
|
// precteme status a nastavime zarovky panelu
|
|
|
|
|
int status = m_activeUpsInfo->upsNet->readtqStatus();
|
|
|
|
|
int status = m_activeUpsInfo->upsNet->readStatus();
|
|
|
|
|
m_frontPanel->setPanel(status);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -727,7 +727,7 @@ void KNutMainWindow::initToolBar ( void ) {
|
|
|
|
|
|
|
|
|
|
TQLabel *upsNazev = new TQLabel ("UPS : ",toolBar("mainToolBar"));
|
|
|
|
|
// upsNazev is connected on toolBaar, dosn't need to call desctructor
|
|
|
|
|
toolBar ("mainToolBar")->insertWidget (0,upsNazev->tqsizeHint().width(),upsNazev);
|
|
|
|
|
toolBar ("mainToolBar")->insertWidget (0,upsNazev->sizeHint().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);
|
|
|
|
|