126 lines
1.8 KiB
C++
Executable File
126 lines
1.8 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QString>
|
|
#include <QtCore/QStringList>
|
|
|
|
#include "logging.h"
|
|
|
|
namespace SituationMap
|
|
{
|
|
class Map;
|
|
}
|
|
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
class LtsBaseLayoutWidget;
|
|
}
|
|
|
|
|
|
namespace PlanEditor
|
|
{
|
|
class PlanEditor;
|
|
class FavouriteProps;
|
|
class SymbolFavourites;
|
|
class PlanEditorSession;
|
|
|
|
|
|
|
|
class FavouritesActionManager : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
FavouritesActionManager(PlanEditor *planEditor, SituationMap::Map *map, const PlanEditorSession &session);
|
|
virtual ~FavouritesActionManager();
|
|
|
|
|
|
void initMainMenu( bool retranslate = false );
|
|
|
|
void initFromDefaultSettings();
|
|
|
|
SymbolFavourites *symbolFavourites() const;
|
|
|
|
void removeActionItems();
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void onSymbolFavouriteAdd(const QString &scope, const QString &sidc);
|
|
|
|
|
|
|
|
void onSymbolFavouriteDelete(const QString &sidc);
|
|
|
|
|
|
|
|
void onSymbolFavouriteDeleteScope(const QString &scope);
|
|
|
|
|
|
|
|
void onSaveFavouritesToSettings();
|
|
|
|
|
|
|
|
|
|
void onScopeSaveToFile(const QString &scope);
|
|
|
|
|
|
|
|
QStringList onScopeLoadFromFile();
|
|
|
|
|
|
|
|
void onScopeStoreViaSettingService(const QString &scope);
|
|
|
|
|
|
|
|
QStringList onScopeLoadViaSettingService();
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
void updateSymbolScopes(const QStringList &scopeList);
|
|
|
|
|
|
private:
|
|
|
|
class InternalData;
|
|
|
|
InternalData *m_internal;
|
|
|
|
FavouriteProps &buildFavouriteAction(const QString &scope, const QString &sidc, const QString &name, const QPixmap &symbolPixmap);
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void onNewFavouritesScope(const QString &scope);
|
|
void onNewFavouritesSymbol(const QString &scope, const QString &sidc);
|
|
|
|
void onDeleteFavouritesScope(const QString &scope);
|
|
void onDeleteFavouritesSymbol(const QString &sidc);
|
|
|
|
void onDeleteFavouriteSymbol();
|
|
|
|
|
|
|
|
|
|
void removeScopeMenus(const QString &scope);
|
|
|
|
};
|
|
|
|
|
|
}
|