Debian Codegraph @

src/qutebutton.h

raw symbols SCIP
1 /*
2 Copyright (C) 2008, 2009 Andres Cabrera
3 [email protected]
4
5 This file is part of CsoundQt.
6
7 CsoundQt is free software; you can redistribute it
8 and/or modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 CsoundQt 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
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with Csound; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307 USA
21 */
22
23 #ifndef QUTEBUTTON_H
24 #define QUTEBUTTON_H
25
26 #include "qutewidget.h"
27
28 class QuteButton : public QuteWidget
29 {
30 Q_OBJECT
31 public:
32 QuteButton(QWidget *parent);
33
34 ~QuteButton();
35
36 virtual void setValue(double value); // Value of button when pressed
37 virtual void setValue(QString text); // String Value (internal) of button (e.g. for filenames)
38 virtual double getValue(); // This value represents the state of the button
39 virtual QString getStringValue(); // This value represents the filename from a _Browse channel button
40 virtual QString getWidgetLine();
41 virtual QString getCabbageLine();
42 virtual QString getQml();
43 virtual QString getWidgetXmlText();
44 virtual QString getWidgetType();
45 // void setType(QString text);
46 void setText(QString text);
47 // void setFilename(QString filename);
48 // void setEventLine(QString eventLine);
49 void popUpMenu(QPoint pos);
50 virtual void setMidiValue(int value);
51 virtual bool acceptsMidi() {return true;}
52
53 virtual void refreshWidget();
54 virtual void applyInternalProperties();
55
56 protected:
57 // virtual void contextMenuEvent(QContextMenuEvent* event);
58 virtual void applyProperties();
59 virtual void createPropertiesDialog();
60
61 private:
62 // QString m_eventLine;
63 // QString m_type; // can be event, value, pictevent, pictvalue, pict
64 // QString m_filename;
65 // QString m_imageFilename;
66 double m_currentValue;
67
68 QComboBox *typeComboBox;
69 QCheckBox *latchCheckBox;
70 QDoubleSpinBox *valueBox;
71 QTextEdit *text;
72 QLineEdit *filenameLineEdit;
73 QLineEdit *line;
74 QSpinBox *fontSizeSpinBox;
75 QCheckBox * useMomentaryMidiButtonCheckBox;
76
77 QIcon icon;
78 QIcon onIcon;
79
80 bool m_isPlaying;
81
82 void performAction();
83 bool hasIndefiniteDuration();
84
85 private slots:
86 void buttonPressed();
87 void buttonReleased();
88 void browseFile();
89
90 signals:
91 void queueEventSignal(QString eventLine);
92 void play();
93 void pause();
94 void stop();
95 void render();
96 // void selectMidiInDevices(QPoint pos);
97 // void selectMidiOutDevices(QPoint pos);
98 // void selectAudioInDevices(QPoint pos);
99 // void selectAudioOutDevices(QPoint pos);
100 };
101
102 #endif