~ubuntu-branches/ubuntu/jaunty/bibletime/jaunty

« back to all changes in this revision

Viewing changes to bibletime/frontend/keychooser/cscrollbutton.h

  • Committer: Bazaar Package Importer
  • Author(s): Ralph Janke
  • Date: 2008-05-10 15:18:16 UTC
  • mfrom: (1.1.6 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080510151816-bqp8y1to705zd0fm
Tags: 1.6.5.1-1
* New upstream version (Closes: #441161, #271502)
* fixes for new autotools and gcc 4.3 (Closes: #407291)
* added poxml to Build-Depends
* No DFSG necessary anymore since biblestudy howto has 
  now Commons Licence 
* Added libclucene-dev to dev-depends (Closes: #436677)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*********
 
2
*
 
3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
 
4
*
 
5
* Copyright 1999-2006 by the BibleTime developers.
 
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
 
7
*
 
8
**********/
 
9
 
 
10
 
 
11
 
 
12
#ifndef CSRCOLLBUTTON_H
 
13
#define CSRCOLLBUTTON_H
 
14
 
 
15
#include <qwidget.h>
 
16
#include <qtoolbutton.h>
 
17
 
 
18
class QMouseEvent;
 
19
 
 
20
/** This Class implements the direct chooser button used in the KeyChooser Widget
 
21
  * @author The BibleTime team
 
22
  */
 
23
class CScrollButton : public QToolButton  {
 
24
        Q_OBJECT
 
25
public:
 
26
        /**
 
27
        * The constructor
 
28
        */
 
29
        CScrollButton(QWidget *parent=0, const char *name=0);
 
30
        const bool isLocked() const;
 
31
 
 
32
signals:
 
33
        /**
 
34
        * is emitted when the button enters locked state
 
35
        */
 
36
        void lock()
 
37
                ;
 
38
        /**
 
39
        * is emitted when the button leaves locked state
 
40
        */
 
41
        void unlock();
 
42
        /**
 
43
        * indicates a change the user made by moving the mouse
 
44
        * @param count the number of items to be changed in the KeyChooser ComboBox
 
45
        */
 
46
        void change_requested(int count);
 
47
 
 
48
protected slots:
 
49
        /*
 
50
        * used to process the button press events
 
51
        */
 
52
        void was_pressed();
 
53
        /**
 
54
        * used to process the button release events
 
55
        */
 
56
        void was_released();
 
57
 
 
58
protected:
 
59
        /**
 
60
        * Reimplementation from @ref QWidget#mouseMoveEvent - processes
 
61
        * the mouse move events
 
62
        */
 
63
        virtual void mouseMoveEvent( QMouseEvent* e );
 
64
        /**
 
65
        * used to find the lock point - the middle of the button
 
66
        * @return the lock point
 
67
        */
 
68
        const QPoint get_lock_Point() const;
 
69
        /**
 
70
        * If the wheel of the mouse is used while the mouse stays over our scrollbutton the content is
 
71
        * scrolled like the mouse was pressed and moved.
 
72
        */
 
73
        virtual void wheelEvent( QWheelEvent* e );
 
74
 
 
75
private:
 
76
        /**
 
77
        * Indicates whether the button is in locked state or not
 
78
        */
 
79
        bool m_isLocked;
 
80
        /**
 
81
        * stores the lock point
 
82
        */
 
83
        QPoint lock_Point;
 
84
};
 
85
 
 
86
#endif