Buteo Synchronization Framework
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Buteo::SyncSchedulePrivate Class Reference

Private implementation class for SyncSchedule. More...

#include <SyncSchedule_p.h>

Public Member Functions

 SyncSchedulePrivate ()
 Constructor.
 
 SyncSchedulePrivate (const SyncSchedulePrivate &aSource)
 Copy Constructor.
 
SyncSchedule::Days parseDays (const QString &aDays) const
 Parses week day numbers from a string. More...
 
QString createDays (SyncSchedule::Days aDays) const
 Creates a string from a set of week day numbers. More...
 
bool adjustDate (QDateTime &aTime, SyncSchedule::Days aDays) const
 Adjusts given date to be in the set of given week days. More...
 
bool isRush (const QDateTime &aTime) const
 Checks if the given date/time is inside rush hours. More...
 

Static Public Member Functions

static bool daysMatch (SyncSchedule::Days aDays, int aDay)
 Tell if aDays contains aDay. More...
 

Public Attributes

SyncSchedule::Days iDays
 Days for the sync.
 
QTime iTime
 Sync Time.
 
QDateTime iScheduleConfiguredTime
 sync schedule configure time for intial update
 
unsigned int iInterval
 Time interval.
 
bool iEnabled
 
SyncSchedule::Days iRushDays
 indicates the schedule for rush hour - days
 
QTime iRushBegin
 indicates the schedule for rush hour start
 
QTime iRushEnd
 indicates the schedule for rush hour end
 
unsigned int iRushInterval
 Rush Hour Time interval.
 
bool iRushEnabled
 Indicates if Rush Hour is Enabled.
 
bool iExternalRushEnabled
 Indicates if External Rush Hour schedule is Enabled.
 

Detailed Description

Private implementation class for SyncSchedule.

Member Function Documentation

◆ adjustDate()

bool SyncSchedulePrivate::adjustDate ( QDateTime &  aTime,
SyncSchedule::Days  aDays 
) const

Adjusts given date to be in the set of given week days.

Day is increased until the week day is contained in the given set of week day numbers.

Parameters
aTimeDate/time to adjust.
aDaysSet of enabled week days.
Returns
Was day adjusted to a valid day. If the week day was already in the set of given week days, this function returns false. If the day set does not contain any valid days, this function sets aTime to null object and returns false.

◆ createDays()

QString SyncSchedulePrivate::createDays ( SyncSchedule::Days  aDays) const

Creates a string from a set of week day numbers.

Parameters
aDaysSet of week days.
Returns
String of week day represented by their numbers (Monday = 1).

◆ daysMatch()

bool SyncSchedulePrivate::daysMatch ( SyncSchedule::Days  aDays,
int  aDay 
)
static

Tell if aDays contains aDay.

Parameters
aDaysA set of days.
aDayA given day in Qt convention of Qt::DayOfWeek.
Returns
true if aDay is within aDays.

◆ isRush()

bool SyncSchedulePrivate::isRush ( const QDateTime &  aTime) const

Checks if the given date/time is inside rush hours.

Parameters
aTimeDate/time to check.
Returns
True if in rush hours.

◆ parseDays()

SyncSchedule::Days SyncSchedulePrivate::parseDays ( const QString &  aDays) const

Parses week day numbers from a string.

Parameters
aDaysString containing the week day numbers.
Returns
Set of week days.

The documentation for this class was generated from the following files: