krita
kis_tool_non_paint.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <kdebug.h>
00021
00022 #include "kis_image.h"
00023 #include "kis_canvas_subject.h"
00024 #include "kis_canvas_controller.h"
00025 #include "kis_tool_controller.h"
00026 #include "kis_tool_non_paint.h"
00027
00028 KisToolNonPaint::KisToolNonPaint(const QString & UIName)
00029 : super(UIName)
00030 {
00031 m_subject = 0;
00032 }
00033
00034 KisToolNonPaint::~KisToolNonPaint()
00035 {
00036 }
00037
00038 void KisToolNonPaint::update(KisCanvasSubject *subject)
00039 {
00040 m_subject = subject;
00041 }
00042
00043 void KisToolNonPaint::paint(KisCanvasPainter&)
00044 {
00045 }
00046
00047 void KisToolNonPaint::paint(KisCanvasPainter&, const QRect&)
00048 {
00049 }
00050
00051 void KisToolNonPaint::deactivate()
00052 {
00053 }
00054
00055 void KisToolNonPaint::buttonPress(KisButtonPressEvent *)
00056 {
00057 }
00058
00059 void KisToolNonPaint::move(KisMoveEvent *)
00060 {
00061 }
00062
00063 void KisToolNonPaint::buttonRelease(KisButtonReleaseEvent *)
00064 {
00065 }
00066
00067 void KisToolNonPaint::doubleClick(KisDoubleClickEvent *)
00068 {
00069 }
00070
00071 void KisToolNonPaint::keyPress(QKeyEvent *)
00072 {
00073 }
00074
00075 void KisToolNonPaint::keyRelease(QKeyEvent *)
00076 {
00077 }
00078
00079 QCursor KisToolNonPaint::cursor()
00080 {
00081 return m_cursor;
00082 }
00083
00084 void KisToolNonPaint::setCursor(const QCursor& cursor)
00085 {
00086 m_cursor = cursor;
00087
00088 if (m_subject) {
00089 KisToolControllerInterface *controller = m_subject->toolController();
00090
00091 if (controller && controller->currentTool() == this) {
00092 m_subject->canvasController()->setCanvasCursor(m_cursor);
00093 }
00094 }
00095 }
00096
00097 void KisToolNonPaint::activate()
00098 {
00099 if (m_subject) {
00100 KisToolControllerInterface *controller = m_subject->toolController();
00101
00102 if (controller)
00103 controller->setCurrentTool(this);
00104 }
00105 }
00106
00107 void KisToolNonPaint::notifyModified() const
00108 {
00109 if (m_subject && m_subject->currentImg()) {
00110
00111 m_subject->currentImg()->setModified();
00112 }
00113 }
00114
00115 #include "kis_tool_non_paint.moc"
|