Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
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,4 +1,5 @@ | |||
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" |
@@ -13,7 +14,7 @@ | |||
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 | ||
@@ -23,7 +24,7 @@ ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, | |||
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); |
@@ -41,6 +42,11 @@ Profile ProfileEditorDialog::profile() const | |||
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); |
@@ -98,19 +104,19 @@ void ProfileEditorDialog::initUI() | |||
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 | { |
@@ -123,8 +129,6 @@ void ProfileEditorDialog::initUI() | |||
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 | ||
@@ -166,10 +170,6 @@ void ProfileEditorDialog::accept() | |||
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 | { |