author | zecke <zecke> | 2002-10-13 19:01:50 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-13 19:01:50 (UTC) |
commit | 130ae6144e031b4de2244990c53df8654bd840ae (patch) (side-by-side diff) | |
tree | df4a5660fffd733064758cf346894269ca000cdc | |
parent | 495abbf351f29328b52cb055566ef8bec6f466f0 (diff) | |
download | opie-130ae6144e031b4de2244990c53df8654bd840ae.zip opie-130ae6144e031b4de2244990c53df8654bd840ae.tar.gz opie-130ae6144e031b4de2244990c53df8654bd840ae.tar.bz2 |
keep track of the current session
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 18 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 1 |
2 files changed, 14 insertions, 5 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 @@ -66,29 +66,29 @@ void MainWindow::initUI() { connect(m_connect, SIGNAL(activated() ), this, SLOT(slotConnect() ) ); /* * disconnect action */ m_disconnect = new QAction(); m_disconnect->setText( tr("Disconnect") ); m_disconnect->addTo( m_console ); connect(m_disconnect, SIGNAL(activated() ), this, SLOT(slotDisconnect() ) ); - m_transfer = new QAction(); - m_transfer->setText( tr("Transfer file...") ); - m_transfer->addTo( m_console ); - connect(m_transfer, SIGNAL(activated() ), - this, SLOT(slotTransfer() ) ); + m_transfer = new QAction(); + m_transfer->setText( tr("Transfer file...") ); + m_transfer->addTo( m_console ); + connect(m_transfer, SIGNAL(activated() ), + this, SLOT(slotTransfer() ) ); /* * terminate action */ m_terminate = new QAction(); m_terminate->setText( tr("Terminate") ); m_terminate->addTo( m_console ); connect(m_terminate, SIGNAL(activated() ), this, SLOT(slotTerminate() ) ); a = new QAction(); a->setText( tr("Close Window") ); @@ -155,24 +155,26 @@ void MainWindow::initUI() { 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(); @@ -319,12 +321,18 @@ void MainWindow::slotTransfer() //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 @@ -53,24 +53,25 @@ 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 */ |