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