Init
This commit is contained in:
88
src/ScanFormWidget.cpp
Normal file
88
src/ScanFormWidget.cpp
Normal file
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// Created by Krad on 2021/10/8.
|
||||
//
|
||||
|
||||
#include "ScanFormWidget.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QVBoxLayout>
|
||||
#include <QToolButton>
|
||||
#include "ui_tabformwidget.h"
|
||||
#include "guimacros.h"
|
||||
#include "patientinformationform.h"
|
||||
#include <QButtonGroup>
|
||||
|
||||
ScanFormWidget::ScanFormWidget(QWidget *parent) : TabFormWidget(parent) {
|
||||
const char* style="QWidget#PatientInformationForm{min-width:300px;max-width:300px; margin-right:10}"
|
||||
"QWidget#patientinformation_panel{ border-right:1px solid #0078d8}"
|
||||
"QWidget#patientinformation_panel QLabel{font-size:20px; }"
|
||||
"QWidget#param_widget{min-width:300px;max-width:300px;border-left:1px solid #0078d8}"
|
||||
"QWidget#broadcast_widget{border:2px solid #515151; border-radius: 20px}"
|
||||
"QLabel#lbl_protocol{font-size:32px; margin:0; color:silver}"
|
||||
"QLabel#lbl_title,QLabel#lbl_ptitle{font-size:20px;margin:0; border-bottom:1px solid silver}"
|
||||
"QLabel#lbl_end{font-size:32px;margin:0; border-top:1px solid #0078d8}"
|
||||
"";
|
||||
this->setStyleSheet(this->styleSheet().append(style));
|
||||
QHBoxLayout* layout =new QHBoxLayout();
|
||||
ui->commandWidget->setLayout(layout);
|
||||
|
||||
QLabel* lbl_Protocol = new QLabel(this);
|
||||
lbl_Protocol->setText("Protocol");
|
||||
lbl_Protocol->setAlignment(Qt::AlignTop);
|
||||
lbl_Protocol->setObjectName("lbl_protocol");
|
||||
layout->addWidget(lbl_Protocol);
|
||||
QWidget* spacerLine= new QWidget(this);
|
||||
spacerLine->setFixedWidth(2);
|
||||
spacerLine->setObjectName("verSpaceLine");
|
||||
layout->addWidget(spacerLine);
|
||||
ADD_TOOL_BTN(Left,":/icons/left.png");
|
||||
ADD_TOOL_BTN(Right,":/icons/right.png");
|
||||
QButtonGroup* group = new QButtonGroup(this);
|
||||
|
||||
// btnLeft->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
// btnLeft->setText("Left");
|
||||
btnLeft->setCheckable(true);
|
||||
btnLeft->setChecked(true);
|
||||
// btnRight->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||
// btnRight->setText("Right");
|
||||
btnRight->setCheckable(true);
|
||||
group->addButton(btnRight);
|
||||
group->addButton(btnLeft);
|
||||
layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||
QWidget* spacerLine2= new QWidget(this);
|
||||
spacerLine2->setFixedWidth(2);
|
||||
spacerLine2->setObjectName("verSpaceLine");
|
||||
layout->addWidget(spacerLine2);
|
||||
ADD_TOOL_BTN(Refresh,":/icons/scan_e.png");
|
||||
ADD_TOOL_BTN(Preview,":/icons/rec.png");
|
||||
|
||||
ADD_TOOL_BTN(Stop,":/icons/stop.png");
|
||||
ADD_TOOL_BTN(Scan,":/icons/scan.png");
|
||||
|
||||
QHBoxLayout* contentLayout =new QHBoxLayout();
|
||||
this->ui->contentWidget->setLayout(contentLayout);
|
||||
PatientInformationForm* patient_information= new PatientInformationForm(this);
|
||||
contentLayout->addWidget(patient_information);
|
||||
QWidget* param_widget= new QWidget(this);
|
||||
QWidget* broadcast_widget = new QWidget(this);
|
||||
broadcast_widget->setObjectName("broadcast_widget");
|
||||
QLabel * viewer = new QLabel(broadcast_widget);
|
||||
|
||||
viewer->setText("");
|
||||
QHBoxLayout* viewerLayout =new QHBoxLayout(viewer);
|
||||
broadcast_widget->setLayout(viewerLayout);
|
||||
viewerLayout->addWidget(viewer);
|
||||
contentLayout->addWidget(broadcast_widget);
|
||||
param_widget->setObjectName("param_widget");
|
||||
QVBoxLayout* paramLayout =new QVBoxLayout(param_widget);
|
||||
QLabel* lblParams = new QLabel(this);
|
||||
lblParams->setText("Scan Parameters");
|
||||
lblParams->setObjectName("lbl_title");
|
||||
paramLayout->addWidget(lblParams);
|
||||
paramLayout->addSpacerItem(new QSpacerItem(20,20,QSizePolicy::Minimum,QSizePolicy::Expanding));
|
||||
contentLayout->addWidget(param_widget);
|
||||
|
||||
}
|
||||
|
||||
ScanFormWidget::~ScanFormWidget() {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user