~ubuntu-branches/ubuntu/precise/konsole/precise-proposed

« back to all changes in this revision

Viewing changes to src/ScreenWindow.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-16 13:14:43 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: package-import@ubuntu.com-20111216131443-rhdplbmmuxntat3k
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
// Own
21
21
#include "ScreenWindow.h"
22
22
 
23
 
// Qt
 
23
// KDE
24
24
#include <KDebug>
25
25
 
26
26
// Konsole
69
69
 
70
70
     if (!_bufferNeedsUpdate)
71
71
        return _windowBuffer;
72
 
 
 
72
 
73
73
    _screen->getImage(_windowBuffer,size,
74
74
                      currentLine(),endWindowLine());
75
75
 
108
108
QVector<LineProperty> ScreenWindow::getLineProperties()
109
109
{
110
110
    QVector<LineProperty> result = _screen->getLineProperties(currentLine(),endWindowLine());
111
 
    
 
111
 
112
112
    if (result.count() != windowLines())
113
113
        result.resize(windowLines());
114
114
 
133
133
void ScreenWindow::setSelectionStart( int column , int line , bool columnMode )
134
134
{
135
135
    _screen->setSelectionStart( column , qMin(line + currentLine(),endWindowLine())  , columnMode);
136
 
    
 
136
 
137
137
    _bufferNeedsUpdate = true;
138
138
    emit selectionChanged();
139
139
}
146
146
    emit selectionChanged();
147
147
}
148
148
 
 
149
void ScreenWindow::setSelectionByLineRange(int start, int end)
 
150
{
 
151
    clearSelection();
 
152
 
 
153
    _screen->setSelectionStart( 0 , start , false);
 
154
    _screen->setSelectionEnd( windowColumns() , end );
 
155
 
 
156
    _bufferNeedsUpdate = true;
 
157
    emit selectionChanged();
 
158
}
 
159
 
149
160
bool ScreenWindow::isSelected( int column , int line )
150
161
{
151
162
    return _screen->isSelected( column , qMin(line + currentLine(),endWindowLine()) );
186
197
QPoint ScreenWindow::cursorPosition() const
187
198
{
188
199
    QPoint position;
189
 
    
 
200
 
190
201
    position.setX( _screen->getCursorX() );
191
202
    position.setY( _screen->getCursorY() );
192
203