Poppler Qt4 0.18.1
poppler-optcontent.h
00001 /* poppler-optcontent.h: qt interface to poppler
00002  *
00003  * Copyright (C) 2007, Brad Hards <bradh@kde.org>
00004  * Copyright (C) 2008, Pino Toscano <pino@kde.org>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2, or (at your option)
00009  * any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 
00021 #ifndef POPPLER_OPTCONTENT_H
00022 #define POPPLER_OPTCONTENT_H
00023 
00024 #include <QtCore/QAbstractListModel>
00025 
00026 #include "poppler-export.h"
00027 
00028 class OCGs;
00029 
00030 namespace Poppler
00031 {
00032   class Document;
00033   class OptContentModelPrivate;
00034 
00046   class POPPLER_QT4_EXPORT OptContentModel : public QAbstractItemModel
00047   {
00048     friend class Document;
00049 
00050     Q_OBJECT
00051 
00052     public:
00053     virtual ~OptContentModel();
00054 
00055     QModelIndex index(int row, int column, const QModelIndex &parent) const;
00056     QModelIndex parent(const QModelIndex &child) const;
00057 
00058     int rowCount(const QModelIndex &parent = QModelIndex()) const;
00059     int columnCount(const QModelIndex &parent) const;
00060 
00061     QVariant data(const QModelIndex &index, int role) const;
00062     virtual bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole );
00063 
00064     Qt::ItemFlags flags ( const QModelIndex & index ) const;
00065 
00066     virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
00067 
00068     private:
00069     OptContentModel( OCGs *optContent, QObject *parent = 0);
00070 
00071     friend class OptContentModelPrivate;
00072     OptContentModelPrivate *d;
00073   };
00074 }
00075 
00076 #endif