diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-31 21:02:04 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-02 15:38:18 +0100 |
| commit | f2d8469ed6cd0fafc22097cdba2ee8f325f00513 (patch) | |
| tree | cd61150c0187a93f1b68602a26d1d501c4d67ed7 /src/modelutils.h | |
| parent | 8dffe65032c498a218079f941d88af6053b28d7f (diff) | |
Start moving stuff from MainWindow to PluginListView.
Diffstat (limited to 'src/modelutils.h')
| -rw-r--r-- | src/modelutils.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modelutils.h b/src/modelutils.h new file mode 100644 index 00000000..f355c0d6 --- /dev/null +++ b/src/modelutils.h @@ -0,0 +1,14 @@ +#ifndef MODELUTILS_H +#define MODELUTILS_H + +#include <QAbstractItemView> +#include <QAbstractItemModel> + +// convert back-and-forth through model proxies +QModelIndex indexModelToView(const QModelIndex& index, const QAbstractItemView* view); +QModelIndexList indexModelToView(const QModelIndexList& index, const QAbstractItemView* view); +QModelIndex indexViewToModel(const QModelIndex& index, const QAbstractItemModel* model); +QModelIndexList indexViewToModel(const QModelIndexList& index, const QAbstractItemModel* model); + + +#endif |
