19#include <QSortFilterProxyModel>
76 QModelIndex
index(
int row,
int column,
77 const QModelIndex &
parent = QModelIndex())
const;
93 QVariant data(
const QModelIndex &
index,
int role)
const;
268 virtual bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const;
294 QVariant
headerData(
int section, Qt::Orientation orientation,
295 int role = Qt::DisplayRole)
const;
304 QVariant data(
const QModelIndex &index,
int role)
const;
314 Qt::ItemFlags flags(
const QModelIndex &index)
const;
324 bool setData(
const QModelIndex &index,
const QVariant &value,
325 int role = Qt::EditRole);
332 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
355 bool show_changed_values_;
356 const QChar passwordChar_;
395 QVariant data(
const QModelIndex &index,
int role)
const;
403 Qt::ItemFlags flags(
const QModelIndex &index)
const;
410 int columnCount(
const QModelIndex &parent = QModelIndex())
const;
419 virtual bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const;
429 bool lessThan(
const QModelIndex &source_left,
const QModelIndex &source_right)
const;
434 QString advancedPrefName_;
Sort/filter proxy model for the Advanced Preferences pane.
Definition pref_models.h:237
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
Determine whether a source row should be included in the view.
Definition pref_models.cpp:722
void setFirstColumnSpanned(QTreeView *tree, const QModelIndex &index=QModelIndex())
Mark module-level rows as spanning all columns in tree.
Definition pref_models.cpp:653
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Write value to the preference at index.
Definition pref_models.cpp:527
AdvancedPrefsModelColumn
Column indices for the Advanced preferences view.
Definition pref_models.h:250
@ colStatus
Definition pref_models.h:252
@ colType
Definition pref_models.h:253
@ colName
Definition pref_models.h:251
@ colLast
Definition pref_models.h:255
@ colValue
Definition pref_models.h:254
void setShowChangedValues(bool show_changed_values)
Restrict the view to preferences that differ from their defaults.
Definition pref_models.cpp:752
bool filterAcceptItem(PrefsItem &item) const
Test whether a single PrefsItem passes the current filters.
Definition pref_models.cpp:677
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Return the column header label.
Definition pref_models.cpp:408
void setFilter(const QString &filter)
Set the text filter applied to preference names and values.
Definition pref_models.cpp:739
int columnCount(const QModelIndex &parent=QModelIndex()) const
Return the number of columns in this model.
Definition pref_models.cpp:647
Base class to inherit basic tree item from.
Definition tree_model_helpers.h:25
Sort/filter proxy model for the module (left-hand) pane of the Preferences dialog.
Definition pref_models.h:364
bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const
Define the sort order for module rows.
Definition pref_models.cpp:845
int columnCount(const QModelIndex &parent=QModelIndex()) const
Return the number of columns in this model.
Definition pref_models.cpp:840
ModulePrefsModelColumn
Column indices for the module pane.
Definition pref_models.h:375
@ colName
Definition pref_models.h:376
@ colLast
Definition pref_models.h:377
ModulePrefsRoles
Custom data roles for module items.
Definition pref_models.h:383
@ ModuleHelp
Definition pref_models.h:385
@ ModuleName
Definition pref_models.h:384
virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const
Determine whether a source row should appear in the module pane.
Definition pref_models.cpp:875
A single node in the PrefsModel tree.
Definition pref_models.h:136
QString getModuleHelp() const
Return the help text for the associated module.
Definition pref_models.cpp:125
void setChanged(bool changed=true)
Mark this preference as having been changed during this session.
Definition pref_models.cpp:139
QString getName() const
Return the display name of this item.
Definition pref_models.h:167
bool isPrefDefault() const
Return whether the preference currently holds its default value.
Definition pref_models.cpp:90
QString getPrefTypeName() const
Return a human-readable string for the preference type.
Definition pref_models.cpp:101
QString getModuleName() const
Return the internal (short) name of the associated module.
Definition pref_models.cpp:109
int getPrefType() const
Return the numeric type of the underlying preference.
Definition pref_models.cpp:82
QString getModuleTitle() const
Return the display title of the associated module.
Definition pref_models.cpp:117
pref_t * getPref() const
Return the pref_t this item represents.
Definition pref_models.h:173
module_t * getModule() const
Return the preference module associated with this item.
Definition pref_models.h:197
virtual ~PrefsItem()
Destroy this PrefsItem and all of its children.
Definition pref_models.cpp:78
Tree model backing the Preferences dialog.
Definition pref_models.h:28
static QString typeToString(PrefsModelType type)
Return the display name for a built-in preference page type.
Definition pref_models.cpp:334
int rowCount(const QModelIndex &parent=QModelIndex()) const
Return the number of child rows under parent.
Definition pref_models.cpp:156
virtual ~PrefsModel()
Destroy the model and its PrefsItem tree.
Definition pref_models.cpp:151
QModelIndex parent(const QModelIndex &index) const
Return the parent model index of index.
Definition pref_models.cpp:179
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
Return the model index for the item at (row, column) under parent.
Definition pref_models.cpp:198
static QString typeToHelp(PrefsModelType type)
Return the help text for a built-in preference page type.
Definition pref_models.cpp:356
PrefsModelType
Top-level preference page type identifiers.
Definition pref_models.h:44
@ Appearance
Definition pref_models.h:46
@ Capture
Definition pref_models.h:51
@ Expert
Definition pref_models.h:52
@ Advanced
Definition pref_models.h:45
@ FontAndColors
Definition pref_models.h:49
@ Layout
Definition pref_models.h:47
@ FilterButtons
Definition pref_models.h:53
@ WelcomePage
Definition pref_models.h:50
@ RSAKeys
Definition pref_models.h:54
@ Columns
Definition pref_models.h:48
@ Aggregation
Definition pref_models.h:55
PrefsModelColumn
Column indices for the raw PrefsModel tree.
Definition pref_models.h:61
@ colStatus
Definition pref_models.h:63
@ colLast
Definition pref_models.h:66
@ colValue
Definition pref_models.h:65
@ colName
Definition pref_models.h:62
@ colType
Definition pref_models.h:64
int columnCount(const QModelIndex &parent=QModelIndex()) const
Return the number of columns.
Definition pref_models.cpp:173
pref_t * prefFromPrefPtr(void *pref_ptr)
Retrieves the preference structure associated with a given preference pointer.
Definition pref_models.cpp:27
Represents a preference module grouping related preferences under a named, hierarchical entry in the ...
Definition prefs-int.h:27