mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 04:00:44 +00:00
Double clicking graph title now toggles pin status, removed bottom pin buttons
This commit is contained in:
parent
eb7a696af4
commit
3a680a5384
@ -3991,7 +3991,11 @@ void gGraphView::mouseDoubleClickEvent(QMouseEvent * event)
|
|||||||
if ((y >= py) && (y <= py + h)) {
|
if ((y >= py) && (y <= py + h)) {
|
||||||
if (x < titleWidth) {
|
if (x < titleWidth) {
|
||||||
// What to do when double clicked on the graph title ??
|
// What to do when double clicked on the graph title ??
|
||||||
|
|
||||||
m_graphs[i]->mouseDoubleClickEvent(event);
|
m_graphs[i]->mouseDoubleClickEvent(event);
|
||||||
|
// pin the graph??
|
||||||
|
m_graphs[i]->setPinned(false);
|
||||||
|
redraw();
|
||||||
} else {
|
} else {
|
||||||
// send event to graph..
|
// send event to graph..
|
||||||
m_graphs[i]->mouseDoubleClickEvent(event);
|
m_graphs[i]->mouseDoubleClickEvent(event);
|
||||||
@ -4025,6 +4029,9 @@ void gGraphView::mouseDoubleClickEvent(QMouseEvent * event)
|
|||||||
if (x < titleWidth) {
|
if (x < titleWidth) {
|
||||||
// What to do when double clicked on the graph title ??
|
// What to do when double clicked on the graph title ??
|
||||||
m_graphs[i]->mouseDoubleClickEvent(event);
|
m_graphs[i]->mouseDoubleClickEvent(event);
|
||||||
|
|
||||||
|
m_graphs[i]->setPinned(true);
|
||||||
|
redraw();
|
||||||
} else {
|
} else {
|
||||||
// send event to graph..
|
// send event to graph..
|
||||||
m_graphs[i]->mouseDoubleClickEvent(event);
|
m_graphs[i]->mouseDoubleClickEvent(event);
|
||||||
|
@ -121,7 +121,6 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
|||||||
SF=new gGraph(GraphView,STR_TR_EventFlags,STR_TR_EventFlags,default_height);
|
SF=new gGraph(GraphView,STR_TR_EventFlags,STR_TR_EventFlags,default_height);
|
||||||
|
|
||||||
SF->setPinned(true);
|
SF->setPinned(true);
|
||||||
ui->pinFlagsButton->setChecked(true);
|
|
||||||
FRW=new gGraph(GraphView,STR_TR_FlowRate, schema::channel[CPAP_FlowRate].fullname()+"\n"+schema::channel[CPAP_FlowRate].description()+"\n("+schema::channel[CPAP_FlowRate].units()+")",default_height);
|
FRW=new gGraph(GraphView,STR_TR_FlowRate, schema::channel[CPAP_FlowRate].fullname()+"\n"+schema::channel[CPAP_FlowRate].description()+"\n("+schema::channel[CPAP_FlowRate].units()+")",default_height);
|
||||||
//FRW->setPinned(true);
|
//FRW->setPinned(true);
|
||||||
|
|
||||||
@ -365,9 +364,6 @@ Daily::Daily(QWidget *parent,gGraphView * shared)
|
|||||||
|
|
||||||
GraphView->LoadSettings("Daily");
|
GraphView->LoadSettings("Daily");
|
||||||
|
|
||||||
ui->pinFlowButton->setChecked(FRW->isPinned());
|
|
||||||
ui->pinFlagsButton->setChecked(SF->isPinned());
|
|
||||||
|
|
||||||
icon_on=new QIcon(":/icons/session-on.png");
|
icon_on=new QIcon(":/icons/session-on.png");
|
||||||
icon_off=new QIcon(":/icons/session-off.png");
|
icon_off=new QIcon(":/icons/session-off.png");
|
||||||
|
|
||||||
@ -2162,15 +2158,3 @@ void Daily::on_resetLayoutButton_clicked()
|
|||||||
{
|
{
|
||||||
GraphView->resetLayout();
|
GraphView->resetLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Daily::on_pinFlagsButton_toggled(bool checked)
|
|
||||||
{
|
|
||||||
SF->setPinned(checked);
|
|
||||||
GraphView->redraw();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Daily::on_pinFlowButton_toggled(bool checked)
|
|
||||||
{
|
|
||||||
FRW->setPinned(checked);
|
|
||||||
GraphView->redraw();
|
|
||||||
}
|
|
||||||
|
@ -249,10 +249,6 @@ private slots:
|
|||||||
|
|
||||||
void doToggleSession(Session *);
|
void doToggleSession(Session *);
|
||||||
|
|
||||||
void on_pinFlagsButton_toggled(bool checked);
|
|
||||||
|
|
||||||
void on_pinFlowButton_toggled(bool checked);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1052,26 +1052,6 @@ QToolButton:pressed {
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pinFlagsButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Pin Flags</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pinFlowButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Pin Flow</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="sessionBarLayout">
|
<layout class="QHBoxLayout" name="sessionBarLayout">
|
||||||
<property name="sizeConstraint">
|
<property name="sizeConstraint">
|
||||||
|
@ -270,6 +270,7 @@ Overview::Overview(QWidget *parent,gGraphView * shared) :
|
|||||||
// <--- The code to the previous marker is crap
|
// <--- The code to the previous marker is crap
|
||||||
|
|
||||||
GraphView->LoadSettings("Overview"); //no trans
|
GraphView->LoadSettings("Overview"); //no trans
|
||||||
|
AHI->setPinned(false);
|
||||||
ui->rangeCombo->setCurrentIndex(6);
|
ui->rangeCombo->setCurrentIndex(6);
|
||||||
icon_on=new QIcon(":/icons/session-on.png");
|
icon_on=new QIcon(":/icons/session-on.png");
|
||||||
icon_off=new QIcon(":/icons/session-off.png");
|
icon_off=new QIcon(":/icons/session-off.png");
|
||||||
|
Loading…
Reference in New Issue
Block a user