QGIS API Documentation 3.99.0-Master (2fe06baccd8)
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
20#include "qgis.h"
21#include "qgsgui.h"
22
23#include "moc_qgstemporalmapsettingswidget.cpp"
24
26QgsTemporalMapSettingsWidget::QgsTemporalMapSettingsWidget( QWidget *parent )
27 : QgsPanelWidget( parent )
28{
29 setupUi( this );
30 setPanelTitle( tr( "Temporal Settings" ) );
31
32 mFrameSpinBox->setClearValue( 1 );
33
34 connect( mFrameSpinBox, qOverload<double>( &QDoubleSpinBox::valueChanged ), this, &QgsTemporalMapSettingsWidget::frameRateChanged );
35 connect( mCumulativeTemporalRange, &QCheckBox::toggled, this, &QgsTemporalMapSettingsWidget::temporalRangeCumulativeChanged );
36}
37
38double QgsTemporalMapSettingsWidget::frameRateValue()
39{
40 return mFrameSpinBox->value();
41}
42
43void QgsTemporalMapSettingsWidget::setFrameRateValue( double value )
44{
45 mFrameSpinBox->setValue( value );
46}
47
48void QgsTemporalMapSettingsWidget::setIsTemporalRangeCumulative( bool state )
49{
50 mCumulativeTemporalRange->setChecked( state );
51}
52
53bool QgsTemporalMapSettingsWidget::isTemporalRangeCumulative()
54{
55 return mCumulativeTemporalRange->isChecked();
56}
57
Base class for any widget that can be shown as an inline panel.