Chris@70: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@70: Chris@70: /* Chris@70: Sonic Visualiser Chris@70: An audio file viewer and annotation editor. Chris@70: Centre for Digital Music, Queen Mary, University of London. Chris@70: This file copyright 2006 Chris Cannam. Chris@70: Chris@70: This program is free software; you can redistribute it and/or Chris@70: modify it under the terms of the GNU General Public License as Chris@70: published by the Free Software Foundation; either version 2 of the Chris@70: License, or (at your option) any later version. See the file Chris@70: COPYING included with this distribution for more information. Chris@70: */ Chris@70: Chris@70: #ifndef _ITEM_EDIT_DIALOG_H_ Chris@70: #define _ITEM_EDIT_DIALOG_H_ Chris@70: Chris@70: #include Chris@70: #include Chris@70: Chris@70: #include "base/RealTime.h" Chris@70: Chris@70: class ItemEditDialog : public QDialog Chris@70: { Chris@70: Q_OBJECT Chris@70: Chris@70: public: Chris@70: enum { Chris@70: ShowTime = 1 << 0, Chris@70: ShowDuration = 1 << 1, Chris@70: ShowValue = 1 << 2, Chris@70: ShowText = 1 << 3 Chris@70: }; Chris@70: Chris@70: ItemEditDialog(size_t sampleRate, int options, QWidget *parent = 0); Chris@70: Chris@70: void setFrameTime(long frame); Chris@70: long getFrameTime() const; Chris@70: Chris@70: void setRealTime(RealTime rt); Chris@70: RealTime getRealTime() const; Chris@70: Chris@70: void setFrameDuration(long frame); Chris@70: long getFrameDuration() const; Chris@70: Chris@70: void setRealDuration(RealTime rt); Chris@70: RealTime getRealDuration() const; Chris@70: Chris@70: void setValue(float value); Chris@70: float getValue() const; Chris@70: Chris@70: void setText(QString text); Chris@70: QString getText() const; Chris@70: Chris@70: protected slots: Chris@70: void frameTimeChanged(QString); Chris@70: void realTimeSecsChanged(QString); Chris@70: void realTimeNSecsChanged(QString); Chris@70: void frameDurationChanged(QString); Chris@70: void realDurationSecsChanged(QString); Chris@70: void realDurationNSecsChanged(QString); Chris@70: void valueChanged(double); Chris@70: void textChanged(QString); Chris@70: Chris@70: protected: Chris@70: size_t m_sampleRate; Chris@70: long m_frame; Chris@70: long m_duration; Chris@70: double m_value; Chris@70: QString m_text; Chris@70: }; Chris@70: Chris@70: #endif