KReport

KReportSectionEditor.h
1/* This file is part of the KDE project
2 * Copyright (C) 2001-2007 by OpenMFG, LLC (info@openmfg.com)
3 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
4 * Copyright (C) 2012 by Friedrich W. H. Kossebau (kossebau@kde.org)
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
28class KReportDesigner;
31
32class KReportSectionEditor : public QDialog
33{
35
36public:
37 explicit KReportSectionEditor(KReportDesigner* parent = nullptr);
38 ~KReportSectionEditor() override;
39
40private 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
63private:
64 bool editDetailGroup(KReportDesignerSectionDetailGroup *rsdg);
65 void updateAddButton();
66
67 QString columnName(const QString &column) const;
68 QSet<QString> groupingColumns() const;
69
70private:
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
A section group allows a header and footer to be used for a particular report field.
The central detail section which contains the bulk of the report.
The ReportDesigner is the main widget for designing a report.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.