API Documentation
Loading...
Searching...
No Matches
MaterialWidget.h
Go to the documentation of this file.
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: MaterialWidget
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/PropertiesButton.h>
34#include <NDEVR/ColorChannelCombo.h>
35#include <NDEVR/QTDesignObject.h>
36#include <NDEVR/ColorChooserButton.h>
37#include <NDEVR/ColorChooserButton.h>
38#include <NDEVR/QCustomCombobox.h>
39#include <NDEVR/Material.h>
40#include <QWidget>
41namespace NDEVR
42{
43 /**--------------------------------------------------------------------------------------------------
44 \brief A simple widget showing some visual properties of a Material or Model.
45 **/
46 class NDEVR_API MaterialWidget : public QWidget
47 {
48 Q_OBJECT
49 public:
50 MaterialWidget(QWidget* parent = nullptr);
51 MaterialWidget(const DynamicPointer<QTDesignObject>& material, QWidget* parent = nullptr);
53 signals:
57 protected:
58 void setup();
59 void updateFromMaterial(const Model& model, const Material& mat);
61 private slots:
62 void updateFromTargetSlot();
63
64 protected:
71 };
72}
#define NDEVR_API
Definition DLLInfo.h:50
Allows the user to select a method to color a particular channel.
Definition ColorChannelCombo.h:42
A button that pops up a ColorChooserDialog and changes background color based on the color chosen.
Definition ColorChooserButton.h:46
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
Definition Material.h:51
A simple widget showing some visual properties of a Material or Model.
Definition MaterialWidget.h:47
MaterialWidget(const DynamicPointer< QTDesignObject > &material, QWidget *parent=nullptr)
DynamicPointer< QTDesignObject > m_target
Definition MaterialWidget.h:66
PropertiesButton * m_properties_button
Definition MaterialWidget.h:69
void computedColorChosenSignal()
ColorChooserButton * m_color_chooser_button
Definition MaterialWidget.h:68
QCustomComboBox * m_color_combo
Definition MaterialWidget.h:65
MaterialWidget(QWidget *parent=nullptr)
TimeSpan m_animation_time
Definition MaterialWidget.h:70
void setTarget(const DynamicPointer< QTDesignObject > &target)
ColorChannelCombo * m_color_channel_combo
Definition MaterialWidget.h:67
void updateFromMaterial(const Model &model, const Material &mat)
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
Definition PropertiesButton.h:38
A compact way to present a list of options to the user.
Definition QCustomCombobox.h:53
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
Definition ACIColor.h:37