-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 30 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.h | 7 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditorplugins.cpp | 117 | ||||
-rw-r--r-- | noncore/apps/opie-console/widget_layer.h | 2 |
5 files changed, 73 insertions, 85 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index dce08ca..31f1138 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -165,12 +165,12 @@ void MainWindow::slotConfigure() { | |||
165 | manager()->setProfiles( conf.list() ); | 165 | manager()->setProfiles( conf.list() ); |
166 | populateProfiles(); | 166 | populateProfiles(); |
167 | } | 167 | } |
168 | } | 168 | } |
169 | 169 | ||
170 | void MainWindow::slotClose() { | 170 | void MainWindow::slotClose() { |
171 | |||
172 | } | 171 | } |
173 | 172 | ||
174 | void MainWindow::slotProfile(int) { | 173 | void MainWindow::slotProfile(int) { |
175 | 174 | ||
175 | |||
176 | } | 176 | } |
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index 8e63429..be23eff 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp | |||
@@ -1,7 +1,8 @@ | |||
1 | 1 | ||
2 | #include <opie/otabwidget.h> | ||
2 | #include "profileeditordialog.h" | 3 | #include "profileeditordialog.h" |
3 | 4 | ||
4 | #include "qlayout.h" | 5 | #include "qlayout.h" |
5 | #include "qlineedit.h" | 6 | #include "qlineedit.h" |
6 | #include "qlabel.h" | 7 | #include "qlabel.h" |
7 | #include "qmessagebox.h" | 8 | #include "qmessagebox.h" |
@@ -10,23 +11,23 @@ | |||
10 | 11 | ||
11 | #include "profileeditorplugins.h" | 12 | #include "profileeditorplugins.h" |
12 | #include "metafactory.h" | 13 | #include "metafactory.h" |
13 | 14 | ||
14 | ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, | 15 | ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, |
15 | const Profile& prof ) | 16 | const Profile& prof ) |
16 | : QTabDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof ) | 17 | : QDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof ) |
17 | { | 18 | { |
18 | initUI(); | 19 | initUI(); |
19 | 20 | ||
20 | // Apply current profile | 21 | // Apply current profile |
21 | // plugin_plugin->load(profile); | 22 | // plugin_plugin->load(profile); |
22 | // ... (reset profile name line edit etc.) | 23 | // ... (reset profile name line edit etc.) |
23 | } | 24 | } |
24 | 25 | ||
25 | ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) | 26 | ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) |
26 | : QTabDialog(0, 0, TRUE), m_fact( fact ) | 27 | : QDialog(0, 0, TRUE), m_fact( fact ) |
27 | { | 28 | { |
28 | // Default profile | 29 | // Default profile |
29 | m_prof = Profile(QString::null, "serial", Profile::Black, Profile::White, Profile::VT102); | 30 | m_prof = Profile(QString::null, "serial", Profile::Black, Profile::White, Profile::VT102); |
30 | 31 | ||
31 | initUI(); | 32 | initUI(); |
32 | 33 | ||
@@ -38,12 +39,17 @@ Profile ProfileEditorDialog::profile() const | |||
38 | { | 39 | { |
39 | return m_prof; | 40 | return m_prof; |
40 | } | 41 | } |
41 | 42 | ||
42 | void ProfileEditorDialog::initUI() | 43 | void ProfileEditorDialog::initUI() |
43 | { | 44 | { |
45 | |||
46 | QVBoxLayout *mainLayout = new QVBoxLayout( this ); | ||
47 | OTabWidget *tabWidget = new OTabWidget( this ); | ||
48 | mainLayout->add(tabWidget); | ||
49 | |||
44 | QWidget *tabterm, *tabconn, *tabprof; | 50 | QWidget *tabterm, *tabconn, *tabprof; |
45 | 51 | ||
46 | tabprof = new QWidget(this); | 52 | tabprof = new QWidget(this); |
47 | tabterm = new QWidget(this); | 53 | tabterm = new QWidget(this); |
48 | tabconn = new QWidget(this); | 54 | tabconn = new QWidget(this); |
49 | 55 | ||
@@ -95,39 +101,37 @@ void ProfileEditorDialog::initUI() | |||
95 | 101 | ||
96 | QVBoxLayout *vbox = new QVBoxLayout(tabconn, 2); | 102 | QVBoxLayout *vbox = new QVBoxLayout(tabconn, 2); |
97 | vbox->add(device); | 103 | vbox->add(device); |
98 | vbox->add(device_box); | 104 | vbox->add(device_box); |
99 | vbox->add(plugin_base); | 105 | vbox->add(plugin_base); |
100 | vbox->add(conn_widget); | 106 | vbox->add(conn_widget); |
107 | vbox->setStretchFactor(device, 1); | ||
108 | vbox->setStretchFactor(device_box, 1); | ||
109 | vbox->setStretchFactor(plugin_base, 1); | ||
110 | vbox->setStretchFactor(conn_widget, 7); | ||
101 | 111 | ||
102 | QVBoxLayout *vbox2 = new QVBoxLayout(tabterm, 2); | 112 | QVBoxLayout *vbox2 = new QVBoxLayout(tabterm, 2); |
103 | vbox2->add(term_widget); | 113 | vbox2->add(term_widget); |
104 | 114 | ||
105 | addTab(tabprof, QObject::tr("Profile")); | 115 | tabWidget->addTab(tabprof, "", QObject::tr("Profile")); |
106 | addTab(tabconn, QObject::tr("Connection")); | 116 | tabWidget->addTab(tabconn, "", QObject::tr("Connection")); |
107 | addTab(tabterm, QObject::tr("Terminal")); | 117 | tabWidget->addTab(tabterm, "", QObject::tr("Terminal")); |
108 | |||
109 | setOkButton(QObject::tr("OK")); | ||
110 | setCancelButton(QObject::tr("Cancel")); | ||
111 | 118 | ||
112 | // load profile values | 119 | // load profile values |
113 | |||
114 | name_line->setText(m_prof.name()); | 120 | name_line->setText(m_prof.name()); |
115 | for(int i = 0; i < device_box->count(); i++) | 121 | for(int i = 0; i < device_box->count(); i++) |
116 | { | 122 | { |
117 | device_box->setCurrentItem(i); | 123 | device_box->setCurrentItem(i); |
118 | if(prof_type() == m_prof.ioLayerName()) | 124 | if(prof_type() == m_prof.ioLayerName()) |
119 | { | 125 | { |
120 | slotDevice(i); | 126 | slotDevice(i); |
121 | break; | 127 | break; |
122 | } | 128 | } |
123 | } | 129 | } |
124 | 130 | ||
125 | // signals | 131 | // signals |
126 | |||
127 | connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); | ||
128 | connect(device_box, SIGNAL(activated(int)), SLOT(slotDevice(int))); | 132 | connect(device_box, SIGNAL(activated(int)), SLOT(slotDevice(int))); |
129 | } | 133 | } |
130 | 134 | ||
131 | ProfileEditorDialog::~ProfileEditorDialog() { | 135 | ProfileEditorDialog::~ProfileEditorDialog() { |
132 | 136 | ||
133 | } | 137 | } |
@@ -163,16 +167,12 @@ void ProfileEditorDialog::accept() | |||
163 | m_prof.setName(prof_name()); | 167 | m_prof.setName(prof_name()); |
164 | m_prof.setIOLayer(prof_type()); | 168 | m_prof.setIOLayer(prof_type()); |
165 | 169 | ||
166 | QDialog::accept(); | 170 | QDialog::accept(); |
167 | } | 171 | } |
168 | 172 | ||
169 | void ProfileEditorDialog::slotCancel() | ||
170 | { | ||
171 | reject(); | ||
172 | } | ||
173 | 173 | ||
174 | QString ProfileEditorDialog::prof_name() | 174 | QString ProfileEditorDialog::prof_name() |
175 | { | 175 | { |
176 | return name_line->text(); | 176 | return name_line->text(); |
177 | } | 177 | } |
178 | 178 | ||
diff --git a/noncore/apps/opie-console/profileeditordialog.h b/noncore/apps/opie-console/profileeditordialog.h index 18e2ec0..8e830f1 100644 --- a/noncore/apps/opie-console/profileeditordialog.h +++ b/noncore/apps/opie-console/profileeditordialog.h | |||
@@ -1,23 +1,23 @@ | |||
1 | #ifndef PROFILE_EDITOR_DIALOG | 1 | #ifndef PROFILE_EDITOR_DIALOG |
2 | #define PROFILE_EDITOR_DIALOG | 2 | #define PROFILE_EDITOR_DIALOG |
3 | 3 | ||
4 | #include <qtabdialog.h> | 4 | #include <qdialog.h> |
5 | 5 | ||
6 | #include "profile.h" | 6 | #include "profile.h" |
7 | 7 | ||
8 | class MetaFactory; | 8 | class MetaFactory; |
9 | class EditBase; | 9 | class EditBase; |
10 | class QTabWidget; | 10 | class QTabWidget; |
11 | class QHBoxLayout; | 11 | class QHBoxLayout; |
12 | class QLineEdit; | 12 | class QLineEdit; |
13 | class QComboBox; | 13 | class QComboBox; |
14 | class QLabel; | 14 | class QLabel; |
15 | class ProfileEditorPlugin; | 15 | class ProfileEditorPlugin; |
16 | 16 | ||
17 | class ProfileEditorDialog : public QTabDialog { | 17 | class ProfileEditorDialog : public QDialog { |
18 | Q_OBJECT | 18 | Q_OBJECT |
19 | public: | 19 | public: |
20 | ProfileEditorDialog(MetaFactory* fact, | 20 | ProfileEditorDialog(MetaFactory* fact, |
21 | const Profile& prof ); | 21 | const Profile& prof ); |
22 | ProfileEditorDialog(MetaFactory* fact ); | 22 | ProfileEditorDialog(MetaFactory* fact ); |
23 | ~ProfileEditorDialog(); | 23 | ~ProfileEditorDialog(); |
@@ -25,15 +25,12 @@ public: | |||
25 | 25 | ||
26 | QString prof_name(); | 26 | QString prof_name(); |
27 | QString prof_type(); | 27 | QString prof_type(); |
28 | 28 | ||
29 | public slots: | 29 | public slots: |
30 | void accept(); | 30 | void accept(); |
31 | //void slotOk(); | ||
32 | void slotCancel(); | ||
33 | |||
34 | void slotDevice(int id); | 31 | void slotDevice(int id); |
35 | 32 | ||
36 | private: | 33 | private: |
37 | void initUI(); | 34 | void initUI(); |
38 | 35 | ||
39 | MetaFactory* m_fact; | 36 | MetaFactory* m_fact; |
diff --git a/noncore/apps/opie-console/profileeditorplugins.cpp b/noncore/apps/opie-console/profileeditorplugins.cpp index b63fa1c..c11c854 100644 --- a/noncore/apps/opie-console/profileeditorplugins.cpp +++ b/noncore/apps/opie-console/profileeditorplugins.cpp | |||
@@ -7,12 +7,14 @@ | |||
7 | #include "qlineedit.h" | 7 | #include "qlineedit.h" |
8 | #include "qlayout.h" | 8 | #include "qlayout.h" |
9 | #include "qcombobox.h" | 9 | #include "qcombobox.h" |
10 | #include "qradiobutton.h" | 10 | #include "qradiobutton.h" |
11 | #include "qcheckbox.h" | 11 | #include "qcheckbox.h" |
12 | #include "qbuttongroup.h" | 12 | #include "qbuttongroup.h" |
13 | #include "qhgroupbox.h" | ||
14 | #include "qvbox.h" | ||
13 | 15 | ||
14 | #include "io_serial.h" | 16 | #include "io_serial.h" |
15 | 17 | ||
16 | // Base class | 18 | // Base class |
17 | 19 | ||
18 | ProfileEditorPlugin::ProfileEditorPlugin(QWidget *parent, Profile *p) | 20 | ProfileEditorPlugin::ProfileEditorPlugin(QWidget *parent, Profile *p) |
@@ -33,52 +35,48 @@ QWidget *ProfileEditorPlugin::connection_widget() | |||
33 | QWidget *root; | 35 | QWidget *root; |
34 | QVBoxLayout *lroot; | 36 | QVBoxLayout *lroot; |
35 | 37 | ||
36 | root = new QWidget(); | 38 | root = new QWidget(); |
37 | 39 | ||
38 | // Build GUI | 40 | // Build GUI |
41 | QLabel *speedlabel = new QLabel(QObject::tr("Speed"), root); | ||
39 | 42 | ||
40 | QComboBox *speed_box = new QComboBox(root); | 43 | QComboBox *speed_box = new QComboBox(root); |
41 | speed_box->insertItem("115200 baud", id_baud_115200); | 44 | speed_box->insertItem("115200 baud", id_baud_115200); |
42 | speed_box->insertItem("57600 baud", id_baud_57600); | 45 | speed_box->insertItem("57600 baud", id_baud_57600); |
43 | speed_box->insertItem("38400 baud", id_baud_38400); | 46 | speed_box->insertItem("38400 baud", id_baud_38400); |
44 | speed_box->insertItem("19200 baud", id_baud_19200); | 47 | speed_box->insertItem("19200 baud", id_baud_19200); |
45 | speed_box->insertItem("9600 baud", id_baud_9600); | 48 | speed_box->insertItem("9600 baud", id_baud_9600); |
46 | 49 | ||
47 | QLabel *speedlabel = new QLabel(QObject::tr("Speed"), root); | 50 | QButtonGroup *group_flow = new QButtonGroup(QObject::tr("Flow control"), root); |
48 | QLabel *flow = new QLabel(QObject::tr("Flow control"), root); | ||
49 | QLabel *parity = new QLabel(QObject::tr("Parity"), root); | ||
50 | |||
51 | QButtonGroup *group_flow = new QButtonGroup(root); | ||
52 | group_flow->hide(); | ||
53 | QRadioButton *flow_hw = new QRadioButton(QObject::tr("Hardware"), root); | ||
54 | QRadioButton *flow_sw = new QRadioButton(QObject::tr("Software"), root); | ||
55 | group_flow->insert(flow_hw, id_flow_hw); | ||
56 | group_flow->insert(flow_sw, id_flow_sw); | ||
57 | |||
58 | QButtonGroup *group_parity = new QButtonGroup(root); | ||
59 | group_parity->hide(); | ||
60 | QRadioButton *parity_odd = new QRadioButton(QObject::tr("Odd"), root); | ||
61 | QRadioButton *parity_even = new QRadioButton(QObject::tr("Even"), root); | ||
62 | group_parity->insert(parity_odd, id_parity_odd); | ||
63 | group_parity->insert(parity_even, id_parity_even); | ||
64 | 51 | ||
65 | // Build Layout | 52 | QRadioButton *flow_hw = new QRadioButton(QObject::tr("Hardware"), group_flow); |
53 | QRadioButton *flow_sw = new QRadioButton(QObject::tr("Software"), group_flow); | ||
66 | 54 | ||
55 | QButtonGroup *group_parity = new QButtonGroup(QObject::tr("Parity"), root); | ||
56 | QRadioButton *parity_odd = new QRadioButton(QObject::tr("Odd"), group_parity); | ||
57 | QRadioButton *parity_even = new QRadioButton(QObject::tr("Even"), group_parity); | ||
58 | |||
59 | // Build Layout | ||
67 | lroot = new QVBoxLayout(root); | 60 | lroot = new QVBoxLayout(root); |
68 | lroot->add(speedlabel); | 61 | lroot->add(speedlabel); |
69 | lroot->add(speed_box); | 62 | lroot->add(speed_box); |
70 | lroot->add(flow); | 63 | lroot->setStretchFactor(speedlabel, 1); |
71 | QHBoxLayout *hbox = new QHBoxLayout(lroot, 2); | 64 | lroot->setStretchFactor(speed_box, 1); |
65 | |||
66 | QHBoxLayout *hbox = new QHBoxLayout(group_flow, 2); | ||
72 | hbox->add(flow_hw); | 67 | hbox->add(flow_hw); |
73 | hbox->add(flow_sw); | 68 | hbox->add(flow_sw); |
74 | lroot->add(parity); | 69 | lroot->add(group_flow); |
75 | QHBoxLayout *hbox2 = new QHBoxLayout(lroot, 2); | 70 | lroot->setStretchFactor(group_flow, 2); |
76 | hbox2->add(parity_odd); | 71 | |
77 | hbox2->add(parity_even); | 72 | QHBoxLayout *hboxPar = new QHBoxLayout( group_parity, 2); |
78 | 73 | hboxPar->add(parity_odd); | |
74 | hboxPar->add(parity_even); | ||
75 | lroot->add(group_parity); | ||
76 | lroot->setStretchFactor(group_parity, 2); | ||
79 | // Apply profile settings | 77 | // Apply profile settings |
80 | 78 | ||
81 | int rad_flow = m_profile->readNumEntry("Flow"); | 79 | int rad_flow = m_profile->readNumEntry("Flow"); |
82 | int rad_parity = m_profile->readNumEntry("Parity"); | 80 | int rad_parity = m_profile->readNumEntry("Parity"); |
83 | int speed = m_profile->readNumEntry("Speed"); | 81 | int speed = m_profile->readNumEntry("Speed"); |
84 | 82 | ||
@@ -107,62 +105,57 @@ QWidget *ProfileEditorPlugin::terminal_widget() | |||
107 | QVBoxLayout *lroot; | 105 | QVBoxLayout *lroot; |
108 | 106 | ||
109 | root = new QWidget(); | 107 | root = new QWidget(); |
110 | 108 | ||
111 | // Build GUI | 109 | // Build GUI |
112 | 110 | ||
111 | |||
112 | QLabel *terminal = new QLabel(QObject::tr("Terminal type"), root); | ||
113 | |||
113 | QComboBox *terminal_box = new QComboBox(root); | 114 | QComboBox *terminal_box = new QComboBox(root); |
114 | terminal_box->insertItem("VT 100", id_term_vt100); | 115 | terminal_box->insertItem("VT 100", id_term_vt100); |
115 | terminal_box->insertItem("VT 220", id_term_vt220); | 116 | terminal_box->insertItem("VT 220", id_term_vt220); |
116 | terminal_box->insertItem("ANSI", id_term_ansi); | 117 | terminal_box->insertItem("ANSI", id_term_ansi); |
117 | 118 | ||
118 | QLabel *terminal = new QLabel(QObject::tr("Terminal type"), root); | ||
119 | QLabel *colourlabel = new QLabel(QObject::tr("Colour scheme"), root); | 119 | QLabel *colourlabel = new QLabel(QObject::tr("Colour scheme"), root); |
120 | QLabel *sizelabel = new QLabel(QObject::tr("Font size"), root); | ||
121 | QLabel *options = new QLabel(QObject::tr("Options"), root); | ||
122 | QLabel *conversions = new QLabel(QObject::tr("Line-break conversions"), root); | ||
123 | |||
124 | QComboBox *colour_box = new QComboBox(root); | 120 | QComboBox *colour_box = new QComboBox(root); |
125 | colour_box->insertItem(QObject::tr("black on white"), id_term_black); | 121 | colour_box->insertItem(QObject::tr("black on white"), id_term_black); |
126 | colour_box->insertItem(QObject::tr("white on black"), id_term_white); | 122 | colour_box->insertItem(QObject::tr("white on black"), id_term_white); |
127 | 123 | ||
128 | QButtonGroup *group_size = new QButtonGroup(root); | 124 | QButtonGroup *group_size = new QButtonGroup( QObject::tr("Font size"), root ); |
129 | group_size->hide(); | 125 | QRadioButton *size_small = new QRadioButton(QObject::tr("small"), group_size ); |
130 | QRadioButton *size_small = new QRadioButton(QObject::tr("small"), root); | 126 | QRadioButton *size_medium = new QRadioButton(QObject::tr("medium"), group_size ); |
131 | QRadioButton *size_medium = new QRadioButton(QObject::tr("medium"), root); | 127 | QRadioButton *size_large = new QRadioButton(QObject::tr("large"), group_size ); |
132 | QRadioButton *size_large = new QRadioButton(QObject::tr("large"), root); | ||
133 | group_size->insert(size_small); | ||
134 | group_size->insert(size_medium); | ||
135 | group_size->insert(size_large); | ||
136 | 128 | ||
137 | QCheckBox *option_echo = new QCheckBox(QObject::tr("Local echo"), root); | 129 | QHGroupBox *group_conv = new QHGroupBox( QObject::tr("Line-break conversions"), root ); |
138 | QCheckBox *option_wrap = new QCheckBox(QObject::tr("Line wrap"), root); | 130 | QCheckBox *conv_inbound = new QCheckBox(QObject::tr("Inbound"), group_conv); |
131 | QCheckBox *conv_outbound = new QCheckBox(QObject::tr("Outbound"), group_conv); | ||
139 | 132 | ||
140 | QCheckBox *conv_inbound = new QCheckBox(QObject::tr("Inbound"), root); | 133 | QHGroupBox *group_options = new QHGroupBox( QObject::tr("Options"), root ); |
141 | QCheckBox *conv_outbound = new QCheckBox(QObject::tr("Outbound"), root); | 134 | QCheckBox *option_echo = new QCheckBox(QObject::tr("Local echo"), group_options); |
135 | QCheckBox *option_wrap = new QCheckBox(QObject::tr("Line wrap"), group_options); | ||
142 | 136 | ||
143 | // Build Layout | 137 | // Build Layout |
144 | |||
145 | lroot = new QVBoxLayout(root, 2); | 138 | lroot = new QVBoxLayout(root, 2); |
146 | lroot->add(terminal); | 139 | |
147 | lroot->add(terminal_box); | 140 | QVBoxLayout *typeBox = new QVBoxLayout( lroot ); |
148 | lroot->add(sizelabel); | 141 | typeBox->add(terminal); |
149 | QHBoxLayout *hbox = new QHBoxLayout(lroot, 2); | 142 | typeBox->add(terminal_box); |
143 | |||
144 | QHBoxLayout *hbox = new QHBoxLayout( group_size, 2); | ||
150 | hbox->add(size_small); | 145 | hbox->add(size_small); |
151 | hbox->add(size_medium); | 146 | hbox->add(size_medium); |
152 | hbox->add(size_large); | 147 | hbox->add(size_large); |
153 | lroot->add(colourlabel); | 148 | lroot->add( group_size ); |
154 | lroot->add(colour_box); | 149 | |
155 | lroot->add(conversions); | 150 | QVBoxLayout *colourBox = new QVBoxLayout( lroot ); |
156 | QHBoxLayout *hbox2 = new QHBoxLayout(lroot, 2); | 151 | colourBox->add(colourlabel); |
157 | hbox2->add(conv_inbound); | 152 | colourBox->add(colour_box); |
158 | hbox2->add(conv_outbound); | 153 | |
159 | lroot->add(options); | 154 | lroot->add(group_conv); |
160 | QHBoxLayout *hbox3 = new QHBoxLayout(lroot, 2); | 155 | lroot->add(group_options); |
161 | hbox3->add(option_wrap); | ||
162 | hbox3->add(option_echo); | ||
163 | 156 | ||
164 | // Apply profile settings | 157 | // Apply profile settings |
165 | 158 | ||
166 | int term = m_profile->readNumEntry("Terminal"); | 159 | int term = m_profile->readNumEntry("Terminal"); |
167 | int colour = m_profile->readNumEntry("Colour"); | 160 | int colour = m_profile->readNumEntry("Colour"); |
168 | int fontsize = m_profile->readNumEntry("Font"); | 161 | int fontsize = m_profile->readNumEntry("Font"); |
@@ -329,15 +322,14 @@ class ProfileEditorPluginSerial : public ProfileEditorPlugin | |||
329 | } | 322 | } |
330 | 323 | ||
331 | QWidget *widget() | 324 | QWidget *widget() |
332 | { | 325 | { |
333 | if(!m_widget) | 326 | if(!m_widget) |
334 | { | 327 | { |
335 | QFrame *device_frame = new QFrame(m_parent); | ||
336 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); | ||
337 | 328 | ||
329 | QWidget *device_frame = new QWidget( m_parent ); | ||
338 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); | 330 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); |
339 | 331 | ||
340 | device_line = new QLineEdit("/dev/ttyS0", device_frame); | 332 | device_line = new QLineEdit("/dev/ttyS0", device_frame); |
341 | 333 | ||
342 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); | 334 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); |
343 | vbox_frame->add(frame_device); | 335 | vbox_frame->add(frame_device); |
@@ -378,14 +370,14 @@ class ProfileEditorPluginIrda : public ProfileEditorPlugin | |||
378 | } | 370 | } |
379 | 371 | ||
380 | QWidget *widget() | 372 | QWidget *widget() |
381 | { | 373 | { |
382 | if(!m_widget) | 374 | if(!m_widget) |
383 | { | 375 | { |
384 | QFrame *device_frame = new QFrame(m_parent); | 376 | QWidget *device_frame = new QWidget(m_parent); |
385 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); | 377 | |
386 | 378 | ||
387 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); | 379 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); |
388 | 380 | ||
389 | device_line = new QLineEdit("/dev/ircomm0", device_frame); | 381 | device_line = new QLineEdit("/dev/ircomm0", device_frame); |
390 | 382 | ||
391 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); | 383 | QVBoxLayout *vbox_frame = new QVBoxLayout(device_frame, 2); |
@@ -426,14 +418,13 @@ class ProfileEditorPluginModem : public ProfileEditorPlugin | |||
426 | } | 418 | } |
427 | 419 | ||
428 | QWidget *widget() | 420 | QWidget *widget() |
429 | { | 421 | { |
430 | if(!m_widget) | 422 | if(!m_widget) |
431 | { | 423 | { |
432 | QFrame *device_frame = new QFrame(m_parent); | 424 | QWidget *device_frame = new QWidget(m_parent); |
433 | device_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); | ||
434 | 425 | ||
435 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); | 426 | QLabel *frame_device = new QLabel(QObject::tr("Device"), device_frame); |
436 | QLabel *frame_number = new QLabel(QObject::tr("Phone number"), device_frame); | 427 | QLabel *frame_number = new QLabel(QObject::tr("Phone number"), device_frame); |
437 | 428 | ||
438 | device_line = new QLineEdit("/dev/ttyS0", device_frame); | 429 | device_line = new QLineEdit("/dev/ttyS0", device_frame); |
439 | number_line = new QLineEdit(device_frame); | 430 | number_line = new QLineEdit(device_frame); |
diff --git a/noncore/apps/opie-console/widget_layer.h b/noncore/apps/opie-console/widget_layer.h index 99d248e..adf2038 100644 --- a/noncore/apps/opie-console/widget_layer.h +++ b/noncore/apps/opie-console/widget_layer.h | |||
@@ -51,13 +51,13 @@ public: | |||
51 | virtual ~WidgetLayer(); | 51 | virtual ~WidgetLayer(); |
52 | 52 | ||
53 | public: | 53 | public: |
54 | /** | 54 | /** |
55 | * sets the image | 55 | * sets the image |
56 | */ | 56 | */ |
57 | virtual void setImage( QArray<Character> const newimg, int lines, int colums ); | 57 | virtual void setImage( QArray<Character> const newimg, int lines, int colums ) = 0; |
58 | 58 | ||
59 | /** | 59 | /** |
60 | * annoy the user | 60 | * annoy the user |
61 | */ | 61 | */ |
62 | void bell(); | 62 | void bell(); |
63 | 63 | ||