Commit a1a0972f authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[widgets] Cleanup: make all slots camel case

parent afd55e03
......@@ -301,6 +301,6 @@ class TestAssetWidget:
asset_path = self.get_asset_path(test_prefix, asset_type, asset_name)
asset_widget.load_json(asset_path)
assert asset_widget.current_editor.asset_type != AssetType.UNKNOWN
asset_widget.delete_asset(asset_path)
asset_widget.deleteAsset(asset_path)
assert asset_widget.current_editor.asset_type == AssetType.UNKNOWN
assert not os.path.exists(asset_path)
......@@ -158,9 +158,9 @@ class AssetWidget(QWidget):
layout.addLayout(button_layout)
self.watcher.fileChanged.connect(self.__reload_from_harddrive)
self.update_timer.timeout.connect(self.__enable_save)
self.update_timer.timeout.connect(self.__update_json_widget)
self.watcher.fileChanged.connect(self.__reloadFromHarddrive)
self.update_timer.timeout.connect(self.__enableSave)
self.update_timer.timeout.connect(self.__updateJsonWidget)
self.save_button.clicked.connect(self.save_json)
@property
......@@ -220,13 +220,13 @@ class AssetWidget(QWidget):
self.watcher.removePaths(files)
@pyqtSlot()
def __enable_save(self):
def __enableSave(self):
"""Enable the save button"""
self.save_button.setEnabled(True)
@pyqtSlot()
def __reload_from_harddrive(self):
def __reloadFromHarddrive(self):
"""Reload the content of this widget from the hard drive"""
answer = QMessageBox.question(
......@@ -242,7 +242,7 @@ class AssetWidget(QWidget):
self.__update_content()
@pyqtSlot()
def __update_json_widget(self):
def __updateJsonWidget(self):
self.json_widget.setText(self.current_editor.dump_as_string())
def closeEvent(self, event):
......@@ -283,7 +283,7 @@ class AssetWidget(QWidget):
return filter(None, action_list)
@pyqtSlot("QString")
def delete_asset(self, file_path):
def deleteAsset(self, file_path):
"""Delete the requested asset
:param file_path str: path to the json file of the asset to delete
......
......@@ -69,7 +69,7 @@ class MainWindow(QMainWindow):
self.setCentralWidget(centralWidget)
self.assetBrowser.jsonSelected.connect(self.assetWidget.load_json)
self.assetBrowser.deletionRequested.connect(self.assetWidget.delete_asset)
self.assetBrowser.deletionRequested.connect(self.assetWidget.deleteAsset)
quitAction.triggered.connect(qApp.quit)
aboutAction.triggered.connect(self.show_about)
aboutQtAction.triggered.connect(self.show_about_qt)
......
Supports Markdown
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