WSF
WizMapLayerDockWidget.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2019 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12#ifndef WIZMAPLAYERDOCKWIDGET_HPP
13#define WIZMAPLAYERDOCKWIDGET_HPP
14
15#include "FileTypeCache.hpp"
16#include "WkfMapLayerDockWidget.hpp"
17
18namespace wizard
19{
21{
22public:
23 const std::string cLE_TIFF_HEADER{"II\x2A\0"};
24 const std::string cBE_TIFF_HEADER{"MM\0\x2A"};
26 ~MapLayerFileDetector() override = default;
27 std::string DetectFileType(const QFileInfo& aFileInfo, const std::string& aFileHeader) override;
28};
29// this UI allows the user to add layers to their maps
30// layers may be shape or image files
31class MapLayerDockWidget : public wkf::MapLayerDockWidget
32{
33public:
34 MapLayerDockWidget(QWidget* aParent = nullptr, Qt::WindowFlags aFlags = Qt::WindowFlags());
35 ~MapLayerDockWidget() override;
36
37 void ActionsForFileRequested(const QFileInfo& aFileInfo, QMenu* aMenu);
38
39private:
40 // we override the implementation in wkf::MapLayerDockWidget so that we
41 // don't interpret drags into the map view... wizard handles these through
42 // the FileTypeCache
43 void DragEnter(QDragEnterEvent* aEvent) override;
44
45 // we override the implementation in wkf::MapLayerDockWidget so that we
46 // don't interpret drags into the map view... wizard handles these through
47 // the FileTypeCache
48 void DragDrop(QDropEvent* aEvent) override;
49
50 void CreateLayerShape(const QString& aFilename);
51 void CreateLayerTiff(const QString& aFilename);
52 MapLayerFileDetector mDetector;
53};
54} // namespace wizard
55
56#endif
Definition FileTypeCache.hpp:34
~MapLayerDockWidget() override
Definition WizMapLayerDockWidget.cpp:34
void ActionsForFileRequested(const QFileInfo &aFileInfo, QMenu *aMenu)
Definition WizMapLayerDockWidget.cpp:39
MapLayerDockWidget(QWidget *aParent=nullptr, Qt::WindowFlags aFlags=Qt::WindowFlags())
Definition WizMapLayerDockWidget.cpp:23
Definition WizMapLayerDockWidget.hpp:21
std::string DetectFileType(const QFileInfo &aFileInfo, const std::string &aFileHeader) override
Definition WizMapLayerDockWidget.cpp:103
~MapLayerFileDetector() override=default
const std::string cBE_TIFF_HEADER
Definition WizMapLayerDockWidget.hpp:24
const std::string cLE_TIFF_HEADER
Definition WizMapLayerDockWidget.hpp:23
Definition Runner.hpp:22
Copyrights Multiple, All Rights Reserved