30 #ifndef SELECTION_MOVE_RESIZER_H 31 #define SELECTION_MOVE_RESIZER_H 118 void add(QWidget *target);
199 #endif // ifndef SELECTION_MOVE_RESIZER_H Definition: SelectionMoveResizer.h:132
QPoint d_op_dp
Difference between current and start position during operation.
Definition: SelectionMoveResizer.h:192
void alignTargetsRight()
Definition: SelectionMoveResizer.cpp:201
Definition: SelectionMoveResizer.h:132
int removeAll(ArrowMarker *target)
Remove target from the list of items to be moved/resized together and returns the number of occurence...
Definition: SelectionMoveResizer.cpp:141
bool contains(ArrowMarker *m) const
Returns true if m is one of targets, false else.
Definition: SelectionMoveResizer.h:107
void removeWidget(QObject *w)
A non-typesafe version of remvoveAll(QWidget*) needed for QObject::destroyed().
Definition: SelectionMoveResizer.h:196
Definition: SelectionMoveResizer.h:132
Definition: SelectionMoveResizer.h:132
QList< QWidget * > widgetsList() const
Definition: SelectionMoveResizer.h:105
QRect boundingRectOf(QwtPlotMarker *target) const
Get the bounding rectangle of a marker in paint coordinates.
Definition: SelectionMoveResizer.cpp:128
Definition: SelectionMoveResizer.h:132
Draws lines and arrows on a QwtPlot.
Definition: ArrowMarker.h:43
static const QRect handlerRect(QRect rect, Operation op)
Return one of the rectangles to be filled for starting resize operations.
Definition: SelectionMoveResizer.cpp:302
virtual void mouseDoubleClickEvent(QMouseEvent *e)
Ignore double-clicks so that they can be used by my parent.
Definition: SelectionMoveResizer.cpp:527
virtual void mouseReleaseEvent(QMouseEvent *e)
Mouse releases end the current operation and apply it to the targets.
Definition: SelectionMoveResizer.cpp:553
virtual void mouseMoveEvent(QMouseEvent *e)
Mouse movements need to be monitored for updating the frame during operation.
Definition: SelectionMoveResizer.cpp:501
void alignTargetsLeft()
Definition: SelectionMoveResizer.cpp:178
Definition: SelectionMoveResizer.h:132
virtual void paintEvent(QPaintEvent *e)
Draw frame and resize handlers.
Definition: SelectionMoveResizer.cpp:434
void raiseTargets(bool on=true)
Definition: SelectionMoveResizer.cpp:166
void add(ArrowMarker *target)
Add target to the list of items to be moved/resized together.
Definition: SelectionMoveResizer.cpp:92
Operation
Available modes of operation.
Definition: SelectionMoveResizer.h:132
Handler for modifying one or more QWidget and/or QwtPlotMarker with mouse or keyboard.
Definition: SelectionMoveResizer.h:89
static const int handler_size
Size of resize handle in pixels.
Definition: SelectionMoveResizer.h:167
virtual bool eventFilter(QObject *o, QEvent *e)
React on geometry changes of parent and targets.
Definition: SelectionMoveResizer.cpp:635
void targetsChanged()
Emitted when the targets are modified (moved or resized).
QList< ArrowMarker * > d_line_markers
Target markers I'm handling.
Definition: SelectionMoveResizer.h:182
QRect operateOn(const QRect in)
Apply operation specified by d_op and d_op_dp to in.
Definition: SelectionMoveResizer.cpp:334
void operateOnTargets()
Apply operation specified by d_op and d_op_dp to all targets.
Definition: SelectionMoveResizer.cpp:384
QRect d_bounding_rect
Bounding rectangle of all targets taken together, in drawing coordinates.
Definition: SelectionMoveResizer.h:186
SelectionMoveResizer(ArrowMarker *target)
Construct a new MoveResizer with the given marker as the only target.
Definition: SelectionMoveResizer.cpp:44
bool contains(QWidget *w) const
Returns true if w is one of targets, false else.
Definition: SelectionMoveResizer.h:104
virtual void keyPressEvent(QKeyEvent *e)
Allow keyboard-based moving of the selection.
Definition: SelectionMoveResizer.cpp:564
Definition: SelectionMoveResizer.h:132
~SelectionMoveResizer()
Clean up after myself.
Definition: SelectionMoveResizer.cpp:78
Definition: SelectionMoveResizer.h:132
void init()
The initialization part common to all constructors.
Definition: SelectionMoveResizer.cpp:62
QPoint d_op_start
Mouse position where an operation started; (-1,-1) means started by keyboard.
Definition: SelectionMoveResizer.h:190
QList< QWidget * > d_widgets
Target widgets I'm handling.
Definition: SelectionMoveResizer.h:184
void recalcBoundingRect()
Calculate d_bounding_rect based on the bounding rectangles of all targets.
Definition: SelectionMoveResizer.cpp:276
Definition: SelectionMoveResizer.h:132
void alignTargetsBottom()
Definition: SelectionMoveResizer.cpp:250
virtual void mousePressEvent(QMouseEvent *e)
Mouse button presses start move/resize operations.
Definition: SelectionMoveResizer.cpp:453
void alignTargetsTop()
Definition: SelectionMoveResizer.cpp:227
Operation d_op
The type of operation currently in progress.
Definition: SelectionMoveResizer.h:188
Definition: SelectionMoveResizer.h:132