添加about窗口
This commit is contained in:
@ -232,6 +232,9 @@ HPPA::HPPA(QWidget *parent)
|
|||||||
|
|
||||||
connect(ui.motor_power_open_btn, SIGNAL(clicked()), this, SLOT(onMotorPowerOpen_btn()));
|
connect(ui.motor_power_open_btn, SIGNAL(clicked()), this, SLOT(onMotorPowerOpen_btn()));
|
||||||
connect(ui.motor_power_close_btn, SIGNAL(clicked()), this, SLOT(onMotorPowerClose_btn()));
|
connect(ui.motor_power_close_btn, SIGNAL(clicked()), this, SLOT(onMotorPowerClose_btn()));
|
||||||
|
|
||||||
|
//
|
||||||
|
connect(this->ui.action_about, SIGNAL(triggered()), this, SLOT(onAbout()));
|
||||||
}
|
}
|
||||||
|
|
||||||
HPPA::~HPPA()
|
HPPA::~HPPA()
|
||||||
@ -1769,6 +1772,13 @@ void HPPA::onFocus2(int command)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HPPA::onAbout()
|
||||||
|
{
|
||||||
|
aboutWindow about;
|
||||||
|
about.show();
|
||||||
|
about.exec();
|
||||||
|
}
|
||||||
|
|
||||||
void HPPA::onDark()
|
void HPPA::onDark()
|
||||||
{
|
{
|
||||||
QMessageBox msgBox;
|
QMessageBox msgBox;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "imageProcessor.h"
|
#include "imageProcessor.h"
|
||||||
|
|
||||||
#include "focusWindow.h"
|
#include "focusWindow.h"
|
||||||
|
#include "aboutWindow.h"
|
||||||
|
|
||||||
#define PI 3.1415926
|
#define PI 3.1415926
|
||||||
|
|
||||||
@ -230,6 +231,7 @@ public Q_SLOTS:
|
|||||||
void onAutoExposure();
|
void onAutoExposure();
|
||||||
void onFocus1();
|
void onFocus1();
|
||||||
void onFocus2(int command);
|
void onFocus2(int command);
|
||||||
|
void onAbout();
|
||||||
void onDark();
|
void onDark();
|
||||||
void onReference();
|
void onReference();
|
||||||
void onStartRecordStep1();
|
void onStartRecordStep1();
|
||||||
|
@ -1735,7 +1735,7 @@
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>help</string>
|
<string>help</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionabout"/>
|
<addaction name="action_about"/>
|
||||||
</widget>
|
</widget>
|
||||||
<addaction name="file"/>
|
<addaction name="file"/>
|
||||||
<addaction name="menuspectrometer"/>
|
<addaction name="menuspectrometer"/>
|
||||||
@ -1831,7 +1831,7 @@
|
|||||||
<string>Pika XC2</string>
|
<string>Pika XC2</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionabout">
|
<action name="action_about">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>about</string>
|
<string>about</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -102,6 +102,7 @@
|
|||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClCompile Include="aboutWindow.cpp" />
|
||||||
<ClCompile Include="QDoubleSlider.cpp" />
|
<ClCompile Include="QDoubleSlider.cpp" />
|
||||||
<ClCompile Include="QMotorDoubleSlider.cpp" />
|
<ClCompile Include="QMotorDoubleSlider.cpp" />
|
||||||
<ClCompile Include="QYMotorDoubleSlider.cpp" />
|
<ClCompile Include="QYMotorDoubleSlider.cpp" />
|
||||||
@ -112,6 +113,7 @@
|
|||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<QtRcc Include="HPPA.qrc" />
|
<QtRcc Include="HPPA.qrc" />
|
||||||
|
<QtUic Include="about.ui" />
|
||||||
<QtUic Include="FocusDialog.ui" />
|
<QtUic Include="FocusDialog.ui" />
|
||||||
<QtUic Include="HPPA.ui" />
|
<QtUic Include="HPPA.ui" />
|
||||||
<QtMoc Include="HPPA.h" />
|
<QtMoc Include="HPPA.h" />
|
||||||
@ -136,6 +138,7 @@
|
|||||||
<QtMoc Include="image2display.h" />
|
<QtMoc Include="image2display.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<QtMoc Include="aboutWindow.h" />
|
||||||
<ClInclude Include="imageProcessor.h" />
|
<ClInclude Include="imageProcessor.h" />
|
||||||
<ClInclude Include="ImageReaderWriter.h" />
|
<ClInclude Include="ImageReaderWriter.h" />
|
||||||
<ClInclude Include="resource.h" />
|
<ClInclude Include="resource.h" />
|
||||||
|
@ -82,6 +82,9 @@
|
|||||||
<ClCompile Include="stdafx.cpp">
|
<ClCompile Include="stdafx.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="aboutWindow.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="fileOperation.h">
|
<QtMoc Include="fileOperation.h">
|
||||||
@ -117,6 +120,9 @@
|
|||||||
<QtMoc Include="RgbCameraOperation.h">
|
<QtMoc Include="RgbCameraOperation.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</QtMoc>
|
</QtMoc>
|
||||||
|
<QtMoc Include="aboutWindow.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</QtMoc>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="imageProcessor.h">
|
<ClInclude Include="imageProcessor.h">
|
||||||
@ -136,6 +142,9 @@
|
|||||||
<QtUic Include="FocusDialog.ui">
|
<QtUic Include="FocusDialog.ui">
|
||||||
<Filter>Form Files</Filter>
|
<Filter>Form Files</Filter>
|
||||||
</QtUic>
|
</QtUic>
|
||||||
|
<QtUic Include="about.ui">
|
||||||
|
<Filter>Form Files</Filter>
|
||||||
|
</QtUic>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="cpp.hint" />
|
<None Include="cpp.hint" />
|
||||||
|
111
HPPA/about.ui
Normal file
111
HPPA/about.ui
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>aboutDialog</class>
|
||||||
|
<widget class="QDialog" name="aboutDialog">
|
||||||
|
<property name="windowModality">
|
||||||
|
<enum>Qt::ApplicationModal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>753</width>
|
||||||
|
<height>490</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Dialog</string>
|
||||||
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset>
|
||||||
|
<normaloff>HPPA.ico</normaloff>HPPA.ico</iconset>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="layoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>250</y>
|
||||||
|
<width>578</width>
|
||||||
|
<height>134</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="companylname_label">
|
||||||
|
<property name="text">
|
||||||
|
<string>公司:北京依锐思遥感技术有限公司</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>地址:北京市海淀区清河安宁庄东路18号5号楼二层205</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>电话:010-51292601</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>邮箱:hanshanlong@iris-rs.cn</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>270</x>
|
||||||
|
<y>150</y>
|
||||||
|
<width>108</width>
|
||||||
|
<height>24</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>版本:1.5</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>270</x>
|
||||||
|
<y>70</y>
|
||||||
|
<width>391</width>
|
||||||
|
<height>31</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Hyper Plant Phenotypic Analysis</string>
|
||||||
|
</property>
|
||||||
|
<property name="textFormat">
|
||||||
|
<enum>Qt::PlainText</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>50</y>
|
||||||
|
<width>141</width>
|
||||||
|
<height>141</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="pixmap">
|
||||||
|
<pixmap>HPPA.ico</pixmap>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
22
HPPA/aboutWindow.cpp
Normal file
22
HPPA/aboutWindow.cpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#include "aboutWindow.h"
|
||||||
|
|
||||||
|
|
||||||
|
aboutWindow::aboutWindow(QWidget* parent)
|
||||||
|
{
|
||||||
|
ui.setupUi(this);
|
||||||
|
|
||||||
|
ui.companylname_label->setOpenExternalLinks(true);//<2F><><EFBFBD><EFBFBD>Ϊtrue<75><65><EFBFBD>ܴ<EFBFBD><DCB4><EFBFBD><EFBFBD><EFBFBD>ҳ
|
||||||
|
QString text = ui.companylname_label->text();
|
||||||
|
ui.companylname_label->setText("<a style='color: green; text-decoration: none' href = http://www.iris-rs.cn/pr.jsp?_jcp=3_10>" + text);
|
||||||
|
|
||||||
|
Qt::WindowFlags flags = 0;
|
||||||
|
//flags |= Qt::WindowMinimizeButtonHint;
|
||||||
|
flags |= Qt::WindowCloseButtonHint;
|
||||||
|
flags |= Qt::MSWindowsFixedSizeDialogHint;
|
||||||
|
setWindowFlags(flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
aboutWindow::~aboutWindow()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
26
HPPA/aboutWindow.h
Normal file
26
HPPA/aboutWindow.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <QtWidgets/qdialog.h>
|
||||||
|
#include <qstring.h>
|
||||||
|
|
||||||
|
#include "ui_about.h"
|
||||||
|
|
||||||
|
class aboutWindow :public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
aboutWindow(QWidget* parent = Q_NULLPTR);
|
||||||
|
~aboutWindow();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::aboutDialog ui;
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
Reference in New Issue
Block a user