API Documentation
Loading...
Searching...
No Matches
ColorChannelCombo.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: ColorChannelCombo
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/QTDesignObject.h>
34#include <NDEVR/QCustomCombobox.h>
35
36namespace NDEVR
37{
38 /**--------------------------------------------------------------------------------------------------
39 \brief Allows the user to select a method to color a particular channel.
40 **/
41 class ColorChannelCombo : public QObject
42 {
43 Q_OBJECT
44 public:
48 void setUVType(const UVType& target);
49 void setHasDefault(bool has_default);
50 void setHasSolidColor(bool has_solid_color);
52 virtual bool eventFilter(QObject *watched, QEvent *event);
54 void refreshFromMaterial(const Material& mat);
55 void setAlwaysAllowImage(bool always_allow_image);
56 bool isSetToImage() const;
57 protected:
58 void init();
59 private slots:
60 void onTargetUpdatedSlot();
61 void onComboChanged();
62 void updateItems();
63 signals:
67 protected:
79 };
80}
Allows the user to select a method to color a particular channel.
Definition ColorChannelCombo.h:42
DynamicPointer< QTDesignObject > m_target
Definition ColorChannelCombo.h:68
QCustomComboBox * m_combo
Definition ColorChannelCombo.h:70
UVType m_uv_type
Definition ColorChannelCombo.h:69
void setUVType(const UVType &target)
void setHasSolidColor(bool has_solid_color)
void setHasDefault(bool has_default)
ColorChannelCombo(const DynamicPointer< QTDesignObject > &target, UVType uv, QCustomComboBox *combo)
DesignParameter currentParameter() const
bool m_has_default
Definition ColorChannelCombo.h:71
bool m_has_color_by_model
Definition ColorChannelCombo.h:74
bool m_needs_item_refresh
Definition ColorChannelCombo.h:76
void setAlwaysAllowImage(bool always_allow_image)
bool m_has_contrast_color
Definition ColorChannelCombo.h:73
bool m_always_allow_image
Definition ColorChannelCombo.h:77
TimeSpan m_animation_time
Definition ColorChannelCombo.h:78
bool m_has_solid_color
Definition ColorChannelCombo.h:72
ColorChannelCombo(const DynamicPointer< QTDesignObject > &target, QCustomComboBox *combo)
virtual bool eventFilter(QObject *watched, QEvent *event)
void refreshFromMaterial(const Material &mat)
bool m_has_image
Definition ColorChannelCombo.h:75
void setTarget(const DynamicPointer< QTDesignObject > &target)
A definition of data that is logically stored in the Model heirarchy. Data could be a property of a M...
Definition DesignParameter.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 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
UVType
Channels that describe how an object should interact with light.
Definition DesignObjectBase.h:133