BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
tooltipdatabase.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/mainwindow/tooltipdatabase.h
6 //! @brief Defines class ToolTipDataBase
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_COREGUI_MAINWINDOW_TOOLTIPDATABASE_H
16 #define BORNAGAIN_GUI_COREGUI_MAINWINDOW_TOOLTIPDATABASE_H
17 
18 #include <QMap>
19 #include <QObject>
20 
21 //! The MaterialEditor is the main class to access materials.
22 class ToolTipDataBase : public QObject {
23  Q_OBJECT
24 public:
25  explicit ToolTipDataBase(QObject* parent = nullptr);
26  virtual ~ToolTipDataBase();
27 
28  static QString widgetboxToolTip(const QString& className);
29 
30 private:
31  void initDataBase();
32  QString getTag(const QString& contextName, const QString& categoryName,
33  const QString& propertyName);
34  void addToolTip(const QString& contextName, const QString& categoryName,
35  const QString& propertyName, const QString& tooltip);
36  QString this_getToolTip(const QString& contextName, const QString& categoryName,
37  const QString& propertyName);
38 
40 
41  static QMap<QString, QString> m_tagToToolTip;
42 };
43 
44 #endif // BORNAGAIN_GUI_COREGUI_MAINWINDOW_TOOLTIPDATABASE_H
The MaterialEditor is the main class to access materials.
virtual ~ToolTipDataBase()
QString this_getToolTip(const QString &contextName, const QString &categoryName, const QString &propertyName)
static QString widgetboxToolTip(const QString &className)
static ToolTipDataBase * m_instance
QString getTag(const QString &contextName, const QString &categoryName, const QString &propertyName)
static QMap< QString, QString > m_tagToToolTip
void addToolTip(const QString &contextName, const QString &categoryName, const QString &propertyName, const QString &tooltip)
ToolTipDataBase(QObject *parent=nullptr)