File indexing completed on 2025-03-09 03:57:05

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2009-08-08
0007  * Description : an abstract option class
0008  *
0009  * SPDX-FileCopyrightText: 2009-2012 by Andi Clemens <andi dot clemens at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_OPTION_H
0016 #define DIGIKAM_OPTION_H
0017 
0018 // Local includes
0019 
0020 #include "rule.h"
0021 
0022 namespace Digikam
0023 {
0024 
0025 class Option : public Rule
0026 {
0027     Q_OBJECT
0028 
0029 public:
0030 
0031     Option(const QString& name, const QString& description);
0032     Option(const QString& name, const QString& description, const QString& icon);
0033     ~Option()                                                    override;
0034 
0035 protected:
0036 
0037     QString parseOperation(ParseSettings& settings,
0038                            const QRegularExpressionMatch& match) override = 0;
0039 
0040 private:
0041 
0042     // Disable
0043     Option(QObject*)                 = delete;
0044     Option(const Option&)            = delete;
0045     Option& operator=(const Option&) = delete;
0046 
0047 private:
0048 
0049     class Private;
0050     Private* const d;
0051 };
0052 
0053 } // namespace Digikam
0054 
0055 #endif // DIGIKAM_OPTION_H