21 #include "ldDocument.h" |
21 #include "ldDocument.h" |
22 #include "ldObject.h" |
22 #include "ldObject.h" |
23 #include "mainwindow.h" |
23 #include "mainwindow.h" |
24 #include "dialogs/openprogressdialog.h" |
24 #include "dialogs/openprogressdialog.h" |
25 |
25 |
26 DocumentLoader::DocumentLoader (bool onForeground, QObject *parent) : |
26 DocumentLoader::DocumentLoader (Model* model, bool onForeground, QObject *parent) : |
27 QObject (parent), |
27 QObject (parent), |
|
28 _model(model), |
28 m_warningCount (0), |
29 m_warningCount (0), |
29 m_isDone (false), |
30 m_isDone (false), |
30 m_hasAborted (false), |
31 m_hasAborted (false), |
31 m_isOnForeground (onForeground) {} |
32 m_isOnForeground (onForeground) {} |
32 |
33 |
53 bool DocumentLoader::isOnForeground() const |
54 bool DocumentLoader::isOnForeground() const |
54 { |
55 { |
55 return m_isOnForeground; |
56 return m_isOnForeground; |
56 } |
57 } |
57 |
58 |
58 const LDObjectList& DocumentLoader::objects() const |
59 const QVector<LDObject*>& DocumentLoader::objects() const |
59 { |
60 { |
60 return m_objects; |
61 return _model->objects(); |
61 } |
62 } |
62 |
63 |
63 void DocumentLoader::read (QIODevice* fp) |
64 void DocumentLoader::read (QIODevice* fp) |
64 { |
65 { |
65 if (fp and fp->isOpen()) |
66 if (fp and fp->isOpen()) |