author | zautrix <zautrix> | 2005-02-08 14:12:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-08 14:12:31 (UTC) |
commit | 41111b332c2a5f1b2ec152df309b9199f5e9c921 (patch) (unidiff) | |
tree | 3a2e5c5a25cdb52f542b2fe84a03f94599be2fe3 /libkdepim | |
parent | 9927a063f34bb826a4b5f7f7029308c9c66acbce (diff) | |
download | kdepimpi-41111b332c2a5f1b2ec152df309b9199f5e9c921.zip kdepimpi-41111b332c2a5f1b2ec152df309b9199f5e9c921.tar.gz kdepimpi-41111b332c2a5f1b2ec152df309b9199f5e9c921.tar.bz2 |
fixes
-rw-r--r-- | libkdepim/kdatepicker.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index d8bc9f5..2be9c9e 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp | |||
@@ -28,16 +28,17 @@ | |||
28 | #include <qdialog.h> | 28 | #include <qdialog.h> |
29 | #include <qtoolbutton.h> | 29 | #include <qtoolbutton.h> |
30 | #include <qfont.h> | 30 | #include <qfont.h> |
31 | #include <qapplication.h> | 31 | #include <qapplication.h> |
32 | #include <qlineedit.h> | 32 | #include <qlineedit.h> |
33 | #include <qvalidator.h> | 33 | #include <qvalidator.h> |
34 | #include <kdebug.h> | 34 | #include <kdebug.h> |
35 | #include <knotifyclient.h> | 35 | #include <knotifyclient.h> |
36 | #include <kglobalsettings.h> | ||
36 | #include "kdatetbl.h" | 37 | #include "kdatetbl.h" |
37 | #include "kdateedit.h" | 38 | #include "kdateedit.h" |
38 | //#include "kdatepicker.moc" | 39 | //#include "kdatepicker.moc" |
39 | 40 | ||
40 | 41 | ||
41 | KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) | 42 | KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) |
42 | : QFrame(parent,name), | 43 | : QFrame(parent,name), |
43 | yearForward(new QToolButton(this)), | 44 | yearForward(new QToolButton(this)), |
@@ -46,24 +47,19 @@ KDatePicker::KDatePicker(QWidget *parent, QDate dt, const char *name) | |||
46 | monthBackward(new QToolButton(this)), | 47 | monthBackward(new QToolButton(this)), |
47 | selectMonth(new QToolButton(this)), | 48 | selectMonth(new QToolButton(this)), |
48 | selectYear(new QToolButton(this)), | 49 | selectYear(new QToolButton(this)), |
49 | //line(new QLineEdit(this)), | 50 | //line(new QLineEdit(this)), |
50 | val(new KDateValidator(this)) | 51 | val(new KDateValidator(this)) |
51 | //table(new KDateTable(this)), | 52 | //table(new KDateTable(this)), |
52 | //fontsize(1) | 53 | //fontsize(1) |
53 | { | 54 | { |
54 | // ----- | 55 | setFont ( KGlobalSettings::generalFont() ); |
55 | int size = 12; | ||
56 | if ( QApplication::desktop()->width() >= 480 ) | ||
57 | size = 18; | ||
58 | fontsize = size; | ||
59 | setFont ( QFont("helvetica",size) ); | ||
60 | table = new KDateTable(this); | 56 | table = new KDateTable(this); |
61 | setFontSize(size); | 57 | setFontSize(font().pointSize()+2); |
62 | //line->setValidator(val); | 58 | //line->setValidator(val); |
63 | lineDate = new KDateEdit( this, "dateediipicker", true ); | 59 | lineDate = new KDateEdit( this, "dateediipicker", true ); |
64 | yearForward->setPixmap(SmallIcon("2rightarrowB")); | 60 | yearForward->setPixmap(SmallIcon("2rightarrowB")); |
65 | yearBackward->setPixmap(SmallIcon("2leftarrowB")); | 61 | yearBackward->setPixmap(SmallIcon("2leftarrowB")); |
66 | monthForward->setPixmap(SmallIcon("1rightarrowB")); | 62 | monthForward->setPixmap(SmallIcon("1rightarrowB")); |
67 | monthBackward->setPixmap(SmallIcon("1leftarrowB")); | 63 | monthBackward->setPixmap(SmallIcon("1leftarrowB")); |
68 | setDate(dt); // set button texts | 64 | setDate(dt); // set button texts |
69 | connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate))); | 65 | connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate))); |