Пример #1
0
  def menuViewsSave_Click(self, event):

    # Find the specified view in the views list
    for view in Global.views:
      if view.menu == self.selectedViewMenu:
        view.showBitsNone = self.menuShowBitsNone.isChecked()
        view.showBitsActive = self.menuShowBitsActive.isChecked()
        view.showBitsPredicted = self.menuShowBitsPredicted.isChecked()
        view.showBitsFalselyPredicted = self.menuShowBitsFalselyPredicted.isChecked()
        view.showCellsNone = self.menuShowCellsNone.isChecked()
        view.showCellsLearning = self.menuShowCellsLearning.isChecked()
        view.showCellsActive = self.menuShowCellsActive.isChecked()
        view.showCellsPredicted = self.menuShowCellsPredicted.isChecked()
        view.showCellsFalselyPredicted = self.menuShowCellsFalselyPredicted.isChecked()
        view.showCellsInactive = self.menuShowCellsInactive.isChecked()
        view.showProximalSegmentsNone = self.menuShowProximalSegmentsNone.isChecked()
        view.showProximalSegmentsActive = self.menuShowProximalSegmentsActive.isChecked()
        view.showProximalSegmentsPredicted = self.menuShowProximalSegmentsPredicted.isChecked()
        view.showProximalSegmentsFalselyPredicted = self.menuShowProximalSegmentsFalselyPredicted.isChecked()
        view.showProximalSynapsesNone = self.menuShowProximalSynapsesNone.isChecked()
        view.showProximalSynapsesConnected = self.menuShowProximalSynapsesConnected.isChecked()
        view.showProximalSynapsesActive = self.menuShowProximalSynapsesActive.isChecked()
        view.showProximalSynapsesPredicted = self.menuShowProximalSynapsesPredicted.isChecked()
        view.showProximalSynapsesFalselyPredicted = self.menuShowProximalSynapsesFalselyPredicted.isChecked()
        view.showDistalSegmentsNone = self.menuShowDistalSegmentsNone.isChecked()
        view.showDistalSegmentsActive = self.menuShowDistalSegmentsActive.isChecked()
        view.showDistalSynapsesNone = self.menuShowDistalSynapsesNone.isChecked()
        view.showDistalSynapsesConnected = self.menuShowDistalSynapsesConnected.isChecked()
        view.showDistalSynapsesActive = self.menuShowDistalSynapsesActive.isChecked()

        Global.saveConfig()

        break
Пример #2
0
def main():
  Global.app = QtGui.QApplication(sys.argv)
  Global.app.setStyleSheet("QGroupBox { border: 1px solid gray; } QGroupBox::title { padding: 0 5px; }")

  Global.appPath = os.path.abspath(os.path.join(__file__, '..'))
  Global.loadConfig()

  Global.project = Project()
  Global.simulationForm = SimulationForm()
  Global.architectureForm = ArchitectureForm()
  Global.nodeInformationForm = NodeInformationForm()
  Global.outputForm = OutputForm()
  Global.mainForm = MainForm()

  # Create and display the splash screen
  start = time.time()
  splash_pix = QtGui.QPixmap(Global.appPath + '/images/splash.png')
  splash = QtGui.QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint)
  splash.setMask(splash_pix.mask())
  splash.show()
  while time.time() - start < 3:
    time.sleep(0.001)
    Global.app.processEvents()
  splash.close()

  # Show start form
  startForm = StartForm()
  startForm.show()

  deploymentBuild = os.getenv("NUPIC_STUDIO_DEPLOYMENT_BUILD", False)
  if deploymentBuild:
    sys.exit(0)
  else:
    sys.exit(Global.app.exec_())