2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2022-04-02 12:15:26 +02:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "qmljstools_global.h"
|
|
|
|
|
|
2023-08-23 16:53:06 +02:00
|
|
|
#include <utils/store.h>
|
2022-04-02 12:15:26 +02:00
|
|
|
|
2022-08-26 10:30:00 +02:00
|
|
|
#include <optional>
|
|
|
|
|
|
2022-04-02 12:15:26 +02:00
|
|
|
namespace TextEditor { class TabSettings; }
|
|
|
|
|
|
|
|
|
|
namespace QmlJSTools {
|
|
|
|
|
|
|
|
|
|
class QMLJSTOOLS_EXPORT QmlJSCodeStyleSettings
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
QmlJSCodeStyleSettings();
|
|
|
|
|
|
|
|
|
|
int lineLength = 80;
|
|
|
|
|
|
2023-08-23 16:53:06 +02:00
|
|
|
Utils::Store toMap() const;
|
|
|
|
|
void fromMap(const Utils::Store &map);
|
2022-04-02 12:15:26 +02:00
|
|
|
|
|
|
|
|
bool equals(const QmlJSCodeStyleSettings &rhs) const;
|
|
|
|
|
bool operator==(const QmlJSCodeStyleSettings &s) const { return equals(s); }
|
|
|
|
|
bool operator!=(const QmlJSCodeStyleSettings &s) const { return !equals(s); }
|
|
|
|
|
|
|
|
|
|
static QmlJSCodeStyleSettings currentGlobalCodeStyle();
|
|
|
|
|
static TextEditor::TabSettings currentGlobalTabSettings();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace CppEditor
|
|
|
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(QmlJSTools::QmlJSCodeStyleSettings)
|