Warning, file /graphics/tikzkit/src/ui/arrows/StealthTickArrow.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* This file is part of the TikZKit project. 0002 * 0003 * Copyright (C) 2013-2014 Dominik Haumann <dhaumann@kde.org> 0004 * 0005 * This library is free software; you can redistribute it and/or modify 0006 * it under the terms of the GNU Library General Public License as published 0007 * by the Free Software Foundation, either version 2 of the License, or 0008 * (at your option) any later version. 0009 * 0010 * This library is distributed in the hope that it will be useful, 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0013 * GNU Library General Public License for more details. 0014 * 0015 * You should have received a copy of the GNU Library General Public License 0016 * along with this library; see the file COPYING.LIB. If not, see 0017 * <http://www.gnu.org/licenses/>. 0018 */ 0019 0020 #ifndef TIKZ_UI_STEALTH_TICK_ARROW_H 0021 #define TIKZ_UI_STEALTH_TICK_ARROW_H 0022 0023 #include "AbstractArrow.h" 0024 0025 class StealthTickArrowPrivate; 0026 0027 class StealthTickArrow : public AbstractArrow 0028 { 0029 public: 0030 StealthTickArrow(tikz::core::Style* style); 0031 virtual ~StealthTickArrow(); 0032 0033 // 0034 // Arrow properties 0035 // 0036 public: 0037 /** 0038 * Returns the type of this arrow. 0039 */ 0040 tikz::Arrow type() const override; 0041 0042 /** 0043 * Gui visible name, such as "to" or "stealth". 0044 * The string should be translated. 0045 */ 0046 QString name() const override; 0047 0048 /** 0049 * The 'left extend' value defines the extent of the arrow to the left, 0050 * beginning at the arrow tip. This value is only only important when 0051 * when an arrow is being reversed or composed with other arrow tips. 0052 */ 0053 qreal leftExtend() const override; 0054 0055 /** 0056 * The line is shortened by the amount of 'right extend' on the right. 0057 * This is often equal to half of the line width. 0058 */ 0059 qreal rightExtend() const override; 0060 0061 /** 0062 * Draw the arrow. 0063 */ 0064 void draw(QPainter* painter) const override; 0065 0066 /** 0067 * Returns the painter path of this arrow. 0068 * This path is lated used for bounding box creation and mouse interaction. 0069 */ 0070 QPainterPath path() const override; 0071 0072 private: 0073 StealthTickArrowPrivate * const d; 0074 }; 0075 0076 class ReversedStealthTickArrow : public StealthTickArrow 0077 { 0078 public: 0079 ReversedStealthTickArrow(tikz::core::Style * style); 0080 0081 public: 0082 tikz::Arrow type() const override; 0083 QString name() const override; 0084 0085 qreal leftExtend() const override; 0086 qreal rightExtend() const override; 0087 0088 // not needed to reimplement draw() 0089 //virtual void draw(QPainter* painter) const; 0090 QPainterPath path() const override; 0091 }; 0092 0093 #endif // TIKZ_UI_STEALTH_TICK_ARROW_H 0094 0095 // kate: indent-width 4; replace-tabs on;