summaryrefslogtreecommitdiff
path: root/noncore/applets/autorotateapplet/autorotate.h
blob: e05e7a09a1d724eb6b9aa63ffe8ac98a0d2444d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * copyright   : (c) 2003 by Greg Gilbert
 * email       : greg@treke.net
 * based on the cardmon applet by Max Reiss
 *                                                                       *
 * This program is free software; you can redistribute it and/or modify  *
 * it under the terms of the GNU General Public License as published by  *
 * the Free Software Foundation; either version 2 of the License, or     *
 * (at your option) any later version.                                   *
 *                                                                       *
 *************************************************************************/

#ifndef AUTOROTATE_H
#define AUTOROTATE_H

#include <qwidget.h>
#include <qpixmap.h>
#include <qpopupmenu.h>

class AutoRotate : public QWidget {
    Q_OBJECT
public:
    AutoRotate( QWidget *parent = 0 );
    ~AutoRotate();

private slots:

protected:
    void paintEvent( QPaintEvent* );
    void mousePressEvent( QMouseEvent * );
private:
    bool isRotateEnabled();
    void setRotateEnabled(bool);
    QPixmap enabledPm;
    QPixmap disabledPm;
    void iconShow();
    QPopupMenu *popupMenu;
 };

#endif