Superviseur - Afficheur 1.0
Ce logiciel correspond à l'afficheur de la suite des trois logiciels composant le superviseur
|
00001 #ifndef AFFICHEUR_H 00002 #define AFFICHEUR_H 00003 00004 #include <QMainWindow> 00005 #include <QMessageBox> 00006 #include <QAbstractSocket> 00007 #include <QTreeWidgetItem> 00008 #include <QDesktopWidget> 00009 #include <QThread> 00010 #include <QLabel> 00011 #include <QDebug> 00012 #include "collecteursocket.h" 00013 #include "hyperviseurgraphique.h" 00014 00015 #include "qjson/parser.h" 00016 00017 00018 namespace Ui { 00019 class Afficheur; 00020 } 00021 00022 00024 00035 class Afficheur : public QMainWindow { 00036 Q_OBJECT 00037 public: 00038 Afficheur(QWidget *parent = 0); 00039 ~Afficheur(); 00040 00041 protected: 00042 void timerEvent(QTimerEvent *); 00043 void changeEvent(QEvent *e); 00044 00045 public slots: 00046 void afficherErreur(QAbstractSocket::SocketError socketError, QString message=QString()); 00047 void ajouterDonnees(QString donnees); 00048 00049 private slots: 00050 void connexion(bool fermer); 00051 void connexionEtablie(); 00052 void deconnecte(); 00053 void redimmensionner(int pourcent); 00054 00055 private: 00056 void remplirEcran(); 00057 void creerOutilTailleZoom(); 00058 void changerDonnees(QVariantMap donnees, QTreeWidgetItem *item); 00059 void changerDonneesVMs(QList<QVariantMap> donnees, QTreeWidgetItem *item); 00060 00061 Ui::Afficheur *ui; 00062 QGraphicsScene *scene; 00063 CollecteurSocket *collSocket; 00064 QHash<QString, HyperviseurGraphique*> hyperviseursGraph; 00065 QHash<QString, QTreeWidgetItem*> hyperviseursTree; 00066 QList<HyperviseurGraphique*> hyperviseursAffiches; 00067 QString hoteCourant; 00068 quint16 portCourant; 00069 QLabel *connexionInfos; 00070 QSlider *taille; 00071 QSlider *zoom; 00072 QLabel *tailleValeur; 00073 QLabel *zoomValeur; 00074 qreal zoomFacteur; 00075 00076 }; 00077 00078 #endif // AFFICHEUR_H