Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index d124067..2dfc0fd 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp | |||
@@ -54,5 +54,5 @@ Profile ProfileEditorDialog::profile() const | |||
54 | void ProfileEditorDialog::initUI() | 54 | void ProfileEditorDialog::initUI() |
55 | { | 55 | { |
56 | m_con = m_term = 0l; | 56 | m_con = m_term = m_key = 0l; |
57 | 57 | ||
58 | QVBoxLayout *mainLayout = new QVBoxLayout( this ); | 58 | QVBoxLayout *mainLayout = new QVBoxLayout( this ); |
@@ -65,8 +65,10 @@ void ProfileEditorDialog::initUI() | |||
65 | m_tabTerm = new QWidget(this); | 65 | m_tabTerm = new QWidget(this); |
66 | m_tabCon = new QWidget(this); | 66 | m_tabCon = new QWidget(this); |
67 | m_tabKey = new QWidget(this); | ||
67 | 68 | ||
68 | /* base layout for tabs */ | 69 | /* base layout for tabs */ |
69 | m_layCon = new QHBoxLayout( m_tabCon , 2 ); | 70 | m_layCon = new QHBoxLayout( m_tabCon , 2 ); |
70 | m_layTerm = new QHBoxLayout( m_tabTerm, 2 ); | 71 | m_layTerm = new QHBoxLayout( m_tabTerm, 2 ); |
72 | m_layKey = new QHBoxLayout( m_tabKey, 2 ); | ||
71 | 73 | ||
72 | // profile tab | 74 | // profile tab |
@@ -95,4 +97,5 @@ void ProfileEditorDialog::initUI() | |||
95 | //tabWidget->addTab(m_tabCon, "", QObject::tr("Connection")); | 97 | //tabWidget->addTab(m_tabCon, "", QObject::tr("Connection")); |
96 | tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal")); | 98 | tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal")); |
99 | tabWidget->addTab(m_tabKey, "", QObject::tr("Special Keys")); | ||
97 | tabWidget->setCurrentTab( tabprof ); | 100 | tabWidget->setCurrentTab( tabprof ); |
98 | 101 | ||
@@ -113,4 +116,5 @@ void ProfileEditorDialog::initUI() | |||
113 | slotConActivated( m_fact->external(m_prof.ioLayerName() ) ); | 116 | slotConActivated( m_fact->external(m_prof.ioLayerName() ) ); |
114 | slotTermActivated( m_fact->external(m_prof.terminalName() ) ); | 117 | slotTermActivated( m_fact->external(m_prof.terminalName() ) ); |
118 | slotKeyActivated( "Default Keyboard" ); | ||
115 | setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); | 119 | setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); |
116 | setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); | 120 | setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); |
@@ -151,4 +155,6 @@ void ProfileEditorDialog::accept() | |||
151 | if (m_term ) | 155 | if (m_term ) |
152 | m_term->save( m_prof ); | 156 | m_term->save( m_prof ); |
157 | if (m_key) | ||
158 | m_key->save( m_prof ); | ||
153 | 159 | ||
154 | QDialog::accept(); | 160 | QDialog::accept(); |
@@ -179,4 +185,5 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) { | |||
179 | m_con->load( m_prof ); | 185 | m_con->load( m_prof ); |
180 | m_layCon->addWidget( m_con ); | 186 | m_layCon->addWidget( m_con ); |
187 | |||
181 | if(!m_showconntab) | 188 | if(!m_showconntab) |
182 | { | 189 | { |
@@ -203,2 +210,13 @@ void ProfileEditorDialog::slotTermActivated( const QString& str ) { | |||
203 | } | 210 | } |
204 | 211 | ||
212 | void ProfileEditorDialog::slotKeyActivated(const QString &str) { | ||
213 | delete m_key; | ||
214 | m_key = m_fact->newKeyboardPlugin( str, m_tabKey ); | ||
215 | |||
216 | if (m_key) { | ||
217 | |||
218 | m_key->load(m_prof); | ||
219 | m_layKey->addWidget(m_key); | ||
220 | } | ||
221 | |||
222 | } | ||