Exemple #1
0
    py2exe_release = True
except ImportError:
    py2exe_release = False

from openalea.plantgl.gui.qt.QtCore import *
from openalea.plantgl.gui.qt.QtGui import *
from openalea.plantgl.gui.qt.QtWidgets import *

import os

if not py2exe_release:
    from openalea.plantscan3d import ui_compiler as cui

    ldir = os.path.dirname(__file__)
    cui.check_ui_generation(os.path.join(ldir, 'segmenteditor.ui'))

from . import segmenteditor_ui


class SegmentEditor(QMainWindow, segmenteditor_ui.Ui_MainWindow):
    def __init__(self, parent=None):
        QMainWindow.__init__(self, parent)
        segmenteditor_ui.Ui_MainWindow.__init__(self)
        self.setupUi(self)

        self.gleditor.set_selectable_trees.connect(self.setTrees)
        self.actionExport_Points.triggered.connect(self.gleditor.exportPoints)

        self.db_instance = None
Exemple #2
0
try:
    import openalea.plantscan3d.py2exe_release

    py2exe_release = True
    print('Py2ExeRelease')
except ImportError:
    py2exe_release = False
    print('StdRelease')

from openalea.plantgl.gui.qt.QtCore import *
from openalea.plantgl.gui.qt.QtGui import *
from openalea.plantgl.gui.qt.QtWidgets import *

import os

if not py2exe_release:
    import openalea.plantscan3d.ui_compiler as cui

    ldir = os.path.dirname(__file__)
    cui.check_ui_generation(os.path.join(ldir, 'db_connection.ui'))

from . import db_connection_ui


class DatabaseConnection(QDialog, db_connection_ui.Ui_Dialog):
    def __init__(self, parent=None):
        QDialog.__init__(self, parent)
        db_connection_ui.Ui_Dialog.__init__(self)
        self.setupUi(self)
Exemple #3
0
    py2exe_release = True
    print('Py2ExeRelease')
except ImportError:
    py2exe_release = False
    print('StdRelease')

from openalea.plantgl.gui.qt.QtCore import *
from openalea.plantgl.gui.qt.QtGui import *

import os

if not py2exe_release:
    import openalea.plantscan3d.ui_compiler as cui

    ldir = os.path.dirname(__file__)
    cui.check_ui_generation(os.path.join(ldir, 'database_item.ui'))

from . import database_item_ui
import datetime
from .properties.properties import *
from .server_manip import MongoDBManip, Binary, ObjectId, Already_used_key_db
from .tags_editor import TagsEditor


class Database_Item(QDialog, database_item_ui.Ui_Dialog):
    otherProperties = None  # type: dict[str, Property]
    MODIFY, INSERT, INSERT_CHILD = 1, 2, 4

    inserted = pyqtSignal(dict)
    modified = pyqtSignal(ObjectId, dict)
Exemple #4
0
    print('Py2ExeRelease')
except ImportError:
    py2exe_release = False
    print('StdRelease')

from openalea.plantgl.gui.qt.QtCore import *
from openalea.plantgl.gui.qt.QtGui import *
from openalea.plantgl.gui.qt.QtWidgets import *

import os

if not py2exe_release:
    import openalea.plantscan3d.ui_compiler as cui

    ldir = os.path.dirname(__file__)
    cui.check_ui_generation(os.path.join(ldir, 'create_property.ui'))
    cui.check_ui_generation(os.path.join(ldir, 'textprop.ui'))
    cui.check_ui_generation(os.path.join(ldir, 'dateprop.ui'))
    cui.check_ui_generation(os.path.join(ldir, 'floatvalueprop.ui'))

from . import create_property_ui
from . import textprop_ui
from . import dateprop_ui
from . import floatvalueprop_ui


class Property(QWidget):
    delete = pyqtSignal(str)

    def __init__(self, property_name, parent=None):
        QWidget.__init__(self, parent)
Exemple #5
0
    py2exe_release = True
    print('Py2ExeRelease')
except ImportError:
    py2exe_release = False
    print('StdRelease')

from openalea.plantgl.gui.qt.QtCore import *
from openalea.plantgl.gui.qt.QtGui import *

import os

if not py2exe_release:
    import openalea.plantscan3d.ui_compiler as cui

    ldir = os.path.dirname(__file__)
    cui.check_ui_generation(os.path.join(ldir, 'tags_editor.ui'))

from . import tags_editor_ui
from .server_manip import MongoDBManip


class TagsEditor(QDialog, tags_editor_ui.Ui_Dialog):
    def __init__(self, item_id, parent=None):
        QDialog.__init__(self, parent)
        tags_editor_ui.Ui_Dialog.__init__(self)
        self.setupUi(self)
        self.tags_ref = {}
        self.item_id = item_id

        self.init_view()