• RepeatingOption
  • RepeatingOption Class

    (nymeaserver::RepeatingOption)

    Describes the repeating option of a time item. More...

    Header: #include <RepeatingOption>

    Public Types

    enum RepeatingMode { RepeatingModeNone, RepeatingModeHourly, RepeatingModeDaily, RepeatingModeWeekly, RepeatingModeMonthly, RepeatingModeYearly }

    Public Functions

    RepeatingOption()
    RepeatingOption(const RepeatingMode & mode, const QList<int> & weekDays = QList<int> (), const QList<int> & monthDays = QList<int> ())
    bool evaluateMonthDay(const QDateTime & dateTime) const
    bool evaluateWeekDay(const QDateTime & dateTime) const
    bool isEmtpy() const
    bool isValid() const
    RepeatingMode mode() const
    QList<int> monthDays() const
    QList<int> weekDays() const

    Detailed Description

    Describes the repeating option of a time item.

    The list of weekDays() can contain following values:

    Weekdayint
    Monday1
    Tuesday2
    Wednesday3
    Thursday4
    Friday5
    Saturday6
    Sunday7

    See also Rule and TimeDescriptor.

    Member Type Documentation

    enum RepeatingOption::RepeatingMode

    This enum type specifies the mode of a RepeatingOption.

    ConstantValueDescription
    nymeaserver::RepeatingOption::RepeatingModeNone0There is no special repeating mode. The RuleEngine will assume a daily repeating.
    nymeaserver::RepeatingOption::RepeatingModeHourly1The time item should be repeated hourly. The monthDays() and weekDays() list has to be empty.
    nymeaserver::RepeatingOption::RepeatingModeDaily2The time item should be repeated daily. The monthDays() and weekDays() list has to be empty.
    nymeaserver::RepeatingOption::RepeatingModeWeekly3The time item should be repeated weekly. A week starts at Monday. This mode needs a list of weekDays(). The monthDays() list has to empty.
    nymeaserver::RepeatingOption::RepeatingModeMonthly4The time item should be repeated every month. This mode needs a list of monthDays(). The monthDays() list has to be empty.
    nymeaserver::RepeatingOption::RepeatingModeYearly5The time item should be repeated every year. The monthDays() and weekDays() list has to be empty.

    Member Function Documentation

    RepeatingOption::RepeatingOption()

    Constructs an empty RepeatingOption.

    RepeatingOption::RepeatingOption(const RepeatingMode & mode, const QList<int> & weekDays = QList<int> (), const QList<int> & monthDays = QList<int> ())

    Constructs a RepeatingOption with the given mode, weekDays list and monthDays list.

    bool RepeatingOption::evaluateMonthDay(const QDateTime & dateTime) const

    Returns true if the month day of the given dateTime matches this RepeatingOption.

    bool RepeatingOption::evaluateWeekDay(const QDateTime & dateTime) const

    Returns true if the week day of the given dateTime matches this RepeatingOption.

    bool RepeatingOption::isEmtpy() const

    Returns true if this RepeatingOption is empty.

    bool RepeatingOption::isValid() const

    Returns true if this RepeatingOption is valid.

    RepeatingMode RepeatingOption::mode() const

    Returns the mode of this RepeatingOption.

    QList<int> RepeatingOption::monthDays() const

    Returns the list of month days on which this RepeatingOption should be valid.

    QList<int> RepeatingOption::weekDays() const

    Returns the list of week days on which this RepeatingOption should be valid.