def setup_ui(self, dialog):
        dialog.setObjectName("Dialog")
        dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        dialog.resize(1200, 800)
        # layout vertical first
        self.vertical_layout = QtGui.QVBoxLayout(dialog)
        self.vertical_layout.setObjectName('verticalLayout1')

        self.horizontal_layout = QtGui.QHBoxLayout()

        self.from_task_tree_view = QtGui.QTreeView(dialog)
        self.from_task_tree_view.setObjectName("from_tasks_treeView")

        self.copy_push_button = QtGui.QPushButton(dialog)
        self.copy_push_button.setObjectName("copy_push_button")
        self.copy_push_button.setText('>')

        self.to_task_tree_view = TaskTreeView(dialog)
        self.to_task_tree_view.setObjectName("to_tasks_treeView")

        # self.horizontal_layout1.addWidget(self.from_task_tree_view)
        self.horizontal_layout.addWidget(self.from_task_tree_view)
        self.horizontal_layout.addWidget(self.copy_push_button)
        self.horizontal_layout.addWidget(self.to_task_tree_view)

        self.vertical_layout.addLayout(self.horizontal_layout)

        self.horizontal_layout_2 = QtGui.QHBoxLayout()
        self.horizontal_layout_2.setContentsMargins(-1, 10, -1, -1)
        self.horizontal_layout_2.setObjectName("horizontal_layout_2")

        self.vertical_layout.addLayout(self.horizontal_layout_2)

        QtCore.QMetaObject.connectSlotsByName(dialog)

        # initialize elements

        logged_in_user = self.get_logged_in_user()
        projects = Project.query.order_by(Project.name).all()

        task_tree_model = TaskTreeModel()
        task_tree_model.user = logged_in_user
        task_tree_model.populateTree(projects)

        # fit to elements
        self.from_tasks_tree_view_auto_fit_column()
        self.to_tasks_tree_view_auto_fit_column()

        self.from_task_tree_view.setModel(task_tree_model)
        self.to_task_tree_view.setModel(task_tree_model)

        # setup signals
        # tasks_treeView
        QtCore.QObject.connect(
            self.from_task_tree_view.selectionModel(),
            QtCore.SIGNAL('selectionChanged(const QItemSelection &, '
                          'const QItemSelection &)'),
            self.from_task_tree_view_changed
        )

        QtCore.QObject.connect(
            self.to_task_tree_view.selectionModel(),
            QtCore.SIGNAL('selectionChanged(const QItemSelection &, '
                          'const QItemSelection &)'),
            self.to_task_tree_view_changed
        )

        # fit column 0 on expand/collapse
        QtCore.QObject.connect(
            self.from_task_tree_view,
            QtCore.SIGNAL('expanded(QModelIndex)'),
            self.from_tasks_tree_view_auto_fit_column
        )

        QtCore.QObject.connect(
            self.to_task_tree_view,
            QtCore.SIGNAL('expanded(QModelIndex)'),
            self.to_tasks_tree_view_auto_fit_column
        )

        # copy_push_button
        QtCore.QObject.connect(
            self.copy_push_button,
            QtCore.SIGNAL("clicked()"),
            self.copy_versions
        )
Sets up the dialog
dataset/ETHPy150Open eoyilmaz/anima/anima/ui/version_mover.py/VersionMover.setup_ui