# kdecore Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# 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
    00034 class KClipboardSynchronizer : public QObject
    00035 {
    00036     Q_OBJECT
    00037
    00038 public:
    00039     friend class KlipperWidget;
    00040     friend class KApplication;
    00041
    00046     static KClipboardSynchronizer *self();
    00047
    00055     static void setSynchronizing( bool sync );
    00056
    00063     static bool isSynchronizing()
    00064     {
    00065         return s_sync;
    00066     }
    00067
    00077     static void setReverseSynchronizing( bool enable );
    00078
    00086     static bool isReverseSynchronizing()
    00087     {
    00088         return s_reverse_sync;
    00089     }
    00090
    00091
    00092 protected:
    00093     ~KClipboardSynchronizer();
    00094
    00095 private slots:
    00096     void slotSelectionChanged();
    00097     void slotClipboardChanged();
    00098
    00099 private:
    00100     KClipboardSynchronizer( QObject *parent = 0, const char *name = 0L );
    00101     void setupSignals();
    00102
    00103     static void setClipboard( QMimeSource* data, QClipboard::Mode mode );
    00104
    00105     static KClipboardSynchronizer *s_self;
    00106     static bool s_sync;
    00107     static bool s_reverse_sync;
    00108     static bool s_blocked;
    00109
    00110     class MimeSource;
    00111
    00112 private:
    00113     // needed by klipper
    00114     enum Configuration { Synchronize = 1 };
    00115     // called by KApplication upon kipc message, invoked by klipper
    00116     static void newConfiguration( int config );
    00117
    00118 };
    00119
    00120 #endif // KCLIPBOARD_H

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:46:20 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001