X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Frs_actioninterface.h;h=c2daeb188d2e412db231691d8cbb950fb095d567;hb=27d4a138d23453e93a833e9347444b828a971cb4;hp=ed76836ee94700b1f8ab85ef959443f4cf22e073;hpb=89e127aa3dbd74d3158e6dbe0ca1703420c04395;p=architektonas diff --git a/src/base/rs_actioninterface.h b/src/base/rs_actioninterface.h index ed76836..c2daeb1 100644 --- a/src/base/rs_actioninterface.h +++ b/src/base/rs_actioninterface.h @@ -1,26 +1,15 @@ #ifndef RS_ACTIONINTERFACE_H #define RS_ACTIONINTERFACE_H -#include - -#include "rs_entitycontainer.h" -#include "rs_commandevent.h" -//#include "rs_event.h" -#include "drawing.h" -#include "rs_graphicview.h" +#include #include "rs_snapper.h" -#include "rs_preview.h" -#include "rs_dialogfactory.h" - -#ifndef RS_NO_QCADCMD -#include "commands.h" -#endif -//template T* instantiate(RS_EntityContainer& container, RS_GraphicView& graphicView) { -// return new T(container, graphicView); - //void (*function)() = T::instantiate; - //return (*function)(); -//} +class RS_CommandEvent; +class RS_Document; +class Drawing; +class RS_EntityContainer; +class GraphicView; +class Vector; /** * This is the interface that must be implemented for all @@ -34,24 +23,23 @@ class RS_ActionInterface: public QObject, public RS_Snapper { //huh? no slots/signals here... Q_OBJECT - +//WHY derive from QObject??? +//for the TR macro??? +//mebbe... public: RS_ActionInterface(const char * name, RS_EntityContainer & container, - RS_GraphicView & graphicView); + GraphicView & graphicView); virtual ~RS_ActionInterface(); virtual RS2::ActionType rtti(); - QString getName(); - virtual void init(int status = 0); virtual void mouseMoveEvent(QMouseEvent *); virtual void mousePressEvent(QMouseEvent *); - virtual void mouseReleaseEvent(QMouseEvent *); virtual void keyPressEvent(QKeyEvent * e); virtual void keyReleaseEvent(QKeyEvent * e); - virtual void coordinateEvent(RS_CoordinateEvent *); + virtual void coordinateEvent(Vector *); virtual void commandEvent(RS_CommandEvent *); virtual QStringList getAvailableCommands(); virtual void setStatus(int status); @@ -75,14 +63,14 @@ class RS_ActionInterface: public QObject, public RS_Snapper private: /** - * Current status of the action. After an action has - * been created the action status is set to 0. Actions - * that are terminated have a status of -1. Other status - * numbers can be used to describe the stage this action - * is in. E.g. a window zoom consists of selecting the - * first corner (status 0), and selecting the second - * corner (status 1). - */ + * Current status of the action. After an action has + * been created the action status is set to 0. Actions + * that are terminated have a status of -1. Other status + * numbers can be used to describe the stage this action + * is in. E.g. a window zoom consists of selecting the + * first corner (status 0), and selecting the second + * corner (status 1). + */ int status; protected: @@ -90,53 +78,26 @@ class RS_ActionInterface: public QObject, public RS_Snapper QString name; /** - * This flag is set when the action has terminated and - * can be deleted. - */ + * This flag is set when the action has terminated and + * can be deleted. + */ bool finished; /** - * Pointer to the graphic is this container is a graphic. - * NULL otherwise - */ + * Pointer to the graphic is this container is a graphic. + * NULL otherwise + */ Drawing * graphic; /** - * Pointer to the document (graphic or block) or NULL. - */ + * Pointer to the document (graphic or block) or NULL. + */ RS_Document * document; /** - * Pointer to the default mouse cursor for this action or NULL. - */ - //RS2::CursorType cursor; - - /** - * Predecessor of this action or NULL. - */ + * Predecessor of this action or NULL. + */ RS_ActionInterface * predecessor; - - /** - * String prepended to the help text for currently available commands. - */ - //static QString msgAvailableCommands; - - /** - * Command used for showing help for every action. - */ - //static QString cmdHelp; - - /** - * Command for answering yes to a question. - */ - //static QString cmdYes; - //static QString cmdYes2; - - /** - * Command for answering no to a question. - */ - //static QString cmdNo; - //static QString cmdNo2; }; #endif