/***************************************************************************
 *   Copyright (C) 2004 by Kraschinski Arnold                              *
 *   arnold.kra67@gmx.de                                                   *
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.           *
 ***************************************************************************/
#ifndef TRAINER_H
#define TRAINER_H

#include <QWidget>

//class QGridLayout;

/**
 *   This is the virtual base class for all the trainer classes that are used in the 
 *   KVerbos project. Is assures that all trainer classes have the necessary interface.
 *
 * @short base call for all trainer classes
 * @author Kraschinski Arnold <arnold.kra67@gmx.de>
 * @version 2.00.00
*/
class Trainer : public QWidget
{
Q_OBJECT
public:
    Trainer(QWidget *parent = 0);
    ~Trainer();
    
    /** is called from qlearning when the user pressed the next button */
    virtual void next() = 0;

public slots:
    /** receive one of the special characters ñ, á, é, í, ó, ú from
      * the button line. The character will be added to the active lineInput
      */
    virtual void slotChar(QString ch) = 0;


signals:
    /** The signal indicates that n exercises have been solved where x were correct.
      * 
      * @param n number of solved exercieses
      * @param x number of correct solutions
      */
    void someExerciseSolved(int n, int x);
    
    /** This signal is used when all exerciese in an exercise file are done.
      */
    void allExercisesAreDone();
    
    /** This signal is emitted when the trainer wants to change the text of the
      * next button in the controlline.
      */
    void signalSetNextText(QString);
};

#endif
