Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BrushPreview.h
Go to the documentation of this file.
1 /* Copyright (c) 2014-2015 "Omnidome" by cr8tr
2  * Dome Mapping Projection Software (http://omnido.me).
3  * Omnidome was created by Michael Winkelmann aka Wilston Oreo (@WilstonOreo)
4  *
5  * This file is part of Omnidome.
6  *
7  * Omnidome is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License as
9  * published by the Free Software Foundation, either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Affero General Public License for more details.
16  * You should have received a copy of the GNU Affero General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OMNI_UI_BRUSHPREVIEW_H_
21 #define OMNI_UI_BRUSHPREVIEW_H_
22 
23 #include <memory>
24 #include <QWidget>
25 #include <omni/BlendBrush.h>
26 
27 namespace omni {
28  namespace ui {
29  class BrushPreview : public QWidget {
30  Q_OBJECT
31 
32  public:
33  BrushPreview(QWidget *_parent = nullptr);
34 
35  void update(float _feather,
36  float _opacity,
37  bool _invert);
38 
39  protected:
40  void paintEvent(QPaintEvent *event);
41 
42  void resizeEvent(QResizeEvent *event);
43 
44  private:
46  QImage image_;
47  };
48  }
49 }
50 
51 #endif /* OMNI_UI_BRUSHPREVIEW_H_ */
void update(float _feather, float _opacity, bool _invert)
Definition: BrushPreview.cpp:37
BlendBrush for drawing on the blendmask Holds an internal pixel buffer.
Definition: BlendBrush.h:33
QImage image_
Definition: BrushPreview.h:46
BrushPreview(QWidget *_parent=nullptr)
Definition: BrushPreview.cpp:29
BlendBrush brush_
Definition: BrushPreview.h:45
void resizeEvent(QResizeEvent *event)
Definition: BrushPreview.cpp:48
void paintEvent(QPaintEvent *event)
Definition: BrushPreview.cpp:53
Definition: BrushPreview.h:29