• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • gui
  • controller
mousenavigator.cpp
Go to the documentation of this file.
1 /*
2  This file is part of the Okteta Gui library, made within the KDE community.
3 
4  Copyright 2008-2009 Friedrich W. H. Kossebau <kossebau@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #include "mousenavigator.h"
24 
25 // lib
26 #include <abstractbytearrayview.h>
27 #include <bytearraytableranges.h>
28 #include <bytearraytablecursor.h>
29 #include <bytearraytablelayout.h>
30 #include <wordbytearrayservice.h>
31 // Qt
32 #include <QtGui/QApplication>
33 #include <QtGui/QClipboard>
34 #include <QtGui/QMouseEvent>
35 #include <QtCore/QTimer>
36 
37 #include <KDebug>
38 namespace Okteta
39 {
40 static const int DefaultScrollTimerPeriod = 100;
41 
42 
43 MouseNavigator::MouseNavigator( AbstractByteArrayView* view, AbstractMouseController* parent )
44  : AbstractMouseController( view, parent ),
45  mLMBPressed( false ),
46  mInLMBDoubleClick( false ),
47  mInDnD( false ),
48  mDragStartPossible( false )
49 {
50  mScrollTimer = new QTimer( this );
51  mDragStartTimer = new QTimer( this );
52  mTrippleClickTimer = new QTimer( this );
53 
54  connect( mScrollTimer, SIGNAL(timeout()), SLOT(autoScrollTimerDone()) );
55  connect( mDragStartTimer, SIGNAL(timeout()), SLOT(startDrag()) );
56  mDragStartTimer->setSingleShot( true );
57  mTrippleClickTimer->setSingleShot( true );
58 }
59 
60 bool MouseNavigator::handleMousePressEvent( QMouseEvent* mouseEvent )
61 {
62  bool eventUsed = false;
63 
64  if( mouseEvent->button() == Qt::LeftButton )
65  {
66  ByteArrayTableCursor* tableCursor = mView->tableCursor();
67  ByteArrayTableRanges* tableRanges = mView->tableRanges();
68  ByteArrayTableLayout* tableLayout = mView->layout();
69 
70  const bool oldHasSelection = tableRanges->hasSelection();
71 
72  mView->pauseCursor();
73  mView->finishByteEdit();
74 
75  mLMBPressed = true;
76 
77  // select whole line?
78  if( mTrippleClickTimer->isActive()
79  && (mouseEvent->globalPos()-mDoubleClickPoint).manhattanLength() < QApplication::startDragDistance() )
80  {
81  mTrippleClickTimer->stop();
82  const Address indexAtFirstDoubleClickLinePosition = tableLayout->indexAtFirstLinePosition( mDoubleClickLine );
83  tableRanges->setSelectionStart( indexAtFirstDoubleClickLinePosition );
84  tableCursor->gotoIndex( indexAtFirstDoubleClickLinePosition );
85  tableCursor->gotoLineEnd();
86  tableRanges->setSelectionEnd( mView->cursorPosition() );
87  mView->updateChanged();
88 
89  mView->unpauseCursor();
90 
91  const bool newHasSelection = tableRanges->hasSelection();
92  emit mView->cursorPositionChanged( mView->cursorPosition() );
93  emit mView->selectionChanged( tableRanges->selection() );
94  if( oldHasSelection != newHasSelection )
95  {
96  if( ! mView->isOverwriteMode() ) emit mView->cutAvailable( newHasSelection );
97  emit mView->copyAvailable( newHasSelection );
98  emit mView->hasSelectedDataChanged( newHasSelection );
99  }
100  }
101  else
102  {
103  // TODO: pos() is now, not at the moment of the event, use globalPos() for that,.says dox
104  const QPoint mousePoint = mView->viewportToColumns( mouseEvent->pos() );
105 
106  // start of a drag perhaps?
107  if( tableRanges->hasSelection() && tableRanges->selectionIncludes(mView->indexByPoint( mousePoint )) )
108  {
109  mDragStartPossible = true;
110  mDragStartTimer->start( QApplication::startDragTime() );
111  mDragStartPoint = mousePoint;
112  }
113  else
114  {
115  mView->placeCursor( mousePoint );
116  mView->ensureCursorVisible();
117 
118  const Address realIndex = tableCursor->realIndex();
119  if( tableRanges->selectionStarted() )
120  {
121  if( mouseEvent->modifiers() & Qt::SHIFT )
122  tableRanges->setSelectionEnd( realIndex );
123  else
124  {
125  tableRanges->removeSelection();
126  tableRanges->setSelectionStart( realIndex );
127  }
128  }
129  else // start of a new selection possible
130  {
131  tableRanges->setSelectionStart( realIndex );
132 
133  if( !mView->isReadOnly() && (mouseEvent->modifiers()&Qt::SHIFT) ) // TODO: why only for readwrite?
134  tableRanges->setSelectionEnd( realIndex );
135  }
136 
137  tableRanges->removeFurtherSelections();
138  }
139 
140  if( tableRanges->isModified() )
141  {
142  mView->updateChanged();
143  mView->viewport()->setCursor( mView->isReadOnly() ? Qt::ArrowCursor : Qt::IBeamCursor );
144  }
145 
146  mView->unpauseCursor();
147 
148  const bool newHasSelection = tableRanges->hasSelection();
149  emit mView->selectionChanged( tableRanges->selection() );
150  if( oldHasSelection != newHasSelection )
151  {
152  if( ! mView->isOverwriteMode() ) emit mView->cutAvailable( newHasSelection );
153  emit mView->copyAvailable( newHasSelection );
154  emit mView->hasSelectedDataChanged( newHasSelection );
155  }
156  }
157  eventUsed = true;
158  }
159 
160  return eventUsed ? true : AbstractMouseController::handleMousePressEvent( mouseEvent );
161 }
162 
163 bool MouseNavigator::handleMouseMoveEvent( QMouseEvent* mouseEvent )
164 {
165  bool eventUsed = false;
166 
167  if( mouseEvent->buttons() == Qt::LeftButton )
168  {
169  const QPoint movePoint = mView->viewportToColumns( mouseEvent->pos() );
170 
171  if( mLMBPressed )
172  {
173  if( mDragStartPossible )
174  {
175  mDragStartTimer->stop();
176  // moved enough for a drag?
177  if( (movePoint-mDragStartPoint).manhattanLength() > QApplication::startDragDistance() )
178  startDrag();
179  if( ! mView->isReadOnly() )
180  mView->viewport()->setCursor( Qt::IBeamCursor );
181  }
182  else
183  // selecting
184  handleMouseMove( movePoint );
185  }
186  else if( ! mView->isReadOnly() )
187  {
188  ByteArrayTableRanges* tableRanges = mView->tableRanges();
189 
190  // visual feedback for possible dragging
191  const bool InSelection =
192  tableRanges->hasSelection() && tableRanges->selectionIncludes( mView->indexByPoint(movePoint) );
193  mView->viewport()->setCursor( InSelection ? Qt::ArrowCursor : Qt::IBeamCursor );
194  }
195  eventUsed = true;
196  }
197 
198  return eventUsed ? true : AbstractMouseController::handleMouseMoveEvent( mouseEvent );
199 }
200 
201 bool MouseNavigator::handleMouseReleaseEvent( QMouseEvent* mouseEvent )
202 {
203  bool eventUsed = false;
204 
205  if( mouseEvent->button() == Qt::LeftButton )
206  {
207  ByteArrayTableRanges* tableRanges = mView->tableRanges();
208 
209  const bool oldHasSelection = tableRanges->hasSelection();
210 // const QPoint releasePoint = mView->viewportToColumns( mouseEvent->pos() );
211 
212  // this is not the release of a doubleclick so we need to process it?
213  if( ! mInLMBDoubleClick )
214  {
215 // const int line = mView->lineAt( releasePoint.y() );
216 // const int pos = mActiveColumn->linePositionOfX( releasePoint.x() ); // TODO: can we be sure here about the active column?
217 // const Address index = tableLayout->indexAtCCoord( Coord(pos,line) ); // TODO: can this be another index than the one of the cursor???
218 // emit mView->clicked( index ); // TODO: who needs this?
219  }
220 
221  if( mLMBPressed )
222  {
223  mLMBPressed = false;
224 
225  if( mScrollTimer->isActive() )
226  mScrollTimer->stop();
227 
228  // was only click inside selection, nothing dragged?
229  if( mDragStartPossible )
230  {
231  mView->selectAll( false );
232  mDragStartTimer->stop();
233  mDragStartPossible = false;
234 
235  mView->placeCursor( mDragStartPoint );
236  mView->ensureCursorVisible();
237 
238  mView->unpauseCursor();
239  }
240  // was end of selection operation?
241  else if( tableRanges->hasSelection() )
242  {
243  if( QApplication::clipboard()->supportsSelection() )
244  mView->copyToClipboard( QClipboard::Selection );
245  }
246  }
247 
248  emit mView->cursorPositionChanged( mView->cursorPosition() );
249 
250  mInLMBDoubleClick = false;
251 
252  if( tableRanges->selectionJustStarted() )
253  tableRanges->removeSelection();
254 
255  const bool newHasSelection = tableRanges->hasSelection();
256  emit mView->selectionChanged( tableRanges->selection() );
257  if( oldHasSelection != newHasSelection )
258  {
259  if( ! mView->isOverwriteMode() ) emit mView->cutAvailable( newHasSelection );
260  emit mView->copyAvailable( newHasSelection );
261  emit mView->hasSelectedDataChanged( newHasSelection );
262  }
263  eventUsed = true;
264  }
265 
266  return eventUsed ? true : AbstractMouseController::handleMouseReleaseEvent( mouseEvent );
267 }
268 
269 bool MouseNavigator::handleMouseDoubleClickEvent( QMouseEvent* mouseEvent )
270 {
271  bool eventUsed = false;
272 
273  if( mouseEvent->button() == Qt::LeftButton )
274  {
275  ByteArrayTableCursor* tableCursor = mView->tableCursor();
276 
277  mDoubleClickLine = tableCursor->line();
278 
279  const Address index = tableCursor->validIndex();
280 
281  if( mView->activeCoding() == AbstractByteArrayView::CharCodingId )
282  {
283  mView->selectWord( index );
284 
285  // as we already have a doubleclick maybe it is a tripple click
286  mTrippleClickTimer->start( qApp->doubleClickInterval() );
287  mDoubleClickPoint = mouseEvent->globalPos();
288  }
289  // else
290  // mValueEditor->goInsideByte(); TODO: make this possible again
291 
292  mInLMBDoubleClick = true; //
293  mLMBPressed = true;
294 
295  emit mView->doubleClicked( index );
296  eventUsed = true;
297  }
298 
299  return eventUsed ? true : AbstractMouseController::handleMouseDoubleClickEvent( mouseEvent );
300 }
301 
302 
303 void MouseNavigator::autoScrollTimerDone()
304 {
305  if( mLMBPressed )
306  handleMouseMove( mView->viewportToColumns(mView->viewport()->mapFromGlobal( QCursor::pos() )) );
307 }
308 
309 
310 void MouseNavigator::handleMouseMove( const QPoint& point ) // handles the move of the mouse with pressed buttons
311 {
312  ByteArrayTableCursor* tableCursor = mView->tableCursor();
313  ByteArrayTableRanges* tableRanges = mView->tableRanges();
314 
315  const bool oldHasSelection = tableRanges->hasSelection();
316  const int yOffset = mView->yOffset();
317  const int behindLastYOffset = yOffset + mView->visibleHeight();
318  // scrolltimer but inside of viewport?
319  if( mScrollTimer->isActive() )
320  {
321  if( yOffset <= point.y() && point.y() < behindLastYOffset )
322  mScrollTimer->stop();
323  }
324  // no scrolltimer and outside of viewport?
325  else
326  {
327  if( point.y() < yOffset || behindLastYOffset <= point.y() )
328  mScrollTimer->start( DefaultScrollTimerPeriod );
329  }
330  mView->pauseCursor();
331 
332  mView->placeCursor( point );
333  mView->ensureCursorVisible();
334 
335  // do wordwise selection?
336  if( mInLMBDoubleClick && tableRanges->hasFirstWordSelection() )
337  {
338  Address newIndex = tableCursor->realIndex();
339  const AddressRange firstWordSelection = tableRanges->firstWordSelection();
340  const WordByteArrayService WBS( mView->byteArrayModel(), mView->charCodec() );
341  // are we before the selection?
342  if( firstWordSelection.startsBehind(newIndex) )
343  {
344  tableRanges->ensureWordSelectionForward( false );
345  newIndex = WBS.indexOfLeftWordSelect( newIndex );
346  }
347  // or behind?
348  else if( firstWordSelection.endsBefore(newIndex) )
349  {
350  tableRanges->ensureWordSelectionForward( true );
351  newIndex = WBS.indexOfRightWordSelect( newIndex );
352  }
353  // or inside?
354  else
355  {
356  tableRanges->ensureWordSelectionForward( true );
357  newIndex = firstWordSelection.nextBehindEnd();
358  }
359 
360  tableCursor->gotoIndex( newIndex );
361  }
362 
363  if( tableRanges->selectionStarted() )
364  tableRanges->setSelectionEnd( mView->cursorPosition() );
365 
366  mView->updateChanged();
367 
368  mView->unpauseCursor();
369 
370  const bool newHasSelection = tableRanges->hasSelection();
371  emit mView->cursorPositionChanged( mView->cursorPosition() );
372  emit mView->selectionChanged( tableRanges->selection() );
373  if( oldHasSelection != newHasSelection )
374  {
375  if( ! mView->isOverwriteMode() ) emit mView->cutAvailable( newHasSelection );
376  emit mView->copyAvailable( newHasSelection );
377  emit mView->hasSelectedDataChanged( newHasSelection );
378  }
379 }
380 
381 
382 void MouseNavigator::startDrag()
383 {
384  // reset states
385  mLMBPressed = false;
386  mInLMBDoubleClick = false;
387  mDragStartPossible = false;
388 
389  // create data
390  QMimeData* dragData = mView->selectionAsMimeData();
391  if( ! dragData )
392  return;
393 
394  QDrag* drag = new QDrag( mView );
395  drag->setMimeData( dragData );
396 
397  Qt::DropActions request = (mView->isReadOnly()||mView->isOverwriteMode()) ? Qt::CopyAction : Qt::CopyAction|Qt::MoveAction;
398  Qt::DropAction dropAction = drag->exec( request );
399 
400  if( dropAction == Qt::MoveAction )
401  {
402  AbstractByteArrayView* targetByteArrayView = qobject_cast<AbstractByteArrayView*>( drag->target() );
403  // Not inside this widget itself?
404  if( ! targetByteArrayView
405  || targetByteArrayView->byteArrayModel() != mView->byteArrayModel() )
406  mView->removeSelectedData();
407  }
408 }
409 
410 
411 MouseNavigator::~MouseNavigator() {}
412 
413 }
Okteta::MouseNavigator::MouseNavigator
MouseNavigator(AbstractByteArrayView *view, AbstractMouseController *parent)
Definition: mousenavigator.cpp:43
Okteta::MouseNavigator::handleMouseMove
void handleMouseMove(const QPoint &point)
handles the move of the mouse with pressed buttons
Definition: mousenavigator.cpp:310
wordbytearrayservice.h
Okteta::AbstractByteArrayView::tableCursor
ByteArrayTableCursor * tableCursor() const
Definition: abstractbytearrayview.cpp:106
Okteta::Address
qint32 Address
Definition: address.h:34
Okteta::ByteArrayTableRanges::ensureWordSelectionForward
void ensureWordSelectionForward(bool Forward)
Definition: bytearraytableranges.cpp:300
Okteta::AbstractByteArrayView::removeSelectedData
void removeSelectedData()
removes the selected data, takes care of the cursor
Definition: abstractbytearrayview.cpp:226
Okteta::MouseNavigator::handleMouseReleaseEvent
virtual bool handleMouseReleaseEvent(QMouseEvent *mouseEvent)
Definition: mousenavigator.cpp:201
Okteta::AbstractByteArrayView::selectionAsMimeData
QMimeData * selectionAsMimeData() const
Definition: abstractbytearrayview.cpp:177
Okteta::ByteArrayTableRanges
a class to control all the ranges like marking and selections holds also all modified ranges and merg...
Definition: bytearraytableranges.h:45
Okteta::ByteArrayTableRanges::firstWordSelection
AddressRange firstWordSelection() const
Definition: bytearraytableranges.h:130
Okteta::ByteArrayTableCursor::gotoLineEnd
void gotoLineEnd()
Definition: bytearraytablecursor.cpp:182
Okteta::ColumnsView::visibleHeight
PixelY visibleHeight() const
Definition: columnsview.cpp:115
Okteta::ColumnsView::viewportToColumns
QPoint viewportToColumns(const QPoint &point) const
translates the point to coordinates in the columns
Definition: columnsview.cpp:120
Okteta::AbstractByteArrayView::updateChanged
void updateChanged()
Definition: abstractbytearrayview.cpp:505
KDE::NumberRange::nextBehindEnd
N nextBehindEnd() const
Definition: numberrange.h:145
KDE::NumberRange< Address, Size >
abstractbytearrayview.h
Okteta::AbstractMouseController::handleMousePressEvent
virtual bool handleMousePressEvent(QMouseEvent *mouseEvent)
Definition: abstractmousecontroller.cpp:35
Okteta::AbstractByteArrayView::cursorPosition
Address cursorPosition() const
returns the index of the cursor position
Definition: abstractbytearrayview.cpp:133
Okteta::AbstractByteArrayView::isReadOnly
bool isReadOnly() const
Definition: abstractbytearrayview.cpp:59
Okteta::ByteArrayTableRanges::selectionIncludes
bool selectionIncludes(Address index) const
Definition: bytearraytableranges.h:141
Okteta::AbstractByteArrayView
Definition: abstractbytearrayview.h:55
Okteta::AbstractByteArrayView::activeCoding
CodingTypeId activeCoding() const
Definition: abstractbytearrayview.cpp:297
Okteta::AbstractByteArrayView::isOverwriteMode
bool isOverwriteMode() const
Definition: abstractbytearrayview.cpp:49
Okteta::AbstractByteArrayView::cutAvailable
void cutAvailable(bool Really)
there is a cut available or not
Okteta::AbstractMouseController::handleMouseMoveEvent
virtual bool handleMouseMoveEvent(QMouseEvent *mouseEvent)
Definition: abstractmousecontroller.cpp:39
Okteta::MouseNavigator::handleMouseDoubleClickEvent
virtual bool handleMouseDoubleClickEvent(QMouseEvent *mouseEvent)
Definition: mousenavigator.cpp:269
Okteta::AbstractByteArrayView::copyAvailable
void copyAvailable(bool Really)
there is a copy available or not
bytearraytablelayout.h
Okteta::ByteArrayTableLayout
the logical layout of a byte array table for a view
Definition: bytearraytablelayout.h:61
Okteta::MouseNavigator::mDoubleClickPoint
QPoint mDoubleClickPoint
point at which the current double click happended (used by TrippleClick)
Definition: mousenavigator.h:75
Okteta::ByteArrayTableRanges::selectionJustStarted
bool selectionJustStarted() const
Definition: bytearraytableranges.h:138
Okteta::ByteArrayTableCursor::gotoIndex
void gotoIndex(Address index)
Definition: bytearraytablecursor.cpp:260
Okteta::MouseNavigator::autoScrollTimerDone
void autoScrollTimerDone()
gets called by the scroll timer (for mouse selection)
Definition: mousenavigator.cpp:303
Okteta::MouseNavigator::mDragStartPossible
bool mDragStartPossible
flag if a drag might have started
Definition: mousenavigator.h:89
Okteta::ByteArrayTableRanges::hasSelection
bool hasSelection() const
Definition: bytearraytableranges.h:136
Okteta::AbstractByteArrayView::indexByPoint
Address indexByPoint(const QPoint &point) const
detects the index of the byte at the given point
Definition: abstractbytearrayview.cpp:480
Okteta::ByteArrayTableRanges::removeFurtherSelections
void removeFurtherSelections()
removes all but the standard selection and returns true if something changed
Definition: bytearraytableranges.cpp:67
Okteta::MouseNavigator::mDragStartPoint
QPoint mDragStartPoint
point at which the current dragging started
Definition: mousenavigator.h:79
Okteta::AbstractMouseController::handleMouseReleaseEvent
virtual bool handleMouseReleaseEvent(QMouseEvent *mouseEvent)
Definition: abstractmousecontroller.cpp:43
Okteta::AbstractMouseController::mView
AbstractByteArrayView * mView
Definition: abstractmousecontroller.h:48
Okteta::AbstractByteArrayView::byteArrayModel
Okteta::AbstractByteArrayModel * byteArrayModel() const
Definition: abstractbytearrayview.cpp:44
Okteta::ByteArrayTableCursor::validIndex
Address validIndex() const
returns the true index if it is valid index that is it is inside the data's range.
Definition: bytearraytablecursor.cpp:329
Okteta::ByteArrayTableRanges::setSelectionStart
void setSelectionStart(Address startIndex)
Definition: bytearraytableranges.cpp:83
Okteta::AbstractByteArrayView::pauseCursor
void pauseCursor()
simply pauses any blinking, i.e.
Definition: abstractbytearrayview.cpp:421
Okteta::AbstractByteArrayView::cursorPositionChanged
void cursorPositionChanged(Okteta::Address index)
Okteta::MouseNavigator::startDrag
void startDrag()
Definition: mousenavigator.cpp:382
Okteta::AbstractMouseController
Definition: abstractmousecontroller.h:33
Okteta::AbstractByteArrayView::copyToClipboard
void copyToClipboard(QClipboard::Mode mode) const
Definition: abstractbytearrayview.cpp:511
Okteta::MouseNavigator::mLMBPressed
bool mLMBPressed
flag if the left mouse button is pressed
Definition: mousenavigator.h:83
Okteta::WordByteArrayService
Definition: wordbytearrayservice.h:44
Okteta::AbstractByteArrayView::finishByteEdit
void finishByteEdit()
Definition: abstractbytearrayview.cpp:487
Okteta::ByteArrayTableCursor
navigates through the buffer in an abstract way, based on the layout
Definition: bytearraytablecursor.h:60
Okteta::AbstractByteArrayView::layout
ByteArrayTableLayout * layout() const
Definition: abstractbytearrayview.cpp:75
Okteta::ColumnsView::yOffset
PixelY yOffset() const
Definition: columnsview.cpp:127
Okteta::MouseNavigator::mDragStartTimer
QTimer * mDragStartTimer
Timer to start a drag.
Definition: mousenavigator.h:69
Okteta::MouseNavigator::handleMouseMoveEvent
virtual bool handleMouseMoveEvent(QMouseEvent *mouseEvent)
Definition: mousenavigator.cpp:163
Okteta::AbstractByteArrayView::selectWord
bool selectWord(Address index)
selects word at index, returns true if there is one
Definition: abstractbytearrayview.cpp:339
Okteta::ByteArrayTableRanges::selection
AddressRange selection() const
Definition: bytearraytableranges.h:129
Okteta::AbstractByteArrayView::CharCodingId
Definition: abstractbytearrayview.h:103
Okteta::MouseNavigator::~MouseNavigator
virtual ~MouseNavigator()
Definition: mousenavigator.cpp:411
mousenavigator.h
Okteta::DefaultScrollTimerPeriod
static const int DefaultScrollTimerPeriod
Definition: mousenavigator.cpp:40
Okteta::AbstractByteArrayView::selectAll
void selectAll(bool select)
de-/selects all data
Definition: abstractbytearrayview.cpp:333
Okteta::AbstractByteArrayView::unpauseCursor
void unpauseCursor()
undoes pauseCursor
Definition: abstractbytearrayview.cpp:409
Okteta::AbstractByteArrayView::tableRanges
ByteArrayTableRanges * tableRanges() const
Definition: abstractbytearrayview.cpp:111
Okteta::ByteArrayTableCursor::realIndex
Address realIndex() const
returns the real index.
Definition: bytearraytablecursor.h:175
Okteta::MouseNavigator::mDoubleClickLine
int mDoubleClickLine
line in which the current double click happended (used by TrippleClick)
Definition: mousenavigator.h:77
bytearraytableranges.h
Okteta::AbstractByteArrayView::charCodec
const Okteta::CharCodec * charCodec() const
Definition: abstractbytearrayview.cpp:100
Okteta::MouseNavigator::mInLMBDoubleClick
bool mInLMBDoubleClick
flag if a double click is happening
Definition: mousenavigator.h:85
Okteta::ByteArrayTableLayout::indexAtFirstLinePosition
Address indexAtFirstLinePosition(Line line) const
calculates the index of the first pos in line.
Definition: bytearraytablelayout.cpp:201
KDE::Range::endsBefore
bool endsBefore(T Value) const
returns true if range is before index.
Definition: range.h:103
Okteta::ByteArrayTableRanges::selectionStarted
bool selectionStarted() const
Definition: bytearraytableranges.h:137
Okteta::ByteArrayTableRanges::setSelectionEnd
void setSelectionEnd(Address startIndex)
Definition: bytearraytableranges.cpp:93
Okteta::AbstractMouseController::handleMouseDoubleClickEvent
virtual bool handleMouseDoubleClickEvent(QMouseEvent *mouseEvent)
Definition: abstractmousecontroller.cpp:47
Okteta::ByteArrayTableRanges::removeSelection
AddressRange removeSelection(int id=0)
removes selection with id and returns it
Definition: bytearraytableranges.cpp:156
Okteta::ByteArrayTableRanges::hasFirstWordSelection
bool hasFirstWordSelection() const
Definition: bytearraytableranges.h:139
KDE::Range::startsBehind
bool startsBehind(T Value) const
returns true if range is behind index.
Definition: range.h:97
Okteta::AbstractByteArrayView::ensureCursorVisible
void ensureCursorVisible()
scrolls the view as much as needed to have the cursor fully visible
Definition: abstractbytearrayview.cpp:390
Okteta::AbstractByteArrayView::selectionChanged
void selectionChanged(const Okteta::AddressRange &selection)
Okteta::AbstractByteArrayView::placeCursor
void placeCursor(const QPoint &point)
puts the cursor in the column at the pos of Point (in absolute coord), does not handle the drawing ...
Definition: abstractbytearrayview.cpp:396
bytearraytablecursor.h
Okteta::MouseNavigator::mScrollTimer
QTimer * mScrollTimer
Timer that triggers ensureCursorVisible function calls.
Definition: mousenavigator.h:66
Okteta::ByteArrayTableCursor::line
Line line() const
the line of the actual coord
Definition: bytearraytablecursor.h:172
Okteta::ByteArrayTableRanges::isModified
bool isModified() const
Definition: bytearraytableranges.h:133
Okteta::MouseNavigator::mTrippleClickTimer
QTimer * mTrippleClickTimer
timer to measure whether the time between a double click and the following counts for a tripleclick ...
Definition: mousenavigator.h:71
Okteta::AbstractByteArrayView::hasSelectedDataChanged
void hasSelectedDataChanged(bool hasSelectedData)
selection has changed
Okteta::AbstractByteArrayView::doubleClicked
void doubleClicked(Okteta::Address index)
Index of the byte that was double clicked.
Okteta::MouseNavigator::handleMousePressEvent
virtual bool handleMousePressEvent(QMouseEvent *mouseEvent)
Definition: mousenavigator.cpp:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

Skip menu "okteta"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal