LibrePCB Developers Documentation
Loading...
Searching...
No Matches
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

◆ setOverrides()

void setOverrides ( const QMap< QString, QList< QKeySequence > > &  overrides)
noexcept

◆ columnCount()

int columnCount ( const QModelIndex &  parent = QModelIndex()) const
overridenoexcept

◆ rowCount()

int rowCount ( const QModelIndex &  parent = QModelIndex()) const
overridenoexcept

◆ index()

QModelIndex index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
overridenoexcept

◆ parent()

QModelIndex parent ( const QModelIndex &  index) const
overridenoexcept

◆ flags()

Qt::ItemFlags flags ( const QModelIndex &  index) const
overridenoexcept

◆ data()

QVariant data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
overridenoexcept

◆ setData()

bool setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
overridenoexcept

◆ operator=()

KeyboardShortcutsModel & operator= ( const KeyboardShortcutsModel rhs)
delete

◆ categoryFromIndex()

KeyboardShortcutsModel::Category * categoryFromIndex ( const QModelIndex &  index) const
privatenoexcept

◆ commandFromIndex()

const EditorCommand * commandFromIndex ( const QModelIndex &  index) const
privatenoexcept

◆ format()

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

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: