~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to libs/flake/tools/KoShapeRubberSelectStrategy.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
#include "flake_export.h"
30
30
 
31
 
class QPainter;
32
 
class QPointF;
33
 
 
34
 
class KoCanvasBase;
35
 
class KoTool;
36
 
class KoSnapGuide;
 
31
class KoToolBase;
 
32
class KoShapeRubberSelectStrategyPrivate;
37
33
 
38
34
/**
39
35
 * Implement the rubber band selection of flake objects.
47
43
     * from @p clicked to a point later provided in the handleMouseMove() continuously
48
44
     * showing a semi-transarant 'rubber-mat' over the objects it is about to select.
49
45
     * @param tool the parent tool which controls this strategy
50
 
     * @param canvas The canvas that owns the tool for this strategy.
51
46
     * @param clicked the initial point that the user depressed (in pt).
52
47
     * @param useSnapToGrid use the snap-to-grid settings while doing the rubberstamp.
53
48
     */
54
 
    KoShapeRubberSelectStrategy(KoTool *tool, KoCanvasBase *canvas, const QPointF &clicked, bool useSnapToGrid = false);
55
 
    virtual ~KoShapeRubberSelectStrategy();
 
49
    KoShapeRubberSelectStrategy(KoToolBase *tool, const QPointF &clicked, bool useSnapToGrid = false);
56
50
 
57
 
    void paint(QPainter &painter, const KoViewConverter &converter);
58
 
    void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers);
59
 
    virtual QUndoCommand* createCommand() {
60
 
        return 0;
61
 
    }
 
51
    virtual void paint(QPainter &painter, const KoViewConverter &converter);
 
52
    virtual void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers);
 
53
    virtual QUndoCommand *createCommand();
62
54
    virtual void finishInteraction(Qt::KeyboardModifiers modifiers);
63
55
 
64
56
protected:
65
 
    /**
66
 
     * Return the rectangle that the user dragged.
67
 
     * The rectangle is normalized and immutable.
68
 
     * @return a rectangle in pt.
69
 
     */
70
 
    const QRectF selectRect() const;
 
57
    /// constructor
 
58
    KoShapeRubberSelectStrategy(KoShapeRubberSelectStrategyPrivate &);
71
59
 
72
60
private:
73
 
    QRectF m_selectRect;
74
 
    QPointF m_lastPos;
75
 
    KoSnapGuide * m_snapGuide;
 
61
    Q_DECLARE_PRIVATE(KoShapeRubberSelectStrategy)
76
62
};
77
63
 
78
64
#endif /* KODEFRUBBERSELECT_H */