19 #include <QSortFilterProxyModel>
29 QString getName()
const {
return name_;}
30 pref_t* getPref()
const {
return pref_;}
31 int getPrefType()
const;
32 bool isPrefDefault()
const;
33 QString getPrefTypeName()
const;
34 module_t* getModule()
const {
return module_;}
35 QString getModuleName()
const;
36 QString getModuleTitle()
const;
37 void setChanged(
bool changed =
true);
54 explicit PrefsModel(QObject * parent = Q_NULLPTR);
58 Advanced = Qt::UserRole,
69 enum PrefsModelColumn {
77 QModelIndex index(
int row,
int column,
78 const QModelIndex & = QModelIndex())
const;
79 QModelIndex parent(
const QModelIndex &)
const;
80 QVariant data(
const QModelIndex &index,
int role)
const;
82 int rowCount(
const QModelIndex &parent = QModelIndex())
const;
83 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
85 static QString typeToString(
int type);
100 enum AdvancedPrefsModelColumn {
108 virtual bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const;
110 void setFilter(
const QString& filter);
112 QVariant headerData(
int section, Qt::Orientation orientation,
113 int role = Qt::DisplayRole)
const;
114 QVariant data(
const QModelIndex &index,
int role)
const;
115 Qt::ItemFlags flags(
const QModelIndex &index)
const;
116 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole);
118 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
121 void setFirstColumnSpanned(QTreeView* tree,
const QModelIndex &index = QModelIndex());
124 bool filterAcceptItem(
PrefsItem& item)
const;
129 const QChar passwordChar_;
138 enum ModulePrefsModelColumn {
143 enum ModulePrefsRoles {
144 ModuleName = Qt::UserRole + 1
147 QVariant data(
const QModelIndex &index,
int role)
const;
148 Qt::ItemFlags flags(
const QModelIndex &index)
const;
149 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
151 virtual bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const;
154 bool lessThan(
const QModelIndex &source_left,
const QModelIndex &source_right)
const;
158 QString advancedPrefName_;
161 extern pref_t *prefFromPrefPtr(
void *pref_ptr);
Definition: pref_models.h:94
Definition: tree_model_helpers.h:23
Definition: pref_models.h:133
Definition: pref_models.h:23
Definition: pref_models.h:50
Definition: prefs-int.h:27