1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:07:36 +00:00

Piano: Show a progress window when exporting WAV

This exposes that the export is pretty slow, but it's much nicer than
having the GUI lock up for 20s :^)
This commit is contained in:
kleines Filmröllchen 2022-11-13 18:37:46 +01:00 committed by Tim Flynn
parent 392dac0818
commit e127c4acdc
7 changed files with 132 additions and 3 deletions

View file

@ -0,0 +1,33 @@
/*
* Copyright (c) 2022, kleines Filmröllchen <filmroellchen@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibCore/Event.h>
#include <LibGUI/Dialog.h>
#include <LibGUI/Label.h>
#include <LibGUI/Progressbar.h>
class ExportProgressWindow : public GUI::Dialog {
C_OBJECT(ExportProgressWindow);
public:
virtual ~ExportProgressWindow() override = default;
ErrorOr<void> initialize_fallibles();
virtual void timer_event(Core::TimerEvent&) override;
void set_filename(StringView filename);
private:
ExportProgressWindow(Window& parent_window, Atomic<int>& wav_percent_written);
Atomic<int>& m_wav_percent_written;
RefPtr<GUI::HorizontalProgressbar> m_progress_bar;
RefPtr<GUI::Label> m_label;
};