Skip to content

Commit

Permalink
Formatting and updated to v0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
julianmi committed Apr 10, 2018
1 parent 94d506f commit da5cb1c
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 22 deletions.
2 changes: 1 addition & 1 deletion EffortLog.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 4 additions & 0 deletions doc/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion src/logview.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
6 changes: 3 additions & 3 deletions src/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_);
Expand Down Expand Up @@ -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);
}
2 changes: 1 addition & 1 deletion src/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Activity> *appendices_; /**< A list of potential appendices.*/
QSystemTrayIcon *tray_icon_ = new QSystemTrayIcon(); /**< The tray icon.*/
QSystemTrayIcon *tray_icon_ = new QSystemTrayIcon(); /**< The tray icon.*/
};
7 changes: 3 additions & 4 deletions src/qstform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.*/
};
14 changes: 9 additions & 5 deletions src/questionnairedialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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()));
Expand Down Expand Up @@ -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;
}
13 changes: 6 additions & 7 deletions src/questionnairedialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.*/
Expand Down

0 comments on commit da5cb1c

Please sign in to comment.