Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
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 "
UrlDirty.h
"
11
12
LoadFileInfo::LoadFileInfo
()
13
{
14
}
15
16
LoadFileInfo::~LoadFileInfo
()
17
{
18
}
19
20
bool
LoadFileInfo::loadsAsDigFile
(
const
QString &urlString)
const
21
{
22
qCInfo(ENGAUGE_LOG) <<
"LoadFileInfo::loadsAsDigFile"
;
23
24
bool
success =
false
;
25
26
if
(urlString.length() > 0) {
27
28
QString fileName = urlString;
29
30
UrlDirty
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.h
LoadFileInfo.h
Logger.h
UrlDirty.h
Document
Storage of one imported image and the data attached to that image.
Definition
Document.h:44
Document::successfulRead
bool successfulRead() const
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will ex...
Definition
Document.cpp:1102
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
LoadFileInfo::~LoadFileInfo
virtual ~LoadFileInfo()
Definition
LoadFileInfo.cpp:16
LoadFileInfo::LoadFileInfo
LoadFileInfo()
Single constructor.
Definition
LoadFileInfo.cpp:12
UrlDirty
Adds ability to QUrl to cleanup url path.
Definition
UrlDirty.h:16
UrlDirty::toLocalFile
QString toLocalFile() const
Override method to get string value to remove trailing whitepace.
Definition
UrlDirty.cpp:18
Generated on
for Engauge Digitizer by
1.17.0