1 /***************************************************************************
2                              qgsreportorganizerwidget.h
3                              ----------------------
4     begin                : December 2017
5     copyright            : (C) 2017 by Nyall Dawson
6     email                : nyall dot dawson at gmail dot com
7  ***************************************************************************/
8 /***************************************************************************
9  *                                                                         *
10  *   This program is free software; you can redistribute it and/or modify  *
11  *   it under the terms of the GNU General Public License as published by  *
12  *   the Free Software Foundation; either version 2 of the License, or     *
13  *   (at your option) any later version.                                   *
14  *                                                                         *
15  ***************************************************************************/
16 
17 #ifndef QGSREPORTORGANIZERWIDGET_H
18 #define QGSREPORTORGANIZERWIDGET_H
19 
20 #include "ui_qgsreportorganizerwidgetbase.h"
21 #include "qgspanelwidget.h"
22 #include <QStyledItemDelegate>
23 
24 class QgsReportSectionModel;
25 class QgsReport;
26 class QgsMessageBar;
27 class QgsLayoutDesignerDialog ;
28 class QgsAbstractReportSection;
29 
30 class QgsReportOrganizerWidget: public QgsPanelWidget, private Ui::QgsReportOrganizerBase
31 {
32     Q_OBJECT
33   public:
34     QgsReportOrganizerWidget( QWidget *parent, QgsLayoutDesignerDialog *designer, QgsReport *report );
35 
36     void setMessageBar( QgsMessageBar *bar );
37     void setEditedSection( QgsAbstractReportSection *section );
38 
39   private slots:
40 
41     void addLayoutSection();
42     void addFieldGroupSection();
43     void removeSection();
44     void selectionChanged( const QModelIndex &current, const QModelIndex &previous );
45 
46   private:
47 
48     QgsReport *mReport = nullptr;
49     QgsReportSectionModel *mSectionModel = nullptr;
50     QgsMessageBar *mMessageBar = nullptr;
51     QgsLayoutDesignerDialog *mDesigner = nullptr;
52     QWidget *mConfigWidget = nullptr;
53 
54 };
55 
56 
57 
58 #endif // QGSREPORTORGANIZERWIDGET_H
59