File tree 6 files changed +16
-8
lines changed
6 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 4
4
from typing import TYPE_CHECKING , Sequence
5
5
6
6
if TYPE_CHECKING :
7
- from qgis .core import QgsMapLayer , QgsVectorLayer
7
+ from qgis .core import QgsVectorLayer
8
8
from qgis .gui import QgsDoubleSpinBox , QgsSpinBox
9
9
from qgis .PyQt .QtGui import QIcon
10
10
from qgis .PyQt .QtWidgets import QLineEdit
@@ -15,7 +15,7 @@ class FeatureAttribute:
15
15
name : str
16
16
display_name : str
17
17
feature_attribte_group : str
18
- attribute_layer : QgsMapLayer # Is this correct type?
18
+ # attribute_layer: QgsMapLayer # Is this correct type?
19
19
additional_information : str
20
20
input_field_type : QLineEdit | QgsSpinBox | QgsDoubleSpinBox | None
21
21
modifiable : bool = False
Original file line number Diff line number Diff line change
1
+ from importlib import resources
2
+
3
+ from qgis .PyQt import uic
1
4
from qgis .PyQt .QtWidgets import QDialog
2
5
3
6
from arho_feature_template .core .feature_template import FeatureTemplate
4
- from arho_feature_template .qgis_plugin_tools .tools .resources import load_ui
5
7
8
+ ui_path = resources .files (__package__ ) / "feature_attribute_form.ui"
9
+ FormClass , _ = uic .loadUiType (ui_path )
6
10
7
- class FeatureAttributeForm (QDialog , load_ui ( "feature_attribute_form.ui" ) ):
11
+ class FeatureAttributeForm (QDialog , FormClass ):
8
12
"""Parent class for feature forms for adding and modifying feature attribute data."""
9
13
10
14
def __init__ (self , feature_template : FeatureTemplate ):
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ from importlib import resources
2
+
3
+ from qgis .PyQt import uic
1
4
from qgis .PyQt .QtWidgets import QWidget
2
5
3
6
from arho_feature_template .core .feature_template_library import FeatureTemplateLibrary
4
- from arho_feature_template .qgis_plugin_tools .tools .resources import load_ui
5
7
8
+ ui_path = resources .files (__package__ ) / "template_library_panel.ui"
9
+ FormClass , _ = uic .loadUiType (ui_path )
6
10
7
- class AddFeaturePanel (QWidget , load_ui ( "add_feature_panel.ui" ) ):
11
+ class TemplateLibraryPanel (QWidget , FormClass ):
8
12
"""Dock widget for selecting a feature template."""
9
13
10
14
def __init__ (self , feature_template_library : FeatureTemplateLibrary ):
File renamed without changes.
Original file line number Diff line number Diff line change 9
9
from qgis .utils import iface
10
10
11
11
from arho_feature_template .core .feature_template_library import FeatureTemplateLibrary
12
- from arho_feature_template .core .panels .add_feature_panel import AddFeaturePanel
12
+ from arho_feature_template .core .panels .template_library_panel import TemplateLibraryPanel
13
13
from arho_feature_template .qgis_plugin_tools .tools .custom_logging import setup_logger , teardown_logger
14
14
from arho_feature_template .qgis_plugin_tools .tools .i18n import setup_translation
15
15
from arho_feature_template .qgis_plugin_tools .tools .resources import plugin_name , resources_path
@@ -129,7 +129,7 @@ def unload(self) -> None:
129
129
130
130
def run (self ) -> None :
131
131
self .feature_template_dock = QgsDockWidget ()
132
- self .add_feature_panel = AddFeaturePanel (self .active_library )
132
+ self .add_feature_panel = TemplateLibraryPanel (self .active_library )
133
133
self .feature_template_dock .setWidget (self .add_feature_panel )
134
134
self .feature_template_dock .setWindowTitle ("ARHO" ) # NOTE: Placeholder name
135
135
You can’t perform that action at this time.
0 commit comments