summaryrefslogtreecommitdiffabout
path: root/korganizer/kojournalview.cpp
authorzautrix <zautrix>2005-06-29 11:08:57 (UTC)
committer zautrix <zautrix>2005-06-29 11:08:57 (UTC)
commit435e68d6ace30fb2121b718226e00be44971c617 (patch) (unidiff)
tree2b7d2793f0244db82a9cddbfab8957d13989ed20 /korganizer/kojournalview.cpp
parentb7044dfc9516d546683973985555c481d59fc677 (diff)
downloadkdepimpi-435e68d6ace30fb2121b718226e00be44971c617.zip
kdepimpi-435e68d6ace30fb2121b718226e00be44971c617.tar.gz
kdepimpi-435e68d6ace30fb2121b718226e00be44971c617.tar.bz2
fixx
Diffstat (limited to 'korganizer/kojournalview.cpp') (more/less context) (ignore 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 @@
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
41KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent, 42KOJournalView::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
50KOJournalView::~KOJournalView() 57KOJournalView::~KOJournalView()
51{ 58{
52} 59}
@@ -54,13 +61,13 @@ KOJournalView::~KOJournalView()
54int KOJournalView::currentDateCount() 61int KOJournalView::currentDateCount()
55{ 62{
56 return 0; 63 return 0;
57} 64}
58JournalEntry* KOJournalView::getNewEntry() 65JournalEntry* 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* ) ) ) ;