Пример #1
0
def main():

    global host

    # Connect to the executor, and start the listener.
    fd = int(os.environ.get('UIFUTURES_HOST_FD') or sys.argv[1])
    conn = _multiprocessing.Connection(fd)
    conn.send(dict(
        type='handshake',
        pid=os.getpid(),
    ))

    host = Host(conn)

    app = QtGui.QApplication([])
    app.setApplicationName('Futures Host')
    app.setWindowIcon(QtGui.QIcon(utils.icon('fatcow/road_sign')))

    dialog = Dialog(host)

    host.start()

    dialog.show()

    exit(app.exec_())
Пример #2
0
def run(entity_type, selected_ids, **kwargs):
    
    app = QtGui.QApplication([])
    QtGui.QApplication.setWindowIcon(ui_utils.icon('fatcow/brick_go', as_icon=True))
        
    sgfs = SGFS()
    publish = sgfs.session.merge({'type': entity_type, 'id': selected_ids[0]})
    task, type_, _, _ = publish.fetch(('sg_link', 'sg_type', 'sg_path', 'sg_version'), force=True)
    if type_ != 'maya_scene':
        QtGui.QMessageBox.critical(None, 'Unknown Publish Type', 'Cannot process publishes of type %r.' % type_)
        exit(1)
    
    task['step'].fetch_core() # For the picker.
    
    dialog = Dialog(publish)
    dialog.show()
    dialog.raise_()
    exit(app.exec_())
Пример #3
0
    def autoSetMinimumWidth(self):
        width = 0
        for table in self._tables_by_name.itervalues():
            width = max(width, sum(table.columnWidth(i) for i in xrange(table.columnCount())))
        if width:
            self.setMinimumWidth(width)
    
    def _table_selection_changed(self):
        path = self.currentPath()
        self.pathChanged.emit(path)
    
    def _current_tab_changed(self):
        path = self.currentPath()
        self.pathChanged.emit(path)
        
    def currentPath(self):
        table = self.currentWidget()
        return table.current_path()



if __name__ == '__main__':
    import sys
    app = QtGui.QApplication([])
    widget = Picker()
    widget.autoSetMinimumWidth()
    widget.show()
    widget.raise_()
    sys.exit(app.exec_())

Пример #4
0
def main():
    app = QtGui.QApplication(sys.argv)
    _main()
    exit(app.exec_())