2 * Common Source Project/ Qt
3 * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
4 * Qt: Menu->Adjust Volume.
5 * History: Jul 28, 2015 : Initial
8 #ifndef _CSP_QT_SOUND_DIALOG_H
9 #define _CSP_QT_SOUND_DIALOG_H
11 #include <QApplication>
20 #include <QPushButton>
21 #include <QVBoxLayout>
22 #include <QHBoxLayout>
29 #include "commonclasses.h"
35 class Ui_SndSliderObject : public QSlider
40 QWidget *parent_widget;
43 Ui_SndSliderObject(EMU *_emu, Qt::Orientation orientation, QWidget *parent, int num = 0);
44 ~Ui_SndSliderObject();
46 void setValue(int volume);
47 void setLevelValue(int volume);
48 void setBalanceValue(int volume);
50 int sig_emu_update_config(void);
51 int sig_emu_update_volume_level(int, int);
52 int sig_emu_update_volume_balance(int, int);
55 class Ui_SoundDialog : public QWidget
60 QWidget *parent_widget;
61 QVBoxLayout *VBoxWindow;
62 QHBoxLayout *HBoxWindow;
65 Ui_SndSliderObject *sliderMasterVolume;
66 QGroupBox *boxMasterVolume;
67 QHBoxLayout *HBoxMasterVolume;
68 #ifdef USE_SOUND_VOLUME
69 Ui_SndSliderObject *sliderDeviceVolume[USE_SOUND_VOLUME * 2];
70 QGroupBox *boxDeviceVolume[USE_SOUND_VOLUME];
71 QHBoxLayout *HBoxDeviceVolume[USE_SOUND_VOLUME];
73 QPushButton *closeButton;
75 Ui_SoundDialog(EMU *_emu, QWidget *parent = 0);
77 void setDeviceLabel(int num, QString s);
78 void setSliderVisible(int num, bool flag);
80 void do_emu_update_config();
84 #endif //_CSP_QT_SOUND_DIALOG_H