1 
2 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
3 
4 /*
5     Rosegarden
6     A MIDI and audio sequencer and musical notation editor.
7     Copyright 2000-2021 the Rosegarden development team.
8 
9     Other copyrights also apply to some parts of this work.  Please
10     see the AUTHORS file and individual file headers for details.
11 
12     This program is free software; you can redistribute it and/or
13     modify it under the terms of the GNU General Public License as
14     published by the Free Software Foundation; either version 2 of the
15     License, or (at your option) any later version.  See the file
16     COPYING included with this distribution for more information.
17 */
18 
19 #ifndef RG_HEADERSCONFIGURATIONPAGE_H
20 #define RG_HEADERSCONFIGURATIONPAGE_H
21 
22 #include "gui/widgets/LineEdit.h"
23 
24 #include <QWidget>
25 
26 class QWidget;
27 class LineEdit;
28 class QTableWidget;
29 
30 namespace Rosegarden
31 {
32 
33 class RosegardenDocument;
34 class ConfigureDialogBase;
35 
36 class HeadersConfigurationPage : public QWidget
37 {
38     Q_OBJECT
39 
40 public:
41     // parentDialog is only used to allow enabling the apply button of
42     // the dialog. This is only the case when HeadersConfigurationPage is
43     // instantiated from DocumentMetaConfigurationPage.
44     // This parameter is also used to deal with the comments meta data in
45     // apply() when CommentsConfigurationPage has not been instantiated along
46     // with HeadersConfigurationPage.
47     HeadersConfigurationPage(QWidget *parent, RosegardenDocument *doc,
48                              ConfigureDialogBase *parentDialog = nullptr);
49 
50     void apply();
51 
52 protected slots:
53     void slotAddNewProperty();
54     void slotDeleteProperty();
55 
56 protected:
57     RosegardenDocument *m_doc;
58     ConfigureDialogBase *m_parentDialog;
59 
60     // Header fields
61     LineEdit *m_editDedication;
62     LineEdit *m_editTitle;
63     LineEdit *m_editSubtitle;
64     LineEdit *m_editSubsubtitle;
65     LineEdit *m_editPoet;
66     LineEdit *m_editComposer;
67     LineEdit *m_editMeter;
68     LineEdit *m_editOpus;
69     LineEdit *m_editArranger;
70     LineEdit *m_editInstrument;
71     LineEdit *m_editPiece;
72     LineEdit *m_editCopyright;
73     LineEdit *m_editTagline;
74 
75     QTableWidget *m_metadata;
76 };
77 
78 
79 }
80 
81 #endif
82