-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable Polymorphic relation group box if there are no such relations in project
- Loading branch information
Showing
8 changed files
with
186 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
venv | ||
.idea | ||
.kdev4 | ||
src.kdev4 | ||
__pycache__ | ||
*.orig | ||
i18n | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
# ----------------------------------------------------------- | ||
# | ||
# QGIS Document Management System Plugin | ||
# Copyright (C) 2021 Damiano Lombardi | ||
# | ||
# licensed under the terms of GNU GPL 2+ | ||
# | ||
# ----------------------------------------------------------- | ||
|
||
from qgis.PyQt.QtCore import QCoreApplication | ||
|
||
|
||
class PluginHelper(object): | ||
|
||
PLUGIN_SLUG = "DMSRelationEditor" | ||
|
||
@staticmethod | ||
def tr(message): | ||
"""Get the translation for a string using Qt translation API. | ||
We implement this ourselves since we do not inherit QObject. | ||
:param message: String for translation. | ||
:type message: str, QString | ||
:returns: Translated version of message. | ||
:rtype: QString | ||
""" | ||
# noinspection PyTypeChecker,PyArgumentList,PyCallByClass | ||
return QCoreApplication.translate(PluginHelper.PLUGIN_SLUG, | ||
message) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# ----------------------------------------------------------- | ||
# | ||
# QGIS Document Management System Plugin | ||
# Copyright (C) 2021 Damiano Lombardi | ||
# | ||
# licensed under the terms of GNU GPL 2+ | ||
# | ||
# ----------------------------------------------------------- | ||
|
||
from qgis.core import QgsSettingsRegistry | ||
from document_management_system.gui.document_relation_editor_feature_side_widget import DocumentRelationEditorWidget | ||
|
||
class SettingsRegistry(QgsSettingsRegistry): | ||
|
||
def __init__(self): | ||
super().__init__() | ||
|
||
self.addSettingsEntry(DocumentRelationEditorWidget.settingsDefaultView) | ||
self.addSettingsEntry(DocumentRelationEditorWidget.settingsLastView) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters