QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 <QPainter> // For QPainter::CompositionMode enum
23 #include "qgsmaprenderer.h" //for getCompositionMode
24 
28 class GUI_EXPORT QgsBlendModeComboBox : public QComboBox
29 {
30  Q_OBJECT
31  public:
32  QgsBlendModeComboBox( QWidget* parent = 0 );
33  virtual ~QgsBlendModeComboBox();
34 
36  QPainter::CompositionMode blendMode();
38  void setBlendMode( QPainter::CompositionMode blendMode );
39  private:
41  QStringList blendModesList() const;
42 
44  // index within the combo box
45  std::vector<int> mBlendModeToListIndex;
46  std::vector<int> mListIndexToBlendMode;
47 
48  public slots:
49  void updateModes();
50 
51 };
52 
53 #endif // QGSBLENDMODECOMBOBOX_H