libs/flake
KoInteractionStrategy.cpp
Go to the documentation of this file.00001 /* This file is part of the KDE project 00002 * Copyright (C) 2006 Thomas Zander <zander@kde.org> 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU Library General Public 00006 * License as published by the Free Software Foundation; either 00007 * version 2 of the License, or (at your option) any later version. 00008 * 00009 * This library is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 * Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this library; see the file COPYING.LIB. If not, write to 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #include "KoInteractionStrategy.h" 00021 #include "KoSelection.h" 00022 #include "KoShapeManager.h" 00023 #include "KoPointerEvent.h" 00024 #include "KoShapeRubberSelectStrategy.h" 00025 #include "KoCreateShapeStrategy.h" 00026 #include "KoCreateShapesTool.h" 00027 #include "KoInteractionTool.h" 00028 #include "KoCanvasBase.h" 00029 #include "KoTool.h" 00030 #include "KoShapeContainer.h" 00031 00032 #include <QUndoCommand> 00033 00034 #include <QMouseEvent> 00035 00036 void KoInteractionStrategy::cancelInteraction() 00037 { 00038 QUndoCommand *cmd = createCommand(); 00039 if (cmd) { 00040 cmd->undo(); 00041 delete cmd; 00042 } 00043 } 00044 00045 KoInteractionStrategy::KoInteractionStrategy(KoTool *parent, KoCanvasBase *canvas) 00046 : m_parent(parent) 00047 , m_canvas(canvas) 00048 { 00049 } 00050 00051 KoInteractionStrategy::~KoInteractionStrategy() 00052 { 00053 m_parent->setStatusText(""); 00054 } 00055 00056 void KoInteractionStrategy::handleCustomEvent(KoPointerEvent * event) 00057 { 00058 Q_UNUSED(event); 00059 } 00060
