summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profileeditordialog.h
blob: a6808d0698e057ef5c2b116c27e52740c593a411 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#ifndef PROFILE_EDITOR_DIALOG
#define PROFILE_EDITOR_DIALOG

#include <qtabdialog.h>

#include "profile.h"

class MetaFactory;
class EditBase;
class QTabWidget;
class QHBoxLayout;
class QLineEdit;
class QComboBox;
class QLabel;
class ProfileEditorPlugin;

class ProfileEditorDialog : public QTabDialog {
    Q_OBJECT
public:
    ProfileEditorDialog(MetaFactory* fact,
                        const Profile& prof );
    ProfileEditorDialog(MetaFactory* fact );
	~ProfileEditorDialog();
    Profile profile()const;

	QString prof_name();
	QString prof_type();

public slots:
	void accept();
	//void slotOk();
	void slotCancel();

	void slotDevice(int id);

	void slotConnFlow(int id);
	void slotConnParity(int id);
	void slotConnSpeed(int id);
	void slotTermTerm(int id);
	void slotTermFont(int id);

private:
    void initUI();

    MetaFactory* m_fact;
    EditBase* m_base;
    QTabWidget* m_tab;
    QHBoxLayout* m_lay;
    Profile m_prof;

	QLineEdit *name_line;
	QComboBox *device_box;

	QWidget *plugin_base;
	ProfileEditorPlugin *plugin_plugin;
	QHBoxLayout *plugin_layout;

	enum ParityIds
	{
		id_parity_odd,
		id_parity_even
	};

	enum FlowIds
	{
		id_flow_hw,
		id_flow_sw
	};

	enum SpeedIds
	{
		id_baud_115200,
		id_baud_57600,
		id_baud_38400,
		id_baud_19200,
		id_baud_9600
	};

	enum TermIds
	{
		id_term_vt100,
		id_term_vt220,
		id_term_ansi
	};

	enum FontIds
	{
		id_size_small,
		id_size_medium,
		id_size_large
	};
};

#endif