Dev...
This commit is contained in:
+23
-29
@@ -6,51 +6,45 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1124</width>
|
||||
<height>693</height>
|
||||
<width>2048</width>
|
||||
<height>1024</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="mInspVisuelleBtn">
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>40</x>
|
||||
<y>210</y>
|
||||
<width>111</width>
|
||||
<height>23</height>
|
||||
<x>270</x>
|
||||
<y>230</y>
|
||||
<width>70</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inspection Visuelle</string>
|
||||
<string>CheckBox</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Line" name="line">
|
||||
<widget class="QTabWidget" name="mMainTabWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>550</x>
|
||||
<y>30</y>
|
||||
<width>20</width>
|
||||
<height>641</height>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>2051</width>
|
||||
<height>1031</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mConnectorsImgLbl">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>580</x>
|
||||
<y>30</y>
|
||||
<width>491</width>
|
||||
<height>431</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="Test">
|
||||
<attribute name="title">
|
||||
<string>Tab 1</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Tab 2</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
||||
@@ -5,6 +5,7 @@ CCableTestBench::CCableTestBench(QObject *parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
w = new MainWindow(0,this);
|
||||
|
||||
}
|
||||
|
||||
CCableTestBench::~CCableTestBench()
|
||||
@@ -14,8 +15,7 @@ CCableTestBench::~CCableTestBench()
|
||||
|
||||
int CCableTestBench::Start()
|
||||
{
|
||||
w->resize(1024,768);
|
||||
w->show();
|
||||
w->showMaximized();
|
||||
|
||||
mMainPageHandle = w->mMainPage;
|
||||
mVisualInspPageHandle = w->mVisualInspPage;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#include "CableTestPage.h"
|
||||
#include "ui_CableTestPage.h"
|
||||
#include "CableTestBench.h"
|
||||
|
||||
CCableTestPage::CCableTestPage(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::CCableTestPage)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
mProgramHandle = 0;
|
||||
|
||||
}
|
||||
|
||||
CCableTestPage::~CCableTestPage()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#ifndef CABLETESTPAGE_H
|
||||
#define CABLETESTPAGE_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class CCableTestBench;
|
||||
|
||||
namespace Ui {
|
||||
class CCableTestPage;
|
||||
}
|
||||
|
||||
class CCableTestPage : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CCableTestPage(QWidget *parent = 0);
|
||||
~CCableTestPage();
|
||||
|
||||
CCableTestBench *mProgramHandle;
|
||||
|
||||
private:
|
||||
Ui::CCableTestPage *ui;
|
||||
};
|
||||
|
||||
#endif // CABLETESTPAGE_H
|
||||
@@ -0,0 +1,247 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CCableTestPage</class>
|
||||
<widget class="QWidget" name="CCableTestPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1800</width>
|
||||
<height>880</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="CConnectorSelectWidget" name="mConnectorSelectWidget" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>850</x>
|
||||
<y>20</y>
|
||||
<width>501</width>
|
||||
<height>501</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="mCableConfigFrame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>50</y>
|
||||
<width>471</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::WinPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>3</number>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>60</y>
|
||||
<width>451</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="mNomTesteurLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Nom du testeur</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mTypeCableCombo">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Permanent</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Temporaire</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="mIdentCableEditBox"/>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="mStationNameCombo">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Frontenac</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Côte-Vertu</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Angrignon</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Garage Angrignon</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Atwater</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Lionel-Groulx</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Viau</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="StationNameLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Station</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" alignment="Qt::AlignRight">
|
||||
<widget class="QLabel" name="mTypeCableLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Type câble</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mIdentCableLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Identification du câble</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2">
|
||||
<widget class="QLineEdit" name="mNomTesteurEditBox">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mCableConfigLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
<y>30</y>
|
||||
<width>271</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Configuration du câble</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mInspVisuelleLabel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
<y>230</y>
|
||||
<width>271</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Inspection visuelle</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="mInspVisuelleFrame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>250</y>
|
||||
<width>391</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<width>121</width>
|
||||
<height>23</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Exécuter Inspection</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>CConnectorSelectWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">connectorselectwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
+15
-2
@@ -12,7 +12,13 @@ CMainPage::CMainPage(QWidget *parent) :
|
||||
QFont font;
|
||||
font.setPointSize(18);
|
||||
|
||||
ui->mConnectorsImgLbl->setPixmap(QPixmap("./images/connecteurs.png").scaled(ui->mConnectorsImgLbl->size()));
|
||||
// ui->mConnectorsImgLbl->setPixmap(QPixmap("./images/connecteurs.png").scaled(ui->mConnectorsImgLbl->size()));
|
||||
|
||||
mConnectorSelWidget = new CConnectorSelectWidget();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// test = new QLabel(this);
|
||||
// test->setObjectName("test");
|
||||
@@ -20,12 +26,14 @@ CMainPage::CMainPage(QWidget *parent) :
|
||||
// test->setPixmap(QPixmap("./images/connecteurs.png"));
|
||||
// test->show();
|
||||
|
||||
connect(ui->mInspVisuelleBtn,SIGNAL(clicked()),this,SLOT(InspVisuelleBtnClicked()));
|
||||
//connect(ui->mInspVisuelleBtn,SIGNAL(clicked()),this,SLOT(InspVisuelleBtnClicked()));
|
||||
|
||||
SM_HANDLE hndl;
|
||||
SM_Open(&hndl,"192.168.0.101");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
CMainPage::~CMainPage()
|
||||
@@ -37,3 +45,8 @@ void CMainPage::InspVisuelleBtnClicked()
|
||||
{
|
||||
qDebug("clicked");
|
||||
}
|
||||
|
||||
int CMainPage::SetTestPageWidget(QWidget *PageHandle)
|
||||
{
|
||||
ui->mMainTabWidget->addTab(PageHandle,QIcon(),QString("Câble"));
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
|
||||
#include "ConnectorSelectWidget.h"
|
||||
|
||||
class CCableTestBench;
|
||||
|
||||
namespace Ui {
|
||||
@@ -21,6 +23,10 @@ public:
|
||||
CCableTestBench *mProgramHandle;
|
||||
QPixmap mLedONPixmap, mLedOFFPixmap;
|
||||
QLabel *test;
|
||||
|
||||
CConnectorSelectWidget *mConnectorSelWidget;
|
||||
|
||||
int SetTestPageWidget(QWidget *PageHandle);
|
||||
|
||||
private:
|
||||
Ui::CMainPage *ui;
|
||||
|
||||
@@ -6,18 +6,24 @@ MainWindow::MainWindow(QWidget *parent,CCableTestBench* ProgramHandle)
|
||||
: QMainWindow(parent),
|
||||
mProgramHandle(ProgramHandle)
|
||||
{
|
||||
resize(1024,768);
|
||||
resize(1800,890);
|
||||
|
||||
mMainPage = new CMainPage(this);
|
||||
mMainPage = new CMainPage();
|
||||
mVisualInspPage = new CVisualInspectionPage();
|
||||
mCableTestPage = new CCableTestPage(this);
|
||||
|
||||
|
||||
mMainPage->mProgramHandle = ProgramHandle;
|
||||
mVisualInspPage->mProgramHandle = ProgramHandle;
|
||||
|
||||
// mMainPage->SetTestPageWidget(mCableTestPage);
|
||||
|
||||
|
||||
//setCentralWidget(mVisualInspPage);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <QTextEdit>
|
||||
#include "MainPage.h"
|
||||
#include "VisualInspectionPage.h"
|
||||
#include "CableTestPage.h"
|
||||
|
||||
class CCableTestBench;
|
||||
|
||||
@@ -22,6 +23,7 @@ public:
|
||||
CMainPage *mMainPage;
|
||||
CCableTestBench *mProgramHandle;
|
||||
CVisualInspectionPage *mVisualInspPage;
|
||||
CCableTestPage *mCableTestPage;
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#include "CConnectorSelectWidget.h"
|
||||
|
||||
CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
#ifndef CCONNECTORSELECTWIDGET_H
|
||||
#define CCONNECTORSELECTWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class CConnectorSelectWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CConnectorSelectWidget(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
||||
};
|
||||
|
||||
#endif // CCONNECTORSELECTWIDGET_H
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "ConnectorSelectWidget.h"
|
||||
#include <QPainter>
|
||||
|
||||
CConnectorSelectWidget::CConnectorSelectWidget(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
mConnectorLayoutPixmap = new QPixmap("./images/connecteurs.png");
|
||||
}
|
||||
|
||||
void CConnectorSelectWidget::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter painter(this);
|
||||
|
||||
painter.drawPixmap(this->rect(),mConnectorLayoutPixmap->scaled(this->size()));
|
||||
}
|
||||
|
||||
+3
@@ -9,6 +9,9 @@ class CConnectorSelectWidget : public QWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CConnectorSelectWidget(QWidget *parent = 0);
|
||||
void paintEvent(QPaintEvent *);
|
||||
|
||||
QPixmap *mConnectorLayoutPixmap;
|
||||
|
||||
signals:
|
||||
|
||||
Reference in New Issue
Block a user