summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-29 11:08:57 (UTC)
committer zautrix <zautrix>2005-06-29 11:08:57 (UTC)
commit435e68d6ace30fb2121b718226e00be44971c617 (patch) (unidiff)
tree2b7d2793f0244db82a9cddbfab8957d13989ed20
parentb7044dfc9516d546683973985555c481d59fc677 (diff)
downloadkdepimpi-435e68d6ace30fb2121b718226e00be44971c617.zip
kdepimpi-435e68d6ace30fb2121b718226e00be44971c617.tar.gz
kdepimpi-435e68d6ace30fb2121b718226e00be44971c617.tar.bz2
fixx
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
@@ -56,6 +56,7 @@
56JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : 56JournalEntry::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;
61 mJournal = 0; 62 mJournal = 0;
@@ -117,8 +118,12 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
117 118
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{
124 QString fileName =locateLocal( "templates", "journals" ); 129 QString fileName =locateLocal( "templates", "journals" );
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h
index 85ad5df..b0e9cc7 100644
--- a/korganizer/journalentry.h
+++ b/korganizer/journalentry.h
@@ -49,6 +49,7 @@ class JournalEntry : public QFrame {
49 49
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:
54 void slotSaveTemplate(); 55 void slotSaveTemplate();
@@ -73,6 +74,7 @@ class JournalEntry : public QFrame {
73 void keyPressEvent ( QKeyEvent * ) ; 74 void keyPressEvent ( QKeyEvent * ) ;
74 QLabel *mTitleLabel; 75 QLabel *mTitleLabel;
75 KTextEdit *mEditor; 76 KTextEdit *mEditor;
77 int heiHint;
76 78
77 bool mDirty; 79 bool mDirty;
78}; 80};
diff --git a/korganizer/kojournalview.cpp b/korganizer/kojournalview.cpp
index fae59d6..9e354d3 100644
--- a/korganizer/kojournalview.cpp
+++ b/korganizer/kojournalview.cpp
@@ -25,6 +25,7 @@
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>
@@ -43,7 +44,13 @@ KOJournalView::KOJournalView(Calendar *calendar, QWidget *parent,
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
@@ -57,7 +64,7 @@ int KOJournalView::currentDateCount()
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 );
diff --git a/korganizer/kojournalview.h b/korganizer/kojournalview.h
index aabf11c..0437d95 100644
--- a/korganizer/kojournalview.h
+++ b/korganizer/kojournalview.h
@@ -69,6 +69,7 @@ class KOJournalView : public KOrg::BaseView
69 QPtrList<JournalEntry> jEntries; 69 QPtrList<JournalEntry> jEntries;
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
74}; 75};