OSDN Git Service

Added Reflector menu
authorENDO Michiaki <dinosaur@db3.so-net.ne.jp>
Thu, 5 Mar 2015 05:15:26 +0000 (14:15 +0900)
committerENDO Michiaki <dinosaur@db3.so-net.ne.jp>
Thu, 5 Mar 2015 05:15:26 +0000 (14:15 +0900)
KODS_GUI.pro.user
mainwindow.cpp
mainwindow.h

index 0a8470b..5c92922 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 3.0.1, 2014-11-19T11:03:26. -->
+<!-- Written by QtCreator 3.1.2, 2015-03-05T14:11:35. -->
 <qtcreator>
  <data>
   <variable>ProjectExplorer.Project.ActiveTarget</variable>
    <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
    <value type="int" key="EditorConfiguration.IndentSize">4</value>
    <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
+   <value type="int" key="EditorConfiguration.MarginColumn">80</value>
+   <value type="bool" key="EditorConfiguration.MouseHiding">true</value>
    <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
    <value type="int" key="EditorConfiguration.PaddingMode">1</value>
    <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
+   <value type="bool" key="EditorConfiguration.ShowMargin">false</value>
    <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
    <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
    <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
@@ -84,7 +87,7 @@
       <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
      </valuemap>
      <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">ビルド</value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
     </valuemap>
       <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
      </valuemap>
      <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">クリーン</value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
     </valuemap>
       <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
      </valuemap>
      <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">ビルド</value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
     </valuemap>
       <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
      </valuemap>
      <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">クリーン</value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
     </valuemap>
    <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
     <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
      <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
-     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
+     <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">デプロイ</value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
      <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
     </valuemap>
index dc5e6e6..e0ecccc 100644 (file)
@@ -113,6 +113,10 @@ void MainWindow::addcontextmenu()
     MaterialMenu->addAction(Airaction);
     connect(Airaction, SIGNAL(triggered()), this, SLOT(InputAir()));
 
+    Reflaction=new QAction("Reflector",this);
+    MaterialMenu->addAction(Reflaction);
+    connect(Reflaction, SIGNAL(triggered()), this, SLOT(InputReflector()));
+
     SubMenu1=MaterialMenu->addMenu("CHANCE");
     SubMenu2=MaterialMenu->addMenu("CORNIN");
     SubMenu3=MaterialMenu->addMenu("HIKARI");
@@ -483,6 +487,23 @@ void MainWindow::InputAir()
     proc->write("RTG ALL\n");
 }
 
+void MainWindow::InputReflector()
+{
+    row = table->currentRow();          //get number of row
+    QString Qrow = QString::number(row);
+
+    table->setItem(row, 2, new QTableWidgetItem("REFL"));
+    tableitem=table->item(row,2);
+    tableitem->setFlags(Qt::ItemIsEnabled);
+    table->setItem(row, 3, new QTableWidgetItem(""));
+    table->setItem(row, 4, new QTableWidgetItem(""));
+    proc->write("U L\n");
+    proc->write("CHG "+QString(Qrow).toLatin1()+"\n");
+    proc->write("REFL\n");
+    proc->write("EOS\n");
+    proc->write("RTG ALL\n");
+}
+
 
 void MainWindow::slot_ShowContextMenu(const QPoint& Pos){
 
@@ -506,6 +527,7 @@ void MainWindow::slot_ShowContextMenu(const QPoint& Pos){
     ContextMenu.addSeparator();
     ContextMenu.addAction("Model");
     ContextMenu.addAction("AIR");
+    ContextMenu.addAction("REFLECTOR");
 
     ContextMenu.addMenu(&SubMenu1);
     for (int i=0;i<=NoGlass1;i++){
@@ -586,6 +608,11 @@ void MainWindow::slot_ShowContextMenu(const QPoint& Pos){
         InputAir();
     }
 
+    if (selectedItem->text()==QString("REFLECTOR")){
+        InputReflector();
+    }
+
+
     if (selectedItem->parent()==&SubMenu1){
         LF=18;
         DataRead("CHANCE.BIN",selectedItem->text(),row);
index d018cf4..8a4a1e3 100644 (file)
@@ -33,6 +33,7 @@ public:
 
     QAction *Modelaction;
     QAction *Airaction;
+    QAction *Reflaction;
     QAction *Makeraction;
     QString String;
     QAction* selectedItem;
@@ -119,6 +120,7 @@ private slots:
 
 
     void InputAir();
+    void InputReflector();
 
 };