Diffstat (limited to 'korganizer/kojournalview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kojournalview.cpp | 11 |
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 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | // | 24 | // |
25 | // View of Journal entries | 25 | // View of Journal entries |
26 | 26 | ||
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qscrollview.h> | ||
28 | #include <qpopupmenu.h> | 29 | #include <qpopupmenu.h> |
29 | 30 | ||
30 | #include <klocale.h> | 31 | #include <klocale.h> |
31 | #include <kdebug.h> | 32 | #include <kdebug.h> |
32 | #include "koprefs.h" | 33 | #include "koprefs.h" |
33 | 34 | ||
@@ -40,13 +41,19 @@ using namespace KOrg; | |||
40 | 41 | ||
41 | KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, | 42 | KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, |
42 | const char *name) | 43 | const char *name) |
43 | : KOrg::BaseView(calendar, parent, name) | 44 | : KOrg::BaseView(calendar, parent, name) |
44 | { | 45 | { |
45 | mCalendar = calendar; | 46 | mCalendar = calendar; |
46 | mTopLayout = new QVBoxLayout(this); | 47 | QScrollView * sv = new QScrollView( this ); |
48 | QHBoxLayout * hbl = new QHBoxLayout( this ); | ||
49 | hbl->addWidget( sv ); | ||
50 | parWid = new QWidget( sv->viewport() ); | ||
51 | sv->addChild(parWid); | ||
52 | sv->setResizePolicy( QScrollView:: AutoOneFit ); | ||
53 | mTopLayout = new QVBoxLayout(parWid); | ||
47 | getNewEntry(); | 54 | getNewEntry(); |
48 | } | 55 | } |
49 | 56 | ||
50 | KOJournalView::~KOJournalView() | 57 | KOJournalView::~KOJournalView() |
51 | { | 58 | { |
52 | } | 59 | } |
@@ -54,13 +61,13 @@ KOJournalView::~KOJournalView() | |||
54 | int KOJournalView::currentDateCount() | 61 | int KOJournalView::currentDateCount() |
55 | { | 62 | { |
56 | return 0; | 63 | return 0; |
57 | } | 64 | } |
58 | JournalEntry* KOJournalView::getNewEntry() | 65 | JournalEntry* KOJournalView::getNewEntry() |
59 | { | 66 | { |
60 | JournalEntry* Entry = new JournalEntry(mCalendar,this); | 67 | JournalEntry* Entry = new JournalEntry(mCalendar,parWid); |
61 | jEntries.append( Entry ); | 68 | jEntries.append( Entry ); |
62 | mTopLayout->addWidget(Entry); | 69 | mTopLayout->addWidget(Entry); |
63 | Entry->setFont ( KOPrefs::instance()->mJornalViewFont ); | 70 | Entry->setFont ( KOPrefs::instance()->mJornalViewFont ); |
64 | connect ( Entry,SIGNAL(deleteJournal(Journal *) ),this ,SIGNAL(deleteJournal(Journal *) ) ) ; | 71 | connect ( Entry,SIGNAL(deleteJournal(Journal *) ),this ,SIGNAL(deleteJournal(Journal *) ) ) ; |
65 | connect ( Entry,SIGNAL(newJournal() ),this ,SLOT(newJournal() ) ) ; | 72 | connect ( Entry,SIGNAL(newJournal() ),this ,SLOT(newJournal() ) ) ; |
66 | connect ( Entry,SIGNAL(showJournalOnly( Journal * ) ),this ,SLOT(showOnly ( Journal* ) ) ) ; | 73 | connect ( Entry,SIGNAL(showJournalOnly( Journal * ) ),this ,SLOT(showOnly ( Journal* ) ) ) ; |