[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise/kdepim/korganizer
From: Sergio Luis Martins <iamsergio () gmail ! com>
Date: 2010-10-04 12:48:16
Message-ID: 20101004124816.ED55AAC895 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1182400 by smartins:
Add config option for chosing background color for busy days.
Part of kolab/issue4259
M +2 -3 koagenda.cpp
M +18 -10 koprefsdialog.cpp
M +13 -0 korganizer.kcfg
--- branches/kdepim/enterprise/kdepim/korganizer/koagenda.cpp #1182399:1182400
@@ -1450,13 +1450,12 @@
// Disabled, working on it
QMemArray<bool> busyDayMask = mAgendaView->busyDayMask();
- if ( false && !mAllDayMode ) {
+ if ( KOPrefs::instance()->mColorBusyDaysEnabled && !mAllDayMode ) {
for ( int i = 0; i < busyDayMask.count(); ++i ) {
if ( busyDayMask[i] ) {
const QPoint pt1( cx + mGridSpacingX * i, 0 );
// const QPoint pt2( cx + mGridSpacingX * ( i+1 ), ch );
- dbp.fillRect( pt1.x(), pt1.y(), mGridSpacingX, cy + ch, Qt::black );
-
+ dbp.fillRect( pt1.x(), pt1.y(), mGridSpacingX, cy + ch, \
KOPrefs::instance()->mAgendaBgBusyColor ); }
}
}
--- branches/kdepim/enterprise/kdepim/korganizer/koprefsdialog.cpp #1182399:1182400
@@ -539,6 +539,9 @@
addWidBool( KOPrefs::instance()->selectionStartsEditorItem(), agendaGroup );
+ KPrefsWidBool *colorBusyDays =
+ addWidBool( KOPrefs::instance()->colorBusyDaysEnabledItem(), agendaGroup \
); +
addWidCombo( KOPrefs::instance()->agendaViewColorsItem(), agendaGroup );
addWidCombo( KOPrefs::instance()->agendaViewCalendarDisplayItem(), agendaGroup \
); @@ -667,34 +670,39 @@
topLayout->addWidget(agendaBgColor->label(),2,0);
topLayout->addWidget(agendaBgColor->button(),2,1);
+ KPrefsWidColor *agendaBgBusyColor =
+ addWidColor( KOPrefs::instance()->agendaBgBusyColorItem(), topFrame );
+ topLayout->addWidget(agendaBgBusyColor->label(),3,0);
+ topLayout->addWidget(agendaBgBusyColor->button(),3,1);
+
// working hours color
KPrefsWidColor *workingHoursColor =
addWidColor( KOPrefs::instance()->workingHoursColorItem(), topFrame );
- topLayout->addWidget(workingHoursColor->label(),3,0);
- topLayout->addWidget(workingHoursColor->button(),3,1);
+ topLayout->addWidget(workingHoursColor->label(),4,0);
+ topLayout->addWidget(workingHoursColor->button(),4,1);
// Todo due today color
KPrefsWidColor *todoDueTodayColor =
addWidColor( KOPrefs::instance()->todoDueTodayColorItem(), topFrame );
- topLayout->addWidget(todoDueTodayColor->label(),4,0);
- topLayout->addWidget(todoDueTodayColor->button(),4,1);
+ topLayout->addWidget(todoDueTodayColor->label(),5,0);
+ topLayout->addWidget(todoDueTodayColor->button(),5,1);
// Todo overdue color
KPrefsWidColor *todoOverdueColor =
addWidColor( KOPrefs::instance()->todoOverdueColorItem(), topFrame );
- topLayout->addWidget(todoOverdueColor->label(),5,0);
- topLayout->addWidget(todoOverdueColor->button(),5,1);
+ topLayout->addWidget(todoOverdueColor->label(),6,0);
+ topLayout->addWidget(todoOverdueColor->button(),6,1);
// "No Category" color
KPrefsWidColor *unsetCategoryColor =
addWidColor( KOPrefs::instance()->unsetCategoryColorItem(), topFrame );
- topLayout->addWidget( unsetCategoryColor->label(), 6, 0 );
- topLayout->addWidget( unsetCategoryColor->button(), 6, 1 );
+ topLayout->addWidget( unsetCategoryColor->label(), 7, 0 );
+ topLayout->addWidget( unsetCategoryColor->button(), 7, 1 );
// categories colors
QGroupBox *categoryGroup = new QGroupBox(1,Horizontal,i18n("Categories"),
topFrame);
- topLayout->addMultiCellWidget(categoryGroup,7,7,0,1);
+ topLayout->addMultiCellWidget(categoryGroup,8,8,0,1);
mCategoryCombo = new QComboBox(categoryGroup);
@@ -715,7 +723,7 @@
// resources colors
QGroupBox *resourceGroup = new QGroupBox(1,Horizontal,i18n("Resources"),
topFrame);
- topLayout->addMultiCellWidget(resourceGroup,8,8,0,1);
+ topLayout->addMultiCellWidget(resourceGroup,9,9,0,1);
mResourceCombo = new QComboBox(resourceGroup);
QWhatsThis::add( mResourceCombo,
--- branches/kdepim/enterprise/kdepim/korganizer/korganizer.kcfg #1182399:1182400
@@ -274,6 +274,12 @@
<default>CalendarsMerged</default>
</entry>
+ <entry type="Bool" key="ColorBusyDaysEnabled" name="ColorBusyDaysEnabled">
+ <label>Color busy days with a different background color</label>
+ <whatsthis>Check this box if you want agenda's background to be filled with a \
different color on days which have at least one all day event marked as \
busy</whatsthis> + <default>false</default>
+ </entry>
+
<entry type="DateTime" name="DayBegins">
<label>Day begins at</label>
<whatsthis>Enter the start time for events here. This time should be the \
earliest time that you use for events, as it will be displayed at the \
top.</whatsthis> @@ -415,6 +421,13 @@
<whatsthis>Select the agenda view background color here.</whatsthis>
<default>255, 255, 255</default>
</entry>
+
+ <entry type="Color" key="AgendaBackgroundBusyColor" name="AgendaBgBusyColor">
+ <label>Agenda view background busy color</label>
+ <whatsthis>When you have an all day event marked as busy, you can have a \
different agenda view background color for that day. Select the color \
here.</whatsthis> + <default>136, 255, 219</default>
+ </entry>
+
<entry type="Color" key="WorkingHoursColor">
<label>Working hours color</label>
<whatsthis>Select the working hours color for the agenda view \
here.</whatsthis>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic