diff --git a/hurricane/src/editor/CMakeLists.txt b/hurricane/src/editor/CMakeLists.txt index 7f496606..fec233fc 100644 --- a/hurricane/src/editor/CMakeLists.txt +++ b/hurricane/src/editor/CMakeLists.txt @@ -2,10 +2,13 @@ include(${QT_USE_FILE}) include_directories(${HURRICANE_SOURCE_DIR}/src/hurricane) -set(includes InstanceFigure.h Utils.h) -set(cpps InstanceFigure.cpp CellScene.cpp) +set(includes CellEditor.h CellScene.h) +set(exports CellEditor.h) +set(cpps InstanceFigure.cpp CellScene.cpp CellEditor.cpp) -add_library(hurricaneeditor SHARED ${cpps}) +QT4_WRAP_CPP(MOC_SRCS ${includes}) + +add_library(hurricaneeditor SHARED ${cpps} ${MOC_SRCS}) target_link_libraries(hurricaneeditor ${QT_LIBRARIES} hurricane) install(FILES ${includes} DESTINATION /include/coriolis/hurricane) diff --git a/hurricane/src/editor/CellFigure.h b/hurricane/src/editor/CellFigure.h index 1afc0eef..99d59ad4 100644 --- a/hurricane/src/editor/CellFigure.h +++ b/hurricane/src/editor/CellFigure.h @@ -9,7 +9,6 @@ using namespace Hurricane; class InstanceFigure; - class CellFigure : public QGraphicsItem { public: CellFigure(Cell* cell); diff --git a/hurricane/src/editor/CellScene.cpp b/hurricane/src/editor/CellScene.cpp index 955e6c69..32f1fbdd 100644 --- a/hurricane/src/editor/CellScene.cpp +++ b/hurricane/src/editor/CellScene.cpp @@ -1,9 +1,6 @@ #include "CellScene.h" - -void CellScene::drawItems(QPainter *painter, - int numItems, - QGraphicsItem *items[], - const QStyleOptionGraphicsItem options[], - QWidget *widget) { -} +CellScene::CellScene(Cell* c) + : QGraphicsScene() + , cell(c) +{} diff --git a/hurricane/src/editor/CellScene.h b/hurricane/src/editor/CellScene.h index 3328bb51..b1cfd579 100644 --- a/hurricane/src/editor/CellScene.h +++ b/hurricane/src/editor/CellScene.h @@ -3,13 +3,16 @@ #include +#include "Cell.h" +using namespace H; + class CellScene : public QGraphicsScene { - protected : - void drawItems(QPainter *painter, - int numItems, - QGraphicsItem *items[], - const QStyleOptionGraphicsItem options[], - QWidget *widget); + Q_OBJECT + + public: + CellScene(Cell* cell); + private: + Cell* cell; }; #endif /* __CELL_SCENE_H */ diff --git a/hurricane/src/viewer/CMakeLists.txt b/hurricane/src/viewer/CMakeLists.txt index 13388500..6f38cdd3 100644 --- a/hurricane/src/viewer/CMakeLists.txt +++ b/hurricane/src/viewer/CMakeLists.txt @@ -6,8 +6,7 @@ set(includes CellWidget.h LayersWidget.h CellViewer.h) set(exports CellViewer.h) set(cpps CellWidget.cpp LayersWidget.cpp CellViewer.cpp) -QT4_WRAP_CPP(MOC_SRCS ${includes}) - +Q4_WRAP_CPP(MOC_SRCS ${includes}) add_library(hurricaneviewer SHARED ${cpps} ${MOC_SRCS}) target_link_libraries(hurricaneviewer ${QT_LIBRARIES} hurricane)