~ubuntu-branches/ubuntu/saucy/konsole/saucy-proposed

« back to all changes in this revision

Viewing changes to src/Screen.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-11-19 16:01:56 UTC
  • mfrom: (1.1.18)
  • Revision ID: package-import@ubuntu.com-20121119160156-7ohwzglkgwe61gsf
Tags: 4:4.9.80-0ubuntu1
* New upstream beta release
* Remove ControlDragSettings.diff now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
     * Convenience method.  Returns the currently selected text.
445
445
     * @param preserveLineBreaks Specifies whether new line characters should
446
446
     * be inserted into the returned text at the end of each terminal line.
 
447
     * @param trimTrailingSpaces Specifies whether trailing spaces should be
 
448
     * trimmed in the returned text.
447
449
     */
448
 
    QString selectedText(bool preserveLineBreaks) const;
 
450
    QString selectedText(bool preserveLineBreaks, bool trimTrailingSpaces = false) const;
449
451
 
450
452
    /**
451
453
     * Convenience method.  Returns the text from @p startIndex to @p endIndex.
452
454
     * @param preserveLineBreaks Specifies whether new line characters should
453
455
     * be inserted into the returned text at the end of each terminal line.
 
456
     * @param trimTrailingSpaces Specifies whether trailing spaces should be
 
457
     * trimmed in the returned text.
454
458
     */
455
 
    QString text(int startIndex, int endIndex, bool preserveLineBreaks) const;
 
459
    QString text(int startIndex, int endIndex, bool preserveLineBreaks, bool trimTrailingSpaces = false) const;
456
460
 
457
461
    /**
458
462
     * Copies part of the output to a stream.
470
474
     * @param decoder A decoder which converts terminal characters into text.
471
475
     * PlainTextDecoder is the most commonly used decoder which converts characters
472
476
     * into plain text with no formatting.
473
 
     * @param preserveLineBreaks Specifies whether new line characters should
474
 
     * be inserted into the returned text at the end of each terminal line.
 
477
     * @param trimTrailingSpaces Specifies whether trailing spaces should be
 
478
     * trimmed in the returned text.
475
479
     */
476
480
    void writeSelectionToStream(TerminalCharacterDecoder* decoder , bool
477
 
                                preserveLineBreaks = true) const;
 
481
                                preserveLineBreaks = true,
 
482
                                bool trimTrailingSpaces = false) const;
478
483
 
479
484
    /**
480
485
     * Checks if the text between from and to is inside the current
593
598
                          int count,
594
599
                          TerminalCharacterDecoder* decoder,
595
600
                          bool appendNewLine,
596
 
                          bool preserveLineBreaks) const;
 
601
                          bool preserveLineBreaks,
 
602
                          bool trimTrailingSpaces) const;
597
603
 
598
604
    //fills a section of the screen image with the character 'c'
599
605
    //the parameters are specified as offsets from the start of the screen image.
625
631
    // copies text from 'startIndex' to 'endIndex' to a stream
626
632
    // startIndex and endIndex are positions generated using the loc(x,y) macro
627
633
    void writeToStream(TerminalCharacterDecoder* decoder, int startIndex,
628
 
                       int endIndex, bool preserveLineBreaks = true) const;
 
634
                       int endIndex, bool preserveLineBreaks = true, bool trimTrailingSpaces = false) const;
629
635
    // copies 'count' lines from the screen buffer into 'dest',
630
636
    // starting from 'startLine', where 0 is the first line in the screen buffer
631
637
    void copyFromScreen(Character* dest, int startLine, int count) const;