summaryrefslogtreecommitdiff
path: root/libopie/otimepicker.cpp
Unidiff
Diffstat (limited to 'libopie/otimepicker.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/otimepicker.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/libopie/otimepicker.cpp b/libopie/otimepicker.cpp
index 115d39b..1eca7c5 100644
--- a/libopie/otimepicker.cpp
+++ b/libopie/otimepicker.cpp
@@ -1,54 +1,51 @@
1#include "otimepicker.h" 1#include "otimepicker.h"
2 2
3#include <qbuttongroup.h>
4#include <qtoolbutton.h>
5#include <qlayout.h> 3#include <qlayout.h>
6#include <qstring.h>
7#include <stdio.h> 4#include <stdio.h>
8#include <qlineedit.h> 5#include <qlineedit.h>
9 6
10 7
11/** 8/**
12 * Constructs the widget 9 * Constructs the widget
13 * @param parent The parent of the OTimePicker 10 * @param parent The parent of the OTimePicker
14 * @param name The name of the object 11 * @param name The name of the object
15 * @param fl Window Flags 12 * @param fl Window Flags
16 */ 13 */
17OTimePicker::OTimePicker(QWidget* parent, const char* name, 14OTimePicker::OTimePicker(QWidget* parent, const char* name,
18 WFlags fl) : 15 WFlags fl) :
19 QWidget(parent,name,fl) 16 QWidget(parent,name,fl)
20{ 17{
21 18
22 QVBoxLayout *vbox=new QVBoxLayout(this); 19 QVBoxLayout *vbox=new QVBoxLayout(this);
23 20
24 OClickableLabel *r; 21 OClickableLabel *r;
25 QString s; 22 QString s;
26 23
27 // Hour Row 24 // Hour Row
28 QWidget *row=new QWidget(this); 25 QWidget *row=new QWidget(this);
29 QHBoxLayout *l=new QHBoxLayout(row); 26 QHBoxLayout *l=new QHBoxLayout(row);
30 vbox->addWidget(row); 27 vbox->addWidget(row);
31 28
32 29
33 for (int i=0; i<24; i++) { 30 for (int i=0; i<24; i++) {
34 r=new OClickableLabel(row); 31 r=new OClickableLabel(row);
35 hourLst.append(r); 32 hourLst.append(r);
36 s.sprintf("%.2d",i); 33 s.sprintf("%.2d",i);
37 r->setText(s); 34 r->setText(s);
38 r->setToggleButton(true); 35 r->setToggleButton(true);
39 r->setAlignment(AlignHCenter | AlignVCenter); 36 r->setAlignment(AlignHCenter | AlignVCenter);
40 l->addWidget(r); 37 l->addWidget(r);
41 connect(r, SIGNAL(toggled(bool)), 38 connect(r, SIGNAL(toggled(bool)),
42 this, SLOT(slotHour(bool))); 39 this, SLOT(slotHour(bool)));
43 40
44 if (i==11) { // Second row 41 if (i==11) { // Second row
45 row=new QWidget(this); 42 row=new QWidget(this);
46 l=new QHBoxLayout(row); 43 l=new QHBoxLayout(row);
47 vbox->addWidget(row); 44 vbox->addWidget(row);
48 } 45 }
49 } 46 }
50 47
51 // Minute Row 48 // Minute Row
52 row=new QWidget(this); 49 row=new QWidget(this);
53 l=new QHBoxLayout(row); 50 l=new QHBoxLayout(row);
54 vbox->addWidget(row); 51 vbox->addWidget(row);