Add a function to database widget to access enabled state of actions.

This commit is contained in:
Florian Geyer 2012-05-26 19:40:02 +02:00
parent 267e88001b
commit 4751f40c2b
3 changed files with 51 additions and 13 deletions

View file

@ -47,6 +47,18 @@ public:
ViewMode,
EditMode
};
enum Action
{
GroupNew,
GroupEdit,
GroupDelete,
EntryNew,
EntryClone,
EntryEditView,
EntryDelete,
EntryCopyUsername,
EntryCopyPassword
};
explicit DatabaseWidget(Database* db, QWidget* parent = 0);
~DatabaseWidget();
@ -57,6 +69,7 @@ public:
int addWidget(QWidget* w);
void setCurrentIndex(int index);
DatabaseWidget::Mode currentMode();
bool actionEnabled(Action action);
Q_SIGNALS:
void closeRequest();