Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Preprocess symbols of Filemanagement
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
// Own
|
||||
#include "flm_symbol_proxy.h"
|
||||
|
||||
namespace AdvancedSymbology
|
||||
{
|
||||
|
||||
FlmSymbolProxy::FlmSymbolProxy(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
bool FlmSymbolProxy::setSymbol(int32_t fileContentId, const SymbolData &symbolData)
|
||||
{
|
||||
m_imageMap[fileContentId] = symbolData;
|
||||
if (symbolData.isXmlSymbol())
|
||||
emit xmlSymbolAdded(fileContentId, symbolData.operatorName(), symbolData.lastModified(), symbolData.name(), symbolData.xmlContent(), symbolData.usrTags());
|
||||
else
|
||||
emit etsSymbolAdded(fileContentId, symbolData.name(), symbolData.image(), symbolData.colorToBeReplaced(), symbolData.usrTags());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FlmSymbolProxy::removeSymbol(qint32 fileContentId)
|
||||
{
|
||||
SymbolData symbolDat = m_imageMap[fileContentId];
|
||||
|
||||
bool ret = m_imageMap.remove(fileContentId) > 0;
|
||||
if (ret)
|
||||
{
|
||||
if (symbolDat.isXmlSymbol())
|
||||
emit xmlSymbolRemoved(fileContentId);
|
||||
else
|
||||
emit etsSymbolRemoved(fileContentId, symbolDat.name());
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // namespace AdvancedSymbology
|
||||
Reference in new issue
Block a user