summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp33
1 files changed, 33 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
@@ -7,4 +7,5 @@
#include "metafactory.h"
+#include "profilemanager.h"
#include "mainwindow.h"
@@ -13,6 +14,8 @@ MainWindow::MainWindow() {
m_sessions.setAutoDelete( TRUE );
m_curSession = 0;
+ m_manager = new ProfileManager(m_factory);
initUI();
+ populateProfiles();
}
void MainWindow::initUI() {
@@ -66,4 +69,10 @@ void MainWindow::initUI() {
this, SLOT(slotTerminate() ) );
+ a = new QAction();
+ a->setText( tr("Close Window") );
+ a->addTo( m_console );
+ connect(a, SIGNAL(activated() ),
+ this, SLOT(slotClose() ) );
+
/*
* the settings action
@@ -85,4 +94,22 @@ void MainWindow::initUI() {
m_bar->insertItem( tr("Settings"), m_settings );
+ /*
+ * connect to the menu activation
+ */
+ connect( m_sessionsPop, SIGNAL(activated(int) ),
+ this, SLOT(slotProfile(int) ) );
+
+}
+ProfileManager* MainWindow::manager() {
+ return m_manager;
+}
+void MainWindow::populateProfiles() {
+ manager()->load();
+ Profile::ValueList list = manager()->all();
+ for (Profile::ValueList::Iterator it = list.begin(); it != list.end();
+ ++it ) {
+ m_sessionsPop->insertItem( (*it).name() );
+ }
+
}
MainWindow::~MainWindow() {
@@ -122,2 +149,8 @@ void MainWindow::slotConfigure() {
qWarning("configure");
}
+void MainWindow::slotClose() {
+
+}
+void MainWindow::slotProfile(int) {
+
+}