shun-iwasawa 5b2332
#pragma once
shun-iwasawa 5b2332
#ifndef TEXTAWAREBASEFX_H
shun-iwasawa 5b2332
#define TEXTAWAREBASEFX_H
shun-iwasawa 5b2332
shun-iwasawa 5b2332
#include "tfxparam.h"
shun-iwasawa 5b2332
#include "stdfx.h"
shun-iwasawa 5b2332
shun-iwasawa 5b2332
class TextAwareBaseFx : public TStandardZeraryFx {
shun-iwasawa 5b2332
protected:
shun-iwasawa 5b2332
  QString m_noteLevelStr;
shun-iwasawa 5b2332
shun-iwasawa 5b2332
  TIntEnumParamP m_targetType;
shun-iwasawa 5b2332
  TIntParamP m_columnIndex;
shun-iwasawa 5b2332
shun-iwasawa 5b2332
public:
shun-iwasawa 5b2332
  enum SourceType { NEARBY_COLUMN, SPECIFIED_COLUMN, INPUT_TEXT };
shun-iwasawa 5b2332
shun-iwasawa 5b2332
  TextAwareBaseFx()
shun-iwasawa 5b2332
      : m_targetType(new TIntEnumParam(NEARBY_COLUMN, "Nearby Note Column"))
shun-iwasawa 5b2332
      , m_columnIndex(0) {
shun-iwasawa 5b2332
    m_targetType->addItem(SPECIFIED_COLUMN, "Specified Note Column");
shun-iwasawa 5b2332
    m_targetType->addItem(INPUT_TEXT, "Input Text");
shun-iwasawa 5b2332
  }
shun-iwasawa 5b2332
shun-iwasawa 5b2332
  bool isZerary() const override { return true; }
shun-iwasawa 5b2332
shun-iwasawa 5b2332
  void setNoteLevelStr(QString str) { m_noteLevelStr = str; }
shun-iwasawa 5b2332
  SourceType getSourceType() { return (SourceType)(m_targetType->getValue()); }
shun-iwasawa 5b2332
  int getNoteColumnIndex() { return m_columnIndex->getValue() - 1; }
shun-iwasawa 5b2332
};
shun-iwasawa 5b2332
shun-iwasawa 5b2332
#endif