OSDN Git Service

[UI][Qt] Add support ROMAJI-KANA conversion.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Sun, 23 Oct 2016 17:11:29 +0000 (02:11 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Sun, 23 Oct 2016 17:11:29 +0000 (02:11 +0900)
source/src/qt/CMakeLists.txt
source/src/qt/avio/CMakeLists.txt
source/src/qt/common/menu_flags.cpp
source/src/qt/common/menu_flags.h
source/src/qt/gui/CMakeLists.txt
source/src/qt/gui/mainwidget_base.h
source/src/qt/gui/menu_main.cpp

index 86a2fb4..d3cde61 100644 (file)
@@ -61,8 +61,8 @@ target_link_libraries(CSPosd PUBLIC
          )
   
   set_target_properties(CSPosd PROPERTIES 
-     SOVERSION 2.5.0
-     VERSION 2.5.0
+     SOVERSION 2.5.1
+     VERSION 2.5.1
   )
   INSTALL(TARGETS CSPosd DESTINATION ${LIBCSP_INSTALL_DIR})
 endif()
index 3644c40..aeb8991 100644 (file)
@@ -63,8 +63,8 @@ target_link_libraries(CSPavio PUBLIC
          )
 
 set_target_properties(CSPavio PROPERTIES 
-                            SOVERSION 2.5.0
-                            VERSION 2.5.0
+                            SOVERSION 2.5.1
+                            VERSION 2.5.1
                             )
 INSTALL(TARGETS CSPavio DESTINATION ${LIBCSP_INSTALL_DIR})
 endif()
index 6b37936..092911d 100644 (file)
@@ -28,6 +28,7 @@ USING_FLAGS::USING_FLAGS(config_t *cfg)
        use_auto_key = use_auto_key_us = use_auto_key_caps = false;
        use_auto_key_no_caps = use_auto_key_release =
        use_auto_key_shift = use_binary_file = false;
+       use_roma_kana_conversion = false;
        
        max_binary = 0;
        use_bitmap = false;
@@ -214,7 +215,10 @@ USING_FLAGS::USING_FLAGS(config_t *cfg)
        #if defined(USE_AUTO_KEY_SHIFT)
                use_auto_key_shift = true;
        #endif
-#endif 
+#endif
+#if defined(SUPPORT_ROMA_KANA_CONVERSION)
+       use_roma_kana_conversion = true;
+#endif
 #if defined(USE_BINARY_FILE1) || defined(USE_BINARY_FILE2) || defined(USE_BINARY_FILE3) || defined(USE_BINARY_FILE4) || \
        defined(USE_BINARY_FILE5) || defined(USE_BINARY_FILE6) || defined(USE_BINARY_FILE7) || defined(USE_BINARY_FILE8)
        use_binary_file = true;
index 9add49f..45e67e6 100644 (file)
@@ -28,6 +28,7 @@ private:
        // USE_* flags
        bool use_access_lamp;
        bool use_alt_f10_key;
+       bool use_roma_kana_conversion;
        
        bool use_auto_key;
        bool use_auto_key_us;
@@ -167,6 +168,7 @@ public:
        bool is_use_auto_key_no_caps() { return use_auto_key_no_caps; }
        bool is_use_auto_key_release() { return use_auto_key_release; }
        bool is_use_auto_key_shift() { return use_auto_key_shift; }
+       bool is_use_roma_kana_conversion() { return use_roma_kana_conversion; }
 
        bool is_use_binary_file() { return use_binary_file; }
        int get_max_binary() { return max_binary; }
index 4d52391..d802186 100644 (file)
@@ -154,8 +154,8 @@ target_link_libraries(CSPgui PUBLIC
          )
 
 set_target_properties(CSPgui PROPERTIES 
-                            SOVERSION 2.3.2
-                            VERSION 2.3.2
+                            SOVERSION 2.3.3
+                            VERSION 2.3.3
                             )
 INSTALL(TARGETS CSPgui DESTINATION ${LIBCSP_INSTALL_DIR})
 endif()
index fab8fa9..f1cf5f9 100644 (file)
@@ -309,7 +309,8 @@ class DLL_PREFIX Ui_MainWindowBase : public QMainWindow
        QMenu *menuLogToSyslog;
        QMenu *menuDevLogToConsole;
        QMenu *menuDevLogToSyslog;
-       
+
+       class Action_Control *action_UseRomaKana;
        class Action_Control *action_LogToSyslog;
        class Action_Control *action_LogToConsole;
        class Action_Control *action_LogRecord;
@@ -607,6 +608,7 @@ public slots:
        void do_set_syslog(bool);
        void do_update_device_node_name(int id, const _TCHAR *name);    
        void do_set_dev_log_to_console(int id, bool f);
+       void do_set_roma_kana(bool f);
 signals:
        int message_changed(QString);
        int quit_emu_thread();
index 5bdf172..c62a69a 100644 (file)
@@ -55,7 +55,6 @@ Ui_MainWindowBase::~Ui_MainWindowBase()
        graphicsView->releaseKeyboard();
 }
 
-
 void Action_Control::do_check_grab_mouse(bool flag)
 {
        this->toggle();
@@ -77,6 +76,11 @@ void Action_Control::do_set_dev_log_to_console(bool f)
        emit sig_set_dev_log_to_console(num, f);
 }
 
+void Ui_MainWindowBase::do_set_roma_kana(bool flag)
+{
+       using_flags->get_config_ptr()->roma_kana_conversion = flag;
+}
+
 void Ui_MainWindowBase::do_show_about(void)
 {
        Dlg_AboutCSP *dlg = new Dlg_AboutCSP(using_flags);
@@ -586,7 +590,9 @@ void Ui_MainWindowBase::retranslateEmulatorMenu(void)
                action_SetupJoystick->setText(QApplication::translate("MainWindow", "Configure Joysticks", 0));
                action_SetupJoystick->setIcon(QIcon(":/icon_gamepad.png"));
        }
-       
+       if(using_flags->is_use_roma_kana_conversion()) {
+               action_UseRomaKana->setText(QApplication::translate("MainWindow", "ROMA-KANA Conversion", 0));
+       }
        menuEmulator->setTitle(QApplication::translate("MainWindow", "Emulator", 0));
        action_SetupKeyboard->setText(QApplication::translate("MainWindow", "Configure Keyboard", 0));
        action_SetupKeyboard->setIcon(QIcon(":/icon_keyboard.png"));
@@ -625,6 +631,10 @@ void Ui_MainWindowBase::retranselateUi_Depended_OSD(void)
 void Ui_MainWindowBase::CreateEmulatorMenu(void)
 {
        //menuEmulator->addAction(action_LogRecord);
+       if(using_flags->is_use_roma_kana_conversion()) {
+               menuEmulator->addAction(action_UseRomaKana);
+               menuEmulator->addSeparator();
+       }
        menuEmulator->addAction(action_LogToConsole);
        menuEmulator->addAction(menuDevLogToConsole->menuAction());
        menuEmulator->addSeparator();
@@ -649,6 +659,12 @@ void Ui_MainWindowBase::ConfigEmulatorMenu(void)
 {
        int i;
        QString tmps;
+       if(using_flags->is_use_roma_kana_conversion()) {
+               action_UseRomaKana = new Action_Control(this, using_flags);
+               action_UseRomaKana->setCheckable(true);
+               if(using_flags->get_config_ptr()->roma_kana_conversion) action_UseRomaKana->setChecked(true);
+               connect(action_UseRomaKana, SIGNAL(toggled(bool)), this, SLOT(do_set_roma_kana(bool)));
+       }
        if(using_flags->is_use_joystick()) {
                action_SetupJoystick = new Action_Control(this, using_flags);
        }