forked from qt-creator/qt-creator
QmlDesigner: Rename resources to assets in the ui
Task-number: QDS-1646 Change-Id: I8937f70adc3ad59f28d40f99852f2be053ce6c3b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
|
||||
To use \e {Bluebubble.svg} in your project,
|
||||
copy it to the project directory (same subdirectory as the QML file).
|
||||
The image appears in \uicontrol Resources. You can also use any other
|
||||
The image appears in \uicontrol Assets. You can also use any other
|
||||
image or a QML type, instead.
|
||||
|
||||
To create the UI in the Design mode:
|
||||
@@ -106,7 +106,7 @@
|
||||
|
||||
\endlist
|
||||
|
||||
\li In \uicontrol Library > \uicontrol Resources, select Bluebubble.svg
|
||||
\li In \uicontrol Library > \uicontrol Assets, select Bluebubble.svg
|
||||
and drag and drop it to \e mainWindow in the navigator.
|
||||
|
||||
\li In the \uicontrol Properties pane, \uicontrol Id field, enter
|
||||
@@ -257,15 +257,15 @@
|
||||
After adding the dependencies, select \uicontrol Build > \uicontrol {Run qmake} to apply
|
||||
the changes to the Makefile of the project.
|
||||
|
||||
\section1 Adding Resources
|
||||
\section1 Adding Assets
|
||||
|
||||
You need to add the Bluebubble.svg image file to the application resources
|
||||
You need to add the Bluebubble.svg image file to the application assets
|
||||
for deployment to mobile devices:
|
||||
|
||||
\list 1
|
||||
|
||||
\li In the \uicontrol Projects view, double-click the qml.qrc file to open it
|
||||
in the resource editor.
|
||||
in the assets editor.
|
||||
|
||||
\li Select \uicontrol Add to add Bluebubble.svg.
|
||||
|
||||
|
@@ -62,7 +62,7 @@
|
||||
|
||||
To use the \e qt-logo.png image in your application, you must copy it from
|
||||
the Qt examples directory to the project directory (same subdirectory as
|
||||
the QML file). The image appears in \uicontrol Resources. You can also use
|
||||
the QML file). The image appears in \uicontrol Assets. You can also use
|
||||
any other image or a QML type, instead.
|
||||
|
||||
\list 1
|
||||
@@ -78,7 +78,7 @@
|
||||
\li Select \uicontrol Page in the navigator, and enter \e page in the
|
||||
\uicontrol Id field.
|
||||
|
||||
\li In \uicontrol Library > \uicontrol Resources, select qt-logo.png and
|
||||
\li In \uicontrol Library > \uicontrol Assets, select qt-logo.png and
|
||||
drag and drop it to the \e page in the navigator.
|
||||
|
||||
\image qmldesigner-tutorial-user-icon.png "Image properties"
|
||||
|
@@ -48,7 +48,7 @@
|
||||
applications.
|
||||
|
||||
The \uicontrol {Library} pane lists the available QML types, UI
|
||||
components, resources, and imports.
|
||||
components, assets, and imports.
|
||||
|
||||
\image qmldesigner-qml-components.png "QML Components"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
the import statements automatically. You can remove import statements in
|
||||
\uicontrol Imports
|
||||
|
||||
\uicontrol {Resources} displays the images and other files that you copy
|
||||
\uicontrol {Assets} displays the images and other files that you copy
|
||||
to the project folder (to the same subfolder as the QML files).
|
||||
|
||||
\section1 Adding Components to Designs
|
||||
|
@@ -42,8 +42,8 @@
|
||||
To add fonts:
|
||||
|
||||
\list 1
|
||||
\li Select \uicontrol Library > \uicontrol Resources >
|
||||
\uicontrol {Add New Resources}.
|
||||
\li Select \uicontrol Library > \uicontrol Assets >
|
||||
\uicontrol {Add New Assets}.
|
||||
\li Browse to the folder that contains the font files and select them.
|
||||
\li Enter the name of the directory to save the fonts. By default, \QDS
|
||||
suggests the project directory.
|
||||
|
@@ -77,8 +77,8 @@
|
||||
instructions of the wizard to create an empty project.
|
||||
\li In \uicontrol Projects, double-click \e Screen01.ui.qml to move to
|
||||
the Design mode.
|
||||
\li Select \uicontrol Library > \uicontrol Resources >
|
||||
\uicontrol {Add New Resources}.
|
||||
\li Select \uicontrol Library > \uicontrol Assets >
|
||||
\uicontrol {Add New Assets}.
|
||||
\li Select the folder where you exported the assets.
|
||||
\li Select \uicontrol {Exported Assets (*.metadata)} in the dropdown
|
||||
menu to filter \e .metadata files.
|
||||
@@ -106,7 +106,7 @@
|
||||
might take a little while for complex projects.
|
||||
\endlist
|
||||
|
||||
The imported assets are displayed in the \uicontrol Resources tab in the
|
||||
The imported assets are displayed in the \uicontrol Assets tab in the
|
||||
\uicontrol Library as PNG images. The components that you specified in
|
||||
the design tool are displayed in the \uicontrol {My QML Components} tab,
|
||||
as well as in the \uicontrol Project tab of the \uicontrol Navigator as
|
||||
@@ -161,8 +161,8 @@
|
||||
To import 3D assets to \QDS projects:
|
||||
|
||||
\list 1
|
||||
\li In the Design mode, select \uicontrol Library > \uicontrol Resources
|
||||
> \uicontrol {Add New Resources}.
|
||||
\li In the Design mode, select \uicontrol Library > \uicontrol Assets
|
||||
> \uicontrol {Add New Assets}.
|
||||
\li Select \uicontrol {3D Assets} in the dropdown menu to filter 3D
|
||||
graphics files.
|
||||
\li Select a file to import, and then select \uicontrol Open.
|
||||
|
@@ -36,7 +36,7 @@
|
||||
|
||||
\list
|
||||
\li Group files together
|
||||
\li Include forms and resource files
|
||||
\li Include forms and assets files
|
||||
\li Specify settings for previewing UIs
|
||||
\endlist
|
||||
|
||||
|
@@ -32,7 +32,7 @@
|
||||
\title Editing 3D Assets in Design Mode
|
||||
|
||||
\QDS opens QML files that contain 3D scenes in the Design mode and the
|
||||
scenes in the 3D editor. You can add imported 3D assets as resources
|
||||
scenes in the 3D editor. You can add imported 3D assets
|
||||
to projects and edit them to create scenes and states, as well as the
|
||||
transitions between them.
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
\li \uicontrol {Library} (3) displays the building blocks that you
|
||||
can use to create scenes: predefined Qt Quick 3D Components,
|
||||
Qt Quick Controls, your own 3D assets that you import to the
|
||||
project, and other resources. For more information, see
|
||||
project, and other assets. For more information, see
|
||||
\l {Adding 3D Views}.
|
||||
\li \uicontrol {Navigator} (4) displays the items in the current QML
|
||||
file as a tree structure. For more information, see
|
||||
|
@@ -48,8 +48,8 @@
|
||||
\li \l {Editing 3D Assets in Design Mode}
|
||||
|
||||
\QDS opens QML files that contain 3D scenes in the Design mode and
|
||||
the scenes in the 3D editor. You can add imported 3D assets as
|
||||
resources to projects as 3D components.
|
||||
the scenes in the 3D editor. You can add imported 3D assets
|
||||
to projects as 3D components.
|
||||
\li \l {Working in the 3D Editor}
|
||||
|
||||
You can select 3D components in the 3D editor to move, rotate, and
|
||||
|
@@ -120,7 +120,7 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
|
||||
/* other widgets */
|
||||
auto tabBar = new QTabBar(this);
|
||||
tabBar->addTab(tr("QML Types", "Title of library QML types view"));
|
||||
tabBar->addTab(tr("Resources", "Title of library resources view"));
|
||||
tabBar->addTab(tr("Assets", "Title of library assets view"));
|
||||
tabBar->addTab(tr("Imports", "Title of library imports view"));
|
||||
tabBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
connect(tabBar, &QTabBar::currentChanged, this, &ItemLibraryWidget::setCurrentIndexOfStackedWidget);
|
||||
@@ -184,8 +184,8 @@ ItemLibraryWidget::ItemLibraryWidget(QWidget *parent) :
|
||||
font.setPixelSize(Theme::instance()->smallFontPixelSize());
|
||||
button->setFont(font);
|
||||
button->setIcon(Utils::Icons::PLUS.icon());
|
||||
button->setText(tr("Add New Resources..."));
|
||||
button->setToolTip(tr("Add new resources to project."));
|
||||
button->setText(tr("Add New Assets..."));
|
||||
button->setToolTip(tr("Add new assets to project."));
|
||||
button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
flowLayout->addWidget(button);
|
||||
connect(button, &QToolButton::clicked, this, &ItemLibraryWidget::addResources);
|
||||
@@ -511,7 +511,7 @@ void ItemLibraryWidget::addResources()
|
||||
const QString currentDir = lastDir.isEmpty() ? document->fileName().parentDir().toString() : lastDir;
|
||||
|
||||
const auto fileNames = QFileDialog::getOpenFileNames(Core::ICore::mainWindow(),
|
||||
tr("Add Resources"),
|
||||
tr("Add Assets"),
|
||||
currentDir,
|
||||
filters.join(";;"));
|
||||
|
||||
|
Reference in New Issue
Block a user