![]() |
VR-Forces Developer's Guide
|
This class manages scripted tasks and allows for drag/drop of task for folder manipulation.

Public Types | |
| typedef std::map < QTreeWidgetItem *, DtThemedTreeWidgetItem * > | ScriptedTaskItem |
| typedef std::map< std::string, ScriptedTaskItem > | ScriptedTaskItems |
Public Member Functions | |
| DtScriptedTaskTreeWidget (makVrv::DtDe &de, QWidget *parent) | |
| virtual | ~DtScriptedTaskTreeWidget () |
| virtual bool | selectedScriptIsSystemScript () const |
| virtual bool | selectedItemIsFolder () const |
| virtual bool | itemIsFolder (QTreeWidgetItem *) const |
| virtual bool | allSelectedItemsAreScripts () const |
| virtual QString | getFolderName (QTreeWidgetItem *, const QString ¤t="") |
| virtual DtThemedTreeWidgetItem * | addFolder (QTreeWidgetItem *root, const QString &, bool select=true) |
| virtual bool | systemScriptsInFolder (QTreeWidgetItem *) const |
| virtual bool | selectedItemCanEditScript () const |
| virtual QTreeWidgetItem * | findScriptItem (const QString &scriptId) |
| virtual QTreeWidgetItem * | findFolder (const QString &path, QTreeWidgetItem *root=0) |
| virtual void | setFolderPaths (QTreeWidgetItem *) |
| virtual std::string | folderPathToItem (QTreeWidgetItem *) const |
| virtual std::string | folderPathToSelectedItem () const |
| virtual std::vector< std::string > | scriptIdsInFolder (QTreeWidgetItem *) const |
| virtual std::set< std::string > | selectedScriptIds () const |
| virtual QSize | sizeHint (QTreeWidgetItem *) const |
| const ScriptedTaskItems & | scriptedTaskItems () const |
| virtual void | updateFrameRates (DtSimMessage *) |
| virtual QTreeWidgetItem * | addScriptedTask (const std::string &, QTreeWidgetItem *root=0, bool addToFolder=true) |
| virtual bool | removeScriptedTask (const std::string &) |
| virtual void | scriptModified (const std::string &, bool) |
| virtual void | clear () |
| virtual void | setEditable (bool b) |
| virtual bool | editable () const |
| virtual void | scriptModifiedCleared () |
| virtual void | scriptErrorStatusChanged (const std::string &) |
| virtual void | scriptIdChanged (const std::string &oldId, const std::string &newId) |
| virtual bool | changeScriptId (QTreeWidgetItem *item, const std::string &oldId, const std::string &newId) const |
| virtual void | filterByScriptEngine (const std::set< std::string > &showEngines) |
| virtual bool | filterByScriptEngine (QTreeWidgetItem *, const std::set< std::string > &showEngines) |
Public Member Functions inherited from makVrf::DtTreeWidget | |
| DtTreeWidget (makVrv::DtDe &de, QWidget *parent) | |
| virtual | ~DtTreeWidget () |
| virtual QTreeWidgetItem * | lastItem () const |
| QTreeWidgetItem * | itemFromIndex (const QModelIndex &idx) |
| QModelIndex | indexFromItem (QTreeWidgetItem *item, int column=0) const |
| virtual void | setMinimumSizeHint (const QSize &) |
| virtual QSize | minimumSizeHint () const |
| virtual void | setSizeHint (const QSize &s) |
| virtual int | indexOfChild (QTreeWidgetItem *) const |
| unsigned int | depth (QTreeWidgetItem *) const |
| QTreeWidgetItem * | nextSibling (QTreeWidgetItem *) const |
| void | setAllowEmptySelection (bool) |
| bool | allowEmptySelection () const |
| virtual bool | edit (const QModelIndex &index, EditTrigger trigger, QEvent *event) |
| virtual void | closeEditor (QWidget *editor, QAbstractItemDelegate::EndEditHint hint) |
| virtual void | itemRightClickedOn (QTreeWidgetItem *, QMouseEvent *, int col) |
| virtual void | mousePressEvent (QMouseEvent *event) |
| virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
| virtual void | mouseReleaseEvent (QMouseEvent *event) |
| virtual void | itemLeftClickedOn (QTreeWidgetItem *, QMouseEvent *, int) |
| virtual bool | editingCanceled () const |
| QItemSelectionModel::SelectionFlags | lastSelectionCommand () const |
| bool | lastSelectHadControlKeyDown () const |
| virtual void | setAllowWindowsStyleNameEdit (bool) |
| bool | allowWindowsStyleNameEdit () const |
| virtual void | setDisableNameEditIfNotWindowsStyleEdit (bool) |
| bool | disableNameEditIfNotWindowsStyleEnabled () const |
| virtual void | setEditPressTime (double) |
| double | editPressTime () const |
Public Attributes | |
| boost::signals2::signal< void()> | signal_deleteRequested |
Protected Member Functions | |
| virtual QMimeData * | mimeData (const QList< QTreeWidgetItem * > list) const |
| virtual void | dragEnterEvent (QDragEnterEvent *event) |
| virtual void | dragMoveEvent (QDragMoveEvent *event) |
| virtual void | dropItems (const QStringList &, QTreeWidgetItem *) |
| virtual bool | dropMimeData (QTreeWidgetItem *parent, int index, const QMimeData *mimeData, Qt::DropAction action) |
| virtual void | keyPressEvent (QKeyEvent *) |
| virtual void | statusUpdate (QTreeWidgetItem *item, const std::string &scriptId) |
Protected Member Functions inherited from makVrf::DtTreeWidget | |
| virtual void | scrollContentsBy (int, int) |
| virtual QSize | sizeHint () const |
| virtual QItemSelectionModel::SelectionFlags | selectionCommand (const QModelIndex &index, const QEvent *event=0) const |
| virtual QItemSelectionModel::SelectionFlags | selectionBehaviorFlags () const |
Protected Attributes | |
| bool | myEditable |
| ScriptedTaskItems | myScriptedTaskItems |
Protected Attributes inherited from makVrf::DtTreeWidget | |
| bool | myMouseRightClick |
| bool | myAllowEmptySelection |
| bool | myAllowWindowsStyleNameEdit |
| double | myEditPressTime |
| makVrv::DtDe & | myDe |
| bool | myEditingCanceled |
| QSize | myMinimumSizeHint |
| QSize | mySizeHint |
| bool | myNextReleaseMightBeEdit |
| QTreeWidgetItem * | myCheckForEditAfterTimer |
| bool | myLastEditEventWasDoubleClick |
| bool | myDisableNameEditIfNotWindowsStyleEnabled |
| QItemSelectionModel::SelectionFlags | myLastSelectionCommand |
| bool | myLastSelectHadControlKeyDown |
Additional Inherited Members | |
Signals inherited from makVrf::DtTreeWidget | |
| void | mouseLeftPressed (QTreeWidgetItem *, QMouseEvent *, int col) |
| void | rightClickOnItem (QTreeWidgetItem *, QMouseEvent *, int col) |
| void | contentsMoving (int, int) |
Protected Slots inherited from makVrf::DtTreeWidget | |
| virtual void | checkForEdit () |
| typedef std::map<QTreeWidgetItem*, DtThemedTreeWidgetItem*> makVrf::DtScriptedTaskTreeWidget::ScriptedTaskItem |
| typedef std::map<std::string, ScriptedTaskItem> makVrf::DtScriptedTaskTreeWidget::ScriptedTaskItems |
| makVrf::DtScriptedTaskTreeWidget::DtScriptedTaskTreeWidget | ( | makVrv::DtDe & | de, |
| QWidget * | parent | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Returns true if the selected script is a system script.
|
virtual |
Returns true if the selected item is a folder.
|
virtual |
Returns true if the item is a folder.
|
virtual |
Returns true if all the selected items are scripts.
|
virtual |
Returns a folder name that is unique for the given root, or an empty name if none given.
|
virtual |
Adds a folder to the particular root.
|
virtual |
Returns true if there are any system scripts in the given folder or sub-folders.
|
virtual |
Returns true if the selected item can edit a script.
|
virtual |
Returns the item that represents the script or NULL.
|
virtual |
Returns the folder that is the item at the end of the path. If root is 0, invisibleRootItem is used.
|
virtual |
Sets the folder path for all items (except system scripts) in this folder and sub-folders.
|
virtual |
Returns the folder path to the given item. If the item is a folder will include that item in the path.
|
virtual |
Returns the folder path to the currently selected item.
|
virtual |
Returns a vector of all the script ids in the folder recursively.
|
virtual |
Returns the currently selected script ids. If the selected item is a folder returnsall script ids in that folder.
|
virtual |
Returns the size hint of the item, inclusive of icon and leveling.
|
inline |
|
virtual |
Called to update with frame rates message.
|
virtual |
Adds a new scripted task into the tree widget.
|
virtual |
Removes a scripted task. Returns true if removed.
|
virtual |
Called when a script is modified.
Reimplemented in makVrf::DtDoctrinesTreeWidget.
|
virtual |
Clears out all items.
|
virtual |
Sets whether or not items in the dialog are editable.
|
virtual |
|
virtual |
Called when all script modified status has been cleared.
|
virtual |
Called to update the script error status.
|
virtual |
Filters by script engine. At this point showing Lua or Lua and C++.
|
virtual |
Filters by script engine. At this point showing Lua or Lua and C++.
|
virtual |
|
virtual |
|
protectedvirtual |
Returns the mime data of the items that are selected for dragging.
Reimplemented in makVrf::DtDoctrinesTreeWidget.
|
protectedvirtual |
Called when the mime data enters this area, return true if data can be decoded.
Reimplemented in makVrf::DtDoctrinesTreeWidget, and makVrf::DtDoctrinesScriptedTaskTreeWidget.
|
protectedvirtual |
Accept event if the dragged items can be dropped on the tree widget item they are over.
Reimplemented in makVrf::DtDoctrinesTreeWidget, and makVrf::DtDoctrinesScriptedTaskTreeWidget.
|
protectedvirtual |
Drop the items on the supplied tree widget item.
|
protectedvirtual |
Return true if data can be dropped.
Reimplemented in makVrf::DtDoctrinesTreeWidget, and makVrf::DtDoctrinesScriptedTaskTreeWidget.
|
protectedvirtual |
Override for delete key press.
|
protectedvirtual |
Given an item and script id, update font, color, changed status on the scripted task item.
| boost::signals2::signal<void ()> makVrf::DtScriptedTaskTreeWidget::signal_deleteRequested |
|
protected |
|
protected |