-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/serialconfigwidget.cpp | 0 |
3 files changed, 5 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index b709cf3..5c5c2b3 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp | |||
@@ -3,14 +3,12 @@ | |||
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qmessagebox.h> | 4 | #include <qmessagebox.h> |
5 | #include <qstringlist.h> | 5 | #include <qstringlist.h> |
6 | #include <qcombobox.h> | 6 | #include <qcombobox.h> |
7 | 7 | ||
8 | 8 | ||
9 | #include <opie/otabwidget.h> | ||
10 | |||
11 | #include "profileeditorplugins.h" | 9 | #include "profileeditorplugins.h" |
12 | #include "metafactory.h" | 10 | #include "metafactory.h" |
13 | #include "profileeditordialog.h" | 11 | #include "profileeditordialog.h" |
14 | 12 | ||
15 | namespace { | 13 | namespace { |
16 | void setCurrent( const QString& str, QComboBox* bo ) { | 14 | void setCurrent( const QString& str, QComboBox* bo ) { |
@@ -54,13 +52,13 @@ Profile ProfileEditorDialog::profile() const | |||
54 | 52 | ||
55 | void ProfileEditorDialog::initUI() | 53 | void ProfileEditorDialog::initUI() |
56 | { | 54 | { |
57 | m_con = m_term = 0l; | 55 | m_con = m_term = 0l; |
58 | 56 | ||
59 | QVBoxLayout *mainLayout = new QVBoxLayout( this ); | 57 | QVBoxLayout *mainLayout = new QVBoxLayout( this ); |
60 | OTabWidget *tabWidget = new OTabWidget( this ); | 58 | tabWidget = new OTabWidget( this ); |
61 | tabWidget->setTabStyle(OTabWidget::TextTab); | 59 | tabWidget->setTabStyle(OTabWidget::TextTab); |
62 | mainLayout->add(tabWidget); | 60 | mainLayout->add(tabWidget); |
63 | 61 | ||
64 | QWidget *tabprof; | 62 | QWidget *tabprof; |
65 | 63 | ||
66 | /* base tabs */ | 64 | /* base tabs */ |
@@ -173,12 +171,14 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) { | |||
173 | delete m_con; | 171 | delete m_con; |
174 | m_con = m_fact->newConnectionPlugin( str, m_tabCon ); | 172 | m_con = m_fact->newConnectionPlugin( str, m_tabCon ); |
175 | 173 | ||
176 | if (m_con ) { | 174 | if (m_con ) { |
177 | m_con->load( m_prof ); | 175 | m_con->load( m_prof ); |
178 | m_layCon->addWidget( m_con ); | 176 | m_layCon->addWidget( m_con ); |
177 | } else { | ||
178 | tabWidget->removePage( m_tabCon ); | ||
179 | } | 179 | } |
180 | } | 180 | } |
181 | /* | 181 | /* |
182 | * we need to switch the widget | 182 | * we need to switch the widget |
183 | */ | 183 | */ |
184 | void ProfileEditorDialog::slotTermActivated( const QString& str ) { | 184 | void ProfileEditorDialog::slotTermActivated( const QString& str ) { |
diff --git a/noncore/apps/opie-console/profileeditordialog.h b/noncore/apps/opie-console/profileeditordialog.h index 3b67bb3..6fde839 100644 --- a/noncore/apps/opie-console/profileeditordialog.h +++ b/noncore/apps/opie-console/profileeditordialog.h | |||
@@ -1,10 +1,11 @@ | |||
1 | #ifndef PROFILE_EDITOR_DIALOG | 1 | #ifndef PROFILE_EDITOR_DIALOG |
2 | #define PROFILE_EDITOR_DIALOG | 2 | #define PROFILE_EDITOR_DIALOG |
3 | 3 | ||
4 | #include <qdialog.h> | 4 | #include <qdialog.h> |
5 | #include <opie/otabwidget.h> | ||
5 | 6 | ||
6 | #include "profile.h" | 7 | #include "profile.h" |
7 | 8 | ||
8 | class MetaFactory; | 9 | class MetaFactory; |
9 | class EditBase; | 10 | class EditBase; |
10 | class QTabWidget; | 11 | class QTabWidget; |
@@ -43,9 +44,10 @@ private: | |||
43 | QLineEdit *m_name; | 44 | QLineEdit *m_name; |
44 | QComboBox *m_conCmb, *m_termCmb; | 45 | QComboBox *m_conCmb, *m_termCmb; |
45 | 46 | ||
46 | QWidget *m_tabCon, *m_tabTerm; | 47 | QWidget *m_tabCon, *m_tabTerm; |
47 | ProfileDialogWidget* m_con, *m_term; | 48 | ProfileDialogWidget* m_con, *m_term; |
48 | QHBoxLayout *m_layCon, *m_layTerm; | 49 | QHBoxLayout *m_layCon, *m_layTerm; |
50 | OTabWidget *tabWidget; | ||
49 | }; | 51 | }; |
50 | 52 | ||
51 | #endif | 53 | #endif |
diff --git a/noncore/apps/opie-console/serialconfigwidget.cpp b/noncore/apps/opie-console/serialconfigwidget.cpp index d216c92..1e97a24 100644 --- a/noncore/apps/opie-console/serialconfigwidget.cpp +++ b/noncore/apps/opie-console/serialconfigwidget.cpp | |||