mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-11-21 09:31:32 -08:00
Confirmation dialog to list entries.
This commit is contained in:
1 parent
eef51f26f0
commit
ad67eac257
8 files changed
+414
-23
No files matched your search
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
***************************************************************************
|
||||
* @file AccessControlDialog.cpp
|
||||
*
|
||||
* @brief
|
||||
*
|
||||
* Copyright (C) 2013
|
||||
*
|
||||
* @author Francois Ferrand
|
||||
* @date 4/2013
|
||||
***************************************************************************
|
||||
*/
|
||||
|
||||
#include "AccessControlDialog.h"
|
||||
#include "ui_AccessControlDialog.h"
|
||||
#include "core/Entry.h"
|
||||
|
||||
AccessControlDialog::AccessControlDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::AccessControlDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->allowButton, SIGNAL(clicked()), this, SLOT(accept()));
|
||||
connect(ui->denyButton, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
}
|
||||
|
||||
AccessControlDialog::~AccessControlDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void AccessControlDialog::setUrl(const QString &url)
|
||||
{
|
||||
ui->label->setText(QString(tr("%1 has requested access to passwords for the following item(s).\n"
|
||||
"Please select whether you want to allow access.")).arg(QUrl(url).host()));
|
||||
}
|
||||
|
||||
void AccessControlDialog::setItems(const QList<Entry *> &items)
|
||||
{
|
||||
Q_FOREACH (Entry * entry, items)
|
||||
ui->itemsList->addItem(entry->title() + " - " + entry->username());
|
||||
}
|
||||
|
||||
bool AccessControlDialog::remember() const
|
||||
{
|
||||
return ui->rememberDecisionCheckBox->isChecked();
|
||||
}
|
||||
|
||||
void AccessControlDialog::setRemember(bool r)
|
||||
{
|
||||
ui->rememberDecisionCheckBox->setChecked(r);
|
||||
}
|
||||
Reference in new issue
Block a user