aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/behaviorsettings.h
blob: 97835b3a23d5e150e3de8e34ed8a06aa7ff8a6e6 (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 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 <utils/store.h>

namespace TextEditor {

/**
 * Settings that describe how the text editor behaves. This does not include
 * the TabSettings and StorageSettings.
 */
class TEXTEDITOR_EXPORT BehaviorSettings
{
public:
    BehaviorSettings();

    Utils::Store toMap() const;
    void fromMap(const Utils::Store &map);

    bool equals(const BehaviorSettings &bs) const;

    bool m_mouseHiding;
    bool m_mouseNavigation;
    bool m_scrollWheelZooming;
    bool m_constrainHoverTooltips;
    bool m_camelCaseNavigation;
    bool m_keyboardTooltips;
    bool m_smartSelectionChanging;
};

void setupBehaviorSettings();
void updateGlobalBehaviorSettings(const BehaviorSettings &newBehaviorSettings);

TEXTEDITOR_EXPORT BehaviorSettings &globalBehaviorSettings();

} // namespace TextEditor