aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/simplecodestylepreferenceswidget.h
blob: 7ab490c3882b3e910db264282e9f721244c011f6 (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) 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 "texteditor_global.h"

#include <QWidget>

namespace TextEditor {

class TabSettings;
class TabSettingsWidget;
class ICodeStylePreferences;

namespace Ui { class TabPreferencesWidget; }

class TEXTEDITOR_EXPORT SimpleCodeStylePreferencesWidget : public QWidget
{
    Q_OBJECT

public:
    explicit SimpleCodeStylePreferencesWidget(QWidget *parent = nullptr);

    void setPreferences(ICodeStylePreferences *tabPreferences);

    TabSettingsWidget *tabSettingsWidget() const;

private:
    void slotCurrentPreferencesChanged(TextEditor::ICodeStylePreferences *preferences);
    void slotTabSettingsChanged(const TextEditor::TabSettings &settings);

    TabSettingsWidget *m_tabSettingsWidget;
    ICodeStylePreferences *m_preferences = nullptr;
};

} // namespace TextEditor