05fc3aef53
Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
32 lines
1.2 KiB
C++
32 lines
1.2 KiB
C++
// Copyright (C) 2016 The Qt Company Ltd.
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
|
#ifndef LOCALEMODEL_H
|
|
#define LOCALEMODEL_H
|
|
|
|
#include <QAbstractItemModel>
|
|
#include <QList>
|
|
#include <QVariant>
|
|
|
|
class LocaleModel : public QAbstractItemModel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
LocaleModel(QObject *parent = nullptr);
|
|
|
|
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
|
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
|
virtual QModelIndex index(int row, int column,
|
|
const QModelIndex &parent = QModelIndex()) const;
|
|
virtual QModelIndex parent(const QModelIndex &index) const;
|
|
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
|
virtual QVariant headerData(int section, Qt::Orientation orientation,
|
|
int role = Qt::DisplayRole ) const;
|
|
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
|
virtual bool setData(const QModelIndex &index, const QVariant &value,
|
|
int role = Qt::EditRole);
|
|
private:
|
|
QList<QVariant> m_data_list;
|
|
};
|
|
|
|
#endif // LOCALEMODEL_H
|