更新文档
This commit is contained in:
@@ -230,7 +230,7 @@ void Battery::setValue(double value)
|
||||
}
|
||||
|
||||
this->value = value;
|
||||
emit valueChanged(value);
|
||||
Q_EMIT valueChanged(value);
|
||||
if (animation) {
|
||||
timer->stop();
|
||||
timer->start();
|
||||
|
||||
@@ -214,8 +214,8 @@ void CpuMemoryLabel::setData()
|
||||
this->setText(msg);
|
||||
}
|
||||
|
||||
emit textChanged(msg);
|
||||
emit valueChanged(cpuPercent, memoryPercent, memoryAll, memoryUse, memoryFree);
|
||||
Q_EMIT textChanged(msg);
|
||||
Q_EMIT valueChanged(cpuPercent, memoryPercent, memoryAll, memoryUse, memoryFree);
|
||||
}
|
||||
|
||||
QSize CpuMemoryLabel::sizeHint() const
|
||||
|
||||
@@ -94,7 +94,7 @@ bool DeviceButton::eventFilter(QObject *watched, QEvent *event)
|
||||
if (mouseEvent->button() == Qt::LeftButton) {
|
||||
lastPoint = mouseEvent->pos();
|
||||
isPressed = true;
|
||||
emit clicked();
|
||||
Q_EMIT clicked();
|
||||
return true;
|
||||
}
|
||||
} else if (event->type() == QEvent::MouseMove) {
|
||||
@@ -108,7 +108,7 @@ bool DeviceButton::eventFilter(QObject *watched, QEvent *event)
|
||||
} else if (event->type() == QEvent::MouseButtonRelease) {
|
||||
isPressed = false;
|
||||
} else if (event->type() == QEvent::MouseButtonDblClick) {
|
||||
emit doubleClicked();
|
||||
Q_EMIT doubleClicked();
|
||||
}
|
||||
|
||||
return QWidget::eventFilter(watched, event);
|
||||
|
||||
@@ -72,17 +72,17 @@ void DeviceSizeTable::readData()
|
||||
} else if (result.startsWith("/dev/mmcblk1p")) {
|
||||
checkSize(result, "SD卡");
|
||||
QStringList list = result.split(" ");
|
||||
emit sdcardReceive(list.at(0));
|
||||
Q_EMIT sdcardReceive(list.at(0));
|
||||
} else if (result.startsWith("/dev/sd")) {
|
||||
checkSize(result, "U盘");
|
||||
QStringList list = result.split(" ");
|
||||
emit udiskReceive(list.at(0));
|
||||
Q_EMIT udiskReceive(list.at(0));
|
||||
}
|
||||
#else
|
||||
if (result.startsWith("/dev/sd")) {
|
||||
checkSize(result, "");
|
||||
QStringList list = result.split(" ");
|
||||
emit udiskReceive(list.at(0));
|
||||
Q_EMIT udiskReceive(list.at(0));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ void ImageSwitch::mousePressEvent(QMouseEvent *)
|
||||
{
|
||||
imgFile = isChecked ? imgOffFile : imgOnFile;
|
||||
isChecked = !isChecked;
|
||||
emit checkedChanged(isChecked);
|
||||
Q_EMIT checkedChanged(isChecked);
|
||||
this->update();
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ bool LightButton::eventFilter(QObject *watched, QEvent *event)
|
||||
}
|
||||
} else if (mouseEvent->type() == QEvent::MouseButtonRelease && pressed) {
|
||||
pressed = false;
|
||||
emit clicked();
|
||||
Q_EMIT clicked();
|
||||
}
|
||||
|
||||
return QWidget::eventFilter(watched, event);
|
||||
|
||||
@@ -196,7 +196,7 @@ void SaveLog::save(const QString &content)
|
||||
{
|
||||
//如果重定向输出到网络则通过网络发出去,否则输出到日志文件
|
||||
if (toNet) {
|
||||
emit send(content);
|
||||
Q_EMIT send(content);
|
||||
} else {
|
||||
//目录不存在则先新建目录
|
||||
QDir dir(path);
|
||||
|
||||
Reference in New Issue
Block a user