File indexing completed on 2024-12-01 06:45:08
0001 /* 0002 SPDX-FileCopyrightText: 2008 Peter Penz <peter.penz@gmx.at> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef DEFAULTVIEWADAPTER_H 0008 #define DEFAULTVIEWADAPTER_H 0009 0010 #include "kabstractviewadapter.h" 0011 #include "kiofilewidgets_export.h" 0012 0013 class QAbstractItemView; 0014 0015 namespace KIO 0016 { 0017 /** 0018 * Implementation of the view adapter for the default case when 0019 * an instance of QAbstractItemView is used as view. 0020 */ 0021 class KIOFILEWIDGETS_EXPORT DefaultViewAdapter : public KAbstractViewAdapter 0022 { 0023 Q_OBJECT 0024 public: 0025 DefaultViewAdapter(QAbstractItemView *view, QObject *parent); 0026 QAbstractItemModel *model() const override; 0027 QSize iconSize() const override; 0028 QPalette palette() const override; 0029 QRect visibleArea() const override; 0030 QRect visualRect(const QModelIndex &index) const override; 0031 void connect(Signal signal, QObject *receiver, const char *slot) override; 0032 0033 private: 0034 QAbstractItemView *m_view; 0035 }; 0036 } 0037 0038 #endif