|
@@ -44,12 +44,13 @@ void CreateProjWidget::initWindow()
|
|
|
setWindowTitle("新建工程");
|
|
|
setWindowFlags(Qt::Window);
|
|
|
setWindowFlag(Qt::WindowMinMaxButtonsHint, false);
|
|
|
- resize(400, 200);
|
|
|
+ resize(400, 250);
|
|
|
}
|
|
|
|
|
|
void CreateProjWidget::initialize()
|
|
|
{
|
|
|
- m_gridLayout = new QGridLayout(this);
|
|
|
+ m_vBoxLayout = new QVBoxLayout(this);
|
|
|
+ m_gridLayout = new QGridLayout();
|
|
|
m_nameLabel = new QLabel(this);
|
|
|
m_nameLabel->setText("工程名:");
|
|
|
m_typeLabel = new QLabel(this);
|
|
@@ -59,16 +60,22 @@ void CreateProjWidget::initialize()
|
|
|
m_nameLineEdit->setMaximumWidth(500);
|
|
|
m_nameLineEdit->setMinimumWidth(300);
|
|
|
m_importanceCheckBox = new CheckBox("能力与技术重要度评估", this);
|
|
|
- m_schemeCheckBox = new CheckBox("技术方案评估", this);
|
|
|
- m_createButton = new PushButton("创建", this);
|
|
|
+ m_capaCheckBox = new CheckBox("能力重要度评估指标体系", this);
|
|
|
+ m_capaCheckBox->setEnabled(false);
|
|
|
+ m_techCheckBox = new CheckBox("技术措施重要度评估对象", this);
|
|
|
+ m_techCheckBox->setEnabled(false);
|
|
|
+ m_schemeCheckBox = new CheckBox("技术方案评估", this);
|
|
|
+ m_buttonLayout = new QHBoxLayout();
|
|
|
+ m_createButton = new PushButton("创建", this);
|
|
|
m_createButton->setEnabled(false);
|
|
|
m_cancelButton = new PushButton("取消", this);
|
|
|
}
|
|
|
|
|
|
void CreateProjWidget::initLayout()
|
|
|
{
|
|
|
- m_gridLayout->setAlignment(Qt::AlignTop | Qt::AlignLeft);
|
|
|
- m_gridLayout->setContentsMargins(50, 20, 50, 20);
|
|
|
+ m_vBoxLayout->setContentsMargins(50, 20, 50, 20);
|
|
|
+
|
|
|
+ m_vBoxLayout->addLayout(m_gridLayout);
|
|
|
m_gridLayout->addWidget(m_nameLabel, 0, 0, 1, 1, Qt::AlignRight);
|
|
|
m_gridLayout->addWidget(m_nameLineEdit, 0, 1, 1, 5, Qt::AlignLeft);
|
|
|
|
|
@@ -76,12 +83,16 @@ void CreateProjWidget::initLayout()
|
|
|
|
|
|
m_gridLayout->addWidget(m_typeLabel, 4, 0, 1, 1, Qt::AlignRight);
|
|
|
m_gridLayout->addWidget(m_importanceCheckBox, 4, 1, 1, 5, Qt::AlignLeft);
|
|
|
- m_gridLayout->addWidget(m_schemeCheckBox, 5, 1, 1, 5, Qt::AlignLeft);
|
|
|
-
|
|
|
- m_gridLayout->addWidget(new QWidget(this), 6, 1, 4, 1, Qt::AlignLeft);
|
|
|
-
|
|
|
- m_gridLayout->addWidget(m_createButton, 10, 4, 1, 1, Qt::AlignLeft);
|
|
|
- m_gridLayout->addWidget(m_cancelButton, 10, 5, 1, 1, Qt::AlignLeft);
|
|
|
+ m_gridLayout->addWidget(m_capaCheckBox, 5, 2, 1, 7, Qt::AlignLeft);
|
|
|
+ m_gridLayout->addWidget(m_techCheckBox, 6, 2, 1, 7, Qt::AlignLeft);
|
|
|
+ m_gridLayout->addWidget(new QWidget(this), 7, 1, 4, 1, Qt::AlignLeft);
|
|
|
+ m_gridLayout->addWidget(m_schemeCheckBox, 8, 1, 1, 5, Qt::AlignLeft);
|
|
|
+
|
|
|
+ m_vBoxLayout->addStretch();
|
|
|
+ m_vBoxLayout->addLayout(m_buttonLayout);
|
|
|
+ m_buttonLayout->addStretch();
|
|
|
+ m_buttonLayout->addWidget(m_createButton);
|
|
|
+ m_buttonLayout->addWidget(m_cancelButton);
|
|
|
}
|
|
|
|
|
|
void CreateProjWidget::connectSignalsAndSlots()
|
|
@@ -109,6 +120,8 @@ void CreateProjWidget::slotTextChanged(const QString &text)
|
|
|
|
|
|
void CreateProjWidget::slotCheckBoxChanged(int)
|
|
|
{
|
|
|
+ m_capaCheckBox->setChecked(m_importanceCheckBox->isChecked());
|
|
|
+ m_techCheckBox->setChecked(m_importanceCheckBox->isChecked());
|
|
|
updateCreateButtonState();
|
|
|
}
|
|
|
|