summaryrefslogtreecommitdiff
path: root/src/dictionary/Field.cpp
diff options
context:
space:
mode:
authorJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
committerJedidiah Barber <contact@jedbarber.id.au>2021-07-14 11:49:10 +1200
commitd24f813f3f2a05c112e803e4256b53535895fc98 (patch)
tree601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/dictionary/Field.cpp
Initial mirror commitHEADmaster
Diffstat (limited to 'src/dictionary/Field.cpp')
-rw-r--r--src/dictionary/Field.cpp18
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;
+ }