Wt examples  4.10.4
ShapesWidget.h
Go to the documentation of this file.
1 // This may look like C code, but it's really -*- C++ -*-
2 /*
3  * Copyright (C) 2008 Emweb bv, Herent, Belgium.
4  *
5  * See the LICENSE file for terms of use.
6  */
7 
8 #ifndef SHAPES_WIDGET_H_
9 #define SHAPES_WIDGET_H_
10 
11 #include <Wt/WPaintedWidget.h>
12 
13 namespace Wt {
14  class WPainter;
15 }
16 
17 using namespace Wt;
18 
20 {
21 public:
22  ShapesWidget();
23 
24  void setAngle(double angle);
25  double angle() const { return angle_; }
26 
27  void setRelativeSize(double size);
28  double relativeSize() const { return size_; }
29 
30 protected:
31  virtual void paintEvent(WPaintDevice *paintDevice) override;
32 
33 private:
34  double angle_;
35  double size_;
36 
37  void drawEmwebLogo(WPainter& p);
38  void drawEmwebE(WPainter& p);
39  void drawEmwebMW(WPainter& p);
40 };
41 
42 #endif // SHAPES_WIDGET_H_
double size_
Definition: ShapesWidget.h:35
double relativeSize() const
Definition: ShapesWidget.h:28
double angle() const
Definition: ShapesWidget.h:25
double angle_
Definition: ShapesWidget.h:34