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 @@ -51,27 +51,27 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, { mCalendar = calendar; + QHBox * vb = new QHBox ( this ); + QPushButton * newJournal = new QPushButton( vb ); + QPixmap icon; + if ( QApplication::desktop()->width() < 321 ) + icon = SmallIcon("ko16old"); + else + icon = SmallIcon("ko24old"); + newJournal->setPixmap (icon ) ; + int size = newJournal->sizeHint().height(); + newJournal->setFixedSize( size, size ); + mDateLabel = new QLabel ( vb ); + mDateLabel->setMargin(1); + mDateLabel->setAlignment(AlignCenter); QScrollView * sv = new QScrollView( this ); - QHBoxLayout * hbl = new QHBoxLayout( this ); + QVBoxLayout * hbl = new QVBoxLayout( this ); + hbl->addWidget( vb ); hbl->addWidget( sv ); parWid = new QWidget( sv->viewport() ); sv->addChild(parWid); sv->setResizePolicy( QScrollView:: AutoOneFit ); - mTopLayout = new QVBoxLayout(parWid); - QHBox * vb = new QHBox ( parWid ); - QPushButton * newJournal = new QPushButton( vb ); - QPixmap icon; - if ( QApplication::desktop()->width() < 321 ) - icon = SmallIcon("ko16old"); - else - icon = SmallIcon("ko24old"); - newJournal->setPixmap (icon ) ; - int size = newJournal->sizeHint().height(); - newJournal->setFixedSize( size, size ); - mDateLabel = new QLabel ( vb ); - mTopLayout->addWidget( vb ); - mDateLabel->setMargin(1); - mDateLabel->setAlignment(AlignCenter); - connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); - getNewEntry(); + mTopLayout = new QVBoxLayout(parWid); + connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); + getNewEntry(); } |