Ardour  9.0-pre0-582-g084a23a80d
quantize_dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2009-2015 David Robillard <d@drobilla.net>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef __ardour_gtk2_quantize_dialog_h_
20 #define __ardour_gtk2_quantize_dialog_h_
21 
22 #include <vector>
23 #include <string>
24 
25 #include <gtkmm/comboboxtext.h>
26 #include <gtkmm/adjustment.h>
27 #include <gtkmm/checkbutton.h>
28 #include <gtkmm/spinbutton.h>
29 
30 #include "temporal/beats.h"
31 
32 #include "ardour/types.h"
33 
34 #include "ardour_dialog.h"
35 
36 namespace ARDOUR {
37  class MidiRegion;
38  class MidiModel;
39 };
40 
41 class EditingContext;
42 
44 {
45 public:
48 
51  bool snap_start() const { return snap_start_button.get_active(); }
52  bool snap_end() const { return snap_end_button.get_active(); }
53  float strength() const;
55  float swing () const;
56 
57 private:
59 
73 
74  static std::vector<std::string> grid_strings;
75  static std::vector<std::string> type_strings;
76 
77  Temporal::Beats grid_size_to_musical_time (const std::string&) const;
78 };
79 
80 #endif /* __ardour_gtk2_quantize_dialog_h_ */
bool get_active() const
Temporal::Beats start_grid_size() const
Temporal::Beats threshold() const
Gtk::Adjustment strength_adjustment
Temporal::Beats end_grid_size() const
float strength() const
EditingContext & editor
Gtk::CheckButton snap_start_button
Gtk::SpinButton swing_spinner
QuantizeDialog(EditingContext &)
Gtk::SpinButton threshold_spinner
Gtk::CheckButton swing_button
Temporal::Beats grid_size_to_musical_time(const std::string &) const
Gtk::Adjustment threshold_adjustment
Gtk::CheckButton snap_end_button
Gtk::SpinButton strength_spinner
float swing() const
Gtk::Adjustment swing_adjustment
Gtk::Label threshold_label
bool snap_end() const
static std::vector< std::string > grid_strings
Gtk::ComboBoxText start_grid_combo
static std::vector< std::string > type_strings
Gtk::Label strength_label
bool snap_start() const
Gtk::ComboBoxText end_grid_combo