19 #ifndef OST_GUI_SCENE_WIN_SCENE_WIN_MODEL_HH
20 #define OST_GUI_SCENE_WIN_SCENE_WIN_MODEL_HH
37 #include <QStringList>
40 #include <QAbstractItemModel>
41 namespace ost {
namespace gui {
74 QModelIndex
index(
int row,
int col,
const QModelIndex& parent = QModelIndex())
const;
76 QModelIndex
parent(
const QModelIndex& index)
const;
78 int rowCount(
const QModelIndex& parent=QModelIndex())
const;
80 int columnCount(
const QModelIndex& parent=QModelIndex())
const;
82 QVariant
data(
const QModelIndex& index,
int role=Qt::DisplayRole)
const;
84 QVariant
headerData(
int section, Qt::Orientation orientation,
85 int role=Qt::DisplayRole)
const;
87 virtual Qt::ItemFlags
flags(
const QModelIndex& index=QModelIndex())
const;
89 virtual bool setData(
const QModelIndex& index=QModelIndex(),
90 const QVariant& value=QVariant(),
91 int role=Qt::DisplayRole);
95 virtual QMimeData*
mimeData(
const QModelIndexList& indexes)
const;
104 QModelIndex GetIndex(
SceneNode* node, QModelIndex index,
int column);
109 QMap<gfx::GfxNode*, RenderModesNode*> render_observers_;
110 QMap<gfx::GfxNode*, SceneNode*> node_map_;
Interface for observing graphical objects.
QModelIndex GetIndexOf(SceneNode *node, int column=0)
SceneNode * FindGfxNode(gfx::GfxNodeP node)
bool RemoveNode(SceneNode *node)
virtual Qt::ItemFlags flags(const QModelIndex &index=QModelIndex()) const
virtual void RenderModeChanged(const gfx::GfxNodeP &node)
Called when the render mode of a node changed.
virtual bool setData(const QModelIndex &index=QModelIndex(), const QVariant &value=QVariant(), int role=Qt::DisplayRole)
QModelIndex index(int row, int col, const QModelIndex &parent=QModelIndex()) const
int columnCount(const QModelIndex &parent=QModelIndex()) const
gfx::EntityP GetEntityOfViews(QModelIndexList indexes)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
QModelIndex parent(const QModelIndex &index) const
mol::QueryViewWrapperList GetQueryViewsList(QModelIndexList indexes)
virtual void NodeAdded(const gfx::GfxNodeP &node)
Called when a new node has been added to the scene.
virtual QMimeData * mimeData(const QModelIndexList &indexes) const
virtual void NodeRemoved(const gfx::GfxNodeP &node)
Called when an object is removed from the scene.
virtual void SelectionChanged(const gfx::GfxObjP &obj, const mol::EntityView &sel)
Called when selection of an object changed.
Qt::DropActions supportedDragActions() const
void DetachRenderModeObserver(RenderModesNode *node)
int rowCount(const QModelIndex &parent=QModelIndex()) const
SceneNode * GetItem(const QModelIndex &index) const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
void AttachRenderModeObserver(RenderModesNode *node)
virtual QStringList mimeTypes() const
bool AddNode(SceneNode *parent, SceneNode *child)
gfx::NodePtrList GetGfxNodes(QModelIndexList indexes)
SceneWinModel(QObject *parent=NULL)
#define DLLEXPORT_OST_GUI
std::vector< GfxNodeP > NodePtrList
boost::shared_ptr< GfxNode > GfxNodeP
boost::shared_ptr< Entity > EntityP
boost::shared_ptr< GfxObj > GfxObjP
std::vector< QueryViewWrapper > QueryViewWrapperList