summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profileeditordialog.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index 5c5c2b3..c48ea53 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -1,15 +1,16 @@
#include <qlayout.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qmessagebox.h>
#include <qstringlist.h>
#include <qcombobox.h>
+#include <qcheckbox.h>
-#include "profileeditorplugins.h"
+//#include "profileeditorplugins.h"
#include "metafactory.h"
#include "profileeditordialog.h"
namespace {
void setCurrent( const QString& str, QComboBox* bo ) {
for (uint i = 0; i < bo->count(); i++ ) {
@@ -75,21 +76,23 @@ void ProfileEditorDialog::initUI()
QLabel *name = new QLabel(QObject::tr("Profile name"), tabprof);
m_name = new QLineEdit(tabprof);
QLabel *con = new QLabel(tr("Connection"), tabprof );
QLabel *term = new QLabel(tr("Terminal"), tabprof );
m_conCmb = new QComboBox( tabprof );
m_termCmb = new QComboBox( tabprof );
+ m_autoConnect = new QCheckBox(tr("Auto connect after load"), tabprof);
// layouting
QVBoxLayout *vbox3 = new QVBoxLayout(tabprof, 2);
vbox3->add(name);
vbox3->add(m_name);
vbox3->add(con );
vbox3->add(m_conCmb );
vbox3->add(term );
vbox3->add(m_termCmb );
+ vbox3->add(m_autoConnect);
vbox3->addStretch(1);
tabWidget->addTab(tabprof, "", QObject::tr("Profile"));
tabWidget->addTab(m_tabCon, "", QObject::tr("Connection"));
tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal"));
tabWidget->setCurrentTab( tabprof );
@@ -109,12 +112,13 @@ void ProfileEditorDialog::initUI()
// load profile values
m_name->setText(m_prof.name());
slotConActivated( m_fact->external(m_prof.ioLayerName() ) );
slotTermActivated( m_fact->external(m_prof.terminalName() ) );
setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb );
setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb );
+ m_autoConnect->setChecked(m_prof.autoConnect());
// signal and slots
connect(m_conCmb, SIGNAL(activated(const QString& ) ),
this, SLOT(slotConActivated(const QString&) ) );
connect(m_termCmb, SIGNAL(activated(const QString& ) ),
@@ -138,12 +142,13 @@ void ProfileEditorDialog::accept()
//if(plugin_plugin) plugin_plugin->save();
// Save general values
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() );
if (m_con )
m_con->save( m_prof );
if (m_term )
m_term->save( m_prof );