KReport

KReportSectionEditor.h
1 /* This file is part of the KDE project
2  * Copyright (C) 2001-2007 by OpenMFG, LLC ([email protected])
3  * Copyright (C) 2007-2008 by Adam Pigg ([email protected])
4  * Copyright (C) 2012 by Friedrich W. H. Kossebau ([email protected])
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef SECTIONEDITOR_H
21 #define SECTIONEDITOR_H
22 
23 #include <QDialog>
24 #include <QSet>
25 
26 #include <ui_KReportSectionEditor.h>
27 
28 class KReportDesigner;
31 
32 class KReportSectionEditor : public QDialog
33 {
34  Q_OBJECT
35 
36 public:
37  explicit KReportSectionEditor(KReportDesigner* parent = nullptr);
38  ~KReportSectionEditor() override;
39 
40 private Q_SLOTS:
41  void cbReportHeader_toggled(bool yes);
42  void cbReportFooter_toggled(bool yes);
43  void cbHeadFirst_toggled(bool yes);
44  void cbHeadLast_toggled(bool yes);
45  void cbHeadEven_toggled(bool yes);
46  void cbHeadOdd_toggled(bool yes);
47  void cbFootFirst_toggled(bool yes);
48  void cbFootLast_toggled(bool yes);
49  void cbFootEven_toggled(bool yes);
50  void cbFootOdd_toggled(bool yes);
51  void cbHeadAny_toggled(bool yes);
52  void cbFootAny_toggled(bool yes);
53 
54  void btnAdd_clicked();
55  void btnEdit_clicked();
56  void btnRemove_clicked();
57  void btnMoveUp_clicked();
58  void brnMoveDown_clicked();
59 
60  void updateButtonsForItem(QListWidgetItem *currentItem);
61  void updateButtonsForRow(int row);
62 
63 private:
64  bool editDetailGroup(KReportDesignerSectionDetailGroup *rsdg);
65  void updateAddButton();
66 
67  QString columnName(const QString &column) const;
68  QSet<QString> groupingColumns() const;
69 
70 private:
71  Ui::SectionEditor m_ui;
72  QPushButton *m_btnAdd;
73  QPushButton *m_btnEdit;
74  QPushButton *m_btnRemove;
75  QPushButton *m_btnMoveUp;
76  QPushButton *m_btnMoveDown;
77 
78  KReportDesigner *m_reportDesigner;
79  KReportDesignerSectionDetail *m_reportSectionDetail;
80 };
81 
82 #endif // SECTIONEDITOR_H
Q_OBJECTQ_OBJECT
The central detail section which contains the bulk of the report.
Q_SLOTSQ_SLOTS
A section group allows a header and footer to be used for a particular report field.
The ReportDesigner is the main widget for designing a report.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:17:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.