def act_save_vsq(): sm_model = SmModel() jnotes_bytes = sm_model.get_vsq_bytes() if jnotes_bytes: #todo show save dialog f = open('test/v.vsq', 'wb') f.write(jnotes_bytes) f.close() print 'SaveVSQCmd' else: #popup dialog pass pass
def act_sm(): sm_model = SmModel() jnotes = sm_model.sm() if jnotes: AppView().dispatch_event(events.JNOTES_CHANGED, jnotes) print 'sm jnotes'
def on_lyric_changed(self, e=None): sm_model = SmModel() main_win = self.get_ui() lyric = str(main_win.lyricEditor.toPlainText().toUtf8()) sm_model.set_lyric(lyric)