annotate widgets/PropertyBox.h @ 1615:911330a28a7c

Where the "below" view represents only a subset of the "above" view, cut off the feature mappings at the outer edges of the "below" view - don't map everything outside this (it would all just map onto the same single points at beginning and end, which is excessive, confusing and not useful)
author Chris Cannam
date Thu, 02 Jul 2020 15:37:43 +0100
parents a798a7b5e215
children
rev   line source
Chris@58 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@0 2
Chris@0 3 /*
Chris@59 4 Sonic Visualiser
Chris@59 5 An audio file viewer and annotation editor.
Chris@59 6 Centre for Digital Music, Queen Mary, University of London.
Chris@59 7 This file copyright 2006 Chris Cannam.
Chris@0 8
Chris@59 9 This program is free software; you can redistribute it and/or
Chris@59 10 modify it under the terms of the GNU General Public License as
Chris@59 11 published by the Free Software Foundation; either version 2 of the
Chris@59 12 License, or (at your option) any later version. See the file
Chris@59 13 COPYING included with this distribution for more information.
Chris@0 14 */
Chris@0 15
Chris@1196 16 #ifndef SV_PROPERTY_BOX_H
Chris@1196 17 #define SV_PROPERTY_BOX_H
Chris@0 18
Chris@0 19 #include "base/PropertyContainer.h"
Chris@0 20
Chris@0 21 #include <QFrame>
Chris@0 22 #include <map>
Chris@0 23
Chris@33 24 class QLayout;
Chris@33 25 class QWidget;
Chris@0 26 class QGridLayout;
Chris@34 27 class QVBoxLayout;
Chris@107 28 class QLabel;
Chris@185 29 class LEDButton;
Chris@1189 30 class QToolButton;
Chris@1180 31 class NotifyingPushButton;
Chris@1587 32 class QMenu;
Chris@0 33
Chris@0 34 class PropertyBox : public QFrame
Chris@0 35 {
Chris@0 36 Q_OBJECT
Chris@0 37
Chris@0 38 public:
Chris@0 39 PropertyBox(PropertyContainer *);
Chris@0 40 ~PropertyBox();
Chris@0 41
Chris@0 42 PropertyContainer *getContainer() { return m_container; }
Chris@0 43
Chris@34 44 signals:
Chris@47 45 void showLayer(bool);
Chris@189 46 void contextHelpChanged(const QString &);
Chris@34 47
Chris@0 48 public slots:
Chris@0 49 void propertyContainerPropertyChanged(PropertyContainer *);
Chris@197 50 void propertyContainerPropertyRangeChanged(PropertyContainer *);
Chris@769 51 void playClipChanged(QString);
Chris@185 52 void layerVisibilityChanged(bool);
Chris@0 53
Chris@0 54 protected slots:
Chris@0 55 void propertyControllerChanged(int);
Chris@335 56 void propertyControllerChanged(bool);
Chris@1602 57 void propertyControllerResetRequested();
Chris@0 58
Chris@377 59 void playAudibleChanged(bool);
Chris@377 60 void playAudibleButtonChanged(bool);
Chris@1178 61 void playGainControlChanged(float);
Chris@1178 62 void playPanControlChanged(float);
Chris@34 63
Chris@34 64 void populateViewPlayFrame();
Chris@34 65
Chris@100 66 void unitDatabaseChanged();
Chris@100 67
Chris@769 68 void editPlayParameters();
Chris@63 69
Chris@189 70 void mouseEnteredWidget();
Chris@189 71 void mouseLeftWidget();
Chris@189 72
Chris@1587 73 void contextMenuRequested(const QPoint &);
Chris@1587 74
Chris@0 75 protected:
Chris@197 76 void updatePropertyEditor(PropertyContainer::PropertyName,
Chris@197 77 bool rangeChanged = false);
Chris@218 78 void updateContextHelp(QObject *o);
Chris@0 79
Chris@107 80 QLabel *m_nameWidget;
Chris@33 81 QWidget *m_mainWidget;
Chris@0 82 QGridLayout *m_layout;
Chris@0 83 PropertyContainer *m_container;
Chris@34 84 QFrame *m_viewPlayFrame;
Chris@34 85 QVBoxLayout *m_mainBox;
Chris@185 86 LEDButton *m_showButton;
Chris@1189 87 QToolButton *m_playButton;
Chris@1587 88 QMenu *m_lastContextMenu;
Chris@1602 89 QObject *m_contextMenuOn;
Chris@493 90 std::map<QString, QGridLayout *> m_groupLayouts;
Chris@0 91 std::map<QString, QWidget *> m_propertyControllers;
Chris@0 92 };
Chris@0 93
Chris@0 94 #endif