diff --git a/PasswordManager/mainwindow.cpp b/PasswordManager/mainwindow.cpp index c121b6b..ab14e75 100644 --- a/PasswordManager/mainwindow.cpp +++ b/PasswordManager/mainwindow.cpp @@ -732,8 +732,16 @@ void MainWindow::on_actionExit_triggered() QCoreApplication::quit(); } -void MainWindow::on_actionblakc_triggered() + + + + +void MainWindow::on_action_triggered() { + ui->stackedWidget->setCurrentIndex(1); + +} + } @@ -1080,4 +1088,25 @@ void MainWindow::on_pushButton_8_clicked() } +void MainWindow::deleteRecordSlot(bool flag) +{ + deleteRecord(); +} + +void MainWindow::on_editSaveButton_clicked() +{ + Record* r = new Record(); + r->setId(ui->tableViewRecords->selectionModel()->selection().indexes().at(0).row()); + r->setName(ui->lineEdit_name->text()); + r->setUsername(ui->lineEdit_username->text()); + r->setPassword(ui->lineEdit_password->text()); + r->setURL(ui->lineEdit_url->text()); + r->setNote(ui->lineEdit_note->text()); + updateRecord(r); + model->select(); + ui->stackedWidget->setCurrentIndex(0); + QModelIndex index = ui->tableViewRecords->model()->index(r->getId(), 0); + ui->tableViewRecords->setCurrentIndex(index); + +} diff --git a/PasswordManager/mainwindow.h b/PasswordManager/mainwindow.h index ff7813f..f572cf8 100644 --- a/PasswordManager/mainwindow.h +++ b/PasswordManager/mainwindow.h @@ -3,6 +3,7 @@ #include #include "genpass.h" +#include "cryptographer.h" //# include"recordmodificationdialog.h" //#include "addst.h" #include"adddialog.h" diff --git a/PasswordManager/mainwindow.ui b/PasswordManager/mainwindow.ui index b2fd9a8..19dd7ee 100644 --- a/PasswordManager/mainwindow.ui +++ b/PasswordManager/mainwindow.ui @@ -31,7 +31,7 @@ false - 2 + 0 @@ -619,13 +619,123 @@ + + + + + 260 + 120 + 67 + 17 + + + + Путь: + + + + + + 360 + 120 + 511 + 25 + + + + + + + 250 + 190 + 67 + 17 + + + + Пароль: + + + + + + 360 + 190 + 511 + 25 + + + + + + + 180 + 260 + 191 + 20 + + + + Подтвердите пароль: + + + + + + 360 + 260 + 511 + 25 + + + + + + + 270 + 360 + 141 + 31 + + + + Создать + + + + + + 530 + 360 + 141 + 31 + + + + Разблокировать + + + + + + 430 + 50 + 141 + 17 + + + + Создать новую БД + + + 10 0 - 781 + 1001 41 diff --git a/PasswordManager/record.cpp b/PasswordManager/record.cpp index 359c740..d78155e 100644 --- a/PasswordManager/record.cpp +++ b/PasswordManager/record.cpp @@ -64,7 +64,8 @@ Record::Record(QString name, this->note = note; this->time = QDateTime::currentDateTime(); } -Record::Record(QString name, +Record::Record(int id, + QString name, QString username, QString password, QString URL, diff --git a/README.md b/README.md index 7eab806..61409cb 100644 --- a/README.md +++ b/README.md @@ -1 +1,6 @@ -# password_manager \ No newline at end of file +# Credentials Manager + +## Origin: password_manager + +Install requirements: +`sudo apt-get install libcrypto++-dev libcrypto++-doc libcrypto++-utils`