2
Copyright (C) 2010 Casey Link <unnamedrambler@gmail.com>
3
Copyright (c) 2010 Bertjan Broeksema <broeksema@kde.org>
4
Copyright (C) 2009-2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
6
This library is free software; you can redistribute it and/or modify it
7
under the terms of the GNU Library General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or (at your
9
option) any later version.
11
This library is distributed in the hope that it will be useful, but WITHOUT
12
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14
License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with this library; see the file COPYING.LIB. If not, write to the
18
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22
#ifndef KWEEKDAYCHECKCOMBO_H
23
#define KWEEKDAYCHECKCOMBO_H
25
#include "kcheckcombobox.h"
27
#include "kdepim_export.h"
34
//FIXME: This class assumes all weeks have 7 days. We should use KCalenderSystem instead.
36
* A combobox that is populated with the days of the week from the current
37
* KCalenderSystem. The days are checkable.
38
* @note: KCalenderSystem numbers weekdays starting with 1, however this widget is 0 indexed and handles the conversion to the 1 based system internally. Use this widget as a normal 0 indexed container.
39
* @see KCalenderSystem
41
class KDEPIM_EXPORT KWeekdayCheckCombo : public KCheckComboBox
47
* @param first5Checked if true the first 5 weekdays will be checked by default
49
KWeekdayCheckCombo( QWidget *parent = 0, bool first5Checked = false );
50
virtual ~KWeekdayCheckCombo();
53
* Retrieve the checked days
54
* @param days a 7 bit array indicating the checked days (bit 0 = Monday, value 1 = checked).
56
QBitArray days() const;
59
* Set the checked days on this combobox
60
* @param days a 7 bit array indicating the days to check/uncheck (bit 0 = Monday, value 1 = check).
61
* @param disableDays if not empty, the corresponding days will be disabled, all others enabled (bit 0 = Monday, value 1 = disable).
64
void setDays( const QBitArray &days, const QBitArray &disableDays = QBitArray() );
67
* Returns the index of the weekday represented by the
70
int weekdayIndex( const QDate &date ) const;
74
#endif // KWEEKDAYCHECKCOMBO_H