Public Member Functions

QmitkDataNodeSelection Class Reference

#include <QmitkDataNodeSelection.h>

Inheritance diagram for QmitkDataNodeSelection:
Inheritance graph
[legend]
Collaboration diagram for QmitkDataNodeSelection:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 berryObjectMacro (QmitkDataNodeSelection)
 QmitkDataNodeSelection ()
 QmitkDataNodeSelection (const QItemSelection &sel)
virtual berry::Object::Pointer GetFirstElement () const
virtual iterator Begin () const
virtual iterator End () const
virtual int Size () const
virtual ContainerType::Pointer ToVector () const
bool IsEmpty () const
bool operator== (const berry::Object *obj) const

Detailed Description

Definition at line 25 of file QmitkDataNodeSelection.h.


Constructor & Destructor Documentation

QmitkDataNodeSelection::QmitkDataNodeSelection (  )

Definition at line 25 of file QmitkDataNodeSelection.cpp.

{

}
QmitkDataNodeSelection::QmitkDataNodeSelection ( const QItemSelection &  sel )

Definition at line 30 of file QmitkDataNodeSelection.cpp.

References mitk::DataNodeSelection::m_Selection, and QmitkDataNodeRole.

                               :
  mitk::DataNodeSelection(), berry::QtItemSelection(sel)
{
  QModelIndexList indexes = sel.indexes();
  for (QModelIndexList::const_iterator index = indexes.constBegin(); index
      != indexes.constEnd(); ++index)
  {
    QVariant data = index->data(QmitkDataNodeRole);
    mitk::DataNode::Pointer node =
        data.value<mitk::DataNode::Pointer> ();
    if (node.IsNotNull())
    {
      berry::Object::Pointer obj(new mitk::DataNodeObject(node));
      mitk::DataNodeSelection::m_Selection->push_back(obj);
    }
  }
}

Member Function Documentation

QmitkDataNodeSelection::iterator QmitkDataNodeSelection::Begin (  ) const [virtual]

Reimplemented from berry::QtItemSelection.

Definition at line 54 of file QmitkDataNodeSelection.cpp.

QmitkDataNodeSelection::berryObjectMacro ( QmitkDataNodeSelection   )
QmitkDataNodeSelection::iterator QmitkDataNodeSelection::End (  ) const [virtual]

Reimplemented from berry::QtItemSelection.

Definition at line 59 of file QmitkDataNodeSelection.cpp.

berry::Object::Pointer QmitkDataNodeSelection::GetFirstElement (  ) const [virtual]

Reimplemented from berry::QtItemSelection.

Definition at line 49 of file QmitkDataNodeSelection.cpp.

bool QmitkDataNodeSelection::IsEmpty (  ) const [virtual]
See also:
berry::ISelection::IsEmpty()

Reimplemented from berry::QtItemSelection.

Definition at line 74 of file QmitkDataNodeSelection.cpp.

bool QmitkDataNodeSelection::operator== ( const berry::Object obj ) const [virtual]

Reimplemented from berry::QtItemSelection.

Definition at line 79 of file QmitkDataNodeSelection.cpp.

int QmitkDataNodeSelection::Size (  ) const [virtual]

Reimplemented from berry::QtItemSelection.

Definition at line 64 of file QmitkDataNodeSelection.cpp.

QmitkDataNodeSelection::ContainerType::Pointer QmitkDataNodeSelection::ToVector (  ) const [virtual]

Reimplemented from berry::QtItemSelection.

Definition at line 69 of file QmitkDataNodeSelection.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines