FGx
1
src
props
propstreewidget.h
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 <QtCore/QTimer>
15
#include <QtCore/QStringList>
16
17
#include <QtGui/QWidget>
18
19
#include <QtGui/QTreeView>
20
#include <QtGui/QStandardItemModel>
21
#include <QtGui/QStandardItem>
22
#include <QtGui/QSortFilterProxyModel>
23
#include <QtGui/QStatusBar>
24
25
#include <QtGui/QCheckBox>
26
#include <QtGui/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
49
MainObject
*mainObject;
50
51
TelnetSlave
*telnet;
52
53
QTimer *timer;
54
QStringList refreshList;
55
56
QTreeView *tree;
57
QStandardItemModel *model;
58
QSortFilterProxyModel *proxyModel;
59
60
61
QComboBox *comboHost;
62
QLineEdit *txtPort;
63
QAction *actionConnect;
64
QAction *actionDisconnect;
65
66
QCheckBox *chkAutoRefresh;
67
QComboBox *comboAutoRefreshRate;
68
69
QStatusBar *statusBarTree;
70
71
QAction *actionEditProperty;
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
85
void
on_item_expanded(QTreeWidgetItem *);
86
void
on_item_double_clicked(QTreeWidgetItem *,
int
);
87
void
on_item_selection_changed();
88
89
void
on_auto_refresh_enabled();
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
MainObject
The MainObject is an extended QObject, and the main "controller" for FGx.
Definition:
mainobject.h:61
PropsTreeWidget
Definition:
propstreewidget.h:34
TelnetSlave
Definition:
telnetslave.h:26
Generated on Thu Feb 13 2020 01:10:59 for FGx by
1.8.17