tdecore
kclipboard.h
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 <tqclipboard.h>
00023 #include <tqmime.h>
00024 #include <tqobject.h>
00025 #include <tqstrlist.h>
00026 #include "tdelibs_export.h"
00027
00036 class TDECORE_EXPORT TDEClipboardSynchronizer : public TQObject
00037 {
00038 Q_OBJECT
00039
00040 public:
00042 friend class KlipperWidget;
00043 friend class TDEApplication;
00044
00049 static TDEClipboardSynchronizer *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 ~TDEClipboardSynchronizer();
00097
00098 private slots:
00099 void slotSelectionChanged();
00100 void slotClipboardChanged();
00101
00102 private:
00103 TDEClipboardSynchronizer( TQObject *parent = 0, const char *name = 0L );
00104 void setupSignals();
00105
00106 static void setClipboard( TQMimeSource* data, TQClipboard::Mode mode );
00107
00108 static TDEClipboardSynchronizer *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