1 /***************************************************************************
2 ksfilereader.h - description
4 begin : Tue Jan 28 2003
5 copyright : (C) 2003 by Heiko Evermann
6 email : heiko@evermann.de
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
18 #ifndef KSFILEREADER_H
19 #define KSFILEREADER_H
22 #include <qstringlist.h>
24 /**@class KSFileReader
25 *This class will read an entire file into a QStringList, where each item
26 *in the list is a line in the file. It can then access each line in the
28 *@author Heiko Evermann
35 class KSFileReader
: public QObject
{
38 /**Constructor. Read an entire file into a QStringList object.
39 *@p file the file to be read
41 KSFileReader( QFile
& file
);
46 /**@return TRUE if we are not yet at the end of the file.
50 /**Read a line from the file, and increment the "current line" counter.
51 *@return the line that we read, as a QString.
55 /**Go to a specific line in the file.
56 *@p i the line number to skip to.
61 /** After loading the whole file, we split it into lines and keep them here. */
63 /** How many lines do we have in the file? */
65 /** Which line are we at? */