mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-09 17:32:26 -04:00
Automate counting of rows in the Modes model
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6725 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
6eb55cee68
commit
3a0602711c
@ -23,6 +23,7 @@ public:
|
|||||||
ISCAT,
|
ISCAT,
|
||||||
JTMSK,
|
JTMSK,
|
||||||
MSK144,
|
MSK144,
|
||||||
|
MODES_END_SENTINAL_AND_COUNT // this must be last
|
||||||
};
|
};
|
||||||
Q_ENUM (Mode)
|
Q_ENUM (Mode)
|
||||||
|
|
||||||
@ -34,7 +35,7 @@ public:
|
|||||||
// Implement the QAbstractListModel interface
|
// Implement the QAbstractListModel interface
|
||||||
int rowCount (QModelIndex const& parent = QModelIndex {}) const override
|
int rowCount (QModelIndex const& parent = QModelIndex {}) const override
|
||||||
{
|
{
|
||||||
return parent.isValid () ? 0 : 8; // Number of modes in Mode enumeration class
|
return parent.isValid () ? 0 : MODES_END_SENTINAL_AND_COUNT; // Number of modes in Mode enumeration class
|
||||||
}
|
}
|
||||||
QVariant data (QModelIndex const&, int role = Qt::DisplayRole) const override;
|
QVariant data (QModelIndex const&, int role = Qt::DisplayRole) const override;
|
||||||
QVariant headerData (int section, Qt::Orientation, int = Qt::DisplayRole) const override;
|
QVariant headerData (int section, Qt::Orientation, int = Qt::DisplayRole) const override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user