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_maxColumnWidthSetting = QLatin1String("MaxColumnWidth");
29 static const inline QLatin1StringView s_normalizeSetting = QLatin1String("NormalizeOrder");
30 static const inline QLatin1StringView s_newlineSetting = QLatin1String("NewlineType");
31 static const inline QLatin1StringView s_objectsSpacingSetting = QLatin1String("ObjectsSpacing");
32 static const inline QLatin1StringView s_functionsSpacingSetting = QLatin1String("FunctionsSpacing");
33 static const inline QLatin1StringView s_sortImportsSetting = QLatin1String("SortImports");
34};
35
36QT_END_NAMESPACE
37#endif // QQMLFORMATSETTINGS_P_H
void setArguments(const QStringList &newArguments)
void setTabsEnabled(bool tabs)
bool isMaxColumnWidthSet() const
QStringList errors() const
static QQmlFormatOptions buildCommandLineOptions(const QStringList &args)
void setNewline(const QQmlFormatOptionLineEndings &endings)
void setNormalizeEnabled(bool normalize)
QQmlJS::Dom::LineWriterOptions optionsForCode(const QString &code) const
bool objectsSpacing() const
void setMaxColumnWidth(int width)
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 setSortImports(bool sort)
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 setIsInplace(bool newInplace)
bool functionsSpacing() const
void setWriteDefaultSettingsEnabled(bool newWriteDefaultSettings)
void setFiles(const QStringList &newFiles)
void addError(const QString &newError)
QQmlFormatOptions optionsForFile(const QString &fileName, QQmlFormatSettings *settings) const
QQmlFormatOptionLineEndings newline() const