summaryrefslogtreecommitdiffstats
path: root/keduca/libkeduca/fileread.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:39:55 +0000
commit0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch)
tree2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /keduca/libkeduca/fileread.h
parent83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff)
downloadtdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz
tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'keduca/libkeduca/fileread.h')
-rw-r--r--keduca/libkeduca/fileread.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/keduca/libkeduca/fileread.h b/keduca/libkeduca/fileread.h
index 3dc82a0b..679d2cc5 100644
--- a/keduca/libkeduca/fileread.h
+++ b/keduca/libkeduca/fileread.h
@@ -20,7 +20,7 @@
#include <kio/job.h>
-#include <qdom.h>
+#include <tqdom.h>
// forward declarations
class KTempFile;
@@ -32,11 +32,11 @@ class QFile;
*@author Klas Kalass
*/
-class FileRead : public QObject {
+class FileRead : public TQObject {
Q_OBJECT
public:
- FileRead( QObject *parent=0, const char *name=0 );
+ FileRead( TQObject *parent=0, const char *name=0 );
virtual ~FileRead();
enum QuestionField { QF_TEXT, QF_PICTURE, QF_POINTS, QF_TYPE, QF_TIME, QF_TIP, QF_EXPLAIN };
enum AnswerField { AF_TEXT, AF_VALUE, AF_POINT };
@@ -45,15 +45,15 @@ public:
/** Open keduca file. This function can open a remote or local url. */
bool openFile( const KURL &url );
/** Set value to questions fields */
- void setQuestion( QuestionField field, const QString& text);
+ void setQuestion( QuestionField field, const TQString& text);
/** Set value to questions fields */
void setQuestion( QuestionField field, int value );
/** Set value to results fields */
- void setResult( ResultField field, const QString& text);
+ void setResult( ResultField field, const TQString& text);
/** Set value to results fields */
void setResult( ResultField field, int value );
/** Insert an answer field */
- void setAnswer( const QString& text, bool value, int points=0);
+ void setAnswer( const TQString& text, bool value, int points=0);
/** Go to the Last Record */
void recordLast();
/** Go to the First record */
@@ -87,17 +87,17 @@ public:
/** Record answer count */
unsigned int recordAnswerCount();
/** Get the value of the field question */
- QString getQuestion( QuestionField field );
+ TQString getQuestion( QuestionField field );
/** Get the value of the field questions in integer */
int getQuestionInt( QuestionField field );
/** Get Answer field */
- QString getAnswer( AnswerField field );
+ TQString getAnswer( AnswerField field );
/** Get answer field */
int getAnswerPoints();
/** Get Answer field */
bool getAnswerValue();
/** Get the value of the field result */
- QString getResult( ResultField field );
+ TQString getResult( ResultField field );
/** Get the value of the field result */
int getResultInt( ResultField field );
/** Returns if this record is a begin of file */
@@ -121,15 +121,15 @@ public:
/** Save file */
bool saveFile( const KURL &url = KURL(), bool copyimages = false, bool saveCompressed = true );
/** Save results */
- bool saveResults( const KURL &url, const QString &results );
+ bool saveResults( const KURL &url, const TQString &results );
/** Get real picture */
- QString getPicture();
+ TQString getPicture();
/** Get real picture */
- QPixmap getPicturePixmap();
+ TQPixmap getPicturePixmap();
/** Set header data */
- void setHeader( const QString field, const QString value);
+ void setHeader( const TQString field, const TQString value);
/** Get Header */
- QString getHeader(const QString &head);
+ TQString getHeader(const TQString &head);
/** is Multi Answer */
bool isMultiAnswer();
/** is Result */
@@ -153,42 +153,42 @@ private:
bool _changed;
/** List of General Variables of the header */
- QMap<QString,QString> _header;
+ TQMap<TQString,TQString> _header;
struct Answers
{
- QString text;
+ TQString text;
bool value;
int points;
};
struct Results
{
- QString text;
- QString picture;
+ TQString text;
+ TQString picture;
int min;
int max;
};
struct Questions
{
- QString text;
+ TQString text;
int type;
- QString picture;
+ TQString picture;
int time;
int points;
- QString tip;
- QString explain;
- QValueList<Answers> listAnswers;
- QValueListIterator<Answers> recordAnswers;
+ TQString tip;
+ TQString explain;
+ TQValueList<Answers> listAnswers;
+ TQValueListIterator<Answers> recordAnswers;
};
/** List to Data struct */
- QValueList<Questions> _listQuestions;
- QValueListIterator<Questions> _recordQuestions;
+ TQValueList<Questions> _listQuestions;
+ TQValueListIterator<Questions> _recordQuestions;
- QValueList<Results> _listResults;
- QValueListIterator<Results> _recordResults;
+ TQValueList<Results> _listResults;
+ TQValueListIterator<Results> _recordResults;
/** Returns if the database finds End Of File */
bool _fileEOF;
@@ -207,7 +207,7 @@ private:
/** the temporary file to which the document is saved, NULL if no temporary file is needed */
KTempFile *_tmpfile;
/** the temporary image file */
- QString _tmpfileImage;
+ TQString _tmpfileImage;
/** Total Questions */
uint _totalQuestions;
/** Total Time */
@@ -218,17 +218,17 @@ private:
// Private methods
/** Insert xml format data */
- void insertXML( QDomDocument &doc, QDomElement &parent, const QString &tagName, const QString &data);
+ void insertXML( TQDomDocument &doc, TQDomElement &parent, const TQString &tagName, const TQString &data);
/** Insert xml data format */
- void insertXML( QDomDocument &doc, QDomElement &parent, const QString &data);
+ void insertXML( TQDomDocument &doc, TQDomElement &parent, const TQString &data);
protected:
/** Open keduca file. This function does the actual work and expects a local filename . */
- bool loadFile( const QString &filename );
+ bool loadFile( const TQString &filename );
/** Save KEduca file to the file*/
- bool saveFile( const QString &filename, bool copyimages, bool saveCompressed = true );
+ bool saveFile( const TQString &filename, bool copyimages, bool saveCompressed = true );
/** Save Results file to the file */
- bool saveResults( const QString &filename, const QString &results );
+ bool saveResults( const TQString &filename, const TQString &results );
protected slots:
void slotUploadFinished( KIO::Job * job );
@@ -261,13 +261,13 @@ signals:
/**
* Emit this if loading is canceled by the user or by an error.
**/
- void canceled( const QString &errMsg );
+ void canceled( const TQString &errMsg );
/**
* Emitted by the part, to set the caption of the window(s)
* hosting this part
*/
- void setWindowCaption( const QString & caption );
+ void setWindowCaption( const TQString & caption );
};