def __init__(self, mw): QMainWindow.__init__(self, mw) applyStyles(self) self.mw = mw self.col = self.mw.col self.currentRow = None self.lastFilter = "" self.form = aqt.forms.browser.Ui_Dialog() self.form.setupUi(self) restoreGeom(self, "editor", 0) restoreState(self, "editor") restoreSplitter(self.form.splitter_2, "editor2") restoreSplitter(self.form.splitter, "editor3") self.form.splitter_2.setChildrenCollapsible(False) self.form.splitter.setChildrenCollapsible(False) self.card = None self.setupToolbar() self.setupColumns() self.setupTable() self.setupMenus() self.setupSearch() self.setupTree() self.setupHeaders() self.setupHooks() self.setupEditor() self.updateFont() self.onUndoState(self.mw.form.actionUndo.isEnabled()) self.form.searchEdit.setFocus() self.show() self.form.searchEdit.setText("deck:current is:recent") self.form.searchEdit.selectAll() self.onSearch()
def setupStyle(self): applyStyles(self)