KDECore
kclipboard.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
00036 class KDECORE_EXPORT KClipboardSynchronizer : public QObject
00037 {
00038 Q_OBJECT
00039
00040 public:
00042 friend class KlipperWidget;
00043 friend class KApplication;
00044
00049 static KClipboardSynchronizer *self();
00050
00058 static void setSynchronizing( bool sync );
00059
00066 static bool isSynchronizing()
00067 {
00068 return s_sync;
00069 }
00070
00080 static void setReverseSynchronizing( bool enable );
00081
00089 static bool isReverseSynchronizing()
00090 {
00091 return s_reverse_sync;
00092 }
00093
00094
00095 protected:
00096 ~KClipboardSynchronizer();
00097
00098 private slots:
00099 void slotSelectionChanged();
00100 void slotClipboardChanged();
00101
00102 private:
00103 KClipboardSynchronizer( QObject *parent = 0, const char *name = 0L );
00104 void setupSignals();
00105
00106 static void setClipboard( QMimeSource* data, QClipboard::Mode mode );
00107
00108 static KClipboardSynchronizer *s_self;
00109 static bool s_sync;
00110 static bool s_reverse_sync;
00111 static bool s_blocked;
00112
00113 class MimeSource;
00114
00115 private:
00116
00117 enum Configuration { Synchronize = 1 };
00118
00119 static void newConfiguration( int config );
00120
00121 };
00122
00123 #endif // KCLIPBOARD_H