Skip to content
Permalink
Browse files

Update all FileListInfo uses to the proper subclass.

Signed-off-by: Joey Kleingers <joey.kleingers@bluequartz.net>
  • Loading branch information
joeykleingers committed Nov 26, 2019
1 parent e865f71 commit 8697f96f874ef63b1cfd07141b9df77c88b417cf
@@ -384,13 +384,13 @@ QString ImportAvxmMDSim::ClassName()
}

// -----------------------------------------------------------------------------
void ImportAvxmMDSim::setInputFileListInfo(const FileListInfo_t& value)
void ImportAvxmMDSim::setInputFileListInfo(const StackFileListInfo& value)
{
m_InputFileListInfo = value;
}

// -----------------------------------------------------------------------------
FileListInfo_t ImportAvxmMDSim::getInputFileListInfo() const
StackFileListInfo ImportAvxmMDSim::getInputFileListInfo() const
{
return m_InputFileListInfo;
}
@@ -7,6 +7,7 @@
#include <memory>

#include "SIMPLib/FilterParameters/FileListInfoFilterParameter.h"
#include "SIMPLib/FilterParameters/StackFileListInfo.h"
#include "SIMPLib/Filtering/AbstractFilter.h"
#include "SIMPLib/SIMPLib.h"

@@ -58,14 +59,14 @@ class ImportExport_EXPORT ImportAvxmMDSim : public AbstractFilter
/**
* @brief Setter property for InputFileListInfo
*/
void setInputFileListInfo(const FileListInfo_t& value);
void setInputFileListInfo(const StackFileListInfo& value);
/**
* @brief Getter property for InputFileListInfo
* @return Value of InputFileListInfo
*/
FileListInfo_t getInputFileListInfo() const;
StackFileListInfo getInputFileListInfo() const;

Q_PROPERTY(FileListInfo_t InputFileListInfo READ getInputFileListInfo WRITE setInputFileListInfo)
Q_PROPERTY(StackFileListInfo InputFileListInfo READ getInputFileListInfo WRITE setInputFileListInfo)

/**
* @brief Setter property for SeparatorChoice
@@ -176,7 +177,7 @@ class ImportExport_EXPORT ImportAvxmMDSim : public AbstractFilter
void initialize();

private:
FileListInfo_t m_InputFileListInfo = {};
StackFileListInfo m_InputFileListInfo = {};
int m_SeparatorChoice = {};

QVector<QString> m_FilePathList;
@@ -51,7 +51,7 @@ EbsdMontageImportFilterParameter::~EbsdMontageImportFilterParameter() = default;
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
EbsdMontageImportFilterParameter::Pointer EbsdMontageImportFilterParameter::New(const QString& humanLabel, const QString& propertyName, const EbsdMontageListInfo& defaultValue,
EbsdMontageImportFilterParameter::Pointer EbsdMontageImportFilterParameter::New(const QString& humanLabel, const QString& propertyName, const MontageFileListInfo& defaultValue,
FilterParameter::Category category, SetterCallbackType setterCallback, GetterCallbackType getterCallback)
{

@@ -85,7 +85,7 @@ void EbsdMontageImportFilterParameter::readJson(const QJsonObject& json)
if(!jsonValue.isUndefined() && m_SetterCallback)
{
QJsonObject jsonObj = jsonValue.toObject();
EbsdMontageListInfo fileListInfo;
MontageFileListInfo fileListInfo;
fileListInfo.readJson(jsonObj);
m_SetterCallback(fileListInfo);
}
@@ -98,7 +98,7 @@ void EbsdMontageImportFilterParameter::writeJson(QJsonObject& json)
{
if(m_GetterCallback)
{
EbsdMontageListInfo fileListInfo = m_GetterCallback();
MontageFileListInfo fileListInfo = m_GetterCallback();
QJsonObject jsonObj;
fileListInfo.writeJson(jsonObj);
json[getPropertyName()] = jsonObj;
@@ -40,11 +40,10 @@
#include <QtCore/QJsonObject>
#include <QtCore/QString>

#include "SIMPLib/FilterParameters/MontageFileListInfo.h"
#include "SIMPLib/FilterParameters/FilterParameter.h"
#include "SIMPLib/SIMPLib.h"

#include "OrientationAnalysis/FilterParameters/EbsdMontageListInfo.h"

/**
* @brief SIMPL_NEW_EbsdMontageListInfo_FP This macro is a short-form way of instantiating an instance of
* EbsdMontageImportFilterParameter. There are 4 required parameters that are always passed to this macro
@@ -84,8 +83,8 @@ class EbsdMontageImportFilterParameter : public FilterParameter
*/
static QString ClassName();

using SetterCallbackType = std::function<void(EbsdMontageListInfo)>;
using GetterCallbackType = std::function<EbsdMontageListInfo(void)>;
using SetterCallbackType = std::function<void(MontageFileListInfo)>;
using GetterCallbackType = std::function<MontageFileListInfo(void)>;

/**
* @brief New This function instantiates an instance of the EbsdMontageImportFilterParameter. Although this
@@ -103,7 +102,7 @@ class EbsdMontageImportFilterParameter : public FilterParameter
* that this FilterParameter subclass represents.
* @return
*/
static Pointer New(const QString& humanLabel, const QString& propertyName, const EbsdMontageListInfo& defaultValue, Category category, SetterCallbackType setterCallback,
static Pointer New(const QString& humanLabel, const QString& propertyName, const MontageFileListInfo& defaultValue, Category category, SetterCallbackType setterCallback,
GetterCallbackType getterCallback);

~EbsdMontageImportFilterParameter() override;

This file was deleted.

This file was deleted.

@@ -12,7 +12,6 @@ set (${PLUGIN_NAME}_FilterParameters_SRCS
${${PLUGIN_NAME}_SOURCE_DIR}/FilterParameters/ReadH5EbsdFilterParameter.cpp
${${PLUGIN_NAME}_SOURCE_DIR}/FilterParameters/OrientationUtilityFilterParameter.cpp
${${PLUGIN_NAME}_SOURCE_DIR}/FilterParameters/EbsdMontageImportFilterParameter.cpp
${${PLUGIN_NAME}_SOURCE_DIR}/FilterParameters/EbsdMontageListInfo.cpp
)

set (${PLUGIN_NAME}_FilterParameters_HDRS
@@ -23,6 +22,5 @@ set (${PLUGIN_NAME}_FilterParameters_HDRS
${${PLUGIN_NAME}_SOURCE_DIR}/FilterParameters/ReadH5EbsdFilterParameter.h
${${PLUGIN_NAME}_SOURCE_DIR}/FilterParameters/OrientationUtilityFilterParameter.h
${${PLUGIN_NAME}_SOURCE_DIR}/FilterParameters/EbsdMontageImportFilterParameter.h
${${PLUGIN_NAME}_SOURCE_DIR}/FilterParameters/EbsdMontageListInfo.h
)
cmp_IDE_SOURCE_PROPERTIES( "FilterParameters" "${${PLUGIN_NAME}_FilterParameters_HDRS}" "${${PLUGIN_NAME}_FilterParameters_SRCS}" "${PROJECT_INSTALL_HEADERS}")
@@ -278,7 +278,7 @@ void EbsdMontageImportWidget::getGuiParametersFromFilter()
{
blockSignals(true);

EbsdMontageListInfo data = getFilter()->property(PROPERTY_NAME_AS_CHAR).value<EbsdMontageListInfo>();
MontageFileListInfo data = getFilter()->property(PROPERTY_NAME_AS_CHAR).value<MontageFileListInfo>();

m_Ui->inputDir->setText(data.InputPath);
setValidFilePath(data.InputPath);
@@ -437,7 +437,7 @@ void EbsdMontageImportWidget::filterNeedsInputParameters(AbstractFilter* filter)
SIMPLDataPathValidator* validator = SIMPLDataPathValidator::Instance();
QString inputPath = validator->convertToAbsolutePath(m_Ui->inputDir->text());

EbsdMontageListInfo data;
MontageFileListInfo data;
data.IncrementIndex = m_Ui->increment->value();
data.RowStart = m_Ui->rowStart->value();
data.RowEnd = m_Ui->rowEnd->value() + 1;
@@ -498,13 +498,13 @@ QString ImportEbsdMontage::getCellAttributeMatrixName() const
}

// -----------------------------------------------------------------------------
void ImportEbsdMontage::setInputFileListInfo(const EbsdMontageListInfo& value)
void ImportEbsdMontage::setInputFileListInfo(const MontageFileListInfo& value)
{
m_InputFileListInfo = value;
}

// -----------------------------------------------------------------------------
EbsdMontageListInfo ImportEbsdMontage::getInputFileListInfo() const
MontageFileListInfo ImportEbsdMontage::getInputFileListInfo() const
{
return m_InputFileListInfo;
}
@@ -42,9 +42,9 @@

#include "SIMPLib/SIMPLib.h"
#include "SIMPLib/Filtering/AbstractFilter.h"
#include "SIMPLib/FilterParameters/MontageFileListInfo.h"

#include "OrientationAnalysis/FilterParameters/EbsdMontageImportFilterParameter.h"
#include "OrientationAnalysis/FilterParameters/EbsdMontageListInfo.h"

#include "OrientationAnalysis/OrientationAnalysisDLLExport.h"

@@ -143,13 +143,13 @@ class OrientationAnalysis_EXPORT ImportEbsdMontage : public AbstractFilter
/**
* @brief Setter property for InputFileListInfo
*/
void setInputFileListInfo(const EbsdMontageListInfo& value);
void setInputFileListInfo(const MontageFileListInfo& value);
/**
* @brief Getter property for InputFileListInfo
* @return Value of InputFileListInfo
*/
EbsdMontageListInfo getInputFileListInfo() const;
Q_PROPERTY(EbsdMontageListInfo InputFileListInfo READ getInputFileListInfo WRITE setInputFileListInfo)
MontageFileListInfo getInputFileListInfo() const;
Q_PROPERTY(MontageFileListInfo InputFileListInfo READ getInputFileListInfo WRITE setInputFileListInfo)

/**
* @brief Setter property for GenerateIPFColorMap
@@ -273,7 +273,7 @@ class OrientationAnalysis_EXPORT ImportEbsdMontage : public AbstractFilter
DataArrayPath m_DataContainerName = {};
QString m_CellEnsembleAttributeMatrixName = {};
QString m_CellAttributeMatrixName = {};
EbsdMontageListInfo m_InputFileListInfo = {};
MontageFileListInfo m_InputFileListInfo = {};

std::map<QString, AbstractFilter::Pointer> m_FilterCache;
FloatVec3Type m_ReferenceDir = {0.0f, 0.0f, 1.0f};

0 comments on commit 8697f96

Please sign in to comment.
You can’t perform that action at this time.