@@ -53,6 +53,11 public slots: | |||||
53 | void clear(); |
|
53 | void clear(); | |
54 | void refresh(); |
|
54 | void refresh(); | |
55 |
|
55 | |||
|
56 | // QWidget interface | |||
|
57 | protected: | |||
|
58 | void keyPressEvent(QKeyEvent *event); | |||
|
59 | ||||
|
60 | ||||
56 | private: |
|
61 | private: | |
57 | Ui::CatalogueEventsWidget *ui; |
|
62 | Ui::CatalogueEventsWidget *ui; | |
58 |
|
63 |
@@ -35,6 +35,10 public: | |||||
35 |
|
35 | |||
36 | QVector<std::shared_ptr<DBCatalogue> > getCatalogues(const QString &repository) const; |
|
36 | QVector<std::shared_ptr<DBCatalogue> > getCatalogues(const QString &repository) const; | |
37 |
|
37 | |||
|
38 | // QWidget interface | |||
|
39 | protected: | |||
|
40 | void keyPressEvent(QKeyEvent *event); | |||
|
41 | ||||
38 | private slots: |
|
42 | private slots: | |
39 | void emitSelection(); |
|
43 | void emitSelection(); | |
40 |
|
44 |
@@ -19,6 +19,7 | |||||
19 |
|
19 | |||
20 | #include <QDialog> |
|
20 | #include <QDialog> | |
21 | #include <QDialogButtonBox> |
|
21 | #include <QDialogButtonBox> | |
|
22 | #include <QKeyEvent> | |||
22 | #include <QListWidget> |
|
23 | #include <QListWidget> | |
23 | #include <QMessageBox> |
|
24 | #include <QMessageBox> | |
24 |
|
25 | |||
@@ -612,3 +613,15 void CatalogueEventsWidget::emitSelection() | |||||
612 | emit selectionCleared(); |
|
613 | emit selectionCleared(); | |
613 | } |
|
614 | } | |
614 | } |
|
615 | } | |
|
616 | ||||
|
617 | ||||
|
618 | void CatalogueEventsWidget::keyPressEvent(QKeyEvent *event) | |||
|
619 | { | |||
|
620 | switch (event->key()) { | |||
|
621 | case Qt::Key_Delete: { | |||
|
622 | ui->btnRemove->click(); | |||
|
623 | } | |||
|
624 | default: | |||
|
625 | break; | |||
|
626 | } | |||
|
627 | } |
@@ -12,6 +12,7 | |||||
12 | #include <ComparaisonPredicate.h> |
|
12 | #include <ComparaisonPredicate.h> | |
13 | #include <DBCatalogue.h> |
|
13 | #include <DBCatalogue.h> | |
14 |
|
14 | |||
|
15 | #include <QKeyEvent> | |||
15 | #include <QMenu> |
|
16 | #include <QMenu> | |
16 | #include <QMessageBox> |
|
17 | #include <QMessageBox> | |
17 | #include <QMimeData> |
|
18 | #include <QMimeData> | |
@@ -427,3 +428,15 bool CatalogueSideBarWidget::CatalogueSideBarWidgetPrivate::hasChanges(const QMo | |||||
427 | auto validationIndex = index.sibling(index.row(), (int)CatalogueTreeModel::Column::Validation); |
|
428 | auto validationIndex = index.sibling(index.row(), (int)CatalogueTreeModel::Column::Validation); | |
428 | return treeView->indexWidget(validationIndex) != nullptr; |
|
429 | return treeView->indexWidget(validationIndex) != nullptr; | |
429 | } |
|
430 | } | |
|
431 | ||||
|
432 | ||||
|
433 | void CatalogueSideBarWidget::keyPressEvent(QKeyEvent *event) | |||
|
434 | { | |||
|
435 | switch (event->key()) { | |||
|
436 | case Qt::Key_Delete: { | |||
|
437 | ui->btnRemove->click(); | |||
|
438 | } | |||
|
439 | default: | |||
|
440 | break; | |||
|
441 | } | |||
|
442 | } |
General Comments 0
You need to be logged in to leave comments.
Login now