aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/perfprofiler/perfsettings.h
blob: 7c10706098bef4641f0e74f90285f47066e24451 (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
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#pragma once

#include "perfprofiler_global.h"

#include <projectexplorer/runconfiguration.h>

#include <QObject>

namespace PerfProfiler {

class PERFPROFILER_EXPORT PerfSettings final : public ProjectExplorer::ISettingsAspect
{
    Q_OBJECT

public:
    explicit PerfSettings(ProjectExplorer::Target *target = nullptr);
    ~PerfSettings() final;

    void readGlobalSettings();
    void writeGlobalSettings() const;

    void addPerfRecordArguments(Utils::CommandLine *cmd) const;

    void resetToDefault();

    Utils::IntegerAspect period{this};
    Utils::IntegerAspect stackSize{this};
    Utils::SelectionAspect sampleMode{this};
    Utils::SelectionAspect callgraphMode{this};
    Utils::StringListAspect events{this};
    Utils::StringAspect extraArguments{this};
};

} // namespace PerfProfiler