-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add recent imports to File menu for convenience
- Loading branch information
1 parent
b9e0ceb
commit fc2fba7
Showing
19 changed files
with
391 additions
and
89 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#include "importexportresult.h" | ||
|
||
ImportExportResult::ImportExportResult() | ||
{ | ||
|
||
} | ||
|
||
ImportExportResult* ImportExportResult::setContainer(QSharedPointer<BitContainer> container) | ||
{ | ||
m_container = container; | ||
return this; | ||
} | ||
|
||
QSharedPointer<BitContainer> ImportExportResult::getContainer() const | ||
{ | ||
return m_container; | ||
} | ||
|
||
ImportExportResult* ImportExportResult::setPluginState(QJsonObject pluginState) | ||
{ | ||
m_pluginState = pluginState; | ||
return this; | ||
} | ||
|
||
const QJsonObject ImportExportResult::getPluginState() const | ||
{ | ||
return m_pluginState; | ||
} | ||
|
||
|
||
QSharedPointer<ImportExportResult> ImportExportResult::nullResult() | ||
{ | ||
return QSharedPointer<ImportExportResult>(); | ||
} | ||
|
||
QSharedPointer<ImportExportResult> ImportExportResult::error(QString error) | ||
{ | ||
QJsonObject pluginState; | ||
pluginState.insert("error", error); | ||
return QSharedPointer<ImportExportResult>((new ImportExportResult())->setPluginState(pluginState)); | ||
} | ||
|
||
QSharedPointer<ImportExportResult> ImportExportResult::create(QSharedPointer<BitContainer> container, QJsonObject pluginState) | ||
{ | ||
return QSharedPointer<ImportExportResult>((new ImportExportResult())->setContainer(container)->setPluginState(pluginState)); | ||
} | ||
|
||
QSharedPointer<ImportExportResult> ImportExportResult::create(QJsonObject pluginState) | ||
{ | ||
return QSharedPointer<ImportExportResult>((new ImportExportResult())->setPluginState(pluginState)); | ||
} |
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 @@ | ||
#ifndef IMPORTEXPORTRESULT_H | ||
#define IMPORTEXPORTRESULT_H | ||
|
||
#include "bitcontainer.h" | ||
#include <QJsonObject> | ||
|
||
class ImportExportResult | ||
{ | ||
public: | ||
ImportExportResult(); | ||
|
||
ImportExportResult* setContainer(QSharedPointer<BitContainer> container); | ||
QSharedPointer<BitContainer> getContainer() const; | ||
|
||
ImportExportResult* setPluginState(QJsonObject pluginState); | ||
const QJsonObject getPluginState() const; | ||
|
||
static QSharedPointer<ImportExportResult> nullResult(); | ||
static QSharedPointer<ImportExportResult> error(QString error); | ||
static QSharedPointer<ImportExportResult> create(QSharedPointer<BitContainer> container, QJsonObject pluginState); | ||
static QSharedPointer<ImportExportResult> create(QJsonObject pluginState); | ||
|
||
private: | ||
QSharedPointer<BitContainer> m_container; | ||
QJsonObject m_pluginState; | ||
}; | ||
|
||
#endif // IMPORTEXPORTRESULT_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
Oops, something went wrong.