File: startsql.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 (90 lines) | stat: -rw-r--r-- 2,822 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
/*
Copyright (c) 2006-2009, Tom Thielicke IT Solutions

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

/****************************************************************
**
** Definition of the StartSql class
** File name: startsql.h
**
****************************************************************/

#ifndef STARTSQL_H
#define STARTSQL_H

#include <QComboBox>
#include <QLineEdit>
#include <QList>
#include <QListWidget>
#include <QProgressBar>
#include <QRadioButton>
#include <QString>
#include <QTextEdit>

//! The StartSql class fills a list widget and resets user data .
/*!
        The StartSql class provides 3 functions. The first, fillLessonList(),
        is to fill a list widget with a lesson list. The other two functions,
        deleteUserLessonList and deleteUserChars, are to reset user data tables.

        @author Tom Thielicke, s712715
        @version 0.0.2
        @date 27.06.2006
*/
class StartSql {

public:
    //! Constructor is empty.
    StartSql();

    //! Converts an unicode char into layout values of a key.
    /*!
            This function fills a list widget with items of the table
            "lesson_list". If field "user_lesson_lesson" is bigger than 1
            icon "lesson_done_multiple.png" is shown, otherwise
            icon "lesson_done_none.png" is shown.

            @param listLesson QListWidget which is filled
            @return bool Operation successful true/false
            @see opSystem
    */
    int fillLessonList(QListWidget* listLesson, QList<QString>* arrayTraining,
        QString languageLesson);

    int fillOpenList(QListWidget* listOpen, QList<QString>* arrayOpen,
        QString themeId, QString languageLesson);

    int fillOwnList(QListWidget* listOwn, QList<QString>* arrayOwn);

    int fillThemes(QComboBox* comboTheme, QList<QString>* arrayThemes,
        QString languageLesson, QString textAll);

    void fillLanguage(QComboBox* combo, QString table, QString field);

    //! Deletes the complete content of table "user_lesson_list".
    bool deleteUserLessonList();

    //! Deletes the complete content of table "user_lesson_list".
    bool deleteUserChars();

    //! Deletes the complete content of table "user_lesson_list".
    bool deleteOwnLesson(QString lessonnumber);

    //! Updates the complete content of table "user_lesson_list".
    bool updateOwnLesson(QString lessonnumber, QString lessonname,
        QString description, QStringList content, int unit);

    bool getOwnLesson(QString lessonnumber, QLineEdit* lineLessonName,
        QLineEdit* lineLessonDescription, QTextEdit* lineLessonContent,
        QRadioButton* radioUnitSentence, QRadioButton* radioUnitWord);

    bool ownLessonExist(QString lessonname);

    bool analyzeOwnLessons();

    bool analyzeLessons(QString lessonType);
};

#endif // STARTSQL_H