Audacity 3.2.0
CompareAudioCommand.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity - A Digital Audio Editor
4 Copyright 1999-2009 Audacity Team
5 License: wxwidgets
6
7 Dan Horgan
8 James Crook
9
10******************************************************************//*******************************************************************/
17
18#ifndef __COMPAREAUDIOCOMMAND__
19#define __COMPAREAUDIOCOMMAND__
20
21#include "Command.h"
22#include "CommandType.h"
23
24class WaveTrack;
25
27{
28public:
30
31 // ComponentInterface overrides
32 ComponentInterfaceSymbol GetSymbol() const override {return Symbol;}
33 TranslatableString GetDescription() const override {return XO("Compares a range on two tracks.");};
34 template<bool Const> bool VisitSettings( SettingsVisitorBase<Const> &S );
35 bool VisitSettings( SettingsVisitor & S ) override;
36 bool VisitSettings( ConstSettingsVisitor & S ) override;
37 void PopulateOrExchange(ShuttleGui & S) override;
38
39 // AudacityCommand overrides
40 ManualPageID ManualPage() override {return L"Extra_Menu:_Scriptables_II#compare_Audio";}
41 bool Apply(const CommandContext &context) override;
42
43
44private:
46 double mT0, mT1;
49
50 // Update member variables with project selection data (and validate)
51 bool GetSelection(const CommandContext &context, AudacityProject &proj);
52
53protected:
54 double CompareSample(double value1, double value2) /* not override */;
55
56};
57
58#endif /* End of include guard: __COMPAREAUDIOCOMMAND__ */
Contains declaration of Command base class.
Contains declarations for CommandType class.
XO("Cut/Copy/Paste")
#define S(N)
Definition: ToChars.cpp:64
Base class for command in Audacity.
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Returns information about the amount of audio that is about a certain threshold of difference in two ...
double CompareSample(double value1, double value2)
TranslatableString GetDescription() const override
void PopulateOrExchange(ShuttleGui &S) override
ManualPageID ManualPage() override
const WaveTrack * mTrack1
ComponentInterfaceSymbol GetSymbol() const override
bool Apply(const CommandContext &context) override
bool GetSelection(const CommandContext &context, AudacityProject &proj)
static const ComponentInterfaceSymbol Symbol
const WaveTrack * mTrack0
bool VisitSettings(SettingsVisitorBase< Const > &S)
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Visitor of effect or command parameters. This is a base class with lots of virtual functions that do ...
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
Definition: WaveTrack.h:203