47#include <klocalizedstring.h>
49 : QAbstractItemModel(parent)
76 disconnect(
m_stack, SIGNAL(indexChanged(
int)),
this, SLOT(addImage(
int)));
83 connect(
m_stack, SIGNAL(indexChanged(
int)),
this, SLOT(addImage(
int)));
113 if (
index.column() != 0)
127 return QModelIndex();
130 return QModelIndex();
133 return QModelIndex();
136 return QModelIndex();
138 return createIndex(row, column);
143 return QModelIndex();
167 if (
index.column() != 0)
173 if (role == Qt::DisplayRole) {
174 if (
index.row() == 0)
177 }
else if (role == Qt::DecorationRole) {
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
QModelIndex parent(const QModelIndex &child) const override
QString emptyLabel() const
void setEmptyLabel(const QString &label)
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
void setCleanIcon(const QIcon &icon)
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QModelIndex selectedIndex() const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
KUndo2Model(QObject *parent=0)
QItemSelectionModel * m_sel_model
void setStack(KUndo2QStack *stack)
QItemSelectionModel * selectionModel() const
void setStackCurrentIndex(const QModelIndex &index)
KUndo2QStack * stack() const
void stackDestroyed(QObject *obj)
int columnCount(const QModelIndex &parent=QModelIndex()) const override
The KUndo2QStack class is a stack of KUndo2Command objects.
virtual void setIndex(int idx)
QString text(int idx) const