CatalogueInspectorWidget.h
49 lines
| 1.4 KiB
| text/x-c
|
CLexer
r1099 | #ifndef SCIQLOP_CATALOGUEINSPECTORWIDGET_H | |||
#define SCIQLOP_CATALOGUEINSPECTORWIDGET_H | ||||
r1095 | ||||
r1147 | #include <Common/spimpl.h> | |||
r1095 | #include <QWidget> | |||
r1143 | #include <memory> | |||
r1095 | ||||
namespace Ui { | ||||
class CatalogueInspectorWidget; | ||||
} | ||||
r1129 | class DBCatalogue; | |||
class DBEvent; | ||||
r1150 | class DBEventProduct; | |||
r1129 | ||||
r1095 | class CatalogueInspectorWidget : public QWidget { | |||
Q_OBJECT | ||||
r1147 | signals: | |||
void catalogueUpdated(const std::shared_ptr<DBCatalogue> &catalogue); | ||||
void eventUpdated(const std::shared_ptr<DBEvent> &event); | ||||
r1150 | void eventProductUpdated(const std::shared_ptr<DBEvent> &event, | |||
const std::shared_ptr<DBEventProduct> &eventProduct); | ||||
r1147 | ||||
r1095 | public: | |||
explicit CatalogueInspectorWidget(QWidget *parent = 0); | ||||
r1099 | virtual ~CatalogueInspectorWidget(); | |||
/// Enum matching the pages inside the stacked widget | ||||
enum class Page { Empty, CatalogueProperties, EventProperties }; | ||||
Page currentPage() const; | ||||
r1143 | void setEvent(const std::shared_ptr<DBEvent> &event); | |||
r1150 | void setEventProduct(const std::shared_ptr<DBEvent> &event, | |||
const std::shared_ptr<DBEventProduct> &eventProduct); | ||||
r1143 | void setCatalogue(const std::shared_ptr<DBCatalogue> &catalogue); | |||
r1105 | ||||
r1099 | public slots: | |||
void showPage(Page page); | ||||
r1095 | ||||
private: | ||||
Ui::CatalogueInspectorWidget *ui; | ||||
r1147 | ||||
class CatalogueInspectorWidgetPrivate; | ||||
spimpl::unique_impl_ptr<CatalogueInspectorWidgetPrivate> impl; | ||||
r1095 | }; | |||
r1099 | #endif // SCIQLOP_CATALOGUEINSPECTORWIDGET_H | |||