mainwindow.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include <QString>
  5. #include <cmath>
  6. #include "config.h"
  7. QT_BEGIN_NAMESPACE
  8. namespace Ui {
  9. class MainWindow;
  10. }
  11. QT_END_NAMESPACE
  12. class MainWindow : public QMainWindow
  13. {
  14. Q_OBJECT
  15. public:
  16. MainWindow(QWidget *parent = nullptr);
  17. ~MainWindow();
  18. private slots:
  19. void on_comboBox_thesis_spervisorEvaluation_activated(int index);
  20. void on_comboBox_thesis_examinerEvaluation_activated(int index);
  21. void on_comboBox_thesis_presentationEvaluation_activated(int index);
  22. void on_comboBox_exam_questionsEvaluation_activated(int index);
  23. void on_checkBox_comment1_presentation_checkStateChanged(const Qt::CheckState &arg1);
  24. void on_checkBox_comment1_prototype_checkStateChanged(const Qt::CheckState &arg1);
  25. void on_checkBox_comment1_video_checkStateChanged(const Qt::CheckState &arg1);
  26. void on_radioButton_comment2_quality1_clicked();
  27. void on_radioButton_comment2_quality2_clicked();
  28. void on_radioButton_comment2_quality3_clicked();
  29. void on_radioButton_comment2_quality4_clicked();
  30. void on_radioButton_comment2_quality5_clicked();
  31. void on_radioButton_comment3_yes_clicked();
  32. void on_radioButton_comment3_no_clicked();
  33. void on_checkBox_comment4_explanations_checkStateChanged(const Qt::CheckState &arg1);
  34. void on_radioButton_comment4_quality1_clicked();
  35. void on_radioButton_comment4_quality2_clicked();
  36. void on_radioButton_comment4_quality3_clicked();
  37. void on_radioButton_comment4_quality4_clicked();
  38. void on_radioButton_comment5_confidence1_clicked();
  39. void on_radioButton_comment5_confidence2_clicked();
  40. void on_radioButton_comment5_confidence3_clicked();
  41. void on_radioButton_comment5_quality1_clicked();
  42. void on_radioButton_comment5_quality2_clicked();
  43. void on_radioButton_comment5_quality3_clicked();
  44. private:
  45. Ui::MainWindow *ui;
  46. /**
  47. * Initialize all input controls.
  48. */
  49. void _initialize_all();
  50. /**
  51. * Calculate the final evaluation for thesis and store it
  52. * into _eval_thesis_final.
  53. */
  54. void _calculate_thesisEvaluation();
  55. /**
  56. * Calculate the final evaluation for whole examination
  57. * and store it into _eval_final_text.
  58. */
  59. void _calculate_finalEvaluation();
  60. /**
  61. * Show a thesis evaluation state.
  62. */
  63. void _show_thesisEvaluation();
  64. /**
  65. * Show the whole examination final state.
  66. */
  67. void _show_finalEvaluation();
  68. /**
  69. * Show final vaverbal evaluation of student.
  70. */
  71. void _show_finalComment();
  72. /**
  73. * Create 1st comment as a whole sentence.
  74. */
  75. void _compose_comment1();
  76. /**
  77. * Create 2nd comment as a whole sentence.
  78. */
  79. void _compose_comment2();
  80. /**
  81. * Create 3rd comment as a whole sentence.
  82. */
  83. void _compose_comment3();
  84. /**
  85. * Create 4th comment as a whole sentence.
  86. */
  87. void _compose_comment4();
  88. /**
  89. * Create 5th comment as a whole sentence.
  90. */
  91. void _compose_comment5();
  92. /**
  93. * Helper method for converting evaluation from numerical
  94. * to text form.
  95. * @param x numerical value for evaluation
  96. * @return string
  97. */
  98. QString _convert_evaluation_from_number(double x);
  99. /**
  100. * Helper method for converting evaluation from text form
  101. * to numerical form.
  102. * @param x text value for evaluation
  103. * @return numerical value
  104. */
  105. double _convert_evaluation_from_text(QString x);
  106. // numerical or text values for thesis evaluation
  107. double _eval_thesis_supervisor{0};
  108. double _eval_thesis_examiner{0};
  109. double _eval_thesis_presentation{0};
  110. QString _eval_thesis_final_text{""};
  111. // numerical value for exam evaluation
  112. double _eval_exam_questions{0};
  113. // text value for final evaluation
  114. QString _eval_final_text{""};
  115. // flags for comment 1
  116. bool _comm1_isPresentation{false};
  117. bool _comm1_isPrototype{false};
  118. bool _comm1_isVideo{false};
  119. QString _comm2_selectedQuality{""};
  120. QString _comm3_selectedAnswer{""};
  121. QString _comm4_explanations{""};
  122. QString _comm4_selectedQuality{""};
  123. QString _comm5_selectedConfidence{""};
  124. QString _comm5_selectedQuality{""};
  125. bool _comm5_isNoAnswer{false};
  126. // comments for verbal evaluation
  127. QString _comment1{""};
  128. QString _comment2{""};
  129. QString _comment3{""};
  130. QString _comment4{""};
  131. QString _comment5{""};
  132. };
  133. #endif // MAINWINDOW_H