ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
vtkplotpiewidget.cpp
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #include "vtkplotpiewidget.h"
9 
10 #include <vtkChartPie.h>
11 #include <vtkContextScene.h>
12 #include <vtkContextView.h>
13 
14 #include "vtkutils.h"
15 
16 namespace VtkUtils {
17 
18 class VtkPlotPieWidgetPrivate {
19 public:
21 };
22 
24  d_ptr = new VtkPlotPieWidgetPrivate;
25 }
26 
28 
29 vtkContextItem* VtkPlotPieWidget::chart() const {
30  vtkInitOnce(d_ptr->chart);
31  contextView()->GetScene()->AddItem(d_ptr->chart);
32  return d_ptr->chart;
33 }
34 
35 } // namespace VtkUtils
vtkContextItem * chart() const
VtkPlotPieWidget(QWidget *parent=nullptr)
vtkContextView * contextView() const
void vtkInitOnce(T **obj)
Definition: vtkutils.h:44