Mercurial > hg > svgui
comparison widgets/ItemEditDialog.h @ 70:bf306158803d
* Add stub for item-edit dialog (for editing properties of an item on double-
click) -- doesn't actually do anything yet
* Add code to invoke said non-working item-edit dialog on double-click in
time-value, time-instants and note layers
* Add overlay mode (no text, basic text, all text)
author | Chris Cannam |
---|---|
date | Thu, 30 Mar 2006 15:00:22 +0000 |
parents | |
children | ad1fe715b480 |
comparison
equal
deleted
inserted
replaced
69:6dad2724f3aa | 70:bf306158803d |
---|---|
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 ItemEditDialog : public QDialog | |
25 { | |
26 Q_OBJECT | |
27 | |
28 public: | |
29 enum { | |
30 ShowTime = 1 << 0, | |
31 ShowDuration = 1 << 1, | |
32 ShowValue = 1 << 2, | |
33 ShowText = 1 << 3 | |
34 }; | |
35 | |
36 ItemEditDialog(size_t sampleRate, int options, QWidget *parent = 0); | |
37 | |
38 void setFrameTime(long frame); | |
39 long getFrameTime() const; | |
40 | |
41 void setRealTime(RealTime rt); | |
42 RealTime getRealTime() const; | |
43 | |
44 void setFrameDuration(long frame); | |
45 long getFrameDuration() const; | |
46 | |
47 void setRealDuration(RealTime rt); | |
48 RealTime getRealDuration() const; | |
49 | |
50 void setValue(float value); | |
51 float getValue() const; | |
52 | |
53 void setText(QString text); | |
54 QString getText() const; | |
55 | |
56 protected slots: | |
57 void frameTimeChanged(QString); | |
58 void realTimeSecsChanged(QString); | |
59 void realTimeNSecsChanged(QString); | |
60 void frameDurationChanged(QString); | |
61 void realDurationSecsChanged(QString); | |
62 void realDurationNSecsChanged(QString); | |
63 void valueChanged(double); | |
64 void textChanged(QString); | |
65 | |
66 protected: | |
67 size_t m_sampleRate; | |
68 long m_frame; | |
69 long m_duration; | |
70 double m_value; | |
71 QString m_text; | |
72 }; | |
73 | |
74 #endif |