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