summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/alarm/wakeup.h
blob: e2992a8ba4f04e287f42431c12502e3fc40eac3e (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
/***************************************************************************
                 wakeup.h  -  alarm plugin for noatun
                     -------------------
     begin    : Wed Apr 11 CEST 2000
     copyright: (C) 2001 by Mickael Marchand <mikmak@freenux.org>
                                                       
 ***************************************************************************/
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/


#ifndef WAKEUP_H
#define WAKEUP_H

#include <noatun/pref.h>
#include <noatun/plugin.h>
#include <qradiobutton.h>
#include <qbuttongroup.h>
#include <qpushbutton.h>

class QSpinBox;
class QCheckBox;
class KMinuteSpinBox;
class KPercentSpinBox;

class Wakeup : public QObject, public Plugin
{
	Q_OBJECT
	NOATUNPLUGIND

public:
	Wakeup();
	~Wakeup();
	static Wakeup *wakeme;
	void PlayerAct();
	void update();

public slots:
	void slotVolumeChange(); 
	void slotCheckTime();
	
private:
	QStringList *day_list;
//	QString songlist;
	int hour[7];
	int minute[7];
	bool days[7];
	QTimer *volTimer;
	int volEndVal;
	int modeAlarm;
};


class WakeupPrefs : public CModule
{
	Q_OBJECT

public:
	WakeupPrefs( QObject *parent );
	virtual void save();
	virtual void load();
public slots:
	void slotViewFrame(int);
	void slotApplyAll();

private:
	QCheckBox *monday;
	QCheckBox *tuesday;
	QCheckBox *wednesday;
	QCheckBox *thursday;
	QCheckBox *friday;
	QCheckBox *saturday;
	QCheckBox *sunday;
	KMinuteSpinBox *minute1;
	KMinuteSpinBox *minute2;
	KMinuteSpinBox *minute3;
	KMinuteSpinBox *minute4;
	KMinuteSpinBox *minute5;
	KMinuteSpinBox *minute6;
	KMinuteSpinBox *minute7;
	QSpinBox *hour1;
	QSpinBox *hour2;
	QSpinBox *hour3;
	QSpinBox *hour4;
	QSpinBox *hour5;
	QSpinBox *hour6;
	QSpinBox *hour7;

	KPercentSpinBox *volEndValue;
	QRadioButton *alarmmode;
	QRadioButton *morningmode;
	QRadioButton *nightmode;
	QFrame *volFrame;
	QPushButton *applyall;
};

#endif // WAKEUP_H