digiKam
abstractthemeparameter.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 : 2006-04-04
7  * Description : a tool to generate HTML image galleries
8  *
9  * Copyright (C) 2006-2010 by Aurelien Gateau <aurelien dot gateau at free dot fr>
10  * Copyright (C) 2012-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) 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_ABSTRACT_THEME_PARAMETER_H
25 #define DIGIKAM_ABSTRACT_THEME_PARAMETER_H
26 
27 class QByteArray;
28 class QString;
29 class QWidget;
30 
31 class KConfigGroup;
32 
34 {
35 
42 {
43 public:
44 
45  explicit AbstractThemeParameter();
46  virtual ~AbstractThemeParameter();
47 
52  virtual void init(const QByteArray& internalName, const KConfigGroup* configGroup);
53 
54  QByteArray internalName() const;
55  QString name() const;
56  QString defaultValue() const;
57 
62  virtual QWidget* createWidget(QWidget* parent, const QString& value) const = 0;
63 
68  virtual QString valueFromWidget(QWidget*) const = 0;
69 
70 private:
71 
72  // Disable
74  AbstractThemeParameter& operator=(const AbstractThemeParameter&) = delete;
75 
76 private:
77 
78  class Private;
79  Private* const d;
80 };
81 
82 } // namespace DigikamGenericHtmlGalleryPlugin
83 
84 #endif // DIGIKAM_ABSTRACT_THEME_PARAMETER_H
Definition: abstractthemeparameter.h:42
virtual void init(const QByteArray &internalName, const KConfigGroup *configGroup)
Definition: abstractthemeparameter.cpp:64
virtual QString valueFromWidget(QWidget *) const =0
AbstractThemeParameter()
Definition: abstractthemeparameter.cpp:54
QString defaultValue() const
Definition: abstractthemeparameter.cpp:81
QByteArray internalName() const
Definition: abstractthemeparameter.cpp:71
QString name() const
Definition: abstractthemeparameter.cpp:76
virtual ~AbstractThemeParameter()
Definition: abstractthemeparameter.cpp:59
virtual QWidget * createWidget(QWidget *parent, const QString &value) const =0
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: galleryconfig.cpp:30