mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Forced YAxis scale fix (for PRS1 Settings Summary chart)
This commit is contained in:
parent
d808b08f2c
commit
5d15ea2b20
@ -1516,8 +1516,10 @@ void gGraph::roundY(EventDataType &miny, EventDataType &maxy)
|
||||
miny/=4.0;
|
||||
}
|
||||
}
|
||||
if (m_forceMinY && miny<f_miny) miny=f_miny;
|
||||
if (m_forceMaxY && maxy>f_maxy) maxy=f_maxy;
|
||||
//if (m_forceMinY && miny<f_miny) miny=f_miny;
|
||||
//if (m_forceMaxY && maxy>f_maxy) maxy=f_maxy;
|
||||
if (m_forceMinY) miny=f_miny;
|
||||
if (m_forceMaxY) maxy=f_maxy;
|
||||
}
|
||||
|
||||
gGraphView::gGraphView(QWidget *parent, gGraphView * shared) :
|
||||
|
@ -166,6 +166,9 @@ void SummaryChart::paint(gGraph & w,int left, int top, int width, int height)
|
||||
|
||||
EventDataType maxy=m_maxy;
|
||||
EventDataType miny=m_miny;
|
||||
if (m_codes[0]=="HumidSet") {
|
||||
int i=1;
|
||||
}
|
||||
|
||||
w.roundY(miny,maxy);
|
||||
|
||||
|
@ -84,7 +84,8 @@ Overview::Overview(QWidget *parent,Profile * _profile,gGraphView * shared) :
|
||||
set->addSlice("HumidSet",QColor("blue"),ST_SETAVG);
|
||||
set->addSlice("FlexSet",QColor("red"),ST_SETAVG);
|
||||
//set->addSlice("PAPMode",QColor("red"),ST_SETAVG);
|
||||
SET->forceMaxY(6);
|
||||
SET->forceMinY(0);
|
||||
SET->forceMaxY(5);
|
||||
SET->AddLayer(new gYAxis(),LayerLeft,gYAxis::Margin);
|
||||
gx=new gXAxis();
|
||||
gx->setUtcFix(true);
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <QVBoxLayout>
|
||||
#include <QCryptographicHash>
|
||||
#include <QMessageBox>
|
||||
#include <QTimer>
|
||||
#include "ui_profileselect.h"
|
||||
#include "SleepLib/profiles.h"
|
||||
#include "newprofile.h"
|
||||
@ -25,10 +26,11 @@ ProfileSelect::ProfileSelect(QWidget *parent) :
|
||||
|
||||
int i=0;
|
||||
int sel=-1;
|
||||
QString name;
|
||||
for (QHash<QString,Profile *>::iterator p=Profiles::profiles.begin();p!=Profiles::profiles.end();p++) {
|
||||
//str.append(p.key());
|
||||
Profile &profile=**p;
|
||||
QString name=p.key();
|
||||
name=p.key();
|
||||
// if (!profile["FirstName"].toString().isEmpty())
|
||||
// name+=" ("+profile["FirstName"].toString()+" "+profile["LastName"].toString()+")";
|
||||
QStandardItem *item=new QStandardItem(*new QIcon(":/icons/moon.png"),name);
|
||||
@ -46,13 +48,24 @@ ProfileSelect::ProfileSelect(QWidget *parent) :
|
||||
ui->listView->setSelectionMode(QAbstractItemView::SingleSelection);
|
||||
if (sel>=0) ui->listView->setCurrentIndex(model->item(sel)->index());
|
||||
m_tries=0;
|
||||
|
||||
pref["SkipLogin"]=false;
|
||||
if ((i==1) && pref["SkipLogin"].toBool()) {
|
||||
if (!Profiles::profiles.contains(name))
|
||||
pref["Profile"]=name;
|
||||
QTimer::singleShot(0,this,SLOT(earlyExit()));
|
||||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
ProfileSelect::~ProfileSelect()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ProfileSelect::earlyExit()
|
||||
{
|
||||
accept();
|
||||
}
|
||||
void ProfileSelect::on_selectButton_clicked()
|
||||
{
|
||||
on_listView_activated(ui->listView->currentIndex());
|
||||
|
@ -23,6 +23,7 @@ private slots:
|
||||
void on_newProfileButton_clicked();
|
||||
|
||||
void on_listView_activated(const QModelIndex &index);
|
||||
void earlyExit();
|
||||
|
||||
private:
|
||||
Ui::ProfileSelect *ui;
|
||||
|
Loading…
Reference in New Issue
Block a user