QGIS API Documentation  3.4.15-Madeira (e83d02e274)
qgslayoutdesignerinterface.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslayoutdesignerinterface.h
3  ---------------------
4  Date : July 2017
5  Copyright : (C) 2017 Nyall Dawson
6  Email : nyall dot dawson 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 QGSLAYOUTDESIGNERINTERFACE_H
17 #define QGSLAYOUTDESIGNERINTERFACE_H
18 
19 #include "qgis_gui.h"
20 #include "qgis_sip.h"
21 #include <QObject>
22 
23 class QgsLayout;
24 class QgsLayoutView;
25 class QgsLayoutItem;
26 class QgsMessageBar;
28 class QMenu;
29 class QDockWidget;
30 class QToolBar;
31 
53 class GUI_EXPORT QgsLayoutDesignerInterface: public QObject
54 {
55 
56 #ifdef SIP_RUN
58  if ( qobject_cast<QgsLayoutDesignerInterface *>( sipCpp ) )
59  sipType = sipType_QgsLayoutDesignerInterface;
60  else
61  sipType = NULL;
62  SIP_END
63 #endif
64 
65  Q_OBJECT
66 
67  public:
68 
72  QgsLayoutDesignerInterface( QObject *parent SIP_TRANSFERTHIS = nullptr )
73  : QObject( parent )
74  {}
75 
80  virtual QgsLayout *layout() = 0;
81 
86  virtual QgsMasterLayoutInterface *masterLayout() = 0;
87 
93  virtual QWidget *window() = 0;
94 
99  virtual QgsLayoutView *view() = 0;
100 
104  virtual QgsMessageBar *messageBar() = 0;
105 
109  virtual void selectItems( const QList< QgsLayoutItem * > &items ) = 0;
110 
117  virtual void setAtlasPreviewEnabled( bool enabled ) = 0;
118 
125  virtual bool atlasPreviewEnabled() const = 0;
126 
135  virtual void showItemOptions( QgsLayoutItem *item, bool bringPanelToFront = true ) = 0;
136 
137  // Menus and toolbars
138 
153  virtual QMenu *layoutMenu() = 0;
154 
169  virtual QMenu *editMenu() = 0;
170 
185  virtual QMenu *viewMenu() = 0;
186 
201  virtual QMenu *itemsMenu() = 0;
202 
219  virtual QMenu *atlasMenu() = 0;
220 
237  virtual QMenu *reportMenu() = 0;
238 
253  virtual QMenu *settingsMenu() = 0;
254 
266  virtual QToolBar *layoutToolbar() = 0;
267 
279  virtual QToolBar *navigationToolbar() = 0;
280 
292  virtual QToolBar *actionsToolbar() = 0;
293 
308  virtual QToolBar *atlasToolbar() = 0;
309 
319  virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget *dock ) = 0;
320 
330  virtual void removeDockWidget( QDockWidget *dock ) = 0;
331 
332  public slots:
333 
337  virtual void close() = 0;
338 
344  virtual void showRulers( bool visible ) = 0;
345 
346 
347 };
348 
349 #endif // QGSLAYOUTDESIGNERINTERFACE_H
Base class for graphical items within a QgsLayout.
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46
A graphical widget to display and interact with QgsLayouts.
Definition: qgslayoutview.h:49
QgsLayoutDesignerInterface(QObject *parent=nullptr)
Constructor for QgsLayoutDesignerInterface.
A bar for displaying non-blocking messages to the user.
Definition: qgsmessagebar.h:45
A common interface for layout designer dialogs and widgets.
#define SIP_END
Definition: qgis_sip.h:182
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Definition: qgslayout.h:49
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition: qgis_sip.h:165
Interface for master layout type objects, such as print layouts and reports.