00001 /********************************************************************** 00002 ** Copyright (C) 2000 Trolltech AS. All rights reserved. 00003 ** 00004 ** This file is part of Qtopia Environment. 00005 ** 00006 ** This file may be distributed and/or modified under the terms of the 00007 ** GNU General Public License version 2 as published by the Free Software 00008 ** Foundation and appearing in the file LICENSE.GPL included in the 00009 ** packaging of this file. 00010 ** 00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 ** 00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00015 ** 00016 ** Contact info@trolltech.com if any conditions of this licensing are 00017 ** not clear to you. 00018 ** 00019 **********************************************************************/ 00020 #ifndef __CLIPBOARD_APPLET_H__ 00021 #define __CLIPBOARD_APPLET_H__ 00022 00023 #include <qwidget.h> 00024 #include <qpixmap.h> 00025 #include <qstringlist.h> 00026 00027 class QTimer; 00028 00029 class ClipboardApplet : public QWidget 00030 { 00031 Q_OBJECT 00032 public: 00033 ClipboardApplet ( QWidget *parent = 0, const char *name=0 ); 00034 ~ClipboardApplet ( ); 00035 static int position(); 00036 00037 protected: 00038 void mousePressEvent ( QMouseEvent *); 00039 void paintEvent ( QPaintEvent* ); 00040 00041 private slots: 00042 void action ( int ); 00043 void newData ( ); 00044 void shutdown ( ); 00045 00046 private: 00047 QPopupMenu * m_menu; 00048 QStringList m_history; 00049 bool m_dirty; 00050 QString m_lasttext; 00051 QTimer * m_timer; 00052 00053 QPixmap m_clipboardPixmap; 00054 }; 00055 00056 00057 #endif // __CLIPBOARD_APPLET_H__ 00058
1.4.2