summaryrefslogtreecommitdiff
authorzecke <zecke>2002-10-02 12:25:01 (UTC)
committer zecke <zecke>2002-10-02 12:25:01 (UTC)
commit6d20f295c578281b043073a5c0dd668fe754581a (patch) (unidiff)
treeb34f24c6ad01589dca15eb4ef40640b5e9e57013
parentff02919c1d2e83c3cb0dc1c726bf1eb636d1eb38 (diff)
downloadopie-6d20f295c578281b043073a5c0dd668fe754581a.zip
opie-6d20f295c578281b043073a5c0dd668fe754581a.tar.gz
opie-6d20f295c578281b043073a5c0dd668fe754581a.tar.bz2
Commit my files so other people can play with them
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp13
-rw-r--r--noncore/apps/opie-console/opie-console.pro8
-rw-r--r--noncore/apps/opie-console/profileeditordialog.cpp20
-rw-r--r--noncore/apps/opie-console/profileeditordialog.h28
-rw-r--r--noncore/apps/opie-console/profilemanager.cpp15
-rw-r--r--noncore/apps/opie-console/profilemanager.h2
-rw-r--r--noncore/apps/opie-console/settings.ui23
7 files changed, 104 insertions, 5 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 3c1c8ea..88d5823 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -7,2 +7,3 @@
7 7
8#include "configdialog.h"
8#include "metafactory.h" 9#include "metafactory.h"
@@ -16,2 +17,3 @@ MainWindow::MainWindow() {
16 m_manager = new ProfileManager(m_factory); 17 m_manager = new ProfileManager(m_factory);
18 m_manager->load();
17 19
@@ -106,3 +108,3 @@ ProfileManager* MainWindow::manager() {
106void MainWindow::populateProfiles() { 108void MainWindow::populateProfiles() {
107 manager()->load(); 109 m_sessionsPop->clear();
108 Profile::ValueList list = manager()->all(); 110 Profile::ValueList list = manager()->all();
@@ -149,2 +151,11 @@ void MainWindow::slotConfigure() {
149 qWarning("configure"); 151 qWarning("configure");
152 ConfigDialog conf( manager()->all() );
153 conf.showMaximized();
154
155 int ret = conf.exec();
156
157 if ( QDialog::Accepted == ret ) {
158 manager()->setProfiles( conf.list() );
159 populateProfiles();
160 }
150} 161}
diff --git a/noncore/apps/opie-console/opie-console.pro b/noncore/apps/opie-console/opie-console.pro
index e045a48..9e44ab0 100644
--- a/noncore/apps/opie-console/opie-console.pro
+++ b/noncore/apps/opie-console/opie-console.pro
@@ -12,3 +12,4 @@ HEADERS = io_layer.h io_serial.h \
12 configwidget.h \ 12 configwidget.h \
13 tabwidget.h 13 tabwidget.h \
14 configdialog.h
14SOURCES = io_layer.cpp io_serial.cpp \ 15SOURCES = io_layer.cpp io_serial.cpp \
@@ -21,4 +22,5 @@ SOURCES = io_layer.cpp io_serial.cpp \
21 profilemanager.cpp \ 22 profilemanager.cpp \
22 tabwidget.cpp 23 tabwidget.cpp \
23INTERFACES = 24 configdialog.cpp
25INTERFACES = configurebase.ui editbase.ui
24INCLUDEPATH += $(OPIEDIR)/include 26INCLUDEPATH += $(OPIEDIR)/include
diff --git a/noncore/apps/opie-console/profileeditordialog.cpp b/noncore/apps/opie-console/profileeditordialog.cpp
new file mode 100644
index 0000000..a4246e1
--- a/dev/null
+++ b/noncore/apps/opie-console/profileeditordialog.cpp
@@ -0,0 +1,20 @@
1
2#include "profileeditordialog.h"
3
4
5ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact,
6 const Profile& prof )
7 : QDialog(0, 0, TRUE), m_fact( fact ), m_prof( prof )
8{
9 initUI();
10 /* now set the widgets */
11}
12ProfileEditorDialog::ProfileEditorDialog( MetaFactory* fact )
13 : QDialog(0, 0, TRUE), m_fact( fact )
14{
15
16}
17ProfileEditorDialog::~ProfileEditorDialog() {
18
19}
20
diff --git a/noncore/apps/opie-console/profileeditordialog.h b/noncore/apps/opie-console/profileeditordialog.h
new file mode 100644
index 0000000..5ccc691
--- a/dev/null
+++ b/noncore/apps/opie-console/profileeditordialog.h
@@ -0,0 +1,28 @@
1#ifndef PROFILE_EDITOR_DIALOG
2#define PROFILE_EDITOR_DIALOG
3
4#include <qdialog.h>
5
6#include "profile.h"
7
8class MetaFactory;
9class EditBase;
10class QTabWidget;
11class QHBoxLayout;
12class ProfileEditorDialog : public QDialog {
13 Q_OBJECT
14public:
15 ProfileEditorDialog(MetaFactory* fact,
16 const Profile& prof );
17 ProfileEditorDialog(MetaFactory* fact );
18 Profile profile()const;
19private:
20 void initUI();
21 MetaFactory* m_fact;
22 EditBase* m_base;
23 QTabWidget* m_tab;
24 QHBoxLayout* m_lay;
25 Profile m_prof;
26};
27
28#endif
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp
index 24256a5..72a5117 100644
--- a/noncore/apps/opie-console/profilemanager.cpp
+++ b/noncore/apps/opie-console/profilemanager.cpp
@@ -78,3 +78,16 @@ void ProfileManager::save( ) {
78 } 78 }
79 // FIXME save 79}
80void ProfileManager::setProfiles( const Profile::ValueList& list ) {
81 m_list = list;
82};
83Profile ProfileManager::profile( const QString& name )const {
84 Profile prof;
85 Profile::ValueList::ConstIterator it;
86 for ( it = m_list.begin(); it != m_list.end(); ++it ) {
87 if ( name == (*it).name() ) {
88 prof = (*it);
89 break;
90 }
91 }
92 return prof;
80} 93}
diff --git a/noncore/apps/opie-console/profilemanager.h b/noncore/apps/opie-console/profilemanager.h
index d4d0fd0..1387247 100644
--- a/noncore/apps/opie-console/profilemanager.h
+++ b/noncore/apps/opie-console/profilemanager.h
@@ -23,3 +23,5 @@ public:
23 void remove( const Profile& prof ); 23 void remove( const Profile& prof );
24 Profile profile(const QString& name )const;
24 Session* fromProfile( const Profile& ); 25 Session* fromProfile( const Profile& );
26 void setProfiles( const Profile::ValueList& );
25 void save(); 27 void save();
diff --git a/noncore/apps/opie-console/settings.ui b/noncore/apps/opie-console/settings.ui
new file mode 100644
index 0000000..6944dd0
--- a/dev/null
+++ b/noncore/apps/opie-console/settings.ui
@@ -0,0 +1,23 @@
1<!DOCTYPE UI><UI>
2<class>Settings</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>Settings</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>596</width>
15 <height>480</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Settings</string>
21 </property>
22</widget>
23</UI>