QGIS API Documentation  3.8.0-Zanzibar (11aff65)
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 
71  {
74  };
75 
79  QgsLayoutDesignerInterface( QObject *parent SIP_TRANSFERTHIS = nullptr )
80  : QObject( parent )
81  {}
82 
87  virtual QgsLayout *layout() = 0;
88 
93  virtual QgsMasterLayoutInterface *masterLayout() = 0;
94 
100  virtual QWidget *window() = 0;
101 
106  virtual QgsLayoutView *view() = 0;
107 
111  virtual QgsMessageBar *messageBar() = 0;
112 
116  virtual void selectItems( const QList< QgsLayoutItem * > &items ) = 0;
117 
124  virtual void setAtlasPreviewEnabled( bool enabled ) = 0;
125 
132  virtual bool atlasPreviewEnabled() const = 0;
133 
142  virtual void showItemOptions( QgsLayoutItem *item, bool bringPanelToFront = true ) = 0;
143 
144  // Menus and toolbars
145 
160  virtual QMenu *layoutMenu() = 0;
161 
176  virtual QMenu *editMenu() = 0;
177 
192  virtual QMenu *viewMenu() = 0;
193 
208  virtual QMenu *itemsMenu() = 0;
209 
226  virtual QMenu *atlasMenu() = 0;
227 
244  virtual QMenu *reportMenu() = 0;
245 
260  virtual QMenu *settingsMenu() = 0;
261 
273  virtual QToolBar *layoutToolbar() = 0;
274 
286  virtual QToolBar *navigationToolbar() = 0;
287 
299  virtual QToolBar *actionsToolbar() = 0;
300 
315  virtual QToolBar *atlasToolbar() = 0;
316 
326  virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget *dock ) = 0;
327 
337  virtual void removeDockWidget( QDockWidget *dock ) = 0;
338 
344  virtual void activateTool( StandardTool tool ) = 0;
345 
346  public slots:
347 
351  virtual void close() = 0;
352 
358  virtual void showRulers( bool visible ) = 0;
359 
360 
361 };
362 
363 #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.
StandardTool
Standard designer tools which are always available for use.
#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.