-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsettingguiwireup.h
48 lines (36 loc) · 1.21 KB
/
settingguiwireup.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef SETTINGGUIWIREUP_H
#define SETTINGGUIWIREUP_H
#include <QStackedWidget>
#include <QComboBox>
#include <QStackedLayout>
#include <QListWidget>
#include <QMap>
#include "ports/port_settings/port_settings.h"
#include "ports/gui_builders/port_guibuilder.h"
#include "channels/channel_factory.h"
class SettingGuiWireup : public QStackedWidget
{
Q_OBJECT
QComboBox *port_type_combobox;
QListWidget *channel_list;
ChannelFactory *channels;
QMap<QString, PortGuiBuilderPointer> type_to_builder;
QMap<QString, int> type_to_index;
bool valid = false;
int last_channel = -1;
PortGuiBuilderPointer current = nullptr;
public slots:
void onPortTypeChange( QString new_type );
void onChannelChange( QString new_channel );
signals:
void storeSettings( PortSettingsPointer settings, int chan_idx );
public:
SettingGuiWireup( QWidget *parent );
void registerFriends( QComboBox *port_type_combobox,
QListWidget *channel_list,
ChannelFactory *channels
);
void registerPortType( PortGuiBuilderPointer builder );
void setSettings( PortSettingsPointer settings );
};
#endif // SETTINGGUIWIREUP_H