File indexing completed on 2024-05-19 04:36:38
0001 /* This file is part of the TikZKit project. 0002 * 0003 * Copyright (C) 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_SELECT_TOOL_H 0021 #define TIKZ_UI_SELECT_TOOL_H 0022 0023 #include "AbstractTool.h" 0024 0025 namespace tikz { 0026 namespace ui { 0027 0028 /** 0029 * The SelectTool allows to select items and modify them, e.g. 0030 * resize, rotate and move. 0031 */ 0032 class SelectTool : public AbstractTool 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 /** 0038 * Constructor with graphics scene @p scene. 0039 */ 0040 SelectTool(tikz::ui::Document * doc, QGraphicsScene * scene); 0041 0042 /** 0043 * Virtual destructor. 0044 */ 0045 virtual ~SelectTool(); 0046 0047 // 0048 // sub classes: reimplement as needed 0049 // 0050 public: 0051 /** 0052 * This function is called whenever the mouse moves in the graphics 0053 * scene. 0054 */ 0055 void mouseMoveEvent(QGraphicsSceneMouseEvent * event) override; 0056 0057 /** 0058 * This function is called whenever a mouse button is pressed in the 0059 * graphics scene. 0060 */ 0061 void mousePressEvent(QGraphicsSceneMouseEvent * event) override; 0062 0063 /** 0064 * This function is called whenever a mouse button is released in the 0065 * graphics scene. 0066 */ 0067 void mouseReleaseEvent(QGraphicsSceneMouseEvent * event) override; 0068 0069 /** 0070 * This function is called whenever a key is pressed. 0071 */ 0072 void keyPressEvent(QKeyEvent * event) override; 0073 }; 0074 0075 } 0076 } 0077 0078 #endif // TIKZ_UI_SELECT_TOOL_H 0079 0080 // kate: indent-width 4; replace-tabs on;