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

« back to all changes in this revision

Viewing changes to src/zoomview.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) 2009 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
 
 
21
 
#ifndef ZOOMVIEW_H
22
 
#define ZOOMVIEW_H
23
 
 
24
 
 
25
 
// Qt
26
 
#include <QtGui/QWidget>
27
 
 
28
 
 
29
 
class QTimer;
30
 
class ZoomView : public QWidget
31
 
{
32
 
    Q_OBJECT
33
 
 
34
 
 
35
 
public:
36
 
    enum Quality {
37
 
        Low = 0,
38
 
        High = 1
39
 
    };
40
 
 
41
 
    ZoomView(QWidget *parent = 0);
42
 
    ~ZoomView();
43
 
 
44
 
    qreal factor() const;
45
 
 
46
 
    void setFactor(const qreal &factor);
47
 
    void setSize(const QSize &size);
48
 
    void setFollowMouse(const bool &follow);
49
 
    void setQuality(const ZoomView::Quality &quality);
50
 
 
51
 
 
52
 
private:
53
 
    QPixmap m_pixmap;
54
 
    qreal m_factor;
55
 
    QTimer *m_timer;
56
 
    bool m_followMouse;
57
 
    Quality m_quality;
58
 
 
59
 
 
60
 
private slots:
61
 
    void updateView();
62
 
    
63
 
 
64
 
protected:
65
 
    void paintEvent(QPaintEvent *event);
66
 
    void wheelEvent(QWheelEvent *event);
67
 
 
68
 
 
69
 
};
70
 
 
71
 
 
72
 
#endif // ZOOMVIEW_H