-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IB-5908 Signed-off-by: Raul Metsma <[email protected]>
- Loading branch information
Showing
16 changed files
with
810 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#include "SmartIDDialog.h" | ||
#include "ui_SmartIDDialog.h" | ||
|
||
#include "Settings.h" | ||
#include "Styles.h" | ||
#include "effects/Overlay.h" | ||
|
||
SmartIDDialog::SmartIDDialog(QWidget *parent) | ||
: QDialog(parent) | ||
, ui(new Ui::SmartIDDialog) | ||
{ | ||
Overlay *overlay = new Overlay(parent->topLevelWidget()); | ||
overlay->show(); | ||
connect(this, &SmartIDDialog::destroyed, overlay, &Overlay::deleteLater); | ||
|
||
ui->setupUi(this); | ||
setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint ); | ||
setWindowModality( Qt::ApplicationModal ); | ||
setFixedSize( size() ); | ||
QFont condensed12 = Styles::font(Styles::Condensed, 12); | ||
QFont condensed14 = Styles::font(Styles::Condensed, 14); | ||
ui->labelPhone->setFont(condensed12); | ||
ui->idCode->setFont(condensed12); | ||
ui->sign->setFont(condensed14); | ||
ui->cancel->setFont(condensed14); | ||
ui->idCode->setText(Settings(qApp->applicationName()).value(QStringLiteral("SmartID")).toString()); | ||
connect(ui->sign, &QPushButton::clicked, this, &QDialog::accept); | ||
connect(ui->cancel, &QPushButton::clicked, this, &QDialog::reject); | ||
connect(ui->idCode, &QLineEdit::textEdited, this, [](const QString &text){ | ||
Settings(qApp->applicationName()).setValueEx(QStringLiteral("SmartID"), text, QString()); | ||
}); | ||
} | ||
|
||
SmartIDDialog::~SmartIDDialog() | ||
{ | ||
delete ui; | ||
} | ||
|
||
QString SmartIDDialog::country() const | ||
{ | ||
return QStringLiteral("EE"); | ||
} | ||
|
||
QString SmartIDDialog::idCode() const | ||
{ | ||
return ui->idCode->text(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include <QDialog> | ||
|
||
namespace Ui { class SmartIDDialog; } | ||
|
||
class SmartIDDialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit SmartIDDialog(QWidget *parent = nullptr); | ||
~SmartIDDialog() final; | ||
|
||
QString country() const; | ||
QString idCode() const; | ||
|
||
private: | ||
Ui::SmartIDDialog *ui; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,217 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>SmartIDDialog</class> | ||
<widget class="QDialog" name="SmartIDDialog"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>380</width> | ||
<height>282</height> | ||
</rect> | ||
</property> | ||
<property name="windowTitle"> | ||
<string notr="true">Smart-ID</string> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">QDialog { | ||
border-radius: 2px; | ||
background-color: #FFFFFF; | ||
} | ||
QLineEdit, QComboBox { | ||
padding: 0px 10px; | ||
border: 1px solid #DEE4E9; | ||
border-radius: 2px; | ||
}</string> | ||
</property> | ||
<layout class="QVBoxLayout" name="SmartIDDialogLayout"> | ||
<property name="spacing"> | ||
<number>0</number> | ||
</property> | ||
<property name="leftMargin"> | ||
<number>50</number> | ||
</property> | ||
<property name="topMargin"> | ||
<number>30</number> | ||
</property> | ||
<property name="rightMargin"> | ||
<number>50</number> | ||
</property> | ||
<property name="bottomMargin"> | ||
<number>30</number> | ||
</property> | ||
<item> | ||
<spacer name="topSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>67</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<widget class="QLabel" name="labelPhone"> | ||
<property name="font"> | ||
<font> | ||
<family>Roboto Condensed</family> | ||
<pointsize>12</pointsize> | ||
</font> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">color: #353739;</string> | ||
</property> | ||
<property name="text"> | ||
<string>Personal code</string> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="idCodeLayout" stretch="0,1"> | ||
<item> | ||
<widget class="QComboBox" name="idCodeCountry"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>0</width> | ||
<height>34</height> | ||
</size> | ||
</property> | ||
<item> | ||
<property name="text"> | ||
<string notr="true">EE</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string notr="true">LT</string> | ||
</property> | ||
</item> | ||
<item> | ||
<property name="text"> | ||
<string notr="true">LV</string> | ||
</property> | ||
</item> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QLineEdit" name="idCode"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>0</width> | ||
<height>34</height> | ||
</size> | ||
</property> | ||
<property name="placeholderText"> | ||
<string notr="true">47101010033</string> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
<item> | ||
<spacer name="bottomSpacer"> | ||
<property name="orientation"> | ||
<enum>Qt::Vertical</enum> | ||
</property> | ||
<property name="sizeHint" stdset="0"> | ||
<size> | ||
<width>20</width> | ||
<height>66</height> | ||
</size> | ||
</property> | ||
</spacer> | ||
</item> | ||
<item> | ||
<layout class="QHBoxLayout" name="buttonLayout"> | ||
<property name="spacing"> | ||
<number>40</number> | ||
</property> | ||
<item> | ||
<widget class="QPushButton" name="cancel"> | ||
<property name="enabled"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>120</width> | ||
<height>30</height> | ||
</size> | ||
</property> | ||
<property name="font"> | ||
<font> | ||
<pointsize>14</pointsize> | ||
</font> | ||
</property> | ||
<property name="cursor"> | ||
<cursorShape>PointingHandCursor</cursorShape> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">QPushButton { | ||
border-radius: 2px; | ||
border: none; | ||
color: #ffffff; | ||
background-color: #981E32; | ||
} | ||
QPushButton:pressed { | ||
background-color: #F24A66; | ||
} | ||
QPushButton:hover:!pressed { | ||
background-color: #CD2541; | ||
}</string> | ||
</property> | ||
<property name="text"> | ||
<string>CANCEL</string> | ||
</property> | ||
<property name="autoDefault"> | ||
<bool>false</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
<item> | ||
<widget class="QPushButton" name="sign"> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>120</width> | ||
<height>30</height> | ||
</size> | ||
</property> | ||
<property name="font"> | ||
<font> | ||
<pointsize>14</pointsize> | ||
</font> | ||
</property> | ||
<property name="styleSheet"> | ||
<string notr="true">QPushButton { | ||
border-radius: 2px; | ||
border: none; | ||
color: #ffffff; | ||
background-color: #006EB5; | ||
} | ||
QPushButton:pressed { | ||
background-color: #41B6E6; | ||
} | ||
QPushButton:hover:!pressed { | ||
background-color: #008DCF; | ||
} | ||
QPushButton:disabled { | ||
background-color: #BEDBED; | ||
}</string> | ||
</property> | ||
<property name="text"> | ||
<string>SIGN</string> | ||
</property> | ||
<property name="default"> | ||
<bool>true</bool> | ||
</property> | ||
</widget> | ||
</item> | ||
</layout> | ||
</item> | ||
</layout> | ||
</widget> | ||
<resources/> | ||
<connections/> | ||
</ui> |
Oops, something went wrong.