mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 10:40:42 +00:00
Common vertex array, plus more font cleanup
This commit is contained in:
parent
f00e18fb11
commit
f51982388b
@ -52,8 +52,9 @@ void gCandleStick::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
|
||||
QColor col2=QColor("light grey");
|
||||
QColor c(0,0,0,255);
|
||||
QString str;
|
||||
QString str,st;
|
||||
QRect rect;
|
||||
|
||||
//Qt::AlignmDirection dir;
|
||||
|
||||
glLineWidth(1);
|
||||
@ -98,9 +99,7 @@ void gCandleStick::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
if ((int)m_names.size()>i) {
|
||||
// str=m_names[i]+" ";
|
||||
}
|
||||
QString st;
|
||||
st.sprintf("%0.1f",data->point[0][i].x());
|
||||
str+=st;
|
||||
str+=st.sprintf("%0.1f",data->point[0][i].x());
|
||||
GetTextExtent(str, x, y);
|
||||
//x+=5;
|
||||
if (t2>x+5) {
|
||||
|
@ -82,12 +82,12 @@ void gFlagsLine::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
glVertex2f(start_px+width-1, line_top);
|
||||
glEnd();
|
||||
|
||||
const int maxverts=65536;
|
||||
int vertcnt=0;
|
||||
static GLshort vertarray[maxverts+8];
|
||||
int quadcnt=0;
|
||||
static GLshort quadarray[maxverts+8];
|
||||
|
||||
qint32 vertcnt=0;
|
||||
GLshort * vertarray=vertex_array[0];
|
||||
qint32 quadcnt=0;
|
||||
GLshort * quadarray=vertex_array[1];
|
||||
assert(vertarray!=NULL);
|
||||
assert(quadarray!=NULL);
|
||||
|
||||
// Draw text label
|
||||
float x,y;
|
||||
|
@ -84,9 +84,9 @@ void gLineChart::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
QColor & col=color[0];
|
||||
// Selected the plot line color
|
||||
|
||||
const long maxverts=65536*4; // Resolution dependant..
|
||||
long vertcnt=0;
|
||||
static GLshort vertarray[maxverts+8];
|
||||
qint32 vertcnt=0;
|
||||
GLshort * vertarray=vertex_array[0];
|
||||
assert(vertarray!=NULL);
|
||||
|
||||
float lastpx,lastpy;
|
||||
float px,py;
|
||||
|
@ -58,13 +58,15 @@ void gLineOverlayBar::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
glScissor(w.GetLeftMargin(),w.GetBottomMargin(),width,height);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
|
||||
const int maxverts=65536;
|
||||
int vertcnt=0;
|
||||
static GLshort vertarray[maxverts+8];
|
||||
int pointcnt=0;
|
||||
static GLshort pointarray[maxverts+8];
|
||||
int quadcnt=0;
|
||||
static GLshort quadarray[maxverts+8];
|
||||
qint32 vertcnt=0;
|
||||
GLshort * vertarray=vertex_array[0];
|
||||
qint32 pointcnt=0;
|
||||
GLshort * pointarray=vertex_array[1];
|
||||
qint32 quadcnt=0;
|
||||
GLshort * quadarray=vertex_array[2];
|
||||
assert(vertarray!=NULL);
|
||||
assert(quadarray!=NULL);
|
||||
assert(pointarray!=NULL);
|
||||
|
||||
float bottom=start_py+25, top=start_py+height-25;
|
||||
QColor & col=color[0];
|
||||
|
@ -103,9 +103,9 @@ void gXAxis::Plot(gGraphWindow & w,float scrx,float scry)
|
||||
|
||||
py=w.GetBottomMargin();
|
||||
|
||||
const int maxverts=4096;
|
||||
int vertcnt=0;
|
||||
static GLshort vertarray[maxverts+4];
|
||||
qint32 vertcnt=0;
|
||||
GLshort * vertarray=vertex_array[0];
|
||||
assert(vertarray!=NULL);
|
||||
|
||||
if (m_show_minor_ticks) {
|
||||
for (double i=st3; i<=maxx; i+=min_tick/10.0) {
|
||||
|
@ -62,9 +62,9 @@ void gYAxis::Plot(gGraphWindow &w,float scrx,float scry)
|
||||
|
||||
float ty,h;
|
||||
|
||||
const int maxverts=4096;
|
||||
int vertcnt=0;
|
||||
static GLshort vertarray[maxverts+4];
|
||||
qint32 vertcnt=0;
|
||||
GLshort * vertarray=vertex_array[0];
|
||||
assert(vertarray!=NULL);
|
||||
|
||||
glColor4ub(linecol1.red(),linecol1.green(),linecol1.blue(),linecol1.alpha());
|
||||
glLineWidth(1);
|
||||
|
@ -10,30 +10,39 @@
|
||||
#include "glcommon.h"
|
||||
#include "SleepLib/profiles.h"
|
||||
#include <QFile>
|
||||
bool _font_init=false;
|
||||
|
||||
QFont * defaultfont;
|
||||
QFont * mediumfont;
|
||||
QFont * bigfont;
|
||||
bool _graph_init=false;
|
||||
|
||||
QFont * defaultfont=NULL;
|
||||
QFont * mediumfont=NULL;
|
||||
QFont * bigfont=NULL;
|
||||
|
||||
GLshort *vertex_array[num_vert_arrays]={NULL};
|
||||
|
||||
// Must be called from a thread inside the application.
|
||||
void InitFonts()
|
||||
void InitGraphs()
|
||||
{
|
||||
if (!_font_init) {
|
||||
if (!_graph_init) {
|
||||
|
||||
defaultfont=new QFont("FreeSans",10);
|
||||
bigfont=new QFont("FreeSans",35);
|
||||
mediumfont=new QFont("FreeSans",18);
|
||||
|
||||
_font_init=true;
|
||||
for (int i=0;i<num_vert_arrays;i++) {
|
||||
vertex_array[i]=new GLshort[maxverts];
|
||||
}
|
||||
_graph_init=true;
|
||||
}
|
||||
}
|
||||
void DoneFonts()
|
||||
void DoneGraphs()
|
||||
{
|
||||
if (_font_init) {
|
||||
if (_graph_init) {
|
||||
delete defaultfont;
|
||||
delete bigfont;
|
||||
delete mediumfont;
|
||||
_font_init=false;
|
||||
for (int i=0;i<num_vert_arrays;i++) {
|
||||
delete [] vertex_array[i];
|
||||
}
|
||||
_graph_init=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -12,13 +12,17 @@
|
||||
#include <QtOpenGL/qgl.h>
|
||||
#include "Graphs/graphwindow.h"
|
||||
|
||||
void InitFonts();
|
||||
void DoneFonts();
|
||||
void InitGraphs();
|
||||
void DoneGraphs();
|
||||
|
||||
extern QFont * defaultfont;
|
||||
extern QFont * mediumfont;
|
||||
extern QFont * bigfont;
|
||||
|
||||
const int num_vert_arrays=4;
|
||||
const qint32 maxverts=65536*4; // Resolution dependant..
|
||||
extern GLshort *vertex_array[num_vert_arrays];
|
||||
|
||||
|
||||
class gGraphWindow;
|
||||
void GetTextExtent(QString text, float & width, float & height, QFont *font=defaultfont);
|
||||
|
@ -31,7 +31,7 @@ void WaveData::Reload(Day *day)
|
||||
bool first=true;
|
||||
int chunk=0;
|
||||
for (vector<Session *>::iterator s=day->begin();s!=day->end(); s++) {
|
||||
qDebug("Processing waveform chunk %i",chunk++);
|
||||
//qDebug("Processing waveform chunk %i",chunk++);
|
||||
if ((*s)->waveforms.find(code)==(*s)->waveforms.end()) continue;
|
||||
for (vector<Waveform *>::iterator l=(*s)->waveforms[code].begin();l!=(*s)->waveforms[code].end();l++) {
|
||||
int ps=point.size();
|
||||
@ -43,7 +43,7 @@ void WaveData::Reload(Day *day)
|
||||
Waveform *w=(*l);
|
||||
double st=w->start().toMSecsSinceEpoch()/86400000.0;
|
||||
double rate=(w->duration()/w->samples())/86400.0;
|
||||
qDebug("Waveform Chunk contains %i samples",w->samples());
|
||||
//qDebug("Waveform Chunk contains %i samples",w->samples());
|
||||
for (int i=0;i<w->samples();i++) {
|
||||
QPointD r(st,(*w)[i]);
|
||||
st+=rate;
|
||||
|
@ -707,7 +707,7 @@ void gGraphWindow::paintGL()
|
||||
if (m_scrX<=0) return;
|
||||
if (m_scrY<=0) return;
|
||||
|
||||
InitFonts();
|
||||
InitGraphs();
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
Render(m_scrX,m_scrY);
|
||||
|
||||
|
@ -279,7 +279,7 @@ Day *Machine::AddSession(Session *s,Profile *p)
|
||||
}
|
||||
if (day.find(date)==day.end()) {
|
||||
QString dstr=date.toString("yyyyMMdd");
|
||||
qDebug("Adding Profile Day %s",dstr.toAscii().data());
|
||||
//qDebug("Adding Profile Day %s",dstr.toAscii().data());
|
||||
day[date]=new Day(this);
|
||||
// Add this Day record to profile
|
||||
p->AddDay(date.date(),day[date],m_type);
|
||||
|
@ -258,7 +258,7 @@ bool Preferences::Save(QString filename)
|
||||
if (type==QVariant::Invalid) continue;
|
||||
|
||||
msg=new TiXmlElement(i->first.toLatin1());
|
||||
qDebug(i->first.toLatin1());
|
||||
//qDebug(i->first.toLatin1());
|
||||
msg->SetAttribute("type",i->second.typeName());
|
||||
QString t;
|
||||
|
||||
|
@ -100,7 +100,7 @@ void Profile::ExtraLoad(TiXmlHandle *root)
|
||||
TiXmlElement *elem;
|
||||
elem=root->FirstChild("Machines").FirstChild().Element();
|
||||
if (!elem) {
|
||||
qDebug("ExtraLoad: Elem is empty.");
|
||||
// qDebug("ExtraLoad: Elem is empty.");
|
||||
}
|
||||
for(; elem; elem=elem->NextSiblingElement()) {
|
||||
QString pKey=elem->Value();
|
||||
|
@ -274,7 +274,7 @@ bool Session::Store(QString path)
|
||||
QString base;
|
||||
base.sprintf("%08lx",s_session);
|
||||
base=path+"/"+base;
|
||||
qDebug(("Storing Session: "+base).toLatin1());
|
||||
//qDebug(("Storing Session: "+base).toLatin1());
|
||||
bool a,b,c;
|
||||
a=StoreSummary(base+".000"); // if actually has events
|
||||
if (events.size()>0) b=StoreEvents(base+".001");
|
||||
@ -356,7 +356,8 @@ bool Session::StoreSummary(QString filename)
|
||||
}
|
||||
bool Session::LoadSummary(QString filename)
|
||||
{
|
||||
qDebug(("Loading Summary "+filename).toLatin1());
|
||||
if (filename.isEmpty()) return false;
|
||||
//qDebug(("Loading Summary "+filename).toLatin1());
|
||||
BinaryFile f;
|
||||
if (!f.Open(filename,BF_READ)) {
|
||||
qDebug(("Couldn't open file"+filename).toLatin1());
|
||||
@ -492,9 +493,10 @@ bool Session::StoreEvents(QString filename)
|
||||
}
|
||||
bool Session::LoadEvents(QString filename)
|
||||
{
|
||||
if (filename.isEmpty()) return false;
|
||||
BinaryFile f;
|
||||
if (!f.Open(filename,BF_READ)) {
|
||||
qDebug(("Couldn't open file"+filename).toLatin1());
|
||||
qDebug(("Couldn't open events file"+filename).toLatin1());
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -629,9 +631,11 @@ bool Session::StoreWaveforms(QString filename)
|
||||
|
||||
bool Session::LoadWaveforms(QString filename)
|
||||
{
|
||||
if (filename.isEmpty()) return false;
|
||||
|
||||
BinaryFile f;
|
||||
if (!f.Open(filename,BF_READ)) {
|
||||
qDebug(("Couldn't open file "+filename).toLatin1());
|
||||
qDebug(("Couldn't open waveform file "+filename).toLatin1());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
20
daily.cpp
20
daily.cpp
@ -257,7 +257,7 @@ Daily::Daily(QWidget *parent,QGLContext *context) :
|
||||
ui->calendar->setWeekdayTextFormat(Qt::Saturday, format);
|
||||
ui->calendar->setWeekdayTextFormat(Qt::Sunday, format);
|
||||
|
||||
ui->tabWidget->setCurrentWidget(ui->info);
|
||||
ui->tabWidget->setCurrentWidget(ui->details);
|
||||
ReloadGraphs();
|
||||
}
|
||||
|
||||
@ -383,7 +383,9 @@ void Daily::Load(QDate date)
|
||||
Day *oxi=profile->GetDay(date,MT_OXIMETER);
|
||||
Day *sleepstage=profile->GetDay(date,MT_SLEEPSTAGE);
|
||||
|
||||
QString html="<html><body leftmargin=0 rightmargin=0 topmargin=0 marginwidth=0 marginheight=0>";
|
||||
QString html="<html><head><style type='text/css'>p,a,td,body { font-family: 'FreeSans', 'Sans Serif'; } p,a,td,body { font-size: 12px; } </style>";
|
||||
html+="</head>";
|
||||
html+="<body leftmargin=0 rightmargin=0 topmargin=0 marginwidth=0 marginheight=0>";
|
||||
html+="<table cellspacing=0 cellpadding=2 border=0 width='100%'>\n";
|
||||
QString tmp;
|
||||
|
||||
@ -791,3 +793,17 @@ void Daily::on_treeWidget_itemSelectionChanged()
|
||||
SNORE->SetXBounds(st,et);
|
||||
}
|
||||
}
|
||||
|
||||
void Daily::on_JournalNotesUnderline_clicked()
|
||||
{
|
||||
QTextCursor cursor = ui->JournalNotes->textCursor();
|
||||
if (!cursor.hasSelection())
|
||||
cursor.select(QTextCursor::WordUnderCursor);
|
||||
|
||||
QTextCharFormat format=cursor.charFormat();
|
||||
|
||||
format.setFontUnderline(!format.fontUnderline());
|
||||
|
||||
cursor.mergeCharFormat(format);
|
||||
//ui->JournalNotes->mergeCurrentCharFormat(format);
|
||||
}
|
||||
|
2
daily.h
2
daily.h
@ -45,6 +45,8 @@ private slots:
|
||||
|
||||
void on_treeWidget_itemSelectionChanged();
|
||||
|
||||
void on_JournalNotesUnderline_clicked();
|
||||
|
||||
private:
|
||||
Session * CreateJournalSession(QDate date);
|
||||
Session * GetJournalSession(QDate date);
|
||||
|
659
daily.ui
659
daily.ui
@ -63,7 +63,7 @@
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Sans Serif</family>
|
||||
<pointsize>9</pointsize>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="firstDayOfWeek">
|
||||
@ -95,9 +95,9 @@
|
||||
<property name="movable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="info">
|
||||
<widget class="QWidget" name="details">
|
||||
<attribute name="title">
|
||||
<string>Information</string>
|
||||
<string>Details</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
@ -185,6 +185,128 @@
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Journal</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="JournalNotesFontsize">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>85</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Small</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Medium</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Big</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="JournalNotesColour">
|
||||
<property name="text">
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="JournalNotesItalic">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> i </string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+I</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="JournalNotesUnderline">
|
||||
<property name="font">
|
||||
<font>
|
||||
<underline>true</underline>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>U</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="JournalNotesBold">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>B</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+B</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="JournalNotes"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="extras">
|
||||
<attribute name="title">
|
||||
<string>Extras</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_13">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_11">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
@ -294,512 +416,33 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::AllEditTriggers</set>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Notes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="JournalNotesFontsize">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>85</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QComboBox::AdjustToContents</enum>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Small</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Medium</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Big</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="JournalNotesColour">
|
||||
<property name="palette">
|
||||
<palette>
|
||||
<active>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Button">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Light">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>127</green>
|
||||
<blue>127</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Midlight">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>63</green>
|
||||
<blue>63</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Dark">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>127</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Mid">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>170</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="BrightText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="AlternateBase">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>127</green>
|
||||
<blue>127</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ToolTipBase">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>220</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ToolTipText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</active>
|
||||
<inactive>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Button">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Light">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>127</green>
|
||||
<blue>127</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Midlight">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>63</green>
|
||||
<blue>63</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Dark">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>127</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Mid">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>170</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="BrightText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="AlternateBase">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>127</green>
|
||||
<blue>127</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ToolTipBase">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>220</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ToolTipText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</inactive>
|
||||
<disabled>
|
||||
<colorrole role="WindowText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>127</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Button">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Light">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>127</green>
|
||||
<blue>127</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Midlight">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>63</green>
|
||||
<blue>63</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Dark">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>127</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Mid">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>170</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Text">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>127</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="BrightText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ButtonText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>127</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Base">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Window">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="Shadow">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="AlternateBase">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ToolTipBase">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>220</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
<colorrole role="ToolTipText">
|
||||
<brush brushstyle="SolidPattern">
|
||||
<color alpha="255">
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
</color>
|
||||
</brush>
|
||||
</colorrole>
|
||||
</disabled>
|
||||
</palette>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="JournalNotesItalic">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> i </string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+I</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="JournalNotesBold">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>B</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+B</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="JournalNotes"/>
|
||||
</item>
|
||||
</layout>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="rowCount">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<row/>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Medication</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Time</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Dose</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
|
@ -1,23 +1,27 @@
|
||||
<html>
|
||||
<body leftmargin=6 topmargin=0 rightmargin=6>
|
||||
<table width="100%" cellspacing=0 cellpadding=6 border=0 >
|
||||
<tr><td bgcolor="#d0d0d0" colspan=2 cellpadding=6 >
|
||||
<div align=center><font color="black" size=+3>Welcome to SleepyHead</font></div>
|
||||
<head>
|
||||
<style type='text/css'>
|
||||
h1,p,a,td,body { font-family: 'FreeSans', 'Sans Serif' }
|
||||
p,a,td,body { font-size: 14px }
|
||||
</style>
|
||||
</head>
|
||||
<body leftmargin=0 topmargin=0 rightmargin=0>
|
||||
<table width="100%" cellspacing=0 cellpadding=0 border=0 >
|
||||
<tr><td bgcolor="#d0d0d0" colspan=2 cellpadding=6 valign=center align=center>
|
||||
<font color="black"><h2>Welcome to SleepyHead</h2></font>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<td valign="top" cellpadding=6>
|
||||
<p>This software assists you in reviewing data at home for your CPAP Machine, Oximeter, Sleep Stage monitors, as well as help you track general issues related to sleep health.</p>
|
||||
<p>Currenly supports the following machines:</p>
|
||||
<li>Philips Respironics System One</li>
|
||||
<li>Contec CMS50 Oximeters</li>
|
||||
<p><b>Project Website:</b> <a href='http://sleepyhead.sourceforge.net'>http://sleepyhead.sourceforge.net</a></p>
|
||||
<p><b>About Sleep Apnea:</b> <a href='http://en.wikipedia.org/wiki/Sleep_apnea'>http://en.wikipedia.org/wiki/Sleep_apnea</a></p>
|
||||
<p><b>CPAPTalk Forum:</b> <a href='http://www.cpaptalk.com'>http://www.cpaptalk.com</a></p>
|
||||
<p><b>Project Website:</b> <a href='http://sleepyhead.sourceforge.net'>http://sleepyhead.sourceforge.net</a><br>
|
||||
<b>About Sleep Apnea:</b> <a href='http://en.wikipedia.org/wiki/Sleep_apnea'>http://en.wikipedia.org/wiki/Sleep_apnea</a><br>
|
||||
<b>CPAPTalk Forum:</b> <a href='http://www.cpaptalk.com'>http://www.cpaptalk.com</a></p>
|
||||
</td>
|
||||
<td><image src='qrc:/docs/sheep.png' width=220 height=220><br/>
|
||||
<div align=center>This is a temporary logo<br/>
|
||||
(from OpenClipart.org)
|
||||
</div>
|
||||
<div align=center>This is a temporary logo</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
11
main.cpp
11
main.cpp
@ -7,6 +7,7 @@
|
||||
//#include <QtPlugin>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QFontDatabase>
|
||||
#include <QStringList>
|
||||
#include "mainwindow.h"
|
||||
#include "SleepLib/profiles.h"
|
||||
|
||||
@ -21,8 +22,14 @@ int main(int argc, char *argv[])
|
||||
QApplication a(argc, argv);
|
||||
|
||||
a.setApplicationName("SleepyHead");
|
||||
QFontDatabase::addApplicationFont(":/fonts/freesans.ttf");
|
||||
a.setFont(QFont("FreeSans"));
|
||||
int id=QFontDatabase::addApplicationFont(":/fonts/FreeSans.ttf");
|
||||
QStringList ffam=QFontDatabase::applicationFontFamilies(id);
|
||||
for (QStringList::iterator i=ffam.begin();i!=ffam.end();i++) {
|
||||
qDebug(("Loaded Font: "+*i).toLatin1());
|
||||
}
|
||||
|
||||
a.setFont(QFont("FreeSans",10));
|
||||
|
||||
PRS1Loader::Register();
|
||||
CMS50Loader::Register();
|
||||
ZEOLoader::Register();
|
||||
|
@ -73,7 +73,7 @@ MainWindow::~MainWindow()
|
||||
overview->close();
|
||||
delete overview;
|
||||
}
|
||||
DoneFonts();
|
||||
DoneGraphs();
|
||||
delete ui;
|
||||
Profiles::Done();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user