summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 88d5823..dce08ca 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -10,4 +10,5 @@
10#include "profilemanager.h" 10#include "profilemanager.h"
11#include "mainwindow.h" 11#include "mainwindow.h"
12#include "tabwidget.h"
12 13
13MainWindow::MainWindow() { 14MainWindow::MainWindow() {
@@ -41,6 +42,4 @@ void MainWindow::initUI() {
41 this, SLOT(slotNew() ) ); 42 this, SLOT(slotNew() ) );
42 43
43
44
45 /* 44 /*
46 * connect action 45 * connect action
@@ -52,5 +51,4 @@ void MainWindow::initUI() {
52 this, SLOT(slotConnect() ) ); 51 this, SLOT(slotConnect() ) );
53 52
54
55 /* 53 /*
56 * disconnect action 54 * disconnect action
@@ -102,13 +100,17 @@ void MainWindow::initUI() {
102 this, SLOT(slotProfile(int) ) ); 100 this, SLOT(slotProfile(int) ) );
103 101
102 m_consoleWindow = new TabWidget( this, "blah");
103 setCentralWidget( m_consoleWindow );
104
104} 105}
106
105ProfileManager* MainWindow::manager() { 107ProfileManager* MainWindow::manager() {
106 return m_manager; 108 return m_manager;
107} 109}
110
108void MainWindow::populateProfiles() { 111void MainWindow::populateProfiles() {
109 m_sessionsPop->clear(); 112 m_sessionsPop->clear();
110 Profile::ValueList list = manager()->all(); 113 Profile::ValueList list = manager()->all();
111 for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); 114 for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); ++it ) {
112 ++it ) {
113 m_sessionsPop->insertItem( (*it).name() ); 115 m_sessionsPop->insertItem( (*it).name() );
114 } 116 }
@@ -130,15 +132,19 @@ QList<Session> MainWindow::sessions() {
130 return m_sessions; 132 return m_sessions;
131} 133}
134
132void MainWindow::slotNew() { 135void MainWindow::slotNew() {
133 qWarning("New Connection"); 136 qWarning("New Connection");
134} 137}
138
135void MainWindow::slotConnect() { 139void MainWindow::slotConnect() {
136 if ( currentSession() ) 140 if ( currentSession() )
137 currentSession()->layer()->open(); 141 currentSession()->layer()->open();
138} 142}
143
139void MainWindow::slotDisconnect() { 144void MainWindow::slotDisconnect() {
140 if ( currentSession() ) 145 if ( currentSession() )
141 currentSession()->layer()->close(); 146 currentSession()->layer()->close();
142} 147}
148
143void MainWindow::slotTerminate() { 149void MainWindow::slotTerminate() {
144 if ( currentSession() ) 150 if ( currentSession() )
@@ -148,7 +154,8 @@ void MainWindow::slotTerminate() {
148 /* FIXME move to the next session */ 154 /* FIXME move to the next session */
149} 155}
156
150void MainWindow::slotConfigure() { 157void MainWindow::slotConfigure() {
151 qWarning("configure"); 158 qWarning("configure");
152 ConfigDialog conf( manager()->all() ); 159 ConfigDialog conf( manager()->all() );
153 conf.showMaximized(); 160 conf.showMaximized();
154 161
@@ -160,7 +167,9 @@ void MainWindow::slotConfigure() {
160 } 167 }
161} 168}
169
162void MainWindow::slotClose() { 170void MainWindow::slotClose() {
163 171
164} 172}
173
165void MainWindow::slotProfile(int) { 174void MainWindow::slotProfile(int) {
166 175