summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/alarm/wakeup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun-plugins/alarm/wakeup.cpp')
-rw-r--r--noatun-plugins/alarm/wakeup.cpp122
1 files changed, 61 insertions, 61 deletions
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());