VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrf::DtScriptedTaskTreeWidget Class Reference

This class manages scripted tasks and allows for drag/drop of task for folder manipulation. More...

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

Public Member Functions

 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 QSize sizeHint (QTreeWidgetItem *) const
 Returns the size hint of the item, inclusive of icon and leveling.
- Public Member Functions inherited from makVrf::DtTreeWidget
 DtTreeWidget (QWidget *parent)
 Constructor.
virtual QTreeWidgetItemlastItem () const
 Returns the last item in the list.
QTreeWidgetItemitemFromIndex (const QModelIndex &idx)
QModelIndex indexFromItem (QTreeWidgetItem *item, int column=0) const
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

Public Attributes

boost::signal< void()> signal_deleteRequested

Protected Member Functions

virtual QMimeDatamimeData (const QList< QTreeWidgetItem * > list) const
 Returns the mime data of the items that are selected for dragging.
virtual void dragEnterEvent (QDragEnterEvent *event)
 Called when the mime data enters this area, return true if data can be decoded.
virtual void dragMoveEvent (QDragMoveEvent *event)
 Accept event if the dragged items can be dropped on the tree widget item they are over.
virtual void dropItems (const QStringList &, QTreeWidgetItem *)
 Drop the items on the supplied tree widget item.
virtual bool dropMimeData (QTreeWidgetItem *parent, int index, const QMimeData *mimeData, Qt::DropAction action)
 Return true if data can be dropped.
virtual void keyPressEvent (QKeyEvent *)
 Override for delete key press.
- Protected Member Functions inherited from makVrf::DtTreeWidget
virtual void mousePressEvent (QMouseEvent *event)
virtual void mouseReleaseEvent (QMouseEvent *event)
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

makVrv::DtDemyDe
- Protected Attributes inherited from makVrf::DtTreeWidget
bool myMouseRightClick
bool myAllowEmptySelection

Additional Inherited Members

- 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)

Detailed Description

This class manages scripted tasks and allows for drag/drop of task for folder manipulation.

Constructor & Destructor Documentation

makVrf::DtScriptedTaskTreeWidget::DtScriptedTaskTreeWidget ( makVrv::DtDe de,
QWidget parent 
)

CTOR.

virtual makVrf::DtScriptedTaskTreeWidget::~DtScriptedTaskTreeWidget ( )
virtual

DTOR.

Member Function Documentation

virtual bool makVrf::DtScriptedTaskTreeWidget::selectedScriptIsSystemScript ( ) const
virtual

Returns true if the selected script is a system script.

virtual bool makVrf::DtScriptedTaskTreeWidget::selectedItemIsFolder ( ) const
virtual

Returns true if the selected item is a folder.

virtual bool makVrf::DtScriptedTaskTreeWidget::itemIsFolder ( QTreeWidgetItem ) const
virtual

Returns true if the item is a folder.

virtual bool makVrf::DtScriptedTaskTreeWidget::allSelectedItemsAreScripts ( ) const
virtual

Returns true if all the selected items are scripts.

virtual QString makVrf::DtScriptedTaskTreeWidget::getFolderName ( QTreeWidgetItem ,
const QString &  current = "" 
)
virtual

Returns a folder name that is unique for the given root, or an empty name if none given.

virtual QTreeWidgetItem* makVrf::DtScriptedTaskTreeWidget::addFolder ( QTreeWidgetItem root,
const QString &  ,
bool  select = true 
)
virtual

Adds a folder to the particular root.

virtual bool makVrf::DtScriptedTaskTreeWidget::systemScriptsInFolder ( QTreeWidgetItem ) const
virtual

Returns true if there are any system scripts in the given folder or sub-folders.

virtual bool makVrf::DtScriptedTaskTreeWidget::selectedItemCanEditScript ( ) const
virtual

Returns true if the selected item can edit a script.

virtual QTreeWidgetItem* makVrf::DtScriptedTaskTreeWidget::findScriptItem ( const QString &  scriptId)
virtual

Returns the item that represents the script or NULL.

virtual QTreeWidgetItem* makVrf::DtScriptedTaskTreeWidget::findFolder ( const QString &  path,
QTreeWidgetItem root = 0 
)
virtual

Returns the folder that is the item at the end of the path.

If root is 0, invisibleRootItem is used

virtual void makVrf::DtScriptedTaskTreeWidget::setFolderPaths ( QTreeWidgetItem )
virtual

Sets the folder path for all items (except system scripts) in this folder and sub-folders.

virtual std::string makVrf::DtScriptedTaskTreeWidget::folderPathToItem ( QTreeWidgetItem ) const
virtual

Returns the folder path to the given item.

If the item is a folder will include that item in the path

virtual std::string makVrf::DtScriptedTaskTreeWidget::folderPathToSelectedItem ( ) const
virtual

Returns the folder path to the currently selected item.

virtual std::vector<std::string> makVrf::DtScriptedTaskTreeWidget::scriptIdsInFolder ( QTreeWidgetItem ) const
virtual

Returns a vector of all the script ids in the folder recursively.

virtual QSize makVrf::DtScriptedTaskTreeWidget::sizeHint ( QTreeWidgetItem ) const
virtual

Returns the size hint of the item, inclusive of icon and leveling.

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

Returns the mime data of the items that are selected for dragging.

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

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

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

Accept event if the dragged items can be dropped on the tree widget item they are over.

virtual void makVrf::DtScriptedTaskTreeWidget::dropItems ( const QStringList &  ,
QTreeWidgetItem  
)
protectedvirtual

Drop the items on the supplied tree widget item.

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

Return true if data can be dropped.

virtual void makVrf::DtScriptedTaskTreeWidget::keyPressEvent ( QKeyEvent *  )
protectedvirtual

Override for delete key press.

Member Data Documentation

boost::signal<void ()> makVrf::DtScriptedTaskTreeWidget::signal_deleteRequested
makVrv::DtDe& makVrf::DtScriptedTaskTreeWidget::myDe
protected

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

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)