summaryrefslogtreecommitdiffstats
path: root/tests/manual/qlocale/dateformats.h
blob: ddfc5d8548c5f7bca3e18168f8b5054441d9ea90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef DATEFORMATS_H
#define DATEFORMATS_H

#include <QWidget>
#include <QLocale>

class QLineEdit;
class QScrollArea;
class QGridLayout;
class QComboBox;

class DateFormatsWidget : public QWidget
{
    Q_OBJECT
public:
    DateFormatsWidget();

private:
    void addItem(const QString &label, QWidget *);
    QLineEdit *addItem(const QString &label);

    QScrollArea *scrollArea;
    QWidget *scrollAreaWidget;
    QGridLayout *layout;

    QLineEdit *shortDateFormat;
    QLineEdit *longDateFormat;
    QLineEdit *shortTimeFormat;
    QLineEdit *longTimeFormat;
    QLineEdit *shortDateTimeFormat;
    QLineEdit *longDateTimeFormat;
    QLineEdit *amText;
    QLineEdit *pmText;
    QLineEdit *firstDayOfWeek;
    QComboBox *monthNamesShort, *monthNamesLong;
    QComboBox *standaloneMonthNamesShort, *standaloneMonthNamesLong;
    QComboBox *dayNamesShort, *dayNamesLong;
    QComboBox *standaloneDayNamesShort, *standaloneDayNamesLong;

private slots:
    void localeChanged(QLocale locale);
};

#endif