#include "mainwindow.h"
#include "ui_mainwindow.h"
#include<QtDebug>
#include<iostream>
#include<QIcon>
#include<QPushButton>
#include<QLineEdit>
#include<QLabel>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
this->setFixedSize(400,360);
ui->setupUi(this);
this->setWindowIcon(QIcon("E:\\QTproject\\day1\\day1hk\\hk\\icon\\1.png"));
// this->setStyleSheet("background-color:rgb(222,222,222)");
this->setWindowTitle("combat simulator");
QPushButton *login = new QPushButton("login",this);
login->resize(80,30);
login->move(120,280);
login->setIcon(QIcon("E:\\QTproject\\day1\\day1hk\\hk\\icon\\2.png"));
QPushButton *cancel = new QPushButton("cancel",this);
cancel->resize(login->size());
cancel->move(login->x()+130,login->y());
cancel->setIcon(QIcon("E:\\QTproject\\day1\\day1hk\\hk\\icon\\cancel.png"));
QLineEdit *account= new QLineEdit(this);
account->resize(200,30);
account->move(login->x(), login->y()-120);
account->setPlaceholderText("please enter your account");
QLineEdit *password= new QLineEdit(this);
password->resize(200,30);
password->move(login->x(), login->y()-70);
password->setPlaceholderText("please enter your password");
QLabel *title = new QLabel(this);
title->resize(400,150);
title->setPixmap(QPixmap("E:\\QTproject\\day1\\day1hk\\hk\\title\\1.png"));
QLabel *accounticon = new QLabel(this);
accounticon->resize(30,30);
accounticon->move(account->x()-40,account->y());
accounticon->setPixmap(QPixmap("E:\\QTproject\\day1\\day1hk\\hk\\icon\\lock.png"));
accounticon->setScaledContents(true);
accounticon->setScaledContents(true);
QLabel *passwordicon = new QLabel(this);
passwordicon->resize(30,30);
passwordicon->move(password->x()-40,password->y());
passwordicon->setPixmap(QPixmap("E:\\QTproject\\day1\\day1hk\\hk\\icon\\lock glitch.png"));
passwordicon->setScaledContents(true);
passwordicon->setScaledContents(true);
}
MainWindow::~MainWindow()
{
delete ui;
}