~ubuntu-branches/ubuntu/raring/recorditnow/raring

« back to all changes in this revision

Viewing changes to src/checkicon.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-09 14:54:01 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110109145401-gyckb4airz4fio50
Tags: 0.8.1-0ubuntu1
* New upstream release. (LP: #681270)
  - Update debian/copyright.
* Build-depend on recordmydesktop.
* Add a watch file.
* Drop 01_fix_ftbfs_kwarning_call.diff, fixed upstream.
* Add 01_joschy_install_to_usr_lib.diff.
* Add 02_fix_ftbfs_no-add-needed.diff.
* Add 03_dont_install_header_files.diff.
* Replace dependency on libpolkit-qt-1-0 with policykit-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2010 by Kai Dombrowe <just89@gmx.de>                    *
 
3
 *                                                                         *
 
4
 *   This program is free software; you can redistribute it and/or modify  *
 
5
 *   it under the terms of the GNU General Public License as published by  *
 
6
 *   the Free Software Foundation; either version 2 of the License, or     *
 
7
 *   (at your option) any later version.                                   *
 
8
 *                                                                         *
 
9
 *   This program is distributed in the hope that it will be useful,       *
 
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
12
 *   GNU General Public License for more details.                          *
 
13
 *                                                                         *
 
14
 *   You should have received a copy of the GNU General Public License     *
 
15
 *   along with this program; if not, write to the                         *
 
16
 *   Free Software Foundation, Inc.,                                       *
 
17
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA .        *
 
18
 ***************************************************************************/
 
19
 
 
20
#ifndef CHECKICON_H
 
21
#define CHECKICON_H
 
22
 
 
23
 
 
24
// Qt
 
25
#include <QtGui/QWidget>
 
26
 
 
27
class CheckIcon : public QWidget
 
28
{
 
29
    Q_OBJECT
 
30
 
 
31
 
 
32
public:
 
33
    explicit CheckIcon(QWidget *parent = 0);
 
34
    ~CheckIcon();
 
35
 
 
36
    bool isChecked() const;
 
37
    QString icon() const;
 
38
 
 
39
    void setIcon(const QString &icon);
 
40
 
 
41
 
 
42
public slots:
 
43
    void setChecked(const bool &c);
 
44
 
 
45
 
 
46
private:
 
47
    QString m_icon;
 
48
    bool m_checked;
 
49
    QPixmap m_pixmap;
 
50
    bool m_hover;
 
51
 
 
52
 
 
53
protected:
 
54
    void paintEvent(QPaintEvent *event);
 
55
    void mousePressEvent(QMouseEvent *event);
 
56
    void mouseReleaseEvent(QMouseEvent *event);
 
57
    void enterEvent(QEvent *event);
 
58
    void leaveEvent(QEvent *event);
 
59
 
 
60
 
 
61
signals:
 
62
    void checked(const bool &checked);
 
63
 
 
64
 
 
65
};
 
66
 
 
67
 
 
68
#endif // CHECKICON_H