summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/alarm
diff options
context:
space:
mode:
Diffstat (limited to 'noatun-plugins/alarm')
-rw-r--r--noatun-plugins/alarm/kminutespinbox.cpp10
-rw-r--r--noatun-plugins/alarm/kminutespinbox.h6
-rw-r--r--noatun-plugins/alarm/kpercentspinbox.cpp10
-rw-r--r--noatun-plugins/alarm/kpercentspinbox.h6
-rw-r--r--noatun-plugins/alarm/wakeup.cpp122
-rw-r--r--noatun-plugins/alarm/wakeup.h54
6 files changed, 104 insertions, 104 deletions
diff --git a/noatun-plugins/alarm/kminutespinbox.cpp b/noatun-plugins/alarm/kminutespinbox.cpp
index 3eac84d..72b6d9d 100644
--- a/noatun-plugins/alarm/kminutespinbox.cpp
+++ b/noatun-plugins/alarm/kminutespinbox.cpp
@@ -23,19 +23,19 @@
#include "kminutespinbox.h"
-KMinuteSpinBox::KMinuteSpinBox(int _step, QWidget *_parent, const char *_name)
- : QSpinBox(0, 59, _step, _parent, _name)
+KMinuteSpinBox::KMinuteSpinBox(int _step, TQWidget *_parent, const char *_name)
+ : TQSpinBox(0, 59, _step, _parent, _name)
{
setButtonSymbols(PlusMinus);
setWrapping(true);
}
-QString KMinuteSpinBox::mapValueToText(int v)
+TQString KMinuteSpinBox::mapValueToText(int v)
{
if(v < 10)
- return QString("0%1").arg(v);
+ return TQString("0%1").arg(v);
else
- return QString::number(v);
+ return TQString::number(v);
}
#include "kminutespinbox.moc"
diff --git a/noatun-plugins/alarm/kminutespinbox.h b/noatun-plugins/alarm/kminutespinbox.h
index 14e2c4f..701caad 100644
--- a/noatun-plugins/alarm/kminutespinbox.h
+++ b/noatun-plugins/alarm/kminutespinbox.h
@@ -24,15 +24,15 @@
#ifndef KMINUTESPINBOX_H
#define KMINUTESPINBOX_H
-#include <qspinbox.h>
+#include <tqspinbox.h>
class KMinuteSpinBox : public QSpinBox
{
Q_OBJECT
public:
- KMinuteSpinBox(int _step = 1, QWidget *_parent = 0, const char *_name = 0);
+ KMinuteSpinBox(int _step = 1, TQWidget *_parent = 0, const char *_name = 0);
protected:
- virtual QString mapValueToText(int v);
+ virtual TQString mapValueToText(int v);
};
#endif
diff --git a/noatun-plugins/alarm/kpercentspinbox.cpp b/noatun-plugins/alarm/kpercentspinbox.cpp
index 32b5820..3b16c97 100644
--- a/noatun-plugins/alarm/kpercentspinbox.cpp
+++ b/noatun-plugins/alarm/kpercentspinbox.cpp
@@ -16,20 +16,20 @@
#include "kpercentspinbox.h"
-KPercentSpinBox::KPercentSpinBox(int _step, QWidget *_parent, const char *_name)
- : QSpinBox(0, 100, _step, _parent, _name)
+KPercentSpinBox::KPercentSpinBox(int _step, TQWidget *_parent, const char *_name)
+ : TQSpinBox(0, 100, _step, _parent, _name)
{
setButtonSymbols(PlusMinus);
}
-QString KPercentSpinBox::mapValueToText(int v)
+TQString KPercentSpinBox::mapValueToText(int v)
{
- return QString::number(v)+'%';
+ return TQString::number(v)+'%';
}
#if 0
int KPercentSpinBox::mapTextToValue(bool *ok)
{
- QString mapText= text();
+ TQString mapText= text();
// mapText.truncate(mapText.length()-1);
return mapText.toInt(ok);
diff --git a/noatun-plugins/alarm/kpercentspinbox.h b/noatun-plugins/alarm/kpercentspinbox.h
index abcdd49..7f1a3a2 100644
--- a/noatun-plugins/alarm/kpercentspinbox.h
+++ b/noatun-plugins/alarm/kpercentspinbox.h
@@ -17,16 +17,16 @@
#ifndef KPERCENT_SPINBOX_H
#define KPERCENT_SPINBOX_H
-#include <qspinbox.h>
+#include <tqspinbox.h>
class KPercentSpinBox : public QSpinBox
{
Q_OBJECT
public:
- KPercentSpinBox (int _step=1, QWidget *_parent=0, const char *name=0);
+ KPercentSpinBox (int _step=1, TQWidget *_parent=0, const char *name=0);
protected:
- virtual QString mapValueToText(int v);
+ virtual TQString mapValueToText(int v);
// virtual int mapTextToValue(bool *ok);
};
diff --git a/noatun-plugins/alarm/wakeup.cpp b/noatun-plugins/alarm/wakeup.cpp
index 648d3e3..58c478c 100644
--- a/noatun-plugins/alarm/wakeup.cpp
+++ b/noatun-plugins/alarm/wakeup.cpp
@@ -20,17 +20,17 @@
#include <noatun/app.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
#include <kiconloader.h>
#include <kconfig.h>
@@ -47,7 +47,7 @@ extern "C" Plugin *create_plugin()
Wakeup *Wakeup::wakeme = 0;
-Wakeup::Wakeup() : QObject(), Plugin()
+Wakeup::Wakeup() : TQObject(), Plugin()
{
wakeme = this;
@@ -56,8 +56,8 @@ Wakeup::Wakeup() : QObject(), Plugin()
update();
- QTimer *timer=new QTimer(this);
- connect (timer,SIGNAL(timeout()),SLOT(slotCheckTime()));
+ TQTimer *timer=new TQTimer(this);
+ connect (timer,TQT_SIGNAL(timeout()),TQT_SLOT(slotCheckTime()));
timer->start(60000,false);
}
@@ -100,11 +100,11 @@ void Wakeup::update()
void Wakeup::slotCheckTime()
{
- QTime t;
- QDate d;
+ TQTime t;
+ TQDate d;
- t=QTime::currentTime();
- d=QDate::currentDate();
+ t=TQTime::currentTime();
+ d=TQDate::currentDate();
if (t.minute()!=minute[d.dayOfWeek()-1] || t.hour()!=hour[d.dayOfWeek()-1]) return;
@@ -125,8 +125,8 @@ void Wakeup::PlayerAct()
if (!napp->player()->isPlaying() && modeAlarm!=2) napp->player()->play();
// timer for volume (up/down) according to prefs :-)
- volTimer = new QTimer (this);
- connect (volTimer,SIGNAL(timeout()), SLOT(slotVolumeChange()));
+ volTimer = new TQTimer (this);
+ connect (volTimer,TQT_SIGNAL(timeout()), TQT_SLOT(slotVolumeChange()));
volTimer->start(1000,false); // updates volume every seconds
@@ -165,52 +165,52 @@ void Wakeup::slotVolumeChange()
///////////////////////////////////////////////////////////////////
// Prefs CModule
///////////////////////////////////////////////////////////////////
-WakeupPrefs::WakeupPrefs( QObject *parent ) :
+WakeupPrefs::WakeupPrefs( TQObject *parent ) :
CModule( i18n("Wakeup"), i18n("Alarm Configuration"), "date", parent )
{
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
- QGridLayout *grid = new QGridLayout (layout,8,4);
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid = new TQGridLayout (layout,8,4);
- monday=new QCheckBox(i18n("Monday"),this);
- tuesday=new QCheckBox(i18n("Tuesday"),this);
- wednesday=new QCheckBox(i18n("Wednesday"),this);
- thursday=new QCheckBox(i18n("Thursday"),this);
- friday=new QCheckBox(i18n("Friday"),this);
- saturday=new QCheckBox(i18n("Saturday"),this);
- sunday=new QCheckBox(i18n("Sunday"),this);
- hour1 = new QSpinBox(0, 23, 1, this , "Hour1");
- hour1->setButtonSymbols(QSpinBox::PlusMinus);
+ monday=new TQCheckBox(i18n("Monday"),this);
+ tuesday=new TQCheckBox(i18n("Tuesday"),this);
+ wednesday=new TQCheckBox(i18n("Wednesday"),this);
+ thursday=new TQCheckBox(i18n("Thursday"),this);
+ friday=new TQCheckBox(i18n("Friday"),this);
+ saturday=new TQCheckBox(i18n("Saturday"),this);
+ sunday=new TQCheckBox(i18n("Sunday"),this);
+ hour1 = new TQSpinBox(0, 23, 1, this , "Hour1");
+ hour1->setButtonSymbols(TQSpinBox::PlusMinus);
minute1 = new KMinuteSpinBox(1, this , "Minute1");
- hour2 = new QSpinBox(0, 23, 1, this, "Hour2");
- hour2->setButtonSymbols(QSpinBox::PlusMinus);
+ hour2 = new TQSpinBox(0, 23, 1, this, "Hour2");
+ hour2->setButtonSymbols(TQSpinBox::PlusMinus);
minute2 = new KMinuteSpinBox(1, this, "Minute2");
- hour3 = new QSpinBox(0, 23, 1, this, "Hour3");
- hour3->setButtonSymbols(QSpinBox::PlusMinus);
+ hour3 = new TQSpinBox(0, 23, 1, this, "Hour3");
+ hour3->setButtonSymbols(TQSpinBox::PlusMinus);
minute3 = new KMinuteSpinBox(1, this, "Minute3");
- hour4 = new QSpinBox(0, 23, 1, this, "Hour4");
- hour4->setButtonSymbols(QSpinBox::PlusMinus);
+ hour4 = new TQSpinBox(0, 23, 1, this, "Hour4");
+ hour4->setButtonSymbols(TQSpinBox::PlusMinus);
minute4 = new KMinuteSpinBox(1, this, "Minute4");
- hour5 = new QSpinBox(0, 23, 1, this, "Hour5");
- hour5->setButtonSymbols(QSpinBox::PlusMinus);
+ hour5 = new TQSpinBox(0, 23, 1, this, "Hour5");
+ hour5->setButtonSymbols(TQSpinBox::PlusMinus);
minute5 = new KMinuteSpinBox(1, this, "Minute5");
- hour6 = new QSpinBox(0, 23, 1, this, "Hour6");
- hour6->setButtonSymbols(QSpinBox::PlusMinus);
+ hour6 = new TQSpinBox(0, 23, 1, this, "Hour6");
+ hour6->setButtonSymbols(TQSpinBox::PlusMinus);
minute6 = new KMinuteSpinBox(1, this, "Minute6");
- hour7 = new QSpinBox(0, 23, 1, this, "Hour7");
- hour7->setButtonSymbols(QSpinBox::PlusMinus);
+ hour7 = new TQSpinBox(0, 23, 1, this, "Hour7");
+ hour7->setButtonSymbols(TQSpinBox::PlusMinus);
minute7 = new KMinuteSpinBox(1, this, "Minute7");
- QLabel *selectday = new QLabel (i18n("Select days:"),this);
- QLabel *choosehour = new QLabel (i18n("Hour"),this);
- QLabel *choosemin = new QLabel (i18n("Minute"),this);
+ TQLabel *selectday = new TQLabel (i18n("Select days:"),this);
+ TQLabel *choosehour = new TQLabel (i18n("Hour"),this);
+ TQLabel *choosemin = new TQLabel (i18n("Minute"),this);
grid->addWidget (selectday,0,0,Qt::AlignLeft);
grid->addWidget (choosehour,0,1,Qt::AlignLeft);
grid->addWidget (choosemin,0,2,Qt::AlignLeft);
- applyall = new QPushButton (this,"applyall");
+ applyall = new TQPushButton (this,"applyall");
applyall->setPixmap( BarIcon("down", KIcon::SizeSmall) );
- applyall->setSizePolicy( QSizePolicy( QSizePolicy::Fixed,
- QSizePolicy::Fixed,
+ applyall->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed,
applyall->sizePolicy().hasHeightForWidth()) );
grid->addWidget (applyall,1,3,Qt::AlignLeft);
@@ -237,28 +237,28 @@ WakeupPrefs::WakeupPrefs( QObject *parent ) :
grid->addWidget (minute7,7,2,Qt::AlignLeft);
grid->setColStretch (0,3);
- QButtonGroup *modeGroup = new QButtonGroup (3, Qt::Vertical, i18n ("Volume Control"),this);
- alarmmode = new QRadioButton (i18n("No change to volume, just starts the player"),modeGroup);
- nightmode = new QRadioButton (i18n("The volume decreases slowly and finally stops the player"),modeGroup);
- morningmode = new QRadioButton (i18n("The player starts and the volume increases to the chosen value"),modeGroup);
+ TQButtonGroup *modeGroup = new TQButtonGroup (3, Qt::Vertical, i18n ("Volume Control"),this);
+ alarmmode = new TQRadioButton (i18n("No change to volume, just starts the player"),modeGroup);
+ nightmode = new TQRadioButton (i18n("The volume decreases slowly and finally stops the player"),modeGroup);
+ morningmode = new TQRadioButton (i18n("The player starts and the volume increases to the chosen value"),modeGroup);
modeGroup->setExclusive(true);
morningmode->setChecked(true);
- volFrame = new QFrame (this);
- QLabel *volEndLabel = new QLabel (i18n("Volume increases to:"), volFrame);
+ volFrame = new TQFrame (this);
+ TQLabel *volEndLabel = new TQLabel (i18n("Volume increases to:"), volFrame);
volEndValue = new KPercentSpinBox (1 ,volFrame,"volendvalue");
layout->addWidget(modeGroup);
layout->addWidget(volFrame);
layout->addStretch();
- QHBoxLayout *volLayout = new QHBoxLayout(volFrame, KDialog::marginHint(), KDialog::spacingHint());
+ TQHBoxLayout *volLayout = new TQHBoxLayout(volFrame, KDialog::marginHint(), KDialog::spacingHint());
volLayout->addWidget(volEndLabel);
volLayout->addWidget(volEndValue);
volLayout->addStretch();
- connect (morningmode,SIGNAL(stateChanged(int)),SLOT(slotViewFrame(int)));
- connect (applyall,SIGNAL(clicked()),SLOT(slotApplyAll()));
+ connect (morningmode,TQT_SIGNAL(stateChanged(int)),TQT_SLOT(slotViewFrame(int)));
+ connect (applyall,TQT_SIGNAL(clicked()),TQT_SLOT(slotApplyAll()));
load();
}
@@ -310,7 +310,7 @@ void WakeupPrefs::save()
config->writeEntry("Minute6",minute6->text());
config->writeEntry("Hour7",hour7->text());
config->writeEntry("Minute7",minute7->text());
- QString val(volEndValue->text());
+ TQString val(volEndValue->text());
config->writeEntry("VolumeEnd",val);
if (nightmode->isChecked()) config->writeEntry("ModeAlarm",2);
@@ -349,7 +349,7 @@ void WakeupPrefs::load()
hour7->setValue(KGlobal::config()->readNumEntry("Hour7",7));
minute7->setValue(KGlobal::config()->readNumEntry("Minute7",0));
- QString volend(KGlobal::config()->readEntry("VolumeEnd","80%"));
+ TQString volend(KGlobal::config()->readEntry("VolumeEnd","80%"));
volend.truncate(volend.length()-1);
volEndValue->setValue(volend.toInt());
diff --git a/noatun-plugins/alarm/wakeup.h b/noatun-plugins/alarm/wakeup.h
index e2992a8..65dc644 100644
--- a/noatun-plugins/alarm/wakeup.h
+++ b/noatun-plugins/alarm/wakeup.h
@@ -20,16 +20,16 @@
#include <noatun/pref.h>
#include <noatun/plugin.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqpushbutton.h>
class QSpinBox;
class QCheckBox;
class KMinuteSpinBox;
class KPercentSpinBox;
-class Wakeup : public QObject, public Plugin
+class Wakeup : public TQObject, public Plugin
{
Q_OBJECT
NOATUNPLUGIND
@@ -46,12 +46,12 @@ public slots:
void slotCheckTime();
private:
- QStringList *day_list;
-// QString songlist;
+ TQStringList *day_list;
+// TQString songlist;
int hour[7];
int minute[7];
bool days[7];
- QTimer *volTimer;
+ TQTimer *volTimer;
int volEndVal;
int modeAlarm;
};
@@ -62,7 +62,7 @@ class WakeupPrefs : public CModule
Q_OBJECT
public:
- WakeupPrefs( QObject *parent );
+ WakeupPrefs( TQObject *parent );
virtual void save();
virtual void load();
public slots:
@@ -70,13 +70,13 @@ public slots:
void slotApplyAll();
private:
- QCheckBox *monday;
- QCheckBox *tuesday;
- QCheckBox *wednesday;
- QCheckBox *thursday;
- QCheckBox *friday;
- QCheckBox *saturday;
- QCheckBox *sunday;
+ TQCheckBox *monday;
+ TQCheckBox *tuesday;
+ TQCheckBox *wednesday;
+ TQCheckBox *thursday;
+ TQCheckBox *friday;
+ TQCheckBox *saturday;
+ TQCheckBox *sunday;
KMinuteSpinBox *minute1;
KMinuteSpinBox *minute2;
KMinuteSpinBox *minute3;
@@ -84,20 +84,20 @@ private:
KMinuteSpinBox *minute5;
KMinuteSpinBox *minute6;
KMinuteSpinBox *minute7;
- QSpinBox *hour1;
- QSpinBox *hour2;
- QSpinBox *hour3;
- QSpinBox *hour4;
- QSpinBox *hour5;
- QSpinBox *hour6;
- QSpinBox *hour7;
+ TQSpinBox *hour1;
+ TQSpinBox *hour2;
+ TQSpinBox *hour3;
+ TQSpinBox *hour4;
+ TQSpinBox *hour5;
+ TQSpinBox *hour6;
+ TQSpinBox *hour7;
KPercentSpinBox *volEndValue;
- QRadioButton *alarmmode;
- QRadioButton *morningmode;
- QRadioButton *nightmode;
- QFrame *volFrame;
- QPushButton *applyall;
+ TQRadioButton *alarmmode;
+ TQRadioButton *morningmode;
+ TQRadioButton *nightmode;
+ TQFrame *volFrame;
+ TQPushButton *applyall;
};
#endif // WAKEUP_H