-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
File can be specified in command line for import or opening at startu…
…p for issue #34
- Loading branch information
1 parent
2c2171e
commit 288e557
Showing
17 changed files
with
174 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include "Document.h" | ||
#include "LoadFileInfo.h" | ||
#include "Logger.h" | ||
#include <QUrl> | ||
|
||
LoadFileInfo::LoadFileInfo() | ||
{ | ||
} | ||
|
||
LoadFileInfo::~LoadFileInfo() | ||
{ | ||
} | ||
|
||
bool LoadFileInfo::loadsAsDigFile (const QString &urlString) const | ||
{ | ||
LOG4CPP_INFO_S ((*mainCat)) << "LoadFileInfo::loadsAsDigFile"; | ||
|
||
QString fileName = urlString; | ||
|
||
QUrl url (urlString); | ||
if (url.isLocalFile ()) { | ||
fileName = url.toLocalFile(); | ||
} | ||
|
||
Document document (fileName); | ||
|
||
return document.successfulRead(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef LOAD_FILE_INFO_H | ||
#define LOAD_FILE_INFO_H | ||
|
||
#include <QString> | ||
|
||
/// Returns information about files | ||
class LoadFileInfo | ||
{ | ||
public: | ||
/// Single constructor. | ||
LoadFileInfo(); | ||
virtual ~LoadFileInfo(); | ||
|
||
/// Returns true if specified file name can be loaded as a DIG file | ||
bool loadsAsDigFile (const QString &urlString) const; | ||
|
||
}; | ||
|
||
#endif // LOAD_FILE_INFO_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.