mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30:44 +00:00
Create new Troubleshooting submenu under Help and move a bunch of items there.
Also change "archive" to "zip" in the menu and prompts for sending diagnostic data.
This commit is contained in:
parent
6d47210c95
commit
7a42caeccf
@ -2633,7 +2633,7 @@ void MainWindow::on_mainsplitter_splitterMoved(int, int)
|
|||||||
|
|
||||||
void MainWindow::on_actionCreate_Card_zip_triggered()
|
void MainWindow::on_actionCreate_Card_zip_triggered()
|
||||||
{
|
{
|
||||||
QList<ImportPath> datacards = selectCPAPDataCards(tr("Would you like to archive this card?"));
|
QList<ImportPath> datacards = selectCPAPDataCards(tr("Would you like to zip this card?"));
|
||||||
|
|
||||||
for (auto & datacard : datacards) {
|
for (auto & datacard : datacards) {
|
||||||
QString cardPath = QDir(datacard.path).canonicalPath();
|
QString cardPath = QDir(datacard.path).canonicalPath();
|
||||||
@ -2653,7 +2653,7 @@ void MainWindow::on_actionCreate_Card_zip_triggered()
|
|||||||
}
|
}
|
||||||
folder += QDir::separator() + infostr + ".zip";
|
folder += QDir::separator() + infostr + ".zip";
|
||||||
|
|
||||||
filename = QFileDialog::getSaveFileName(this, tr("Choose where to save archive"), folder, tr("ZIP files (*.zip)"));
|
filename = QFileDialog::getSaveFileName(this, tr("Choose where to save zip"), folder, tr("ZIP files (*.zip)"));
|
||||||
|
|
||||||
if (filename.isEmpty()) {
|
if (filename.isEmpty()) {
|
||||||
return; // aborted
|
return; // aborted
|
||||||
@ -2663,7 +2663,7 @@ void MainWindow::on_actionCreate_Card_zip_triggered()
|
|||||||
QString selectedPath = QFileInfo(filename).dir().canonicalPath();
|
QString selectedPath = QFileInfo(filename).dir().canonicalPath();
|
||||||
if (selectedPath.startsWith(cardPath)) {
|
if (selectedPath.startsWith(cardPath)) {
|
||||||
if (QMessageBox::warning(nullptr, STR_MessageBox_Error,
|
if (QMessageBox::warning(nullptr, STR_MessageBox_Error,
|
||||||
QObject::tr("Please select a location for your archive other than the data card itself!"),
|
QObject::tr("Please select a location for your zip other than the data card itself!"),
|
||||||
QMessageBox::Ok)) {
|
QMessageBox::Ok)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -2682,7 +2682,7 @@ void MainWindow::on_actionCreate_Card_zip_triggered()
|
|||||||
bool ok = z.Open(filename);
|
bool ok = z.Open(filename);
|
||||||
if (ok) {
|
if (ok) {
|
||||||
ProgressDialog * prog = new ProgressDialog(this);
|
ProgressDialog * prog = new ProgressDialog(this);
|
||||||
prog->setMessage(tr("Creating archive..."));
|
prog->setMessage(tr("Creating zip..."));
|
||||||
ok = z.AddDirectory(cardPath, prog);
|
ok = z.AddDirectory(cardPath, prog);
|
||||||
z.Close();
|
z.Close();
|
||||||
} else {
|
} else {
|
||||||
@ -2690,7 +2690,7 @@ void MainWindow::on_actionCreate_Card_zip_triggered()
|
|||||||
}
|
}
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
QMessageBox::warning(nullptr, STR_MessageBox_Error,
|
QMessageBox::warning(nullptr, STR_MessageBox_Error,
|
||||||
QObject::tr("Unable to create archive!"),
|
QObject::tr("Unable to create zip!"),
|
||||||
QMessageBox::Ok);
|
QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2705,7 +2705,7 @@ void MainWindow::on_actionCreate_OSCAR_Data_zip_triggered()
|
|||||||
|
|
||||||
folder += QDir::separator() + STR_AppData + ".zip";
|
folder += QDir::separator() + STR_AppData + ".zip";
|
||||||
|
|
||||||
QString filename = QFileDialog::getSaveFileName(this, tr("Choose where to save archive"), folder, tr("ZIP files (*.zip)"));
|
QString filename = QFileDialog::getSaveFileName(this, tr("Choose where to save zip"), folder, tr("ZIP files (*.zip)"));
|
||||||
|
|
||||||
if (filename.isEmpty()) {
|
if (filename.isEmpty()) {
|
||||||
return; // aborted
|
return; // aborted
|
||||||
@ -2733,7 +2733,7 @@ void MainWindow::on_actionCreate_OSCAR_Data_zip_triggered()
|
|||||||
files.AddDirectory(oscarData.canonicalPath(), oscarData.dirName());
|
files.AddDirectory(oscarData.canonicalPath(), oscarData.dirName());
|
||||||
files.Remove(debugLog.fileName());
|
files.Remove(debugLog.fileName());
|
||||||
|
|
||||||
prog->setMessage(tr("Creating archive..."));
|
prog->setMessage(tr("Creating zip..."));
|
||||||
|
|
||||||
// Create the zip.
|
// Create the zip.
|
||||||
ok = z.AddFiles(files, prog);
|
ok = z.AddFiles(files, prog);
|
||||||
@ -2746,7 +2746,7 @@ void MainWindow::on_actionCreate_OSCAR_Data_zip_triggered()
|
|||||||
QString debugLogName = oscarData.dirName() + QDir::separator() + QFileInfo(debugLog).fileName();
|
QString debugLogName = oscarData.dirName() + QDir::separator() + QFileInfo(debugLog).fileName();
|
||||||
ok = z.AddFile(debugLog.fileName(), debugLogName);
|
ok = z.AddFile(debugLog.fileName(), debugLogName);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
qWarning() << "Unable to add debug log to archive!";
|
qWarning() << "Unable to add debug log to zip!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2757,7 +2757,7 @@ void MainWindow::on_actionCreate_OSCAR_Data_zip_triggered()
|
|||||||
}
|
}
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
QMessageBox::warning(nullptr, STR_MessageBox_Error,
|
QMessageBox::warning(nullptr, STR_MessageBox_Error,
|
||||||
QObject::tr("Unable to create archive!"),
|
QObject::tr("Unable to create zip!"),
|
||||||
QMessageBox::Ok);
|
QMessageBox::Ok);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2856,12 +2856,10 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="title">
|
<property name="title">
|
||||||
<string>&Help</string>
|
<string>&Help</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionOnline_Users_Guide"/>
|
<widget class="QMenu" name="menuTroubleshooting">
|
||||||
<addaction name="action_Frequently_Asked_Questions"/>
|
<property name="title">
|
||||||
<addaction name="actionSleep_Disorder_Terms_Glossary"/>
|
<string>Troubleshooting</string>
|
||||||
<addaction name="separator"/>
|
</property>
|
||||||
<addaction name="actionChange_Language"/>
|
|
||||||
<addaction name="separator"/>
|
|
||||||
<addaction name="actionDebug"/>
|
<addaction name="actionDebug"/>
|
||||||
<addaction name="actionShow_Performance_Counters"/>
|
<addaction name="actionShow_Performance_Counters"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
@ -2870,6 +2868,15 @@ p, li { white-space: pre-wrap; }
|
|||||||
<addaction name="actionReport_a_Bug"/>
|
<addaction name="actionReport_a_Bug"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionSystem_Information"/>
|
<addaction name="actionSystem_Information"/>
|
||||||
|
</widget>
|
||||||
|
<addaction name="actionOnline_Users_Guide"/>
|
||||||
|
<addaction name="action_Frequently_Asked_Questions"/>
|
||||||
|
<addaction name="actionSleep_Disorder_Terms_Glossary"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="actionChange_Language"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
|
<addaction name="menuTroubleshooting"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
<addaction name="action_About"/>
|
<addaction name="action_About"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menu_Data">
|
<widget class="QMenu" name="menu_Data">
|
||||||
@ -3212,12 +3219,12 @@ p, li { white-space: pre-wrap; }
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionCreate_Card_zip">
|
<action name="actionCreate_Card_zip">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create archive of CPAP data card</string>
|
<string>Create zip of CPAP data card</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionCreate_OSCAR_Data_zip">
|
<action name="actionCreate_OSCAR_Data_zip">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Create archive of all OSCAR data</string>
|
<string>Create zip of all OSCAR data</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionExport_CSV">
|
<action name="actionExport_CSV">
|
||||||
|
Loading…
Reference in New Issue
Block a user