summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp103
1 files changed, 100 insertions, 3 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 2e00a07..895fa9e 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -27,12 +27,109 @@
27#include "tabwidget.h" 27#include "tabwidget.h"
28#include "transferdialog.h" 28#include "transferdialog.h"
29#include "function_keyboard.h" 29#include "function_keyboard.h"
30#include "emulation_handler.h" 30#include "emulation_handler.h"
31#include "script.h" 31#include "script.h"
32 32
33static char * filesave_xpm[] = {
34"16 16 78 1",
35" c None",
36". c #343434",
37"+ c #A0A0A0",
38"@ c #565656",
39"# c #9E9E9E",
40"$ c #525252",
41"% c #929292",
42"& c #676767",
43"* c #848484",
44"= c #666666",
45"- c #D8D8D8",
46"; c #FFFFFF",
47"> c #DBDBDB",
48", c #636363",
49"' c #989898",
50") c #2D2D2D",
51"! c #909090",
52"~ c #AEAEAE",
53"{ c #EAEAEA",
54"] c #575757",
55"^ c #585858",
56"/ c #8A8A8A",
57"( c #828282",
58"_ c #6F6F6F",
59": c #C9C9C9",
60"< c #050505",
61"[ c #292929",
62"} c #777777",
63"| c #616161",
64"1 c #3A3A3A",
65"2 c #BEBEBE",
66"3 c #2C2C2C",
67"4 c #7C7C7C",
68"5 c #F6F6F6",
69"6 c #FCFCFC",
70"7 c #6B6B6B",
71"8 c #959595",
72"9 c #4F4F4F",
73"0 c #808080",
74"a c #767676",
75"b c #818181",
76"c c #B8B8B8",
77"d c #FBFBFB",
78"e c #F9F9F9",
79"f c #CCCCCC",
80"g c #030303",
81"h c #737373",
82"i c #7A7A7A",
83"j c #7E7E7E",
84"k c #6A6A6A",
85"l c #FAFAFA",
86"m c #505050",
87"n c #9D9D9D",
88"o c #333333",
89"p c #7B7B7B",
90"q c #787878",
91"r c #696969",
92"s c #494949",
93"t c #555555",
94"u c #949494",
95"v c #E6E6E6",
96"w c #424242",
97"x c #515151",
98"y c #535353",
99"z c #3E3E3E",
100"A c #D4D4D4",
101"B c #0C0C0C",
102"C c #353535",
103"D c #474747",
104"E c #ECECEC",
105"F c #919191",
106"G c #7D7D7D",
107"H c #000000",
108"I c #404040",
109"J c #858585",
110"K c #323232",
111"L c #D0D0D0",
112"M c #1C1C1C",
113" ...+ ",
114" @#$%&..+ ",
115" .*=-;;>,..+ ",
116" ')!~;;;;;;{]..",
117" ^/(-;;;;;;;_:<",
118" [}|;;;;;;;{12$",
119" #34-55;;;;678$+",
120" 90ab=c;dd;e1fg ",
121" [ahij((kbl0mn$ ",
122" op^q^^7r&]s/$+ ",
123"@btu;vbwxy]zAB ",
124"CzDEvEv;;DssF$ ",
125"G.H{E{E{IxsJ$+ ",
126" +...vEKxzLM ",
127" +...z]n$ ",
128" +... "};
129
33 130
34 131
35MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 132MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
36 KeyTrans::loadAll(); 133 KeyTrans::loadAll();
37 for (int i = 0; i < KeyTrans::count(); i++ ) { 134 for (int i = 0; i < KeyTrans::count(); i++ ) {
38 KeyTrans* s = KeyTrans::find(i ); 135 KeyTrans* s = KeyTrans::find(i );
@@ -57,13 +154,13 @@ void MainWindow::initUI() {
57 m_tool->setHorizontalStretchable( TRUE ); 154 m_tool->setHorizontalStretchable( TRUE );
58 155
59 m_bar = new QMenuBar( m_tool ); 156 m_bar = new QMenuBar( m_tool );
60 m_console = new QPopupMenu( this ); 157 m_console = new QPopupMenu( this );
61 m_scripts = new QPopupMenu( this ); 158 m_scripts = new QPopupMenu( this );
62 m_sessionsPop= new QPopupMenu( this ); 159 m_sessionsPop= new QPopupMenu( this );
63 m_scriptsPop = new QPopupMenu( this ); 160 m_scriptsPop = new QPopupMenu( this );
64 161
65 /* add a toolbar for icons */ 162 /* add a toolbar for icons */
66 m_icons = new QToolBar(this); 163 m_icons = new QToolBar(this);
67 164
68 /* 165 /*
69 * the settings action 166 * the settings action
@@ -87,13 +184,13 @@ void MainWindow::initUI() {
87 this, SLOT(slotNew() ) ); 184 this, SLOT(slotNew() ) );
88 185
89 m_console->insertSeparator(); 186 m_console->insertSeparator();
90 /* save icon is not available */ 187 /* save icon is not available */
91 188
92 QAction *saveCon = new QAction(tr("Save Connection"), 189 QAction *saveCon = new QAction(tr("Save Connection"),
93 Resource::loadPixmap("save"), QString::null, 190 QPixmap( ( const char** ) filesave_xpm ) , QString::null,
94 0, this, 0 ); 191 0, this, 0 );
95 saveCon->addTo( m_console ); 192 saveCon->addTo( m_console );
96 connect( saveCon, SIGNAL(activated() ), 193 connect( saveCon, SIGNAL(activated() ),
97 this, SLOT(slotSaveSession() ) ); 194 this, SLOT(slotSaveSession() ) );
98 m_console->insertSeparator(); 195 m_console->insertSeparator();
99 196
@@ -154,13 +251,13 @@ void MainWindow::initUI() {
154 251
155 /* 252 /*
156 * script actions 253 * script actions
157 */ 254 */
158 m_runScript_id = m_scripts->insertItem(tr("Run Script"), m_scriptsPop, -1, 0); 255 m_runScript_id = m_scripts->insertItem(tr("Run Script"), m_scriptsPop, -1, 0);
159 connect(m_scriptsPop, SIGNAL(activated(int)), this, SLOT(slotRunScript(int))); 256 connect(m_scriptsPop, SIGNAL(activated(int)), this, SLOT(slotRunScript(int)));
160 257
161 m_recordScript = new QAction(tr("Record Script"), QString::null, 0, this, 0); 258 m_recordScript = new QAction(tr("Record Script"), QString::null, 0, this, 0);
162 m_recordScript->addTo(m_scripts); 259 m_recordScript->addTo(m_scripts);
163 connect(m_recordScript, SIGNAL(activated()), this, SLOT(slotRecordScript())); 260 connect(m_recordScript, SIGNAL(activated()), this, SLOT(slotRecordScript()));
164 261
165 m_saveScript = new QAction(tr("Save Script"), QString::null, 0, this, 0); 262 m_saveScript = new QAction(tr("Save Script"), QString::null, 0, this, 0);
166 m_saveScript->addTo(m_scripts); 263 m_saveScript->addTo(m_scripts);