Merge branch 'main' into FixedAdding

This commit is contained in:
Daniil 2025-02-12 21:45:05 +03:00
commit bf940a5766
5 changed files with 151 additions and 5 deletions

View File

@ -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);
}

View File

@ -3,6 +3,7 @@
#include <QMainWindow>
#include "genpass.h"
#include "cryptographer.h"
//# include"recordmodificationdialog.h"
//#include "addst.h"
#include"adddialog.h"

View File

@ -31,7 +31,7 @@
<bool>false</bool>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="editRecordPage">
<widget class="QPushButton" name="pushButton_6">
@ -619,13 +619,123 @@
</property>
</widget>
</widget>
<widget class="QWidget" name="page_7">
<widget class="QLabel" name="label_23">
<property name="geometry">
<rect>
<x>260</x>
<y>120</y>
<width>67</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Путь:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_21">
<property name="geometry">
<rect>
<x>360</x>
<y>120</y>
<width>511</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_22">
<property name="geometry">
<rect>
<x>250</x>
<y>190</y>
<width>67</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Пароль:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_23">
<property name="geometry">
<rect>
<x>360</x>
<y>190</y>
<width>511</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_17">
<property name="geometry">
<rect>
<x>180</x>
<y>260</y>
<width>191</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Подтвердите пароль:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_20">
<property name="geometry">
<rect>
<x>360</x>
<y>260</y>
<width>511</width>
<height>25</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton_11">
<property name="geometry">
<rect>
<x>270</x>
<y>360</y>
<width>141</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Создать</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_10">
<property name="geometry">
<rect>
<x>530</x>
<y>360</y>
<width>141</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Разблокировать</string>
</property>
</widget>
<widget class="QLabel" name="label_13">
<property name="geometry">
<rect>
<x>430</x>
<y>50</y>
<width>141</width>
<height>17</height>
</rect>
</property>
<property name="text">
<string>Создать новую БД</string>
</property>
</widget>
</widget>
</widget>
<widget class="QTableView" name="tableView_2">
<property name="geometry">
<rect>
<x>10</x>
<y>0</y>
<width>781</width>
<width>1001</width>
<height>41</height>
</rect>
</property>

View File

@ -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,

View File

@ -1 +1,6 @@
# password_manager
# Credentials Manager
## Origin: password_manager
Install requirements:
`sudo apt-get install libcrypto++-dev libcrypto++-doc libcrypto++-utils`