Esempio n. 1
0
	def __init__(self,path):
		QWidget.__init__(self)
		self.setWindowTitle(_("Results viewer")) 
		
		self.main_vbox = QVBoxLayout()

		self.slider=snapshot_slider()
		self.slider.set_path(path)
		self.main_vbox.addWidget(self.slider)

		self.setLayout(self.main_vbox)
Esempio n. 2
0
    def __init__(self):
        QWidgetSavePos.__init__(self, "cmpclass")
        self.setWindowTitle(_("Examine simulation results in time domain"))

        self.snapshots_hbox = QHBoxLayout()
        self.snapshots_label = QLabel("Snapshots")
        self.snapshots_hbox.addWidget(self.snapshots_label)
        self.snapshots_combobox = QComboBox()
        self.snapshots_hbox.addWidget(self.snapshots_combobox)
        self.snapshots_widget = QWidget()
        self.snapshot_dirs = self.find_snapshots()
        for i in range(0, len(self.snapshot_dirs)):
            self.snapshots_combobox.addItem(self.snapshot_dirs[i])

        self.snapshots_combobox.currentIndexChanged.connect(
            self.callback_snapshots_combobox)

        self.snapshots_widget.setLayout(self.snapshots_hbox)

        self.main_vbox = QVBoxLayout()

        self.slider = snapshot_slider()
        print(self.snapshot_dirs)
        if len(self.snapshot_dirs) != 0:
            self.slider.set_path(
                os.path.join(get_sim_path(), self.snapshot_dirs[0]))
        self.slider.changed.connect(self.update)
        self.plot = plot_widget()
        self.plot.init()

        self.tb_video = QAction(icon_get("video"), _("Save video"), self)
        self.tb_video.triggered.connect(self.callback_save)
        self.plot.plot_ribbon.file_toolbar.addAction(self.tb_video)
        self.plot.plot_ribbon.plot_toolbar.addAction(self.slider.tb_play)

        self.main_vbox.addWidget(self.plot)

        self.main_vbox.addWidget(self.snapshots_widget)

        self.main_vbox.addWidget(self.slider)

        self.setLayout(self.main_vbox)

        if os.path.isfile(
                os.path.join(get_sim_path(), "snapshots", "0",
                             "Ec.dat")) == False:
            help_window().help_append([
                "warning.png",
                _("No electrical slice data has been stored in the snapshots directory.  To turn this on set Simulation->Configure->Dump->Dump 1D Slices to on.  This will dump a lot of data and slow down your simulations."
                  )
            ])

        #self.light.currentIndexChanged.connect(self.call_back_light_changed)
        self.update()
Esempio n. 3
0
    def __init__(self, path):
        QWidget.__init__(self)
        self.setWindowTitle(_("Results viewer"))

        self.main_vbox = QVBoxLayout()

        self.slider = snapshot_slider()
        self.slider.set_path(path)
        self.main_vbox.addWidget(self.slider)

        self.setLayout(self.main_vbox)
        self.slider.changed.connect(self.changed)
Esempio n. 4
0
	def __init__(self):
		QWidget.__init__(self)
		self.setWindowTitle(_("Examine simulation results in time domain")) 

		self.snapshots_hbox = QHBoxLayout()
		self.snapshots_label= QLabel("Snapshots")
		self.snapshots_hbox.addWidget(self.snapshots_label)
		self.snapshots_combobox=QComboBox()
		self.snapshots_hbox.addWidget(self.snapshots_combobox)
		self.snapshots_widget=QWidget()
		self.snapshot_dirs=self.find_snapshots()
		for i in range(0,len(self.snapshot_dirs)):
			self.snapshots_combobox.addItem(self.snapshot_dirs[i])

		self.snapshots_combobox.currentIndexChanged.connect(self.callback_snapshots_combobox)

		self.snapshots_widget.setLayout(self.snapshots_hbox)
		
		self.main_vbox = QVBoxLayout()

		self.slider=snapshot_slider()
		self.slider.set_path(os.path.join(os.getcwd(),"snapshots"))
		self.slider.changed.connect(self.update)
		self.plot=plot_widget()
		self.plot.init()
		#Toolbar
		toolbar=QToolBar()
		toolbar.setIconSize(QSize(42, 42))

		self.tb_video = QAction(QIcon(os.path.join(get_image_file_path(),"video.png")), _("Save video"), self)
		self.tb_video.triggered.connect(self.callback_save)
		toolbar.addAction(self.tb_video)

		#self.tb_scale = QAction(QIcon(os.path.join(get_image_file_path(),"scale.png")), _("Scale"), self)
		#self.tb_scale.triggered.connect(self.callback_scale)
		#toolbar.addAction(self.tb_rotate)


		spacer = QWidget()
		spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
		toolbar.addWidget(spacer)


		self.help = QAction(QIcon(os.path.join(get_image_file_path(),"help.png")), 'Hide', self)
		self.help.setStatusTip(_("Close"))
		self.help.triggered.connect(self.callback_help)
		toolbar.addAction(self.help)
##############################################
		self.main_vbox.addWidget(toolbar)

		self.main_vbox.addWidget(self.plot)

		self.main_vbox.addWidget(self.snapshots_widget)
		
		self.main_vbox.addWidget(self.slider)

		self.setLayout(self.main_vbox)

		self.win_list=windows()
		self.win_list.load()
		self.win_list.set_window(self,"cmp_class")

		if os.path.isfile(os.path.join(os.getcwd(),"snapshots","0","Ec.dat"))==False:
			help_window().help_append(["warning.png",_("No electrical slice data has been stored in the snapshots directory.  To turn this on set Simulation->Configure->Dump->Dump 1D Slices to on.  This will dump a lot of data and slow down your simulations.")])