更新支持新布局
This commit is contained in:
parent
cbe3be40b9
commit
5122686119
Binary file not shown.
@ -5,6 +5,7 @@
|
|||||||
#include <QButtonGroup>
|
#include <QButtonGroup>
|
||||||
#include "operatorjson.h"
|
#include "operatorjson.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QScrollArea>
|
||||||
LeadScheme::LeadScheme(QWidget * parent ):QWidget (parent)
|
LeadScheme::LeadScheme(QWidget * parent ):QWidget (parent)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
@ -330,7 +331,7 @@ void LeadScheme::initLay()
|
|||||||
pButtonGroup3->setExclusive(true);
|
pButtonGroup3->setExclusive(true);
|
||||||
int colmn = 0;
|
int colmn = 0;
|
||||||
|
|
||||||
|
#if 0
|
||||||
QStringList Sches;
|
QStringList Sches;
|
||||||
Sches<<"8通道"<<"16通道"<<"64通道";
|
Sches<<"8通道"<<"16通道"<<"64通道";
|
||||||
gridlayOut->addWidget(labScheme,0,colmn++,Qt::AlignHCenter);
|
gridlayOut->addWidget(labScheme,0,colmn++,Qt::AlignHCenter);
|
||||||
@ -343,7 +344,47 @@ void LeadScheme::initLay()
|
|||||||
gridlayOut->addWidget( btn,i+1,0);
|
gridlayOut->addWidget( btn,i+1,0);
|
||||||
btn->setCheckable(true);
|
btn->setCheckable(true);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
QStringList Sches;
|
||||||
|
Sches<<"8通道"<<"16通道"<<"64通道";
|
||||||
|
gridlayOut->addWidget(labScheme,0,colmn++,Qt::AlignHCenter);
|
||||||
|
QScrollArea * scroll = new QScrollArea;
|
||||||
|
scroll->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
|
||||||
|
scroll->setWidgetResizable(true);
|
||||||
|
scroll->setAlignment(Qt::AlignRight);
|
||||||
|
QWidget * wShech = new QWidget;
|
||||||
|
|
||||||
|
gridlayOut->addWidget(scroll,1,colmn-1,12,1);
|
||||||
|
// QGridLayout * gridShech = new QGridLayout;
|
||||||
|
QVBoxLayout * vlayHH = new QVBoxLayout;
|
||||||
|
wShech->setLayout(vlayHH);
|
||||||
|
for (int i= 0 ; i<Sches.size();i++)
|
||||||
|
{
|
||||||
|
QPushButton * btn = new QPushButton(Sches.at(i));
|
||||||
|
btn->setMaximumHeight(40);
|
||||||
|
btn->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
pButtonGroup0->addButton(btn);
|
||||||
|
//gridShech->addWidget( btn,i+1,0);
|
||||||
|
vlayHH->addWidget(btn);
|
||||||
|
btn->setCheckable(true);
|
||||||
|
}
|
||||||
|
vlayHH->addStretch();
|
||||||
|
|
||||||
|
scroll->setWidget(wShech);
|
||||||
|
|
||||||
|
QHBoxLayout * hbtn = new QHBoxLayout;
|
||||||
|
hbtn->addStretch();
|
||||||
|
hbtn->addWidget(&m_btnNew);
|
||||||
|
hbtn->addWidget(&m_btndelete);
|
||||||
|
//hbtn->addWidget(&m_btnCancel);
|
||||||
|
hbtn->addWidget(&m_btnOK);
|
||||||
|
hbtn->addStretch();
|
||||||
|
gridlayOut->addLayout(hbtn,14,colmn-1,1,1);
|
||||||
|
QLabel * desLab = new QLabel;
|
||||||
|
desLab->setText("1 选择重构方式0-9\n(注意:0方式不能重构\n2 左键点击重构选择测参点\n3左键点击部位要选择的点)");
|
||||||
|
gridlayOut->addWidget(desLab,15,colmn-1,3,1);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
gridlayOut->addWidget(labNum,0,colmn++,Qt::AlignHCenter);
|
gridlayOut->addWidget(labNum,0,colmn++,Qt::AlignHCenter);
|
||||||
int minHeight = 45;
|
int minHeight = 45;
|
||||||
@ -442,18 +483,12 @@ void LeadScheme::initLay()
|
|||||||
}");
|
}");
|
||||||
|
|
||||||
|
|
||||||
QHBoxLayout * hbtn = new QHBoxLayout;
|
|
||||||
hbtn->addStretch();
|
|
||||||
hbtn->addWidget(&m_btnNew);
|
|
||||||
hbtn->addWidget(&m_btndelete);
|
|
||||||
hbtn->addWidget(&m_btnCancel);
|
|
||||||
hbtn->addWidget(&m_btnOK);
|
|
||||||
hbtn->addStretch();
|
|
||||||
|
|
||||||
|
|
||||||
QVBoxLayout * vlayAll = new QVBoxLayout;
|
QVBoxLayout * vlayAll = new QVBoxLayout;
|
||||||
vlayAll->addWidget(Wall);
|
vlayAll->addWidget(Wall);
|
||||||
vlayAll->addLayout(hbtn);
|
//vlayAll->addLayout(hbtn);
|
||||||
setLayout(vlayAll);
|
setLayout(vlayAll);
|
||||||
}
|
}
|
||||||
#include "operatorjson.h"
|
#include "operatorjson.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user