2 * Copyright (C) 2010 Charles Clement <caratorn _at_ gmail.com>
4 * This file is part of qquiz.
6 * qquiz is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
32 #include <QGridLayout>
34 #define APP_NAME "qquiz"
36 #define CHAR_DELIM ';'
37 #define ANSWER_DELIM '|'
39 #define DEFAULT_NR_COL 2
47 question(QString s, QString r);
61 class quiz : public QObject{
66 void retrieve_quizzes();
67 int read_quiz(const char *filename);
73 void buzz(const QString& text);
78 vector<question *> questions;
79 vector<quiz_file *> files;
84 unsigned int total_time;
85 unsigned int current_time;
86 unsigned int max_label_length;
87 map < QString, int > index;
94 QScrollArea *scrollArea;