formatting
This commit is contained in:
parent
0937fc21e7
commit
0a1c570ffd
@ -142,7 +142,8 @@ GenusModel::CheckableItems &GenusModel::getItems(const QModelIndex &index)
|
||||
throw std::runtime_error("invalid index");
|
||||
}
|
||||
|
||||
const GenusModel::CheckableItems &GenusModel::getItems(const QModelIndex &index) const
|
||||
const GenusModel::CheckableItems &GenusModel::getItems(
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
switch (index.row())
|
||||
{
|
||||
|
@ -40,37 +40,16 @@ class GenusModel : public QAbstractTableModel
|
||||
private:
|
||||
using CheckableItems = std::map<size_t, CheckableItem>;
|
||||
|
||||
CheckableItems m_tiere =
|
||||
{
|
||||
{0, {"Tiger"}},
|
||||
{1, {"Bär"}},
|
||||
{2, {"Katze"}},
|
||||
{3, {"Pferd"}},
|
||||
{4, {"Gans"}},
|
||||
{5, {"Elefant"}},
|
||||
{6, {"Katze"}},
|
||||
{7, {"Hund"}}
|
||||
};
|
||||
CheckableItems m_tiere = {{0, {"Tiger"}}, {1, {"Bär"}}, {2, {"Katze"}},
|
||||
{3, {"Pferd"}}, {4, {"Gans"}}, {5, {"Elefant"}}, {6, {"Katze"}},
|
||||
{7, {"Hund"}}};
|
||||
|
||||
CheckableItems m_futter =
|
||||
{
|
||||
{0, {"Salat"}},
|
||||
{1, {"Fleisch"}},
|
||||
{2, {"Knocken"}},
|
||||
{3, {"Banane"}},
|
||||
{4, {"Apfel"}},
|
||||
{5, {"Möhre"}},
|
||||
{6, {"Honig"}},
|
||||
{7, {"Zucker"}}
|
||||
};
|
||||
CheckableItems m_futter = {{0, {"Salat"}}, {1, {"Fleisch"}},
|
||||
{2, {"Knocken"}}, {3, {"Banane"}}, {4, {"Apfel"}}, {5, {"Möhre"}},
|
||||
{6, {"Honig"}}, {7, {"Zucker"}}};
|
||||
|
||||
CheckableItems m_zirkus =
|
||||
{
|
||||
{0, {"Kiste"}},
|
||||
{1, {"Holz"}},
|
||||
{2, {"Vorhang"}},
|
||||
{3, {"Baum"}}
|
||||
};
|
||||
CheckableItems m_zirkus = {
|
||||
{0, {"Kiste"}}, {1, {"Holz"}}, {2, {"Vorhang"}}, {3, {"Baum"}}};
|
||||
|
||||
public:
|
||||
GenusModel(QObject *parent);
|
||||
@ -97,4 +76,3 @@ private:
|
||||
CheckableItem &getItem(const QModelIndex &index);
|
||||
const CheckableItem &getItem(const QModelIndex &index) const;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user