Skip to content
Permalink
Browse files

new temporal map settings dialog

  • Loading branch information
Samweli authored and nyalldawson committed Mar 7, 2020
1 parent d446c0a commit 3e06d0a696e1c6847d88ef2fafb7f47d89133663
@@ -829,6 +829,7 @@
<file>themes/default/temporal_navigation/next.svg</file>
<file>themes/default/temporal_navigation/stop.svg</file>
<file>themes/default/temporal_navigation/previous.svg</file>
<file>themes/default/temporal_navigation/vcr_settings.svg</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="48"
width="48"
version="1.1"
id="svg13"
sodipodi:docname="temporalVcrSettings2.svg"
inkscape:version="0.92.4 (unknown)">
<metadata
id="metadata19">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs17" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1299"
inkscape:window-height="713"
id="namedview15"
showgrid="false"
inkscape:zoom="9.8333333"
inkscape:cx="12.152543"
inkscape:cy="24.20339"
inkscape:window-x="67"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg13" />
<linearGradient
id="a"
gradientUnits="userSpaceOnUse"
x1="9.5"
x2="15.5"
y1="15.5"
y2="23.5">
<stop
offset="0"
stop-color="#fef5af"
id="stop2" />
<stop
offset=".1986319"
stop-color="#fbe741"
id="stop4" />
<stop
offset=".71306628"
stop-color="#fbe21e"
id="stop6" />
<stop
offset="1"
stop-color="#e3ca04"
id="stop8" />
</linearGradient>
<path
d="m 19.509474,3.1570395 v 7.8692355 c -0.41701,0.148573 -0.835395,0.318124 -1.233315,0.505364 L 12.689967,5.9726373 6.0881036,12.542367 11.674297,18.101371 c -0.186562,0.394619 -0.358956,0.812057 -0.507837,1.22731 H 3.2587339 v 9.240942 H 11.16646 c 0.147582,0.413347 0.322688,0.833591 0.507837,1.22731 l -5.5861934,5.559004 6.6018634,6.56973 5.586192,-5.559001 c 0.398255,0.186945 0.816471,0.356876 1.233315,0.505363 v 7.869236 h 9.286138 v -7.869236 c 0.416844,-0.148473 0.835059,-0.318431 1.233313,-0.505363 l 5.586193,5.559001 6.601864,-6.56973 -5.586193,-5.559004 c 0.185141,-0.393719 0.360247,-0.813963 0.507836,-1.22731 h 7.907726 v -9.240942 h -7.907726 c -0.149201,-0.414814 -0.319988,-0.830997 -0.507836,-1.22731 l 5.586193,-5.559004 -6.601864,-6.5697297 -5.586193,5.5590017 c -0.395647,-0.18424 -0.817942,-0.358493 -1.233313,-0.505364 V 3.1570395 Z M 24.152543,18.39015 c 3.081903,0 5.586193,2.492098 5.586193,5.559004 0,3.066902 -2.50429,5.559001 -5.586193,5.559001 -3.081904,0 -5.586192,-2.492099 -5.586192,-5.559001 0,-3.066906 2.504288,-5.559004 5.586192,-5.559004 z"
style="overflow:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.99299085;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1"
id="path11"
inkscape:connector-curvature="0" />
</svg>
@@ -13,7 +13,8 @@
class QgsTemporalController : QObject
{
%Docstring

A controller base class for temporal objects, contains a signal for notifying
updates of the objects temporal range.

.. versionadded:: 3.14
%End
@@ -31,7 +32,12 @@ Constructor for QgsTemporalController.
virtual ~QgsTemporalController();

signals:

void updateTemporalRange( const QgsDateTimeRange &range );
%Docstring
Signals that a temporal ``range`` has changed and need to be updated to
the related objects.
%End

};

@@ -0,0 +1,46 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstemporalmapsettingsdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





class QgsTemporalMapSettingsDialog : QDialog
{
%Docstring
The QgsTemporalMapSettingsDialog class

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgstemporalmapsettingsdialog.h"
%End
public:

QgsTemporalMapSettingsDialog( QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags() );
%Docstring
Constructor for QgsTemporalMapSettingsDialog
%End

~QgsTemporalMapSettingsDialog();

double frameRateValue();
%Docstring
Returns the value of frame rate from widget.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstemporalmapsettingsdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -0,0 +1,52 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstemporalmapsettingswidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/






class QgsTemporalMapSettingsWidget : QWidget
{
%Docstring
The QgsTemporalMapSettingsWidget class

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgstemporalmapsettingswidget.h"
%End
public:

QgsTemporalMapSettingsWidget( QWidget *parent = 0 );
%Docstring
Constructor for QgsTemporalMapSettingsWidget
%End

~QgsTemporalMapSettingsWidget();

double frameRateValue();
%Docstring
Returns the value of frame rate from widget input
%End

void setFrameRateValue( double value );
%Docstring
Sets the value of frame rate from the vcr widget.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgstemporalmapsettingswidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -196,6 +196,8 @@
%Include auto_generated/qgstablewidgetitem.sip
%Include auto_generated/qgstabwidget.sip
%Include auto_generated/qgstaskmanagerwidget.sip
%Include auto_generated/qgstemporalmapsettingsdialog.sip
%Include auto_generated/qgstemporalmapsettingswidget.sip
%Include auto_generated/qgstemporalvcrdockwidget.sip
%Include auto_generated/qgstextformatwidget.sip
%Include auto_generated/qgstextpreview.sip
@@ -504,6 +504,8 @@ SET(QGIS_GUI_SRCS
qgstabwidget.cpp
qgstablewidgetitem.cpp
qgstaskmanagerwidget.cpp
qgstemporalmapsettingsdialog.cpp
qgstemporalmapsettingswidget.cpp
qgstemporalvcrdockwidget.cpp
qgstextformatwidget.cpp
qgstextpreview.cpp
@@ -725,6 +727,8 @@ SET(QGIS_GUI_HDRS
qgstablewidgetitem.h
qgstabwidget.h
qgstaskmanagerwidget.h
qgstemporalmapsettingsdialog.h
qgstemporalmapsettingswidget.h
qgstemporalvcrdockwidget.h
qgstextformatwidget.h
qgstextpreview.h
@@ -0,0 +1,56 @@
/***************************************************************************
qgstemporalmapsettingsdialog.cpp
---------------
begin : March 2020
copyright : (C) 2020 by Samweli Mwakisambwe
email : samweli at kartoza dot com
***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#include "qgstemporalmapsettingsdialog.h"
#include "qgsgui.h"
#include "qgstemporalmapsettingswidget.h"

QgsTemporalMapSettingsDialog::QgsTemporalMapSettingsDialog( QWidget *parent, Qt::WindowFlags flags )
: QDialog( parent, flags )
{
setupUi( this );

connect( this, &QDialog::accepted, this, &QgsTemporalMapSettingsDialog::apply );
connect( this, &QDialog::rejected, this, &QgsTemporalMapSettingsDialog::onCancel );

QVBoxLayout *layout = new QVBoxLayout();
mTemporalMapSettingsWidget = new QgsTemporalMapSettingsWidget( this );
layout->addWidget( mTemporalMapSettingsWidget );
setLayout( layout );
setWindowTitle( tr( "Temporal Map Settings" ) );

mTemporalMapSettingsWidget->setFrameRateValue( 1 );

hide();
}

QgsTemporalMapSettingsDialog::~QgsTemporalMapSettingsDialog()
{
}

void QgsTemporalMapSettingsDialog::apply()
{
}

void QgsTemporalMapSettingsDialog::onCancel()
{

}
double QgsTemporalMapSettingsDialog::frameRateValue()
{
return mTemporalMapSettingsWidget->frameRateValue();
}
@@ -0,0 +1,63 @@
/***************************************************************************
qgstemporalmapsettingsdialog.h
---------------
begin : March 2020
copyright : (C) 2020 by Samweli Mwakisambwe
email : samweli at kartoza dot com
***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#ifndef QGSTEMPORALMAPSETTINGSDIALOG_H
#define QGSTEMPORALMAPSETTINGSDIALOG_H

#include "ui_qgstemporalmapsettingsdialogbase.h"
#include "qgis_gui.h"

class QgsTemporalMapSettingsWidget;

/**
* \ingroup gui
* The QgsTemporalMapSettingsDialog class
*
* \since QGIS 3.14
*/
class GUI_EXPORT QgsTemporalMapSettingsDialog : public QDialog, private Ui::QgsTemporalMapSettingsDialogBase
{
Q_OBJECT
public:

/**
* Constructor for QgsTemporalMapSettingsDialog
*
*/
QgsTemporalMapSettingsDialog( QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags() );

~QgsTemporalMapSettingsDialog() override;

/**
* Returns the value of frame rate from widget.
*/
double frameRateValue();

private slots:

//! \brief Applies the settings made in the dialog.
void apply();
//! \brief Called when cancel button is pressed
void onCancel();

private:

//! Widget for handling temporal map settings
QgsTemporalMapSettingsWidget *mTemporalMapSettingsWidget = nullptr;
};

#endif // QGSTEMPORALMAPSETTINGSDIALOG_H
@@ -0,0 +1,39 @@
/***************************************************************************
qgstemporalmapsettingswidget.cpp
---------------
begin : March 2020
copyright : (C) 2020 by Samweli Mwakisambwe
email : samweli at kartoza dot com
***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

#include "qgstemporalmapsettingswidget.h"
#include "qgsgui.h"

QgsTemporalMapSettingsWidget::QgsTemporalMapSettingsWidget( QWidget *parent )
: QWidget( parent )
{
setupUi( this );
}

QgsTemporalMapSettingsWidget::~QgsTemporalMapSettingsWidget()
{
}

double QgsTemporalMapSettingsWidget::frameRateValue()
{
return mFrameSpinBox->value();
}

void QgsTemporalMapSettingsWidget::setFrameRateValue( double value )
{
mFrameSpinBox->setValue( value );
}

0 comments on commit 3e06d0a

Please sign in to comment.
You can’t perform that action at this time.