API Documentation
Loading...
Searching...
No Matches
MaterialPropertySlider.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/QTDesignObject.h>
4#include <NDEVR/DesignObjectWidgetInterface.h>
5#include <NDEVR/QCustomSlider.h>
6namespace NDEVR
7{
9 {
10 public:
11 MaterialPropertySlider(const DynamicPointer<QTDesignObject>& object, Material::MaterialProperties property, QWidget* parent = nullptr);
12 MaterialPropertySlider(Material::MaterialProperties property, QWidget* parent = nullptr);
13
14 void addTarget(const DynamicPointer<QTDesignObject>& object) override
15 {
16 DesignObjectWidgetInterface::addTarget(object);
17 }
18 void removeTarget(const DynamicPointer<QTDesignObject>& object) override
19 {
20 DesignObjectWidgetInterface::removeTarget(object);
21 }
22
24 {
25 fltp08 thickness = mat.getMaterialProperty<fltp08>(m_property);
26 QCustomSlider::setValue(thickness);
27 }
28
29 void onTargetUpdated(UUID id) override;
31 {
33 }
34 protected:
35 void init();
36 protected:
38 };
40 {
41 public:
42 PixelThicknessSlider(const DynamicPointer<QTDesignObject>& object, QWidget* parent = nullptr)
43 : MaterialPropertySlider(object, Material::e_pixel_thickness, parent)
44 {}
45 PixelThicknessSlider(QWidget* parent = nullptr)
46 : MaterialPropertySlider(Material::e_pixel_thickness, parent)
47 {}
48 };
50 {
51 public:
52 OpacitySlider(const DynamicPointer<QTDesignObject>& object, QWidget* parent = nullptr)
53 : MaterialPropertySlider(object, Material::e_opacity, parent)
54 {}
55 OpacitySlider(QWidget* parent = nullptr)
56 : MaterialPropertySlider(Material::e_opacity, parent)
57 {}
58 };
60 {
61 public:
62 DepthBiasSlider(const DynamicPointer<QTDesignObject>& object, QWidget* parent = nullptr)
63 : MaterialPropertySlider(object, Material::e_depth_bias, parent)
64 {}
65 DepthBiasSlider(QWidget* parent = nullptr)
66 : MaterialPropertySlider(Material::e_depth_bias, parent)
67 {}
68 };
69}
#define NDEVR_API
Definition DLLInfo.h:67
Definition MaterialPropertySlider.h:60
DepthBiasSlider(const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
Definition MaterialPropertySlider.h:62
DepthBiasSlider(QWidget *parent=nullptr)
Definition MaterialPropertySlider.h:65
Definition DesignObjectWidgetInterface.h:8
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:319
Definition Material.h:45
t_type getMaterialProperty(MaterialProperties mat_index) const
Definition Material.h:168
MaterialProperties
Definition Material.h:108
Definition MaterialPropertySlider.h:9
void addTarget(const DynamicPointer< QTDesignObject > &object) override
Definition MaterialPropertySlider.h:14
void onObjectDeletedSlot()
Definition MaterialPropertySlider.h:30
MaterialPropertySlider(const DynamicPointer< QTDesignObject > &object, Material::MaterialProperties property, QWidget *parent=nullptr)
MaterialPropertySlider(Material::MaterialProperties property, QWidget *parent=nullptr)
void removeTarget(const DynamicPointer< QTDesignObject > &object) override
Definition MaterialPropertySlider.h:18
void onTargetUpdated(UUID id) override
void refreshFromMaterial(const Material &mat)
Definition MaterialPropertySlider.h:23
Material::MaterialProperties m_property
Definition MaterialPropertySlider.h:37
Definition MaterialPropertySlider.h:50
OpacitySlider(QWidget *parent=nullptr)
Definition MaterialPropertySlider.h:55
OpacitySlider(const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
Definition MaterialPropertySlider.h:52
Definition MaterialPropertySlider.h:40
PixelThicknessSlider(const DynamicPointer< QTDesignObject > &object, QWidget *parent=nullptr)
Definition MaterialPropertySlider.h:42
PixelThicknessSlider(QWidget *parent=nullptr)
Definition MaterialPropertySlider.h:45
The slider is the classic widget for controlling a bounded value. It lets the user move a slider hand...
Definition QCustomSlider.h:13
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:62
Definition ACIColor.h:37
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:146