Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmlformatsettings_p.h
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLFORMATSETTINGS_P_H
5#define QQMLFORMATSETTINGS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQmlToolingSettings/private/qqmltoolingsettings_p.h>
19
20QT_BEGIN_NAMESPACE
21
22class QQmlFormatSettings : public QQmlToolingSettings
23{
24public:
25 QQmlFormatSettings(const QString &toolName = QLatin1String("qmlformat"));
26 static const inline QLatin1StringView s_useTabsSetting = QLatin1String("UseTabs");
27 static const inline QLatin1StringView s_indentWidthSetting = QLatin1String("IndentWidth");
28 static const inline QLatin1StringView s_normalizeSetting = QLatin1String("NormalizeOrder");
29 static const inline QLatin1StringView s_newlineSetting = QLatin1String("NewlineType");
30 static const inline QLatin1StringView s_objectsSpacingSetting = QLatin1String("ObjectsSpacing");
31 static const inline QLatin1StringView s_functionsSpacingSetting = QLatin1String("FunctionsSpacing");
32};
33
35#endif // QQMLFORMATSETTINGS_P_H
void setArguments(const QStringList &newArguments)
void setTabsEnabled(bool tabs)
QStringList errors() const
void setNewline(const QQmlFormatOptionLineEndings &endings)
void setNormalizeEnabled(bool normalize)
QQmlJS::Dom::LineWriterOptions optionsForCode(const QString &code) const
bool objectsSpacing() const
QStringList files() const
static LineEndings detectLineEndings(const QString &code)
void applySettings(const QQmlFormatSettings &settings)
void setIndentWidthSet(bool newIndentWidthSet)
static LineEndings lineEndings(QQmlFormatOptionLineEndings endings, const QString &code)
void setForceEnabled(bool newForce)
static QQmlFormatOptionLineEndings parseEndings(const QString &endings)
void setIgnoreSettingsEnabled(bool newIgnoreSettings)
void setIsVerbose(bool newVerbose)
void setFunctionsSpacing(bool spacing)
void setIndentWidth(int width)
bool writeDefaultSettingsEnabled() const
QStringList arguments() const
bool normalizeEnabled() const
void setObjectsSpacing(bool spacing)
bool ignoreSettingsEnabled() const
void setIsValid(bool newValid)
void setIsInplace(bool newInplace)
bool functionsSpacing() const
void setWriteDefaultSettingsEnabled(bool newWriteDefaultSettings)
void setFiles(const QStringList &newFiles)
void addError(const QString &newError)
QQmlFormatOptionLineEndings newline() const
Combined button and popup list for selecting options.
QQmlFormatOptionLineEndings