update dict
[QFreeRecite.git] / src / gui / BaseScannerWidget.h
blob8662105560133c33626f9c69b28575ce544f50b9
1 /**
2 * This file is a part of the application QFreeRecite.
4 * Copyright (C) 2008 Kermit Mei <kermit.mei@gmail.com>
5 * All Rights Reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 3 as
9 * published by the Free Software Foundation.
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.
20 * Written by Kermit Mei <kermit.mei@gmail.com>
22 * Many of the ideas implemented here are from the author's experiment.
23 * But the dictionary's format coincide with the other word recite software
24 * to help the users get more available data. And the review times designed
25 * by means of the theory named Forgetting Curve which dicoveried by the
26 * German psychologist named Hermann Ebbinghaus(1850–1909).
28 **/
30 #ifndef FR_BASESCANNERWIDGET_H
31 #define FR_BASESCANNERWIDGET_H
33 #include <QWidget>
35 namespace freeRecite {
36 class Scanner;
39 class ResultWidget;
40 class AddDialog;
41 class ListModel;
43 class BaseScannerWidget : public QWidget
45 Q_OBJECT
46 public:
47 BaseScannerWidget(QWidget *parent = 0);
48 virtual ~BaseScannerWidget();
49 ResultWidget *getResult()
50 { return resultWidget; }
51 signals:
52 void finished();
53 void showResult();
54 protected slots:
55 virtual void displayResult() = 0;
56 virtual void pronounce() = 0;
57 virtual void showNext() = 0;
58 virtual void showAnswer() = 0;
59 virtual void setInfo() = 0;
60 void add();
61 void modify();
62 void remove();
63 protected:
64 freeRecite::Scanner *scanner;
65 ResultWidget *resultWidget;
66 time_t startTime;
67 ListModel *listModel;
70 #endif //FR_BASESCANNERWIDGET_H