summaryrefslogtreecommitdiffstats
path: root/kwordquiz/src/flashview.h
blob: 02abcf41945dee296ce0911e3f3e6b9484122336 (plain)
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
/***************************************************************************
                          flashview.h -  description
                             -------------------
   copyright            : (C) 2003 by Peter Hedlund
   email                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
 
#ifndef FLASHVIEW_H
#define FLASHVIEW_H



#include "flashviewbase.h"

#include "wqscore.h"

class WQQuiz;

/**
@author Peter Hedlund
*/
class FlashView : public FlashViewBase
{
TQ_OBJECT
  
public:
    FlashView(TQWidget *parent = 0, const char *name = 0, WFlags f = 0);

    ~FlashView();

    void setQuiz(WQQuiz *quiz);
    void init();

private slots:
    void slotTimer();

public slots:
    void slotFlip();
    void slotKnow();
    void slotDontKnow();
    void slotRepeat();
    void slotRestart();
    void slotApplySettings();

private:
    WQQuiz *m_quiz;
    WTQScore *m_score;

    TDEAction* actFlip;
    TDEAction* actKnow;
    TDEAction* actDontKnow;
    TDEAction* actRepeat;
    TDEAction* actRestart;

    TQTimer* m_timer;

    int m_question;
    int m_error;
    bool m_showFirst;
    bool m_soundFeedBack;
    bool m_flipAuto;
    bool m_keepDiscard;

    void showFront(int i);
    void showBack(int i);
    void keepDiscardCard(bool keep);
    void updateScore();
};

#endif