Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index 1765d42..9890c3e 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp | |||
@@ -7,3 +7,3 @@ | |||
7 | #include <qcheckbox.h> | 7 | #include <qcheckbox.h> |
8 | 8 | #include <qscrollview.h> | |
9 | 9 | ||
@@ -55,2 +55,3 @@ void ProfileEditorDialog::initUI() | |||
55 | 55 | ||
56 | |||
56 | QVBoxLayout *mainLayout = new QVBoxLayout( this ); | 57 | QVBoxLayout *mainLayout = new QVBoxLayout( this ); |
@@ -66,2 +67,11 @@ void ProfileEditorDialog::initUI() | |||
66 | 67 | ||
68 | m_svCon = new QScrollView( m_tabCon ); | ||
69 | m_svCon->setResizePolicy( QScrollView::AutoOneFit ); | ||
70 | m_svCon->setHScrollBarMode( QScrollView::AlwaysOff ); | ||
71 | m_svCon->setFrameShape( QFrame::NoFrame ); | ||
72 | m_svTerm = new QScrollView( m_tabTerm ); | ||
73 | m_svTerm->setResizePolicy( QScrollView::AutoOneFit ); | ||
74 | m_svTerm->setHScrollBarMode( QScrollView::AlwaysOff ); | ||
75 | m_svTerm->setFrameShape( QFrame::NoFrame ); | ||
76 | |||
67 | /* base layout for tabs */ | 77 | /* base layout for tabs */ |
@@ -71,2 +81,5 @@ void ProfileEditorDialog::initUI() | |||
71 | 81 | ||
82 | m_layCon->addWidget( m_svCon ); | ||
83 | m_layTerm->addWidget( m_svTerm ); | ||
84 | |||
72 | // profile tab | 85 | // profile tab |
@@ -145,6 +158,6 @@ void ProfileEditorDialog::accept() | |||
145 | // Save general values | 158 | // Save general values |
146 | m_prof.setName(profName()); | 159 | m_prof.setName( profName() ); |
147 | m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) ); | 160 | m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) ); |
148 | m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) ); | 161 | m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) ); |
149 | m_prof.setAutoConnect( m_autoConnect->isChecked() ); | 162 | m_prof.setAutoConnect( m_autoConnect->isChecked() ); |
150 | 163 | ||
@@ -178,14 +191,15 @@ QCString ProfileEditorDialog::profType()const | |||
178 | void ProfileEditorDialog::slotConActivated( const QString& str ) { | 191 | void ProfileEditorDialog::slotConActivated( const QString& str ) { |
192 | |||
179 | delete m_con; | 193 | delete m_con; |
180 | m_con = m_fact->newConnectionPlugin( str, m_tabCon ); | 194 | |
195 | m_con = m_fact->newConnectionPlugin( str, m_svCon->viewport() ); | ||
181 | 196 | ||
182 | if ( !m_con ) { | 197 | if ( !m_con ) { |
183 | m_con = new NoOptions( str, m_tabCon, "name"); | 198 | m_con = new NoOptions( str, m_svCon->viewport(), "name"); |
184 | } | 199 | } |
185 | m_con->load( m_prof ); | 200 | m_con->load( m_prof ); |
186 | m_layCon->addWidget( m_con ); | 201 | m_svCon->addChild( m_con ); |
202 | } | ||
187 | 203 | ||
188 | tabWidget->setCurrentTab( tabprof ); | ||
189 | 204 | ||
190 | } | ||
191 | /* | 205 | /* |
@@ -194,8 +208,10 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) { | |||
194 | void ProfileEditorDialog::slotTermActivated( const QString& str ) { | 208 | void ProfileEditorDialog::slotTermActivated( const QString& str ) { |
209 | |||
195 | delete m_term; | 210 | delete m_term; |
196 | m_term = m_fact->newTerminalPlugin( str, m_tabTerm ); | 211 | |
212 | m_term = m_fact->newTerminalPlugin( str, m_svTerm->viewport() ); | ||
197 | 213 | ||
198 | if (m_term) { | 214 | if (m_term) { |
199 | m_term->load(m_prof ); | 215 | m_term->load( m_prof ); |
200 | m_layTerm->addWidget( m_term ); | 216 | m_svTerm->addChild( m_term ); |
201 | } | 217 | } |