Files
qt5-legatus-legacy/Lts/Viewer/SituationMap/LayerAggregation/layer_aggregation_widget.h
T
2026-08-13 18:33:10 +02:00

111 lines
2.4 KiB
Objective-C
Executable File

/**
**
** @RDE_HEADER@
** Handles aggregation of participant layer
** $Id$
** $HeadURL$
** $Author$
**
** -----------------------------------------------------------------------------------------------
**
** Hardware-Environment: Intel-PC
** Software-Environment: Windows 7, Qt 5.4. ArcGIS 10.2.5
**
** Language ........: C++ 11
**
** -----------------------------------------------------------------------------------------------
**
** Author ...........: Jörg Turla, SPD G, Tel. 3132
**
** -----------------------------------------------------------------------------------------------
**
** Notes .........:
**
** 16.08.2017, JT : first edition
**
** -----------------------------------------------------------------------------------------------
*/
#pragma once
#include <Map/layer_factory.h>
#include <situation_map_export.h>
#include <QtWidgets/QWidget>
class QPushButton;
class QRegularExpression;
namespace SituationMap
{
class Map;
/**
@class LayerAggregationWidget layer_aggregation_widget.h
@brief Class to handle aggregation of participant layer
*/
class SITUATIONMAP_EXPORT LayerAggregationWidget : public QWidget
{
Q_OBJECT
public:
/**
Constructor to build gui widget for handling aggregation layers.
@param map Map the layer are part of
@param layerType Type of layer in general this will be LayerType::Operational
@param nameCondition If the nameCondition doesn't match with the layername the layer will be skipped and is not handled.
Example of an expression "^Participant.+".
@param parent Parent for Qt object hierarchy
*/
explicit LayerAggregationWidget(Map *map, LayerType layerType, const QRegularExpression &nameCondition, QWidget *parent);
/**
Destructor to clean up memory.
*/
~LayerAggregationWidget();
void retranslate();
public slots:
void onApplyAll();
void onResetAll();
void onSetDefaultScales();
signals:
void changesMade();
protected slots:
void onSetValid(bool value);
void onGetMinScale();
void onGetMaxScale();
void onZoomTo();
void onReset();
void onApply();
private:
void doReset(int row);
static QString scaleText(double scale);
static void setMinScaleLabel(QPushButton *btn, double scale);
static void setMaxScaleLabel(QPushButton *btn, double scale);
class InternalData;
InternalData *m_internal;
}; // LayerAggregationWidget
} /* namespace SituationMap */