UI mostly remade
This commit is contained in:
@@ -69,3 +69,5 @@ win32 {
|
||||
UI_DIR = windows
|
||||
RCC_DIR = windows
|
||||
}
|
||||
|
||||
DISTFILES +=
|
||||
|
||||
BIN
qt5_src/Bootloader/IBMPlexSans-Light.ttf
Normal file
BIN
qt5_src/Bootloader/IBMPlexSans-Light.ttf
Normal file
Binary file not shown.
BIN
qt5_src/Bootloader/IBMPlexSans-Medium.ttf
Normal file
BIN
qt5_src/Bootloader/IBMPlexSans-Medium.ttf
Normal file
Binary file not shown.
BIN
qt5_src/Bootloader/IBMPlexSans-Regular.ttf
Normal file
BIN
qt5_src/Bootloader/IBMPlexSans-Regular.ttf
Normal file
Binary file not shown.
@@ -91,16 +91,17 @@ uint16_t DevicePID;
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindowClass)
|
||||
{
|
||||
int i;
|
||||
hexOpen = false;
|
||||
fileWatcher = NULL;
|
||||
timer = new QTimer();
|
||||
|
||||
ui->setupUi(this);
|
||||
setWindowTitle(APPLICATION + QString(" v") + VERSION);
|
||||
|
||||
ui->menuBar->setVisible(false);
|
||||
ui->mainToolBar->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
|
||||
//ui->menuBar->setVisible(false);
|
||||
//ui->mainToolBar->setToolButtonStyle( Qt::ToolButtonTextBesideIcon );
|
||||
|
||||
// by default hide the advanced controls
|
||||
on_checkBoxAdvancedMode_stateChanged(0);
|
||||
|
||||
QSettings settings;
|
||||
settings.beginGroup("MainWindow");
|
||||
@@ -131,10 +132,6 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
connect(comm, SIGNAL(SetProgressBar(int)), this, SLOT(UpdateProgressBar(int)));
|
||||
|
||||
|
||||
this->statusBar()->addPermanentWidget(&deviceLabel);
|
||||
deviceLabel.setText("Disconnected");
|
||||
|
||||
|
||||
//Assume initally that the USB device that we are trying to find is using the default VID/PID.
|
||||
DeviceVID = DEFAULT_VID;
|
||||
DevicePID = DEFAULT_PID;
|
||||
@@ -207,8 +204,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->plainTextEdit->appendPlainText("Device not detected. Verify device is attached and in firmware update mode.");
|
||||
deviceLabel.setText("Disconnected");
|
||||
//ui->plainTextEdit->appendPlainText("Device not detected. Verify device is attached and in firmware update mode.");
|
||||
hexOpen = false;
|
||||
setBootloadEnabled(false);
|
||||
emit SetProgressBar(0);
|
||||
@@ -349,7 +345,6 @@ void MainWindow::Connection(void)
|
||||
{
|
||||
qWarning("Closing device.");
|
||||
comm->close();
|
||||
deviceLabel.setText("Disconnected");
|
||||
ui->plainTextEdit->setPlainText("Device Detached.");
|
||||
hexOpen = false;
|
||||
setBootloadEnabled(false);
|
||||
@@ -1001,6 +996,34 @@ void MainWindow::on_actionErase_Device_triggered()
|
||||
future = QtConcurrent::run(this, &MainWindow::EraseDevice);
|
||||
}
|
||||
|
||||
void MainWindow::on_checkBoxAdvancedMode_stateChanged(int state)
|
||||
{
|
||||
ui->groupBoxAdvanced->setVisible(state != 0);
|
||||
|
||||
// handle adjustment of window height when advanced controls are hidden
|
||||
if (state == 0)
|
||||
{
|
||||
/*
|
||||
* Qt's adjustSize() method on widget objects will scale the widget to only fit its' children.
|
||||
* This is useful for "collapsing" the window when the advanced controls are hidden, but will
|
||||
* scale both the height and the width. We want to retain the current width but change the
|
||||
* height, so first we will back up the min and max width values then set the current width as
|
||||
* the fixed width to prevent it from being scaled.
|
||||
*/
|
||||
int minWidthBackup = minimumWidth();
|
||||
int maxWidthBackup = maximumWidth();
|
||||
setFixedWidth(width());
|
||||
|
||||
// perform the size adjustments
|
||||
ui->centralWidget->adjustSize();
|
||||
adjustSize();
|
||||
|
||||
// restore the min/max width values so the width is no longer fixed
|
||||
setMinimumWidth(minWidthBackup);
|
||||
setMaximumWidth(maxWidthBackup);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::EraseDevice(void)
|
||||
{
|
||||
QTime elapsed;
|
||||
@@ -1265,7 +1288,7 @@ void MainWindow::GetQuery()
|
||||
case Comm::Success:
|
||||
wasBootloaderMode = true;
|
||||
ss << "Device Ready";
|
||||
deviceLabel.setText("Connected");
|
||||
//deviceLabel.setText("Connected");
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
||||
@@ -55,7 +55,7 @@ class MainWindow : public QMainWindow
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MainWindow(QWidget *parent = 0);
|
||||
MainWindow(QWidget *parent = NULL);
|
||||
~MainWindow();
|
||||
|
||||
void GetQuery(void);
|
||||
@@ -91,7 +91,6 @@ protected:
|
||||
QFuture<void> future;
|
||||
|
||||
QString fileName, watchFileName;
|
||||
QFileSystemWatcher* fileWatcher;
|
||||
QTimer *timer;
|
||||
|
||||
bool writeFlash;
|
||||
@@ -106,7 +105,6 @@ protected:
|
||||
|
||||
private:
|
||||
Ui::MainWindowClass *ui;
|
||||
QLabel deviceLabel;
|
||||
|
||||
int failed;
|
||||
QAction *recentFiles[MAX_RECENT_FILES];
|
||||
@@ -122,6 +120,8 @@ private slots:
|
||||
void on_actionWrite_Device_triggered();
|
||||
void on_btnFwBrowse_clicked();
|
||||
void on_actionErase_Device_triggered();
|
||||
|
||||
void on_checkBoxAdvancedMode_stateChanged(int state);
|
||||
};
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
||||
@@ -6,16 +6,27 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>439</width>
|
||||
<height>653</height>
|
||||
<width>300</width>
|
||||
<height>504</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">USB HID Bootloader</string>
|
||||
</property>
|
||||
@@ -24,275 +35,547 @@
|
||||
<normaloff>:/MainWindow/img/Microchip_logo.Ico</normaloff>:/MainWindow/img/Microchip_logo.Ico</iconset>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>300</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Select Firmware File</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="txtFirmwareFile">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(200,200,200);
|
||||
color: rgb(100,100,100);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>more bingbus XD</string>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFwBrowse">
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
<weight>50</weight>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Tool Status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="horizontalSpacing">
|
||||
<number>40</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Firmware</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lblStatusFirmware">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 0, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>NO FW FILE LOADED</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="text">
|
||||
<string>Device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="lblStatusDevice">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 0, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>NOT DETECTED</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="indent">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Tool Operation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFlashFirmware">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupFirmwareFile">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans Medium</family>
|
||||
<pointsize>14</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>FLASH FIRMWARE</string>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox {
|
||||
border: 1px solid gray;
|
||||
border-radius: 9px;
|
||||
margin-top: 1em;
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
|
||||
QGroupBox::title {
|
||||
subcontrol-origin: margin;
|
||||
left: 10px;
|
||||
padding: 0 3px 0 3px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Step 1: Select App FW File</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="txtFirmwareFile">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFwBrowse">
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnResetDevice">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<widget class="QGroupBox" name="groupFlashFirmware">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans Medium</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset Device Normally</string>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox {
|
||||
border: 1px solid gray;
|
||||
border-radius: 9px;
|
||||
margin-top: 1em;
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
|
||||
QGroupBox::title {
|
||||
subcontrol-origin: margin;
|
||||
left: 10px;
|
||||
padding: 0 3px 0 3px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Step 2: Flash FW to Device</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnFlashFirmware">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>MS Shell Dlg 2</family>
|
||||
<pointsize>14</pointsize>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>FLASH FIRMWARE NOW</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Flashing Progress</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnResetDeviceFWUpdateMode">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
<widget class="QGroupBox" name="groupDeviceInfo">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans Medium</family>
|
||||
<pointsize>14</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset Device into FW Update Mode</string>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox {
|
||||
border: 1px solid gray;
|
||||
border-radius: 9px;
|
||||
margin-top: 1em;
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
|
||||
QGroupBox::title {
|
||||
subcontrol-origin: margin;
|
||||
left: 10px;
|
||||
padding: 0 3px 0 3px;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Device Information</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="formDeviceStatus">
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans Medium</family>
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="lblDeviceConnected">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans Medium</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 0, 0);</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Not Connected</string>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="indent">
|
||||
<number>15</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>1</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="lblDeviceStatusMsg">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans Light</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Device not detected. Please connect the dancepad interface's USB cable to this computer.</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_advmode">
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBoxAdvancedMode">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Advanced</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBoxAdvanced">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string>advmode</string>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QGroupBox,QGroupBox::title {
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}</string>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<property name="labelAlignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="horizontalSpacing">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans Medium</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bootloader Version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="lblDeviceBootloaderVer">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>65.wat</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_11">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans Medium</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>App FW Version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="lblDeviceAppFWVer">
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans</family>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>1.0.0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnResetDevice">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset Device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnResetDeviceFWUpdateMode">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans</family>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset Device into FW Update Mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>IBM Plex Sans</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Status Messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -302,8 +585,8 @@ color: rgb(100,100,100);</string>
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>439</width>
|
||||
<height>26</height>
|
||||
<width>300</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuProgrammer">
|
||||
@@ -331,7 +614,6 @@ color: rgb(100,100,100);</string>
|
||||
<addaction name="menuProgrammer"/>
|
||||
<addaction name="menu_Help"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<widget class="QToolBar" name="mainToolBar">
|
||||
<property name="windowTitle">
|
||||
<string>Display Toolbar</string>
|
||||
|
||||
@@ -30,14 +30,21 @@
|
||||
|
||||
#include <QtWidgets/QApplication>
|
||||
#include "MainWindow.h"
|
||||
#include <QFontDatabase>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
|
||||
QApplication a(argc, argv);
|
||||
QCoreApplication::setOrganizationName("JOJCorp");
|
||||
QCoreApplication::setOrganizationDomain("source.jojcorp.com");
|
||||
QCoreApplication::setApplicationName("Dancepad Interface FW Flash Tool");
|
||||
|
||||
QFontDatabase::addApplicationFont(":/fonts/IBMPlexSans-Regular.ttf");
|
||||
QFontDatabase::addApplicationFont(":/fonts/IBMPlexSans-Medium.ttf");
|
||||
QFontDatabase::addApplicationFont(":/fonts/IBMPlexSans-Light.ttf");
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
return a.exec();
|
||||
|
||||
@@ -11,4 +11,9 @@
|
||||
<file>img/help.png</file>
|
||||
<file>img/Microchip_logo.Ico</file>
|
||||
</qresource>
|
||||
<qresource prefix="/fonts">
|
||||
<file>IBMPlexSans-Regular.ttf</file>
|
||||
<file>IBMPlexSans-Medium.ttf</file>
|
||||
<file>IBMPlexSans-Light.ttf</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Reference in New Issue
Block a user