fix
1、重启软件后,恢复上次关闭的布局; 2、菜单栏添加/:光谱曲线显示停靠窗; add 双轴线性平台:采集暗电流也移动x马达;
This commit is contained in:
@ -17,15 +17,7 @@ HPPA::HPPA(QWidget *parent)
|
||||
QCoreApplication::setOrganizationDomain("iris.com");
|
||||
QCoreApplication::setApplicationName("HPPA");
|
||||
|
||||
QString strPath = QCoreApplication::applicationDirPath() + "/UILayout.ini";
|
||||
QFile file(strPath);
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
QByteArray ba;
|
||||
QDataStream in(&file);
|
||||
in >> ba;
|
||||
file.close();
|
||||
this->restoreState(ba);
|
||||
}
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>У<EFBFBD><D0A3>ʹ<EFBFBD><CDB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
|
||||
string HPPACfgFile = getPathofEXE() + "\\HPPA.cfg";
|
||||
@ -98,23 +90,8 @@ HPPA::HPPA(QWidget *parent)
|
||||
ptoolbar->addAction(pAction);*/
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||
QWidget* widget = new QWidget();
|
||||
QGridLayout* grid = new QGridLayout(widget);
|
||||
|
||||
|
||||
m_chartView = new QChartView(ui.mDockWidgetSpectralViewer);
|
||||
m_chartView->setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
grid->addWidget(m_chartView);
|
||||
//grid->setMargin(0);
|
||||
grid->setContentsMargins(0, 0, 0, 0);
|
||||
//grid->SetMaximumSize(0);
|
||||
ui.mDockWidgetSpectralViewer->setWidget(widget);
|
||||
|
||||
//QLineSeries *series = new QLineSeries();
|
||||
//QChart *chart = new QChart();
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>Dz<EFBFBD><C7B2><EFBFBD>
|
||||
m_Imager = nullptr;
|
||||
@ -264,6 +241,23 @@ HPPA::HPPA(QWidget *parent)
|
||||
|
||||
initPanelToolbar();
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
||||
QWidget* widget = new QWidget();
|
||||
QGridLayout* grid = new QGridLayout(widget);
|
||||
|
||||
m_chartView = new QChartView(ui.mDockWidgetSpectralViewer);
|
||||
m_chartView->setRenderHint(QPainter::Antialiasing);
|
||||
|
||||
grid->addWidget(m_chartView);
|
||||
//grid->setMargin(0);
|
||||
grid->setContentsMargins(0, 0, 0, 0);
|
||||
//grid->SetMaximumSize(0);
|
||||
ui.mDockWidgetSpectralViewer->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
|
||||
ui.mDockWidgetSpectralViewer->setWidget(widget);
|
||||
//QLineSeries *series = new QLineSeries();
|
||||
//QChart *chart = new QChart();
|
||||
mPanelMenu->addAction(ui.mDockWidgetSpectralViewer->toggleViewAction());
|
||||
|
||||
//<2F>켣<EFBFBD>滮
|
||||
m_pathPlan = new PathPlan(m_xMotor, m_yMotor, ui.xmotor_location_slider, ui.ymotor_location_slider);
|
||||
QDockWidget* dock_pathPlan = new QDockWidget(QString::fromLocal8Bit("<EFBFBD>켣<EFBFBD>滮"), this);
|
||||
@ -310,11 +304,22 @@ HPPA::HPPA(QWidget *parent)
|
||||
|
||||
createMoveplatformActionGroup();
|
||||
connect(moveplatformActionGroup, &QActionGroup::triggered, this, &HPPA::selectingMoveplatform);
|
||||
|
||||
QString strPath = QCoreApplication::applicationDirPath() + "/UILayout.ini";
|
||||
QFile file(strPath);
|
||||
if (file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
QByteArray ba;
|
||||
QDataStream in(&file);
|
||||
in >> ba;
|
||||
file.close();
|
||||
this->restoreState(ba);
|
||||
}
|
||||
}
|
||||
|
||||
void HPPA::recordFromRobotArm(int fileCounter)
|
||||
{
|
||||
qDebug() << "recordFromRobotArm" << fileCounter;
|
||||
//qDebug() << "recordFromRobotArm" << fileCounter;
|
||||
|
||||
if (fileCounter == -1)
|
||||
{
|
||||
@ -322,7 +327,7 @@ void HPPA::recordFromRobotArm(int fileCounter)
|
||||
|
||||
ui.action_start_recording->setText(QString::fromLocal8Bit("<EFBFBD>ɼ<EFBFBD>"));
|
||||
ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||
qDebug() << "recordFromRobotArm: 1111111111111111111111";
|
||||
//qDebug() << "recordFromRobotArm: 1111111111111111111111";
|
||||
|
||||
return;
|
||||
}
|
||||
@ -338,7 +343,7 @@ void HPPA::recordFromRobotArm(int fileCounter)
|
||||
|
||||
ui.action_start_recording->setText(QString::fromLocal8Bit("<EFBFBD>ɼ<EFBFBD><EFBFBD><EFBFBD>"));
|
||||
ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(255,0,0);}");
|
||||
qDebug() << "recordFromRobotArm: 2222222222222222222222";
|
||||
//qDebug() << "recordFromRobotArm: 2222222222222222222222";
|
||||
}
|
||||
|
||||
void HPPA::createActionGroups()
|
||||
@ -1950,15 +1955,42 @@ void HPPA::onAbout()
|
||||
void HPPA::onDark()
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setText(QString::fromLocal8Bit("<EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>Ǹ<EFBFBD><EFBFBD>ϣ<EFBFBD>"));
|
||||
msgBox.setText(QString::fromLocal8Bit("<EFBFBD>ɼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>Ǹ<EFBFBD><EFBFBD>ϣ<EFBFBD>"));
|
||||
msgBox.exec();
|
||||
|
||||
bool isMotorEnable = this->ui.mAction_2AxisMotor->isChecked();
|
||||
if (isMotorEnable)
|
||||
{
|
||||
//<2F>ƶ<EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD>
|
||||
if (!isMotorConnected(m_xMotor))
|
||||
{
|
||||
m_xMotor->EnableMotro();
|
||||
m_lXmotorLocationOfStartRecord = m_xMotor->GetLocationNow();
|
||||
m_xMotor->SettingSpeed(ui.xmotor_speed_slider->OriginalValue());
|
||||
//m_xMotor->SettingSpeed(m_lManualSpeedOfXMotor);
|
||||
|
||||
m_xMotor->MoveMotar(true);
|
||||
}
|
||||
}
|
||||
|
||||
emit RecordDarlSignal();
|
||||
}
|
||||
|
||||
void HPPA::recordDarkFinish()
|
||||
{
|
||||
ui.mainToolBar->widgetForAction(ui.action_dark)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||
|
||||
bool isMotorEnable = this->ui.mAction_2AxisMotor->isChecked();
|
||||
if (isMotorEnable)
|
||||
{
|
||||
//<2F>ƶ<EFBFBD>x<EFBFBD><78><EFBFBD><EFBFBD>
|
||||
if (!isMotorConnected(m_xMotor))
|
||||
{
|
||||
//x<><78><EFBFBD>ﷵ<EFBFBD>زɼ<D8B2>ǰ<EFBFBD><C7B0>λ<EFBFBD><CEBB>
|
||||
m_xMotor->SettingSpeed(m_lManualSpeedOfXMotor);
|
||||
m_xMotor->MoveToLocation(m_lXmotorLocationOfStartRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void HPPA::onReference()
|
||||
|
20
HPPA/HPPA.ui
20
HPPA/HPPA.ui
@ -442,19 +442,19 @@ QDockWidget::title {
|
||||
<widget class="QWidget" name="dockWidgetContents_4">
|
||||
<layout class="QGridLayout" name="gridLayout_13">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
@ -706,19 +706,19 @@ QDockWidget::title {
|
||||
<widget class="QWidget" name="dockWidgetContents_5">
|
||||
<layout class="QGridLayout" name="gridLayout_14">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
|
@ -15,19 +15,19 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_16">
|
||||
@ -349,12 +349,6 @@
|
||||
<widget class="QTableWidget" name="recordLine_tableWidget"/>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>layoutWidget</zorder>
|
||||
<zorder>layoutWidget_2</zorder>
|
||||
<zorder>recordLine_tableWidget</zorder>
|
||||
<zorder>layoutWidget_3</zorder>
|
||||
<zorder>layoutWidget_4</zorder>
|
||||
<zorder>label_7</zorder>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
|
Reference in New Issue
Block a user