-rw-r--r-- | noncore/apps/opie-console/emulation_handler.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp index bb3dd28..b2b107e 100644 --- a/noncore/apps/opie-console/emulation_handler.cpp +++ b/noncore/apps/opie-console/emulation_handler.cpp | |||
@@ -86,98 +86,97 @@ void EmulationHandler::setColor( const QColor& fore, const QColor& back ) { | |||
86 | table[i].transparent = 0; | 86 | table[i].transparent = 0; |
87 | }else { | 87 | }else { |
88 | table[i].color = defaultCt[i].color; | 88 | table[i].color = defaultCt[i].color; |
89 | } | 89 | } |
90 | } | 90 | } |
91 | m_teWid->setColorTable(table ); | 91 | m_teWid->setColorTable(table ); |
92 | m_teWid->update(); | 92 | m_teWid->update(); |
93 | } | 93 | } |
94 | QFont EmulationHandler::font( int id ) { | 94 | QFont EmulationHandler::font( int id ) { |
95 | QString name; | 95 | QString name; |
96 | int size = 0; | 96 | int size = 0; |
97 | switch(id ) { | 97 | switch(id ) { |
98 | default: // fall through | 98 | default: // fall through |
99 | case 0: | 99 | case 0: |
100 | name = QString::fromLatin1("Micro"); | 100 | name = QString::fromLatin1("Micro"); |
101 | size = 4; | 101 | size = 4; |
102 | break; | 102 | break; |
103 | case 1: | 103 | case 1: |
104 | name = QString::fromLatin1("Fixed"); | 104 | name = QString::fromLatin1("Fixed"); |
105 | size = 7; | 105 | size = 7; |
106 | break; | 106 | break; |
107 | case 2: | 107 | case 2: |
108 | name = QString::fromLatin1("Fixed"); | 108 | name = QString::fromLatin1("Fixed"); |
109 | size = 12; | 109 | size = 12; |
110 | break; | 110 | break; |
111 | } | 111 | } |
112 | QFont font(name, size, QFont::Normal ); | 112 | QFont font(name, size, QFont::Normal ); |
113 | font.setFixedPitch(TRUE ); | 113 | font.setFixedPitch(TRUE ); |
114 | return font; | 114 | return font; |
115 | } | 115 | } |
116 | QColor EmulationHandler::foreColor(int col) { | 116 | QColor EmulationHandler::foreColor(int col) { |
117 | QColor co; | 117 | QColor co; |
118 | /* we need to switch it */ | 118 | /* we need to switch it */ |
119 | switch( col ) { | 119 | switch( col ) { |
120 | default: | 120 | default: |
121 | case Profile::White: | 121 | case Profile::White: |
122 | /* color is black */ | 122 | /* color is black */ |
123 | co = Qt::white; | 123 | co = Qt::white; |
124 | break; | 124 | break; |
125 | case Profile::Black: | 125 | case Profile::Black: |
126 | co = Qt::black; | 126 | co = Qt::black; |
127 | break; | 127 | break; |
128 | case Profile::Green: | 128 | case Profile::Green: |
129 | qWarning("Foreground green"); | 129 | qWarning("Foreground green"); |
130 | co = Qt::green; | 130 | co = Qt::green; |
131 | break; | 131 | break; |
132 | case Profile::Orange: | 132 | case Profile::Orange: |
133 | qWarning("Foreground orange"); | 133 | qWarning("Foreground orange"); |
134 | // FIXME needs better color here | 134 | co.setRgb( 231, 184, 98 ); |
135 | co = Qt::darkYellow; | ||
136 | break; | 135 | break; |
137 | } | 136 | } |
138 | 137 | ||
139 | return co; | 138 | return co; |
140 | } | 139 | } |
141 | QColor EmulationHandler::backColor(int col ) { | 140 | QColor EmulationHandler::backColor(int col ) { |
142 | QColor co; | 141 | QColor co; |
143 | /* we need to switch it */ | 142 | /* we need to switch it */ |
144 | switch( col ) { | 143 | switch( col ) { |
145 | default: | 144 | default: |
146 | case Profile::White: | 145 | case Profile::White: |
147 | /* color is white */ | 146 | /* color is white */ |
148 | co = Qt::black; | 147 | co = Qt::black; |
149 | break; | 148 | break; |
150 | case Profile::Black: | 149 | case Profile::Black: |
151 | co = Qt::white; | 150 | co = Qt::white; |
152 | break; | 151 | break; |
153 | case Profile::Green: | 152 | case Profile::Green: |
154 | qWarning("Background black"); | 153 | qWarning("Background black"); |
155 | co = Qt::black; | 154 | co = Qt::black; |
156 | break; | 155 | break; |
157 | case Profile::Orange: | 156 | case Profile::Orange: |
158 | qWarning("Background black"); | 157 | qWarning("Background black"); |
159 | co = Qt::black; | 158 | co = Qt::black; |
160 | break; | 159 | break; |
161 | } | 160 | } |
162 | 161 | ||
163 | return co; | 162 | return co; |
164 | } | 163 | } |
165 | 164 | ||
166 | QPushButton* EmulationHandler::cornerButton() { | 165 | QPushButton* EmulationHandler::cornerButton() { |
167 | return m_teWid->cornerButton(); | 166 | return m_teWid->cornerButton(); |
168 | } | 167 | } |
169 | 168 | ||
170 | 169 | ||
171 | Script *EmulationHandler::script() { | 170 | Script *EmulationHandler::script() { |
172 | return m_script; | 171 | return m_script; |
173 | } | 172 | } |
174 | 173 | ||
175 | bool EmulationHandler::isRecording() { | 174 | bool EmulationHandler::isRecording() { |
176 | return (m_script != 0); | 175 | return (m_script != 0); |
177 | } | 176 | } |
178 | 177 | ||
179 | void EmulationHandler::startRecording() { | 178 | void EmulationHandler::startRecording() { |
180 | if (!isRecording()) | 179 | if (!isRecording()) |
181 | m_script = new Script(); | 180 | m_script = new Script(); |
182 | } | 181 | } |
183 | 182 | ||