Exemplo n.º 1
0
    def __init__(self, updates, streetdb):
        QDialog.__init__(self)
        self.setupUi(self)
        table = self.tableWidget
        table.setRowCount(len(updates)+1)
        table.setColumnCount(len(common.ATT))
        self.setWindowTitle("Overview")

        for i in range(len(common.ATT)):
            item = QTableWidgetItem(common.ATT_HR[common.ATT[i]])
            table.setItem(0, i, item)
        for i, street in enumerate(updates):
            changes = updates[street]
            row = []
            for z in range(len(common.ATT)):
                found = False
                att = common.ATT[z]
                print(att)
                for change in changes:
                    split = change.split(":")
                    if split[0] == att:
                        row.append(split[1])
                        found = True
                if not found:
                    try:
                        row.append(streetdb[street][att])
                    except KeyError:
                        """print("Error building diagram in Street:", street, " Attribute: ", att) ## Missing field"""
            for x, update in enumerate(row):
                item = QTableWidgetItem(update)
                if "->" in update:
                    item.setForeground(Qt.red)
                print(i+1, x, update)
                table.setItem(i+1, x, item)
        self.load_settings()
Exemplo n.º 2
0
 def __init__(self, *args, **kwargs):
     QDialog.__init__(self, *args, **kwargs)
     self.app = QApplication.instance()
     self.closed = False
     self.startup_path = os.path.expanduser('~/.config/autostart/')
     if not os.path.exists(self.startup_path):
         os.makedirs(self.startup_path)
     self.startup_file = os.path.join(self.startup_path, 'everpad.desktop')
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.webView.hide()
     self.setWindowIcon(get_icon())
     for delay in (5, 10, 15, 30):
         self.ui.syncDelayBox.addItem(
             self.tr('%d minutes') % delay,
             userData=str(delay * 60 * 1000),
         )
     self.ui.syncDelayBox.addItem(self.tr('One hour'), userData='3600000')
     self.ui.syncDelayBox.addItem(self.tr('Manual'), userData='-1')
     active_index = self.ui.syncDelayBox.findData(
         str(self.app.provider.get_sync_delay(), ))
     self.ui.syncDelayBox.setCurrentIndex(active_index)
     self.ui.syncDelayBox.currentIndexChanged.connect(self.delay_changed)
     self.ui.tabWidget.currentChanged.connect(self.update_tabs)
     self.ui.authBtn.clicked.connect(self.change_auth)
     self.ui.autoStart.stateChanged.connect(self.auto_start_state)
     self.ui.noteFont.currentFontChanged.connect(self.font_changed)
     self.ui.noteSize.valueChanged.connect(self.font_size_changed)
     self.ui.blackTray.stateChanged.connect(self.tray_changed)
     self.ui.progressCheckBox.stateChanged.connect(self.progress_changed)
     self.ui.searchOnHome.stateChanged.connect(self.search_on_home_changed)
     self.ui.buttonBox.clicked.connect(self.close_clicked)
     self.update_tabs()
Exemplo n.º 3
0
    def __init__(self, low=True, parent=None):
        QDialog.__init__(self, parent)
        self.setupUi(self)

        def bind_slider(check, action):
            def inner(x):
                if check(x):
                    action(x)

            return inner

        bind1 = bind_slider(lambda x: self.slider_from.value() > x,
                            lambda x: self.slider_from.setValue(max(0, x - 1)))

        bind2 = bind_slider(lambda x: self.slider_to.value() < x,
                            lambda x: self.slider_to.setValue(min(100, x + 1)))

        self.slider_to.valueChanged.connect(bind1)
        self.slider_from.valueChanged.connect(bind2)

        self.slider_to.valueChanged.connect(self.update_mask)
        self.slider_from.valueChanged.connect(self.update_mask)
        self.check_inverse.stateChanged.connect(self.update_mask)

        self.buttonBox.rejected.connect(self._clear)
        self.buttonBox.accepted.connect(self._apply_mask)
Exemplo n.º 4
0
 def __init__(self, low=True, parent=None):
     QDialog.__init__(self, parent)
     self.setupUi(self)
     self.low = low
     self.horizontalSlider.valueChanged.connect(self.update_mask)
     self.buttonBox.rejected.connect(self._clear)
     self.buttonBox.accepted.connect(self._apply_mask)
    def __init__(self, data, doneExecution, parent=None):
        '''
        Constructor
        '''
        QDialog.__init__(self, parent)
        self._ui = Ui_Dialog()
        self._ui.setupUi(self)

        self._scene = self._ui.MayaviScene.visualisation.scene
        self._scene.background = self.backgroundColour

        self.data = data
        self.data.regCallback = self._regCallback
        self.doneExecution = doneExecution
        self._lockManualRegUpdate = False

        self.selectedObjectName = None

        self._worker = _ExecThread(self.data.register)
        self._worker.update.connect(self._regUpdate)
        self._worker.callback.connect(self._regCallback)

        # print 'init...', self._config

        ### FIX FROM HERE ###
        # create self._objects
        self._initViewerObjects()
        self._setupGui()
        self._makeConnections()
        self._initialiseObjectTable()
        self._updateConfigs()
        self._refresh()
Exemplo n.º 6
0
    def __init__(self, fig):
        QDialog.__init__(self)
        self.fig = fig
        main_layout = QVBoxLayout()
        self.setLayout(main_layout)
        top_widget = QWidget()
        bottom_widget = QWidget()
        main_layout.addWidget(top_widget)
        main_layout.addWidget(bottom_widget)
        top_layout = QHBoxLayout()
        bottom_layout = QHBoxLayout()
        top_widget.setLayout(top_layout)
        bottom_widget.setLayout(bottom_layout)

        self.atext = qHotField("annotation", unicode, "the_text")
        top_layout.addWidget(self.atext)
        self.segment_number = qHotField("Segment", int, 1)
        top_layout.addWidget(self.segment_number)
        qmy_button(top_layout, self.annotate_it, "annotate")
        self.over = qHotField("over", int, -70)
        bottom_layout.addWidget(self.over)
        self.up = qHotField('up', int, 30)
        bottom_layout.addWidget(self.up)
        qmy_button(bottom_layout, self.remove_annotations, "remove all")
        qmy_button(bottom_layout, self.remove_last_annotation, "remove last")
        self.annotations = []
Exemplo n.º 7
0
    def __init__(self, *args, **kwargs):

        QDialog.__init__(self, *args, **kwargs)
        self.installEventFilter(self)
        self.setWindowTitle(Window.title)

        mainLayout = QVBoxLayout(self)

        wLabelDescription = QLabel("Select Object or Group")

        validator = QIntValidator()

        hLayout = QHBoxLayout()
        wLabel = QLabel("Num Controller : ")
        wLineEdit = QLineEdit()
        wLineEdit.setValidator(validator)
        wLineEdit.setText('5')
        hLayout.addWidget(wLabel)
        hLayout.addWidget(wLineEdit)

        button = QPushButton("Create")

        mainLayout.addWidget(wLabelDescription)
        mainLayout.addLayout(hLayout)
        mainLayout.addWidget(button)

        self.resize(Window.defaultWidth, Window.defaultHeight)

        self.wlineEdit = wLineEdit

        QtCore.QObject.connect(button, QtCore.SIGNAL("clicked()"),
                               self.cmd_create)
    def __init__(self, step, parent=None):
        '''
        Constructor
        '''
        QDialog.__init__(self, parent)
        self._ui = Ui_Dialog()
        self._ui.setupUi(self)

        self._scene = self._ui.MayaviScene.visualisation.scene
        self._scene.background = self.backgroundColour

        self.selectedObjectName = None
        self._step = step

        self._worker = _ExecThread(self._step._segment)
        self._worker.update.connect(self._segUpdate)

        self._initViewerObjects()
        self._setupGui()
        self._initialiseSettings()
        self._makeConnections()
        self._initialiseObjectTable()
        self._refresh()

        self._previousProfileModelFile = ''
 def __init__(self, parent=None):
     '''
     Constructor
     '''
     QDialog.__init__(self, parent)
     self._ui = Ui_CreditsDialog()
     self._ui.setupUi(self)
     
     creditsTab = QTabWidget()
     creditSections = info.CREDITS.keys()
     for creditSection in creditSections:
         creditTab = QWidget()
         creditsTab.addTab(creditTab, creditSection)
         vbox = QVBoxLayout(creditTab)
         creditList = ""
         for person in info.CREDITS[creditSection]:
             creditList += ("\n%s [%s]" % (person['name'], person['email']))
         creditLabel = QLabel()
         creditLabel.setStyleSheet("QLabel { background-color : white}")
         creditLabel.setText(creditList)
         creditLabel.setAlignment(Qt.AlignTop | Qt.AlignLeft)
         vbox.addWidget(creditLabel)
     
     vbox = QVBoxLayout()
     vbox.setContentsMargins(0, 0, 0, 0)
     vbox.addWidget(creditsTab)
     self._ui.frame_CreditsTab.setLayout(vbox)
Exemplo n.º 10
0
 def __init__(self, app, *args, **kwargs):
     QDialog.__init__(self, *args, **kwargs)
     self.app = app
     self.closed = False
     self.startup_path = os.path.expanduser('~/.config/autostart/')
     self.startup_file = os.path.join(self.startup_path, 'everpad.desktop')
     self.ui = Ui_Dialog()
     self.ui.setupUi(self)
     self.ui.webView.hide()
     self.setWindowIcon(get_icon())
     for delay in (5, 10, 15, 30):
         self.ui.syncDelayBox.addItem(self.tr('%d minutes') % delay,
             userData=str(delay * 60 * 1000),
         )
     self.ui.syncDelayBox.addItem(self.tr('One hour'), userData='3600000')
     self.ui.syncDelayBox.addItem(self.tr('Manual'), userData='-1')
     active_index = self.ui.syncDelayBox.findData(str(
         self.app.provider.get_sync_delay(),
     ))
     self.ui.syncDelayBox.setCurrentIndex(active_index)
     self.ui.syncDelayBox.currentIndexChanged.connect(self.delay_changed)
     self.ui.tabWidget.currentChanged.connect(self.update_tabs)
     self.ui.authBtn.clicked.connect(self.change_auth)
     self.ui.autoStart.stateChanged.connect(self.auto_start_state)
     self.ui.noteFont.currentFontChanged.connect(self.font_changed)
     self.ui.noteSize.valueChanged.connect(self.font_size_changed)
     self.ui.blackTray.stateChanged.connect(self.tray_changed)
     self.update_tabs()
Exemplo n.º 11
0
    def __init__(self, parent, header, device_settings, firmware_settings,
                 error_codes, *args):
        QDialog.__init__(self, parent, *args)
        self.setGeometry(300, 200, 570, 450)
        self.setWindowTitle("Device information")
        table_model = DeviceInformationTable(self, header, device_settings)
        dev_settings_table = QTableView()
        dev_settings_table.setModel(table_model)

        table_model = DeviceInformationTable(self, header, firmware_settings)
        fw_settings_table = QTableView()
        fw_settings_table.setModel(table_model)

        table_model = DeviceInformationTable(self, header, error_codes)
        error_code_table = QTableView()
        error_code_table.setModel(table_model)

        # set font
        # font = QFont("monospace", 10)
        font = QFont("", 10)
        dev_settings_table.setFont(font)
        fw_settings_table.setFont(font)
        # set column width to fit contents (set font first!)
        dev_settings_table.resizeColumnsToContents()
        fw_settings_table.resizeColumnsToContents()
        error_code_table.resizeColumnsToContents()

        tab_view = QTabWidget()
        tab_view.addTab(dev_settings_table, "User settings")
        tab_view.addTab(fw_settings_table, "Firmware settings")
        tab_view.addTab(error_code_table, "Error Codes")

        layout = QVBoxLayout(self)
        layout.addWidget(tab_view)
        self.setLayout(layout)
Exemplo n.º 12
0
 def __init__(self, parent=None):
     """
     Constructor
     """
     QDialog.__init__(self, parent)
     self._ui = Ui_LicenseDialog()
     self._ui.setupUi(self)
Exemplo n.º 13
0
 def __init__(self, dept_id, mainWindow):
     QDialog.__init__(self)
     self.mainWindow = mainWindow
     self.dept_id = dept_id
     self.db = DbHandler('norm.db')
     self.db.open()
     self.hardware_list = self.db.getHardware()
Exemplo n.º 14
0
    def __init__(self, wdg_detector, key='', parent=None):
        QDialog.__init__(self, parent)
        self.setWindowTitle(wdg_detector.accessibleName())

        # Widgets
        self._txt_key = QLineEdit()
        self._txt_key.setValidator(QRegExpValidator(QRegExp(r"^(?!\s*$).+")))
        self._txt_key.setText(key)

        self._wdg_detector = wdg_detector

        buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)

        # Layouts
        layout = QFormLayout()
        layout.setFieldGrowthPolicy(QFormLayout.FieldGrowthPolicy.ExpandingFieldsGrow) # Fix for Mac OS
        layout.addRow('Key', self._txt_key)
        layout.addRow(self._wdg_detector)
        layout.addRow(buttons)
        self.setLayout(layout)

        # Signals
        self._txt_key.textChanged.connect(self._onChanged)
        self._txt_key.textChanged.emit('')

        buttons.accepted.connect(self._onOk)
        buttons.rejected.connect(self.reject)
Exemplo n.º 15
0
 def __init__(self):
     '''
     Constructor
     '''
     
     QDialog.__init__(self)
     self._initGUI()
Exemplo n.º 16
0
 def __init__(self, parent=None):
     QDialog.__init__(self, parent)
     self._wasCanceled = False
     self._autoClose = True
     self._autoReset = True
     self._minimumDuration = 0
     self.canceled.connect(self.cancel)
Exemplo n.º 17
0
    def __init__(self, app, hub, html, debug=False):
        QDialog.__init__(self)
        self.app = app
        self.hub = hub
        self.html = addpool.html
        self.debug = debug
        self.url = "file:///" \
            + os.path.join(self.app.property("ResPath"), "www/", html).replace('\\', '/')
        
        self.is_first_load = True
        self.view = web_core.QWebView(self)
        
        if not self.debug:
            self.view.setContextMenuPolicy(qt_core.Qt.NoContextMenu)
        
        self.view.setCursor(qt_core.Qt.ArrowCursor)
        self.view.setZoomFactor(1)
        
        self.setWindowTitle("Add/Edit Pool :: %s" % APP_NAME)
        self.icon = self._getQIcon('sumominer_64x64.png')
        self.setWindowIcon(self.icon)
        
        layout = QGridLayout()
        layout.addWidget(self.view)
        self.setLayout(layout)
        
        self.setFixedSize(qt_core.QSize(660,480))
        self.center()
        
        self.view.loadFinished.connect(self._load_finished)
#         self.view.load(qt_core.QUrl(self.url))
        self.view.setHtml(self.html, qt_core.QUrl(self.url))
Exemplo n.º 18
0
    def __init__(self, app, *args, **kwargs):
        QDialog.__init__(self, *args, **kwargs)
        self.app = app
        self.closed = False
        self.sort_order = None
        self.ui = Ui_List()
        self.ui.setupUi(self)
        self.setWindowIcon(get_icon())

        self.notebooksModel = QStandardItemModel()
        self.ui.notebooksList.setModel(self.notebooksModel)
        self.ui.notebooksList.selection.connect(self.selection_changed)
        self.ui.notebooksList.setContextMenuPolicy(Qt.CustomContextMenu)
        self.ui.notebooksList.customContextMenuRequested.connect(self.notebook_context_menu)

        self.notesModel = QStandardItemModel()
        self.notesModel.setHorizontalHeaderLabels(
            [self.tr('Title'), self.tr('Last Updated')])

        self.ui.notesList.setModel(self.notesModel)
        self.ui.notesList.doubleClicked.connect(self.note_dblclicked)
        self.ui.notesList.setContextMenuPolicy(Qt.CustomContextMenu)
        self.ui.notesList.customContextMenuRequested.connect(self.note_context_menu)
        self.ui.notesList.header().sortIndicatorChanged.connect(self.sort_order_updated)

        self.ui.newNotebookBtn.setIcon(QIcon.fromTheme('folder-new'))
        self.ui.newNotebookBtn.clicked.connect(self.new_notebook)

        self.ui.newNoteBtn.setIcon(QIcon.fromTheme('document-new'))
        self.ui.newNoteBtn.clicked.connect(self.new_note)

        self.ui.newNoteBtn.setShortcut(QKeySequence(self.tr('Ctrl+n')))
        self.ui.newNotebookBtn.setShortcut(QKeySequence(self.tr('Ctrl+Shift+n')))
        QShortcut(QKeySequence(self.tr('Ctrl+q')), self, self.close)
    def __init__(self, data, GFUnfitted, config, fitFunc, resetCallback, parent=None):
        '''
        Constructor
        '''
        QDialog.__init__(self, parent)
        self._ui = Ui_Dialog()
        self._ui.setupUi(self)

        self._scene = self._ui.MayaviScene.visualisation.scene
        self._scene.background = self.backgroundColour

        self.selectedObjectName = None
        self._data = data
        self._GFUnfitted = GFUnfitted
        self._GFFitted = copy.deepcopy(self._GFUnfitted)
        self._fitFunc = fitFunc
        self._config = config
        self._resetCallback = resetCallback
        
        self._worker = _ExecThread(self._fitFunc)
        self._worker.finalUpdate.connect(self._fitUpdate)
        self._worker.update.connect(self._fitCallback)

        # create self._objects
        self._objects = MayaviViewerObjectsContainer()
        self._objects.addObject('data', MayaviViewerDataPoints('data', self._data, renderArgs=self._dataRenderArgs))
        self._objects.addObject('GF Unfitted', MayaviViewerFieldworkModel('GF Unfitted', self._GFUnfitted, self._GFD, renderArgs=self._GFUnfittedRenderArgs))
        self._objects.addObject('GF Fitted', MayaviViewerFieldworkModel('GF Fitted', self._GFFitted, self._GFD, renderArgs=self._GFFittedRenderArgs))

        self._makeConnections()
        self._initialiseObjectTable()
        self._initialiseSettings()
        self._refresh()
Exemplo n.º 20
0
    def __init__(self):
        QDialog.__init__(self)

        ui.load_ui(self, 'about.ui')
        win_remove_context_help(self)

        self._version.setText('v' + '.'.join([str(x) for x in VERSION]))
Exemplo n.º 21
0
    def __init__(self, low=True, parent=None):
        QDialog.__init__(self, parent)
        self.setupUi(self)


        def bind_slider(check, action):
            def inner(x):
                if check(x):
                    action(x)
            return inner


        bind1 = bind_slider(lambda x: self.slider_from.value() > x,
                            lambda x: self.slider_from.setValue(max(0, x-1)))

        bind2 = bind_slider(lambda x: self.slider_to.value() < x,
                            lambda x: self.slider_to.setValue(min(100, x+1)))
        
        self.slider_to.valueChanged.connect(bind1)
        self.slider_from.valueChanged.connect(bind2)

        self.slider_to.valueChanged.connect(self.update_mask)
        self.slider_from.valueChanged.connect(self.update_mask)
        self.check_inverse.stateChanged.connect(self.update_mask)

        self.buttonBox.rejected.connect(self._clear)
        self.buttonBox.accepted.connect(self._apply_mask)
Exemplo n.º 22
0
 def __init__(self, low=True, parent=None):
     QDialog.__init__(self, parent)
     self.setupUi(self)
     self.low = low
     self.horizontalSlider.valueChanged.connect(self.update_mask)
     self.buttonBox.rejected.connect(self._clear)
     self.buttonBox.accepted.connect(self._apply_mask)
Exemplo n.º 23
0
    def __init__(self, app, *args, **kwargs):
        QDialog.__init__(self, *args, **kwargs)
        self.app = app
        self.closed = False
        self.sort_order = None
        self.ui = Ui_List()
        self.ui.setupUi(self)
        self.setWindowIcon(get_icon())

        self.notebooksModel = QStandardItemModel()
        self.ui.notebooksList.setModel(self.notebooksModel)
        self.ui.notebooksList.selection.connect(self.selection_changed)
        self.ui.notebooksList.setContextMenuPolicy(Qt.CustomContextMenu)
        self.ui.notebooksList.customContextMenuRequested.connect(
            self.notebook_context_menu)

        self.notesModel = QStandardItemModel()
        self.notesModel.setHorizontalHeaderLabels(
            [self.tr('Title'), self.tr('Last Updated')])

        self.ui.notesList.setModel(self.notesModel)
        self.ui.notesList.doubleClicked.connect(self.note_dblclicked)
        self.ui.notesList.setContextMenuPolicy(Qt.CustomContextMenu)
        self.ui.notesList.customContextMenuRequested.connect(
            self.note_context_menu)
        self.ui.notesList.header().sortIndicatorChanged.connect(
            self.sort_order_updated)

        self.ui.newNotebookBtn.setIcon(QIcon.fromTheme('folder-new'))
        self.ui.newNotebookBtn.clicked.connect(self.new_notebook)

        self.ui.newNoteBtn.setIcon(QIcon.fromTheme('document-new'))
        self.ui.newNoteBtn.clicked.connect(self.new_note)
Exemplo n.º 24
0
    def __init__(self, list_options, parent=None):
        QDialog.__init__(self, parent)

        # Variables
        model = _AvailableOptionsListModel()
        for options in list_options:
            model.addOptions(options)

        # Widgets
        lbltext = QLabel('Select the options to import')

        self._combobox = QComboBox()
        self._combobox.setModel(model)

        buttons = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)

        # Layouts
        layout = QVBoxLayout()
        layout.addWidget(lbltext)
        layout.addWidget(self._combobox)
        layout.addWidget(buttons)
        self.setLayout(layout)

        # Signals
        buttons.accepted.connect(self.accept)
        buttons.rejected.connect(self.reject)
    def __init__(self, landmarks, config, predictFunc, predMethods, popClasses, parent=None):
        '''
        Constructor
        '''
        QDialog.__init__(self, parent)
        self._ui = Ui_Dialog()
        self._ui.setupUi(self)

        self._scene = self._ui.MayaviScene.visualisation.scene
        self._scene.background = self.backgroundColour

        self.selectedObjectName = None
        self._landmarks = landmarks
        self._landmarkNames = sorted(self._landmarks.keys())
        self._predictFunc = predictFunc
        self._predMethods = predMethods
        self._popClasses = popClasses
        self._config = config

        # print 'init...', self._config

        ### FIX FROM HERE ###
        # create self._objects
        self._initViewerObjects()
        self._setupGui()
        self._makeConnections()
        self._initialiseObjectTable()
        self._initialiseSettings()
        self._refresh()

        # self.testPlot()
        # self.drawObjects()
        print 'finished init...', self._config
    def __init__(self, data, GFUnfitted, config, fitFunc, resetCallback, distModes, landmarks=None, parent=None):
        '''
        Constructor
        '''
        QDialog.__init__(self, parent)
        self._ui = Ui_Dialog()
        self._ui.setupUi(self)

        self._scene = self._ui.MayaviScene.visualisation.scene
        self._scene.background = self.backgroundColour

        self.selectedObjectName = None
        self._data = data
        self._GFUnfitted = GFUnfitted
        self._GFFitted = copy.deepcopy(self._GFUnfitted)
        self._fitFunc = fitFunc
        self._config = config
        self._resetCallback = resetCallback
        self._distModes = distModes
        self._landmarks = landmarks
        if self._landmarks is not None:
            self._landmarkNames = sorted(self._landmarks.keys())
            print(self._landmarkNames)
        else:
            self._landmarkNames = []

        self._worker = _ExecThread(self._fitFunc)
        self._worker.update.connect(self._fitUpdate)

        self._initViewerObjects()
        self._setupGui()
        self._initialiseSettings()
        self._makeConnections()
        self._initialiseObjectTable()
        self._refresh()
Exemplo n.º 27
0
    def __init__(self, parent,silhouette,completeness,homogeneity,v_score,AMI,ARS):
        QDialog.__init__( self, parent )
        layout = QVBoxLayout()

        viewLayout = QFormLayout()
        viewLayout.addRow(QLabel('Silhouette score: '),QLabel(silhouette))
        viewLayout.addRow(QLabel('Completeness: '),QLabel(completeness))
        viewLayout.addRow(QLabel('Homogeneity: '),QLabel(homogeneity))
        viewLayout.addRow(QLabel('V score: '),QLabel(v_score))
        viewLayout.addRow(QLabel('Adjusted mutual information: '),QLabel(AMI))
        viewLayout.addRow(QLabel('Adjusted Rand score: '),QLabel(ARS))

        viewWidget = QGroupBox()
        viewWidget.setLayout(viewLayout)

        layout.addWidget(viewWidget)

        #Accept cancel
        self.acceptButton = QPushButton('Ok')
        self.cancelButton = QPushButton('Cancel')

        self.acceptButton.clicked.connect(self.accept)
        self.cancelButton.clicked.connect(self.reject)

        hbox = QHBoxLayout()
        hbox.addWidget(self.acceptButton)
        hbox.addWidget(self.cancelButton)
        ac = QWidget()
        ac.setLayout(hbox)
        layout.addWidget(ac)
        self.setLayout(layout)
    def __init__(self, landmarks, config, predictFunc, predMethods, popClasses, parent=None):
        QDialog.__init__(self, parent)
        self._ui = Ui_Dialog()
        self._ui.setupUi(self)

        self._scene = self._ui.MayaviScene.visualisation.scene
        self._scene.background = self.backgroundColour

        self.selectedObjectName = None
        self._landmarks = landmarks
        self._landmarkNames = sorted(self._landmarks.keys())
        self._predictFunc = predictFunc
        self._predMethods = predMethods
        self._popClasses = popClasses
        self._config = config

        # print 'init...', self._config

        ### FIX FROM HERE ###
        # create self._objects
        self._initViewerObjects()
        self._setupGui()
        self._makeConnections()
        self._initialiseObjectTable()
        self._initialiseSettings()
        self._refresh()

        # self.testPlot()
        # self.drawObjects()
        print('finished init...', self._config)
Exemplo n.º 29
0
 def __init__(self, parent=None):
     QDialog.__init__(self, parent)
     self._ui = Ui_AboutDialog()
     self._ui.setupUi(self)
     text = self._ui.aboutTextLabel.text()
     self._ui.aboutTextLabel.setText(
         text.replace('##version##', info.VERSION_STRING))
     self._makeConnections()
Exemplo n.º 30
0
    def __init__(self, device=None, simulator=None):
        QDialog.__init__(self)
        self.ui = Ui()
        self.ui.setupUi(self)

        self.device = device
        self.simulator = simulator
        self.demo = None
Exemplo n.º 31
0
 def __init__(self, depts):
     QDialog.__init__(self)
     self.depts = depts
     self.removedDepts = []
     self.db = DbHandler('norm.db')
     self.db.open()
     self.depts = self.db.getDepts()
     self.nextId = self.db.nextDeptId()
Exemplo n.º 32
0
 def __init__(self):
     '''
     Constructor
     '''
     QDialog.__init__(self)
     
     self._initGUI()
     self.athleteProfile = False
Exemplo n.º 33
0
 def __init__(self, parent=None):
     QDialog.__init__(self)
     self.parent = parent
     self.ui = NewUserPop()
     self.ui.setupUi(self)
     self.ui.newuser_save_button.clicked.connect(self.save_user)
     self.ui.newuser_name_linedit.textChanged.connect(
         lambda: auto_capital(linedit=self.ui.newuser_name_linedit))
Exemplo n.º 34
0
    def __init__(self, state, parent=None):
        QDialog.__init__(self, parent)
        self._ui = Ui_ConfigureDialog()
        self._ui.setupUi(self)

        self.setState(state)
        self.validate()
        self._makeConnections()
Exemplo n.º 35
0
    def __init__(self):
        '''
        Constructor
        '''
        QDialog.__init__(self)

        self._initGUI()
        self.athleteProfile = False
Exemplo n.º 36
0
 def __init__(self, parent=None):
     QDialog.__init__(self)
     self.parent = parent
     self.ui = NewGroupPop()
     self.ui.setupUi(self)
     self.ui.newgroup_create_button.clicked.connect(self.create_group)
     self.ui.newgroup_name_linedit.textChanged.connect(
         lambda: auto_capital(linedit=self.ui.newgroup_name_linedit))
    def __init__(self, state, parent=None):
        QDialog.__init__(self, parent)
        self._ui = Ui_ConfigureDialog()
        self._ui.setupUi(self)
        self._ui.identifierLineEdit.setStyleSheet(REQUIRED_STYLE_SHEET)

        self.setState(state)
        self.validate()
        self._makeConnections()
Exemplo n.º 38
0
 def __init__(self):
     logger.info('Inside CategoryAddDialogue')
     QDialog.__init__(self)
     self.category = Ui_new_category()
     self.category.setupUi(self)
     self.newcategory = CategoryOfProduct()
     self.category.categorydialogue_newcategory_linedit.textChanged.connect(
         lambda: self.auto_capital(self.category.categorydialogue_newcategory_linedit))
     self.category.categorydialogue_addcategory_button.clicked.connect(self.add_category)
Exemplo n.º 39
0
 def __init__(self, parent, rows=None, cells=None, *args, **kwargs):
     QDialog.__init__(self, parent, *args, **kwargs)
     self.ui = Ui_TableInsertDialog()
     self.ui.setupUi(self)
     self.setWindowIcon(get_icon())
     if rows:  # typecasting sucks
         self.ui.rows.setText(str(int(rows)))
     if cells:
         self.ui.columns.setText(str(int(cells)))
 def __init__(self, parent=None):
     '''
     Constructor
     '''
     QDialog.__init__(self, parent)
     self._ui = Ui_ConfigureDialog()
     self._ui.setupUi(self)
     
     self._makeConnections()
Exemplo n.º 41
0
 def __init__(self, parent, rows=None, cells=None, *args, **kwargs):
     QDialog.__init__(self, parent, *args, **kwargs)
     self.ui = Ui_TableInsertDialog()
     self.ui.setupUi(self)
     self.setWindowIcon(get_icon())
     if rows:  # typecasting sucks
         self.ui.rows.setText(str(int(rows)))
     if cells:
         self.ui.columns.setText(str(int(cells)))
Exemplo n.º 42
0
 def __init__(self, parent=None):
     '''
     Constructor
     '''
     QDialog.__init__(self, parent)
     self.ui = Ui_AtomSizeDialog()
     self.ui.setupUi(self)
     self.old_dial_value = self.ui.dial.value()
     self._value = self.ui.doubleSpinBox.value()
Exemplo n.º 43
0
  def __init__(self, parent, appargs):
    QDialog.__init__(self, parent)
    self.setupUi(self)
    self._app = esky.Esky(sys.executable,
        "http://10.78.55.218/pyrite/downloads")
    self._appargs = appargs

    self.connectActions()
    self.updateView()
Exemplo n.º 44
0
    def __init__(self,
                 sourceData,
                 targetData,
                 config,
                 registerFunc,
                 regMethods,
                 parent=None):
        '''
        Constructor
        '''
        QDialog.__init__(self, parent)
        self._ui = Ui_Dialog()
        self._ui.setupUi(self)

        self._scene = self._ui.MayaviScene.visualisation.scene
        self._scene.background = self.backgroundColour

        self.selectedObjectName = None
        self._sourceData = sourceData
        self._targetData = targetData
        self._sourceDataAligned = None
        self._registerFunc = registerFunc
        self._regMethods = regMethods
        self._config = config

        self._worker = _ExecThread(self._registerFunc)
        self._worker.update.connect(self._regUpdate)

        # print 'init...', self._config

        # create self._objects
        self._objects = MayaviViewerObjectsContainer()
        self._objects.addObject(
            'source',
            MayaviViewerDataPoints('source',
                                   self._sourceData,
                                   renderArgs=self._sourceRenderArgs))
        self._objects.addObject(
            'target',
            MayaviViewerDataPoints('target',
                                   self._targetData,
                                   renderArgs=self._targetRenderArgs))
        self._objects.addObject(
            'registered',
            MayaviViewerDataPoints('registered',
                                   self._sourceData,
                                   renderArgs=self._registeredRenderArgs))

        self._setupGui()
        self._makeConnections()
        self._initialiseObjectTable()
        self._initialiseSettings()
        self._refresh()

        # self.testPlot()
        # self.drawObjects()
        print('finished init...', self._config)
Exemplo n.º 45
0
 def __init__(self, parent = None):
     """
     Constructor
     """
     QDialog.__init__(self, parent)
     self.setupUi(self)
     if "_MEIPASS2" in os.environ:
         self.fdir = os.environ["_MEIPASS2"]
     else:
         self.fdir = os.path.dirname(__file__)
Exemplo n.º 46
0
 def __init__(self, editOrNew, id="", parent=None):
     QDialog.__init__(self, None)
     self.editOrNew = editOrNew
     self.parent = parent
     self.idEmployee = id
     self.returnVal = False
     self.initUI()
     self.initLayout()
     self.forDev()
     self.show()
Exemplo n.º 47
0
 def __init__(self, athlete):
     '''
     Constructor
     '''
     QDialog.__init__(self)
     
     self.setWindowTitle("Pushup form")
     self.athlete = athlete
     self.pushupForm = QFormLayout()
     self.createGUI()
Exemplo n.º 48
0
    def __init__(self, state, parent=None):
        QDialog.__init__(self, parent)
        self._ui = Ui_ConfigureDialog()
        self._ui.setupUi(self)
        self._setupPMRTab()
        self._workflow_location = None

        self.setState(state)

        self._makeConnections()
Exemplo n.º 49
0
 def __init__(self, athletesList):
     '''
     Constructor
     '''  
     QDialog.__init__(self)
     self.setWindowTitle("Profile Selection")
     
     self.athletesList = athletesList
         
     self._initGUI()      
Exemplo n.º 50
0
    def __init__(self, athlete):
        '''
        Constructor
        '''
        QDialog.__init__(self)

        self.setWindowTitle("Pushup form")
        self.athlete = athlete
        self.pushupForm = QFormLayout()
        self.createGUI()
 def __init__(self, parent=None):
     '''
     Constructor
     '''
     QDialog.__init__(self, parent)
     self._ui = Ui_AboutDialog()
     self._ui.setupUi(self)
     text = self._ui.aboutTextLabel.text()
     self._ui.aboutTextLabel.setText(text.replace('##version##', info.VERSION_STRING))
     self._makeConnections()
Exemplo n.º 52
0
 def __init__(self, *args, **kwargs ):
     
     QDialog.__init__( self, *args, **kwargs )
     self.installEventFilter( self )
     self.setWindowTitle( Window.title )
 
     mainLayout = QVBoxLayout( self )
     
     sep1 = QFrame();sep1.setFrameShape(QFrame.HLine)
     sep2 = QFrame();sep2.setFrameShape(QFrame.HLine)
     sep3 = QFrame();sep3.setFrameShape(QFrame.HLine)
     
     hl_loadVtx = QHBoxLayout(); hl_loadVtx.setSpacing(5)
     w_loadVtx_src  = Widget_LoadVertex( title="Source Root Vertex" )
     w_loadVtx_trg  = Widget_LoadVertex( title="Target Root Vertex" )
     hl_loadVtx.addWidget( w_loadVtx_src )
     hl_loadVtx.addWidget( w_loadVtx_trg )
     
     hl_loadJoints = QHBoxLayout(); hl_loadJoints.setSpacing(5)
     w_loadJoints_src = Widget_loadJoints("Source Joints")
     w_loadJoints_trg = Widget_loadJoints("Target Joints")
     w_loadJoints_src.otherWidget = w_loadJoints_trg;w_loadJoints_trg.otherWidget = w_loadJoints_src;
     hl_loadJoints.addWidget( w_loadJoints_src )
     hl_loadJoints.addWidget( w_loadJoints_trg )
     
     w_selectionGrow = Widget_SelectionGrow()
     
     hl_select = QHBoxLayout(); hl_select.setSpacing(5)
     b_selectSrc = QPushButton( "Select Source Vertices" )
     b_selectTrg = QPushButton( "Select Target Vertices" )
     hl_select.addWidget( b_selectSrc )
     hl_select.addWidget( b_selectTrg )
     
     b_copyWeight = QPushButton( "Copy Weight" )
     
     mainLayout.addLayout( hl_loadVtx )
     mainLayout.addWidget( sep1 )
     mainLayout.addLayout( hl_loadJoints )
     mainLayout.addWidget( sep2 )
     mainLayout.addWidget( w_selectionGrow )
     mainLayout.addLayout( hl_select )
     mainLayout.addWidget( sep3 )
     mainLayout.addWidget( b_copyWeight )
     
     self.resize( Window.defaultWidth, Window.defaultHeight )
     
     self.li_sourceVertex = w_loadVtx_src.lineEdit
     self.li_targetVertex = w_loadVtx_trg.lineEdit
     self.li_numGrow      = w_selectionGrow.lineEdit
     self.lw_srcJoints    = w_loadJoints_src.listWidget
     self.lw_trgJoints    = w_loadJoints_trg.listWidget
     
     QtCore.QObject.connect( b_selectSrc,  QtCore.SIGNAL( "clicked()" ), self.selectSourceVertices )
     QtCore.QObject.connect( b_selectTrg,  QtCore.SIGNAL( "clicked()" ), self.selectTargetVertices )
     QtCore.QObject.connect( b_copyWeight, QtCore.SIGNAL( 'clicked()' ), self.copyWeight )
Exemplo n.º 53
0
  def __init__(self, parent, project):
    QDialog.__init__(self, parent)
    self.setupUi(self)
    self.connectActions()

    self._project = project
    self.reloadLayers(self._project)
    self.lstLayers.setCurrentRow(0)
    self.updateProperties()

    self.readWindowSettings()
Exemplo n.º 54
0
 def __init__(self, parent, sheetNames):
   QDialog.__init__(self)
   self.setupUi(self)
   self.connectActions()
   self.setupSheets(sheetNames)
   self.xRow = 0
   self.xCol = 0
   self.yRow = 0
   self.yCol = 0
   self.count = 0
   self.sheetName = None
Exemplo n.º 55
0
 def __init__(self, res, *args, **kwargs):
     QDialog.__init__(self, *args, **kwargs)
     self.app = QApplication.instance()
     self.res = res
     self.ui = Ui_ImageDialog()
     self.ui.setupUi(self)
     self.setWindowIcon(get_icon())
     self.ui.widthBox.setValue(self.res.w)
     self.ui.heightBox.setValue(self.res.h)
     self.ui.widthBox.valueChanged.connect(self.width_changed)
     self.ui.heightBox.valueChanged.connect(self.height_changed)
     self._auto_change = False
Exemplo n.º 56
0
    def __init__(self):
        QDialog.__init__(self)
        self.ui = Ui_BatteryPublisher()
        self.ui.setupUi(self)

        self.publisher = PublishSubscribe.QValueSpacePublisher('/power/battery')
        self.ui.batteryCharge.valueChanged.connect(self.chargeChanged)
        self.ui.charging.toggled.connect(self.chargingToggled)

        self.chargeTimer = 0

        self.chargeChanged(self.ui.batteryCharge.value())
Exemplo n.º 57
-1
    def __init__(self, *args, **kwargs ):
        
        QDialog.__init__( self, *args, **kwargs )
        self.installEventFilter( self )
        self.setWindowTitle( Window.title )
    
        mainLayout = QVBoxLayout( self )
        
        wLabelDescription = QLabel( "Select Object or Group" )
        
        validator = QIntValidator()
        
        hLayout = QHBoxLayout()
        wLabel = QLabel( "Num Controller : " )
        wLineEdit= QLineEdit();wLineEdit.setValidator(validator); wLineEdit.setText( '5' )
        hLayout.addWidget( wLabel )
        hLayout.addWidget( wLineEdit )
        
        button = QPushButton( "Create" )
        
        mainLayout.addWidget( wLabelDescription )
        mainLayout.addLayout( hLayout )
        mainLayout.addWidget( button )

        self.resize(Window.defaultWidth,Window.defaultHeight)
        
        self.wlineEdit = wLineEdit
        
        QtCore.QObject.connect( button, QtCore.SIGNAL( "clicked()" ), self.cmd_create )