summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjtextdisplay.h
blob: ffb3cbae58d37aad62d48d954b07dad3e482571a (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#ifndef KJTEXTDISPLAY_H
#define KJTEXTDISPLAY_H

#include "kjwidget.h"
class KJLoader;
class KPixmap;
//#include "kjloader.h"

#include <tqobject.h>
#include <tqpainter.h>

class KJFilename : public TQObject, public KJWidget
{
TQ_OBJECT
  
public:
	KJFilename(const TQStringList &, KJLoader *parent);
	~KJFilename();

	virtual void paint(TQPainter *, const TQRect &rect);
	virtual bool mousePress(const TQPoint &pos);
	virtual void mouseRelease(const TQPoint &, bool in);
//	virtual void newFile();
	virtual void timeUpdate(int);
	virtual void readConfig();

	void prepareString(const TQCString &str);
	virtual TQString tip();

	virtual void timerEvent(TQTimerEvent *);

private:
	TQCString mLastTitle;
	int mDistance;
	int mTimerUpdates;
	int mWidth;
	int mTickerPos;
	TQPixmap mView;
	KPixmap *mBack;
};


class KJTime : public KJWidget
{
public:
	KJTime(const TQStringList &, KJLoader *parent);
	~KJTime();

	virtual void paint(TQPainter *, const TQRect &rect);
	virtual bool mousePress(const TQPoint &pos);
	virtual void mouseRelease(const TQPoint &, bool in);
	virtual void timeUpdate(int);
	virtual void readConfig();

	void prepareString(const TQCString &time);
	virtual TQString tip();

//	enum countModes { Up=0, Down };

private:
	TQCString mLastTime;
	int mWidth;
	bool countDown;
	TQPixmap mTime;
	KPixmap *mBack;

private:
	TQString lengthString ( void );

};


class KJVolumeText : public KJWidget
{
public:
	KJVolumeText(const TQStringList &, KJLoader *parent);
	~KJVolumeText();

	virtual void paint(TQPainter *, const TQRect &rect);
	virtual bool mousePress(const TQPoint &pos);
	virtual void timeUpdate(int);
	virtual void readConfig();

	void prepareString(const TQCString &time);
	virtual TQString tip();

private:
	TQCString mLastVolume;
	int mWidth;
	TQPixmap mVolume;
	KPixmap *mBack;
};


class KJPitchText : public KJWidget
{
public:
	KJPitchText(const TQStringList &, KJLoader *parent);
	~KJPitchText();

	virtual void paint(TQPainter *, const TQRect &rect);
	virtual bool mousePress(const TQPoint &pos);
	virtual void mouseRelease(const TQPoint &, bool in);
	virtual void timeUpdate(int);
	virtual void readConfig();

	void prepareString(const TQCString &time);
	virtual TQString tip();

private:
	TQCString mLastPitch;
	int mWidth;
	TQPixmap mSpeed;
	KPixmap *mBack;
};


class KJFileInfo : public KJWidget
{
public:
	KJFileInfo(const TQStringList &, KJLoader *parent);
	~KJFileInfo();

	virtual void paint(TQPainter *, const TQRect &rect);
	virtual bool mousePress(const TQPoint &pos);
	virtual void timeUpdate(int);
	virtual void readConfig();

	void prepareString(const TQCString &time);
	virtual TQString tip();

private:
	TQCString mLastTime;
	TQString mInfoType;
	int mWidth;
	TQPixmap mTime;
	KPixmap *mBack;
};

#endif