mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 19:50:45 +00:00
Changed Updates in Preferences to General, Reordered some stuff, Added Skip Login Screen option in General.
This commit is contained in:
parent
f13bfd8d77
commit
16cb50cbb2
14
main.cpp
14
main.cpp
@ -79,7 +79,14 @@ int main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
|
QGL::setPreferredPaintEngine(QPaintEngine::OpenGL);
|
||||||
|
|
||||||
|
bool force_login_screen=false;
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
QStringList args=QCoreApplication::arguments();
|
||||||
|
|
||||||
|
for (int i=1;i<args.size();i++) {
|
||||||
|
if (args[i]=="-l") force_login_screen=true;
|
||||||
|
}
|
||||||
|
|
||||||
a.setApplicationName("SleepyHead");
|
a.setApplicationName("SleepyHead");
|
||||||
initialize();
|
initialize();
|
||||||
|
|
||||||
@ -89,7 +96,7 @@ int main(int argc, char *argv[])
|
|||||||
ResmedLoader::Register();
|
ResmedLoader::Register();
|
||||||
Profiles::Scan();
|
Profiles::Scan();
|
||||||
PREF["AppName"]="SleepyHead";
|
PREF["AppName"]="SleepyHead";
|
||||||
|
bool skip_login=(!PREF.ExistsAndTrue("SkipLoginScreen")) || force_login_screen;
|
||||||
|
|
||||||
QString Version=QString("%1.%2.%3").arg(major_version).arg(minor_version).arg(revision_number);
|
QString Version=QString("%1.%2.%3").arg(major_version).arg(minor_version).arg(revision_number);
|
||||||
|
|
||||||
@ -132,11 +139,16 @@ int main(int argc, char *argv[])
|
|||||||
check_updates=false;
|
check_updates=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (skip_login) {
|
||||||
|
p_profile=Profiles::Get(PREF["Profile"].toString());
|
||||||
|
} else p_profile=NULL;
|
||||||
|
if (p_profile) {
|
||||||
ProfileSelect profsel(0);
|
ProfileSelect profsel(0);
|
||||||
if (profsel.exec()==ProfileSelect::Rejected) {
|
if (profsel.exec()==ProfileSelect::Rejected) {
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
PREF["VersionString"]=Version;
|
PREF["VersionString"]=Version;
|
||||||
|
|
||||||
p_profile=Profiles::Get(PREF["Profile"].toString());
|
p_profile=Profiles::Get(PREF["Profile"].toString());
|
||||||
|
@ -81,6 +81,9 @@ PreferencesDialog::PreferencesDialog(QWidget *parent,Profile * _profile) :
|
|||||||
if (!PREF.Exists("Updates_AutoCheck")) PREF["Updates_AutoCheck"]=true;
|
if (!PREF.Exists("Updates_AutoCheck")) PREF["Updates_AutoCheck"]=true;
|
||||||
ui->automaticallyCheckUpdates->setChecked(PREF["Updates_AutoCheck"].toBool());
|
ui->automaticallyCheckUpdates->setChecked(PREF["Updates_AutoCheck"].toBool());
|
||||||
|
|
||||||
|
if (!PREF.Exists("SkipLoginScreen")) PREF["SkipLoginScreen"]=false;
|
||||||
|
ui->skipLoginScreen->setChecked(PREF["SkipLoginScreen"].toBool());
|
||||||
|
|
||||||
if (!PREF.Exists("Updates_CheckFrequency")) PREF["Updates_CheckFrequency"]=3;
|
if (!PREF.Exists("Updates_CheckFrequency")) PREF["Updates_CheckFrequency"]=3;
|
||||||
ui->updateCheckEvery->setValue(PREF["Updates_CheckFrequency"].toInt());
|
ui->updateCheckEvery->setValue(PREF["Updates_CheckFrequency"].toInt());
|
||||||
if (PREF.Exists("Updates_LastChecked")) {
|
if (PREF.Exists("Updates_LastChecked")) {
|
||||||
@ -213,6 +216,8 @@ void PreferencesDialog::Save()
|
|||||||
(*profile)["SyncOximetry"]=ui->oximetrySync->isChecked();
|
(*profile)["SyncOximetry"]=ui->oximetrySync->isChecked();
|
||||||
(*profile)["OximeterType"]=ui->oximetryType->currentText();
|
(*profile)["OximeterType"]=ui->oximetryType->currentText();
|
||||||
|
|
||||||
|
PREF["SkipLoginScreen"]=ui->skipLoginScreen->isChecked();
|
||||||
|
|
||||||
(*profile)["EventWindowSize"]=ui->eventWindowSlider->value();
|
(*profile)["EventWindowSize"]=ui->eventWindowSlider->value();
|
||||||
|
|
||||||
if (ui->squareWavePlots->isChecked() != (*profile)["SquareWavePlots"].toBool()) {
|
if (ui->squareWavePlots->isChecked() != (*profile)["SquareWavePlots"].toBool()) {
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>500</width>
|
<width>599</width>
|
||||||
<height>330</height>
|
<height>330</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -179,40 +179,6 @@ This takes extra space, and has been known to cause problems on certain computer
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="2">
|
|
||||||
<widget class="QCheckBox" name="useMultithreading">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>You may need to disable this if your experiencing crashes.
|
|
||||||
It has no effect on single cpu machines.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Use Multi-Threading</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="2">
|
|
||||||
<widget class="QCheckBox" name="skipEmptyDays">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Skip empty days with Prev & Next buttons above daily view calendar</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Skip Empty Days</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="2">
|
|
||||||
<widget class="QCheckBox" name="squareWavePlots">
|
|
||||||
<property name="text">
|
|
||||||
<string>Square Wave Plots</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_24">
|
<widget class="QLabel" name="label_24">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -265,6 +231,23 @@ It has no effect on single cpu machines.</string>
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="9" column="2">
|
||||||
|
<widget class="QCheckBox" name="squareWavePlots">
|
||||||
|
<property name="text">
|
||||||
|
<string>Square Wave Plots</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="2">
|
||||||
|
<widget class="QCheckBox" name="skipEmptyDays">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Skip empty days with Prev & Next buttons above daily view calendar</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Skip Empty Days</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="sessionTab">
|
<widget class="QWidget" name="sessionTab">
|
||||||
@ -648,19 +631,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_11">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Graph Text</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QFontComboBox" name="graphFont"/>
|
<widget class="QFontComboBox" name="graphFont"/>
|
||||||
</item>
|
</item>
|
||||||
@ -677,19 +647,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_12">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Graph Titles</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QFontComboBox" name="titleFont"/>
|
<widget class="QFontComboBox" name="titleFont"/>
|
||||||
</item>
|
</item>
|
||||||
@ -706,29 +663,9 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QLabel" name="label_13">
|
|
||||||
<property name="text">
|
|
||||||
<string>Big Text</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QFontComboBox" name="bigFont"/>
|
<widget class="QFontComboBox" name="bigFont"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="2">
|
|
||||||
<widget class="QSpinBox" name="bigFontSize">
|
|
||||||
<property name="minimum">
|
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="maximum">
|
|
||||||
<number>72</number>
|
|
||||||
</property>
|
|
||||||
<property name="value">
|
|
||||||
<number>18</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4">
|
<item row="1" column="4">
|
||||||
<widget class="QCheckBox" name="applicationFontItalic">
|
<widget class="QCheckBox" name="applicationFontItalic">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -917,6 +854,52 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_11">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Graph Text</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_12">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Graph Titles</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QLabel" name="label_13">
|
||||||
|
<property name="text">
|
||||||
|
<string>Big Text</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2">
|
||||||
|
<widget class="QSpinBox" name="bigFontSize">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>72</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>18</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -1015,26 +998,11 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="updatesTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>&Updates</string>
|
<string>&General</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="automaticallyCheckUpdates">
|
<widget class="QGroupBox" name="automaticallyCheckUpdates">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -1200,6 +1168,39 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>General Preferences</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="useMultithreading">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>You may need to disable this if your experiencing crashes.
|
||||||
|
It has no effect on single cpu machines.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Use Multi-Threading</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="skipLoginScreen">
|
||||||
|
<property name="text">
|
||||||
|
<string>Skip Login Screen</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_3">
|
<spacer name="verticalSpacer_3">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
Loading…
Reference in New Issue
Block a user