def __init__(self):
        super(TransformationHistoryWidget, self).__init__()

        self.actionContainer = ButtonContainer()
        self.transformationModel = TransformationModel()

        self.transformationView = TransformationListView()
        self.transformationView.setRootIsDecorated(False)
        self.transformationView.setModel(self.transformationModel)
        self.transformationView.setAttribute(Qt.WA_MacShowFocusRect, False)
        self.transformationView.clicked.connect(self.clickedTransformation)

        self._transformCount = 0

        layout = QVBoxLayout()
        layout.setSpacing(0)
        layout.setAlignment(Qt.AlignTop)
        layout.addWidget(self.transformationView)
        layout.addWidget(self.actionContainer)
        self.setLayout(layout)

        removeButton = QPushButton()
        removeButton.setIcon(QIcon(AppVars.imagePath() + "RemoveButton.png"))
        removeButton.clicked.connect(self.removeButtonClicked)
        removeButton.setToolTip("Remove the last transformation")
        self.actionContainer.addButton(removeButton)
Ejemplo n.º 2
0
	def __init__(self):
		super(TransformationHistoryWidget, self).__init__()

		self.actionContainer = ButtonContainer()
		self.transformationModel = TransformationModel()

		self.transformationView = TransformationListView()
		self.transformationView.setRootIsDecorated(False)
		self.transformationView.setModel(self.transformationModel)

		layout = QVBoxLayout()
		layout.setSpacing(0)
		layout.setAlignment(Qt.AlignTop)
		layout.addWidget(self.transformationView)
		layout.addWidget(self.actionContainer)
		self.setLayout(layout)

		removeButton = QPushButton()
		removeButton.setIcon(QIcon(AppVars.imagePath() + "RemoveButton.png"))
		removeButton.clicked.connect(self.removeButtonClicked)
		self.actionContainer.addButton(removeButton)