summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profileeditorplugins.h
blob: f5761431fbc44bd0f2bfe13cd1cf9cd47835a661 (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
95
96
#ifndef PROFILE_EDITOR_PLUGINS_H
#define PROFILE_EDITOR_PLUGINS_H


#include <qobject.h>

class QWidget;
class Profile;
class ProfileEditorPlugin : public QObject
{
    Q_OBJECT
public:
    ProfileEditorPlugin(QWidget *parent);

    virtual ~ProfileEditorPlugin();

    virtual void save() = 0;

    virtual QWidget *widget() = 0;

    QWidget *connection_widget();
    QWidget *terminal_widget();

public slots:
    void slotConnFlow(int id);
    void slotConnParity(int id);
    void slotConnSpeed(int id);
    void slotTermTerm(int id);
    void slotTermColour(int id);
    void slotTermFont(int id);
    void slotTermEcho(bool on);
    void slotTermWrap(bool on);
    void slotTermInbound(bool on);
    void slotTermOutbound(bool on);

protected:
    QWidget *m_parent, *m_widget;
    Profile *m_profile;

private:
    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 ColourIds
    {
        id_term_black,
        id_term_white
    };

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

//#ifdef __cplusplus
//extern "C" {
//#endif

ProfileEditorPlugin *factory_serial(QWidget *parent, Profile *p);
ProfileEditorPlugin *factory_irda(QWidget *parent, Profile *p);
ProfileEditorPlugin *factory_modem(QWidget *parent, Profile *p);

//#ifdef __cplusplus
//}
//#endif

#endif