NDEVR
API Documentation
UVChannelEditWidget.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: UVChannelEditWidget
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/QTModelManager.h>
34#include <NDEVR/QTDesignObject.h>
35#include <NDEVR/Material.h>
36#include <QWidget>
37namespace Ui
38{
39 class LightingValueUI;
40}
41namespace NDEVR
42{
46 class QTImageEditor;
52 class UVChannelEditWidget : public QWidget
53 {
54 Q_OBJECT
58 enum LayerDrawModes
59 {
60 e_two_color_value_split
61 , e_two_color_range
62 , e_three_color_two_value
63 , e_three_color_three_value
64 };
65 public:
72 UVChannelEditWidget(const DynamicPointer<QTDesignObject>& material, UVType uv_type, QWidget* parent = nullptr);
82 QSize minimumSizeHint() const override;
87 QSize sizeHint() const override;
91 void resizeEvent(QResizeEvent*) override;
116 public slots:
140 void onDelete();
145 void useChannel(bool use_channel);
150 void setColor(RGBColor color);
156 protected:
157 Ui::LightingValueUI* ui;
165 LayerDrawModes m_layer_draw_mode;
167 bool m_is_updating = false;
168 };
169}
Dialog for showing an AerialImage or top down view rendered with a service like google earth with use...
Allows the user to select a method to color a particular channel.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:356
A dialog designed to allow the user to navigate a filesytem and select or create one or more files or...
A gallery widget that displays available images from an ImageFactory and allows the user to select on...
Container responsible for storing and setting the appearance of a Model or Geometry within the NDEVR ...
Definition Material.h:153
A dialog devoted to allowing the user to select a custom color.
A full-featured image editor widget with drawing tools, undo/redo, and image manipulation.
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:57
AerialImageSettings * m_aerial_settings
Aerial image configuration dialog.
void setColor(RGBColor color)
Slot that sets the flat color for the channel.
void resizeEvent(QResizeEvent *) override
Handles resize events to update the image layout.
QTImageEditor * m_image_editor
Image editor dialog.
void showImageMemoryDialog(PopupInfo info)
Shows a dialog for selecting a texture image from memory.
Material material() const
Returns the Material object being edited.
void updateImageLayout()
Updates the layout of image preview elements to fit the current widget size.
void setupChannelDialog()
Sets up the channel-specific dialog elements based on the UV type.
void onDelete()
Slot invoked to delete this UV channel from the material.
ImageChooserGallery * m_image_chooser_gallery
Gallery dialog for choosing images from memory.
void clearTexture()
Slot that clears the currently assigned texture from the channel.
void showDataDialog()
Slot that shows the data channel dialog for numeric data visualization.
void updateIntensity()
Slot that updates the intensity value for the channel.
void showImageFileDialog(PopupInfo info)
Shows a file browser dialog for selecting a texture image from disk.
FileChooserDialog * m_image_file_dialog
File browser dialog for image selection.
ColorChannelCombo * m_channel_combo
Combo box for selecting color channel data sources.
QSize sizeHint() const override
Returns the preferred size hint for this widget.
UVChannelEditWidget(const DynamicPointer< QTDesignObject > &material, UVType uv_type, QWidget *parent=nullptr)
Constructs a UV channel edit widget for a specific material and UV type.
LayerDrawModes m_layer_draw_mode
The current layer drawing mode.
Ui::LightingValueUI * ui
The auto-generated UI form for lighting value editing.
bool m_is_updating
Guard flag to prevent recursive updates.
void useChannel(bool use_channel)
Slot that enables or disables the UV channel.
void showVectorColorDialog()
Slot that shows the vector color assignment dialog.
QSize minimumSizeHint() const override
Returns the minimum size hint for this widget.
void showImageEditDialog(PopupInfo info)
Shows a dialog for editing the current texture image.
DynamicPointer< QTDesignObject > m_target
The material design object being edited.
void refreshWidget()
Slot that refreshes the widget display from the current material state.
void showAerialImageDialog(PopupInfo info)
Shows a dialog for configuring aerial image settings.
QCustomColorDialog * m_color_dialog
Color picker dialog.
UVType m_uv_channel
The UV channel type being edited.
The primary namespace for the NDEVR SDK.
UVType
Channels that describe how an object should interact with light.
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16