162 // Opens the given file and parses the LDraw code within. Returns a pointer |
162 // Opens the given file and parses the LDraw code within. Returns a pointer |
163 // to the opened file or null on error. |
163 // to the opened file or null on error. |
164 LDDocument* openDocument (QString path, bool search); |
164 LDDocument* openDocument (QString path, bool search); |
165 |
165 |
166 // Opens the given file and returns a pointer to it, potentially looking in /parts and /p |
166 // Opens the given file and returns a pointer to it, potentially looking in /parts and /p |
167 File* openLDrawFile (QString relpath, bool subdirs); |
167 QFile* openLDrawFile (QString relpath, bool subdirs, QString* pathpointer = null); |
168 |
168 |
169 // Close all open files, whether user-opened or subfile caches. |
169 // Close all open files, whether user-opened or subfile caches. |
170 void closeAll(); |
170 void closeAll(); |
171 |
171 |
172 // Parses a string line containing an LDraw object and returns the object parsed. |
172 // Parses a string line containing an LDraw object and returns the object parsed. |
180 void reloadAllSubfiles(); |
180 void reloadAllSubfiles(); |
181 |
181 |
182 // Is it safe to close all files? |
182 // Is it safe to close all files? |
183 bool safeToCloseAll(); |
183 bool safeToCloseAll(); |
184 |
184 |
185 QList<LDObject*> loadFileContents (File* f, int* numWarnings, bool* ok = null); |
185 QList<LDObject*> loadFileContents (QFile* f, int* numWarnings, bool* ok = null); |
186 |
186 |
187 extern QList<LDDocument*> g_loadedFiles; |
187 extern QList<LDDocument*> g_loadedFiles; |
188 |
188 |
189 inline const QList<LDObject*>& selection() |
189 inline const QList<LDObject*>& selection() |
190 { |
190 { |