summaryrefslogtreecommitdiffstats
path: root/src/Authoring/Studio/Palettes/Inspector
diff options
context:
space:
mode:
Diffstat (limited to 'src/Authoring/Studio/Palettes/Inspector')
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp12
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/FileChooserView.cpp12
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/ImageChooserView.cpp12
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp23
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/MeshChooserView.cpp12
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/ObjectBrowserView.cpp13
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/ObjectListModel.cpp2
-rw-r--r--src/Authoring/Studio/Palettes/Inspector/TextureChooserView.cpp10
8 files changed, 50 insertions, 46 deletions
diff --git a/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp b/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp
index 1457a3c1..3f5583ea 100644
--- a/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/ChooserModelBase.cpp
@@ -83,10 +83,12 @@ QVariant ChooserModelBase::data(const QModelIndex &index, int role) const
switch (role) {
case Qt::DecorationRole:
- if (!item.iconSource.isEmpty())
- return resourceImageUrl() + item.iconSource;
- else
- return resourceImageUrl() + CStudioObjectTypes::GetNormalIconName(item.iconType);
+ if (!item.iconSource.isEmpty()) {
+ return StudioUtils::resourceImageUrl() + item.iconSource;
+ } else {
+ return StudioUtils::resourceImageUrl()
+ + CStudioObjectTypes::GetNormalIconName(item.iconType);
+ }
case IsExpandableRole:
return false;
@@ -112,7 +114,7 @@ QVariant ChooserModelBase::data(const QModelIndex &index, int role) const
switch (role) {
case Qt::DecorationRole: {
QString path = item.index.data(QFileSystemModel::FilePathRole).toString();
- return resourceImageUrl() + getIconName(path);
+ return StudioUtils::resourceImageUrl() + getIconName(path);
}
case IsExpandableRole: {
diff --git a/src/Authoring/Studio/Palettes/Inspector/FileChooserView.cpp b/src/Authoring/Studio/Palettes/Inspector/FileChooserView.cpp
index a2d285bf..ab211068 100644
--- a/src/Authoring/Studio/Palettes/Inspector/FileChooserView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/FileChooserView.cpp
@@ -55,12 +55,12 @@ FileChooserView::FileChooserView(QWidget *parent)
void FileChooserView::initialize()
{
CStudioPreferences::setQmlContextProperties(rootContext());
- rootContext()->setContextProperty("_resDir"_L1,
- resourceImageUrl());
- rootContext()->setContextProperty("_fileChooserView"_L1, this);
- rootContext()->setContextProperty("_fileChooserModel"_L1, m_model);
- engine()->addImportPath(qmlImportPath());
- setSource(QUrl("qrc:/Palettes/Inspector/FileChooser.qml"_L1));
+ rootContext()->setContextProperty(QStringLiteral("_resDir"),
+ StudioUtils::resourceImageUrl());
+ rootContext()->setContextProperty(QStringLiteral("_fileChooserView"), this);
+ rootContext()->setContextProperty(QStringLiteral("_fileChooserModel"), m_model);
+ engine()->addImportPath(StudioUtils::qmlImportPath());
+ setSource(QUrl(QStringLiteral("qrc:/Palettes/Inspector/FileChooser.qml")));
}
QSize FileChooserView::sizeHint() const
diff --git a/src/Authoring/Studio/Palettes/Inspector/ImageChooserView.cpp b/src/Authoring/Studio/Palettes/Inspector/ImageChooserView.cpp
index 2863ae5f..b05a77ba 100644
--- a/src/Authoring/Studio/Palettes/Inspector/ImageChooserView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/ImageChooserView.cpp
@@ -56,12 +56,12 @@ ImageChooserView::ImageChooserView(QWidget *parent)
void ImageChooserView::initialize()
{
CStudioPreferences::setQmlContextProperties(rootContext());
- rootContext()->setContextProperty("_resDir"_L1,
- resourceImageUrl());
- rootContext()->setContextProperty("_imageChooserView"_L1, this);
- rootContext()->setContextProperty("_imageChooserModel"_L1, m_model);
- engine()->addImportPath(qmlImportPath());
- setSource(QUrl("qrc:/Palettes/Inspector/ImageChooser.qml"_L1));
+ rootContext()->setContextProperty(QStringLiteral("_resDir"),
+ StudioUtils::resourceImageUrl());
+ rootContext()->setContextProperty(QStringLiteral("_imageChooserView"), this);
+ rootContext()->setContextProperty(QStringLiteral("_imageChooserModel"), m_model);
+ engine()->addImportPath(StudioUtils::qmlImportPath());
+ setSource(QUrl(QStringLiteral("qrc:/Palettes/Inspector/ImageChooser.qml")));
}
QSize ImageChooserView::sizeHint() const
diff --git a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
index bf077a4e..abde42ea 100644
--- a/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/InspectorControlView.cpp
@@ -217,19 +217,20 @@ void InspectorControlView::mousePressEvent(QMouseEvent *event)
void InspectorControlView::initialize()
{
CStudioPreferences::setQmlContextProperties(rootContext());
- rootContext()->setContextProperty("_parentView"_L1, this);
- rootContext()->setContextProperty("_inspectorModel"_L1, m_inspectorControlModel);
- rootContext()->setContextProperty("_resDir"_L1, resourceImageUrl());
- rootContext()->setContextProperty("_tabOrderHandler"_L1, tabOrderHandler());
- rootContext()->setContextProperty("_mouseHelper"_L1, &m_mouseHelper);
-
- qmlRegisterUncreatableType<qt3dsdm::DataModelDataType>("Qt3DStudio", 1, 0, "DataModelDataType",
- "DataModelDataType is an enum container");
+ rootContext()->setContextProperty(QStringLiteral("_parentView"), this);
+ rootContext()->setContextProperty(QStringLiteral("_inspectorModel"), m_inspectorControlModel);
+ rootContext()->setContextProperty(QStringLiteral("_resDir"), StudioUtils::resourceImageUrl());
+ rootContext()->setContextProperty(QStringLiteral("_tabOrderHandler"), tabOrderHandler());
+ rootContext()->setContextProperty(QStringLiteral("_mouseHelper"), &m_mouseHelper);
+
+ qmlRegisterUncreatableType<qt3dsdm::DataModelDataType>(
+ "Qt3DStudio", 1, 0, "DataModelDataType",
+ QStringLiteral("DataModelDataType is an enum container"));
qmlRegisterUncreatableType<qt3dsdm::AdditionalMetaDataType>(
"Qt3DStudio", 1, 0, "AdditionalMetaDataType",
- "AdditionalMetaDataType is an enum container");
- engine()->addImportPath(qmlImportPath());
- setSource(QUrl("qrc:/Palettes/Inspector/InspectorControlView.qml"_L1));
+ QStringLiteral("AdditionalMetaDataType is an enum container"));
+ engine()->addImportPath(StudioUtils::qmlImportPath());
+ setSource(QUrl(QStringLiteral("qrc:/Palettes/Inspector/InspectorControlView.qml")));
}
QAbstractItemModel *InspectorControlView::inspectorControlModel() const
diff --git a/src/Authoring/Studio/Palettes/Inspector/MeshChooserView.cpp b/src/Authoring/Studio/Palettes/Inspector/MeshChooserView.cpp
index 28613eeb..b32cd3fa 100644
--- a/src/Authoring/Studio/Palettes/Inspector/MeshChooserView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/MeshChooserView.cpp
@@ -55,13 +55,13 @@ MeshChooserView::MeshChooserView(QWidget *parent)
void MeshChooserView::initialize()
{
CStudioPreferences::setQmlContextProperties(rootContext());
- rootContext()->setContextProperty("_resDir"_L1,
- resourceImageUrl());
- rootContext()->setContextProperty("_meshChooserView"_L1, this);
- rootContext()->setContextProperty("_meshChooserModel"_L1, m_model);
+ rootContext()->setContextProperty(QStringLiteral("_resDir"),
+ StudioUtils::resourceImageUrl());
+ rootContext()->setContextProperty(QStringLiteral("_meshChooserView"), this);
+ rootContext()->setContextProperty(QStringLiteral("_meshChooserModel"), m_model);
- engine()->addImportPath(qmlImportPath());
- setSource(QUrl("qrc:/Palettes/Inspector/MeshChooser.qml"_L1));
+ engine()->addImportPath(StudioUtils::qmlImportPath());
+ setSource(QUrl(QStringLiteral("qrc:/Palettes/Inspector/MeshChooser.qml")));
}
QSize MeshChooserView::sizeHint() const
diff --git a/src/Authoring/Studio/Palettes/Inspector/ObjectBrowserView.cpp b/src/Authoring/Studio/Palettes/Inspector/ObjectBrowserView.cpp
index e6faa1db..18273ff4 100644
--- a/src/Authoring/Studio/Palettes/Inspector/ObjectBrowserView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/ObjectBrowserView.cpp
@@ -143,10 +143,11 @@ void ObjectBrowserView::focusOutEvent(QFocusEvent *event)
void ObjectBrowserView::initialize()
{
CStudioPreferences::setQmlContextProperties(rootContext());
- rootContext()->setContextProperty("_objectBrowserView"_L1, this);
- rootContext()->setContextProperty("_resDir"_L1, resourceImageUrl());
- qmlRegisterUncreatableType<ObjectBrowserView>("Qt3DStudio", 1, 0, "ObjectBrowserView"
- , tr("Creation of ObjectBrowserView not allowed from QML"));
- engine()->addImportPath(qmlImportPath());
- setSource(QUrl("qrc:/Palettes/Inspector/ObjectBrowser.qml"_L1));
+ rootContext()->setContextProperty(QStringLiteral("_objectBrowserView"), this);
+ rootContext()->setContextProperty(QStringLiteral("_resDir"), StudioUtils::resourceImageUrl());
+ qmlRegisterUncreatableType<ObjectBrowserView>(
+ "Qt3DStudio", 1, 0, "ObjectBrowserView",
+ QStringLiteral("Creation of ObjectBrowserView not allowed from QML"));
+ engine()->addImportPath(StudioUtils::qmlImportPath());
+ setSource(QUrl(QStringLiteral("qrc:/Palettes/Inspector/ObjectBrowser.qml")));
}
diff --git a/src/Authoring/Studio/Palettes/Inspector/ObjectListModel.cpp b/src/Authoring/Studio/Palettes/Inspector/ObjectListModel.cpp
index 51e65e56..46cc501a 100644
--- a/src/Authoring/Studio/Palettes/Inspector/ObjectListModel.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/ObjectListModel.cpp
@@ -141,7 +141,7 @@ QVariant ObjectListModel::data(const QModelIndex &index,
}
case IconRole: {
auto info = m_objRefHelper->GetInfo(handle);
- return resourceImageUrl() + CStudioObjectTypes::GetNormalIconName(info.m_Type);
+ return StudioUtils::resourceImageUrl() + CStudioObjectTypes::GetNormalIconName(info.m_Type);
}
case TextColorRole: {
auto bridge = m_core->GetDoc()->GetStudioSystem()->GetClientDataModelBridge();
diff --git a/src/Authoring/Studio/Palettes/Inspector/TextureChooserView.cpp b/src/Authoring/Studio/Palettes/Inspector/TextureChooserView.cpp
index dda078f2..4ef7242c 100644
--- a/src/Authoring/Studio/Palettes/Inspector/TextureChooserView.cpp
+++ b/src/Authoring/Studio/Palettes/Inspector/TextureChooserView.cpp
@@ -56,11 +56,11 @@ TextureChooserView::TextureChooserView(QWidget *parent)
void TextureChooserView::initialize()
{
CStudioPreferences::setQmlContextProperties(rootContext());
- rootContext()->setContextProperty("_resDir"_L1, resourceImageUrl());
- rootContext()->setContextProperty("_textureChooserView"_L1, this);
- rootContext()->setContextProperty("_textureChooserModel"_L1, m_model);
- engine()->addImportPath(qmlImportPath());
- setSource(QUrl("qrc:/Palettes/Inspector/TextureChooser.qml"_L1));
+ rootContext()->setContextProperty(QStringLiteral("_resDir"), StudioUtils::resourceImageUrl());
+ rootContext()->setContextProperty(QStringLiteral("_textureChooserView"), this);
+ rootContext()->setContextProperty(QStringLiteral("_textureChooserModel"), m_model);
+ engine()->addImportPath(StudioUtils::qmlImportPath());
+ setSource(QUrl(QStringLiteral("qrc:/Palettes/Inspector/TextureChooser.qml")));
}
QSize TextureChooserView::sizeHint() const