diff --git a/OrtoTools.py b/OrtoTools.py index 155d508..a1db00e 100644 --- a/OrtoTools.py +++ b/OrtoTools.py @@ -7,7 +7,7 @@ from qgis.utils import iface from .utils import WMS_SERVERS, WMS_SERVERS_GROUPS from .CustomMessageBox import CustomMessageBox -from .giap_layout import tr +from .utils import tr class OrtoAddingTool(object): diff --git a/Searcher/searchTool.py b/Searcher/searchTool.py index bd4f86d..75324ef 100644 --- a/Searcher/searchTool.py +++ b/Searcher/searchTool.py @@ -10,8 +10,6 @@ def __init__(self, dock, iface): self.dock = dock def run(self): - self.dock.toolButton_address.clicked.connect( - self.search_address) self.dock.lineEdit_address.returnPressed.connect( self.search_address) self.dock.comboBox_woj.currentIndexChanged.connect( diff --git a/config.json b/config.json index 0c47e28..d028b85 100644 --- a/config.json +++ b/config.json @@ -1 +1 @@ -[{"org_toolbars": ["mFileToolBar", "mLayerToolBar", "mDigitizeToolBar", "mMapNavToolBar", "mAttributesToolBar", "mPluginToolBar", "mLabelToolBar", "mSnappingToolBar", "mSelectionToolBar"], "styles": {"GIAP": "giap.qss", "ciemny": "wombat.qss"}, "ribbons_config": [{"tab_name": "Main", "sections": [{"label": "Project", "btn_size": 30, "btns": [["mActionOpenProject", 0, 0], ["mActionNewProject", 0, 1], ["mActionSaveProject", 1, 0], ["mActionSaveProjectAs", 1, 1]]}, {"label": "Navigation", "btn_size": 30, "btns": [["mActionPan", 0, 0], ["mActionZoomIn", 0, 1], ["mActionZoomOut", 0, 2], ["mActionZoomFullExtent", 0, 3], ["mActionZoomToLayer", 1, 0], ["mActionZoomToSelected", 1, 1], ["mActionZoomLast", 1, 2], ["mActionZoomNext", 1, 3]]}, {"label": "Attributes", "btn_size": 30, "btns": [["mActionIdentify", 0, 0], ["mActionSelectFeatures", 0, 1], ["mActionDeselectAll", 1, 0], ["mActionOpenTable", 1, 1]]}, {"label": "Measures", "btn_size": 30, "btns": [["mActionMeasure", 0, 0], ["mActionMeasureArea", 0, 1], ["mActionMeasureAngle", 1, 0]]}, {"label": "Layers", "btn_size": 30, "btns": [["mActionAddOgrLayer", 0, 0], ["mActionAddWmsLayer", 0, 1], ["mActionAddPgLayer", 0, 2], ["mActionAddMeshLayer", 0, 3], ["mActionAddWcsLayer", 0, 4], ["mActionAddDelimitedText", 0, 5], ["mActionAddRasterLayer", 1, 0], ["mActionAddWfsLayer", 1, 1], ["mActionAddSpatiaLiteLayer", 1, 2], ["mActionAddVirtualLayer", 1, 3], ["mActionNewMemoryLayer", 1, 4]]}]}, {"tab_name": "Tools", "sections": [{"label": "Adv. Attributes", "btn_size": 30, "btns": [["mActionIdentify", 0, 0], ["mActionSelectFeatures", 0, 1], ["mActionSelectPolygon", 0, 2], ["mActionSelectByExpression", 0, 3], ["mActionInvertSelection", 0, 4], ["mActionDeselectAll", 0, 5], ["mActionOpenTable", 1, 0], ["mActionStatisticalSummary", 1, 1], ["mActionOpenFieldCalc", 1, 2], ["mActionMapTips", 1, 3], ["mActionNewBookmark", 1, 4], ["mActionShowBookmarks", 1, 5]]}, {"label": "Labels", "btn_size": 30, "btns": [["mActionLabeling", 0, 0], ["mActionChangeLabelProperties", 0, 1], ["mActionPinLabels", 0, 2], ["mActionShowPinnedLabels", 0, 3], ["mActionShowHideLabels", 0, 4], ["mActionMoveLabel", 1, 0], ["mActionRotateLabel", 1, 1], ["mActionDiagramProperties", 1, 2], ["mActionShowUnplacedLabels", 1, 3]]}, {"label": "Vector", "btn_size": 30, "btns": [["mActionToggleEditing", 0, 0], ["mActionSaveLayerEdits", 0, 1], ["mActionVertexTool", 0, 2], ["mActionUndo", 0, 3], ["mActionRedo", 0, 4], ["mActionAddFeature", 1, 0], ["mActionMoveFeature", 1, 1], ["mActionDeleteSelected", 1, 2], ["mActionCutFeatures", 1, 3], ["mActionCopyFeatures", 1, 4], ["mActionPasteFeatures", 1, 5]]}, {"label": "Digitalization", "btn_size": 30, "btns": [["EnableSnappingAction", 0, 0], ["EnableTracingAction", 0, 1], ["mActionRotateFeature", 0, 2], ["mActionSimplifyFeature", 0, 3], ["mActionAddRing", 0, 4], ["mActionAddPart", 0, 5], ["mActionFillRing", 0, 6], ["mActionOffsetCurve", 0, 7], ["mActionCircularStringCurvePoint", 0, 8], ["mActionDeleteRing", 1, 0], ["mActionDeletePart", 1, 1], ["mActionReshapeFeatures", 1, 2], ["mActionSplitParts", 1, 3], ["mActionSplitFeatures", 1, 4], ["mActionMergeFeatureAttributes", 1, 5], ["mActionMergeFeatures", 1, 6], ["mActionReverseLine", 1, 7], ["mActionTrimExtendFeature", 1, 8]]}]}, {"tab_name": "GIAP Tools", "sections": [{"label": "Prints", "btn_size": 30, "btns": [["mActionNewPrintLayout", 0, 0], ["giapMyPrints", 0, 1], ["mActionShowLayoutManager", 1, 0], ["giapQuickPrint", 1, 1]]}, {"label": "GIAP Tools", "btn_size": 60, "btns": [["giapCompositions", 0, 0], ["giapWMS", 0, 1]]}]}, {"tab_name": "Vector", "sections": [{"label": "Geoprocessing", "btn_size": 30, "btns": [["mProcessingUserMenu_native:buffer", 0, 0], ["mProcessingUserMenu_native:convexhull", 0, 1], ["mProcessingUserMenu_native:difference", 0, 2], ["mProcessingUserMenu_native:dissolve", 0, 3], ["mProcessingUserMenu_qgis:eliminateselectedpolygons", 0, 4], ["mProcessingUserMenu_native:clip", 1, 0], ["mProcessingUserMenu_native:intersection", 1, 1], ["mProcessingUserMenu_native:symmetricaldifference", 1, 2], ["mProcessingUserMenu_native:union", 1, 3]]}, {"label": "Geometry", "btn_size": 30, "btns": [["mProcessingUserMenu_native:centroids", 0, 0], ["mProcessingUserMenu_native:collect", 0, 1], ["mProcessingUserMenu_native:densifygeometries", 0, 2], ["mProcessingUserMenu_native:extractvertices", 0, 3], ["mProcessingUserMenu_native:multiparttosingleparts", 0, 4], ["mProcessingUserMenu_native:polygonstolines", 0, 5], ["mProcessingUserMenu_native:simplifygeometries", 1, 0], ["mProcessingUserMenu_qgis:checkvalidity", 1, 1], ["mProcessingUserMenu_qgis:delaunaytriangulation", 1, 2], ["mProcessingUserMenu_qgis:exportaddgeometrycolumns", 1, 3], ["mProcessingUserMenu_qgis:linestopolygons", 1, 4], ["mProcessingUserMenu_qgis:voronoipolygons", 1, 5]]}, {"label": "Analysis", "btn_size": 30, "btns": [["mProcessingUserMenu_native:countpointsinpolygon", 0, 0], ["mProcessingUserMenu_native:lineintersections", 0, 1], ["mProcessingUserMenu_native:meancoordinates", 0, 2], ["mProcessingUserMenu_native:nearestneighbouranalysis", 0, 3], ["mProcessingUserMenu_native:sumlinelengths", 1, 0], ["mProcessingUserMenu_qgis:basicstatisticsforfields", 1, 1], ["mProcessingUserMenu_qgis:distancematrix", 1, 2], ["mProcessingUserMenu_qgis:listuniquevalues", 1, 3]]}, {"label": "Research", "btn_size": 30, "btns": [["mProcessingUserMenu_native:creategrid", 0, 0], ["mProcessingUserMenu_native:polygonfromlayerextent", 0, 1], ["mProcessingUserMenu_native:randompointsinextent", 0, 2], ["mProcessingUserMenu_native:randompointsinpolygons", 0, 3], ["mProcessingUserMenu_native:randompointsonlines", 0, 4], ["mProcessingUserMenu_native:selectbylocation", 0, 5], ["mProcessingUserMenu_qgis:randompointsinlayerbounds", 1, 0], ["mProcessingUserMenu_qgis:randompointsinsidepolygons", 1, 1], ["mProcessingUserMenu_qgis:randomselection", 1, 2], ["mProcessingUserMenu_qgis:randomselectionwithinsubsets", 1, 3], ["mProcessingUserMenu_qgis:regularpoints", 1, 4]]}, {"label": "Data tools", "btn_size": 30, "btns": [["mProcessingUserMenu_native:createspatialindex", 0, 0], ["mProcessingUserMenu_native:joinattributesbylocation", 0, 1], ["mProcessingUserMenu_native:mergevectorlayers", 0, 2], ["mProcessingUserMenu_native:reprojectlayer", 1, 0], ["mProcessingUserMenu_native:splitvectorlayer", 1, 1]]}]}, {"tab_name": "Raster", "sections": [{"label": "Raster", "btn_size": 60, "btns": [["mActionShowRasterCalculator", 0, 0], ["mActionShowGeoreferencer", 0, 1], ["mActionShowAlignRasterTool", 0, 2]]}, {"label": "Raster analysis", "btn_size": 30, "btns": [["mProcessingUserMenu_gdal:aspect", 0, 0], ["mProcessingUserMenu_gdal:fillnodata", 0, 1], ["mProcessingUserMenu_gdal:gridaverage", 0, 2], ["mProcessingUserMenu_gdal:griddatametrics", 0, 3], ["mProcessingUserMenu_gdal:gridinversedistance", 0, 4], ["mProcessingUserMenu_gdal:gridnearestneighbor", 0, 5], ["mProcessingUserMenu_gdal:hillshade", 0, 6], ["mProcessingUserMenu_gdal:nearblack", 1, 0], ["mProcessingUserMenu_gdal:proximity", 1, 1], ["mProcessingUserMenu_gdal:roughness", 1, 2], ["mProcessingUserMenu_gdal:sieve", 1, 3], ["mProcessingUserMenu_gdal:slope", 1, 4], ["mProcessingUserMenu_gdal:tpitopographicpositionindex", 1, 5], ["mProcessingUserMenu_gdal:triterrainruggednessindex", 1, 6]]}, {"label": "Projections", "btn_size": 60, "btns": [["mProcessingUserMenu_gdal:warpreproject", 0, 0], ["mProcessingUserMenu_gdal:assignprojection", 0, 1], ["mProcessingUserMenu_gdal:extractprojection", 0, 2]]}, {"label": "Miscellaneous", "btn_size": 30, "btns": [["mProcessingUserMenu_gdal:buildvirtualraster", 0, 0], ["mProcessingUserMenu_gdal:gdalinfo", 0, 1], ["mProcessingUserMenu_gdal:merge", 0, 2], ["mProcessingUserMenu_gdal:overviews", 1, 0], ["mProcessingUserMenu_gdal:tileindex", 1, 1]]}, {"label": "Extract", "btn_size": 30, "btns": [["mProcessingUserMenu_gdal:cliprasterbyextent", 0, 0], ["mProcessingUserMenu_gdal:cliprasterbymasklayer", 0, 1], ["mProcessingUserMenu_gdal:contour", 1, 0]]}, {"label": "Conversion", "btn_size": 30, "btns": [["mProcessingUserMenu_gdal:pcttorgb", 0, 0], ["mProcessingUserMenu_gdal:rgbtopct", 0, 1], ["mProcessingUserMenu_gdal:polygonize", 0, 2], ["mProcessingUserMenu_gdal:rasterize", 1, 0], ["mProcessingUserMenu_gdal:translate", 1, 1]]}]}], "active_style": "GIAP"}] \ No newline at end of file +[{"org_toolbars": ["mFileToolBar", "mLayerToolBar", "mDigitizeToolBar", "mMapNavToolBar", "mAttributesToolBar", "mPluginToolBar", "mLabelToolBar", "mSnappingToolBar", "mSelectionToolBar"], "styles": {"GIAP": "giap.qss", "ciemny": "wombat.qss"}, "ribbons_config": [{"tab_name": "Main", "sections": [{"label": "Project", "btn_size": 30, "btns": [["mActionOpenProject", 0, 0], ["mActionNewProject", 0, 1], ["mActionSaveProject", 1, 0], ["mActionSaveProjectAs", 1, 1]]}, {"label": "Navigation", "btn_size": 30, "btns": [["mActionPan", 0, 0], ["mActionZoomIn", 0, 1], ["mActionZoomOut", 0, 2], ["mActionZoomFullExtent", 0, 3], ["mActionZoomToLayer", 1, 0], ["mActionZoomToSelected", 1, 1], ["mActionZoomLast", 1, 2], ["mActionZoomNext", 1, 3]]}, {"label": "Attributes", "btn_size": 30, "btns": [["mActionIdentify", 0, 0], ["mActionSelectFeatures", 0, 1], ["mActionDeselectAll", 1, 0], ["mActionOpenTable", 1, 1]]}, {"label": "Measures", "btn_size": 30, "btns": [["mActionMeasure", 0, 0], ["mActionMeasureArea", 0, 1], ["mActionMeasureAngle", 1, 0]]}, {"label": "Layers", "btn_size": 30, "btns": [["mActionAddOgrLayer", 0, 0], ["mActionAddWmsLayer", 0, 1], ["mActionAddPgLayer", 0, 2], ["mActionAddMeshLayer", 0, 3], ["mActionAddWcsLayer", 0, 4], ["mActionAddDelimitedText", 0, 5], ["mActionAddRasterLayer", 1, 0], ["mActionAddWfsLayer", 1, 1], ["mActionAddSpatiaLiteLayer", 1, 2], ["mActionAddVirtualLayer", 1, 3], ["mActionNewMemoryLayer", 1, 4]]}, {"label": "Prints", "btn_size": 30, "btns": [["mActionNewPrintLayout", 0, 0], ["giapMyPrints", 0, 1], ["mActionShowLayoutManager", 1, 0]]}]}, {"tab_name": "Tools", "sections": [{"label": "Adv. Attributes", "btn_size": 30, "btns": [["mActionIdentify", 0, 0], ["mActionSelectFeatures", 0, 1], ["mActionSelectPolygon", 0, 2], ["mActionSelectByExpression", 0, 3], ["mActionInvertSelection", 0, 4], ["mActionDeselectAll", 0, 5], ["mActionOpenTable", 1, 0], ["mActionStatisticalSummary", 1, 1], ["mActionOpenFieldCalc", 1, 2], ["mActionMapTips", 1, 3], ["mActionNewBookmark", 1, 4], ["mActionShowBookmarks", 1, 5]]}, {"label": "Labels", "btn_size": 30, "btns": [["mActionLabeling", 0, 0], ["mActionChangeLabelProperties", 0, 1], ["mActionPinLabels", 0, 2], ["mActionShowPinnedLabels", 0, 3], ["mActionShowHideLabels", 0, 4], ["mActionMoveLabel", 1, 0], ["mActionRotateLabel", 1, 1], ["mActionDiagramProperties", 1, 2], ["mActionShowUnplacedLabels", 1, 3]]}, {"label": "Vector", "btn_size": 30, "btns": [["mActionToggleEditing", 0, 0], ["mActionSaveLayerEdits", 0, 1], ["mActionVertexTool", 0, 2], ["mActionUndo", 0, 3], ["mActionRedo", 0, 4], ["mActionAddFeature", 1, 0], ["mActionMoveFeature", 1, 1], ["mActionDeleteSelected", 1, 2], ["mActionCutFeatures", 1, 3], ["mActionCopyFeatures", 1, 4], ["mActionPasteFeatures", 1, 5]]}, {"label": "Digitalization", "btn_size": 30, "btns": [["EnableSnappingAction", 0, 0], ["EnableTracingAction", 0, 1], ["mActionRotateFeature", 0, 2], ["mActionSimplifyFeature", 0, 3], ["mActionAddRing", 0, 4], ["mActionAddPart", 0, 5], ["mActionFillRing", 0, 6], ["mActionOffsetCurve", 0, 7], ["mActionCircularStringCurvePoint", 0, 8], ["mActionDeleteRing", 1, 0], ["mActionDeletePart", 1, 1], ["mActionReshapeFeatures", 1, 2], ["mActionSplitParts", 1, 3], ["mActionSplitFeatures", 1, 4], ["mActionMergeFeatureAttributes", 1, 5], ["mActionMergeFeatures", 1, 6], ["mActionReverseLine", 1, 7], ["mActionTrimExtendFeature", 1, 8]]}]}, {"tab_name": "Vector", "sections": [{"label": "Geoprocessing", "btn_size": 30, "btns": [["mProcessingUserMenu_native:buffer", 0, 0], ["mProcessingUserMenu_native:convexhull", 0, 1], ["mProcessingUserMenu_native:difference", 0, 2], ["mProcessingUserMenu_native:dissolve", 0, 3], ["mProcessingUserMenu_qgis:eliminateselectedpolygons", 0, 4], ["mProcessingUserMenu_native:clip", 1, 0], ["mProcessingUserMenu_native:intersection", 1, 1], ["mProcessingUserMenu_native:symmetricaldifference", 1, 2], ["mProcessingUserMenu_native:union", 1, 3]]}, {"label": "Geometry", "btn_size": 30, "btns": [["mProcessingUserMenu_native:centroids", 0, 0], ["mProcessingUserMenu_native:collect", 0, 1], ["mProcessingUserMenu_native:densifygeometries", 0, 2], ["mProcessingUserMenu_native:extractvertices", 0, 3], ["mProcessingUserMenu_native:multiparttosingleparts", 0, 4], ["mProcessingUserMenu_native:polygonstolines", 0, 5], ["mProcessingUserMenu_native:simplifygeometries", 1, 0], ["mProcessingUserMenu_qgis:checkvalidity", 1, 1], ["mProcessingUserMenu_qgis:delaunaytriangulation", 1, 2], ["mProcessingUserMenu_qgis:exportaddgeometrycolumns", 1, 3], ["mProcessingUserMenu_qgis:linestopolygons", 1, 4], ["mProcessingUserMenu_qgis:voronoipolygons", 1, 5]]}, {"label": "Analysis", "btn_size": 30, "btns": [["mProcessingUserMenu_native:countpointsinpolygon", 0, 0], ["mProcessingUserMenu_native:lineintersections", 0, 1], ["mProcessingUserMenu_native:meancoordinates", 0, 2], ["mProcessingUserMenu_native:nearestneighbouranalysis", 0, 3], ["mProcessingUserMenu_native:sumlinelengths", 1, 0], ["mProcessingUserMenu_qgis:basicstatisticsforfields", 1, 1], ["mProcessingUserMenu_qgis:distancematrix", 1, 2], ["mProcessingUserMenu_qgis:listuniquevalues", 1, 3]]}, {"label": "Research", "btn_size": 30, "btns": [["mProcessingUserMenu_native:creategrid", 0, 0], ["mProcessingUserMenu_native:polygonfromlayerextent", 0, 1], ["mProcessingUserMenu_native:randompointsinextent", 0, 2], ["mProcessingUserMenu_native:randompointsinpolygons", 0, 3], ["mProcessingUserMenu_native:randompointsonlines", 0, 4], ["mProcessingUserMenu_native:selectbylocation", 0, 5], ["mProcessingUserMenu_qgis:randompointsinlayerbounds", 1, 0], ["mProcessingUserMenu_qgis:randompointsinsidepolygons", 1, 1], ["mProcessingUserMenu_qgis:randomselection", 1, 2], ["mProcessingUserMenu_qgis:randomselectionwithinsubsets", 1, 3], ["mProcessingUserMenu_qgis:regularpoints", 1, 4]]}, {"label": "Data tools", "btn_size": 30, "btns": [["mProcessingUserMenu_native:createspatialindex", 0, 0], ["mProcessingUserMenu_native:joinattributesbylocation", 0, 1], ["mProcessingUserMenu_native:mergevectorlayers", 0, 2], ["mProcessingUserMenu_native:reprojectlayer", 1, 0], ["mProcessingUserMenu_native:splitvectorlayer", 1, 1]]}]}, {"tab_name": "Raster", "sections": [{"label": "Raster", "btn_size": 60, "btns": [["mActionShowRasterCalculator", 0, 0], ["mActionShowGeoreferencer", 0, 1], ["mActionShowAlignRasterTool", 0, 2]]}, {"label": "Raster analysis", "btn_size": 30, "btns": [["mProcessingUserMenu_gdal:aspect", 0, 0], ["mProcessingUserMenu_gdal:fillnodata", 0, 1], ["mProcessingUserMenu_gdal:gridaverage", 0, 2], ["mProcessingUserMenu_gdal:griddatametrics", 0, 3], ["mProcessingUserMenu_gdal:gridinversedistance", 0, 4], ["mProcessingUserMenu_gdal:gridnearestneighbor", 0, 5], ["mProcessingUserMenu_gdal:hillshade", 0, 6], ["mProcessingUserMenu_gdal:nearblack", 1, 0], ["mProcessingUserMenu_gdal:proximity", 1, 1], ["mProcessingUserMenu_gdal:roughness", 1, 2], ["mProcessingUserMenu_gdal:sieve", 1, 3], ["mProcessingUserMenu_gdal:slope", 1, 4], ["mProcessingUserMenu_gdal:tpitopographicpositionindex", 1, 5], ["mProcessingUserMenu_gdal:triterrainruggednessindex", 1, 6]]}, {"label": "Projections", "btn_size": 60, "btns": [["mProcessingUserMenu_gdal:warpreproject", 0, 0], ["mProcessingUserMenu_gdal:assignprojection", 0, 1], ["mProcessingUserMenu_gdal:extractprojection", 0, 2]]}, {"label": "Miscellaneous", "btn_size": 30, "btns": [["mProcessingUserMenu_gdal:buildvirtualraster", 0, 0], ["mProcessingUserMenu_gdal:gdalinfo", 0, 1], ["mProcessingUserMenu_gdal:merge", 0, 2], ["mProcessingUserMenu_gdal:overviews", 1, 0], ["mProcessingUserMenu_gdal:tileindex", 1, 1]]}, {"label": "Extract", "btn_size": 30, "btns": [["mProcessingUserMenu_gdal:cliprasterbyextent", 0, 0], ["mProcessingUserMenu_gdal:cliprasterbymasklayer", 0, 1], ["mProcessingUserMenu_gdal:contour", 1, 0]]}, {"label": "Conversion", "btn_size": 30, "btns": [["mProcessingUserMenu_gdal:pcttorgb", 0, 0], ["mProcessingUserMenu_gdal:rgbtopct", 0, 1], ["mProcessingUserMenu_gdal:polygonize", 0, 2], ["mProcessingUserMenu_gdal:rasterize", 1, 0], ["mProcessingUserMenu_gdal:translate", 1, 1]]}]}], "active_style": "GIAP"}] \ No newline at end of file diff --git a/giap_dynamic_layout.ui b/giap_dynamic_layout.ui index d1f8515..6c0071f 100644 --- a/giap_dynamic_layout.ui +++ b/giap_dynamic_layout.ui @@ -13,13 +13,13 @@ 1291 - 167 + 150 1291000 - 178 + 179 @@ -49,12 +49,6 @@ - - - 0 - 0 - - 0 @@ -200,6 +194,9 @@ 16777215 + + Enter the data according to the scheme: TERYT: 146513_8.1016.17/2 or fill in the previous fields and indicate the parcel number, e.g. 17/2 + @@ -236,18 +233,14 @@ 26 + + Enter the data according to the scheme: for the address point: Warszawa, Pasaż Ursynowski 1, for the street: Warszawa, Pasaż Ursynowsk + - address - - - - - - - Search + Search address point @@ -264,6 +257,48 @@ + + + + color: rgb(255, 255, 255); +font: 87 10pt "Arial Black"; + + + Narzędzia GIAP + + + + + + + ... + + + + + + + ... + + + + + + + ... + + + + + + + Turn off or turn on search tool + + + ... + + + diff --git a/giap_layout.py b/giap_layout.py index 866e08e..8907fc8 100644 --- a/giap_layout.py +++ b/giap_layout.py @@ -9,6 +9,8 @@ # Initialize Qt resources from file resources.py from qgis._core import QgsProject, Qgis + +from .OrtoTools import OrtoAddingTool from .QuickPrint import PrintMapTool from .Kompozycje.Kompozycje import CompositionsTool @@ -23,7 +25,7 @@ from .StyleManager.stylemanager import StyleManagerDialog from .Searcher.searchTool import SearcherTool -from .giap_dynamic_layout import Widget +from .giap_dynamic_layout import Widget, CustomToolButton from .ribbon_config import RIBBON_DEFAULT project = QgsProject.instance() @@ -58,6 +60,7 @@ def __init__(self, iface): # initialize StyleManager for styling handling self.style_manager = StyleManager(self) + self.print_map_tool = PrintMapTool(self.iface) self.iface.projectRead.connect(self.projekt_wczytany) self.iface.newProjectCreated.connect(self.projekt_wczytany) @@ -122,6 +125,23 @@ def initGui(self): os.path.abspath(project.fileName())) self.toolbar.show() + #tools under GIAP logo + self.main_widget.runQuickPrintButton.clicked.connect(self.print_map_tool.run) + self.main_widget.runQuickPrintButton.setToolTip(tr("Map fast print")) + self.main_widget.runQuickPrintButton.setIcon(QIcon(f'{self.plugin_dir}/icons/quick_print.png')) + + self.main_widget.runCompositionButton.clicked.connect(self.kompozycje.config) + self.main_widget.runCompositionButton.setIcon(QIcon(f'{self.plugin_dir}/icons/compositions_giap.png')) + self.main_widget.runCompositionButton.setToolTip(tr("Composition settings")) + + orto_button = self.main_widget.runOrtoTool + orto_button.setIcon(QIcon(f'{self.plugin_dir}/icons/orto_icon2.png')) + self.orto = OrtoAddingTool(self.main_widget, orto_button) + + self.visibility_search_tool = False + self.main_widget.offOnSearchButton.clicked.connect(lambda: self.off_on_search_tool(self.visibility_search_tool)) + self.main_widget.offOnSearchButton.setIcon(QIcon(f'{self.plugin_dir}/styles/giap/icons/close.png')) + self.searcher.run() # set strong focus to get keypressevent self.main_widget.setFocusPolicy(Qt.StrongFocus) @@ -153,10 +173,18 @@ def load_ribbons(self): # turn off ribbon editing self.main_widget.edit_session_toggle() + def off_on_search_tool(self, visibility): + elements = ['comboBox_woj', 'comboBox_pow', 'comboBox_gmina', 'comboBox_obr', + 'lineEdit_parcel', 'toolButton_parcel', 'lineEdit_address', + 'line', 'line_2'] + + for elem in elements: + getattr(self.main_widget, elem).setVisible(visibility) + self.visibility_search_tool = not visibility + def custom_prints(self): """Load custom tools to qgis""" self.quick_print = PrintMapTool(self.iface, self.main_widget) - b_qprints = self.main_widget.findChildren( QToolButton, 'giapQuickPrint') for b_qprint in b_qprints: diff --git a/i18n/giap_pl.qm b/i18n/giap_pl.qm index c5965ea..fc8896f 100644 Binary files a/i18n/giap_pl.qm and b/i18n/giap_pl.qm differ diff --git a/i18n/giap_pl.ts b/i18n/giap_pl.ts index 779f346..16d1fdb 100644 --- a/i18n/giap_pl.ts +++ b/i18n/giap_pl.ts @@ -588,6 +588,21 @@ Porszę czekać... parcel number or TERYT nr działki lub TERYT + + + Enter the data according to the scheme: TERYT: 146513_8.1016.17/2 or fill in the previous fields and indicate the parcel number, e.g. 17/2 + Wpisz dane według schematu: TERYT: 146513_8.1016.17/2 lub uzupełnij wcześniejsze pola i wskaż numer działki np. 17/2 + + + + Enter the data according to the scheme: for the address point: Warszawa, Pasaż Ursynowski 1, for the street: Warszawa, Pasaż Ursynowsk + Wpisz dane według schematu: dla punktu adresowego: Warszawa, Pasaż Ursynowski 1, dla ulicy: Warszawa, Pasaż Ursynowski + + + + Search address point + Wyszukaj punkt adresowy + Search @@ -598,6 +613,11 @@ Porszę czekać... address adres + + + Turn off or turn on search tool + Wyłącz lub włącz wyszukiwarke + KompozycjeDialog diff --git a/ribbon_config.py b/ribbon_config.py index d928554..a63fcd1 100644 --- a/ribbon_config.py +++ b/ribbon_config.py @@ -73,6 +73,17 @@ ], }, + { + 'label': tr('Prints'), + 'id': 'Prints', + 'btn_size': 30, + 'btns': [ + ['mActionNewPrintLayout', 0, 0], + ['giapMyPrints', 0, 1], + ['mActionShowLayoutManager', 1, 0], + ] + }, + ] }, @@ -163,35 +174,6 @@ ] }, - { - "tab_name": tr("GIAP Tools"), - "tab_id": "GIAP Tools", - "sections": [ - { - 'label': tr('Prints'), - 'id': 'Prints', - 'btn_size': 30, - 'btns': [ - ['mActionNewPrintLayout', 0, 0], - ['giapMyPrints', 0, 1], - ['mActionShowLayoutManager', 1, 0], - ['giapQuickPrint', 1, 1], - ] - }, - - { - 'label': tr('GIAP Tools'), - 'id': 'GIAP Tools', - 'btn_size': 60, - 'btns': [ - ['giapCompositions', 0, 0], - ['giapWMS', 0, 1], - ] - }, - - ] - }, - { "tab_name": tr("Vector"), "tab_id": "Vector", diff --git a/utils.py b/utils.py index 79deedc..dd149a1 100644 --- a/utils.py +++ b/utils.py @@ -481,4 +481,4 @@ def get_project_config(parameter, key, default=''): ] -DEFAULT_TABS = ['Main', 'Tools', 'GIAP Tools', 'Vector', 'Raster'] +DEFAULT_TABS = ['Main', 'Tools', 'Vector', 'Raster']