Engauge Digitizer
2
Load
LoadFileInfo.cpp
Go to the documentation of this file.
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
12
LoadFileInfo::LoadFileInfo
()
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
bool
success =
false
;
25
26
if
(urlString.length() > 0) {
27
28
QString fileName = urlString;
29
30
QUrl url (urlString);
31
if
(url.isLocalFile ()) {
32
fileName = url.toLocalFile();
33
}
34
35
Document
document (fileName);
36
37
success = document.
successfulRead
();
38
}
39
40
return
success;
41
}
Document
Storage of one imported image and the data attached to that image.
Definition:
Document.h:40
Document.h
LoadFileInfo::~LoadFileInfo
virtual ~LoadFileInfo()
Definition:
LoadFileInfo.cpp:16
LoadFileInfo::LoadFileInfo
LoadFileInfo()
Single constructor.
Definition:
LoadFileInfo.cpp:12
LoadFileInfo.h
Logger.h
LOG4CPP_INFO_S
#define LOG4CPP_INFO_S(logger)
Definition:
convenience.h:18
LoadFileInfo::loadsAsDigFile
bool loadsAsDigFile(const QString &urlString) const
Returns true if specified file name can be loaded as a DIG file.
Definition:
LoadFileInfo.cpp:20
mainCat
log4cpp::Category * mainCat
Definition:
Logger.cpp:14
Document::successfulRead
bool successfulRead() const
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will ex...
Definition:
Document.cpp:1061
Generated on Sat Jan 4 2020 12:00:00 for Engauge Digitizer by
1.8.16