1 /***************************************************************************
2                              qgsreportfieldgroupsectionwidget.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 QGSREPORTFIELDGROUPSECTIONWIDGET_H
18 #define QGSREPORTFIELDGROUPSECTIONWIDGET_H
19 
20 #include "ui_qgsreportwidgetfieldgroupsectionbase.h"
21 
22 class QgsLayoutDesignerDialog;
23 class QgsReportSectionFieldGroup;
24 class QgsReportOrganizerWidget;
25 
26 class QgsReportSectionFieldGroupWidget: public QWidget, private Ui::QgsReportWidgetFieldGroupSectionBase
27 {
28     Q_OBJECT
29   public:
30     QgsReportSectionFieldGroupWidget( QgsReportOrganizerWidget *parent, QgsLayoutDesignerDialog *designer, QgsReportSectionFieldGroup *section );
31 
32   private slots:
33 
34     void toggleHeader( bool enabled );
35     void toggleHeaderAlwaysVisible( bool enabled );
36     void toggleFooter( bool enabled );
37     void toggleFooterAlwaysVisible( bool enabled );
38     void editHeader();
39     void editFooter();
40     void toggleBody( bool enabled );
41     void editBody();
42     void sortAscendingToggled( bool checked );
43     void setLayer( QgsMapLayer *layer );
44     void setField( const QString &field );
45 
46   private:
47 
48     QgsReportOrganizerWidget *mOrganizer = nullptr;
49     QgsReportSectionFieldGroup *mSection = nullptr;
50     QgsLayoutDesignerDialog *mDesigner = nullptr;
51 
52 };
53 
54 #endif // QGSREPORTFIELDGROUPSECTIONWIDGET_H
55