From 19c663765093b43a4cc559d8de7cced223b1a7e9 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sun, 4 Aug 2024 18:29:26 +0800 Subject: [PATCH] init . --- src/app/main.cpp | 2 +- src/zqtui/base/QFunction.cpp | 4 - src/zqtui/base/QFunction.hpp | 26 - src/zqtui/base/logger.cpp | 45 -- src/zqtui/base/logger.hpp | 25 - src/zqtui/base/zexception.hpp | 52 -- src/zqtui/base/zqthread.cpp | 17 - src/zqtui/base/zqthread.hpp | 37 -- src/zqtui/base/zworkqueue.cpp | 52 -- src/zqtui/base/zworkqueue.hpp | 41 -- src/zqtui/channelmgr/qt_serial_datachannel.cpp | 155 ----- src/zqtui/channelmgr/qt_serial_datachannel.hpp | 76 --- src/zqtui/mainpage/mainwindow.cpp | 77 --- src/zqtui/mainpage/mainwindow.h | 51 -- src/zqtui/mainpage/mainwindow.ui | 878 ------------------------- src/zqtui/version.h | 4 - src/zqui/base/QFunction.cpp | 4 + src/zqui/base/QFunction.hpp | 26 + src/zqui/base/logger.cpp | 45 ++ src/zqui/base/logger.hpp | 25 + src/zqui/base/zexception.hpp | 52 ++ src/zqui/base/zqthread.cpp | 17 + src/zqui/base/zqthread.hpp | 37 ++ src/zqui/base/zworkqueue.cpp | 52 ++ src/zqui/base/zworkqueue.hpp | 41 ++ src/zqui/channelmgr/channelmgr.cpp | 0 src/zqui/channelmgr/channelmgr.hpp | 38 ++ src/zqui/channelmgr/qt_serial_datachannel.cpp | 155 +++++ src/zqui/channelmgr/qt_serial_datachannel.hpp | 74 +++ src/zqui/mainpage/mainwindow.cpp | 93 +++ src/zqui/mainpage/mainwindow.h | 60 ++ src/zqui/mainpage/mainwindow.ui | 875 ++++++++++++++++++++++++ src/zqui/version.h | 4 + 33 files changed, 1599 insertions(+), 1541 deletions(-) delete mode 100644 src/zqtui/base/QFunction.cpp delete mode 100644 src/zqtui/base/QFunction.hpp delete mode 100644 src/zqtui/base/logger.cpp delete mode 100644 src/zqtui/base/logger.hpp delete mode 100644 src/zqtui/base/zexception.hpp delete mode 100644 src/zqtui/base/zqthread.cpp delete mode 100644 src/zqtui/base/zqthread.hpp delete mode 100644 src/zqtui/base/zworkqueue.cpp delete mode 100644 src/zqtui/base/zworkqueue.hpp delete mode 100644 src/zqtui/channelmgr/qt_serial_datachannel.cpp delete mode 100644 src/zqtui/channelmgr/qt_serial_datachannel.hpp delete mode 100644 src/zqtui/mainpage/mainwindow.cpp delete mode 100644 src/zqtui/mainpage/mainwindow.h delete mode 100644 src/zqtui/mainpage/mainwindow.ui delete mode 100644 src/zqtui/version.h create mode 100644 src/zqui/base/QFunction.cpp create mode 100644 src/zqui/base/QFunction.hpp create mode 100644 src/zqui/base/logger.cpp create mode 100644 src/zqui/base/logger.hpp create mode 100644 src/zqui/base/zexception.hpp create mode 100644 src/zqui/base/zqthread.cpp create mode 100644 src/zqui/base/zqthread.hpp create mode 100644 src/zqui/base/zworkqueue.cpp create mode 100644 src/zqui/base/zworkqueue.hpp create mode 100644 src/zqui/channelmgr/channelmgr.cpp create mode 100644 src/zqui/channelmgr/channelmgr.hpp create mode 100644 src/zqui/channelmgr/qt_serial_datachannel.cpp create mode 100644 src/zqui/channelmgr/qt_serial_datachannel.hpp create mode 100644 src/zqui/mainpage/mainwindow.cpp create mode 100644 src/zqui/mainpage/mainwindow.h create mode 100644 src/zqui/mainpage/mainwindow.ui create mode 100644 src/zqui/version.h diff --git a/src/app/main.cpp b/src/app/main.cpp index 49ba1df..361a991 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -18,7 +18,7 @@ #include #include -#include "zqtui/mainpage/mainwindow.h" +#include "zqui/mainpage/mainwindow.h" // #include // diff --git a/src/zqtui/base/QFunction.cpp b/src/zqtui/base/QFunction.cpp deleted file mode 100644 index 7a73688..0000000 --- a/src/zqtui/base/QFunction.cpp +++ /dev/null @@ -1,4 +0,0 @@ -#include "qfunction.hpp" -QFunction::QFunction() : QObject(nullptr) {} -QFunction::QFunction(std::function func, QObject *parent) : m_func(func), QObject(parent) {} -std::function &QFunction::get() { return m_func; } diff --git a/src/zqtui/base/QFunction.hpp b/src/zqtui/base/QFunction.hpp deleted file mode 100644 index d5fe2c3..0000000 --- a/src/zqtui/base/QFunction.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef QFUNCTION_HPP -#define QFUNCTION_HPP - -#include -#include -class QFunction : public QObject { - Q_OBJECT - - std::function m_func; - - public: - explicit QFunction(std::function func, QObject *parent = nullptr); - QFunction(); - QFunction(const QFunction &other) { m_func = other.m_func; } - QFunction &operator=(const QFunction &other) { - m_func = other.m_func; - return *this; - } - std::function &get(); - - // 拷贝构造函数 - - signals: -}; - -#endif // QFUNCTION_HPP diff --git a/src/zqtui/base/logger.cpp b/src/zqtui/base/logger.cpp deleted file mode 100644 index 26822df..0000000 --- a/src/zqtui/base/logger.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "logger.hpp" - -#include -#include -#include -#include - -void zos_log(const char* fmt, ...) { - va_list args; - va_start(args, fmt); - char buf[1024] = {0}; - vsnprintf(buf, sizeof(buf), fmt, args); - qInfo() << buf; - va_end(args); -} - -uint32_t zos_get_ticket() { return (uint32_t)QDateTime::currentMSecsSinceEpoch(); } - -std::string zhex2str(const uint8_t* hex, size_t len) { - std::string str; - for (size_t i = 0; i < len; i++) { - char buf[3] = {0}; - snprintf(buf, sizeof(buf), "%02x ", hex[i]); - str += buf; - } - return str; -} - -std::string zhex2binary(uint8_t hex) { - std::string str; - for (int i = 0; i < 8; i++) { - str += (hex & 0x80) ? "1" : "0"; - hex <<= 1; - } - return str; -} - -std::string zhex32ToBinary(uint32_t hex) { - std::string str; - for (int i = 0; i < 32; i++) { - str += (hex & 0x80000000) ? "1" : "0"; - hex <<= 1; - } - return str; -} diff --git a/src/zqtui/base/logger.hpp b/src/zqtui/base/logger.hpp deleted file mode 100644 index 8b52340..0000000 --- a/src/zqtui/base/logger.hpp +++ /dev/null @@ -1,25 +0,0 @@ - -#pragma once -#include - -#include - -void zos_log(const char* fmt, ...); -uint32_t zos_get_ticket(); - -std::string zhex2str(const uint8_t* hex, size_t len); -std::string zhex2binary(uint8_t hex); -std::string zhex32ToBinary(uint32_t hex); - -#define ZLOGI(TAG, fmt, ...) zos_log("%08lu INFO [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__); -#define ZLOGD(TAG, fmt, ...) zos_log("%08lu DEBU [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__); -#define ZLOGE(TAG, fmt, ...) zos_log("%08lu ERRO [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__); -#define ZLOGW(TAG, fmt, ...) zos_log("%08lu WARN [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__); -#define ZASSERT(cond) \ - if (!(cond)) { \ - ZLOGE("ASSERT", "condition: %s", #cond); \ - exit(-1); \ - } - - -#define ZARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) \ No newline at end of file diff --git a/src/zqtui/base/zexception.hpp b/src/zqtui/base/zexception.hpp deleted file mode 100644 index b1b59a5..0000000 --- a/src/zqtui/base/zexception.hpp +++ /dev/null @@ -1,52 +0,0 @@ -#pragma once - -#include -#include - -namespace std _GLIBCXX_VISIBILITY(default) { - -class zexception : public exception { - string m_ecodeinfo = ""; - int32_t m_ecode = 0; - - public: - /** Takes a character string describing the error. */ - explicit zexception(int32_t ecode, const string& __arg) { - m_ecodeinfo = __arg; - m_ecode = ecode; - } - - const char* what() const noexcept override { return m_ecodeinfo.c_str(); } - int32_t ecode() const noexcept { return m_ecode; } -}; - -typedef enum { - ke_ok = 10000 + 0, - ke_error = 10000 + 1, - ke_channel_is_close = 10000 + 2, - ke_invalid_param = 10000 + 3, - ke_invalid_packet_format = 10000 + 4, - ke_overtime = 10000 + 5, - ke_parse_config_file_fail = 10000 + 6, -} zecode_t; - -static inline const char* zecode2str(zecode_t ecode) { - switch (ecode) { - case ke_ok: - return "success"; - case ke_channel_is_close: - return "channel_is_close"; - case ke_invalid_param: - return "invalid_param"; - case ke_invalid_packet_format: - return "invalid_packet_format"; - case ke_overtime: - return "overtime"; - case ke_parse_config_file_fail: - return "parse_config_file_fail"; - default: - return "unkown error"; - } -} - -} // namespace std _GLIBCXX_VISIBILITY(default) diff --git a/src/zqtui/base/zqthread.cpp b/src/zqtui/base/zqthread.cpp deleted file mode 100644 index 5444615..0000000 --- a/src/zqtui/base/zqthread.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "zqthread.hpp" -using namespace iflytop; -using namespace std; - -ZQThread::ZQThread(const char* name, function cb) { - name_ = QString(name); - cb_ = cb; -} - -void ZQThread::run() { - if (cb_) cb_(); -} - -void ZQThread::quit() { - tryexitflag_ = true; - QThread::quit(); -} diff --git a/src/zqtui/base/zqthread.hpp b/src/zqtui/base/zqthread.hpp deleted file mode 100644 index a35a267..0000000 --- a/src/zqtui/base/zqthread.hpp +++ /dev/null @@ -1,37 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// -#include -#include - -namespace iflytop { -using namespace std; - -class ZQThread : public QThread { - Q_OBJECT - private: - QString name_; - function cb_; - bool tryexitflag_ = false; - - public: - ZQThread(const char* name, function cb); - void quit(); - - bool isTryExit() { return tryexitflag_; } - - protected: - virtual void run() override; -}; - -} // namespace xsync \ No newline at end of file diff --git a/src/zqtui/base/zworkqueue.cpp b/src/zqtui/base/zworkqueue.cpp deleted file mode 100644 index 4d5e9b8..0000000 --- a/src/zqtui/base/zworkqueue.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "zworkqueue.hpp" - -using namespace iflytop; -using namespace std; - -void ZWorkQueue::startSchedule() { - lock_guard lock(m_mutex); - - m_isJoining = false; - m_workQue.reset(new thread([this]() { - while (true) { - if (m_isJoining) { - break; - } - - function work; - { - lock_guard lock(m_QueueMutex); - if (m_workQueue.empty()) { - this_thread::sleep_for(chrono::milliseconds(2)); - continue; - } - work = m_workQueue.front(); - m_workQueue.pop(); - } - if (work) work(); - } - })); - workFlag = true; -} -void ZWorkQueue::stopSchedule() { - lock_guard lock(m_mutex); - - if (m_workQue) { - m_isJoining = true; - m_workQue->join(); - m_workQue.reset(); - m_workQue = nullptr; - } - workFlag = false; -} -bool ZWorkQueue::push(function work) { - lock_guard lock(m_QueueMutex); - m_workQueue.push(work); - return true; -} - -ZWorkQueue::ZWorkQueue() { - // startSchedule(); -} - -ZWorkQueue::~ZWorkQueue() { stopSchedule(); } \ No newline at end of file diff --git a/src/zqtui/base/zworkqueue.hpp b/src/zqtui/base/zworkqueue.hpp deleted file mode 100644 index c2e5554..0000000 --- a/src/zqtui/base/zworkqueue.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace iflytop { -using namespace std; - -class ZWorkQueue { - private: - bool m_isJoining = false; - - unique_ptr m_workQue; - queue> m_workQueue; - - mutex m_QueueMutex; - mutex m_mutex; - - bool workFlag = false; - - public: - ZWorkQueue(); - ~ZWorkQueue(); - void startSchedule(); - void stopSchedule(); - - bool isWorking() { return workFlag; } - bool push(function work); -}; - -} // namespace iflytop \ No newline at end of file diff --git a/src/zqtui/channelmgr/qt_serial_datachannel.cpp b/src/zqtui/channelmgr/qt_serial_datachannel.cpp deleted file mode 100644 index b551178..0000000 --- a/src/zqtui/channelmgr/qt_serial_datachannel.cpp +++ /dev/null @@ -1,155 +0,0 @@ -#include "qt_serial_datachannel.hpp" - -// - -#include -#include - -#pragma comment(lib, "ws2_32.lib") - -#include "zqtui/base/logger.hpp" - -using namespace iflytop; -using namespace std; -using namespace clst; - -#define TAG "QTDataChannel" - -void QTSerialChannel::init() { - m_thread.reset(new thread([this]() { - while (true) { - if (m_isOpen) { - uint8_t rx[1024] = {0}; - int rx_cnt = com_receive(rx, 1024); - if (rx_cnt != 0) { - // ZLOGI(TAG, "rx %d bytes", rx_cnt); - if (m_rxcb) m_rxcb(rx, rx_cnt); - } - this_thread::sleep_for(chrono::microseconds(100)); - } else { - this_thread::sleep_for(chrono::microseconds(10000)); - } - } - })); -} -bool QTSerialChannel::open() { - char portnamebuf[256] = {0}; - sprintf(portnamebuf, "\\\\.\\%s", m_name.c_str()); - m_CommHandler = CreateFileA(portnamebuf, // port name - GENERIC_READ | GENERIC_WRITE, // Read/Write - 0, // No Sharing - NULL, // No Security - OPEN_EXISTING, // Open existing port only - 0, // Non Overlapped I/O - NULL); // Null for Comm Devices - if (m_CommHandler == INVALID_HANDLE_VALUE) { - ZLOGI(TAG, "Error in opening serial port"); - return false; - } - DCB p; - memset(&p, 0, sizeof(p)); - p.DCBlength = sizeof(p); - p.BaudRate = m_baudRate; // 波特率 - - switch (m_dataBits) { - case QSerialPort::Data5: - p.ByteSize = 5; - break; - case QSerialPort::Data6: - p.ByteSize = 6; - break; - case QSerialPort::Data7: - p.ByteSize = 7; - break; - case QSerialPort::Data8: - p.ByteSize = 8; - break; - default: - p.ByteSize = 8; - break; - } - - // QSerialPort::NoParity = 0, - // QSerialPort::EvenParity = 2, - // QSerialPort::OddParity = 3, - // QSerialPort::SpaceParity = 4, - // QSerialPort::MarkParity = 5, - // QSerialPort::UnknownParity = -1 - - switch (m_parity) // 校验位 - { - case QSerialPort::NoParity: - p.Parity = NOPARITY; // 无校验 - break; - case QSerialPort::EvenParity: - p.Parity = EVENPARITY; // 奇校验 - break; - case QSerialPort::OddParity: - p.Parity = ODDPARITY; // 偶校验 - break; - case QSerialPort::MarkParity: - p.Parity = MARKPARITY; // 标记校验 - break; - default: - p.Parity = NOPARITY; // 无校验 - } - - switch (m_stopBits) // 停止位 - { - case QSerialPort::OneStop: - p.StopBits = ONESTOPBIT; // 1位停止位 - break; - case QSerialPort::OneAndHalfStop: - p.StopBits = TWOSTOPBITS; // 2位停止位 - break; - case QSerialPort::TwoStop: - p.StopBits = ONE5STOPBITS; // 1.5位停止位 - break; - default: - p.StopBits = ONESTOPBIT; // 无校验 - } - - if (!SetCommState(m_CommHandler, &p)) { - // 设置参数失败 - CloseHandle(m_CommHandler); - return false; - } - m_isOpen = true; - return true; -} - -void QTSerialChannel::close() { - CloseHandle(m_CommHandler); - m_isOpen = false; -} - -bool QTSerialChannel::isOpen() { return m_isOpen; } -bool QTSerialChannel::send(const uint8_t *data, size_t len) { - DWORD dwBytesWrite = len; - BOOL bWriteStat = WriteFile(m_CommHandler, // 串口句柄 - (char *)data, // 数据首地址 - dwBytesWrite, // 要发送的数据字节数 - &dwBytesWrite, // DWORD*,用来接收返回成功发送的数据字节数 - NULL); // NULL为同步发送,OVERLAPPED*为异步发送 - return dwBytesWrite; -} -void QTSerialChannel::regRxListener(function cb) { m_rxcb = cb; } - -int QTSerialChannel::com_receive(uint8_t *rxbuf, int rxbufsize) { - COMMTIMEOUTS TimeOuts; - GetCommTimeouts(m_CommHandler, &TimeOuts); - TimeOuts.ReadIntervalTimeout = 0; // 读间隔超时 - TimeOuts.ReadTotalTimeoutMultiplier = 0; // 读时间系数 - TimeOuts.ReadTotalTimeoutConstant = 1; // 读时间常量 - SetCommTimeouts(m_CommHandler, &TimeOuts); - - // PurgeComm(m_CommHandler, PURGE_RXCLEAR); - - DWORD wCount = rxbufsize; // 成功读取的数据字节数 - BOOL bReadStat = ReadFile(m_CommHandler, // 串口句柄 - rxbuf, // 数据首地址 - wCount, // 要读取的数据最大字节数 - &wCount, // DWORD*,用来接收返回成功读取的数据字节数 - NULL); - return wCount; -} diff --git a/src/zqtui/channelmgr/qt_serial_datachannel.hpp b/src/zqtui/channelmgr/qt_serial_datachannel.hpp deleted file mode 100644 index 361dd5e..0000000 --- a/src/zqtui/channelmgr/qt_serial_datachannel.hpp +++ /dev/null @@ -1,76 +0,0 @@ -#pragma once - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// - -#include -// -#include -// -#include -#include -// -#include "zqtui\base\zqthread.hpp" - -#define SDK_VERSION 1 - -namespace iflytop { -namespace clst { -using namespace std; -// QT_CHARTS_USE_NAMESPACE - -class QTSerialChannel { - function m_rxcb; - - QSerialPort::DataBits m_dataBits; - QSerialPort::Parity m_parity; - QSerialPort::StopBits m_stopBits; - QSerialPort::FlowControl m_flowControl; - string m_name; - - unique_ptr m_thread; - - uint32_t m_baudRate; - HANDLE m_CommHandler; - - bool m_isOpen = false; - - public: - void init(); - - virtual bool isOpen(); - virtual bool send(const uint8_t *data, size_t len); - virtual void regRxListener(function cb); - - bool open(); - void close(); - - bool setBaudRate(qint32 baudRate) { m_baudRate = baudRate; } - qint32 baudRate() const { return m_baudRate; } - - bool setPortName(string name) { m_name = name; } - bool setDataBits(QSerialPort::DataBits dataBits) { m_dataBits = dataBits; } - bool setParity(QSerialPort::Parity parity) { m_parity = parity; } - bool setStopBits(QSerialPort::StopBits stopBits) { m_stopBits = stopBits; } - bool setFlowControl(QSerialPort::FlowControl flowControl) { m_flowControl = flowControl; } - - QSerialPort::DataBits dataBits() const { return m_dataBits; } - QSerialPort::Parity parity() const { return m_parity; } - QSerialPort::StopBits stopBits() const { return m_stopBits; } - QSerialPort::FlowControl flowControl() const { return m_flowControl; } - - private: - int com_receive(uint8_t *rxbuf, int rxbufsize); -}; -} // namespace clst -} // namespace iflytop diff --git a/src/zqtui/mainpage/mainwindow.cpp b/src/zqtui/mainpage/mainwindow.cpp deleted file mode 100644 index 9e308df..0000000 --- a/src/zqtui/mainpage/mainwindow.cpp +++ /dev/null @@ -1,77 +0,0 @@ -#include "mainwindow.h" - -#include -#include -#include -#include -#include - -#include "./ui_mainwindow.h" -// #include "app/syncbox16ch.h" -// #include "version.h" - -//syncbox16ch *app; -MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { - ui->setupUi(this); - - // app = new syncbox16ch(ui->app_content); - // app->show(); -} - -void MainWindow::constructChannel() { - // /** - // * @brief 指令串口UI - // */ - // { - // const auto infos = QSerialPortInfo::availablePorts(); - // for (const QSerialPortInfo &info : infos) { - // ui->serialPortCB->addItem(info.portName()); - // } - // } - - // ui->serialBaudrateCB->addItem("2000000"); - // ui->serialBaudrateCB->setCurrentIndex(0); - - // connect(ui->serialPortRefreshKey, &QPushButton::clicked, this, [this](bool check) { - // ui->serialPortCB->clear(); - // const auto infos = QSerialPortInfo::availablePorts(); - // for (const QSerialPortInfo &info : infos) { - // ui->serialPortCB->addItem(info.portName()); - // } - // }); - - // connect(ui->serialOpenKey, &QPushButton::clicked, this, [=](bool check) { - // // 打开串口 - // if (ui->serialOpenKey->text() == "打开") { - // G_QTDataChannel.setPortName(ui->serialPortCB->currentText().toStdString()); - // G_QTDataChannel.setBaudRate(ui->serialBaudrateCB->currentText().toInt()); - // G_QTDataChannel.setDataBits(QSerialPort::Data8); - // G_QTDataChannel.setParity(QSerialPort::NoParity); - // G_QTDataChannel.setFlowControl(QSerialPort::NoFlowControl); - // G_QTDataChannel.setStopBits(QSerialPort::OneStop); - - // /** - // * @brief 串口打开时,初始化相应参数 - // */ - - // if (!G_QTDataChannel.open()) { - // QMessageBox::about(NULL, "提示", "串口无法打开,串口不存在或已被占??"); - // return; - // } - // ui->serialOpenKey->setText("关闭"); - // // 下拉菜单控件使能 - // ui->serialBaudrateCB->setEnabled(false); - // ui->serialPortCB->setEnabled(false); - // ui->serialPortRefreshKey->setEnabled(false); - - // IflytopCanbusMaster::ins()->updateChannelConfig(); - - // } else { - // G_QTDataChannel.close(); - // ui->serialOpenKey->setText("打开"); - // ui->serialBaudrateCB->setEnabled(true); - // ui->serialPortCB->setEnabled(true); - // ui->serialPortRefreshKey->setEnabled(true); - // } - // }); -} diff --git a/src/zqtui/mainpage/mainwindow.h b/src/zqtui/mainpage/mainwindow.h deleted file mode 100644 index f8dcc57..0000000 --- a/src/zqtui/mainpage/mainwindow.h +++ /dev/null @@ -1,51 +0,0 @@ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// - -QT_BEGIN_NAMESPACE -namespace Ui { -class MainWindow; -} -QT_END_NAMESPACE - -class MainWindow : public QMainWindow { - Q_OBJECT - - public: - Ui::MainWindow *ui; - - MainWindow(QWidget *parent = nullptr); - ~MainWindow() {}; - - private: - void constructChannel(); -}; -#endif // MAINWINDOW_H diff --git a/src/zqtui/mainpage/mainwindow.ui b/src/zqtui/mainpage/mainwindow.ui deleted file mode 100644 index 0366581..0000000 --- a/src/zqtui/mainpage/mainwindow.ui +++ /dev/null @@ -1,878 +0,0 @@ - - - MainWindow - - - - 0 - 0 - 753 - 545 - - - - - 0 - 8 - - - - ZFPGA - - - /* -Aqua Style Sheet for QT Applications -Author: Jaime A. Quiroga P. -Company: GTRONICK -Last updated: 22/01/2019, 07:55. -Available at: https://github.com/GTRONICK/QSS/blob/master/Aqua.qss -*/ -QMainWindow { - background-color:#ececec; -} -QTextEdit { - border-width: 1px; - border-style: solid; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} -QPlainTextEdit { - border-width: 1px; - border-style: solid; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} -QToolButton { - border-style: solid; - border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); - border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); - border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-width: 1px; - border-radius: 5px; - color: rgb(0,0,0); - padding: 2px; - background-color: rgb(255,255,255); -} -QToolButton:hover{ - border-style: solid; - border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(195, 195, 195), stop:1 rgb(222, 222, 222)); - border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(197, 197, 197), stop:1 rgb(227, 227, 227)); - border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(197, 197, 197)); - border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(195, 195, 195), stop:1 rgb(222, 222, 222)); - border-width: 1px; - border-radius: 5px; - color: rgb(0,0,0); - padding: 2px; - background-color: rgb(255,255,255); -} -QToolButton:pressed{ - border-style: solid; - border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); - border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); - border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-width: 1px; - border-radius: 5px; - color: rgb(0,0,0); - padding: 2px; - background-color: rgb(142,142,142); -} -QPushButton{ - border-style: solid; - border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); - border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); - border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-width: 1px; - border-radius: 5px; - color: rgb(0,0,0); - padding: 2px; - background-color: rgb(255,255,255); -} -QPushButton::default{ - border-style: solid; - border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); - border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); - border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-width: 1px; - border-radius: 5px; - color: rgb(0,0,0); - padding: 2px; - background-color: rgb(255,255,255); -} -QPushButton:hover{ - border-style: solid; - border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(195, 195, 195), stop:1 rgb(222, 222, 222)); - border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(197, 197, 197), stop:1 rgb(227, 227, 227)); - border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(197, 197, 197)); - border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(195, 195, 195), stop:1 rgb(222, 222, 222)); - border-width: 1px; - border-radius: 5px; - color: rgb(0,0,0); - padding: 2px; - background-color: rgb(255,255,255); -} -QPushButton:pressed{ - border-style: solid; - border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); - border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); - border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-width: 1px; - border-radius: 5px; - color: rgb(0,0,0); - padding: 2px; - background-color: rgb(142,142,142); -} -QPushButton:disabled{ - border-style: solid; - border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); - border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); - border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); - border-width: 1px; - border-radius: 5px; - color: #808086; - padding: 2px; - background-color: rgb(142,142,142); -} -QLineEdit { - border-width: 1px; border-radius: 4px; - border-style: solid; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} -QLabel { - color: #000000; -} -QLCDNumber { - color: rgb(0, 113, 255, 255); -} -QProgressBar { - text-align: center; - color: rgb(240, 240, 240); - border-width: 1px; - border-radius: 10px; - border-color: rgb(230, 230, 230); - border-style: solid; - background-color:rgb(207,207,207); -} -QProgressBar::chunk { - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); - border-radius: 10px; -} -QMenuBar { - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(207, 209, 207, 255), stop:1 rgba(230, 229, 230, 255)); -} -QMenuBar::item { - color: #000000; - spacing: 3px; - padding: 1px 4px; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(207, 209, 207, 255), stop:1 rgba(230, 229, 230, 255)); -} - -QMenuBar::item:selected { - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); - color: #FFFFFF; -} -QMenu::item:selected { - border-style: solid; - border-top-color: transparent; - border-right-color: transparent; - border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); - border-bottom-color: transparent; - border-left-width: 2px; - color: #000000; - padding-left:15px; - padding-top:4px; - padding-bottom:4px; - padding-right:7px; -} -QMenu::item { - border-style: solid; - border-top-color: transparent; - border-right-color: transparent; - border-left-color: transparent; - border-bottom-color: transparent; - border-bottom-width: 1px; - color: #000000; - padding-left:17px; - padding-top:4px; - padding-bottom:4px; - padding-right:7px; -} -QTabWidget { - color:rgb(0,0,0); - background-color:#000000; -} -QTabWidget::pane { - border-color: rgb(223,223,223); - background-color:rgb(226,226,226); - border-style: solid; - border-width: 2px; - border-radius: 6px; -} -QTabBar::tab:first { - border-style: solid; - border-left-width:1px; - border-right-width:0px; - border-top-width:1px; - border-bottom-width:1px; - border-top-color: rgb(209,209,209); - border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); - border-bottom-color: rgb(229,229,229); - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; - color: #000000; - padding: 3px; - margin-left:0px; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(255, 255, 255, 255)); -} -QTabBar::tab:last { - border-style: solid; - border-width:1px; - border-top-color: rgb(209,209,209); - border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); - border-right-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); - border-bottom-color: rgb(229,229,229); - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; - color: #000000; - padding: 3px; - margin-left:0px; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(255, 255, 255, 255)); -} -QTabBar::tab { - border-style: solid; - border-top-width:1px; - border-bottom-width:1px; - border-left-width:1px; - border-top-color: rgb(209,209,209); - border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); - border-bottom-color: rgb(229,229,229); - color: #000000; - padding: 3px; - margin-left:0px; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(255, 255, 255, 255)); -} -QTabBar::tab:selected, QTabBar::tab:last:selected, QTabBar::tab:hover { - border-style: solid; - border-left-width:1px; - border-right-color: transparent; - border-top-color: rgb(209,209,209); - border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); - border-bottom-color: rgb(229,229,229); - color: #FFFFFF; - padding: 3px; - margin-left:0px; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} - -QTabBar::tab:selected, QTabBar::tab:first:selected, QTabBar::tab:hover { - border-style: solid; - border-left-width:1px; - border-bottom-width:1px; - border-top-width:1px; - border-right-color: transparent; - border-top-color: rgb(209,209,209); - border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); - border-bottom-color: rgb(229,229,229); - color: #FFFFFF; - padding: 3px; - margin-left:0px; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} - -QCheckBox { - color: #000000; - padding: 2px; -} -QCheckBox:disabled { - color: #808086; - padding: 2px; -} - -QCheckBox:hover { - border-radius:4px; - border-style:solid; - padding-left: 1px; - padding-right: 1px; - padding-bottom: 1px; - padding-top: 1px; - border-width:1px; - border-color: transparent; -} -QCheckBox::indicator:checked { - - height: 10px; - width: 10px; - border-style:solid; - border-width: 1px; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); - color: #000000; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} -QCheckBox::indicator:unchecked { - - height: 10px; - width: 10px; - border-style:solid; - border-width: 1px; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); - color: #000000; -} -QRadioButton { - color: 000000; - padding: 1px; -} -QRadioButton::indicator:checked { - height: 10px; - width: 10px; - border-style:solid; - border-radius:5px; - border-width: 1px; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); - color: #a9b7c6; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} -QRadioButton::indicator:!checked { - height: 10px; - width: 10px; - border-style:solid; - border-radius:5px; - border-width: 1px; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); - color: #a9b7c6; - background-color: transparent; -} -QStatusBar { - color:#027f7f; -} -QSpinBox { - border-style: solid; - border-width: 1px; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} -QDoubleSpinBox { - border-style: solid; - border-width: 1px; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} -QTimeEdit { - border-style: solid; - border-width: 1px; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} -QDateTimeEdit { - border-style: solid; - border-width: 1px; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} -QDateEdit { - border-style: solid; - border-width: 1px; - border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); -} - -QToolBox { - color: #a9b7c6; - background-color:#000000; -} -QToolBox::tab { - color: #a9b7c6; - background-color:#000000; -} -QToolBox::tab:selected { - color: #FFFFFF; - background-color:#000000; -} -QScrollArea { - color: #FFFFFF; - background-color:#000000; -} -QSlider::groove:horizontal { - height: 5px; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); -} -QSlider::groove:vertical { - width: 5px; - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); -} -QSlider::handle:horizontal { - background: rgb(253,253,253); - border-style: solid; - border-width: 1px; - border-color: rgb(207,207,207); - width: 12px; - margin: -5px 0; - border-radius: 7px; -} -QSlider::handle:vertical { - background: rgb(253,253,253); - border-style: solid; - border-width: 1px; - border-color: rgb(207,207,207); - height: 12px; - margin: 0 -5px; - border-radius: 7px; -} -QSlider::add-page:horizontal { - background: rgb(181,181,181); -} -QSlider::add-page:vertical { - background: rgb(181,181,181); -} -QSlider::sub-page:horizontal { - background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); -} -QSlider::sub-page:vertical { - background-color: qlineargradient(spread:pad, y1:0.5, x1:1, y2:0.5, x2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); -} -QScrollBar:horizontal { - max-height: 20px; - border: 1px transparent grey; - margin: 0px 20px 0px 20px; -} -QScrollBar:vertical { - max-width: 20px; - border: 1px transparent grey; - margin: 20px 0px 20px 0px; -} -QScrollBar::handle:horizontal { - background: rgb(253,253,253); - border-style: solid; - border-width: 1px; - border-color: rgb(207,207,207); - border-radius: 7px; - min-width: 25px; -} -QScrollBar::handle:horizontal:hover { - background: rgb(253,253,253); - border-style: solid; - border-width: 1px; - border-color: rgb(147, 200, 200); - border-radius: 7px; - min-width: 25px; -} -QScrollBar::handle:vertical { - background: rgb(253,253,253); - border-style: solid; - border-width: 1px; - border-color: rgb(207,207,207); - border-radius: 7px; - min-height: 25px; -} -QScrollBar::handle:vertical:hover { - background: rgb(253,253,253); - border-style: solid; - border-width: 1px; - border-color: rgb(147, 200, 200); - border-radius: 7px; - min-height: 25px; -} -QScrollBar::add-line:horizontal { - border: 2px transparent grey; - border-top-right-radius: 7px; - border-bottom-right-radius: 7px; - background: rgba(34, 142, 255, 255); - width: 20px; - subcontrol-position: right; - subcontrol-origin: margin; -} -QScrollBar::add-line:horizontal:pressed { - border: 2px transparent grey; - border-top-right-radius: 7px; - border-bottom-right-radius: 7px; - background: rgb(181,181,181); - width: 20px; - subcontrol-position: right; - subcontrol-origin: margin; -} -QScrollBar::add-line:vertical { - border: 2px transparent grey; - border-bottom-left-radius: 7px; - border-bottom-right-radius: 7px; - background: rgba(34, 142, 255, 255); - height: 20px; - subcontrol-position: bottom; - subcontrol-origin: margin; -} -QScrollBar::add-line:vertical:pressed { - border: 2px transparent grey; - border-bottom-left-radius: 7px; - border-bottom-right-radius: 7px; - background: rgb(181,181,181); - height: 20px; - subcontrol-position: bottom; - subcontrol-origin: margin; -} -QScrollBar::sub-line:horizontal { - border: 2px transparent grey; - border-top-left-radius: 7px; - border-bottom-left-radius: 7px; - background: rgba(34, 142, 255, 255); - width: 20px; - subcontrol-position: left; - subcontrol-origin: margin; -} -QScrollBar::sub-line:horizontal:pressed { - border: 2px transparent grey; - border-top-left-radius: 7px; - border-bottom-left-radius: 7px; - background: rgb(181,181,181); - width: 20px; - subcontrol-position: left; - subcontrol-origin: margin; -} -QScrollBar::sub-line:vertical { - border: 2px transparent grey; - border-top-left-radius: 7px; - border-top-right-radius: 7px; - background: rgba(34, 142, 255, 255); - height: 20px; - subcontrol-position: top; - subcontrol-origin: margin; -} -QScrollBar::sub-line:vertical:pressed { - border: 2px transparent grey; - border-top-left-radius: 7px; - border-top-right-radius: 7px; - background: rgb(181,181,181); - height: 20px; - subcontrol-position: top; - subcontrol-origin: margin; -} -QScrollBar::left-arrow:horizontal { - border: 1px transparent grey; - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; - width: 6px; - height: 6px; - background: white; -} -QScrollBar::right-arrow:horizontal { - border: 1px transparent grey; - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; - width: 6px; - height: 6px; - background: white; -} -QScrollBar::up-arrow:vertical { - border: 1px transparent grey; - border-top-left-radius: 3px; - border-top-right-radius: 3px; - width: 6px; - height: 6px; - background: white; -} -QScrollBar::down-arrow:vertical { - border: 1px transparent grey; - border-bottom-left-radius: 3px; - border-bottom-right-radius: 3px; - width: 6px; - height: 6px; - background: white; -} -QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { - background: none; -} -QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { - background: none; -} -QGroupBox { - border-color: rgb(156, 156, 156); - border-width: 1px; - border-style: solid; - border-radius:8px; - padding: 10px 0px 0px 0px; - -} - -QGroupBox:title { - subcontrol-origin: margin; - left: 7px; - padding: 0px 0px 0px 0px; -} - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 5 - - - 5 - - - 5 - - - 5 - - - 5 - - - - - - 200 - 0 - - - - - 200 - 16777215 - - - - - - - - 16777215 - 16777215 - - - - 端口 - - - - - - - - - 串口号 - - - - - - - 波特率 - - - - - - - - - - 打开 - - - - - - - 刷新 - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - - - - - - 4 - 0 - - - - - DengXian - 9 - - - - - - - - 0 - - - QLayout::SetNoConstraint - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 4 - - - - - - - - - 0 - 2 - - - - QTabWidget::North - - - QTabWidget::Rounded - - - 1 - - - Qt::ElideLeft - - - false - - - false - - - - 指令 - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - 上报 - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - - - - - - - - content - sidebar - - - - - - - true - - - 专业模式 - - - 专业模式 - - - - - - diff --git a/src/zqtui/version.h b/src/zqtui/version.h deleted file mode 100644 index 40f364b..0000000 --- a/src/zqtui/version.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -#define VERSION 17 -#define MAUFACTURER "iflytop" \ No newline at end of file diff --git a/src/zqui/base/QFunction.cpp b/src/zqui/base/QFunction.cpp new file mode 100644 index 0000000..7a73688 --- /dev/null +++ b/src/zqui/base/QFunction.cpp @@ -0,0 +1,4 @@ +#include "qfunction.hpp" +QFunction::QFunction() : QObject(nullptr) {} +QFunction::QFunction(std::function func, QObject *parent) : m_func(func), QObject(parent) {} +std::function &QFunction::get() { return m_func; } diff --git a/src/zqui/base/QFunction.hpp b/src/zqui/base/QFunction.hpp new file mode 100644 index 0000000..d5fe2c3 --- /dev/null +++ b/src/zqui/base/QFunction.hpp @@ -0,0 +1,26 @@ +#ifndef QFUNCTION_HPP +#define QFUNCTION_HPP + +#include +#include +class QFunction : public QObject { + Q_OBJECT + + std::function m_func; + + public: + explicit QFunction(std::function func, QObject *parent = nullptr); + QFunction(); + QFunction(const QFunction &other) { m_func = other.m_func; } + QFunction &operator=(const QFunction &other) { + m_func = other.m_func; + return *this; + } + std::function &get(); + + // 拷贝构造函数 + + signals: +}; + +#endif // QFUNCTION_HPP diff --git a/src/zqui/base/logger.cpp b/src/zqui/base/logger.cpp new file mode 100644 index 0000000..26822df --- /dev/null +++ b/src/zqui/base/logger.cpp @@ -0,0 +1,45 @@ +#include "logger.hpp" + +#include +#include +#include +#include + +void zos_log(const char* fmt, ...) { + va_list args; + va_start(args, fmt); + char buf[1024] = {0}; + vsnprintf(buf, sizeof(buf), fmt, args); + qInfo() << buf; + va_end(args); +} + +uint32_t zos_get_ticket() { return (uint32_t)QDateTime::currentMSecsSinceEpoch(); } + +std::string zhex2str(const uint8_t* hex, size_t len) { + std::string str; + for (size_t i = 0; i < len; i++) { + char buf[3] = {0}; + snprintf(buf, sizeof(buf), "%02x ", hex[i]); + str += buf; + } + return str; +} + +std::string zhex2binary(uint8_t hex) { + std::string str; + for (int i = 0; i < 8; i++) { + str += (hex & 0x80) ? "1" : "0"; + hex <<= 1; + } + return str; +} + +std::string zhex32ToBinary(uint32_t hex) { + std::string str; + for (int i = 0; i < 32; i++) { + str += (hex & 0x80000000) ? "1" : "0"; + hex <<= 1; + } + return str; +} diff --git a/src/zqui/base/logger.hpp b/src/zqui/base/logger.hpp new file mode 100644 index 0000000..8b52340 --- /dev/null +++ b/src/zqui/base/logger.hpp @@ -0,0 +1,25 @@ + +#pragma once +#include + +#include + +void zos_log(const char* fmt, ...); +uint32_t zos_get_ticket(); + +std::string zhex2str(const uint8_t* hex, size_t len); +std::string zhex2binary(uint8_t hex); +std::string zhex32ToBinary(uint32_t hex); + +#define ZLOGI(TAG, fmt, ...) zos_log("%08lu INFO [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__); +#define ZLOGD(TAG, fmt, ...) zos_log("%08lu DEBU [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__); +#define ZLOGE(TAG, fmt, ...) zos_log("%08lu ERRO [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__); +#define ZLOGW(TAG, fmt, ...) zos_log("%08lu WARN [%-10s] " fmt "", zos_get_ticket(), TAG, ##__VA_ARGS__); +#define ZASSERT(cond) \ + if (!(cond)) { \ + ZLOGE("ASSERT", "condition: %s", #cond); \ + exit(-1); \ + } + + +#define ZARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) \ No newline at end of file diff --git a/src/zqui/base/zexception.hpp b/src/zqui/base/zexception.hpp new file mode 100644 index 0000000..b1b59a5 --- /dev/null +++ b/src/zqui/base/zexception.hpp @@ -0,0 +1,52 @@ +#pragma once + +#include +#include + +namespace std _GLIBCXX_VISIBILITY(default) { + +class zexception : public exception { + string m_ecodeinfo = ""; + int32_t m_ecode = 0; + + public: + /** Takes a character string describing the error. */ + explicit zexception(int32_t ecode, const string& __arg) { + m_ecodeinfo = __arg; + m_ecode = ecode; + } + + const char* what() const noexcept override { return m_ecodeinfo.c_str(); } + int32_t ecode() const noexcept { return m_ecode; } +}; + +typedef enum { + ke_ok = 10000 + 0, + ke_error = 10000 + 1, + ke_channel_is_close = 10000 + 2, + ke_invalid_param = 10000 + 3, + ke_invalid_packet_format = 10000 + 4, + ke_overtime = 10000 + 5, + ke_parse_config_file_fail = 10000 + 6, +} zecode_t; + +static inline const char* zecode2str(zecode_t ecode) { + switch (ecode) { + case ke_ok: + return "success"; + case ke_channel_is_close: + return "channel_is_close"; + case ke_invalid_param: + return "invalid_param"; + case ke_invalid_packet_format: + return "invalid_packet_format"; + case ke_overtime: + return "overtime"; + case ke_parse_config_file_fail: + return "parse_config_file_fail"; + default: + return "unkown error"; + } +} + +} // namespace std _GLIBCXX_VISIBILITY(default) diff --git a/src/zqui/base/zqthread.cpp b/src/zqui/base/zqthread.cpp new file mode 100644 index 0000000..5444615 --- /dev/null +++ b/src/zqui/base/zqthread.cpp @@ -0,0 +1,17 @@ +#include "zqthread.hpp" +using namespace iflytop; +using namespace std; + +ZQThread::ZQThread(const char* name, function cb) { + name_ = QString(name); + cb_ = cb; +} + +void ZQThread::run() { + if (cb_) cb_(); +} + +void ZQThread::quit() { + tryexitflag_ = true; + QThread::quit(); +} diff --git a/src/zqui/base/zqthread.hpp b/src/zqui/base/zqthread.hpp new file mode 100644 index 0000000..a35a267 --- /dev/null +++ b/src/zqui/base/zqthread.hpp @@ -0,0 +1,37 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// +#include +#include + +namespace iflytop { +using namespace std; + +class ZQThread : public QThread { + Q_OBJECT + private: + QString name_; + function cb_; + bool tryexitflag_ = false; + + public: + ZQThread(const char* name, function cb); + void quit(); + + bool isTryExit() { return tryexitflag_; } + + protected: + virtual void run() override; +}; + +} // namespace xsync \ No newline at end of file diff --git a/src/zqui/base/zworkqueue.cpp b/src/zqui/base/zworkqueue.cpp new file mode 100644 index 0000000..4d5e9b8 --- /dev/null +++ b/src/zqui/base/zworkqueue.cpp @@ -0,0 +1,52 @@ +#include "zworkqueue.hpp" + +using namespace iflytop; +using namespace std; + +void ZWorkQueue::startSchedule() { + lock_guard lock(m_mutex); + + m_isJoining = false; + m_workQue.reset(new thread([this]() { + while (true) { + if (m_isJoining) { + break; + } + + function work; + { + lock_guard lock(m_QueueMutex); + if (m_workQueue.empty()) { + this_thread::sleep_for(chrono::milliseconds(2)); + continue; + } + work = m_workQueue.front(); + m_workQueue.pop(); + } + if (work) work(); + } + })); + workFlag = true; +} +void ZWorkQueue::stopSchedule() { + lock_guard lock(m_mutex); + + if (m_workQue) { + m_isJoining = true; + m_workQue->join(); + m_workQue.reset(); + m_workQue = nullptr; + } + workFlag = false; +} +bool ZWorkQueue::push(function work) { + lock_guard lock(m_QueueMutex); + m_workQueue.push(work); + return true; +} + +ZWorkQueue::ZWorkQueue() { + // startSchedule(); +} + +ZWorkQueue::~ZWorkQueue() { stopSchedule(); } \ No newline at end of file diff --git a/src/zqui/base/zworkqueue.hpp b/src/zqui/base/zworkqueue.hpp new file mode 100644 index 0000000..c2e5554 --- /dev/null +++ b/src/zqui/base/zworkqueue.hpp @@ -0,0 +1,41 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace iflytop { +using namespace std; + +class ZWorkQueue { + private: + bool m_isJoining = false; + + unique_ptr m_workQue; + queue> m_workQueue; + + mutex m_QueueMutex; + mutex m_mutex; + + bool workFlag = false; + + public: + ZWorkQueue(); + ~ZWorkQueue(); + void startSchedule(); + void stopSchedule(); + + bool isWorking() { return workFlag; } + bool push(function work); +}; + +} // namespace iflytop \ No newline at end of file diff --git a/src/zqui/channelmgr/channelmgr.cpp b/src/zqui/channelmgr/channelmgr.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/zqui/channelmgr/channelmgr.hpp b/src/zqui/channelmgr/channelmgr.hpp new file mode 100644 index 0000000..f1605ef --- /dev/null +++ b/src/zqui/channelmgr/channelmgr.hpp @@ -0,0 +1,38 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// + +#include +// +#include +// +#include "qt_serial_datachannel.hpp" + +#define SDK_VERSION 1 + +namespace iflytop { +using namespace std; + +class ChannelMgr { + public: + QTSerialChannel serialCh; + + public: + static ChannelMgr* ins() { + static ChannelMgr chmgr; + return &chmgr; + } +}; + +} // namespace iflytop diff --git a/src/zqui/channelmgr/qt_serial_datachannel.cpp b/src/zqui/channelmgr/qt_serial_datachannel.cpp new file mode 100644 index 0000000..f38439d --- /dev/null +++ b/src/zqui/channelmgr/qt_serial_datachannel.cpp @@ -0,0 +1,155 @@ +#include "qt_serial_datachannel.hpp" + +// + +#include +#include + +#pragma comment(lib, "ws2_32.lib") + +#include "zqui/base/logger.hpp" + +using namespace iflytop; +using namespace std; + + +#define TAG "QTDataChannel" + +void QTSerialChannel::init() { + m_thread.reset(new thread([this]() { + while (true) { + if (m_isOpen) { + uint8_t rx[1024] = {0}; + int rx_cnt = com_receive(rx, 1024); + if (rx_cnt != 0) { + // ZLOGI(TAG, "rx %d bytes", rx_cnt); + if (m_rxcb) m_rxcb(rx, rx_cnt); + } + this_thread::sleep_for(chrono::microseconds(100)); + } else { + this_thread::sleep_for(chrono::microseconds(10000)); + } + } + })); +} +bool QTSerialChannel::open() { + char portnamebuf[256] = {0}; + sprintf(portnamebuf, "\\\\.\\%s", m_name.c_str()); + m_CommHandler = CreateFileA(portnamebuf, // port name + GENERIC_READ | GENERIC_WRITE, // Read/Write + 0, // No Sharing + NULL, // No Security + OPEN_EXISTING, // Open existing port only + 0, // Non Overlapped I/O + NULL); // Null for Comm Devices + if (m_CommHandler == INVALID_HANDLE_VALUE) { + ZLOGI(TAG, "Error in opening serial port"); + return false; + } + DCB p; + memset(&p, 0, sizeof(p)); + p.DCBlength = sizeof(p); + p.BaudRate = m_baudRate; // 波特率 + + switch (m_dataBits) { + case QSerialPort::Data5: + p.ByteSize = 5; + break; + case QSerialPort::Data6: + p.ByteSize = 6; + break; + case QSerialPort::Data7: + p.ByteSize = 7; + break; + case QSerialPort::Data8: + p.ByteSize = 8; + break; + default: + p.ByteSize = 8; + break; + } + + // QSerialPort::NoParity = 0, + // QSerialPort::EvenParity = 2, + // QSerialPort::OddParity = 3, + // QSerialPort::SpaceParity = 4, + // QSerialPort::MarkParity = 5, + // QSerialPort::UnknownParity = -1 + + switch (m_parity) // 校验位 + { + case QSerialPort::NoParity: + p.Parity = NOPARITY; // 无校验 + break; + case QSerialPort::EvenParity: + p.Parity = EVENPARITY; // 奇校验 + break; + case QSerialPort::OddParity: + p.Parity = ODDPARITY; // 偶校验 + break; + case QSerialPort::MarkParity: + p.Parity = MARKPARITY; // 标记校验 + break; + default: + p.Parity = NOPARITY; // 无校验 + } + + switch (m_stopBits) // 停止位 + { + case QSerialPort::OneStop: + p.StopBits = ONESTOPBIT; // 1位停止位 + break; + case QSerialPort::OneAndHalfStop: + p.StopBits = TWOSTOPBITS; // 2位停止位 + break; + case QSerialPort::TwoStop: + p.StopBits = ONE5STOPBITS; // 1.5位停止位 + break; + default: + p.StopBits = ONESTOPBIT; // 无校验 + } + + if (!SetCommState(m_CommHandler, &p)) { + // 设置参数失败 + CloseHandle(m_CommHandler); + return false; + } + m_isOpen = true; + return true; +} + +void QTSerialChannel::close() { + CloseHandle(m_CommHandler); + m_isOpen = false; +} + +bool QTSerialChannel::isOpen() { return m_isOpen; } +bool QTSerialChannel::send(const uint8_t *data, size_t len) { + DWORD dwBytesWrite = len; + BOOL bWriteStat = WriteFile(m_CommHandler, // 串口句柄 + (char *)data, // 数据首地址 + dwBytesWrite, // 要发送的数据字节数 + &dwBytesWrite, // DWORD*,用来接收返回成功发送的数据字节数 + NULL); // NULL为同步发送,OVERLAPPED*为异步发送 + return dwBytesWrite == len; +} +void QTSerialChannel::regRxListener(function cb) { m_rxcb = cb; } + +int QTSerialChannel::com_receive(uint8_t *rxbuf, int rxbufsize) { + COMMTIMEOUTS TimeOuts; + GetCommTimeouts(m_CommHandler, &TimeOuts); + TimeOuts.ReadIntervalTimeout = 0; // 读间隔超时 + TimeOuts.ReadTotalTimeoutMultiplier = 0; // 读时间系数 + TimeOuts.ReadTotalTimeoutConstant = 1; // 读时间常量 + SetCommTimeouts(m_CommHandler, &TimeOuts); + + // PurgeComm(m_CommHandler, PURGE_RXCLEAR); + + DWORD wCount = rxbufsize; // 成功读取的数据字节数 + BOOL bReadStat = ReadFile(m_CommHandler, // 串口句柄 + rxbuf, // 数据首地址 + wCount, // 要读取的数据最大字节数 + &wCount, // DWORD*,用来接收返回成功读取的数据字节数 + NULL); + return wCount; +} diff --git a/src/zqui/channelmgr/qt_serial_datachannel.hpp b/src/zqui/channelmgr/qt_serial_datachannel.hpp new file mode 100644 index 0000000..be9453f --- /dev/null +++ b/src/zqui/channelmgr/qt_serial_datachannel.hpp @@ -0,0 +1,74 @@ +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// + +#include +// +#include +// +#include +#include +// +#include "zqui\base\zqthread.hpp" + +#define SDK_VERSION 1 + +namespace iflytop { +using namespace std; +// QT_CHARTS_USE_NAMESPACE + +class QTSerialChannel { + function m_rxcb; + + QSerialPort::DataBits m_dataBits; + QSerialPort::Parity m_parity; + QSerialPort::StopBits m_stopBits; + QSerialPort::FlowControl m_flowControl; + string m_name; + + unique_ptr m_thread; + + uint32_t m_baudRate; + HANDLE m_CommHandler; + + bool m_isOpen = false; + + public: + void init(); + + virtual bool isOpen(); + virtual bool send(const uint8_t *data, size_t len); + virtual void regRxListener(function cb); + + bool open(); + void close(); + + bool setBaudRate(qint32 baudRate) { m_baudRate = baudRate; } + qint32 baudRate() const { return m_baudRate; } + + void setPortName(string name) { m_name = name; } + void setDataBits(QSerialPort::DataBits dataBits) { m_dataBits = dataBits; } + void setParity(QSerialPort::Parity parity) { m_parity = parity; } + void setStopBits(QSerialPort::StopBits stopBits) { m_stopBits = stopBits; } + void setFlowControl(QSerialPort::FlowControl flowControl) { m_flowControl = flowControl; } + + QSerialPort::DataBits dataBits() const { return m_dataBits; } + QSerialPort::Parity parity() const { return m_parity; } + QSerialPort::StopBits stopBits() const { return m_stopBits; } + QSerialPort::FlowControl flowControl() const { return m_flowControl; } + + private: + int com_receive(uint8_t *rxbuf, int rxbufsize); +}; +} // namespace iflytop diff --git a/src/zqui/mainpage/mainwindow.cpp b/src/zqui/mainpage/mainwindow.cpp new file mode 100644 index 0000000..f957055 --- /dev/null +++ b/src/zqui/mainpage/mainwindow.cpp @@ -0,0 +1,93 @@ +#include "mainwindow.h" + +#include +#include +#include +#include +#include + +#include "./ui_mainwindow.h" +#include "zqui/channelmgr/channelmgr.hpp" +// #include "app/syncbox16ch.h" +// #include "version.h" + +using namespace iflytop; +MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { + ui->setupUi(this); + + buildUI(); + ui->serialPortCB->installEventFilter(this); + startTimer(1000); +} + +void MainWindow::buildUI() { + QTSerialChannel *serialch = &ChannelMgr::ins()->serialCh; + + /** + * @brief 指令串口UI + */ + { fillinSerialPort(); } + + ui->serialBaudrateCB->addItem("115200"); + ui->serialBaudrateCB->addItem("500000"); + ui->serialBaudrateCB->addItem("2000000"); + ui->serialBaudrateCB->setCurrentIndex(0); + + connect(ui->serialOpenKey, &QPushButton::clicked, this, [=](bool check) { + // 打开串口 + if (ui->serialOpenKey->text() == "打开") { + serialch->setPortName(ui->serialPortCB->currentText().toStdString()); + serialch->setBaudRate(ui->serialBaudrateCB->currentText().toInt()); + serialch->setDataBits(QSerialPort::Data8); + serialch->setParity(QSerialPort::NoParity); + serialch->setFlowControl(QSerialPort::NoFlowControl); + serialch->setStopBits(QSerialPort::OneStop); + + /** + * @brief 串口打开时,初始化相应参数 + */ + + if (!serialch->open()) { + QMessageBox::about(NULL, "提示", "串口无法打开,串口不存在或已被占??"); + return; + } + ui->serialOpenKey->setText("关闭"); + // 下拉菜单控件使能 + ui->serialBaudrateCB->setEnabled(false); + ui->serialPortCB->setEnabled(false); + } else { + serialch->close(); + ui->serialOpenKey->setText("打开"); + ui->serialBaudrateCB->setEnabled(true); + ui->serialPortCB->setEnabled(true); + } + }); +} + +void MainWindow::on_serialPortCB_customContextMenuRequested(const QPoint &pos) {} + +void MainWindow::fillinSerialPort() { + // int curIndex = ui->serialPortCB->currentIndex(); + ui->serialPortCB->clear(); + const auto infos = QSerialPortInfo::availablePorts(); + for (const QSerialPortInfo &info : infos) { + if (info.isBusy()) continue; + ui->serialPortCB->addItem(info.portName()); + } +} +#if 1 +bool MainWindow::eventFilter(QObject *watched, QEvent *event) { + if (event->type() == QEvent::MouseButtonPress) { + if (watched == ui->serialPortCB) { + fillinSerialPort(); + } + } + return QMainWindow::eventFilter(watched, event); +} +#endif + +void MainWindow::timerEvent(QTimerEvent *event) { + // if (ui->serialOpenKey->text() == "打开") { + // fillinSerialPort(); + // } +} diff --git a/src/zqui/mainpage/mainwindow.h b/src/zqui/mainpage/mainwindow.h new file mode 100644 index 0000000..0bf808b --- /dev/null +++ b/src/zqui/mainpage/mainwindow.h @@ -0,0 +1,60 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// + +QT_BEGIN_NAMESPACE +namespace Ui { +class MainWindow; +} +QT_END_NAMESPACE + +class MainWindow : public QMainWindow { + Q_OBJECT + + public: + Ui::MainWindow *ui; + + MainWindow(QWidget *parent = nullptr); + ~MainWindow() {}; + + private slots: + void on_serialPortCB_customContextMenuRequested(const QPoint &pos); + bool eventFilter(QObject *watched, QEvent *event); + + private: + void buildUI(); + + void fillinSerialPort(); + + private: + void timerEvent(QTimerEvent *event) override; +}; +#endif // MAINWINDOW_H diff --git a/src/zqui/mainpage/mainwindow.ui b/src/zqui/mainpage/mainwindow.ui new file mode 100644 index 0000000..bef4366 --- /dev/null +++ b/src/zqui/mainpage/mainwindow.ui @@ -0,0 +1,875 @@ + + + MainWindow + + + + 0 + 0 + 753 + 545 + + + + + 0 + 8 + + + + ZFPGA + + + /* +Aqua Style Sheet for QT Applications +Author: Jaime A. Quiroga P. +Company: GTRONICK +Last updated: 22/01/2019, 07:55. +Available at: https://github.com/GTRONICK/QSS/blob/master/Aqua.qss +*/ +QMainWindow { + background-color:#ececec; +} +QTextEdit { + border-width: 1px; + border-style: solid; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} +QPlainTextEdit { + border-width: 1px; + border-style: solid; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} +QToolButton { + border-style: solid; + border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); + border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); + border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-width: 1px; + border-radius: 5px; + color: rgb(0,0,0); + padding: 2px; + background-color: rgb(255,255,255); +} +QToolButton:hover{ + border-style: solid; + border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(195, 195, 195), stop:1 rgb(222, 222, 222)); + border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(197, 197, 197), stop:1 rgb(227, 227, 227)); + border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(197, 197, 197)); + border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(195, 195, 195), stop:1 rgb(222, 222, 222)); + border-width: 1px; + border-radius: 5px; + color: rgb(0,0,0); + padding: 2px; + background-color: rgb(255,255,255); +} +QToolButton:pressed{ + border-style: solid; + border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); + border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); + border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-width: 1px; + border-radius: 5px; + color: rgb(0,0,0); + padding: 2px; + background-color: rgb(142,142,142); +} +QPushButton{ + border-style: solid; + border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); + border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); + border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-width: 1px; + border-radius: 5px; + color: rgb(0,0,0); + padding: 2px; + background-color: rgb(255,255,255); +} +QPushButton::default{ + border-style: solid; + border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); + border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); + border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-width: 1px; + border-radius: 5px; + color: rgb(0,0,0); + padding: 2px; + background-color: rgb(255,255,255); +} +QPushButton:hover{ + border-style: solid; + border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(195, 195, 195), stop:1 rgb(222, 222, 222)); + border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(197, 197, 197), stop:1 rgb(227, 227, 227)); + border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(197, 197, 197)); + border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(195, 195, 195), stop:1 rgb(222, 222, 222)); + border-width: 1px; + border-radius: 5px; + color: rgb(0,0,0); + padding: 2px; + background-color: rgb(255,255,255); +} +QPushButton:pressed{ + border-style: solid; + border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); + border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); + border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-width: 1px; + border-radius: 5px; + color: rgb(0,0,0); + padding: 2px; + background-color: rgb(142,142,142); +} +QPushButton:disabled{ + border-style: solid; + border-top-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-right-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(217, 217, 217), stop:1 rgb(227, 227, 227)); + border-left-color: qlineargradient(spread:pad, x1:0, y1:0.5, x2:1, y2:0.5, stop:0 rgb(227, 227, 227), stop:1 rgb(217, 217, 217)); + border-bottom-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgb(215, 215, 215), stop:1 rgb(222, 222, 222)); + border-width: 1px; + border-radius: 5px; + color: #808086; + padding: 2px; + background-color: rgb(142,142,142); +} +QLineEdit { + border-width: 1px; border-radius: 4px; + border-style: solid; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} +QLabel { + color: #000000; +} +QLCDNumber { + color: rgb(0, 113, 255, 255); +} +QProgressBar { + text-align: center; + color: rgb(240, 240, 240); + border-width: 1px; + border-radius: 10px; + border-color: rgb(230, 230, 230); + border-style: solid; + background-color:rgb(207,207,207); +} +QProgressBar::chunk { + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); + border-radius: 10px; +} +QMenuBar { + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(207, 209, 207, 255), stop:1 rgba(230, 229, 230, 255)); +} +QMenuBar::item { + color: #000000; + spacing: 3px; + padding: 1px 4px; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(207, 209, 207, 255), stop:1 rgba(230, 229, 230, 255)); +} + +QMenuBar::item:selected { + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); + color: #FFFFFF; +} +QMenu::item:selected { + border-style: solid; + border-top-color: transparent; + border-right-color: transparent; + border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); + border-bottom-color: transparent; + border-left-width: 2px; + color: #000000; + padding-left:15px; + padding-top:4px; + padding-bottom:4px; + padding-right:7px; +} +QMenu::item { + border-style: solid; + border-top-color: transparent; + border-right-color: transparent; + border-left-color: transparent; + border-bottom-color: transparent; + border-bottom-width: 1px; + color: #000000; + padding-left:17px; + padding-top:4px; + padding-bottom:4px; + padding-right:7px; +} +QTabWidget { + color:rgb(0,0,0); + background-color:#000000; +} +QTabWidget::pane { + border-color: rgb(223,223,223); + background-color:rgb(226,226,226); + border-style: solid; + border-width: 2px; + border-radius: 6px; +} +QTabBar::tab:first { + border-style: solid; + border-left-width:1px; + border-right-width:0px; + border-top-width:1px; + border-bottom-width:1px; + border-top-color: rgb(209,209,209); + border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); + border-bottom-color: rgb(229,229,229); + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + color: #000000; + padding: 3px; + margin-left:0px; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(255, 255, 255, 255)); +} +QTabBar::tab:last { + border-style: solid; + border-width:1px; + border-top-color: rgb(209,209,209); + border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); + border-right-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); + border-bottom-color: rgb(229,229,229); + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + color: #000000; + padding: 3px; + margin-left:0px; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(255, 255, 255, 255)); +} +QTabBar::tab { + border-style: solid; + border-top-width:1px; + border-bottom-width:1px; + border-left-width:1px; + border-top-color: rgb(209,209,209); + border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); + border-bottom-color: rgb(229,229,229); + color: #000000; + padding: 3px; + margin-left:0px; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(247, 247, 247, 255), stop:1 rgba(255, 255, 255, 255)); +} +QTabBar::tab:selected, QTabBar::tab:last:selected, QTabBar::tab:hover { + border-style: solid; + border-left-width:1px; + border-right-color: transparent; + border-top-color: rgb(209,209,209); + border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); + border-bottom-color: rgb(229,229,229); + color: #FFFFFF; + padding: 3px; + margin-left:0px; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} + +QTabBar::tab:selected, QTabBar::tab:first:selected, QTabBar::tab:hover { + border-style: solid; + border-left-width:1px; + border-bottom-width:1px; + border-top-width:1px; + border-right-color: transparent; + border-top-color: rgb(209,209,209); + border-left-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(209, 209, 209, 209), stop:1 rgba(229, 229, 229, 229)); + border-bottom-color: rgb(229,229,229); + color: #FFFFFF; + padding: 3px; + margin-left:0px; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} + +QCheckBox { + color: #000000; + padding: 2px; +} +QCheckBox:disabled { + color: #808086; + padding: 2px; +} + +QCheckBox:hover { + border-radius:4px; + border-style:solid; + padding-left: 1px; + padding-right: 1px; + padding-bottom: 1px; + padding-top: 1px; + border-width:1px; + border-color: transparent; +} +QCheckBox::indicator:checked { + + height: 10px; + width: 10px; + border-style:solid; + border-width: 1px; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); + color: #000000; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} +QCheckBox::indicator:unchecked { + + height: 10px; + width: 10px; + border-style:solid; + border-width: 1px; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); + color: #000000; +} +QRadioButton { + color: 000000; + padding: 1px; +} +QRadioButton::indicator:checked { + height: 10px; + width: 10px; + border-style:solid; + border-radius:5px; + border-width: 1px; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); + color: #a9b7c6; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} +QRadioButton::indicator:!checked { + height: 10px; + width: 10px; + border-style:solid; + border-radius:5px; + border-width: 1px; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); + color: #a9b7c6; + background-color: transparent; +} +QStatusBar { + color:#027f7f; +} +QSpinBox { + border-style: solid; + border-width: 1px; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} +QDoubleSpinBox { + border-style: solid; + border-width: 1px; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} +QTimeEdit { + border-style: solid; + border-width: 1px; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} +QDateTimeEdit { + border-style: solid; + border-width: 1px; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} +QDateEdit { + border-style: solid; + border-width: 1px; + border-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(0, 113, 255, 255), stop:1 rgba(91, 171, 252, 255)); +} + +QToolBox { + color: #a9b7c6; + background-color:#000000; +} +QToolBox::tab { + color: #a9b7c6; + background-color:#000000; +} +QToolBox::tab:selected { + color: #FFFFFF; + background-color:#000000; +} +QScrollArea { + color: #FFFFFF; + background-color:#000000; +} +QSlider::groove:horizontal { + height: 5px; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); +} +QSlider::groove:vertical { + width: 5px; + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); +} +QSlider::handle:horizontal { + background: rgb(253,253,253); + border-style: solid; + border-width: 1px; + border-color: rgb(207,207,207); + width: 12px; + margin: -5px 0; + border-radius: 7px; +} +QSlider::handle:vertical { + background: rgb(253,253,253); + border-style: solid; + border-width: 1px; + border-color: rgb(207,207,207); + height: 12px; + margin: 0 -5px; + border-radius: 7px; +} +QSlider::add-page:horizontal { + background: rgb(181,181,181); +} +QSlider::add-page:vertical { + background: rgb(181,181,181); +} +QSlider::sub-page:horizontal { + background-color: qlineargradient(spread:pad, x1:0.5, y1:1, x2:0.5, y2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); +} +QSlider::sub-page:vertical { + background-color: qlineargradient(spread:pad, y1:0.5, x1:1, y2:0.5, x2:0, stop:0 rgba(49, 147, 250, 255), stop:1 rgba(34, 142, 255, 255)); +} +QScrollBar:horizontal { + max-height: 20px; + border: 1px transparent grey; + margin: 0px 20px 0px 20px; +} +QScrollBar:vertical { + max-width: 20px; + border: 1px transparent grey; + margin: 20px 0px 20px 0px; +} +QScrollBar::handle:horizontal { + background: rgb(253,253,253); + border-style: solid; + border-width: 1px; + border-color: rgb(207,207,207); + border-radius: 7px; + min-width: 25px; +} +QScrollBar::handle:horizontal:hover { + background: rgb(253,253,253); + border-style: solid; + border-width: 1px; + border-color: rgb(147, 200, 200); + border-radius: 7px; + min-width: 25px; +} +QScrollBar::handle:vertical { + background: rgb(253,253,253); + border-style: solid; + border-width: 1px; + border-color: rgb(207,207,207); + border-radius: 7px; + min-height: 25px; +} +QScrollBar::handle:vertical:hover { + background: rgb(253,253,253); + border-style: solid; + border-width: 1px; + border-color: rgb(147, 200, 200); + border-radius: 7px; + min-height: 25px; +} +QScrollBar::add-line:horizontal { + border: 2px transparent grey; + border-top-right-radius: 7px; + border-bottom-right-radius: 7px; + background: rgba(34, 142, 255, 255); + width: 20px; + subcontrol-position: right; + subcontrol-origin: margin; +} +QScrollBar::add-line:horizontal:pressed { + border: 2px transparent grey; + border-top-right-radius: 7px; + border-bottom-right-radius: 7px; + background: rgb(181,181,181); + width: 20px; + subcontrol-position: right; + subcontrol-origin: margin; +} +QScrollBar::add-line:vertical { + border: 2px transparent grey; + border-bottom-left-radius: 7px; + border-bottom-right-radius: 7px; + background: rgba(34, 142, 255, 255); + height: 20px; + subcontrol-position: bottom; + subcontrol-origin: margin; +} +QScrollBar::add-line:vertical:pressed { + border: 2px transparent grey; + border-bottom-left-radius: 7px; + border-bottom-right-radius: 7px; + background: rgb(181,181,181); + height: 20px; + subcontrol-position: bottom; + subcontrol-origin: margin; +} +QScrollBar::sub-line:horizontal { + border: 2px transparent grey; + border-top-left-radius: 7px; + border-bottom-left-radius: 7px; + background: rgba(34, 142, 255, 255); + width: 20px; + subcontrol-position: left; + subcontrol-origin: margin; +} +QScrollBar::sub-line:horizontal:pressed { + border: 2px transparent grey; + border-top-left-radius: 7px; + border-bottom-left-radius: 7px; + background: rgb(181,181,181); + width: 20px; + subcontrol-position: left; + subcontrol-origin: margin; +} +QScrollBar::sub-line:vertical { + border: 2px transparent grey; + border-top-left-radius: 7px; + border-top-right-radius: 7px; + background: rgba(34, 142, 255, 255); + height: 20px; + subcontrol-position: top; + subcontrol-origin: margin; +} +QScrollBar::sub-line:vertical:pressed { + border: 2px transparent grey; + border-top-left-radius: 7px; + border-top-right-radius: 7px; + background: rgb(181,181,181); + height: 20px; + subcontrol-position: top; + subcontrol-origin: margin; +} +QScrollBar::left-arrow:horizontal { + border: 1px transparent grey; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + width: 6px; + height: 6px; + background: white; +} +QScrollBar::right-arrow:horizontal { + border: 1px transparent grey; + border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + width: 6px; + height: 6px; + background: white; +} +QScrollBar::up-arrow:vertical { + border: 1px transparent grey; + border-top-left-radius: 3px; + border-top-right-radius: 3px; + width: 6px; + height: 6px; + background: white; +} +QScrollBar::down-arrow:vertical { + border: 1px transparent grey; + border-bottom-left-radius: 3px; + border-bottom-right-radius: 3px; + width: 6px; + height: 6px; + background: white; +} +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { + background: none; +} +QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { + background: none; +} +QGroupBox { + border-color: rgb(156, 156, 156); + border-width: 1px; + border-style: solid; + border-radius:8px; + padding: 10px 0px 0px 0px; + +} + +QGroupBox:title { + subcontrol-origin: margin; + left: 7px; + padding: 0px 0px 0px 0px; +} + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 5 + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + 200 + 0 + + + + + 200 + 16777215 + + + + + + + + 16777215 + 16777215 + + + + 端口 + + + + + + 波特率 + + + + + + + 串口号 + + + + + + + 打开 + + + + + + + + + + QComboBox::AdjustToContents + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + + + 4 + 0 + + + + + DengXian + 9 + + + + + + + + 0 + + + QLayout::SetNoConstraint + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 4 + + + + + + + + + 0 + 2 + + + + QTabWidget::North + + + QTabWidget::Rounded + + + 1 + + + Qt::ElideLeft + + + false + + + false + + + + 指令 + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + 上报 + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + + content + sidebar + + + + + + + true + + + 专业模式 + + + 专业模式 + + + + + + diff --git a/src/zqui/version.h b/src/zqui/version.h new file mode 100644 index 0000000..40f364b --- /dev/null +++ b/src/zqui/version.h @@ -0,0 +1,4 @@ +#pragma once + +#define VERSION 17 +#define MAUFACTURER "iflytop" \ No newline at end of file