Files
QtGameMaker/dialogs/soundpropertiesdialog.h
T

43 lines
752 B
C++
Raw Normal View History

2022-01-09 06:42:13 +01:00
#pragma once
#include <QDialog>
#include <QString>
#include <QSoundEffect>
#include <memory>
2022-01-09 21:07:41 +01:00
#include <optional>
2022-01-09 06:42:13 +01:00
namespace Ui { class SoundPropertiesDialog; }
struct Sound;
class SoundPropertiesDialog : public QDialog
{
Q_OBJECT
public:
explicit SoundPropertiesDialog(Sound &sound, QWidget *parent = nullptr);
~SoundPropertiesDialog();
void accept() override;
void reject() override;
private slots:
void loadSound();
2022-01-09 21:07:41 +01:00
void saveSound();
2022-01-09 06:42:13 +01:00
void playSound();
void stopSound();
void editSound();
void changed();
private:
const std::unique_ptr<Ui::SoundPropertiesDialog> m_ui;
Sound &m_sound;
bool m_unsavedChanges{};
2022-01-09 21:07:41 +01:00
std::optional<QString> m_newPath;
2022-01-09 06:42:13 +01:00
QSoundEffect m_soundEffect;
};