From 07ca39b9146863fac494fa4b4aeb5d27a91ee72f Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sat, 23 Jul 2011 17:56:13 +1000 Subject: [PATCH] Minor stuff.. Collapse turned off on mac for Jimbo --- daily.cpp | 4 ++++ main.cpp | 2 +- mainwindow.cpp | 9 ++++----- mainwindow.h | 4 ++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/daily.cpp b/daily.cpp index cfa3e16e..329d1f2b 100644 --- a/daily.cpp +++ b/daily.cpp @@ -290,9 +290,13 @@ Daily::Daily(QWidget *parent,QGLWidget * shared) : gSplitter->refresh(); + // Turning off collapse feature on Mac + #ifndef Q_WS_MAC gSplitter->setChildrenCollapsible(true); // We set this per widget.. gSplitter->setCollapsible(gSplitter->indexOf(SF),false); gSplitter->setStretchFactor(gSplitter->indexOf(SF),0); + #endif + ui->graphSizer->layout(); QTextCharFormat format = ui->calendar->weekdayTextFormat(Qt::Saturday); diff --git a/main.cpp b/main.cpp index be8f1233..68012cc1 100644 --- a/main.cpp +++ b/main.cpp @@ -53,9 +53,9 @@ int main(int argc, char *argv[]) a.setFont(QFont("FreeSans",10)); + qInstallMsgHandler(MyOutputHandler); MainWindow w; mainwin=&w; - qInstallMsgHandler(MyOutputHandler); w.show(); return a.exec(); diff --git a/mainwindow.cpp b/mainwindow.cpp index 08b9c14e..18370a66 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -37,7 +37,6 @@ void MainWindow::Log(QString s) } -QString subversion="0"; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) @@ -47,7 +46,7 @@ MainWindow::MainWindow(QWidget *parent) : // this->showMaximized(); //#endif ui->setupUi(this); - this->setWindowTitle(tr("SleepyHead")+QString(" v0.8.")+subversion); + this->setWindowTitle(tr("SleepyHead")+QString(" v%1.%2.%3").arg(major_version).arg(minor_version).arg(revision_number)); ui->tabWidget->setCurrentIndex(0); PRS1Loader::Register(); @@ -140,7 +139,7 @@ MainWindow::~MainWindow() void MainWindow::Startup() { - + qDebug() << windowTitle() << "built with Qt"<< QT_VERSION_STR << "on" << __DATE__ << __TIME__; qstatus->setText(tr("Loading Data")); qprogress->show(); qstatusbar->showMessage("Your computer loads faster than JediMark's",1900); @@ -286,12 +285,12 @@ void MainWindow::on_webView_loadProgress(int progress) void MainWindow::on_action_About_triggered() { - QString msg=tr("

SleepyHead v0.8.0


" + QString msg=tr("

SleepyHead v%1.%2.%3

Build Date: %4 %5
" "Copyright ©2011 Mark Watkins (jedimark)
\n" "http://sleepyhead.sourceforge.net
" "This software is released under the GNU Public License
" "This software comes with absolutely no warranty, either express of implied. It comes with no guarantee of fitness for any particular purpose. No guarantees are made regarding the accuracy of any data this program displays." -"
"); +"
").arg(major_version).arg(minor_version).arg(revision_number).arg(__DATE__).arg(__TIME__); QMessageBox msgbox(QMessageBox::Information,tr("About SleepyHead"),"",QMessageBox::Ok,this); msgbox.setTextFormat(Qt::RichText); msgbox.setText(msg); diff --git a/mainwindow.h b/mainwindow.h index 1d921e83..59623021 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -14,6 +14,10 @@ #include "overview.h" #include "oximetry.h" +const int major_version=0; +const int minor_version=8; +const int revision_number=1; + namespace Ui { class MainWindow; }