def __init__(self, ver, parent=None):
        """Initializes the window size and title and instantiates the menu bar and status bar
        if selected by the user."""
        super().__init__()
        self.setAttribute(Qt.WA_DeleteOnClose)  # Prevents an error message about QtTimers.
        # settings: directory, mode etc
        self.setWindowTitle('{{ cookiecutter.application_title }}')
        self.gui_ver = ver

        self.widget = MainWidget(self)
        self.setCentralWidget(self.widget)

        self.worker = MainWorker(self)
        self.worker.init_worker()

        {% if cookiecutter.insert_menubar == 'yes' -%}
        self.menu_bar = self.menuBar()
        self.about_dialog = AboutDialog()

        self.file_menu()
        self.help_menu()
        {%- endif %}
        {% if cookiecutter.insert_statusbar == 'yes' -%}
        self.status_bar = self.statusBar()
        self.status_bar.showMessage('Ready', 5000)
        {%- endif %}
        {% if cookiecutter.insert_toolbar == 'yes' -%}
        self.tool_bar_items()
        {%- endif %}
Ejemplo n.º 2
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.main = Ui_MainWindow()
        self.flowconfig = flowconfig.FlowConfig(self)
        self.app = None
        self.streammod = StreamTable(self)

        # Dialogs
        self.aboutdialog = AboutDialog.AboutDialog(self)

        # Initialized after setupUi runs
        self.interfacesgui = None
        self.protocolsgui = None
        self.rulegui = None
        self.dbgui = None

        debugger_uri = "PYROLOC://127.0.0.1:7766/debugger"
        self.remote_debugger = Pyro.core.getProxyForURI(debugger_uri)

        self.main.dbname = self.remote_debugger.getdatabase()
        #self.proxy = xmlrpclib.ServerProxy("http://localhost:20757")
        #self.objectproxy = xmlrpclib.ServerProxy("http://localhost:20758")
        self.curdebugevent = ""

        self.log = logging.getLogger("mallorygui")
        config = Config()
        config.logsetup(self.log)
Ejemplo n.º 3
0
 def HelpAbout(self, event):
     About.RPIBoardNumber = self.AcquireDataThread.GetRPIBoardNumber()
     AboutDialog(self,
                 title="About " + self.title,
                 minwidth=400,
                 minheight=550,
                 okonly=True)
Ejemplo n.º 4
0
    def OnMenuHelpAboutMenu(self, event):
        """
        This function is run when About is clicked on the menu. It calls
        the About dialog window.
        """

        #--------------
        # Create Dialog
        #--------------

        # Creating the window doesn't do anything visible to the player, it only
        # readies the window (invisibly).

        dlg = AboutDialog.AboutDialog(self)

        #--------------------
        # Show Window To User
        #--------------------

        # Display the window to the user. Note that by using ShowModal the
        # program pauses here until the user clicks the Ok button in the About
        # window. Regardless of whether the window opens or not, once the
        # code moves on, the window will be destroyed.

        try:
            dlg.ShowModal()
        finally:
            dlg.Destroy()
 def OnHelpmenusItem_aboutMenu(self, event):
     #msgbox('Welcome to Boa Constructor 0.6.x\nThis template was created by Shula')
     dlg = AboutDialog.Dialog1(self)
     try:
         dlg.ShowModal()
     finally:
         dlg.Destroy()
Ejemplo n.º 6
0
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.setupUi(self)
        self.setWindowTitle(APP_NAME)

        self.array_values = array.array('h')

        self.list_x = [x for x in xrange(0, 60)]

        self.load_save_settings()

        self.label_usb = QLabel('USB Port:')
        self.celsius = unicode(u'°C')

        self.dialog_settings = Settings.Settings(self.apply_settings, self,
                                                 self.settings)
        self.dialog_about = AboutDialog.AboutDialog(self, APP_VERSION)

        self.timer_updater = QTimer(self)

        self.combobox_usb = QComboBox(self)
        self.toolBar.addWidget(self.label_usb)
        self.toolBar.addWidget(self.combobox_usb)

        self.update_devices_list()
        self.create_plot()

        self.button_start.clicked.connect(self.start_thread)
        self.actionReload.triggered.connect(self.update_devices_list)

        self.timer_updater.timeout.connect(self.update_plot)
        self.actionSettings.triggered.connect(self.show_settings)
        self.actionInfo.triggered.connect(self.show_about)
Ejemplo n.º 7
0
 def openAbout(self):
     self.about_win = AboutDialog.AboutDialogWin()
     self.about_win.show()
Ejemplo n.º 8
0
 def show_about_dialog(self):
     AboutDialog()
Ejemplo n.º 9
0
 def about(self):
     AboutDialog().exec_()
Ejemplo n.º 10
0
 def buttonShowAbout(self):
     about = AboutDialog.AboutDialog(self.root)
     about.run()
class MainWindow(QtGui.QMainWindow):
    """Creates the main window that stores all of the widgets necessary for the application."""

    def __init__(self, ver, parent=None):
        """Initializes the window size and title and instantiates the menu bar and status bar
        if selected by the user."""
        super().__init__()
        self.setAttribute(Qt.WA_DeleteOnClose)  # Prevents an error message about QtTimers.
        # settings: directory, mode etc
        self.setWindowTitle('{{ cookiecutter.application_title }}')
        self.gui_ver = ver

        self.widget = MainWidget(self)
        self.setCentralWidget(self.widget)

        self.worker = MainWorker(self)
        self.worker.init_worker()

        {% if cookiecutter.insert_menubar == 'yes' -%}
        self.menu_bar = self.menuBar()
        self.about_dialog = AboutDialog()

        self.file_menu()
        self.help_menu()
        {%- endif %}
        {% if cookiecutter.insert_statusbar == 'yes' -%}
        self.status_bar = self.statusBar()
        self.status_bar.showMessage('Ready', 5000)
        {%- endif %}
        {% if cookiecutter.insert_toolbar == 'yes' -%}
        self.tool_bar_items()
        {%- endif %}

    {% if cookiecutter.insert_toolbar == 'yes' -%}
    def tool_bar_items(self):
        self.tool_bar = QtGui.QToolBar()
        self.addToolBar(Qt.TopToolBarArea, self.tool_bar)
        self.tool_bar.setMovable(False)

        open_icon = pkg_resources.resource_filename('{{ cookiecutter.package_name }}.images',
                                                    'ic_open_in_new_black_48dp_1x.png')
        tool_bar_open_action = QtGui.QAction(QIcon(open_icon), 'Open File', self)
        tool_bar_open_action.triggered.connect(self.open_file)

        self.tool_bar.addAction(tool_bar_open_action)
    {%- endif %}

    {% if cookiecutter.insert_menubar == 'yes' -%}
    def file_menu(self):
        """Create a file submenu with an Open File item that opens a file dialog."""
        self.file_sub_menu = self.menu_bar.addMenu('File')

        self.open_action = QtGui.QAction('Open File', self)
        self.open_action.setStatusTip('Open a file into {{ cookiecutter.application_title }}.')
        self.open_action.setShortcut('CTRL+O')
        self.open_action.triggered.connect(self.open_file)

        self.exit_action = QtGui.QAction('Exit Application', self)
        self.exit_action.setStatusTip('Exit the application.')
        self.exit_action.setShortcut('CTRL+Q')
        self.exit_action.triggered.connect(lambda: QtGui.QApplication.quit())

        self.file_sub_menu.addAction(self.open_action)
        self.file_sub_menu.addAction(self.exit_action)

    def help_menu(self):
        """Create a help submenu with an About item tha opens an about dialog."""
        self.help_sub_menu = self.menu_bar.addMenu('Help')

        self.about_action = QtGui.QAction('About', self)
        self.about_action.setStatusTip('About the application.')
        self.about_action.setShortcut('CTRL+H')
        self.about_action.triggered.connect(lambda: self.about_dialog.exec_())

        self.help_sub_menu.addAction(self.about_action)

    def open_file(self):
        """Open a QFileDialog to allow the user to open a file into the application."""

        file_select_out = QtGui.QFileDialog.getOpenFileName(self, 'Open File')

        # if file dialog used to select a file
        if file_select_out:
            filename, accepted = file_select_out

            if accepted:
                with open(filename) as file:
                    file.read()
    {%- endif %}
Ejemplo n.º 12
0
 def menuAboutAction(self):
     aboutDialog = AboutDialog()
     aboutDialog.exec_()
Ejemplo n.º 13
0
	def __on_about_menu_clicked(self, button):
		about_dialog = AboutDialog(self)
		about_dialog.run()
		about_dialog.destroy()
Ejemplo n.º 14
0
	def HelpAbout ( self, event ):
		AboutDialog(self,title="About PiCamera",camera=self.camera)
Ejemplo n.º 15
0
def about():
    """
        Displays Application About Dialog
    """
    dlg = AboutDialog.AboutDialog()
    dlg.exec_()
 def about(self):
     dlg = AboutDialog.AboutDialog()
     dlg.exec_()
Ejemplo n.º 17
0
 def _showAboutDialog (self):
   if not self._about_dialog:
     self._about_dialog = AboutDialog.AboutDialog(self);
   self._about_dialog.show();