QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgslimitedrandomcolorrampdialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslimitedrandomcolorrampdialog.h
3
---------------------
4
begin : December 2009
5
copyright : (C) 2009 by Martin Dobias
6
email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGsLIMITEDRANDOMCOLORRAMPDIALOG_H
17
#define QGsLIMITEDRANDOMCOLORRAMPDIALOG_H
18
19
#include "ui_qgslimitedrandomcolorrampwidgetbase.h"
20
21
#include "qgis_gui.h"
22
#include "
qgis_sip.h
"
23
#include "
qgscolorrampimpl.h
"
24
#include "
qgspanelwidget.h
"
25
26
#include <QDialog>
27
28
class
QDialogButtonBox;
29
35
class
GUI_EXPORT
QgsLimitedRandomColorRampWidget
:
public
QgsPanelWidget
,
private
Ui::QgsLimitedRandomColorRampWidgetBase
36
{
37
Q_OBJECT
38
Q_PROPERTY(
QgsLimitedRandomColorRamp
ramp
READ
ramp
WRITE
setRamp
)
39
40
public
:
46
QgsLimitedRandomColorRampWidget
(
const
QgsLimitedRandomColorRamp
&
ramp
, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
47
52
QgsLimitedRandomColorRamp
ramp
()
const
{
return
mRamp; }
53
59
void
setRamp(
const
QgsLimitedRandomColorRamp
&ramp );
60
61
public
slots:
62
64
void
setCount(
int
val );
66
void
setHue1(
int
val );
68
void
setHue2(
int
val );
70
void
setSat1(
int
val );
72
void
setSat2(
int
val );
74
void
setVal1(
int
val );
76
void
setVal2(
int
val );
77
78
private
:
79
void
updatePreview();
80
void
updateUi();
81
82
QgsLimitedRandomColorRamp
mRamp;
83
};
84
85
91
class
GUI_EXPORT
QgsLimitedRandomColorRampDialog
:
public
QDialog
92
{
93
Q_OBJECT
94
Q_PROPERTY(
QgsLimitedRandomColorRamp
ramp
READ
ramp
WRITE
setRamp
)
95
96
public
:
102
QgsLimitedRandomColorRampDialog
(
const
QgsLimitedRandomColorRamp
&
ramp
, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
103
108
QgsLimitedRandomColorRamp
ramp
()
const
{
return
mWidget->ramp(); }
109
115
void
setRamp
(
const
QgsLimitedRandomColorRamp
&
ramp
) { mWidget->setRamp(
ramp
); }
116
121
QDialogButtonBox *buttonBox()
const
;
122
123
signals:
124
126
void
changed
();
127
128
private
:
129
QgsLimitedRandomColorRampWidget
*mWidget =
nullptr
;
130
QDialogButtonBox *mButtonBox =
nullptr
;
131
132
private
slots:
133
134
void
showHelp();
135
};
136
137
#endif
QgsLimitedRandomColorRampDialog::ramp
QgsLimitedRandomColorRamp ramp
Definition
qgslimitedrandomcolorrampdialog.h:94
QgsLimitedRandomColorRampDialog::setRamp
void setRamp(const QgsLimitedRandomColorRamp &ramp)
Sets the color ramp to show in the dialog.
Definition
qgslimitedrandomcolorrampdialog.h:115
QgsLimitedRandomColorRampDialog::changed
void changed()
Emitted when the dialog settings change.
QgsLimitedRandomColorRampDialog::QgsLimitedRandomColorRampDialog
QgsLimitedRandomColorRampDialog(const QgsLimitedRandomColorRamp &ramp, QWidget *parent=nullptr)
Constructor for QgsLimitedRandomColorRampDialog.
Definition
qgslimitedrandomcolorrampdialog.cpp:130
QgsLimitedRandomColorRampDialog::ramp
QgsLimitedRandomColorRamp ramp() const
Returns a color ramp representing the current settings from the dialog.
Definition
qgslimitedrandomcolorrampdialog.h:108
QgsLimitedRandomColorRampWidget
A widget which allows users to modify the properties of a QgsLimitedRandomColorRamp.
Definition
qgslimitedrandomcolorrampdialog.h:36
QgsLimitedRandomColorRampWidget::ramp
QgsLimitedRandomColorRamp ramp
Definition
qgslimitedrandomcolorrampdialog.h:38
QgsLimitedRandomColorRampWidget::QgsLimitedRandomColorRampWidget
QgsLimitedRandomColorRampWidget(const QgsLimitedRandomColorRamp &ramp, QWidget *parent=nullptr)
Constructor for QgsLimitedRandomColorRampWidget.
Definition
qgslimitedrandomcolorrampdialog.cpp:30
QgsLimitedRandomColorRampWidget::setRamp
void setRamp(const QgsLimitedRandomColorRamp &ramp)
Sets the color ramp to show in the dialog.
Definition
qgslimitedrandomcolorrampdialog.cpp:54
QgsLimitedRandomColorRampWidget::ramp
QgsLimitedRandomColorRamp ramp() const
Returns a color ramp representing the current settings from the dialog.
Definition
qgslimitedrandomcolorrampdialog.h:52
QgsLimitedRandomColorRamp
Constrained random color ramp, which returns random colors based on preset parameters.
Definition
qgscolorrampimpl.h:329
QgsPanelWidget::QgsPanelWidget
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
Definition
qgspanelwidget.cpp:30
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgscolorrampimpl.h
qgspanelwidget.h
Generated on
for QGIS API Documentation by
1.17.0