digiKam
setup.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 : 2003-02-03
7  * Description : digiKam setup dialog.
8  *
9  * Copyright (C) 2003-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2003-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_SETUP_H
26 #define DIGIKAM_SETUP_H
27 
28 // Local includes
29 
30 #include "digikam_config.h"
31 #include "setuptemplate.h"
32 #include "template.h"
33 #include "searchtextbar.h"
34 #include "dconfigdlg.h"
35 
36 namespace Digikam
37 {
38 
39 class Setup : public DConfigDlg
40 {
41  Q_OBJECT
42 
43 public:
44 
45  enum Page
46  {
48 
62 
64  };
65 
66 public:
67 
72  static bool execDialog(Page page = LastPageUsed);
73  static bool execDialog(QWidget* const parent, Page page = LastPageUsed);
74 
78  static bool execSinglePage(Page page);
79  static bool execSinglePage(QWidget* const parent, Page page);
80 
81  static void onlineVersionCheck();
82 
83  static bool execTemplateEditor(QWidget* const parent, const Template& t);
84  void setTemplate(const Template& t);
85 
86  static bool execMetadataFilters(QWidget* const parent, int tab);
87  static bool execExifTool(QWidget* const parent);
88 
89  QSize sizeHint() const override;
90 
91 private Q_SLOTS:
92 
93  void slotHelp();
94  void slotOkClicked();
95 
96 private:
97 
98  explicit Setup(QWidget* const parent = nullptr);
99  ~Setup() override;
100 
101  Setup::Page activePageIndex() const;
102  void showPage(Setup::Page page);
103 
104 private:
105 
106  class Private;
107  Private* const d;
108 };
109 
110 } // namespace Digikam
111 
112 #endif // DIGIKAM_SETUP_H
A dialog base class which can handle multiple pages.
Definition: dconfigdlg.h:59
Definition: databasepage.h:41
Definition: setup.h:40
QSize sizeHint() const override
Definition: setup.cpp:281
static bool execTemplateEditor(QWidget *const parent, const Template &t)
Definition: setup.cpp:366
static bool execSinglePage(Page page)
Definition: setup.cpp:350
static bool execMetadataFilters(QWidget *const parent, int tab)
Definition: setup.cpp:378
void setTemplate(const Template &t)
Definition: setup.cpp:273
static void onlineVersionCheck()
Definition: setup.cpp:617
Page
Definition: setup.h:46
@ CameraPage
Definition: setup.h:59
@ AlbumViewPage
Definition: setup.h:51
@ SetupPageEnumLast
Definition: setup.h:63
@ CollectionsPage
Definition: setup.h:50
@ LastPageUsed
Definition: setup.h:47
@ LightTablePage
Definition: setup.h:57
@ ToolTipPage
Definition: setup.h:52
@ EditorPage
Definition: setup.h:55
@ MiscellaneousPage
Definition: setup.h:61
@ PluginsPage
Definition: setup.h:60
@ ImageQualityPage
Definition: setup.h:58
@ MetadataPage
Definition: setup.h:53
@ ICCPage
Definition: setup.h:56
@ TemplatePage
Definition: setup.h:54
static bool execDialog(Page page=LastPageUsed)
Definition: setup.cpp:335
static bool execExifTool(QWidget *const parent)
Definition: setup.cpp:407
Definition: template.h:46
Definition: datefolderview.cpp:43