Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,81 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* FileManagement Explorer Interface for access from other Plugins
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Mike Wille, SLSE, 2017-03-31
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <FileManagement/flm_enums.hpp>
|
||||
#include <FileManagement/flm_dtc.h>
|
||||
#include <PluginInterfaces/topic_replay_interface.h>
|
||||
#include <TopicEditorBase/topic_editor_interface.h>
|
||||
|
||||
namespace FileManagement
|
||||
{
|
||||
// TODO: ForeignGuiInterface => ForeignExplorerGuiInterface
|
||||
class ForeignGuiInterface : public TopicReplay::Factory, public TopicEditorBase::Interface
|
||||
{
|
||||
public:
|
||||
ForeignGuiInterface() = default;
|
||||
virtual ~ForeignGuiInterface() = default;
|
||||
|
||||
static QString pluginName() { return QStringLiteral("FlmExplorerGuiPlugin"); }
|
||||
|
||||
// opens the file open dialog and directly downloads the file (if possible), returns the fileId
|
||||
virtual int loadFileContent(QWidget *parent,
|
||||
QByteArray &content,
|
||||
const QVector<FileType> &fileTypes,
|
||||
int exerciseId,
|
||||
const QString &xmlType = QString(),
|
||||
int initialFolderId = 0) = 0;
|
||||
|
||||
// only select file content, returns fileId
|
||||
virtual int selectFileContent(QWidget *parent,
|
||||
const QVector<FileType> &fileTypes,
|
||||
int exerciseId,
|
||||
int initialFolderId = 0) = 0;
|
||||
|
||||
|
||||
// save the content and optional properties, returns fileId
|
||||
virtual int saveFileContent(QWidget *parent,
|
||||
FileType targetFileType,
|
||||
int exerciseId,
|
||||
const QByteArray &content,
|
||||
int initialFolderId = 0,
|
||||
const QString &properties = QString()) = 0;
|
||||
|
||||
// load file content
|
||||
virtual bool loadContent(int fileId,
|
||||
QByteArray &content,
|
||||
bool bQuiet = false) = 0;
|
||||
|
||||
// overwrite content and properties for fileId
|
||||
virtual bool saveContent(int fileId,
|
||||
const QByteArray &content,
|
||||
const QString &properties = QString()) = 0;
|
||||
|
||||
// create new file content based on fc, returns fileId
|
||||
virtual int newFileContent(FileManagement::FileContent fc,
|
||||
const QByteArray &content) = 0;
|
||||
|
||||
// change status to deleted
|
||||
virtual bool deleteFileContent(int fileId) = 0;
|
||||
|
||||
// return fileId for a fileName
|
||||
virtual int getFileId(FileManagement::FileType fileType, const QString &fileName, int exId, int phId) const = 0;
|
||||
|
||||
// return fileName for a fileId (without using dtc)
|
||||
virtual QString getFileName(int fileId) const = 0;
|
||||
|
||||
// check if a xml content has key "XmlType" with value searchedType
|
||||
virtual bool isXmlType(const QByteArray &content, const QString &searchedType) const = 0;
|
||||
|
||||
// return the value of key XmlType, if exists
|
||||
virtual QString hasXmlType(const QByteArray &content) const = 0;
|
||||
};
|
||||
|
||||
} // namespace FileManagement
|
||||
Reference in new issue
Block a user