Commit e86d2acb authored by Nils Cedric Holle's avatar Nils Cedric Holle

Use clicked instead of pressed

parent 63f5d034
......@@ -64,7 +64,7 @@ class PSAppGUI(QMainWindow):
self.__moduleChanger.currentIndexChanged.connect(self.__moduleChanged)
self.__appWidget = widgetClass(app)
self.__btnCopyCode = QPushButton("Copy code")
self.__btnCopyCode.pressed.connect(self.__copyCode)
self.__btnCopyCode.clicked.connect(self.__copyCode)
self.__layout = QGridLayout()
self.__widget.setLayout(self.__layout)
self.__layout.addWidget(self.__moduleChanger, 0, 0, 1, 3)
......
......@@ -84,15 +84,15 @@ class PSGitTab(QWidget):
self.fileListChanged.setSelectionMode(QListWidget.ExtendedSelection)
self.fileListStaged.setSelectionMode(QListWidget.ExtendedSelection)
self.btnFetch.pressed.connect(self.fetch)
self.btnStageAll.pressed.connect(self.stageAll)
self.btnUnstageAll.pressed.connect(self.unstageAll)
self.btnRevertAll.pressed.connect(self.revertAll)
self.btnPullNPush.pressed.connect(self.pull)
self.btnStage.pressed.connect(self.stage)
self.btnUnstage.pressed.connect(self.unstage)
self.btnRevert.pressed.connect(self.revert)
self.btnCommit.pressed.connect(self.commit)
self.btnFetch.clicked.connect(self.fetch)
self.btnStageAll.clicked.connect(self.stageAll)
self.btnUnstageAll.clicked.connect(self.unstageAll)
self.btnRevertAll.clicked.connect(self.revertAll)
self.btnPullNPush.clicked.connect(self.pull)
self.btnStage.clicked.connect(self.stage)
self.btnUnstage.clicked.connect(self.unstage)
self.btnRevert.clicked.connect(self.revert)
self.btnCommit.clicked.connect(self.commit)
self.fileListChanged.selectionModel().selectionChanged.connect(
self.__changedSelectionChanged)
self.fileListStaged.selectionModel().selectionChanged.connect(
......
......@@ -85,16 +85,16 @@ class PSMainWindow(QMainWindow):
"QPushButton { min-width: 1em; max-width: 1em; " +
"min-height: 1em; max-height: 1em; }"
)
self.btnOpenCloseSecondEditor.pressed.connect(
self.btnOpenCloseSecondEditor.clicked.connect(
lambda: self.changeRightWidgetMode("editor"))
self.__rightWidget = self.verticalSplitter
self.__rightWidgetMode = "puzzle"
# add active module run / pause / stop
self.btnRunPauseActive = QToolButton()
self.btnRunPauseActive.pressed.connect(self.__runPauseActiveModuleOnly)
self.btnRunPauseActive.clicked.connect(self.__runPauseActiveModuleOnly)
self.btnStopActive = QToolButton()
self.btnStopActive.pressed.connect(self.__stopActiveModule)
self.btnStopActive.clicked.connect(self.__stopActiveModule)
w.editorHeaderLayout.insertWidget(0, self.btnRunPauseActive)
w.editorHeaderLayout.insertWidget(1, self.btnStopActive)
......@@ -132,7 +132,7 @@ class PSMainWindow(QMainWindow):
self.puzzleToolBar.addAction(action)
self.__btnAddStatusAbort = QPushButton(self.startToolBar)
self.__btnAddStatusAbort.pressed.connect(self.__abortAdding)
self.__btnAddStatusAbort.clicked.connect(self.__abortAdding)
self.__btnAddStatusAction = self.puzzleToolBar.addWidget(
self.__btnAddStatusAbort)
self.__btnAddStatusAction.setVisible(False)
......@@ -633,10 +633,10 @@ class PSMainWindow(QMainWindow):
self.verticalSplitter)
self.__updateEditorModule(self.__activeModule, 1)
self.btnOpenCloseSecondEditor.setText("-")
self.btnOpenCloseSecondEditor.pressed.disconnect()
self.btnOpenCloseSecondEditor.clicked.disconnect()
self.btnOpenCloseSecondEditor.setToolTip(
translate("MainWindow", "Close second editor"))
self.btnOpenCloseSecondEditor.pressed.connect(
self.btnOpenCloseSecondEditor.clicked.connect(
lambda: self.changeRightWidgetMode(oldMode))
self.__rightWidget = w
self.__rightWidgetMode = "editor"
......@@ -648,8 +648,8 @@ class PSMainWindow(QMainWindow):
w.hide()
w.setParent(None)
self.btnOpenCloseSecondEditor.setText("+")
self.btnOpenCloseSecondEditor.pressed.disconnect()
self.btnOpenCloseSecondEditor.pressed.connect(
self.btnOpenCloseSecondEditor.clicked.disconnect()
self.btnOpenCloseSecondEditor.clicked.connect(
lambda: self.changeRightWidgetMode("editor"))
self.__rightWidget = None
......
......@@ -34,4 +34,4 @@ class PSNotification(QtWidgets.QWidget):
self.__layout.addWidget(self.__closeButton)
def setDeletionMethod(self, method: Callable):
self.__closeButton.pressed.connect(lambda: method(self))
self.__closeButton.clicked.connect(lambda: method(self))
......@@ -30,7 +30,7 @@ class PSNotificationTab(QtWidgets.QWidget):
self.__deleteAllBtn = QtWidgets.QPushButton()
self.__deleteAllBtn.setStyleSheet(
"QPushButton { min-width: 6em; max-width: 6em; }")
self.__deleteAllBtn.pressed.connect(self.__deleteAll)
self.__deleteAllBtn.clicked.connect(self.__deleteAll)
btnLayout.addStretch()
btnLayout.addWidget(self.__deleteAllBtn)
......
......@@ -58,7 +58,7 @@ class Wrap(QtWidgets.QMainWindow):
self.widget.setLayout(self.__layout)
self.setCentralWidget(self.widget)
self.__layout.addWidget(self.btn)
self.btn.pressed.connect(self.__btnPressed)
self.btn.clicked.connect(self.__btnPressed)
self.__timer = QtCore.QTimer()
self.__timer.setInterval(1000)
self.__timer.timeout.connect(self.__print)
......
......@@ -166,9 +166,9 @@ class PSSinglePlotView(QtWidgets.QMdiSubWindow):
self.switchLayout.setContentsMargins(0, 0, 0, 0)
self.box.addLayout(self.switchLayout, 0, 0)
self.previousBtn.pressed.connect(
self.previousBtn.clicked.connect(
lambda: self.combo.setCurrentIndex(self.combo.currentIndex() - 1))
self.nextBtn.pressed.connect(
self.nextBtn.clicked.connect(
lambda: self.combo.setCurrentIndex(self.combo.currentIndex() + 1))
self.previousBtn.setStyleSheet(
"QPushButton { min-width: 5em; max-width: 5em; }")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment