-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 33 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 10 | ||||
-rw-r--r-- | noncore/apps/opie-console/profileconfig.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/profilemanager.cpp | 2 |
4 files changed, 46 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 1ae4a20..3c1c8ea 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -8,2 +8,3 @@ | |||
8 | #include "metafactory.h" | 8 | #include "metafactory.h" |
9 | #include "profilemanager.h" | ||
9 | #include "mainwindow.h" | 10 | #include "mainwindow.h" |
@@ -14,4 +15,6 @@ MainWindow::MainWindow() { | |||
14 | m_curSession = 0; | 15 | m_curSession = 0; |
16 | m_manager = new ProfileManager(m_factory); | ||
15 | 17 | ||
16 | initUI(); | 18 | initUI(); |
19 | populateProfiles(); | ||
17 | } | 20 | } |
@@ -67,2 +70,8 @@ void MainWindow::initUI() { | |||
67 | 70 | ||
71 | a = new QAction(); | ||
72 | a->setText( tr("Close Window") ); | ||
73 | a->addTo( m_console ); | ||
74 | connect(a, SIGNAL(activated() ), | ||
75 | this, SLOT(slotClose() ) ); | ||
76 | |||
68 | /* | 77 | /* |
@@ -86,2 +95,20 @@ void MainWindow::initUI() { | |||
86 | 95 | ||
96 | /* | ||
97 | * connect to the menu activation | ||
98 | */ | ||
99 | connect( m_sessionsPop, SIGNAL(activated(int) ), | ||
100 | this, SLOT(slotProfile(int) ) ); | ||
101 | |||
102 | } | ||
103 | ProfileManager* MainWindow::manager() { | ||
104 | return m_manager; | ||
105 | } | ||
106 | void MainWindow::populateProfiles() { | ||
107 | manager()->load(); | ||
108 | Profile::ValueList list = manager()->all(); | ||
109 | for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); | ||
110 | ++it ) { | ||
111 | m_sessionsPop->insertItem( (*it).name() ); | ||
112 | } | ||
113 | |||
87 | } | 114 | } |
@@ -123 +150,7 @@ void MainWindow::slotConfigure() { | |||
123 | } | 150 | } |
151 | void MainWindow::slotClose() { | ||
152 | |||
153 | } | ||
154 | void MainWindow::slotProfile(int) { | ||
155 | |||
156 | } | ||
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index b6a8419..be4b469 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h | |||
@@ -18,2 +18,3 @@ class MetaFactory; | |||
18 | 18 | ||
19 | class ProfileManager; | ||
19 | class MainWindow : public QMainWindow { | 20 | class MainWindow : public QMainWindow { |
@@ -41,2 +42,7 @@ public: | |||
41 | 42 | ||
43 | /** | ||
44 | * | ||
45 | */ | ||
46 | ProfileManager* manager(); | ||
47 | |||
42 | private slots: | 48 | private slots: |
@@ -47,2 +53,4 @@ private slots: | |||
47 | void slotConfigure(); | 53 | void slotConfigure(); |
54 | void slotClose(); | ||
55 | void slotProfile(int); | ||
48 | 56 | ||
@@ -50,2 +58,3 @@ private: | |||
50 | void initUI(); | 58 | void initUI(); |
59 | void populateProfiles(); | ||
51 | /** | 60 | /** |
@@ -64,2 +73,3 @@ private: | |||
64 | MetaFactory* m_factory; | 73 | MetaFactory* m_factory; |
74 | ProfileManager* m_manager; | ||
65 | 75 | ||
diff --git a/noncore/apps/opie-console/profileconfig.cpp b/noncore/apps/opie-console/profileconfig.cpp index bd089c8..732fae7 100644 --- a/noncore/apps/opie-console/profileconfig.cpp +++ b/noncore/apps/opie-console/profileconfig.cpp | |||
@@ -14,2 +14,3 @@ QStringList ProfileConfig::groups()const { | |||
14 | it= Config::groups.begin(); | 14 | it= Config::groups.begin(); |
15 | qWarning("config %d", Config::groups.count() ); | ||
15 | 16 | ||
diff --git a/noncore/apps/opie-console/profilemanager.cpp b/noncore/apps/opie-console/profilemanager.cpp index c8a4db5..24256a5 100644 --- a/noncore/apps/opie-console/profilemanager.cpp +++ b/noncore/apps/opie-console/profilemanager.cpp | |||
@@ -17,2 +17,3 @@ void ProfileManager::load() { | |||
17 | m_list.clear(); | 17 | m_list.clear(); |
18 | qWarning("load"); | ||
18 | ProfileConfig conf("opie-console-profiles"); | 19 | ProfileConfig conf("opie-console-profiles"); |
@@ -25,2 +26,3 @@ void ProfileManager::load() { | |||
25 | for ( it = groups.begin(); it != groups.end(); ++it ) { | 26 | for ( it = groups.begin(); it != groups.end(); ++it ) { |
27 | qWarning("group " + (*it) ); | ||
26 | conf.setGroup( (*it) ); | 28 | conf.setGroup( (*it) ); |