From 6d921bbbe3033cfd2035dee0d5a3522299779c45 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Mon, 26 Dec 2011 02:19:08 +1000 Subject: [PATCH] Separated Summary from Welcome into it's own tab, welcome has become Help Browser. --- Resources.qrc | 1 + icons/help.png | Bin 0 -> 4362 bytes mainwindow.cpp | 29 +++++++++------ mainwindow.h | 7 ++-- mainwindow.ui | 99 +++++++++++++++++++++++++++++++++++++------------ 5 files changed, 98 insertions(+), 38 deletions(-) create mode 100644 icons/help.png diff --git a/Resources.qrc b/Resources.qrc index fa8b8520..222c5993 100644 --- a/Resources.qrc +++ b/Resources.qrc @@ -36,5 +36,6 @@ icons/cubeoximeter.png icons/trophy.png icons/bookmark.png + icons/help.png diff --git a/icons/help.png b/icons/help.png new file mode 100644 index 0000000000000000000000000000000000000000..10b8d03b3397fd2d856d4ab7ac625b52176a1f81 GIT binary patch literal 4362 zcmV+l5%ungP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2ipu8 z4>>FKsDPgU01%2vL_t(|+U=TqbX3*7$G^Y5&zZ^O4F&=tmGCB@2&4pgHh2Z);j*qS zZhN)&s;$fGt+ZW2xp<*1F7Z{X*GkbAO096^igMSg)umU9308psk$^Q40*atO3rU#C zOlBrCXYb$rtaVoQd1TK1e)jLTAHUxQzC8YaAM|;A`Yp+GltXXhheKllpal)5VKAmvQ!63rBb|F+#gK%{ z{PlqcN`pWB>A$dL{Rl)Qp1E^TaOa(HS5$N>GVOIY?^wr=Bk=t5@NeA;?ehV^4gf1h z0`LA!0le_S3vxnp^RIdGwd>2C5Ff2K}ksohzR8OLmWB;FsB!E5v|W@-sxy;M9YH@ zB6{WwXz<|edd!&H#_!x2=u-e6+;`s-ylBx6*zHD9Q4tCX3X-0SBS#>PAMX|4PuKcM z_lUre2z)QTh_-Ki3kZkX=(X3b9{=2PAM^=;#x-j;s+(^5E(?L;;$r0H<|aL7W;Yg`dHOkTj6@`HG3>i5pW^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#ZWB_j9GRe_t5@@SHio{SS0;g=FBAoE3I{JrqLAiWU3j)YMF)lzmqh1ONaHTej@v zNt5QJ8KcueU}mt_2jhb0>J{(2|}Y z#5=u61a$Y^pabvXGfYvtFPD_S{ronFf`SwP$uLrn;OnnHJ$2c#ZWm}5oUd0@R0IpW z-idVTRHzHRbe+*d5B0uy0NmURwf>iBGs8~j*Jb^%Z(m(c;xn> zrxX^Bq9sdIuK)mm!)w-zwkA)mH%E`oO(m}1d=u7VkJ-W;(dh(dAwH?>Y``upMbXBM zpxoS~4U(O)QH5}A?Z>=#@92sR8!i~(%6g%4VAZP2T~nvlyT*;{XBc)=N*_H6YwcPf z8tqX$Qp9BpBITavrkjv=%PmP32msM&6u~`vK8pB!6Q+#0{zdy;`ktv7_#V5ThB??!sh7p^aD5Ve%g%EuG^_QnEUw%VYnWl?b zr@yyq)qVPvSC-}t9N5pe?6TxOAw_U1h@Qk}@?2ha848vzMK}^cxVc#etE*Q{TfO?> ztW#|l8>~1442%Nn&98jr8wGRbz!)^Bd%-D|kt(h`%Se5fEenB$24Ln)HYZFts=eNY zQ@;1TW1lJ4*jrJXy};E(^l(mj`Rx2@)8HO8%HCL&&MngTKP~_Q0IWa&{(}c`e)n#+ z0)am;@RRF-_bw{g+S|d)eZX`L+#v@J{KvwXGd;NzC&C;uq|3009>gbFi4KPmXlQ_U z?_LBO8vK^l|096)^Ah5EUnl_ahz?MwfrS8Wq{6}lx#P#@d&Z1`Sy~FSv=qiAmw<%m zbPHx!UN0=K7m=101dkm<@bF=TPMm1fTE9WS%i50SwD)Sd{qx9M)&Pb9jAvjffJqt{ zO29A%auX*x09x7J%KD)O>KUl_0`-Xjj4zKbkKR5056LEXWd1026#xJL07*qoM6N<$ EftabWidget->insertTab(1,daily,STR_TR_Daily); - // Start with the Welcome Tab - ui->tabWidget->setCurrentWidget(ui->welcome); // setting this to daily shows the cube during loading.. + // Start with the Summary Tab + ui->tabWidget->setCurrentWidget(ui->summaryTab); // setting this to daily shows the cube during loading.. // Nifty Notification popups in System Tray (uses Growl on Mac) if (QSystemTrayIcon::isSystemTrayAvailable() && QSystemTrayIcon::supportsMessages()) { @@ -224,7 +224,7 @@ void MainWindow::Startup() } - ui->tabWidget->setCurrentWidget(ui->welcome); + ui->tabWidget->setCurrentWidget(ui->summaryTab); if (daily) daily->ReloadGraphs(); if (overview) overview->ReloadGraphs(); qprogress->hide(); @@ -351,11 +351,6 @@ QMenu * MainWindow::CreateMenu(QString title) return menu; } -void MainWindow::on_actionView_Welcome_triggered() -{ - ui->tabWidget->setCurrentWidget(ui->welcome); -} - void MainWindow::on_action_Fullscreen_triggered() { if (ui->action_Fullscreen->isChecked()) @@ -1004,7 +999,7 @@ void MainWindow::on_summaryButton_clicked() html+=""; } html+=htmlFooter(); - ui->webView->setHtml(html); + ui->summaryView->setHtml(html); // QString file="qrc:/docs/index.html"; // QUrl url(file); // ui->webView->setUrl(url); @@ -1250,13 +1245,13 @@ void MainWindow::on_actionExp_ort_triggered() void MainWindow::on_actionOnline_Users_Guide_triggered() { ui->webView->load(QUrl("http://sourceforge.net/apps/mediawiki/sleepyhead/index.php?title=SleepyHead_Users_Guide")); - ui->tabWidget->setCurrentIndex(0); + ui->tabWidget->setCurrentWidget(ui->helpTab); } void MainWindow::on_action_Frequently_Asked_Questions_triggered() { ui->webView->load(QUrl("http://sourceforge.net/apps/mediawiki/sleepyhead/index.php?title=Frequently_Asked_Questions")); - ui->tabWidget->setCurrentIndex(0); + ui->tabWidget->setCurrentWidget(ui->helpTab); } void MainWindow::PrintReport(gGraphView *gv,QString name, QDate date) @@ -1950,7 +1945,7 @@ void MainWindow::keyPressEvent(QKeyEvent * event) void MainWindow::on_summaryButton_2_clicked() { - ui->tabWidget->setCurrentWidget(ui->welcome); + ui->tabWidget->setCurrentWidget(ui->summaryTab); on_summaryButton_clicked(); } @@ -1979,3 +1974,13 @@ void MainWindow::on_recordsBox_linkClicked(const QUrl &linkurl) } } + +void MainWindow::on_helpButton_clicked() +{ + ui->tabWidget->setCurrentWidget(ui->helpTab); +} + +void MainWindow::on_actionView_S_ummary_triggered() +{ + ui->tabWidget->setCurrentWidget(ui->summaryTab); +} diff --git a/mainwindow.h b/mainwindow.h index 62e9bbee..97fdde4c 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -135,9 +135,6 @@ private slots: */ void on_action_Import_Data_triggered(); - //! \brief Selects the welcome page when it's clicked on - void on_actionView_Welcome_triggered(); - //! \brief Toggle Fullscreen (currently F11) void on_action_Fullscreen_triggered(); @@ -250,6 +247,10 @@ private slots: void on_recordsBox_linkClicked(const QUrl &arg1); + void on_helpButton_clicked(); + + void on_actionView_S_ummary_triggered(); + private: Ui::MainWindow *ui; diff --git a/mainwindow.ui b/mainwindow.ui index 8d418cd0..56d1003b 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -78,7 +78,7 @@ QTabWidget::North - 0 + 1 false @@ -89,7 +89,29 @@ false - + + + &Summary + + + + 0 + + + 0 + + + + + + about:blank + + + + + + + 0 @@ -97,7 +119,7 @@ - &Summary + &Help Browser @@ -213,13 +235,6 @@ - - - - Summary - - - @@ -399,9 +414,9 @@ 0 - 0 + -211 143 - 519 + 524 @@ -528,8 +543,8 @@ - 64 - 64 + 48 + 48 @@ -568,8 +583,8 @@ - 64 - 64 + 48 + 48 @@ -597,8 +612,8 @@ - 64 - 64 + 48 + 48 @@ -626,8 +641,8 @@ - 64 - 64 + 48 + 48 @@ -661,8 +676,8 @@ - 64 - 64 + 48 + 48 @@ -679,6 +694,35 @@ + + + + + 0 + 0 + + + + Help + + + + :/icons/help.png:/icons/help.png + + + + 48 + 48 + + + + Qt::ToolButtonTextUnderIcon + + + true + + + @@ -699,6 +743,7 @@ oximetryButton summaryButton_2 importButton + helpButton @@ -892,7 +937,7 @@ &View - + @@ -1126,6 +1171,14 @@ F8 + + + View S&ummary + + + F4 + +