diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
commit | d24f813f3f2a05c112e803e4256b53535895fc98 (patch) | |
tree | 601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/dictionary/Field.cpp |
Diffstat (limited to 'src/dictionary/Field.cpp')
-rw-r--r-- | src/dictionary/Field.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/dictionary/Field.cpp b/src/dictionary/Field.cpp new file mode 100644 index 0000000..5992ac0 --- /dev/null +++ b/src/dictionary/Field.cpp @@ -0,0 +1,18 @@ +#include "Field.h" + +Field::Field( QString aName, QString aStyle ): + m_name( aName ) + { + if( aStyle.isEmpty() ) + m_style = FieldStyleFactory::DefaultStyle; + else + m_style = aStyle; + } + +void Field::setName( const QString aName ) + { + // Save the first original name + if( m_oldName.isEmpty() ) + m_oldName = m_name; + m_name = aName; + } |