diff options
| author | Samu Laaksonen <laaksonen.sj@gmail.com> | 2012-10-21 15:46:32 +0300 |
|---|---|---|
| committer | Samu Laaksonen <laaksonen.sj@gmail.com> | 2012-10-21 15:46:32 +0300 |
| commit | 9674c5ea91912d07f4726140ca2c88669c03f874 (patch) | |
| tree | 3b48d5e812b02fb2bfa581856e0b42bbeafe4fbf /src/CircularDisplay.cpp | |
| parent | fe15901cad4ccc90b5702cf5061849c1ab1fd40d (diff) | |
| download | prism-9674c5ea91912d07f4726140ca2c88669c03f874.tar.gz prism-9674c5ea91912d07f4726140ca2c88669c03f874.zip | |
HUD demo
Added:
- some ideas to test display of hud elements
Fixed:
- HUD now follows the scene when it moves
Diffstat (limited to 'src/CircularDisplay.cpp')
| -rw-r--r-- | src/CircularDisplay.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/CircularDisplay.cpp b/src/CircularDisplay.cpp index 31136e7..7a1dc0f 100644 --- a/src/CircularDisplay.cpp +++ b/src/CircularDisplay.cpp @@ -23,17 +23,32 @@ void CircularDisplay::initShape() QPen pen(QColor(0, 0, 0, 255)); QBrush brush(m_displayColor); - pen.setWidth(5); + pen.setWidth(4); p.setPen(pen); - p.setBrush(brush); // draw base ellipse p.drawEllipse(QPointF(25, 35), 20, 20); + p.setBrush(brush); + + // first 1/4th + //p.drawPie(5, 15, 40, 20, 0, 180 * 16); + + // last 1/4th + //p.drawPie(25, 35, 40, 20, 0, -180 * 16); + + // upper half + //p.drawPie(5, 15, 40, 40, 0, 180 * 16); + + // lower half + pen.setWidth(2); + p.setPen(pen); + p.drawPie(5, 15, 40, 40, 0, -180 * 16); + // draw "tick" lines - p.drawLine(25, 15, 25, 0); // 12 o'clock - p.drawLine(45, 35, 60, 35); // 3 o'clock - p.drawLine(25, 55, 25, 70); // 6 o'clock + //p.drawLine(25, 15, 25, 0); // 12 o'clock + //p.drawLine(45, 35, 60, 35); // 3 o'clock + //p.drawLine(25, 55, 25, 70); // 6 o'clock } void CircularDisplay::setDisplayColor(QColor col) |
