summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/profileeditordialog.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/profileeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
index 979e89d..6e1e23e 100644
--- a/noncore/apps/opie-console/profileeditordialog.cpp
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -86,100 +86,100 @@ void ProfileEditorDialog::initUI()
86 m_name = new QLineEdit(tabprof); 86 m_name = new QLineEdit(tabprof);
87 QLabel *con = new QLabel(tr("Connection"), tabprof ); 87 QLabel *con = new QLabel(tr("Connection"), tabprof );
88 QLabel *term = new QLabel(tr("Terminal"), tabprof ); 88 QLabel *term = new QLabel(tr("Terminal"), tabprof );
89 m_conCmb = new QComboBox( tabprof ); 89 m_conCmb = new QComboBox( tabprof );
90 m_termCmb = new QComboBox( tabprof ); 90 m_termCmb = new QComboBox( tabprof );
91 m_autoConnect = new QCheckBox(tr("Auto connect after load"), tabprof); 91 m_autoConnect = new QCheckBox(tr("Auto connect after load"), tabprof);
92 92
93 // layouting 93 // layouting
94 QVBoxLayout *vbox3 = new QVBoxLayout(tabprof, 2); 94 QVBoxLayout *vbox3 = new QVBoxLayout(tabprof, 2);
95 vbox3->add(name); 95 vbox3->add(name);
96 vbox3->add(m_name); 96 vbox3->add(m_name);
97 vbox3->add(con ); 97 vbox3->add(con );
98 vbox3->add(m_conCmb ); 98 vbox3->add(m_conCmb );
99 vbox3->add(term ); 99 vbox3->add(term );
100 vbox3->add(m_termCmb ); 100 vbox3->add(m_termCmb );
101 vbox3->add(m_autoConnect); 101 vbox3->add(m_autoConnect);
102 vbox3->addStretch(1); 102 vbox3->addStretch(1);
103 103
104 m_showconntab = 0; 104 m_showconntab = 0;
105 tabWidget->addTab(tabprof, "", QObject::tr("Profile")); 105 tabWidget->addTab(tabprof, "", QObject::tr("Profile"));
106 tabWidget->addTab(m_tabCon, "", QObject::tr("Connection")); 106 tabWidget->addTab(m_tabCon, "", QObject::tr("Connection"));
107 tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal")); 107 tabWidget->addTab(m_tabTerm, "", QObject::tr("Terminal"));
108 tabWidget->addTab(m_tabKey, "", QObject::tr("Special Keys")); 108 tabWidget->addTab(m_tabKey, "", QObject::tr("Special Keys"));
109 tabWidget->setCurrentTab( tabprof ); 109 tabWidget->setCurrentTab( tabprof );
110 110
111 111
112 // fill the comboboxes 112 // fill the comboboxes
113 QStringList list = m_fact->connectionWidgets(); 113 QStringList list = m_fact->connectionWidgets();
114 QStringList::Iterator it; 114 QStringList::Iterator it;
115 for (it =list.begin(); it != list.end(); ++it ) { 115 for (it =list.begin(); it != list.end(); ++it ) {
116 m_conCmb->insertItem( (*it) ); 116 m_conCmb->insertItem( (*it) );
117 } 117 }
118 list = m_fact->terminalWidgets(); 118 list = m_fact->terminalWidgets();
119 for (it =list.begin(); it != list.end(); ++it ) { 119 for (it =list.begin(); it != list.end(); ++it ) {
120 m_termCmb->insertItem( (*it) ); 120 m_termCmb->insertItem( (*it) );
121 } 121 }
122 122
123 // load profile values 123 // load profile values
124 m_name->setText(m_prof.name()); 124 m_name->setText(m_prof.name());
125 slotKeyActivated( "Default Keyboard" ); 125 slotKeyActivated( "Default Keyboard" );
126 setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb ); 126 setCurrent( m_fact->external(m_prof.ioLayerName() ), m_conCmb );
127 setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb ); 127 setCurrent( m_fact->external(m_prof.terminalName() ), m_termCmb );
128 slotConActivated( m_fact->external(m_prof.ioLayerName() ) ); 128 slotConActivated( m_fact->external(m_prof.ioLayerName() ) );
129 slotTermActivated( m_fact->external(m_prof.terminalName() ) ); 129 slotTermActivated( m_fact->external(m_prof.terminalName() ) );
130 m_autoConnect->setChecked(m_prof.autoConnect()); 130 m_autoConnect->setChecked(m_prof.autoConnect());
131 131
132 132
133 // signal and slots 133 // signal and slots
134 connect(m_conCmb, SIGNAL(activated(const QString& ) ), 134 connect(m_conCmb, SIGNAL(activated(const QString&) ),
135 this, SLOT(slotConActivated(const QString&) ) ); 135 this, SLOT(slotConActivated(const QString&) ) );
136 connect(m_termCmb, SIGNAL(activated(const QString& ) ), 136 connect(m_termCmb, SIGNAL(activated(const QString&) ),
137 this, SLOT(slotTermActivated(const QString& ) ) ); 137 this, SLOT(slotTermActivated(const QString&) ) );
138 138
139} 139}
140 140
141ProfileEditorDialog::~ProfileEditorDialog() { 141ProfileEditorDialog::~ProfileEditorDialog() {
142 142
143} 143}
144void ProfileEditorDialog::accept() 144void ProfileEditorDialog::accept()
145{ 145{
146 if(profName().isEmpty()) 146 if(profName().isEmpty())
147 { 147 {
148 QMessageBox::information(this, 148 QMessageBox::information(this,
149 QObject::tr("Invalid profile"), 149 QObject::tr("Invalid profile"),
150 QObject::tr("Please enter a profile name.")); 150 QObject::tr("Please enter a profile name."));
151 return; 151 return;
152 } 152 }
153 // Save profile and plugin profile 153 // Save profile and plugin profile
154 //if(plugin_plugin) plugin_plugin->save(); 154 //if(plugin_plugin) plugin_plugin->save();
155 155
156 // Save general values 156 // Save general values
157 m_prof.setName( profName() ); 157 m_prof.setName( profName() );
158 m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) ); 158 m_prof.setIOLayer( m_fact->internal(m_conCmb ->currentText() ) );
159 m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) ); 159 m_prof.setTerminalName( m_fact->internal(m_termCmb->currentText() ) );
160 m_prof.setAutoConnect( m_autoConnect->isChecked() ); 160 m_prof.setAutoConnect( m_autoConnect->isChecked() );
161 161
162 if (m_con ) 162 if (m_con )
163 m_con->save( m_prof ); 163 m_con->save( m_prof );
164 if (m_term ) 164 if (m_term )
165 m_term->save( m_prof ); 165 m_term->save( m_prof );
166 if (m_key) 166 if (m_key)
167 m_key->save( m_prof ); 167 m_key->save( m_prof );
168 168
169 QDialog::accept(); 169 QDialog::accept();
170} 170}
171 171
172 172
173QString ProfileEditorDialog::profName()const 173QString ProfileEditorDialog::profName()const
174{ 174{
175 return m_name->text(); 175 return m_name->text();
176} 176}
177 177
178QCString ProfileEditorDialog::profType()const 178QCString ProfileEditorDialog::profType()const
179{ 179{
180 /*QStringList w = m_fact->configWidgets(); 180 /*QStringList w = m_fact->configWidgets();
181 for(QStringList::Iterator it = w.begin(); it != w.end(); it++) 181 for(QStringList::Iterator it = w.begin(); it != w.end(); it++)
182 if(device_box->currentText() == m_fact->name((*it))) return (*it); 182 if(device_box->currentText() == m_fact->name((*it))) return (*it);
183 */ 183 */
184 return QCString(); 184 return QCString();
185} 185}