summaryrefslogtreecommitdiff
authorhrw <hrw>2005-10-12 21:05:47 (UTC)
committer hrw <hrw>2005-10-12 21:05:47 (UTC)
commit6d3c752d2e93f5a43a4b5156f9968e07b3144c0a (patch) (unidiff)
tree0bdc7f3c4db68a21c266993a96bc428dc96bcbfa
parentd5beae7038e36633480cc3e17134a85b6d68fbc7 (diff)
downloadopie-6d3c752d2e93f5a43a4b5156f9968e07b3144c0a.zip
opie-6d3c752d2e93f5a43a4b5156f9968e07b3144c0a.tar.gz
opie-6d3c752d2e93f5a43a4b5156f9968e07b3144c0a.tar.bz2
fixed bug #1686: opie-console lack U I setting for switching scrollbar
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp3
-rw-r--r--noncore/apps/opie-console/emulation_handler.h1
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp41
-rw-r--r--noncore/apps/opie-console/mainwindow.h9
5 files changed, 55 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 07be30b..b817062 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,34 +1,35 @@
1 2005-??-??Opie 1.2.2 1 2005-??-??Opie 1.2.2
2 2
3 3
4 New Features 4 New Features
5 ------------ 5 ------------
6 6
7 7
8 Fixed Bugs 8 Fixed Bugs
9 ---------- 9 ----------
10 * #1695 - Date selector use too small fontsize on VGA screen (hrw) 10 * #1695 - Date selector use too small fontsize on VGA screen (hrw)
11 * #1686 - opie-console lack UI setting for switching scrollbar (hrw)
11 * n.a. - remove hardcoded font size from wellenreiter (hrw) 12 * n.a. - remove hardcoded font size from wellenreiter (hrw)
12 * n.a. - added patch to build QT/E 2.3.10 with gc 4.x.x (hrw) 13 * n.a. - added patch to build QT/E 2.3.10 with gc 4.x.x (hrw)
13 14
14 2005-09-11Opie 1.2.1 15 2005-09-11Opie 1.2.1
15 16
16 17
17 New Features 18 New Features
18 ------------ 19 ------------
19 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) 20 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
20 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) 21 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
21 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) 22 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
22 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) 23 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
23 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) 24 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl)
24 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) 25 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl)
25 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) 26 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw)
26 * ZSafe: Made UI conform to Opie standards (drw) 27 * ZSafe: Made UI conform to Opie standards (drw)
27 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) 28 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw)
28 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) 29 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl)
29 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) 30 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl)
30 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) 31 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl)
31 * Opie-smb: Added Opie front end for Samba (ljp) 32 * Opie-smb: Added Opie front end for Samba (ljp)
32 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) 33 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie)
33 * Opieplayer: rudimentary podcast support (ljp) 34 * Opieplayer: rudimentary podcast support (ljp)
34 35
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index 2087f57..d5a435e 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -229,24 +229,27 @@ void EmulationHandler::clearScript() {
229} 229}
230 230
231void EmulationHandler::clearLog() { 231void EmulationHandler::clearLog() {
232 if (isLogging()) { 232 if (isLogging()) {
233 delete m_log; 233 delete m_log;
234 m_log = 0; 234 m_log = 0;
235 } 235 }
236} 236}
237 237
238void EmulationHandler::runScript(const Script *script) { 238void EmulationHandler::runScript(const Script *script) {
239 emit send(script->script()); 239 emit send(script->script());
240} 240}
241 241
242void EmulationHandler::copy() { 242void EmulationHandler::copy() {
243 m_teWid->emitSelection(); 243 m_teWid->emitSelection();
244} 244}
245void EmulationHandler::paste() { 245void EmulationHandler::paste() {
246 m_teWid->pasteClipboard(); 246 m_teWid->pasteClipboard();
247} 247}
248 248
249void EmulationHandler::setWrap(int columns) { 249void EmulationHandler::setWrap(int columns) {
250 m_teWid->setWrapAt(columns); 250 m_teWid->setWrapAt(columns);
251} 251}
252 252
253void EmulationHandler::setScrollbarLocation(int index) {
254 m_teWid->setScrollbarLocation(index);
255}
diff --git a/noncore/apps/opie-console/emulation_handler.h b/noncore/apps/opie-console/emulation_handler.h
index 1092c82..dabdb15 100644
--- a/noncore/apps/opie-console/emulation_handler.h
+++ b/noncore/apps/opie-console/emulation_handler.h
@@ -62,48 +62,49 @@ public:
62 void startLogging(const QString); 62 void startLogging(const QString);
63 63
64 /* Return whether we are currently recording a script */ 64 /* Return whether we are currently recording a script */
65 bool isRecording(); 65 bool isRecording();
66 66
67 /* Return whether we are currently recording a log */ 67 /* Return whether we are currently recording a log */
68 bool isLogging(); 68 bool isLogging();
69 69
70 QString logFileName(); 70 QString logFileName();
71 71
72 /* Return the current script (or NULL) */ 72 /* Return the current script (or NULL) */
73 Script *script(); 73 Script *script();
74 74
75 /* Stop recording and remove the current script from memory */ 75 /* Stop recording and remove the current script from memory */
76 void clearScript(); 76 void clearScript();
77 77
78 /* Stop logging and remove the current log from memory */ 78 /* Stop logging and remove the current log from memory */
79 void clearLog(); 79 void clearLog();
80 80
81 /* Run a script by forwarding its keys to the EmulationLayer */ 81 /* Run a script by forwarding its keys to the EmulationLayer */
82 void runScript(const Script *); 82 void runScript(const Script *);
83 83
84 /* Propagate change to widget */ 84 /* Propagate change to widget */
85 void setWrap(int columns); 85 void setWrap(int columns);
86 void setScrollbarLocation(int index);
86signals: 87signals:
87 void send( const QByteArray& ); 88 void send( const QByteArray& );
88 void changeSize(int rows, int cols ); 89 void changeSize(int rows, int cols );
89 90
90 91
91public slots: 92public slots:
92 void recv( const QByteArray& ); 93 void recv( const QByteArray& );
93 void paste(); 94 void paste();
94 void copy(); 95 void copy();
95 96
96private slots: 97private slots:
97 void recvEmulation( const char*, int len ); 98 void recvEmulation( const char*, int len );
98private: 99private:
99 QFont font( int ); 100 QFont font( int );
100 QColor foreColor(int ); 101 QColor foreColor(int );
101 QColor backColor(int ); 102 QColor backColor(int );
102 103
103private: 104private:
104 TEWidget* m_teWid; 105 TEWidget* m_teWid;
105 TEmulation* m_teEmu; 106 TEmulation* m_teEmu;
106 Script * m_script; 107 Script * m_script;
107 Logger *m_log; 108 Logger *m_log;
108 QString m_logFileName; 109 QString m_logFileName;
109}; 110};
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 45a662c..18c0434 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -48,48 +48,49 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(
48 m_sessions.setAutoDelete( TRUE ); 48 m_sessions.setAutoDelete( TRUE );
49 m_curSession = 0; 49 m_curSession = 0;
50 m_manager = new ProfileManager( m_factory ); 50 m_manager = new ProfileManager( m_factory );
51 m_manager->load(); 51 m_manager->load();
52 m_scriptsData.setAutoDelete(TRUE); 52 m_scriptsData.setAutoDelete(TRUE);
53 53
54 initUI(); 54 initUI();
55 populateProfiles(); 55 populateProfiles();
56 populateScripts(); 56 populateScripts();
57} 57}
58 58
59void MainWindow::initUI() { 59void MainWindow::initUI() {
60 60
61 setToolBarsMovable( FALSE ); 61 setToolBarsMovable( FALSE );
62 62
63 /* tool bar for the menu */ 63 /* tool bar for the menu */
64 m_tool = new QToolBar( this ); 64 m_tool = new QToolBar( this );
65 m_tool->setHorizontalStretchable( TRUE ); 65 m_tool->setHorizontalStretchable( TRUE );
66 66
67 m_bar = new QMenuBar( m_tool ); 67 m_bar = new QMenuBar( m_tool );
68 m_console = new QPopupMenu( this ); 68 m_console = new QPopupMenu( this );
69 m_scripts = new QPopupMenu( this ); 69 m_scripts = new QPopupMenu( this );
70 m_sessionsPop= new QPopupMenu( this ); 70 m_sessionsPop= new QPopupMenu( this );
71 m_scriptsPop = new QPopupMenu( this ); 71 m_scriptsPop = new QPopupMenu( this );
72 m_scrollbar = new QPopupMenu( this );
72 73
73 /* add a toolbar for icons */ 74 /* add a toolbar for icons */
74 m_icons = new QToolBar(this); 75 m_icons = new QToolBar(this);
75 76
76 /* 77 /*
77 * the settings action 78 * the settings action
78 */ 79 */
79 m_setProfiles = new QAction(tr("Configure Profiles"), 80 m_setProfiles = new QAction(tr("Configure Profiles"),
80 Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), 81 Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ),
81 QString::null, 0, this, 0); 82 QString::null, 0, this, 0);
82 m_setProfiles->addTo( m_console ); 83 m_setProfiles->addTo( m_console );
83 connect( m_setProfiles, SIGNAL(activated() ), 84 connect( m_setProfiles, SIGNAL(activated() ),
84 this, SLOT(slotConfigure() ) ); 85 this, SLOT(slotConfigure() ) );
85 86
86 m_console->insertSeparator(); 87 m_console->insertSeparator();
87 /* 88 /*
88 * new Action for new sessions 89 * new Action for new sessions
89 */ 90 */
90 QAction* newCon = new QAction(tr("New Profile"), 91 QAction* newCon = new QAction(tr("New Profile"),
91 Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ), 92 Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
92 QString::null, 0, this, 0); 93 QString::null, 0, this, 0);
93 newCon->addTo( m_console ); 94 newCon->addTo( m_console );
94 connect( newCon, SIGNAL(activated() ), 95 connect( newCon, SIGNAL(activated() ),
95 this, SLOT(slotNew() ) ); 96 this, SLOT(slotNew() ) );
@@ -143,48 +144,59 @@ void MainWindow::initUI() {
143 144
144 145
145 146
146 /* 147 /*
147 * immediate change of line wrap policy 148 * immediate change of line wrap policy
148 */ 149 */
149 m_isWrapped = true; 150 m_isWrapped = true;
150 m_wrap = new QAction( tr("Line wrap"), Opie::Core::OResource::loadPixmap( "linewrap", Opie::Core::OResource::SmallIcon ), 151 m_wrap = new QAction( tr("Line wrap"), Opie::Core::OResource::loadPixmap( "linewrap", Opie::Core::OResource::SmallIcon ),
151 QString::null, 0, this, 0, true ); 152 QString::null, 0, this, 0, true );
152 m_wrap->addTo( m_console ); 153 m_wrap->addTo( m_console );
153 m_wrap->setOn( true ); 154 m_wrap->setOn( true );
154 connect( m_wrap, SIGNAL( activated() ), SLOT( slotWrap() ) ); 155 connect( m_wrap, SIGNAL( activated() ), SLOT( slotWrap() ) );
155 156
156 /* 157 /*
157 * fullscreen 158 * fullscreen
158 */ 159 */
159 m_isFullscreen = false; 160 m_isFullscreen = false;
160 161
161 m_fullscreen = new QAction( tr("Full screen"), Opie::Core::OResource::loadPixmap( "fullscreen", 162 m_fullscreen = new QAction( tr("Full screen"), Opie::Core::OResource::loadPixmap( "fullscreen",
162 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); 163 Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 );
163 m_fullscreen->addTo( m_console ); 164 m_fullscreen->addTo( m_console );
164 connect( m_fullscreen, SIGNAL( activated() ), 165 connect( m_fullscreen, SIGNAL( activated() ),
165 this, SLOT( slotFullscreen() ) ); 166 this, SLOT( slotFullscreen() ) );
166 167
168 /*
169 * scrollbar
170 */
171 sm_none = m_scrollbar->insertItem(tr( "None" ));
172 sm_left = m_scrollbar->insertItem(tr( "Left" ));
173 sm_right = m_scrollbar->insertItem(tr( "Right" ));
174
175 m_console->insertItem(tr("Scrollbar"), m_scrollbar, -1, 0);
176 connect( m_scrollbar, SIGNAL(activated(int)),
177 this, SLOT(slotScrollbarSelected(int)));
178
167 m_console->insertSeparator(); 179 m_console->insertSeparator();
168 180
169 m_recordLog = new QAction(); 181 m_recordLog = new QAction();
170 m_recordLog->setText( tr("Start log") ); 182 m_recordLog->setText( tr("Start log") );
171 m_recordLog->addTo( m_console ); 183 m_recordLog->addTo( m_console );
172 connect(m_recordLog, SIGNAL(activated() ), 184 connect(m_recordLog, SIGNAL(activated() ),
173 this, SLOT( slotSaveLog() ) ); 185 this, SLOT( slotSaveLog() ) );
174 m_recordingLog = false; 186 m_recordingLog = false;
175 187
176 QAction *a = new QAction(); 188 QAction *a = new QAction();
177 a->setText( tr("Save history") ); 189 a->setText( tr("Save history") );
178 a->addTo( m_console ); 190 a->addTo( m_console );
179 connect(a, SIGNAL(activated() ), 191 connect(a, SIGNAL(activated() ),
180 this, SLOT(slotSaveHistory() ) ); 192 this, SLOT(slotSaveHistory() ) );
181 /* 193 /*
182 * terminate action 194 * terminate action
183 */ 195 */
184 m_terminate = new QAction(); 196 m_terminate = new QAction();
185 m_terminate->setText( tr("Terminate") ); 197 m_terminate->setText( tr("Terminate") );
186 m_terminate->addTo( m_console ); 198 m_terminate->addTo( m_console );
187 connect(m_terminate, SIGNAL(activated() ), 199 connect(m_terminate, SIGNAL(activated() ),
188 this, SLOT(slotTerminate() ) ); 200 this, SLOT(slotTerminate() ) );
189 201
190 m_closewindow = new QAction(); 202 m_closewindow = new QAction();
@@ -672,48 +684,77 @@ void MainWindow::slotFullscreen() {
672 684
673 if ( m_isFullscreen ) { 685 if ( m_isFullscreen ) {
674 ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true ); 686 ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true );
675 ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() ); 687 ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() );
676 ( m_curSession->emulationHandler() )->cornerButton()->hide(); 688 ( m_curSession->emulationHandler() )->cornerButton()->hide();
677 disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 689 disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
678 690
679 } else { 691 } else {
680 savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget(); 692 savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget();
681 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); 693 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame );
682 ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop 694 ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop
683 , QPoint(0,0), false ); 695 , QPoint(0,0), false );
684 ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() ); 696 ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() );
685 ( m_curSession->widgetStack() )->setFocus(); 697 ( m_curSession->widgetStack() )->setFocus();
686 ( m_curSession->widgetStack() )->show(); 698 ( m_curSession->widgetStack() )->show();
687 699
688 ( ( m_curSession->emulationHandler() )->cornerButton() )->show(); 700 ( ( m_curSession->emulationHandler() )->cornerButton() )->show();
689 701
690 connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 702 connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
691 } 703 }
692 704
693 m_isFullscreen = !m_isFullscreen; 705 m_isFullscreen = !m_isFullscreen;
694} 706}
695 707
708void MainWindow::slotScrollbarSelected(int index)
709{
710 int loc;
711
712 Config cfg( "Konsole" );
713 cfg.setGroup("ScrollBar");
714 if(index == sm_none)
715 {
716 loc = 0;
717 }
718 else if(index == sm_left)
719 {
720 loc = 1;
721 }
722 else if(index == sm_right)
723 {
724 loc = 2;
725 }
726
727 cfg.writeEntry("Position", loc);
728
729 if (currentSession()) {
730 currentSession()->emulationHandler()->setScrollbarLocation(loc);
731 }
732
733 m_scrollbar->setItemChecked(sm_none, index == sm_none);
734 m_scrollbar->setItemChecked(sm_left, index == sm_left);
735 m_scrollbar->setItemChecked(sm_right, index == sm_right);
736}
696 737
697void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) { 738void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) {
698 739
699 if ( m_curSession ) { 740 if ( m_curSession ) {
700 741
701 QEvent::Type state; 742 QEvent::Type state;
702 743
703 if (pressed) state = QEvent::KeyPress; 744 if (pressed) state = QEvent::KeyPress;
704 else state = QEvent::KeyRelease; 745 else state = QEvent::KeyRelease;
705 746
706 QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode))); 747 QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode)));
707 748
708 // is this the best way to do this? cant figure out any other way to work 749 // is this the best way to do this? cant figure out any other way to work
709 QApplication::sendEvent((QObject *)m_curSession->widget(), &ke); 750 QApplication::sendEvent((QObject *)m_curSession->widget(), &ke);
710 ke.ignore(); 751 ke.ignore();
711 } 752 }
712} 753}
713void MainWindow::slotCopy() { 754void MainWindow::slotCopy() {
714 if (!currentSession() ) return; 755 if (!currentSession() ) return;
715 currentSession()->emulationHandler()->copy(); 756 currentSession()->emulationHandler()->copy();
716} 757}
717void MainWindow::slotPaste() { 758void MainWindow::slotPaste() {
718 if (!currentSession() ) return; 759 if (!currentSession() ) return;
719 currentSession()->emulationHandler()->paste(); 760 currentSession()->emulationHandler()->paste();
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h
index f3c8b81..abdf6ee 100644
--- a/noncore/apps/opie-console/mainwindow.h
+++ b/noncore/apps/opie-console/mainwindow.h
@@ -3,48 +3,49 @@
3 3
4#include <qmainwindow.h> 4#include <qmainwindow.h>
5#include <qlist.h> 5#include <qlist.h>
6#include <qfile.h> 6#include <qfile.h>
7 7
8#include "session.h" 8#include "session.h"
9 9
10/** 10/**
11 * this is the MainWindow of the new opie console 11 * this is the MainWindow of the new opie console
12 * it's also the dispatcher between the different 12 * it's also the dispatcher between the different
13 * actions supported by the gui 13 * actions supported by the gui
14 */ 14 */
15class QToolBar; 15class QToolBar;
16class QToolButton; 16class QToolButton;
17class QMenuBar; 17class QMenuBar;
18class QAction; 18class QAction;
19class MetaFactory; 19class MetaFactory;
20class TabWidget; 20class TabWidget;
21class ProfileManager; 21class ProfileManager;
22class Profile; 22class Profile;
23class FunctionKeyboard; 23class FunctionKeyboard;
24class FKey; 24class FKey;
25class DocLnk; 25class DocLnk;
26 26
27
27class MainWindow : public QMainWindow { 28class MainWindow : public QMainWindow {
28 Q_OBJECT 29 Q_OBJECT
29public: 30public:
30 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 ); 31 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags fl = 0 );
31 ~MainWindow(); 32 ~MainWindow();
32 static QString appName() {return QString::fromLatin1("opie-console"); } 33 static QString appName() {return QString::fromLatin1("opie-console"); }
33 34
34 /** 35 /**
35 * our factory to generate IOLayer and so on 36 * our factory to generate IOLayer and so on
36 * 37 *
37 */ 38 */
38 MetaFactory* factory(); 39 MetaFactory* factory();
39 40
40 /** 41 /**
41 * A session contains a QWidget*, 42 * A session contains a QWidget*,
42 * an IOLayer* and some infos for us 43 * an IOLayer* and some infos for us
43 */ 44 */
44 Session* currentSession(); 45 Session* currentSession();
45 46
46 /** 47 /**
47 * the session list 48 * the session list
48 */ 49 */
49 QList<Session> sessions(); 50 QList<Session> sessions();
50 51
@@ -54,88 +55,96 @@ public:
54 ProfileManager* manager(); 55 ProfileManager* manager();
55 TabWidget* tabWidget(); 56 TabWidget* tabWidget();
56 57
57private slots: 58private slots:
58 void slotNew(); 59 void slotNew();
59 void slotConnect(); 60 void slotConnect();
60 void slotDisconnect(); 61 void slotDisconnect();
61 void slotTerminate(); 62 void slotTerminate();
62 void slotConfigure(); 63 void slotConfigure();
63 void slotClose(); 64 void slotClose();
64 void slotProfile(int); 65 void slotProfile(int);
65 void slotTransfer(); 66 void slotTransfer();
66 void slotOpenKeb(bool); 67 void slotOpenKeb(bool);
67 void slotOpenButtons(bool); 68 void slotOpenButtons(bool);
68 void slotRecordScript(); 69 void slotRecordScript();
69 void slotSaveScript(); 70 void slotSaveScript();
70 void slotRunScript(int); 71 void slotRunScript(int);
71 void slotFullscreen(); 72 void slotFullscreen();
72 void slotQuickLaunch(); 73 void slotQuickLaunch();
73 void slotWrap(); 74 void slotWrap();
74 void slotSessionChanged( Session* ); 75 void slotSessionChanged( Session* );
75 void slotKeyReceived(FKey, ushort, ushort, bool); 76 void slotKeyReceived(FKey, ushort, ushort, bool);
76 void slotSaveHistory(); 77 void slotSaveHistory();
77 void slotSaveLog(); 78 void slotSaveLog();
79 void slotScrollbarSelected(int);
78 80
79 /* what could these both slot do? */ 81 /* what could these both slot do? */
80 void slotCopy(); 82 void slotCopy();
81 void slotPaste(); 83 void slotPaste();
82 84
83 /* save the currentSession() to Profiles */ 85 /* save the currentSession() to Profiles */
84 void slotSaveSession(); 86 void slotSaveSession();
85 87
86private: 88private:
87 void initUI(); 89 void initUI();
88 void populateProfiles(); 90 void populateProfiles();
89 void populateScripts(); 91 void populateScripts();
90 void create( const Profile& ); 92 void create( const Profile& );
91 /** 93 /**
92 * the current session 94 * the current session
93 */ 95 */
94 Session* m_curSession; 96 Session* m_curSession;
95 97
96 /** 98 /**
97 * the session list 99 * the session list
98 */ 100 */
99 QList<Session> m_sessions; 101 QList<Session> m_sessions;
100 QList<DocLnk> m_scriptsData; 102 QList<DocLnk> m_scriptsData;
101 103
102 /** 104 /**
103 * the metafactory 105 * the metafactory
104 */ 106 */
105 MetaFactory* m_factory; 107 MetaFactory* m_factory;
106 ProfileManager* m_manager; 108 ProfileManager* m_manager;
107 109
110 /*
111 * scrollbar
112 */
113
114 int sm_none, sm_left, sm_right;
115
108 TabWidget* m_consoleWindow; 116 TabWidget* m_consoleWindow;
109 QToolBar* m_tool; 117 QToolBar* m_tool;
110 QToolBar* m_icons; 118 QToolBar* m_icons;
111 QToolBar* m_keyBar; 119 QToolBar* m_keyBar;
112 QToolBar* m_buttonBar; 120 QToolBar* m_buttonBar;
113 QMenuBar* m_bar; 121 QMenuBar* m_bar;
114 QPopupMenu* m_console; 122 QPopupMenu* m_console;
115 QPopupMenu* m_sessionsPop; 123 QPopupMenu* m_sessionsPop;
116 QPopupMenu* m_scriptsPop; 124 QPopupMenu* m_scriptsPop;
117 QPopupMenu* m_scripts; 125 QPopupMenu* m_scripts;
126 QPopupMenu* m_scrollbar;
118 QAction* m_connect; 127 QAction* m_connect;
119 QAction* m_disconnect; 128 QAction* m_disconnect;
120 QAction* m_quickLaunch; 129 QAction* m_quickLaunch;
121 QAction* m_terminate; 130 QAction* m_terminate;
122 QAction* m_transfer; 131 QAction* m_transfer;
123 QAction* m_setProfiles; 132 QAction* m_setProfiles;
124 QAction* m_openKeys; 133 QAction* m_openKeys;
125 QAction* m_openButtons; 134 QAction* m_openButtons;
126 QAction* m_recordScript; 135 QAction* m_recordScript;
127 QAction* m_saveScript; 136 QAction* m_saveScript;
128 QAction* m_fullscreen; 137 QAction* m_fullscreen;
129 QAction* m_wrap; 138 QAction* m_wrap;
130 QAction* m_closewindow; 139 QAction* m_closewindow;
131 QAction* m_recordLog; 140 QAction* m_recordLog;
132 141
133 FunctionKeyboard *m_kb; 142 FunctionKeyboard *m_kb;
134 int m_runScript_id; 143 int m_runScript_id;
135 bool m_isFullscreen; 144 bool m_isFullscreen;
136 bool m_isWrapped; 145 bool m_isWrapped;
137 bool m_recordingLog; 146 bool m_recordingLog;
138 147
139 QWidget* savedParentFullscreen; 148 QWidget* savedParentFullscreen;
140}; 149};
141 150