summaryrefslogtreecommitdiffstats
path: root/tdeui/tests/kunbalancedgrdtest.h
blob: 8b789377260b8aa7e9ddd04af2a7c70c8a6ffa1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//
// Simple little hack to show off new diagonal gradients.
//
// (C) KDE Artistic Daniel M. Duley <mosfet@kde.org>
//

#ifndef __KGRADIENT_TEST_H
#define __KGRADIENT_TEST_H

#include <tqwidget.h>
#include <kpixmap.h>
#include <tqslider.h>
#include <tqlabel.h>
#include <tqdatetime.h>

class KGradientWidget : public TQWidget
{
public:
    KGradientWidget(TQWidget *parent=0, const char *name=0);

    void setBalance(int a, int b) { xbalance = a; ybalance = b; }
protected:
    void paintEvent(TQPaintEvent *ev);
private:
    KPixmap pix;
    int xbalance, ybalance;
    TQTime time;
 
};

class myTopWidget: public TQWidget
{
  Q_OBJECT
public:
  myTopWidget(TQWidget *parent=0, const char *name=0);
  
private:
  TQLabel *bLabel;
  TQSlider *xSlider, *ySlider;
  KGradientWidget *grds;

  TQTime time;

  int itime, otime;

private slots:
  void rebalance();
};
#endif