def home(self, widget): self.destroy() Gtk.main_quit() homeWindow = app.MainWindow() homeWindow.connect("delete-event", Gtk.main_quit) homeWindow.show_all() Gtk.main()
def home(self, widget): global stop global disk_stat stop = True disk_stat = [] self.destroy() Gtk.main_quit() homeWindow = app.MainWindow() homeWindow.connect("delete-event", Gtk.main_quit) homeWindow.show_all() Gtk.main()
def home(self, widget): global stop, all_procs, prev_cpu_values, prev_mem_values, prev_proc_values stop = True all_procs = [] prev_proc_values = [] prev_mem_values = [] prev_cpu_values = [] self.destroy() Gtk.main_quit() homeWindow = app.MainWindow() homeWindow.connect("delete-event", Gtk.main_quit) homeWindow.show_all() Gtk.main()
def home(self, widget): global stop global cpu_time, list_intr, list_ctxt stop = True cpu_time = [] list_intr = [] list_ctxt = [] self.destroy() Gtk.main_quit() homeWindow = app.MainWindow() homeWindow.connect("delete-event", Gtk.main_quit) homeWindow.show_all() Gtk.main()
def home(self, widget): global stop global tcp, udp, ip stop = True tcp = [] udp = [] ip = [] self.destroy() Gtk.main_quit() homeWindow = app.MainWindow() homeWindow.connect("delete-event", Gtk.main_quit) homeWindow.show_all() Gtk.main()
def main(): # start app root = Tk() app.MainWindow(root) root.geometry('800x400') root.mainloop()
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ import PyQt5 from PyQt5 import QtWidgets import sys import app if __name__ == '__main__': application = QtWidgets.QApplication(sys.argv) frame = app.MainWindow(ini=["channels.ini", "groundstation.ini"]) frame.show() sys.exit(application.exec_())
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. """ import PyQt5 from PyQt5 import QtWidgets import sys import app if __name__ == '__main__': application = QtWidgets.QApplication(sys.argv) frame = app.MainWindow(ini=["channels.ini", "gse.ini"]) frame.show() sys.exit(application.exec_())
rootSid = snapshots.RootSnapshot(cfg) global qapp qapp = qttools.createQApplication(cfg.APP_NAME) translator = qttools.translator() qapp.installTranslator(translator) ######################### ### Snapshot Log View ### ######################### cmd = ['../backintime/common/backintime', '--config', cfgFile, 'backup'] proc = subprocess.Popen(cmd) proc.communicate() mainWindow = app.MainWindow(cfg, appInstance, qapp) log = LogViewDialog(mainWindow, snapshots.lastSnapshot(cfg)) setScreenshotTimer(log, '_images/snapshot_log_view.png') ##################### ### Last Log View ### ##################### log = LogViewDialog(mainWindow) setScreenshotTimer(log, '_images/last_log_view.png') sn.remove(snapshots.lastSnapshot(cfg)) ############################# ### create fake snapshots ### #############################
import app x = app.MainWindow() #x.objectsPane.open('/home/arthur/forcebalance/studies/001_water_tutorial/1.netforce_torque.in') x.mainloop()
from PyQt5.QtWidgets import QApplication import app import sys if __name__ == '__main__': myApp = QApplication(sys.argv) win = app.MainWindow() win.show() sys.exit(myApp.exec_())