123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #ifndef _GLOBAL_DEF_H_
- #define _GLOBAL_DEF_H_
- #include <QString>
- #define CN(s) QString::fromLocal8Bit(s)
- #define S2QS(s) QString::fromStdString(s)
- #define KEY_ORIGINAL_IMAGE "original_image"
- #define ST_BG_COLOR QString("background-color: rgb(37, 37, 37);")
- #define ST_SOFTWARE_NAME CN("Pcba Analyser")
- #define ST_SOFTWARE_VERSION CN("V1.1")
- #define ST_CLIP_IMAGE 1
- #define QMESSAGEBOX_ERROR(msg) QMessageBox msgBox(QMessageBox::Icon::NoIcon, CN("´íÎó"), msg);\
- msgBox.setWindowIcon(QIcon(":/Assets/View/error.png"));\
- msgBox.exec();
- #define QMESSAGEBOX_WARN(msg) QMessageBox msgBox(QMessageBox::Icon::NoIcon, CN("¾¯¸æ"), msg);\
- msgBox.setWindowIcon(QIcon(":/Assets/View/warn.png"));\
- msgBox.exec();
- #define QMESSAGEBOX_INFO(msg) QMessageBox msgBox(QMessageBox::Icon::NoIcon, CN("Ìáʾ"), msg);\
- msgBox.setWindowIcon(QIcon(":/Assets/View/info.png"));\
- msgBox.exec();
- #define ST_CAMERA_PAR_BUTTON_QSS QString("QPushButton{background-color: rgb(8, 91, 82);font: 10pt \"΢ÈíÑźÚ\";border: 2px groove gray; border-radius: 5px;}\
- QPushButton:hover{background-color: rgb(17, 199, 178);font: 10pt ;border: 0px groove gray; border-radius: 5px;}\
- QPushButton:pressed{background-color: rgb(37, 37, 37); font: 10pt ;border: 2px groove gray; border-radius:5px;}\
- QPushButton:!enabled{background-color:rgb(37, 37, 37); font: 10pt \"΢ÈíÑźÚ\";border: 2px solid gray; border-radius: 5px;}")
- #define ST_MAIN_BUTTON_QSS(imgUrl) QString("QPushButton{background-color: rgb(8, 91, 82);font: 10pt \"΢ÈíÑźÚ\";border: 2px solid gray; border-radius: 5px;background-image:url(")+QString(imgUrl)+QString(");background-origin: content;background-position: left;background-repeat: no-repeat;padding-left:10px;text-align: right;padding-right:12px; }\
- QPushButton:hover{background-color: rgb(17, 199, 178);font: 10pt \"΢ÈíÑźÚ\";border: 0px solid gray; border-radius: 5px;}\
- QPushButton:pressed{background-color: rgb(37, 37, 37); font: 10pt \"΢ÈíÑźÚ\";border: 2px solid gray; border-radius: 5px;}\
- QPushButton:!enabled{background-color:rgb(37, 37, 37); font: 10pt \"΢ÈíÑźÚ\";border: 2px solid gray; border-radius: 5px;}")
- //
- //
- //#define ST_MYBUTTON_QSS QString("QPushButton{background-color: rgb(8, 91, 82);font: 15pt \"΢ÈíÑźÚ\";border: 0px groove gray; border-radius: 5px;}\
- //QPushButton:hover{background-color: rgb(17, 199, 178);font: 15pt \"΢ÈíÑźÚ\";border: 0px groove gray; border-radius: 5px;}\
- //QPushButton:pressed{background-color: rgb(37, 37, 37);font: 15pt \"΢ÈíÑźÚ\";border: 0px groove gray; border-radius:\5px;}")
- //
- //#define ST_CAM_CONN_QSS QString("QPushButton{background-color: rgb(8, 91, 82);color:rgb(0,255,0);font: 15pt \"΢ÈíÑźÚ\";border: 0px groove gray; border-radius: 5px;}\
- //QPushButton:hover{background-color: rgb(17, 199, 178);font: 15pt \"΢ÈíÑźÚ\";border: 0px groove gray; border-radius: 5px;}\
- //QPushButton:pressed{background-color: rgb(37, 37, 37);font: 15pt \"΢ÈíÑźÚ\";border: 0px groove gray; border-radius:\5px;}")
- //
- //#define ST_CAM_CLOSE_QSS QString("QPushButton{background-color: rgb(8, 91, 82);color:rgb(255,0,0);font: 15pt \"΢ÈíÑźÚ\";border: 0px groove gray; border-radius: 5px;}\
- //QPushButton:hover{background-color: rgb(17, 199, 178);font: 15pt \"΢ÈíÑźÚ\";border: 0px groove gray; border-radius: 5px;}\
- //QPushButton:pressed{background-color: rgb(37, 37, 37);font: 15pt \"΢ÈíÑźÚ\";border: 0px groove gray; border-radius:\5px;}")
- #define ST_DOUBLE_SPIN_BOX_QSS /*QString("QDoubleSpinBox::up-button{border:transparent;}\
- QDoubleSpinBox::down-button{border:transparent;}\
- QDoubleSpinBox::up-arrow{image:url(:/Assets/View/up.png);}\
- QDoubleSpinBox::down-arrow{image:url(:/Assets/View/down.png);}")*/
- #define ST_QTABLEWIDGET_QSS QString("QTableWidget{background-color:rgb(37, 37, 37);color:rgb(255,255,255);border:0px;font:10pt \"΢ÈíÑźÚ\";}\
- QTableWidget::item:hover{color:rgb(17, 199, 178);}\
- QTableWidget::item:selected{color:white;background:rgb(17, 199, 178);}")
- #define ST_QTABLEWIDGET_HEADER_QSS QString("QHeaderView::section{background-color:rgb(37, 37, 37);text-align:center;padding:3px;margin:0px;color:rgb(255,255,255);border:1px solid #242424;}\
- QHeaderView::section:selected{color:rgb(255,255,255);border:1px solid #242424;}")
- #define ST_QProgressBar_QSS QString("QProgressBar {\
- border: 1px solid grey;\
- border-radius: 5px;\
- text-align: center;\
- color:#ff0000;\
- }\
- QProgressBar::chunk {\
- background-color:rgb(17, 199, 178);\
- margin: 0.5px;\
- }")
- #endif
|