Warning, file /graphics/tikzkit/src/ui/tools/AbstractTool.cpp 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) 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 #include "AbstractTool.h"
0021 
0022 #include <QGraphicsScene>
0023 #include <QKeyEvent>
0024 
0025 namespace tikz {
0026 namespace ui {
0027 
0028 AbstractTool::AbstractTool(tikz::ui::Document * doc, QGraphicsScene * scene)
0029     : QObject(scene)
0030     , m_document(doc)
0031     , m_scene(scene)
0032 {
0033     Q_ASSERT(doc);
0034     Q_ASSERT(scene);
0035 }
0036 
0037 AbstractTool::~AbstractTool()
0038 {
0039 }
0040 
0041 QGraphicsScene * AbstractTool::scene() const
0042 {
0043     return m_scene;
0044 }
0045 
0046 tikz::ui::Document * AbstractTool::document() const
0047 {
0048     return m_document;
0049 }
0050 
0051 void AbstractTool::mouseEnteredScene()
0052 {
0053 }
0054 
0055 void AbstractTool::mouseLeftScene()
0056 {
0057 }
0058 
0059 void AbstractTool::keyPressEvent(QKeyEvent * event)
0060 {
0061     event->ignore();
0062 }
0063 
0064 }
0065 }
0066 
0067 // kate: indent-width 4; replace-tabs on;