!28 修改阅读协议界面dbug设置不生效问题

!28 修改阅读协议界面dbug设置不生效问题
This commit is contained in:
liushanwen 2023-09-11 09:58:15 +00:00 committed by Gitee
commit ea9411a1a2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 12 additions and 40 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
kylin-os-installer (0.2.1-0k23) yangtze; urgency=medium
* openKylin 1.0版本更新changelog
-- yangdonghai <yangdonghai@kylinos.cn> Mon, 11 Sep 2023 14:55:53 +0800
kylin-os-installer (0.2.1-0k22) yangtze; urgency=medium
* openKylin 1.0版本版本缺少用户协议界面,添加用户协议

View File

@ -131,7 +131,7 @@ void LicenseFrame::initAllConnect()
{
connect(this->m_timetip, &QCheckBox::clicked, this, &LicenseFrame::nextBtnAvailable);
connect(license_text->verticalScrollBar(), &QScrollBar::valueChanged, this, &LicenseFrame::nextBtnAvailable);
connect(this->m_sendData, &QCheckBox::clicked, this, &LicenseFrame::setUploadState);
}
void LicenseFrame::addStyleSheet()
{
@ -173,43 +173,11 @@ void LicenseFrame::translateStr()
void LicenseFrame::nextBtnAvailable()
{
if(m_timetip->isChecked()) {
// m_nextBtn->setEnabled(true);
// m_nextBtn->setStyleSheet("background:#1D8EFF;");
// scrollbarInt = license_text->verticalScrollBar()->value();
// if(scrollbarInt) {
// if(scrollbarInt >= (license_text->verticalScrollBar()->maximum())) {
// m_nextBtn->setEnabled(true);
// m_nextBtn->setStyleSheet("background:#1D8EFF;");
// }
// }
if(m_sendData->isChecked()) {
setUploadState(true);
}
else
{
setUploadState(false);
}
m_nextBtn->setEnabled(true);
m_nextBtn->setStyleSheet("background:#1D8EFF;");
} else {
m_nextBtn->setEnabled(false);
}
//2021-3-5
// scrollbarInt = license_text->verticalScrollBar()->value();
// if(scrollbarInt) {
// if(scrollbarInt >= (license_text->verticalScrollBar()->maximum())) {
// m_timetip->setCheckable(true);
// m_timetip->setEnabled(true);
// if(m_timetip->isChecked()) {
// m_nextBtn->setEnabled(true);
// m_nextBtn->setStyleSheet("background:#1D8EFF;");
// } else {
// m_nextBtn->setEnabled(false);
// }
// }
// }
}
void LicenseFrame::clickNextButton()
@ -258,21 +226,18 @@ void LicenseFrame::setUploadState(bool isSet)//写dbus总线: 1收集0不收
{
int nStatus = 0;
// int strDate;
QDBusMessage messageCallStats = QDBusMessage::createMethodCall("com.kylin.daq", "/com/kylin/daq",
"com.kylin.daq.interface","SetUploadState");
if(isSet)
if (isSet)
messageCallStats << 1;
else
messageCallStats << 0;
QDBusMessage messageResponseStats = QDBusConnection::systemBus().call(messageCallStats);
if(messageResponseStats.type() == QDBusMessage::ReplyMessage)
{
if (messageResponseStats.type() == QDBusMessage::ReplyMessage) {
// strDate = messageResponseStats.arguments().takeFirst().toInt();
// qDebug() << "strDate"<< strDate;
qDebug() << "Set dbus SetUploadState successfully";
}
else {
} else {
qDebug() << "Set dbus SetUploadState error" << QDBusConnection::systemBus().lastError().message();
}
}

View File

@ -29,13 +29,14 @@ public:
void translateStr();
QString readSettingIni();
void setBoardTabOrder();
void setUploadState(bool isSet);
signals:
public slots:
void clickNextButton();
void nextBtnAvailable();
void slotTimer();
void setUploadState(bool isSet);
private:
void changeEvent(QEvent *event) override;
void keyPressEvent(QKeyEvent *event);