summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/TEmulation.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/TEmulation.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/TEmulation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/TEmulation.cpp b/noncore/apps/opie-console/TEmulation.cpp
index 7a0c624..3b1b9e1 100644
--- a/noncore/apps/opie-console/TEmulation.cpp
+++ b/noncore/apps/opie-console/TEmulation.cpp
@@ -250,49 +250,51 @@ void TEmulation::onRcvBlock(const char *s, int len)
250 250
251void TEmulation::onSelectionBegin(const int x, const int y) { 251void TEmulation::onSelectionBegin(const int x, const int y) {
252 if (!connected) return; 252 if (!connected) return;
253 scr->setSelBeginXY(x,y); 253 scr->setSelBeginXY(x,y);
254 showBulk(); 254 showBulk();
255} 255}
256 256
257void TEmulation::onSelectionExtend(const int x, const int y) { 257void TEmulation::onSelectionExtend(const int x, const int y) {
258 if (!connected) return; 258 if (!connected) return;
259 scr->setSelExtentXY(x,y); 259 scr->setSelExtentXY(x,y);
260 showBulk(); 260 showBulk();
261} 261}
262 262
263void TEmulation::setSelection(const BOOL preserve_line_breaks) { 263void TEmulation::setSelection(const BOOL preserve_line_breaks) {
264 if (!connected) return; 264 if (!connected) return;
265 QString t = scr->getSelText(preserve_line_breaks); 265 QString t = scr->getSelText(preserve_line_breaks);
266 if (!t.isNull()) gui->setSelection(t); 266 if (!t.isNull()) gui->setSelection(t);
267} 267}
268 268
269void TEmulation::clearSelection() { 269void TEmulation::clearSelection() {
270 if (!connected) return; 270 if (!connected) return;
271 scr->clearSelection(); 271 scr->clearSelection();
272 showBulk(); 272 showBulk();
273} 273}
274 274void TEmulation::streamHistory(QTextStream* stream) {
275 *stream << scr->getHistory();
276}
275// Refreshing -------------------------------------------------------------- -- 277// Refreshing -------------------------------------------------------------- --
276 278
277#define BULK_TIMEOUT 20 279#define BULK_TIMEOUT 20
278 280
279/*! 281/*!
280 called when \n comes in. Evtl. triggers showBulk at endBulk 282 called when \n comes in. Evtl. triggers showBulk at endBulk
281*/ 283*/
282 284
283void TEmulation::bulkNewline() 285void TEmulation::bulkNewline()
284{ 286{
285 bulk_nlcnt += 1; 287 bulk_nlcnt += 1;
286 bulk_incnt = 0; // reset bulk counter since `nl' rule applies 288 bulk_incnt = 0; // reset bulk counter since `nl' rule applies
287} 289}
288 290
289/*! 291/*!
290*/ 292*/
291 293
292void TEmulation::showBulk() 294void TEmulation::showBulk()
293{ 295{
294 bulk_nlcnt = 0; // reset bulk newline counter 296 bulk_nlcnt = 0; // reset bulk newline counter
295 bulk_incnt = 0; // reset bulk counter 297 bulk_incnt = 0; // reset bulk counter
296 if (connected) 298 if (connected)
297 { 299 {
298 ca* image = scr->getCookedImage(); // get the image 300 ca* image = scr->getCookedImage(); // get the image