From 0ffc029d70f048d05fedcbf047acc84313304317 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 13 Feb 2020 13:11:07 +0100 Subject: [PATCH] QmlDesigner: Rename resources to assets in the ui Task-number: QDS-1646 Change-Id: I8937f70adc3ad59f28d40f99852f2be053ce6c3b Reviewed-by: Leena Miettinen Reviewed-by: Tim Jenssen --- .../creator-only/creator-mobile-app-tutorial.qdoc | 10 +++++----- .../src/qtquick/creator-only/qtquick-app-tutorial.qdoc | 4 ++-- doc/qtcreator/src/qtquick/qtquick-components.qdoc | 4 ++-- doc/qtdesignstudio/src/qtdesignstudio-fonts.qdoc | 4 ++-- .../src/qtdesignstudio-importing-designs.qdoc | 10 +++++----- doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc | 2 +- .../qtdesignstudio-3d-design-mode.qdoc | 4 ++-- .../src/qtquick3d-editor/qtdesignstudio-3d.qdoc | 4 ++-- .../components/itemlibrary/itemlibrarywidget.cpp | 8 ++++---- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc b/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc index 6b09066b873..7165df0c4c6 100644 --- a/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc +++ b/doc/qtcreator/src/qtquick/creator-only/creator-mobile-app-tutorial.qdoc @@ -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. diff --git a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc index 0d93f62c9ff..5c6c8fe73d4 100644 --- a/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc +++ b/doc/qtcreator/src/qtquick/creator-only/qtquick-app-tutorial.qdoc @@ -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" diff --git a/doc/qtcreator/src/qtquick/qtquick-components.qdoc b/doc/qtcreator/src/qtquick/qtquick-components.qdoc index c21bbe559da..475a8928b53 100644 --- a/doc/qtcreator/src/qtquick/qtquick-components.qdoc +++ b/doc/qtcreator/src/qtquick/qtquick-components.qdoc @@ -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 diff --git a/doc/qtdesignstudio/src/qtdesignstudio-fonts.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-fonts.qdoc index 1ceef949d76..39073a2d531 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-fonts.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-fonts.qdoc @@ -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. diff --git a/doc/qtdesignstudio/src/qtdesignstudio-importing-designs.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-importing-designs.qdoc index ee7f2250f9a..ce53ae2ccd0 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-importing-designs.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-importing-designs.qdoc @@ -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. diff --git a/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc b/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc index 570f2c8eb01..54ff29935f1 100644 --- a/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc +++ b/doc/qtdesignstudio/src/qtdesignstudio-projects.qdoc @@ -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 diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-design-mode.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-design-mode.qdoc index e214c544f25..da2964d5ba3 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-design-mode.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d-design-mode.qdoc @@ -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 diff --git a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d.qdoc b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d.qdoc index 0256759f859..03f3085ad60 100644 --- a/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d.qdoc +++ b/doc/qtdesignstudio/src/qtquick3d-editor/qtdesignstudio-3d.qdoc @@ -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 diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index 10464f77fe8..445d342d7fd 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -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(";;"));