пока не работает проблема с линковкой класса логин
This commit is contained in:
parent
c38f00cd5a
commit
9032d59e79
@ -26,11 +26,13 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||
SOURCES += main.cpp\
|
||||
boss.cpp \
|
||||
pcore.cpp \
|
||||
conmenu.cpp
|
||||
conmenu.cpp \
|
||||
login.cpp
|
||||
|
||||
HEADERS += boss.h \
|
||||
pcore.h \
|
||||
conmenu.h
|
||||
conmenu.h \
|
||||
login.h
|
||||
|
||||
DISTFILES += \
|
||||
README.md
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.2.0, 2017-12-17T19:49:45. -->
|
||||
<!-- Written by QtCreator 4.2.0, 2017-12-18T00:42:22. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@ -54,7 +54,9 @@
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||
<valuemap type="QVariantMap"/>
|
||||
<valuemap type="QVariantMap">
|
||||
<valuelist type="QVariantList" key="ClangStaticAnalyzer.SuppressedDiagnostics"/>
|
||||
</valuemap>
|
||||
</data>
|
||||
<data>
|
||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||
@ -62,7 +64,7 @@
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.7.1 MSVC2015_64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.7.1 MSVC2015_64bit</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.57.win64_msvc2015_64_kit</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "conmenu.h"
|
||||
#include "login.h"
|
||||
#include <QDebug>
|
||||
#include <QtGui>
|
||||
#include <QBoxLayout>
|
||||
@ -21,6 +22,9 @@ conmenu::conmenu()
|
||||
core->addPass(tr("domain"),tr("lUserName"),tr("infa(url, path, other desc)"),tr("pass(2r3tgwe454hb3f4)"));//временая костыля
|
||||
|
||||
//инициализация класса входа и отображения окна
|
||||
logcore = new login();
|
||||
//login.createLogIn();
|
||||
logcore->createLogIn();
|
||||
|
||||
boss->addLayout(cont);
|
||||
boss->addStretch();
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
|
||||
class QBoxLayout;
|
||||
class QHBoxLayout;
|
||||
class login;
|
||||
|
||||
class conmenu : public QDialog
|
||||
{
|
||||
@ -15,6 +16,8 @@ class conmenu : public QDialog
|
||||
public:
|
||||
conmenu();
|
||||
~conmenu();
|
||||
private:
|
||||
login *logcore;
|
||||
protected:
|
||||
PCore *core;
|
||||
QHBoxLayout *cont;
|
||||
|
||||
94
login.cpp
Normal file
94
login.cpp
Normal file
@ -0,0 +1,94 @@
|
||||
#include "login.h"
|
||||
#include <QDebug>
|
||||
#include <QBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
|
||||
login::login()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
login::~login()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void login::createLogIn()
|
||||
{
|
||||
lform = new QWidget(this);
|
||||
lform->setMinimumHeight(470);
|
||||
|
||||
QHBoxLayout *bb = new QHBoxLayout(lform);
|
||||
bb->setMargin(0);
|
||||
bb->addStretch();//left padding
|
||||
|
||||
QWidget *form = new QWidget(lform);
|
||||
|
||||
QVBoxLayout *linesl = new QVBoxLayout(form);
|
||||
linesl->setMargin(0);
|
||||
linesl->addStretch();//upper padding
|
||||
|
||||
QLabel *llogin = new QLabel("Username:", form);//login
|
||||
linesl->addWidget(llogin);
|
||||
QLineEdit *elogin = new QLineEdit(form);
|
||||
linesl->addWidget(elogin);
|
||||
|
||||
QLabel *lpas = new QLabel("Password:", form);
|
||||
linesl->addWidget(lpas);
|
||||
QLineEdit *epas = new QLineEdit(form);
|
||||
epas->setEchoMode(QLineEdit::Password);
|
||||
linesl->addWidget(epas);
|
||||
|
||||
linesl->addSpacing(20);
|
||||
|
||||
QHBoxLayout *fcontr = new QHBoxLayout(form);
|
||||
fcontr->addStretch();
|
||||
QVBoxLayout *lr = new QVBoxLayout(form);
|
||||
QPushButton *blogin = new QPushButton("LogIn", form);
|
||||
blogin->setCursor(Qt::PointingHandCursor);
|
||||
blogin->setStyleSheet("QPushButton{"
|
||||
"border: 1px solid #000; height: 30px; width: 70px;"
|
||||
"}"
|
||||
"QPushButton:hover{"
|
||||
"border: 1px solid #0000aa;"
|
||||
"}");
|
||||
connect(blogin, SIGNAL(clicked(bool)), this, SLOT(slogin()));
|
||||
lr->addWidget(blogin);
|
||||
|
||||
QPushButton *lreg = new QPushButton("New account", form);
|
||||
lreg->setCursor(Qt::PointingHandCursor);
|
||||
lreg->setStyleSheet("QPushButton{"
|
||||
"text-decoration: underline;"
|
||||
"border: none;"
|
||||
"}"
|
||||
"QPushButton:hover{"
|
||||
"color: #0000aa;"
|
||||
"}");
|
||||
connect(lreg, SIGNAL(clicked(bool)), this, SLOT(newacc()));
|
||||
lr->addWidget(lreg);
|
||||
|
||||
fcontr->addLayout(lr);
|
||||
fcontr->addStretch();
|
||||
linesl->addLayout(fcontr);
|
||||
|
||||
linesl->addStretch();//bottom padding
|
||||
|
||||
form->setLayout(linesl);
|
||||
bb->addWidget(form);
|
||||
|
||||
bb->addStretch();//right padding
|
||||
lform->setLayout(bb);
|
||||
cont->addWidget(lform);
|
||||
}
|
||||
|
||||
void login::slogin()
|
||||
{
|
||||
qDebug()<<"login";
|
||||
}
|
||||
|
||||
void login::newacc()
|
||||
{
|
||||
qDebug()<<"registration";
|
||||
}
|
||||
Reference in New Issue
Block a user