summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp32
-rw-r--r--noncore/apps/opie-console/profileeditordialog.h3
2 files changed, 27 insertions, 8 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
@@ -5,7 +5,7 @@
#include <qstringlist.h>
#include <qcombobox.h>
#include <qcheckbox.h>
-
+#include <qscrollview.h>
//#include "profileeditorplugins.h"
#include "metafactory.h"
@@ -53,6 +53,7 @@ void ProfileEditorDialog::initUI()
{
m_con = m_term = m_key = 0l;
+
QVBoxLayout *mainLayout = new QVBoxLayout( this );
tabWidget = new OTabWidget( this );
tabWidget->setTabStyle(OTabWidget::TextTab);
@@ -64,11 +65,23 @@ void ProfileEditorDialog::initUI()
m_tabCon = new QWidget(this);
m_tabKey = new QWidget(this);
+ m_svCon = new QScrollView( m_tabCon );
+ m_svCon->setResizePolicy( QScrollView::AutoOneFit );
+ m_svCon->setHScrollBarMode( QScrollView::AlwaysOff );
+ m_svCon->setFrameShape( QFrame::NoFrame );
+ m_svTerm = new QScrollView( m_tabTerm );
+ m_svTerm->setResizePolicy( QScrollView::AutoOneFit );
+ m_svTerm->setHScrollBarMode( QScrollView::AlwaysOff );
+ m_svTerm->setFrameShape( QFrame::NoFrame );
+
/* base layout for tabs */
m_layCon = new QHBoxLayout( m_tabCon , 2 );
m_layTerm = new QHBoxLayout( m_tabTerm, 2 );
m_layKey = new QHBoxLayout( m_tabKey, 2 );
+ m_layCon->addWidget( m_svCon );
+ m_layTerm->addWidget( m_svTerm );
+
// profile tab
QLabel *name = new QLabel(QObject::tr("Profile name"), tabprof);
@@ -176,28 +189,31 @@ QCString ProfileEditorDialog::profType()const
* we need to switch the widget
*/
void ProfileEditorDialog::slotConActivated( const QString& str ) {
+
delete m_con;
- m_con = m_fact->newConnectionPlugin( str, m_tabCon );
+
+ m_con = m_fact->newConnectionPlugin( str, m_svCon->viewport() );
if ( !m_con ) {
- m_con = new NoOptions( str, m_tabCon, "name");
+ m_con = new NoOptions( str, m_svCon->viewport(), "name");
}
m_con->load( m_prof );
- m_layCon->addWidget( m_con );
+ m_svCon->addChild( m_con );
+}
- tabWidget->setCurrentTab( tabprof );
-}
/*
* we need to switch the widget
*/
void ProfileEditorDialog::slotTermActivated( const QString& str ) {
+
delete m_term;
- m_term = m_fact->newTerminalPlugin( str, m_tabTerm );
+
+ m_term = m_fact->newTerminalPlugin( str, m_svTerm->viewport() );
if (m_term) {
m_term->load(m_prof );
- m_layTerm->addWidget( m_term );
+ m_svTerm->addChild( m_term );
}
}
diff --git a/noncore/apps/opie-console/profileeditordialog.h b/noncore/apps/opie-console/profileeditordialog.h
index 6216660..c731747 100644
--- a/noncore/apps/opie-console/profileeditordialog.h
+++ b/noncore/apps/opie-console/profileeditordialog.h
@@ -14,6 +14,7 @@ class QLineEdit;
class QComboBox;
class QCheckBox;
class QLabel;
+class QScrollView;
class ProfileDialogWidget;
class ProfileEditorDialog : public QDialog {
@@ -47,6 +48,8 @@ private:
QComboBox *m_conCmb, *m_termCmb;
QCheckBox *m_autoConnect;
+ QScrollView *m_svCon, *m_svTerm;
+
QWidget *m_tabCon, *m_tabTerm, *m_tabKey;
ProfileDialogWidget* m_con, *m_term, *m_key;
QHBoxLayout *m_layCon, *m_layTerm, *m_layKey;