summaryrefslogtreecommitdiffabout
path: root/korganizer/kojournalview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kojournalview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kojournalview.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index fae59d6..9e354d3 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -22,12 +22,13 @@
*/
//
// View of Journal entries
#include <qlayout.h>
+#include <qscrollview.h>
#include <qpopupmenu.h>
#include <klocale.h>
#include <kdebug.h>
#include "koprefs.h"
@@ -40,13 +41,19 @@ using namespace KOrg;
KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
const char *name)
: KOrg::BaseView(calendar, parent, name)
{
mCalendar = calendar;
- mTopLayout = new QVBoxLayout(this);
+ QScrollView * sv = new QScrollView( this );
+ QHBoxLayout * hbl = new QHBoxLayout( this );
+ hbl->addWidget( sv );
+ parWid = new QWidget( sv->viewport() );
+ sv->addChild(parWid);
+ sv->setResizePolicy( QScrollView:: AutoOneFit );
+ mTopLayout = new QVBoxLayout(parWid);
getNewEntry();
}
KOJournalView::~KOJournalView()
{
}
@@ -54,13 +61,13 @@ KOJournalView::~KOJournalView()
int KOJournalView::currentDateCount()
{
return 0;
}
JournalEntry* KOJournalView::getNewEntry()
{
- JournalEntry* Entry = new JournalEntry(mCalendar,this);
+ JournalEntry* Entry = new JournalEntry(mCalendar,parWid);
jEntries.append( Entry );
mTopLayout->addWidget(Entry);
Entry->setFont ( KOPrefs::instance()->mJornalViewFont );
connect ( Entry,SIGNAL(deleteJournal(Journal *) ),this ,SIGNAL(deleteJournal(Journal *) ) ) ;
connect ( Entry,SIGNAL(newJournal() ),this ,SLOT(newJournal() ) ) ;
connect ( Entry,SIGNAL(showJournalOnly( Journal * ) ),this ,SLOT(showOnly ( Journal* ) ) ) ;