File indexing completed on 2024-05-19 16:31:53

0001 #ifndef CONDITIONS_LIST_H
0002 #define CONDITIONS_LIST_H
0003 /* SPDX-FileCopyrightText: 2009 Michael Jansen <kde@michael-jansen.biz>
0004    SPDX-FileCopyrightText: 1999-2001 Lubos Lunak <l.lunak@kde.org>
0005 
0006    SPDX-License-Identifier: LGPL-2.0-only
0007 */
0008 
0009 #include "conditions/conditions_list_base.h"
0010 
0011 #include <QString>
0012 
0013 class KConfigGroup;
0014 
0015 namespace KHotKeys
0016 {
0017 class ActionDataBase;
0018 
0019 /**
0020  * @author Michael Jansen <kde@michael-jansen.biz>
0021  */
0022 class Q_DECL_EXPORT Condition_list : public Condition_list_base
0023 {
0024     typedef Condition_list_base base;
0025 
0026 public:
0027     Condition_list(const QString &comment_P, ActionDataBase *parent = nullptr);
0028     Condition_list(KConfigGroup &cfg_P, ActionDataBase *data_P);
0029     void cfg_write(KConfigGroup &cfg_P) const override;
0030     Condition_list *copy() const override;
0031     bool match() const override;
0032     const QString &comment() const;
0033     void set_data(ActionDataBase *data_P);
0034     void updated() const override;
0035     const QString description() const override;
0036 
0037     void visit(ConditionsVisitor *visitor) override;
0038 
0039 private:
0040     QString _comment;
0041     ActionDataBase *data;
0042 };
0043 
0044 } // namespace KHotKeys
0045 
0046 #endif /* #ifndef CONDITIONS_LIST_H */