myappid = u'isolver.markwrite.editor.version' # arbitrary string ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid) # Need to import pyTables module before pyqt imports pyh5 or error occurs when # openning an iohub datastore file. import tables import pyqtgraph as pg # # Switch to using white background and black foreground from pyqtgraph.Qt import QtGui from markwrite.gui.mainwin import MarkWriteMainWindow from markwrite.appdirs import AppDirs from markwrite.file_io import readPickle appdirs = AppDirs("MarkWrite") usersettings = readPickle(appdirs.user_config_dir,u'usersettings.pkl') app = QtGui.QApplication(sys.argv) from markwrite.gui.projectsettings import ProjectSettingsDialog _ = ProjectSettingsDialog(savedstate=usersettings) from markwrite.gui.projectsettings import SETTINGS pg.setConfigOption('background', SETTINGS['plotviews_background_color']) pg.setConfigOption('foreground', SETTINGS['plotviews_foreground_color']) wmwin = MarkWriteMainWindow(app) MarkWriteMainWindow._appdirs = appdirs wmwin.show() status = app.exec_() sys.exit(status)
# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import markwrite import sys if sys.platform == 'win32': # Work around so that MarkWrite app icon is also used as task bar icon. # http://stackoverflow.com/questions/1551605/how-to-set-applications-taskbar-icon-in-windows-7/1552105#1552105 import ctypes myappid = u'isolver.markwrite.editor.version' # arbitrary string ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid) import pyqtgraph as pg from markwrite.gui.mainwin import MarkWriteMainWindow # # Switch to using white background and black foreground pg.setConfigOption('background', markwrite.SETTINGS['plotviews_background_color']) pg.setConfigOption('foreground', markwrite.SETTINGS['plotviews_foreground_color']) wmwin = MarkWriteMainWindow(markwrite.app) MarkWriteMainWindow._appdirs = markwrite.appdirs wmwin.show() status = markwrite.app.exec_()