Krita Source Code Documentation
Loading...
Searching...
No Matches
kundo2view.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 * SPDX-FileCopyrightText: 2010 Matus Talcik <matus.talcik@gmail.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6/****************************************************************************
7**
8** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
9** All rights reserved.
10** Contact: Nokia Corporation (qt-info@nokia.com)
11**
12** This file is part of the QtGui module of the Qt Toolkit.
13**
14** $QT_BEGIN_LICENSE:LGPL$
15** No Commercial Usage
16** This file contains pre-release code and may not be distributed.
17** You may use this file in accordance with the terms and conditions
18** contained in the Technology Preview License Agreement accompanying
19** this package.
20**
21** GNU Lesser General Public License Usage
22** Alternatively, this file may be used under the terms of the GNU Lesser
23** General Public License version 2.1 as published by the Free Software
24** Foundation and appearing in the file LICENSE.LGPL included in the
25** packaging of this file. Please review the following information to
26** ensure the GNU Lesser General Public License version 2.1 requirements
27** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
28**
29** In addition, as a special exception, Nokia gives you certain additional
30** rights. These rights are described in the Nokia Qt LGPL Exception
31** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
32**
33** If you have questions regarding the use of this file, please contact
34** Nokia at qt-info@nokia.com.
35**
36**
37**
38**
39**
40**
41**
42**
43** $QT_END_LICENSE$
44**
45****************************************************************************/
46#ifndef KUNDO2VIEW_H
47#define KUNDO2VIEW_H
48
49#include <QListView>
50#include <QString>
51
52#include "kritacommand_export.h"
53
54#ifndef QT_NO_UNDOVIEW
55
57class KUndo2QStack;
58class KUndo2Group;
59class QIcon;
60
61class KRITACOMMAND_EXPORT KUndo2View : public QListView
62{
63 Q_OBJECT
64 Q_PROPERTY(QString emptyLabel READ emptyLabel WRITE setEmptyLabel)
65 Q_PROPERTY(QIcon cleanIcon READ cleanIcon WRITE setCleanIcon)
66
67public:
68 explicit KUndo2View(QWidget *parent = 0);
69 explicit KUndo2View(KUndo2QStack *stack, QWidget *parent = 0);
70#ifndef QT_NO_UNDOGROUP
71 explicit KUndo2View(KUndo2Group *group, QWidget *parent = 0);
72#endif
73 ~KUndo2View() override;
74
75 KUndo2QStack *stack() const;
76#ifndef QT_NO_UNDOGROUP
77 KUndo2Group *group() const;
78#endif
79
80 void setEmptyLabel(const QString &label);
81 QString emptyLabel() const;
82
83 void setCleanIcon(const QIcon &icon);
84 QIcon cleanIcon() const;
85
86public Q_SLOTS:
87 void setStack(KUndo2QStack *stack);
88#ifndef QT_NO_UNDOGROUP
89 void setGroup(KUndo2Group *group);
90#endif
91
92private:
94 Q_DISABLE_COPY(KUndo2View)
95};
96
97#endif // QT_NO_UNDOVIEW
98#endif // KUNDO2VIEW_H
The KUndo2Group class is a group of KUndo2QStack objects.
Definition kundo2group.h:57
The KUndo2QStack class is a stack of KUndo2Command objects.
The KUndo2View class displays the contents of a KUndo2QStack.
Definition kundo2view.h:62
KUndo2ViewPrivate *const d
Definition kundo2view.h:93