libs/flake

KoPathConnectionPointStrategy.h

Go to the documentation of this file.
00001 /* This file is part of the KDE project
00002  *
00003  * Copyright (C) 2007 Boudewijn Rempt <boud@kde.org>
00004  * Copyright (C) 2007 Thorsten Zachmann <zachmann@kde.org>
00005  * Copyright (C) 2007 Jan Hambrecht <jaham@gmx.net>
00006  *
00007  * This library is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Library General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2 of the License, or (at your option) any later version.
00011  *
00012  * This library is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Library General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Library General Public License
00018  * along with this library; see the file COPYING.LIB.  If not, write to
00019  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020  * Boston, MA 02110-1301, USA.
00021  */
00022 #ifndef KO_PATH_CONNECTION_POINT_STRATEGY
00023 #define KO_PATH_CONNECTION_POINT_STRATEGY
00024 
00025 #include <QPointF>
00026 #include "KoParameterChangeStrategy.h"
00027 #include "KoConnectionShape.h"
00028 
00029 class KoCanvasBase;
00030 class KoPathTool;
00031 
00036 class KoPathConnectionPointStrategy : public KoParameterChangeStrategy
00037 {
00038 public:
00039     KoPathConnectionPointStrategy(KoPathTool *tool, KoCanvasBase *canvas,
00040                                   KoConnectionShape * parameterShape, int handleId);
00041     virtual ~KoPathConnectionPointStrategy();
00042     virtual void handleMouseMove(const QPointF &mouseLocation, Qt::KeyboardModifiers modifiers);
00043     virtual void finishInteraction(Qt::KeyboardModifiers modifiers);
00044     virtual QUndoCommand* createCommand();
00045 
00046 private:
00047 
00048     KoPathTool *m_tool;
00049     KoConnectionShape * m_connectionShape; 
00050     int m_handleId;                      
00051     QPointF m_startPoint;                
00052     KoConnection m_newConnection;          
00053     KoConnection m_oldConnection;          
00054 };
00055 
00056 
00057 #endif