summaryrefslogtreecommitdiffabout
path: root/korganizer/kofilterview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kofilterview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kofilterview.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index 29a4393..2b16347 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -137,99 +137,103 @@ void KOFilterView::setSelectedFilter( int fil )
if ( fil >= mSelectionCombo->count() )
return;
mSelectionCombo->setCurrentItem( fil );
emit filterChanged();
}
KOCalEditView::KOCalEditView(QWidget* parent,
const char* name )
: QWidget(parent,name)
{
mw = 0;
ml = new QVBoxLayout ( this );
}
KOCalEditView::~KOCalEditView()
{
// no need to delete child widgets, Qt does it all for us
}
void KOCalEditView::selectCal(int id ,bool b)
{
KOPrefs::instance()->getCalendar( id )->isEnabled = b;
emit calendarEnabled ( id, b );
+ emit needsUpdate();
}
void KOCalEditView::selectStdCal( int id, bool b )
{
if ( !b ) {
KOCalCheckButton* it = (KOCalCheckButton*) sender();
if ( it ) {
it->blockSignals( true );
it->setChecked( true );
it->blockSignals( false );
return;
}
return;
}
KOCalCheckButton* sen = (KOCalCheckButton*) sender();
KOCalCheckButton* it = mStdandardB.first();
while ( it ) {
if ( it->isChecked() ) {
if ( it != sen ) {
it->blockSignals( true );
it->setChecked( false );
it->blockSignals( false );
break;
}
}
it = mStdandardB.next();
}
KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
while ( kkf ) {
kkf->isStandard = false;
kkf = KOPrefs::instance()->mCalendars.next();
}
KOPrefs::instance()->getCalendar( id )->isStandard = true;
emit setCalendarDefault ( id );
}
void KOCalEditView::selectCalAlarm(int id ,bool b )
{
KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b;
emit alarmEnabled ( id , b );
+ emit needsUpdate();
}
void KOCalEditView::selectReadOnly(int id ,bool b )
{
KOPrefs::instance()->getCalendar( id )->isReadOnly = b;
emit calendarReadonly ( id , b );
+ emit needsUpdate();
}
void KOCalEditView::setColor( const QColor& c, int id )
{
KOPrefs::instance()->getCalendar( id )->mDefaultColor = c;
+ emit needsUpdate();
}
void KOCalEditView::deleteCal( int id )
{
KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id );
QString name = kkf->mName;
QString file = kkf->mFileName;
if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b><tr> Do you want to remove this calendar from KO/Pi? (The file is not removed, of course!)").arg(name).arg(file) ) != KMessageBox::Continue ) return;
emit removeCalendar ( id );
KOPrefs::instance()->mCalendars.remove ( kkf );
readConfig();
}
void KOCalEditView::infoCal( int id )
{
QString name = KOPrefs::instance()->getCalendar( id )->mName;
QString file = KOPrefs::instance()->getCalendar( id )->mFileName;
KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) );
}
void KOCalEditView::readConfig()
{
mStdandardB.clear();
mEnabledB.clear();
mAlarmB.clear();
mROB.clear();