1 #pragma once
2 #ifndef TEXTAWAREBASEFX_H
3 #define TEXTAWAREBASEFX_H
4 
5 #include "tfxparam.h"
6 #include "stdfx.h"
7 
8 class TextAwareBaseFx : public TStandardZeraryFx {
9 protected:
10   QString m_noteLevelStr;
11 
12   TIntEnumParamP m_targetType;
13   TIntParamP m_columnIndex;
14 
15 public:
16   enum SourceType { NEARBY_COLUMN, SPECIFIED_COLUMN, INPUT_TEXT };
17 
TextAwareBaseFx()18   TextAwareBaseFx()
19       : m_targetType(new TIntEnumParam(NEARBY_COLUMN, "Nearby Note Column"))
20       , m_columnIndex(0) {
21     m_targetType->addItem(SPECIFIED_COLUMN, "Specified Note Column");
22     m_targetType->addItem(INPUT_TEXT, "Input Text");
23   }
24 
isZerary()25   bool isZerary() const override { return true; }
26 
setNoteLevelStr(QString str)27   void setNoteLevelStr(QString str) { m_noteLevelStr = str; }
getSourceType()28   SourceType getSourceType() { return (SourceType)(m_targetType->getValue()); }
getNoteColumnIndex()29   int getNoteColumnIndex() { return m_columnIndex->getValue() - 1; }
30 };
31 
32 #endif
33