FixedAdding #1
@ -16,7 +16,7 @@ AddC::~AddC()
|
||||
|
||||
void AddC::on_pushButton_clicked()//save
|
||||
{
|
||||
emit sendCard(new Card(ui->Title->text(), ui->NumberCard->text(), ui->Name->text(), ui->month->text(), ui->year->text(),ui->CVV->text(),ui->PIN->text(), ui->note->text(), QString("true")));//отправляет сигнал с текстом
|
||||
emit sendCard(new Card(ui->Title->text(), ui->NumberCard->text(), ui->Name->text(), ui->month->text(), ui->year->text(),ui->CVV->text(),ui->PIN->text(), ui->note->toPlainText(), QString("true")));//отправляет сигнал с текстом
|
||||
//m->putRecord(new Record(ui->nameLine->text(), ui->usernameLine->text(), ui->createPassword->text(), ui->urlLine->text(), ui->noteLine->text()));
|
||||
ui->Title->setText("");
|
||||
ui->NumberCard->setText("");
|
||||
|
||||
@ -42,9 +42,9 @@
|
||||
<widget class="QLineEdit" name="NumberCard">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>100</y>
|
||||
<width>231</width>
|
||||
<x>30</x>
|
||||
<y>110</y>
|
||||
<width>241</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -52,8 +52,8 @@
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<y>70</y>
|
||||
<x>40</x>
|
||||
<y>80</y>
|
||||
<width>111</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
@ -62,123 +62,16 @@
|
||||
<string>номер карты</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>220</x>
|
||||
<y>220</y>
|
||||
<width>21</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>до</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="Name">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<x>30</x>
|
||||
<y>200</y>
|
||||
<width>121</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>150</y>
|
||||
<width>31</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>CVV:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="CVV">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>470</x>
|
||||
<y>150</y>
|
||||
<width>51</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>380</x>
|
||||
<y>230</y>
|
||||
<width>67</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PIN:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="PIN">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>440</x>
|
||||
<y>220</y>
|
||||
<width>113</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>210</y>
|
||||
<width>105</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="month"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="year"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="Title">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>450</x>
|
||||
<y>70</y>
|
||||
<width>113</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>370</x>
|
||||
<y>70</y>
|
||||
<width>67</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>название</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@ -205,16 +98,118 @@
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="note">
|
||||
<widget class="QTextEdit" name="note">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>330</y>
|
||||
<width>551</width>
|
||||
<height>26</height>
|
||||
<y>320</y>
|
||||
<width>541</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>210</y>
|
||||
<width>121</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>PIN:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="PIN"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>139</y>
|
||||
<width>101</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_21">
|
||||
<property name="text">
|
||||
<string>CVV:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="CVV"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>70</y>
|
||||
<width>181</width>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string>название:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="Title"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="horizontalLayoutWidget_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>190</y>
|
||||
<width>165</width>
|
||||
<height>41</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>до</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="month"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>/</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="year"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@ -11,6 +11,7 @@ AddDialog::AddDialog(QWidget *parent) :
|
||||
ui->setupUi(this);
|
||||
setWindowTitle("Новая запись");
|
||||
ui->pushButton->setIcon(QIcon("/home/daniil/passmanOLD/password_manager/PasswordManager/resource/refresh-arrow_icon-icons.com_73442.png"));
|
||||
connect(ui->createPassword,SIGNAL(showPw(QString)),this,SLOT(genPw(QString)));
|
||||
}
|
||||
|
||||
AddDialog::~AddDialog()
|
||||
@ -26,6 +27,11 @@ AddDialog::~AddDialog()
|
||||
// return r;
|
||||
//}
|
||||
|
||||
void AddDialog::showPw(QString tx){
|
||||
ui->createPassword->setText(tx);
|
||||
}
|
||||
|
||||
|
||||
void AddDialog::on_pushButton_clicked()
|
||||
{
|
||||
/*
|
||||
@ -61,8 +67,6 @@ void AddDialog::on_pushButton_clicked()
|
||||
ui->createPassword->setText(npasw);
|
||||
*/
|
||||
|
||||
|
||||
|
||||
genpass.show();
|
||||
|
||||
}
|
||||
@ -75,7 +79,7 @@ void AddDialog::on_pushButton_2_clicked()
|
||||
}
|
||||
|
||||
|
||||
void AddDialog::on_pushButton_3_clicked()
|
||||
void AddDialog::on_pushButton_3_clicked()//button save
|
||||
{
|
||||
emit sendText(new Record(ui->nameLine->text(), ui->usernameLine->text(), ui->createPassword->text(), ui->createURL->text(), ui->noteLine->text(), QString::fromStdString("true")));//отправляет сигнал с текстом
|
||||
//m->putRecord(new Record(ui->nameLine->text(), ui->usernameLine->text(), ui->createPassword->text(), ui->urlLine->text(), ui->noteLine->text()));
|
||||
|
||||
@ -25,17 +25,20 @@ public:
|
||||
signals:
|
||||
void sendText(Record *r); //сигнал отправляет текст из LineEdit
|
||||
private slots:
|
||||
void showPw(QString tx);
|
||||
void on_pushButton_clicked();
|
||||
|
||||
void on_pushButton_2_clicked();
|
||||
|
||||
void on_pushButton_3_clicked();
|
||||
|
||||
|
||||
private:
|
||||
Ui::AddDialog *ui;
|
||||
GenPass genpass;
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // ADDDIALOG_H
|
||||
|
||||
@ -20,6 +20,7 @@ GenPass::GenPass(QWidget *parent) :
|
||||
ui->pushButton_3->setIcon(QIcon("/home/daniil/passman1/password_manager/PasswordManager/resource/view_show_icon_124811.png"));
|
||||
ui->ReFresher->setIcon(QIcon("/home/daniil/passmanOLD/password_manager/PasswordManager/resource/refresh-arrow_icon-icons.com_73442.png"));
|
||||
ui->Copy->setIcon(QIcon("/home/daniil/passmanOLD/password_manager/PasswordManager/resource/edit_copy_icon_124983.png"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -37,6 +38,8 @@ void GenPass::on_pushButton_2_clicked()
|
||||
|
||||
void GenPass::on_pushButton_clicked()
|
||||
{
|
||||
emit genPw(ui->lineEdit->text());
|
||||
this->close();
|
||||
|
||||
}
|
||||
|
||||
@ -123,9 +126,6 @@ void GenPass::on_SizeL_cursorPositionChanged(int arg1, int arg2)
|
||||
|
||||
//void GenPass::on_spinBox_textChanged(const QString &arg1)
|
||||
//{
|
||||
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
@ -15,6 +15,10 @@ public:
|
||||
explicit GenPass(QWidget *parent = nullptr);
|
||||
~GenPass();
|
||||
|
||||
signals:
|
||||
|
||||
void genPw(QString tx);// signsl send text from lineedit
|
||||
|
||||
private slots:
|
||||
void on_pushButton_2_clicked();
|
||||
QString NewRandPassword();
|
||||
|
||||
@ -133,7 +133,7 @@
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>260</x>
|
||||
<x>180</x>
|
||||
<y>230</y>
|
||||
<width>61</width>
|
||||
<height>25</height>
|
||||
@ -143,19 +143,6 @@
|
||||
<string>ok</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
<y>230</y>
|
||||
<width>89</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>закрыть</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
||||
@ -808,9 +808,26 @@ void MainWindow::on_pushButton_12_clicked()
|
||||
ui->yearLine->setText(crypto->decryptToString(c->getYear()));
|
||||
ui->cvvLine->setText(crypto->decryptToString(c->getCVV()));
|
||||
ui->pinLine->setText(crypto->decryptToString(c->getPIN()));
|
||||
ui->noteLine->setText(c->getNote());
|
||||
ui->textEdit->setText(c->getNote());
|
||||
ui->stackedWidget->setCurrentIndex(1);
|
||||
|
||||
/*
|
||||
int num = ui->tableViewRecords->currentIndex().row();
|
||||
qDebug() << ++num;
|
||||
Record* r = getRecord(num);
|
||||
QString password = crypto->decryptToString(r->getPassword());
|
||||
ui->lineEdit_name->setText(r->getName());
|
||||
ui->lineEdit_username->setText(r->getUsername());
|
||||
ui->lineEdit_password->setText(password);
|
||||
ui->lineEdit_url->setText(r->getURL());
|
||||
ui->lineEdit_note->setText(r->getNote());
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -897,3 +914,19 @@ void MainWindow::on_directoriesList_clicked(const QModelIndex &index)
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_pushButton_2_clicked()// find card
|
||||
{
|
||||
qDebug() << "filtering card...";
|
||||
// model->setFilter(QString("USERNAME="+ ui->lineEdit_6->text() +"OR PASSWORD="+ ui->lineEdit_6->text()));
|
||||
QString f = QString("title LIKE '%");
|
||||
f+= ui->lineEdit_6->text() + QString("%'") + QString(" OR name LIKE '%") + ui->lineEdit_6->text() + QString("%'");
|
||||
f+= QString(" OR number LIKE '%") + ui->lineEdit_6->text() + QString("%'");
|
||||
f+= QString(" OR month LIKE '%") + ui->lineEdit_6->text() + QString("%'");
|
||||
f+= QString(" OR year LIKE '%") + ui->lineEdit_6->text() + QString("%'");
|
||||
f+= QString(" OR note LIKE '%") + ui->lineEdit_6->text() + QString("%'");
|
||||
qDebug() << f;
|
||||
cardsModel->setFilter(f);
|
||||
cardsModel->select();
|
||||
}
|
||||
|
||||
|
||||
@ -130,5 +130,6 @@ private slots:
|
||||
void on_cardEditCancelButton_clicked();
|
||||
void on_addDirectoryButton_clicked();
|
||||
void on_directoriesList_clicked(const QModelIndex &index);
|
||||
void on_pushButton_2_clicked();
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
@ -142,7 +142,7 @@
|
||||
<rect>
|
||||
<x>240</x>
|
||||
<y>30</y>
|
||||
<width>291</width>
|
||||
<width>321</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -174,7 +174,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>280</y>
|
||||
<y>300</y>
|
||||
<width>131</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
@ -183,9 +183,9 @@
|
||||
<widget class="QWidget" name="horizontalLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>318</x>
|
||||
<y>280</y>
|
||||
<width>111</width>
|
||||
<x>280</x>
|
||||
<y>300</y>
|
||||
<width>139</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -208,10 +208,10 @@
|
||||
<widget class="QWidget" name="gridLayoutWidget_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>470</x>
|
||||
<y>170</y>
|
||||
<x>460</x>
|
||||
<y>120</y>
|
||||
<width>281</width>
|
||||
<height>161</height>
|
||||
<height>241</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
@ -245,16 +245,19 @@
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="cvvLine"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="noteLine"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_28">
|
||||
<property name="text">
|
||||
<string>Примечание</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QTextEdit" name="textEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_25">
|
||||
@ -273,8 +276,8 @@
|
||||
<widget class="QLabel" name="label_27">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>280</x>
|
||||
<y>280</y>
|
||||
<x>250</x>
|
||||
<y>300</y>
|
||||
<width>31</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
@ -312,8 +315,8 @@
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
<y>250</y>
|
||||
<x>100</x>
|
||||
<y>270</y>
|
||||
<width>111</width>
|
||||
<height>18</height>
|
||||
</rect>
|
||||
@ -680,7 +683,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>804</width>
|
||||
<height>23</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
<x>-30</x>
|
||||
<y>110</y>
|
||||
<width>340</width>
|
||||
<height>61</height>
|
||||
@ -47,7 +47,7 @@
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>60</y>
|
||||
<width>331</width>
|
||||
<width>291</width>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user