summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/emulation_handler.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/emulation_handler.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index 99d069f..89b70c6 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -1,19 +1,21 @@
1
2#include "TEmuVt102.h" 1#include "TEmuVt102.h"
3
4#include "profile.h" 2#include "profile.h"
5#include "emulation_handler.h" 3#include "emulation_handler.h"
6#include "script.h" 4#include "script.h"
7 5
6/* OPIE */
7#include <opie2/odebug.h>
8using namespace Opie::Core;
9
8EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name ) 10EmulationHandler::EmulationHandler( const Profile& prof, QWidget* parent,const char* name )
9 : QObject(0, name ) 11 : QObject(0, name )
10{ 12{
11 m_teWid = new TEWidget( parent, "TerminalMain"); 13 m_teWid = new TEWidget( parent, "TerminalMain");
12 // 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)
13 // use setWrapAt(80) for normal console with scrollbar 15 // use setWrapAt(80) for normal console with scrollbar
14 setWrap(prof.readNumEntry("Wrap", 0) ? 0 : 80); 16 setWrap(prof.readNumEntry("Wrap", 0) ? 0 : 80);
15 m_teWid->setMinimumSize(150, 70 ); 17 m_teWid->setMinimumSize(150, 70 );
16 m_script = 0; 18 m_script = 0;
17 parent->resize( m_teWid->calcSize(80, 24 ) ); 19 parent->resize( m_teWid->calcSize(80, 24 ) );
18 m_teEmu = new TEmuVt102(m_teWid ); 20 m_teEmu = new TEmuVt102(m_teWid );
19 21
@@ -119,53 +121,53 @@ QColor EmulationHandler::foreColor(int col) {
119 QColor co; 121 QColor co;
120 /* we need to switch it */ 122 /* we need to switch it */
121 switch( col ) { 123 switch( col ) {
122 default: 124 default:
123 case Profile::White: 125 case Profile::White:
124 /* color is black */ 126 /* color is black */
125 co = Qt::white; 127 co = Qt::white;
126 break; 128 break;
127 case Profile::Black: 129 case Profile::Black:
128 co = Qt::black; 130 co = Qt::black;
129 break; 131 break;
130 case Profile::Green: 132 case Profile::Green:
131 qWarning("Foreground green"); 133 owarn << "Foreground green" << oendl;
132 co = Qt::green; 134 co = Qt::green;
133 break; 135 break;
134 case Profile::Orange: 136 case Profile::Orange:
135 qWarning("Foreground orange"); 137 owarn << "Foreground orange" << oendl;
136 co.setRgb( 231, 184, 98 ); 138 co.setRgb( 231, 184, 98 );
137 break; 139 break;
138 } 140 }
139 141
140 return co; 142 return co;
141} 143}
142QColor EmulationHandler::backColor(int col ) { 144QColor EmulationHandler::backColor(int col ) {
143 QColor co; 145 QColor co;
144 /* we need to switch it */ 146 /* we need to switch it */
145 switch( col ) { 147 switch( col ) {
146 default: 148 default:
147 case Profile::White: 149 case Profile::White:
148 /* color is white */ 150 /* color is white */
149 co = Qt::black; 151 co = Qt::black;
150 break; 152 break;
151 case Profile::Black: 153 case Profile::Black:
152 co = Qt::white; 154 co = Qt::white;
153 break; 155 break;
154 case Profile::Green: 156 case Profile::Green:
155 qWarning("Background black"); 157 owarn << "Background black" << oendl;
156 co = Qt::black; 158 co = Qt::black;
157 break; 159 break;
158 case Profile::Orange: 160 case Profile::Orange:
159 qWarning("Background black"); 161 owarn << "Background black" << oendl;
160 co = Qt::black; 162 co = Qt::black;
161 break; 163 break;
162 } 164 }
163 165
164 return co; 166 return co;
165} 167}
166 168
167QPushButton* EmulationHandler::cornerButton() { 169QPushButton* EmulationHandler::cornerButton() {
168 return m_teWid->cornerButton(); 170 return m_teWid->cornerButton();
169} 171}
170 172
171 173