mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
2c06cb027f
Add a combo-box in place of the single line text field and support some pre-defined date formats, such as: MM/dd/yyyy Each long format has a corresponding short variant stored in the QMap dateFormatShortMap and it's updated automatically once the user selects a combo box item for the long format. The regex for dates is slighly modified: [^dMy/\\s:;\\.,\\-] The user is still allowed to enter custom long / short date foramats. Fixes #276 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
26 lines
551 B
C++
26 lines
551 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef PREFERENCES_LANGUAGE_H
|
|
#define PREFERENCES_LANGUAGE_H
|
|
|
|
#include <QMap>
|
|
#include "abstractpreferenceswidget.h"
|
|
|
|
namespace Ui {
|
|
class PreferencesLanguage;
|
|
}
|
|
|
|
class PreferencesLanguage : public AbstractPreferencesWidget {
|
|
Q_OBJECT
|
|
public:
|
|
PreferencesLanguage();
|
|
virtual ~PreferencesLanguage();
|
|
virtual void refreshSettings();
|
|
virtual void syncSettings();
|
|
private:
|
|
Ui::PreferencesLanguage *ui;
|
|
QMap<QString, QString> dateFormatShortMap;
|
|
public slots:
|
|
void dateFormatChanged(const QString&);
|
|
};
|
|
|
|
#endif
|