KDEUI
kclipboard.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2, as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00016 Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #ifndef KCLIPBOARD_H 00020 #define KCLIPBOARD_H 00021 00022 #include <kdeui_export.h> 00023 00024 #include <QtCore/QObject> 00025 #include <QtGui/QClipboard> 00026 00027 class QMimeData; 00028 00035 class KDEUI_EXPORT KClipboardSynchronizer : public QObject 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 friend class KlipperWidget; 00041 00046 static KClipboardSynchronizer *self(); 00047 00055 static void setSynchronizing( bool sync ); 00056 00063 static bool isSynchronizing(); 00064 00074 static void setReverseSynchronizing( bool enable ); 00075 00083 static bool isReverseSynchronizing(); 00084 00085 protected: 00086 ~KClipboardSynchronizer(); 00087 00088 private: 00089 // needed by klipper 00090 enum Configuration { Synchronize = 1 }; 00091 00092 explicit KClipboardSynchronizer( QObject *parent = 0 ); 00093 00094 class Private; 00095 Private* const d; 00096 00097 Q_PRIVATE_SLOT(d, void _k_slotSelectionChanged()) 00098 Q_PRIVATE_SLOT(d, void _k_slotClipboardChanged()) 00099 Q_PRIVATE_SLOT(d, void _k_slotNotifyChange(int, int)) 00100 }; 00101 00102 #endif // KCLIPBOARD_H
KDE 4.6 API Reference