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 @@ -27,10 +27,16 @@ #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> @@ -51,6 +57,21 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, 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(); } @@ -170,6 +191,7 @@ 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 ); } |