forked from 7h0ma5/QLog
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed #573 - Setting dialog contains a 12/24 Time Format option
- Loading branch information
Showing
8 changed files
with
136 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
#ifndef QLOG_CORE_LOGLOCALE_H | ||
#define QLOG_CORE_LOGLOCALE_H | ||
|
||
#include <QSettings> | ||
#include <QLocale> | ||
#include <QRegularExpression> | ||
|
||
class LogLocale : public QLocale | ||
{ | ||
public: | ||
LogLocale(); | ||
|
||
QString formatTimeLongWithoutTZ() const; | ||
QString formatTimeShort() const; | ||
QString formatTimeLong() const; | ||
QString formatDateShortWithYYYY() const; | ||
QString formatDateTimeShortWithYYYY() const; | ||
bool getSettingUse24hformat() const; | ||
void setSettingUse24hformat(bool value); | ||
|
||
private: | ||
const QRegularExpression regexp; | ||
bool is24hUsed; | ||
QSettings settings; | ||
|
||
void changeTime12_24Format(QString &formatString) const; | ||
}; | ||
|
||
#endif // QLOG_CORE_LOGLOCALE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters