summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profileeditordialog.h
blob: f81354ca6b90fe8b4ee9af8b43ef729d7119f54a (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
#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 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();

	QString conn_device();
	int conn_baud();
	int conn_parity();
	int conn_databits();
	int conn_stopbits();
	int conn_flow();

	QString term_type();

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

	void slotDevice(int id);

private:
    //void initUI();
    MetaFactory* m_fact;
    EditBase* m_base;
    QTabWidget* m_tab;
    QHBoxLayout* m_lay;
    Profile m_prof;

	QLabel *frame_number;
	QLineEdit *name_line, *frame_device_line, *frame_number_line;
	QComboBox *terminal_box, *speed_box, *device_box;
};

#endif