Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deepin-devicemanager/src/DeviceManager/DeviceCpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ void DeviceCpu::setInfoFromDmidecode(const QMap<QString, QString> &mapInfo)
setAttribute(mapInfo, "product", m_Name);
}

if (Common::specialComType > 0) {
if (Common::isHwPlatform()) {
if (mapInfo.contains("Version")) {
setAttribute(mapInfo, "Version", m_Name);
}
Expand Down
8 changes: 4 additions & 4 deletions deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void DeviceMonitor::setInfoFromHwinfo(const QMap<QString, QString> &mapInfo)
setAttribute(mapInfo, "", m_DisplayInput);
setAttribute(mapInfo, "Size", m_ScreenSize);
setAttribute(mapInfo, "", m_MainScreen);
if (Common::specialComType > 0){
if (Common::isHwPlatform()){
setAttribute(mapInfo, "Resolution", m_SupportResolution);
}

Expand All @@ -106,7 +106,7 @@ void DeviceMonitor::setInfoFromHwinfo(const QMap<QString, QString> &mapInfo)
m_ScreenSize = inchValue;

// 获取当前分辨率 和 当前支持分辨率
if (Common::specialComType > 0){
if (Common::isHwPlatform()){
QStringList listResolution = m_SupportResolution.split(" ");
m_SupportResolution = "";
foreach (const QString &word, listResolution) {
Expand All @@ -119,7 +119,7 @@ void DeviceMonitor::setInfoFromHwinfo(const QMap<QString, QString> &mapInfo)

// 计算显示比例
caculateScreenRatio();
if (Common::specialComType > 0){
if (Common::isHwPlatform()){
m_SupportResolution.replace(QRegExp(", $"), "");
}

Expand Down Expand Up @@ -290,7 +290,7 @@ bool DeviceMonitor::available()

QString DeviceMonitor::subTitle()
{
if (Common::specialComType >= 1) {
if (Common::isHwPlatform()) {
m_Name.clear();
}
return m_Name;
Expand Down
14 changes: 7 additions & 7 deletions deepin-devicemanager/src/Page/PageMultiInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void PageMultiInfo::updateInfo(const QList<DeviceBaseInfo *> &lst)
mp_Table->setVisible(true);
mp_Table->setFixedHeight(TABLE_HEIGHT);
mp_Table->updateTable(m_deviceList, m_menuControlList);
if (Common::specialComType >= 1) {
if (Common::isHwPlatform()) {
if (mp_Label->text() == tr("Storage") || mp_Label->text() == tr("Memory") || mp_Label->text() == tr("Monitor")) {
mp_Table->setVisible(false);
mp_Table->setFixedHeight(0);
Expand Down Expand Up @@ -130,19 +130,19 @@ void PageMultiInfo::resizeEvent(QResizeEvent *e)
int curHeight = this->height();
if (curHeight < LEAST_PAGE_HEIGHT) {
// 获取多个设备界面表格信息
if (Common::specialComType <= 0) {
mp_Table->updateTable(m_deviceList, m_menuControlList, true, (LEAST_PAGE_HEIGHT - curHeight) / TREE_ROW_HEIGHT + 1);
} else {
if (Common::isHwPlatform()) {
if (mp_Label->text() != tr("Storage") && mp_Label->text() != tr("Memory") && mp_Label->text() != tr("Monitor"))
mp_Table->updateTable(m_deviceList, m_menuControlList, true, (LEAST_PAGE_HEIGHT - curHeight) / TREE_ROW_HEIGHT + 1);
} else {
mp_Table->updateTable(m_deviceList, m_menuControlList, true, (LEAST_PAGE_HEIGHT - curHeight) / TREE_ROW_HEIGHT + 1);
}
} else {
// 获取多个设备界面表格信息
if (Common::specialComType <= 0) {
mp_Table->updateTable(m_deviceList, m_menuControlList, true, 0);
} else {
if (Common::isHwPlatform()) {
if (mp_Label->text() != tr("Storage") && mp_Label->text() != tr("Memory") && mp_Label->text() != tr("Monitor"))
mp_Table->updateTable(m_deviceList, m_menuControlList, true, 0);
} else {
mp_Table->updateTable(m_deviceList, m_menuControlList, true, 0);
}
}

Expand Down
6 changes: 4 additions & 2 deletions deepin-devicemanager/src/Tool/EDIDParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,14 @@ void EDIDParser::parseScreenSize()
}
}

if (Common::specialComType == 7){ // sepcial task:378963
if (Common::specialComType == Common::kSpecialType7){ // sepcial task:378963
m_Width = 296;
m_Height = 197;
}
double inch = sqrt((m_Width / 2.54) * (m_Width / 2.54) + (m_Height / 2.54) * (m_Height / 2.54))/10;
m_ScreenSize = QString("%1 %2(%3mm×%4mm)").arg(QString::number(inch, '0', Common::specialComType == 7 ? 0 : 1)).arg(QObject::tr("inch")).arg(m_Width).arg(m_Height);
m_ScreenSize = QString("%1 %2(%3mm×%4mm)")
.arg(QString::number(inch, '0', Common::specialComType == Common::kSpecialType7 ? 0 : 1))
.arg(QObject::tr("inch")).arg(m_Width).arg(m_Height);
}

void EDIDParser::parseMonitorName()
Expand Down