author | zautrix <zautrix> | 2005-06-29 12:29:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-29 12:29:53 (UTC) |
commit | 0d4d5898a32f162dca010db329e02310a14629d5 (patch) (side-by-side diff) | |
tree | 2d6e758a8a5ec64995de79a4cd1c02c89f509190 /korganizer/kojournalview.cpp | |
parent | 435e68d6ace30fb2121b718226e00be44971c617 (diff) | |
download | kdepimpi-0d4d5898a32f162dca010db329e02310a14629d5.zip kdepimpi-0d4d5898a32f162dca010db329e02310a14629d5.tar.gz kdepimpi-0d4d5898a32f162dca010db329e02310a14629d5.tar.bz2 |
j fixes
Diffstat (limited to 'korganizer/kojournalview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kojournalview.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp index 9e354d3..4fc9013 100644 --- a/korganizer/kojournalview.cpp +++ b/korganizer/kojournalview.cpp @@ -24,16 +24,22 @@ // // View of Journal entries #include <qlayout.h> #include <qscrollview.h> #include <qpopupmenu.h> +#include <qhbox.h> +#include <qpushbutton.h> +#include <qlabel.h> +#include <qpushbutton.h> +#include <qapplication.h> #include <klocale.h> #include <kdebug.h> #include "koprefs.h" +#include <kglobal.h> #include <libkcal/calendar.h> #include "journalentry.h" #include "kojournalview.h" @@ -48,12 +54,27 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, QHBoxLayout * hbl = new QHBoxLayout( this ); 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 ); + QIconSet icon; + if ( QApplication::desktop()->width() < 321 ) + icon = SmallIcon("ko16old"); + else + icon = SmallIcon("ko24old"); + newJournal->setIconSet (icon ) ; + int size = newJournal->sizeHint().height(); + newJournal->setFixedSize( size, size ); + mDateLabel = new QLabel ( vb ); + mTopLayout->addWidget( vb ); + mDateLabel->setMargin(2); + mDateLabel->setAlignment(AlignCenter); + connect( newJournal, SIGNAL( clicked() ), this , SLOT( newJournal() ) ); getNewEntry(); } KOJournalView::~KOJournalView() { } @@ -167,12 +188,13 @@ void KOJournalView::showList(QPtrList<Journal> jl) } } void KOJournalView::showDates(const QDate &start, const QDate &) { mDate = start; + mDateLabel-> setText(KGlobal::locale()->formatDate(mDate)); QPtrList<Journal> jl = calendar()->journals4Date( start ); showList( jl ); } void KOJournalView::showEvents(QPtrList<Event>) { |