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 | |||
@@ -50,29 +50,29 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, | |||
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() |