From 7221ff029af217ae703e8217333bd9b170203181 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 04 Jul 2005 14:29:18 +0000 Subject: box --- (limited to 'korganizer/kojournalview.cpp') 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, : KOrg::BaseView(calendar, parent, name) { 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(); } KOJournalView::~KOJournalView() -- cgit v0.9.0.2