Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-04 08:50:04

0001 // Copyright (C) 2016 The Qt Company Ltd.
0002 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
0003 // Qt-Security score:significant reason:default
0004 
0005 #ifndef QUNDOVIEW_H
0006 #define QUNDOVIEW_H
0007 
0008 #include <QtWidgets/qtwidgetsglobal.h>
0009 #include <QtWidgets/qlistview.h>
0010 #include <QtCore/qstring.h>
0011 
0012 QT_REQUIRE_CONFIG(undoview);
0013 
0014 QT_BEGIN_NAMESPACE
0015 
0016 class QUndoViewPrivate;
0017 class QUndoStack;
0018 class QUndoGroup;
0019 class QIcon;
0020 
0021 
0022 class Q_WIDGETS_EXPORT QUndoView : public QListView
0023 {
0024     Q_OBJECT
0025     Q_DECLARE_PRIVATE(QUndoView)
0026     Q_PROPERTY(QString emptyLabel READ emptyLabel WRITE setEmptyLabel)
0027     Q_PROPERTY(QIcon cleanIcon READ cleanIcon WRITE setCleanIcon)
0028 
0029 public:
0030     explicit QUndoView(QWidget *parent = nullptr);
0031     explicit QUndoView(QUndoStack *stack, QWidget *parent = nullptr);
0032 #if QT_CONFIG(undogroup)
0033     explicit QUndoView(QUndoGroup *group, QWidget *parent = nullptr);
0034 #endif
0035     ~QUndoView();
0036 
0037     QUndoStack *stack() const;
0038 #if QT_CONFIG(undogroup)
0039     QUndoGroup *group() const;
0040 #endif
0041 
0042     void setEmptyLabel(const QString &label);
0043     QString emptyLabel() const;
0044 
0045     void setCleanIcon(const QIcon &icon);
0046     QIcon cleanIcon() const;
0047 
0048 public Q_SLOTS:
0049     void setStack(QUndoStack *stack);
0050 #if QT_CONFIG(undogroup)
0051     void setGroup(QUndoGroup *group);
0052 #endif
0053 
0054 private:
0055     Q_DISABLE_COPY(QUndoView)
0056 };
0057 
0058 QT_END_NAMESPACE
0059 
0060 #endif // QUNDOVIEW_H