kivio
addstenciltool.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef KIVIOADDSTENCILTOOL_H
00020 #define KIVIOADDSTENCILTOOL_H
00021
00022 #include <KoPoint.h>
00023 #include <KoSize.h>
00024
00025 #include "kivio_mousetool.h"
00026
00027 class KivioStencilSpawner;
00028
00029 namespace Kivio {
00030
00034 class AddStencilTool : public MouseTool
00035 {
00036 Q_OBJECT
00037 public:
00038 AddStencilTool(KivioView* parent);
00039 ~AddStencilTool();
00040
00041 virtual bool processEvent(QEvent* e);
00042
00043 public slots:
00044 void setActivated(bool a);
00045 void activateNewStencil(KivioStencilSpawner* spawner);
00046
00047 protected:
00048 void createStencil(const QPoint& position);
00049 void endOperation(const QPoint& position);
00050 void resize(const QPoint& position);
00051
00052 private:
00053 bool m_leftMouseButtonPressed;
00054 KivioStencilSpawner* m_spawner;
00055 KoPoint m_startPoint;
00056 KivioStencil* m_stencil;
00057 KoSize m_originalSize;
00058 };
00059
00060 }
00061
00062 #endif
|