VariableInspectorWidget.h
56 lines
| 1.6 KiB
| text/x-c
|
CLexer
Alexandre Leroux
|
r105 | #ifndef SCIQLOP_VARIABLEINSPECTORWIDGET_H | ||
#define SCIQLOP_VARIABLEINSPECTORWIDGET_H | ||||
Alexandre Leroux
|
r234 | #include <QLoggingCategory> | ||
Alexandre Leroux
|
r228 | #include <QMenu> | ||
Alexandre Leroux
|
r105 | #include <QWidget> | ||
Alexandre Leroux
|
r228 | #include <memory> | ||
Alexandre Leroux
|
r234 | Q_DECLARE_LOGGING_CATEGORY(LOG_VariableInspectorWidget) | ||
Alexandre Leroux
|
r228 | class Variable; | ||
r369 | class QProgressBarItemDelegate; | |||
Alexandre Leroux
|
r105 | namespace Ui { | ||
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 | ||||
*/ | ||||
class VariableInspectorWidget : public QWidget { | ||||
Q_OBJECT | ||||
public: | ||||
explicit VariableInspectorWidget(QWidget *parent = 0); | ||||
virtual ~VariableInspectorWidget(); | ||||
Alexandre Leroux
|
r230 | signals: | ||
/** | ||||
Alexandre Leroux
|
r266 | * Signal emitted before a menu concerning variables is displayed. It is used for other widgets | ||
Alexandre Leroux
|
r230 | * to complete the menu. | ||
* @param tableMenu the menu to be completed | ||||
Alexandre Leroux
|
r266 | * @param variables the variables concerned by the menu | ||
Alexandre Leroux
|
r230 | * @remarks To make the dynamic addition of menus work, the connections to this signal must be | ||
* in Qt :: DirectConnection | ||||
*/ | ||||
Alexandre Leroux
|
r266 | void tableMenuAboutToBeDisplayed(QMenu *tableMenu, | ||
const QVector<std::shared_ptr<Variable> > &variables); | ||||
Alexandre Leroux
|
r230 | |||
Alexandre Leroux
|
r105 | private: | ||
Ui::VariableInspectorWidget *ui; | ||||
Alexandre Leroux
|
r228 | |||
r369 | QProgressBarItemDelegate *m_ProgressBarItemDelegate; | |||
Alexandre Leroux
|
r228 | private slots: | ||
/// Slot called when right clicking on an variable in the table (displays a menu) | ||||
void onTableMenuRequested(const QPoint &pos) noexcept; | ||||
Alexandre Leroux
|
r340 | /// Refreshes instantly the variable view | ||
void refresh() noexcept; | ||||
Alexandre Leroux
|
r105 | }; | ||
#endif // SCIQLOP_VARIABLEINSPECTORWIDGET_H | ||||