mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 17:05:36 -04:00
[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
2 changed files with 14 additions and 1 deletions
|
@ -18,6 +18,19 @@
|
|||
|
||||
#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
|
||||
LocaleModel::columnCount( const QModelIndex& ) const
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
#include "utils/CalamaresUtilsGui.h"
|
||||
|
||||
class LocaleModel : public QAbstractItemModel
|
||||
class LocaleModel : public QAbstractTableModel
|
||||
{
|
||||
public:
|
||||
LocaleModel( const QStringList& locales, QObject* parent = nullptr );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue