Rev | Line | |
---|
[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[15] | 5 | #ifndef MANAGER_H
|
---|
[9] | 6 | #define MANAGER_H
|
---|
[15] | 7 |
|
---|
[9] | 8 | #include <QWidget>
|
---|
[247] | 9 | #include <QIcon>
|
---|
[436] | 10 | #include <QTime>
|
---|
[9] | 11 | #include <udt.h>
|
---|
| 12 | #include <qdom.h>
|
---|
| 13 |
|
---|
| 14 | class UdtSocket;
|
---|
| 15 | class ConnectionLayout;
|
---|
| 16 | class QVBoxLayout;
|
---|
| 17 | class QTabBar;
|
---|
| 18 | class QPushButton;
|
---|
[15] | 19 | class QGridLayout;
|
---|
[234] | 20 | class QStatusBar;
|
---|
[9] | 21 |
|
---|
[15] | 22 | class Manager : public QWidget {
|
---|
| 23 | Q_OBJECT
|
---|
[9] | 24 |
|
---|
[15] | 25 | public:
|
---|
| 26 | Manager(QString name, int port);
|
---|
| 27 | ~Manager();
|
---|
[9] | 28 |
|
---|
[15] | 29 | private:
|
---|
| 30 | UDTSOCKET serv;
|
---|
| 31 | QVBoxLayout *managerLayout;
|
---|
[247] | 32 | typedef struct {
|
---|
| 33 | ConnectionLayout *layout;
|
---|
| 34 | QWidget *widget;
|
---|
| 35 | UdtSocket *socket;
|
---|
| 36 | } connections_t;
|
---|
| 37 | QList<connections_t> connections;
|
---|
| 38 | //QList<ConnectionLayout *> connectionsLayout;
|
---|
| 39 | //QList<UdtSocket *> udtSockets;
|
---|
[15] | 40 | QTabBar *tabBar;
|
---|
| 41 | QString name, hiddenTabName;
|
---|
| 42 | int currentTab;
|
---|
| 43 |
|
---|
| 44 | QPushButton *send_button;
|
---|
| 45 | QPushButton *reset_button;
|
---|
| 46 | QPushButton *load_button;
|
---|
| 47 | QPushButton *save_button;
|
---|
| 48 | QGridLayout *button_layout;
|
---|
[30] | 49 | QStatusBar *status;
|
---|
[248] | 50 | QIcon icon_red,icon_green,icon_orange;
|
---|
[436] | 51 | QTime startTime;
|
---|
[15] | 52 |
|
---|
| 53 | private slots:
|
---|
| 54 | void acceptConnections(void);
|
---|
| 55 | void load(void);
|
---|
| 56 | void send(void);
|
---|
| 57 | void save(void);
|
---|
| 58 | void reset(void);
|
---|
[234] | 59 | void tabBarCurrentChanged(int index);
|
---|
[399] | 60 | void printUDTStats(QString stats,QString stylesheet,bool loosingPackets);
|
---|
[234] | 61 | void newFileUI(UDTSOCKET socket);
|
---|
| 62 | void deleteFileUI(void);
|
---|
| 63 | void newConnectionLayout(QString name);
|
---|
[244] | 64 | void udtSocketDestroyed(QObject *obj);
|
---|
[15] | 65 | void layoutDestroyed(QObject *obj);
|
---|
| 66 |
|
---|
| 67 | protected:
|
---|
| 68 | };
|
---|
| 69 |
|
---|
| 70 | #endif // MANAGER_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.