summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-05 11:01:38 (UTC)
committer zautrix <zautrix>2005-07-05 11:01:38 (UTC)
commit68016257abe13019610cb7bb230f8d754179abfb (patch) (side-by-side diff)
treeeb89374fe7aa4ef591388a49ce6ba7eddd43a10f
parentea75d46072630883fae6ededd4af1d3c427ff59f (diff)
downloadkdepimpi-68016257abe13019610cb7bb230f8d754179abfb.zip
kdepimpi-68016257abe13019610cb7bb230f8d754179abfb.tar.gz
kdepimpi-68016257abe13019610cb7bb230f8d754179abfb.tar.bz2
nf
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/journalentry.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 902e96f..b8a4cf2 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -85,50 +85,50 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
#ifndef DESKTOP_VERSION
mTitle->setSizeLimit( 8 );
mCalendarBox->setSizeLimit( 8 );
#endif
vb->setStretchFactor ( mTitle, 8 );
vb->setStretchFactor ( mCalendarBox, 3 );
//mTitleLabel->setMargin(0);
//mTitleLabel->setAlignment(AlignCenter);
QPushButton * loadTemplate = new QPushButton( vb );
QPushButton * saveTemplate = new QPushButton( vb );
if ( QApplication::desktop()->width() < 321 )
iconp = SmallIcon("fileexport16");
else
iconp = SmallIcon("fileexport");
saveTemplate->setPixmap (iconp ) ;
int size = saveTemplate->sizeHint().height();
if ( QApplication::desktop()->width() < 321 )
iconp = SmallIcon("fileimport16");
else
iconp = SmallIcon("fileimport");
loadTemplate->setPixmap (iconp ) ;
loadTemplate->setFixedSize( size, size );
saveTemplate->setFixedSize( size, size );
toggleJournal->setFixedSize( size , size );
- mTitle->setMaximumHeight( size+4);
- mCalendarBox->setMaximumHeight( size+4);
+ mTitle->setFixedHeight( size+4);
+ mCalendarBox->setFixedHeight( size+4);
mEditor = new KTextEdit(this);
#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( toggleJournal, SIGNAL( clicked() ), this , SLOT( toggleShowJournal() ) );
mTitle->load( KOLocationBox::SUMMARYJOURNAL );
mTitle->lineEdit ()->setText("");
}
JournalEntry::~JournalEntry()
{
//qDebug("JournalEntry::~JournalEntry() ");
}
QSize JournalEntry::sizeHint() const
{
return QSize ( 240, heiHint );
}
@@ -188,53 +188,48 @@ void JournalEntry::setDate(const QDate &date)
fillCalendar( mCalendar->defaultCalendar() );
}
void JournalEntry::fillCalendar( int setToID )
{
mCalendarBox->clear();
KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
int std = 0;
int count = 0;
while ( kkf ) {
if ( (!kkf->mErrorOnLoad &&! kkf->isReadOnly) || setToID == kkf->mCalNumber ) {
if ( setToID ) {
if ( kkf->mCalNumber == setToID )
std = count;
} else {
if ( kkf->isStandard ) {
std = count;
}
}
++count;
mCalendarBox->insertItem( kkf->mName );
}
kkf = KOPrefs::instance()->mCalendars.next();
}
mCalendarBox->setCurrentItem( std );
- if ( KOPrefs::instance()->mCalendars.count() == 1 )
- mCalendarBox->hide();
- else {
- mCalendarBox->show();
- }
}
void JournalEntry::toggleShowJournal()
{
if (!mEditor->text().isEmpty() || !mTitle->currentText ().isEmpty())
flushEntry();
if ( showOnlyMode )
emit showJournalOnly( 0 );
else {
// we have to protect mJournal from deleting if mJournal has empty text
visibleMode = false; // set to true via :setShowOnly()
emit showJournalOnly( mJournal );
//QTimer::singleShot( 0, this, SLOT( setVisibleOn() ) );
}
}
void JournalEntry::setVisibleOn()
{
visibleMode = true;
}
void JournalEntry::setShowOnly()
{
showOnlyMode = true;
if ( mTitle->currentText().isEmpty() )
mTitle->setFocus();