Gui::TreeWidget Class Reference

Tree view that allows drag & drop of document objects. More...

#include <Tree.h>

Inheritance diagram for Gui::TreeWidget:
Gui::SelectionObserver

List of all members.

Public Member Functions

void scrollItemToTop (Gui::Document *)
void setItemsSelected (const QList< QTreeWidgetItem * > items, bool select)
 TreeWidget (QWidget *parent=0)
 ~TreeWidget ()

Static Public Attributes

static const int DocumentType = 1000
static const int ObjectType = 1001

Protected Slots

void onActivateDocument (QAction *)
void onCreateGroup ()
void onFinishEditing ()
void onRelabelObject ()
void onStartEditing ()

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *e)
void dragMoveEvent (QDragMoveEvent *event)
void drawRow (QPainter *, const QStyleOptionViewItem &, const QModelIndex &) const
void dropEvent (QDropEvent *event)
bool dropMimeData (QTreeWidgetItem *parent, int index, const QMimeData *data, Qt::DropAction action)
QMimeData * mimeData (const QList< QTreeWidgetItem * > items) const
void mouseDoubleClickEvent (QMouseEvent *event)
void onSelectionChanged (const SelectionChanges &msg)
 Observer message from the Selection.
Qt::DropActions supportedDropActions () const

Detailed Description

Tree view that allows drag & drop of document objects.

Author:
Werner Mayer

Definition at line 44 of file Tree.h.


Constructor & Destructor Documentation

TreeWidget::TreeWidget ( QWidget *  parent = 0  ) 
TreeWidget::~TreeWidget (  ) 

Definition at line 123 of file Gui/Tree.cpp.


Member Function Documentation

void TreeWidget::contextMenuEvent ( QContextMenuEvent *  e  )  [protected]
void TreeWidget::dragMoveEvent ( QDragMoveEvent *  event  )  [protected]
void TreeWidget::drawRow ( QPainter *  painter,
const QStyleOptionViewItem &  options,
const QModelIndex &  index 
) const [protected]

Definition at line 479 of file Gui/Tree.cpp.

void TreeWidget::dropEvent ( QDropEvent *  event  )  [protected]
bool TreeWidget::dropMimeData ( QTreeWidgetItem *  parent,
int  index,
const QMimeData *  data,
Qt::DropAction  action 
) [protected]

Definition at line 285 of file Gui/Tree.cpp.

QMimeData * TreeWidget::mimeData ( const QList< QTreeWidgetItem * >  items  )  const [protected]

Definition at line 314 of file Gui/Tree.cpp.

References App::DocumentObject::getDocument(), and ObjectType.

void TreeWidget::mouseDoubleClickEvent ( QMouseEvent *  event  )  [protected]
void TreeWidget::onActivateDocument ( QAction *  active  )  [protected, slot]
void TreeWidget::onCreateGroup (  )  [protected, slot]
void TreeWidget::onFinishEditing (  )  [protected, slot]
void TreeWidget::onRelabelObject (  )  [protected, slot]

Definition at line 238 of file Gui/Tree.cpp.

Referenced by TreeWidget().

void TreeWidget::onSelectionChanged ( const SelectionChanges msg  )  [protected, virtual]
void TreeWidget::onStartEditing (  )  [protected, slot]
void TreeWidget::scrollItemToTop ( Gui::Document doc  ) 

Definition at line 565 of file Gui/Tree.cpp.

References ObjectType.

void TreeWidget::setItemsSelected ( const QList< QTreeWidgetItem * >  items,
bool  select 
)

Definition at line 681 of file Gui/Tree.cpp.

Qt::DropActions TreeWidget::supportedDropActions (  )  const [protected]

Definition at line 291 of file Gui/Tree.cpp.


Member Data Documentation

const int TreeWidget::DocumentType = 1000 [static]
const int TreeWidget::ObjectType = 1001 [static]

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

Generated on Wed Nov 23 19:02:04 2011 for FreeCAD by  doxygen 1.6.1