QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgstemporalmapsettingswidget.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgstemporalmapsettingswidget.cpp
3  ---------------
4  begin : March 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 
19 #include "qgsgui.h"
20 #include "qgis.h"
21 
23 QgsTemporalMapSettingsWidget::QgsTemporalMapSettingsWidget( QWidget *parent )
24  : QgsPanelWidget( parent )
25 {
26  setupUi( this );
27  setPanelTitle( tr( "Temporal Settings" ) );
28 
29  mFrameSpinBox->setClearValue( 1 );
30 
31  connect( mFrameSpinBox, qgis::overload<double>::of( &QDoubleSpinBox::valueChanged ), this, &QgsTemporalMapSettingsWidget::frameRateChanged );
32  connect( mCumulativeTemporalRange, &QCheckBox::toggled, this, &QgsTemporalMapSettingsWidget::temporalRangeCumulativeChanged );
33 }
34 
35 double QgsTemporalMapSettingsWidget::frameRateValue()
36 {
37  return mFrameSpinBox->value();
38 }
39 
40 void QgsTemporalMapSettingsWidget::setFrameRateValue( double value )
41 {
42  mFrameSpinBox->setValue( value );
43 }
44 
45 void QgsTemporalMapSettingsWidget::setIsTemporalRangeCumulative( bool state )
46 {
47  mCumulativeTemporalRange->setChecked( state );
48 }
49 
50 bool QgsTemporalMapSettingsWidget::isTemporalRangeCumulative()
51 {
52  return mCumulativeTemporalRange->isChecked();
53 }
54 
qgstemporalmapsettingswidget.h
qgsgui.h
qgis.h
QgsPanelWidget
Base class for any widget that can be shown as a inline panel.
Definition: qgspanelwidget.h:30
QgsPanelWidget::setPanelTitle
void setPanelTitle(const QString &panelTitle)
Set the title of the panel when shown in the interface.
Definition: qgspanelwidget.h:44