!105 fix InfoCreateWidget UI
Merge pull request !105 from likehomedream/UIFIX
This commit is contained in:
commit
a36b03c37b
|
@ -1,10 +1,13 @@
|
|||
#include "infocreatewidget.h"
|
||||
|
||||
//create theme info graphical interface
|
||||
InfoCreateWidget::InfoCreateWidget(QWidget *parent, const QString &m_state) : QWidget(parent)
|
||||
InfoCreateWidget::InfoCreateWidget(QWidget *parent, const QString &m_state) :
|
||||
kdk::KDialog(parent)
|
||||
{
|
||||
QWidget*mainwindow = mainWidget();
|
||||
this->setFixedSize(424,404);
|
||||
this->setWindowModality(Qt::ApplicationModal);
|
||||
this->setFocus();
|
||||
|
||||
InitThemeName();
|
||||
InitBuilderInfo();
|
||||
|
@ -19,19 +22,38 @@ InfoCreateWidget::InfoCreateWidget(QWidget *parent, const QString &m_state) : QW
|
|||
m_warningMessage3->setText("");
|
||||
m_warningMessage4 = new QLabel();
|
||||
m_warningMessage4->setText("");
|
||||
m_warningMessage->setFixedHeight(20);
|
||||
m_warningMessage2->setFixedHeight(20);
|
||||
m_warningMessage3->setFixedHeight(20);
|
||||
m_warningMessage4->setFixedHeight(20);
|
||||
QFont font("Arial", 12);
|
||||
m_warningMessage->setFont(font);
|
||||
m_warningMessage2->setFont(font);
|
||||
m_warningMessage3->setFont(font);
|
||||
m_warningMessage4->setFont(font);
|
||||
|
||||
QVBoxLayout *m_infoCreateLayout = new QVBoxLayout(this);
|
||||
QPushButton *line = new QPushButton();
|
||||
line->setDisabled(true);
|
||||
line->setFixedHeight(1);
|
||||
QPushButton *line1 = new QPushButton();
|
||||
line1->setDisabled(true);
|
||||
line1->setFixedHeight(1);
|
||||
|
||||
QVBoxLayout *m_infoCreateLayout = new QVBoxLayout(mainwindow);
|
||||
m_infoCreateLayout->addLayout(m_themeNameCNLayout);
|
||||
m_infoCreateLayout->addWidget(m_warningMessage);
|
||||
m_infoCreateLayout->addLayout(m_themeNameENLayout);
|
||||
m_infoCreateLayout->addWidget(m_warningMessage2);
|
||||
m_infoCreateLayout->addWidget(line);
|
||||
m_infoCreateLayout->addLayout(m_builderNameLayout);
|
||||
m_infoCreateLayout->addWidget(m_warningMessage3);
|
||||
m_infoCreateLayout->addLayout(m_builderMailLayout);
|
||||
m_infoCreateLayout->addWidget(m_warningMessage4);
|
||||
m_infoCreateLayout->addWidget(line1);
|
||||
m_infoCreateLayout->addLayout(m_infoBtnLayout);
|
||||
|
||||
this->setLayout(m_infoCreateLayout);
|
||||
mainwindow->setContentsMargins(24,0,24,24);
|
||||
// this->setLayout(m_infoCreateLayout);
|
||||
}
|
||||
|
||||
void InfoCreateWidget::InitThemeName(){
|
||||
|
@ -39,7 +61,9 @@ void InfoCreateWidget::InitThemeName(){
|
|||
m_themeNameCNLayout = new QHBoxLayout();
|
||||
m_themeNameCNLabel = new QLabel();
|
||||
m_themeNameCNLineEdit = new QLineEdit();
|
||||
m_themeNameCNLineEdit->setFixedSize(248,36);
|
||||
m_themeNameCNLabel->setText(tr("ThemeName-CN"));
|
||||
m_themeNameCNLabel->setFixedWidth(100);
|
||||
m_themeNameCNLineEdit->setEchoMode(QLineEdit::Normal);
|
||||
|
||||
m_themeNameCNLayout->addWidget(m_themeNameCNLabel);
|
||||
|
@ -48,7 +72,9 @@ void InfoCreateWidget::InitThemeName(){
|
|||
m_themeNameENLayout = new QHBoxLayout();
|
||||
m_themeNameENLabel = new QLabel();
|
||||
m_themeNameENLineEdit = new QLineEdit();
|
||||
m_themeNameENLineEdit->setFixedSize(248,36);
|
||||
m_themeNameENLabel->setText(tr("ThemeName-EN"));
|
||||
m_themeNameENLabel->setFixedWidth(100);
|
||||
m_themeNameENLineEdit->setEchoMode(QLineEdit::Normal);
|
||||
|
||||
m_themeNameENLayout->addWidget(m_themeNameENLabel);
|
||||
|
@ -62,19 +88,23 @@ void InfoCreateWidget::InitBuilderInfo(){
|
|||
m_builderNameLayout = new QHBoxLayout();
|
||||
m_builderNameLabel = new QLabel();
|
||||
m_builderNameLineEdit = new QLineEdit();
|
||||
m_builderNameLineEdit->setFixedSize(248,36);
|
||||
m_builderNameLabel->setText(tr("Builder Name"));
|
||||
m_builderNameLineEdit->setEchoMode(QLineEdit::Normal);
|
||||
|
||||
m_builderNameLayout->addWidget(m_builderNameLabel);
|
||||
m_builderNameLayout->addStretch(1);
|
||||
m_builderNameLayout->addWidget(m_builderNameLineEdit);
|
||||
|
||||
m_builderMailLayout = new QHBoxLayout();
|
||||
m_builderMailLabel = new QLabel();
|
||||
m_builderMailLineEdit = new QLineEdit();
|
||||
m_builderMailLineEdit->setFixedSize(248,36);
|
||||
m_builderMailLabel->setText(tr("Builder Mail"));
|
||||
m_builderMailLineEdit->setEchoMode(QLineEdit::Normal);
|
||||
|
||||
m_builderMailLayout->addWidget(m_builderMailLabel);
|
||||
m_builderMailLayout->addStretch(1);
|
||||
m_builderMailLayout->addWidget(m_builderMailLineEdit);
|
||||
}
|
||||
|
||||
|
@ -85,12 +115,16 @@ void InfoCreateWidget::InitInfoBtn(const QString &m_state){
|
|||
m_recogniseBtn = new QPushButton();
|
||||
m_createDebBtn = new QPushButton();
|
||||
m_exitBtn->setText(tr("Back"));
|
||||
m_exitBtn->setFixedSize(88,33);
|
||||
m_recogniseBtn->setText(tr("OK"));
|
||||
m_recogniseBtn->setFixedSize(88,33);
|
||||
m_createDebBtn->setText(tr("Create"));
|
||||
m_createDebBtn->setFixedSize(88,33);
|
||||
QShortcut *shortcut = new QShortcut(QKeySequence(Qt::Key_Return), m_recogniseBtn);
|
||||
QObject::connect(shortcut, &QShortcut::activated, m_recogniseBtn, &QPushButton::click);
|
||||
QShortcut *shortcut1 = new QShortcut(QKeySequence(Qt::Key_Return), m_createDebBtn);
|
||||
QObject::connect(shortcut1, &QShortcut::activated, m_createDebBtn, &QPushButton::click);
|
||||
m_infoBtnLayout->addStretch(1);
|
||||
m_infoBtnLayout->addWidget(m_exitBtn);
|
||||
m_infoBtnLayout->addWidget(m_recogniseBtn);
|
||||
m_infoBtnLayout->addWidget(m_createDebBtn);
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "../fileProcess/fileprocess.h"
|
||||
#include "../build/buildcheckwidget.h"
|
||||
|
||||
#include <kaboutdialog.h>
|
||||
#include <QWidget>
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
@ -23,7 +24,7 @@
|
|||
#include <QRegularExpressionValidator>
|
||||
#include <QShortcut>
|
||||
|
||||
class InfoCreateWidget : public QWidget
|
||||
class InfoCreateWidget : public kdk::KDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue