kclipboard.h
/* This file is part of the KDE libraries
Copyright (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2, as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KCLIPBOARD_H
#define KCLIPBOARD_H
#include <qclipboard.h>
#include <qmime.h>
#include <qobject.h>
#include <qstrlist.h>
#include "kdelibs_export.h"
class KDECORE_EXPORT KClipboardSynchronizer : public QObject
{
Q_OBJECT
public:
friend class KlipperWidget;
friend class KApplication;
static KClipboardSynchronizer *self();
static void setSynchronizing( bool sync );
static bool isSynchronizing()
{
return s_sync;
}
static void setReverseSynchronizing( bool enable );
static bool isReverseSynchronizing()
{
return s_reverse_sync;
}
protected:
~KClipboardSynchronizer();
private slots:
void slotSelectionChanged();
void slotClipboardChanged();
private:
KClipboardSynchronizer( QObject *parent = 0, const char *name = 0L );
void setupSignals();
static void setClipboard( QMimeSource* data, QClipboard::Mode mode );
static KClipboardSynchronizer *s_self;
static bool s_sync;
static bool s_reverse_sync;
static bool s_blocked;
class MimeSource;
private:
// needed by klipper
enum Configuration { Synchronize = 1 };
// called by KApplication upon kipc message, invoked by klipper
static void newConfiguration( int config );
};
#endif // KCLIPBOARD_H
KApplication
Controls and provides information to all KDE applications.
Definition: kapplication.h:94
KClipboardSynchronizer::isSynchronizing
static bool isSynchronizing()
Checks whether Clipboard and Selection will be synchronized upon changes.
Definition: kclipboard.h:66
KClipboardSynchronizer::isReverseSynchronizing
static bool isReverseSynchronizing()
Checks whether the Clipboard buffer will be copied to the Selection buffer upon changes.
Definition: kclipboard.h:89
KClipboardSynchronizer
This class is only for internal use.
Definition: kclipboard.h:36

KDE Home | KDE Accessibility Home | Description of Access Keys