Fork me on GitHub
2.15.20
FGx
A cross-platform launcher for FlightGear
propstreewidget.h
Go to the documentation of this file.
1 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
2 // FGx FlightGear Launcher // propstreewidget.h
3 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-
4 // (c) 2010-2012
5 // Yves Sablonier, Pete Morgan
6 // Geoff McLane
7 // GNU GPLv2, see main.cpp and shipped licence.txt for further information
8 
9 #ifndef PROPSTREEWIDGET_H
10 #define PROPSTREEWIDGET_H
11 
12 
13 
14 #include <QTimer>
15 #include <QStringList>
16 
17 #include <QWidget>
18 
19 #include <QTreeView>
20 #include <QStandardItemModel>
21 #include <QStandardItem>
22 #include <QSortFilterProxyModel>
23 #include <QStatusBar>
24 
25 #include <QCheckBox>
26 #include <QComboBox>
27 #include <QAction>
28 
29 #include "xobjects/mainobject.h"
30 #include "props/telnetslave.h"
31 
32 class MainObject;
33 
34 class PropsTreeWidget : public QWidget
35 {
36 Q_OBJECT
37 public:
38 
39  enum COLS{
40  C_NODE = 0,
41  C_VALUE = 1,
42  C_TYPE = 2,
43  C_PATH = 3
44  };
45 
46 
47  explicit PropsTreeWidget(MainObject *mOb, QWidget *parent = 0);
48 
50 
52 
53  QTimer *timer;
54  QStringList refreshList;
55 
56  QTreeView *tree;
59 
60 
61  QComboBox *comboHost;
62  QLineEdit *txtPort;
63  QAction *actionConnect;
64  QAction *actionDisconnect;
65 
66  QCheckBox *chkAutoRefresh;
68 
69  QStatusBar *statusBarTree;
70 
72 
73  void closeEvent(QCloseEvent *event);
74 
75  QList<QStandardItem *> make_row(QString node_name, QString node_value, QString node_type, QString full_path, bool is_folder);
76 
77 signals:
78 
79 public slots:
80  void load_nodes();
81 
82  void on_props_folder(QString, QString);
83  void on_props_value(QString, QString, QString, QString);
84 
88 
90  void on_set_timer_rate();
91 
92  void on_edit_property();
93  void on_test_();
94 
95  void telnet_connect();
96  void telnet_disconnect();
97 
98  void on_telnet_connected(bool);
99 };
100 
101 #endif // PROPSTREEWIDGET_H
void closeEvent(QCloseEvent *event)
QList< QStandardItem * > make_row(QString node_name, QString node_value, QString node_type, QString full_path, bool is_folder)
QLineEdit * txtPort
void on_auto_refresh_enabled()
The MainObject is an extended QObject, and the main "controller" for FGx.
Definition: mainobject.h:66
QAction * actionEditProperty
QAction * actionConnect
MainObject * mainObject
QTreeView * tree
QCheckBox * chkAutoRefresh
void on_item_selection_changed()
QStatusBar * statusBarTree
QSortFilterProxyModel * proxyModel
void on_props_folder(QString, QString)
QStandardItemModel * model
QComboBox * comboHost
void on_telnet_connected(bool)
QStringList refreshList
void on_item_double_clicked(QTreeWidgetItem *, int)
void on_props_value(QString, QString, QString, QString)
QAction * actionDisconnect
PropsTreeWidget(MainObject *mOb, QWidget *parent=0)
TelnetSlave * telnet
void on_item_expanded(QTreeWidgetItem *)
QComboBox * comboAutoRefreshRate