annotate widgets/ItemEditDialog.h @ 72:1d176af87056

* Add support for frequency-domain inputs to Vamp plugins
author Chris Cannam
date Fri, 31 Mar 2006 17:40:14 +0000
parents bf306158803d
children ad1fe715b480
rev   line source
Chris@70 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@70 2
Chris@70 3 /*
Chris@70 4 Sonic Visualiser
Chris@70 5 An audio file viewer and annotation editor.
Chris@70 6 Centre for Digital Music, Queen Mary, University of London.
Chris@70 7 This file copyright 2006 Chris Cannam.
Chris@70 8
Chris@70 9 This program is free software; you can redistribute it and/or
Chris@70 10 modify it under the terms of the GNU General Public License as
Chris@70 11 published by the Free Software Foundation; either version 2 of the
Chris@70 12 License, or (at your option) any later version. See the file
Chris@70 13 COPYING included with this distribution for more information.
Chris@70 14 */
Chris@70 15
Chris@70 16 #ifndef _ITEM_EDIT_DIALOG_H_
Chris@70 17 #define _ITEM_EDIT_DIALOG_H_
Chris@70 18
Chris@70 19 #include <QDialog>
Chris@70 20 #include <QString>
Chris@70 21
Chris@70 22 #include "base/RealTime.h"
Chris@70 23
Chris@70 24 class ItemEditDialog : public QDialog
Chris@70 25 {
Chris@70 26 Q_OBJECT
Chris@70 27
Chris@70 28 public:
Chris@70 29 enum {
Chris@70 30 ShowTime = 1 << 0,
Chris@70 31 ShowDuration = 1 << 1,
Chris@70 32 ShowValue = 1 << 2,
Chris@70 33 ShowText = 1 << 3
Chris@70 34 };
Chris@70 35
Chris@70 36 ItemEditDialog(size_t sampleRate, int options, QWidget *parent = 0);
Chris@70 37
Chris@70 38 void setFrameTime(long frame);
Chris@70 39 long getFrameTime() const;
Chris@70 40
Chris@70 41 void setRealTime(RealTime rt);
Chris@70 42 RealTime getRealTime() const;
Chris@70 43
Chris@70 44 void setFrameDuration(long frame);
Chris@70 45 long getFrameDuration() const;
Chris@70 46
Chris@70 47 void setRealDuration(RealTime rt);
Chris@70 48 RealTime getRealDuration() const;
Chris@70 49
Chris@70 50 void setValue(float value);
Chris@70 51 float getValue() const;
Chris@70 52
Chris@70 53 void setText(QString text);
Chris@70 54 QString getText() const;
Chris@70 55
Chris@70 56 protected slots:
Chris@70 57 void frameTimeChanged(QString);
Chris@70 58 void realTimeSecsChanged(QString);
Chris@70 59 void realTimeNSecsChanged(QString);
Chris@70 60 void frameDurationChanged(QString);
Chris@70 61 void realDurationSecsChanged(QString);
Chris@70 62 void realDurationNSecsChanged(QString);
Chris@70 63 void valueChanged(double);
Chris@70 64 void textChanged(QString);
Chris@70 65
Chris@70 66 protected:
Chris@70 67 size_t m_sampleRate;
Chris@70 68 long m_frame;
Chris@70 69 long m_duration;
Chris@70 70 double m_value;
Chris@70 71 QString m_text;
Chris@70 72 };
Chris@70 73
Chris@70 74 #endif