OSDN Git Service

[UI][Qt] Add IBM JX.
authorK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 28 Sep 2015 06:58:16 +0000 (15:58 +0900)
committerK.Ohta <whatisthis.sowhat@gmail.com>
Mon, 28 Sep 2015 06:58:16 +0000 (15:58 +0900)
source/build-cmake/jx/CMakeLists.txt [new file with mode: 0644]
source/src/qt/common/qrc/jx.qrc [new file with mode: 0644]
source/src/qt/jx/CMakeLists.txt [new file with mode: 0644]
source/src/qt/jx/MainWindow.cpp [new file with mode: 0644]
source/src/qt/jx/menuclasses.h [new file with mode: 0644]
source/src/vm/jx/CMakeLists.txt [new file with mode: 0644]

diff --git a/source/build-cmake/jx/CMakeLists.txt b/source/build-cmake/jx/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2524aab
--- /dev/null
@@ -0,0 +1,78 @@
+# Build Common Sourcecode Project, Qt.
+# (C) 2014 K.Ohta <whatisthis.sowhat@gmail.com>
+# This is part of XM7/SDL, but license is apache 2.2,
+# this part was written only me.
+
+cmake_minimum_required (VERSION 2.8)
+cmake_policy(SET CMP0011 NEW)
+
+message("")
+message("** Start of configure CommonSourceProject,EPSON HC 80, Qt **")
+message("")
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake")
+
+
+project (emujx)
+
+set(EXEC_TARGET emujx)
+
+set(LOCAL_LIBS            vm_jx
+                  vm_vm
+                  common_common
+                  qt_jx
+                  qt_gui
+                   )
+
+set(VMFILES_BASE
+
+  i86.cpp
+  
+  hd46505.cpp
+  i8251.cpp
+  i8253.cpp
+  i8255.cpp
+  i8259.cpp
+  io.cpp
+  memory.cpp
+  
+  pcm1bit.cpp
+  sn76489an.cpp
+  not.cpp
+  upd765a.cpp
+  disk.cpp
+  
+  event.cpp
+)
+
+
+set(USE_OPENMP ON CACHE BOOL "Build using OpenMP")
+set(USE_OPENGL ON CACHE BOOL "Build using OpenGL")
+set(WITH_DEBUGGER ON CACHE BOOL "Build with debugger.")
+
+include(detect_target_cpu)
+#include(windows-mingw-cross)
+# set entry
+set(CMAKE_SYSTEM_PROCESSOR ${ARCHITECTURE} CACHE STRING "Set processor to build.")
+
+set(VMFILES ${VMFILES_BASE})
+add_definitions(-D_JX)
+set(RESOURCE ${CMAKE_SOURCE_DIR}/../../src/qt/common/qrc/jx.qrc)
+
+#include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/vm/jx)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/jx)
+
+include(config_commonsource)
+
+
+
+if(USE_SSE2)
+# include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../src/qt/common/scaler/sse2)
+endif()
+
+add_subdirectory(../../src/vm/jx vm/jx)
+add_subdirectory(../../src/qt/jx qt/jx)
+     
+add_subdirectory(../../src/qt/common qt/common)
diff --git a/source/src/qt/common/qrc/jx.qrc b/source/src/qt/common/qrc/jx.qrc
new file mode 100644 (file)
index 0000000..debac6a
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+    <file alias="default.ico">../../../res/jx.ico</file>
+</qresource>
+</RCC>
\ No newline at end of file
diff --git a/source/src/qt/jx/CMakeLists.txt b/source/src/qt/jx/CMakeLists.txt
new file mode 100644 (file)
index 0000000..4538c7e
--- /dev/null
@@ -0,0 +1,18 @@
+message("* qt/jx")
+
+set(s_qt_jx_headers
+         menuclasses.h
+)
+
+if(USE_QT_5)
+  QT5_WRAP_CPP(s_qt_jx_headers_MOC ${s_qt_jx_headers})
+else()
+  QT4_WRAP_CPP(s_qt_jx_headers_MOC ${s_qt_jx_headers})
+endif()
+
+add_library(qt_jx
+         MainWindow.cpp
+         ${s_qt_jx_headers_MOC}
+)
+
+
diff --git a/source/src/qt/jx/MainWindow.cpp b/source/src/qt/jx/MainWindow.cpp
new file mode 100644 (file)
index 0000000..4f23f3d
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Common Source code Project:
+ * Ui->Qt->MainWindow for JR100 .
+ * (C) 2015 K.Ohta <whatisthis.sowhat _at_ gmail.com>
+ *   License : GPLv2
+ *   History :
+ * Jan 14, 2015 : Initial, many of constructors were moved to qt/gui/menu_main.cpp.
+ */
+
+#include <QVariant>
+#include <QtGui>
+#include "emu.h"
+#include "commonclasses.h"
+#include "menuclasses.h"
+#include "qt_main.h"
+
+
+void META_MainWindow::setupUI_Emu(void)
+{
+   
+}
+
+void META_MainWindow::retranslateUi(void)
+{
+       int i;
+       retranslateControlMenu("",  false);
+       retranslateFloppyMenu(0, 1);
+       retranslateFloppyMenu(1, 2);
+       retranslateSoundMenu();
+       retranslateScreenMenu();
+   
+       this->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0));
+  
+       actionAbout->setText(QApplication::translate("MainWindow", "About...", 0));
+
+       menuEmulator->setTitle(QApplication::translate("MainWindow", "Emulator", 0));
+       menuMachine->setTitle(QApplication::translate("MainWindow", "Machine", 0));
+  
+       menuHELP->setTitle(QApplication::translate("MainWindow", "HELP", 0));
+       actionHelp_AboutQt->setText(QApplication::translate("MainWindow", "About Qt", 0));
+       // Set Labels
+} // retranslateUi
+
+
+
+META_MainWindow::META_MainWindow(QWidget *parent) : Ui_MainWindow(parent)
+{
+   setupUI_Emu();
+   retranslateUi();
+}
+
+
+META_MainWindow::~META_MainWindow()
+{
+}
+
+//QT_END_NAMESPACE
+
+
+
diff --git a/source/src/qt/jx/menuclasses.h b/source/src/qt/jx/menuclasses.h
new file mode 100644 (file)
index 0000000..abe8b56
--- /dev/null
@@ -0,0 +1,30 @@
+
+
+
+#ifndef _CSP_QT_MENUCLASSES_H
+#define _CSP_QT_MENUCLASSES_H
+
+#include "emu.h"
+#include "mainwidget.h"
+// This extends class CSP_MainWindow as Ui_MainWindow.
+// You may use this as 
+QT_BEGIN_NAMESPACE
+
+class Ui_MainWindow;
+
+class META_MainWindow : public Ui_MainWindow {
+       Q_OBJECT
+ protected:
+       void setupUI_Emu(void);
+       void retranslateUi(void);
+  
+ public:
+       META_MainWindow(QWidget *parent = 0);
+       ~META_MainWindow();
+public slots:
+
+};
+
+QT_END_NAMESPACE
+
+#endif // END
diff --git a/source/src/vm/jx/CMakeLists.txt b/source/src/vm/jx/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d555478
--- /dev/null
@@ -0,0 +1,13 @@
+cmake_minimum_required (VERSION 2.6)
+
+message("* vm/jx")
+
+set(BASIC_VM_FILES 
+           jx.cpp
+          display.cpp
+          floppy.cpp
+          keyboard.cpp
+          speaker.cpp
+          )
+
+add_library(vm_jx  ${BASIC_VM_FILES})