mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-07-03 03:36:10 +00:00
CStringListModel: Make use of in-class initializers where applicable
This commit is contained in:
parent
d2552423f3
commit
ad1b285e2b
@ -9,7 +9,6 @@ CStringListModel::CStringListModel(CStringEditor* pInEditor)
|
|||||||
: QAbstractListModel(pInEditor)
|
: QAbstractListModel(pInEditor)
|
||||||
, mpEditor(pInEditor)
|
, mpEditor(pInEditor)
|
||||||
, mpStringTable(pInEditor->StringTable())
|
, mpStringTable(pInEditor->StringTable())
|
||||||
, mStringPreviewLanguage(ELanguage::English)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,25 +17,25 @@ class CStringListModel : public QAbstractListModel
|
|||||||
TResPtr<CStringTable> mpStringTable;
|
TResPtr<CStringTable> mpStringTable;
|
||||||
|
|
||||||
/** Language to use for the string preview for modes that support it */
|
/** Language to use for the string preview for modes that support it */
|
||||||
ELanguage mStringPreviewLanguage;
|
ELanguage mStringPreviewLanguage{ELanguage::English};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CStringListModel(CStringEditor* pInEditor);
|
explicit CStringListModel(CStringEditor* pInEditor);
|
||||||
|
|
||||||
/** Change the preview language display */
|
/** Change the preview language display */
|
||||||
void SetPreviewLanguage(ELanguage InLanguage);
|
void SetPreviewLanguage(ELanguage InLanguage);
|
||||||
|
|
||||||
/** QAbstractListModel interface */
|
/** QAbstractListModel interface */
|
||||||
virtual int rowCount(const QModelIndex& kParent) const override;
|
int rowCount(const QModelIndex& kParent) const override;
|
||||||
virtual QVariant data(const QModelIndex& kIndex, int Role) const override;
|
QVariant data(const QModelIndex& kIndex, int Role) const override;
|
||||||
virtual Qt::ItemFlags flags(const QModelIndex& kIndex) const override;
|
Qt::ItemFlags flags(const QModelIndex& kIndex) const override;
|
||||||
|
|
||||||
/** Drag & Drop support */
|
/** Drag & Drop support */
|
||||||
virtual Qt::DropActions supportedDragActions() const override;
|
Qt::DropActions supportedDragActions() const override;
|
||||||
virtual Qt::DropActions supportedDropActions() const override;
|
Qt::DropActions supportedDropActions() const override;
|
||||||
virtual QMimeData* mimeData(const QModelIndexList& kIndexes) const override;
|
QMimeData* mimeData(const QModelIndexList& kIndexes) const override;
|
||||||
virtual bool canDropMimeData(const QMimeData* pkData, Qt::DropAction Action, int Row, int Column, const QModelIndex& kParent) const override;
|
bool canDropMimeData(const QMimeData* pkData, Qt::DropAction Action, int Row, int Column, const QModelIndex& kParent) const override;
|
||||||
virtual bool dropMimeData(const QMimeData* pkData, Qt::DropAction Action, int Row, int Column, const QModelIndex& kParent) override;
|
bool dropMimeData(const QMimeData* pkData, Qt::DropAction Action, int Row, int Column, const QModelIndex& kParent) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CSTRINGLISTMODEL_H
|
#endif // CSTRINGLISTMODEL_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user