Created
January 15, 2022 15:33
-
-
Save erap129/90445c26b267fdd89f09ab135a0e574f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select_image_button = QPushButton('Select Image') | |
| process_image_button = QPushButton('Process!') | |
| select_image_button.clicked.connect(self.choose_source_image) | |
| process_image_button.clicked.connect(self.process_image) | |
| for btn in [select_image_button, process_image_button]: | |
| btn.setFixedHeight(30) | |
| btn.setFixedWidth(100) | |
| self.r_select = QSpinBox() | |
| self.g_select = QSpinBox() | |
| self.b_select = QSpinBox() | |
| self.threshold_select = QSpinBox() | |
| for start_val, prefix, spinbox in zip([30, 1, 72, 152], ['Threshold', 'R', 'G', 'B'], | |
| [self.threshold_select, self.r_select, self.g_select, self.b_select]): | |
| spinbox.setPrefix(f'{prefix}:') | |
| spinbox.setMinimum(0) | |
| spinbox.setMaximum(255) | |
| spinbox.setValue(start_val) | |
| spinbox.setFixedWidth(130) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment