krita/ui

kis_clipboard.h

Go to the documentation of this file.
00001 /*
00002  *  kis_clipboard.h - part of Krayon
00003  *
00004  *  Copyright (c) 2004 Boudewijn Rempt <boud@valdyas.org>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  */
00020 #ifndef __KIS_CLIPBOARD_H_
00021 #define __KIS_CLIPBOARD_H_
00022 
00023 #include <QObject>
00024 #include <QSize>
00025 #include "kis_types.h"
00026 #include <krita_export.h>
00027 
00028 class QImage;
00029 
00030 enum enumPasteBehaviour {
00031     PASTE_ASSUME_WEB,
00032     PASTE_ASSUME_MONITOR,
00033     PASTE_ASK
00034 };
00035 
00040 class KRITAUI_EXPORT KisClipboard : public QObject
00041 {
00042 
00043     Q_OBJECT
00044 
00045 public:
00046 
00047     virtual ~KisClipboard();
00048 
00049     static KisClipboard* instance();
00050 
00056     void setClip(KisPaintDeviceSP layer);
00057 
00061     KisPaintDeviceSP clip();
00062 
00063     bool hasClip();
00064 
00065     QSize clipSize();
00066 
00067 private slots:
00068 
00069     void clipboardDataChanged();
00070 private:
00071 
00072     KisClipboard();
00073     KisClipboard(const KisClipboard &);
00074     KisClipboard operator=(const KisClipboard &);
00075 
00076     KisPaintDeviceSP m_clip;
00077     bool m_hasClip;
00078 
00079     bool m_pushedClipboard;
00080 };
00081 
00082 #endif // __KIS_CLIPBOARD_H_