Wt examples  4.10.0
Loading...
Searching...
No Matches
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
13namespace Wt {
14 class WPainter;
15}
16
17using namespace Wt;
18
19class ShapesWidget : public WPaintedWidget
20{
21public:
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
30protected:
31 virtual void paintEvent(WPaintDevice *paintDevice) override;
32
33private:
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_
void drawEmwebMW(WPainter &p)
void drawEmwebE(WPainter &p)
void setAngle(double angle)
virtual void paintEvent(WPaintDevice *paintDevice) override
double relativeSize() const
void drawEmwebLogo(WPainter &p)
double angle() const
void setRelativeSize(double size)