summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -58,2 +58,3 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
{
+ heiHint = QApplication::desktop()->height() / 5 ;
showOnlyMode = false;
@@ -119,4 +120,8 @@ JournalEntry::~JournalEntry()
{
+ qDebug("JournalEntry::~JournalEntry() ");
+}
+QSize JournalEntry::sizeHint() const
+{
+ return QSize ( 240, heiHint );
}
-
void JournalEntry::slotSaveTemplate()
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index 85ad5df..b0e9cc7 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -51,2 +51,3 @@ class JournalEntry : public QFrame {
void setShowOnly() {showOnlyMode = true;}
+ QSize sizeHint() const;
@@ -75,2 +76,3 @@ class JournalEntry : public QFrame {
KTextEdit *mEditor;
+ int heiHint;
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index fae59d6..9e354d3 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -27,2 +27,3 @@
#include <qlayout.h>
+#include <qscrollview.h>
#include <qpopupmenu.h>
@@ -45,3 +46,9 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
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();
@@ -59,3 +66,3 @@ JournalEntry* KOJournalView::getNewEntry()
{
- JournalEntry* Entry = new JournalEntry(mCalendar,this);
+ JournalEntry* Entry = new JournalEntry(mCalendar,parWid);
jEntries.append( Entry );
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index aabf11c..0437d95 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -71,2 +71,3 @@ class KOJournalView : public KOrg::BaseView
QBoxLayout *mTopLayout;
+ QWidget *parWid;
QDate mDate;