KIO
kabstractviewadapter_p.h
Go to the documentation of this file.
00001 /******************************************************************************* 00002 * Copyright (C) 2008 by Fredrik Höglund <fredrik@kde.org> * 00003 * * 00004 * This library is free software; you can redistribute it and/or * 00005 * modify it under the terms of the GNU Library General Public * 00006 * License as published by the Free Software Foundation; either * 00007 * version 2 of the License, or (at your option) any later version. * 00008 * * 00009 * This library is distributed in the hope that it will be useful, * 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00012 * Library General Public License for more details. * 00013 * * 00014 * You should have received a copy of the GNU Library General Public License * 00015 * along with this library; see the file COPYING.LIB. If not, write to * 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * 00017 * Boston, MA 02110-1301, USA. * 00018 *******************************************************************************/ 00019 00020 #ifndef KABSTRACTVIEWADAPTER_H 00021 #define KABSTRACTVIEWADAPTER_H 00022 00023 #include <QObject> 00024 00025 class QAbstractItemModel; 00026 class QModelIndex; 00027 class QPalette; 00028 class QRect; 00029 class QSize; 00030 00031 /* 00032 * Interface used by KFilePreviewGenerator to generate previews 00033 * for files. The interface allows KFilePreviewGenerator to be 00034 * independent from the view implementation. 00035 */ 00036 class KAbstractViewAdapter : public QObject 00037 { 00038 00039 public: 00040 enum Signal { ScrollBarValueChanged }; 00041 00042 KAbstractViewAdapter(QObject *parent) : QObject(parent) {} 00043 virtual ~KAbstractViewAdapter() {} 00044 virtual QAbstractItemModel *model() const = 0; 00045 virtual QSize iconSize() const = 0; 00046 virtual QPalette palette() const = 0; 00047 virtual QRect visibleArea() const = 0; 00048 virtual QRect visualRect(const QModelIndex &index) const = 0; 00049 virtual void connect(Signal signal, QObject *receiver, const char *slot) = 0; 00050 }; 00051 00052 #endif 00053
KDE 4.6 API Reference