Skip to content

Commit

Permalink
Add date EST/ABT annotation toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
DaoWen committed May 29, 2019
1 parent aca4915 commit 3fe2e25
Show file tree
Hide file tree
Showing 11 changed files with 132 additions and 71 deletions.
8 changes: 7 additions & 1 deletion inc/GDateEstimator.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class GDateEstimator {
//=== Constructor/Destructor ===//

/* Constructor */
GDateEstimator(GFTList & trees, const QString & defaultPlace, bool useAdoptions, bool useDeceasedOver110);
GDateEstimator(GFTList & trees, const QString & defaultPlace,
const QString & estimatedDatePrefix,
bool useAdoptions, bool useDeceasedOver110);

/* Destructor */
~GDateEstimator();
Expand All @@ -41,6 +43,10 @@ class GDateEstimator {
// Default location of birth, marriage and death
const QString & _defaultPlace;

// Prefix to add to estimated dates
// e.g., "ABT " or "EST "
const QString & _estimatedDatePrefix;

// Use adoptive relations while estimating?
const bool _useAdoptions;

Expand Down
2 changes: 1 addition & 1 deletion inc/GFamily.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class GFamily {
/* Sets a couple's estimated marriage
* year and updates the MARR DATE node value
*/
void setMarriageYear(const QDate & year);
void setMarriageYear(const QDate & year, const QString & datePrefix);

/* Sets the PLAC value for the MARR node
*/
Expand Down
2 changes: 1 addition & 1 deletion inc/GIndiEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class GIndiEntry {
/* Sets an individual's estimated birth
* year and updates the BIRT DATE node value
*/
void setBirthYear(const QDate & year);
void setBirthYear(const QDate & year, const QString & datePrefix);

/* Sets the PLAC value for the BIRT node
*/
Expand Down
7 changes: 7 additions & 0 deletions inc/MainMenuBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Q_OBJECT // Qt Library Macro
/* Should add DECEASED annotation for people over 110 years old? */
bool usingDeceasedOver110();

/* Should add EST annotation for estimated dates?
* Using ABT otherwise.
*/
bool markingEstimated();


private:

//=== Private Data Members ===//
Expand All @@ -62,6 +68,7 @@ Q_OBJECT // Qt Library Macro
QAction * _viewTreeAct;
QAction * _useAdoptionsToggleAct;
QAction * _useDeceasedOver110ToggleAct;
QAction * _markingEstimated;
QAction * _estimateDatesAct;

// Language Menu
Expand Down
69 changes: 42 additions & 27 deletions lang/GedTools_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,44 +198,59 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="83"/>
<location filename="../src/MainMenuBar.cpp" line="96"/>
<location filename="../src/MainMenuBar.cpp" line="72"/>
<source>&amp;Mark estimated dates with &quot;EST&quot;</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="75"/>
<source>Mark estimated dates with &quot;EST&quot; rather than &quot;ABT&quot;.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="76"/>
<source>Ctrl+M</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="90"/>
<location filename="../src/MainMenuBar.cpp" line="103"/>
<source>English</source>
<comment>Current Language Name</comment>
<translation>English</translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="105"/>
<location filename="../src/MainMenuBar.cpp" line="112"/>
<source>&amp;Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="107"/>
<location filename="../src/MainMenuBar.cpp" line="114"/>
<source>Visit GedTools &amp;Website</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="108"/>
<location filename="../src/MainMenuBar.cpp" line="115"/>
<source>Go to the GedTools web page</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="112"/>
<location filename="../src/MainMenuBar.cpp" line="119"/>
<source>&amp;Report Bugs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="113"/>
<location filename="../src/MainMenuBar.cpp" line="120"/>
<source>Go to the GedTools bug report page</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="124"/>
<location filename="../src/MainMenuBar.cpp" line="131"/>
<source>&amp;About</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="125"/>
<location filename="../src/MainMenuBar.cpp" line="132"/>
<source>Information about GedTools</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -260,32 +275,32 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="72"/>
<location filename="../src/MainMenuBar.cpp" line="79"/>
<source>Estimate Missing Dates</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="73"/>
<location filename="../src/MainMenuBar.cpp" line="80"/>
<source>Calculate estimated values for missing dates</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="74"/>
<location filename="../src/MainMenuBar.cpp" line="81"/>
<source>Ctrl+E</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="118"/>
<location filename="../src/MainMenuBar.cpp" line="125"/>
<source>Allow GedTools to automatically check for newer versions</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="79"/>
<location filename="../src/MainMenuBar.cpp" line="86"/>
<source>&amp;Language</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainMenuBar.cpp" line="117"/>
<location filename="../src/MainMenuBar.cpp" line="124"/>
<source>Enable &amp;Automatic Update Checks</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -316,9 +331,9 @@
<message>
<location filename="../src/MainWindow.cpp" line="153"/>
<location filename="../src/MainWindow.cpp" line="213"/>
<location filename="../src/MainWindow.cpp" line="285"/>
<location filename="../src/MainWindow.cpp" line="309"/>
<location filename="../src/MainWindow.cpp" line="316"/>
<location filename="../src/MainWindow.cpp" line="286"/>
<location filename="../src/MainWindow.cpp" line="310"/>
<location filename="../src/MainWindow.cpp" line="317"/>
<source>Error</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -379,22 +394,22 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainWindow.cpp" line="308"/>
<location filename="../src/MainWindow.cpp" line="309"/>
<source>http://ouuuuch.phoenixteam.org/released/gedTools/</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainWindow.cpp" line="315"/>
<location filename="../src/MainWindow.cpp" line="316"/>
<source>http://ouuuuch.phoenixteam.org/bugs/?prog=GedTools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainWindow.cpp" line="336"/>
<location filename="../src/MainWindow.cpp" line="337"/>
<source>About GedTools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainWindow.cpp" line="336"/>
<location filename="../src/MainWindow.cpp" line="337"/>
<source>GedTools v%1
Copyright © 2009-%2 Nick Vrvilo
http://ouuuuch.phoenixteam.org/
Expand All @@ -416,7 +431,7 @@ fill in blank birth, marriage and death places:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainWindow.cpp" line="282"/>
<location filename="../src/MainWindow.cpp" line="283"/>
<source>%1 new dates were added</source>
<translation type="unfinished"></translation>
</message>
Expand All @@ -426,19 +441,19 @@ fill in blank birth, marriage and death places:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainWindow.cpp" line="353"/>
<location filename="../src/MainWindow.cpp" line="354"/>
<source>Update</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainWindow.cpp" line="354"/>
<location filename="../src/MainWindow.cpp" line="355"/>
<source>A new version of GedTools is available for download.
Would you like to visit the GedTools website?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/MainWindow.cpp" line="309"/>
<location filename="../src/MainWindow.cpp" line="316"/>
<location filename="../src/MainWindow.cpp" line="310"/>
<location filename="../src/MainWindow.cpp" line="317"/>
<source>Failed to open web browser</source>
<translation type="unfinished"></translation>
</message>
Expand Down
Loading

0 comments on commit 3fe2e25

Please sign in to comment.