Addon Manager: Implement content addition dialogs
This commit is contained in:
@@ -101,7 +101,7 @@ installed.
|
||||
# \brief The Addon Manager allows users to install workbenches and macros made by other users
|
||||
# @{
|
||||
|
||||
|
||||
INSTANCE = None
|
||||
|
||||
class CommandAddonManager:
|
||||
"""The main Addon Manager class and FreeCAD command"""
|
||||
@@ -156,6 +156,10 @@ class CommandAddonManager:
|
||||
self.update_all_worker = None
|
||||
self.developer_mode = None
|
||||
|
||||
# Give other parts of the AM access to the current instance
|
||||
global INSTANCE
|
||||
INSTANCE = self
|
||||
|
||||
def GetResources(self) -> Dict[str, str]:
|
||||
return {
|
||||
"Pixmap": "AddonManager",
|
||||
@@ -918,6 +922,7 @@ class CommandAddonManager:
|
||||
self.check_for_python_package_updates_worker.finished.connect(
|
||||
self.do_next_startup_phase
|
||||
)
|
||||
self.update_allowed_packages_list() # Not really the best place for it...
|
||||
self.check_for_python_package_updates_worker.start()
|
||||
|
||||
def show_python_updates_dialog(self) -> None:
|
||||
@@ -1118,7 +1123,7 @@ class CommandAddonManager:
|
||||
False."""
|
||||
|
||||
bad_packages = []
|
||||
self.update_allowed_packages_list()
|
||||
#self.update_allowed_packages_list()
|
||||
for dep in python_required:
|
||||
if dep not in self.allowed_packages:
|
||||
bad_packages.append(dep)
|
||||
|
||||
@@ -26,11 +26,15 @@ SET(AddonManager_SRCS
|
||||
dependency_resolution_dialog.ui
|
||||
developer_mode.ui
|
||||
developer_mode_add_content.ui
|
||||
developer_mode_advanced_freecad_versions.ui
|
||||
developer_mode_copyright_info.ui
|
||||
developer_mode_dependencies.ui
|
||||
developer_mode_edit_dependency.ui
|
||||
developer_mode_freecad_versions.ui
|
||||
developer_mode_license.ui
|
||||
developer_mode_people.ui
|
||||
developer_mode_select_from_list.ui
|
||||
developer_mode_tags.ui
|
||||
expanded_view.py
|
||||
first_run.ui
|
||||
Init.py
|
||||
|
||||
@@ -39,6 +39,7 @@ from addonmanager_git import GitManager
|
||||
|
||||
from addonmanager_devmode_license_selector import LicenseSelector
|
||||
from addonmanager_devmode_person_editor import PersonEditor
|
||||
from addonmanager_devmode_add_content import AddContent
|
||||
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
@@ -217,7 +218,7 @@ class DeveloperMode:
|
||||
metadata = None
|
||||
if os.path.exists(metadata_path):
|
||||
try:
|
||||
metadata = FreeCAD.Metadata(metadata_path)
|
||||
self.metadata = FreeCAD.Metadata(metadata_path)
|
||||
except FreeCAD.Base.XMLBaseException as e:
|
||||
FreeCAD.Console.PrintError(
|
||||
translate(
|
||||
@@ -238,17 +239,17 @@ class DeveloperMode:
|
||||
+ "\n\n"
|
||||
)
|
||||
|
||||
if metadata:
|
||||
self.dialog.displayNameLineEdit.setText(metadata.Name)
|
||||
self.dialog.descriptionTextEdit.setPlainText(metadata.Description)
|
||||
self.dialog.versionLineEdit.setText(metadata.Version)
|
||||
if self.metadata:
|
||||
self.dialog.displayNameLineEdit.setText(self.metadata.Name)
|
||||
self.dialog.descriptionTextEdit.setPlainText(self.metadata.Description)
|
||||
self.dialog.versionLineEdit.setText(self.metadata.Version)
|
||||
|
||||
self._populate_people_from_metadata(metadata)
|
||||
self._populate_licenses_from_metadata(metadata)
|
||||
self._populate_urls_from_metadata(metadata)
|
||||
self._populate_contents_from_metadata(metadata)
|
||||
self._populate_people_from_metadata(self.metadata)
|
||||
self._populate_licenses_from_metadata(self.metadata)
|
||||
self._populate_urls_from_metadata(self.metadata)
|
||||
self._populate_contents_from_metadata(self.metadata)
|
||||
|
||||
self._populate_icon_from_metadata(metadata)
|
||||
self._populate_icon_from_metadata(self.metadata)
|
||||
else:
|
||||
self._populate_without_metadata()
|
||||
|
||||
@@ -461,6 +462,12 @@ class DeveloperMode:
|
||||
)
|
||||
self.dialog.peopleTableWidget.itemDoubleClicked.connect(self._edit_person)
|
||||
|
||||
self.dialog.addContentItemToolButton.clicked.connect(self._add_content_clicked)
|
||||
self.dialog.removeContentItemToolButton.clicked.connect(self._remove_content_clicked)
|
||||
self.dialog.contentsListWidget.itemSelectionChanged.connect(self._content_selection_changed)
|
||||
self.dialog.contentsListWidget.itemDoubleClicked.connect(self._edit_content)
|
||||
|
||||
|
||||
# Finally, populate the combo boxes, etc.
|
||||
self._populate_combo()
|
||||
if self.dialog.pathToAddonComboBox.currentIndex() != -1:
|
||||
@@ -611,3 +618,17 @@ class DeveloperMode:
|
||||
self.dialog.peopleTableWidget.removeRow(row)
|
||||
self._add_person_row(row, person_type, name, email)
|
||||
self.dialog.peopleTableWidget.selectRow(row)
|
||||
|
||||
|
||||
def _add_content_clicked(self):
|
||||
dlg = AddContent(self.current_mod, self.metadata)
|
||||
dlg.exec()
|
||||
|
||||
def _remove_content_clicked(self):
|
||||
pass
|
||||
|
||||
def _content_selection_changed(self):
|
||||
pass
|
||||
|
||||
def _edit_content(self, item):
|
||||
pass
|
||||
|
||||
@@ -20,3 +20,490 @@
|
||||
# * *
|
||||
# ***************************************************************************
|
||||
|
||||
""" Contains a class for adding a single content item, as well as auxilliary classes for
|
||||
its dependent dialog boxes. """
|
||||
|
||||
import os
|
||||
from typing import Optional, Tuple, List
|
||||
|
||||
import FreeCAD
|
||||
import FreeCADGui
|
||||
|
||||
from Addon import INTERNAL_WORKBENCHES
|
||||
|
||||
from PySide2.QtWidgets import QDialog, QLayout, QFileDialog, QTableWidgetItem
|
||||
from PySide2.QtGui import QIcon
|
||||
from PySide2.QtCore import Qt
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
|
||||
translate = FreeCAD.Qt.translate
|
||||
|
||||
|
||||
class AddContent:
|
||||
"""A dialog for adding a single content item to the package metadata."""
|
||||
|
||||
def __init__(self, path_to_addon: os.PathLike, toplevel_metadata: FreeCAD.Metadata):
|
||||
"""path_to_addon is the full path to the toplevel directory of this Addon, and
|
||||
toplevel_metadata is to overall package.xml Metadata object for this Addon. This
|
||||
information is used to assist the use in filling out the dialog by providing
|
||||
sensible default values."""
|
||||
self.dialog = FreeCADGui.PySideUic.loadUi(
|
||||
os.path.join(os.path.dirname(__file__), "developer_mode_add_content.ui")
|
||||
)
|
||||
# These are in alphabetical order in English, but their actual label may be translated in
|
||||
# the GUI. Store their underlying type as user data.
|
||||
self.dialog.addonKindComboBox.setItemData(0, "macro")
|
||||
self.dialog.addonKindComboBox.setItemData(1, "preferencepack")
|
||||
self.dialog.addonKindComboBox.setItemData(2, "workbench")
|
||||
|
||||
self.toplevel_metadata = toplevel_metadata
|
||||
self.metadata = None
|
||||
self.path_to_addon = path_to_addon.replace("/", os.path.sep)
|
||||
if self.path_to_addon[-1] != os.path.sep:
|
||||
self.path_to_addon += (
|
||||
os.path.sep
|
||||
) # Make sure the path ends with a separator
|
||||
|
||||
self.dialog.iconLabel.hide() # Until we have an icon to display
|
||||
|
||||
self.dialog.iconBrowseButton.clicked.connect(self._browse_for_icon_clicked)
|
||||
self.dialog.subdirectoryBrowseButton.clicked.connect(
|
||||
self._browse_for_subdirectory_clicked
|
||||
)
|
||||
self.dialog.tagsButton.clicked.connect(self._tags_clicked)
|
||||
self.dialog.dependenciesButton.clicked.connect(self._dependencies_clicked)
|
||||
self.dialog.freecadVersionsButton.clicked.connect(
|
||||
self._freecad_versions_clicked
|
||||
)
|
||||
|
||||
def exec(
|
||||
self,
|
||||
content_kind: str = "workbench",
|
||||
metadata: FreeCAD.Metadata = None,
|
||||
singleton: bool = True,
|
||||
) -> Optional[Tuple[str, FreeCAD.Metadata]]:
|
||||
"""Execute the dialog as a modal, returning a new Metadata object if the dialog
|
||||
is accepted, or None if it is rejected. This metadata object represents a single
|
||||
new content item. It's returned as a tuple with the object type as the first component,
|
||||
and the metadata object itself as the second."""
|
||||
self.metadata = metadata
|
||||
self.dialog.singletonCheckBox.setChecked(singleton)
|
||||
if singleton:
|
||||
# This doesn't happen automatically the first time
|
||||
self.dialog.otherMetadataGroupBox.hide()
|
||||
index = self.dialog.addonKindComboBox.findData(content_kind)
|
||||
if index == -1:
|
||||
index = 2 # Workbench
|
||||
FreeCAD.Console.PrintWarning(
|
||||
translate("AddonsInstaller", "Unrecognized content kind '{}'").format(
|
||||
content_kind
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
self.dialog.addonKindComboBox.setCurrentIndex(index)
|
||||
if metadata:
|
||||
self._populate_dialog(metadata)
|
||||
|
||||
self.dialog.layout().setSizeConstraint(QLayout.SetFixedSize)
|
||||
result = self.dialog.exec()
|
||||
if result == QDialog.Accepted:
|
||||
return self._generate_metadata()
|
||||
return None
|
||||
|
||||
def _populate_dialog(self, metadata: FreeCAD.Metadata) -> None:
|
||||
"""Fill in the dialog with the details from the passed metadata object"""
|
||||
addon_kind = self.dialog.addonKindComboBox.currentData()
|
||||
if addon_kind == "workbench":
|
||||
self.dialog.workbenchClassnameLineEdit.setText(metadata.Classname)
|
||||
elif addon_kind == "macro":
|
||||
pass
|
||||
elif addon_kind == "preferencepack":
|
||||
pass
|
||||
else:
|
||||
raise RuntimeError("Invalid data found for selection")
|
||||
|
||||
# Now set the rest of it
|
||||
if metadata.Icon:
|
||||
self._set_icon(metadata.Icon)
|
||||
elif self.toplevel_metadata.Icon:
|
||||
if metadata.Subdirectory and metadata.Subdirectory != "./":
|
||||
self._set_icon("../" + self.toplevel_metadata.Icon)
|
||||
else:
|
||||
self._set_icon(self.toplevel_metadata.Icon)
|
||||
else:
|
||||
self.dialog.iconLabel.hide()
|
||||
self.dialog.iconLineEdit.setText("")
|
||||
|
||||
if metadata.Subdirectory:
|
||||
self.dialog.subdirectoryLineEdit.setText(metadata.Subdirectory)
|
||||
else:
|
||||
self.dialog.subdirectoryLineEdit.setText("")
|
||||
|
||||
def _set_icon(self, icon_relative_path):
|
||||
"""Load the icon and display it, and its path, in the dialog."""
|
||||
icon_path = os.path.join(
|
||||
self.path_to_addon, icon_relative_path.replace("/", os.path.sep)
|
||||
)
|
||||
if os.path.isfile(icon_path):
|
||||
icon_data = QIcon(icon_path)
|
||||
if not icon_data.isNull():
|
||||
self.dialog.iconLabel.setPixmap(icon_data.pixmap(32, 32))
|
||||
self.dialog.iconLabel.show()
|
||||
else:
|
||||
FreeCAD.Console.PrintError(
|
||||
translate("AddonsInstaller", "Unable to locate icon at {}").format(
|
||||
icon_path
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
self.dialog.iconLineEdit.setText(icon_relative_path)
|
||||
|
||||
def _generate_metadata(self) -> Tuple[str, FreeCAD.Metadata]:
|
||||
"""Create and return a new metadata object based on the contents of the dialog."""
|
||||
return ("workbench", FreeCAD.Metadata())
|
||||
|
||||
###############################################################################################
|
||||
# DIALOG SLOTS
|
||||
###############################################################################################
|
||||
|
||||
def _browse_for_icon_clicked(self):
|
||||
"""Callback: when the "Browse..." button for the icon field is clicked"""
|
||||
subdir = self.dialog.subdirectoryLineEdit.text()
|
||||
start_dir = os.path.join(self.path_to_addon, subdir)
|
||||
new_icon_path, _ = QFileDialog.getOpenFileName(
|
||||
parent=self.dialog,
|
||||
caption=translate(
|
||||
"AddonsInstaller",
|
||||
"Select an icon file for this content item",
|
||||
),
|
||||
dir=start_dir,
|
||||
)
|
||||
|
||||
base_path = self.path_to_addon.replace("/", os.path.sep)
|
||||
icon_path = new_icon_path.replace("/", os.path.sep)
|
||||
|
||||
if not icon_path.startswith(base_path):
|
||||
FreeCAD.Console.PrintError(
|
||||
translate("AddonsInstaller", "{} is not a subdirectory of {}").format(
|
||||
icon_path, base_path
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
return
|
||||
self._set_icon(new_icon_path[len(base_path) :])
|
||||
|
||||
def _browse_for_subdirectory_clicked(self):
|
||||
"""Callback: when the "Browse..." button for the subdirectory field is clicked"""
|
||||
subdir = self.dialog.subdirectoryLineEdit.text()
|
||||
start_dir = os.path.join(self.path_to_addon, subdir)
|
||||
new_subdir_path = QFileDialog.getExistingDirectory(
|
||||
parent=self.dialog,
|
||||
caption=translate(
|
||||
"AddonsInstaller",
|
||||
"Select the subdirectory for this content item",
|
||||
),
|
||||
dir=start_dir,
|
||||
)
|
||||
if new_subdir_path[-1] != "/":
|
||||
new_subdir_path += "/"
|
||||
|
||||
# Three legal possibilities:
|
||||
# 1) This might be the toplevel directory, in which case we want to set
|
||||
# metadata.Subdirectory to "./"
|
||||
# 2) This might be a subdirectory with the same name as the content item, in which case
|
||||
# we don't need to set metadata.Subdirectory at all
|
||||
# 3) This might be some other directory name, but still contained within the top-level
|
||||
# directory, in which case we want to set metadata.Subdirectory to the relative path
|
||||
|
||||
# First, reject anything that isn't within the appropriate directory structure:
|
||||
base_path = self.path_to_addon.replace("/", os.path.sep)
|
||||
subdir_path = new_subdir_path.replace("/", os.path.sep)
|
||||
if not subdir_path.startswith(base_path):
|
||||
FreeCAD.Console.PrintError(
|
||||
translate("AddonsInstaller", "{} is not a subdirectory of {}").format(
|
||||
subdir_path, base_path
|
||||
)
|
||||
+ "\n"
|
||||
)
|
||||
return
|
||||
|
||||
relative_path = subdir_path[len(base_path) :]
|
||||
if not relative_path:
|
||||
relative_path = "./"
|
||||
elif relative_path[-1] == os.path.sep:
|
||||
relative_path = relative_path[:-1]
|
||||
self.dialog.subdirectoryLineEdit.setText(relative_path)
|
||||
|
||||
def _tags_clicked(self):
|
||||
"""Show the tag editor"""
|
||||
tags = []
|
||||
if self.metadata:
|
||||
tags = self.metadata.Tag
|
||||
dlg = EditTags(tags)
|
||||
new_tags = dlg.exec()
|
||||
|
||||
def _freecad_versions_clicked(self):
|
||||
"""Show the FreeCAD version editor"""
|
||||
dlg = EditFreeCADVersions()
|
||||
dlg.exec()
|
||||
|
||||
def _dependencies_clicked(self):
|
||||
"""Show the dependencies editor"""
|
||||
dlg = EditDependencies()
|
||||
dlg.exec()
|
||||
|
||||
|
||||
class EditTags:
|
||||
"""A dialog to edit tags"""
|
||||
|
||||
def __init__(self, tags: List[str] = None):
|
||||
self.dialog = FreeCADGui.PySideUic.loadUi(
|
||||
os.path.join(os.path.dirname(__file__), "developer_mode_tags.ui")
|
||||
)
|
||||
self.original_tags = tags
|
||||
if tags:
|
||||
self.dialog.lineEdit.setText(", ".join(tags))
|
||||
|
||||
def exec(self):
|
||||
"""Execute the dialog, returning a list of tags (which may be empty, but still represents
|
||||
the expected list of tags to be set, e.g. the user may have removed them all)."""
|
||||
result = self.dialog.exec()
|
||||
if result == QDialog.Accepted:
|
||||
new_tags: List[str] = self.dialog.lineEdit.text().split(",")
|
||||
clean_tags: List[str] = []
|
||||
for tag in new_tags:
|
||||
clean_tags.append(tag.strip())
|
||||
return clean_tags
|
||||
return self.original_tags
|
||||
|
||||
|
||||
class EditDependencies:
|
||||
"""A dialog to edit dependency information"""
|
||||
|
||||
def __init__(self):
|
||||
self.dialog = FreeCADGui.PySideUic.loadUi(
|
||||
os.path.join(os.path.dirname(__file__), "developer_mode_dependencies.ui")
|
||||
)
|
||||
self.dialog.addDependencyToolButton.setIcon(
|
||||
QIcon.fromTheme("add", QIcon(":/icons/list-add.svg"))
|
||||
)
|
||||
self.dialog.removeDependencyToolButton.setIcon(
|
||||
QIcon.fromTheme("remove", QIcon(":/icons/list-remove.svg"))
|
||||
)
|
||||
self.dialog.addDependencyToolButton.clicked.connect(
|
||||
self._add_dependency_clicked
|
||||
)
|
||||
self.dialog.removeDependencyToolButton.clicked.connect(
|
||||
self._remove_dependency_clicked
|
||||
)
|
||||
self.dialog.tableWidget.itemDoubleClicked.connect(self._edit_dependency)
|
||||
self.dialog.tableWidget.itemSelectionChanged.connect(
|
||||
self._current_index_changed
|
||||
)
|
||||
|
||||
self.dialog.removeDependencyToolButton.setDisabled(True)
|
||||
|
||||
def exec(self):
|
||||
"""Execute the dialog"""
|
||||
self.dialog.exec()
|
||||
|
||||
def _add_dependency_clicked(self):
|
||||
"""Callback: The add button was clicked"""
|
||||
dlg = EditDependency()
|
||||
dep_type, dep_name, dep_optional = dlg.exec()
|
||||
row = self.dialog.tableWidget.rowCount()
|
||||
self._add_row(row, dep_type, dep_name, dep_optional)
|
||||
|
||||
def _add_row(self, row, dep_type, dep_name, dep_optional):
|
||||
"""Utility function to add a row to the table."""
|
||||
translations = {
|
||||
"workbench": translate("AddonsInstaller", "Workbench"),
|
||||
"addon": translate("AddonsInstaller", "Addon"),
|
||||
"python": translate("AddonsInstaller", "Python"),
|
||||
}
|
||||
if dep_type and dep_name:
|
||||
self.dialog.tableWidget.insertRow(row)
|
||||
type_item = QTableWidgetItem(translations[dep_type])
|
||||
type_item.setData(Qt.UserRole, dep_type)
|
||||
self.dialog.tableWidget.setItem(row, 0, type_item)
|
||||
self.dialog.tableWidget.setItem(row, 1, QTableWidgetItem(dep_name))
|
||||
if dep_optional:
|
||||
self.dialog.tableWidget.setItem(
|
||||
row, 2, QTableWidgetItem(translate("AddonsInstaller", "Yes"))
|
||||
)
|
||||
|
||||
def _remove_dependency_clicked(self):
|
||||
"""Callback: The remove button was clicked"""
|
||||
items = self.dialog.tableWidget.selectedItems()
|
||||
if items:
|
||||
row = items[0].row()
|
||||
self.dialog.tableWidget.removeRow(row)
|
||||
|
||||
def _edit_dependency(self, item):
|
||||
"""Callback: the dependency was double-clicked"""
|
||||
row = item.row()
|
||||
dlg = EditDependency()
|
||||
dep_type = self.dialog.tableWidget.item(row, 0).data(Qt.UserRole)
|
||||
dep_name = self.dialog.tableWidget.item(row, 1).text()
|
||||
dep_optional = bool(self.dialog.tableWidget.item(row, 2))
|
||||
dep_type, dep_name, dep_optional = dlg.exec(dep_type, dep_name, dep_optional)
|
||||
if dep_type and dep_name:
|
||||
self.dialog.tableWidget.removeRow(row)
|
||||
self._add_row(row, dep_type, dep_name, dep_optional)
|
||||
|
||||
def _current_index_changed(self):
|
||||
if self.dialog.tableWidget.selectedItems():
|
||||
self.dialog.removeDependencyToolButton.setDisabled(False)
|
||||
else:
|
||||
self.dialog.removeDependencyToolButton.setDisabled(True)
|
||||
|
||||
|
||||
class EditDependency:
|
||||
"""A dialog to edit a single piece of dependency information"""
|
||||
|
||||
def __init__(self):
|
||||
self.dialog = FreeCADGui.PySideUic.loadUi(
|
||||
os.path.join(os.path.dirname(__file__), "developer_mode_edit_dependency.ui")
|
||||
)
|
||||
|
||||
self.dialog.typeComboBox.addItem(
|
||||
translate("AddonsInstaller", "Internal Workbench"), "workbench"
|
||||
)
|
||||
self.dialog.typeComboBox.addItem(
|
||||
translate("AddonsInstaller", "External Addon"), "addon"
|
||||
)
|
||||
self.dialog.typeComboBox.addItem(
|
||||
translate("AddonsInstaller", "Python Package"), "python"
|
||||
)
|
||||
|
||||
self.dialog.typeComboBox.currentIndexChanged.connect(
|
||||
self._type_selection_changed
|
||||
)
|
||||
self.dialog.dependencyComboBox.currentIndexChanged.connect(
|
||||
self._dependency_selection_changed
|
||||
)
|
||||
|
||||
self.dialog.typeComboBox.setCurrentIndex(
|
||||
2
|
||||
) # Expect mostly Python dependencies...
|
||||
|
||||
def exec(
|
||||
self, dep_type="", dep_name="", dep_optional=False
|
||||
) -> Tuple[str, str, bool]:
|
||||
"""Execute the dialog, returning a tuple of the type of dependency (workbench, addon, or
|
||||
python), the name of the dependency, and a boolean indicating whether this is optional."""
|
||||
|
||||
# If we are editing an existing row, set up the dialog:
|
||||
if dep_type and dep_name:
|
||||
index = self.dialog.typeComboBox.findData(dep_type)
|
||||
if index == -1:
|
||||
raise RuntimeError(f"Invaid dependency type {dep_type}")
|
||||
self.dialog.typeComboBox.setCurrentIndex(index)
|
||||
index = self.dialog.dependencyComboBox.findData(dep_name)
|
||||
if index == -1:
|
||||
index = self.dialog.dependencyComboBox.findData("other")
|
||||
self.dialog.dependencyComboBox.setCurrentIndex(index)
|
||||
self.dialog.lineEdit.setText(dep_name)
|
||||
self.dialog.optionalCheckBox.setChecked(dep_optional)
|
||||
|
||||
# Run the dialog (modal)
|
||||
result = self.dialog.exec()
|
||||
if result == QDialog.Accepted:
|
||||
dep_type = self.dialog.typeComboBox.currentData()
|
||||
dep_optional = self.dialog.optionalCheckBox.isChecked()
|
||||
dep_name = self.dialog.dependencyComboBox.currentData()
|
||||
if dep_name == "other":
|
||||
dep_name = self.dialog.lineEdit.text()
|
||||
return (dep_type, dep_name, dep_optional)
|
||||
return ("", "", False)
|
||||
|
||||
def _populate_internal_workbenches(self):
|
||||
"""Add all known internal FreeCAD Workbenches to the list"""
|
||||
self.dialog.dependencyComboBox.clear()
|
||||
for display_name, name in INTERNAL_WORKBENCHES.items():
|
||||
self.dialog.dependencyComboBox.addItem(display_name, name)
|
||||
# No "other" option is supported for this type of dependency
|
||||
|
||||
def _populate_external_addons(self):
|
||||
"""Add all known addons to the list"""
|
||||
self.dialog.dependencyComboBox.clear()
|
||||
#pylint: disable=import-outside-toplevel
|
||||
from AddonManager import INSTANCE as AM_INSTANCE
|
||||
|
||||
repo_dict = {}
|
||||
# We need a case-insensitive sorting of all repo types, displayed and sorted by their
|
||||
# display name, but keeping track of their official name as well (stored in the UserRole)
|
||||
for repo in AM_INSTANCE.item_model.repos:
|
||||
repo_dict[repo.display_name.lower()] = (repo.display_name, repo.name)
|
||||
sorted_keys = sorted(repo_dict.keys())
|
||||
for item in sorted_keys:
|
||||
self.dialog.dependencyComboBox.addItem(
|
||||
repo_dict[item][0], repo_dict[item][1]
|
||||
)
|
||||
self.dialog.dependencyComboBox.addItem(
|
||||
translate("AddonsInstaller", "Other..."), "other"
|
||||
)
|
||||
|
||||
def _populate_allowed_python_packages(self):
|
||||
"""Add all allowed python packages to the list"""
|
||||
self.dialog.dependencyComboBox.clear()
|
||||
#pylint: disable=import-outside-toplevel
|
||||
from AddonManager import INSTANCE as AM_INSTANCE
|
||||
|
||||
packages = sorted(AM_INSTANCE.allowed_packages)
|
||||
for package in packages:
|
||||
self.dialog.dependencyComboBox.addItem(package, package)
|
||||
self.dialog.dependencyComboBox.addItem(
|
||||
translate("AddonsInstaller", "Other..."), "other"
|
||||
)
|
||||
|
||||
def _type_selection_changed(self, _):
|
||||
"""Callback: The type of dependency has been changed"""
|
||||
selection = self.dialog.typeComboBox.currentData()
|
||||
if selection == "workbench":
|
||||
self._populate_internal_workbenches()
|
||||
elif selection == "addon":
|
||||
self._populate_external_addons()
|
||||
elif selection == "python":
|
||||
self._populate_allowed_python_packages()
|
||||
else:
|
||||
raise RuntimeError("Invalid data found for selection")
|
||||
|
||||
def _dependency_selection_changed(self, _):
|
||||
selection = self.dialog.dependencyComboBox.currentData()
|
||||
if selection == "other":
|
||||
self.dialog.lineEdit.show()
|
||||
else:
|
||||
self.dialog.lineEdit.hide()
|
||||
|
||||
|
||||
class EditFreeCADVersions:
|
||||
"""A dialog to edit minimum and maximum FreeCAD version support"""
|
||||
|
||||
def __init__(self):
|
||||
self.dialog = FreeCADGui.PySideUic.loadUi(
|
||||
os.path.join(
|
||||
os.path.dirname(__file__), "developer_mode_freecad_versions.ui"
|
||||
)
|
||||
)
|
||||
|
||||
def exec(self):
|
||||
"""Execute the dialog"""
|
||||
self.dialog.exec()
|
||||
|
||||
|
||||
class EditAdvancedVersions:
|
||||
"""A dialog to support mapping specific git branches, tags, or commits to specific
|
||||
versions of FreeCAD."""
|
||||
|
||||
def __init__(self):
|
||||
self.dialog = FreeCADGui.PySideUic.loadUi(
|
||||
os.path.join(
|
||||
os.path.dirname(__file__), "developer_mode_advanced_freecad_versions.ui"
|
||||
)
|
||||
)
|
||||
|
||||
def exec(self):
|
||||
"""Execute the dialog"""
|
||||
self.dialog.exec()
|
||||
|
||||
@@ -1,75 +1,191 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<class>addContentDialog</class>
|
||||
<widget class="QDialog" name="addContentDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>641</width>
|
||||
<height>388</height>
|
||||
<width>642</width>
|
||||
<height>593</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
<string>Content Item</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="toolTip">
|
||||
<string>If this is the only thing in the Addon, all other metadata can be inherited from the top level, and does not need to be specified here.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>This workbench is the only item in the Addon</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Content type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="addonKindComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Macro</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Preference Pack</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Workbench</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="singletonCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>If this is the only thing in the Addon, all other metadata can be inherited from the top level, and does not need to be specified here.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>This is the only item in the Addon</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QStackedWidget" name="stackedWidget">
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="Macro">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Main macro file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="macroFileLineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>The file with the macro's metadata in it</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="macroFileBrowseButton">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="PreferencePack">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Preference Pack Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="prefPackNameLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="Workbench">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Workbench class name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="workbenchClassnameLineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Class that defines "Icon" data member</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Class name</string>
|
||||
<string>Subdirectory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="subdirectoryLineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Optional, defaults to name of content item</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="subdirectoryBrowseButton">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Path</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="lineEdit_3"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<widget class="QLabel" name="iconLabel">
|
||||
<property name="text">
|
||||
<string>actualIcon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_2"/>
|
||||
<widget class="QLineEdit" name="iconLineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Optional, defaults to inheriting from top-level Addon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<widget class="QPushButton" name="iconBrowseButton">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
@@ -82,14 +198,21 @@
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_2">
|
||||
<widget class="QPushButton" name="tagsButton">
|
||||
<property name="text">
|
||||
<string>Tags...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="dependenciesButton">
|
||||
<property name="text">
|
||||
<string>Dependencies...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_3">
|
||||
<widget class="QPushButton" name="freecadVersionsButton">
|
||||
<property name="text">
|
||||
<string>FreeCAD Versions...</string>
|
||||
</property>
|
||||
@@ -111,207 +234,304 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<spacer name="otherMetadataSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="otherMetadataGroupBox">
|
||||
<property name="title">
|
||||
<string>Other Metadata</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="labelLicensePath">
|
||||
<property name="text">
|
||||
<string>License file path</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLineEdit" name="descriptionLineEdit">
|
||||
<property name="toolTip">
|
||||
<string>Explanation of what this Addon provides. Displayed in the Addon Manager. It is not necessary for this to state that this is a FreeCAD Addon.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QComboBox" name="licenseComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="otherLicenseLineEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="licenseFilePathLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="licenseFilePathBrowse">
|
||||
<property name="text">
|
||||
<string>Browse...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="licenseCreateButton">
|
||||
<property name="text">
|
||||
<string>Create...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelMaintainerName">
|
||||
<property name="text">
|
||||
<string>Primary maintainer name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="maintainerNameLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelContactEmail">
|
||||
<property name="text">
|
||||
<string>Contact email</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="maintainerEmailLineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="addPeopleButton">
|
||||
<property name="text">
|
||||
<string>Add additional people</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelVersion">
|
||||
<property name="text">
|
||||
<string>Version</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="displayNameLineEdit">
|
||||
<property name="toolTip">
|
||||
<string>Displayed in the Addon Manager's list of Addons. Should not include the word "FreeCAD".</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="labelLicense">
|
||||
<property name="text">
|
||||
<string>License</string>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit">
|
||||
<property name="tabChangesFocus">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="labelVersion">
|
||||
<property name="text">
|
||||
<string>Version</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labelDescription">
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<item row="3" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QComboBox" name="versionTypeComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Semantic (e.g. 1.2.3-beta)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>CalVer (e.g. 2021.12.08)</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="versionMajorLabel">
|
||||
<property name="text">
|
||||
<string>Y:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="versionMajorSpinBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="versionMinorLabel">
|
||||
<property name="text">
|
||||
<string>M:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="versionMinorSpinBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="versionPatchLabel">
|
||||
<property name="text">
|
||||
<string>D:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="versionPatchSpinBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="versionSuffixDashLabel">
|
||||
<property name="text">
|
||||
<string>-</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="versionSuffixLineEdit">
|
||||
<widget class="QLineEdit" name="versionLineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>(optional suffix)</string>
|
||||
<string>Semantic (1.2.3-beta) or CalVer (2022.08.30) styles supported</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="versionToTodayButton">
|
||||
<property name="text">
|
||||
<string>Set to today</string>
|
||||
<string>Set to today (CalVer style)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labelDisplayName">
|
||||
<property name="text">
|
||||
<string>Display Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="peopleAndLicenseshorizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="peopleGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>2</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>People</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayoutPeople">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="peopleTableWidget">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>75</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Kind</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Email</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayoutPeople">
|
||||
<item>
|
||||
<spacer name="horizontalSpacerPeople">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="addPersonToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="removePersonToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="licensesGroupBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Preferred">
|
||||
<horstretch>1</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>150</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Licenses</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayoutLicenses">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="licensesTableWidget">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>60</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>License</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>License file</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayoutLicenses">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_Licenses">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="addLicenseToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="removeLicenseToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>50</weight>
|
||||
<italic>true</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Any fields left blank are inherited from the top-level Addon metadata, so technically they are all optional. For Addons with multiple content items, each item should provide a unique Display Name and Description.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
@@ -329,7 +549,7 @@
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<receiver>addContentDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -345,7 +565,7 @@
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<receiver>addContentDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -358,5 +578,37 @@
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>addonKindComboBox</sender>
|
||||
<signal>currentIndexChanged(int)</signal>
|
||||
<receiver>stackedWidget</receiver>
|
||||
<slot>setCurrentIndex(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>134</x>
|
||||
<y>19</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>320</x>
|
||||
<y>83</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>singletonCheckBox</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>otherMetadataGroupBox</receiver>
|
||||
<slot>setHidden(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>394</x>
|
||||
<y>19</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>320</x>
|
||||
<y>294</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
||||
131
src/Mod/AddonManager/developer_mode_advanced_freecad_versions.ui
Normal file
131
src/Mod/AddonManager/developer_mode_advanced_freecad_versions.ui
Normal file
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FreeCADVersionToBranchMapDialog</class>
|
||||
<widget class="QDialog" name="FreeCADVersionToBranchMapDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Advanced Version Mapping</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Upcoming versions of the FreeCAD Addon Manager will support developers' setting a specific branch or tag for use with a specific version of FreeCAD (e.g. setting a specific tag as the last version of your Addon to support v0.19, etc.)</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>FreeCAD Version</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Best-available branch, tag, or commit</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="addEntryToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="removeEntryToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>FreeCADVersionToBranchMapDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>FreeCADVersionToBranchMapDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
@@ -1,191 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AddDependenciesDialog</class>
|
||||
<widget class="QDialog" name="AddDependenciesDialog">
|
||||
<class>DependencyDialog</class>
|
||||
<widget class="QDialog" name="DependencyDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>743</width>
|
||||
<height>221</height>
|
||||
<width>348</width>
|
||||
<height>242</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Addon Dependencies</string>
|
||||
<string>Dependencies</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="alternatingRowColors">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Dependency type</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Optional?</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>FreeCAD Workbenches</string>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="addDependencyToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QListView" name="listView"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_2">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>External Addons</string>
|
||||
<widget class="QToolButton" name="removeDependencyToolButton">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QListView" name="listView_2"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_3">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_4">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Required Python Packages</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QListView" name="listView_3"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_5">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_6">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="title">
|
||||
<string>Optional Python Packages</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<widget class="QListView" name="listView_4"/>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_7">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="toolButton_8">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -207,7 +99,7 @@
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>AddDependenciesDialog</receiver>
|
||||
<receiver>DependencyDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
@@ -223,7 +115,7 @@
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>AddDependenciesDialog</receiver>
|
||||
<receiver>DependencyDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
||||
105
src/Mod/AddonManager/developer_mode_edit_dependency.ui
Normal file
105
src/Mod/AddonManager/developer_mode_edit_dependency.ui
Normal file
@@ -0,0 +1,105 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>EditDependencyDialog</class>
|
||||
<widget class="QDialog" name="EditDependencyDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>347</width>
|
||||
<height>142</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Edit Dependency</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Dependency Type</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="typeComboBox"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Dependency</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="dependencyComboBox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Package name, if "Other..."</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="optionalCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>If this is an optional dependency, the Addon Manager will offer to install it (when possible), but will not block installation if the user chooses not to, or cannot, instal the package.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Optional</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>EditDependencyDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>EditDependencyDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
99
src/Mod/AddonManager/developer_mode_freecad_versions.ui
Normal file
99
src/Mod/AddonManager/developer_mode_freecad_versions.ui
Normal file
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FreeCADVersionsDialog</class>
|
||||
<widget class="QDialog" name="FreeCADVersionsDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>120</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Supported FreeCAD Versions</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Minimum FreeCAD Version Supported</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="minVersionLineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Optional</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Maximum FreeCAD Version Supported</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="maxVersionLineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Optional</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QPushButton" name="pushButton">
|
||||
<property name="text">
|
||||
<string>Advanced version mapping...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>FreeCADVersionsDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>FreeCADVersionsDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
86
src/Mod/AddonManager/developer_mode_tags.ui
Normal file
86
src/Mod/AddonManager/developer_mode_tags.ui
Normal file
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog</class>
|
||||
<widget class="QDialog" name="Dialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>106</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Edit Tags</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Comma-separated list of tags describing this item:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>HINT: Common tags include "Assembly", "FEM", "Mesh", "NURBS", etc.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>Dialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user