From 1146aa369262acc18977b3cfe23c131cf07ad89d Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 25 Dec 2011 21:27:10 +1000 Subject: [PATCH] Beginning of new (hideable) App-Wide Sidebar to replace Welcome screens navigator --- Resources.qrc | 2 + icons/bookmark.png | Bin 0 -> 1145 bytes icons/trophy.png | Bin 0 -> 4575 bytes mainwindow.cpp | 11 + mainwindow.h | 4 + mainwindow.ui | 1237 +++++++++++++++++++++++++++----------------- 6 files changed, 766 insertions(+), 488 deletions(-) create mode 100644 icons/bookmark.png create mode 100644 icons/trophy.png diff --git a/Resources.qrc b/Resources.qrc index 620f8be7..fa8b8520 100644 --- a/Resources.qrc +++ b/Resources.qrc @@ -34,5 +34,7 @@ icons/sheep.png icons/nodata.png icons/cubeoximeter.png + icons/trophy.png + icons/bookmark.png diff --git a/icons/bookmark.png b/icons/bookmark.png new file mode 100644 index 0000000000000000000000000000000000000000..7e9d2da348791631a7af1698acc296622cd4fca3 GIT binary patch literal 1145 zcmV-<1cv*GP)P003YJ1^@s6=)~D-00001b5ch_0Itp) z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2ipu8 z3jqv3G$GRf00a3+L_t(&-tCxQY*S?z#($^hbY*s{IRmmabGi#dgNuU;F&idCQE-`w zT)2)4#bl8L|0IqWE=Zu8iCiq+dEuDcX(W@mgd3xYaxvmf0i#X}89^dbNd?&-+8w%X z?fJY|XxgsrIc-nRSi_ez>G{6*JI{Ha_kExDI|m+)B8GJTPY@avI4r@70yd^BoK8vc zcv5zf!+}Fp<@B4#s+!Q}=WoQWULD>6<2gYtLQDP5otHNC^)<$?Unem;n_-lko6Ee8 zL?D?=UF-2UHO)#V6$^rn;H4Qx)1@LEpM?rOZz4GF*eeR*VcHz%uB!;EyES zaY8fjgbQ#R6<<1C`9^$&y1cna5XX*2A!9X0o z(5(PbKxpuJt~C#QnJ+G)C{J82eJk9}wdRI-dBX<7co>2>8yjT_cIR1sS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l?|l^KPx>td49j{0M@J+{(IBXugV-Hx+ZiKFg(1fOrOJ;J&(}TBB8a0wrprC0<9yk zim%!leIY2Cu+i6>$7>r74qqh!ATr10|8b8323*~^(59XlqP89wd|-0O%h(KSj9~7C zEijA`TX>xRVRPacP_)n#|AK-CYu9pP9ybUkEC4#vxW$-209*iqdDy{}1XqPU)YHPl zkw^YQbm(;mW|WAJx3oIu6nF;^>BxKY4Th&?;c3~*=Yjc{x{NE*YPiUb~MMR33B^CY%h)SbMvAR2<>tD>(#RM~l%p3sl0OXlD!_55vQehbO zGIO6XrZ)(JegFf$@8?pfR33#z)DVEdX*+GF?X;b?(>A&7{{SA`_SXNAjB@}0002ov JPDHLkV1f;4p!om* literal 0 HcmV?d00001 diff --git a/mainwindow.cpp b/mainwindow.cpp index ec75e52c..d41f330b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1830,3 +1830,14 @@ void MainWindow::keyPressEvent(QKeyEvent * event) { qDebug() << "Keypress:" << event->key(); } + +void MainWindow::on_summaryButton_2_clicked() +{ + ui->tabWidget->setCurrentWidget(ui->welcome); + on_summaryButton_clicked(); +} + +void MainWindow::on_action_Sidebar_Toggle_toggled(bool visible) +{ + ui->toolBox->setVisible(visible); +} diff --git a/mainwindow.h b/mainwindow.h index e900884f..853de7c6 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -244,6 +244,10 @@ private slots: + void on_summaryButton_2_clicked(); + + void on_action_Sidebar_Toggle_toggled(bool arg1); + private: Ui::MainWindow *ui; diff --git a/mainwindow.ui b/mainwindow.ui index ecffba90..2ac8239d 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -6,8 +6,8 @@ 0 0 - 668 - 540 + 554 + 443 @@ -44,58 +44,668 @@ - 0 + 4 0 - + - Qt::Vertical + Qt::Horizontal - - - - 0 - 0 - + + + Qt::Vertical - - - 16777215 - 16777215 - - - - true - - - QTabWidget::North - - - 0 - - - false - - - false - - - false - - + 0 0 - - &Welcome + + + 16777215 + 16777215 + + + + true + + + QTabWidget::North + + + 0 + + + false + + + false + + + false + + + + + 0 + 0 + + + + &Summary + + + + 3 + + + 0 + + + + + 0 + + + + + + 0 + 0 + + + + + 0 + 40 + + + + + 16777215 + 40 + + + + QFrame::NoFrame + + + QFrame::Plain + + + + 0 + + + 6 + + + 0 + + + 6 + + + 0 + + + + + ... + + + + :/icons/back.png:/icons/back.png + + + + 24 + 24 + + + + true + + + + + + + ... + + + + :/icons/forward.png:/icons/forward.png + + + + 24 + 24 + + + + true + + + + + + + ... + + + + :/icons/go-home.png:/icons/go-home.png + + + + 24 + 24 + + + + true + + + + + + + Summary + + + + + + + true + + + + + + + + + + + 0 + 0 + + + + + 0 + 200 + + + + + 0 + 200 + + + + + qrc:/docs/index.html + + + + + + + + + + + + true + + + + + + + 140 + 0 + + + + + 140 + 16777215 + + + + + + + + + 129 + 142 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 31 + 237 + + + + + + + + + 129 + 142 + 255 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 31 + 237 + + + + + + + + + 129 + 142 + 255 + + + + + + + 0 + 31 + 237 + + + + + + + 0 + 31 + 237 + + + + + + + + QFrame::Box + + + QFrame::Sunken + + + 1 + + + 1 + + + 1 + + + 0 + + + + + 0 + 0 + 123 + 513 + + + + + + + + + 181 + 194 + 237 + + + + + + + 255 + 255 + 255 + + + + + + + 153 + 186 + 237 + + + + + + + + + 181 + 194 + 237 + + + + + + + 255 + 255 + 255 + + + + + + + 153 + 186 + 237 + + + + + + + + + 181 + 194 + 237 + + + + + + + 153 + 186 + 237 + + + + + + + 153 + 186 + 237 + + + + + + + + true + + + + :/docs/sheep.png:/docs/sheep.png - + + Navigation + + + + + + + 0 + 0 + + + + Summary + + + + :/icons/go-home.png:/icons/go-home.png + + + + 64 + 64 + + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Daily + + + + :/icons/edit-find.png:/icons/edit-find.png + + + + 64 + 64 + + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + + 0 + 0 + + + + Overview + + + + :/icons/overview.png:/icons/overview.png + + + + 64 + 64 + + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + + 0 + 0 + + + + Oximetry + + + + :/icons/oximeter.png:/icons/oximeter.png + + + + 64 + 64 + + + + Qt::ToolButtonTextUnderIcon + + + true + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + Import + + + + :/icons/sdcard.png:/icons/sdcard.png + + + + 64 + 64 + + + + false + + + Qt::ToolButtonTextUnderIcon + + + true + + + Qt::NoArrow + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + splitter + dailyButton + overviewButton + verticalSpacer + oximetryButton + summaryButton_2 + importButton + + + + + 0 + 0 + 138 + 319 + + + + true + + + + :/icons/bookmark.png:/icons/bookmark.png + + + Favourites + + 0 @@ -103,459 +713,94 @@ 0 - - - - 0 - 0 - + + + + + + + + 170 + 170 + 255 + + + + + + + + + 170 + 170 + 255 + + + + + + + + + 0 + 31 + 237 + + + + + + + + + + + + + true + + + + :/icons/trophy.png:/icons/trophy.png + + + Records + + + + 0 + + + 0 + + + + + true + + + true + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Highest AHI</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="foo"><span style=" text-decoration: underline; color:#0000ff;">somedate</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Lowest AHI</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="foo"><span style=" text-decoration: underline; color:#0000ff;">somedate</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Most PB/CSR</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="foo"><span style=" text-decoration: underline; color:#0000ff;">somedate</span></a></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">etc..</p></body></html> + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByMouse - - Qt::Horizontal - - - - - 0 - - - - - - 0 - 0 - - - - - 0 - 40 - - - - - 16777215 - 40 - - - - QFrame::NoFrame - - - QFrame::Plain - - - - 0 - - - 6 - - - 0 - - - 6 - - - 0 - - - - - ... - - - - :/icons/back.png:/icons/back.png - - - - 24 - 24 - - - - true - - - - - - - ... - - - - :/icons/forward.png:/icons/forward.png - - - - 24 - 24 - - - - true - - - - - - - ... - - - - :/icons/go-home.png:/icons/go-home.png - - - - 24 - 24 - - - - true - - - - - - - Summary - - - - - - - true - - - - - - - - - - - 0 - 0 - - - - - 0 - 200 - - - - - 0 - 200 - - - - - qrc:/docs/index.html - - - - - - - - - - 0 - 0 - - - - - 115 - 0 - - - - - 115 - 16777215 - - - - - - - - - 255 - 255 - 255 - - - - - - - 225 - 233 - 255 - - - - - - - - - 255 - 255 - 255 - - - - - - - 225 - 233 - 255 - - - - - - - - - 225 - 233 - 255 - - - - - - - 225 - 233 - 255 - - - - - - - - true - - - QFrame::StyledPanel - - - QFrame::Raised - - - - 0 - - - 0 - - - 0 - - - 0 - - - 4 - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 90 - - - - Import - - - - :/icons/sdcard.png:/icons/sdcard.png - - - - 64 - 64 - - - - false - - - Qt::ToolButtonTextUnderIcon - - - true - - - Qt::NoArrow - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 16777215 - 90 - - - - Daily - - - - :/icons/edit-find.png:/icons/edit-find.png - - - - 64 - 64 - - - - Qt::ToolButtonTextUnderIcon - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 90 - - - - Overview - - - - :/icons/overview.png:/icons/overview.png - - - - 64 - 64 - - - - Qt::ToolButtonTextUnderIcon - - - true - - - - - - - - 0 - 0 - - - - - 16777215 - 90 - - - - Oximetry - - - - :/icons/oximeter.png:/icons/oximeter.png - - - - 64 - 64 - - - - Qt::ToolButtonTextUnderIcon - - - true - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - true - @@ -566,7 +811,7 @@ 0 0 - 668 + 554 25 @@ -605,6 +850,8 @@ + + @@ -813,6 +1060,20 @@ All data for current CPAP machine + + + true + + + true + + + Right &Sidebar + + + F8 + +