新二维码/条形码编辑逻辑
This commit is contained in:
+140
-106
@@ -45,14 +45,14 @@ void CounterVarSet::bindTxTEdit(QTextEdit* textEdit){
|
||||
void CounterVarSet::buttonClickedSlot()
|
||||
{
|
||||
// 编辑
|
||||
// if (editFlag) {
|
||||
// m_textEdit->clear();
|
||||
// on_buttonInsertVari_pressed();
|
||||
// applyUIPara();
|
||||
// emit sig_updateSelectedCounter();
|
||||
// editFlag = false;
|
||||
// return;
|
||||
// }
|
||||
// if (editFlag) {
|
||||
// m_textEdit->clear();
|
||||
// on_buttonInsertVari_pressed();
|
||||
// applyUIPara();
|
||||
// emit sig_updateSelectedCounter();
|
||||
// editFlag = false;
|
||||
// return;
|
||||
// }
|
||||
|
||||
// 添加
|
||||
QPushButton* btn = qobject_cast<QPushButton*>(sender());
|
||||
@@ -236,114 +236,148 @@ QString CounterVarSet::getFamilyName(int fontsize){
|
||||
|
||||
void CounterVarSet::applyStyleSheet()
|
||||
{
|
||||
QString styleSheet = R"(
|
||||
QPushButton#closeBtn, QPushButton#checkBtn{
|
||||
background-color: #E6F7FF;
|
||||
border: 1px solid #87CEEB;
|
||||
border-radius: 4px;
|
||||
font-size: 24px;
|
||||
color: #228B22;
|
||||
}
|
||||
QPushButton#closeBtn:hover,QPushButton#checkBtn:hover{
|
||||
background-color: #D1E9FF;
|
||||
}
|
||||
QString styleSheet =
|
||||
R"(
|
||||
QPushButton#closeBtn, QPushButton#checkBtn{
|
||||
background-color: #E6F7FF;
|
||||
border: 1px solid #87CEEB;
|
||||
border-radius: 4px;
|
||||
font-size: 24px;
|
||||
color: #228B22;
|
||||
}
|
||||
QPushButton#closeBtn:hover,QPushButton#checkBtn:hover{
|
||||
background-color: #D1E9FF;
|
||||
}
|
||||
|
||||
QPushButton#closeBtn:pressed,QPushButton#checkBtn:pressed{
|
||||
background-color: #BAE7FF;
|
||||
}
|
||||
QPushButton#closeBtn:pressed,QPushButton#checkBtn:pressed{
|
||||
background-color: #BAE7FF;
|
||||
}
|
||||
|
||||
QPushButton {
|
||||
background-color: #5396C1;
|
||||
color: #ffffff;
|
||||
border: 1px solid #000000;
|
||||
border-radius: 3px;
|
||||
font-size: 18px;
|
||||
font-weight:500;
|
||||
width: 180px;
|
||||
height: 90px;
|
||||
}
|
||||
QPushButton {
|
||||
background-color: #5396C1;
|
||||
color: #ffffff;
|
||||
border: 1px solid #000000;
|
||||
border-radius: 3px;
|
||||
font-size: 18px;
|
||||
font-weight:500;
|
||||
width: 180px;
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
background-color: #5396C1;
|
||||
}
|
||||
QPushButton:hover {
|
||||
background-color: #5396C1;
|
||||
}
|
||||
|
||||
QPushButton:disabled {
|
||||
background-color: #7C828E;
|
||||
color: #606060;
|
||||
border-color: #808080;
|
||||
}
|
||||
QPushButton:disabled {
|
||||
background-color: #7C828E;
|
||||
color: #606060;
|
||||
border-color: #808080;
|
||||
}
|
||||
|
||||
QComboBox {
|
||||
border: 1px solid #000000;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
width: 180px;
|
||||
height: 90px;
|
||||
padding-left: 10px; /* 文字左边距,避免紧贴边缘 */
|
||||
}
|
||||
QComboBox {
|
||||
border: 1px solid #000000;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
width: 180px;
|
||||
height: 90px;
|
||||
padding-left: 10px; /* 文字左边距,避免紧贴边缘 */
|
||||
}
|
||||
|
||||
/* 下拉箭头区域 */
|
||||
QComboBox::drop-down {
|
||||
border: 1px solid #333333;
|
||||
border-radius: 3px;
|
||||
width: 30px; /* 箭头区域宽度 */
|
||||
background-color: #5396C1;
|
||||
}
|
||||
/* 下拉箭头区域 */
|
||||
QComboBox::drop-down {
|
||||
border: 1px solid #333333;
|
||||
border-radius: 3px;
|
||||
width: 30px; /* 箭头区域宽度 */
|
||||
background-color: #5396C1;
|
||||
}
|
||||
|
||||
/* 下拉箭头图标 */
|
||||
QComboBox::down-arrow {
|
||||
image: url(image/down_white.png);
|
||||
width: 16px; /* 图标显示宽度 */
|
||||
height: 16px; /* 图标显示高度 */
|
||||
}
|
||||
/* 下拉箭头图标 */
|
||||
QComboBox::down-arrow {
|
||||
image: url(image/down_white.png);
|
||||
width: 16px; /* 图标显示宽度 */
|
||||
height: 16px; /* 图标显示高度 */
|
||||
}
|
||||
|
||||
/* 悬停状态 */
|
||||
QComboBox:hover {
|
||||
background-color: #efefef;
|
||||
}
|
||||
/* 悬停状态 */
|
||||
QComboBox:hover {
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
// 下拉框
|
||||
QComboBox QAbstractItemView {
|
||||
border: 1px solid #000000;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
selection-background-color: #5396C1; /* 选中项背景色(稍深) */
|
||||
selection-color: #ffffff;
|
||||
}
|
||||
QComboBox QAbstractItemView {
|
||||
border: 1px solid #000000;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
selection-background-color: #5396C1; /* 选中项背景色(稍深) */
|
||||
selection-color: #ffffff;
|
||||
}
|
||||
|
||||
QSpinBox::down-button {
|
||||
width: 23px; /* 图标显示宽度 */
|
||||
height: 23px; /* 图标显示高度 */
|
||||
border: 1px solid #333333;
|
||||
border-radius: 3px;
|
||||
background-color: #5396C1;
|
||||
}
|
||||
QSpinBox::down-button {
|
||||
width: 23px; /* 图标显示宽度 */
|
||||
height: 23px; /* 图标显示高度 */
|
||||
border: 1px solid #333333;
|
||||
border-radius: 3px;
|
||||
background-color: #5396C1;
|
||||
}
|
||||
|
||||
QSpinBox::down-arrow {
|
||||
image: url(image/down_white.png);
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
QSpinBox::down-arrow {
|
||||
image: url(image/down_white.png);
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
QSpinBox::up-button {
|
||||
width: 23px; /* 图标显示宽度 */
|
||||
height: 23px; /* 图标显示高度 */
|
||||
border: 1px solid #333333;
|
||||
border-radius: 3px;
|
||||
background-color: #5396C1;
|
||||
}
|
||||
QSpinBox::up-button {
|
||||
width: 23px; /* 图标显示宽度 */
|
||||
height: 23px; /* 图标显示高度 */
|
||||
border: 1px solid #333333;
|
||||
border-radius: 3px;
|
||||
background-color: #5396C1;
|
||||
}
|
||||
|
||||
QSpinBox::up-arrow {
|
||||
image: url(image/up_white.png);
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
QSpinBox::up-arrow {
|
||||
image: url(image/up_white.png);
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
}
|
||||
|
||||
QSpinBox {
|
||||
border: 1px solid #333333;
|
||||
}
|
||||
QSpinBox {
|
||||
border: 1px solid #333333;
|
||||
}
|
||||
|
||||
)";
|
||||
QTabWidget {
|
||||
border: none;
|
||||
background-color: #7B838E;
|
||||
}
|
||||
|
||||
QTabBar::tab {
|
||||
margin-top: -3px;
|
||||
min-width: 90px;
|
||||
min-height: 45px;
|
||||
padding: 4px 10px;
|
||||
margin-right: 4px;
|
||||
border: 1px solid #dddddd;
|
||||
border-bottom: none;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
background-color: #5396C1;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
QTabWidget::tab-bar {
|
||||
top: -3px;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
QTabBar::tab:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QTabBar::tab:selected {
|
||||
background-color: #6bb1e0;
|
||||
color: #ffffff;
|
||||
box-shadow: 0 -3px 8px rgba(44, 125, 232, 0.25);
|
||||
}
|
||||
|
||||
)";
|
||||
|
||||
this->setStyleSheet(styleSheet);
|
||||
}
|
||||
@@ -373,12 +407,12 @@ void CounterVarSet::on_pushOnlyCNT2Clear_pressed()
|
||||
}
|
||||
|
||||
void CounterVarSet::initReplaceValue(){
|
||||
// dataList.clear();
|
||||
// dataList << "0" << "1" << "2" << "3" << "4" << "5" << "6" << "7"
|
||||
// << "8" << "9" << "A" << "B" << "C" << "D" << "E" << "F";
|
||||
// dataList.clear();
|
||||
// dataList << "0" << "1" << "2" << "3" << "4" << "5" << "6" << "7"
|
||||
// << "8" << "9" << "A" << "B" << "C" << "D" << "E" << "F";
|
||||
|
||||
// if(ui->comboBox_2->currentIndex() == 0) //index 0 --- 数据
|
||||
// loadDataShow();
|
||||
// if(ui->comboBox_2->currentIndex() == 0) //index 0 --- 数据
|
||||
// loadDataShow();
|
||||
}
|
||||
|
||||
//void CounterVarSet::loadDataShow(){
|
||||
|
||||
Reference in New Issue
Block a user