summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_handler.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/emulation_handler.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index e045aef..986ae8d 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -1,26 +1,21 @@
1#include "TEmuVt102.h" 1#include "TEmuVt102.h"
2#include "profile.h" 2#include "profile.h"
3#include "emulation_handler.h" 3#include "emulation_handler.h"
4#include "script.h" 4#include "script.h"
5#include "logger.h" 5#include "logger.h"
6 6
7/* OPIE */
8#include <opie2/odebug.h>
9
10#include <qfile.h> 7#include <qfile.h>
11#include <qtextstream.h> 8#include <qtextstream.h>
12 9
13using namespace Opie::Core;
14
15EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) 10EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name )
16 : QObject(0, name ) 11 : QObject(0, name )
17{ 12{
18 m_teWid = new TEWidget( parent, "TerminalMain"); 13 m_teWid = new TEWidget( parent, "TerminalMain");
19 // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar) 14 // use setWrapAt(0) for classic behaviour (wrap at screen width, no scrollbar)
20 // use setWrapAt(80) for normal console with scrollbar 15 // use setWrapAt(80) for normal console with scrollbar
21 setWrap(prof.readNumEntry("Wrap", 80) ? 0 : 80); 16 setWrap(prof.readNumEntry("Wrap", 80) ? 0 : 80);
22 m_teWid->setMinimumSize(150, 70 ); 17 m_teWid->setMinimumSize(150, 70 );
23 m_script = 0; 18 m_script = 0;
24 m_log = 0; 19 m_log = 0;
25 parent->resize( m_teWid->calcSize(80, 24 ) ); 20 parent->resize( m_teWid->calcSize(80, 24 ) );
26 m_teEmu = new TEmuVt102(m_teWid ); 21 m_teEmu = new TEmuVt102(m_teWid );
@@ -139,53 +134,49 @@ QColor EmulationHandler::foreColor(int col) {
139 QColor co; 134 QColor co;
140 /* we need to switch it */ 135 /* we need to switch it */
141 switch( col ) { 136 switch( col ) {
142 default: 137 default:
143 case Profile::White: 138 case Profile::White:
144 /* color is black */ 139 /* color is black */
145 co = Qt::white; 140 co = Qt::white;
146 break; 141 break;
147 case Profile::Black: 142 case Profile::Black:
148 co = Qt::black; 143 co = Qt::black;
149 break; 144 break;
150 case Profile::Green: 145 case Profile::Green:
151 owarn << "Foreground green" << oendl;
152 co = Qt::green; 146 co = Qt::green;
153 break; 147 break;
154 case Profile::Orange: 148 case Profile::Orange:
155 owarn << "Foreground orange" << oendl;
156 co.setRgb( 231, 184, 98 ); 149 co.setRgb( 231, 184, 98 );
157 break; 150 break;
158 } 151 }
159 152
160 return co; 153 return co;
161} 154}
162QColor EmulationHandler::backColor(int col ) { 155QColor EmulationHandler::backColor(int col ) {
163 QColor co; 156 QColor co;
164 /* we need to switch it */ 157 /* we need to switch it */
165 switch( col ) { 158 switch( col ) {
166 default: 159 default:
167 case Profile::White: 160 case Profile::White:
168 /* color is white */ 161 /* color is white */
169 co = Qt::black; 162 co = Qt::black;
170 break; 163 break;
171 case Profile::Black: 164 case Profile::Black:
172 co = Qt::white; 165 co = Qt::white;
173 break; 166 break;
174 case Profile::Green: 167 case Profile::Green:
175 owarn << "Background black" << oendl;
176 co = Qt::black; 168 co = Qt::black;
177 break; 169 break;
178 case Profile::Orange: 170 case Profile::Orange:
179 owarn << "Background black" << oendl;
180 co = Qt::black; 171 co = Qt::black;
181 break; 172 break;
182 } 173 }
183 174
184 return co; 175 return co;
185} 176}
186 177
187QPushButton* EmulationHandler::cornerButton() { 178QPushButton* EmulationHandler::cornerButton() {
188 return m_teWid->cornerButton(); 179 return m_teWid->cornerButton();
189} 180}
190 181
191 182