def event_save_experiment(self, path): if os.path.exists(self.experiment.pool.folder()): return notification( self.main_window, msg= _(u'''The file-pool folder has been deleted by the operating system or another application. If you are running Windows 10, de-activate the option 'Delete temporary files that my apps aren't using' under 'Storage Sense'. To avoid data loss, please now save your experiment under a different name.'''), title=_(u'File pool missing')).exec_() os.mkdir(self.experiment.pool.folder()) self.main_window.save_file_as()
def activate(self): """ desc: Is called when the extension is activated through the menu/ toolbar action. """ from libqtopensesame.dialogs.notification import notification welcome = notification(self.main_window,'On the next page, please input the URL of your couch db server followed by a database name.' 'For example, if you have couch db installed on the machine you are currently using, you might enter: ' 'http://localhost:5984/psynteract') welcome.exec_() from libqtopensesame.dialogs.text_input import text_input psynteract_url = text_input(self.main_window) current_url = psynteract_url.get_input() from psynteract import install server_url = install(current_url) feedback = notification(self.main_window,'Your server is available at '+server_url) feedback.exec_()
def notify(self, msg, title=None, icon=None): """ Presents a default notification dialog. Arguments: msg -- The message to be shown. Keyword arguments: title -- A title message or None for default title. (default=None) icon -- A custom icon or None for default icon. (default=None) """ from libqtopensesame.dialogs.notification import notification nd = notification(self.main_window, msg=safe_decode(msg), title=title, icon=icon) nd.show()
def notify(self, msg, title=None, icon=None): """ Presents a default notification dialog. Arguments: msg -- The message to be shown. Keyword arguments: title -- A title message or None for default title. (default=None) icon -- A custom icon or None for default icon. (default=None) """ from libqtopensesame.dialogs.notification import notification nd = notification(self.main_window, msg=safe_decode(msg), title=title, icon=icon) nd.show()