aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/projectsettingswidget.h
blob: 3d6f8a902065d106eff529433d1f1168466fc2fd (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
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#pragma once

#include "projectexplorer_export.h"

#include <utils/id.h>

#include <QWidget>

namespace ProjectExplorer {

class PROJECTEXPLORER_EXPORT ProjectSettingsWidget : public QWidget
{
    Q_OBJECT
public:
    explicit ProjectSettingsWidget(QWidget *parent = nullptr);

    void setUseGlobalSettings(bool useGlobalSettings);
    bool useGlobalSettings() const;

    void setUseGlobalSettingsCheckBoxEnabled(bool enadled);
    bool isUseGlobalSettingsCheckBoxEnabled() const;

    bool isUseGlobalSettingsCheckBoxVisible() const;
    bool isUseGlobalSettingsLabelVisible() const;
    Utils::Id globalSettingsId() const;

protected:
    void setUseGlobalSettingsCheckBoxVisible(bool visible);
    void setUseGlobalSettingsLabelVisible(bool visible);
    void setGlobalSettingsId(Utils::Id globalId);

signals:
    void useGlobalSettingsChanged(bool useGlobalSettings);
    void useGlobalSettingsCheckBoxEnabledChanged(bool enadled);

private:
    bool m_useGlobalSettings = true;
    bool m_useGlobalSettingsCheckBoxEnabled = true;
    bool m_useGlobalSettingsCheckBoxVisibleVisible = true;
    bool m_useGlobalSettingsLabelVisibleVisible = true;
    Utils::Id m_globalSettingsId;
};

} // namespace ProjectExplorer