summaryrefslogtreecommitdiff
path: root/noncore/tools/clock/clock.cpp
Unidiff
Diffstat (limited to 'noncore/tools/clock/clock.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/clock/clock.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp
index 9b324e0..325a307 100644
--- a/noncore/tools/clock/clock.cpp
+++ b/noncore/tools/clock/clock.cpp
@@ -99,21 +99,26 @@ public:
99// 99//
100// 100//
101AlarmDlg::AlarmDlg(QWidget *parent, const char *name, bool modal, 101AlarmDlg::AlarmDlg(QWidget *parent, const char *name, bool modal,
102 const QString &txt) : 102 const QString &txt) :
103 AlarmDlgBase(parent, name, modal) 103 AlarmDlgBase(parent, name, modal)
104{ 104{
105 // Increase font size to make it a little more readable
106 QFont f(font());
107 f.setPointSize((int)(f.pointSize() * 1.7));
108 setFont(f);
109
105 setCaption( tr("Clock") ); 110 setCaption( tr("Clock") );
106 pixmap->setPixmap( Opie::Core::OResource::loadPixmap("clock/alarmbell") ); 111 pixmap->setPixmap( Opie::Core::OResource::loadPixmap("clock/alarmbell") );
107 alarmDlgLabel->setText(txt); 112 alarmDlgLabel->setText(txt);
108 113
109 connect(snoozeTime, SIGNAL(valueChanged(int)), this, 114 connect(cmdSnooze, SIGNAL(clicked()), this, SLOT(checkSnooze()));
110 SLOT(changePrompt(int))); 115 connect(cmdOk, SIGNAL(clicked()), this, SLOT(accept()));
111 connect(cmdOk, SIGNAL(clicked()), this, SLOT(checkSnooze()));
112} 116}
113 117
118
114// 119//
115// 120//
116// 121//
117void 122void
118AlarmDlg::setText(const QString &txt) 123AlarmDlg::setText(const QString &txt)
119{ 124{
@@ -141,20 +146,12 @@ AlarmDlg::checkSnooze(void)
141 } 146 }
142 accept(); 147 accept();
143} 148}
144 149
145 150
146 151
147void
148AlarmDlg::changePrompt(int mins)
149{
150 cmdOk->setText(mins > 0 ? tr("Snooze") : tr("Close") );
151}
152
153
154
155Clock::Clock( QWidget * parent, const char *, WFlags f ) 152Clock::Clock( QWidget * parent, const char *, WFlags f )
156 : ClockBase( parent, "clock", f ), swatch_splitms(99), init(FALSE) // No tr 153 : ClockBase( parent, "clock", f ), swatch_splitms(99), init(FALSE) // No tr
157{ 154{
158 alarmDlg = 0; 155 alarmDlg = 0;
159 swLayout = 0; 156 swLayout = 0;
160 dayBtn = new QToolButton * [7]; 157 dayBtn = new QToolButton * [7];