author | harlekin <harlekin> | 2002-10-05 22:21:04 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-05 22:21:04 (UTC) |
commit | 48b16b3a3557e70abf90e83b84396258b92b652e (patch) (unidiff) | |
tree | 9dad37a08e79da5705a8297b2bf09a0b2441f3b6 /noncore/apps/opie-console/mainwindow.cpp | |
parent | 99425255c4afcd75ee6b2f903487cb958d3acdee (diff) | |
download | opie-48b16b3a3557e70abf90e83b84396258b92b652e.zip opie-48b16b3a3557e70abf90e83b84396258b92b652e.tar.gz opie-48b16b3a3557e70abf90e83b84396258b92b652e.tar.bz2 |
otabwidget instead of qtabwidget
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 21 |
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 | |||
@@ -9,6 +9,7 @@ | |||
9 | #include "metafactory.h" | 9 | #include "metafactory.h" |
10 | #include "profilemanager.h" | 10 | #include "profilemanager.h" |
11 | #include "mainwindow.h" | 11 | #include "mainwindow.h" |
12 | #include "tabwidget.h" | ||
12 | 13 | ||
13 | MainWindow::MainWindow() { | 14 | MainWindow::MainWindow() { |
14 | m_factory = new MetaFactory(); | 15 | m_factory = new MetaFactory(); |
@@ -40,8 +41,6 @@ void MainWindow::initUI() { | |||
40 | connect(a, SIGNAL(activated() ), | 41 | connect(a, SIGNAL(activated() ), |
41 | this, SLOT(slotNew() ) ); | 42 | this, SLOT(slotNew() ) ); |
42 | 43 | ||
43 | |||
44 | |||
45 | /* | 44 | /* |
46 | * connect action | 45 | * connect action |
47 | */ | 46 | */ |
@@ -51,7 +50,6 @@ void MainWindow::initUI() { | |||
51 | connect(m_connect, SIGNAL(activated() ), | 50 | connect(m_connect, SIGNAL(activated() ), |
52 | this, SLOT(slotConnect() ) ); | 51 | this, SLOT(slotConnect() ) ); |
53 | 52 | ||
54 | |||
55 | /* | 53 | /* |
56 | * disconnect action | 54 | * disconnect action |
57 | */ | 55 | */ |
@@ -101,15 +99,19 @@ void MainWindow::initUI() { | |||
101 | connect( m_sessionsPop, SIGNAL(activated(int) ), | 99 | connect( m_sessionsPop, SIGNAL(activated(int) ), |
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 | |||
105 | ProfileManager* MainWindow::manager() { | 107 | ProfileManager* MainWindow::manager() { |
106 | return m_manager; | 108 | return m_manager; |
107 | } | 109 | } |
110 | |||
108 | void MainWindow::populateProfiles() { | 111 | void 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 | } |
115 | 117 | ||
@@ -129,17 +131,21 @@ Session* MainWindow::currentSession() { | |||
129 | QList<Session> MainWindow::sessions() { | 131 | QList<Session> MainWindow::sessions() { |
130 | return m_sessions; | 132 | return m_sessions; |
131 | } | 133 | } |
134 | |||
132 | void MainWindow::slotNew() { | 135 | void MainWindow::slotNew() { |
133 | qWarning("New Connection"); | 136 | qWarning("New Connection"); |
134 | } | 137 | } |
138 | |||
135 | void MainWindow::slotConnect() { | 139 | void MainWindow::slotConnect() { |
136 | if ( currentSession() ) | 140 | if ( currentSession() ) |
137 | currentSession()->layer()->open(); | 141 | currentSession()->layer()->open(); |
138 | } | 142 | } |
143 | |||
139 | void MainWindow::slotDisconnect() { | 144 | void MainWindow::slotDisconnect() { |
140 | if ( currentSession() ) | 145 | if ( currentSession() ) |
141 | currentSession()->layer()->close(); | 146 | currentSession()->layer()->close(); |
142 | } | 147 | } |
148 | |||
143 | void MainWindow::slotTerminate() { | 149 | void MainWindow::slotTerminate() { |
144 | if ( currentSession() ) | 150 | if ( currentSession() ) |
145 | currentSession()->layer()->close(); | 151 | currentSession()->layer()->close(); |
@@ -147,9 +153,10 @@ void MainWindow::slotTerminate() { | |||
147 | m_curSession = 0l; | 153 | m_curSession = 0l; |
148 | /* FIXME move to the next session */ | 154 | /* FIXME move to the next session */ |
149 | } | 155 | } |
156 | |||
150 | void MainWindow::slotConfigure() { | 157 | void 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 | ||
155 | int ret = conf.exec(); | 162 | int ret = conf.exec(); |
@@ -159,9 +166,11 @@ void MainWindow::slotConfigure() { | |||
159 | populateProfiles(); | 166 | populateProfiles(); |
160 | } | 167 | } |
161 | } | 168 | } |
169 | |||
162 | void MainWindow::slotClose() { | 170 | void MainWindow::slotClose() { |
163 | 171 | ||
164 | } | 172 | } |
173 | |||
165 | void MainWindow::slotProfile(int) { | 174 | void MainWindow::slotProfile(int) { |
166 | 175 | ||
167 | } | 176 | } |