mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-10-13 06:03:37 +02:00
2021-08-11 Fred Gleason <fredg@paravelsystems.com>
* Removed the 'SYSTEM.TIME_FORMAT' field from the database. * Added a 'SYSTEM.SHOW_TWELVE_HOUR_TIME' field to the database. * Incremented the database version 352. * Added 'RDSystem::showTwelveHourTime()' and 'RDSystem::setShowTwelveHourTime()' methods. * Refactored 'RDTimeEdit' to support 12 hour time format. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
@@ -229,15 +229,15 @@ void RDSystem::setShortDateFormat(const QString &str)
|
||||
}
|
||||
|
||||
|
||||
QString RDSystem::timeFormat() const
|
||||
bool RDSystem::showTwelveHourTime() const
|
||||
{
|
||||
return GetValue("TIME_FORMAT").toString();
|
||||
return RDBool(GetValue("SHOW_TWELVE_HOUR_TIME").toString());
|
||||
}
|
||||
|
||||
|
||||
void RDSystem::setTimeFormat(const QString &str)
|
||||
void RDSystem::setShowTwelveHourTime(bool state) const
|
||||
{
|
||||
SetRow("TIME_FORMAT",str);
|
||||
SetRow("SHOW_TWELVE_HOUR_TIME",RDYesNo(state));
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ QString RDSystem::xml() const
|
||||
xml+=RDXmlField("tempCartGroup",tempCartGroup());
|
||||
xml+=RDXmlField("longDateFormat",longDateFormat());
|
||||
xml+=RDXmlField("shortDateFormat",shortDateFormat());
|
||||
xml+=RDXmlField("timeFormat",timeFormat());
|
||||
xml+=RDXmlField("showTwelveHourTime",showTwelveHourTime());
|
||||
xml+="</systemSettings>\n";
|
||||
|
||||
return xml;
|
||||
|
Reference in New Issue
Block a user