Warning, file /frameworks/kwidgetsaddons/tests/kledtest.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 #ifndef kledtest_h
0002 #define kledtest_h
0003 
0004 #include <QTimer>
0005 #include <QWidget>
0006 #include <kled.h>
0007 #include <stdlib.h>
0008 
0009 class KLedTest : public QWidget
0010 {
0011     Q_OBJECT
0012 protected:
0013     QTimer timer;
0014     KLed *leds[/*KLed::NoOfShapes*/ 2 * /*KLed::NoOfLooks*/ 3 * /*KLed::NoOfStates*/ 2];
0015     const int LedWidth;
0016     const int LedHeight;
0017     const int Grid;
0018     KLed::Shape shape;
0019     KLed::Look look;
0020     KLed::State state;
0021     int x, y, index;
0022 
0023     QTimer t_toggle, t_color, t_look;
0024     // KLed *l;                // create lamp
0025     // KLed *l;                // create lamp
0026     KLed *l; // create lamp
0027     // KLed *l;                // create lamp
0028     // KLed *l;                // create lamp
0029     int ledcolor;
0030     KLed::Look ledlook;
0031 
0032 public:
0033     KLedTest(QWidget *parent = nullptr);
0034     ~KLedTest() override;
0035 
0036     bool kled_round;
0037 
0038 public Q_SLOTS:
0039     void timeout();
0040 
0041     void nextColor();
0042     void nextLook();
0043 };
0044 
0045 #endif