summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
authorzecke <zecke>2002-09-28 20:45:11 (UTC)
committer zecke <zecke>2002-09-28 20:45:11 (UTC)
commit7980189a2cb34e2864c339ef68bfbe7fb4910750 (patch) (side-by-side diff)
treea14028faccc70982d105c229f84d77e13741e987 /noncore/apps/opie-console/mainwindow.cpp
parentb6df65ad2ffb50f029b96ebf9d0d78dfa23f3f19 (diff)
downloadopie-7980189a2cb34e2864c339ef68bfbe7fb4910750.zip
opie-7980189a2cb34e2864c339ef68bfbe7fb4910750.tar.gz
opie-7980189a2cb34e2864c339ef68bfbe7fb4910750.tar.bz2
Add profiles and the profilemanager to the mainwindow
if one would have a ConfigureDialog one could see it....
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
@@ -6,14 +6,17 @@
#include <qtoolbar.h>
#include "metafactory.h"
+#include "profilemanager.h"
#include "mainwindow.h"
MainWindow::MainWindow() {
m_factory = new MetaFactory();
m_sessions.setAutoDelete( TRUE );
m_curSession = 0;
+ m_manager = new ProfileManager(m_factory);
initUI();
+ populateProfiles();
}
void MainWindow::initUI() {
setToolBarsMovable( FALSE );
@@ -65,6 +68,12 @@ void MainWindow::initUI() {
connect(m_disconnect, SIGNAL(activated() ),
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
*/
@@ -84,6 +93,24 @@ void MainWindow::initUI() {
/* the settings menu */
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() {
delete m_factory;
@@ -121,3 +148,9 @@ void MainWindow::slotTerminate() {
void MainWindow::slotConfigure() {
qWarning("configure");
}
+void MainWindow::slotClose() {
+
+}
+void MainWindow::slotProfile(int) {
+
+}