File: qgscompoundcolorwidget.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 161
file content (167 lines) | stat: -rw-r--r-- 4,503 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgscompoundcolorwidget.h                                     *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsCompoundColorWidget : QgsPanelWidget
{
%Docstring(signature="appended")
A custom QGIS widget for selecting a color, including options for
selecting colors via hue wheel, color swatches, and a color sampler.
%End

%TypeHeaderCode
#include "qgscompoundcolorwidget.h"
%End
  public:
    enum Layout /BaseType=IntEnum/
    {
      LayoutDefault,
      LayoutVertical,
    };

    QgsCompoundColorWidget( QWidget *parent /TransferThis/ = 0, const QColor &color = QColor(), Layout layout = LayoutDefault );
%Docstring
Constructor for QgsCompoundColorWidget

:param parent: parent widget
:param color: initial color for dialog
:param layout: widget layout to use
%End

    ~QgsCompoundColorWidget();

    QColor color() const;
%Docstring
Returns the current color for the dialog

:return: dialog color
%End

    void setAllowOpacity( bool allowOpacity );
%Docstring
Sets whether opacity modification (transparency) is permitted for the
color dialog. Defaults to ``True``.

:param allowOpacity: set to ``False`` to disable opacity modification
%End

    void setColorModelEditable( bool colorModelEditable );
%Docstring
Sets whether color model is editable or not

:param colorModelEditable: set to ``False`` to disable color model
                           modification Defaults to ``True``.

.. versionadded:: 3.40
%End

    void setDiscarded( bool discarded );
%Docstring
Sets whether the widget's color has been "discarded" and the selected
color should not be stored in the recent color list.

:param discarded: set to ``True`` to avoid adding color to recent color
                  list on widget destruction.
%End

    static QgsUserColorScheme *importUserPaletteFromFile( QWidget *parent );
%Docstring
Triggers a user prompt for importing a new color scheme from an existing
GPL file.

The ``parent`` argument must be set to a valid parent widget for the
dialog prompts.

.. seealso:: :py:func:`createNewUserPalette`

.. seealso:: :py:func:`removeUserPalette`

.. versionadded:: 3.2
%End

    static QgsUserColorScheme *createNewUserPalette( QWidget *parent );
%Docstring
Triggers a user prompt for creating a new user color scheme.

The ``parent`` argument must be set to a valid parent widget for the
dialog prompts.

.. seealso:: :py:func:`importUserPaletteFromFile`

.. seealso:: :py:func:`removeUserPalette`

.. versionadded:: 3.2
%End

    static bool removeUserPalette( QgsUserColorScheme *scheme, QWidget *parent );
%Docstring
Triggers a user prompt for removing an existing user color ``scheme``.

The ``parent`` argument must be set to a valid parent widget for the
dialog prompts.

.. seealso:: :py:func:`importUserPaletteFromFile`

.. seealso:: :py:func:`createNewUserPalette`

.. versionadded:: 3.2
%End

  signals:

    void currentColorChanged( const QColor &color );
%Docstring
Emitted when the dialog's color changes

:param color: current color
%End

  public slots:

    void setColor( const QColor &color );
%Docstring
Sets the current color for the dialog

:param color: desired color
%End

    void setPreviousColor( const QColor &color );
%Docstring
Sets the color to show in an optional "previous color" section

:param color: previous color
%End

  protected:
    virtual void hideEvent( QHideEvent *e );


    virtual void mousePressEvent( QMouseEvent *e );


    virtual void mouseMoveEvent( QMouseEvent *e );


    virtual void mouseReleaseEvent( QMouseEvent *e );


    virtual void keyPressEvent( QKeyEvent *e );


};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/qgscompoundcolorwidget.h                                     *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/