summaryrefslogtreecommitdiffabout
path: root/korganizer/kojournalview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kojournalview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kojournalview.cpp36
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 @@
#include "kojournalview.h"
using namespace KOrg;
KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
const char *name)
: 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()
{
}
int KOJournalView::currentDateCount()
{