NDEVR
API Documentation
SmoothButton.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: SmoothButton
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/DesignObjectWidgetInterface.h>
34#include <QWidget>
35class QRadioButton;
36namespace NDEVR
37{
38 class Button;
39 class Toggle;
40 class QCustomLineEdit;
41 class QCustomComboBox;
45 class SmoothDialog : public QWidget, public DesignObjectWidgetInterface
46 {
47 Q_OBJECT
48 public:
53 SmoothDialog(QWidget* parent = nullptr);
55 void setup();
56 public slots:
59 public:
61 void performSmoothing() const;
62
63 signals:
65 protected:
66 Toggle* m_retain_size = nullptr;
71 QRadioButton* m_no_smoothing = nullptr;
72 QRadioButton* m_light_smoothing = nullptr;
73 QRadioButton* m_normal_smoothing = nullptr;
74 QRadioButton* m_heavy_smoothing = nullptr;
75 QRadioButton* m_max_smoothing = nullptr;
79 };
80}
A core widget that allows the user to click one of many button types.
Definition Button.h:68
A compact way to present a list of options to the user.
A line edit allows users to enter and edit a single line of plain text with useful editing functions,...
bool m_has_pending
Whether a smoothing operation is pending.
QRadioButton * m_normal_smoothing
Radio button for normal smoothing intensity.
void valueChanged()
Handles changes to any smoothing parameter.
bool m_include_smooth_types
Whether the smoothing type selector is shown.
QRadioButton * m_heavy_smoothing
Radio button for heavy smoothing.
void requestSettingsSignal()
Emitted when the user requests to configure smoothing settings.
QRadioButton * m_max_smoothing
Radio button for maximum smoothing.
QRadioButton * m_light_smoothing
Radio button for light smoothing.
QCustomLineEdit * m_smooth_normals_angle
Line edit for the normal smoothing angle threshold.
Toggle * m_retain_size
Toggle for retaining original mesh size after smoothing.
void performSmoothing() const
Executes the smoothing operation on the target objects.
TimeSpan m_animation_time
Duration of the smoothing animation.
Toggle * m_smooth_normals
Toggle for enabling normal smoothing.
bool m_include_retain_size
Whether the retain size option is shown.
QRadioButton * m_no_smoothing
Radio button for no smoothing.
QCustomComboBox * m_smoothing_type
Combo box for selecting the smoothing algorithm type.
void setup()
Sets up the UI elements and signal connections.
SmoothDialog(QWidget *parent=nullptr)
Constructs a smooth dialog widget.
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
A Button that toggles between on and off.
Definition Toggle.h:50
The primary namespace for the NDEVR SDK.