def __init__(self, path, parent=None): """Initialize the close page's configuration group.""" super(CloseTomb, self).__init__(parent) self.path = path layout = QVBoxLayout() close_group = QGroupBox('Close Tomb') close_layout = QVBoxLayout() self.close_all_button = QPushButton('Close All Tombs') self.close_all_button.setFixedWidth(200) self.force_close_button = QPushButton('Force Close Tombs') self.force_close_button.setFixedWidth(200) close_layout.addWidget(self.close_all_button, alignment=Qt.AlignCenter) close_layout.addWidget(self.force_close_button, alignment=Qt.AlignCenter) close_group.setLayout(close_layout) layout.addWidget(close_group) layout.addStretch(1) self.setLayout(layout) self.close_all_button.clicked.connect( lambda: wrapper.close_tombs(self.path)) self.force_close_button.clicked.connect( lambda: wrapper.slam_tombs(self.path))
def test_tomb_slam(name, key, password): """Test force closing a tomb by opening the create tomb container.""" wrapper.open_tomb(name, key, password) wrapper.slam_tombs()