QtPdWidgets  2.3.1
TouchEdit.h
Go to the documentation of this file.
1 /*****************************************************************************
2  *
3  * Copyright (C) 2011 - 2012 Andreas Stewering-Bone <ab@igh-essen.com>
4  *
5  * This file is part of the QtPdWidgets library.
6  *
7  * The QtPdWidgets library is free software: you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation, either version 3 of the License,
10  * or (at your option) any later version.
11  *
12  * The QtPdWidgets library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with the QtPdWidgets Library. If not, see
19  * <http://www.gnu.org/licenses/>.
20  *
21  ****************************************************************************/
22 
23 #ifndef PD_TOUCHEDIT_H
24 #define PD_TOUCHEDIT_H
25 
26 #include <QWidget>
27 
28 #include "Export.h"
29 #include "Digital.h"
30 
31 namespace Pd {
32 
33 class TouchEditDialog;
34 
35 /****************************************************************************/
36 
40  public Digital
41 {
42  Q_OBJECT
43 
44  Q_PROPERTY(double lowerLimit
45  READ getLowerLimit WRITE setLowerLimit
46  RESET resetLowerLimit)
47  Q_PROPERTY(double upperLimit
48  READ getUpperLimit WRITE setUpperLimit
49  RESET resetUpperLimit)
50  Q_PROPERTY(bool editing READ getEditing);
51 
52  public:
53  TouchEdit(QWidget *parent = 0);
54  virtual ~TouchEdit();
55 
56  double getLowerLimit() const;
57  void setLowerLimit(double);
58  void resetLowerLimit();
59 
60  double getUpperLimit() const;
61  void setUpperLimit(double);
62  void resetUpperLimit();
63 
64  bool getEditing() const;
65 
66  protected:
67  bool event(QEvent *) override;
68 
69  private:
70  struct PD_PRIVATE Impl;
71  std::unique_ptr<Impl> impl;
72 
73  PD_PRIVATE void changeEvent(QEvent *) override; // from QWidget
74 };
75 
76 /****************************************************************************/
77 
78 } // namespace
79 
80 #endif
Digital display and touch edit.
Definition: TouchEdit.h:39
Definition: Bar.h:36
#define PD_PRIVATE
Definition: Export.h:28
#define PD_PUBLIC
Definition: Export.h:33
Definition: TouchEdit.cpp:42
Base functionality for digital displays.
Definition: Digital.h:39