百人一首かるた自動読み上げソフト
Revision | f08f9bdb184cb9b142636a11a92f5a32a71975d9 (tree) |
---|---|
Time | 2012-06-16 19:15:52 |
Author | arakaki <alucky4416@user...> |
Commiter | arakaki |
ADD: add AnkiJikan MsgBoxDialog. v1.2
@@ -1,44 +1,47 @@ | ||
1 | -#------------------------------------------------- | |
2 | -# | |
3 | -# Project created by QtCreator 2011-10-03T23:36:04 | |
4 | -# | |
5 | -#------------------------------------------------- | |
6 | - | |
7 | -QT += core gui | |
8 | - | |
9 | -TARGET = QtKarutaEishow | |
10 | -TEMPLATE = app | |
11 | - | |
12 | - | |
13 | -SOURCES += main.cpp \ | |
14 | - mainwindow.cpp \ | |
15 | - PlayMusicThread.cpp \ | |
16 | - PlaySequenceThread.cpp \ | |
17 | - fudaselectdlg.cpp \ | |
18 | - optiondialog.cpp \ | |
19 | - ankijikan_dialog.cpp | |
20 | - | |
21 | -HEADERS += mainwindow.h \ | |
22 | - PlayMusicThread.h \ | |
23 | - PlaySequenceThread.h \ | |
24 | - fudaselectdlg.h \ | |
25 | - textrsc.h \ | |
26 | - optiondialog.h \ | |
27 | - ankijikan_dialog.h | |
28 | - | |
29 | -FORMS += mainwindow.ui \ | |
30 | - fudaselectdlg.ui \ | |
31 | - optiondialog.ui \ | |
32 | - ankijikan_dialog.ui | |
33 | - | |
34 | -#win32:INCLUDEPATH += d:/SugarSync/QtWork/QtKarutaEishow/libbass/ | |
35 | -win32:INCLUDEPATH += $$PWD/libbass/ | |
36 | - | |
37 | -#win32:LIBS += d:/SugarSync/QtWork/QtKarutaEishow/libbass/libbass.dll.a | |
38 | -win32:LIBS += $$PWD/libbass/libbass.dll.a | |
39 | -unix:LIBS += -lbass | |
40 | - | |
41 | -RESOURCES += \ | |
42 | - QtKarutaEishow.qrc | |
43 | - | |
44 | -RC_FILE = Icon.rc | |
1 | +#------------------------------------------------- | |
2 | +# | |
3 | +# Project created by QtCreator 2011-10-03T23:36:04 | |
4 | +# | |
5 | +#------------------------------------------------- | |
6 | + | |
7 | +QT += core gui | |
8 | + | |
9 | +TARGET = QtKarutaEishow | |
10 | +TEMPLATE = app | |
11 | + | |
12 | + | |
13 | +SOURCES += main.cpp \ | |
14 | + mainwindow.cpp \ | |
15 | + PlayMusicThread.cpp \ | |
16 | + PlaySequenceThread.cpp \ | |
17 | + fudaselectdlg.cpp \ | |
18 | + optiondialog.cpp \ | |
19 | + ankijikan_dialog.cpp \ | |
20 | + finalmsgbox.cpp | |
21 | + | |
22 | +HEADERS += mainwindow.h \ | |
23 | + PlayMusicThread.h \ | |
24 | + PlaySequenceThread.h \ | |
25 | + fudaselectdlg.h \ | |
26 | + textrsc.h \ | |
27 | + optiondialog.h \ | |
28 | + ankijikan_dialog.h \ | |
29 | + finalmsgbox.h | |
30 | + | |
31 | +FORMS += mainwindow.ui \ | |
32 | + fudaselectdlg.ui \ | |
33 | + optiondialog.ui \ | |
34 | + ankijikan_dialog.ui \ | |
35 | + finalmsgbox.ui | |
36 | + | |
37 | +#win32:INCLUDEPATH += d:/SugarSync/QtWork/QtKarutaEishow/libbass/ | |
38 | +win32:INCLUDEPATH += $$PWD/libbass/ | |
39 | + | |
40 | +#win32:LIBS += d:/SugarSync/QtWork/QtKarutaEishow/libbass/libbass.dll.a | |
41 | +win32:LIBS += $$PWD/libbass/libbass.dll.a | |
42 | +unix:LIBS += -lbass | |
43 | + | |
44 | +RESOURCES += \ | |
45 | + QtKarutaEishow.qrc | |
46 | + | |
47 | +RC_FILE = Icon.rc |
@@ -1,16 +1,16 @@ | ||
1 | -<RCC> | |
2 | - <qresource prefix="/images" lang="KarutaEishow.png"> | |
3 | - <file>Image/KarutaEishow_logo.png</file> | |
4 | - <file>Image/QtKarutaEishowIcon.png</file> | |
5 | - <file alias="Pause.png">Image/pause_jp.png</file> | |
6 | - <file alias="Stop.png">Image/stop_jp.png</file> | |
7 | - <file>Image/joka_jp.png</file> | |
8 | - <file>Image/maai_jp.png</file> | |
9 | - <file>Image/second_jp.png</file> | |
10 | - <file alias="Play.png">Image/play_jp.png</file> | |
11 | - <file>Image/fudaselect_jp.png</file> | |
12 | - <file>Image/kamikusimokunoma_jp.png</file> | |
13 | - <file>Image/jikumadenoma_jp.png</file> | |
14 | - <file>Image/ankijikan_jp.png</file> | |
15 | - </qresource> | |
16 | -</RCC> | |
1 | +<RCC> | |
2 | + <qresource prefix="/images" lang="KarutaEishow.png"> | |
3 | + <file>Image/KarutaEishow_logo.png</file> | |
4 | + <file>Image/QtKarutaEishowIcon.png</file> | |
5 | + <file alias="Pause.png">Image/pause_jp.png</file> | |
6 | + <file alias="Stop.png">Image/stop_jp.png</file> | |
7 | + <file>Image/joka_jp.png</file> | |
8 | + <file>Image/maai_jp.png</file> | |
9 | + <file>Image/second_jp.png</file> | |
10 | + <file alias="Play.png">Image/play_jp.png</file> | |
11 | + <file>Image/fudaselect_jp.png</file> | |
12 | + <file>Image/kamikusimokunoma_jp.png</file> | |
13 | + <file>Image/jikumadenoma_jp.png</file> | |
14 | + <file>Image/ankijikan_jp.png</file> | |
15 | + </qresource> | |
16 | +</RCC> |
@@ -4,6 +4,9 @@ | ||
4 | 4 | #include <QDebug> |
5 | 5 | #include <QDateTime> |
6 | 6 | #include <QMessageBox> |
7 | +#include <QSound> | |
8 | + | |
9 | +#include "finalmsgbox.h" | |
7 | 10 | |
8 | 11 | AnkiJikan_Dialog::AnkiJikan_Dialog(QWidget *parent) : |
9 | 12 | QDialog(parent), |
@@ -36,6 +39,7 @@ void AnkiJikan_Dialog::on_StartStopBtn_clicked() | ||
36 | 39 | flag_exec = false; |
37 | 40 | this->close(); // StopBtn then Close thisDialog |
38 | 41 | } else { |
42 | + QSound::play("start.wav"); | |
39 | 43 | ui->StartStopBtn->setText(tr("終了")); |
40 | 44 | QString msg = tr("残り時間 : 15 分"); |
41 | 45 | ui->MsgLabel->setText(msg); |
@@ -63,7 +67,10 @@ void AnkiJikan_Dialog::TimeOutDone() | ||
63 | 67 | ui->StartStopBtn->setText(tr("開始")); |
64 | 68 | ui->MsgLabel->setText(tr("暗記時間終了")); |
65 | 69 | ui->progressBar->setValue(100); |
66 | - QMessageBox::information(this, tr("暗記時間"), tr("暗記時間終了"), QMessageBox::Ok); | |
70 | +// QSound::play("fine.wav"); | |
71 | +// QMessageBox::information(this, tr("暗記時間"), tr("暗記時間終了"), QMessageBox::Ok); | |
72 | + FinalMsgBox finemsgdlg(this); | |
73 | + finemsgdlg.exec(); | |
67 | 74 | flag_exec = false; |
68 | 75 | this->close(); // StopBtn then Close thisDialog |
69 | 76 |
@@ -76,7 +83,8 @@ void AnkiJikan_Dialog::TimeOutDone() | ||
76 | 83 | ui->progressBar->setValue((int)(Minute_Count / 15.0 * 100.0)); |
77 | 84 | |
78 | 85 | if (LeastTime == 2) { |
79 | - QApplication::beep(); | |
86 | + QSound::play("before2min.wav"); | |
87 | +// QApplication::beep(); | |
80 | 88 | // qDebug() << tr("least at 2 minute"); |
81 | 89 | ; |
82 | 90 | } |
@@ -0,0 +1,23 @@ | ||
1 | +#include <QSound> | |
2 | + | |
3 | +#include "finalmsgbox.h" | |
4 | +#include "ui_finalmsgbox.h" | |
5 | + | |
6 | +FinalMsgBox::FinalMsgBox(QWidget *parent) : | |
7 | + QDialog(parent), | |
8 | + ui(new Ui::FinalMsgBox) | |
9 | +{ | |
10 | + ui->setupUi(this); | |
11 | + | |
12 | + QSound::play("fine.wav"); | |
13 | +} | |
14 | + | |
15 | +FinalMsgBox::~FinalMsgBox() | |
16 | +{ | |
17 | + delete ui; | |
18 | +} | |
19 | + | |
20 | +void FinalMsgBox::on_ButtonOK_clicked() | |
21 | +{ | |
22 | + this->close(); | |
23 | +} |
@@ -0,0 +1,25 @@ | ||
1 | +#ifndef FINALMSGBOX_H | |
2 | +#define FINALMSGBOX_H | |
3 | + | |
4 | +#include <QDialog> | |
5 | + | |
6 | +namespace Ui { | |
7 | +class FinalMsgBox; | |
8 | +} | |
9 | + | |
10 | +class FinalMsgBox : public QDialog | |
11 | +{ | |
12 | + Q_OBJECT | |
13 | + | |
14 | +public: | |
15 | + explicit FinalMsgBox(QWidget *parent = 0); | |
16 | + ~FinalMsgBox(); | |
17 | + | |
18 | +private slots: | |
19 | + void on_ButtonOK_clicked(); | |
20 | + | |
21 | +private: | |
22 | + Ui::FinalMsgBox *ui; | |
23 | +}; | |
24 | + | |
25 | +#endif // FINALMSGBOX_H |
@@ -0,0 +1,65 @@ | ||
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<ui version="4.0"> | |
3 | + <class>FinalMsgBox</class> | |
4 | + <widget class="QDialog" name="FinalMsgBox"> | |
5 | + <property name="geometry"> | |
6 | + <rect> | |
7 | + <x>0</x> | |
8 | + <y>0</y> | |
9 | + <width>388</width> | |
10 | + <height>165</height> | |
11 | + </rect> | |
12 | + </property> | |
13 | + <property name="minimumSize"> | |
14 | + <size> | |
15 | + <width>388</width> | |
16 | + <height>165</height> | |
17 | + </size> | |
18 | + </property> | |
19 | + <property name="maximumSize"> | |
20 | + <size> | |
21 | + <width>388</width> | |
22 | + <height>165</height> | |
23 | + </size> | |
24 | + </property> | |
25 | + <property name="windowTitle"> | |
26 | + <string>暗記時間終了</string> | |
27 | + </property> | |
28 | + <widget class="QPushButton" name="ButtonOK"> | |
29 | + <property name="geometry"> | |
30 | + <rect> | |
31 | + <x>160</x> | |
32 | + <y>110</y> | |
33 | + <width>75</width> | |
34 | + <height>23</height> | |
35 | + </rect> | |
36 | + </property> | |
37 | + <property name="text"> | |
38 | + <string>OK</string> | |
39 | + </property> | |
40 | + </widget> | |
41 | + <widget class="QLabel" name="label"> | |
42 | + <property name="geometry"> | |
43 | + <rect> | |
44 | + <x>30</x> | |
45 | + <y>40</y> | |
46 | + <width>331</width> | |
47 | + <height>41</height> | |
48 | + </rect> | |
49 | + </property> | |
50 | + <property name="font"> | |
51 | + <font> | |
52 | + <pointsize>24</pointsize> | |
53 | + </font> | |
54 | + </property> | |
55 | + <property name="text"> | |
56 | + <string>暗記時間終了しました</string> | |
57 | + </property> | |
58 | + <property name="alignment"> | |
59 | + <set>Qt::AlignCenter</set> | |
60 | + </property> | |
61 | + </widget> | |
62 | + </widget> | |
63 | + <resources/> | |
64 | + <connections/> | |
65 | +</ui> |
@@ -42,7 +42,7 @@ MainWindow::MainWindow(QWidget *parent) : | ||
42 | 42 | QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); // source codec is UTF-8 |
43 | 43 | |
44 | 44 | QCoreApplication::setApplicationName("QtKarutaEishow"); |
45 | - QCoreApplication::setApplicationVersion("1.1"); | |
45 | + QCoreApplication::setApplicationVersion("1.2"); | |
46 | 46 | this->setWindowTitle(QCoreApplication::applicationName()); |
47 | 47 | IniFilePath = QCoreApplication::applicationDirPath() + QDir::separator() + QCoreApplication::applicationName() + ".ini"; |
48 | 48 |