<x>0</x>
<y>0</y>
<width>325</width>
- <height>131</height>
+ <height>214</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QGridLayout">
- <property name="margin">
- <number>2</number>
- </property>
- <property name="spacing">
- <number>2</number>
- </property>
- <item row="0" column="0" colspan="4">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0" colspan="2">
<widget class="QLabel" name="nameLabel">
<property name="text">
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
</property>
</widget>
</item>
- <item row="2" column="0" colspan="4">
+ <item row="1" column="0" colspan="2">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Coordinates are in mm</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0" colspan="5">
<widget class="QTableWidget" name="tableWidget">
<property name="columnCount">
<number>7</number>
<string>remove last landmark.</string>
</property>
<property name="text">
- <string/>
+ <string>1</string>
</property>
<property name="icon">
<iconset resource="../vvIcons.qrc">
</widget>
</item>
<item row="3" column="1">
- <spacer>
+ <widget class="QPushButton" name="removeAllButton">
+ <property name="text">
+ <string>All</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../vvIcons.qrc">
+ <normaloff>:/common/icons/standardbutton-cancel-16.png</normaloff>:/common/icons/standardbutton-cancel-16.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <spacer name="spacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
- <width>40</width>
+ <width>39</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
- <item row="3" column="2">
+ <item row="3" column="3">
<widget class="QPushButton" name="loadButton">
<property name="text">
<string>Load</string>
</property>
</widget>
</item>
- <item row="3" column="3">
+ <item row="3" column="4">
<widget class="QPushButton" name="saveButton">
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Coordinates are in mm</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
<resources>
}
//--------------------------------------------------------------------
+//--------------------------------------------------------------------
+void vvLandmarks::RemoveAll()
+{
+ for (unsigned int i = 0; i < mLandmarks.size(); i++) {
+ mLandmarks[i].clear();
+ mPoints[i]->SetNumberOfPoints(0);
+ mLabels[i]->SetNumberOfValues(0);
+ mIds[i]->SetNumberOfValues(0);
+ }
+}
+//--------------------------------------------------------------------
//--------------------------------------------------------------------
void vvLandmarks::ChangeComments(int index, std::string comments)
void AddLandmark(float x,float y,float z,float t,double value);
void RemoveLastLandmark();
void RemoveLandmark(int index);
+ void RemoveAll();
+
void ChangeComments(int index, std::string comments);
float* GetCoordinates(int index);
double GetPixelValue(int index);
connect(loadButton, SIGNAL(clicked()),this,SLOT(Load()));
connect(saveButton, SIGNAL(clicked()),this,SLOT(Save()));
connect(removeButton, SIGNAL(clicked()),this,SLOT(RemoveSelectedPoints()));
+ connect(removeAllButton, SIGNAL(clicked()),this,SLOT(RemoveAllPoints()));
connect(tableWidget,SIGNAL(cellChanged(int,int)),this,SLOT(CommentsChanged(int,int)));
}
}
}
+void vvLandmarksPanel::RemoveAllPoints()
+{
+ mCurrentLandmarks->RemoveAll();
+ tableWidget->clearContents();
+ tableWidget->setRowCount(0);
+ emit UpdateRenderWindows();
+}
+
void vvLandmarksPanel::AddPoint()
{
AddPoint(mCurrentLandmarks->GetNumberOfPoints()-1);
bool LoadFromFile(std::vector<std::string> file);
void Save();
void RemoveSelectedPoints();
+ void RemoveAllPoints();
void AddPoint();
void CommentsChanged(int row, int column);
signals: