• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqtwindows誰得cocoapythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

Commit MetaInfo

Revision96c79e83afdc695bd9f14611d07e24145dc1f72b (tree)
Zeit2019-04-30 23:07:43
Autorkdrama_fansub <kdrama_funsub@yaho...>
Commiterkdrama_fansub

Log Message

FFU-Mult初版。任意講座ボタンの講座名称をURLから取得

Ändern Zusammenfassung

Diff

--- a/customizedialog.cpp
+++ b/customizedialog.cpp
@@ -39,27 +39,28 @@ QStringList CustomizeDialog::courses = QStringList()
3939 << QString::fromUtf8( "基礎英語1" ) << QString::fromUtf8( "基礎英語2" )
4040 << QString::fromUtf8( "基礎英語3" ) << QString::fromUtf8( "英会話タイムトライアル" )
4141 << QString::fromUtf8( "ラジオ英会話" ) << QString::fromUtf8( "入門ビジネス英語" )
42- << QString::fromUtf8( "実践ビジネス英語" ) << QString::fromUtf8( "まいにちロシア語" )
43- << QString::fromUtf8( "英語で読む村上春樹" ) << QString::fromUtf8( "エンジョイ・シンプル・イングリッシュ" )
42+ << QString::fromUtf8( "実践ビジネス英語" ) << QString::fromUtf8( "ボキャブライダー" )
43+ << QString::fromUtf8( "遠山顕の英会話楽習" ) << QString::fromUtf8( "エンジョイ・シンプル・イングリッシュ" )
4444 << QString::fromUtf8( "まいにち中国語" ) << QString::fromUtf8( "まいにちフランス語" )
4545 << QString::fromUtf8( "まいにちイタリア語" ) << QString::fromUtf8( "まいにちハングル講座" )
4646 << QString::fromUtf8( "まいにちドイツ語" ) << QString::fromUtf8( "まいにちスペイン語" )
4747 << QString::fromUtf8( "レベルアップ中国語" ) << QString::fromUtf8( "レベルアップハングル講座" )
48- << QString::fromUtf8( "攻略!英語リスニング" );
48+ << QString::fromUtf8( "高校生からはじめる「現代英語」" ) << QString::fromUtf8( "まいにちロシア語" )
49+ << QString::fromUtf8( "おもてなしの中国語" ) ;
4950 QStringList CustomizeDialog::titleKeys = QStringList()
5051 << "basic1_title" << "basic2_title" << "basic3_title" << "timetrial_title"
51- << "kaiwa_title" << "business1_title" << "business2_title" << "russian_title"
52- << "yomu_title" << "enjoy_title"
52+ << "kaiwa_title" << "business1_title" << "business2_title" << "vr-radio_title"
53+ << "gakusyu_title" << "enjoy_title"
5354 << "chinese_title" << "french_title" << "italian_title" << "hangeul_title"
5455 << "german_title" << "spanish_title" << "levelup-chinese_title" << "levelup-hangeul_title"
55- << "kouryaku_title";
56+ << "gendai_title" << "russian_title" << "omotenashi_title";
5657 QStringList CustomizeDialog::fileNameKeys = QStringList()
5758 << "basic1_file_name" << "basic2_file_name" << "basic3_file_name" << "timetrial_file_name"
58- << "kaiwa_file_name" << "business1_file_name" << "business2_file_name" << "russian_file_name"
59- << "yomu_file_name" << "enjoy_file_name"
59+ << "kaiwa_file_name" << "business1_file_name" << "business2_file_name" << "vr-radio_file_name"
60+ << "gakusyu_file_name" << "enjoy_file_name"
6061 << "chinese_file_name" << "french_file_name" << "italian_file_name" << "hangeul_file_name"
6162 << "german_file_name" << "spanish_file_name" << "levelup-chinese_file_name" << "levelup-hangeul_file_name"
62- << "kouryaku_file_name";
63+ << "gendai_file_name" << "russian_file_name" << "omotenashi_file_name";
6364
6465 void CustomizeDialog::formats( QString course, QString& titleFormat, QString& fileNameFormat ) {
6566 int index = courses.indexOf( course );
@@ -93,7 +94,7 @@ void CustomizeDialog::settings( bool write ) {
9394 ui.lineEdit_17, ui.lineEdit_19,
9495 ui.lineEdit_9, ui.lineEdit_10, ui.lineEdit_11, ui.lineEdit_12,
9596 ui.lineEdit_13, ui.lineEdit_14, ui.lineEdit_15, ui.lineEdit_16,
96- ui.lineEdit_18,
97+ ui.lineEdit_18, ui.lineEdit_20, ui.lineEdit_21,
9798 NULL
9899 };
99100
--- a/customizedialog.ui
+++ b/customizedialog.ui
@@ -346,7 +346,7 @@
346346 <bool>true</bool>
347347 </property>
348348 <property name="text">
349- <string>ロシア語:</string>
349+ <string>ボキャブライダー:</string>
350350 </property>
351351 <property name="alignment">
352352 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -372,37 +372,37 @@
372372 <bool>true</bool>
373373 </property>
374374 <property name="text">
375- <string>村上春樹</string>
375+ <string>英会話楽習:</string>
376376 </property>
377377 <property name="alignment">
378378 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
379379 </property>
380380 </widget>
381381 </item>
382- <item row="8" column="3">
383- <widget class="QLabel" name="label_22">
382+ <item row="8" column="1">
383+ <widget class="QLineEdit" name="lineEdit_17">
384384 <property name="enabled">
385385 <bool>true</bool>
386386 </property>
387387 <property name="text">
388- <string>攻略英語リスニング</string>
389- </property>
390- <property name="alignment">
391- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
388+ <string>%k_%Y_%M_%D</string>
392389 </property>
393390 </widget>
394391 </item>
395- <item row="8" column="1">
396- <widget class="QLineEdit" name="lineEdit_17">
392+ <item row="10" column="0">
393+ <widget class="QLabel" name="label_22">
397394 <property name="enabled">
398395 <bool>true</bool>
399396 </property>
400397 <property name="text">
401- <string>%k_%Y_%M_%D</string>
398+ <string>高校生現代英語:</string>
399+ </property>
400+ <property name="alignment">
401+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
402402 </property>
403403 </widget>
404404 </item>
405- <item row="8" column="4">
405+ <item row="10" column="1">
406406 <widget class="QLineEdit" name="lineEdit_18">
407407 <property name="enabled">
408408 <bool>true</bool>
@@ -418,7 +418,7 @@
418418 <bool>true</bool>
419419 </property>
420420 <property name="text">
421- <string>エンジョイ</string>
421+ <string>エンジョイ:</string>
422422 </property>
423423 <property name="alignment">
424424 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -435,6 +435,52 @@
435435 </property>
436436 </widget>
437437 </item>
438+ <item row="9" column="3">
439+ <widget class="QLabel" name="label_351">
440+ <property name="enabled">
441+ <bool>true</bool>
442+ </property>
443+ <property name="text">
444+ <string>おもてなしの中国語:</string>
445+ </property>
446+ <property name="alignment">
447+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
448+ </property>
449+ </widget>
450+ </item>
451+ <item row="9" column="4">
452+ <widget class="QLineEdit" name="lineEdit_20">
453+ <property name="enabled">
454+ <bool>true</bool>
455+ </property>
456+ <property name="text">
457+ <string>%k_%Y_%M_%D</string>
458+ </property>
459+ </widget>
460+ </item>
461+ <item row="8" column="3">
462+ <widget class="QLabel" name="label_361">
463+ <property name="enabled">
464+ <bool>true</bool>
465+ </property>
466+ <property name="text">
467+ <string>ロシア語:</string>
468+ </property>
469+ <property name="alignment">
470+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
471+ </property>
472+ </widget>
473+ </item>
474+ <item row="8" column="4">
475+ <widget class="QLineEdit" name="lineEdit_21">
476+ <property name="enabled">
477+ <bool>true</bool>
478+ </property>
479+ <property name="text">
480+ <string>%k_%Y_%M_%D</string>
481+ </property>
482+ </widget>
483+ </item>
438484 </layout>
439485 </widget>
440486 <widget class="QWidget" name="gridLayoutWidget_2">
@@ -457,7 +503,7 @@
457503 <item row="0" column="1">
458504 <widget class="QLabel" name="label_29">
459505 <property name="text">
460- <string>XMLの講座名 「基礎英語1」「ニュースで英会話」</string>
506+ <string>XMLの講座名 「基礎英語1」「ラジオ英会話」</string>
461507 </property>
462508 </widget>
463509 </item>
@@ -606,6 +652,11 @@
606652 <tabstop>lineEdit_14</tabstop>
607653 <tabstop>lineEdit_15</tabstop>
608654 <tabstop>lineEdit_16</tabstop>
655+ <tabstop>lineEdit_17</tabstop>
656+ <tabstop>lineEdit_18</tabstop>
657+ <tabstop>lineEdit_19</tabstop>
658+ <tabstop>lineEdit_20</tabstop>
659+ <tabstop>lineEdit_21</tabstop>
609660 <tabstop>buttonBox</tabstop>
610661 </tabstops>
611662 <resources/>
--- a/downloadthread.cpp
+++ b/downloadthread.cpp
@@ -47,6 +47,7 @@
4747 #include <QDebug>
4848 //#include <QtCrypto>
4949 #include <QTemporaryFile>
50+#include <QSettings>
5051
5152 #ifdef QT4_QT5_WIN
5253 #define TimeOut " -m 10000 "
@@ -61,6 +62,7 @@
6162 #define CancelCheckTimeOut 500 // msec
6263 #define DebugLog(s) if ( ui->toolButton_detailed_message->isChecked() ) {emit information((s));}
6364
65+
6466 //--------------------------------------------------------------------------------
6567 QString DownloadThread::prefix = "http://cgi2.nhk.or.jp/gogaku/st/xml/";
6668 QString DownloadThread::suffix = "listdataflv.xml";
@@ -72,15 +74,34 @@ QString DownloadThread::flv_service_prefix = "mp4:flv/gogaku/streaming/mp4/";
7274 QString DownloadThread::flvstreamer;
7375 QString DownloadThread::ffmpeg;
7476 QString DownloadThread::scramble;
77+QString DownloadThread::optional1;
78+QString DownloadThread::optional2;
79+QString DownloadThread::optional3;
80+QString DownloadThread::optional4;
81+QString DownloadThread::optional5;
82+QString DownloadThread::optional6;
83+QString DownloadThread::optional7;
84+QString DownloadThread::optional8;
85+QString DownloadThread::opt_title1;
86+QString DownloadThread::opt_title2;
87+QString DownloadThread::opt_title3;
88+QString DownloadThread::opt_title4;
89+
90+
7591 QStringList DownloadThread::malformed = (QStringList() << "3g2" << "3gp" << "m4a" << "mov");
7692
93+QString DownloadThread::english_3month = QString::fromUtf8( "短期集中!3か月英会話" );
94+QString DownloadThread::english_vr = QString::fromUtf8( "ボキャブライダー" );
95+
7796 QHash<QString, QString> DownloadThread::ffmpegHash;
97+QHash<QString, QString> DownloadThread::ffmpegHash1;
7898 QHash<QProcess::ProcessError, QString> DownloadThread::processError;
7999
80100 //--------------------------------------------------------------------------------
81101
82102 DownloadThread::DownloadThread( Ui::MainWindowClass* ui ) : isCanceled(false), failed1935(false) {
83103 this->ui = ui;
104+
84105 if ( ffmpegHash.empty() ) {
85106 ffmpegHash["3g2"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/mp4/%2/master.m3u8 -vn -bsf aac_adtstoasc -acodec copy \"%3\"";
86107 ffmpegHash["3gp"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/mp4/%2/master.m3u8 -vn -bsf aac_adtstoasc -acodec copy \"%3\"";
@@ -93,6 +114,20 @@ DownloadThread::DownloadThread( Ui::MainWindowClass* ui ) : isCanceled(false), f
93114 ffmpegHash["mp3"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/mp4/%2/master.m3u8 -id3v2_version 3 -metadata title=\"%4\" -metadata artist=\"NHK\" -metadata album=\"%5\" -metadata date=\"%6\" -metadata genre=\"Speech\" -vn -acodec libmp3lame \"%3\"";
94115 ffmpegHash["ts"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/mp4/%2/master.m3u8 -vn -acodec copy \"%3\"";
95116 }
117+
118+ if ( ffmpegHash1.empty() ) {
119+ ffmpegHash1["3g2"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -vn -bsf aac_adtstoasc -acodec copy \"%3\"";
120+ ffmpegHash1["3gp"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -vn -bsf aac_adtstoasc -acodec copy \"%3\"";
121+ ffmpegHash1["aac"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -vn -acodec copy \"%3\"";
122+ ffmpegHash1["avi"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -id3v2_version 3 -metadata title=\"%4\" -metadata artist=\"NHK\" -metadata album=\"%5\" -metadata date=\"%6\" -metadata genre=\"Speech\" -vn -acodec copy \"%3\"";
123+ ffmpegHash1["m4a"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -id3v2_version 3 -metadata title=\"%4\" -metadata artist=\"NHK\" -metadata album=\"%5\" -metadata date=\"%6\" -metadata genre=\"Speech\" -vn -bsf aac_adtstoasc -acodec copy \"%3\"";
124+ ffmpegHash1["mka"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -id3v2_version 3 -metadata title=\"%4\" -metadata artist=\"NHK\" -metadata album=\"%5\" -metadata date=\"%6\" -metadata genre=\"Speech\" -vn -acodec copy \"%3\"";
125+ ffmpegHash1["mkv"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -id3v2_version 3 -metadata title=\"%4\" -metadata artist=\"NHK\" -metadata album=\"%5\" -metadata date=\"%6\" -metadata genre=\"Speech\" -vn -acodec copy \"%3\"";
126+ ffmpegHash1["mov"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -id3v2_version 3 -metadata title=\"%4\" -metadata artist=\"NHK\" -metadata album=\"%5\" -metadata date=\"%6\" -metadata genre=\"Speech\" -vn -bsf aac_adtstoasc -acodec copy \"%3\"";
127+ ffmpegHash1["mp3"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -id3v2_version 3 -metadata title=\"%4\" -metadata artist=\"NHK\" -metadata album=\"%5\" -metadata date=\"%6\" -metadata genre=\"Speech\" -vn -acodec libmp3lame \"%3\"";
128+ ffmpegHash1["ts"] = "\"%1\" -y -i https://nhk-vh.akamaihd.net/i/gogaku-stream/r/%2/master.m3u8 -vn -acodec copy \"%3\"";
129+ }
130+
96131 if ( processError.empty() ) {
97132 processError[QProcess::FailedToStart] = "FailedToStart";
98133 processError[QProcess::Crashed] = "Crashed";
@@ -457,7 +492,8 @@ QString DownloadThread::formatName( QString format, QString kouza, QString hdate
457492 int month = hdate.left( 2 ).toInt();
458493 int year = 2000 + file.left( 2 ).toInt();
459494 if ( month <= 4 && QDate::currentDate().year() > year )
460- year += 1;
495+ if ( !QString::compare( kouza , english_vr ) == 0 ) year += 1;
496+ if ( QString::compare( kouza , english_vr ) == 0 && month < 4 ) year += 1;
461497 int day = hdate.mid( 3, 2 ).toInt();
462498
463499 if ( file.right( 4 ) == ".flv" )
@@ -529,17 +565,31 @@ bool DownloadThread::captureStream( QString kouza, QString hdate, QString file )
529565 int month = hdate.left( 2 ).toInt();
530566 int year = 2000 + file.left( 2 ).toInt();
531567 if ( month <= 4 && QDate::currentDate().year() > year )
532- year += 1;
568+ if ( !QString::compare( kouza , english_vr ) == 0 ) year += 1;
569+ if ( QString::compare( kouza , english_vr ) == 0 && month < 4 ) year += 1;
533570 int day = hdate.mid( 3, 2 ).toInt();
534571 QDate onair( year, month, day );
535572 QString yyyymmdd = onair.toString( "yyyy_MM_dd" );
536-
573+
574+
575+ if ( QString::compare( kouza , english_vr ) ==0 ){
576+ QDate d1;
577+ d1.setDate(QDate::currentDate().year(),QDate::currentDate().month(),QDate::currentDate().day());
578+ int d2 = d1.dayOfWeek();
579+
580+ if ( onair.daysTo(QDate::currentDate())-d2 < -7 ) return false;
581+ }
582+
583+
537584 if ( ui->toolButton_skip->isChecked() && QFile::exists( outputDir + outFileName ) ) {
538585 emit current( QString::fromUtf8( "スキップ:     " ) + kouza + QString::fromUtf8( " " ) + yyyymmdd );
539586 return true;
540587 }
541588 emit current( QString::fromUtf8( "ダウンロード中:  " ) + kouza + QString::fromUtf8( " " ) + yyyymmdd );
542589
590+ if ( QString::compare( kouza, english_3month ) == 0 )
591+ Q_ASSERT( ffmpegHash1.contains( extension ) );
592+ else
543593 Q_ASSERT( ffmpegHash.contains( extension ) );
544594 QString dstPath;
545595 #ifdef QT4_QT5_WIN
@@ -558,10 +608,16 @@ bool DownloadThread::captureStream( QString kouza, QString hdate, QString file )
558608 #endif
559609 QString commandFfmpeg = ffmpegHash[extension]
560610 .arg( ffmpeg, file, dstPath, id3tagTitle, kouza, QString::number( year ) );
611+ if ( QString::compare( kouza, english_3month ) == 0 )
612+ commandFfmpeg = ffmpegHash1[extension]
613+ .arg( ffmpeg, file, dstPath, id3tagTitle, kouza, QString::number( year ) );
614+
615+
561616 //qDebug() << commandFfmpeg;
562617 //DebugLog( commandFfmpeg );
563618 QProcess process;
564619 process.start( commandFfmpeg );
620+
565621 if ( !process.waitForStarted( -1 ) ) {
566622 emit critical( QString::fromUtf8( "ffmpeg起動エラー(%3): %1  %2" )
567623 .arg( kouza, yyyymmdd, processError[process.error()] ) );
@@ -601,24 +657,25 @@ bool DownloadThread::captureStream( QString kouza, QString hdate, QString file )
601657 }
602658
603659 QString DownloadThread::paths[] = {
604- "english/basic1", "english/basic2", "english/basic3",
605- "english/timetrial", "english/kaiwa", "english/business1",
606- "english/business2", "english/kouryaku", "english/yomu",
607- "english/enjoy",
608- "chinese/kouza", "chinese/levelup", "french/kouza",
609- "italian/kouza", "hangeul/kouza","hangeul/levelup",
610- "german/kouza", "spanish/kouza","russian/kouza"
660+ "optional1", "optional2", "optional3", "optional4",
661+ "spanish/kouza", "spanish/kouza2", "italian/kouza", "italian/kouza2",
662+ "russian/kouza","russian/kouza2", "hangeul/kouza", "hangeul/levelup", "hangeul/omotenashi",
663+ "chinese/kouza", "chinese/levelup", "chinese/omotenashi",
664+ "optional5", "optional6", "optional7", "optional8",
611665 };
612666
613667 void DownloadThread::run() {
614668 QAbstractButton* checkbox[] = {
615- ui->toolButton_basic1, ui->toolButton_basic2, ui->toolButton_basic3,
616- ui->toolButton_timetrial, ui->toolButton_kaiwa, ui->toolButton_business1,
617- ui->toolButton_business2, ui->toolButton_kouryaku, ui->toolButton_yomu,
618- ui->toolButton_enjoy,
619- ui->toolButton_chinese, ui->toolButton_levelup_chinese, ui->toolButton_french,
620- ui->toolButton_italian, ui->toolButton_hangeul, ui->toolButton_levelup_hangeul,
621- ui->toolButton_german, ui->toolButton_spanish, ui->toolButton_russian,
669+ ui->toolButton_french, ui->toolButton_french2,
670+ ui->toolButton_german, ui->toolButton_german2,
671+ ui->toolButton_spanish, ui->toolButton_spanish2,
672+ ui->toolButton_italian, ui->toolButton_italian2,
673+ ui->toolButton_russian, ui->toolButton_russian2,
674+ ui->toolButton_hangeul, ui->toolButton_levelup_hangeul, ui->toolButton_omotenashino_hangeul,
675+ ui->toolButton_chinese, ui->toolButton_levelup_chinese,
676+ ui->toolButton_omotenashino_chinese,
677+ ui->toolButton_optional1, ui->toolButton_optional2,
678+ ui->toolButton_optional3, ui->toolButton_optional4,
622679 NULL
623680 };
624681
@@ -630,6 +687,24 @@ void DownloadThread::run() {
630687 //emit information( QString::fromUtf8( "----------------------------------------" ) );
631688
632689 for ( int i = 0; checkbox[i] && !isCanceled; i++ ) {
690+
691+ optional1 = MainWindow::optional1;
692+ optional2 = MainWindow::optional2;
693+ optional3 = MainWindow::optional3;
694+ optional4 = MainWindow::optional4;
695+ optional5 = MainWindow::optional5;
696+ optional6 = MainWindow::optional6;
697+ optional7 = MainWindow::optional7;
698+ optional8 = MainWindow::optional8;
699+ if ( paths[i].startsWith("optional1") ) paths[i] = optional1;
700+ if ( paths[i].startsWith("optional2") ) paths[i] = optional2;
701+ if ( paths[i].startsWith("optional3") ) paths[i] = optional3;
702+ if ( paths[i].startsWith("optional4") ) paths[i] = optional4;
703+ if ( paths[i].startsWith("optional5") ) paths[i] = optional5;
704+ if ( paths[i].startsWith("optional6") ) paths[i] = optional6;
705+ if ( paths[i].startsWith("optional7") ) paths[i] = optional7;
706+ if ( paths[i].startsWith("optional8") ) paths[i] = optional8;
707+
633708 if ( checkbox[i]->isChecked() ) {
634709 QStringList fileList = getAttribute( prefix + paths[i] + "/" + suffix, "@file" );
635710 QStringList kouzaList = getAttribute( prefix + paths[i] + "/" + suffix, "@kouza" );
--- a/downloadthread.h
+++ b/downloadthread.h
@@ -36,6 +36,13 @@ public:
3636 ~DownloadThread() {}
3737 void cancel() { isCanceled = true; }
3838
39+ static QString opt_title1;
40+ static QString opt_title2;
41+ static QString opt_title3;
42+ static QString opt_title4;
43+
44+
45+
3946 protected:
4047 void run();
4148
@@ -56,6 +63,7 @@ private:
5663
5764 QString formatName( QString format, QString kouza, QString hdate, QString file, bool checkIllegal );
5865 QStringList getElements( QString url, QString path );
66+
5967 void downloadShower();
6068
6169 Ui::MainWindowClass* ui;
@@ -74,8 +82,20 @@ private:
7482 static QString ffmpeg;
7583 static QString scramble;
7684 static QStringList malformed;
85+ static QString optional1;
86+ static QString optional2;
87+ static QString optional3;
88+ static QString optional4;
89+ static QString optional5;
90+ static QString optional6;
91+ static QString optional7;
92+ static QString optional8;
93+
94+ static QString english_3month;
95+ static QString english_vr;
7796
7897 static QHash<QString, QString> ffmpegHash;
98+ static QHash<QString, QString> ffmpegHash1;
7999 static QHash<QProcess::ProcessError, QString>processError;
80100
81101 };
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -48,8 +48,53 @@
4848 #define SETTING_SCRAMBLE "scramble"
4949 #define SETTING_SCRAMBLE_URL1 "scramble_url1"
5050 #define SETTING_SCRAMBLE_URL2 "scramble_url2"
51+#define SETTING_OPTIONAL1 "optional1"
52+#define SETTING_OPTIONAL2 "optional2"
53+#define SETTING_OPTIONAL3 "optional3"
54+#define SETTING_OPTIONAL4 "optional4"
55+#define SETTING_OPTIONAL5 "optional5"
56+#define SETTING_OPTIONAL6 "optional6"
57+#define SETTING_OPTIONAL7 "optional7"
58+#define SETTING_OPTIONAL8 "optional8"
59+#define SETTING_OPT_TITLE1 "opt_title1"
60+#define SETTING_OPT_TITLE2 "opt_title2"
61+#define SETTING_OPT_TITLE3 "opt_title3"
62+#define SETTING_OPT_TITLE4 "opt_title4"
63+#define SETTING_french_TITLE1 "french_title1"
64+#define SETTING_french_TITLE2 "french_title2"
65+#define SETTING_german_TITLE1 "german_title1"
66+#define SETTING_german_TITLE2 "german_title2"
67+#define SETTING_spanish_TITLE1 "spanish_title1"
68+#define SETTING_spanish_TITLE2 "spanish_title2"
69+#define SETTING_italian_TITLE1 "italian_title1"
70+#define SETTING_italian_TITLE2 "italian_title2"
71+#define SETTING_russian_TITLE1 "russian_title1"
72+#define SETTING_russian_TITLE2 "russian_title2"
5173 #define SCRAMBLE_URL1 "http://www47.atwiki.jp/jakago/pub/scramble.xml"
5274 #define SCRAMBLE_URL2 "http://cdn47.atwikiimg.com/jakago/pub/scramble.xml"
75+#define OPTIONAL1 "french/kouza"
76+#define OPTIONAL2 "french/kouza2"
77+#define OPTIONAL3 "german/kouza"
78+#define OPTIONAL4 "german/kouza2"
79+#define OPTIONAL5 "english/basic1"
80+#define OPTIONAL6 "english/basic2"
81+#define OPTIONAL7 "english/basic3"
82+#define OPTIONAL8 "english/enjoy"
83+#define English_TITLE1 "任意講座1"
84+#define English_TITLE2 "任意講座2"
85+#define English_TITLE3 "任意講座3"
86+#define English_TITLE4 "任意講座4"
87+#define French_TITLE1 "まいにちフランス語【入門編】"
88+#define French_TITLE2 "まいにちフランス語【応用編】"
89+#define German_TITLE1 "まいにちドイツ語【初級編】"
90+#define German_TITLE2 "まいにちドイツ語【応用編】"
91+#define Spanish_TITLE1 "まいにちスペイン語【入門編】"
92+#define Spanish_TITLE2 "まいにちスペイン語【中級編】"
93+#define Italian_TITLE1 "まいにちイタリア語【初級編】"
94+#define Italian_TITLE2 "まいにちイタリア語【応用編】"
95+#define Russian_TITLE1 "まいにちロシア語【入門編】"
96+#define Russian_TITLE2 "まいにちロシア語【応用編】"
97+
5398 #define X11_WINDOW_VERTICAL_INCREMENT 5
5499
55100 #ifdef QT4_QT5_WIN
@@ -86,6 +131,31 @@ QString MainWindow::outputDir;
86131 QString MainWindow::scramble;
87132 QString MainWindow::scrambleUrl1;
88133 QString MainWindow::scrambleUrl2;
134+QString MainWindow::optional1;
135+QString MainWindow::optional2;
136+QString MainWindow::optional3;
137+QString MainWindow::optional4;
138+QString MainWindow::optional5;
139+QString MainWindow::optional6;
140+QString MainWindow::optional7;
141+QString MainWindow::optional8;
142+QString MainWindow::english_title1;
143+QString MainWindow::english_title2;
144+QString MainWindow::english_title3;
145+QString MainWindow::english_title4;
146+QString MainWindow::french_title1;
147+QString MainWindow::french_title2;
148+QString MainWindow::german_title1;
149+QString MainWindow::german_title2;
150+QString MainWindow::spanish_title1;
151+QString MainWindow::spanish_title2;
152+QString MainWindow::italian_title1;
153+QString MainWindow::italian_title2;
154+QString MainWindow::russian_title1;
155+QString MainWindow::russian_title2;
156+QString MainWindow::prefix = "http://cgi2.nhk.or.jp/gogaku/st/xml/";
157+QString MainWindow::suffix = "listdataflv.xml";
158+
89159
90160 MainWindow::MainWindow( QWidget *parent )
91161 : QMainWindow( parent ), ui( new Ui::MainWindowClass ), downloadThread( NULL ) {
@@ -130,6 +200,10 @@ MainWindow::MainWindow( QWidget *parent )
130200 connect( action, SIGNAL( triggered() ), this, SLOT( customizeSaveFolder() ) );
131201 customizeMenu->addAction( action );
132202
203+ action = new QAction( QString::fromUtf8( "任意講座設定" ), this );
204+ connect( action, SIGNAL( triggered() ), this, SLOT( customizeScramble() ) );
205+ customizeMenu->addAction( action );
206+
133207 //action = new QAction( QString::fromUtf8( "スクランブル文字列..." ), this );
134208 //connect( action, SIGNAL( triggered() ), this, SLOT( customizeScramble() ) );
135209 //customizeMenu->addAction( action );
@@ -178,31 +252,29 @@ void MainWindow::settings( enum ReadWriteMode mode ) {
178252 QVariant fileNameFormat;
179253 } CheckBox;
180254 #define DefaultTitle "%k_%Y_%M_%D"
181-#define DefaultFileName "%k_%Y_%M_%D.mp3"
255+#define DefaultFileName "%k_%Y_%M_%D.m4a"
182256 CheckBox checkBoxes[] = {
183- { ui->toolButton_basic1, "basic1", false, "basic1_title", DefaultTitle, "basic1_file_name", DefaultFileName },
184- { ui->toolButton_basic2, "basic2", false, "basic2_title", DefaultTitle, "basic2_file_name", DefaultFileName },
185- { ui->toolButton_basic3, "basic3", false, "basic3_title", DefaultTitle, "basic3_file_name", DefaultFileName },
186- { ui->toolButton_timetrial, "timetrial", false, "timetrial_title", DefaultTitle, "timetrial_file_name", DefaultFileName },
187- { ui->toolButton_kaiwa, "kaiwa", false, "kaiwa_title", DefaultTitle, "kaiwa_file_name", DefaultFileName },
188- { ui->toolButton_business1, "business1", false, "business1_title", DefaultTitle, "business1_file_name", DefaultFileName },
189- { ui->toolButton_business2, "business2", false, "business2_title", DefaultTitle, "business2_file_name", DefaultFileName },
190257 { ui->toolButton_chinese, "chinese", false, "chinese_title", DefaultTitle, "chinese_file_name", DefaultFileName },
191258 { ui->toolButton_french, "french", false, "french_title", DefaultTitle, "french_file_name", DefaultFileName },
259+ { ui->toolButton_french2, "french2", false, "french_title", DefaultTitle, "french_file_name", DefaultFileName },
192260 { ui->toolButton_italian, "italian", false, "italian_title", DefaultTitle, "italian_file_name", DefaultFileName },
261+ { ui->toolButton_italian2, "italian2", false, "italian_title", DefaultTitle, "italian_file_name", DefaultFileName },
193262 { ui->toolButton_hangeul, "hangeul", false, "hangeul_title", DefaultTitle, "hangeul_file_name", DefaultFileName },
194263 { ui->toolButton_german, "german", false, "german_title", DefaultTitle, "german_file_name", DefaultFileName },
264+ { ui->toolButton_german2, "german2", false, "german_title", DefaultTitle, "german_file_name", DefaultFileName },
195265 { ui->toolButton_spanish, "spanish", false, "spanish_title", DefaultTitle, "spanish_file_name", DefaultFileName },
196- { ui->checkBox_13, "charo", false, "charo_title", DefaultTitle, "charo_file_name", DefaultFileName },
197- { ui->checkBox_14, "e-news", false, "e-news_title", DefaultTitle, "e-news_file_name", DefaultFileName },
198- { ui->checkBox_15, "e-news-reread", false, "e-news-reread_title", DefaultTitle, "e-news-reread_file_name", DefaultFileName },
266+ { ui->toolButton_spanish2, "spanish2", false, "spanish_title", DefaultTitle, "spanish_file_name", DefaultFileName },
199267 { ui->toolButton_levelup_chinese, "levelup-chinese", false, "levelup-chinese_title", DefaultTitle, "levelup-chinese_file_name", DefaultFileName },
268+ { ui->toolButton_omotenashino_chinese, "omotenashino-chinese", false, "omotenashino-chinese_title", DefaultTitle, "omotenashino-chinese_file_name", DefaultFileName },
269+ { ui->toolButton_omotenashino_hangeul, "omotenashino-hangeul", false, "omotenashino-hangeul_title", DefaultTitle, "omotenashino-hangeul_file_name", DefaultFileName },
200270 { ui->toolButton_levelup_hangeul, "levelup-hangeul", false, "levelup-hangeul_title", DefaultTitle, "levelup-hangeul_file_name", DefaultFileName },
201271 { ui->toolButton_russian, "russian", false, "russian_title", DefaultTitle, "russian_file_name", DefaultFileName },
272+ { ui->toolButton_russian2, "russian2", false, "russian_title", DefaultTitle, "russian_file_name", DefaultFileName },
273+ { ui->toolButton_optional1, "optional_1", false, "optional1_title", DefaultTitle, "optional1_file_name", DefaultFileName },
274+ { ui->toolButton_optional2, "optional_2", false, "optional2_title", DefaultTitle, "optional2_file_name", DefaultFileName },
275+ { ui->toolButton_optional3, "optional_3", false, "optional3_title", DefaultTitle, "optional3_file_name", DefaultFileName },
276+ { ui->toolButton_optional4, "optional_4", false, "optional4_title", DefaultTitle, "optional4_file_name", DefaultFileName },
202277 { ui->checkBox_shower, "shower", false, "shower_title", DefaultTitle, "shower_file_name", DefaultFileName },
203- { ui->toolButton_kouryaku, "kouryaku", false, "kouryaku_title", DefaultTitle, "kouryaku_file_name", DefaultFileName },
204- { ui->toolButton_yomu, "yomu", false, "yomu_title", DefaultTitle, "yomu_file_name", DefaultFileName },
205- { ui->toolButton_enjoy, "enjoy", false, "enjoy_title", DefaultTitle, "enjoy_file_name", DefaultFileName },
206278 { ui->toolButton_skip, "skip", true, "", "", "", "" },
207279 { ui->checkBox_keep_on_error, "keep_on_error", false, "", "", "", "" },
208280 { ui->checkBox_this_week, "this_week", true, "", "", "", "" },
@@ -222,7 +294,7 @@ void MainWindow::settings( enum ReadWriteMode mode ) {
222294 { NULL, NULL, false }
223295 };
224296 ComboBox textComboBoxes[] = {
225- { ui->comboBox_extension, "audio_extension", "mp3" },
297+ { ui->comboBox_extension, "audio_extension", "m4a" },
226298 { NULL, NULL, false }
227299 };
228300
@@ -254,6 +326,118 @@ void MainWindow::settings( enum ReadWriteMode mode ) {
254326 saved = settings.value( SETTING_SCRAMBLE_URL2 );
255327 scrambleUrl2 = saved.type() == QVariant::Invalid ? SCRAMBLE_URL2 : saved.toString();
256328
329+ saved = settings.value( SETTING_OPTIONAL1 );
330+ optional1 = saved.type() == QVariant::Invalid ? OPTIONAL1 : saved.toString();
331+ saved = settings.value( SETTING_OPTIONAL2 );
332+ optional2 = saved.type() == QVariant::Invalid ? OPTIONAL2 : saved.toString();
333+ saved = settings.value( SETTING_OPTIONAL3 );
334+ optional3 = saved.type() == QVariant::Invalid ? OPTIONAL3 : saved.toString();
335+ saved = settings.value( SETTING_OPTIONAL4 );
336+ optional4 = saved.type() == QVariant::Invalid ? OPTIONAL4 : saved.toString();
337+ saved = settings.value( SETTING_OPTIONAL5 );
338+ optional5 = saved.type() == QVariant::Invalid ? OPTIONAL5 : saved.toString();
339+ saved = settings.value( SETTING_OPTIONAL6 );
340+ optional6 = saved.type() == QVariant::Invalid ? OPTIONAL6 : saved.toString();
341+ saved = settings.value( SETTING_OPTIONAL7 );
342+ optional7 = saved.type() == QVariant::Invalid ? OPTIONAL7 : saved.toString();
343+ saved = settings.value( SETTING_OPTIONAL8 );
344+ optional8 = saved.type() == QVariant::Invalid ? OPTIONAL8 : saved.toString();
345+
346+ saved = settings.value( SETTING_OPT_TITLE1 );
347+ english_title1 = saved.type() == QVariant::Invalid ? QString::fromUtf8( English_TITLE1 ) : saved.toString();
348+ saved = settings.value( SETTING_OPT_TITLE2 );
349+ english_title2 = saved.type() == QVariant::Invalid ? QString::fromUtf8( English_TITLE2 ) : saved.toString();
350+ saved = settings.value( SETTING_OPT_TITLE3 );
351+ english_title3 = saved.type() == QVariant::Invalid ? QString::fromUtf8( English_TITLE3 ) : saved.toString();
352+ saved = settings.value( SETTING_OPT_TITLE4 );
353+ english_title4 = saved.type() == QVariant::Invalid ? QString::fromUtf8( English_TITLE4 ) : saved.toString();
354+
355+ saved = settings.value( SETTING_french_TITLE1 );
356+ french_title1 = saved.type() == QVariant::Invalid ? QString::fromUtf8( French_TITLE1 ) : saved.toString();
357+ saved = settings.value( SETTING_french_TITLE2 );
358+ french_title2 = saved.type() == QVariant::Invalid ? QString::fromUtf8( French_TITLE2 ) : saved.toString();
359+ saved = settings.value( SETTING_german_TITLE1 );
360+ german_title1 = saved.type() == QVariant::Invalid ? QString::fromUtf8( German_TITLE1 ) : saved.toString();
361+ saved = settings.value( SETTING_german_TITLE2 );
362+ german_title2 = saved.type() == QVariant::Invalid ? QString::fromUtf8( German_TITLE2 ) : saved.toString();
363+ saved = settings.value( SETTING_spanish_TITLE1 );
364+ spanish_title1 = saved.type() == QVariant::Invalid ? QString::fromUtf8( Spanish_TITLE1 ) : saved.toString();
365+ saved = settings.value( SETTING_spanish_TITLE2 );
366+ spanish_title2 = saved.type() == QVariant::Invalid ? QString::fromUtf8( Spanish_TITLE2 ) : saved.toString();
367+ saved = settings.value( SETTING_italian_TITLE1 );
368+ italian_title1 = saved.type() == QVariant::Invalid ? QString::fromUtf8( Italian_TITLE1 ) : saved.toString();
369+ saved = settings.value( SETTING_italian_TITLE2 );
370+ italian_title2 = saved.type() == QVariant::Invalid ? QString::fromUtf8( Italian_TITLE2 ) : saved.toString();
371+ saved = settings.value( SETTING_russian_TITLE1 );
372+ russian_title1 = saved.type() == QVariant::Invalid ? QString::fromUtf8( Russian_TITLE1 ) : saved.toString();
373+ saved = settings.value( SETTING_russian_TITLE2 );
374+ russian_title2 = saved.type() == QVariant::Invalid ? QString::fromUtf8( Russian_TITLE2 ) : saved.toString();
375+
376+ ui->toolButton_optional1->setText( QString( english_title1 ) );
377+ ui->toolButton_optional2->setText( QString( english_title2 ) );
378+ ui->toolButton_optional3->setText( QString( english_title3 ) );
379+ ui->toolButton_optional4->setText( QString( english_title4 ) );
380+
381+ ui->toolButton_french->setText( QString( french_title1 ) );
382+ ui->toolButton_french2->setText( QString( french_title2 ) );
383+ ui->toolButton_german->setText( QString( german_title1 ) );
384+ ui->toolButton_german2->setText( QString( german_title2 ) );
385+ ui->toolButton_spanish->setText( QString( spanish_title1 ) );
386+ ui->toolButton_spanish2->setText( QString( spanish_title2 ) );
387+ ui->toolButton_italian->setText( QString( italian_title1 ) );
388+ ui->toolButton_italian2->setText( QString( italian_title2 ) );
389+ ui->toolButton_russian->setText( QString( russian_title1 ) );
390+ ui->toolButton_russian2->setText( QString( russian_title2 ) );
391+
392+ QStringList french_TITLE1 = getAttribute( prefix + optional1 + "/" + suffix, "@kouza" );
393+ QStringList french_TITLE2 = getAttribute( prefix + optional2 + "/" + suffix, "@kouza" );
394+ QStringList german_TITLE1 = getAttribute( prefix + optional3 + "/" + suffix, "@kouza" );
395+ QStringList german_TITLE2 = getAttribute( prefix + optional4 + "/" + suffix, "@kouza" );
396+ QStringList spanish_TITLE1 = getAttribute( prefix + "spanish/kouza" + "/" + suffix, "@kouza" );
397+ QStringList spanish_TITLE2 = getAttribute( prefix + "spanish/kouza2" + "/" + suffix, "@kouza" );
398+ QStringList italian_TITLE1 = getAttribute( prefix + "italian/kouza" + "/" + suffix, "@kouza" );
399+ QStringList italian_TITLE2 = getAttribute( prefix + "italian/kouza2" + "/" + suffix, "@kouza" );
400+ QStringList russian_TITLE1 = getAttribute( prefix + "russian/kouza" + "/" + suffix, "@kouza" );
401+ QStringList russian_TITLE2 = getAttribute( prefix + "russian/kouza2" + "/" + suffix, "@kouza" );
402+
403+ QStringList opt_TITLE1 = getAttribute( prefix + optional5 + "/" + suffix, "@kouza" );
404+ QStringList opt_TITLE2 = getAttribute( prefix + optional6 + "/" + suffix, "@kouza" );
405+ QStringList opt_TITLE3 = getAttribute( prefix + optional7 + "/" + suffix, "@kouza" );
406+ QStringList opt_TITLE4 = getAttribute( prefix + optional8 + "/" + suffix, "@kouza" );
407+
408+ english_title1 = opt_TITLE1[0];
409+ english_title2 = opt_TITLE2[0];
410+ english_title3 = opt_TITLE3[0];
411+ english_title4 = opt_TITLE4[0];
412+ french_title1 = french_TITLE1[0];
413+ french_title2 = french_TITLE2[0];
414+ german_title1 = german_TITLE1[0];
415+ german_title2 = german_TITLE2[0];
416+ spanish_title1 = spanish_TITLE1[0];
417+ spanish_title2 = spanish_TITLE2[0];
418+ italian_title1 = italian_TITLE1[0];
419+ italian_title2 = italian_TITLE2[0];
420+ russian_title1 = russian_TITLE1[0];
421+ russian_title2 = russian_TITLE2[0];
422+
423+ ui->toolButton_optional1->setText( QString( english_title1 ) );
424+ ui->toolButton_optional2->setText( QString( english_title2 ) );
425+ ui->toolButton_optional3->setText( QString( english_title3 ) );
426+ ui->toolButton_optional4->setText( QString( english_title4 ) );
427+
428+ ui->toolButton_french->setText( QString( french_title1 ) );
429+ ui->toolButton_french2->setText( QString( french_title2 ) );
430+ ui->toolButton_german->setText( QString( german_title1 ) );
431+ ui->toolButton_german2->setText( QString( german_title2 ) );
432+ ui->toolButton_spanish->setText( QString( spanish_title1 ) );
433+ ui->toolButton_spanish2->setText( QString( spanish_title2 ) );
434+ ui->toolButton_italian->setText( QString( italian_title1 ) );
435+ ui->toolButton_italian2->setText( QString( italian_title2 ) );
436+ ui->toolButton_russian->setText( QString( russian_title1 ) );
437+ ui->toolButton_russian2->setText( QString( russian_title2 ) );
438+
439+
440+
257441 for ( int i = 0; checkBoxes[i].checkBox != NULL; i++ ) {
258442 checkBoxes[i].checkBox->setChecked( settings.value( checkBoxes[i].key, checkBoxes[i].defaultValue ).toBool() );
259443 }
@@ -272,6 +456,30 @@ void MainWindow::settings( enum ReadWriteMode mode ) {
272456 settings.setValue( SETTING_SCRAMBLE, scramble );
273457 settings.setValue( SETTING_SCRAMBLE_URL1, scrambleUrl1 );
274458 settings.setValue( SETTING_SCRAMBLE_URL2, scrambleUrl2 );
459+ settings.setValue( SETTING_OPTIONAL1, optional1 );
460+ settings.setValue( SETTING_OPTIONAL2, optional2 );
461+ settings.setValue( SETTING_OPTIONAL3, optional3 );
462+ settings.setValue( SETTING_OPTIONAL4, optional4 );
463+ settings.setValue( SETTING_OPTIONAL5, optional5 );
464+ settings.setValue( SETTING_OPTIONAL6, optional6 );
465+ settings.setValue( SETTING_OPTIONAL7, optional7 );
466+ settings.setValue( SETTING_OPTIONAL8, optional8 );
467+ settings.setValue( SETTING_OPT_TITLE1, english_title1 );
468+ settings.setValue( SETTING_OPT_TITLE2, english_title2 );
469+ settings.setValue( SETTING_OPT_TITLE3, english_title3 );
470+ settings.setValue( SETTING_OPT_TITLE4, english_title4 );
471+
472+ settings.setValue( SETTING_french_TITLE1, french_title1 );
473+ settings.setValue( SETTING_french_TITLE2, french_title2 );
474+ settings.setValue( SETTING_german_TITLE1, german_title1 );
475+ settings.setValue( SETTING_german_TITLE2, german_title2 );
476+ settings.setValue( SETTING_spanish_TITLE1, spanish_title1 );
477+ settings.setValue( SETTING_spanish_TITLE2, spanish_title2 );
478+ settings.setValue( SETTING_italian_TITLE1, italian_title1 );
479+ settings.setValue( SETTING_italian_TITLE2, italian_title2 );
480+ settings.setValue( SETTING_russian_TITLE1, russian_title1 );
481+ settings.setValue( SETTING_russian_TITLE2, russian_title2 );
482+
275483 for ( int i = 0; checkBoxes[i].checkBox != NULL; i++ ) {
276484 settings.setValue( checkBoxes[i].key, checkBoxes[i].checkBox->isChecked() );
277485 }
@@ -303,10 +511,46 @@ void MainWindow::customizeSaveFolder() {
303511 }
304512 }
305513
514+
306515 void MainWindow::customizeScramble() {
307- ScrambleDialog dialog( scramble );
516+ ScrambleDialog dialog( optional1, optional2, optional3, optional4, optional5, optional6, optional7, optional8 );
308517 dialog.exec();
309- scramble = dialog.scramble();
518+ optional1 = dialog.scramble1();
519+ optional2 = dialog.scramble2();
520+ optional3 = dialog.scramble3();
521+ optional4 = dialog.scramble4();
522+ optional5 = dialog.scramble5();
523+ optional6 = dialog.scramble6();
524+ optional7 = dialog.scramble7();
525+ optional8 = dialog.scramble8();
526+
527+ QStringList french_TITLE1 = getAttribute( prefix + optional1 + "/" + suffix, "@kouza" );
528+ QStringList french_TITLE2 = getAttribute( prefix + optional2 + "/" + suffix, "@kouza" );
529+ QStringList german_TITLE1 = getAttribute( prefix + optional3 + "/" + suffix, "@kouza" );
530+ QStringList german_TITLE2 = getAttribute( prefix + optional4 + "/" + suffix, "@kouza" );
531+
532+ QStringList opt_TITLE1 = getAttribute( prefix + optional5 + "/" + suffix, "@kouza" );
533+ QStringList opt_TITLE2 = getAttribute( prefix + optional6 + "/" + suffix, "@kouza" );
534+ QStringList opt_TITLE3 = getAttribute( prefix + optional7 + "/" + suffix, "@kouza" );
535+ QStringList opt_TITLE4 = getAttribute( prefix + optional8 + "/" + suffix, "@kouza" );
536+
537+ english_title1 = opt_TITLE1[0];
538+ english_title2 = opt_TITLE2[0];
539+ english_title3 = opt_TITLE3[0];
540+ english_title4 = opt_TITLE4[0];
541+ french_title1 = french_TITLE1[0];
542+ french_title2 = french_TITLE2[0];
543+ german_title1 = german_TITLE1[0];
544+ german_title2 = german_TITLE2[0];
545+
546+ ui->toolButton_optional1->setText( QString( english_title1 ) );
547+ ui->toolButton_optional2->setText( QString( english_title2 ) );
548+ ui->toolButton_optional3->setText( QString( english_title3 ) );
549+ ui->toolButton_optional4->setText( QString( english_title4 ) );
550+ ui->toolButton_french->setText( QString( french_title1 ) );
551+ ui->toolButton_french2->setText( QString( french_title2 ) );
552+ ui->toolButton_german->setText( QString( german_title1 ) );
553+ ui->toolButton_german2->setText( QString( german_title2 ) );
310554 }
311555
312556 void MainWindow::download() { //「ダウンロード」または「キャンセル」ボタンが押されると呼び出される
@@ -329,6 +573,16 @@ void MainWindow::download() { //「ダウンロード」または「キャンセ
329573 }
330574 }
331575
576+QStringList MainWindow::getAttribute( QString url, QString attribute ) {
577+ const QString xmlUrl = "doc('" + url + "')/musicdata/music/" + attribute + "/string()";
578+ QStringList attributeList;
579+ QXmlQuery query;
580+ query.setQuery( xmlUrl );
581+ if ( query.isValid() )
582+ query.evaluateTo( &attributeList );
583+ return attributeList;
584+}
585+
332586 void MainWindow::toggled( bool checked ) {
333587 QObject* sender = this->sender();
334588 if ( sender ) {
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -54,6 +54,28 @@ public:
5454 static QString scramble;
5555 static QString scrambleUrl1;
5656 static QString scrambleUrl2;
57+ static QString optional1;
58+ static QString optional2;
59+ static QString optional3;
60+ static QString optional4;
61+ static QString optional5;
62+ static QString optional6;
63+ static QString optional7;
64+ static QString optional8;
65+ static QString english_title1;
66+ static QString english_title2;
67+ static QString english_title3;
68+ static QString english_title4;
69+ static QString french_title1;
70+ static QString french_title2;
71+ static QString german_title1;
72+ static QString german_title2;
73+ static QString spanish_title1;
74+ static QString spanish_title2;
75+ static QString italian_title1;
76+ static QString italian_title2;
77+ static QString russian_title1;
78+ static QString russian_title2;
5779
5880 protected:
5981 virtual void closeEvent( QCloseEvent *event );
@@ -70,11 +92,15 @@ private slots:
7092 void customizeScramble();
7193
7294 private:
95+ QStringList getAttribute( QString url, QString attribute );
7396 Ui::MainWindowClass *ui;
7497 DownloadThread* downloadThread;
7598 QMenu* customizeMenu;
7699 MessageWindow messagewindow;
77100
101+ static QString prefix;
102+ static QString suffix;
103+
78104 void settings( enum ReadWriteMode mode );
79105 };
80106
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -34,7 +34,7 @@
3434 </font>
3535 </property>
3636 <property name="windowTitle">
37- <string>語学講座ダウンローダ</string>
37+ <string>語学講座ダウンローダ(FFU-Mult)</string>
3838 </property>
3939 <widget class="QWidget" name="centralWidget">
4040 <property name="sizePolicy">
@@ -54,31 +54,6 @@
5454 </property>
5555 <layout class="QGridLayout" name="gridLayout_3" rowstretch="0,0,0,0,0,0,0,0,0,0,0,0,0,0">
5656 <item row="4" column="0">
57- <layout class="QHBoxLayout" name="horizontalLayout_18">
58- <item>
59- <widget class="QToolButton" name="toolButton_kaiwa">
60- <property name="sizePolicy">
61- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
62- <horstretch>0</horstretch>
63- <verstretch>0</verstretch>
64- </sizepolicy>
65- </property>
66- <property name="font">
67- <font>
68- <pointsize>11</pointsize>
69- </font>
70- </property>
71- <property name="text">
72- <string>ラジオ英会話</string>
73- </property>
74- <property name="checkable">
75- <bool>true</bool>
76- </property>
77- </widget>
78- </item>
79- </layout>
80- </item>
81- <item row="8" column="1">
8257 <layout class="QHBoxLayout" name="horizontalLayout_13">
8358 <item>
8459 <widget class="QToolButton" name="toolButton_russian">
@@ -94,7 +69,7 @@
9469 </font>
9570 </property>
9671 <property name="text">
97- <string>まいにちロシア語</string>
72+ <string>まいにちロシア語【月/火/水】</string>
9873 </property>
9974 <property name="checkable">
10075 <bool>true</bool>
@@ -103,10 +78,10 @@
10378 </item>
10479 </layout>
10580 </item>
106- <item row="5" column="0">
107- <layout class="QHBoxLayout" name="horizontalLayout_19">
81+ <item row="4" column="1">
82+ <layout class="QHBoxLayout" name="horizontalLayout_131">
10883 <item>
109- <widget class="QToolButton" name="toolButton_business1">
84+ <widget class="QToolButton" name="toolButton_russian2">
11085 <property name="sizePolicy">
11186 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
11287 <horstretch>0</horstretch>
@@ -119,7 +94,7 @@
11994 </font>
12095 </property>
12196 <property name="text">
122- <string>入門ビジネス英語</string>
97+ <string>まいにちロシア語【木/金】</string>
12398 </property>
12499 <property name="checkable">
125100 <bool>true</bool>
@@ -128,7 +103,7 @@
128103 </item>
129104 </layout>
130105 </item>
131- <item row="10" column="0">
106+ <item row="12" column="0">
132107 <widget class="Line" name="line_2">
133108 <property name="lineWidth">
134109 <number>2</number>
@@ -138,7 +113,7 @@
138113 </property>
139114 </widget>
140115 </item>
141- <item row="7" column="1">
116+ <item row="2" column="0">
142117 <layout class="QHBoxLayout" name="horizontalLayout_7">
143118 <item>
144119 <widget class="QToolButton" name="toolButton_spanish">
@@ -154,7 +129,7 @@
154129 </font>
155130 </property>
156131 <property name="text">
157- <string>まいにちスペイン語</string>
132+ <string>まいにちスペイン語【月/火/水】</string>
158133 </property>
159134 <property name="checkable">
160135 <bool>true</bool>
@@ -163,10 +138,10 @@
163138 </item>
164139 </layout>
165140 </item>
166- <item row="11" column="0">
167- <layout class="QHBoxLayout" name="horizontalLayout_22">
141+ <item row="2" column="1">
142+ <layout class="QHBoxLayout" name="horizontalLayout_71">
168143 <item>
169- <widget class="QToolButton" name="toolButton_skip">
144+ <widget class="QToolButton" name="toolButton_spanish2">
170145 <property name="sizePolicy">
171146 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
172147 <horstretch>0</horstretch>
@@ -179,22 +154,19 @@
179154 </font>
180155 </property>
181156 <property name="text">
182- <string>既存のファイルはスキップ</string>
157+ <string>まいにちスペイン語【木/金】</string>
183158 </property>
184159 <property name="checkable">
185160 <bool>true</bool>
186161 </property>
187- <property name="checked">
188- <bool>false</bool>
189- </property>
190162 </widget>
191163 </item>
192164 </layout>
193165 </item>
194- <item row="7" column="0">
195- <layout class="QHBoxLayout" name="horizontalLayout_21">
166+ <item row="13" column="0">
167+ <layout class="QHBoxLayout" name="horizontalLayout_22">
196168 <item>
197- <widget class="QToolButton" name="toolButton_kouryaku">
169+ <widget class="QToolButton" name="toolButton_skip">
198170 <property name="sizePolicy">
199171 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
200172 <horstretch>0</horstretch>
@@ -207,19 +179,22 @@
207179 </font>
208180 </property>
209181 <property name="text">
210- <string>攻略英語リスニング</string>
182+ <string>既存のファイルはスキップ</string>
211183 </property>
212184 <property name="checkable">
213185 <bool>true</bool>
214186 </property>
187+ <property name="checked">
188+ <bool>false</bool>
189+ </property>
215190 </widget>
216191 </item>
217192 </layout>
218193 </item>
219- <item row="13" column="0">
194+ <item row="14" column="0">
220195 <layout class="QHBoxLayout" name="horizontalLayout_28"/>
221196 </item>
222- <item row="13" column="1">
197+ <item row="14" column="1">
223198 <layout class="QHBoxLayout" name="horizontalLayout_25">
224199 <item>
225200 <widget class="QPushButton" name="downloadButton">
@@ -241,10 +216,10 @@
241216 </item>
242217 </layout>
243218 </item>
244- <item row="11" column="1">
219+ <item row="13" column="1">
245220 <layout class="QHBoxLayout" name="horizontalLayout_26">
246221 <item>
247- <widget class="QLabel" name="label">
222+ <widget class="QLabel" name="label_ext">
248223 <property name="sizePolicy">
249224 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
250225 <horstretch>0</horstretch>
@@ -280,7 +255,7 @@
280255 <pointsize>11</pointsize>
281256 </font>
282257 </property>
283- <item>
258+ <item>
284259 <property name="text">
285260 <string>3g2</string>
286261 </property>
@@ -334,10 +309,10 @@
334309 </item>
335310 </layout>
336311 </item>
337- <item row="8" column="0">
338- <layout class="QHBoxLayout" name="horizontalLayout_27">
312+ <item row="1" column="0">
313+ <layout class="QHBoxLayout" name="horizontalLayout_6">
339314 <item>
340- <widget class="QToolButton" name="toolButton_yomu">
315+ <widget class="QToolButton" name="toolButton_german">
341316 <property name="sizePolicy">
342317 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
343318 <horstretch>0</horstretch>
@@ -350,7 +325,7 @@
350325 </font>
351326 </property>
352327 <property name="text">
353- <string>英語で読む村上春樹</string>
328+ <string>まいにちドイツ語【月/火/水】</string>
354329 </property>
355330 <property name="checkable">
356331 <bool>true</bool>
@@ -359,10 +334,10 @@
359334 </item>
360335 </layout>
361336 </item>
362- <item row="6" column="1">
363- <layout class="QHBoxLayout" name="horizontalLayout_6">
337+ <item row="1" column="1">
338+ <layout class="QHBoxLayout" name="horizontalLayout_61">
364339 <item>
365- <widget class="QToolButton" name="toolButton_german">
340+ <widget class="QToolButton" name="toolButton_german2">
366341 <property name="sizePolicy">
367342 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
368343 <horstretch>0</horstretch>
@@ -375,7 +350,7 @@
375350 </font>
376351 </property>
377352 <property name="text">
378- <string>まいにちドイツ語</string>
353+ <string>まいにちドイツ語【木/金】</string>
379354 </property>
380355 <property name="checkable">
381356 <bool>true</bool>
@@ -384,7 +359,7 @@
384359 </item>
385360 </layout>
386361 </item>
387- <item row="0" column="1">
362+ <item row="6" column="0">
388363 <layout class="QHBoxLayout" name="horizontalLayout_2">
389364 <item>
390365 <widget class="QToolButton" name="toolButton_chinese">
@@ -409,10 +384,24 @@
409384 </item>
410385 </layout>
411386 </item>
412- <item row="0" column="0">
413- <layout class="QHBoxLayout" name="horizontalLayout_14">
387+ <item row="12" column="1">
388+ <layout class="QHBoxLayout" name="horizontalLayout_10">
414389 <item>
415- <widget class="QToolButton" name="toolButton_basic1">
390+ <widget class="Line" name="line">
391+ <property name="lineWidth">
392+ <number>2</number>
393+ </property>
394+ <property name="orientation">
395+ <enum>Qt::Horizontal</enum>
396+ </property>
397+ </widget>
398+ </item>
399+ </layout>
400+ </item>
401+ <item row="5" column="1">
402+ <layout class="QHBoxLayout" name="horizontalLayout_11">
403+ <item>
404+ <widget class="QToolButton" name="toolButton_levelup_hangeul">
416405 <property name="sizePolicy">
417406 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
418407 <horstretch>0</horstretch>
@@ -425,7 +414,7 @@
425414 </font>
426415 </property>
427416 <property name="text">
428- <string>基礎英語1</string>
417+ <string>レベルアップハングル講座</string>
429418 </property>
430419 <property name="checkable">
431420 <bool>true</bool>
@@ -434,24 +423,35 @@
434423 </item>
435424 </layout>
436425 </item>
437- <item row="10" column="1">
438- <layout class="QHBoxLayout" name="horizontalLayout_10">
426+ <item row="6" column="1">
427+ <layout class="QHBoxLayout" name="horizontalLayout_9">
439428 <item>
440- <widget class="Line" name="line">
441- <property name="lineWidth">
442- <number>2</number>
429+ <widget class="QToolButton" name="toolButton_levelup_chinese">
430+ <property name="sizePolicy">
431+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
432+ <horstretch>0</horstretch>
433+ <verstretch>0</verstretch>
434+ </sizepolicy>
443435 </property>
444- <property name="orientation">
445- <enum>Qt::Horizontal</enum>
436+ <property name="font">
437+ <font>
438+ <pointsize>11</pointsize>
439+ </font>
440+ </property>
441+ <property name="text">
442+ <string>レベルアップ中国語</string>
443+ </property>
444+ <property name="checkable">
445+ <bool>true</bool>
446446 </property>
447447 </widget>
448448 </item>
449449 </layout>
450450 </item>
451- <item row="3" column="0">
452- <layout class="QHBoxLayout" name="horizontalLayout_17">
451+ <item row="7" column="0">
452+ <layout class="QHBoxLayout" name="horizontalLayout_9_0">
453453 <item>
454- <widget class="QToolButton" name="toolButton_timetrial">
454+ <widget class="QToolButton" name="toolButton_omotenashino_chinese">
455455 <property name="sizePolicy">
456456 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
457457 <horstretch>0</horstretch>
@@ -464,7 +464,7 @@
464464 </font>
465465 </property>
466466 <property name="text">
467- <string>英会話タイムトライアル</string>
467+ <string>おもてなしの中国語</string>
468468 </property>
469469 <property name="checkable">
470470 <bool>true</bool>
@@ -473,10 +473,10 @@
473473 </item>
474474 </layout>
475475 </item>
476- <item row="1" column="0">
477- <layout class="QHBoxLayout" name="horizontalLayout_15">
476+ <item row="7" column="1">
477+ <layout class="QHBoxLayout" name="horizontalLayout_9_1">
478478 <item>
479- <widget class="QToolButton" name="toolButton_basic2">
479+ <widget class="QToolButton" name="toolButton_omotenashino_hangeul">
480480 <property name="sizePolicy">
481481 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
482482 <horstretch>0</horstretch>
@@ -489,7 +489,7 @@
489489 </font>
490490 </property>
491491 <property name="text">
492- <string>基礎英語2</string>
492+ <string>おもてなしのハングル</string>
493493 </property>
494494 <property name="checkable">
495495 <bool>true</bool>
@@ -498,10 +498,10 @@
498498 </item>
499499 </layout>
500500 </item>
501- <item row="2" column="0">
502- <layout class="QHBoxLayout" name="horizontalLayout_16">
501+ <item row="3" column="0">
502+ <layout class="QHBoxLayout" name="horizontalLayout_4">
503503 <item>
504- <widget class="QToolButton" name="toolButton_basic3">
504+ <widget class="QToolButton" name="toolButton_italian">
505505 <property name="sizePolicy">
506506 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
507507 <horstretch>0</horstretch>
@@ -514,7 +514,7 @@
514514 </font>
515515 </property>
516516 <property name="text">
517- <string>基礎英語3</string>
517+ <string>まいにちイタリア語【月/火/水】</string>
518518 </property>
519519 <property name="checkable">
520520 <bool>true</bool>
@@ -523,10 +523,10 @@
523523 </item>
524524 </layout>
525525 </item>
526- <item row="5" column="1">
527- <layout class="QHBoxLayout" name="horizontalLayout_11">
526+ <item row="3" column="1">
527+ <layout class="QHBoxLayout" name="horizontalLayout_41">
528528 <item>
529- <widget class="QToolButton" name="toolButton_levelup_hangeul">
529+ <widget class="QToolButton" name="toolButton_italian2">
530530 <property name="sizePolicy">
531531 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
532532 <horstretch>0</horstretch>
@@ -539,7 +539,7 @@
539539 </font>
540540 </property>
541541 <property name="text">
542- <string>レベルアップハングル講座</string>
542+ <string>まいにちイタリア語【木/金】</string>
543543 </property>
544544 <property name="checkable">
545545 <bool>true</bool>
@@ -548,10 +548,10 @@
548548 </item>
549549 </layout>
550550 </item>
551- <item row="1" column="1">
552- <layout class="QHBoxLayout" name="horizontalLayout_9">
551+ <item row="0" column="0">
552+ <layout class="QHBoxLayout" name="horizontalLayout_3">
553553 <item>
554- <widget class="QToolButton" name="toolButton_levelup_chinese">
554+ <widget class="QToolButton" name="toolButton_french">
555555 <property name="sizePolicy">
556556 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
557557 <horstretch>0</horstretch>
@@ -564,7 +564,7 @@
564564 </font>
565565 </property>
566566 <property name="text">
567- <string>レベルアップ中国語</string>
567+ <string>まいにちフランス語【月/火/水】</string>
568568 </property>
569569 <property name="checkable">
570570 <bool>true</bool>
@@ -573,10 +573,10 @@
573573 </item>
574574 </layout>
575575 </item>
576- <item row="3" column="1">
577- <layout class="QHBoxLayout" name="horizontalLayout_4">
576+ <item row="0" column="1">
577+ <layout class="QHBoxLayout" name="horizontalLayout_31">
578578 <item>
579- <widget class="QToolButton" name="toolButton_italian">
579+ <widget class="QToolButton" name="toolButton_french2">
580580 <property name="sizePolicy">
581581 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
582582 <horstretch>0</horstretch>
@@ -589,7 +589,7 @@
589589 </font>
590590 </property>
591591 <property name="text">
592- <string>まいにちイタリア語</string>
592+ <string>まいにちフランス語【木/金】</string>
593593 </property>
594594 <property name="checkable">
595595 <bool>true</bool>
@@ -598,10 +598,34 @@
598598 </item>
599599 </layout>
600600 </item>
601- <item row="2" column="1">
602- <layout class="QHBoxLayout" name="horizontalLayout_3">
601+ <item row="8" column="0">
602+ <widget class="Line" name="line_2_1">
603+ <property name="lineWidth">
604+ <number>2</number>
605+ </property>
606+ <property name="orientation">
607+ <enum>Qt::Horizontal</enum>
608+ </property>
609+ </widget>
610+ </item>
611+ <item row="8" column="1">
612+ <layout class="QHBoxLayout" name="horizontalLayout_10_1">
603613 <item>
604- <widget class="QToolButton" name="toolButton_french">
614+ <widget class="Line" name="line_1_0">
615+ <property name="lineWidth">
616+ <number>2</number>
617+ </property>
618+ <property name="orientation">
619+ <enum>Qt::Horizontal</enum>
620+ </property>
621+ </widget>
622+ </item>
623+ </layout>
624+ </item>
625+ <item row="9" column="0">
626+ <layout class="QHBoxLayout" name="horizontalLayout_411">
627+ <item>
628+ <widget class="QToolButton" name="toolButton_optional1">
605629 <property name="sizePolicy">
606630 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
607631 <horstretch>0</horstretch>
@@ -614,7 +638,7 @@
614638 </font>
615639 </property>
616640 <property name="text">
617- <string>まいにちフランス語</string>
641+ <string>任意講座1</string>
618642 </property>
619643 <property name="checkable">
620644 <bool>true</bool>
@@ -623,10 +647,10 @@
623647 </item>
624648 </layout>
625649 </item>
626- <item row="4" column="1">
627- <layout class="QHBoxLayout" name="horizontalLayout_5">
650+ <item row="9" column="1">
651+ <layout class="QHBoxLayout" name="horizontalLayout_422">
628652 <item>
629- <widget class="QToolButton" name="toolButton_hangeul">
653+ <widget class="QToolButton" name="toolButton_optional2">
630654 <property name="sizePolicy">
631655 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
632656 <horstretch>0</horstretch>
@@ -639,7 +663,7 @@
639663 </font>
640664 </property>
641665 <property name="text">
642- <string>まいにちハングル講座</string>
666+ <string>任意講座2</string>
643667 </property>
644668 <property name="checkable">
645669 <bool>true</bool>
@@ -648,10 +672,10 @@
648672 </item>
649673 </layout>
650674 </item>
651- <item row="9" column="0">
652- <layout class="QHBoxLayout" name="horizontalLayout_29">
675+ <item row="10" column="0">
676+ <layout class="QHBoxLayout" name="horizontalLayout_421">
653677 <item>
654- <widget class="QToolButton" name="toolButton_enjoy">
678+ <widget class="QToolButton" name="toolButton_optional3">
655679 <property name="sizePolicy">
656680 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
657681 <horstretch>0</horstretch>
@@ -664,7 +688,7 @@
664688 </font>
665689 </property>
666690 <property name="text">
667- <string>エンジョイ・シンプル・イングリッシュ</string>
691+ <string>任意講座3</string>
668692 </property>
669693 <property name="checkable">
670694 <bool>true</bool>
@@ -673,10 +697,10 @@
673697 </item>
674698 </layout>
675699 </item>
676- <item row="6" column="0">
677- <layout class="QHBoxLayout" name="horizontalLayout_20">
700+ <item row="10" column="1">
701+ <layout class="QHBoxLayout" name="horizontalLayout_432">
678702 <item>
679- <widget class="QToolButton" name="toolButton_business2">
703+ <widget class="QToolButton" name="toolButton_optional4">
680704 <property name="sizePolicy">
681705 <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
682706 <horstretch>0</horstretch>
@@ -689,7 +713,32 @@
689713 </font>
690714 </property>
691715 <property name="text">
692- <string>実践ビジネス英語</string>
716+ <string>任意講座4</string>
717+ </property>
718+ <property name="checkable">
719+ <bool>true</bool>
720+ </property>
721+ </widget>
722+ </item>
723+ </layout>
724+ </item>
725+ <item row="5" column="0">
726+ <layout class="QHBoxLayout" name="horizontalLayout_5">
727+ <item>
728+ <widget class="QToolButton" name="toolButton_hangeul">
729+ <property name="sizePolicy">
730+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
731+ <horstretch>0</horstretch>
732+ <verstretch>0</verstretch>
733+ </sizepolicy>
734+ </property>
735+ <property name="font">
736+ <font>
737+ <pointsize>11</pointsize>
738+ </font>
739+ </property>
740+ <property name="text">
741+ <string>まいにちハングル講座</string>
693742 </property>
694743 <property name="checkable">
695744 <bool>true</bool>
@@ -867,7 +916,7 @@
867916 </item>
868917 </layout>
869918 </widget>
870- <widget class="QWidget" name="layoutWidget">
919+ <widget class="QWidget" name="layoutWidget2">
871920 <property name="geometry">
872921 <rect>
873922 <x>10</x>
@@ -889,7 +938,7 @@
889938 </item>
890939 </layout>
891940 </widget>
892- <widget class="QWidget" name="layoutWidget">
941+ <widget class="QWidget" name="layoutWidget3">
893942 <property name="geometry">
894943 <rect>
895944 <x>300</x>
@@ -958,7 +1007,7 @@
9581007 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
9591008 </property>
9601009 </widget>
961- <widget class="QWidget" name="layoutWidget">
1010+ <widget class="QWidget" name="layoutWidget4">
9621011 <property name="geometry">
9631012 <rect>
9641013 <x>300</x>
@@ -983,7 +1032,7 @@
9831032 </item>
9841033 </layout>
9851034 </widget>
986- <widget class="QWidget" name="layoutWidget">
1035+ <widget class="QWidget" name="layoutWidget5">
9871036 <property name="geometry">
9881037 <rect>
9891038 <x>20</x>
@@ -1060,25 +1109,26 @@
10601109 </widget>
10611110 <layoutdefault spacing="6" margin="11"/>
10621111 <tabstops>
1063- <tabstop>toolButton_basic1</tabstop>
1064- <tabstop>toolButton_basic2</tabstop>
1065- <tabstop>toolButton_basic3</tabstop>
1066- <tabstop>toolButton_timetrial</tabstop>
1067- <tabstop>toolButton_kaiwa</tabstop>
1068- <tabstop>toolButton_business1</tabstop>
1069- <tabstop>toolButton_business2</tabstop>
1070- <tabstop>toolButton_kouryaku</tabstop>
1071- <tabstop>toolButton_yomu</tabstop>
1072- <tabstop>toolButton_enjoy</tabstop>
1073- <tabstop>toolButton_chinese</tabstop>
1074- <tabstop>toolButton_levelup_chinese</tabstop>
10751112 <tabstop>toolButton_french</tabstop>
1076- <tabstop>toolButton_italian</tabstop>
1077- <tabstop>toolButton_hangeul</tabstop>
1078- <tabstop>toolButton_levelup_hangeul</tabstop>
1113+ <tabstop>toolButton_french2</tabstop>
10791114 <tabstop>toolButton_german</tabstop>
1115+ <tabstop>toolButton_german2</tabstop>
10801116 <tabstop>toolButton_spanish</tabstop>
1117+ <tabstop>toolButton_spanish2</tabstop>
1118+ <tabstop>toolButton_italian</tabstop>
1119+ <tabstop>toolButton_italian2</tabstop>
10811120 <tabstop>toolButton_russian</tabstop>
1121+ <tabstop>toolButton_russian2</tabstop>
1122+ <tabstop>toolButton_hangeul</tabstop>
1123+ <tabstop>toolButton_levelup_hangeul</tabstop>
1124+ <tabstop>toolButton_chinese</tabstop>
1125+ <tabstop>toolButton_levelup_chinese</tabstop>
1126+ <tabstop>toolButton_omotenashino_chinese</tabstop>
1127+ <tabstop>toolButton_omotenashino_hangeul</tabstop>
1128+ <tabstop>toolButton_optional1</tabstop>
1129+ <tabstop>toolButton_optional2</tabstop>
1130+ <tabstop>toolButton_optional3</tabstop>
1131+ <tabstop>toolButton_optional4</tabstop>
10821132 <tabstop>toolButton_skip</tabstop>
10831133 <tabstop>comboBox_extension</tabstop>
10841134 <tabstop>downloadButton</tabstop>
@@ -1114,6 +1164,22 @@
11141164 </hints>
11151165 </connection>
11161166 <connection>
1167+ <sender>toolButton_basic0</sender>
1168+ <signal>toggled(bool)</signal>
1169+ <receiver>MainWindowClass</receiver>
1170+ <slot>toggled(bool)</slot>
1171+ <hints>
1172+ <hint type="sourcelabel">
1173+ <x>20</x>
1174+ <y>47</y>
1175+ </hint>
1176+ <hint type="destinationlabel">
1177+ <x>92</x>
1178+ <y>503</y>
1179+ </hint>
1180+ </hints>
1181+ </connection>
1182+ <connection>
11171183 <sender>toolButton_basic1</sender>
11181184 <signal>toggled(bool)</signal>
11191185 <receiver>MainWindowClass</receiver>
@@ -1226,7 +1292,7 @@
12261292 </hints>
12271293 </connection>
12281294 <connection>
1229- <sender>toolButton_kouryaku</sender>
1295+ <sender>toolButton_gendai</sender>
12301296 <signal>toggled(bool)</signal>
12311297 <receiver>MainWindowClass</receiver>
12321298 <slot>toggled(bool)</slot>
@@ -1242,7 +1308,7 @@
12421308 </hints>
12431309 </connection>
12441310 <connection>
1245- <sender>toolButton_yomu</sender>
1311+ <sender>toolButton_gakusyu</sender>
12461312 <signal>toggled(bool)</signal>
12471313 <receiver>MainWindowClass</receiver>
12481314 <slot>toggled(bool)</slot>
@@ -1273,6 +1339,7 @@
12731339 </hint>
12741340 </hints>
12751341 </connection>
1342+
12761343 <connection>
12771344 <sender>toolButton_skip</sender>
12781345 <signal>toggled(bool)</signal>
@@ -1338,6 +1405,38 @@
13381405 </hints>
13391406 </connection>
13401407 <connection>
1408+ <sender>toolButton_omotenashino_chinese</sender>
1409+ <signal>toggled(bool)</signal>
1410+ <receiver>MainWindowClass</receiver>
1411+ <slot>toggled(bool)</slot>
1412+ <hints>
1413+ <hint type="sourcelabel">
1414+ <x>282</x>
1415+ <y>77</y>
1416+ </hint>
1417+ <hint type="destinationlabel">
1418+ <x>324</x>
1419+ <y>533</y>
1420+ </hint>
1421+ </hints>
1422+ </connection>
1423+ <connection>
1424+ <sender>toolButton_omotenashino_hangeul</sender>
1425+ <signal>toggled(bool)</signal>
1426+ <receiver>MainWindowClass</receiver>
1427+ <slot>toggled(bool)</slot>
1428+ <hints>
1429+ <hint type="sourcelabel">
1430+ <x>282</x>
1431+ <y>77</y>
1432+ </hint>
1433+ <hint type="destinationlabel">
1434+ <x>324</x>
1435+ <y>533</y>
1436+ </hint>
1437+ </hints>
1438+ </connection>
1439+ <connection>
13411440 <sender>toolButton_french</sender>
13421441 <signal>toggled(bool)</signal>
13431442 <receiver>MainWindowClass</receiver>
@@ -1354,6 +1453,22 @@
13541453 </hints>
13551454 </connection>
13561455 <connection>
1456+ <sender>toolButton_french2</sender>
1457+ <signal>toggled(bool)</signal>
1458+ <receiver>MainWindowClass</receiver>
1459+ <slot>toggled(bool)</slot>
1460+ <hints>
1461+ <hint type="sourcelabel">
1462+ <x>294</x>
1463+ <y>122</y>
1464+ </hint>
1465+ <hint type="destinationlabel">
1466+ <x>350</x>
1467+ <y>551</y>
1468+ </hint>
1469+ </hints>
1470+ </connection>
1471+ <connection>
13571472 <sender>toolButton_italian</sender>
13581473 <signal>toggled(bool)</signal>
13591474 <receiver>MainWindowClass</receiver>
@@ -1370,6 +1485,22 @@
13701485 </hints>
13711486 </connection>
13721487 <connection>
1488+ <sender>toolButton_italian2</sender>
1489+ <signal>toggled(bool)</signal>
1490+ <receiver>MainWindowClass</receiver>
1491+ <slot>toggled(bool)</slot>
1492+ <hints>
1493+ <hint type="sourcelabel">
1494+ <x>305</x>
1495+ <y>158</y>
1496+ </hint>
1497+ <hint type="destinationlabel">
1498+ <x>371</x>
1499+ <y>569</y>
1500+ </hint>
1501+ </hints>
1502+ </connection>
1503+ <connection>
13731504 <sender>toolButton_hangeul</sender>
13741505 <signal>toggled(bool)</signal>
13751506 <receiver>MainWindowClass</receiver>
@@ -1402,6 +1533,70 @@
14021533 </hints>
14031534 </connection>
14041535 <connection>
1536+ <sender>toolButton_optional1</sender>
1537+ <signal>toggled(bool)</signal>
1538+ <receiver>MainWindowClass</receiver>
1539+ <slot>toggled(bool)</slot>
1540+ <hints>
1541+ <hint type="sourcelabel">
1542+ <x>314</x>
1543+ <y>194</y>
1544+ </hint>
1545+ <hint type="destinationlabel">
1546+ <x>387</x>
1547+ <y>587</y>
1548+ </hint>
1549+ </hints>
1550+ </connection>
1551+ <connection>
1552+ <sender>toolButton_optional2</sender>
1553+ <signal>toggled(bool)</signal>
1554+ <receiver>MainWindowClass</receiver>
1555+ <slot>toggled(bool)</slot>
1556+ <hints>
1557+ <hint type="sourcelabel">
1558+ <x>314</x>
1559+ <y>194</y>
1560+ </hint>
1561+ <hint type="destinationlabel">
1562+ <x>387</x>
1563+ <y>587</y>
1564+ </hint>
1565+ </hints>
1566+ </connection>
1567+ <connection>
1568+ <sender>toolButton_optional3</sender>
1569+ <signal>toggled(bool)</signal>
1570+ <receiver>MainWindowClass</receiver>
1571+ <slot>toggled(bool)</slot>
1572+ <hints>
1573+ <hint type="sourcelabel">
1574+ <x>314</x>
1575+ <y>194</y>
1576+ </hint>
1577+ <hint type="destinationlabel">
1578+ <x>387</x>
1579+ <y>587</y>
1580+ </hint>
1581+ </hints>
1582+ </connection>
1583+ <connection>
1584+ <sender>toolButton_optional4</sender>
1585+ <signal>toggled(bool)</signal>
1586+ <receiver>MainWindowClass</receiver>
1587+ <slot>toggled(bool)</slot>
1588+ <hints>
1589+ <hint type="sourcelabel">
1590+ <x>314</x>
1591+ <y>194</y>
1592+ </hint>
1593+ <hint type="destinationlabel">
1594+ <x>387</x>
1595+ <y>587</y>
1596+ </hint>
1597+ </hints>
1598+ </connection>
1599+ <connection>
14051600 <sender>toolButton_german</sender>
14061601 <signal>toggled(bool)</signal>
14071602 <receiver>MainWindowClass</receiver>
@@ -1418,6 +1613,22 @@
14181613 </hints>
14191614 </connection>
14201615 <connection>
1616+ <sender>toolButton_german2</sender>
1617+ <signal>toggled(bool)</signal>
1618+ <receiver>MainWindowClass</receiver>
1619+ <slot>toggled(bool)</slot>
1620+ <hints>
1621+ <hint type="sourcelabel">
1622+ <x>340</x>
1623+ <y>271</y>
1624+ </hint>
1625+ <hint type="destinationlabel">
1626+ <x>359</x>
1627+ <y>612</y>
1628+ </hint>
1629+ </hints>
1630+ </connection>
1631+ <connection>
14211632 <sender>toolButton_spanish</sender>
14221633 <signal>toggled(bool)</signal>
14231634 <receiver>MainWindowClass</receiver>
@@ -1434,6 +1645,22 @@
14341645 </hints>
14351646 </connection>
14361647 <connection>
1648+ <sender>toolButton_spanish2</sender>
1649+ <signal>toggled(bool)</signal>
1650+ <receiver>MainWindowClass</receiver>
1651+ <slot>toggled(bool)</slot>
1652+ <hints>
1653+ <hint type="sourcelabel">
1654+ <x>357</x>
1655+ <y>305</y>
1656+ </hint>
1657+ <hint type="destinationlabel">
1658+ <x>435</x>
1659+ <y>507</y>
1660+ </hint>
1661+ </hints>
1662+ </connection>
1663+ <connection>
14371664 <sender>toolButton_russian</sender>
14381665 <signal>toggled(bool)</signal>
14391666 <receiver>MainWindowClass</receiver>
@@ -1449,6 +1676,22 @@
14491676 </hint>
14501677 </hints>
14511678 </connection>
1679+ <connection>
1680+ <sender>toolButton_russian2</sender>
1681+ <signal>toggled(bool)</signal>
1682+ <receiver>MainWindowClass</receiver>
1683+ <slot>toggled(bool)</slot>
1684+ <hints>
1685+ <hint type="sourcelabel">
1686+ <x>395</x>
1687+ <y>339</y>
1688+ </hint>
1689+ <hint type="destinationlabel">
1690+ <x>460</x>
1691+ <y>520</y>
1692+ </hint>
1693+ </hints>
1694+ </connection>
14521695 </connections>
14531696 <slots>
14541697 <slot>download()</slot>
--- a/scrambledialog.cpp
+++ b/scrambledialog.cpp
@@ -21,16 +21,71 @@
2121 #include "scrambledialog.h"
2222 #include "ui_scrambledialog.h"
2323
24-ScrambleDialog::ScrambleDialog( QString scramble, QWidget *parent )
24+#define OPTIONAL1 "french/kouza"
25+#define OPTIONAL2 "french/kouza2"
26+#define OPTIONAL3 "german/kouza"
27+#define OPTIONAL4 "german/kouza2"
28+#define OPTIONAL5 "english/basic1"
29+#define OPTIONAL6 "english/basic2"
30+#define OPTIONAL7 "english/basic3"
31+#define OPTIONAL8 "english/enjoy"
32+
33+QString ScrambleDialog::optional1;
34+QString ScrambleDialog::optional2;
35+QString ScrambleDialog::optional3;
36+QString ScrambleDialog::optional4;
37+QString ScrambleDialog::optional5;
38+QString ScrambleDialog::optional6;
39+QString ScrambleDialog::optional7;
40+QString ScrambleDialog::optional8;
41+
42+
43+ScrambleDialog::ScrambleDialog( QString optional1, QString optional2, QString optional3, QString optional4, QString optional5, QString optional6, QString optional7, QString optional8, QWidget *parent )
2544 : QDialog(parent), ui(new Ui::ScrambleDialog) {
2645 ui->setupUi(this);
27- ui->scramble->setText( scramble );
46+ ui->optional1->setText( optional1 ),
47+ ui->optional2->setText( optional2 ),
48+ ui->optional3->setText( optional3 ),
49+ ui->optional4->setText( optional4 );
50+ ui->optional5->setText( optional5 ),
51+ ui->optional6->setText( optional6 ),
52+ ui->optional7->setText( optional7 ),
53+ ui->optional8->setText( optional8 );
2854 }
2955
3056 ScrambleDialog::~ScrambleDialog() {
3157 delete ui;
3258 }
3359
34-QString ScrambleDialog::scramble() {
35- return ui->scramble->text();
60+QString ScrambleDialog::scramble1() {
61+ return ui->optional1->text();
62+}
63+
64+QString ScrambleDialog::scramble2() {
65+ return ui->optional2->text();
66+}
67+
68+QString ScrambleDialog::scramble3() {
69+ return ui->optional3->text();
70+}
71+
72+QString ScrambleDialog::scramble4() {
73+ return ui->optional4->text();
3674 }
75+
76+QString ScrambleDialog::scramble5() {
77+ return ui->optional5->text();
78+}
79+
80+QString ScrambleDialog::scramble6() {
81+ return ui->optional6->text();
82+}
83+
84+QString ScrambleDialog::scramble7() {
85+ return ui->optional7->text();
86+}
87+
88+QString ScrambleDialog::scramble8() {
89+ return ui->optional8->text();
90+}
91+
--- a/scrambledialog.h
+++ b/scrambledialog.h
@@ -31,9 +31,26 @@ class ScrambleDialog : public QDialog {
3131 Q_OBJECT
3232
3333 public:
34- explicit ScrambleDialog( QString scramble, QWidget *parent = 0 );
34+ explicit ScrambleDialog( QString optional1, QString optional2, QString optional3, QString optional4, QString optional5, QString optional6 , QString optional7, QString optional8, QWidget *parent = 0 );
3535 ~ScrambleDialog();
36- QString scramble();
36+ QString scramble1();
37+ QString scramble2();
38+ QString scramble3();
39+ QString scramble4();
40+ QString scramble5();
41+ QString scramble6();
42+ QString scramble7();
43+ QString scramble8();
44+
45+ static QString optional1;
46+ static QString optional2;
47+ static QString optional3;
48+ static QString optional4;
49+ static QString optional5;
50+ static QString optional6;
51+ static QString optional7;
52+ static QString optional8;
53+
3754
3855 private:
3956 Ui::ScrambleDialog *ui;
--- a/scrambledialog.ui
+++ b/scrambledialog.ui
@@ -7,17 +7,17 @@
77 <x>0</x>
88 <y>0</y>
99 <width>320</width>
10- <height>129</height>
10+ <height>329</height>
1111 </rect>
1212 </property>
1313 <property name="windowTitle">
14- <string>Dialog</string>
14+ <string>任意講座ボタンのURL設定</string>
1515 </property>
1616 <widget class="QDialogButtonBox" name="buttonBox">
1717 <property name="geometry">
1818 <rect>
1919 <x>10</x>
20- <y>90</y>
20+ <y>290</y>
2121 <width>301</width>
2222 <height>32</height>
2323 </rect>
@@ -29,7 +29,7 @@
2929 <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
3030 </property>
3131 </widget>
32- <widget class="QLineEdit" name="scramble">
32+ <widget class="QLineEdit" name="optional1">
3333 <property name="geometry">
3434 <rect>
3535 <x>30</x>
@@ -39,6 +39,36 @@
3939 </rect>
4040 </property>
4141 </widget>
42+ <widget class="QLineEdit" name="optional2">
43+ <property name="geometry">
44+ <rect>
45+ <x>30</x>
46+ <y>70</y>
47+ <width>231</width>
48+ <height>22</height>
49+ </rect>
50+ </property>
51+ </widget>
52+ <widget class="QLineEdit" name="optional3">
53+ <property name="geometry">
54+ <rect>
55+ <x>30</x>
56+ <y>90</y>
57+ <width>231</width>
58+ <height>22</height>
59+ </rect>
60+ </property>
61+ </widget>
62+ <widget class="QLineEdit" name="optional4">
63+ <property name="geometry">
64+ <rect>
65+ <x>30</x>
66+ <y>110</y>
67+ <width>231</width>
68+ <height>22</height>
69+ </rect>
70+ </property>
71+ </widget>
4272 <widget class="QLabel" name="label">
4373 <property name="geometry">
4474 <rect>
@@ -49,7 +79,60 @@
4979 </rect>
5080 </property>
5181 <property name="text">
52- <string>スクランブル文字列を入力してください。</string>
82+ <string>上部4任意講座ボタンURL</string>
83+ </property>
84+ </widget>
85+ <widget class="QLineEdit" name="optional5">
86+ <property name="geometry">
87+ <rect>
88+ <x>30</x>
89+ <y>180</y>
90+ <width>231</width>
91+ <height>22</height>
92+ </rect>
93+ </property>
94+ </widget>
95+ <widget class="QLineEdit" name="optional6">
96+ <property name="geometry">
97+ <rect>
98+ <x>30</x>
99+ <y>200</y>
100+ <width>231</width>
101+ <height>22</height>
102+ </rect>
103+ </property>
104+ </widget>
105+ <widget class="QLineEdit" name="optional7">
106+ <property name="geometry">
107+ <rect>
108+ <x>30</x>
109+ <y>220</y>
110+ <width>231</width>
111+ <height>22</height>
112+ </rect>
113+ </property>
114+ </widget>
115+ <widget class="QLineEdit" name="optional8">
116+ <property name="geometry">
117+ <rect>
118+ <x>30</x>
119+ <y>240</y>
120+ <width>231</width>
121+ <height>22</height>
122+ </rect>
123+ </property>
124+ </widget>
125+ <widget class="QLabel" name="label">
126+ <property name="geometry">
127+ <rect>
128+ <x>20</x>
129+ <y>150</y>
130+ <width>246</width>
131+ <height>16</height>
132+ </rect>
133+ </property>
134+ <property name="text">
135+ <string>下部4任意講座ボタンURL</string>
53136 </property>
54137 </widget>
55138 </widget>
--- a/stylesheet-ubu.qss
+++ b/stylesheet-ubu.qss
@@ -1,6 +1,6 @@
11 QWidget {
22 font-family: "Times New Roman", serif;
3- font-size: 10pt;
3+ font-size: 12pt;
44 font-weight: bold;
55 font-style: normal;
66 background-color: gainsboro;
@@ -43,6 +43,11 @@ QPushButton {
4343 min-height: 3ex;
4444 }
4545
46+#text {
47+ color: black;
48+}
49+
50+
4651 /*
4752 QPushButton:hover {
4853 background-color: steelblue;