KWidgetsAddons

kviewstatemaintainerbase.h
1/*
2 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
3 SPDX-FileContributor: Stephen Kelly <stephen@kdab.com>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KVIEWSTATEMAINTAINERBASE_H
9#define KVIEWSTATEMAINTAINERBASE_H
10
11#include "kwidgetsaddons_export.h"
12
13#include <QObject>
14
15#include <memory>
16
19
20class KViewStateMaintainerBasePrivate;
21
22class KWIDGETSADDONS_EXPORT KViewStateMaintainerBase : public QObject
23{
24 Q_OBJECT
25public:
26 KViewStateMaintainerBase(QObject *parent = nullptr);
27 ~KViewStateMaintainerBase() override;
28
29 void setSelectionModel(QItemSelectionModel *selectionModel);
30 QItemSelectionModel *selectionModel() const;
31
32 void setView(QAbstractItemView *view);
33 QAbstractItemView *view() const;
34
35 virtual void saveState() = 0;
36 virtual void restoreState() = 0;
37
38private:
39 Q_DECLARE_PRIVATE(KViewStateMaintainerBase)
40 std::unique_ptr<KViewStateMaintainerBasePrivate> const d_ptr;
41};
42
43#endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.