00001 00002 /* This file is part of Rocs, 00003 Copyright (C) 2008 by: 00004 Tomaz Canabrava <tomaz.canabrava@gmail.com> 00005 Ugo Sangiori <ugorox@gmail.com> 00006 00007 Rocs is free software; you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2 of the License, or 00010 (at your option) any later version. 00011 00012 Rocs 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 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Step; if not, write to the Free Software 00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 */ 00021 #ifndef ACTION_ADDTYPEDNODE_H 00022 #define ACTION_ADDTYPEDNODE_H 00023 00024 #include "AbstractAction.h" 00025 #include <QObject> 00026 00033 class AddTypedNodeAction : public AbstractAction 00034 { 00035 Q_OBJECT 00036 public: 00043 explicit AddTypedNodeAction( GraphScene* scene, QObject* parent = 0 ); 00044 00048 ~AddTypedNodeAction(); 00049 00050 void setActiveGraph( Graph* graph ); 00051 00052 public slots: 00058 void executePress( QPointF pos ); 00059 00060 void widgetTypeChanged( QString type ); 00061 00062 signals: 00063 void addNode( QString name, QPointF pos, QString type ); 00064 void iAmDisappoint(); 00065 00066 protected: 00067 QString _type; 00068 }; 00069 00070 #endif