LibrePCB Developers Documentation
KeyboardShortcutsModel Class Referencefinal

A QAbstractItemModel to represent keyboard shortcut workspace settings. More...

#include <keyboardshortcutsmodel.h>

Inherits QAbstractItemModel.

+ Collaboration diagram for KeyboardShortcutsModel:

Classes

struct  Category
 

Public Member Functions

 KeyboardShortcutsModel ()=delete
 
 KeyboardShortcutsModel (const KeyboardShortcutsModel &other)=delete
 
 KeyboardShortcutsModel (QObject *parent=nullptr) noexcept
 
 ~KeyboardShortcutsModel () noexcept
 
const QMap< QString, QList< QKeySequence > > & getOverrides () const noexcept
 
void setOverrides (const QMap< QString, QList< QKeySequence >> &overrides) noexcept
 
int columnCount (const QModelIndex &parent=QModelIndex()) const noexcept override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const noexcept override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const noexcept override
 
QModelIndex parent (const QModelIndex &index) const noexcept override
 
Qt::ItemFlags flags (const QModelIndex &index) const noexcept override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const noexcept override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) noexcept override
 
KeyboardShortcutsModeloperator= (const KeyboardShortcutsModel &rhs)=delete
 

Private Member Functions

CategorycategoryFromIndex (const QModelIndex &index) const noexcept
 
const EditorCommandcommandFromIndex (const QModelIndex &index) const noexcept
 

Static Private Member Functions

static QString format (const QList< QKeySequence > &sequences, bool showNone) noexcept
 

Private Attributes

QList< Category * > mCategories
 
QMap< QString, QList< QKeySequence > > mOverrides
 

Detailed Description

A QAbstractItemModel to represent keyboard shortcut workspace settings.

Constructor & Destructor Documentation

◆ KeyboardShortcutsModel() [1/3]

◆ KeyboardShortcutsModel() [2/3]

◆ KeyboardShortcutsModel() [3/3]

KeyboardShortcutsModel ( QObject *  parent = nullptr)
explicitnoexcept
+ Here is the call graph for this function:

◆ ~KeyboardShortcutsModel()

~KeyboardShortcutsModel ( )
noexcept

Member Function Documentation

◆ getOverrides()

const QMap<QString, QList<QKeySequence> >& getOverrides ( ) const
inlinenoexcept
+ Here is the call graph for this function:

◆ setOverrides()

void setOverrides ( const QMap< QString, QList< QKeySequence >> &  overrides)
noexcept
+ Here is the caller graph for this function:

◆ columnCount()

int columnCount ( const QModelIndex &  parent = QModelIndex()) const
overridenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rowCount()

int rowCount ( const QModelIndex &  parent = QModelIndex()) const
overridenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ index()

QModelIndex index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
overridenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parent()

QModelIndex parent ( const QModelIndex &  index) const
overridenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flags()

Qt::ItemFlags flags ( const QModelIndex &  index) const
overridenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ data()

QVariant data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
overridenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setData()

bool setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
overridenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

KeyboardShortcutsModel& operator= ( const KeyboardShortcutsModel rhs)
delete
+ Here is the caller graph for this function:

◆ categoryFromIndex()

KeyboardShortcutsModel::Category * categoryFromIndex ( const QModelIndex &  index) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ commandFromIndex()

const EditorCommand * commandFromIndex ( const QModelIndex &  index) const
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format()

QString format ( const QList< QKeySequence > &  sequences,
bool  showNone 
)
staticprivatenoexcept
+ Here is the caller graph for this function:

Member Data Documentation

◆ mCategories

QList<Category*> mCategories
private

◆ mOverrides

QMap<QString, QList<QKeySequence> > mOverrides
private

The documentation for this class was generated from the following files: