~ubuntu-branches/ubuntu/dapper/lmms/dapper

« back to all changes in this revision

Viewing changes to include/lcd_spinbox.h

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ragwitz
  • Date: 2005-12-22 16:22:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051222162250-key3p7x0212jy6dn
Tags: 0.1.2-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * lcd_spinbox.h - class lcdSpinBox, an improved QLCDNumber
3
3
 *
4
 
 * Linux MultiMedia Studio
5
 
 * Copyright (c) 2004-2005 Tobias Doerffel <tobydox@users.sourceforge.net>
 
4
 * Copyright (c) 2005 Tobias Doerffel <tobydox/at/users.sourceforge.net>
 
5
 * 
 
6
 * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
6
7
 *
7
8
 * This program is free software; you can redistribute it and/or
8
9
 * modify it under the terms of the GNU General Public
30
31
#ifdef QT4
31
32
 
32
33
#include <QLCDNumber>
 
34
#include <QMap>
33
35
 
34
36
#else
35
37
 
36
38
#include <qlcdnumber.h>
 
39
#include <qmap.h>
37
40
 
38
41
#endif
39
42
 
40
43
 
 
44
class QLabel;
 
45
 
41
46
 
42
47
class lcdSpinBox : public QWidget
43
48
{
56
61
        void setValue( int _value );
57
62
        void setLabel( const QString & _txt );
58
63
 
 
64
        inline void addTextForValue( int _val, const QString & _text )
 
65
        {
 
66
                m_textForValue[_val] = _text;
 
67
        }
 
68
 
 
69
 
 
70
public slots:
 
71
        virtual void setEnabled( bool _on );
 
72
 
59
73
 
60
74
protected:
61
75
        virtual void mousePressEvent( QMouseEvent * _me );
65
79
 
66
80
 
67
81
private:
 
82
        QMap<int, QString> m_textForValue;
 
83
 
68
84
        int m_value;
69
85
        int m_minValue;
70
86
        int m_maxValue;