Engauge Digitizer  2
LoadFileInfo.cpp
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #include "Document.h"
8 #include "LoadFileInfo.h"
9 #include "Logger.h"
10 #include <QUrl>
11 
13 {
14 }
15 
16 LoadFileInfo::~LoadFileInfo()
17 {
18 }
19 
20 bool LoadFileInfo::loadsAsDigFile (const QString &urlString) const
21 {
22  LOG4CPP_INFO_S ((*mainCat)) << "LoadFileInfo::loadsAsDigFile";
23 
24  QString fileName = urlString;
25 
26  QUrl url (urlString);
27  if (url.isLocalFile ()) {
28  fileName = url.toLocalFile();
29  }
30 
31  Document document (fileName);
32 
33  return document.successfulRead();
34 }
bool loadsAsDigFile(const QString &urlString) const
Returns true if specified file name can be loaded as a DIG file.
bool successfulRead() const
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will ex...
Definition: Document.cpp:1055
Storage of one imported image and the data attached to that image.
Definition: Document.h:41
LoadFileInfo()
Single constructor.