Logo Search packages:      
Sourcecode: kalternatives version File versions


 *   Copyright (C) 2008 by Pino Toscano <pino@kde.org>                     *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *


#include <QAbstractItemModel>

class Alternative;
class Item;

class SlaveModel : public QAbstractItemModel

    SlaveModel(QObject *parent = 0);

    // QAbstractItemModel interface
    int columnCount(const QModelIndex &parent = QModelIndex()) const;
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
    bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
    QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
    QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
    QModelIndex parent(const QModelIndex &index) const;
    int rowCount(const QModelIndex &parent = QModelIndex()) const;

    void setItem(Item *item);
    void setAlternative(Alternative *alt);

    Item *m_item;
    Alternative *m_alt;


Generated by  Doxygen 1.6.0   Back to index