aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/todo/settings.h
blob: 534b1a1b0cad17317c9b3e877209e42fd8cbd3c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (C) 2016 Dmitry Savchenko
// Copyright (C) 2016 Vasiliy Sorokin
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "keyword.h"

namespace Utils { class QtcSettings; }

namespace Todo {
namespace Internal {

enum ScanningScope {
    ScanningScopeCurrentFile,
    ScanningScopeProject,
    ScanningScopeSubProject,
    ScanningScopeMax
};

class Settings
{
public:
    KeywordList keywords;
    ScanningScope scanningScope = ScanningScopeCurrentFile;
    bool keywordsEdited = false;

    void save(Utils::QtcSettings *settings) const;
    void load(Utils::QtcSettings *settings);
    void setDefault();
    bool equals(const Settings &other) const;
};

bool operator ==(const Settings &s1, const Settings &s2);
bool operator !=(const Settings &s1, const Settings &s2);

} // namespace Internal
} // namespace Todo

Q_DECLARE_METATYPE(Todo::Internal::ScanningScope)