add Scatter3D::removeGraphic
This commit is contained in:
@@ -109,6 +109,14 @@ void Scatter3D::addGraphic(const QColor & color, float pointSize, Mesh mesh, boo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Scatter3D::removeGraphic(int index) {
|
||||||
|
if (index < 0 || index >= graphics.size()) return;
|
||||||
|
canvas->removeSeries(graphics[index].series);
|
||||||
|
delete graphics[index].series;
|
||||||
|
graphics.remove(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Scatter3D::setLabelAutoRotation(bool on) {
|
void Scatter3D::setLabelAutoRotation(bool on) {
|
||||||
if (on) {
|
if (on) {
|
||||||
canvas->axisX()->setLabelAutoRotation(90);
|
canvas->axisX()->setLabelAutoRotation(90);
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ public slots:
|
|||||||
void setGraphicMeshSmooth(bool smooth, int index);
|
void setGraphicMeshSmooth(bool smooth, int index);
|
||||||
void setGraphicMeshSmooth(bool smooth) { setGraphicMeshSmooth(smooth, curGraphic); }
|
void setGraphicMeshSmooth(bool smooth) { setGraphicMeshSmooth(smooth, curGraphic); }
|
||||||
void addGraphic(const QColor & color = Qt::darkBlue, float pointSize = 1.f, Mesh mesh = Mesh::MeshSphere, bool meshSmooth = true);
|
void addGraphic(const QColor & color = Qt::darkBlue, float pointSize = 1.f, Mesh mesh = Mesh::MeshSphere, bool meshSmooth = true);
|
||||||
|
void removeGraphic(int index);
|
||||||
void clear() { setGraphicsCount(0); }
|
void clear() { setGraphicsCount(0); }
|
||||||
void setLabelAutoRotation(bool on);
|
void setLabelAutoRotation(bool on);
|
||||||
void setGraphicData(const QVector<QVector3D> & points, int index);
|
void setGraphicData(const QVector<QVector3D> & points, int index);
|
||||||
|
|||||||
Reference in New Issue
Block a user