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 class ColorChannelCombo : public QObject
39 {
40 Q_OBJECT
41 public:
44 void setTarget(const DynamicPointer<QTDesignObject>& target);
45 void setUVType(const UVType& target);
46 void setHasDefault(bool has_default);
47 void setHasSolidColor(bool has_solid_color);
49 virtual bool eventFilter(QObject *watched, QEvent *event);
50 void refreshFromModel();
51 void refreshFromMaterial(const Material& mat);
52 void setAlwaysAllowImage(bool always_allow_image);
53 bool isSetToImage() const;
54 protected:
55 void init();
56 private slots:
57 void onTargetUpdatedSlot();
58 void onComboChanged();
59 void updateItems();
60 signals:
64 protected:
76 };
77}
Definition ColorChannelCombo.h:39
void init()
Definition ColorChannelCombo.cpp:127
DynamicPointer< QTDesignObject > m_target
Definition ColorChannelCombo.h:65
QCustomComboBox * m_combo
Definition ColorChannelCombo.h:67
UVType m_uv_type
Definition ColorChannelCombo.h:66
void setUVType(const UVType &target)
Definition ColorChannelCombo.cpp:150
void setHasSolidColor(bool has_solid_color)
Definition ColorChannelCombo.cpp:160
bool isSetToImage() const
Definition ColorChannelCombo.cpp:123
void setHasDefault(bool has_default)
Definition ColorChannelCombo.cpp:155
DesignParameter currentParameter() const
Definition ColorChannelCombo.cpp:165
bool m_has_default
Definition ColorChannelCombo.h:68
virtual bool eventFilter(QObject *watched, QEvent *event)
Definition ColorChannelCombo.cpp:171
bool m_has_color_by_model
Definition ColorChannelCombo.h:71
bool m_needs_item_refresh
Definition ColorChannelCombo.h:73
void setAlwaysAllowImage(bool always_allow_image)
Definition ColorChannelCombo.cpp:119
bool m_has_contrast_color
Definition ColorChannelCombo.h:70
void refreshFromModel()
Definition ColorChannelCombo.cpp:41
bool m_always_allow_image
Definition ColorChannelCombo.h:74
TimeSpan m_animation_time
Definition ColorChannelCombo.h:75
bool m_has_solid_color
Definition ColorChannelCombo.h:69
ColorChannelCombo(const DynamicPointer< QTDesignObject > &target, QCustomComboBox *combo)
Definition ColorChannelCombo.cpp:6
void refreshFromMaterial(const Material &mat)
Definition ColorChannelCombo.cpp:60
bool m_has_image
Definition ColorChannelCombo.h:72
void setTarget(const DynamicPointer< QTDesignObject > &target)
Definition ColorChannelCombo.cpp:137
Definition DesignParameter.h:42
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:319
Definition Material.h:45
Definition QCustomCombobox.h:47
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
Definition ACIColor.h:37
UVType
Definition DesignObjectBase.h:127