Changeset View
Changeset View
Standalone View
Standalone View
src/OpmlWriter.h
Show All 39 Lines | 38 | OpmlWriter( const QList<OpmlOutline *> rootOutlines, | |||
---|---|---|---|---|---|
40 | QIODevice *device ); | 40 | QIODevice *device ); | ||
41 | 41 | | |||
42 | void setHeaderData( const QMap<QString,QString> data ) { m_headerData = data; } | 42 | void setHeaderData( const QMap<QString,QString> data ) { m_headerData = data; } | ||
43 | /** | 43 | /** | ||
44 | * The function that starts the actual work. Inherited from ThreadWeaver::Job | 44 | * The function that starts the actual work. Inherited from ThreadWeaver::Job | ||
45 | * Note the work is performed in a separate thread | 45 | * Note the work is performed in a separate thread | ||
46 | * @return Returns true on success and false on failure | 46 | * @return Returns true on success and false on failure | ||
47 | */ | 47 | */ | ||
48 | void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) Q_DECL_OVERRIDE; | 48 | void run(ThreadWeaver::JobPointer self = QSharedPointer<ThreadWeaver::Job>(), ThreadWeaver::Thread *thread = 0) override; | ||
49 | 49 | | |||
50 | QIODevice *device() { return m_xmlWriter->device(); } | 50 | QIODevice *device() { return m_xmlWriter->device(); } | ||
51 | 51 | | |||
52 | Q_SIGNALS: | 52 | Q_SIGNALS: | ||
53 | /** | 53 | /** | ||
54 | * Signal emmited when writing is complete. | 54 | * Signal emmited when writing is complete. | ||
55 | */ | 55 | */ | ||
56 | void result( int error ); | 56 | void result( int error ); | ||
Show All 10 Lines | 66 | private: | |||
67 | void writeOutline( const OpmlOutline *outline ); | 67 | void writeOutline( const OpmlOutline *outline ); | ||
68 | QList<OpmlOutline *> m_rootOutlines; | 68 | QList<OpmlOutline *> m_rootOutlines; | ||
69 | QMap<QString,QString> m_headerData; | 69 | QMap<QString,QString> m_headerData; | ||
70 | 70 | | |||
71 | QUrl m_fileUrl; | 71 | QUrl m_fileUrl; | ||
72 | QXmlStreamWriter *m_xmlWriter; | 72 | QXmlStreamWriter *m_xmlWriter; | ||
73 | 73 | | |||
74 | protected: | 74 | protected: | ||
75 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 75 | void defaultBegin(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
76 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) Q_DECL_OVERRIDE; | 76 | void defaultEnd(const ThreadWeaver::JobPointer& job, ThreadWeaver::Thread *thread) override; | ||
77 | 77 | | |||
78 | }; | 78 | }; | ||
79 | 79 | | |||
80 | #endif // OPMLWRITER_H | 80 | #endif // OPMLWRITER_H |