/*!
    Returns the week number for the first day of the week corresponding to \a row,
    or -1 if \a row is outside of our range.
*/
int QQuickCalendarModel::weekNumberAt(int row) const
{
    const int index = row * daysInAWeek;
    const QDate date = dateAt(index);
    if (date.isValid())
        return date.weekNumber();
    return -1;
}
Ejemplo n.º 2
0
void Column::Private::setTimeAt(int row, const QTime& new_value)
{
    if (d_data_type != SciDAVis::TypeQDateTime) return;

    setDateTimeAt(row, QDateTime(dateAt(row), new_value));
}
Ejemplo n.º 3
0
/**
 * \brief Set the content of row 'row'
 *
 * Use this only when columnMode() is DateTime, Month or Day
 */
void Column::setTimeAt(int row,const QTime& new_value)
{
    setStatisticsAvailable(false);
	setDateTimeAt(row, QDateTime(dateAt(row), new_value));
}