forked from MGraefe/RP-Soundboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
soundsettings_qt.h
67 lines (53 loc) · 1.34 KB
/
soundsettings_qt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// src/soundsettings_qt.h
//----------------------------------
// RP Soundboard Source Code
// Copyright (c) 2015 Marius Graefe
// All rights reserved
// Contact: [email protected]
//----------------------------------
#pragma once
#ifndef rpsbsrc__soundsettings_qt_H__
#define rpsbsrc__soundsettings_qt_H__
#include <QDialog>
#include <QCloseEvent>
#include <QIcon>
#include <QTimer>
#include "SoundInfo.h"
class ConfigModel;
class SoundView;
namespace Ui {
class SoundSettingsQt;
}
class SoundSettingsQt: public QDialog
{
Q_OBJECT
public:
explicit SoundSettingsQt(const SoundInfo &soundInfo, size_t buttonId, QWidget *parent = 0);
~SoundSettingsQt();
const SoundInfo &getSoundInfo() const { return m_soundInfo; }
protected:
void done(int r);
private slots:
void onVolumeChanged(int value);
void onBrowsePressed();
void onPreviewPressed();
void onTimer();
void onHotkeyChangePressed();
void updateHotkeyText();
void onColorEnabledPressed();
void onChooseColorPressed();
void updateSoundView();
private:
void initGui(const SoundInfo &sound);
void fillFromGui(SoundInfo &sound);
private:
Ui::SoundSettingsQt *ui;
SoundInfo m_soundInfo;
size_t m_buttonId;
QIcon m_iconPlay;
QIcon m_iconStop;
QTimer *m_timer;
SoundView *m_soundview;
QColor customColor;
};
#endif