summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/journalentry.cpp7
-rw-r--r--korganizer/journalentry.h2
-rw-r--r--korganizer/kojournalview.cpp11
-rw-r--r--korganizer/kojournalview.h1
4 files changed, 18 insertions, 3 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 7274849..0b923ad 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -57,4 +57,5 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
57 QFrame(parent) 57 QFrame(parent)
58{ 58{
59 heiHint = QApplication::desktop()->height() / 5 ;
59 showOnlyMode = false; 60 showOnlyMode = false;
60 mCalendar = calendar; 61 mCalendar = calendar;
@@ -118,6 +119,10 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
118JournalEntry::~JournalEntry() 119JournalEntry::~JournalEntry()
119{ 120{
121 qDebug("JournalEntry::~JournalEntry() ");
122}
123QSize JournalEntry::sizeHint() const
124{
125 return QSize ( 240, heiHint );
120} 126}
121
122void JournalEntry::slotSaveTemplate() 127void JournalEntry::slotSaveTemplate()
123{ 128{
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index 85ad5df..b0e9cc7 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -50,4 +50,5 @@ class JournalEntry : public QFrame {
50 void flushEntry(); 50 void flushEntry();
51 void setShowOnly() {showOnlyMode = true;} 51 void setShowOnly() {showOnlyMode = true;}
52 QSize sizeHint() const;
52 53
53 protected slots: 54 protected slots:
@@ -74,4 +75,5 @@ class JournalEntry : public QFrame {
74 QLabel *mTitleLabel; 75 QLabel *mTitleLabel;
75 KTextEdit *mEditor; 76 KTextEdit *mEditor;
77 int heiHint;
76 78
77 bool mDirty; 79 bool mDirty;
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index fae59d6..9e354d3 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -26,4 +26,5 @@
26 26
27#include <qlayout.h> 27#include <qlayout.h>
28#include <qscrollview.h>
28#include <qpopupmenu.h> 29#include <qpopupmenu.h>
29 30
@@ -44,5 +45,11 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
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}
@@ -58,5 +65,5 @@ int KOJournalView::currentDateCount()
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);
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index aabf11c..0437d95 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -70,4 +70,5 @@ class KOJournalView : public KOrg::BaseView
70 void keyPressEvent ( QKeyEvent * ) ; 70 void keyPressEvent ( QKeyEvent * ) ;
71 QBoxLayout *mTopLayout; 71 QBoxLayout *mTopLayout;
72 QWidget *parWid;
72 QDate mDate; 73 QDate mDate;
73 74