use kDebug
[kdegraphics.git] / kolourpaint / tools / kpToolPrivate.h
blob86609c561cf897858b27c6044cdede57ee07c72b
2 /*
3 Copyright (c) 2003-2007 Clarence Dang <dang@kde.org>
4 All rights reserved.
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
10 1. Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
12 2. Redistributions in binary form must reproduce the above copyright
13 notice, this list of conditions and the following disclaimer in the
14 documentation and/or other materials provided with the distribution.
16 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #ifndef kpToolPrivate_H
30 #define kpToolPrivate_H
33 #include <QPoint>
34 #include <QPointer>
36 #include <QSize>
37 #ifdef Q_OS_WIN
38 #include <stdlib.h>
39 #undef environ // macro on win32
40 #endif
42 class kpToolAction;
43 class kpToolEnvironment;
46 struct kpToolPrivate
48 // Initialisation / properties.
49 QString text;
50 QString description;
51 int key;
53 kpToolAction *action;
55 // Drawing state.
56 bool began;
57 bool beganDraw; // set after beginDraw() is called, unset before endDraw() is called
58 int mouseButton; /* 0 = left, 1 = right */
59 bool shiftPressed, controlPressed, altPressed; // m_altPressed is unreliable
60 QPoint startPoint,
61 currentPoint, currentViewPoint,
62 lastPoint;
64 kpView *viewUnderStartPoint;
67 // Set to 2 when the user swaps the foreground and background color.
69 // When nonzero, it suppresses the foreground and background "color changed"
70 // signals and is decremented back down to 0 separately by the foreground
71 // code and background code.
72 int ignoreColorSignals;
74 // Statusbar.
75 QString userMessage;
76 QPoint userShapeStartPoint, userShapeEndPoint;
77 QSize userShapeSize;
79 kpToolEnvironment *environ;
83 #endif // kpToolPrivate_H