QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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
23QgsTemporalMapSettingsWidget::QgsTemporalMapSettingsWidget( QWidget *parent )
24 : QgsPanelWidget( parent )
25{
26 setupUi( this );
27 setPanelTitle( tr( "Temporal Settings" ) );
28
29 mFrameSpinBox->setClearValue( 1 );
30
31 connect( mFrameSpinBox, qOverload<double>( &QDoubleSpinBox::valueChanged ), this, &QgsTemporalMapSettingsWidget::frameRateChanged );
32 connect( mCumulativeTemporalRange, &QCheckBox::toggled, this, &QgsTemporalMapSettingsWidget::temporalRangeCumulativeChanged );
33}
34
35double QgsTemporalMapSettingsWidget::frameRateValue()
36{
37 return mFrameSpinBox->value();
38}
39
40void QgsTemporalMapSettingsWidget::setFrameRateValue( double value )
41{
42 mFrameSpinBox->setValue( value );
43}
44
45void QgsTemporalMapSettingsWidget::setIsTemporalRangeCumulative( bool state )
46{
47 mCumulativeTemporalRange->setChecked( state );
48}
49
50bool QgsTemporalMapSettingsWidget::isTemporalRangeCumulative()
51{
52 return mCumulativeTemporalRange->isChecked();
53}
54
Base class for any widget that can be shown as a inline panel.