kdecore Library API Documentation

kclipboard.h

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., 59 Temple Place - Suite 330, 00016 Boston, MA 02111-1307, USA. 00017 */ 00018 00019 #ifndef KCLIPBOARD_H 00020 #define KCLIPBOARD_H 00021 00022 #include <qclipboard.h> 00023 #include <qmime.h> 00024 #include <qobject.h> 00025 #include <qstrlist.h> 00026 #include "kdelibs_export.h" 00027 00035 class KDECORE_EXPORT KClipboardSynchronizer : public QObject 00036 { 00037 Q_OBJECT 00038 00039 public: 00040 friend class KlipperWidget; 00041 friend class KApplication; 00042 00047 static KClipboardSynchronizer *self(); 00048 00056 static void setSynchronizing( bool sync ); 00057 00064 static bool isSynchronizing() 00065 { 00066 return s_sync; 00067 } 00068 00078 static void setReverseSynchronizing( bool enable ); 00079 00087 static bool isReverseSynchronizing() 00088 { 00089 return s_reverse_sync; 00090 } 00091 00092 00093 protected: 00094 ~KClipboardSynchronizer(); 00095 00096 private slots: 00097 void slotSelectionChanged(); 00098 void slotClipboardChanged(); 00099 00100 private: 00101 KClipboardSynchronizer( QObject *parent = 0, const char *name = 0L ); 00102 void setupSignals(); 00103 00104 static void setClipboard( QMimeSource* data, QClipboard::Mode mode ); 00105 00106 static KClipboardSynchronizer *s_self; 00107 static bool s_sync; 00108 static bool s_reverse_sync; 00109 static bool s_blocked; 00110 00111 class MimeSource; 00112 00113 private: 00114 // needed by klipper 00115 enum Configuration { Synchronize = 1 }; 00116 // called by KApplication upon kipc message, invoked by klipper 00117 static void newConfiguration( int config ); 00118 00119 }; 00120 00121 #endif // KCLIPBOARD_H
KDE Logo
This file is part of the documentation for kdecore Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 14 00:03:26 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003