• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョン5093ceb887e8e922d05de50e5eeb0fcc3dc351e7 (tree)
日時2014-05-17 18:14:33
作者alucky4416 <alucky4416@user...>
コミッターalucky4416

ログメッセージ

feature: add SoundVolume. and load/save SoundVolumeLevel.

変更サマリ

差分

--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -75,6 +75,10 @@ MainWindow::MainWindow(QWidget *parent) :
7575 // this, SLOT(slot_calc_end(QString)));
7676 ThPlayMusic->start();
7777
78+ float vlmlevel = ThPlayMusic->GetSoundVolume() * 100.0;
79+ // qDebug() << "vlmlevel=" << vlmlevel ;
80+ ui->hSlider_Volume->setValue((int)vlmlevel);
81+
7882 // ScheduleManager Thread
7983 ThSchMngr = new ThSchManager(this);
8084 connect(ThSchMngr, SIGNAL(sig_notify_nexttime(QString)),
@@ -121,6 +125,9 @@ void MainWindow::LoadSaveSetting(QString filepath, bool store = false)
121125 // Exclude AutoStart flag
122126 settings.setValue("SETTING/AUTO_START", ui->checkBox_AutoStart->isChecked());
123127
128+ // Sound Volume Level
129+ settings.setValue("SETTING/VOLUME_LEVEL", ui->hSlider_Volume->value());
130+
124131 // Exclude SS flag
125132 settings.setValue("SETTING/EXCLUDE_SS", ui->checkBox_Exclude_SS->isChecked());
126133
@@ -144,6 +151,9 @@ void MainWindow::LoadSaveSetting(QString filepath, bool store = false)
144151 // Exclude AutoStart flag
145152 ui->checkBox_AutoStart->setChecked(settings.value("SETTING/AUTO_START", false).toBool());
146153
154+ // Sound Volume Level
155+ ui->hSlider_Volume->setValue((settings.value("SETTING/VOLUME_LEVEL", 10).toInt()));
156+
147157 // Exclude SS flag
148158 ui->checkBox_Exclude_SS->setChecked(settings.value("SETTING/EXCLUDE_SS", true).toBool());
149159
@@ -399,3 +409,13 @@ void MainWindow::on_lineEdit_FilePath_textChanged(const QString &arg1)
399409 ui->pushButton_TestPlay->setEnabled(true);
400410 }
401411 }
412+
413+void MainWindow::on_hSlider_Volume_valueChanged(int value)
414+{
415+ float volume = value / 100.0;
416+ ThPlayMusic->SetSoundVolume(volume);
417+#if 0
418+ volume = ThPlayMusic->GetSoundVolume() * 100.0;
419+ qDebug() << "Volume" << volume;
420+#endif
421+}
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -48,6 +48,8 @@ private slots:
4848
4949 void on_lineEdit_FilePath_textChanged(const QString &arg1);
5050
51+ void on_hSlider_Volume_valueChanged(int value);
52+
5153 private:
5254 Ui::MainWindow *ui;
5355 QLabel *statusbar_label_status;
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -35,7 +35,7 @@
3535 </property>
3636 <property name="geometry">
3737 <rect>
38- <x>130</x>
38+ <x>120</x>
3939 <y>270</y>
4040 <width>121</width>
4141 <height>41</height>
@@ -64,8 +64,8 @@
6464 </property>
6565 <property name="geometry">
6666 <rect>
67- <x>290</x>
68- <y>240</y>
67+ <x>300</x>
68+ <y>230</y>
6969 <width>51</width>
7070 <height>23</height>
7171 </rect>
@@ -117,7 +117,7 @@
117117 <property name="geometry">
118118 <rect>
119119 <x>20</x>
120- <y>200</y>
120+ <y>190</y>
121121 <width>121</width>
122122 <height>20</height>
123123 </rect>
@@ -216,7 +216,7 @@
216216 <property name="geometry">
217217 <rect>
218218 <x>20</x>
219- <y>220</y>
219+ <y>210</y>
220220 <width>321</width>
221221 <height>20</height>
222222 </rect>
@@ -226,7 +226,7 @@
226226 <property name="geometry">
227227 <rect>
228228 <x>340</x>
229- <y>220</y>
229+ <y>210</y>
230230 <width>21</width>
231231 <height>18</height>
232232 </rect>
@@ -238,8 +238,8 @@
238238 <widget class="QCheckBox" name="checkBox_AutoStart">
239239 <property name="geometry">
240240 <rect>
241- <x>20</x>
242- <y>240</y>
241+ <x>120</x>
242+ <y>320</y>
243243 <width>191</width>
244244 <height>18</height>
245245 </rect>
@@ -251,6 +251,32 @@
251251 <bool>false</bool>
252252 </property>
253253 </widget>
254+ <widget class="QSlider" name="hSlider_Volume">
255+ <property name="geometry">
256+ <rect>
257+ <x>80</x>
258+ <y>230</y>
259+ <width>211</width>
260+ <height>23</height>
261+ </rect>
262+ </property>
263+ <property name="orientation">
264+ <enum>Qt::Horizontal</enum>
265+ </property>
266+ </widget>
267+ <widget class="QLabel" name="label_3">
268+ <property name="geometry">
269+ <rect>
270+ <x>20</x>
271+ <y>230</y>
272+ <width>51</width>
273+ <height>20</height>
274+ </rect>
275+ </property>
276+ <property name="text">
277+ <string>Volume</string>
278+ </property>
279+ </widget>
254280 </widget>
255281 <widget class="QMenuBar" name="menuBar">
256282 <property name="geometry">
@@ -258,7 +284,7 @@
258284 <x>0</x>
259285 <y>0</y>
260286 <width>407</width>
261- <height>20</height>
287+ <height>18</height>
262288 </rect>
263289 </property>
264290 <widget class="QMenu" name="menuFile">