X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdrawingview.h;h=c4a7234fe733314ffc34bbebfcf98b3232a314e0;hb=4bc000ba003a53fb11428a2eb71e3b4471a15c7a;hp=af0fa9265afdade5a85430e35b5a6905aad0dd64;hpb=6c1279871f6bb86bc59e2561b6a7f74ab081f71e;p=architektonas diff --git a/src/drawingview.h b/src/drawingview.h index af0fa92..c4a7234 100644 --- a/src/drawingview.h +++ b/src/drawingview.h @@ -3,8 +3,9 @@ #include #include -#include "action.h" -#include "container.h" +#include "structs.h" + +class Painter; class DrawingView: public QWidget { @@ -14,10 +15,16 @@ class DrawingView: public QWidget DrawingView(QWidget * parent = NULL); public: -// void SetRotateToolActive(bool state = true); - void SetToolActive(Action * action); +// void SetToolActive(Action * action); void SetGridSize(uint32_t); void UpdateGridBackground(void); + Point SnapPointToGrid(Point); + void RenderObjects(Painter *, Container *); + void DeleteSelectedItems(void); + void ClearSelection(void); + void AddHoveredToSelection(void); + void GetSelection(std::vector &); + void GetHovered(std::vector &); public slots: void AddNewObjectToDocument(Object *); @@ -40,6 +47,10 @@ class DrawingView: public QWidget public: bool useAntialiasing; + uint32_t numSelected; + uint32_t numHovered; + bool shiftDown; + bool ctrlDown; private: QPixmap gridBackground; @@ -50,18 +61,13 @@ class DrawingView: public QWidget uint32_t gridPixels; // Grid size in pixels private: bool collided; -//Should this go into Object's class variables??? -//maybe, maybe not... :-P -// bool rotateTool; -// double rx, ry; bool scrollDrag; Vector oldPoint; -// bool addLineTool; -// bool addCircleTool; -// bool addDimensionTool; public: - Action * toolAction; + std::vector select; + std::vector hover; +// Action * toolAction; // public: // static Container document;