forked from qt-creator/qt-creator
QmlJSTools: inline .ui files
qmljscodestylesettingswidget.ui qmljscodestylesettingspage.ui Change-Id: I6d688e9e9b7cbefb552ef015f87d7a3cba21d699 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -8,8 +8,8 @@ add_qtc_plugin(QmlJSTools
|
|||||||
qmljscodestylepreferences.cpp qmljscodestylepreferences.h
|
qmljscodestylepreferences.cpp qmljscodestylepreferences.h
|
||||||
qmljscodestylepreferenceswidget.cpp qmljscodestylepreferenceswidget.h
|
qmljscodestylepreferenceswidget.cpp qmljscodestylepreferenceswidget.h
|
||||||
qmljscodestylesettings.cpp qmljscodestylesettings.h
|
qmljscodestylesettings.cpp qmljscodestylesettings.h
|
||||||
qmljscodestylesettingswidget.cpp qmljscodestylesettingswidget.h qmljscodestylesettingswidget.ui
|
qmljscodestylesettingswidget.cpp qmljscodestylesettingswidget.h
|
||||||
qmljscodestylesettingspage.cpp qmljscodestylesettingspage.h qmljscodestylesettingspage.ui
|
qmljscodestylesettingspage.cpp qmljscodestylesettingspage.h
|
||||||
qmljsfunctionfilter.cpp qmljsfunctionfilter.h
|
qmljsfunctionfilter.cpp qmljsfunctionfilter.h
|
||||||
qmljsindenter.cpp qmljsindenter.h
|
qmljsindenter.cpp qmljsindenter.h
|
||||||
qmljslocatordata.cpp qmljslocatordata.h
|
qmljslocatordata.cpp qmljslocatordata.h
|
||||||
|
@@ -59,8 +59,7 @@ TextEditor::CodeStyleEditorWidget *QmlJSCodeStylePreferencesFactory::createEdito
|
|||||||
auto qmlJSPreferences = qobject_cast<QmlJSCodeStylePreferences *>(preferences);
|
auto qmlJSPreferences = qobject_cast<QmlJSCodeStylePreferences *>(preferences);
|
||||||
if (!qmlJSPreferences)
|
if (!qmlJSPreferences)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
auto widget = new Internal::QmlJSCodeStylePreferencesWidget(parent);
|
auto widget = new Internal::QmlJSCodeStylePreferencesWidget(this, parent);
|
||||||
widget->layout()->setContentsMargins(0, 0, 0, 0);
|
|
||||||
widget->setPreferences(qmlJSPreferences);
|
widget->setPreferences(qmlJSPreferences);
|
||||||
return widget;
|
return widget;
|
||||||
}
|
}
|
||||||
|
@@ -4,11 +4,11 @@
|
|||||||
#include "qmljscodestylesettingspage.h"
|
#include "qmljscodestylesettingspage.h"
|
||||||
|
|
||||||
#include "qmljscodestylepreferences.h"
|
#include "qmljscodestylepreferences.h"
|
||||||
|
#include "qmljscodestylepreferenceswidget.h"
|
||||||
#include "qmljsindenter.h"
|
#include "qmljsindenter.h"
|
||||||
#include "qmljsqtstylecodeformatter.h"
|
#include "qmljsqtstylecodeformatter.h"
|
||||||
#include "qmljstoolsconstants.h"
|
#include "qmljstoolsconstants.h"
|
||||||
#include "qmljstoolssettings.h"
|
#include "qmljstoolssettings.h"
|
||||||
#include "ui_qmljscodestylesettingspage.h"
|
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
#include <extensionsystem/pluginmanager.h>
|
#include <extensionsystem/pluginmanager.h>
|
||||||
@@ -16,9 +16,12 @@
|
|||||||
#include <texteditor/codestyleeditor.h>
|
#include <texteditor/codestyleeditor.h>
|
||||||
#include <texteditor/displaysettings.h>
|
#include <texteditor/displaysettings.h>
|
||||||
#include <texteditor/fontsettings.h>
|
#include <texteditor/fontsettings.h>
|
||||||
|
#include <texteditor/simplecodestylepreferenceswidget.h>
|
||||||
|
#include <texteditor/snippets/snippeteditor.h>
|
||||||
#include <texteditor/snippets/snippetprovider.h>
|
#include <texteditor/snippets/snippetprovider.h>
|
||||||
#include <texteditor/tabsettings.h>
|
#include <texteditor/tabsettings.h>
|
||||||
#include <texteditor/texteditorsettings.h>
|
#include <texteditor/texteditorsettings.h>
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
|
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
@@ -29,13 +32,30 @@ namespace Internal {
|
|||||||
|
|
||||||
// ------------------ CppCodeStyleSettingsWidget
|
// ------------------ CppCodeStyleSettingsWidget
|
||||||
|
|
||||||
QmlJSCodeStylePreferencesWidget::QmlJSCodeStylePreferencesWidget(QWidget *parent) :
|
QmlJSCodeStylePreferencesWidget::QmlJSCodeStylePreferencesWidget(
|
||||||
TextEditor::CodeStyleEditorWidget(parent),
|
const TextEditor::ICodeStylePreferencesFactory *factory, QWidget *parent)
|
||||||
m_ui(new Ui::QmlJSCodeStyleSettingsPage)
|
: TextEditor::CodeStyleEditorWidget(parent)
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_tabPreferencesWidget = new SimpleCodeStylePreferencesWidget;
|
||||||
|
m_codeStylePreferencesWidget = new QmlJSTools::QmlJSCodeStylePreferencesWidget;
|
||||||
|
m_previewTextEdit = new SnippetEditorWidget;
|
||||||
|
m_previewTextEdit->setPlainText(factory->previewText());
|
||||||
|
QSizePolicy sp(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||||
|
sp.setHorizontalStretch(1);
|
||||||
|
m_previewTextEdit->setSizePolicy(sp);
|
||||||
|
|
||||||
decorateEditor(TextEditorSettings::fontSettings());
|
decorateEditor(TextEditorSettings::fontSettings());
|
||||||
|
|
||||||
|
using namespace Utils::Layouting;
|
||||||
|
Row {
|
||||||
|
Column {
|
||||||
|
m_tabPreferencesWidget,
|
||||||
|
m_codeStylePreferencesWidget,
|
||||||
|
st,
|
||||||
|
},
|
||||||
|
m_previewTextEdit,
|
||||||
|
}.attachTo(this, WithoutMargins);
|
||||||
|
|
||||||
connect(TextEditorSettings::instance(), &TextEditorSettings::fontSettingsChanged,
|
connect(TextEditorSettings::instance(), &TextEditorSettings::fontSettingsChanged,
|
||||||
this, &QmlJSCodeStylePreferencesWidget::decorateEditor);
|
this, &QmlJSCodeStylePreferencesWidget::decorateEditor);
|
||||||
|
|
||||||
@@ -44,16 +64,11 @@ QmlJSCodeStylePreferencesWidget::QmlJSCodeStylePreferencesWidget(QWidget *parent
|
|||||||
updatePreview();
|
updatePreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlJSCodeStylePreferencesWidget::~QmlJSCodeStylePreferencesWidget()
|
|
||||||
{
|
|
||||||
delete m_ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlJSCodeStylePreferencesWidget::setPreferences(QmlJSCodeStylePreferences *preferences)
|
void QmlJSCodeStylePreferencesWidget::setPreferences(QmlJSCodeStylePreferences *preferences)
|
||||||
{
|
{
|
||||||
m_preferences = preferences;
|
m_preferences = preferences;
|
||||||
m_ui->tabPreferencesWidget->setPreferences(preferences);
|
m_tabPreferencesWidget->setPreferences(preferences);
|
||||||
m_ui->codeStylePreferencesWidget->setPreferences(preferences);
|
m_codeStylePreferencesWidget->setPreferences(preferences);
|
||||||
if (m_preferences)
|
if (m_preferences)
|
||||||
{
|
{
|
||||||
connect(m_preferences, &ICodeStylePreferences::currentTabSettingsChanged,
|
connect(m_preferences, &ICodeStylePreferences::currentTabSettingsChanged,
|
||||||
@@ -66,16 +81,16 @@ void QmlJSCodeStylePreferencesWidget::setPreferences(QmlJSCodeStylePreferences *
|
|||||||
|
|
||||||
void QmlJSCodeStylePreferencesWidget::decorateEditor(const FontSettings &fontSettings)
|
void QmlJSCodeStylePreferencesWidget::decorateEditor(const FontSettings &fontSettings)
|
||||||
{
|
{
|
||||||
m_ui->previewTextEdit->textDocument()->setFontSettings(fontSettings);
|
m_previewTextEdit->textDocument()->setFontSettings(fontSettings);
|
||||||
SnippetProvider::decorateEditor(m_ui->previewTextEdit,
|
SnippetProvider::decorateEditor(m_previewTextEdit,
|
||||||
QmlJSEditor::Constants::QML_SNIPPETS_GROUP_ID);
|
QmlJSEditor::Constants::QML_SNIPPETS_GROUP_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSCodeStylePreferencesWidget::setVisualizeWhitespace(bool on)
|
void QmlJSCodeStylePreferencesWidget::setVisualizeWhitespace(bool on)
|
||||||
{
|
{
|
||||||
DisplaySettings displaySettings = m_ui->previewTextEdit->displaySettings();
|
DisplaySettings displaySettings = m_previewTextEdit->displaySettings();
|
||||||
displaySettings.m_visualizeWhitespace = on;
|
displaySettings.m_visualizeWhitespace = on;
|
||||||
m_ui->previewTextEdit->setDisplaySettings(displaySettings);
|
m_previewTextEdit->setDisplaySettings(displaySettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSCodeStylePreferencesWidget::slotSettingsChanged()
|
void QmlJSCodeStylePreferencesWidget::slotSettingsChanged()
|
||||||
@@ -85,20 +100,20 @@ void QmlJSCodeStylePreferencesWidget::slotSettingsChanged()
|
|||||||
|
|
||||||
void QmlJSCodeStylePreferencesWidget::updatePreview()
|
void QmlJSCodeStylePreferencesWidget::updatePreview()
|
||||||
{
|
{
|
||||||
QTextDocument *doc = m_ui->previewTextEdit->document();
|
QTextDocument *doc = m_previewTextEdit->document();
|
||||||
|
|
||||||
const TabSettings &ts = m_preferences
|
const TabSettings &ts = m_preferences
|
||||||
? m_preferences->currentTabSettings()
|
? m_preferences->currentTabSettings()
|
||||||
: TextEditorSettings::codeStyle()->tabSettings();
|
: TextEditorSettings::codeStyle()->tabSettings();
|
||||||
m_ui->previewTextEdit->textDocument()->setTabSettings(ts);
|
m_previewTextEdit->textDocument()->setTabSettings(ts);
|
||||||
CreatorCodeFormatter formatter(ts);
|
CreatorCodeFormatter formatter(ts);
|
||||||
formatter.invalidateCache(doc);
|
formatter.invalidateCache(doc);
|
||||||
|
|
||||||
QTextBlock block = doc->firstBlock();
|
QTextBlock block = doc->firstBlock();
|
||||||
QTextCursor tc = m_ui->previewTextEdit->textCursor();
|
QTextCursor tc = m_previewTextEdit->textCursor();
|
||||||
tc.beginEditBlock();
|
tc.beginEditBlock();
|
||||||
while (block.isValid()) {
|
while (block.isValid()) {
|
||||||
m_ui->previewTextEdit->textDocument()->indenter()->indentBlock(block, QChar::Null, ts);
|
m_previewTextEdit->textDocument()->indenter()->indentBlock(block, QChar::Null, ts);
|
||||||
block = block.next();
|
block = block.next();
|
||||||
}
|
}
|
||||||
tc.endEditBlock();
|
tc.endEditBlock();
|
||||||
|
@@ -16,23 +16,24 @@ QT_END_NAMESPACE
|
|||||||
namespace TextEditor {
|
namespace TextEditor {
|
||||||
class FontSettings;
|
class FontSettings;
|
||||||
class CodeStyleEditor;
|
class CodeStyleEditor;
|
||||||
|
class SimpleCodeStylePreferencesWidget;
|
||||||
|
class SnippetEditorWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace QmlJSTools {
|
namespace QmlJSTools {
|
||||||
class QmlJSCodeStylePreferences;
|
class QmlJSCodeStylePreferences;
|
||||||
|
class QmlJSCodeStylePreferencesWidget;
|
||||||
class QmlJSCodeStyleSettings;
|
class QmlJSCodeStyleSettings;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
namespace Ui { class QmlJSCodeStyleSettingsPage; }
|
|
||||||
|
|
||||||
class QmlJSCodeStylePreferencesWidget : public TextEditor::CodeStyleEditorWidget
|
class QmlJSCodeStylePreferencesWidget : public TextEditor::CodeStyleEditorWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit QmlJSCodeStylePreferencesWidget(QWidget *parent = nullptr);
|
explicit QmlJSCodeStylePreferencesWidget(const TextEditor::ICodeStylePreferencesFactory *factory,
|
||||||
~QmlJSCodeStylePreferencesWidget() override;
|
QWidget *parent = nullptr);
|
||||||
|
|
||||||
void setPreferences(QmlJSCodeStylePreferences* preferences);
|
void setPreferences(QmlJSCodeStylePreferences* preferences);
|
||||||
|
|
||||||
@@ -43,7 +44,9 @@ private:
|
|||||||
void updatePreview();
|
void updatePreview();
|
||||||
|
|
||||||
QmlJSCodeStylePreferences *m_preferences = nullptr;
|
QmlJSCodeStylePreferences *m_preferences = nullptr;
|
||||||
Ui::QmlJSCodeStyleSettingsPage *m_ui;
|
TextEditor::SimpleCodeStylePreferencesWidget *m_tabPreferencesWidget;
|
||||||
|
QmlJSTools::QmlJSCodeStylePreferencesWidget *m_codeStylePreferencesWidget;
|
||||||
|
TextEditor::SnippetEditorWidget *m_previewTextEdit;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,89 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>QmlJSTools::Internal::QmlJSCodeStyleSettingsPage</class>
|
|
||||||
<widget class="QWidget" name="QmlJSTools::Internal::QmlJSCodeStyleSettingsPage">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>138</width>
|
|
||||||
<height>112</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="TextEditor::SimpleCodeStylePreferencesWidget" name="tabPreferencesWidget" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>267</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" rowspan="3">
|
|
||||||
<widget class="TextEditor::SnippetEditorWidget" name="previewTextEdit">
|
|
||||||
<property name="plainText">
|
|
||||||
<string notr="true">import QtQuick 1.0
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
width: 360
|
|
||||||
height: 360
|
|
||||||
Text {
|
|
||||||
anchors.centerIn: parent
|
|
||||||
text: "Hello World"
|
|
||||||
}
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
onClicked: {
|
|
||||||
Qt.quit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QmlJSTools::QmlJSCodeStylePreferencesWidget" name="codeStylePreferencesWidget" native="true"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<customwidgets>
|
|
||||||
<customwidget>
|
|
||||||
<class>TextEditor::SimpleCodeStylePreferencesWidget</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header location="global">texteditor/simplecodestylepreferenceswidget.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>TextEditor::SnippetEditorWidget</class>
|
|
||||||
<extends>QPlainTextEdit</extends>
|
|
||||||
<header location="global">texteditor/snippets/snippeteditor.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>QmlJSTools::QmlJSCodeStylePreferencesWidget</class>
|
|
||||||
<extends>QWidget</extends>
|
|
||||||
<header location="global">qmljstools/qmljscodestylepreferenceswidget.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@@ -4,38 +4,46 @@
|
|||||||
#include "qmljscodestylesettingswidget.h"
|
#include "qmljscodestylesettingswidget.h"
|
||||||
|
|
||||||
#include "qmljscodestylesettings.h"
|
#include "qmljscodestylesettings.h"
|
||||||
#include "ui_qmljscodestylesettingswidget.h"
|
|
||||||
|
|
||||||
|
#include <utils/layoutbuilder.h>
|
||||||
|
|
||||||
|
#include <QSpinBox>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
namespace QmlJSTools {
|
namespace QmlJSTools {
|
||||||
|
|
||||||
QmlJSCodeStyleSettingsWidget::QmlJSCodeStyleSettingsWidget(QWidget *parent) :
|
QmlJSCodeStyleSettingsWidget::QmlJSCodeStyleSettingsWidget(QWidget *parent)
|
||||||
QGroupBox(parent),
|
: QWidget(parent)
|
||||||
ui(new Internal::Ui::QmlJSCodeStyleSettingsWidget)
|
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
m_lineLengthSpinBox = new QSpinBox;
|
||||||
|
m_lineLengthSpinBox->setMinimum(0);
|
||||||
|
m_lineLengthSpinBox->setMaximum(999);
|
||||||
|
|
||||||
connect(ui->lineLengthSpinBox, &QSpinBox::valueChanged,
|
using namespace Utils::Layouting;
|
||||||
|
Column {
|
||||||
|
Group {
|
||||||
|
title(tr("Qml JS Code Style")),
|
||||||
|
Form {
|
||||||
|
tr("&Line length:"), m_lineLengthSpinBox, br,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}.attachTo(this, WithoutMargins);
|
||||||
|
|
||||||
|
connect(m_lineLengthSpinBox, &QSpinBox::valueChanged,
|
||||||
this, &QmlJSCodeStyleSettingsWidget::slotSettingsChanged);
|
this, &QmlJSCodeStyleSettingsWidget::slotSettingsChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlJSCodeStyleSettingsWidget::~QmlJSCodeStyleSettingsWidget()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmlJSCodeStyleSettingsWidget::setCodeStyleSettings(const QmlJSCodeStyleSettings& s)
|
void QmlJSCodeStyleSettingsWidget::setCodeStyleSettings(const QmlJSCodeStyleSettings& s)
|
||||||
{
|
{
|
||||||
QSignalBlocker blocker(this);
|
QSignalBlocker blocker(this);
|
||||||
ui->lineLengthSpinBox->setValue(s.lineLength);
|
m_lineLengthSpinBox->setValue(s.lineLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
QmlJSCodeStyleSettings QmlJSCodeStyleSettingsWidget::codeStyleSettings() const
|
QmlJSCodeStyleSettings QmlJSCodeStyleSettingsWidget::codeStyleSettings() const
|
||||||
{
|
{
|
||||||
QmlJSCodeStyleSettings set;
|
QmlJSCodeStyleSettings set;
|
||||||
|
|
||||||
set.lineLength = ui->lineLengthSpinBox->value();
|
set.lineLength = m_lineLengthSpinBox->value();
|
||||||
|
|
||||||
return set;
|
return set;
|
||||||
}
|
}
|
||||||
|
@@ -7,13 +7,14 @@
|
|||||||
|
|
||||||
#include <QGroupBox>
|
#include <QGroupBox>
|
||||||
|
|
||||||
|
QT_BEGIN_NAMESPACE
|
||||||
|
class QSpinBox;
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace QmlJSTools {
|
namespace QmlJSTools {
|
||||||
class QmlJSCodeStyleSettings;
|
class QmlJSCodeStyleSettings;
|
||||||
|
|
||||||
namespace Internal { namespace Ui { class QmlJSCodeStyleSettingsWidget; } }
|
class QMLJSTOOLS_EXPORT QmlJSCodeStyleSettingsWidget : public QWidget
|
||||||
|
|
||||||
|
|
||||||
class QMLJSTOOLS_EXPORT QmlJSCodeStyleSettingsWidget : public QGroupBox
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -24,7 +25,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
explicit QmlJSCodeStyleSettingsWidget(QWidget *parent = nullptr);
|
explicit QmlJSCodeStyleSettingsWidget(QWidget *parent = nullptr);
|
||||||
~QmlJSCodeStyleSettingsWidget() override;
|
|
||||||
|
|
||||||
QmlJSCodeStyleSettings codeStyleSettings() const;
|
QmlJSCodeStyleSettings codeStyleSettings() const;
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ private:
|
|||||||
void slotSettingsChanged();
|
void slotSettingsChanged();
|
||||||
void codingStyleLinkActivated(const QString &linkString);
|
void codingStyleLinkActivated(const QString &linkString);
|
||||||
|
|
||||||
Internal::Ui::QmlJSCodeStyleSettingsWidget *ui;
|
QSpinBox *m_lineLengthSpinBox;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace QmlJSTools
|
} // namespace QmlJSTools
|
||||||
|
@@ -1,76 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>QmlJSTools::Internal::QmlJSCodeStyleSettingsWidget</class>
|
|
||||||
<widget class="QGroupBox" name="QmlJSTools::Internal::QmlJSCodeStyleSettingsWidget">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>254</width>
|
|
||||||
<height>203</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Qml JS Code Style</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="lineLengthLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>&Line length:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>lineLengthSpinBox</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QSpinBox" name="lineLengthSpinBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimum">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>999</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<tabstops>
|
|
||||||
<tabstop>lineLengthSpinBox</tabstop>
|
|
||||||
</tabstops>
|
|
||||||
<resources/>
|
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
@@ -29,10 +29,8 @@ QtcPlugin {
|
|||||||
"qmljscodestylesettings.h",
|
"qmljscodestylesettings.h",
|
||||||
"qmljscodestylesettingspage.cpp",
|
"qmljscodestylesettingspage.cpp",
|
||||||
"qmljscodestylesettingspage.h",
|
"qmljscodestylesettingspage.h",
|
||||||
"qmljscodestylesettingspage.ui",
|
|
||||||
"qmljscodestylesettingswidget.cpp",
|
"qmljscodestylesettingswidget.cpp",
|
||||||
"qmljscodestylesettingswidget.h",
|
"qmljscodestylesettingswidget.h",
|
||||||
"qmljscodestylesettingswidget.ui",
|
|
||||||
"qmljsfunctionfilter.cpp",
|
"qmljsfunctionfilter.cpp",
|
||||||
"qmljsfunctionfilter.h",
|
"qmljsfunctionfilter.h",
|
||||||
"qmljsindenter.cpp",
|
"qmljsindenter.cpp",
|
||||||
|
Reference in New Issue
Block a user