qwt_analog_clock.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_ANALOG_CLOCK_H
11 #define QWT_ANALOG_CLOCK_H
12 
13 #include "qwt_global.h"
14 #include "qwt_dial.h"
15 
16 class QwtDialNeedle;
17 
44 {
45  Q_OBJECT
46 
47  public:
52  enum Hand
53  {
56 
59 
62 
64  NHands
65  };
66 
67  explicit QwtAnalogClock( QWidget* parent = NULL );
68  virtual ~QwtAnalogClock();
69 
70  void setHand( Hand, QwtDialNeedle* );
71 
72  const QwtDialNeedle* hand( Hand ) const;
73  QwtDialNeedle* hand( Hand );
74 
75  public Q_SLOTS:
76  void setCurrentTime();
77  void setTime( const QTime& );
78 
79  protected:
80  virtual void drawNeedle( QPainter*, const QPointF&, double radius,
81  double direction, QPalette::ColorGroup ) const QWT_OVERRIDE;
82 
83  virtual void drawHand( QPainter*, Hand, const QPointF&,
84  double radius, double direction, QPalette::ColorGroup ) const;
85 
86  private:
87  // use setHand instead
88  void setNeedle( QwtDialNeedle* );
89 
90  QwtDialNeedle* m_hand[NHands];
91 };
92 
93 #endif
qwt_dial.h
QwtDialNeedle
Base class for needles that can be used in a QwtDial.
Definition: qwt_dial_needle.h:27
QwtDial
QwtDial class provides a rounded range control.
Definition: qwt_dial.h:50
QwtAnalogClock::HourHand
@ HourHand
Needle displaying the hours.
Definition: qwt_analog_clock.h:61
QwtDial::drawNeedle
virtual void drawNeedle(QPainter *, const QPointF &, double radius, double direction, QPalette::ColorGroup) const
Definition: qwt_dial.cpp:438
qwt_global.h
QwtAnalogClock::Hand
Hand
Definition: qwt_analog_clock.h:52
QwtDial::setNeedle
void setNeedle(QwtDialNeedle *)
Definition: qwt_dial.cpp:522
QwtAnalogClock::SecondHand
@ SecondHand
Needle displaying the seconds.
Definition: qwt_analog_clock.h:55
QwtAnalogClock::MinuteHand
@ MinuteHand
Needle displaying the minutes.
Definition: qwt_analog_clock.h:58
QWT_OVERRIDE
#define QWT_OVERRIDE
Definition: qwt_global.h:53
QWT_EXPORT
#define QWT_EXPORT
Definition: qwt_global.h:38
QwtAnalogClock
An analog clock.
Definition: qwt_analog_clock.h:43


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:24