87 lines
1.7 KiB
C++
Executable File
87 lines
1.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* SituationMap - MapWidgetControlDialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
//Lts
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
|
|
//Map
|
|
#include <Common/situation_map_logging.h>
|
|
#include <LtsSession/lts_session.h>
|
|
#include <Map/map.h>
|
|
|
|
class QToolButton;
|
|
|
|
namespace Ui
|
|
{
|
|
class MapWidgetControl;
|
|
}
|
|
|
|
namespace SituationMap
|
|
{
|
|
// --------------------------------------------------------
|
|
// MapWidgetControlDialog
|
|
// --------------------------------------------------------
|
|
class MapWidgetControl : public LtsWidgets::LtsDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MapWidgetControl(const QString &menuGroup, QWidget *parent = nullptr);
|
|
~MapWidgetControl();
|
|
|
|
bool init(SituationMap::Map *map, LtsSession::LtsSession *session);
|
|
|
|
bool isBtn2D3Denabled() const;
|
|
void enableBtn2D3D(bool onOff);
|
|
bool isReplay() const;
|
|
void setIsReplay(bool b);
|
|
|
|
Q_SIGNALS:
|
|
void changeModeRequested();
|
|
|
|
private Q_SLOTS:
|
|
void onChangeModeRequested();
|
|
void enaDisa();
|
|
|
|
private:
|
|
|
|
struct MenuWidgetPosition
|
|
{
|
|
int row;
|
|
int column;
|
|
};
|
|
|
|
void enableBtn2D3DInternal(bool onOff);
|
|
void retranslate() override;
|
|
void reBuildUi();
|
|
MenuWidgetPosition calculateMenuWidgetPosition(MenuWidgetPosition &pos) const;
|
|
|
|
private:
|
|
QString m_menuGroup;
|
|
QPointer<Map> m_situationMap;
|
|
|
|
Ui::MapWidgetControl *m_ui;
|
|
|
|
QToolButton *m_tbGrid;
|
|
QToolButton *m_tbCompass;
|
|
QToolButton *m_tbPositionString;
|
|
QToolButton *m_tbExerciseTimeString;
|
|
QToolButton *m_tbOverviewMap;
|
|
QToolButton *m_tb2D3D;
|
|
|
|
bool m_isBtn2D3Denabled = true;
|
|
LtsSession::LtsSession *m_session;
|
|
|
|
LOGGER_T m_logger;
|
|
};
|
|
|
|
}// namespace SituationMapTROL_H
|