-/***************************************************************************
- * Copyright (C) 2012 by Peter Penz <peter.penz19@gmail.com> *
- * *
- * 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. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the *
- * Free Software Foundation, Inc., *
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
- ***************************************************************************/
+/*
+ * SPDX-FileCopyrightText: 2012 Peter Penz <peter.penz19@gmail.com>
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
#ifndef KSTANDARDITEMMODEL_H
#define KSTANDARDITEMMODEL_H
#include "dolphin_export.h"
-#include <kitemviews/kitemmodelbase.h>
+#include "kitemviews/kitemmodelbase.h"
+
#include <QHash>
#include <QList>
class KStandardItem;
/**
- * @brief Model counterpart for KStandardItemView.
+ * @brief Model counterpart for KStandardItemListView.
*
* Allows to add items to the model in an easy way by the
* class KStandardItem.
Q_OBJECT
public:
- explicit KStandardItemModel(QObject* parent = 0);
- virtual ~KStandardItemModel();
+ explicit KStandardItemModel(QObject* parent = nullptr);
+ ~KStandardItemModel() override;
/**
* Inserts the item \a item at the index \a index. If the index
*/
void appendItem(KStandardItem* item);
- virtual int count() const Q_DECL_OVERRIDE;
- virtual QHash<QByteArray, QVariant> data(int index) const Q_DECL_OVERRIDE;
- virtual bool setData(int index, const QHash<QByteArray, QVariant>& values) Q_DECL_OVERRIDE;
- virtual QMimeData* createMimeData(const KItemSet& indexes) const Q_DECL_OVERRIDE;
- virtual int indexForKeyboardSearch(const QString& text, int startFromIndex = 0) const Q_DECL_OVERRIDE;
- virtual bool supportsDropping(int index) const Q_DECL_OVERRIDE;
- virtual QString roleDescription(const QByteArray& role) const Q_DECL_OVERRIDE;
- virtual QList<QPair<int, QVariant> > groups() const Q_DECL_OVERRIDE;
+ int count() const override;
+ QHash<QByteArray, QVariant> data(int index) const override;
+ bool setData(int index, const QHash<QByteArray, QVariant>& values) override;
+ QMimeData* createMimeData(const KItemSet& indexes) const override;
+ int indexForKeyboardSearch(const QString& text, int startFromIndex = 0) const override;
+ bool supportsDropping(int index) const override;
+ QString roleDescription(const QByteArray& role) const override;
+ QList<QPair<int, QVariant> > groups() const override;
virtual void clear();
protected: