mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Preferencalize that last bit
This commit is contained in:
parent
de314d495b
commit
20c53ad5d7
@ -5,6 +5,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include "SleepLib/profiles.h"
|
||||
#include "gLineOverlay.h"
|
||||
|
||||
gLineOverlayBar::gLineOverlayBar(gPointData *d,QColor col,QString _label,LO_Type _lot)
|
||||
@ -102,7 +103,7 @@ void gLineOverlayBar::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
vertarray[vertcnt++]=start_py+1+12;
|
||||
} else if (lo_type==LOT_Bar) {
|
||||
int z=start_py+height;
|
||||
if (xx<(3600.0/86400.0)) {
|
||||
if (pref["AlwaysShowOverlayBars"].toBool() || (xx<(3600.0/86400.0))) {
|
||||
z=top;
|
||||
|
||||
pointarray[pointcnt++]=x1;
|
||||
|
@ -82,6 +82,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
if (!pref.Exists("UseAntiAliasing")) pref["UseAntiAliasing"]=false;
|
||||
else ui->actionUse_AntiAliasing->setChecked(pref["UseAntiAliasing"].toBool());
|
||||
first_load=true;
|
||||
|
||||
if (!pref.Exists("AlwaysShowOverlayBars")) pref["AlwaysShowOverlayBars"]=true;
|
||||
else ui->actionOverlay_Bars->setChecked(pref["AlwaysShowOverlayBars"].toBool());
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@ -281,3 +285,9 @@ void MainWindow::on_actionDebug_toggled(bool checked)
|
||||
ui->logText->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_actionOverlay_Bars_toggled(bool checked)
|
||||
{
|
||||
pref["AlwaysShowOverlayBars"]=checked;
|
||||
if (daily) daily->RedrawGraphs();
|
||||
}
|
||||
|
@ -66,6 +66,8 @@ private slots:
|
||||
|
||||
void on_actionDebug_toggled(bool arg1);
|
||||
|
||||
void on_actionOverlay_Bars_toggled(bool arg1);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
Daily * daily;
|
||||
|
@ -593,6 +593,7 @@
|
||||
<addaction name="actionUse_AntiAliasing"/>
|
||||
<addaction name="action_Link_Graphs"/>
|
||||
<addaction name="action_Noon_Date_Split"/>
|
||||
<addaction name="actionOverlay_Bars"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="action_Fullscreen"/>
|
||||
</widget>
|
||||
@ -709,6 +710,14 @@
|
||||
<string>Debug</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOverlay_Bars">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Overlay Bars</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
Loading…
Reference in New Issue
Block a user