summaryrefslogtreecommitdiffabout
path: root/korganizer/journalentry.cpp
authorzautrix <zautrix>2005-07-09 08:48:32 (UTC)
committer zautrix <zautrix>2005-07-09 08:48:32 (UTC)
commitf731dd9fc5b3f14c44d4de26eb5370a79c63887c (patch) (unidiff)
treee3d7b3929cc8819a5451bd04c9698bc0767e49b1 /korganizer/journalentry.cpp
parente27ad31c6016152449bbdaf4f9f387fa61183c37 (diff)
downloadkdepimpi-f731dd9fc5b3f14c44d4de26eb5370a79c63887c.zip
kdepimpi-f731dd9fc5b3f14c44d4de26eb5370a79c63887c.tar.gz
kdepimpi-f731dd9fc5b3f14c44d4de26eb5370a79c63887c.tar.bz2
fixi
Diffstat (limited to 'korganizer/journalentry.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/journalentry.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index b8a4cf2..f0e0f86 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -76,7 +76,8 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
76 QPushButton * toggleJournal = new QPushButton( vb ); 76 QPushButton * toggleJournal = new QPushButton( vb );
77 iconp = SmallIcon("1updownarrow"); 77 iconp = SmallIcon("1updownarrow");
78 toggleJournal->setPixmap (iconp ) ; 78 toggleJournal->setPixmap (iconp ) ;
79 vb->setStretchFactor (new QLabel(" "+i18n("Title: "),vb),1); 79 QLabel* textLabel = new QLabel(" "+i18n("Title: "),vb);
80 vb->setStretchFactor (textLabel,1);
80 vb->setStretchFactor( toggleJournal, 1 ); 81 vb->setStretchFactor( toggleJournal, 1 );
81 mTitle = new KOLocationBox(TRUE, vb, 30); 82 mTitle = new KOLocationBox(TRUE, vb, 30);
82 mTitle->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding ,QSizePolicy::Fixed ,FALSE) ); 83 mTitle->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding ,QSizePolicy::Fixed ,FALSE) );
@@ -112,6 +113,11 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
112#ifndef DESKTOP_VERSION 113#ifndef DESKTOP_VERSION
113 QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold ); 114 QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold );
114#endif 115#endif
116 mMaxWidDiff = 3*size - 2*frameWidth() - textLabel->sizeHint().width();
117 mDeskWid = QApplication::desktop()->width();
118 int maxwid = mDeskWid - mMaxWidDiff;
119 mTitle->setMaximumWidth( maxwid/2 +20 );
120 mCalendarBox->setMaximumWidth( maxwid/2 -20 );
115 mEditor->setWordWrap( KTextEdit::WidgetWidth ); 121 mEditor->setWordWrap( KTextEdit::WidgetWidth );
116 QBoxLayout *topLayout = new QVBoxLayout(this); 122 QBoxLayout *topLayout = new QVBoxLayout(this);
117 topLayout->addWidget(vb); 123 topLayout->addWidget(vb);
@@ -128,6 +134,20 @@ JournalEntry::~JournalEntry()
128{ 134{
129 //qDebug("JournalEntry::~JournalEntry() "); 135 //qDebug("JournalEntry::~JournalEntry() ");
130} 136}
137void JournalEntry::resizeEvent(QResizeEvent* e )
138{
139#ifndef DESKTOP_VERSION
140 if ( mDeskWid != QApplication::desktop()->width() ) {
141 mDeskWid == QApplication::desktop()->width();
142 int maxwid = mDeskWid - mMaxWidDiff;
143 mTitle->setMaximumWidth( maxwid/2 +20 );
144 mCalendarBox->setMaximumWidth( maxwid/2 -20 );
145 }
146 setMaximumWidth( QApplication::desktop()->width() );
147 qDebug("MAXXX %d ", QApplication::desktop()->width());
148#endif
149 QFrame::resizeEvent( e );
150}
131QSize JournalEntry::sizeHint() const 151QSize JournalEntry::sizeHint() const
132{ 152{
133 return QSize ( 240, heiHint ); 153 return QSize ( 240, heiHint );