16551需求:平板最大化适配改造
This commit is contained in:
parent
8b7c2aabbf
commit
1cf5dbd89f
|
@ -241,10 +241,10 @@ void MainDialog::initConnect()
|
||||||
if (is_tabletmode) {
|
if (is_tabletmode) {
|
||||||
if (!isMinimized())
|
if (!isMinimized())
|
||||||
showMaximized();
|
showMaximized();
|
||||||
|
m_maxBtn->setIcon(QIcon::fromTheme("window-restore-symbolic"));
|
||||||
|
m_maxBtn->setToolTip(tr("Normal"));
|
||||||
m_maxBtn->setVisible(false);
|
m_maxBtn->setVisible(false);
|
||||||
} else {
|
} else {
|
||||||
if (!isMinimized())
|
|
||||||
showNormal();
|
|
||||||
m_maxBtn->setVisible(true);
|
m_maxBtn->setVisible(true);
|
||||||
}
|
}
|
||||||
connect(m_statusSessionDbus, SIGNAL(mode_change_signal(bool)), this, SLOT(tabletModeChange(bool)));
|
connect(m_statusSessionDbus, SIGNAL(mode_change_signal(bool)), this, SLOT(tabletModeChange(bool)));
|
||||||
|
@ -274,6 +274,23 @@ void MainDialog::tabletModeChange(bool isTabletMode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainDialog::changeEvent(QEvent *event)
|
||||||
|
{
|
||||||
|
if (QEvent::WindowStateChange == event->type()) {
|
||||||
|
// 如果是平板模式
|
||||||
|
if (GlobelBackupInfo::inst().isTabletMode()) {
|
||||||
|
Qt::WindowStates state = this->windowState();
|
||||||
|
if (state == Qt::WindowMaximized) {
|
||||||
|
event->accept();
|
||||||
|
showMaximized();
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QMainWindow::changeEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 左侧功能选择栏响应槽
|
* @brief 左侧功能选择栏响应槽
|
||||||
* @param func_type,功能类型
|
* @param func_type,功能类型
|
||||||
|
|
|
@ -27,6 +27,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
|
void changeEvent(QEvent *event);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void sltMessageReceived(const QString &msg);
|
void sltMessageReceived(const QString &msg);
|
||||||
|
|
|
@ -1083,7 +1083,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="130"/>
|
<location filename="maindialog.cpp" line="130"/>
|
||||||
<location filename="maindialog.cpp" line="224"/>
|
<location filename="maindialog.cpp" line="220"/>
|
||||||
<source>Maximize</source>
|
<source>Maximize</source>
|
||||||
<translation>ཚད་གཞི་མཐོ་ཤོས་ཀྱི་སྒོ་ནས</translation>
|
<translation>ཚད་གཞི་མཐོ་ཤོས་ཀྱི་སྒོ་ནས</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1108,7 +1108,8 @@
|
||||||
<translation>ཕྱིར་འཐེན་བྱེད་པ།</translation>
|
<translation>ཕྱིར་འཐེན་བྱེད་པ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="220"/>
|
<location filename="maindialog.cpp" line="224"/>
|
||||||
|
<location filename="maindialog.cpp" line="245"/>
|
||||||
<source>Normal</source>
|
<source>Normal</source>
|
||||||
<translation>རྒྱུན་ལྡན་གྱི་གནས་</translation>
|
<translation>རྒྱུན་ལྡན་གྱི་གནས་</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1251,9 +1252,9 @@
|
||||||
<location filename="component/backuplistwidget.cpp" line="297"/>
|
<location filename="component/backuplistwidget.cpp" line="297"/>
|
||||||
<location filename="component/backuplistwidget.cpp" line="306"/>
|
<location filename="component/backuplistwidget.cpp" line="306"/>
|
||||||
<location filename="component/backuplistwidget.cpp" line="329"/>
|
<location filename="component/backuplistwidget.cpp" line="329"/>
|
||||||
<location filename="maindialog.cpp" line="348"/>
|
<location filename="maindialog.cpp" line="369"/>
|
||||||
<location filename="maindialog.cpp" line="364"/>
|
<location filename="maindialog.cpp" line="385"/>
|
||||||
<location filename="maindialog.cpp" line="384"/>
|
<location filename="maindialog.cpp" line="405"/>
|
||||||
<location filename="module/databackup.cpp" line="545"/>
|
<location filename="module/databackup.cpp" line="545"/>
|
||||||
<location filename="module/databackup.cpp" line="563"/>
|
<location filename="module/databackup.cpp" line="563"/>
|
||||||
<location filename="module/databackup.cpp" line="790"/>
|
<location filename="module/databackup.cpp" line="790"/>
|
||||||
|
@ -1283,9 +1284,9 @@
|
||||||
<location filename="component/backuplistwidget.cpp" line="308"/>
|
<location filename="component/backuplistwidget.cpp" line="308"/>
|
||||||
<location filename="component/backuplistwidget.cpp" line="331"/>
|
<location filename="component/backuplistwidget.cpp" line="331"/>
|
||||||
<location filename="main.cpp" line="45"/>
|
<location filename="main.cpp" line="45"/>
|
||||||
<location filename="maindialog.cpp" line="350"/>
|
<location filename="maindialog.cpp" line="371"/>
|
||||||
<location filename="maindialog.cpp" line="366"/>
|
<location filename="maindialog.cpp" line="387"/>
|
||||||
<location filename="maindialog.cpp" line="386"/>
|
<location filename="maindialog.cpp" line="407"/>
|
||||||
<location filename="module/databackup.cpp" line="488"/>
|
<location filename="module/databackup.cpp" line="488"/>
|
||||||
<location filename="module/databackup.cpp" line="504"/>
|
<location filename="module/databackup.cpp" line="504"/>
|
||||||
<location filename="module/databackup.cpp" line="512"/>
|
<location filename="module/databackup.cpp" line="512"/>
|
||||||
|
@ -1350,7 +1351,7 @@
|
||||||
<translation>ཅིན་པུའུ་ལུའུ་ཕུའུ།</translation>
|
<translation>ཅིན་པུའུ་ལུའུ་ཕུའུ།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="349"/>
|
<location filename="maindialog.cpp" line="370"/>
|
||||||
<source>An exception occurred when mounting backup partition.</source>
|
<source>An exception occurred when mounting backup partition.</source>
|
||||||
<translation>རྗེས་གྲབས་ཁག་བགོས་སྒྲིག་སྦྱོར་བྱེད་སྐབས་དམིགས་བསལ་གྱི་གནས་ཚུལ་བྱུང་བ་རེད།</translation>
|
<translation>རྗེས་གྲབས་ཁག་བགོས་སྒྲིག་སྦྱོར་བྱེད་སྐབས་དམིགས་བསལ་གྱི་གནས་ཚུལ་བྱུང་བ་རེད།</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1359,12 +1360,12 @@
|
||||||
<translation type="vanished">请检查备份还原分区是否存在,在安装操作系统时必须创建备份还原分区。</translation>
|
<translation type="vanished">请检查备份还原分区是否存在,在安装操作系统时必须创建备份还原分区。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="365"/>
|
<location filename="maindialog.cpp" line="386"/>
|
||||||
<source>Failed to mount backup partition.</source>
|
<source>Failed to mount backup partition.</source>
|
||||||
<translation>རྗེས་གྲབས་ཁག་བགོས་བྱེད་མ་ཐུབ་པ་རེད།</translation>
|
<translation>རྗེས་གྲབས་ཁག་བགོས་བྱེད་མ་ཐུབ་པ་རེད།</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="385"/>
|
<location filename="maindialog.cpp" line="406"/>
|
||||||
<location filename="module/datarestore.cpp" line="1088"/>
|
<location filename="module/datarestore.cpp" line="1088"/>
|
||||||
<source>It's busy, please wait</source>
|
<source>It's busy, please wait</source>
|
||||||
<translation>བྲེལ་བ་ཧ་ཅང་ཆེ་བས་སྒུག་དང་།</translation>
|
<translation>བྲེལ་བ་ཧ་ཅང་ཆེ་བས་སྒུག་དང་།</translation>
|
||||||
|
|
|
@ -1083,7 +1083,7 @@
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="130"/>
|
<location filename="maindialog.cpp" line="130"/>
|
||||||
<location filename="maindialog.cpp" line="224"/>
|
<location filename="maindialog.cpp" line="220"/>
|
||||||
<source>Maximize</source>
|
<source>Maximize</source>
|
||||||
<translation>最大化</translation>
|
<translation>最大化</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1108,7 +1108,8 @@
|
||||||
<translation>退出</translation>
|
<translation>退出</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="220"/>
|
<location filename="maindialog.cpp" line="224"/>
|
||||||
|
<location filename="maindialog.cpp" line="245"/>
|
||||||
<source>Normal</source>
|
<source>Normal</source>
|
||||||
<translation>还原</translation>
|
<translation>还原</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1251,9 +1252,9 @@
|
||||||
<location filename="component/backuplistwidget.cpp" line="297"/>
|
<location filename="component/backuplistwidget.cpp" line="297"/>
|
||||||
<location filename="component/backuplistwidget.cpp" line="306"/>
|
<location filename="component/backuplistwidget.cpp" line="306"/>
|
||||||
<location filename="component/backuplistwidget.cpp" line="329"/>
|
<location filename="component/backuplistwidget.cpp" line="329"/>
|
||||||
<location filename="maindialog.cpp" line="348"/>
|
<location filename="maindialog.cpp" line="369"/>
|
||||||
<location filename="maindialog.cpp" line="364"/>
|
<location filename="maindialog.cpp" line="385"/>
|
||||||
<location filename="maindialog.cpp" line="384"/>
|
<location filename="maindialog.cpp" line="405"/>
|
||||||
<location filename="module/databackup.cpp" line="545"/>
|
<location filename="module/databackup.cpp" line="545"/>
|
||||||
<location filename="module/databackup.cpp" line="563"/>
|
<location filename="module/databackup.cpp" line="563"/>
|
||||||
<location filename="module/databackup.cpp" line="790"/>
|
<location filename="module/databackup.cpp" line="790"/>
|
||||||
|
@ -1274,9 +1275,9 @@
|
||||||
<location filename="component/backuplistwidget.cpp" line="308"/>
|
<location filename="component/backuplistwidget.cpp" line="308"/>
|
||||||
<location filename="component/backuplistwidget.cpp" line="331"/>
|
<location filename="component/backuplistwidget.cpp" line="331"/>
|
||||||
<location filename="main.cpp" line="45"/>
|
<location filename="main.cpp" line="45"/>
|
||||||
<location filename="maindialog.cpp" line="350"/>
|
<location filename="maindialog.cpp" line="371"/>
|
||||||
<location filename="maindialog.cpp" line="366"/>
|
<location filename="maindialog.cpp" line="387"/>
|
||||||
<location filename="maindialog.cpp" line="386"/>
|
<location filename="maindialog.cpp" line="407"/>
|
||||||
<location filename="module/databackup.cpp" line="488"/>
|
<location filename="module/databackup.cpp" line="488"/>
|
||||||
<location filename="module/databackup.cpp" line="504"/>
|
<location filename="module/databackup.cpp" line="504"/>
|
||||||
<location filename="module/databackup.cpp" line="512"/>
|
<location filename="module/databackup.cpp" line="512"/>
|
||||||
|
@ -1346,7 +1347,7 @@
|
||||||
<translation>备份还原工具</translation>
|
<translation>备份还原工具</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="349"/>
|
<location filename="maindialog.cpp" line="370"/>
|
||||||
<source>An exception occurred when mounting backup partition.</source>
|
<source>An exception occurred when mounting backup partition.</source>
|
||||||
<translation>挂载备份分区时发生错误。</translation>
|
<translation>挂载备份分区时发生错误。</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -1355,12 +1356,12 @@
|
||||||
<translation type="vanished">请检查备份还原分区是否存在,在安装操作系统时必须创建备份还原分区。</translation>
|
<translation type="vanished">请检查备份还原分区是否存在,在安装操作系统时必须创建备份还原分区。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="365"/>
|
<location filename="maindialog.cpp" line="386"/>
|
||||||
<source>Failed to mount backup partition.</source>
|
<source>Failed to mount backup partition.</source>
|
||||||
<translation>挂载备份分区失败。</translation>
|
<translation>挂载备份分区失败。</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="maindialog.cpp" line="385"/>
|
<location filename="maindialog.cpp" line="406"/>
|
||||||
<location filename="module/datarestore.cpp" line="1088"/>
|
<location filename="module/datarestore.cpp" line="1088"/>
|
||||||
<source>It's busy, please wait</source>
|
<source>It's busy, please wait</source>
|
||||||
<translation>系统正忙,请稍等</translation>
|
<translation>系统正忙,请稍等</translation>
|
||||||
|
|
Loading…
Reference in New Issue