Audacity 3.2.0
|
!brief A plugins list model that can be attached to wxDataViewCtrl More...
#include <PluginDataModel.h>
Public Types | |
enum | Column { ColumnName , ColumnType , ColumnPath , ColumnState , ColumnNum } |
Public Member Functions | |
PluginDataModel (int filterEffectCategory=-1, int filterState=-1, const wxString &filterType={}, const wxString &filterExpr={}) | |
wxDataViewItem | GetItemForRow (uint32_t row) const |
bool | GetRowForItem (const wxDataViewItem &item, uint32_t &row) const |
uint32_t | GetRowCount () const |
bool | IsEnabled (const wxDataViewItem &, unsigned) const override |
bool | HasContainerColumns (const wxDataViewItem &item) const override |
void | SetFilterType (const wxString &type) |
wxString | GetFilterType () const |
void | SetFilterState (int state) |
int | GetFilterState () const |
void | SetFilterExpr (const wxString &expr) |
wxString | GetFilterExpr () const |
void | SetFilterCategory (int category) |
int | GetFilterCategory () const |
int | Compare (const wxDataViewItem &item1, const wxDataViewItem &item2, unsigned column, bool ascending) const override |
void | ApplyChanges (const std::function< bool(int, int, const wxString &)> &progressUpdateFn, const std::function< void(const TranslatableString &)> &errorFn) |
unsigned | GetColumnCount () const override |
wxString | GetColumnType (unsigned col) const override |
void | GetValue (wxVariant &variant, const wxDataViewItem &item, unsigned col) const override |
bool | SetValue (const wxVariant &variant, const wxDataViewItem &item, unsigned col) override |
wxDataViewItem | GetParent (const wxDataViewItem &item) const override |
bool | IsContainer (const wxDataViewItem &item) const override |
unsigned | GetChildren (const wxDataViewItem &item, wxDataViewItemArray &children) const override |
PluginDescriptor * | GetPlugin (wxDataViewItem item) |
bool | IsListModel () const override |
Private Member Functions | |
void | UpdateFilter () |
bool | IsFilterEmpty () const |
Private Attributes | |
std::vector< std::pair< PluginDescriptor *, bool > > | mPluginStateModel |
std::vector< void * > | mIndexFilterMap |
wxString | mFilterType |
wxString | mFilterExpr |
int | mFilterState {-1} |
int | mFilterCategory {-1} |
Static Private Attributes | |
static const void * | RowIdRoot {} |
!brief A plugins list model that can be attached to wxDataViewCtrl
Definition at line 19 of file PluginDataModel.h.
Enumerator | |
---|---|
ColumnName | |
ColumnType | |
ColumnPath | |
ColumnState | |
ColumnNum |
Definition at line 33 of file PluginDataModel.h.
PluginDataModel::PluginDataModel | ( | int | filterEffectCategory = -1 , |
int | filterState = -1 , |
||
const wxString & | filterType = {} , |
||
const wxString & | filterExpr = {} |
||
) |
Definition at line 37 of file PluginDataModel.cpp.
References anonymous_namespace{ExportPCM.cpp}::desc, EffectTypeHidden, PluginManager::Get(), mPluginStateModel, PluginTypeEffect, PluginTypeStub, and UpdateFilter().
void PluginDataModel::ApplyChanges | ( | const std::function< bool(int, int, const wxString &)> & | progressUpdateFn, |
const std::function< void(const TranslatableString &)> & | errorFn | ||
) |
Definition at line 171 of file PluginDataModel.cpp.
References anonymous_namespace{ExportPCM.cpp}::desc, TranslatableString::empty(), ModuleManager::Get(), PluginManager::Get(), mPluginStateModel, PluginTypeStub, wxT(), and XO().
|
override |
Definition at line 147 of file PluginDataModel.cpp.
References ColumnName, ColumnPath, ColumnType, and GetValue().
|
override |
Definition at line 292 of file PluginDataModel.cpp.
References mIndexFilterMap, and RowIdRoot.
|
override |
Definition at line 210 of file PluginDataModel.cpp.
|
override |
Definition at line 215 of file PluginDataModel.cpp.
References ColumnName, ColumnPath, ColumnState, and ColumnType.
int PluginDataModel::GetFilterCategory | ( | ) | const |
Definition at line 142 of file PluginDataModel.cpp.
References mFilterCategory.
wxString PluginDataModel::GetFilterExpr | ( | ) | const |
Definition at line 128 of file PluginDataModel.cpp.
References mFilterExpr.
int PluginDataModel::GetFilterState | ( | ) | const |
Definition at line 114 of file PluginDataModel.cpp.
References mFilterState.
wxString PluginDataModel::GetFilterType | ( | ) | const |
Definition at line 100 of file PluginDataModel.cpp.
References mFilterType.
wxDataViewItem PluginDataModel::GetItemForRow | ( | uint32_t | row | ) | const |
Definition at line 59 of file PluginDataModel.cpp.
References mIndexFilterMap.
|
override |
Definition at line 282 of file PluginDataModel.cpp.
PluginDescriptor * PluginDataModel::GetPlugin | ( | wxDataViewItem | item | ) |
Definition at line 305 of file PluginDataModel.cpp.
References GetRowIndex(), and mPluginStateModel.
uint32_t PluginDataModel::GetRowCount | ( | ) | const |
Definition at line 76 of file PluginDataModel.cpp.
References mIndexFilterMap.
bool PluginDataModel::GetRowForItem | ( | const wxDataViewItem & | item, |
uint32_t & | row | ||
) | const |
Definition at line 66 of file PluginDataModel.cpp.
References GetRowIndex(), and mIndexFilterMap.
|
override |
Definition at line 230 of file PluginDataModel.cpp.
References ColumnName, ColumnPath, ColumnState, ColumnType, GetRowIndex(), mPluginStateModel, PluginTypeEffect, and PluginTypeStub.
Referenced by Compare().
|
override |
Definition at line 86 of file PluginDataModel.cpp.
References RowIdRoot.
|
override |
Definition at line 287 of file PluginDataModel.cpp.
References RowIdRoot.
|
override |
Definition at line 81 of file PluginDataModel.cpp.
|
private |
Definition at line 357 of file PluginDataModel.cpp.
References mFilterExpr, mFilterState, and mFilterType.
|
inlineoverride |
Definition at line 78 of file PluginDataModel.h.
void PluginDataModel::SetFilterCategory | ( | int | category | ) |
Definition at line 133 of file PluginDataModel.cpp.
References mFilterCategory, and UpdateFilter().
void PluginDataModel::SetFilterExpr | ( | const wxString & | expr | ) |
Definition at line 119 of file PluginDataModel.cpp.
References mFilterExpr, and UpdateFilter().
void PluginDataModel::SetFilterState | ( | int | state | ) |
Definition at line 105 of file PluginDataModel.cpp.
References mFilterState, and UpdateFilter().
void PluginDataModel::SetFilterType | ( | const wxString & | type | ) |
Definition at line 91 of file PluginDataModel.cpp.
References mFilterType, and UpdateFilter().
|
override |
Definition at line 268 of file PluginDataModel.cpp.
References ColumnState, GetRowIndex(), and mPluginStateModel.
|
private |
Definition at line 316 of file PluginDataModel.cpp.
References anonymous_namespace{ExportPCM.cpp}::desc, MakeRow(), mFilterCategory, mFilterExpr, mFilterState, mFilterType, mIndexFilterMap, mPluginStateModel, PluginTypeEffect, PluginTypeStub, str, and TranslatableString::Translation().
Referenced by PluginDataModel(), SetFilterCategory(), SetFilterExpr(), SetFilterState(), and SetFilterType().
|
private |
Definition at line 29 of file PluginDataModel.h.
Referenced by GetFilterCategory(), SetFilterCategory(), and UpdateFilter().
|
private |
Definition at line 27 of file PluginDataModel.h.
Referenced by GetFilterExpr(), IsFilterEmpty(), SetFilterExpr(), and UpdateFilter().
|
private |
Definition at line 28 of file PluginDataModel.h.
Referenced by GetFilterState(), IsFilterEmpty(), SetFilterState(), and UpdateFilter().
|
private |
Definition at line 26 of file PluginDataModel.h.
Referenced by GetFilterType(), IsFilterEmpty(), SetFilterType(), and UpdateFilter().
|
private |
Definition at line 24 of file PluginDataModel.h.
Referenced by GetChildren(), GetItemForRow(), GetRowCount(), GetRowForItem(), and UpdateFilter().
|
private |
Definition at line 23 of file PluginDataModel.h.
Referenced by ApplyChanges(), GetPlugin(), GetValue(), PluginDataModel(), SetValue(), and UpdateFilter().
|
staticprivate |
Definition at line 21 of file PluginDataModel.h.
Referenced by GetChildren(), HasContainerColumns(), and IsContainer().