author | harlekin <harlekin> | 2002-10-07 18:05:43 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-07 18:05:43 (UTC) |
commit | d55aa591770675008da9e3290617e463a77e4c98 (patch) (side-by-side diff) | |
tree | 93d779cc85298545673f4d5f2ea0fcc7d4d301b7 /noncore/apps/opie-console/profileeditordialog.cpp | |
parent | d25a925e70982b86539b98362ab2cd75c7883110 (diff) | |
download | opie-d55aa591770675008da9e3290617e463a77e4c98.zip opie-d55aa591770675008da9e3290617e463a77e4c98.tar.gz opie-d55aa591770675008da9e3290617e463a77e4c98.tar.bz2 |
reworked config dialog gui a bit and adapted it to opie
Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/profileeditordialog.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp index 8e63429..be23eff 100644 --- a/noncore/apps/opie-console/profileeditordialog.cpp +++ b/noncore/apps/opie-console/profileeditordialog.cpp @@ -1,4 +1,5 @@ +#include <opie/otabwidget.h> #include "profileeditordialog.h" #include "qlayout.h" @@ -13,7 +14,7 @@ ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, const Profile& prof ) - : QTabDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof ) + : QDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof ) { initUI(); @@ -23,7 +24,7 @@ ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact, } ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact ) - : QTabDialog(0, 0, TRUE), m_fact( fact ) + : QDialog(0, 0, TRUE), m_fact( fact ) { // Default profile m_prof = Profile(QString::null, "serial", Profile::Black, Profile::White, Profile::VT102); @@ -41,6 +42,11 @@ Profile ProfileEditorDialog::profile() const void ProfileEditorDialog::initUI() { + + QVBoxLayout *mainLayout = new QVBoxLayout( this ); + OTabWidget *tabWidget = new OTabWidget( this ); + mainLayout->add(tabWidget); + QWidget *tabterm, *tabconn, *tabprof; tabprof = new QWidget(this); @@ -98,19 +104,19 @@ void ProfileEditorDialog::initUI() vbox->add(device_box); vbox->add(plugin_base); vbox->add(conn_widget); + vbox->setStretchFactor(device, 1); + vbox->setStretchFactor(device_box, 1); + vbox->setStretchFactor(plugin_base, 1); + vbox->setStretchFactor(conn_widget, 7); QVBoxLayout *vbox2 = new QVBoxLayout(tabterm, 2); vbox2->add(term_widget); - addTab(tabprof, QObject::tr("Profile")); - addTab(tabconn, QObject::tr("Connection")); - addTab(tabterm, QObject::tr("Terminal")); - - setOkButton(QObject::tr("OK")); - setCancelButton(QObject::tr("Cancel")); + tabWidget->addTab(tabprof, "", QObject::tr("Profile")); + tabWidget->addTab(tabconn, "", QObject::tr("Connection")); + tabWidget->addTab(tabterm, "", QObject::tr("Terminal")); // load profile values - name_line->setText(m_prof.name()); for(int i = 0; i < device_box->count(); i++) { @@ -123,8 +129,6 @@ void ProfileEditorDialog::initUI() } // signals - - connect(this, SIGNAL(cancelButtonPressed()), SLOT(slotCancel())); connect(device_box, SIGNAL(activated(int)), SLOT(slotDevice(int))); } @@ -166,10 +170,6 @@ void ProfileEditorDialog::accept() QDialog::accept(); } -void ProfileEditorDialog::slotCancel() -{ - reject(); -} QString ProfileEditorDialog::prof_name() { |