File indexing completed on 2024-05-12 04:21:25
0001 0002 // REFACTOR: Rename to kpAbstractFlowImageTool, and use kpImage instead of QPixmap 0003 0004 /* 0005 Copyright (c) 2003-2007 Clarence Dang <dang@kde.org> 0006 All rights reserved. 0007 0008 Redistribution and use in source and binary forms, with or without 0009 modification, are permitted provided that the following conditions 0010 are met: 0011 0012 1. Redistributions of source code must retain the above copyright 0013 notice, this list of conditions and the following disclaimer. 0014 2. Redistributions in binary form must reproduce the above copyright 0015 notice, this list of conditions and the following disclaimer in the 0016 documentation and/or other materials provided with the distribution. 0017 0018 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 0019 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 0020 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 0021 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 0022 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 0023 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0024 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0025 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0026 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0027 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0028 */ 0029 0030 0031 #ifndef KP_TOOL_FLOW_PIXMAP_BASE_H 0032 #define KP_TOOL_FLOW_PIXMAP_BASE_H 0033 0034 0035 #include "kpToolFlowBase.h" 0036 0037 0038 /** 0039 * @short Abstract base call for all continuous tools that draw pixmaps 0040 * (e.g. Brush, Eraser). 0041 * 0042 * @author Clarence Dang <dang@kde.org> 0043 */ 0044 class kpToolFlowPixmapBase : public kpToolFlowBase 0045 { 0046 Q_OBJECT 0047 0048 public: 0049 kpToolFlowPixmapBase (const QString &text, const QString &description, 0050 int key, 0051 kpToolEnvironment *environ, QObject *parent, const QString &name); 0052 0053 protected: 0054 QRect drawLine (const QPoint &thisPoint, const QPoint &lastPoint) override; 0055 }; 0056 0057 0058 #endif // KP_TOOL_FLOW_PIXMAP_BASE_H