/calligra-2.4.92/krita/plugins/extensions/dockers/historydocker/KisUndoView.h

# · C Header · 113 lines · 42 code · 12 blank · 59 comment · 0 complexity · 4012d12872b23c415163fcbc55639a65 MD5 · raw file

  1. /* This file is part of the KDE project
  2. * Copyright (C) 2010 Matus Talcik <matus.talcik@gmail.com>
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Library General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Library General Public License
  15. * along with this library; see the file COPYING.LIB. If not, write to
  16. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  17. * Boston, MA 02110-1301, USA.
  18. */
  19. /****************************************************************************
  20. **
  21. ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
  22. ** All rights reserved.
  23. ** Contact: Nokia Corporation (qt-info@nokia.com)
  24. **
  25. ** This file is part of the QtGui module of the Qt Toolkit.
  26. **
  27. ** $QT_BEGIN_LICENSE:LGPL$
  28. ** No Commercial Usage
  29. ** This file contains pre-release code and may not be distributed.
  30. ** You may use this file in accordance with the terms and conditions
  31. ** contained in the Technology Preview License Agreement accompanying
  32. ** this package.
  33. **
  34. ** GNU Lesser General Public License Usage
  35. ** Alternatively, this file may be used under the terms of the GNU Lesser
  36. ** General Public License version 2.1 as published by the Free Software
  37. ** Foundation and appearing in the file LICENSE.LGPL included in the
  38. ** packaging of this file. Please review the following information to
  39. ** ensure the GNU Lesser General Public License version 2.1 requirements
  40. ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
  41. **
  42. ** In addition, as a special exception, Nokia gives you certain additional
  43. ** rights. These rights are described in the Nokia Qt LGPL Exception
  44. ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
  45. **
  46. ** If you have questions regarding the use of this file, please contact
  47. ** Nokia at qt-info@nokia.com.
  48. **
  49. **
  50. **
  51. **
  52. **
  53. **
  54. **
  55. **
  56. ** $QT_END_LICENSE$
  57. **
  58. ****************************************************************************/
  59. #ifndef KisUndoView_H
  60. #define KisUndoView_H
  61. #include <QListView>
  62. #include <QString>
  63. #include "kis_canvas2.h"
  64. #ifndef QT_NO_UNDOVIEW
  65. class KisUndoViewPrivate;
  66. class KUndo2QStack;
  67. class KUndo2Group;
  68. class QIcon;
  69. class KisUndoView : public QListView
  70. {
  71. Q_OBJECT
  72. Q_PROPERTY(QString emptyLabel READ emptyLabel WRITE setEmptyLabel)
  73. Q_PROPERTY(QIcon cleanIcon READ cleanIcon WRITE setCleanIcon)
  74. public:
  75. explicit KisUndoView(QWidget *parent = 0);
  76. explicit KisUndoView(KUndo2QStack *stack, QWidget *parent = 0);
  77. #ifndef QT_NO_UNDOGROUP
  78. explicit KisUndoView(KUndo2Group *group, QWidget *parent = 0);
  79. #endif
  80. ~KisUndoView();
  81. KUndo2QStack *stack() const;
  82. #ifndef QT_NO_UNDOGROUP
  83. KUndo2Group *group() const;
  84. #endif
  85. void setEmptyLabel(const QString &label);
  86. QString emptyLabel() const;
  87. void setCleanIcon(const QIcon &icon);
  88. QIcon cleanIcon() const;
  89. //my new imba function
  90. void setCanvas(KisCanvas2* canvas);
  91. public Q_SLOTS:
  92. void setStack(KUndo2QStack *stack);
  93. #ifndef QT_NO_UNDOGROUP
  94. void setGroup(KUndo2Group *group);
  95. #endif
  96. private:
  97. KisUndoViewPrivate* const d;
  98. Q_DISABLE_COPY(KisUndoView)
  99. };
  100. #endif // QT_NO_UNDOVIEW
  101. #endif // KisUndoView_H