"Fossies" - the Fresh Open Source Software Archive

Member "cb2bib-2.0.1/src/c2bClipboard.h" (12 Feb 2021, 1297 Bytes) of package /linux/privat/cb2bib-2.0.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "c2bClipboard.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.0.0_vs_2.0.1.

    1 /***************************************************************************
    2  *   Copyright (C) 2004-2021 by Pere Constans
    3  *   constans@molspaces.com
    4  *   cb2Bib version 2.0.1. Licensed under the GNU GPL version 3.
    5  *   See the LICENSE file that comes with this distribution.
    6  ***************************************************************************/
    7 #ifndef C2BCLIPBOARD_H
    8 #define C2BCLIPBOARD_H
    9 
   10 #include <QObject>
   11 
   12 #include <QClipboard>
   13 #include <QTimer>
   14 
   15 
   16 /**
   17     cb2Bib Clipboard
   18 
   19     Implements clipboard functionality as required by cb2Bib This should fix
   20     acrobat, mozilla, qt 3.3.3 issues Using clipboardPoll
   21 
   22     STATUS: DEPRECATED
   23 */
   24 
   25 #ifdef C2B_USE_CBPOLL
   26 class clipboardPoll;
   27 #endif
   28 
   29 class c2bClipboard : public QObject
   30 {
   31     Q_OBJECT
   32 public:
   33     explicit c2bClipboard(QObject* parento = 0);
   34     ~c2bClipboard();
   35 
   36 
   37     void setConnected(bool);
   38 
   39 
   40 signals:
   41     void cbDataChanged(const QString&);
   42 
   43 
   44 private:
   45     QClipboard* _cb;
   46     QString _cb_text;
   47     QString _cbs_text;
   48     bool _is_connected;
   49     bool _supports_selection;
   50     uint _interval;
   51 #ifdef C2B_USE_CBPOLL
   52     clipboardPoll* _poll;
   53 #else
   54     QTimer* _timer;
   55 #endif
   56 
   57 
   58 private slots:
   59     void checkData();
   60     void dataChanged();
   61     void newClipboardData(bool selectionMode);
   62     void selectionChanged();
   63 };
   64 
   65 #endif