QGIS API Documentation  2.99.0-Master (d55fa22)
qgsblendmodecombobox.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsblendmodecombobox.h
3  ------------------------
4  begin : March 21, 2013
5  copyright : (C) 2013 by Nyall Dawson
6  email : [email protected]
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSBLENDMODECOMBOBOX_H
19 #define QGSBLENDMODECOMBOBOX_H
20 
21 #include <QComboBox>
22 #include "qgis.h"
23 #include <QPainter> // For QPainter::CompositionMode enum
24 #include "qgis_gui.h"
25 
29 class GUI_EXPORT QgsBlendModeComboBox : public QComboBox
30 {
31  Q_OBJECT
32  public:
33  QgsBlendModeComboBox( QWidget *parent SIP_TRANSFERTHIS = 0 );
34 
36  QPainter::CompositionMode blendMode();
38  void setBlendMode( QPainter::CompositionMode blendMode );
39  private:
40 
46  QStringList blendModesList() const;
47 
49  // index within the combo box
50  std::vector<int> mBlendModeToListIndex;
51  std::vector<int> mListIndexToBlendMode;
52 
53  public slots:
54 
58  void updateModes();
59 
60 };
61 
62 #endif // QGSBLENDMODECOMBOBOX_H
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:34
A combobox which lets the user select blend modes from a predefined list.