author | zautrix <zautrix> | 2005-06-29 11:08:57 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-29 11:08:57 (UTC) |
commit | 435e68d6ace30fb2121b718226e00be44971c617 (patch) (side-by-side diff) | |
tree | 2b7d2793f0244db82a9cddbfab8957d13989ed20 /korganizer/journalentry.cpp | |
parent | b7044dfc9516d546683973985555c481d59fc677 (diff) | |
download | kdepimpi-435e68d6ace30fb2121b718226e00be44971c617.zip kdepimpi-435e68d6ace30fb2121b718226e00be44971c617.tar.gz kdepimpi-435e68d6ace30fb2121b718226e00be44971c617.tar.bz2 |
fixx
-rw-r--r-- | korganizer/journalentry.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index 7274849..0b923ad 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp @@ -43,32 +43,33 @@ #include <kmessagebox.h> #include "koprefs.h" #include <libkcal/journal.h> #include <libkcal/calendarresources.h> #include <libkcal/resourcecalendar.h> #include <kresources/resourceselectdialog.h> #include "journalentry.h" //#include "journalentry.moc" #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #endif JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : QFrame(parent) { + heiHint = QApplication::desktop()->height() / 5 ; showOnlyMode = false; mCalendar = calendar; mJournal = 0; mDirty = false; QHBox * vb = new QHBox ( this ); QPushButton * newJournal = new QPushButton( vb ); QIconSet icon; if ( QApplication::desktop()->width() < 321 ) icon = SmallIcon("ko16old"); else icon = SmallIcon("ko24old"); newJournal->setIconSet (icon ) ; int size = newJournal->sizeHint().height(); newJournal->setFixedSize( size, size ); @@ -104,34 +105,38 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold ); #endif mEditor->setWordWrap( KTextEdit::WidgetWidth ); QBoxLayout *topLayout = new QVBoxLayout(this); topLayout->addWidget(vb); topLayout->addWidget(mEditor); mEditor->installEventFilter(this); connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) ); connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) ); connect( newJournal, SIGNAL( clicked() ), this , SIGNAL( newJournal() ) ); connect( toggleJournal, SIGNAL( clicked() ), this , SLOT( toggleShowJournal() ) ); } JournalEntry::~JournalEntry() { + qDebug("JournalEntry::~JournalEntry() "); +} +QSize JournalEntry::sizeHint() const +{ + return QSize ( 240, heiHint ); } - void JournalEntry::slotSaveTemplate() { QString fileName =locateLocal( "templates", "journals" ); QDir t_dir; if ( !t_dir.exists(fileName) ) t_dir.mkdir ( fileName ); fileName += "/journal"; fileName = KFileDialog::getSaveFileName( fileName , i18n("Save as Journal template"), this ); if ( fileName.length() == 0 ) return; QFile fileIn( fileName ); if (!fileIn.open( IO_WriteOnly ) ) { KMessageBox::error( this, i18n("Error saving template file\n '%1'.") .arg( fileName ) ); return; |