File indexing completed on 2024-05-12 15:56:14
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2010 Matus Talcik <matus.talcik@gmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 /**************************************************************************** 0007 ** 0008 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 0009 ** All rights reserved. 0010 ** Contact: Nokia Corporation (qt-info@nokia.com) 0011 ** 0012 ** This file is part of the QtGui module of the Qt Toolkit. 0013 ** 0014 ** $QT_BEGIN_LICENSE:LGPL$ 0015 ** No Commercial Usage 0016 ** This file contains pre-release code and may not be distributed. 0017 ** You may use this file in accordance with the terms and conditions 0018 ** contained in the Technology Preview License Agreement accompanying 0019 ** this package. 0020 ** 0021 ** GNU Lesser General Public License Usage 0022 ** Alternatively, this file may be used under the terms of the GNU Lesser 0023 ** General Public License version 2.1 as published by the Free Software 0024 ** Foundation and appearing in the file LICENSE.LGPL included in the 0025 ** packaging of this file. Please review the following information to 0026 ** ensure the GNU Lesser General Public License version 2.1 requirements 0027 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 0028 ** 0029 ** In addition, as a special exception, Nokia gives you certain additional 0030 ** rights. These rights are described in the Nokia Qt LGPL Exception 0031 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 0032 ** 0033 ** If you have questions regarding the use of this file, please contact 0034 ** Nokia at qt-info@nokia.com. 0035 ** 0036 ** 0037 ** 0038 ** 0039 ** 0040 ** 0041 ** 0042 ** 0043 ** $QT_END_LICENSE$ 0044 ** 0045 ****************************************************************************/ 0046 #ifndef KUNDO2VIEW_H 0047 #define KUNDO2VIEW_H 0048 0049 #include <QListView> 0050 #include <QString> 0051 0052 #include "kritacommand_export.h" 0053 0054 #ifndef QT_NO_UNDOVIEW 0055 0056 class KUndo2ViewPrivate; 0057 class KUndo2QStack; 0058 class KUndo2Group; 0059 class QIcon; 0060 0061 class KRITACOMMAND_EXPORT KUndo2View : public QListView 0062 { 0063 Q_OBJECT 0064 Q_PROPERTY(QString emptyLabel READ emptyLabel WRITE setEmptyLabel) 0065 Q_PROPERTY(QIcon cleanIcon READ cleanIcon WRITE setCleanIcon) 0066 0067 public: 0068 explicit KUndo2View(QWidget *parent = 0); 0069 explicit KUndo2View(KUndo2QStack *stack, QWidget *parent = 0); 0070 #ifndef QT_NO_UNDOGROUP 0071 explicit KUndo2View(KUndo2Group *group, QWidget *parent = 0); 0072 #endif 0073 ~KUndo2View() override; 0074 0075 KUndo2QStack *stack() const; 0076 #ifndef QT_NO_UNDOGROUP 0077 KUndo2Group *group() const; 0078 #endif 0079 0080 void setEmptyLabel(const QString &label); 0081 QString emptyLabel() const; 0082 0083 void setCleanIcon(const QIcon &icon); 0084 QIcon cleanIcon() const; 0085 0086 public Q_SLOTS: 0087 void setStack(KUndo2QStack *stack); 0088 #ifndef QT_NO_UNDOGROUP 0089 void setGroup(KUndo2Group *group); 0090 #endif 0091 0092 private: 0093 KUndo2ViewPrivate* const d; 0094 Q_DISABLE_COPY(KUndo2View) 0095 }; 0096 0097 #endif // QT_NO_UNDOVIEW 0098 #endif // KUNDO2VIEW_H