diff --git a/EffortLog.pro b/EffortLog.pro index d6256b1..d0bba19 100644 --- a/EffortLog.pro +++ b/EffortLog.pro @@ -25,7 +25,7 @@ lessThan(QT_VERSION, 5.0) { TARGET = effort-log macx:TARGET = EffortLog TEMPLATE = app -VERSION = 0.9.2 +VERSION = 0.9.3 DEFINES += APP_VERSION=\\\"$$VERSION\\\" QT += core gui widgets diff --git a/doc/about.md b/doc/about.md index 83398cc..741cb9b 100644 --- a/doc/about.md +++ b/doc/about.md @@ -34,6 +34,10 @@ for more information on the research done with EffortLog. Change log: +- 0.9.3 (April 2018): + - Added feature: Added a tray icon and desktop notifications + - Added feature: The view on the questionnaire is now scrollable + - Bug fix: Improved cross-platform window displaying - 0.9.2 (March 2018): - Added feature: Simplified set-up - 0.9.1 (March 2018): diff --git a/src/logview.cc b/src/logview.cc index 10c2492..4bbcf49 100644 --- a/src/logview.cc +++ b/src/logview.cc @@ -114,5 +114,6 @@ LogView::LogView(Project *pro) : QDialog() { setLayout(layout); setWindowTitle("Viewing " + QString::number(no_events) + " events and " + QString::number(pro->GetNoMilestones()) + " milestones"); - setWindowFlags(Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::WindowCloseButtonHint); + setWindowFlags(Qt::Dialog | Qt::WindowStaysOnTopHint | + Qt::WindowCloseButtonHint); } diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 50ba053..4726afa 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -217,7 +217,8 @@ void MainWindow::NextAnimationFrame() { msg += " minute"; else msg += " minutes"; - msg += " has passed. Please switch to the EffortLog app and answer the questionnaire."; + msg += " has passed. Please switch to the EffortLog app and answer the " + "questionnaire."; ShowMessage(msg); QApplication::processEvents(); QApplication::sendPostedEvents(tray_icon_); @@ -343,8 +344,7 @@ void MainWindow::AddAppendices() { project_->StoreLog(settings_.value("conf/logFile").toString()); } -void MainWindow::ShowMessage(const QString &msg) -{ +void MainWindow::ShowMessage(const QString &msg) { QString app = tr(APP_NAME) + " " + tr(APP_VERSION); tray_icon_->showMessage(app, msg); } diff --git a/src/mainwindow.h b/src/mainwindow.h index 5450138..e961101 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -261,5 +261,5 @@ private slots: QLabel *project_label_; /**< Holds the title of the project.*/ bool qst_running_; /**< True if a questionnaire is running, false if not.*/ QList *appendices_; /**< A list of potential appendices.*/ - QSystemTrayIcon *tray_icon_ = new QSystemTrayIcon(); /**< The tray icon.*/ + QSystemTrayIcon *tray_icon_ = new QSystemTrayIcon(); /**< The tray icon.*/ }; diff --git a/src/qstform.h b/src/qstform.h index ce05e8c..343a9a1 100644 --- a/src/qstform.h +++ b/src/qstform.h @@ -141,8 +141,7 @@ class QstForm : public QWidget { QVBoxLayout *layout_; /**< The layout of the form.*/ QCompleter *completer_; /**< The completer for the input field.*/ QStringList compContents_; /**< The completer's content.*/ - bool line_ = - true; /**< Sets if there will be a horizontal line printed after the - form.*/ - QFrame *hline_; /**< A horizontal line printed after the form.*/ + bool line_ = true; /**< Sets if there will be a horizontal line printed after + the form.*/ + QFrame *hline_; /**< A horizontal line printed after the form.*/ }; diff --git a/src/questionnairedialog.cc b/src/questionnairedialog.cc index 6918adf..04ebb8d 100644 --- a/src/questionnairedialog.cc +++ b/src/questionnairedialog.cc @@ -386,7 +386,8 @@ void QuestionnaireDialog::Setup() { .toString("hh:mm ap")); } this->setWindowTitle(title_string); - setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); + setWindowFlags(Qt::Window | Qt::WindowStaysOnTopHint | Qt::WindowTitleHint | + Qt::WindowCloseButtonHint); return; } @@ -402,8 +403,9 @@ void QuestionnaireDialog::CreateConnections() { connect(threads_box_, SIGNAL(activated(int)), this, SLOT(ThreadsInputChanged(int))); connect(perf_group_, SIGNAL(buttonClicked(int)), this, - SLOT(PerfInputChanged())); - connect(ms_group_, SIGNAL(buttonClicked(int)), this, SLOT(MsInputChanged())); + SLOT(ActiveSectionsChanged())); + connect(ms_group_, SIGNAL(buttonClicked(int)), this, + SLOT(ActiveSectionsChanged())); connect(perf_group_, SIGNAL(buttonClicked(int)), this, SLOT(CheckInput())); connect(ms_group_, SIGNAL(buttonClicked(int)), this, SLOT(CheckInput())); @@ -746,13 +748,15 @@ void QuestionnaireDialog::ReadLog() { } void QuestionnaireDialog::LogViewer() { - //setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); + // setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | + // Qt::WindowCloseButtonHint); LogView view(project_); view.resize(450, 300); view.exec(); - //setWindowFlags(Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); + // setWindowFlags(Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::WindowTitleHint + // | Qt::WindowCloseButtonHint); return; } diff --git a/src/questionnairedialog.h b/src/questionnairedialog.h index 4e2edb9..a48b51c 100644 --- a/src/questionnairedialog.h +++ b/src/questionnairedialog.h @@ -165,13 +165,12 @@ private slots: int scheduler_; /**< Denotes if the questionnaire was scheduled by the set interval (=0), was an appendix (=1), was manually executed (=2), or was executed on closing the program (=3) */ - QPushButton *log_button_; /**< Button to read the current log file.*/ - QstForm *act_form_; /**< Form to specify the type of activity.*/ - QWidget *perf_widget_; /**< A widget of holding the detailed questions on - performance.*/ - QButtonGroup - *perf_group_; /**< Yes/ No buttons to specify if the performance of - applicationw as measured.*/ + QPushButton *log_button_; /**< Button to read the current log file.*/ + QstForm *act_form_; /**< Form to specify the type of activity.*/ + QWidget *perf_widget_; /**< A widget of holding the detailed questions on + performance.*/ + QButtonGroup *perf_group_; /**< Yes/ No buttons to specify if the performance + of applicationw as measured.*/ QHBoxLayout *perf_buttons_; /**< Yes/ No buttons to specify if a milestone occured.*/ QLabel *perf_section_label_; /**< The label of section on performance.*/