digiKam
templateselector.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2009-06-23
7  * Description : a widget to select metadata template.
8  *
9  * Copyright (C) 2009-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_TEMPLATE_SELECTOR_H
25 #define DIGIKAM_TEMPLATE_SELECTOR_H
26 
27 // Local includes
28 
29 #include "dlayoutbox.h"
30 #include "digikam_export.h"
31 
32 namespace Digikam
33 {
34 
35 class Template;
36 
37 class DIGIKAM_GUI_EXPORT TemplateSelector : public DHBox
38 {
39  Q_OBJECT
40 
41 public:
42 
44  {
45  REMOVETEMPLATE = 0,
46  DONTCHANGE = 1
47  };
48 
49 public:
50 
51  explicit TemplateSelector(QWidget* const parent = nullptr);
52  ~TemplateSelector() override;
53 
54  Template getTemplate() const;
55  void setTemplate(const Template& t);
56 
57  int getTemplateIndex() const;
58  void setTemplateIndex(int i);
59 
60 Q_SIGNALS:
61 
63 
64 private Q_SLOTS:
65 
66  void slotOpenSetup();
67  void slotTemplateListChanged();
68 
69 private:
70 
71  void populateTemplates();
72 
73 private:
74 
75  class Private;
76  Private* const d;
77 };
78 
79 } // namespace Digikam
80 
81 #endif // DIGIKAM_TEMPLATE_SELECTOR_H
Definition: dlayoutbox.h:45
Definition: templateselector.h:38
SelectorItems
Definition: templateselector.h:44
Definition: template.h:46
Definition: datefolderview.cpp:43