• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

keduca

keducaview.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           keducaview.h  -  description
00003                              -------------------
00004     begin                : Thu May 24 2001
00005     copyright            : (C) 2001 by Javier Campos
00006     email                : javi@asyris.org
00007 ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef KEDUCAVIEW_H
00019 #define KEDUCAVIEW_H
00020 
00021 #include <kurl.h>
00022 
00023 #include <qlayout.h>
00024 #include <qsplitter.h>
00025 #include <qwidgetstack.h>
00026 
00027 class QTimer;
00028 class QTextEdit;
00029 class QLabel;
00030 
00031 class KPushButton;
00032 
00033 class FileRead;
00034 class KQuestion;
00035 class KGroupEduca;
00036 
00043 class KEducaView : public QWidgetStack
00044 {
00045     Q_OBJECT
00046 
00047 public:
00048     KEducaView(QWidget *parent=0, const char *name=0);
00049     ~KEducaView();
00051     bool openURL( const KURL &url);
00052     FileRead const *getKeducaFile() const {return _keducaFile; }
00053 
00054 private:
00055 
00056     // Private methods
00057 
00059     void init();
00061     void showRecord();
00063     void showResults( const QString &text );
00065     void setResults();
00067     QString setFinalResult();
00069     void configWrite();
00071     QString currentStatusPoints();
00073     QString getTableQuestion( bool isCorrect, const QString &correct, const QString &incorrect);
00075     bool questionNext();
00076 
00077     QString getInformation();
00079     QString insertTable( const QString &title = "", unsigned int col=0);
00081     QString insertRow( const QString &text, bool title, unsigned int colSpan=0 );
00082     QString insertRow( const QString &label, const QString &field, bool formBased );
00083     QString insertRow( const QString &label1, const QString &field1, const QString &label2, const QString &field2, bool formBased );
00085     QString insertTableClose();
00086             
00087     // Private attributes
00088 
00090     QLabel *_introWidget;
00091     QWidget *_infoWidget, *_questionWidget, *_resultsWidget;
00093     KPushButton *_buttonNext;
00094     KPushButton *_buttonSave;
00095     KPushButton *_buttonResultsNext; // FIXME: this is a hack
00096     KPushButton *_buttonStartTest;
00098     KGroupEduca *_buttonGroup;
00100     FileRead *_keducaFile;
00102     KQuestion *_questionText;
00104     QTextEdit *_viewResults;
00105     QTextEdit *_viewInfo;
00107     int _keducaFileIndex;
00109     QString _results;
00111     QVBoxLayout *_vbox2;
00113     QSplitter *_split;
00115     QString _currentResults;
00117     bool _isInitStatus;
00118     QTimer *_timeoutTimer;
00120     int _correctAnswer;
00122     int _incorrectAnswer;
00124     int _correctPoints;
00126     int _incorrectPoints;
00128     int _currentTime;
00130     bool _showResultFinish;
00132     bool _showRandomQuestions;
00134     bool _showRandomAnswers;
00136     QValueList<uint> _randomQuestions;
00138     QValueList<uint> _randomAnswers;
00139 private slots:
00141     void slotButtonNext();
00142     void slotButtonSave();
00143     void slotButtonStartTest();
00144     void questionTimedOut();
00145 };
00146 
00147 #endif

keduca

Skip menu "keduca"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal