#include <shortcutmodel.h>
Signals | |
| void | valueChanged () |
| Signal emmitted when the user finish the editation of one value. | |
| void | keysNotUnique (QString) |
| Emitted when user enters duplicate key value. QString is the duplicate value. It's handled in the GUI with message box. | |
Public Member Functions | |
| ShortcutModel (QObject *parent=0) | |
| ~ShortcutModel () | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
| Qt::ItemFlags | flags (const QModelIndex &index) const |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
| bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
| void | insertRow () |
| void | insertRow (QString key, QString value) |
| QList< QPair< QString, QString > > | values () |
| void | saveValues () |
| Check emptiness of keys and save it by Preferences. | |
| ShortcutModel::ShortcutModel | ( | QObject * | parent = 0 |
) |
References Preferences::instance(), and Preferences::shortcuts().
| ShortcutModel::~ShortcutModel | ( | ) |
| int ShortcutModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
Referenced by insertRow(), and removeRows().
| int ShortcutModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
| QVariant ShortcutModel::data | ( | const QModelIndex & | index, | |
| int | role = Qt::DisplayRole | |||
| ) | const |
| bool ShortcutModel::setData | ( | const QModelIndex & | index, | |
| const QVariant & | value, | |||
| int | role = Qt::EditRole | |||
| ) |
References keysNotUnique().
| Qt::ItemFlags ShortcutModel::flags | ( | const QModelIndex & | index | ) | const |
| QVariant ShortcutModel::headerData | ( | int | section, | |
| Qt::Orientation | orientation, | |||
| int | role = Qt::DisplayRole | |||
| ) | const |
| bool ShortcutModel::removeRows | ( | int | row, | |
| int | count, | |||
| const QModelIndex & | parent = QModelIndex() | |||
| ) |
References rowCount().
| bool ShortcutModel::insertRows | ( | int | row, | |
| int | count, | |||
| const QModelIndex & | parent = QModelIndex() | |||
| ) |
Referenced by insertRow().
| void ShortcutModel::insertRow | ( | ) |
References insertRows(), and rowCount().
| void ShortcutModel::insertRow | ( | QString | key, | |
| QString | value | |||
| ) |
References rowCount().
| QList<QPair<QString,QString> > ShortcutModel::values | ( | ) | [inline] |
| void ShortcutModel::saveValues | ( | ) |
Check emptiness of keys and save it by Preferences.
References Preferences::instance(), and Preferences::setShortcuts().
| void ShortcutModel::valueChanged | ( | ) | [signal] |
Signal emmitted when the user finish the editation of one value.
| void ShortcutModel::keysNotUnique | ( | QString | ) | [signal] |
Emitted when user enters duplicate key value. QString is the duplicate value. It's handled in the GUI with message box.
Referenced by setData().
1.5.5