1
/***************************************************************************
2
knutprintupsvar.h - description
5
copyright : (C) 2002 by Daniel Prynych
6
email : Daniel.Prynych@alo.cz
7
***************************************************************************/
9
/***************************************************************************
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
***************************************************************************/
18
#ifndef KNUTPRINTUPSVAR_H
19
#define KNUTPRINTUPSVAR_H
21
//Od verze 3 je kapp jen odkaz na kapplication
22
//#include <kapplication.h>
24
#include "knutupsdata.h"
27
#include <kdialogbase.h>
28
#include <kcombobox.h>
29
#include <kpushbutton.h>
30
#include <klistview.h>
35
#include <qvaluelist.h>
38
#include <qvaluevector.h>
46
*@author Daniel Prynych
50
* Tato trida zajistuje zobrazeni vsech promenych,
51
* ktere podporuje prislusny ovladac/driver/model (ovladac) NUTu
53
* @author Daniel Prynych
54
* @short NUT show UPS vars
57
class KNutPrintUpsVar : public KDialogBase {
63
* Constructor - makes window, reads values of variables
64
* and will write names and values of variables
65
* Konstruktor - vytvori okno, nacte hodnoty promennych,
66
* a vypise jmena a hodnoty promenych.
67
* @param upsnet Je odkaz na instanci KNutNet - obsahuje hodnoty promennych systemu NUT.
68
* @param useDescription Urcuje zda pouzit pro promenne a prikazy taky popis.
69
* pokud data o UPS-kach neexistuji vraci funkce upsOk vzdy false.
73
KNutPrintUpsVar(KNutNet* const upsNet, const bool useDescription, QWidget* parent = 0, const char* name = 0, const bool modal = true);
84
* Vrati zda se povedlo pripojit na server NUT-u a nacist udaje.
93
/****** protected vars ************/
101
KPushButton* reloadButton;
105
KListViewItem* myValue;
107
QValueVector<dataVar> dataList;
108
KListViewItem* ROVarsList;
109
KListViewItem* RWVarsList;
110
KListViewItem* ICommList;
120
/********** protected functions ****************/
124
* adds name into part of tree
125
* Prida jmeno do casti stromu.
126
* @param table is top of tree's part
127
* @param varName is text which is addes into tree on the first column
128
* @param varName is text which is addes into tree on the second column
129
* @param table je vrchol casti stromu.
130
* @param varName je text ktere se prida do stromu na prvni sloupec.
131
* @param value je text ktere se prida do stromu na druhy sloupec.
135
KListViewItem* addListItem (KListViewItem* table, QString varName, QString value);
139
* Zjisti existenci jmena ve vetvi stromu
141
* listItem je vrcholovy prvek vetve.
142
* @param name je jmeno ktere se hleda ve strome.
146
KListViewItem* existListItem (KListViewItem* listItem, QString name);
152
* Nacte a prepise hodnoty promenych
156
void slotReloadVars (void);