summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/datepicker.cpp
Unidiff
Diffstat (limited to 'noncore/apps/qashmoney/datepicker.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/datepicker.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/qashmoney/datepicker.cpp b/noncore/apps/qashmoney/datepicker.cpp
index 02fbcf3..7997c0b 100755
--- a/noncore/apps/qashmoney/datepicker.cpp
+++ b/noncore/apps/qashmoney/datepicker.cpp
@@ -1,46 +1,46 @@
1#include "datepicker.h" 1#include "datepicker.h"
2 2
3DatePicker::DatePicker ( QDate entrydate ) : QDialog ( 0, 0, TRUE ) 3DatePicker::DatePicker ( QDate entrydate ) : QDialog ( 0, 0, TRUE )
4 { 4 {
5 setCaption ( "Select Date" ); 5 setCaption ( "Select Date" );
6 date = entrydate; 6 date = entrydate;
7 day = date.day(); 7 day = date.day();
8 month = date.month(); 8 month = date.month();
9 year = date.year(); 9 year = date.year();
10 10
11 daylabel = new QLabel ( "Day", this ); 11 daylabel = new QLabel ( "Day", this );
12 monthlabel = new QLabel ( "Month", this ); 12 monthlabel = new QLabel ( "Month", this );
13 yearlabel = new QLabel ( "Year", this ); 13 yearlabel = new QLabel ( "Year", this );
14 14
15 daybox = new QComboBox ( this, "daybox" ); 15 daybox = new QComboBox ( this, "daybox" );
16 connect ( daybox, SIGNAL ( activated ( int ) ), this, SLOT ( setDay ( int ) ) ); 16 connect ( daybox, SIGNAL ( activated(int) ), this, SLOT ( setDay(int) ) );
17 displayDays ( daybox ); 17 displayDays ( daybox );
18 monthbox = new QComboBox ( this, "monthbox" ); 18 monthbox = new QComboBox ( this, "monthbox" );
19 connect ( monthbox, SIGNAL ( activated ( int ) ), this, SLOT ( setMonth ( int ) ) ); 19 connect ( monthbox, SIGNAL ( activated(int) ), this, SLOT ( setMonth(int) ) );
20 displayMonths ( monthbox ); 20 displayMonths ( monthbox );
21 yearbox = new QComboBox ( this, "yearbox" ); 21 yearbox = new QComboBox ( this, "yearbox" );
22 connect ( yearbox, SIGNAL ( activated ( int ) ), this, SLOT ( setYear ( int ) ) ); 22 connect ( yearbox, SIGNAL ( activated(int) ), this, SLOT ( setYear(int) ) );
23 displayYears ( yearbox ); 23 displayYears ( yearbox );
24 24
25 layout = new QGridLayout ( this, 2, 3, 5, 5, "datepickerlayout" ); 25 layout = new QGridLayout ( this, 2, 3, 5, 5, "datepickerlayout" );
26 layout->addWidget ( daylabel, 0, 2 ); 26 layout->addWidget ( daylabel, 0, 2 );
27 layout->addWidget ( monthlabel, 0, 1 ); 27 layout->addWidget ( monthlabel, 0, 1 );
28 layout->addWidget ( yearlabel, 0, 0 ); 28 layout->addWidget ( yearlabel, 0, 0 );
29 layout->addWidget ( daybox, 1, 2 ); 29 layout->addWidget ( daybox, 1, 2 );
30 layout->addWidget ( monthbox, 1, 1 ); 30 layout->addWidget ( monthbox, 1, 1 );
31 layout->addWidget ( yearbox, 1, 0 ); 31 layout->addWidget ( yearbox, 1, 0 );
32 } 32 }
33 33
34void DatePicker::displayDays ( QComboBox *daybox ) 34void DatePicker::displayDays ( QComboBox *daybox )
35 { 35 {
36 int counter; 36 int counter;
37 int days = date.daysInMonth(); 37 int days = date.daysInMonth();
38 for ( counter = 1; counter <= days; counter++ ) 38 for ( counter = 1; counter <= days; counter++ )
39 daybox->insertItem ( QString::number ( counter ) ); 39 daybox->insertItem ( QString::number ( counter ) );
40 daybox->setCurrentItem ( ( date.day() ) - 1 ); 40 daybox->setCurrentItem ( ( date.day() ) - 1 );
41 } 41 }
42 42
43void DatePicker::displayMonths ( QComboBox *monthbox ) 43void DatePicker::displayMonths ( QComboBox *monthbox )
44 { 44 {
45 int counter; 45 int counter;
46 for ( counter = 1; counter <= 12; counter++ ) 46 for ( counter = 1; counter <= 12; counter++ )