FileRead Class Reference
File Read operations.
More...
#include <fileread.h>
List of all members.
|
Public Types |
enum | AnswerField { AF_TEXT,
AF_VALUE,
AF_POINT
} |
enum | QuestionField {
QF_TEXT,
QF_PICTURE,
QF_POINTS,
QF_TYPE,
QF_TIME,
QF_TIP,
QF_EXPLAIN
} |
enum | ResultField { RS_TEXT,
RS_MIN,
RS_MAX,
RS_PICTURE
} |
Signals |
void | canceled (const QString &errMsg) |
void | completed (bool pendingAction) |
void | completed () |
void | setWindowCaption (const QString &caption) |
Public Member Functions |
bool | changed () |
void | clearAnswers () |
| FileRead (QObject *parent=0, const char *name=0) |
QString | getAnswer (AnswerField field) |
int | getAnswerPoints () |
bool | getAnswerValue () |
KURL const & | getCurrentURL () const |
QString | getHeader (const QString &head) |
QString | getPicture () |
QPixmap | getPicturePixmap () |
QString | getQuestion (QuestionField field) |
int | getQuestionInt (QuestionField field) |
QString | getResult (ResultField field) |
int | getResultInt (ResultField field) |
uint | getTotalPoints () |
uint | getTotalQuestions () |
uint | getTotalTime () |
void | insertQuestion () |
void | insertResult () |
bool | isMultiAnswer () |
bool | isResult () |
bool | openFile (const KURL &url) |
void | recordAnswerAt (unsigned int index) |
bool | recordAnswerBOF () |
unsigned int | recordAnswerCount () |
bool | recordAnswerEOF () |
void | recordAnswerFirst () |
void | recordAnswerLast () |
void | recordAnswerNext () |
void | recordAnswerPrevious () |
void | recordAt (uint index) |
bool | recordBOF () |
void | recordDelete () |
bool | recordEOF () |
void | recordFirst () |
void | recordLast () |
void | recordNext () |
void | recordPrevious () |
bool | recordResultBOF () |
bool | recordResultEOF () |
void | recordResultFirst () |
void | recordResultLast () |
void | recordResultNext () |
void | recordResultPrevious () |
void | recordSwap (bool) |
void | refreshData () |
bool | saveFile (const KURL &url=KURL(), bool copyimages=false, bool saveCompressed=true) |
bool | saveResults (const KURL &url, const QString &results) |
void | setAnswer (const QString &text, bool value, int points=0) |
void | setHeader (const QString field, const QString value) |
void | setQuestion (QuestionField field, int value) |
void | setQuestion (QuestionField field, const QString &text) |
void | setResult (ResultField field, int value) |
void | setResult (ResultField field, const QString &text) |
virtual | ~FileRead () |
Protected Slots |
void | slotUploadFinished (KIO::Job *job) |
Protected Member Functions |
bool | loadFile (const QString &filename) |
bool | saveFile (const QString &filename, bool copyimages, bool saveCompressed=true) |
bool | saveResults (const QString &filename, const QString &results) |
Detailed Description
File Read operations.
This class read a keduca file an pass the records.
- Author:
- Javier Campos
Klas Kalass
Definition at line 35 of file fileread.h.
Member Enumeration Documentation
- Enumerator:
-
AF_TEXT |
|
AF_VALUE |
|
AF_POINT |
|
Definition at line 42 of file fileread.h.
- Enumerator:
-
QF_TEXT |
|
QF_PICTURE |
|
QF_POINTS |
|
QF_TYPE |
|
QF_TIME |
|
QF_TIP |
|
QF_EXPLAIN |
|
Definition at line 41 of file fileread.h.
- Enumerator:
-
RS_TEXT |
|
RS_MIN |
|
RS_MAX |
|
RS_PICTURE |
|
Definition at line 43 of file fileread.h.
Constructor & Destructor Documentation
FileRead::FileRead |
( |
QObject * |
parent = 0 , |
|
|
const char * |
name = 0 | |
|
) |
| | |
FileRead::~FileRead |
( |
|
) |
[virtual] |
Member Function Documentation
void FileRead::canceled |
( |
const QString & |
errMsg |
) |
[signal] |
Emit this if loading is canceled by the user or by an error.
bool FileRead::changed |
( |
|
) |
[inline] |
- Returns:
- true: The document has changed and should be saved
Definition at line 139 of file fileread.h.
void FileRead::clearAnswers |
( |
|
) |
|
void FileRead::completed |
( |
bool |
pendingAction |
) |
[signal] |
Same as the above signal except besides indicating that the data has been completely loaded it also informs the host, by setting the flag, that a pending action has been generated as a result of completing the requested task (loading the data).
An example of this is meta-refresh tags on HTML pages which result in the page either being refreshed or the viewer being redirected to another page. By emitting this signal after appropriately setting the flag, the part can tell the host of the pending scheduled action inorder to give it a chance to accept or cancel that action.
pendingAction
if true, a pending action exists (ex: a scheduled refresh)
void FileRead::completed |
( |
|
) |
[signal] |
Emit this when you have completed loading data.
Hosting apps will want to know when the process of loading the data is finished, so that they can access the data when everything is loaded.
int FileRead::getAnswerPoints |
( |
|
) |
|
bool FileRead::getAnswerValue |
( |
|
) |
|
KURL const& FileRead::getCurrentURL |
( |
|
) |
const [inline] |
QPixmap FileRead::getPicturePixmap |
( |
|
) |
|
Get the value of the field question.
Definition at line 408 of file fileread.cpp.
Get the value of the field questions in integer.
Definition at line 439 of file fileread.cpp.
Get the value of the field result.
Definition at line 488 of file fileread.cpp.
Get the value of the field result.
Definition at line 511 of file fileread.cpp.
uint FileRead::getTotalPoints |
( |
|
) |
|
uint FileRead::getTotalQuestions |
( |
|
) |
|
uint FileRead::getTotalTime |
( |
|
) |
|
void FileRead::insertQuestion |
( |
|
) |
|
void FileRead::insertResult |
( |
|
) |
|
bool FileRead::isMultiAnswer |
( |
|
) |
|
bool FileRead::isResult |
( |
|
) |
|
bool FileRead::loadFile |
( |
const QString & |
filename |
) |
[protected] |
Open keduca file.
This function does the actual work and expects a local filename .
Definition at line 61 of file fileread.cpp.
bool FileRead::openFile |
( |
const KURL & |
url |
) |
|
Open keduca file.
This function can open a remote or local url.
Definition at line 43 of file fileread.cpp.
void FileRead::recordAnswerAt |
( |
unsigned int |
index |
) |
|
bool FileRead::recordAnswerBOF |
( |
|
) |
|
Returns if this record is a begin of file.
Definition at line 553 of file fileread.cpp.
unsigned int FileRead::recordAnswerCount |
( |
|
) |
|
bool FileRead::recordAnswerEOF |
( |
|
) |
|
Returns if this record is a end of file.
Definition at line 548 of file fileread.cpp.
void FileRead::recordAnswerFirst |
( |
|
) |
|
void FileRead::recordAnswerLast |
( |
|
) |
|
void FileRead::recordAnswerNext |
( |
|
) |
|
void FileRead::recordAnswerPrevious |
( |
|
) |
|
void FileRead::recordAt |
( |
uint |
index |
) |
|
bool FileRead::recordBOF |
( |
|
) |
|
Returns if this record is a begin of file.
Definition at line 533 of file fileread.cpp.
void FileRead::recordDelete |
( |
|
) |
|
bool FileRead::recordEOF |
( |
|
) |
|
Returns if this record is a end of file.
Definition at line 528 of file fileread.cpp.
void FileRead::recordFirst |
( |
|
) |
|
void FileRead::recordLast |
( |
|
) |
|
void FileRead::recordNext |
( |
|
) |
|
void FileRead::recordPrevious |
( |
|
) |
|
bool FileRead::recordResultBOF |
( |
|
) |
|
Returns if this record is a begin of file.
Definition at line 543 of file fileread.cpp.
bool FileRead::recordResultEOF |
( |
|
) |
|
Returns if this record is a end of file.
Definition at line 538 of file fileread.cpp.
void FileRead::recordResultFirst |
( |
|
) |
|
void FileRead::recordResultLast |
( |
|
) |
|
void FileRead::recordResultNext |
( |
|
) |
|
void FileRead::recordResultPrevious |
( |
|
) |
|
void FileRead::recordSwap |
( |
bool |
moveup |
) |
|
void FileRead::refreshData |
( |
|
) |
|
Refresh stadistical data - Points, number questions and total points.
Definition at line 983 of file fileread.cpp.
bool FileRead::saveFile |
( |
const QString & |
filename, |
|
|
bool |
copyimages, |
|
|
bool |
saveCompressed = true | |
|
) |
| | [protected] |
bool FileRead::saveFile |
( |
const KURL & |
url = KURL() , |
|
|
bool |
copyimages = false , |
|
|
bool |
saveCompressed = true | |
|
) |
| | |
bool FileRead::saveResults |
( |
const QString & |
filename, |
|
|
const QString & |
results | |
|
) |
| | [protected] |
Save Results file to the file.
Definition at line 859 of file fileread.cpp.
bool FileRead::saveResults |
( |
const KURL & |
url, |
|
|
const QString & |
results | |
|
) |
| | |
void FileRead::setAnswer |
( |
const QString & |
text, |
|
|
bool |
value, |
|
|
int |
points = 0 | |
|
) |
| | |
Set value to questions fields.
Definition at line 189 of file fileread.cpp.
Set value to questions fields.
Definition at line 165 of file fileread.cpp.
void FileRead::setResult |
( |
ResultField |
field, |
|
|
int |
value | |
|
) |
| | |
void FileRead::setWindowCaption |
( |
const QString & |
caption |
) |
[signal] |
Emitted by the part, to set the caption of the window(s) hosting this part.
void FileRead::slotUploadFinished |
( |
KIO::Job * |
job |
) |
[protected, slot] |
The documentation for this class was generated from the following files: