Files
EJM_Display/PublicFunctions/BitMaps.cpp

59 lines
2.2 KiB
C++
Raw Normal View History

2025-09-15 22:28:43 +08:00
#include "BitMaps.h"
BitMaps::BitMaps(QObject *parent) : QObject(parent)
{
2025-10-11 18:05:29 +08:00
RemUI_SwitchStyles << ":/Icos/Icos/LED1_Grey.png"
<< ":/Icos/Icos/LED1_Green.png"
<< ":/Icos/Icos/LED1_Rad.png";
2025-09-15 22:28:43 +08:00
2025-10-11 18:05:29 +08:00
RemUI_PutterStyles << ":/Icos/Icos/Arrow_Stop.png"
<< ":/Icos/Icos/Arrow_Push.png"
<< ":/Icos/Icos/Arrow_Pull.png";
2025-09-15 22:28:43 +08:00
2025-10-11 18:05:29 +08:00
RemUI_ModeStyles << ""
<< ":/Icos/Icos/arrow1.png"
<< ":/Icos/Icos/arrow2.png"
<< ":/Icos/Icos/arrow3.png";
RemUI_SpeedStyles << ""
<< ":/Icos/Icos/Arrow_Low.png"
<< ":/Icos/Icos/Arrow_High.png";
2025-09-15 22:28:43 +08:00
}
2025-10-11 18:05:29 +08:00
2025-09-15 22:28:43 +08:00
/**
2025-10-11 18:05:29 +08:00
* @brief ListChoice_2Mode List里面 b1和b2的状态,
* b1 !b2 1
* !b1 b2 2
* 0 (inNull为真,)
* @param List
* @param b1 1,
* @param b2 2
* @param isNull b1 b2 ,
* @return
2025-09-15 22:28:43 +08:00
*/
2025-10-11 18:05:29 +08:00
QString BitMaps::ListChoice_2Mode(const QStringList List, const bool b1,const bool b2,const bool isNull){
if(b1 && !b2) return List[1];
else if(!b1 && b2) return List[2];
else return isNull ? "" : List[0];
2025-09-15 22:28:43 +08:00
}
2025-10-10 23:10:21 +08:00
/**
2025-10-11 18:05:29 +08:00
* @brief ListChoice_2Mode List里面 b1和b2的状态,
* b1 !b2 !b3 1
* !b1 b2 !b3 2
* !b1 !b2 b3 3
* 0 (inNull为真,)
* @param List
* @param b1 1,
* @param b2 2
* @param b3 3
* @param isNull b1 b2 b3 ,
* @return
2025-10-10 23:10:21 +08:00
*/
2025-10-11 18:05:29 +08:00
QString BitMaps::ListChoice_3Mode(const QStringList List, const bool b1,const bool b2,const bool b3,const bool isNull){
if(b1 && !b2 && !b3) return List[1];
else if(!b1 && b2 && !b3) return List[2];
else if(!b1 && !b2 && b3) return List[3];
else return isNull ? "" : List[0];
2025-10-10 23:10:21 +08:00
}