VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtDoctrinesTreeWidget Class Reference

Dialog that allows for drag/drop from doctrines panel. More...

Inheritance diagram for makVrf::DtDoctrinesTreeWidget:
Inheritance graph
[legend]

Public Member Functions

 DtDoctrinesTreeWidget (makVrv::DtDe &, DtDoctrinesDialog *, QWidget *parent)
 CTOR.
virtual ~DtDoctrinesTreeWidget ()
 DTOR.
virtual void setupDoctrines ()
 Fills the list with doctrines and assigns current scripted tasks that have those doctrines to them.
virtual bool selectedItemIsDoctrine () const
 Returns true if selected item is a doctrine item, and the only item selected.
virtual QTreeWidgetItemselectedDoctrine () const
 Returns doctrine selected even if a child of the doctrine is selected.
virtual void scriptModified (const std::string &scriptId, bool modified)
 Update doctrines root if needed.
virtual void addScriptedTask (const std::string &scriptId)
 Adds a new scripted task to the specified doctrine(s) that are part of the scripted task.
- Public Member Functions inherited from makVrf::DtScriptedTaskTreeWidget
 DtScriptedTaskTreeWidget (makVrv::DtDe &de, QWidget *parent)
 CTOR.
virtual ~DtScriptedTaskTreeWidget ()
 DTOR.
virtual bool selectedScriptIsSystemScript () const
 Returns true if the selected script is a system script.
virtual bool selectedItemIsFolder () const
 Returns true if the selected item is a folder.
virtual bool itemIsFolder (QTreeWidgetItem *) const
 Returns true if the item is a folder.
virtual bool allSelectedItemsAreScripts () const
 Returns true if all the selected items are scripts.
virtual QString getFolderName (QTreeWidgetItem *, const QString &current="")
 Returns a folder name that is unique for the given root, or an empty name if none given.
virtual QTreeWidgetItemaddFolder (QTreeWidgetItem *root, const QString &, bool select=true)
 Adds a folder to the particular root.
virtual bool systemScriptsInFolder (QTreeWidgetItem *) const
 Returns true if there are any system scripts in the given folder or sub-folders.
virtual bool selectedItemCanEditScript () const
 Returns true if the selected item can edit a script.
virtual QTreeWidgetItemfindScriptItem (const QString &scriptId)
 Returns the item that represents the script or NULL.
virtual QTreeWidgetItemfindFolder (const QString &path, QTreeWidgetItem *root=0)
 Returns the folder that is the item at the end of the path.
virtual void setFolderPaths (QTreeWidgetItem *)
 Sets the folder path for all items (except system scripts) in this folder and sub-folders.
virtual std::string folderPathToItem (QTreeWidgetItem *) const
 Returns the folder path to the given item.
virtual std::string folderPathToSelectedItem () const
 Returns the folder path to the currently selected item.
virtual std::vector< std::string > scriptIdsInFolder (QTreeWidgetItem *) const
 Returns a vector of all the script ids in the folder recursively.
virtual std::set< std::string > selectedScriptIds () const
 Returns the currently selected script ids. If the selected item is a folder returnsall script ids in that folder.
virtual QSize sizeHint (QTreeWidgetItem *) const
 Returns the size hint of the item, inclusive of icon and leveling.
const ScriptedTaskItemsscriptedTaskItems () const
virtual void updateFrameRates (DtSimMessage *)
 Called to update with frame rates message.
virtual QTreeWidgetItemaddScriptedTask (const std::string &, QTreeWidgetItem *root=0, bool addToFolder=true)
 Adds a new scripted task into the tree widget.
virtual bool removeScriptedTask (const std::string &)
 Removes a scripted task. Returns true if removed.
virtual void clear ()
 Clears out all items.
virtual void setEditable (bool b)
 Sets whether or not items in the dialog are editable.
virtual bool editable () const
virtual void scriptModifiedCleared ()
 Called when all script modified status has been cleared.
virtual void scriptErrorStatusChanged (const std::string &)
 Called to update the script error status.
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)
 Constructor.
virtual ~DtTreeWidget ()
 DTOR.
virtual QTreeWidgetItemlastItem () const
 Returns the last item in the list.
QTreeWidgetItemitemFromIndex (const QModelIndex &idx)
QModelIndex indexFromItem (QTreeWidgetItem *item, int column=0) const
virtual void setMinimumSizeHint (const QSize &)
 Set the minimum size hint. If either width or height is -1 uses default.
virtual QSize minimumSizeHint () const
virtual void setSizeHint (const QSize &s)
 Sets the size hint in absence of minimum size.
virtual int indexOfChild (QTreeWidgetItem *) const
 Returns the index of the child.
unsigned int depth (QTreeWidgetItem *) const
 Returns the number of levels down this item is.
QTreeWidgetItemnextSibling (QTreeWidgetItem *) const
 Returns the next item after the supplied item.
void setAllowEmptySelection (bool)
 Only valid in single selection mode.
bool allowEmptySelection () const
virtual bool edit (const QModelIndex &index, EditTrigger trigger, QEvent *event)
 Override to prevent keystrokes from going to vantage while editing.
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)
 Turn off in name editing potential if double click.
virtual void mouseReleaseEvent (QMouseEvent *event)
virtual void itemLeftClickedOn (QTreeWidgetItem *, QMouseEvent *, int)
virtual bool editingCanceled () const
virtual void setAllowWindowsStyleNameEdit (bool)
bool allowWindowsStyleNameEdit () const
virtual void setEditPressTime (double)
double editPressTime () const

Protected Types

typedef std::map< std::string,
QTreeWidgetItem * > 
Doctrines

Protected Member Functions

virtual QMimeDatamimeData (const QList< QTreeWidgetItem * > list) const
 Create data of mime data to drop.
virtual void dragEnterEvent (QDragEnterEvent *event)
 Called when the mime data enters this area, return true if data can be decoded and dropped in the dialog.
virtual void dragMoveEvent (QDragMoveEvent *event)
 Enable if items can be dropped on current doctrine.
virtual bool dropMimeData (QTreeWidgetItem *parent, int index, const QMimeData *mimeData, Qt::DropAction action)
 Called when dropped. Add to doctrine dropped on top of.
- Protected Member Functions inherited from makVrf::DtScriptedTaskTreeWidget
virtual void dropItems (const QStringList &, QTreeWidgetItem *)
 Drop the items on the supplied tree widget item.
virtual void keyPressEvent (QKeyEvent *)
 Override for delete key press.
virtual void statusUpdate (QTreeWidgetItem *item, const std::string &scriptId)
 Given an item and script id, update font, color, changed status on the scripted task item.
virtual QIcon composeIcon (const DtScriptedTaskMetaData &) const
 Given a meta data, compose an icon that will represent it's script type and whether or not it is a system script.
- Protected Member Functions inherited from makVrf::DtTreeWidget
virtual void scrollContentsBy (int, int)
virtual QSize sizeHint () const
 Need to do this as default sizeHint() for an abstract scroll area (in Qt 4.2.2) is too large.
virtual
QItemSelectionModel::SelectionFlags 
selectionCommand (const QModelIndex &index, const QEvent *event=0) const
 Override to allow empty selection in single selection mode.
virtual
QItemSelectionModel::SelectionFlags 
selectionBehaviorFlags () const

Protected Attributes

Doctrines myDoctrineItems
DtDoctrinesDialogmyParent
- Protected Attributes inherited from makVrf::DtScriptedTaskTreeWidget
bool myEditable
ScriptedTaskItems myScriptedTaskItems
- Protected Attributes inherited from makVrf::DtTreeWidget
bool myMouseRightClick
bool myAllowEmptySelection
bool myAllowWindowsStyleNameEdit
double myEditPressTime
makVrv::DtDemyDe
bool myEditingCanceled
QSize myMinimumSizeHint
QSize mySizeHint
bool myNextReleaseMightBeEdit
QTreeWidgetItemmyCheckForEditAfterTimer

Additional Inherited Members

- Public Types inherited from makVrf::DtScriptedTaskTreeWidget
typedef std::map
< QTreeWidgetItem
*, QTreeWidgetItem * > 
ScriptedTaskItem
typedef std::map< std::string,
ScriptedTaskItem
ScriptedTaskItems
- Signals inherited from makVrf::DtTreeWidget
void mouseLeftPressed (QTreeWidgetItem *, QMouseEvent *, int col)
 Emitted when the mouse button is pressed.
void rightClickOnItem (QTreeWidgetItem *, QMouseEvent *, int col)
 Emitted when right button is released.
void contentsMoving (int, int)
- Public Attributes inherited from makVrf::DtScriptedTaskTreeWidget
boost::signal< void()> signal_deleteRequested
- Protected Slots inherited from makVrf::DtTreeWidget
virtual void checkForEdit ()

Detailed Description

Dialog that allows for drag/drop from doctrines panel.

Member Typedef Documentation

typedef std::map<std::string, QTreeWidgetItem*> makVrf::DtDoctrinesTreeWidget::Doctrines
protected

Constructor & Destructor Documentation

makVrf::DtDoctrinesTreeWidget::DtDoctrinesTreeWidget ( makVrv::DtDe ,
DtDoctrinesDialog ,
QWidget *  parent 
)

CTOR.

virtual makVrf::DtDoctrinesTreeWidget::~DtDoctrinesTreeWidget ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrf::DtDoctrinesTreeWidget::setupDoctrines ( )
virtual

Fills the list with doctrines and assigns current scripted tasks that have those doctrines to them.

virtual bool makVrf::DtDoctrinesTreeWidget::selectedItemIsDoctrine ( ) const
virtual

Returns true if selected item is a doctrine item, and the only item selected.

virtual QTreeWidgetItem* makVrf::DtDoctrinesTreeWidget::selectedDoctrine ( ) const
virtual

Returns doctrine selected even if a child of the doctrine is selected.

virtual void makVrf::DtDoctrinesTreeWidget::scriptModified ( const std::string &  scriptId,
bool  modified 
)
virtual

Update doctrines root if needed.

Reimplemented from makVrf::DtScriptedTaskTreeWidget.

virtual void makVrf::DtDoctrinesTreeWidget::addScriptedTask ( const std::string &  scriptId)
virtual

Adds a new scripted task to the specified doctrine(s) that are part of the scripted task.

virtual QMimeData* makVrf::DtDoctrinesTreeWidget::mimeData ( const QList< QTreeWidgetItem * >  list) const
protectedvirtual

Create data of mime data to drop.

Reimplemented from makVrf::DtScriptedTaskTreeWidget.

virtual void makVrf::DtDoctrinesTreeWidget::dragEnterEvent ( QDragEnterEvent *  event)
protectedvirtual

Called when the mime data enters this area, return true if data can be decoded and dropped in the dialog.

Reimplemented from makVrf::DtScriptedTaskTreeWidget.

virtual void makVrf::DtDoctrinesTreeWidget::dragMoveEvent ( QDragMoveEvent *  event)
protectedvirtual

Enable if items can be dropped on current doctrine.

Reimplemented from makVrf::DtScriptedTaskTreeWidget.

virtual bool makVrf::DtDoctrinesTreeWidget::dropMimeData ( QTreeWidgetItem parent,
int  index,
const QMimeData mimeData,
Qt::DropAction  action 
)
protectedvirtual

Called when dropped. Add to doctrine dropped on top of.

Reimplemented from makVrf::DtScriptedTaskTreeWidget.

Member Data Documentation

Doctrines makVrf::DtDoctrinesTreeWidget::myDoctrineItems
protected
DtDoctrinesDialog* makVrf::DtDoctrinesTreeWidget::myParent
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)