26 : QListWidget(parent), m_TimeStep(0), m_SelfCall(false), m_MultiWidget(nullptr)
28 QListWidget::setAlternatingRowColors(
true);
31 QListWidget::setSelectionBehavior(QAbstractItemView::SelectRows);
32 QListWidget::setSelectionMode(QAbstractItemView::SingleSelection);
34 connect(
this, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
this, SLOT(
OnItemDoubleClicked(QListWidgetItem *)));
60 auto onPointSetDeleted = itk::SimpleMemberCommand<QmitkPointListViewWidget>::New();
64 auto onPointSetModified = itk::SimpleMemberCommand<QmitkPointListViewWidget>::New();
114 _EditPointDialog.exec();
152 selectedID = pointSet->SearchSelectedPoint(
m_TimeStep);
155 pointSet->ExecuteOperation(doOp);
167 selectedID = pointSet->SearchSelectedPoint(
m_TimeStep);
170 pointSet->ExecuteOperation(doOp);
182 selectedID = pointSet->SearchSelectedPoint(
m_TimeStep);
185 pointSet->ExecuteOperation(doOp);
206 mitk::PointSet::DataType::Pointer pointset = pointSet->GetPointSet(
m_TimeStep);
207 for (mitk::PointSet::PointsContainer::Iterator it = pointset->GetPoints()->Begin();
208 it != pointset->GetPoints()->End();
211 text = QString(
"%0: (%1, %2, %3)")
213 .arg(it.Value().GetElement(0), 0,
'f', 3)
214 .arg(it.Value().GetElement(1), 0,
'f', 3)
215 .arg(it.Value().GetElement(2), 0,
'f', 3);
217 if (i == this->count())
220 this->item(i)->setText(text);
222 if (currentRowChanged)
224 if (i == this->currentRow())
225 pointSet->SetSelectInfo(this->currentRow(),
true,
m_TimeStep);
227 pointSet->SetSelectInfo(it->Index(),
false,
m_TimeStep);
233 while (pointSet->GetPointSet(
m_TimeStep)->GetPoints()->Size() < (
unsigned int)this->count())
235 QListWidgetItem *item = this->takeItem(this->count() - 1);
240 if (!currentRowChanged)
242 if (pointSet->GetNumberOfSelected(
m_TimeStep) > 1)
245 std::cerr <<
"Point set has multiple selected points. This view is not designed for more than one selected point." 249 int selectedIndex = pointSet->SearchSelectedPoint(
m_TimeStep);
250 if (selectedIndex != -1)
252 this->setCurrentRow(selectedIndex);
A dialog for editing points directly (coordinates) via TextEdits.
itk::SmartPointer< T > Lock() const
Constants for most interaction classes, due to the generic StateMachines.
DataType::PointIdentifier PointIdentifier
Data structure which stores a set of points. Superclass of mitk::Mesh.
static RenderingManager * GetInstance()
bool IsExpired() const noexcept
Operation that handles all actions on one Point.
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
void SetPoint(mitk::PointSet *_PointSet, mitk::PointSet::PointIdentifier _PointId, int timestep=0)