QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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 
21 QgsTemporalProperty::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 }
QgsTemporalProperty::changed
void changed()
Emitted when the temporal properties have changed.
qgstemporalproperty.h
QgsTemporalProperty::isActive
bool isActive() const
Returns true if the temporal property is active.
Definition: qgstemporalproperty.cpp:36
QgsTemporalProperty::setIsActive
void setIsActive(bool active)
Sets whether the temporal property is active.
Definition: qgstemporalproperty.cpp:27
QgsTemporalProperty::QgsTemporalProperty
QgsTemporalProperty(QObject *parent=nullptr, bool enabled=false)
Constructor for QgsTemporalProperty, with the specified parent object.
Definition: qgstemporalproperty.cpp:21