diff -r 96402b172173 -r a8a98a94899a selection.h --- a/selection.h Wed Oct 29 17:42:34 2008 +0000 +++ b/selection.h Tue Nov 04 12:09:10 2008 +0000 @@ -4,6 +4,7 @@ #include #include #include +#include #include "treeitem.h" @@ -24,8 +25,6 @@ void clear(); void setModel (VymModel *); void update(); - void setColor (QColor c); - QColor getColor (); bool select (LinkableMapObj*); bool select (const QString &); bool reselect (); @@ -40,17 +39,18 @@ LinkableMapObj * single(); // NULL, if multiple selected BranchObj* getBranch(); TreeItem* getBranchItem(); + QModelIndex getBranchIndex(); //!< Returns index of first selected branch or mapcenter FloatImageObj* getFloatImage(); QString getSelectString(); private: - void init(); QList selectList; QList lastSelectList; - QList selboxList; + VymModel *model; - QGraphicsScene *scene; + + QItemSelectionModel *selModel; //!< QSelectionModel is shared across views and initialized in setModel QColor color; bool blocked; //!< if true, no new selection possible