author | zautrix <zautrix> | 2005-07-04 14:29:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-04 14:29:18 (UTC) |
commit | 7221ff029af217ae703e8217333bd9b170203181 (patch) (unidiff) | |
tree | f294b7f4c0235858868c2a44f70b3014b7c53aab /korganizer/kojournalview.cpp | |
parent | 172078c08cd183e9f7ec913a9bf42426e3585b78 (diff) | |
download | kdepimpi-7221ff029af217ae703e8217333bd9b170203181.zip kdepimpi-7221ff029af217ae703e8217333bd9b170203181.tar.gz kdepimpi-7221ff029af217ae703e8217333bd9b170203181.tar.bz2 |
box
Diffstat (limited to 'korganizer/kojournalview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kojournalview.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 6fa9b23..9b0e748 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp | |||
@@ -45,39 +45,39 @@ | |||
45 | #include "kojournalview.h" | 45 | #include "kojournalview.h" |
46 | using namespace KOrg; | 46 | using namespace KOrg; |
47 | 47 | ||
48 | KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, | 48 | KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, |
49 | const char *name) | 49 | const char *name) |
50 | : KOrg::BaseView(calendar, parent, name) | 50 | : KOrg::BaseView(calendar, parent, name) |
51 | { | 51 | { |
52 | mCalendar = calendar; | 52 | mCalendar = calendar; |
53 | QHBox * vb = new QHBox ( this ); | ||
54 | QPushButton * newJournal = new QPushButton( vb ); | ||
55 | QPixmap icon; | ||
56 | if ( QApplication::desktop()->width() < 321 ) | ||
57 | icon = SmallIcon("ko16old"); | ||
58 | else | ||
59 | icon = SmallIcon("ko24old"); | ||
60 | newJournal->setPixmap (icon ) ; | ||
61 | int size = newJournal->sizeHint().height(); | ||
62 | newJournal->setFixedSize( size, size ); | ||
63 | mDateLabel = new QLabel ( vb ); | ||
64 | mDateLabel->setMargin(1); | ||
65 | mDateLabel->setAlignment(AlignCenter); | ||
53 | QScrollView * sv = new QScrollView( this ); | 66 | QScrollView * sv = new QScrollView( this ); |
54 | QHBoxLayout * hbl = new QHBoxLayout( this ); | 67 | QVBoxLayout * hbl = new QVBoxLayout( this ); |
68 | hbl->addWidget( vb ); | ||
55 | hbl->addWidget( sv ); | 69 | hbl->addWidget( sv ); |
56 | parWid = new QWidget( sv->viewport() ); | 70 | parWid = new QWidget( sv->viewport() ); |
57 | sv->addChild(parWid); | 71 | sv->addChild(parWid); |
58 | sv->setResizePolicy( QScrollView:: AutoOneFit ); | 72 | sv->setResizePolicy( QScrollView:: AutoOneFit ); |
59 | mTopLayout = new QVBoxLayout(parWid); | 73 | mTopLayout = new QVBoxLayout(parWid); |
60 | QHBox * vb = new QHBox ( parWid ); | 74 | connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); |
61 | QPushButton * newJournal = new QPushButton( vb ); | 75 | getNewEntry(); |
62 | QPixmap icon; | ||
63 | if ( QApplication::desktop()->width() < 321 ) | ||
64 | icon = SmallIcon("ko16old"); | ||
65 | else | ||
66 | icon = SmallIcon("ko24old"); | ||
67 | newJournal->setPixmap (icon ) ; | ||
68 | int size = newJournal->sizeHint().height(); | ||
69 | newJournal->setFixedSize( size, size ); | ||
70 | mDateLabel = new QLabel ( vb ); | ||
71 | mTopLayout->addWidget( vb ); | ||
72 | mDateLabel->setMargin(1); | ||
73 | mDateLabel->setAlignment(AlignCenter); | ||
74 | connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); | ||
75 | getNewEntry(); | ||
76 | } | 76 | } |
77 | 77 | ||
78 | KOJournalView::~KOJournalView() | 78 | KOJournalView::~KOJournalView() |
79 | { | 79 | { |
80 | } | 80 | } |
81 | 81 | ||
82 | int KOJournalView::currentDateCount() | 82 | int KOJournalView::currentDateCount() |
83 | { | 83 | { |