krita

kis_clipboard.h

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 
00021 #ifndef __KIS_CLIPBOARD_H_
00022 #define __KIS_CLIPBOARD_H_
00023 
00024 
00025 #include <qsize.h>
00026 #include "kis_types.h"
00027 
00028 class QImage;
00029 
00034 class KisClipboard : public QObject {
00035 
00036     Q_OBJECT
00037 
00038 public:
00039 
00040     virtual ~KisClipboard();
00041 
00042     static KisClipboard* instance();
00043 
00049     void setClip(KisPaintDeviceSP layer);
00050     
00054     KisPaintDeviceSP clip();
00055 
00056     bool hasClip();
00057 
00058     QSize clipSize();
00059     
00060 private slots:
00061 
00062     void clipboardDataChanged();
00063 private:
00064 
00065     KisClipboard();
00066     KisClipboard(const KisClipboard &);
00067     KisClipboard operator=(const KisClipboard &);
00068 
00069     static KisClipboard * m_singleton;
00070 
00071     KisPaintDeviceSP m_clip;
00072     bool m_hasClip;
00073 
00074     bool m_pushedClipboard;
00075 
00076 
00077 };
00078 
00079 #endif // __KIS_CLIPBOARD_H_
KDE Home | KDE Accessibility Home | Description of Access Keys