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