summaryrefslogtreecommitdiff
path: root/noncore
authorharlekin <harlekin>2002-10-21 22:40:58 (UTC)
committer harlekin <harlekin>2002-10-21 22:40:58 (UTC)
commit8384ef9eb4c2670ad8c8247d63b4633288b65ad1 (patch) (side-by-side diff)
tree567a0c868133698ca21eda135bbf8ac7cfe18c83 /noncore
parentd7a4ad19a8493dbb226e7f8355c49dafd1fa9597 (diff)
downloadopie-8384ef9eb4c2670ad8c8247d63b4633288b65ad1.zip
opie-8384ef9eb4c2670ad8c8247d63b4633288b65ad1.tar.gz
opie-8384ef9eb4c2670ad8c8247d63b4633288b65ad1.tar.bz2
scrollviews for terminal and connetion tab
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp40
-rw-r--r--noncore/apps/opie-console/profileeditordialog.h3
2 files changed, 31 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 @@
#include <qcheckbox.h>
-
+#include <qscrollview.h>
@@ -55,2 +55,3 @@ void ProfileEditorDialog::initUI()
+
QVBoxLayout *mainLayout = new QVBoxLayout( this );
@@ -66,2 +67,11 @@ void ProfileEditorDialog::initUI()
+ 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 */
@@ -71,2 +81,5 @@ void ProfileEditorDialog::initUI()
+ m_layCon->addWidget( m_svCon );
+ m_layTerm->addWidget( m_svTerm );
+
// profile tab
@@ -145,6 +158,6 @@ void ProfileEditorDialog::accept()
// Save general values
- m_prof.setName(profName());
- m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) );
+ m_prof.setName( profName() );
+ m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) );
m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) );
- m_prof.setAutoConnect( m_autoConnect->isChecked() );
+ m_prof.setAutoConnect( m_autoConnect->isChecked() );
@@ -178,14 +191,15 @@ QCString ProfileEditorDialog::profType()const
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 );
-}
/*
@@ -194,8 +208,10 @@ void ProfileEditorDialog::slotConActivated( const QString& str ) {
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_term->load( m_prof );
+ 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
@@ -16,2 +16,3 @@ class QCheckBox;
class QLabel;
+class QScrollView;
class ProfileDialogWidget;
@@ -49,2 +50,4 @@ private:
+ QScrollView *m_svCon, *m_svTerm;
+
QWidget *m_tabCon, *m_tabTerm, *m_tabKey;