author | harlekin <harlekin> | 2002-10-14 21:59:07 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-14 21:59:07 (UTC) |
commit | f5d1ce4b3887e0f09704abad5b9414c9cd90be4b (patch) (side-by-side diff) | |
tree | 7dde2bf517755d43316c6ee5e08dd74aea4f1b0e | |
parent | 09ba6b7531801dde243469f05f5e5c31596cdd2d (diff) | |
download | opie-f5d1ce4b3887e0f09704abad5b9414c9cd90be4b.zip opie-f5d1ce4b3887e0f09704abad5b9414c9cd90be4b.tar.gz opie-f5d1ce4b3887e0f09704abad5b9414c9cd90be4b.tar.bz2 |
enable some entries not before a profile is loaded
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 39 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 3 |
2 files changed, 40 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index b143361..89cdf51 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp @@ -1,24 +1,26 @@ #include <assert.h> #include <qaction.h> #include <qmenubar.h> #include <qlabel.h> #include <qpopupmenu.h> #include <qtoolbar.h> +#include <qmessagebox.h> + #include <qpe/resource.h> #include <opie/ofiledialog.h> -#include <qmessagebox.h> + #include "keytrans.h" #include "profileeditordialog.h" #include "configdialog.h" #include "default.h" #include "metafactory.h" #include "profile.h" #include "profilemanager.h" #include "mainwindow.h" #include "tabwidget.h" #include "transferdialog.h" #include "function_keyboard.h" @@ -158,24 +160,34 @@ void MainWindow::initUI() { /* the settings menu */ m_bar->insertItem( tr("Settings"), m_settings ); /* 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); + + + m_connect->setEnabled( false ); + m_disconnect->setEnabled( false ); + m_terminate->setEnabled( false ); + m_transfer->setEnabled( false ); + m_recordScript->setEnabled( false ); + m_saveScript->setEnabled( false ); + m_runScript->setEnabled( false ); + /* * 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 ); } @@ -331,36 +343,61 @@ void MainWindow::create( const Profile& prof ) { { QMessageBox::warning(this, QObject::tr("Session failed"), QObject::tr("Cannot open session: Not all components were found.")); //if(ses) delete ses; return; } m_sessions.append( ses ); tabWidget()->add( ses ); m_curSession = ses; + // dicide if its a local term ( then no connction and no tranfer) + m_connect->setEnabled( true ); + m_disconnect->setEnabled( true ); + m_terminate->setEnabled( true ); + m_transfer->setEnabled( true ); + m_recordScript->setEnabled( true ); + m_saveScript->setEnabled( true ); + m_runScript->setEnabled( true ); + + } 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; } } + +void MainWindow::setOn() { + +/* + m_connect + m_disconnect + m_terminate + m_transfer + m_recordScript + m_saveScript + m_runScript +*/ + + +} diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index d16d6af..378870a 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 setOn(); void slotSessionChanged( Session* ); private: void initUI(); void populateProfiles(); void create( const Profile& ); /** * the current session */ Session* m_curSession; /** * the session list @@ -86,24 +87,24 @@ private: TabWidget* m_consoleWindow; QToolBar* m_tool; QToolBar* m_icons; QToolBar* m_keyBar; QMenuBar* m_bar; QPopupMenu* m_console; QPopupMenu* m_settings; QPopupMenu* m_sessionsPop; QPopupMenu* m_scripts; QAction* m_connect; QAction* m_disconnect; QAction* m_terminate; - QAction* m_transfer; + QAction* m_transfer; QAction* m_setProfiles; QAction* m_openKeys; QAction* m_recordScript; QAction* m_saveScript; QAction* m_runScript; FunctionKeyboard *m_kb; }; #endif |