CatalogueSideBarWidget.h
57 lines
| 1.6 KiB
| text/x-c
|
CLexer
r1133 | #ifndef SCIQLOP_CATALOGUESIDEBARWIDGET_H | |||
#define SCIQLOP_CATALOGUESIDEBARWIDGET_H | ||||
r1130 | ||||
r1133 | #include <Common/spimpl.h> | |||
r1180 | #include <QLoggingCategory> | |||
r1138 | #include <QTreeWidgetItem> | |||
r1130 | #include <QWidget> | |||
r1357 | class CatalogueAbstractTreeItem; | |||
r1176 | class DBCatalogue; | |||
r1162 | ||||
r1130 | namespace Ui { | |||
class CatalogueSideBarWidget; | ||||
} | ||||
r1180 | Q_DECLARE_LOGGING_CATEGORY(LOG_CatalogueSideBarWidget) | |||
r1130 | class CatalogueSideBarWidget : public QWidget { | |||
Q_OBJECT | ||||
r1138 | signals: | |||
r1176 | void catalogueSelected(const QVector<std::shared_ptr<DBCatalogue> > &catalogues); | |||
r1165 | void databaseSelected(const QStringList &databases); | |||
r1138 | void allEventsSelected(); | |||
void trashSelected(); | ||||
r1165 | void selectionCleared(); | |||
r1370 | void catalogueSaved(const std::shared_ptr<DBCatalogue> &catalogue); | |||
r1381 | void catalogueListChanged(); | |||
r1138 | ||||
r1130 | public: | |||
explicit CatalogueSideBarWidget(QWidget *parent = 0); | ||||
r1133 | virtual ~CatalogueSideBarWidget(); | |||
r1130 | ||||
r1357 | CatalogueAbstractTreeItem *addCatalogue(const std::shared_ptr<DBCatalogue> &catalogue, | |||
const QString &repository); | ||||
r1180 | void setCatalogueChanges(const std::shared_ptr<DBCatalogue> &catalogue, bool hasChanges); | |||
r1286 | QVector<std::shared_ptr<DBCatalogue> > getCatalogues(const QString &repository) const; | |||
r1368 | // QWidget interface | |||
protected: | ||||
void keyPressEvent(QKeyEvent *event); | ||||
r1356 | private slots: | |||
void emitSelection(); | ||||
r1130 | private: | |||
Ui::CatalogueSideBarWidget *ui; | ||||
r1133 | ||||
class CatalogueSideBarWidgetPrivate; | ||||
spimpl::unique_impl_ptr<CatalogueSideBarWidgetPrivate> impl; | ||||
r1174 | ||||
private slots: | ||||
void onContextMenuRequested(const QPoint &pos); | ||||
r1130 | }; | |||
r1133 | #endif // SCIQLOP_CATALOGUESIDEBARWIDGET_H | |||