author | harlekin <harlekin> | 2002-10-16 20:18:23 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-16 20:18:23 (UTC) |
commit | 948a3738421c579441a83dff4472ed5f99e3abb1 (patch) (unidiff) | |
tree | e46ba62b6d8340dbadafcfc53dbaf787bc3ff966 | |
parent | 4595d49dcbdb6d5ea7c86aa4a2c4cb063777ca35 (diff) | |
download | opie-948a3738421c579441a83dff4472ed5f99e3abb1.zip opie-948a3738421c579441a83dff4472ed5f99e3abb1.tar.gz opie-948a3738421c579441a83dff4472ed5f99e3abb1.tar.bz2 |
docu added
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 18 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 2 | ||||
-rw-r--r-- | noncore/apps/opie-console/opie-console.control | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 9ccefa0..5295600 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -1,77 +1,78 @@ | |||
1 | #include <assert.h> | 1 | #include <assert.h> |
2 | 2 | ||
3 | 3 | ||
4 | 4 | ||
5 | #include <qaction.h> | 5 | #include <qaction.h> |
6 | #include <qmenubar.h> | 6 | #include <qmenubar.h> |
7 | #include <qlabel.h> | 7 | #include <qlabel.h> |
8 | #include <qpopupmenu.h> | 8 | #include <qpopupmenu.h> |
9 | #include <qtoolbar.h> | 9 | #include <qtoolbar.h> |
10 | #include <qmessagebox.h> | 10 | #include <qmessagebox.h> |
11 | #include <qpushbutton.h> | 11 | #include <qpushbutton.h> |
12 | #include <qwhatsthis.h> | ||
12 | 13 | ||
13 | #include <qpe/resource.h> | 14 | #include <qpe/resource.h> |
14 | #include <opie/ofiledialog.h> | 15 | #include <opie/ofiledialog.h> |
15 | 16 | ||
16 | 17 | ||
17 | #include "keytrans.h" | 18 | #include "keytrans.h" |
18 | #include "profileeditordialog.h" | 19 | #include "profileeditordialog.h" |
19 | #include "configdialog.h" | 20 | #include "configdialog.h" |
20 | #include "default.h" | 21 | #include "default.h" |
21 | #include "metafactory.h" | 22 | #include "metafactory.h" |
22 | #include "profile.h" | 23 | #include "profile.h" |
23 | #include "profilemanager.h" | 24 | #include "profilemanager.h" |
24 | #include "mainwindow.h" | 25 | #include "mainwindow.h" |
25 | #include "tabwidget.h" | 26 | #include "tabwidget.h" |
26 | #include "transferdialog.h" | 27 | #include "transferdialog.h" |
27 | #include "function_keyboard.h" | 28 | #include "function_keyboard.h" |
28 | #include "script.h" | 29 | #include "script.h" |
29 | 30 | ||
30 | 31 | ||
31 | 32 | ||
32 | static char * menu_xpm[] = { | 33 | static char * menu_xpm[] = { |
33 | "12 12 5 1", | 34 | "12 12 5 1", |
34 | " c None", | 35 | " c None", |
35 | ".c #000000", | 36 | ".c #000000", |
36 | "+c #FFFDAD", | 37 | "+c #FFFDAD", |
37 | "@c #FFFF00", | 38 | "@c #FFFF00", |
38 | "#c #E5E100", | 39 | "#c #E5E100", |
39 | " ", | 40 | " ", |
40 | " ", | 41 | " ", |
41 | " ......... ", | 42 | " ......... ", |
42 | " .+++++++. ", | 43 | " .+++++++. ", |
43 | " .+@@@@#. ", | 44 | " .+@@@@#. ", |
44 | " .+@@@#. ", | 45 | " .+@@@#. ", |
45 | " .+@@#. ", | 46 | " .+@@#. ", |
46 | " .+@#. ", | 47 | " .+@#. ", |
47 | " .+#. ", | 48 | " .+#. ", |
48 | " .+. ", | 49 | " .+. ", |
49 | " .. ", | 50 | " .. ", |
50 | " "}; | 51 | " "}; |
51 | 52 | ||
52 | 53 | ||
53 | MainWindow::MainWindow() { | 54 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { |
54 | KeyTrans::loadAll(); | 55 | KeyTrans::loadAll(); |
55 | for (int i = 0; i < KeyTrans::count(); i++ ) { | 56 | for (int i = 0; i < KeyTrans::count(); i++ ) { |
56 | KeyTrans* s = KeyTrans::find(i ); | 57 | KeyTrans* s = KeyTrans::find(i ); |
57 | assert( s ); | 58 | assert( s ); |
58 | } | 59 | } |
59 | m_factory = new MetaFactory(); | 60 | m_factory = new MetaFactory(); |
60 | Default def(m_factory); | 61 | Default def(m_factory); |
61 | m_sessions.setAutoDelete( TRUE ); | 62 | m_sessions.setAutoDelete( TRUE ); |
62 | m_curSession = 0; | 63 | m_curSession = 0; |
63 | m_manager = new ProfileManager( m_factory ); | 64 | m_manager = new ProfileManager( m_factory ); |
64 | m_manager->load(); | 65 | m_manager->load(); |
65 | 66 | ||
66 | initUI(); | 67 | initUI(); |
67 | populateProfiles(); | 68 | populateProfiles(); |
68 | } | 69 | } |
69 | void MainWindow::initUI() { | 70 | void MainWindow::initUI() { |
70 | setToolBarsMovable( FALSE ); | 71 | setToolBarsMovable( FALSE ); |
71 | 72 | ||
72 | /* tool bar for the menu */ | 73 | /* tool bar for the menu */ |
73 | m_tool = new QToolBar( this ); | 74 | m_tool = new QToolBar( this ); |
74 | m_tool->setHorizontalStretchable( TRUE ); | 75 | m_tool->setHorizontalStretchable( TRUE ); |
75 | 76 | ||
76 | m_bar = new QMenuBar( m_tool ); | 77 | m_bar = new QMenuBar( m_tool ); |
77 | m_console = new QPopupMenu( this ); | 78 | m_console = new QPopupMenu( this ); |
@@ -444,55 +445,54 @@ void MainWindow::slotSessionChanged( Session* ses ) { | |||
444 | if ( ses ) { | 445 | if ( ses ) { |
445 | m_curSession = ses; | 446 | m_curSession = ses; |
446 | qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); | 447 | qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); |
447 | if ( m_curSession->layer()->isConnected() ) { | 448 | if ( m_curSession->layer()->isConnected() ) { |
448 | m_connect->setEnabled( false ); | 449 | m_connect->setEnabled( false ); |
449 | m_disconnect->setEnabled( true ); | 450 | m_disconnect->setEnabled( true ); |
450 | } else { | 451 | } else { |
451 | m_connect->setEnabled( true ); | 452 | m_connect->setEnabled( true ); |
452 | m_disconnect->setEnabled( false ); | 453 | m_disconnect->setEnabled( false ); |
453 | } | 454 | } |
454 | } | 455 | } |
455 | } | 456 | } |
456 | 457 | ||
457 | void MainWindow::slotFullscreen() { | 458 | void MainWindow::slotFullscreen() { |
458 | 459 | ||
459 | if ( m_isFullscreen ) { | 460 | if ( m_isFullscreen ) { |
460 | ( m_curSession->widgetStack() )->reparent( m_consoleWindow, 0, QPoint(0,0), false ); | 461 | ( m_curSession->widgetStack() )->reparent( m_consoleWindow, 0, QPoint(0,0), false ); |
461 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken ); | 462 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
462 | setCentralWidget( m_consoleWindow ); | 463 | setCentralWidget( m_consoleWindow ); |
463 | ( m_curSession->widgetStack() )->show(); | 464 | ( m_curSession->widgetStack() )->show(); |
464 | m_fullscreen->setText( tr("Full screen") ); | 465 | m_fullscreen->setText( tr("Full screen") ); |
465 | 466 | ||
466 | } else { | 467 | } else { |
467 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); | 468 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); |
468 | ( m_curSession->widgetStack() )->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop, | 469 | ( m_curSession->widgetStack() )->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop |
469 | QPoint(0,0), false); | 470 | , QPoint(0,0), false); |
470 | ( m_curSession->widgetStack() )->resize(qApp->desktop()->width(), qApp->desktop()->height()); | 471 | ( m_curSession->widgetStack() )->resize(qApp->desktop()->width(), qApp->desktop()->height()); |
471 | ( m_curSession->widgetStack() )->setFocus(); | 472 | ( m_curSession->widgetStack() )->setFocus(); |
472 | ( m_curSession->widgetStack() )->show(); | 473 | ( m_curSession->widgetStack() )->show(); |
473 | 474 | ||
474 | //QPushButton *cornerButton = new QPushButton( ); | 475 | QPushButton *cornerButton = new QPushButton( m_curSession->widgetStack() ); |
475 | //cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); | 476 | cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); |
476 | //connect( cornerButton, SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); | 477 | connect( cornerButton, SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); |
477 | // need teh scrollbar | 478 | // would need a scrollview |
478 | // ( m_curSession->widgetStack() )->setCornerWidget( cornerButton ); | 479 | // ( m_curSession->widgetStack() )->setCornerWidget( cornerButton ); |
479 | m_fullscreen->setText( tr("Stop full screen") ); | 480 | m_fullscreen->setText( tr("Stop full screen") ); |
480 | } | 481 | } |
481 | |||
482 | m_isFullscreen = !m_isFullscreen; | 482 | m_isFullscreen = !m_isFullscreen; |
483 | 483 | ||
484 | } | 484 | } |
485 | 485 | ||
486 | 486 | ||
487 | void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool, bool) { | 487 | void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool, bool) { |
488 | 488 | ||
489 | qWarning("received key event! relay to TE widget"); | 489 | qWarning("received key event! relay to TE widget"); |
490 | 490 | ||
491 | if ( m_curSession ) { | 491 | if ( m_curSession ) { |
492 | QKeyEvent ke(QEvent::KeyPress, q, u, 0); | 492 | QKeyEvent ke(QEvent::KeyPress, q, u, 0); |
493 | 493 | ||
494 | ke.ignore(); | 494 | ke.ignore(); |
495 | // where should i send this event? doesnt work sending it here | 495 | // where should i send this event? doesnt work sending it here |
496 | QApplication::sendEvent((QObject *)m_curSession->widgetStack(), &ke); | 496 | QApplication::sendEvent((QObject *)m_curSession->widgetStack(), &ke); |
497 | } | 497 | } |
498 | } | 498 | } |
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index 91ca147..35338b7 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h | |||
@@ -2,49 +2,49 @@ | |||
2 | #define OPIE_MAIN_WINDOW_H | 2 | #define OPIE_MAIN_WINDOW_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | #include <qlist.h> | 5 | #include <qlist.h> |
6 | 6 | ||
7 | #include "session.h" | 7 | #include "session.h" |
8 | 8 | ||
9 | /** | 9 | /** |
10 | * this is the MainWindow of the new opie console | 10 | * this is the MainWindow of the new opie console |
11 | * it's also the dispatcher between the different | 11 | * it's also the dispatcher between the different |
12 | * actions supported by the gui | 12 | * actions supported by the gui |
13 | */ | 13 | */ |
14 | class QToolBar; | 14 | class QToolBar; |
15 | class QToolButton; | 15 | class QToolButton; |
16 | class QMenuBar; | 16 | class QMenuBar; |
17 | class QAction; | 17 | class QAction; |
18 | class MetaFactory; | 18 | class MetaFactory; |
19 | class TabWidget; | 19 | class TabWidget; |
20 | class ProfileManager; | 20 | class ProfileManager; |
21 | class Profile; | 21 | class Profile; |
22 | class FunctionKeyboard; | 22 | class FunctionKeyboard; |
23 | class MainWindow : public QMainWindow { | 23 | class MainWindow : public QMainWindow { |
24 | Q_OBJECT | 24 | Q_OBJECT |
25 | public: | 25 | public: |
26 | MainWindow(); | 26 | MainWindow( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 ); |
27 | ~MainWindow(); | 27 | ~MainWindow(); |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * our factory to generate IOLayer and so on | 30 | * our factory to generate IOLayer and so on |
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | MetaFactory* factory(); | 33 | MetaFactory* factory(); |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * A session contains a QWidget*, | 36 | * A session contains a QWidget*, |
37 | * an IOLayer* and some infos for us | 37 | * an IOLayer* and some infos for us |
38 | */ | 38 | */ |
39 | Session* currentSession(); | 39 | Session* currentSession(); |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * the session list | 42 | * the session list |
43 | */ | 43 | */ |
44 | QList<Session> sessions(); | 44 | QList<Session> sessions(); |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * | 47 | * |
48 | */ | 48 | */ |
49 | ProfileManager* manager(); | 49 | ProfileManager* manager(); |
50 | TabWidget* tabWidget(); | 50 | TabWidget* tabWidget(); |
diff --git a/noncore/apps/opie-console/opie-console.control b/noncore/apps/opie-console/opie-console.control index aba2192..e307fef 100644 --- a/noncore/apps/opie-console/opie-console.control +++ b/noncore/apps/opie-console/opie-console.control | |||
@@ -1,10 +1,10 @@ | |||
1 | Files: bin/opie-console apps/Applications/opie-console.desktop pics/console/* | 1 | Files: bin/opie-console apps/Applications/opie-console.desktop pics/console/* |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: opie/applications | 3 | Section: opie/applications |
4 | Maintainer: Opie team <opie@handhelds.org> | 4 | Maintainer: Opie team <opie@handhelds.org> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: 0.6-$SUB_VERSION | 6 | Version: 0.6-$SUB_VERSION |
7 | Depends: qpe-base ($QPE_VERSION), libopie ($QPE_VERSION) | 7 | Depends: qpe-base ($QPE_VERSION), libopie ($QPE_VERSION), opie-console-help-en |
8 | License: GPL | 8 | License: GPL |
9 | Description: Opie terminal app | 9 | Description: Opie terminal app |
10 | 10 | ||