1 /***************************************************************************
2   qgslayout3dmapwidget.h
3   --------------------------------------
4   Date                 : August 2018
5   Copyright            : (C) 2018 by Martin Dobias
6   Email                : wonder dot sk at gmail dot com
7  ***************************************************************************
8  *                                                                         *
9  *   This program is free software; you can redistribute it and/or modify  *
10  *   it under the terms of the GNU General Public License as published by  *
11  *   the Free Software Foundation; either version 2 of the License, or     *
12  *   (at your option) any later version.                                   *
13  *                                                                         *
14  ***************************************************************************/
15 
16 #ifndef QGSLAYOUT3DMAPWIDGET_H
17 #define QGSLAYOUT3DMAPWIDGET_H
18 
19 #include "qgis_gui.h"
20 #include "qgslayoutitemwidget.h"
21 #include "ui_qgslayout3dmapwidgetbase.h"
22 #include "qgslayoutitem3dmap.h"
23 
24 class QgsLayoutItem3DMap;
25 
26 class QgsLayout3DMapWidget : public QgsLayoutItemBaseWidget, private Ui::QgsLayout3DMapWidgetBase
27 {
28     Q_OBJECT
29   public:
30     explicit QgsLayout3DMapWidget( QgsLayoutItem3DMap *map3D );
31 
32     void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
33 
34   protected:
35     bool setNewItem( QgsLayoutItem *item ) override;
36 
37   private:
38     void updateCameraPoseWidgetsFromItem();
39 
40   private slots:
41     void copy3DMapSettings();
42     void copeCameraPose();
43     void updateCameraPose();
44 
45   private:
46     QPointer< QgsLayoutItem3DMap > mMap3D;
47     QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
48     QMenu *mMenu3DCanvases = nullptr;
49     QMenu *mMenu3DCanvasesPose = nullptr;
50 };
51 
52 #endif // QGSLAYOUT3DMAPWIDGET_H
53