Put a reusable label in the bar beneath graphs

This commit is contained in:
Mark Watkins 2013-10-12 18:07:57 +10:00
parent 4b0a40a825
commit db76ce1a64
3 changed files with 8 additions and 4 deletions

View File

@ -66,13 +66,15 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
layout->setMargin(0);
layout->setContentsMargins(0,0,0,0);
dateDisplay=new QLabel("",this);
dateDisplay->setAlignment(Qt::AlignCenter);
dateDisplay->setTextFormat(Qt::RichText);
ui->sessionBarLayout->addWidget(dateDisplay,1);
// const bool sessbar_under_graphs=false;
// if (sessbar_under_graphs) {
// ui->sessionBarLayout->addWidget(sessbar,1);
// } else {
// QLabel *label=new QLabel("The session bar could go here instead??",this);
// label->setAlignment(Qt::AlignCenter);
// ui->sessionBarLayout->addWidget(label,1);
// ui->splitter->insertWidget(2,sessbar);
// sessbar->setMaximumHeight(sessbar->height());
// sessbar->setMinimumHeight(sessbar->height());
@ -728,6 +730,7 @@ MyWebView::MyWebView(QWidget *parent):
void Daily::Load(QDate date)
{
dateDisplay->setText("<i>"+date.toString(Qt::SystemLocaleLongDate)+"</i>");
static Day * lastcpapday=NULL;
previous_date=date;
Day *cpap=PROFILE.GetDay(date,MT_CPAP);

View File

@ -320,6 +320,7 @@ private:
QIcon * icon_off;
SessionBar * sessbar;
QLabel * dateDisplay;
MyWebView * webView;

View File

@ -753,7 +753,7 @@
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
<enum>QFrame::Sunken</enum>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">