mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
MainClock: introduce actual set_display_delta_mode
Make MainClock more self-contained and generic by moving logic from the Config system and to the class itself, while making the class less aware of how it is used in the config system. It is slightly dirty to store the initial AudioClock widget name in MainClock, but less dirty than having to pass the whole name correctly every time the delta mode changes. Also avoid confusing use of 'mode', which in AudioClock is used for the units/formatting of the clock.
This commit is contained in:
parent
75f6b8fb66
commit
38d7d28b25
3 changed files with 25 additions and 34 deletions
|
|
@ -30,6 +30,7 @@ class MainClock : public AudioClock
|
|||
public:
|
||||
MainClock (const std::string& clock_name, const std::string& widget_name, bool primary);
|
||||
void set_session (ARDOUR::Session *s);
|
||||
void set_display_delta_mode (ARDOUR::ClockDeltaMode m);
|
||||
void set (Temporal::timepos_t const &, bool force = false);
|
||||
|
||||
private:
|
||||
|
|
@ -41,6 +42,8 @@ private:
|
|||
void insert_new_meter ();
|
||||
bool _primary;
|
||||
bool _suspend_delta_mode_signal;
|
||||
std::string _widget_name;
|
||||
ARDOUR::ClockDeltaMode _delta_mode;
|
||||
};
|
||||
|
||||
#endif // __gtk_ardour_main_clock_h__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue