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 @@ -29,2 +29,7 @@ #include <qpopupmenu.h> +#include <qhbox.h> +#include <qpushbutton.h> +#include <qlabel.h> +#include <qpushbutton.h> +#include <qapplication.h> @@ -33,2 +38,3 @@ #include "koprefs.h" +#include <kglobal.h> @@ -53,2 +59,17 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, 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(); @@ -172,2 +193,3 @@ void KOJournalView::showDates(const QDate &start, const QDate &) mDate = start; + mDateLabel-> setText(KGlobal::locale()->formatDate(mDate)); QPtrList<Journal> jl = calendar()->journals4Date( start ); |