diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-16 12:37:12 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-16 12:57:29 +0200 |
| commit | 5a4967c577ad245a2117b7b2f71c13b1212fe285 (patch) | |
| tree | 4d09343cfe757239895a0dd9b399242d2a07d7c2 /item_delegates/CandidateKeyFilter.hpp | |
| parent | 23c903a09fb1d73fd20b50323cd80cfb3aba8799 (diff) | |
Merge 2.7 changes, I had uploaded -1 from the wrong branch.debian/3.0.0_rc1+repack-2
Diffstat (limited to 'item_delegates/CandidateKeyFilter.hpp')
| -rwxr-xr-x | item_delegates/CandidateKeyFilter.hpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/item_delegates/CandidateKeyFilter.hpp b/item_delegates/CandidateKeyFilter.hpp index 27f1892b..60801350 100755 --- a/item_delegates/CandidateKeyFilter.hpp +++ b/item_delegates/CandidateKeyFilter.hpp @@ -1,41 +1,41 @@ -#ifndef CANDIDATE_KEY_FILTER_HPP_ -#define CANDIDATE_KEY_FILTER_HPP_ - -#include <QSortFilterProxyModel> -#include <QModelIndex> - -#include "pimpl_h.hpp" - -class QAbstractItemModel; - -class CandidateKeyFilter final - : public QSortFilterProxyModel -{ -public: - explicit CandidateKeyFilter (QAbstractItemModel const * referenced_model - , int referenced_key_column - , QObject * parent = nullptr - , int referenced_key_role = Qt::EditRole); - explicit CandidateKeyFilter (QAbstractItemModel const * referenced_model - , QAbstractItemModel const * referencing_model - , int referenced_key_column - , int referencing_key_column - , QObject * parent = nullptr - , int referenced_key_role = Qt::EditRole - , int referencing_key_role = Qt::EditRole); - ~CandidateKeyFilter (); - - // this key is not to be filtered, usually because we want to allow - // it since we are editing the row that contains it this it is valid - // even though it is in use - void set_active_key (QModelIndex const& index = QModelIndex {}); - -protected: - bool filterAcceptsRow (int candidate_row, QModelIndex const& candidate_parent) const override; - -private: - class impl; - pimpl<impl> m_; -}; - -#endif +#ifndef CANDIDATE_KEY_FILTER_HPP_
+#define CANDIDATE_KEY_FILTER_HPP_
+
+#include <QSortFilterProxyModel>
+#include <QModelIndex>
+
+#include "pimpl_h.hpp"
+
+class QAbstractItemModel;
+
+class CandidateKeyFilter final
+ : public QSortFilterProxyModel
+{
+public:
+ explicit CandidateKeyFilter (QAbstractItemModel const * referenced_model
+ , int referenced_key_column
+ , QObject * parent = nullptr
+ , int referenced_key_role = Qt::EditRole);
+ explicit CandidateKeyFilter (QAbstractItemModel const * referenced_model
+ , QAbstractItemModel const * referencing_model
+ , int referenced_key_column
+ , int referencing_key_column
+ , QObject * parent = nullptr
+ , int referenced_key_role = Qt::EditRole
+ , int referencing_key_role = Qt::EditRole);
+ ~CandidateKeyFilter ();
+
+ // this key is not to be filtered, usually because we want to allow
+ // it since we are editing the row that contains it this it is valid
+ // even though it is in use
+ void set_active_key (QModelIndex const& index = QModelIndex {});
+
+protected:
+ bool filterAcceptsRow (int candidate_row, QModelIndex const& candidate_parent) const override;
+
+private:
+ class impl;
+ pimpl<impl> m_;
+};
+
+#endif
|
