00001 /* 00002 * copyright : (c) 2003 by Greg Gilbert 00003 * email : greg@treke.net 00004 * based on the cardmon applet by Max Reiss 00005 * * 00006 * This program is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 2 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 *************************************************************************/ 00012 00013 #ifndef AUTOROTATE_H 00014 #define AUTOROTATE_H 00015 00016 #include <qwidget.h> 00017 #include <qpixmap.h> 00018 #include <qpopupmenu.h> 00019 00020 class AutoRotate : public QWidget { 00021 Q_OBJECT 00022 public: 00023 AutoRotate( QWidget *parent = 0 ); 00024 ~AutoRotate(); 00025 static int position(); 00026 00027 protected: 00028 void paintEvent( QPaintEvent* ); 00029 void mousePressEvent( QMouseEvent * ); 00030 private: 00031 bool isRotateEnabled(); 00032 void setRotateEnabled(bool); 00033 QPixmap enabledPm; 00034 QPixmap disabledPm; 00035 void iconShow(); 00036 QPopupMenu *popupMenu; 00037 }; 00038 00039 #endif 00040
1.4.2