X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/a7299f808c1906872b76aa62fb6d8276096c4ff5..1b7818e18ed7bcf3464e307b97c6e0e6d72cc69b:/BoxItem.h diff --git a/BoxItem.h b/BoxItem.h index c8a942e..4ab2022 100644 --- a/BoxItem.h +++ b/BoxItem.h @@ -30,8 +30,12 @@ using namespace Qt; class BoxItem : public AbstractBoxItem { public: - BoxItem(AbstractBlock *_refBlock, Dispatcher *_dispatcher, Parameters *_params, GroupItem* parent) throw(Exception); - BoxItem(Dispatcher *_dispatcher, Parameters *_params, GroupItem* parent) throw(Exception); + + enum Position { Left = 1, Right, Top, Bottom, Center}; + enum SpanType { NoSpan = 0, HSpan = 1, VSpan = 2 }; + + BoxItem(AbstractBlock *_refBlock, Dispatcher *_dispatcher, Parameters *_params, GroupItem* parent, LockType _lock = NoLock, SpanType _span = NoSpan, Position _hPos = Center, Position _vPos = Center) throw(Exception); + BoxItem(Dispatcher *_dispatcher, Parameters *_params, GroupItem* parent, LockType _lock = NoLock, SpanType _span = NoSpan, Position _hPos = Center, Position _vPos = Center) throw(Exception); ~BoxItem(); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); @@ -53,6 +57,10 @@ public: protected: + SpanType span; + Position hPos; + Position vPos; + void updateMinimumSize(); // modify the minimum size bool updateGeometry(ChangeType type); // modify the originPoint and the total dimension @@ -65,9 +73,9 @@ protected: private: /* NOTE : - A BlockItem is always graphically within a GroupItem, inside the same scene. + A BoxItem is always graphically within a GroupItem, inside the same scene. - A BlockItem may also be the graphical view of a GroupBlock. In this case, there exists a child scene + A BoxItem may also be the graphical view of a GroupBlock. In this case, there exists a child scene containing a GroupItem. insideGroup atribute refers to this GroupItem and thus, may be NULL if the current blockItem represents a functional block */