• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

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

百人一首かるた自動読み上げソフト


Commit MetaInfo

Révisionf08f9bdb184cb9b142636a11a92f5a32a71975d9 (tree)
l'heure2012-06-16 19:15:52
Auteurarakaki <alucky4416@user...>
Commiterarakaki

Message de Log

ADD: add AnkiJikan MsgBoxDialog. v1.2

Change Summary

Modification

--- a/QtKarutaEishow.pro
+++ b/QtKarutaEishow.pro
@@ -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
--- a/QtKarutaEishow.qrc
+++ b/QtKarutaEishow.qrc
@@ -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>
--- a/ankijikan_dialog.cpp
+++ b/ankijikan_dialog.cpp
@@ -4,6 +4,9 @@
44 #include <QDebug>
55 #include <QDateTime>
66 #include <QMessageBox>
7+#include <QSound>
8+
9+#include "finalmsgbox.h"
710
811 AnkiJikan_Dialog::AnkiJikan_Dialog(QWidget *parent) :
912 QDialog(parent),
@@ -36,6 +39,7 @@ void AnkiJikan_Dialog::on_StartStopBtn_clicked()
3639 flag_exec = false;
3740 this->close(); // StopBtn then Close thisDialog
3841 } else {
42+ QSound::play("start.wav");
3943 ui->StartStopBtn->setText(tr("終了"));
4044 QString msg = tr("残り時間 : 15 分");
4145 ui->MsgLabel->setText(msg);
@@ -63,7 +67,10 @@ void AnkiJikan_Dialog::TimeOutDone()
6367 ui->StartStopBtn->setText(tr("開始"));
6468 ui->MsgLabel->setText(tr("暗記時間終了"));
6569 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();
6774 flag_exec = false;
6875 this->close(); // StopBtn then Close thisDialog
6976
@@ -76,7 +83,8 @@ void AnkiJikan_Dialog::TimeOutDone()
7683 ui->progressBar->setValue((int)(Minute_Count / 15.0 * 100.0));
7784
7885 if (LeastTime == 2) {
79- QApplication::beep();
86+ QSound::play("before2min.wav");
87+// QApplication::beep();
8088 // qDebug() << tr("least at 2 minute");
8189 ;
8290 }
Binary files /dev/null and b/before2min.wav differ
--- /dev/null
+++ b/finalmsgbox.cpp
@@ -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+}
--- /dev/null
+++ b/finalmsgbox.h
@@ -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
--- /dev/null
+++ b/finalmsgbox.ui
@@ -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>
Binary files /dev/null and b/fine.wav differ
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -42,7 +42,7 @@ MainWindow::MainWindow(QWidget *parent) :
4242 QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); // source codec is UTF-8
4343
4444 QCoreApplication::setApplicationName("QtKarutaEishow");
45- QCoreApplication::setApplicationVersion("1.1");
45+ QCoreApplication::setApplicationVersion("1.2");
4646 this->setWindowTitle(QCoreApplication::applicationName());
4747 IniFilePath = QCoreApplication::applicationDirPath() + QDir::separator() + QCoreApplication::applicationName() + ".ini";
4848
Binary files /dev/null and b/start.wav differ