VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Signals | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions
makVrf::DtPlanTreeWidget Class Reference

This class will support the listing of plan items and the dragging/dropping thereof. More...

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

Signals

void editCurrentlySelectedPlanStatement ()
void deleteCurrentlySelectedPlanStatement ()
void copyCurrentlySelectedPlanStatement ()
void pastePlanStatement ()
void planRightClickMenuCreated (QMenu *)
void rightClickToBeShown ()
void editCurrentlySelectedTrigger ()
- 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 Member Functions

 DtPlanTreeWidget (makVrv::DtDe &, QWidget *parent=NULL)
 default constructor
virtual ~DtPlanTreeWidget ()
 destructor
virtual DtPlanListBoxItemcurrentItem () const
 Accessors for plan items.
virtual bool hasItem (const DtPlanListBoxItem *)
 Returns true if this item is here.
virtual void print ()
 Prints the current plan.
virtual void setName (const DtUUID &)
 The plan's name (used for printing)
const DtUUIDname () const
virtual void displayPlan (bool andSelectStatement=true)
 Display the specified plan in this tree widget.
virtual void setIsGlobalPlan (bool)
 Sets whether or not this plan represents a global plan.
virtual void clearAllStatements ()
 Clears all but the top item which identifies the plan.
virtual void copySelectedPlanStatementToClipboard ()
 Copies the entire plan (if top level or no item selected) or the currently selected plan item to the clip board.
virtual void copyPlanToClipboard ()
 Copies entire plan to clipboard.
virtual void addStatementsToPlan (const std::vector< DtSimStatement * > &, bool append, bool redisplay=true)
 Adds the given statements to the plan.
virtual void addStatementAfter (DtSimStatement *stmt, const DtPlanListBoxItem *listItem=0, bool redisplay=true)
 Adds the given statement after the supplied statement (or the beginning if no supplied statement)
virtual void replaceStatement (DtSimStatement *stmt, DtPlanListBoxItem *item)
 Replaces the plans list box item with the given statement. This will also change the statement in the plan.
virtual bool deleteStatement (const DtPlanListBoxItem *)
 Deletes the statement in the plan and the list box item that is part of this plan.
virtual bool isBeingDragged (QTreeWidgetItem *) const
virtual void setPlan (DtPlan *)
 Sets and displays the given plan.
virtual DtPlanplan ()
virtual const DtPlanplan () const
virtual DtPlangetOrCreatePlan ()
virtual void setCanDropOn (int, bool)
 Sets weather or not the item can have something dropped on it for insert.
virtual bool canDropOn (int) const
virtual bool canDropOn (QTreeWidgetItem *) const
virtual bool canDropOnCurrentItem () const
bool clearing () const
virtual DtSimStatementselectStatement (int, bool andMakeCurrent=false)
 Selects the plan statement that has the given statement index.
virtual DtPlanListBoxItemfindItemByIndex (int statementIndex, int subBlock=0)
 Returns the list box item which represents the statement refered to by the provided index number.
virtual void setIsComplete (bool)
 Sets whether or not the plan is complete.
virtual void addPlanMimeDataAfter (const QMimeData *, DtPlanListBoxItem *, bool redisplay=true)
 Given the mime data, if tehre is a plan in there, pastes it after the supplied list item.
virtual DtPlanListBoxItemfindLastItemByIndex (int statementIndex, int subBlock=0)
 Returns the last item in the list that has the specified statement index.
virtual void setPlanTitle (const QString &)
virtual const QString & planTitle () const
virtual bool planIsModified () const
virtual void clearPlanIsModified ()
virtual void markPlanIsModified ()
virtual DtSimStatementselectedBlockStatement () const
 If within a block, that selected blocks statement.
virtual DtSimStatementselectedStatement () const
 Selected items statement.
virtual DtSimStatementdisplayBlockStatement () const
 ActiveBlockStatement or selectedBlockStatement, if active block is null.
virtual void setShowRightClickMenu (bool)
bool showRightClickMenu () const
virtual QString planDescriptiveName () const
virtual void removeTrigger (const DtUUID &)
 Removes trigger.
virtual void renameTrigger (const DtUUID &uuid, const DtString &newName)
 Renames trigger.
virtual void unusedTriggers (DtRwTriggersList &) const
virtual DtPlanListBoxItemcreatePlanListBoxItem (DtSimBlock *, const QString &name, int step=-1)
 Creates a new plan list box item.
virtual DtPlanListBoxItemcreatePlanListBoxItem (DtSimBlock *, const DtPlanListBoxItem *parentItem, const DtStmtIndex &, const QString &indent, int step=-1)
bool dragDraw () const
virtual void selectLastStatement ()
 If there is one, selects the last statement.
virtual int currentCursor ()
 The index of the currently selected item (including children)
int currentStatementIndex () const
 Current statment index.
virtual void selectCursor (int)
 Sets the currently selected item from the cursor.
- 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 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 mousePressEvent (QMouseEvent *event)
virtual void mouseReleaseEvent (QMouseEvent *event)
virtual void itemLeftClickedOn (QTreeWidgetItem *, QMouseEvent *, int)
virtual bool editingCanceled () const

Public Attributes

boost::signal< void(bool)> signal_planIsModified
boost::signal< void()> signal_addedTriggers
QMenumyRightClickMenu
QActionmyEditAction
QActionmyEditTriggerAction
QActionmyDeleteAction
QActionmyCopyAction
QActionmyPasteAction

Protected Member Functions

virtual void initializeRightClickMenu ()
virtual void resizeEvent (QResizeEvent *)
virtual DtPlanListBoxItemdisplayStatement (DtSimBlock *block, const DtStmtIndex &stmt, const DtPlanListBoxItem *parentItem, int &step)
virtual void displayBlock (DtSimBlock *block, const DtPlanListBoxItem *parentItem, int &step)
virtual QMimeDatamimeData (const QList< QTreeWidgetItem * > list) const
virtual void dragEnterEvent (QDragEnterEvent *event)
virtual void dragMoveEvent (QDragMoveEvent *event)
virtual bool dropMimeData (QTreeWidgetItem *parent, int index, const QMimeData *mimeData, Qt::DropAction action)
virtual void dropEvent (QDropEvent *event)
virtual void dragLeaveEvent (QDragLeaveEvent *)
virtual void reissueStatementIds (DtSimStatement *stmt)
 When copying a subblock of statements the clone function of the simstatement doesn't add new statementIds so we have to do that afterwards.
virtual void removeLastDraggedItems ()
 The last items that were dragged will be removed from the plan.
virtual void startDrag (Qt::DropActions supportedActions)
virtual bool eventFilter (QObject *o, QEvent *)
virtual void setPlanIsModified (bool)
 Sets whether or not plan is modified. If status change signal_planIsModified is sent.
virtual void itemRightClickedOn (QTreeWidgetItem *, QMouseEvent *, int col)
virtual void addTriggersFromBlock (DtSimBlock *, DtRwTriggersList &, std::set< DtUUID > &visited) const
virtual void addTriggersFromStatement (DtSimStatement *, DtRwTriggersList &, std::set< DtUUID > &visited) const
virtual void unusedTriggers (DtSimBlock *, DtRwTriggersList &, std::set< DtUUID > &visited) const
- 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

bool myIsGlobalPlan
DtUUID myName
DtPlanmyPlan
int myCurrentStatementIndex
QList< QTreeWidgetItem * > myLastDraggedItems
DtPlanListBoxItemmyDraggingOver
bool myPlanIsModified
bool myShowRightClickMenu
bool myFirstShow
QString myPlanTitle
bool myDragDraw
bool myClearing
int myProposedAction
- Protected Attributes inherited from makVrf::DtTreeWidget
bool myMouseRightClick
bool myAllowEmptySelection
makVrv::DtDemyDe
bool myEditingCanceled
QSize myMinimumSizeHint

Private Member Functions

 DtPlanTreeWidget (const DtPlanTreeWidget &orig)
 copy constructor. Not Implemented.
DtPlanTreeWidgetoperator= (const DtPlanTreeWidget &rhs)
 assignment operator. Not Implemented.

Detailed Description

This class will support the listing of plan items and the dragging/dropping thereof.

Constructor & Destructor Documentation

makVrf::DtPlanTreeWidget::DtPlanTreeWidget ( makVrv::DtDe ,
QWidget parent = NULL 
)

default constructor

virtual makVrf::DtPlanTreeWidget::~DtPlanTreeWidget ( )
virtual

destructor

makVrf::DtPlanTreeWidget::DtPlanTreeWidget ( const DtPlanTreeWidget orig)
private

copy constructor. Not Implemented.

Member Function Documentation

virtual DtPlanListBoxItem* makVrf::DtPlanTreeWidget::currentItem ( ) const
virtual

Accessors for plan items.

virtual bool makVrf::DtPlanTreeWidget::hasItem ( const DtPlanListBoxItem )
virtual

Returns true if this item is here.

virtual void makVrf::DtPlanTreeWidget::print ( )
virtual

Prints the current plan.

virtual void makVrf::DtPlanTreeWidget::setName ( const DtUUID )
virtual

The plan's name (used for printing)

const DtUUID& makVrf::DtPlanTreeWidget::name ( ) const
virtual void makVrf::DtPlanTreeWidget::displayPlan ( bool  andSelectStatement = true)
virtual

Display the specified plan in this tree widget.

virtual void makVrf::DtPlanTreeWidget::setIsGlobalPlan ( bool  )
virtual

Sets whether or not this plan represents a global plan.

Used for determining how to display plan name

virtual void makVrf::DtPlanTreeWidget::clearAllStatements ( )
virtual

Clears all but the top item which identifies the plan.

virtual void makVrf::DtPlanTreeWidget::copySelectedPlanStatementToClipboard ( )
virtual

Copies the entire plan (if top level or no item selected) or the currently selected plan item to the clip board.

virtual void makVrf::DtPlanTreeWidget::copyPlanToClipboard ( )
virtual

Copies entire plan to clipboard.

virtual void makVrf::DtPlanTreeWidget::addStatementsToPlan ( const std::vector< DtSimStatement * > &  ,
bool  append,
bool  redisplay = true 
)
virtual

Adds the given statements to the plan.

If no plan exists creates one. Also adds to the list box. If append is false will clear current plan and reset with given statements

virtual void makVrf::DtPlanTreeWidget::addStatementAfter ( DtSimStatement stmt,
const DtPlanListBoxItem listItem = 0,
bool  redisplay = true 
)
virtual

Adds the given statement after the supplied statement (or the beginning if no supplied statement)

virtual void makVrf::DtPlanTreeWidget::replaceStatement ( DtSimStatement stmt,
DtPlanListBoxItem item 
)
virtual

Replaces the plans list box item with the given statement. This will also change the statement in the plan.

virtual bool makVrf::DtPlanTreeWidget::deleteStatement ( const DtPlanListBoxItem )
virtual

Deletes the statement in the plan and the list box item that is part of this plan.

virtual bool makVrf::DtPlanTreeWidget::isBeingDragged ( QTreeWidgetItem ) const
virtual
virtual void makVrf::DtPlanTreeWidget::setPlan ( DtPlan )
virtual

Sets and displays the given plan.

virtual DtPlan* makVrf::DtPlanTreeWidget::plan ( )
inlinevirtual
virtual const DtPlan* makVrf::DtPlanTreeWidget::plan ( ) const
inlinevirtual
virtual DtPlan* makVrf::DtPlanTreeWidget::getOrCreatePlan ( )
virtual
virtual void makVrf::DtPlanTreeWidget::setCanDropOn ( int  ,
bool   
)
virtual

Sets weather or not the item can have something dropped on it for insert.

virtual bool makVrf::DtPlanTreeWidget::canDropOn ( int  ) const
virtual
virtual bool makVrf::DtPlanTreeWidget::canDropOn ( QTreeWidgetItem ) const
virtual
virtual bool makVrf::DtPlanTreeWidget::canDropOnCurrentItem ( ) const
virtual
bool makVrf::DtPlanTreeWidget::clearing ( ) const
inline
virtual DtSimStatement* makVrf::DtPlanTreeWidget::selectStatement ( int  ,
bool  andMakeCurrent = false 
)
virtual

Selects the plan statement that has the given statement index.

virtual DtPlanListBoxItem* makVrf::DtPlanTreeWidget::findItemByIndex ( int  statementIndex,
int  subBlock = 0 
)
virtual

Returns the list box item which represents the statement refered to by the provided index number.

virtual void makVrf::DtPlanTreeWidget::setIsComplete ( bool  )
virtual

Sets whether or not the plan is complete.

virtual void makVrf::DtPlanTreeWidget::addPlanMimeDataAfter ( const QMimeData ,
DtPlanListBoxItem ,
bool  redisplay = true 
)
virtual

Given the mime data, if tehre is a plan in there, pastes it after the supplied list item.

If no plan item is given adds to end of plan

virtual DtPlanListBoxItem* makVrf::DtPlanTreeWidget::findLastItemByIndex ( int  statementIndex,
int  subBlock = 0 
)
virtual

Returns the last item in the list that has the specified statement index.

virtual void makVrf::DtPlanTreeWidget::setPlanTitle ( const QString &  )
virtual
virtual const QString& makVrf::DtPlanTreeWidget::planTitle ( ) const
virtual
virtual bool makVrf::DtPlanTreeWidget::planIsModified ( ) const
virtual
virtual void makVrf::DtPlanTreeWidget::clearPlanIsModified ( )
virtual
virtual void makVrf::DtPlanTreeWidget::markPlanIsModified ( )
virtual
virtual DtSimStatement* makVrf::DtPlanTreeWidget::selectedBlockStatement ( ) const
virtual

If within a block, that selected blocks statement.

virtual DtSimStatement* makVrf::DtPlanTreeWidget::selectedStatement ( ) const
virtual

Selected items statement.

virtual DtSimStatement* makVrf::DtPlanTreeWidget::displayBlockStatement ( ) const
virtual

ActiveBlockStatement or selectedBlockStatement, if active block is null.

virtual void makVrf::DtPlanTreeWidget::setShowRightClickMenu ( bool  )
virtual
bool makVrf::DtPlanTreeWidget::showRightClickMenu ( ) const
inline
virtual QString makVrf::DtPlanTreeWidget::planDescriptiveName ( ) const
virtual
virtual void makVrf::DtPlanTreeWidget::removeTrigger ( const DtUUID )
virtual

Removes trigger.

virtual void makVrf::DtPlanTreeWidget::renameTrigger ( const DtUUID uuid,
const DtString newName 
)
virtual

Renames trigger.

virtual void makVrf::DtPlanTreeWidget::unusedTriggers ( DtRwTriggersList ) const
virtual
virtual DtPlanListBoxItem* makVrf::DtPlanTreeWidget::createPlanListBoxItem ( DtSimBlock ,
const QString &  name,
int  step = -1 
)
virtual

Creates a new plan list box item.

virtual DtPlanListBoxItem* makVrf::DtPlanTreeWidget::createPlanListBoxItem ( DtSimBlock ,
const DtPlanListBoxItem parentItem,
const DtStmtIndex ,
const QString &  indent,
int  step = -1 
)
virtual
bool makVrf::DtPlanTreeWidget::dragDraw ( ) const
inline
virtual void makVrf::DtPlanTreeWidget::selectLastStatement ( )
virtual

If there is one, selects the last statement.

virtual int makVrf::DtPlanTreeWidget::currentCursor ( )
virtual

The index of the currently selected item (including children)

int makVrf::DtPlanTreeWidget::currentStatementIndex ( ) const
inline

Current statment index.

virtual void makVrf::DtPlanTreeWidget::selectCursor ( int  )
virtual

Sets the currently selected item from the cursor.

If cursor > number of items then last statement is selected

virtual void makVrf::DtPlanTreeWidget::initializeRightClickMenu ( )
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::resizeEvent ( QResizeEvent *  )
protectedvirtual
virtual DtPlanListBoxItem* makVrf::DtPlanTreeWidget::displayStatement ( DtSimBlock block,
const DtStmtIndex stmt,
const DtPlanListBoxItem parentItem,
int step 
)
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::displayBlock ( DtSimBlock block,
const DtPlanListBoxItem parentItem,
int step 
)
protectedvirtual
virtual QMimeData* makVrf::DtPlanTreeWidget::mimeData ( const QList< QTreeWidgetItem * >  list) const
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::dragEnterEvent ( QDragEnterEvent *  event)
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::dragMoveEvent ( QDragMoveEvent *  event)
protectedvirtual
virtual bool makVrf::DtPlanTreeWidget::dropMimeData ( QTreeWidgetItem parent,
int  index,
const QMimeData mimeData,
Qt::DropAction  action 
)
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::dropEvent ( QDropEvent *  event)
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::dragLeaveEvent ( QDragLeaveEvent *  )
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::reissueStatementIds ( DtSimStatement stmt)
protectedvirtual

When copying a subblock of statements the clone function of the simstatement doesn't add new statementIds so we have to do that afterwards.

virtual void makVrf::DtPlanTreeWidget::removeLastDraggedItems ( )
protectedvirtual

The last items that were dragged will be removed from the plan.

virtual void makVrf::DtPlanTreeWidget::startDrag ( Qt::DropActions  supportedActions)
protectedvirtual
virtual bool makVrf::DtPlanTreeWidget::eventFilter ( QObject o,
QEvent *   
)
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::setPlanIsModified ( bool  )
protectedvirtual

Sets whether or not plan is modified. If status change signal_planIsModified is sent.

virtual void makVrf::DtPlanTreeWidget::itemRightClickedOn ( QTreeWidgetItem ,
QMouseEvent *  ,
int  col 
)
protectedvirtual

Reimplemented from makVrf::DtTreeWidget.

virtual void makVrf::DtPlanTreeWidget::addTriggersFromBlock ( DtSimBlock ,
DtRwTriggersList ,
std::set< DtUUID > &  visited 
) const
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::addTriggersFromStatement ( DtSimStatement ,
DtRwTriggersList ,
std::set< DtUUID > &  visited 
) const
protectedvirtual
virtual void makVrf::DtPlanTreeWidget::unusedTriggers ( DtSimBlock ,
DtRwTriggersList ,
std::set< DtUUID > &  visited 
) const
protectedvirtual
void makVrf::DtPlanTreeWidget::editCurrentlySelectedPlanStatement ( )
signal
void makVrf::DtPlanTreeWidget::deleteCurrentlySelectedPlanStatement ( )
signal
void makVrf::DtPlanTreeWidget::copyCurrentlySelectedPlanStatement ( )
signal
void makVrf::DtPlanTreeWidget::pastePlanStatement ( )
signal
void makVrf::DtPlanTreeWidget::planRightClickMenuCreated ( QMenu )
signal
void makVrf::DtPlanTreeWidget::rightClickToBeShown ( )
signal
void makVrf::DtPlanTreeWidget::editCurrentlySelectedTrigger ( )
signal
DtPlanTreeWidget& makVrf::DtPlanTreeWidget::operator= ( const DtPlanTreeWidget rhs)
private

assignment operator. Not Implemented.

Member Data Documentation

boost::signal<void (bool)> makVrf::DtPlanTreeWidget::signal_planIsModified
boost::signal<void ()> makVrf::DtPlanTreeWidget::signal_addedTriggers
QMenu* makVrf::DtPlanTreeWidget::myRightClickMenu
QAction* makVrf::DtPlanTreeWidget::myEditAction
QAction* makVrf::DtPlanTreeWidget::myEditTriggerAction
QAction* makVrf::DtPlanTreeWidget::myDeleteAction
QAction* makVrf::DtPlanTreeWidget::myCopyAction
QAction* makVrf::DtPlanTreeWidget::myPasteAction
bool makVrf::DtPlanTreeWidget::myIsGlobalPlan
protected
DtUUID makVrf::DtPlanTreeWidget::myName
protected
DtPlan* makVrf::DtPlanTreeWidget::myPlan
protected
int makVrf::DtPlanTreeWidget::myCurrentStatementIndex
protected
QList<QTreeWidgetItem*> makVrf::DtPlanTreeWidget::myLastDraggedItems
protected
DtPlanListBoxItem* makVrf::DtPlanTreeWidget::myDraggingOver
protected
bool makVrf::DtPlanTreeWidget::myPlanIsModified
protected
bool makVrf::DtPlanTreeWidget::myShowRightClickMenu
protected
bool makVrf::DtPlanTreeWidget::myFirstShow
protected
QString makVrf::DtPlanTreeWidget::myPlanTitle
protected
bool makVrf::DtPlanTreeWidget::myDragDraw
protected
bool makVrf::DtPlanTreeWidget::myClearing
protected
int makVrf::DtPlanTreeWidget::myProposedAction
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)