VariableInspectorWidget.h
61 lines
| 1.6 KiB
| text/x-c
|
CLexer
Alexandre Leroux
|
r110 | #ifndef SCIQLOP_VARIABLEINSPECTORWIDGET_H | ||
#define SCIQLOP_VARIABLEINSPECTORWIDGET_H | ||||
Alexandre Leroux
|
r251 | #include <QLoggingCategory> | ||
Alexandre Leroux
|
r245 | #include <QMenu> | ||
Alexandre Leroux
|
r110 | #include <QWidget> | ||
Alexandre Leroux
|
r245 | #include <memory> | ||
r1348 | #include <Variable/VariableModel2.h> | |||
Alexandre Leroux
|
r251 | Q_DECLARE_LOGGING_CATEGORY(LOG_VariableInspectorWidget) | ||
r1420 | class Variable2; | |||
Alexandre Leroux
|
r245 | |||
r401 | class QProgressBarItemDelegate; | |||
r1420 | namespace Ui | |||
{ | ||||
Alexandre Leroux
|
r110 | class VariableInspectorWidget; | ||
} // Ui | ||||
/** | ||||
* @brief The VariableInspectorWidget class representes represents the variable inspector, from | ||||
* which it is possible to view the loaded variables, handle them or trigger their display in | ||||
* visualization | ||||
*/ | ||||
r1420 | class VariableInspectorWidget : public QWidget | |||
{ | ||||
Alexandre Leroux
|
r110 | Q_OBJECT | ||
public: | ||||
r1420 | explicit VariableInspectorWidget(QWidget* parent = 0); | |||
Alexandre Leroux
|
r110 | virtual ~VariableInspectorWidget(); | ||
Alexandre Leroux
|
r247 | signals: | ||
/** | ||||
Alexandre Leroux
|
r288 | * Signal emitted before a menu concerning variables is displayed. It is used for other widgets | ||
Alexandre Leroux
|
r247 | * to complete the menu. | ||
* @param tableMenu the menu to be completed | ||||
Alexandre Leroux
|
r288 | * @param variables the variables concerned by the menu | ||
Alexandre Leroux
|
r247 | * @remarks To make the dynamic addition of menus work, the connections to this signal must be | ||
* in Qt :: DirectConnection | ||||
*/ | ||||
r1420 | void tableMenuAboutToBeDisplayed( | |||
QMenu* tableMenu, const QVector<std::shared_ptr<Variable2>>& variables); | ||||
Alexandre Leroux
|
r247 | |||
Alexandre Leroux
|
r110 | private: | ||
r1420 | Ui::VariableInspectorWidget* ui; | |||
Alexandre Leroux
|
r245 | |||
r1420 | QProgressBarItemDelegate* m_ProgressBarItemDelegate; | |||
r1348 | VariableModel2* m_model; | |||
r401 | ||||
Alexandre Leroux
|
r245 | private slots: | ||
/// Slot called when right clicking on an variable in the table (displays a menu) | ||||
r1420 | void onTableMenuRequested(const QPoint& pos) noexcept; | |||
Alexandre Leroux
|
r368 | /// Refreshes instantly the variable view | ||
void refresh() noexcept; | ||||
Alexandre Leroux
|
r110 | }; | ||
#endif // SCIQLOP_VARIABLEINSPECTORWIDGET_H | ||||