~ubuntu-branches/ubuntu/karmic/tellico/karmic

« back to all changes in this revision

Viewing changes to src/filehandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Regis Boudin
  • Date: 2008-05-23 21:28:59 UTC
  • mfrom: (0.1.14 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20080523212859-n0gl4ap37xb0uj1a
Tags: 1.3.2-1
* New upstream release.
* Recommend khelpcenter for acces to the help (Closes: #478975).

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
}
27
27
 
28
28
class QDomDocument;
29
 
class QFile;
 
29
class QIODevice;
30
30
 
31
31
namespace Tellico {
32
32
  class ImageFactory;
51
51
  class FileRef {
52
52
  public:
53
53
    bool open(bool quiet=false);
54
 
    QFile* file() const { return m_file; }
 
54
    QIODevice* file() const { return m_device; }
55
55
    const QString& fileName() const { return m_filename; }
56
56
    bool isValid() const { return m_isValid; }
57
57
    ~FileRef();
58
58
 
59
59
  private:
60
60
    friend class FileHandler;
61
 
    FileRef(const KURL& url, bool quiet=false);
62
 
    QFile* m_file;
 
61
    FileRef(const KURL& url, bool quiet=false, bool allowCompressed=false);
 
62
    QIODevice* m_device;
63
63
    QString m_filename;
64
64
    bool m_isValid;
65
65
  };
80
80
   * @param url The URL of the file
81
81
   * @param quiet whether the importer should report errors or not
82
82
   * @param useUTF8 Whether the file should be read as UTF8 or use user locale
 
83
   * @param allowCompressed Whether to check if the file is compressed or not
83
84
   * @return A string containing the contents of a file
84
85
   */
85
 
  static QString readTextFile(const KURL& url, bool quiet=false, bool useUTF8=false);
 
86
  static QString readTextFile(const KURL& url, bool quiet=false, bool useUTF8=false, bool allowCompressed=false);
86
87
  /**
87
88
   * Read contents of an XML file into a QDomDocument.
88
89
   *