From ac9473192e8134606fa18c709b45c946dd335e93 Mon Sep 17 00:00:00 2001 From: Matthias Puchner <github@mpuchner.de> Date: Fri, 30 Jul 2021 08:01:58 +0200 Subject: [PATCH] move tooltips into UI creation code (instead keeping them in a xml database) Remove obsolete tooltip database (xml & related class). The tooltip database was only used in one spot. To simplify the code, these tooltips can be defined directly where they are used. Some of the tooltips are also present in item classes (and therefore duplicate). This may be worth more refactoring in the future. --- GUI/Views/CommonWidgets/tooltipdatabase.cpp | 126 --------- GUI/Views/CommonWidgets/tooltipdatabase.h | 44 --- GUI/Views/CommonWidgets/tooltips.xml | 265 ------------------ GUI/Views/SampleDesigner/LayerView.cpp | 1 - GUI/Views/SampleDesigner/SampleWidgetBox.cpp | 134 +++++---- .../widgetbox/widgetboxcategorylistview.cpp | 1 - GUI/gui.qrc | 1 - GUI/mainwindow/mainwindow.cpp | 2 - GUI/mainwindow/mainwindow.h | 2 - 9 files changed, 82 insertions(+), 494 deletions(-) delete mode 100644 GUI/Views/CommonWidgets/tooltipdatabase.cpp delete mode 100644 GUI/Views/CommonWidgets/tooltipdatabase.h delete mode 100644 GUI/Views/CommonWidgets/tooltips.xml diff --git a/GUI/Views/CommonWidgets/tooltipdatabase.cpp b/GUI/Views/CommonWidgets/tooltipdatabase.cpp deleted file mode 100644 index 560ac207420..00000000000 --- a/GUI/Views/CommonWidgets/tooltipdatabase.cpp +++ /dev/null @@ -1,126 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file GUI/Views/CommonWidgets/tooltipdatabase.cpp -//! @brief Implements class ToolTipDataBase -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2018 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#include "GUI/Views/CommonWidgets/tooltipdatabase.h" -#include "Base/Utils/Assert.h" -#include "GUI/Models/Error.h" -#include <QFile> -#include <QXmlStreamReader> - -namespace { -const QString modelTag = "ToolTipsData"; -const QString contextTag = "context"; -const QString categoryTag = "category"; -const QString propertyTag = "property"; -const QString tooltipTag = "tooltip"; -const QString whatsthisTag = "whatsthis"; -const QString nameAttribute = "name"; -const QString sampleViewContext = "SampleView"; -const QString titleProperty = "Title"; -const QString descriptionProperty = "Description"; -} // namespace - -ToolTipDataBase* ToolTipDataBase::m_instance = 0; -QMap<QString, QString> ToolTipDataBase::m_tagToToolTip = QMap<QString, QString>(); - -ToolTipDataBase::ToolTipDataBase(QObject* parent) : QObject(parent) -{ - ASSERT(!m_instance); - m_instance = this; - - initDataBase(); -} - -ToolTipDataBase::~ToolTipDataBase() -{ - m_instance = 0; -} - -QString ToolTipDataBase::widgetboxToolTip(const QString& className) -{ - ASSERT(m_instance); - QString modelName(className); - modelName.remove("FormFactor"); - return m_instance->this_getToolTip(sampleViewContext, modelName, titleProperty); -} - -void ToolTipDataBase::initDataBase() -{ - QFile file(":/Views/CommonWidgets/tooltips.xml"); - if (!file.open(QIODevice::ReadOnly)) - throw Error(file.errorString()); - - QXmlStreamReader reader(&file); - - QString contextName, className, propertyName; - while (!reader.atEnd()) { - switch (reader.readNext()) { - case QXmlStreamReader::StartElement: { - const QStringRef tag = reader.name(); - if (tag == modelTag) { - continue; - } - if (tag == contextTag) { - const QXmlStreamAttributes attributes = reader.attributes(); - contextName = attributes.value(nameAttribute).toString(); - continue; - } - if (tag == categoryTag) { - const QXmlStreamAttributes attributes = reader.attributes(); - className = attributes.value(nameAttribute).toString(); - continue; - } - if (tag == propertyTag) { - const QXmlStreamAttributes attributes = reader.attributes(); - propertyName = attributes.value(nameAttribute).toString(); - continue; - } - if (tag == tooltipTag) { - reader.readNext(); - QString toolTip = reader.text().toString(); - addToolTip(contextName, className, propertyName, toolTip); - continue; - } - break; - } - case QXmlStreamReader::EndElement: { - break; - } - default: - break; - } - } - - if (reader.hasError()) - throw Error(reader.errorString()); -} - -QString ToolTipDataBase::getTag(const QString& contextName, const QString& categoryName, - const QString& propertyName) -{ - return QString("/%1/%2/%3").arg(contextName, categoryName, propertyName); -} - -void ToolTipDataBase::addToolTip(const QString& contextName, const QString& categoryName, - const QString& propertyName, const QString& tooltip) -{ - if (!tooltip.isEmpty()) - m_tagToToolTip[getTag(contextName, categoryName, propertyName)] = tooltip; -} - -QString ToolTipDataBase::this_getToolTip(const QString& contextName, const QString& categoryName, - const QString& propertyName) -{ - return m_tagToToolTip[getTag(contextName, categoryName, propertyName)]; -} diff --git a/GUI/Views/CommonWidgets/tooltipdatabase.h b/GUI/Views/CommonWidgets/tooltipdatabase.h deleted file mode 100644 index 9a78b772a11..00000000000 --- a/GUI/Views/CommonWidgets/tooltipdatabase.h +++ /dev/null @@ -1,44 +0,0 @@ -// ************************************************************************************************ -// -// BornAgain: simulate and fit reflection and scattering -// -//! @file GUI/Views/CommonWidgets/tooltipdatabase.h -//! @brief Defines class ToolTipDataBase -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2018 -//! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS) -// -// ************************************************************************************************ - -#ifndef BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_TOOLTIPDATABASE_H -#define BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_TOOLTIPDATABASE_H - -#include <QMap> -#include <QObject> - -//! The MaterialEditor is the main class to access materials. -class ToolTipDataBase : public QObject { - Q_OBJECT -public: - explicit ToolTipDataBase(QObject* parent = nullptr); - virtual ~ToolTipDataBase(); - - static QString widgetboxToolTip(const QString& className); - -private: - void initDataBase(); - QString getTag(const QString& contextName, const QString& categoryName, - const QString& propertyName); - void addToolTip(const QString& contextName, const QString& categoryName, - const QString& propertyName, const QString& tooltip); - QString this_getToolTip(const QString& contextName, const QString& categoryName, - const QString& propertyName); - - static ToolTipDataBase* m_instance; - - static QMap<QString, QString> m_tagToToolTip; -}; - -#endif // BORNAGAIN_GUI_VIEWS_COMMONWIDGETS_TOOLTIPDATABASE_H diff --git a/GUI/Views/CommonWidgets/tooltips.xml b/GUI/Views/CommonWidgets/tooltips.xml deleted file mode 100644 index 46ca250d515..00000000000 --- a/GUI/Views/CommonWidgets/tooltips.xml +++ /dev/null @@ -1,265 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ToolTipsData version="1.0"> - <context name="SampleView"> - - <category name="MultiLayer"> - <property name="Title"> - <tooltip>A multilayer to hold stack of layers</tooltip> - </property> - </category> - - <category name="Layer"> - <property name="Title"> - <tooltip>A layer with thickness and material</tooltip> - </property> - </category> - - <category name="ParticleLayout"> - <property name="Title"> - <tooltip>A layout of particles </tooltip> - </property> - </category> - - <category name="InterferenceRadialParaCrystal"> - <property name="Title"> - <tooltip>Interference function of radial paracrystal</tooltip> - </property> - </category> - - <category name="Interference2DParaCrystal"> - <property name="Title"> - <tooltip>Interference function of two-dimensional paracrystal</tooltip> - </property> - </category> - - <category name="Interference1DLattice"> - <property name="Title"> - <tooltip>Interference function of 1D lattice</tooltip> - </property> - </category> - - <category name="Interference2DLattice"> - <property name="Title"> - <tooltip>Interference function of 2D lattice</tooltip> - </property> - </category> - - <category name="InterferenceFinite2DLattice"> - <property name="Title"> - <tooltip>Interference function of finite 2D lattice</tooltip> - </property> - </category> - - <category name="InterferenceHardDisk"> - <property name="Title"> - <tooltip>Interference function for hard disk Percus-Yevick</tooltip> - </property> - </category> - - <category name="AnisoPyramid"> - <property name="Title"> - <tooltip>Pyramid with a rectangular base</tooltip> - </property> - </category> - - <category name="Box"> - <property name="Title"> - <tooltip>Rectangular cuboid</tooltip> - </property> - </category> - - <category name="Cone"> - <property name="Title"> - <tooltip>Truncated cone</tooltip> - </property> - </category> - - <category name="Cone6"> - <property name="Title"> - <tooltip>"A truncated pyramid, based on a regular hexagon</tooltip> - </property> - </category> - - <category name="Cuboctahedron"> - <property name="Title"> - <tooltip>Combination of two pyramids of different heights, sharing a common face</tooltip> - </property> - </category> - - <category name="Cylinder"> - <property name="Title"> - <tooltip>Cylinder with a circular base</tooltip> - </property> - </category> - - <category name="Dodecahedron"> - <property name="Title"> - <tooltip>Dodecahedron</tooltip> - </property> - </category> - - <category name="EllipsoidalCylinder"> - <property name="Title"> - <tooltip>Cylinder with an ellipse cross section</tooltip> - </property> - </category> - - <category name="FullSphere"> - <property name="Title"> - <tooltip>Full sphere</tooltip> - </property> - </category> - - <category name="FullSpheroid"> - <property name="Title"> - <tooltip>Ellipsoid of revolution</tooltip> - </property> - </category> - - <category name="HemiEllipsoid"> - <property name="Title"> - <tooltip>An horizontally oriented ellipsoid, truncated at the central plane</tooltip> - </property> - </category> - - <category name="Icosahedron"> - <property name="Title"> - <tooltip>Icosahedron</tooltip> - </property> - </category> - - <category name="Prism3"> - <property name="Title"> - <tooltip>Prism with an equilaterial triangle base</tooltip> - </property> - </category> - - <category name="Prism6"> - <property name="Title"> - <tooltip>Prism with a regular hexagonal base</tooltip> - </property> - </category> - - <category name="Pyramid"> - <property name="Title"> - <tooltip>Truncated pyramid with a square base</tooltip> - </property> - </category> - - <category name="Ripple1"> - <property name="Title"> - <tooltip>Particle with a cosine profile and a rectangular base</tooltip> - </property> - </category> - - <category name="Ripple2"> - <property name="Title"> - <tooltip>Particle with an asymmetric triangle profile and a rectangular base</tooltip> - </property> - </category> - - <category name="Tetrahedron"> - <property name="Title"> - <tooltip>Truncated polyhedron with equilateral triangle base and cropped side faces</tooltip> - </property> - </category> - - <category name="TruncatedCube"> - <property name="Title"> - <tooltip>A cube whose eight vertices have been removed</tooltip> - </property> - </category> - - <category name="TruncatedSphere"> - <property name="Title"> - <tooltip>Spherical dome</tooltip> - </property> - </category> - - <category name="TruncatedSpheroid"> - <property name="Title"> - <tooltip>Spheroidal dome</tooltip> - </property> - </category> - - <category name="Rotation"> - <property name="Title"> - <tooltip>Rotation applied to particles</tooltip> - </property> - </category> - - <category name="ParticleCoreShell"> - <property name="Title"> - <tooltip>A particle with a core/shell geometry</tooltip> - </property> - </category> - - <category name="ParticleComposition"> - <property name="Title"> - <tooltip>Composition of particles with fixed positions</tooltip> - </property> - </category> - - <category name="EulerRotation"> - <property name="Title"> - <tooltip>Rotation applied to the particle</tooltip> - </property> - </category> - - <category name="example01"> - <property name="Title"> - <tooltip>Mixture of cylinders and prisms without interference</tooltip> - </property> - </category> - - <category name="example02"> - <property name="Title"> - <tooltip>Interference 1D radial paracrystal</tooltip> - </property> - </category> - - <category name="example03"> - <property name="Title"> - <tooltip>Interference 2D paracrystal</tooltip> - </property> - </category> - - <category name="example04"> - <property name="Title"> - <tooltip>Core shell particles</tooltip> - </property> - </category> - - <category name="example05"> - <property name="Title"> - <tooltip>Multilayer with correlated roughness</tooltip> - </property> - </category> - - <category name="example06"> - <property name="Title"> - <tooltip>Interference 2D lattice</tooltip> - </property> - </category> - - <category name="example07"> - <property name="Title"> - <tooltip>Rotated pyramids on top of substrate</tooltip> - </property> - </category> - - <category name="example08"> - <property name="Title"> - <tooltip>Cylinders with size distribution</tooltip> - </property> - </category> - - <category name="example09"> - <property name="Title"> - <tooltip>Hexagonal lattice with basis to represent two layers of spheres</tooltip> - </property> - </category> - - </context> - -</ToolTipsData> diff --git a/GUI/Views/SampleDesigner/LayerView.cpp b/GUI/Views/SampleDesigner/LayerView.cpp index 107c9288beb..2e3c66af974 100644 --- a/GUI/Views/SampleDesigner/LayerView.cpp +++ b/GUI/Views/SampleDesigner/LayerView.cpp @@ -15,7 +15,6 @@ #include "GUI/Views/SampleDesigner/LayerView.h" #include "GUI/Models/LayerItem.h" #include "GUI/Views/CommonWidgets/DesignerHelper.h" -#include "GUI/Views/CommonWidgets/tooltipdatabase.h" #include "GUI/Views/SampleDesigner/MultiLayerView.h" #include "GUI/Views/SampleDesigner/ParticleLayoutView.h" #include <QPainter> diff --git a/GUI/Views/SampleDesigner/SampleWidgetBox.cpp b/GUI/Views/SampleDesigner/SampleWidgetBox.cpp index 690fd1bd9e2..889592f0389 100644 --- a/GUI/Views/SampleDesigner/SampleWidgetBox.cpp +++ b/GUI/Views/SampleDesigner/SampleWidgetBox.cpp @@ -13,7 +13,6 @@ // ************************************************************************************************ #include "GUI/Views/SampleDesigner/SampleWidgetBox.h" -#include "GUI/Views/CommonWidgets/tooltipdatabase.h" #include "GUI/Views/widgetbox/DesignerMimeData.h" #include "GUI/Views/widgetbox/widgetboxtreewidget.h" #include <QApplication> @@ -110,9 +109,6 @@ void SampleWidgetBox::fill() const auto group = [&](const QString& title) { m_view->addGroup(title); }; const auto entry = [&](const QString& title, const QString& iconName, const QString& cls, QString tooltip) { - if (tooltip.isEmpty()) - tooltip = ToolTipDataBase::widgetboxToolTip(cls); - m_view->addEntry(title, QIcon(":/widgetbox/images/" + iconName), cls, tooltip); }; @@ -120,69 +116,103 @@ void SampleWidgetBox::fill() entry("Multi Layer", "MultiLayer.png", "MultiLayer", "A multilayer to hold stack of layers"); group("Layers"); - entry("Layer", "Layer.png", "Layer", ""); + entry("Layer", "Layer.png", "Layer", "A layer with thickness and material"); group("Particle layouts"); - entry("Basic particle layout", "ParticleLayout.png", "ParticleLayout", ""); + entry("Basic particle layout", "ParticleLayout.png", "ParticleLayout", "A layout of particles"); group("Interference functions"); - entry("Radial paracrystal", "ParaCrystal1D.png", "InterferenceRadialParaCrystal", ""); - entry("2D paracrystal", "ParaCrystal2D.png", "Interference2DParaCrystal", ""); - entry("1D lattice", "Lattice1D.png", "Interference1DLattice", ""); - entry("2D lattice", "Lattice2D.png", "Interference2DLattice", ""); - entry("Finite 2D lattice", "Lattice2DFinite.png", "InterferenceFinite2DLattice", ""); - entry("Hard disk Percus-Yevick", "Lattice2D.png", "InterferenceHardDisk", ""); + entry("Radial paracrystal", "ParaCrystal1D.png", "InterferenceRadialParaCrystal", + "Interference function of radial paracrystal"); + entry("2D paracrystal", "ParaCrystal2D.png", "Interference2DParaCrystal", + "Interference function of two-dimensional paracrystal"); + entry("1D lattice", "Lattice1D.png", "Interference1DLattice", + "Interference function of 1D lattice"); + entry("2D lattice", "Lattice2D.png", "Interference2DLattice", + "Interference function of 2D lattice"); + entry("Finite 2D lattice", "Lattice2DFinite.png", "InterferenceFinite2DLattice", + "Interference function of finite 2D lattice"); + entry("Hard disk Percus-Yevick", "Lattice2D.png", "InterferenceHardDisk", + "Interference function for hard disk Percus-Yevick"); group("Hard particles"); - entry("Anisotropic pyramid", "ff_AnisoPyramid_64x64.png", "FormFactorAnisoPyramid", ""); - entry("Box", "ff_Box_64x64.png", "FormFactorBox", ""); - entry("Cone", "ff_Cone_64x64.png", "FormFactorCone", ""); - entry("Cone6", "ff_Cone6_64x64.png", "FormFactorCone6", ""); - entry("Cuboctahedron", "ff_Cuboctahedron_64x64.png", "FormFactorCuboctahedron", ""); - entry("Cylinder", "ff_Cylinder_64x64.png", "FormFactorCylinder", ""); - entry("Dodecahedron", "ff_Dodecahedron_64x64.png", "FormFactorDodecahedron", ""); + entry("Anisotropic pyramid", "ff_AnisoPyramid_64x64.png", "FormFactorAnisoPyramid", + "Pyramid with a rectangular base"); + entry("Box", "ff_Box_64x64.png", "FormFactorBox", "Rectangular cuboid"); + entry("Cone", "ff_Cone_64x64.png", "FormFactorCone", "Truncated cone"); + entry("Cone6", "ff_Cone6_64x64.png", "FormFactorCone6", + "A truncated pyramid, based on a regular hexagon"); + entry("Cuboctahedron", "ff_Cuboctahedron_64x64.png", "FormFactorCuboctahedron", + "Combination of two pyramids of different heights, sharing a common face"); + entry("Cylinder", "ff_Cylinder_64x64.png", "FormFactorCylinder", + "Cylinder with a circular base"); + entry("Dodecahedron", "ff_Dodecahedron_64x64.png", "FormFactorDodecahedron", "Dodecahedron"); entry("Ellipsoidal cylinder", "ff_EllipsoidalCylinder_64x64.png", - "FormFactorEllipsoidalCylinder", ""); - entry("Full sphere", "ff_FullSphere_64x64.png", "FormFactorFullSphere", ""); - entry("Full spheroid", "ff_FullSpheroid_64x64.png", "FormFactorFullSpheroid", ""); - entry("Hemi ellipsoid", "ff_HemiEllipsoid_64x64.png", "FormFactorHemiEllipsoid", ""); - entry("Icosahedron", "ff_Icosahedron_64x64.png", "FormFactorIcosahedron", ""); - entry("Prism3", "ff_Prism3_64x64.png", "FormFactorPrism3", ""); - entry("Prism6", "ff_Prism6_64x64.png", "FormFactorPrism6", ""); - entry("Pyramid", "ff_Pyramid_64x64.png", "FormFactorPyramid", ""); - entry("Tetrahedron", "ff_Tetrahedron_64x64.png", "FormFactorTetrahedron", ""); - entry("Truncated cube", "ff_TruncatedCube_64x64.png", "FormFactorTruncatedCube", ""); - entry("Truncated sphere", "ff_TruncatedSphere_64x64.png", "FormFactorTruncatedSphere", ""); + "FormFactorEllipsoidalCylinder", "Cylinder with an ellipse cross section"); + entry("Full sphere", "ff_FullSphere_64x64.png", "FormFactorFullSphere", "Full sphere"); + entry("Full spheroid", "ff_FullSpheroid_64x64.png", "FormFactorFullSpheroid", + "Ellipsoid of revolution"); + entry("Hemi ellipsoid", "ff_HemiEllipsoid_64x64.png", "FormFactorHemiEllipsoid", + "A horizontally oriented ellipsoid, truncated at the central plane"); + entry("Icosahedron", "ff_Icosahedron_64x64.png", "FormFactorIcosahedron", "Icosahedron"); + entry("Prism3", "ff_Prism3_64x64.png", "FormFactorPrism3", + "Prism with an equilateral triangle base"); + entry("Prism6", "ff_Prism6_64x64.png", "FormFactorPrism6", + "Prism with a regular hexagonal base"); + entry("Pyramid", "ff_Pyramid_64x64.png", "FormFactorPyramid", + "Truncated pyramid with a square base"); + entry("Tetrahedron", "ff_Tetrahedron_64x64.png", "FormFactorTetrahedron", + "Truncated polyhedron with equilateral triangle base and cropped side faces"); + entry("Truncated cube", "ff_TruncatedCube_64x64.png", "FormFactorTruncatedCube", + "A cube whose eight vertices have been removed"); + entry("Truncated sphere", "ff_TruncatedSphere_64x64.png", "FormFactorTruncatedSphere", + "Spherical dome"); entry("Truncated spheroid", "ff_TruncatedSpheroid_64x64.png", "FormFactorTruncatedSpheroid", - ""); + "Spheroidal dome"); group("Ripples"); - entry("Box", "ff_Box_64x64.png", "FormFactorBox", ""); - entry("BarGauss", "ff_Box_64x64.png", "FormFactorBarGauss", ""); - entry("BarLorentz", "ff_Box_64x64.png", "FormFactorBarLorentz", ""); - entry("CosineRippleBox", "ff_Ripple1_64x64.png", "FormFactorCosineRippleBox", ""); - entry("CosineRippleGauss", "ff_Ripple1_64x64.png", "FormFactorCosineRippleGauss", ""); - entry("CosineRippleLorentz", "ff_Ripple1_64x64.png", "FormFactorCosineRippleLorentz", ""); - entry("SawtoothRippleBox", "ff_Ripple2_64x64.png", "FormFactorSawtoothRippleBox", ""); - entry("SawtoothRippleGauss", "ff_Ripple2_64x64.png", "FormFactorSawtoothRippleGauss", ""); - entry("SawtoothRippleLorentz", "ff_Ripple2_64x64.png", "FormFactorSawtoothRippleLorentz", ""); + entry("Box", "ff_Box_64x64.png", "FormFactorBox", "Rectangular cuboid"); + entry("BarGauss", "ff_Box_64x64.png", "FormFactorBarGauss", "Rectangular cuboid"); + entry("BarLorentz", "ff_Box_64x64.png", "FormFactorBarLorentz", "Rectangular cuboid"); + entry("CosineRippleBox", "ff_Ripple1_64x64.png", "FormFactorCosineRippleBox", + "Particle with a cosine profile and a rectangular base"); + entry("CosineRippleGauss", "ff_Ripple1_64x64.png", "FormFactorCosineRippleGauss", + "Particle with a cosine profile and a rectangular base"); + entry("CosineRippleLorentz", "ff_Ripple1_64x64.png", "FormFactorCosineRippleLorentz", + "Particle with a cosine profile and a rectangular base"); + entry("SawtoothRippleBox", "ff_Ripple2_64x64.png", "FormFactorSawtoothRippleBox", + "Particle with an asymmetric triangle profile and a rectangular base"); + entry("SawtoothRippleGauss", "ff_Ripple2_64x64.png", "FormFactorSawtoothRippleGauss", + "Particle with an asymmetric triangle profile and a rectangular base"); + entry("SawtoothRippleLorentz", "ff_Ripple2_64x64.png", "FormFactorSawtoothRippleLorentz", + "Particle with an asymmetric triangle profile and a rectangular base"); group("Transformations"); - entry("Rotation", "Transformation.png", "Rotation", ""); + entry("Rotation", "Transformation.png", "Rotation", "Rotation applied to particles"); group("Particle assemblies"); - entry("Core shell particle", "ParticleCoreShell_64x64.png", "ParticleCoreShell", ""); - entry("Particle Composition", "ParticleComposition_64x64.png", "ParticleComposition", ""); - entry("Meso Crystal", "Mesocrystal_64x64.png", "MesoCrystal", ""); + entry("Core shell particle", "ParticleCoreShell_64x64.png", "ParticleCoreShell", + "A particle with a core/shell geometry"); + entry("Particle Composition", "ParticleComposition_64x64.png", "ParticleComposition", + "Composition of particles with fixed positions"); + entry("Meso Crystal", "Mesocrystal_64x64.png", "MesoCrystal", + "A 3D crystal structure of nanoparticles"); group("Demo samples"); - entry("Cylinder and prisms", "sample_layers2.png", "example01", ""); - entry("Interference 1D paracrystal", "sample_layers2.png", "example02", ""); - entry("Interference 2D paracrystal", "sample_layers2.png", "example03", ""); - entry("Core shell particles", "sample_layers2.png", "example04", ""); - entry("Multilayer with correlated roughness", "sample_layers2.png", "example05", ""); - entry("Interference 2D square lattice", "sample_layers2.png", "example06", ""); - entry("Rotated pyramids", "sample_layers2.png", "example07", ""); - entry("Hexagonal lattice with basis", "sample_layers2.png", "example09", ""); + entry("Cylinder and prisms", "sample_layers2.png", "example01", + "Mixture of cylinders and prisms without interference"); + entry("Interference 1D paracrystal", "sample_layers2.png", "example02", + "Interference 1D radial paracrystal"); + entry("Interference 2D paracrystal", "sample_layers2.png", "example03", + "Interference 2D paracrystal"); + entry("Core shell particles", "sample_layers2.png", "example04", "Core shell particles"); + entry("Multilayer with correlated roughness", "sample_layers2.png", "example05", + "Multilayer with correlated roughness"); + entry("Interference 2D square lattice", "sample_layers2.png", "example06", + "Interference 2D lattice"); + entry("Rotated pyramids", "sample_layers2.png", "example07", + "Rotated pyramids on top of substrate"); + entry("Hexagonal lattice with basis", "sample_layers2.png", "example09", + "Hexagonal lattice with basis to represent two layers of spheres"); entry("Mesocrystal", "sample_layers2.png", "example10", ""); } diff --git a/GUI/Views/widgetbox/widgetboxcategorylistview.cpp b/GUI/Views/widgetbox/widgetboxcategorylistview.cpp index 626fbbadb59..41b30fed959 100644 --- a/GUI/Views/widgetbox/widgetboxcategorylistview.cpp +++ b/GUI/Views/widgetbox/widgetboxcategorylistview.cpp @@ -14,7 +14,6 @@ #include "GUI/Views/widgetbox/widgetboxcategorylistview.h" #include "Base/Utils/Assert.h" -#include "GUI/Views/CommonWidgets/tooltipdatabase.h" #include <QIcon> #include <QListView> diff --git a/GUI/gui.qrc b/GUI/gui.qrc index 367f8f52406..07c9f6b5d71 100644 --- a/GUI/gui.qrc +++ b/GUI/gui.qrc @@ -2,7 +2,6 @@ <qresource prefix="/"> <file>images/mode_script.png</file> <file>images/reset.png</file> - <file>Views/CommonWidgets/tooltips.xml</file> <file>images/treeview-branch-closed.png</file> <file>images/treeview-branch-end.png</file> <file>images/treeview-branch-more.png</file> diff --git a/GUI/mainwindow/mainwindow.cpp b/GUI/mainwindow/mainwindow.cpp index cdcd51efe96..db671d683c7 100644 --- a/GUI/mainwindow/mainwindow.cpp +++ b/GUI/mainwindow/mainwindow.cpp @@ -15,7 +15,6 @@ #include "GUI/mainwindow/mainwindow.h" #include "GUI/Models/ApplicationModels.h" #include "GUI/Models/JobModel.h" -#include "GUI/Views/CommonWidgets/tooltipdatabase.h" #include "GUI/Views/ImportDataView.h" #include "GUI/Views/ImportDataWidgets/LinkInstrumentManager.h" #include "GUI/Views/InstrumentView.h" @@ -55,7 +54,6 @@ MainWindow::MainWindow() , m_linkManager(new LinkInstrumentManager(this)) , m_projectManager(new ProjectManager(this)) , m_actionManager(new ActionManager(this)) - , m_toolTipDataBase(new ToolTipDataBase(this)) , m_welcomeView(0) , m_instrumentView(0) , m_sampleView(0) diff --git a/GUI/mainwindow/mainwindow.h b/GUI/mainwindow/mainwindow.h index 48003a26602..e8b77e7f2f9 100644 --- a/GUI/mainwindow/mainwindow.h +++ b/GUI/mainwindow/mainwindow.h @@ -33,7 +33,6 @@ class JobModel; class ApplicationModels; class ProjectManager; class ActionManager; -class ToolTipDataBase; class UpdateNotifier; class QProgressBar; @@ -110,7 +109,6 @@ private: LinkInstrumentManager* m_linkManager; ProjectManager* m_projectManager; ActionManager* m_actionManager; - ToolTipDataBase* m_toolTipDataBase; UpdateNotifier* m_updateNotifier; WelcomeView* m_welcomeView; -- GitLab