[welcome] Complete LocaleModel implementation
- It's a table with two columns (localized name and english name)
This commit is contained in:
parent
7f8411c3b7
commit
589168685e
@ -18,6 +18,19 @@
|
|||||||
|
|
||||||
#include "LocaleModel.h"
|
#include "LocaleModel.h"
|
||||||
|
|
||||||
|
LocaleModel::LocaleModel(const QStringList& locales, QObject* parent)
|
||||||
|
: QAbstractTableModel( parent )
|
||||||
|
{
|
||||||
|
m_locales.reserve( locales.count() );
|
||||||
|
|
||||||
|
for ( const auto& l : locales )
|
||||||
|
m_locales.emplace_back( l );
|
||||||
|
}
|
||||||
|
|
||||||
|
LocaleModel::~LocaleModel()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
LocaleModel::columnCount( const QModelIndex& ) const
|
LocaleModel::columnCount( const QModelIndex& ) const
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "utils/CalamaresUtilsGui.h"
|
#include "utils/CalamaresUtilsGui.h"
|
||||||
|
|
||||||
class LocaleModel : public QAbstractItemModel
|
class LocaleModel : public QAbstractTableModel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LocaleModel( const QStringList& locales, QObject* parent = nullptr );
|
LocaleModel( const QStringList& locales, QObject* parent = nullptr );
|
||||||
|
Loading…
Reference in New Issue
Block a user