Пример #1
0
srcpath = os.path.dirname(os.path.realpath(sys.argv[0]))
sys.path.append(srcpath)

frozen = getattr(sys, "frozen", False)
RUNNING_FROM_FILE = not frozen

if frozen:
    os.environ['PATH'] += ";{}".format(os.path.join(srcpath, 'libs'))
    os.environ['PATH'] += ";{}".format(srcpath)
    os.environ["GDAL_DRIVER_PATH"] = os.path.join(srcpath, 'libs')
    os.environ["GDAL_DATA"] = os.path.join(srcpath, 'libs', 'gdal')

import roam.environ

with roam.environ.setup(logo=':/branding/config',
                        title="IntraMaps Roam Config Manager") as roamapp:
    import roam
    import roam.config
    import configmanager.logger
    from configmanager.ui.configmanagerdialog import ConfigManagerDialog

    roamapp.app.setStyleSheet(roam.roam_style.appstyle())
    dialog = ConfigManagerDialog(roamapp)
    roamapp.set_error_handler(dialog.raiseerror, configmanager.logger)

    projectpaths = roam.environ.projectpaths(roamapp.projectsroot,
                                             roam.config.settings)
    dialog.addprojectfolders(projectpaths)
    dialog.showMaximized()
Пример #2
0
import os
import sys
import functools

srcpath = os.path.dirname(os.path.realpath(sys.argv[0]))
sys.path.append(srcpath)

import roam.environ

with roam.environ.setup(logo=':/branding/logo', title="IntraMaps Roam Config Manager") as roamapp:
    import roam
    import roam.config
    import configmanager.logger
    from configmanager.ui.configmanagerdialog import ConfigManagerDialog

    dialog = ConfigManagerDialog()
    roamapp.set_error_handler(dialog.raiseerror, configmanager.logger)

    projectpaths = roam.environ.projectpaths(roamapp.projectsroot, roam.config.settings)
    dialog.addprojectfolders(projectpaths)
    dialog.showMaximized()

Пример #3
0
logger.info(QgsProviderRegistry.instance().pluginList())
logger.info(QgsApplication.libraryPaths())

logger.info("Roam Version: {}".format(roam.__version__))
logger.info("QGIS Version: {}".format(str(QGis.QGIS_VERSION)))

QApplication.setStyle("Plastique")
QApplication.setFont(QFont('Segoe UI'))
QApplication.setWindowIcon(QIcon(':/branding/logo'))
QApplication.setApplicationName("IntraMaps Roam Config Manager")

configmanager.settings.load(roamapp.settingspath)

projectpath = roam.environ.projectpath(sys.argv)
projects = list(roam.project.getProjects(projectpath))

def excepthook(errorhandler, exctype, value, traceback):
    logger.error("Uncaught exception", exc_info=(exctype, value, traceback))
    errorhandler(exctype, value, traceback)

dialog = ConfigManagerDialog(projectpath)
sys.excepthook = partial(excepthook, dialog.raiseerror)
dialog.loadprojects(projects)
dialog.showMaximized()

app.exec_()

configmanager.settings.save(roamapp.settingspath)

QgsApplication.exitQgis()
sys.exit()
Пример #4
0
import configmanager.logger as logger

from PyQt4.QtGui import QApplication, QFont, QIcon
from qgis.core import QGis
from configmanager.ui.configmanagerdialog import ConfigManagerDialog

logger.info("Loading Roam Config Manager")
logger.info("Roam Version: {}".format(roam.__version__))
logger.info("QGIS Version: {}".format(str(QGis.QGIS_VERSION)))

QApplication.setWindowIcon(QIcon(':/branding/logo'))
QApplication.setApplicationName("IntraMaps Roam Config Manager")

projectpaths = roam.environ.projectpaths(sys.argv, roamapp, roam.config.settings)
#projects = list(roam.project.getProjects(projectpaths))

def excepthook(errorhandler, exctype, value, traceback):
    logger.error("Uncaught exception", exc_info=(exctype, value, traceback))
    errorhandler(exctype, value, traceback)

dialog = ConfigManagerDialog()
sys.excepthook = functools.partial(excepthook, dialog.raiseerror)
dialog.addprojectfolders(projectpaths)
#dialog.loadprojects(projects)
dialog.show()
#dialog.showMaximized()

roamapp.exec_()
roam.config.save()
roamapp.exit()
Пример #5
0
logger.info(QgsProviderRegistry.instance().pluginList())
logger.info(QgsApplication.libraryPaths())

logger.info("Roam Version: {}".format(roam.__version__))
logger.info("QGIS Version: {}".format(str(QGis.QGIS_VERSION)))

QApplication.setStyle("Plastique")
QApplication.setFont(QFont('Segoe UI'))
QApplication.setWindowIcon(QIcon(':/branding/logo'))
QApplication.setApplicationName("IntraMaps Roam Config Manager")

import roam.config
roam.config.load(roamapp.settingspath)

projectpaths = roam.environ.projectpaths(sys.argv, roamapp)
projects = list(roam.project.getProjects(projectpaths))

def excepthook(errorhandler, exctype, value, traceback):
    logger.error("Uncaught exception", exc_info=(exctype, value, traceback))
    errorhandler(exctype, value, traceback)

dialog = ConfigManagerDialog(projectpaths[0])
sys.excepthook = partial(excepthook, dialog.raiseerror)
dialog.loadprojects(projects)
dialog.show()
#dialog.showMaximized()

roamapp.exec_()
roam.config.save()
roamapp.exit()
Пример #6
0
from qgis.core import QGis
from configmanager.ui.configmanagerdialog import ConfigManagerDialog

logger.info("Loading Roam Config Manager")
logger.info("Roam Version: {}".format(roam.__version__))
logger.info("QGIS Version: {}".format(str(QGis.QGIS_VERSION)))

QApplication.setWindowIcon(QIcon(':/branding/logo'))
QApplication.setApplicationName("IntraMaps Roam Config Manager")

projectpaths = roam.environ.projectpaths(sys.argv, roamapp,
                                         roam.config.settings)
#projects = list(roam.project.getProjects(projectpaths))


def excepthook(errorhandler, exctype, value, traceback):
    logger.error("Uncaught exception", exc_info=(exctype, value, traceback))
    errorhandler(exctype, value, traceback)


dialog = ConfigManagerDialog()
sys.excepthook = functools.partial(excepthook, dialog.raiseerror)
dialog.addprojectfolders(projectpaths)
#dialog.loadprojects(projects)
dialog.show()
#dialog.showMaximized()

roamapp.exec_()
roam.config.save()
roamapp.exit()