Style Beginnings

This commit is contained in:
AJ
2024-06-20 16:15:40 +02:00
parent d38da91903
commit ff7f4e1177
3 changed files with 73 additions and 8 deletions

View File

@@ -3,5 +3,6 @@
LoginFrameController::LoginFrameController(std::string id, std::string password) LoginFrameController::LoginFrameController(std::string id, std::string password)
:id_m(id), passwort_m(password) :id_m(id), passwort_m(password)
{ {
//try Login //DatabaseHandler dbHandler = new Databasehandler();
//dbHandler.CheckValidLogin();
} }

View File

@@ -3,24 +3,87 @@
LoginFrame::LoginFrame(QWidget* parent) LoginFrame::LoginFrame(QWidget* parent)
:QFrame(parent) :QFrame(parent)
{ {
header_m = new QLabel("Login", this); //configure LoginFrame
setObjectName("LoginFrame");
setStyleSheet(R"(
#LoginFrame{
background-color: #212121;
border: none;
}
)");
setFrameStyle(QFrame::Box);
//create QWidgets and add LoginFrame as parent
header_m = new QLabel("Einsatzplan", this);
header_m->setFrameStyle(QFrame::Box); header_m->setFrameStyle(QFrame::Box);
header_m->setGeometry(100,100,200,50); header_m->setAlignment(Qt::AlignCenter);
header_m->setObjectName("Header");
header_m->setStyleSheet(R"(
#Header{
color: #93F8FF;
font-size: 36px;
font-weight: bold;
border: none;
}
)");
header_m->show(); header_m->show();
id_m = new QLineEdit("ID...", this); id_m = new QLineEdit("ID...", this);
id_m->setGeometry(100,200,200,50); id_m->setObjectName("ID");
id_m->setStyleSheet(R"(
#ID{
color: #93F8FF;
font-size: 25px;
font-weight: bold;
border: none;
}
)");
id_m->show(); id_m->show();
password_m = new QLineEdit("Passwort...",this); password_m = new QLineEdit("Passwort...",this);
password_m->setGeometry(100,300,200,50); password_m->setObjectName("Password");
password_m->setStyleSheet(R"(
#Password{
color: #93F8FF;
font-size: 25px;
font-weight: bold;
border: none;
}
)");
password_m->show(); password_m->show();
loginButton_m = new QPushButton("Login",this); loginButton_m = new QPushButton("Login",this);
loginButton_m->setGeometry(100,400,200,50); loginButton_m->setObjectName("loginButton");
loginButton_m->setStyleSheet(R"(
#loginButton{
color: #212121;
font-size: 30px;
font-weight: bold;
background-color: #00C800;
}
)");
loginButton_m->show(); loginButton_m->show();
setFrameStyle(QFrame::Box | QFrame::Plain);
setLineWidth(5);
//create layout
QVBoxLayout* layout = new QVBoxLayout();
layout->addStretch(1);
layout->addWidget(header_m);
header_m->setAlignment(Qt::AlignHCenter);
layout->addStretch(2);
layout->addWidget(id_m);
id_m->setAlignment(Qt::AlignHCenter);
layout->addStretch(1);
layout->addWidget(password_m);
password_m->setAlignment(Qt::AlignHCenter);
layout->addStretch(2);
layout->addWidget(loginButton_m);
layout->addStretch(1);
//add Layout to LoginFrame
setLayout(layout);
} }

View File

@@ -4,6 +4,7 @@
# include <QPushButton> # include <QPushButton>
# include <QInputDialog> # include <QInputDialog>
# include <QLabel> # include <QLabel>
# include <QVBoxLayout>
class LoginFrame : public QFrame{ class LoginFrame : public QFrame{
Q_OBJECT Q_OBJECT