ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvColorGradientDlg.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // Qt
11 #include <ui_colorGradientDlg.h>
12 
13 #include <QColor>
14 
16 class ccColorGradientDlg : public QDialog, public Ui::ColorGradientDialog {
17  Q_OBJECT
18 
19 public:
21  explicit ccColorGradientDlg(QWidget* parent);
22 
25 
27  GradientType getType() const;
30 
32  void getColors(QColor& first, QColor& second) const;
33 
35  double getBandingFrequency() const;
36 
38  unsigned char getDimension() const;
39 
40 protected slots:
41 
42  void changeFirstColor();
43  void changeSecondColor();
44 };
ecvColor::white
constexpr Rgb white(MAX, MAX, MAX)
ccQtHelpers::SetButtonColor
static void SetButtonColor(QAbstractButton *button, const QColor &col)
Sets a button background color.
Definition: ecvQtHelpers.h:17
ccColorGradientDlg::GradientType
GradientType
Gradient types.
Definition: ecvColorGradientDlg.h:24
ecvColor::black
constexpr Rgb black(0, 0, 0)
ccColorGradientDlg::getBandingFrequency
double getBandingFrequency() const
Returns the frequency of the gradient ('Banding' mode)
Definition: ecvColorGradientDlg.cpp:83
ccColorGradientDlg::Banding
@ Banding
Definition: ecvColorGradientDlg.h:24
s_firstColor
static QColor s_firstColor(Qt::black)
s_lastDimIndex
static int s_lastDimIndex
Definition: ecvColorGradientDlg.cpp:24
s_lastType
static ccColorGradientDlg::GradientType s_lastType(ccColorGradientDlg::Default)
ccColorGradientDlg::ccColorGradientDlg
ccColorGradientDlg(QWidget *parent)
Default constructor.
Definition: ecvColorGradientDlg.cpp:26
ecvColorGradientDlg.h
slots
#define slots
Definition: PythonPlugin.cpp:25
ccColorGradientDlg::setType
void setType(GradientType type)
Sets the currently activated type.
Definition: ecvColorGradientDlg.cpp:48
ccColorGradientDlg::changeSecondColor
void changeSecondColor()
Definition: ecvColorGradientDlg.cpp:98
ccColorGradientDlg::getDimension
unsigned char getDimension() const
Returns the ramp dimension.
Definition: ecvColorGradientDlg.cpp:43
Ui
Definition: sfEditDlg.h:16
ccColorGradientDlg::getType
GradientType getType() const
Returns selected gradient type.
Definition: ecvColorGradientDlg.cpp:64
ccColorGradientDlg
Dialog to define a color gradient (default, with 2 colors, banding, etc.)
Definition: ecvColorGradientDlg.h:16
s_secondColor
static QColor s_secondColor(Qt::white)
ccColorGradientDlg::TwoColors
@ TwoColors
Definition: ecvColorGradientDlg.h:24
ecvQtHelpers.h
ccColorGradientDlg::Default
@ Default
Definition: ecvColorGradientDlg.h:24
ccColorGradientDlg::getColors
void getColors(QColor &first, QColor &second) const
Returns the two colors of the gradient ('TwoColors' mode)
Definition: ecvColorGradientDlg.cpp:77
ccColorGradientDlg::changeFirstColor
void changeFirstColor()
Definition: ecvColorGradientDlg.cpp:90
type
char type
Definition: FileIOFactory.cpp:131
s_lastFreq
static double s_lastFreq
Definition: ecvColorGradientDlg.cpp:23