2025-10-13 05:49:55 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include <QtWidgets/QMainWindow>
|
2025-10-16 15:27:38 +00:00
|
|
|
|
<<<<<<< HEAD
|
2025-10-13 05:49:55 +00:00
|
|
|
|
#include <memory>
|
|
|
|
|
|
#include <qgspointxy.h>
|
|
|
|
|
|
|
|
|
|
|
|
class QgsMapCanvas;
|
|
|
|
|
|
class QgsMapToolPan;
|
|
|
|
|
|
class QgsLayerTreeModel;
|
|
|
|
|
|
class QgsLayerTreeView;
|
|
|
|
|
|
class QgsLayerTreeMapCanvasBridge;
|
|
|
|
|
|
class QDockWidget;
|
|
|
|
|
|
class QLabel;
|
|
|
|
|
|
class QStatusBar;
|
|
|
|
|
|
class QMenuBar;
|
|
|
|
|
|
class QToolBar;
|
|
|
|
|
|
class QgsMapLayer;
|
|
|
|
|
|
|
2025-10-16 15:27:38 +00:00
|
|
|
|
=======
|
2025-10-13 05:49:55 +00:00
|
|
|
|
#include <qgsmapcanvas.h>
|
|
|
|
|
|
#include <qgsrasterlayer.h>
|
|
|
|
|
|
#include <qgsmaptoolpan.h>
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
#include <qgslayertreeview.h>
|
|
|
|
|
|
#include <qgslayertreemapcanvasbridge.h>
|
2025-10-16 15:27:38 +00:00
|
|
|
|
>>>>>>> bc199244a3370d5bb7d3f52d5c17e6e2c467f20a
|
2025-10-13 05:49:55 +00:00
|
|
|
|
|
|
|
|
|
|
class ManualLabelToolWidget : public QMainWindow
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
ManualLabelToolWidget(QWidget *parent = nullptr);
|
|
|
|
|
|
~ManualLabelToolWidget();
|
|
|
|
|
|
|
2025-10-16 15:27:38 +00:00
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
|
=======
|
2025-10-13 05:49:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
2025-10-16 15:27:38 +00:00
|
|
|
|
>>>>>>> bc199244a3370d5bb7d3f52d5c17e6e2c467f20a
|
2025-10-13 05:49:55 +00:00
|
|
|
|
private: // UI
|
|
|
|
|
|
void init_UI();// Init UI
|
|
|
|
|
|
|
|
|
|
|
|
private: // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
QgsMapCanvas* map_canvas=nullptr; // map widget
|
|
|
|
|
|
QgsMapToolPan* map_tool_pan = nullptr; // map tool for pan zoom
|
|
|
|
|
|
|
|
|
|
|
|
QgsLayerTreeModel* map_layerModel = nullptr;
|
|
|
|
|
|
QgsLayerTreeView* map_layerTreeView = nullptr;
|
|
|
|
|
|
QgsLayerTreeMapCanvasBridge* map_layer_Bridge = nullptr;
|
|
|
|
|
|
|
|
|
|
|
|
private: // <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
QDockWidget* layerTreeDock;
|
2025-10-16 15:27:38 +00:00
|
|
|
|
<<<<<<< HEAD
|
2025-10-13 05:49:55 +00:00
|
|
|
|
|
|
|
|
|
|
// ״̬<D7B4><CCAC>
|
|
|
|
|
|
QLabel* scaleLabel; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
QLabel* CoordinaryTextLabel; // ͼ<><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ
|
|
|
|
|
|
QLabel* PointXYLabel;// <20><><EFBFBD><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
QLabel* UnitLabel;
|
|
|
|
|
|
QStatusBar* appStatusBar;// ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
private: // <20>˵<EFBFBD><CBB5><EFBFBD>
|
|
|
|
|
|
QMenuBar* menubar;
|
|
|
|
|
|
|
|
|
|
|
|
private: // <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
|
|
|
|
|
QToolBar* AiLabelToolBar;
|
|
|
|
|
|
|
|
|
|
|
|
private: // <20>ļ<EFBFBD><C4BC>˵<EFBFBD>
|
|
|
|
|
|
QMenu* fileMenu;
|
|
|
|
|
|
QAction* newAction;
|
|
|
|
|
|
QMenu* openMenu;
|
|
|
|
|
|
QAction* openRasterFolderAction;
|
|
|
|
|
|
QAction* openRasterAction;
|
|
|
|
|
|
QAction* openSLCRasterAction;
|
|
|
|
|
|
|
|
|
|
|
|
private:// <20>༭<EFBFBD>˵<EFBFBD>
|
|
|
|
|
|
QMenu* editMenu;
|
|
|
|
|
|
|
|
|
|
|
|
public slots:// <20><><EFBFBD>ܺ<EFBFBD><DCBA><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void open();
|
|
|
|
|
|
void openRasterLayerTriggered();
|
|
|
|
|
|
void openRaster(QString &path);
|
|
|
|
|
|
|
|
|
|
|
|
public slots: // ״̬<D7B4><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
void updateScaleLabel(double);
|
|
|
|
|
|
void updateCoordinateLabel(const QgsPointXY&);
|
|
|
|
|
|
|
|
|
|
|
|
void onMapExtentsChanged();
|
|
|
|
|
|
void onLayersChanged(QgsMapLayer* layer);
|
|
|
|
|
|
|
|
|
|
|
|
public: // <20><><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
QString lastFileDialogPath;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-16 15:27:38 +00:00
|
|
|
|
=======
|
|
|
|
|
|
>>>>>>> bc199244a3370d5bb7d3f52d5c17e6e2c467f20a
|
2025-10-13 05:49:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|