File: evaluationwidget.h

package info (click to toggle)
tipp10 3.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,984 kB
  • sloc: cpp: 8,343; xml: 70; ansic: 60; makefile: 11
file content (133 lines) | stat: -rw-r--r-- 4,074 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
Copyright (c) 2006-2009, Tom Thielicke IT Solutions

SPDX-License-Identifier: GPL-2.0-only
*/

/****************************************************************
**
** Definition of the EvaluationWidget class
** File name: evaluationwidget.h
**
****************************************************************/

#ifndef EVALUATIONWIDGET_H
#define EVALUATIONWIDGET_H

#include <QGroupBox>
#include <QLabel>
#include <QPushButton>
#include <QTabWidget>
#include <QTextBrowser>
#include <QWidget>

#include "fingerwidget.h"
#include "helpbrowser.h"
#include "lessonresult.h"
#include "progressionwidget.h"
#include "sql/chartablesql.h"
#include "sql/lessontablesql.h"

//! The EvaluationWidget class provides a user evaluation widget.
/*!
        The EvaluationWidget class has two tabs. The first tab shows the
        evaluation of the lessons the user completed. It includes an object of
   the class LessonTable (which provides a table of all lessons). The second tab
   shows the evaluation of all chars the user typed. It includes an object of
   the class CharTable (which provides a table of all chars and their errors).
        A button in the right bottom corner enables the user to close the
   widget.

        @author Tom Thielicke, s712715
        @version 0.0.2
        @date 10.06.2006
*/
class EvaluationWidget : public QWidget {
    // Necessary to create own signals, slots and connections
    Q_OBJECT

public:
    //! Constructor, creates two table objects and provide it in two tabs.
    /*!
            In this contructor several objects are created.  First a tab
            widget (tabEvaluation) and two evaluation tables (lessonTable and
            charTable). Everyone of these tables are inserted in an own tab.
            At the end a button is created with function createButtons() and
            a layout is defined with function createLayout(). The button will
            be connected to slot clickReady().

            @param row The row id of current lesson
            @param parent The parent QWidget
            @see createButtons(), createLayout(), clickReady(),
                    tabEvaluation, lessonTable, charTable, buttonReady
    */
    EvaluationWidget(int row, int type, QList<QChar> charList,
        QList<int> mistakeList, QWidget* parent = 0);

signals:

    //! Signal, emits that the user has finished the evaluation.
    /*!
            After the user clicked the ready button, the function clickReady()
            emits this signal to inform the parent class about user finished.
    */
    void readyClicked();

private slots:

    //! Slot, connected with the clicked() function of the ready button.
    /*!
            After the user pushed the ready button, this function emits the
            signal readyClicked() to inform the parent class about user
            finished.
    */
    void clickReady();

    //! Slot, shows the help dialog.
    /*!
            This slot shows the help dialog. It creates an object of
            the QDialog class with an QTextbrowser.
    */
    void showHelp();

private:
    //! Creates a ready button that the user can exit from this widget.
    void createButtons();

    //! Creates the layout of the complete class.
    void createLayout();

    void createComparisonTable();

    //! Ready button.
    QPushButton* buttonReady;
    QPushButton* buttonHelp;

    //! Tab widget
    QTabWidget* tabEvaluation;

    //! Object of the table with user's lessons
    LessonTableSql* lessonTableSql;

    //! Object of the table with user's chars
    CharTableSql* charTableSql;

    //! Object of the table with user's chars
    LessonResult* lessonResult;

    //! Object of the widget with the progression chart
    ProgressionWidget* progressionWidget;

    //! Object of the widget with the finger error rate chart
    FingerWidget* fingerWidget;

    //! Object of the widget with the comparison table
    QTextBrowser* comparisonWidget;

    //! Object of the help browser dialog
    HelpBrowser* helpBrowser;

    int currentRow;
};

#endif // EVALUATIONWIDGET_H