summaryrefslogtreecommitdiff
path: root/src/plugins/autotest/testsettings.h
blob: b4aec87f49dd750859457ac02e4c9778434e8322 (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
41
42
43
44
45
46
47
48
49
50
51
52
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include <utils/aspects.h>

namespace Autotest::Internal {

enum class RunAfterBuildMode
{
    None,
    All,
    Selected
};

class NonAspectSettings
{
public:
    QHash<Utils::Id, bool> frameworks;
    QHash<Utils::Id, bool> frameworksGrouping;
    QHash<Utils::Id, bool> tools;
};

class TestSettings : public Utils::AspectContainer, public NonAspectSettings
{
public:
    TestSettings();

    static TestSettings *instance();

    void toSettings(QSettings *s) const;
    void fromSettings(QSettings *s);

    Utils::IntegerAspect timeout;
    Utils::BoolAspect omitInternalMsg;
    Utils::BoolAspect omitRunConfigWarn;
    Utils::BoolAspect limitResultOutput;
    Utils::BoolAspect limitResultDescription;
    Utils::IntegerAspect resultDescriptionMaxSize;
    Utils::BoolAspect autoScroll;
    Utils::BoolAspect processArgs;
    Utils::BoolAspect displayApplication;
    Utils::BoolAspect popupOnStart;
    Utils::BoolAspect popupOnFinish;
    Utils::BoolAspect popupOnFail;
    Utils::SelectionAspect runAfterBuild;

    RunAfterBuildMode runAfterBuildMode() const;
};

} // Autotest::Internal