Browse Source

V0.5
1、完成了保存和写入模版的功能
2、完成了换肤的设置,正在修改QSS样式表

Apple 4 months ago
parent
commit
6930e8c5c8
48 changed files with 3659 additions and 345 deletions
  1. 52 0
      SwitchOnOff.sql
  2. 44 1
      TransmitterSwitch/AddItem/addnormalitem.cpp
  3. 7 0
      TransmitterSwitch/AddItem/addnormalitem.h
  4. 43 1
      TransmitterSwitch/AddItem/addspecialitem.cpp
  5. 7 1
      TransmitterSwitch/AddItem/addspecialitem.h
  6. 1 0
      TransmitterSwitch/ItemData/oneitem.cpp
  7. BIN
      TransmitterSwitch/Resource/ICON/Close_Light.png
  8. BIN
      TransmitterSwitch/Resource/ICON/Close_pass.png
  9. 282 0
      TransmitterSwitch/Resource/QSS/black/addnormalitem.qss
  10. 301 0
      TransmitterSwitch/Resource/QSS/black/addspecialitem.qss
  11. 0 0
      TransmitterSwitch/Resource/QSS/black/calendarheader.qss
  12. 50 0
      TransmitterSwitch/Resource/QSS/black/calendarnav.qss
  13. 126 0
      TransmitterSwitch/Resource/QSS/black/importtemplate.qss
  14. 185 0
      TransmitterSwitch/Resource/QSS/black/oneitem.qss
  15. 109 0
      TransmitterSwitch/Resource/QSS/black/savetotemplate.qss
  16. 243 0
      TransmitterSwitch/Resource/QSS/black/transmitterswitch.qss
  17. 89 0
      TransmitterSwitch/Resource/QSS/black/warning.qss
  18. 282 0
      TransmitterSwitch/Resource/QSS/white/addnormalitem.qss
  19. 301 0
      TransmitterSwitch/Resource/QSS/white/addspecialitem.qss
  20. 0 0
      TransmitterSwitch/Resource/QSS/white/calendarheader.qss
  21. 50 0
      TransmitterSwitch/Resource/QSS/white/calendarnav.qss
  22. 126 0
      TransmitterSwitch/Resource/QSS/white/importtemplate.qss
  23. 185 0
      TransmitterSwitch/Resource/QSS/white/oneitem.qss
  24. 109 0
      TransmitterSwitch/Resource/QSS/white/savetotemplate.qss
  25. 232 0
      TransmitterSwitch/Resource/QSS/white/transmitterswitch.qss
  26. 89 0
      TransmitterSwitch/Resource/QSS/white/warning.qss
  27. 4 2
      TransmitterSwitch/Resource/TransSwitch.qrc
  28. 43 1
      TransmitterSwitch/Template/importtemplate.cpp
  29. 10 0
      TransmitterSwitch/Template/importtemplate.h
  30. 177 166
      TransmitterSwitch/Template/importtemplate.ui
  31. 42 1
      TransmitterSwitch/Template/savetotemplate.cpp
  32. 10 0
      TransmitterSwitch/Template/savetotemplate.h
  33. 149 138
      TransmitterSwitch/Template/savetotemplate.ui
  34. 145 10
      TransmitterSwitch/WebAPI/FromWebAPI.cpp
  35. 1 1
      TransmitterSwitch/WebAPI/FromWebAPI.h
  36. 8 1
      TransmitterSwitch/common/date/calendarheader.cpp
  37. 3 0
      TransmitterSwitch/common/date/calendarheader.h
  38. 26 1
      TransmitterSwitch/common/date/calendarnav.cpp
  39. 3 0
      TransmitterSwitch/common/date/calendarnav.h
  40. 37 8
      TransmitterSwitch/common/warning/warning.cpp
  41. 4 0
      TransmitterSwitch/common/warning/warning.h
  42. 13 7
      TransmitterSwitch/transmitterswitch.cpp
  43. 2 2
      TransmitterSwitch/transmitterswitch.ui
  44. 32 2
      show1/StyleManager/lhstylemanager.cpp
  45. 3 1
      show1/StyleManager/lhstylemanager.h
  46. 19 1
      show1/widget.cpp
  47. 2 0
      show1/widget.h
  48. 13 0
      show1/widget.ui

+ 52 - 0
SwitchOnOff.sql

@@ -13,3 +13,55 @@ DELETE
 FROM tExecPlan
 WHERE PTTypeCode = :PTTypeCode;
 
+
+#===============================================
+# 发射机计划模版表格-tExecPlanTemplate
+#===============================================
+
+
+#删除表格
+DROP TABLE IF EXISTS "EQM_CESHI"."tExecPlanTemplate";
+
+#创建模版表格,设置模板名称不能重复
+CREATE TABLE IF NOT EXISTS "EQM_CESHI"."tExecPlanTemplate"
+(
+    "TemplateName" VARCHAR(255),
+    "ExecDate" VARCHAR(255),
+    "ExecTime" VARCHAR(255),
+    "DeviceName" VARCHAR(255),
+    "ActionName" VARCHAR(255),
+    "ActionID" INT
+)
+
+
+#查询模版
+SELECT *
+FROM tExecPlanTemplate;
+
+#获取模板名称,去掉重复的
+SELECT "TemplateName"
+FROM tExecPlanTemplate
+GROUP BY "TemplateName";
+
+#通过模板名称获取模板数据
+SELECT *
+FROM tExecPlanTemplate
+WHERE "TemplateName" = :templateName;
+
+
+#插入数据
+INSERT INTO tExecPlanTemplate (TemplateName, ExecDate, ExecTime, DeviceName, ActionName, ActionID)
+VALUES ('模版1', '2025-02-09', '09:00:00', '发射机1', '开机', 1);
+#插入数据,使用参数
+INSERT INTO tExecPlanTemplate ("TemplateName", "ExecDate", "ExecTime", "DeviceName", "ActionName", "ActionID")
+VALUES (:templateName, :execDate, :execTime, :deviceName, :actionName, :actionID);
+
+
+#删除模版
+DELETE 
+FROM tExecPlanTemplate
+WHERE TemplateName = '模版3';
+
+DELETE
+FROM tExecPlanTemplate
+WHERE TemplateName = :templateName;

+ 44 - 1
TransmitterSwitch/AddItem/addnormalitem.cpp

@@ -7,12 +7,14 @@
 #include <QFile>
 #include <QApplication>
 #include <QDesktopWidget>
+#include <QPainter>
 
 #include "common/combobox/customcombobox.h"
 #include "LHQLogAPI.h"
 #include "transmitterswitchinfo.h"
 #include "common/SelectTime/timewidget.h"
 #include "ItemData.h"
+#include "oneshadow.h"
 
 #include "lhstylemanager.h"
 
@@ -38,7 +40,11 @@ AddNormalItem::AddNormalItem(QWidget *parent) :
     // {
     //     LH_WRITE_ERROR(QString("打开文件失败:%1").arg(file.fileName()));
     // }
-    LHStyleManager::Instance()->AddWidget(this);
+    // LHStyleManager::Instance()->AddWidget(this);
+    setQSS();
+    /* 创建阴影 */
+    m_shadow = new OneShadow(ui->widget_background->size(), 16);
+    m_shadow->image();
 
     /* 设置comboBox阴影 */
     ui->comBox_devSelect->setViewShadowEffect();
@@ -111,6 +117,31 @@ void AddNormalItem::setWeekDay(int week)
 }
 
 
+/* 设置QSS */
+void AddNormalItem::setQSS()
+{
+    auto appPath = QApplication::applicationDirPath();
+    QString qssPath;
+    if(LHStyleManager::Instance()->GetCurSkinStyle() == eWhiteStyle)
+    {
+        qssPath = appPath + "/white/addnormalitem.qss";
+        
+    }else if(LHStyleManager::Instance()->GetCurSkinStyle() == eBlackStyle)
+    {
+        qssPath = appPath + "/black/addnormalitem.qss";
+    }
+    QFile file(qssPath);
+    if(file.open(QIODevice::ReadOnly))
+    {
+        QString stylesheet = file.readAll();
+        this->setStyleSheet(stylesheet);
+        file.close();
+    } else
+    {
+        LH_WRITE_ERROR(QString("打开文件失败:%1").arg(file.fileName()));
+    }
+}
+
 /* 进行查重和关闭页面 */
 void AddNormalItem::do_ok()
 {
@@ -271,3 +302,15 @@ bool AddNormalItem::eventFilter(QObject *watched, QEvent *event)
     return QDialog::eventFilter(watched, event);
 }
 
+/* 绘画事件 */
+void AddNormalItem::paintEvent(QPaintEvent *event)
+{
+    QPainter painter(this);
+    painter.setRenderHint(QPainter::Antialiasing);
+    /* 移动到方框下面 */
+    QPoint pos = ui->widget_background->pos();
+    pos.setX(pos.x() - 16);
+    pos.setY(pos.y() - 16);
+    painter.drawImage(pos, m_shadow->image());
+}
+

+ 7 - 0
TransmitterSwitch/AddItem/addnormalitem.h

@@ -7,6 +7,7 @@
 
 class TimeWidget;
 class DeviceInfo;
+class OneShadow;
 
 namespace Ui {
 class AddNormalItem;
@@ -36,6 +37,9 @@ public:
     /* 判断是否添加设备 */
     bool isAddDev() const { return m_isAddDev; }
 
+    /* 设置QSS */
+    void setQSS();
+
 signals:
     /* 添加正常日期的项 */
     void signal_addNormalItem(QString dev,QString action,QTime time);
@@ -60,6 +64,8 @@ private:
 protected:
     /* 事件过滤器 */
     bool eventFilter(QObject *watched, QEvent *event) override;
+    /* 绘画事件 */
+    void paintEvent(QPaintEvent *event) override;
     
 private:
     Ui::AddNormalItem *ui;
@@ -74,6 +80,7 @@ private:
     QTime m_time;                                   /* 执行的时间 */
 
     TimeWidget* m_timeWidget = nullptr;             /* 时间选择器 */
+    OneShadow* m_shadow = nullptr;                  /* 阴影 */
 };
 
 #endif // ADDNORMALITEM_H

+ 43 - 1
TransmitterSwitch/AddItem/addspecialitem.cpp

@@ -7,6 +7,7 @@
 #include <QFile>
 #include <QApplication>
 #include <QDesktopWidget>
+#include <QPainter>
 
 #include "common/combobox/customcombobox.h"
 #include "LHQLogAPI.h"
@@ -14,6 +15,7 @@
 #include "common/SelectTime/timewidget.h"
 #include "common/date/calendardtedit.h"
 #include "ItemData.h"
+#include "oneshadow.h"
 
 #include "lhstylemanager.h"
 
@@ -39,7 +41,9 @@ AddSpecialItem::AddSpecialItem(QWidget *parent) :
     // {
     //     LH_WRITE_ERROR(QString("打开文件失败:%1").arg(file.fileName()));
     // }
-    LHStyleManager::Instance()->AddWidget(this);
+    setQSS();
+    /* 创建弹窗阴影 */
+    m_shadow = new OneShadow(ui->widget_background->size(), 16);
     /* 设置comboBox阴影 */
     ui->comBox_devSelect->setViewShadowEffect();
     ui->comBox_actionSelect->setViewShadowEffect();
@@ -115,6 +119,31 @@ void AddSpecialItem::setWeekDay(int week)
     m_week = week;
 }
 
+/* 设置QSS */
+void AddSpecialItem::setQSS()
+{
+    auto appPath = QApplication::applicationDirPath();
+    QString qssPath;
+    if(LHStyleManager::Instance()->GetCurSkinStyle() == eWhiteStyle)
+    {
+        qssPath = appPath + "/white/addspecialitem.qss";
+        
+    }else if(LHStyleManager::Instance()->GetCurSkinStyle() == eBlackStyle)
+    {
+        qssPath = appPath + "/black/addspecialitem.qss";
+    }
+    QFile file(qssPath);
+    if(file.open(QIODevice::ReadOnly))
+    {
+        QString stylesheet = file.readAll();
+        this->setStyleSheet(stylesheet);
+        file.close();
+    } else
+    {
+        LH_WRITE_ERROR(QString("打开文件失败:%1").arg(file.fileName()));
+    }
+}
+
 
 /* 进行查重和关闭页面 */
 void AddSpecialItem::do_ok()
@@ -278,5 +307,18 @@ bool AddSpecialItem::eventFilter(QObject *watched, QEvent *event)
     return QDialog::eventFilter(watched, event);
 }
 
+/* 绘画事件 */
+void AddSpecialItem::paintEvent(QPaintEvent *event)
+{
+    QPainter painter(this);
+    painter.setRenderHint(QPainter::Antialiasing);
+    /* 移动到方框下面 */
+    QPoint pos = ui->widget_background->pos();
+    pos.setX(pos.x() - 16);
+    pos.setY(pos.y() - 16);
+    painter.drawImage(pos, m_shadow->image());
+}
+
+
 
 

+ 7 - 1
TransmitterSwitch/AddItem/addspecialitem.h

@@ -14,6 +14,7 @@
 
 class TimeWidget;
 class DeviceInfo;
+class OneShadow;
 
 namespace Ui {
 class AddSpecialItem;
@@ -45,6 +46,9 @@ public:
     /* 判断是否添加设备 */
     bool isAddDev() const { return m_isAddDev; }
 
+    /* 设置QSS */
+    void setQSS();
+
 signals:
     /* 添加特殊日期项 */
     void signal_AddSpecialItem(QString dev, QString action, QDate date, QTime time);
@@ -69,7 +73,8 @@ private:
 protected:
     /* 事件过滤器 */
     bool eventFilter(QObject *watched, QEvent *event) override;
-
+    /* 绘画事件 */
+    void paintEvent(QPaintEvent *event) override;
 
 private:
     Ui::AddSpecialItem *ui;
@@ -85,6 +90,7 @@ private:
     QDate m_date;                                   /* 执行的日期 */
 
     TimeWidget* m_timeWidget = nullptr;             /* 时间选择器 */
+    OneShadow* m_shadow = nullptr;                  /* 阴影 */
 };
 
 #endif // ADDSPECIALITEM_H

+ 1 - 0
TransmitterSwitch/ItemData/oneitem.cpp

@@ -29,6 +29,7 @@ OneItem::OneItem(bool isSpecial) :
 
 OneItem::~OneItem()
 {
+    LHStyleManager::Instance()->RemoveWidget(this);
     delete ui;
 }
 

BIN
TransmitterSwitch/Resource/ICON/Close_Light.png


BIN
TransmitterSwitch/Resource/ICON/Close_pass.png


+ 282 - 0
TransmitterSwitch/Resource/QSS/black/addnormalitem.qss

@@ -0,0 +1,282 @@
+
+/* ==========================================================
+ *  通用样式
+ * ========================================================== */
+QWidget
+{
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+    border-radius: 8px;
+    background: #FFFFFF;
+}
+
+QWidget#widget
+{
+    background: rgba(0,0,0,0.01);
+    /* background: rgba(255,255,255,1); */
+}
+
+QLabel#label_NC1
+{
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-align: left;
+    font-style: normal;
+    text-transform: uppercase;
+}
+QLabel#label_NC4
+{
+    background: #E6E9F4;
+}
+
+QPushButton
+{
+	text-align: center;
+	font-family: 思源黑体M;
+}
+
+QPushButton#pBtn_Close{
+	image: url(:/ICON/ICON/Dialog_close.png);
+}
+QPushButton#pBtn_Close:hover
+{
+	image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel:enabled
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}
+
+
+QLabel#label_devWarn,QLabel#label_timeWarn,QLabel#label_actionWarn
+{
+    font-weight: 400;
+    font-size: 14px;
+    color: #D21F21;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+/* ==========================================================
+ *  QComboBox(这个是在用的)
+ * ========================================================== */
+
+QComboBox:enabled
+{
+    background-color:#FFFFFF;
+    border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size:14px;
+    font-weight: 400;
+    color:#3A3F63;
+    padding-left: 12px;
+}
+
+/* 不能编辑的时候的样式,setEnable(false) */
+QComboBox:!enabled
+{
+    background:rgba(0,0,0,0.04);
+	border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size:14px;
+    font-weight: 400;
+    color:rgba(58,63,99,0.65);
+    padding-left: 12px;
+}
+
+QComboBox:hover
+{
+    border: 1px solid #4458FE;
+    border-radius: 4px;
+    background:transparent;
+}
+
+/* 下拉箭头所在的位置方框 */
+QComboBox::drop-down
+{
+    width: 24px;
+    border: none;
+}
+/* 下拉箭头图标 */
+QComboBox::down-arrow
+{
+    image: url(:/ICON/ICON/DownArrow.png);
+    height:16px;
+    width:16px;
+}
+
+/* 下拉条样式,就是view,整个下拉窗体的样式 */
+QComboBox QAbstractItemView
+{
+    background-color: #FFFFFF;
+    margin: 12px;
+    outline:0px;
+    font-size:14px;
+    color: #3A3F63;
+    border-radius: 4px;
+}
+
+/* 使下面两句生效,需要加上如下语句 */
+/* m_comBoxDev->setView(new QListView()); */
+QComboBox QAbstractItemView::item
+{
+    background-color: #FFFFFF;
+    border-radius:4px;
+    color: #3A3F63;
+    padding-left: 12px;
+    height: 32px;
+}
+
+QComboBox QAbstractItemView::item:hover
+{
+    border-radius:4px;
+    background-color: #EEF2FF;
+}
+
+/* QComboBox QAbstractItemView::item:selected
+{
+    border-radius:4px;
+    background-color: #EEF2FF;
+} */
+
+/******** combobox 滚动条  *********/
+QComboBox QScrollBar::vertical{ /*主体部分*/
+    width:8px;
+    background:transparent;
+    border:none;
+    border-radius:5px;
+}
+QComboBox QScrollBar::handle::vertical{ /*滑块主体*/
+    width: 8px;
+    background: #E2E2E2;
+    border-radius: 3px;
+    min-width: 8px;
+}
+QComboBox QScrollBar::handle::vertical::hover{
+    background:transparent;
+}
+QComboBox QScrollBar::add-line::vertical{/*上箭头*/
+    border:none;
+}
+QComboBox QScrollBar::sub-line::vertical{/*下箭头*/
+    border:none;
+}
+
+
+/* ==========================================================
+ *  时间报警红框
+ * ========================================================== */
+
+QLabel#label_iconTime
+{
+	border-image: url(:/ICON/ICON/Time.png);
+}
+
+TimeWidget
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #E6E9F4;
+}
+
+TimeWidget[Warn=true]
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+TimeWidget:!enabled
+{
+    background: rgba(0,0,0,0.04);
+    border: 1px solid #E6E9F4;
+}
+
+QPushButton#pBtn_selectTime
+{
+    background: transparent;
+    border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size: 14px;
+    font-weight: 400;
+    color: #3A3F63;
+    padding-left: 12px;
+    text-align: left;
+}
+
+QPushButton#pBtn_selectTime:hover
+{
+    background: transparent;
+    border: 1px solid #4458FE;
+    border-radius: 4px;
+    font-size: 14px;
+    font-weight: 400;
+    color: #4458FE;
+    padding-left: 12px;
+    text-align: left;
+}
+/* 报警红框 */
+QPushButton#pBtn_selectTime[Warn=true]
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+TimeWidget
+{
+    /* background: transparent; */
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #4458FE;
+}
+
+/* TimeWidget QPushButton
+{
+    border-image: url(:/ICON/ICON/Time.png);
+} */
+
+QPushButton#btn_tip
+{
+    border-image: url(:/ICON/ICON/Time.png);
+}
+

+ 301 - 0
TransmitterSwitch/Resource/QSS/black/addspecialitem.qss

@@ -0,0 +1,301 @@
+
+/* ==========================================================
+ *  通用样式
+ * ========================================================== */
+QWidget
+{
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+    border-radius: 8px;
+    background: #FFFFFF;
+}
+
+QWidget#widget
+{
+    background: rgba(0,0,0,0.01);
+    /* background: rgba(255,255,255,1); */
+}
+
+QLabel#label_NC1
+{
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-align: left;
+    font-style: normal;
+    text-transform: uppercase;
+}
+QLabel#label_NC4
+{
+    background: #E6E9F4;
+}
+
+QPushButton
+{
+	text-align: center;
+	font-family: 思源黑体M;
+}
+
+QPushButton#pBtn_Close{
+	image: url(:/ICON/ICON/Dialog_close.png);
+}
+QPushButton#pBtn_Close:hover
+{
+	image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel:enabled
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}
+
+
+QLabel#label_devWarn,QLabel#label_timeWarn,QLabel#label_actionWarn
+{
+    font-weight: 400;
+    font-size: 14px;
+    color: #D21F21;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+/* ==========================================================
+ *  QComboBox(这个是在用的)
+ * ========================================================== */
+
+QComboBox:enabled
+{
+    background-color:#FFFFFF;
+    border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size:14px;
+    font-weight: 400;
+    color:#3A3F63;
+    padding-left: 12px;
+}
+
+/* 不能编辑的时候的样式,setEnable(false) */
+QComboBox:!enabled
+{
+    background:rgba(0,0,0,0.04);
+	border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size:14px;
+    font-weight: 400;
+    color:rgba(58,63,99,0.65);
+    padding-left: 12px;
+}
+
+QComboBox:hover
+{
+    border: 1px solid #4458FE;
+    border-radius: 4px;
+    background:transparent;
+}
+
+/* 下拉箭头所在的位置方框 */
+QComboBox::drop-down
+{
+    width: 24px;
+    border: none;
+}
+/* 下拉箭头图标 */
+QComboBox::down-arrow
+{
+    image: url(:/ICON/ICON/DownArrow.png);
+    height:16px;
+    width:16px;
+}
+
+/* 下拉条样式,就是view,整个下拉窗体的样式 */
+QComboBox QAbstractItemView
+{
+    background-color: #FFFFFF;
+    margin: 12px;
+    outline:0px;
+    font-size:14px;
+    color: #3A3F63;
+    border-radius: 4px;
+}
+
+/* 使下面两句生效,需要加上如下语句 */
+/* m_comBoxDev->setView(new QListView()); */
+QComboBox QAbstractItemView::item
+{
+    background-color: #FFFFFF;
+    border-radius:4px;
+    color: #3A3F63;
+    padding-left: 12px;
+    height: 32px;
+}
+
+QComboBox QAbstractItemView::item:hover
+{
+    border-radius:4px;
+    background-color: #EEF2FF;
+}
+
+/* QComboBox QAbstractItemView::item:selected
+{
+    border-radius:4px;
+    background-color: #EEF2FF;
+} */
+
+/******** combobox 滚动条  *********/
+QComboBox QScrollBar::vertical{ /*主体部分*/
+    width:8px;
+    background:transparent;
+    border:none;
+    border-radius:5px;
+}
+QComboBox QScrollBar::handle::vertical{ /*滑块主体*/
+    width: 8px;
+    background: #E2E2E2;
+    border-radius: 3px;
+    min-width: 8px;
+}
+QComboBox QScrollBar::handle::vertical::hover{
+    background:transparent;
+}
+QComboBox QScrollBar::add-line::vertical{/*上箭头*/
+    border:none;
+}
+QComboBox QScrollBar::sub-line::vertical{/*下箭头*/
+    border:none;
+}
+
+
+/* ==========================================================
+ *  时间选择器
+ * ========================================================== */
+
+QPushButton#pBtn_iconTime
+{
+	border-image: url(:/ICON/ICON/Time.png);
+}
+
+TimeWidget
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #E6E9F4;
+}
+
+TimeWidget[Warn=true]
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+TimeWidget:!enabled
+{
+    background: rgba(0,0,0,0.04);
+    border: 1px solid #E6E9F4;
+}
+
+QPushButton#pBtn_selectTime
+{
+    background: transparent;
+    border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size: 14px;
+    font-weight: 400;
+    color: #3A3F63;
+    padding-left: 12px;
+    text-align: left;
+}
+
+QPushButton#pBtn_selectTime:hover
+{
+    background: transparent;
+    border: 1px solid #4458FE;
+    border-radius: 4px;
+    font-size: 14px;
+    font-weight: 400;
+    color: #4458FE;
+    padding-left: 12px;
+    text-align: left;
+}
+/* 报警红框 */
+QPushButton#pBtn_selectTime[Warn=true]
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+QPushButton#btn_tip
+{
+    border-image: url(:/ICON/ICON/Time.png);
+}
+
+/* ==========================================================
+ *  日期选择器
+ * ========================================================== */
+
+CalendarDTEdit
+{
+	background: #FFFFFF;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #E6E9F4;
+}
+
+CalendarDTEdit[Warn=true]
+{
+	background: #FFFFFF;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+CalendarDTEdit:!enabled/* 或者disable */
+{
+    background: rgba(0,0,0,0.04);
+    border: 1px solid #E6E9F4;
+}
+
+CalendarDTEdit::drop-down
+{
+ 	padding-right:8px;
+	width: 16px;
+    image: url(:/ICON/ICON/date_light.png);
+}

+ 0 - 0
TransmitterSwitch/Resource/QSS/black/calendarheader.qss


+ 50 - 0
TransmitterSwitch/Resource/QSS/black/calendarnav.qss

@@ -0,0 +1,50 @@
+QPushButton#btnPrevYear::hover
+{
+	image: url(:/Calendar/icon/light/preYear.png);
+	border:none;
+}
+QPushButton#btnPrevYear
+{
+	image: url(:/Calendar/icon/light/preYear_hover.png);
+	border:none;
+}
+
+QPushButton#btnPrevMonth::hover
+{
+	image: url(:/Calendar/icon/light/preMonth.png);
+	border:none;
+}
+QPushButton#btnPrevMonth
+{
+	image: url(:/Calendar/icon/light/preMonth_hover.png);
+	border:none;
+}
+
+QPushButton#btnNextMonth::hover
+{
+	image: url(:/Calendar/icon/light/nextMonth.png);
+	border:none;
+}
+QPushButton#btnNextMonth
+{
+	image: url(:/Calendar/icon/light/nextMonth_hover.png);
+	border:none;
+}
+
+QPushButton#btnNextYear::hover
+{
+	image: url(:/Calendar/icon/light/nextYear.png);
+	border:none;
+}
+QPushButton#btnNextYear
+{
+	image: url(:/Calendar/icon/light/nextYear_hover.png);
+	border:none;
+}
+
+QLabel 
+{
+	font-size: 14px;
+	font-weight: 500;
+	color: #3A3F63;
+}

+ 126 - 0
TransmitterSwitch/Resource/QSS/black/importtemplate.qss

@@ -0,0 +1,126 @@
+QWidget
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+QLabel#label_NC1
+{
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-align: left;
+    font-style: normal;
+    text-transform: uppercase;
+}
+
+QLabel#label_NC2,QLabel#label_NC3,QLabel#label_NC4
+{
+    font-weight: 400;
+    font-size: 14px;
+    color: #5A607F;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+QLabel#label_line1,QLabel#label_line2,QLabel#label_line3
+{
+    background: #E6E9F4;
+}
+QLabel#label_warning
+{
+    color:red;
+}
+
+QPushButton#pBtn_close
+{
+	border-image: url(:/ICON/ICON/Dialog_close.png);
+}
+
+QPushButton#pBtn_close:hover
+{	
+	border-image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel
+{
+	border-radius: 16px;
+	text-align: center;
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+	border-radius: 16px;
+	text-align: center;
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+	border-radius: 16px;
+	text-align: center;
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+	border-radius: 16px;
+	text-align: center;
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}
+
+/* ==========================================================
+ *  QTabelWidget
+ * ========================================================== */
+
+QTableWidget
+{
+    background: #FFFFFF;
+    padding-left: 0px;
+    border: 0px solid #E6E9F4;
+    text-align: left;
+}
+
+QTableWidget::item
+{
+    padding-left: 12px;
+    padding-right: 0px;
+    padding-top: 0px;
+    padding-bottom: 0px;
+
+    margin: 0px;
+
+    text-align: left;
+
+    border: 0px solid #E6E9F4;
+}
+
+QTableWidget::item:selected
+{
+    background: rgba(231,236,255,0.5);
+}
+

+ 185 - 0
TransmitterSwitch/Resource/QSS/black/oneitem.qss

@@ -0,0 +1,185 @@
+
+QWidget
+{
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #D2D2D2;
+    line-height: 22px;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+
+}
+
+QWidget#widget
+{
+    background: transparent;
+    border: 0px solid #313539;
+}
+
+QWidget#widget_content
+{
+    background: transparent;
+    border: 0px solid #313539;
+}
+
+
+/* 序号 */
+QLabel#label_num
+{
+    background: #313539;
+    border-radius: 2px 2px 2px 2px;
+    border: 1px solid #313539;
+    padding-left: 12px;
+}
+
+
+
+QPushButton#pBtn_close
+{
+    background-color: #313539;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 6px;
+
+    border: 1px solid #313539;
+    qproperty-icon: url(:/ICON/ICON/Close_Dark.png);
+    qproperty-iconSize: 20px 20px;
+}
+
+QPushButton#pBtn_close:hover
+{
+    background-color: #313539;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 6px;
+
+    border: 1px solid #438EFF;
+    qproperty-icon: url(:/ICON/ICON/Close_Dark.png);
+    qproperty-iconSize: 20px 20px;
+}
+
+/* 执行时间 */
+QPushButton#pBtn_execTime, #pBtn_execDate
+{
+    background-color: #313539;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 12px;
+
+    border: 1px solid #313539;
+}
+
+QPushButton#pBtn_execTime:hover, #pBtn_execDate:hover
+{
+    background-color: #313539;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 12px;
+
+    border: 1px solid #438EFF;
+}
+
+/* 时间图标 */ 
+QPushButton#pBtn_iconTime
+{
+    background: transparent;
+    border: none;
+    qproperty-icon: url(:/ICON/ICON/Time.png);
+    qproperty-iconSize: 16px 16px;
+}
+
+/* 日期图标 */ 
+QPushButton#pBtn_iconDate
+{
+    background: transparent;
+    border: none;
+    qproperty-icon: url(:/ICON/ICON/date_dark.png);
+    qproperty-iconSize: 16px 16px;
+}
+
+
+/*=====================================================================
+ * QComboBox下拉框
+ *==================================================================== */
+
+QComboBox
+{
+	background-color: #313539;
+	border-radius: 4px;
+	border: 1px solid #313539;
+	font-weight: 400;
+	font-size: 14px;
+	color: #D2D2D2;
+	padding-left: 12px;
+}
+QComboBox:hover, QComboBox:on 
+{
+	border: 1px solid #438EFF;
+}
+/*下拉箭头样式*/
+QComboBox::down-arrow
+{
+	height: 16px;
+	width: 16px;
+	image: url(:/ICON/ICON/DownArrow_Dark.png);
+}
+QComboBox::drop-down
+{
+    background-color:transparent;
+	padding-right:12px;
+}
+/* 下拉后,整个下拉窗体样式 */
+QComboBox QAbstractItemView
+{
+	margin: 12px;
+	font-size: 14px;
+	background-color: #5C5E61;
+	outline:0px;
+	border-radius: 4px;
+}
+/* 下拉后,整个下拉窗体每项的样式 */
+QComboBox QAbstractItemView::item 
+{
+    border-radius: 4px;
+	color: #D2D2D2;
+    height: 32px;
+	background-color: #5C5E61;
+	font-weight: 400;
+	font-size: 14px;
+	padding-left: 12px;
+}
+QComboBox QAbstractItemView::item:hover 
+{
+	font-weight: 400;
+    color: #FFFFFF;
+	background-color: #438EFF;
+}
+QComboBox QAbstractItemView::item:selected 
+{
+	font-weight: 400;
+    color: #FFFFFF;
+	background-color: #438EFF;
+}
+
+
+/*=====================================================================
+ * 报警文字和报警框
+ *==================================================================== */
+
+QLabel#label_warnning
+{
+    font-weight: 400;
+    font-size: 14px;
+    color: #D21F21;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+    padding-left: 18px;
+}
+
+QPushButton#pBtn_execTime[Warn=true], #pBtn_execDate[Warn=true]
+{
+    background-color: #313539;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 12px;
+
+    border: 1px solid #D21F21;
+}

+ 109 - 0
TransmitterSwitch/Resource/QSS/black/savetotemplate.qss

@@ -0,0 +1,109 @@
+QWidget
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+QLabel#label_NC1
+{
+    font-family: 思源黑体M;
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-transform: uppercase;
+}
+
+QLabel#label_line
+{
+    background: #E6E9F4;
+}
+
+QLabel#label_warn
+{
+	color:red;
+}
+
+QPushButton#pBtn_close
+{
+	border-image: url(:/ICON/ICON/Dialog_close.png);
+}
+
+QPushButton#pBtn_close:hover
+{
+	border-image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel
+{
+	border-radius: 16px;
+	text-align: center;
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+	border-radius: 16px;
+	text-align: center;
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+	border-radius: 16px;
+	text-align: center;
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+	border-radius: 16px;
+	text-align: center;
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}
+
+/****************  报警红框  ****************/
+QLineEdit
+{
+    background: #FFFFFF;
+    border-radius: 4px;
+    padding-left:12px;
+	border: 1px solid #E6E9F4;
+}
+
+QLineEdit:hover
+{
+    border: 1px solid #4458FE;
+}
+
+
+QLineEdit[Warn=true]
+{
+    border: 1px solid #D21F21;
+}
+
+QLineEdit:!enabled/* 或者disable */
+{
+    background: rgba(0,0,0,0.04);
+    border: 1px solid #E6E9F4;
+}
+
+

+ 243 - 0
TransmitterSwitch/Resource/QSS/black/transmitterswitch.qss

@@ -0,0 +1,243 @@
+
+
+QWidget
+{
+    font-family: 思源黑体M;
+    font-weight: 400;
+    font-size: 14px;
+    color: #B1B3B4;
+    line-height: 22px;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+/* 整体背景 */
+QWidget
+{
+    background: #202428;
+}
+
+QWidget#widget
+{
+    border-radius: 4px 4px 4px 4px;
+}
+
+QPushButton
+{
+    font-family: 思源黑体M;
+    font-weight: 400;
+    font-size: 14px;
+    color: #D2D2D2;
+    line-height: 22px;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+}
+
+/*===============================================================
+ * widget_Top
+ ================================================================*/
+QLabel#label_X1
+{
+    text-align: center;
+    color: #F53F3F;
+}
+
+QPushButton#pBtn_defaultPlan
+{
+    /* background: #202428; */
+    border-radius: 20px 20px 20px 20px;
+}
+QPushButton#pBtn_defaultPlan:checked
+{
+    border-image: url(:/ICON/ICON/Switch_Open.png);
+}
+QPushButton#pBtn_defaultPlan
+{
+    border-image: url(:/ICON/ICON/Switch_Close.png);
+}
+
+QRadioButton#rBtn_moment::indicator:unchecked, QRadioButton#rBtn_day::indicator:unchecked
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+    border: 2px solid #E5E6EB;
+    /* border-image: url(:/ICON/ICON/rBtn_Unchaecked.png); */
+}
+QRadioButton#rBtn_moment::indicator:checked, QRadioButton#rBtn_day::indicator:checked
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+    border: 4px solid #165DFF;
+    color: #B1B3B4;
+    /* border-image: url(:/ICON/ICON/rBtn_Checked.png); */
+}
+
+QLabel#label_Tip
+{
+    border-image: url(:/ICON/ICON/Tip_Dark.png);
+}
+
+QLabel#label_TipText
+{
+    padding:8px;
+    color: #FFFFFF;
+    line-height: 14px;
+    border-radius: 4px;
+    background: #373639;
+    border: 1px solid rgba(255,255,255,0.15);
+}
+
+
+/*===============================================================
+ * widget_Content
+ ================================================================*/
+QWidget#widget_content
+{
+    border-radius: 0px 0px 0px 0px;
+    border: 1px solid rgba(255,255,255,0.15);
+}
+
+QWidget#widget_weekpBtn
+{
+    background: #313539;
+    border-radius: 0px 0px 0px 0px;
+    border-right: 1px solid rgba(255,255,255,0.15);
+}
+
+/* 周几按钮 */
+QPushButton#pBtn_Monday, #pBtn_Tuesday, #pBtn_Wednesday, #pBtn_Thursday, #pBtn_Friday, #pBtn_Saturday, #pBtn_Sunday, #pBtn_SpecialDay
+{
+    text-align: left;
+    padding-left: 19px;
+    background: #313539;
+    border-radius: 0px 0px 0px 0px;
+    border: 0px;
+}
+
+QPushButton#pBtn_Monday:checked, #pBtn_Tuesday:checked, #pBtn_Wednesday:checked, #pBtn_Thursday:checked, #pBtn_Friday:checked, #pBtn_Saturday:checked, #pBtn_Sunday:checked, #pBtn_SpecialDay:checked
+{
+    text-align: left;
+    padding-left: 19px;
+    background: rgba(67,142,255,0.2);
+    border-radius: 0px;
+    border-right: 2px solid #438EFF;
+}
+
+/*===============================================================
+ * widget_bottom
+ ================================================================*/
+
+QWidget#widget_bottom
+{
+    border-radius: 0px 0px 0px 0px;
+    border-left: 1px solid rgba(255,255,255,0.15);
+    border-right: 1px solid rgba(255,255,255,0.15);
+    border-bottom: 1px solid rgba(255,255,255,0.15);
+}
+
+QPushButton#pBtn_addPlan, QPushButton#pBtn_clearPlan, QPushButton#pBtn_importPlan, QPushButton#pBtn_exportPlan
+{
+    background: rgba(255,255,255,0.08);
+    border-radius: 4px 4px 4px 4px;
+}
+
+QPushButton#pBtn_addPlan:hover, #pBtn_clearPlan:hover, #pBtn_importPlan:hover, #pBtn_exportPlan:hover
+{
+    background: #1a69b8;
+    border-radius: 4px 4px 4px 4px;
+}
+
+
+/*===============================================================
+ * WidgetItems
+ ================================================================*/
+
+/* QWidget#widget_items_background
+{
+    border-radius: 0px 0px 0px 0px;
+    border: none;
+}
+
+QWidget#scrollAreaWidgetContents
+{
+    border-radius: 0px 0px 0px 0px;
+    border: 0px solid rgba(255,255,255,0.15);
+}
+
+QWidget#widget_items
+{
+    border-radius: 0px 0px 0px 0px;
+    border: 0px solid rgba(255,255,255,0.15);
+} */
+
+/*QScrollBar*/
+QScrollArea
+{
+	background:transparent;
+	border-radius:0px;
+	border:none;
+}
+QScrollBar:horizontal, QScrollBar:vertical
+{
+    border:none;
+    background-color: rgba(255, 255, 255, 0);
+    margin: 0px 0px 0px 0px;
+}
+QScrollBar:horizontal
+{
+    height: 12px;
+}
+QScrollBar:vertical
+{
+    width: 6px;
+}
+QScrollBar::handle:horizontal,QScrollBar::handle:vertical
+{
+    background: #E2E2E2;
+    border-radius: 3px;
+    min-width: 8px;
+}
+QScrollBar::handle:horizontal
+{
+    min-width: 8px;
+}
+QScrollBar::handle:vertical
+{
+    min-height: 113px;
+}
+QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal,
+QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical
+{
+    background-color: rgba(255, 255, 255, 0);
+    border: none;
+}
+QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal,
+QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical
+{
+    background-color: rgba(255, 255, 255, 0);
+    background: none;
+}
+
+
+
+/*===============================================================
+ * TimeWidget 时间选择器
+ *===============================================================*/
+
+TimeWidget
+{
+    /* background: transparent; */
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #438EFF;
+}
+
+CDate
+{
+	background: #FFFFFF;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #E6E9F4;
+}

+ 89 - 0
TransmitterSwitch/Resource/QSS/black/warning.qss

@@ -0,0 +1,89 @@
+QWidget
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+QLabel#label_NC1
+{
+    font-family: 思源黑体M;
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-transform: uppercase;
+}
+
+QLabel#label_line
+{
+    background: #E6E9F4;
+}
+
+/* 设置图标 */
+QLabel#label_warnIcon
+{
+    border-image: url(:/ICON/Tip/Tips2x.png);
+}
+
+QLabel#label_Warn
+{
+	font-family: 思源黑体R;
+	font-weight: 400;
+	font-size: 18px;
+	color: #3A3F63;
+	line-height: 27px;
+}
+
+QPushButton#pBtn_close{
+	border-image: url(:/ICON/ICON/Dialog_close.png);
+}
+QPushButton#pBtn_close:hover{
+	
+	border-image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+QPushButton
+{
+	background: #FFFFFF;
+	border: 1px solid #E6E9F4;
+	text-align: center;
+}
+
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}

+ 282 - 0
TransmitterSwitch/Resource/QSS/white/addnormalitem.qss

@@ -0,0 +1,282 @@
+
+/* ==========================================================
+ *  通用样式
+ * ========================================================== */
+QWidget
+{
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+    border-radius: 8px;
+    background: #FFFFFF;
+}
+
+QWidget#widget
+{
+    background: rgba(0,0,0,0.01);
+    /* background: rgba(255,255,255,1); */
+}
+
+QLabel#label_NC1
+{
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-align: left;
+    font-style: normal;
+    text-transform: uppercase;
+}
+QLabel#label_NC4
+{
+    background: #E6E9F4;
+}
+
+QPushButton
+{
+	text-align: center;
+	font-family: 思源黑体M;
+}
+
+QPushButton#pBtn_Close{
+	image: url(:/ICON/ICON/Dialog_close.png);
+}
+QPushButton#pBtn_Close:hover
+{
+	image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel:enabled
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}
+
+
+QLabel#label_devWarn,QLabel#label_timeWarn,QLabel#label_actionWarn
+{
+    font-weight: 400;
+    font-size: 14px;
+    color: #D21F21;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+/* ==========================================================
+ *  QComboBox(这个是在用的)
+ * ========================================================== */
+
+QComboBox:enabled
+{
+    background-color:#FFFFFF;
+    border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size:14px;
+    font-weight: 400;
+    color:#3A3F63;
+    padding-left: 12px;
+}
+
+/* 不能编辑的时候的样式,setEnable(false) */
+QComboBox:!enabled
+{
+    background:rgba(0,0,0,0.04);
+	border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size:14px;
+    font-weight: 400;
+    color:rgba(58,63,99,0.65);
+    padding-left: 12px;
+}
+
+QComboBox:hover
+{
+    border: 1px solid #4458FE;
+    border-radius: 4px;
+    background:transparent;
+}
+
+/* 下拉箭头所在的位置方框 */
+QComboBox::drop-down
+{
+    width: 24px;
+    border: none;
+}
+/* 下拉箭头图标 */
+QComboBox::down-arrow
+{
+    image: url(:/ICON/ICON/DownArrow.png);
+    height:16px;
+    width:16px;
+}
+
+/* 下拉条样式,就是view,整个下拉窗体的样式 */
+QComboBox QAbstractItemView
+{
+    background-color: #FFFFFF;
+    margin: 12px;
+    outline:0px;
+    font-size:14px;
+    color: #3A3F63;
+    border-radius: 4px;
+}
+
+/* 使下面两句生效,需要加上如下语句 */
+/* m_comBoxDev->setView(new QListView()); */
+QComboBox QAbstractItemView::item
+{
+    background-color: #FFFFFF;
+    border-radius:4px;
+    color: #3A3F63;
+    padding-left: 12px;
+    height: 32px;
+}
+
+QComboBox QAbstractItemView::item:hover
+{
+    border-radius:4px;
+    background-color: #EEF2FF;
+}
+
+/* QComboBox QAbstractItemView::item:selected
+{
+    border-radius:4px;
+    background-color: #EEF2FF;
+} */
+
+/******** combobox 滚动条  *********/
+QComboBox QScrollBar::vertical{ /*主体部分*/
+    width:8px;
+    background:transparent;
+    border:none;
+    border-radius:5px;
+}
+QComboBox QScrollBar::handle::vertical{ /*滑块主体*/
+    width: 8px;
+    background: #E2E2E2;
+    border-radius: 3px;
+    min-width: 8px;
+}
+QComboBox QScrollBar::handle::vertical::hover{
+    background:transparent;
+}
+QComboBox QScrollBar::add-line::vertical{/*上箭头*/
+    border:none;
+}
+QComboBox QScrollBar::sub-line::vertical{/*下箭头*/
+    border:none;
+}
+
+
+/* ==========================================================
+ *  时间报警红框
+ * ========================================================== */
+
+QLabel#label_iconTime
+{
+	border-image: url(:/ICON/ICON/Time.png);
+}
+
+TimeWidget
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #E6E9F4;
+}
+
+TimeWidget[Warn=true]
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+TimeWidget:!enabled
+{
+    background: rgba(0,0,0,0.04);
+    border: 1px solid #E6E9F4;
+}
+
+QPushButton#pBtn_selectTime
+{
+    background: transparent;
+    border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size: 14px;
+    font-weight: 400;
+    color: #3A3F63;
+    padding-left: 12px;
+    text-align: left;
+}
+
+QPushButton#pBtn_selectTime:hover
+{
+    background: transparent;
+    border: 1px solid #4458FE;
+    border-radius: 4px;
+    font-size: 14px;
+    font-weight: 400;
+    color: #4458FE;
+    padding-left: 12px;
+    text-align: left;
+}
+/* 报警红框 */
+QPushButton#pBtn_selectTime[Warn=true]
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+TimeWidget
+{
+    /* background: transparent; */
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #4458FE;
+}
+
+/* TimeWidget QPushButton
+{
+    border-image: url(:/ICON/ICON/Time.png);
+} */
+
+QPushButton#btn_tip
+{
+    border-image: url(:/ICON/ICON/Time.png);
+}
+

+ 301 - 0
TransmitterSwitch/Resource/QSS/white/addspecialitem.qss

@@ -0,0 +1,301 @@
+
+/* ==========================================================
+ *  通用样式
+ * ========================================================== */
+QWidget
+{
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+    border-radius: 8px;
+    background: #FFFFFF;
+}
+
+QWidget#widget
+{
+    background: rgba(0,0,0,0.01);
+    /* background: rgba(255,255,255,1); */
+}
+
+QLabel#label_NC1
+{
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-align: left;
+    font-style: normal;
+    text-transform: uppercase;
+}
+QLabel#label_NC4
+{
+    background: #E6E9F4;
+}
+
+QPushButton
+{
+	text-align: center;
+	font-family: 思源黑体M;
+}
+
+QPushButton#pBtn_Close{
+	image: url(:/ICON/ICON/Dialog_close.png);
+}
+QPushButton#pBtn_Close:hover
+{
+	image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel:enabled
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}
+
+
+QLabel#label_devWarn,QLabel#label_timeWarn,QLabel#label_actionWarn
+{
+    font-weight: 400;
+    font-size: 14px;
+    color: #D21F21;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+/* ==========================================================
+ *  QComboBox(这个是在用的)
+ * ========================================================== */
+
+QComboBox:enabled
+{
+    background-color:#FFFFFF;
+    border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size:14px;
+    font-weight: 400;
+    color:#3A3F63;
+    padding-left: 12px;
+}
+
+/* 不能编辑的时候的样式,setEnable(false) */
+QComboBox:!enabled
+{
+    background:rgba(0,0,0,0.04);
+	border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size:14px;
+    font-weight: 400;
+    color:rgba(58,63,99,0.65);
+    padding-left: 12px;
+}
+
+QComboBox:hover
+{
+    border: 1px solid #4458FE;
+    border-radius: 4px;
+    background:transparent;
+}
+
+/* 下拉箭头所在的位置方框 */
+QComboBox::drop-down
+{
+    width: 24px;
+    border: none;
+}
+/* 下拉箭头图标 */
+QComboBox::down-arrow
+{
+    image: url(:/ICON/ICON/DownArrow.png);
+    height:16px;
+    width:16px;
+}
+
+/* 下拉条样式,就是view,整个下拉窗体的样式 */
+QComboBox QAbstractItemView
+{
+    background-color: #FFFFFF;
+    margin: 12px;
+    outline:0px;
+    font-size:14px;
+    color: #3A3F63;
+    border-radius: 4px;
+}
+
+/* 使下面两句生效,需要加上如下语句 */
+/* m_comBoxDev->setView(new QListView()); */
+QComboBox QAbstractItemView::item
+{
+    background-color: #FFFFFF;
+    border-radius:4px;
+    color: #3A3F63;
+    padding-left: 12px;
+    height: 32px;
+}
+
+QComboBox QAbstractItemView::item:hover
+{
+    border-radius:4px;
+    background-color: #EEF2FF;
+}
+
+/* QComboBox QAbstractItemView::item:selected
+{
+    border-radius:4px;
+    background-color: #EEF2FF;
+} */
+
+/******** combobox 滚动条  *********/
+QComboBox QScrollBar::vertical{ /*主体部分*/
+    width:8px;
+    background:transparent;
+    border:none;
+    border-radius:5px;
+}
+QComboBox QScrollBar::handle::vertical{ /*滑块主体*/
+    width: 8px;
+    background: #E2E2E2;
+    border-radius: 3px;
+    min-width: 8px;
+}
+QComboBox QScrollBar::handle::vertical::hover{
+    background:transparent;
+}
+QComboBox QScrollBar::add-line::vertical{/*上箭头*/
+    border:none;
+}
+QComboBox QScrollBar::sub-line::vertical{/*下箭头*/
+    border:none;
+}
+
+
+/* ==========================================================
+ *  时间选择器
+ * ========================================================== */
+
+QPushButton#pBtn_iconTime
+{
+	border-image: url(:/ICON/ICON/Time.png);
+}
+
+TimeWidget
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #E6E9F4;
+}
+
+TimeWidget[Warn=true]
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+TimeWidget:!enabled
+{
+    background: rgba(0,0,0,0.04);
+    border: 1px solid #E6E9F4;
+}
+
+QPushButton#pBtn_selectTime
+{
+    background: transparent;
+    border: 1px solid #E6E9F4;
+    border-radius: 4px;
+    font-size: 14px;
+    font-weight: 400;
+    color: #3A3F63;
+    padding-left: 12px;
+    text-align: left;
+}
+
+QPushButton#pBtn_selectTime:hover
+{
+    background: transparent;
+    border: 1px solid #4458FE;
+    border-radius: 4px;
+    font-size: 14px;
+    font-weight: 400;
+    color: #4458FE;
+    padding-left: 12px;
+    text-align: left;
+}
+/* 报警红框 */
+QPushButton#pBtn_selectTime[Warn=true]
+{
+	background: transparent;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+QPushButton#btn_tip
+{
+    border-image: url(:/ICON/ICON/Time.png);
+}
+
+/* ==========================================================
+ *  日期选择器
+ * ========================================================== */
+
+CalendarDTEdit
+{
+	background: #FFFFFF;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #E6E9F4;
+}
+
+CalendarDTEdit[Warn=true]
+{
+	background: #FFFFFF;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #D21F21;
+}
+
+CalendarDTEdit:!enabled/* 或者disable */
+{
+    background: rgba(0,0,0,0.04);
+    border: 1px solid #E6E9F4;
+}
+
+CalendarDTEdit::drop-down
+{
+ 	padding-right:8px;
+	width: 16px;
+    image: url(:/ICON/ICON/date_light.png);
+}

+ 0 - 0
TransmitterSwitch/Resource/QSS/white/calendarheader.qss


+ 50 - 0
TransmitterSwitch/Resource/QSS/white/calendarnav.qss

@@ -0,0 +1,50 @@
+QPushButton#btnPrevYear::hover
+{
+	image: url(:/Calendar/icon/light/preYear.png);
+	border:none;
+}
+QPushButton#btnPrevYear
+{
+	image: url(:/Calendar/icon/light/preYear_hover.png);
+	border:none;
+}
+
+QPushButton#btnPrevMonth::hover
+{
+	image: url(:/Calendar/icon/light/preMonth.png);
+	border:none;
+}
+QPushButton#btnPrevMonth
+{
+	image: url(:/Calendar/icon/light/preMonth_hover.png);
+	border:none;
+}
+
+QPushButton#btnNextMonth::hover
+{
+	image: url(:/Calendar/icon/light/nextMonth.png);
+	border:none;
+}
+QPushButton#btnNextMonth
+{
+	image: url(:/Calendar/icon/light/nextMonth_hover.png);
+	border:none;
+}
+
+QPushButton#btnNextYear::hover
+{
+	image: url(:/Calendar/icon/light/nextYear.png);
+	border:none;
+}
+QPushButton#btnNextYear
+{
+	image: url(:/Calendar/icon/light/nextYear_hover.png);
+	border:none;
+}
+
+QLabel 
+{
+	font-size: 14px;
+	font-weight: 500;
+	color: #3A3F63;
+}

+ 126 - 0
TransmitterSwitch/Resource/QSS/white/importtemplate.qss

@@ -0,0 +1,126 @@
+QWidget
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+QLabel#label_NC1
+{
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-align: left;
+    font-style: normal;
+    text-transform: uppercase;
+}
+
+QLabel#label_NC2,QLabel#label_NC3,QLabel#label_NC4
+{
+    font-weight: 400;
+    font-size: 14px;
+    color: #5A607F;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+QLabel#label_line1,QLabel#label_line2,QLabel#label_line3
+{
+    background: #E6E9F4;
+}
+QLabel#label_warning
+{
+    color:red;
+}
+
+QPushButton#pBtn_close
+{
+	border-image: url(:/ICON/ICON/Dialog_close.png);
+}
+
+QPushButton#pBtn_close:hover
+{	
+	border-image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel
+{
+	border-radius: 16px;
+	text-align: center;
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+	border-radius: 16px;
+	text-align: center;
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+	border-radius: 16px;
+	text-align: center;
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+	border-radius: 16px;
+	text-align: center;
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}
+
+/* ==========================================================
+ *  QTabelWidget
+ * ========================================================== */
+
+QTableWidget
+{
+    background: #FFFFFF;
+    padding-left: 0px;
+    border: 0px solid #E6E9F4;
+    text-align: left;
+}
+
+QTableWidget::item
+{
+    padding-left: 12px;
+    padding-right: 0px;
+    padding-top: 0px;
+    padding-bottom: 0px;
+
+    margin: 0px;
+
+    text-align: left;
+
+    border: 0px solid #E6E9F4;
+}
+
+QTableWidget::item:selected
+{
+    background: rgba(231,236,255,0.5);
+}
+

+ 185 - 0
TransmitterSwitch/Resource/QSS/white/oneitem.qss

@@ -0,0 +1,185 @@
+
+QWidget
+{
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 22px;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+    background: #FFFFFF;
+}
+
+QWidget#widget
+{
+    background: transparent;
+    border: 0px solid #313539;
+}
+
+QWidget#widget_content
+{
+    background: transparent;
+    border: 0px solid #313539;
+}
+
+
+/* 序号 */
+QLabel#label_num
+{
+    background-color: rgba(0,0,0,0.04);
+    border-radius: 2px 2px 2px 2px;
+    border: 1px solid #E6E9F4;
+    padding-left: 12px;
+}
+
+
+
+QPushButton#pBtn_close
+{
+    background-color: #FFFFFF;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 6px;
+
+    border: 1px solid #E6E9F4;
+    qproperty-icon: url(:/ICON/ICON/Close_Light.png);
+    qproperty-iconSize: 20px 20px;
+}
+
+QPushButton#pBtn_close:hover
+{
+    background-color: #FFFFFF;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 6px;
+
+    border: 1px solid #4458FE;
+    qproperty-icon: url(:/ICON/ICON/Close_pass.png);
+    qproperty-iconSize: 20px 20px;
+}
+
+/* 执行时间 */
+QPushButton#pBtn_execTime, #pBtn_execDate
+{
+    background-color: #FFFFFF;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 12px;
+
+    border: 1px solid #E6E9F4;
+}
+
+QPushButton#pBtn_execTime:hover, #pBtn_execDate:hover
+{
+    background-color: #FFFFFF;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 12px;
+
+    border: 1px solid #4458FE;
+}
+
+/* 时间图标 */ 
+QPushButton#pBtn_iconTime
+{
+    background: transparent;
+    border: none;
+    qproperty-icon: url(:/ICON/ICON/Time.png);
+    qproperty-iconSize: 16px 16px;
+}
+
+/* 日期图标 */ 
+QPushButton#pBtn_iconDate
+{
+    background: transparent;
+    border: none;
+    qproperty-icon: url(:/ICON/ICON/date_dark.png);
+    qproperty-iconSize: 16px 16px;
+}
+
+
+/*=====================================================================
+ * QComboBox下拉框
+ *==================================================================== */
+
+QComboBox
+{
+	background-color: #313539;
+	border-radius: 4px;
+	border: 1px solid #313539;
+	font-weight: 400;
+	font-size: 14px;
+	color: #D2D2D2;
+	padding-left: 12px;
+}
+QComboBox:hover, QComboBox:on 
+{
+	border: 1px solid #438EFF;
+}
+/*下拉箭头样式*/
+QComboBox::down-arrow
+{
+	height: 16px;
+	width: 16px;
+	image: url(:/ICON/ICON/DownArrow_Dark.png);
+}
+QComboBox::drop-down
+{
+    background-color:transparent;
+	padding-right:12px;
+}
+/* 下拉后,整个下拉窗体样式 */
+QComboBox QAbstractItemView
+{
+	margin: 12px;
+	font-size: 14px;
+	background-color: #5C5E61;
+	outline:0px;
+	border-radius: 4px;
+}
+/* 下拉后,整个下拉窗体每项的样式 */
+QComboBox QAbstractItemView::item 
+{
+    border-radius: 4px;
+	color: #D2D2D2;
+    height: 32px;
+	background-color: #5C5E61;
+	font-weight: 400;
+	font-size: 14px;
+	padding-left: 12px;
+}
+QComboBox QAbstractItemView::item:hover 
+{
+	font-weight: 400;
+    color: #FFFFFF;
+	background-color: #438EFF;
+}
+QComboBox QAbstractItemView::item:selected 
+{
+	font-weight: 400;
+    color: #FFFFFF;
+	background-color: #438EFF;
+}
+
+
+/*=====================================================================
+ * 报警文字和报警框
+ *==================================================================== */
+
+QLabel#label_warnning
+{
+    font-weight: 400;
+    font-size: 14px;
+    color: #D21F21;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+    padding-left: 18px;
+}
+
+QPushButton#pBtn_execTime[Warn=true], #pBtn_execDate[Warn=true]
+{
+    background-color: #313539;
+    border-radius: 2px 2px 2px 2px;
+    padding-left: 12px;
+
+    border: 1px solid #D21F21;
+}

+ 109 - 0
TransmitterSwitch/Resource/QSS/white/savetotemplate.qss

@@ -0,0 +1,109 @@
+QWidget
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+QLabel#label_NC1
+{
+    font-family: 思源黑体M;
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-transform: uppercase;
+}
+
+QLabel#label_line
+{
+    background: #E6E9F4;
+}
+
+QLabel#label_warn
+{
+	color:red;
+}
+
+QPushButton#pBtn_close
+{
+	border-image: url(:/ICON/ICON/Dialog_close.png);
+}
+
+QPushButton#pBtn_close:hover
+{
+	border-image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel
+{
+	border-radius: 16px;
+	text-align: center;
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+	border-radius: 16px;
+	text-align: center;
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+	border-radius: 16px;
+	text-align: center;
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+	border-radius: 16px;
+	text-align: center;
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}
+
+/****************  报警红框  ****************/
+QLineEdit
+{
+    background: #FFFFFF;
+    border-radius: 4px;
+    padding-left:12px;
+	border: 1px solid #E6E9F4;
+}
+
+QLineEdit:hover
+{
+    border: 1px solid #4458FE;
+}
+
+
+QLineEdit[Warn=true]
+{
+    border: 1px solid #D21F21;
+}
+
+QLineEdit:!enabled/* 或者disable */
+{
+    background: rgba(0,0,0,0.04);
+    border: 1px solid #E6E9F4;
+}
+
+

+ 232 - 0
TransmitterSwitch/Resource/QSS/white/transmitterswitch.qss

@@ -0,0 +1,232 @@
+
+
+QWidget
+{
+    font-family: 思源黑体M;
+    font-weight: 400;
+    font-size: 14px;
+    color: #1D2129;
+    line-height: 22px;
+    text-align: left;
+    font-style: normal;
+    text-transform: none;
+}
+
+/* 整体背景 */
+QWidget
+{
+    background: #FFFFFF;
+}
+
+QWidget#widget
+{
+    border-radius: 4px 4px 4px 4px;
+}
+
+QPushButton
+{
+    font-family: 思源黑体M;
+    font-weight: 400;
+    font-size: 14px;
+    color: #3A3F63;
+    line-height: 22px;
+    text-align: center;
+    font-style: normal;
+    text-transform: none;
+}
+
+/*===============================================================
+ * widget_Top
+ ================================================================*/
+QLabel#label_X1
+{
+    text-align: center;
+    color: #F53F3F;
+}
+
+QPushButton#pBtn_defaultPlan
+{
+    /* background: #202428; */
+    border-radius: 20px 20px 20px 20px;
+}
+QPushButton#pBtn_defaultPlan:checked
+{
+    border-image: url(:/ICON/ICON/Switch_Open.png);
+}
+QPushButton#pBtn_defaultPlan
+{
+    border-image: url(:/ICON/ICON/Switch_Close.png);
+}
+
+QRadioButton#rBtn_moment::indicator:unchecked, QRadioButton#rBtn_day::indicator:unchecked
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+    border: 0px solid #E5E6EB;
+    border-image: url(:/ICON/ICON/rBtn_Unchaecked.png);
+}
+QRadioButton#rBtn_moment::indicator:checked, QRadioButton#rBtn_day::indicator:checked
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+    border: 0px solid #165DFF;
+    color: #B1B3B4;
+    border-image: url(:/ICON/ICON/rBtn_Checked.png);
+}
+
+QLabel#label_Tip
+{
+    border-image: url(:/ICON/ICON/Tip_Light.png);
+}
+
+QLabel#label_TipText
+{
+    padding:8px;
+    color: #FFFFFF;
+    line-height: 14px;
+    border-radius: 4px;
+    background-color: rgba(0,0,0,0.4);
+    border: 0px solid rgba(255,255,255,0.15);
+}
+
+
+/*===============================================================
+ * widget_Content
+ ================================================================*/
+QWidget#widget_content
+{
+    border-radius: 0px 0px 0px 0px;
+    border: 1px solid #DAE0F2;
+}
+
+QWidget#widget_weekpBtn
+{
+    background-color: #F5F5FA;
+    border-right: 1px solid #DAE0F2;
+}
+
+/* 周几按钮 */
+QPushButton#pBtn_Monday, #pBtn_Tuesday, #pBtn_Wednesday, #pBtn_Thursday, #pBtn_Friday, #pBtn_Saturday, #pBtn_Sunday, #pBtn_SpecialDay
+{
+    background-color: #F5F5FA;
+
+    text-align: left;
+    padding-left: 19px;
+    border-radius: 0px 0px 0px 0px;
+    border: 0px;
+    border-right:0px solid #4458FE;
+}
+
+QPushButton#pBtn_Monday:checked, #pBtn_Tuesday:checked, #pBtn_Wednesday:checked, #pBtn_Thursday:checked, #pBtn_Friday:checked, #pBtn_Saturday:checked, #pBtn_Sunday:checked, #pBtn_SpecialDay:checked
+{
+    color:#4458FE;
+    background-color:rgba(68, 88, 254, 0.10);
+    text-align: left;
+    padding-left: 19px;
+    border-radius: 0px;
+    border-right: 2px solid #4458FE;
+}
+
+/*===============================================================
+ * widget_bottom
+ ================================================================*/
+
+QWidget#widget_bottom
+{
+    border-radius: 0px 0px 0px 0px;
+    border-left: 1px solid #DAE0F2;
+    border-right: 1px solid #DAE0F2;
+    border-bottom: 1px solid #DAE0F2;
+}
+
+QPushButton#pBtn_addPlan, QPushButton#pBtn_clearPlan, QPushButton#pBtn_importPlan, QPushButton#pBtn_exportPlan
+{
+    font-family: 思源黑体M;
+    background-color: #FFFFFF;
+    border-radius: 4px;
+    border: 1px solid #E6E9F4;
+}
+
+QPushButton#pBtn_addPlan:hover, #pBtn_clearPlan:hover, #pBtn_importPlan:hover, #pBtn_exportPlan:hover
+{
+    font-family: 思源黑体M;
+    color: #4458FE;
+    background-color: #FFFFFF;
+    border-radius: 4px;
+    border: 1px solid #4458FE;
+}
+
+
+/*===============================================================
+ * WidgetItems
+ ================================================================*/
+
+/*QScrollBar*/
+QScrollArea
+{
+	background:transparent;
+	border-radius:0px;
+	border:none;
+}
+QScrollBar:horizontal, QScrollBar:vertical
+{
+    border:none;
+    background-color: rgba(255, 255, 255, 0);
+    margin: 0px 0px 0px 0px;
+}
+QScrollBar:horizontal
+{
+    height: 12px;
+}
+QScrollBar:vertical
+{
+    width: 6px;
+}
+QScrollBar::handle:horizontal,QScrollBar::handle:vertical
+{
+    background: #E2E2E2;
+    border-radius: 3px;
+    min-width: 8px;
+}
+QScrollBar::handle:horizontal
+{
+    min-width: 8px;
+}
+QScrollBar::handle:vertical
+{
+    min-height: 113px;
+}
+QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal,
+QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical
+{
+    background-color: rgba(255, 255, 255, 0);
+    border: none;
+}
+QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal,
+QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical
+{
+    background-color: rgba(255, 255, 255, 0);
+    background: none;
+}
+
+
+
+/*===============================================================
+ * TimeWidget 时间选择器
+ *===============================================================*/
+
+TimeWidget
+{
+    /* background: transparent; */
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #438EFF;
+}
+
+CDate
+{
+	background: #FFFFFF;
+    border-radius: 4px;
+    padding-left:12px;
+    border: 1px solid #E6E9F4;
+}

+ 89 - 0
TransmitterSwitch/Resource/QSS/white/warning.qss

@@ -0,0 +1,89 @@
+QWidget
+{
+    background: #FFFFFF;
+    border-radius: 8px;
+    font-family: 思源黑体R;
+    font-weight: 400;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 21px;
+    text-align: left;
+    font-style: normal;
+}
+
+QLabel#label_NC1
+{
+    font-family: 思源黑体M;
+    font-weight: bold;
+    font-size: 18px;
+    color: #3A3F63;
+    line-height: 27px;
+    text-transform: uppercase;
+}
+
+QLabel#label_line
+{
+    background: #E6E9F4;
+}
+
+/* 设置图标 */
+QLabel#label_warnIcon
+{
+    border-image: url(:/ICON/Tip/Tips2x.png);
+}
+
+QLabel#label_Warn
+{
+	font-family: 思源黑体R;
+	font-weight: 400;
+	font-size: 18px;
+	color: #3A3F63;
+	line-height: 27px;
+}
+
+QPushButton#pBtn_close{
+	border-image: url(:/ICON/ICON/Dialog_close.png);
+}
+QPushButton#pBtn_close:hover{
+	
+	border-image: url(:/ICON/ICON/Dialog_close2.png);
+}
+
+QPushButton
+{
+	background: #FFFFFF;
+	border: 1px solid #E6E9F4;
+	text-align: center;
+}
+
+
+/********* 普通方框按钮三种状态效果 *********/
+QPushButton#pBtn_cancel
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #E6E9F4;
+    color: #3A3F63;
+}
+QPushButton#pBtn_cancel:hover
+{
+    background: #FFFFFF;
+    border-radius: 16px;
+    border: 1px solid #4458FE;
+    color: #4458FE;
+}
+
+/********* 带有底色按钮三种状态效果 *********/
+QPushButton#pBtn_ok
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:1 #4F8AFF,stop:0 #4B5EFF);
+    border-radius: 16px;
+}
+
+QPushButton#pBtn_ok:hover
+{
+    color:white;
+    background: qlineargradient( x0:1,x1:1,y1:0,y2:0,stop:0 #5D73FF,stop:1 #6092FF);
+    border-radius: 16px;
+}

+ 4 - 2
TransmitterSwitch/Resource/TransSwitch.qrc

@@ -1,12 +1,12 @@
 <RCC>
     <qresource prefix="/QSS">
-        <file>QSS/TransmitterSwitch_dark.qss</file>
+        <!-- <file>QSS/TransmitterSwitch_dark.qss</file>
         <file>QSS/AddNormalItem_Light.qss</file>
         <file>QSS/AddSpecialItem_Light.qss</file>
         <file>QSS/OneItem_dark.qss</file>
         <file>QSS/savetotemplate_light.qss</file>
         <file>QSS/importtemplate_light.qss</file>
-        <file>QSS/warning_light.qss</file>
+        <file>QSS/warning_light.qss</file> -->
     </qresource>
     <qresource prefix="/ICON">
         <file>Tip/Complete2x.png</file>
@@ -29,6 +29,8 @@
         <file>ICON/date_light.png</file>
         <file>ICON/DownArrow.png</file>
         <file>ICON/Close_Dark.png</file>
+        <file>ICON/Close_Light.png</file>
+        <file>ICON/Close_pass.png</file>
         <file>ICON/DownArrow_Dark.png</file>
     </qresource>
     <qresource prefix="/Font">

+ 43 - 1
TransmitterSwitch/Template/importtemplate.cpp

@@ -5,9 +5,12 @@
 #include <QPoint>
 #include <QTableWidgetItem>
 #include <QFile>
+#include <QPainter>
 
 #include "warning/warning.h"
 #include "lhstylemanager.h"
+#include "LHQLogAPI.h"
+#include "oneshadow.h"
 
 ImportTemplate::ImportTemplate(QStringList& tabList,QWidget *parent) :
     QDialog(parent),
@@ -27,8 +30,13 @@ ImportTemplate::ImportTemplate(QStringList& tabList,QWidget *parent) :
     //     this->setStyleSheet(styleSheet);
     //     file.close();
     // }
-    LHStyleManager::Instance()->AddWidget(this);
+    setQSS();
+    /* 创建阴影 */
+    QSize size = this->size();
+    size.setWidth(size.width() - 32);
+    size.setHeight(size.height() - 32);
 
+    m_shadow = new OneShadow(size, 16);
 
     m_templateName.clear();
 
@@ -148,3 +156,37 @@ void ImportTemplate::createRow(int row,int num,const QString &text)
     item->setForeground(Qt::blue);
     ui->tableWidget->setItem(row,2,item);
 }
+
+/* 设置QSS */
+void ImportTemplate::setQSS()
+{
+    auto appPath = QApplication::applicationDirPath();
+    QString qssPath;
+    if(LHStyleManager::Instance()->GetCurSkinStyle() == eWhiteStyle)
+    {
+        qssPath = appPath + "/white/importtemplate.qss";
+        
+    }else if(LHStyleManager::Instance()->GetCurSkinStyle() == eBlackStyle)
+    {
+        qssPath = appPath + "/black/importtemplate.qss";
+    }
+    QFile file(qssPath);
+    if(file.open(QIODevice::ReadOnly))
+    {
+        QString stylesheet = file.readAll();
+        this->setStyleSheet(stylesheet);
+        file.close();
+    } else
+    {
+        LH_WRITE_ERROR(QString("打开文件失败:%1").arg(file.fileName()));
+    }
+}
+
+/* 绘画事件 */
+void ImportTemplate::paintEvent(QPaintEvent *event)
+{
+    QPainter painter(this);
+    painter.setRenderHint(QPainter::Antialiasing);
+    painter.drawImage(QPoint(0, 0), m_shadow->image());
+}
+

+ 10 - 0
TransmitterSwitch/Template/importtemplate.h

@@ -4,6 +4,7 @@
 #include <QDialog>
 
 class TemplateItem;
+class OneShadow;
 
 namespace Ui {
 class ImportTemplate;
@@ -23,6 +24,10 @@ public:
     bool isOk() const { return m_isOk; }
     /* 获取选择的模板名称 */
     QString getTemplateName() const { return m_templateName; }
+
+    /* 设置QSS */
+    void setQSS();
+    
 signals:
     /* 选择一个模版 */
     void signal_templateName(QString name);
@@ -33,11 +38,16 @@ private slots:
     void do_ok();
     void do_seletctRow(int row,int col);                                    /* 选中一行 */
 
+protected:
+    /* 绘画事件 */
+    void paintEvent(QPaintEvent *event) override;
+
 private:
     Ui::ImportTemplate *ui;
 
     bool m_isOk = false;                                                    /* 是否点下了OK */
     QString m_templateName;                                                 /* 模版名称 */
+    OneShadow* m_shadow = nullptr;                                          /* 阴影 */
 };
 
 #endif // IMPORTTEMPLATE_H

+ 177 - 166
TransmitterSwitch/Template/importtemplate.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>444</width>
-    <height>618</height>
+    <width>476</width>
+    <height>650</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -18,172 +18,183 @@
 background:transparent;
 }</string>
   </property>
-  <widget class="QWidget" name="widget" native="true">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>444</width>
-     <height>618</height>
-    </rect>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="spacing">
+    <number>0</number>
    </property>
-   <property name="styleSheet">
-    <string notr="true"/>
+   <property name="leftMargin">
+    <number>16</number>
    </property>
-   <widget class="QLabel" name="label_NC1">
-    <property name="geometry">
-     <rect>
-      <x>32</x>
-      <y>18</y>
-      <width>80</width>
-      <height>18</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>导入模板</string>
-    </property>
-   </widget>
-   <widget class="QPushButton" name="pBtn_close">
-    <property name="geometry">
-     <rect>
-      <x>396</x>
-      <y>12</y>
-      <width>32</width>
-      <height>32</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string/>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_line1">
-    <property name="geometry">
-     <rect>
-      <x>0</x>
-      <y>56</y>
-      <width>444</width>
-      <height>1</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string/>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_line2">
-    <property name="geometry">
-     <rect>
-      <x>32</x>
-      <y>89</y>
-      <width>380</width>
-      <height>1</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string/>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_line3">
-    <property name="geometry">
-     <rect>
-      <x>32</x>
-      <y>137</y>
-      <width>380</width>
-      <height>1</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string/>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_NC2">
-    <property name="geometry">
-     <rect>
-      <x>44</x>
-      <y>107</y>
-      <width>32</width>
-      <height>14</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>序号</string>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_NC3">
-    <property name="geometry">
-     <rect>
-      <x>92</x>
-      <y>107</y>
-      <width>56</width>
-      <height>14</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>模板名称</string>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_NC4">
-    <property name="geometry">
-     <rect>
-      <x>364</x>
-      <y>107</y>
-      <width>28</width>
-      <height>14</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>操作</string>
-    </property>
-   </widget>
-   <widget class="QPushButton" name="pBtn_cancel">
-    <property name="geometry">
-     <rect>
-      <x>276</x>
-      <y>554</y>
-      <width>60</width>
-      <height>32</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>取消</string>
-    </property>
-   </widget>
-   <widget class="QPushButton" name="pBtn_ok">
-    <property name="geometry">
-     <rect>
-      <x>352</x>
-      <y>554</y>
-      <width>60</width>
-      <height>32</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>确定</string>
-    </property>
-   </widget>
-   <widget class="QTableWidget" name="tableWidget">
-    <property name="geometry">
-     <rect>
-      <x>32</x>
-      <y>140</y>
-      <width>380</width>
-      <height>384</height>
-     </rect>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_warning">
-    <property name="geometry">
-     <rect>
-      <x>50</x>
-      <y>65</y>
-      <width>351</width>
-      <height>21</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>TextLabel</string>
-    </property>
-   </widget>
-  </widget>
+   <property name="topMargin">
+    <number>16</number>
+   </property>
+   <property name="rightMargin">
+    <number>16</number>
+   </property>
+   <property name="bottomMargin">
+    <number>16</number>
+   </property>
+   <item>
+    <widget class="QWidget" name="widget" native="true">
+     <property name="styleSheet">
+      <string notr="true"/>
+     </property>
+     <widget class="QLabel" name="label_NC1">
+      <property name="geometry">
+       <rect>
+        <x>32</x>
+        <y>18</y>
+        <width>80</width>
+        <height>18</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>导入模板</string>
+      </property>
+     </widget>
+     <widget class="QPushButton" name="pBtn_close">
+      <property name="geometry">
+       <rect>
+        <x>396</x>
+        <y>12</y>
+        <width>32</width>
+        <height>32</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_line1">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>56</y>
+        <width>444</width>
+        <height>1</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_line2">
+      <property name="geometry">
+       <rect>
+        <x>32</x>
+        <y>89</y>
+        <width>380</width>
+        <height>1</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_line3">
+      <property name="geometry">
+       <rect>
+        <x>32</x>
+        <y>137</y>
+        <width>380</width>
+        <height>1</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_NC2">
+      <property name="geometry">
+       <rect>
+        <x>44</x>
+        <y>107</y>
+        <width>32</width>
+        <height>14</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>序号</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_NC3">
+      <property name="geometry">
+       <rect>
+        <x>92</x>
+        <y>107</y>
+        <width>56</width>
+        <height>14</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>模板名称</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_NC4">
+      <property name="geometry">
+       <rect>
+        <x>364</x>
+        <y>107</y>
+        <width>28</width>
+        <height>14</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>操作</string>
+      </property>
+     </widget>
+     <widget class="QPushButton" name="pBtn_cancel">
+      <property name="geometry">
+       <rect>
+        <x>276</x>
+        <y>554</y>
+        <width>60</width>
+        <height>32</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>取消</string>
+      </property>
+     </widget>
+     <widget class="QPushButton" name="pBtn_ok">
+      <property name="geometry">
+       <rect>
+        <x>352</x>
+        <y>554</y>
+        <width>60</width>
+        <height>32</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>确定</string>
+      </property>
+     </widget>
+     <widget class="QTableWidget" name="tableWidget">
+      <property name="geometry">
+       <rect>
+        <x>32</x>
+        <y>140</y>
+        <width>380</width>
+        <height>384</height>
+       </rect>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_warning">
+      <property name="geometry">
+       <rect>
+        <x>50</x>
+        <y>65</y>
+        <width>351</width>
+        <height>21</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>TextLabel</string>
+      </property>
+     </widget>
+    </widget>
+   </item>
+  </layout>
  </widget>
  <resources/>
  <connections/>

+ 42 - 1
TransmitterSwitch/Template/savetotemplate.cpp

@@ -3,8 +3,11 @@
 
 #include <QStyle>
 #include <QFile>
+#include <QPainter>
 
 #include "lhstylemanager.h"
+#include "LHQLogAPI.h"
+#include "oneshadow.h"
 
 SaveToTemplate::SaveToTemplate(QWidget *parent) :
     QDialog(parent),
@@ -25,7 +28,12 @@ SaveToTemplate::SaveToTemplate(QWidget *parent) :
     //     this->setStyleSheet(styleSheet);
     //     file.close();
     // }
-    LHStyleManager::Instance()->AddWidget(this);
+    setQSS();
+    /* 创建阴影,这里大小使用最外面的大小减去阴影宽度 */
+    QSize size = this->size();
+    size.setWidth(size.width() - 32);
+    size.setHeight(size.height() - 32);
+    m_shadow = new OneShadow(size, 16);
 
     m_templateNameList.clear();
 
@@ -70,6 +78,31 @@ QString SaveToTemplate::getTemplateName()
     return m_templateName;
 }
 
+/* 设置QSS */
+void SaveToTemplate::setQSS()
+{
+    auto appPath = QApplication::applicationDirPath();
+    QString qssPath;
+    if(LHStyleManager::Instance()->GetCurSkinStyle() == eWhiteStyle)
+    {
+        qssPath = appPath + "/white/savetotemplate.qss";
+        
+    }else if(LHStyleManager::Instance()->GetCurSkinStyle() == eBlackStyle)
+    {
+        qssPath = appPath + "/black/savetotemplate.qss";
+    }
+    QFile file(qssPath);
+    if(file.open(QIODevice::ReadOnly))
+    {
+        QString stylesheet = file.readAll();
+        this->setStyleSheet(stylesheet);
+        file.close();
+    } else
+    {
+        LH_WRITE_ERROR(QString("打开文件失败:%1").arg(file.fileName()));
+    }
+}
+
 void SaveToTemplate::do_ok()
 {
     m_isOk = false;
@@ -133,3 +166,11 @@ void SaveToTemplate::setWarning(bool flag)
     ui->lineEdit->style()->polish(ui->lineEdit);
 }
 
+
+/* 绘画事件 */
+void SaveToTemplate::paintEvent(QPaintEvent *event)
+{
+    QPainter painter(this);
+    painter.setRenderHint(QPainter::Antialiasing);
+    painter.drawImage(QPoint(0, 0), m_shadow->image());
+}

+ 10 - 0
TransmitterSwitch/Template/savetotemplate.h

@@ -4,6 +4,7 @@
 #include <QDialog>
 #include <qchar.h>
 
+class OneShadow;
 
 namespace Ui {
 class SaveToTemplate;
@@ -31,6 +32,9 @@ public:
     /* 获取模板名称 */
     QString getTemplateName();
 
+    /* 设置QSS */
+    void setQSS();
+
 signals:
     void signal_templateName(QString name);
 
@@ -39,6 +43,11 @@ private slots:
 
 private:
     void setWarning(bool flag);             /* 设置报警 */
+
+protected:
+    /* 绘画事件 */
+    void paintEvent(QPaintEvent *event) override;
+
 private:
     Ui::SaveToTemplate *ui;
 
@@ -48,6 +57,7 @@ private:
 
     bool m_isOk = false;                    /* 是否点击了确定 */
     QString m_templateName;                 /* 模板名称 */
+    OneShadow* m_shadow = nullptr;          /* 阴影 */
 };
 
 #endif // SAVETOTEMPLATE_H

+ 149 - 138
TransmitterSwitch/Template/savetotemplate.ui

@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>416</width>
-    <height>217</height>
+    <width>448</width>
+    <height>249</height>
    </rect>
   </property>
   <property name="windowTitle">
@@ -18,144 +18,155 @@
 background:transparent;
 };</string>
   </property>
-  <widget class="QWidget" name="widget" native="true">
-   <property name="geometry">
-    <rect>
-     <x>0</x>
-     <y>0</y>
-     <width>416</width>
-     <height>217</height>
-    </rect>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="spacing">
+    <number>0</number>
    </property>
-   <property name="styleSheet">
-    <string notr="true"/>
+   <property name="leftMargin">
+    <number>16</number>
    </property>
-   <widget class="QLabel" name="label_NC1">
-    <property name="geometry">
-     <rect>
-      <x>32</x>
-      <y>18</y>
-      <width>110</width>
-      <height>18</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>保存为模版</string>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_line">
-    <property name="geometry">
-     <rect>
-      <x>0</x>
-      <y>56</y>
-      <width>416</width>
-      <height>1</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string/>
-    </property>
-   </widget>
-   <widget class="QPushButton" name="pBtn_close">
-    <property name="geometry">
-     <rect>
-      <x>368</x>
-      <y>12</y>
-      <width>32</width>
-      <height>32</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string/>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_NC3_x">
-    <property name="geometry">
-     <rect>
-      <x>32</x>
-      <y>98</y>
-      <width>7</width>
-      <height>14</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_NC4">
-    <property name="geometry">
-     <rect>
-      <x>40</x>
-      <y>98</y>
-      <width>70</width>
-      <height>14</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>模板名称:</string>
-    </property>
-   </widget>
-   <widget class="QLineEdit" name="lineEdit">
-    <property name="geometry">
-     <rect>
-      <x>110</x>
-      <y>89</y>
-      <width>274</width>
-      <height>32</height>
-     </rect>
-    </property>
-    <property name="font">
-     <font>
-      <family>思源黑体R</family>
-      <weight>50</weight>
-      <italic>false</italic>
-      <bold>false</bold>
-     </font>
-    </property>
-    <property name="placeholderText">
-     <string>请输入</string>
-    </property>
-   </widget>
-   <widget class="QPushButton" name="pBtn_cancel">
-    <property name="geometry">
-     <rect>
-      <x>248</x>
-      <y>153</y>
-      <width>60</width>
-      <height>32</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>取消</string>
-    </property>
-   </widget>
-   <widget class="QPushButton" name="pBtn_ok">
-    <property name="geometry">
-     <rect>
-      <x>324</x>
-      <y>153</y>
-      <width>60</width>
-      <height>32</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string>保存</string>
-    </property>
-   </widget>
-   <widget class="QLabel" name="label_warn">
-    <property name="geometry">
-     <rect>
-      <x>116</x>
-      <y>126</y>
-      <width>261</width>
-      <height>20</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string/>
-    </property>
-   </widget>
-  </widget>
+   <property name="topMargin">
+    <number>16</number>
+   </property>
+   <property name="rightMargin">
+    <number>16</number>
+   </property>
+   <property name="bottomMargin">
+    <number>16</number>
+   </property>
+   <item>
+    <widget class="QWidget" name="widget" native="true">
+     <property name="styleSheet">
+      <string notr="true"/>
+     </property>
+     <widget class="QLabel" name="label_NC1">
+      <property name="geometry">
+       <rect>
+        <x>32</x>
+        <y>18</y>
+        <width>110</width>
+        <height>18</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>保存为模版</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_line">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>56</y>
+        <width>416</width>
+        <height>1</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QPushButton" name="pBtn_close">
+      <property name="geometry">
+       <rect>
+        <x>368</x>
+        <y>12</y>
+        <width>32</width>
+        <height>32</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_NC3_x">
+      <property name="geometry">
+       <rect>
+        <x>32</x>
+        <y>98</y>
+        <width>7</width>
+        <height>14</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt;*&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_NC4">
+      <property name="geometry">
+       <rect>
+        <x>40</x>
+        <y>98</y>
+        <width>70</width>
+        <height>14</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>模板名称:</string>
+      </property>
+     </widget>
+     <widget class="QLineEdit" name="lineEdit">
+      <property name="geometry">
+       <rect>
+        <x>110</x>
+        <y>89</y>
+        <width>274</width>
+        <height>32</height>
+       </rect>
+      </property>
+      <property name="font">
+       <font>
+        <family>思源黑体R</family>
+        <weight>50</weight>
+        <italic>false</italic>
+        <bold>false</bold>
+       </font>
+      </property>
+      <property name="placeholderText">
+       <string>请输入</string>
+      </property>
+     </widget>
+     <widget class="QPushButton" name="pBtn_cancel">
+      <property name="geometry">
+       <rect>
+        <x>248</x>
+        <y>153</y>
+        <width>60</width>
+        <height>32</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>取消</string>
+      </property>
+     </widget>
+     <widget class="QPushButton" name="pBtn_ok">
+      <property name="geometry">
+       <rect>
+        <x>324</x>
+        <y>153</y>
+        <width>60</width>
+        <height>32</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>保存</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_warn">
+      <property name="geometry">
+       <rect>
+        <x>116</x>
+        <y>126</y>
+        <width>261</width>
+        <height>20</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+     </widget>
+    </widget>
+   </item>
+  </layout>
  </widget>
  <resources/>
  <connections/>

+ 145 - 10
TransmitterSwitch/WebAPI/FromWebAPI.cpp

@@ -456,16 +456,16 @@ bool FromWebAPI::saveTemplate(const QString& templateName, QList<ExecPlanItemInf
     for(const auto& it : list)
     {
         nJson json1;
-        json1["opName"] = "ESM8C_SaveToTemplate";
+        json1["opName"] = "TMS_ExecPlanSaveToTemplate";
         json1["Key"] = QUuid::createUuid().toString().toStdString();
         nJson json2;
 
-        json2["TemplateName"] = templateName.toStdString();
-        json2["Date"] = it.date.toString("yyyy-MM-dd").toStdString();
-        json2["ExecTime"] = it.execTime.toString("hh:mm:ss").toStdString();
-        json2["DeviceName"] = it.devName.toStdString();
-        json2["ActionName"] = it.actionName.toStdString();
-        json2["ActionID"] = static_cast<int>(it.actionID);
+        json2["templateName"] = templateName.toStdString();
+        json2["execDate"] = it.date.toString("yyyy-MM-dd").toStdString();
+        json2["execTime"] = it.execTime.toString("hh:mm:ss").toStdString();
+        json2["deviceName"] = it.devName.toStdString();
+        json2["actionName"] = it.actionName.toStdString();
+        json2["actionID"] = static_cast<int>(it.actionID);
 
         json1["paramList"] = json2;
         json0.push_back(json1);
@@ -473,8 +473,8 @@ bool FromWebAPI::saveTemplate(const QString& templateName, QList<ExecPlanItemInf
 
     /* 将json写入本地文件 */
 #ifdef C_DEBUG
-    QString fileJson(QString::fromStdString(json0.dump(4)));
-    LH_WRITE_LOG_DEBUG("\n" + fileJson);
+    // QString fileJson(QString::fromStdString(json0.dump(4)));
+    // LH_WRITE_LOG_DEBUG("\n" + fileJson);
 #endif
     /* 写入EQM数据库 */
     QString strCmd = QString::fromStdString(json0.dump());
@@ -500,10 +500,74 @@ bool FromWebAPI::getTemplate(QString templateName, QList<ExecPlanItemInfo>& list
         LH_WRITE_ERROR("WebAPI is nullptr");
         return false;
     }
+    nJson json0;
+    json0["opName"] = "TMS_GetExecPlanTemplateData";
+    nJson json1;
+    json1["templateName"] = templateName.toStdString();
+    json0["paramList"] = json1;
+    QString strCmd = QString::fromStdString(json0.dump());
+    QString strRet;
+    auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
+    if(ret < 0)
+    {
+        LH_WRITE_ERROR(QString("获取模板失败:%1, 错误信息:%2").arg(ret).arg(m_httpApi->DoGetLastError(&ret)));
+        return false;
+    }
+    /* 解析获取到的JSON数据 */
+    try
+    {
+        nJson json2 = nJson::parse(strRet.toStdString());
+        int retCode = json2["code"].get<int>();
+        if(retCode != 0)
+        {
+            LH_WRITE_ERROR("获取模板失败");
+            return false;
+        }
+        nJson result = json2["result"];
+        for(auto& it : result)
+        {
+            ExecPlanItemInfo info;
+            info.devName = QString::fromStdString(it["deviceName"].get<std::string>());
+            if(!DeviceContainer.findDevice(info.devName))
+            {
+                LH_WRITE_LOG(QString("未找到设备:%1").arg(info.devName));
+                continue;
+            }
+            auto tmpDate = it["execDate"].is_null() ? "" : it["execDate"].get<std::string>();
+            if(!tmpDate.empty())
+            {
+                info.date = QDate::fromString(QString::fromStdString(tmpDate),"yyyy-MM-dd");
+            }
+            info.execTime = QTime::fromString(QString::fromStdString(it["execTime"].get<std::string>()),"hh:mm:ss");
+            info.actionName = QString::fromStdString(it["actionName"].get<std::string>());
+            info.actionID = it["actionID"].get<int>();
+
+            list.append(info);
+        }
+
+        LH_WRITE_LOG(QString("获取模板成功,数据数目:%1").arg(list.size()));
+    }
+    catch (const nJson::parse_error& e)
+    {
+        LH_WRITE_ERROR(QString("解析模板失败:%1").arg(e.what()));
+        return false;
+    }
+    catch (const nJson::exception& e)
+    {
+        LH_WRITE_ERROR(QString("解析模板失败:%1").arg(e.what()));
+        return false;
+    }
+    catch(...)
+    {
+        LH_WRITE_ERROR("解析模板失败");
+        return false;
+    }
+
+    return true;
 }
 
 /* 获取模板列表 */
-bool FromWebAPI::getTemplateList(QList<QString>& list)
+bool FromWebAPI::getTemplateList(QStringList& list)
 {
     if(m_httpApi == nullptr)
     {
@@ -511,6 +575,62 @@ bool FromWebAPI::getTemplateList(QList<QString>& list)
         return false;
     }
 
+    nJson json0;
+    json0["opName"] = "TMS_GetExecPlanTemplateList";
+    QString strCmd = QString::fromStdString(json0.dump());
+    QString strRet;
+    auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Select, strCmd, strRet);
+    if(ret < 0)
+    {
+        LH_WRITE_ERROR(QString("获取模板列表失败:%1, 错误信息:%2").arg(ret).arg(m_httpApi->DoGetLastError(&ret)));
+        return false;
+    }
+    /* 解析获取到的JSON数据 */
+    // LH_WRITE_LOG_DEBUG(strRet);
+    try 
+    {
+        nJson json1 = nJson::parse(strRet.toStdString());
+        int retCode = json1["code"].get<int>();
+        if(retCode != 0)
+        {
+            LH_WRITE_ERROR("获取模板列表失败");
+            return false;
+        }
+        nJson result = json1["result"];
+        for(auto& it : result)
+        {
+            if(it["templateName"].is_null())
+            {
+                LH_WRITE_ERROR("模板名称为空");
+                continue;
+            }
+            auto name = QString::fromStdString(it["templateName"].get<std::string>());
+            if(list.contains(name))
+            {
+                continue;
+            }
+            list.append(name);
+        }
+
+    } catch (const nJson::parse_error& e) {
+        LH_WRITE_ERROR(QString("解析模板列表失败:%1").arg(e.what()));
+        return false;
+    }
+    catch (const nJson::exception& e)
+    {
+        LH_WRITE_ERROR(QString("解析模板列表失败:%1").arg(e.what()));
+        return false;
+    }
+    catch(...)
+    {
+        LH_WRITE_ERROR("解析模板列表失败");
+        return false;
+    }
+
+    /* 对模版按照名称排序 */
+    list.sort();
+
+    return true;
 }
 
 /* 删除一个模板 */
@@ -522,5 +642,20 @@ bool FromWebAPI::deleteTemplate(const QString& name)
         return false;
     }
     
+    nJson json0;
+    json0["opName"] = "TMS_DeleteExecPlanTemplate";
+    nJson json1;
+    json1["templateName"] = name.toStdString();
+    json0["paramList"] = json1;
+    QString strCmd = QString::fromStdString(json0.dump());
+    QString strRet;
+    auto ret = m_httpApi->DBDoInterface(enDBOperatorType::EDBOT_Delete, strCmd, strRet);
+    if(ret < 0)
+    {
+        LH_WRITE_ERROR(QString("删除模板失败:%1, 错误信息:%2").arg(ret).arg(m_httpApi->DoGetLastError(&ret)));
+        return false;
+    }
+
+    return true;
 }
 

+ 1 - 1
TransmitterSwitch/WebAPI/FromWebAPI.h

@@ -35,7 +35,7 @@ public:
     /* 获取模板内容 */
     bool getTemplate(QString templateName, QList<ExecPlanItemInfo>& list);
     /* 获取模板列表 */
-    bool getTemplateList(QList<QString>& list);
+    bool getTemplateList(QStringList& list);
     /* 删除一个模板 */
     bool deleteTemplate(const QString& name);
 

+ 8 - 1
TransmitterSwitch/common/date/calendarheader.cpp

@@ -8,7 +8,8 @@ CalendarHeader::CalendarHeader(QWidget *parent) :
     ui(new Ui::CalendarHeader)
 {
     ui->setupUi(this);
-    LHStyleManager::Instance()->AddWidget(this);
+    // LHStyleManager::Instance()->AddWidget(this);
+    setQSS();
 }
 
 CalendarHeader::~CalendarHeader()
@@ -30,6 +31,12 @@ void CalendarHeader::SetFirstDayOfWeek(Qt::DayOfWeek dayOfWeek)
     ui->label7->setText(km_listWeeks.at((dayOfWeek-1+6)%km_listWeeks.count()));
 }
 
+/* 设置QSS */
+void CalendarHeader::setQSS()
+{
+
+}
+
 void CalendarHeader::paintEvent(QPaintEvent *)
 {
     PainterEx painter(this);

+ 3 - 0
TransmitterSwitch/common/date/calendarheader.h

@@ -16,6 +16,9 @@ public:
     ~CalendarHeader() override;
     void SetFirstDayOfWeek(Qt::DayOfWeek dayOfWeek);
     
+    /* 设置QSS */
+    void setQSS();
+    
 private:
     Ui::CalendarHeader *ui;
     const QList<QString> km_listWeeks = {"一","二","三","四","五","六","日"};

+ 26 - 1
TransmitterSwitch/common/date/calendarnav.cpp

@@ -33,7 +33,8 @@ CalendarNav::CalendarNav(QCalendarWidget *pCalendar, QWidget *parent)
     
     //默认显示当天, QCalendarWidget的默认选中日期也是当天
     SetYearMonth(QDate::currentDate().year(), QDate::currentDate().month());
-    LHStyleManager::Instance()->AddWidget(this);
+    // LHStyleManager::Instance()->AddWidget(this);
+    setQSS();
 }
 
 CalendarNav::~CalendarNav()
@@ -61,6 +62,30 @@ void CalendarNav::hideNextMonth(bool flag)
     ui->btnNextMonth->setVisible(!flag);
 }
 
+/* 设置QSS */
+void CalendarNav::setQSS()
+{
+    QString qssPath = QApplication::applicationDirPath();
+    QString qssFile;
+    if(LHStyleManager::Instance()->GetCurSkinStyle() == SkinStyle::eWhiteStyle)
+    {
+        qssFile = qssPath + "/white/calendarnav.qss";
+    }else if(LHStyleManager::Instance()->GetCurSkinStyle() == SkinStyle::eBlackStyle)
+    {
+        qssFile = qssPath + "/black/calendarnav.qss";
+    }
+    QFile file(qssFile);
+    if(file.open(QIODevice::ReadOnly))
+    {
+        QString stylesheet = file.readAll();
+        this->setStyleSheet(stylesheet);
+        file.close();
+    } else
+    {
+        qDebug() << "打开文件失败:" << file.fileName();
+    }
+}
+
 void CalendarNav::SetYearMonth(int year, int month)
 {
     ui->labelYearMonth->setText(QString("%1 年 %2 月").arg(year).arg(month));

+ 3 - 0
TransmitterSwitch/common/date/calendarnav.h

@@ -20,6 +20,9 @@ public:
     void hidePreMonth(bool);
     void hideNextYear(bool);
     void hideNextMonth(bool);
+
+    /* 设置QSS */
+    void setQSS();
 private:
     Ui::CalendarNav *ui;
     QCalendarWidget *m_pCalendar;

+ 37 - 8
TransmitterSwitch/common/warning/warning.cpp

@@ -7,6 +7,8 @@
 #include <QFile>
 
 #include "oneshadow.h"
+#include "lhstylemanager.h"
+#include "LHQLogAPI.h"
 
 Warning::Warning(QWidget *parent) :
     QDialog(parent),
@@ -18,13 +20,16 @@ Warning::Warning(QWidget *parent) :
     this->setAttribute(Qt::WA_TranslucentBackground);
 
     /* 加载QSS */
-    QFile file(":/QSS/QSS/warning_light.qss");
-    if(file.open(QFile::ReadOnly))
-    {
-        QString styleSheet = file.readAll();
-        this->setStyleSheet(styleSheet);
-        file.close();
-    }
+    // QFile file(":/QSS/QSS/warning_light.qss");
+    // if(file.open(QFile::ReadOnly))
+    // {
+    //     QString styleSheet = file.readAll();
+    //     this->setStyleSheet(styleSheet);
+    //     file.close();
+    // }
+    /* 设置QSS */
+    setQSS();
+
 
     /* 设置文字自动换行 */
     ui->label_Warn->setWordWrap(true);
@@ -32,7 +37,7 @@ Warning::Warning(QWidget *parent) :
     // ui->label_Warn->setAlignment(Qt::AlignCenter);
     ui->label_Warn->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
     /* 加载警告图标 */
-    ui->label_warnIcon->setStyleSheet(R"(border-image: url(:/ESM-8C_ICON/Tip/Tips2x.png);)");
+    // ui->label_warnIcon->setStyleSheet(R"(border-image: url(:/ESM-8C_ICON/Tip/Tips2x.png);)");
 
     /* 阴影宽度是16 */
     this->layout()->setMargin(SHADOW_W);
@@ -68,6 +73,30 @@ void Warning::setTextWithOneButton(const QString &text)
     moveWarnICON();
 }
 
+/* 设置QSS */
+void Warning::setQSS()
+{
+    QString appPath = QApplication::applicationDirPath();
+    QString qssPath;
+    if(LHStyleManager::Instance()->GetCurSkinStyle() == SkinStyle::eWhiteStyle)
+    {
+        qssPath = appPath + "/white/warning.qss";
+    }else if (LHStyleManager::Instance()->GetCurSkinStyle() == SkinStyle::eBlackStyle)
+    {
+        qssPath = appPath + "/black/warning.qss";
+    }
+    QFile file(qssPath);
+    if(file.open(QIODevice::ReadOnly))
+    {
+        QString stylesheet = file.readAll();
+        this->setStyleSheet(stylesheet);
+        file.close();
+    } else
+    {
+        LH_WRITE_ERROR(QString("打开文件失败:%1").arg(file.fileName()));
+    }
+}
+
 void Warning::paintEvent(QPaintEvent *event)
 {
     QPainter painter(this);

+ 4 - 0
TransmitterSwitch/common/warning/warning.h

@@ -20,6 +20,10 @@ public:
     void setText(const QString& text);
     void setTextWithOneButton(const QString& text);     /* 只有一个确定按钮 */
     bool isOk() const { return m_isOk; }
+    /* 设置QSS */
+    void setQSS();
+
+
 signals:
     void signal_ok();
 

+ 13 - 7
TransmitterSwitch/transmitterswitch.cpp

@@ -129,7 +129,7 @@ void TransmitterSwitch::getExecPlanFromEQM()
     /* 添加计划项 */
     for(const auto& it : list)
     {
-        if (it.WeekDay < 8 || it.WeekDay < 1)
+        if (it.WeekDay < 8 && it.WeekDay >= 1)
         {
             addNormalOneItem(it.WeekDay - 1, it.devName, it.actionName, it.execTime);
         }
@@ -383,7 +383,8 @@ void TransmitterSwitch::do_importData()
     int weekDay = ui->stackedWidget_items->currentIndex();
 
     QStringList tabList;
-    tabList << "模板1" << "模板2" << "模板3" << "模板4" << "模板5";
+    // tabList << "模板1" << "模板2" << "模板3" << "模板4" << "模板5";
+    m_fromWebAPI->getTemplateList(tabList);
     std::shared_ptr<ImportTemplate> itf = std::make_shared<ImportTemplate>(tabList, this);
 
     /* 连接信号和槽 */
@@ -397,21 +398,26 @@ void TransmitterSwitch::do_importData()
         auto name = itf->getTemplateName();
         /* 获取模板内容 */
         QList<ExecPlanItemInfo> list;
-        m_fromWebAPI->getTemplate(name, list);
+        list.clear();
+        if(!m_fromWebAPI->getTemplate(name, list))
+        {
+            return;
+        }
         /* 清除当前页内容 */
         IData.clearOneDay(weekDay);
         /* 添加计划项 */
-        if (weekDay < 8 && weekDay > 0)
+        if (weekDay < 7 && weekDay >= 0)
         {
             for(const auto& it : list)
             {
-                addNormalOneItem(it.WeekDay - 1, it.devName, it.actionName, it.execTime);
+                // LH_WRITE_LOG_DEBUG(QString("DevName:%1, ExecTime:%2").arg(it.devName).arg(it.execTime.toString("hh:mm:ss")));
+                addNormalOneItem(weekDay, it.devName, it.actionName, it.execTime);
             }
-        }else if (weekDay == 8)
+        }else if (weekDay == 7)
         {
             for(const auto& it : list)
             {
-                addSpecialOneItem(it.WeekDay - 1, it.devName, it.actionName, it.date, it.execTime);
+                addSpecialOneItem(weekDay, it.devName, it.actionName, it.date, it.execTime);
             }
         }
         /* 排序 */

+ 2 - 2
TransmitterSwitch/transmitterswitch.ui

@@ -158,7 +158,7 @@
         </property>
         <layout class="QHBoxLayout" name="horizontalLayout">
          <property name="spacing">
-          <number>0</number>
+          <number>1</number>
          </property>
          <property name="leftMargin">
           <number>1</number>
@@ -191,7 +191,7 @@
              <number>0</number>
             </property>
             <property name="rightMargin">
-             <number>0</number>
+             <number>1</number>
             </property>
             <property name="bottomMargin">
              <number>0</number>

+ 32 - 2
show1/StyleManager/lhstylemanager.cpp

@@ -1,4 +1,6 @@
 #include "lhstylemanager.h"
+#include "LHQLogAPI.h"
+#include <QDebug>
 
 LHStyleManager* LHStyleManager::m_instance = NULL;
 
@@ -27,10 +29,32 @@ LHStyleManager *LHStyleManager::Instance()
 
 void LHStyleManager::AddWidget(QWidget *widget)
 {
-    if(widget != NULL && !m_widgetList.contains(widget))
+    if(widget != NULL)
     {
         m_widgetList.append(widget);
         UpdateWidgetStyle(widget);
+        // if(!m_widgetList.contains(widget))
+        // {
+        //     m_widgetList.append(widget);
+        //     UpdateWidgetStyle(widget);
+        // }else {
+        //     LH_WRITE_LOG_DEBUG("Widget already exist");
+        // }
+    }else {
+        LH_WRITE_ERROR("Widget is NULL");
+    }
+    // qDebug() << "widget:" << widget;
+}
+
+void LHStyleManager::RemoveWidget(QWidget* widget)
+{
+    if(widget == NULL)
+    {
+        return;
+    }
+    if(m_widgetList.contains(widget))
+    {
+        m_widgetList.removeOne(widget);
     }
 }
 
@@ -52,8 +76,13 @@ void LHStyleManager::UpdateWidgetStyle(QWidget *widget)
         strStylePath = "black";
     }
     QString strStyleFile = strBasePath + QString("/%1/%2.qss").arg(strStylePath).arg(strName);
+    // LH_WRITE_LOG_DEBUG(QString("Set style file: %1").arg(strStyleFile));
     QFile file(strStyleFile);
-    file.open(QFile::ReadOnly);
+    if(!file.open(QFile::ReadOnly))
+    {
+        LH_WRITE_ERROR(QString("Open qss file failed: %1").arg(strStyleFile));
+        return;
+    }
     // QString styleSheet = QLatin1String(file.readAll());
     QString styleSheet = file.readAll();
     widget->setStyleSheet(styleSheet);
@@ -75,4 +104,5 @@ void LHStyleManager::SetSkinStyle(SkinStyle style)
         if(widget == NULL) continue;
         UpdateWidgetStyle(widget);
     }
+    emit signal_skinStyleChanged(m_nCurStyle);
 }

+ 3 - 1
show1/StyleManager/lhstylemanager.h

@@ -19,12 +19,14 @@ public:
 
     void AddWidget(QWidget* widget);
 
+    void RemoveWidget(QWidget* widget);
+
     void SetSkinStyle(SkinStyle style);
 
     SkinStyle GetCurSkinStyle(){return m_nCurStyle;}
 
 signals:
-
+    void signal_skinStyleChanged(SkinStyle style);
 public slots:
 
 private:

+ 19 - 1
show1/widget.cpp

@@ -31,7 +31,7 @@ Widget::Widget(QWidget *parent) :
     m_tSwitch->setWebAPIInfo("http://192.1.3.133:31000/v6/", "2e36b53ccd2a433b9a803b98d683ed91", "TMS");
 
     /* 添加设备信息,测试用 */
-    addTestDevice();
+    // addTestDevice();
 
 }
 
@@ -73,6 +73,24 @@ void Widget::on_pBtn_saveData_clicked()
     m_tSwitch->saveExecPlanToEQM();
 }
 
+/* 切换亮色/暗色的按钮 */
+void Widget::on_pBtn_light_dark_clicked()
+{
+    if(m_tSwitch == nullptr)
+    {
+        LH_WRITE_ERROR("TransmitterSwitch is nullptr");
+        return;
+    }
+    if(LHStyleManager::Instance()->GetCurSkinStyle() == SkinStyle::eWhiteStyle)
+    {
+        LHStyleManager::Instance()->SetSkinStyle(SkinStyle::eBlackStyle);
+        LH_WRITE_LOG_DEBUG("切换为暗色");
+    }else {
+        LHStyleManager::Instance()->SetSkinStyle(SkinStyle::eWhiteStyle);
+        LH_WRITE_LOG_DEBUG("切换为亮色");
+    }
+}
+
 /* 添加测试用的设备信息 */
 void Widget::addTestDevice()
 {

+ 2 - 0
show1/widget.h

@@ -25,6 +25,8 @@ private slots:
     void on_pBtn_getData_clicked();
     /* 导出数据按钮 */
     void on_pBtn_saveData_clicked();
+    /* 切换亮色/暗色的按钮 */
+    void on_pBtn_light_dark_clicked();
 
 private:
     /* 添加测试用的设备信息 */

+ 13 - 0
show1/widget.ui

@@ -58,6 +58,19 @@
         </property>
        </widget>
       </item>
+      <item>
+       <widget class="QPushButton" name="pBtn_light_dark">
+        <property name="minimumSize">
+         <size>
+          <width>120</width>
+          <height>32</height>
+         </size>
+        </property>
+        <property name="text">
+         <string>亮/暗</string>
+        </property>
+       </widget>
+      </item>
       <item>
        <spacer name="horizontalSpacer">
         <property name="orientation">