7 Module implementing a dialog to enter data needed to squash migrations. |
7 Module implementing a dialog to enter data needed to squash migrations. |
8 """ |
8 """ |
9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from PyQt5.QtCore import pyqtSlot |
12 from PyQt6.QtCore import pyqtSlot |
13 from PyQt5.QtGui import QIcon |
13 from PyQt6.QtGui import QIcon |
14 from PyQt5.QtWidgets import QDialog, QDialogButtonBox |
14 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
15 |
15 |
16 from .Ui_DjangoSquashMigrationSelectionDialog import ( |
16 from .Ui_DjangoSquashMigrationSelectionDialog import ( |
17 Ui_DjangoSquashMigrationSelectionDialog |
17 Ui_DjangoSquashMigrationSelectionDialog |
18 ) |
18 ) |
19 |
19 |
56 Private slot to set the enabled state of the OK button. |
56 Private slot to set the enabled state of the OK button. |
57 """ |
57 """ |
58 enabled = ( |
58 enabled = ( |
59 bool(self.applicationComboBox.currentText()) and |
59 bool(self.applicationComboBox.currentText()) and |
60 bool(self.endMigrationComboBox.currentText())) |
60 bool(self.endMigrationComboBox.currentText())) |
61 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled) |
61 self.buttonBox.button( |
|
62 QDialogButtonBox.StandardButton.Ok).setEnabled(enabled) |
62 |
63 |
63 @pyqtSlot(str) |
64 @pyqtSlot(str) |
64 def on_applicationComboBox_activated(self, app): |
65 def on_applicationComboBox_activated(self, app): |
65 """ |
66 """ |
66 Private slot to update the migrations combo boxes. |
67 Private slot to update the migrations combo boxes. |