Mercurial > hg > easaier-soundaccess
comparison widgets/ItemEditDialog.h @ 0:fc9323a41f5a
start base : Sonic Visualiser sv1-1.0rc1
author | lbajardsilogic |
---|---|
date | Fri, 11 May 2007 09:08:14 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:fc9323a41f5a |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 Sonic Visualiser | |
5 An audio file viewer and annotation editor. | |
6 Centre for Digital Music, Queen Mary, University of London. | |
7 This file copyright 2006 Chris Cannam. | |
8 | |
9 This program is free software; you can redistribute it and/or | |
10 modify it under the terms of the GNU General Public License as | |
11 published by the Free Software Foundation; either version 2 of the | |
12 License, or (at your option) any later version. See the file | |
13 COPYING included with this distribution for more information. | |
14 */ | |
15 | |
16 #ifndef _ITEM_EDIT_DIALOG_H_ | |
17 #define _ITEM_EDIT_DIALOG_H_ | |
18 | |
19 #include <QDialog> | |
20 #include <QString> | |
21 | |
22 #include "base/RealTime.h" | |
23 | |
24 class QSpinBox; | |
25 class QDoubleSpinBox; | |
26 class QLineEdit; | |
27 | |
28 class ItemEditDialog : public QDialog | |
29 { | |
30 Q_OBJECT | |
31 | |
32 public: | |
33 enum { | |
34 ShowTime = 1 << 0, | |
35 ShowDuration = 1 << 1, | |
36 ShowValue = 1 << 2, | |
37 ShowText = 1 << 3 | |
38 }; | |
39 | |
40 ItemEditDialog(size_t sampleRate, int options, QString valueUnits = "", | |
41 QWidget *parent = 0); | |
42 | |
43 void setFrameTime(long frame); | |
44 long getFrameTime() const; | |
45 | |
46 void setRealTime(RealTime rt); | |
47 RealTime getRealTime() const; | |
48 | |
49 void setFrameDuration(long frame); | |
50 long getFrameDuration() const; | |
51 | |
52 void setRealDuration(RealTime rt); | |
53 RealTime getRealDuration() const; | |
54 | |
55 void setValue(float value); | |
56 float getValue() const; | |
57 | |
58 void setText(QString text); | |
59 QString getText() const; | |
60 | |
61 protected slots: | |
62 void frameTimeChanged(int); | |
63 void realTimeSecsChanged(int); | |
64 void realTimeUSecsChanged(int); | |
65 void frameDurationChanged(int); | |
66 void realDurationSecsChanged(int); | |
67 void realDurationUSecsChanged(int); | |
68 void valueChanged(double); | |
69 void textChanged(QString); | |
70 void reset(); | |
71 | |
72 protected: | |
73 size_t m_sampleRate; | |
74 long m_defaultFrame; | |
75 long m_defaultDuration; | |
76 float m_defaultValue; | |
77 QString m_defaultText; | |
78 QSpinBox *m_frameTimeSpinBox; | |
79 QSpinBox *m_realTimeSecsSpinBox; | |
80 QSpinBox *m_realTimeUSecsSpinBox; | |
81 QSpinBox *m_frameDurationSpinBox; | |
82 QSpinBox *m_realDurationSecsSpinBox; | |
83 QSpinBox *m_realDurationUSecsSpinBox; | |
84 QDoubleSpinBox *m_valueSpinBox; | |
85 QLineEdit *m_textField; | |
86 QPushButton *m_resetButton; | |
87 }; | |
88 | |
89 #endif |