Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:09:40

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 
0004 #ifndef QUNDOVIEW_H
0005 #define QUNDOVIEW_H
0006 
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qlistview.h>
0009 #include <QtCore/qstring.h>
0010 
0011 QT_REQUIRE_CONFIG(undoview);
0012 
0013 QT_BEGIN_NAMESPACE
0014 
0015 class QUndoViewPrivate;
0016 class QUndoStack;
0017 class QUndoGroup;
0018 class QIcon;
0019 
0020 
0021 class Q_WIDGETS_EXPORT QUndoView : public QListView
0022 {
0023     Q_OBJECT
0024     Q_DECLARE_PRIVATE(QUndoView)
0025     Q_PROPERTY(QString emptyLabel READ emptyLabel WRITE setEmptyLabel)
0026     Q_PROPERTY(QIcon cleanIcon READ cleanIcon WRITE setCleanIcon)
0027 
0028 public:
0029     explicit QUndoView(QWidget *parent = nullptr);
0030     explicit QUndoView(QUndoStack *stack, QWidget *parent = nullptr);
0031 #if QT_CONFIG(undogroup)
0032     explicit QUndoView(QUndoGroup *group, QWidget *parent = nullptr);
0033 #endif
0034     ~QUndoView();
0035 
0036     QUndoStack *stack() const;
0037 #if QT_CONFIG(undogroup)
0038     QUndoGroup *group() const;
0039 #endif
0040 
0041     void setEmptyLabel(const QString &label);
0042     QString emptyLabel() const;
0043 
0044     void setCleanIcon(const QIcon &icon);
0045     QIcon cleanIcon() const;
0046 
0047 public Q_SLOTS:
0048     void setStack(QUndoStack *stack);
0049 #if QT_CONFIG(undogroup)
0050     void setGroup(QUndoGroup *group);
0051 #endif
0052 
0053 private:
0054     Q_DISABLE_COPY(QUndoView)
0055 };
0056 
0057 QT_END_NAMESPACE
0058 
0059 #endif // QUNDOVIEW_H