-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 0a58b6c..bfd1c2e 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -151,32 +151,34 @@ void MainWindow::initUI() { /* and the keyboard */ m_keyBar = new QToolBar(this); addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE ); m_keyBar->setHorizontalStretchable( TRUE ); m_keyBar->hide(); m_kb = new FunctionKeyboard(m_keyBar); /* * connect to the menu activation */ connect( m_sessionsPop, SIGNAL(activated( int ) ), this, SLOT(slotProfile( int ) ) ); m_consoleWindow = new TabWidget( this, "blah"); + connect(m_consoleWindow, SIGNAL(activated(Session*) ), + this, SLOT(slotSessionChanged(Session*) ) ); setCentralWidget( m_consoleWindow ); } ProfileManager* MainWindow::manager() { return m_manager; } TabWidget* MainWindow::tabWidget() { return m_consoleWindow; } void MainWindow::populateProfiles() { m_sessionsPop->clear(); Profile::ValueList list = manager()->all(); for (Profile::ValueList::Iterator it = list.begin(); it != list.end(); ++it ) { m_sessionsPop->insertItem( (*it).name() ); } @@ -315,16 +317,22 @@ void MainWindow::create( const Profile& prof ) { void MainWindow::slotTransfer() { if ( currentSession() ) { TransferDialog dlg(this); //dlg.showMaximized(); dlg.exec(); } } void MainWindow::slotOpenKeb(bool state) { if (state) m_keyBar->show(); else m_keyBar->hide(); } +void MainWindow::slotSessionChanged( Session* ses ) { + if ( ses ) { + qWarning("changing %s", ses->name().latin1() ); + m_curSession = ses; + } +} diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index 94144a4..d16d6af 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h @@ -49,32 +49,33 @@ public: ProfileManager* manager(); TabWidget* tabWidget(); private slots: void slotNew(); void slotConnect(); void slotDisconnect(); void slotTerminate(); void slotConfigure(); void slotClose(); void slotProfile(int); void slotTransfer(); void slotOpenKeb(bool); void slotRecordScript(); void slotSaveScript(); void slotRunScript(); + void slotSessionChanged( Session* ); private: void initUI(); void populateProfiles(); void create( const Profile& ); /** * the current session */ Session* m_curSession; /** * the session list */ QList<Session> m_sessions; /** * the metafactory |