QtPdWidgets  2.3.1
CursorEditWidget.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2011 Florian Pose <fp@igh-essen.com>
4  * Copyright (C) 2011 Andreas Stewering-Bone <ab@igh-essen.com>
5  *
6  * This file is part of the QtPdWidgets library.
7  *
8  * The QtPdWidgets library is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public License as
10  * published by the Free Software Foundation, either version 3 of the License,
11  * or (at your option) any later version.
12  *
13  * The QtPdWidgets library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with the QtPdWidgets Library. If not, see
20  * <http://www.gnu.org/licenses/>.
21  *
22  ****************************************************************************/
23 
24 #ifndef CURSOREDITWIDGET_H
25 #define CURSOREDITWIDGET_H
26 
27 #include <QWidget>
28 #include <QScopedPointer>
29 #include "Export.h"
30 
31 namespace Pd {
32 
33 class CursorEditWidgetPrivate;
34 
35 /****************************************************************************/
36 
40  public QWidget
41 {
42  Q_OBJECT
43 
44  public:
45  CursorEditWidget(QWidget *parent = 0);
46  virtual ~CursorEditWidget();
47 
48  QSize sizeHint() const;
49  void setValue(double);
50  void setDecimals(int);
51  void setSuffix(const QString &);
52  void setLowerLimit(double);
53  void setUpperLimit(double);
54  void setEditDigit(int);
55  int getEditDigit() const;
56  double getValue() const;
57 
58  public slots:
59  void digitLeft();
60  void digitRight();
61  void digitUp();
62  void digitDown();
63  void setZero();
64 
65  protected:
66  void paintEvent(QPaintEvent *);
67 
68  private:
69  Q_DECLARE_PRIVATE(CursorEditWidget)
70  QScopedPointer<CursorEditWidgetPrivate> const d_ptr;
71 };
72 
73 /****************************************************************************/
74 
75 }
76 /****************************************************************************/
77 
78 #endif
Definition: Bar.h:36
Definition: CursorEditWidget.cpp:41
#define PD_PUBLIC
Definition: Export.h:33
Numerical editing widget with cursor movement.
Definition: CursorEditWidget.h:39