QGIS/python/core/auto_generated/qgsinterval.sip.in

199 lines
4.2 KiB
Plaintext
Raw Normal View History

2017-05-02 17:30:53 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsinterval.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsInterval
{
2017-05-02 17:30:53 +02:00
%Docstring
A representation of the interval between two datetime values.
2017-12-15 10:36:55 -04:00
2017-05-02 17:30:53 +02:00
.. versionadded:: 2.16
%End
2017-05-02 17:30:53 +02:00
%TypeHeaderCode
#include "qgsinterval.h"
%End
public:
static const int YEARS;
static const int MONTHS;
static const int WEEKS;
static const int DAY;
static const int HOUR;
static const int MINUTE;
QgsInterval();
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Default constructor for QgsInterval. Creates an invalid interval.
2017-05-02 17:30:53 +02:00
%End
QgsInterval( double seconds );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsInterval.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param seconds: duration of interval in seconds
2017-05-02 17:30:53 +02:00
%End
double years() const;
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval duration in years (based on an average year length)
.. seealso:: :py:func:`setYears`
2017-05-02 17:30:53 +02:00
%End
void setYears( double years );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the interval duration in years.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param years: duration in years (based on average year length)
.. seealso:: :py:func:`years`
2017-05-02 17:30:53 +02:00
%End
double months() const;
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval duration in months (based on a 30 day month).
.. seealso:: :py:func:`setMonths`
2017-05-02 17:30:53 +02:00
%End
void setMonths( double months );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the interval duration in months.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param months: duration in months (based on a 30 day month)
.. seealso:: :py:func:`months`
2017-05-02 17:30:53 +02:00
%End
double weeks() const;
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval duration in weeks.
.. seealso:: :py:func:`setWeeks`
2017-05-02 17:30:53 +02:00
%End
void setWeeks( double weeks );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the interval duration in weeks.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param weeks: duration in weeks
.. seealso:: :py:func:`weeks`
2017-05-02 17:30:53 +02:00
%End
double days() const;
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval duration in days.
.. seealso:: :py:func:`setDays`
2017-05-02 17:30:53 +02:00
%End
void setDays( double days );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the interval duration in days.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param days: duration in days
.. seealso:: :py:func:`days`
2017-05-02 17:30:53 +02:00
%End
double hours() const;
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval duration in hours.
.. seealso:: :py:func:`setHours`
2017-05-02 17:30:53 +02:00
%End
void setHours( double hours );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the interval duration in hours.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param hours: duration in hours
.. seealso:: :py:func:`hours`
2017-05-02 17:30:53 +02:00
%End
double minutes() const;
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval duration in minutes.
.. seealso:: :py:func:`setMinutes`
2017-05-02 17:30:53 +02:00
%End
void setMinutes( double minutes );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the interval duration in minutes.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param minutes: duration in minutes
.. seealso:: :py:func:`minutes`
2017-05-02 17:30:53 +02:00
%End
double seconds() const;
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval duration in seconds.
.. seealso:: :py:func:`setSeconds`
2017-05-02 17:30:53 +02:00
%End
void setSeconds( double seconds );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the interval duration in seconds.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param seconds: duration in seconds
.. seealso:: :py:func:`seconds`
2017-05-02 17:30:53 +02:00
%End
bool isValid() const;
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns true if the interval is valid.
.. seealso:: :py:func:`setValid`
2017-05-02 17:30:53 +02:00
%End
void setValid( bool valid );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the interval is valid.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param valid: set to true to set the interval as valid.
.. seealso:: :py:func:`isValid`
2017-05-02 17:30:53 +02:00
%End
bool operator==( QgsInterval other ) const;
static QgsInterval fromString( const QString &string );
2017-05-02 17:30:53 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Converts a string to an interval
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param string: string to parse
:return: interval, or invalid interval if string could not be parsed
2017-05-02 17:30:53 +02:00
%End
operator QVariant() const;
};
2017-05-02 17:30:53 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsinterval.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/