first reCommit
This commit is contained in:
41
model/xqselectionmodel.h
Normal file
41
model/xqselectionmodel.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/***************************************************************************
|
||||
|
||||
source::worx xtree
|
||||
Copyright © 2024-2025 c.holzheuer
|
||||
christoph.holzheuer@gmail.com
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
|
||||
#ifndef XQSELECTIONMODEL_H
|
||||
#define XQSELECTIONMODEL_H
|
||||
|
||||
#include <QItemSelectionModel>
|
||||
#include <QObject>
|
||||
|
||||
/**
|
||||
* @brief Extends QItemSelectionModel so that the selection is limited to a single section entry.
|
||||
*/
|
||||
|
||||
class XQSelectionModel : public QItemSelectionModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
XQSelectionModel(QAbstractItemModel* model = nullptr);
|
||||
XQSelectionModel(QAbstractItemModel* model, QObject* parent);
|
||||
virtual ~XQSelectionModel() = default;
|
||||
|
||||
public slots:
|
||||
|
||||
void select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command) override;
|
||||
|
||||
};
|
||||
|
||||
#endif // XQSELECTIONMODEL_H
|
Reference in New Issue
Block a user