annotate widgets/PluginParameterDialog.h @ 151:8f51db2434dc

* Pull alphabetical categorisation code out into a SubdividingMenu class
author Chris Cannam
date Mon, 25 Sep 2006 11:21:12 +0000
parents a1f7d265ac79
children 8c730f49b9b3
rev   line source
Chris@62 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@62 2
Chris@62 3 /*
Chris@62 4 Sonic Visualiser
Chris@62 5 An audio file viewer and annotation editor.
Chris@62 6 Centre for Digital Music, Queen Mary, University of London.
Chris@62 7 This file copyright 2006 Chris Cannam.
Chris@62 8
Chris@62 9 This program is free software; you can redistribute it and/or
Chris@62 10 modify it under the terms of the GNU General Public License as
Chris@62 11 published by the Free Software Foundation; either version 2 of the
Chris@62 12 License, or (at your option) any later version. See the file
Chris@62 13 COPYING included with this distribution for more information.
Chris@62 14 */
Chris@62 15
Chris@62 16 #ifndef _PLUGIN_PARAMETER_DIALOG_H_
Chris@62 17 #define _PLUGIN_PARAMETER_DIALOG_H_
Chris@62 18
Chris@62 19 #include <QDialog>
Chris@62 20
Chris@145 21 #include "base/Window.h"
Chris@145 22
Chris@71 23 namespace Vamp { class PluginBase; }
Chris@62 24 class PluginParameterBox;
Chris@143 25 class QWidget;
Chris@143 26 class QPushButton;
Chris@62 27
Chris@62 28 /**
Chris@62 29 * A dialog for editing the parameters of a given plugin, using a
Chris@62 30 * PluginParameterBox. This dialog does not contain any mechanism for
Chris@62 31 * selecting the plugin in the first place. Note that the dialog
Chris@62 32 * directly modifies the parameters of the plugin, so they will remain
Chris@62 33 * modified even if the dialog is then cancelled.
Chris@62 34 */
Chris@62 35
Chris@62 36 class PluginParameterDialog : public QDialog
Chris@62 37 {
Chris@62 38 Q_OBJECT
Chris@62 39
Chris@62 40 public:
Chris@71 41 PluginParameterDialog(Vamp::PluginBase *,
Chris@69 42 int sourceChannels,
Chris@69 43 int targetChannels,
Chris@69 44 int defaultChannel,
Chris@106 45 QString output = "",
Chris@140 46 bool showWindowSize = false,
Chris@140 47 bool showFrequencyDomainOptions = false,
Chris@69 48 QWidget *parent = 0);
Chris@62 49 ~PluginParameterDialog();
Chris@62 50
Chris@71 51 Vamp::PluginBase *getPlugin() { return m_plugin; }
Chris@62 52
Chris@69 53 int getChannel() const { return m_channel; }
Chris@69 54
Chris@146 55 //!!! merge with PluginTransform::ExecutionContext
Chris@146 56
Chris@145 57 void getProcessingParameters(size_t &blockSize) const;
Chris@145 58 void getProcessingParameters(size_t &stepSize, size_t &blockSize,
Chris@145 59 WindowType &windowType) const;
Chris@145 60
Chris@64 61 signals:
Chris@64 62 void pluginConfigurationChanged(QString);
Chris@64 63
Chris@69 64 protected slots:
Chris@69 65 void channelComboChanged(int);
Chris@145 66 void blockSizeComboChanged(QString);
Chris@145 67 void incrementComboChanged(QString);
Chris@145 68 void windowTypeChanged(WindowType type);
Chris@143 69 void advancedToggled();
Chris@69 70
Chris@62 71 protected:
Chris@71 72 Vamp::PluginBase *m_plugin;
Chris@69 73 int m_channel;
Chris@145 74 size_t m_stepSize;
Chris@145 75 size_t m_blockSize;
Chris@145 76 WindowType m_windowType;
Chris@62 77 PluginParameterBox *m_parameterBox;
Chris@143 78 QPushButton *m_advancedButton;
Chris@143 79 QWidget *m_advanced;
Chris@62 80 };
Chris@62 81
Chris@62 82 #endif
Chris@62 83