QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
qgstemporalproperty.cpp
Go to the documentation of this file.
1/***************************************************************************
2 qgstemporalproperty.cpp
3 ---------------
4 begin : January 2020
5 copyright : (C) 2020 by Samweli Mwakisambwe
6 email : samweli at kartoza dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18
19#include "qgstemporalproperty.h"
20
21QgsTemporalProperty::QgsTemporalProperty( QObject *parent, bool enabled )
22 : QObject( parent )
23 , mActive( enabled )
24{
25}
26
28{
29 if ( mActive != active )
30 {
31 mActive = active;
32 emit changed();
33 }
34}
35
37{
38 return mActive;
39}
void changed()
Emitted when the temporal properties have changed.
bool isActive() const
Returns true if the temporal property is active.
void setIsActive(bool active)
Sets whether the temporal property is active.
QgsTemporalProperty(QObject *parent=nullptr, bool enabled=false)
Constructor for QgsTemporalProperty, with the specified parent object.