mirror of
https://github.com/GNS3/gns3-gui.git
synced 2026-05-17 00:46:01 +03:00
2
.github/workflows/testing.yml
vendored
2
.github/workflows/testing.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: Build and run Docker image
|
||||
run: |
|
||||
docker build -t gns3-gui-test .
|
||||
|
||||
13
CHANGELOG
13
CHANGELOG
@@ -1,5 +1,18 @@
|
||||
# Change Log
|
||||
|
||||
## 2.2.58 10/04/2026
|
||||
|
||||
* Update snapshot date & time format
|
||||
* Fix bug when HTTP DELETE requests are silently dropped. Fixes #3810
|
||||
* Show if a linked base VM or not in device's properties
|
||||
* Add HTTP method to response timeout slot. Ref #3810
|
||||
* Add default link style section in preferences
|
||||
* Update the default style colors based on the interface style
|
||||
* Support bring to front for vnc and spice consoles on Linux. Fixes #3783
|
||||
* Update appliance schemas
|
||||
* Fix bug when adding multiple nodes at the same time. Fixes #3807
|
||||
* Fix QWebSocket error signal. Fixes #3804
|
||||
|
||||
## 2.2.57 23/03/2026
|
||||
|
||||
* Fix errors from controller are not reported
|
||||
|
||||
@@ -3,7 +3,7 @@ FROM ubuntu:latest
|
||||
MAINTAINER GNS3 Team
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y --force-yes python3 python3-pyqt5 python3-pip python3-pyqt5.qtsvg python3-pyqt5.qtwebsockets python3-dev xvfb
|
||||
RUN apt-get install -y --force-yes python3 python3-pyqt6 python3-pip python3-pyqt6.qtsvg python3-pyqt6.qtwebsockets python3-dev xvfb
|
||||
RUN apt-get clean
|
||||
|
||||
ADD dev-requirements.txt /dev-requirements.txt
|
||||
|
||||
@@ -251,7 +251,7 @@ class BaseNode(QtCore.QObject):
|
||||
|
||||
return self._ports
|
||||
|
||||
def controllerHttpPost(self, path, callback, body={}, context={}, **kwargs):
|
||||
def controllerHttpPost(self, path, callback, body=None, context=None, **kwargs):
|
||||
"""
|
||||
POST on current server / project
|
||||
|
||||
@@ -263,7 +263,7 @@ class BaseNode(QtCore.QObject):
|
||||
|
||||
self._project.post(path, callback, body=body, context=context, **kwargs)
|
||||
|
||||
def controllerHttpPut(self, path, callback, body={}, context={}, **kwargs):
|
||||
def controllerHttpPut(self, path, callback, body=None, context=None, **kwargs):
|
||||
"""
|
||||
PUT on current server / project
|
||||
|
||||
@@ -275,7 +275,7 @@ class BaseNode(QtCore.QObject):
|
||||
|
||||
self._project.put(path, callback, body=body, context=context, **kwargs)
|
||||
|
||||
def controllerHttpGet(self, path, callback, context={}, **kwargs):
|
||||
def controllerHttpGet(self, path, callback, context=None, **kwargs):
|
||||
"""
|
||||
Get on current server / project
|
||||
|
||||
@@ -287,7 +287,7 @@ class BaseNode(QtCore.QObject):
|
||||
|
||||
self._project.get(path, callback, context=context, **kwargs)
|
||||
|
||||
def controllerHttpDelete(self, path, callback, context={}, **kwargs):
|
||||
def controllerHttpDelete(self, path, callback, context=None, **kwargs):
|
||||
"""
|
||||
Delete on current server / project
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ class ComputeManager(QtCore.QObject):
|
||||
|
||||
if compute_id in self._computes:
|
||||
del self._computes[compute_id]
|
||||
self._controller.delete("/computes/{compute_id}".format(compute_id=compute_id), None)
|
||||
self._controller.delete("/computes/{compute_id}".format(compute_id=compute_id))
|
||||
self.deleted_signal.emit(compute_id)
|
||||
|
||||
def updateList(self, computes):
|
||||
|
||||
@@ -50,7 +50,7 @@ class CrashReport:
|
||||
Report crash to a third party service
|
||||
"""
|
||||
|
||||
DSN = "https://62327104ad8e2a82fe1aef16f6ba37b6@o19455.ingest.us.sentry.io/38506"
|
||||
DSN = "https://6eeccf4e06aaf1752e4244e27e81ffed@o19455.ingest.us.sentry.io/38506"
|
||||
_instance = None
|
||||
|
||||
def __init__(self):
|
||||
|
||||
@@ -67,7 +67,7 @@ class SnapshotsDialog(QtWidgets.QDialog, Ui_SnapshotsDialog):
|
||||
|
||||
for snapshot in result:
|
||||
item = QtWidgets.QListWidgetItem(self.uiSnapshotsList)
|
||||
item.setText("{} on {}".format(snapshot["name"], datetime.fromtimestamp(snapshot["created_at"]).strftime("%d/%m/%y at %H:%M:%S")))
|
||||
item.setText("{} on {}".format(snapshot["name"], datetime.fromtimestamp(snapshot["created_at"]).strftime("%Y-%m-%d at %H:%M:%S")))
|
||||
item.setData(QtCore.Qt.ItemDataRole.UserRole, snapshot["snapshot_id"])
|
||||
|
||||
if self.uiSnapshotsList.count():
|
||||
|
||||
@@ -41,6 +41,10 @@ class StyleEditorDialogLink(QtWidgets.QDialog, Ui_StyleEditorDialog):
|
||||
self._link = link
|
||||
self._link_style = {}
|
||||
|
||||
self.uiBorderColorLabel.setText("Link color")
|
||||
self.uiBorderWidthLabel.setText("Link width")
|
||||
self.uiBorderStyleLabel.setText("Link style")
|
||||
|
||||
self.uiBorderColorPushButton.clicked.connect(self._setBorderColorSlot)
|
||||
self.uiButtonBox.button(QtWidgets.QDialogButtonBox.StandardButton.Apply).clicked.connect(self._applyPreferencesSlot)
|
||||
|
||||
@@ -102,10 +106,11 @@ class StyleEditorDialogLink(QtWidgets.QDialog, Ui_StyleEditorDialog):
|
||||
|
||||
self._link.setPen(pen)
|
||||
|
||||
new_link_style = {}
|
||||
new_link_style["color"] = self._border_color.name()
|
||||
new_link_style["width"] = self.uiBorderWidthSpinBox.value()
|
||||
new_link_style["type"] = border_style.value
|
||||
new_link_style = {
|
||||
"color": self._border_color.name(),
|
||||
"width": self.uiBorderWidthSpinBox.value(),
|
||||
"type": border_style.value,
|
||||
}
|
||||
|
||||
# Store values
|
||||
self._link.setLinkStyle(new_link_style)
|
||||
|
||||
@@ -735,7 +735,7 @@ class GraphicsView(QtWidgets.QGraphicsView):
|
||||
for node_number in range(integer):
|
||||
x = event.position().x() - (150 // 2) + (node_number % max_nodes_per_line) * offset
|
||||
y = event.position().y() - (70 // 2) + (node_number // max_nodes_per_line) * offset
|
||||
if self.createNodeFromTemplateId(template_id, QtCore.QPoint(x, y)) is False:
|
||||
if self.createNodeFromTemplateId(template_id, QtCore.QPointF(x, y)) is False:
|
||||
event.ignore()
|
||||
break
|
||||
else:
|
||||
|
||||
@@ -275,18 +275,25 @@ class HTTPClient(QtCore.QObject):
|
||||
:param query: The Server to connect
|
||||
"""
|
||||
|
||||
def createHTTPQuery(self, method, path, callback, body={}, context={},
|
||||
downloadProgressCallback=None,
|
||||
showProgress=True,
|
||||
ignoreErrors=False,
|
||||
progressText=None,
|
||||
timeout=120,
|
||||
server=None,
|
||||
prefix="/v2",
|
||||
params={},
|
||||
networkManager=None,
|
||||
eventsHandler=None,
|
||||
**kwargs):
|
||||
def createHTTPQuery(
|
||||
self,
|
||||
method,
|
||||
path,
|
||||
callback,
|
||||
body=None,
|
||||
context=None,
|
||||
downloadProgressCallback=None,
|
||||
showProgress=True,
|
||||
ignoreErrors=False,
|
||||
progressText=None,
|
||||
timeout=120,
|
||||
server=None,
|
||||
prefix="/v2",
|
||||
params=None,
|
||||
networkManager=None,
|
||||
eventsHandler=None,
|
||||
**kwargs
|
||||
):
|
||||
"""
|
||||
Call the remote server, if not connected, check connection before
|
||||
|
||||
@@ -328,17 +335,24 @@ class HTTPClient(QtCore.QObject):
|
||||
# return
|
||||
# self._last_query_timestamp = now
|
||||
|
||||
request = qpartial(self._executeHTTPQuery, method, path, qpartial(callback), body, context,
|
||||
downloadProgressCallback=downloadProgressCallback,
|
||||
showProgress=showProgress,
|
||||
ignoreErrors=ignoreErrors,
|
||||
progressText=progressText,
|
||||
networkManager=networkManager,
|
||||
server=server,
|
||||
timeout=timeout,
|
||||
prefix=prefix,
|
||||
eventsHandler=eventsHandler,
|
||||
params=params)
|
||||
request = qpartial(
|
||||
self._executeHTTPQuery,
|
||||
method,
|
||||
path,
|
||||
qpartial(callback),
|
||||
body,
|
||||
context,
|
||||
downloadProgressCallback=downloadProgressCallback,
|
||||
showProgress=showProgress,
|
||||
ignoreErrors=ignoreErrors,
|
||||
progressText=progressText,
|
||||
networkManager=networkManager,
|
||||
server=server,
|
||||
timeout=timeout,
|
||||
prefix=prefix,
|
||||
eventsHandler=eventsHandler,
|
||||
params=params
|
||||
)
|
||||
|
||||
if self._connected:
|
||||
return request()
|
||||
@@ -347,7 +361,14 @@ class HTTPClient(QtCore.QObject):
|
||||
# enqueue the first query and open the connection if we are not connected
|
||||
if len(self._query_waiting_connections) == 1:
|
||||
log.debug("Connection to {}".format(self.url()))
|
||||
self._executeHTTPQuery("GET", "/version", self._callbackConnect, {}, server=server, timeout=10, showProgress=False)
|
||||
self._executeHTTPQuery(
|
||||
"GET",
|
||||
"/version",
|
||||
self._callbackConnect,
|
||||
server=server,
|
||||
timeout=10,
|
||||
showProgress=False
|
||||
)
|
||||
|
||||
def _connectionError(self, callback, msg="", server=None):
|
||||
"""
|
||||
@@ -370,7 +391,16 @@ class HTTPClient(QtCore.QObject):
|
||||
def _retryConnection(self, server=None):
|
||||
log.debug("Retry connection to {}".format(self.url()))
|
||||
self._retry += 1
|
||||
QtCore.QTimer.singleShot(1000, qpartial(self._executeHTTPQuery, "GET", "/version", self._callbackConnect, {}, server=server, timeout=5))
|
||||
QtCore.QTimer.singleShot(
|
||||
1000,
|
||||
qpartial(
|
||||
self._executeHTTPQuery,
|
||||
"GET",
|
||||
"/version",
|
||||
self._callbackConnect,
|
||||
server=server,
|
||||
timeout=5)
|
||||
)
|
||||
|
||||
def _callbackConnect(self, params, error=False, server=None, **kwargs):
|
||||
"""
|
||||
@@ -512,7 +542,7 @@ class HTTPClient(QtCore.QObject):
|
||||
:param params: Dictionary of query string parameters
|
||||
:returns: String of the query string
|
||||
"""
|
||||
if params == {}:
|
||||
if params is None:
|
||||
query_string = ""
|
||||
else:
|
||||
query_string = "?"
|
||||
@@ -523,7 +553,25 @@ class HTTPClient(QtCore.QObject):
|
||||
query_string += urllib.parse.urlencode(params)
|
||||
return query_string
|
||||
|
||||
def _executeHTTPQuery(self, method, path, callback, body, context={}, downloadProgressCallback=None, showProgress=True, ignoreErrors=False, progressText=None, server=None, timeout=120, prefix="/v2", params={}, networkManager=None, eventsHandler=None, **kwargs):
|
||||
def _executeHTTPQuery(
|
||||
self,
|
||||
method,
|
||||
path,
|
||||
callback,
|
||||
body=None,
|
||||
context=None,
|
||||
downloadProgressCallback=None,
|
||||
showProgress=True,
|
||||
ignoreErrors=False,
|
||||
progressText=None,
|
||||
server=None,
|
||||
timeout=120,
|
||||
prefix="/v2",
|
||||
params=None,
|
||||
networkManager=None,
|
||||
eventsHandler=None,
|
||||
**kwargs
|
||||
):
|
||||
"""
|
||||
Call the remote server
|
||||
|
||||
@@ -570,8 +618,10 @@ class HTTPClient(QtCore.QObject):
|
||||
log.error("Can't send query: {}".format(str(e)))
|
||||
return
|
||||
|
||||
context = copy.copy(context)
|
||||
context["query_id"] = str(uuid.uuid4())
|
||||
if context:
|
||||
context = copy.copy(context)
|
||||
else:
|
||||
context = {"query_id": str(uuid.uuid4())}
|
||||
|
||||
response.finished.connect(qpartial(self._processResponse, response, server, callback, context, body, ignoreErrors))
|
||||
response.errorOccurred.connect(qpartial(self._processError, response, server, callback, context, body, ignoreErrors))
|
||||
@@ -636,7 +686,8 @@ class HTTPClient(QtCore.QObject):
|
||||
# We check if we received HTTP headers
|
||||
if not sip.isdeleted(response) and response.isRunning() and not len(response.rawHeaderList()) > 0:
|
||||
if not response.error() != QtNetwork.QNetworkReply.NetworkError.NoError:
|
||||
log.warning("Timeout after {} seconds for request {}. Please check the connection is not blocked by a firewall or an anti-virus.".format(timeout, response.url().toString()))
|
||||
method = response.request().attribute(QtNetwork.QNetworkRequest.Attribute.CustomVerbAttribute).data().decode()
|
||||
log.warning("Timeout after {} seconds for request {} '{}'. Please check the connection is not blocked by a firewall or an anti-virus.".format(timeout, method, response.url().toString()))
|
||||
response.abort()
|
||||
|
||||
def disconnect(self):
|
||||
@@ -659,7 +710,8 @@ class HTTPClient(QtCore.QObject):
|
||||
error_message = "{} ({}:{})".format(response.errorString(), self._host, self._port)
|
||||
|
||||
if not ignore_errors:
|
||||
log.debug("Response error: %s for %s (error: %d)", error_message, response.url().toString(), error_code)
|
||||
method = response.request().attribute(QtNetwork.QNetworkRequest.Attribute.CustomVerbAttribute).data().decode()
|
||||
log.debug("Response error: %s for %s '%s' (error: %d)", error_message, method, response.url().toString(), error_code.value)
|
||||
|
||||
if "query_id" in context:
|
||||
self._notify_progress_end_query(context["query_id"])
|
||||
|
||||
11
gns3/link.py
11
gns3/link.py
@@ -84,14 +84,21 @@ class Link(QtCore.QObject):
|
||||
self._initialized = False
|
||||
self._filters = {}
|
||||
self._suspend = False
|
||||
self._nodes = []
|
||||
|
||||
# Boolean if True we are creating the first instance of this node
|
||||
# if false the node already exist in the topology
|
||||
# use to avoid erasing information when reloading
|
||||
self._creator = False
|
||||
|
||||
self._nodes = []
|
||||
self._link_style = {}
|
||||
# Add the default link style from the topology view settings
|
||||
from .main_window import MainWindow
|
||||
topology_view_settings = MainWindow.instance().uiGraphicsView.settings()
|
||||
self._link_style = {
|
||||
"color": topology_view_settings.get("default_link_color", "#000000"),
|
||||
"width": topology_view_settings.get("default_link_width", 2),
|
||||
"type": topology_view_settings.get("default_link_type", 1)
|
||||
}
|
||||
|
||||
body = self._prepareParams()
|
||||
if self._link_id:
|
||||
|
||||
@@ -321,6 +321,11 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
|
||||
style = new_settings.get("style")
|
||||
if style and new_settings["style"] != self._settings["style"]:
|
||||
self._setStyle(style)
|
||||
QtWidgets.QMessageBox.information(
|
||||
self,
|
||||
"Interface style",
|
||||
"Please restart the application to fully apply the {} style.".format(style)
|
||||
)
|
||||
|
||||
self._settings.update(new_settings)
|
||||
# save the settings
|
||||
|
||||
@@ -463,8 +463,8 @@ class QemuVMConfigurationPage(QtWidgets.QWidget, Ui_QemuVMConfigPageWidget):
|
||||
|
||||
if "linked_clone" in settings:
|
||||
self.uiBaseVMCheckBox.setChecked(settings["linked_clone"])
|
||||
else:
|
||||
self.uiBaseVMCheckBox.hide()
|
||||
if node:
|
||||
self.uiBaseVMCheckBox.setEnabled(False)
|
||||
|
||||
self.uiHdaDiskImageLineEdit.setText(settings["hda_disk_image"])
|
||||
self.uiHdbDiskImageLineEdit.setText(settings["hdb_disk_image"])
|
||||
@@ -601,7 +601,7 @@ class QemuVMConfigurationPage(QtWidgets.QWidget, Ui_QemuVMConfigPageWidget):
|
||||
else:
|
||||
settings["name"] = name
|
||||
|
||||
if "linked_clone" in settings:
|
||||
if "linked_clone" in settings and not node:
|
||||
settings["linked_clone"] = self.uiBaseVMCheckBox.isChecked()
|
||||
|
||||
settings["hda_disk_image"] = self.uiHdaDiskImageLineEdit.text().strip()
|
||||
|
||||
@@ -88,7 +88,8 @@ class QemuVM(Node):
|
||||
"kernel_command_line": "",
|
||||
"port_name_format": "Ethernet{0}",
|
||||
"port_segment_size": 0,
|
||||
"first_port_name": ""}
|
||||
"first_port_name": "",
|
||||
"linked_clone": False}
|
||||
|
||||
self.settings().update(qemu_vm_settings)
|
||||
|
||||
|
||||
@@ -133,8 +133,8 @@ class VirtualBoxVMConfigurationPage(QtWidgets.QWidget, Ui_virtualBoxVMConfigPage
|
||||
|
||||
if "linked_clone" in settings:
|
||||
self.uiBaseVMCheckBox.setChecked(settings["linked_clone"])
|
||||
else:
|
||||
self.uiBaseVMCheckBox.hide()
|
||||
if node:
|
||||
self.uiBaseVMCheckBox.setEnabled(False)
|
||||
|
||||
else:
|
||||
self.uiNameLabel.hide()
|
||||
@@ -220,7 +220,7 @@ class VirtualBoxVMConfigurationPage(QtWidgets.QWidget, Ui_virtualBoxVMConfigPage
|
||||
else:
|
||||
settings["name"] = name
|
||||
|
||||
if "linked_clone" in settings:
|
||||
if "linked_clone" in settings and not node:
|
||||
settings["linked_clone"] = self.uiBaseVMCheckBox.isChecked()
|
||||
|
||||
if not node:
|
||||
|
||||
@@ -57,7 +57,8 @@ class VirtualBoxVM(Node):
|
||||
"custom_adapters": VBOX_VM_SETTINGS["custom_adapters"],
|
||||
"port_name_format": "Ethernet0",
|
||||
"port_segment_size": 0,
|
||||
"first_port_name": None}
|
||||
"first_port_name": None,
|
||||
"linked_close": False}
|
||||
|
||||
self.settings().update(virtualbox_vm_settings)
|
||||
|
||||
|
||||
@@ -133,8 +133,8 @@ class VMwareVMConfigurationPage(QtWidgets.QWidget, Ui_VMwareVMConfigPageWidget):
|
||||
|
||||
if "linked_clone" in settings:
|
||||
self.uiBaseVMCheckBox.setChecked(settings["linked_clone"])
|
||||
else:
|
||||
self.uiBaseVMCheckBox.hide()
|
||||
if node:
|
||||
self.uiBaseVMCheckBox.setEnabled(False)
|
||||
|
||||
else:
|
||||
self.uiNameLabel.hide()
|
||||
@@ -219,7 +219,7 @@ class VMwareVMConfigurationPage(QtWidgets.QWidget, Ui_VMwareVMConfigPageWidget):
|
||||
else:
|
||||
settings["name"] = name
|
||||
|
||||
if "linked_clone" in settings:
|
||||
if "linked_clone" in settings and not node:
|
||||
settings["linked_clone"] = self.uiBaseVMCheckBox.isChecked()
|
||||
|
||||
if not node:
|
||||
|
||||
@@ -59,7 +59,8 @@ class VMwareVM(Node):
|
||||
"custom_adapters": VMWARE_VM_SETTINGS["custom_adapters"],
|
||||
"port_name_format": "Ethernet{0}",
|
||||
"port_segment_size": 0,
|
||||
"first_port_name": None}
|
||||
"first_port_name": None,
|
||||
"linked_clone": False}
|
||||
|
||||
self.settings().update(vmware_vm_settings)
|
||||
|
||||
|
||||
@@ -750,8 +750,12 @@ class Node(BaseNode):
|
||||
wmctrl_path = shutil.which("wmctrl")
|
||||
if wmctrl_path:
|
||||
try:
|
||||
# use wmctrl to raise the window based on the node name (this doesn't work well with window having multiple tabs)
|
||||
subprocess.run([wmctrl_path, "-Fa", self.name()], check=True, env=os.environ)
|
||||
console_type = self.consoleType()
|
||||
if console_type == "telnet":
|
||||
# use wmctrl to raise the window based on the node name (this doesn't work well with window having multiple tabs)
|
||||
subprocess.run([wmctrl_path, "-Fa", self.name()], check=True, env=os.environ)
|
||||
else:
|
||||
subprocess.run([wmctrl_path, "-a", '(' + self.name() + ')'], check=True, env=os.environ)
|
||||
return True
|
||||
except subprocess.CalledProcessError:
|
||||
log.debug("Could not find window title '{}' to bring it to front".format(self.name()))
|
||||
|
||||
@@ -63,6 +63,12 @@ class GeneralPreferencesPage(QtWidgets.QWidget, Ui_GeneralPreferencesPageWidget)
|
||||
self.uiDefaultLabelColorPushButton.clicked.connect(self._setDefaultLabelColorSlot)
|
||||
self.uiDefaultNoteFontPushButton.clicked.connect(self._setDefaultNoteFontSlot)
|
||||
self.uiDefaultNoteColorPushButton.clicked.connect(self._setDefaultNoteColorSlot)
|
||||
self.uiDefaultLinkColorPushButton.clicked.connect(self._setDefaultLinkColorSlot)
|
||||
self.uiDefaultLinkStyleComboBox.addItem("Solid", QtCore.Qt.PenStyle.SolidLine)
|
||||
self.uiDefaultLinkStyleComboBox.addItem("Dash", QtCore.Qt.PenStyle.DashLine)
|
||||
self.uiDefaultLinkStyleComboBox.addItem("Dot", QtCore.Qt.PenStyle.DotLine)
|
||||
self.uiDefaultLinkStyleComboBox.addItem("Dash Dot", QtCore.Qt.PenStyle.DashDotLine)
|
||||
self.uiDefaultLinkStyleComboBox.addItem("Dash Dot Dot", QtCore.Qt.PenStyle.DashDotDotLine)
|
||||
self.uiBrowseConfigurationPushButton.clicked.connect(self._browseConfigurationDirectorySlot)
|
||||
self._default_label_color = QtGui.QColor(QtCore.Qt.GlobalColor.black)
|
||||
self.uiStyleComboBox.addItems(STYLES)
|
||||
@@ -288,6 +294,16 @@ class GeneralPreferencesPage(QtWidgets.QWidget, Ui_GeneralPreferencesPageWidget)
|
||||
self._default_note_color = color
|
||||
self.uiDefaultNoteStylePlainTextEdit.setStyleSheet("color : {}".format(color.name()))
|
||||
|
||||
def _setDefaultLinkColorSlot(self):
|
||||
"""
|
||||
Slot to select the default link color.
|
||||
"""
|
||||
|
||||
color = QtWidgets.QColorDialog.getColor(self._default_link_color, self)
|
||||
if color.isValid():
|
||||
self._default_link_color = color
|
||||
self.uiDefaultLinkColorPushButton.setStyleSheet("background-color: {};".format(color.name()))
|
||||
|
||||
def _populateGeneralSettingWidgets(self, settings):
|
||||
"""
|
||||
Populates the widgets with the settings.
|
||||
@@ -367,6 +383,15 @@ class GeneralPreferencesPage(QtWidgets.QWidget, Ui_GeneralPreferencesPageWidget)
|
||||
self._default_note_color = qt_color
|
||||
self.uiDefaultNoteStylePlainTextEdit.setStyleSheet("color : {}".format(qt_color.name()))
|
||||
|
||||
qt_color = QtGui.QColor(settings["default_link_color"])
|
||||
if qt_color.isValid():
|
||||
self._default_link_color = qt_color
|
||||
self.uiDefaultLinkColorPushButton.setStyleSheet("background-color: {};".format(qt_color.name()))
|
||||
self.uiDefaultLinkWidthSpinBox.setValue(settings["default_link_width"])
|
||||
index = self.uiDefaultLinkStyleComboBox.findData(settings["default_link_type"])
|
||||
if index != -1:
|
||||
self.uiDefaultLinkStyleComboBox.setCurrentIndex(index)
|
||||
|
||||
def loadPreferences(self):
|
||||
"""
|
||||
Loads the general preferences.
|
||||
@@ -415,18 +440,23 @@ class GeneralPreferencesPage(QtWidgets.QWidget, Ui_GeneralPreferencesPageWidget)
|
||||
from ..main_window import MainWindow
|
||||
MainWindow.instance().setSettings(new_general_settings)
|
||||
|
||||
new_graphics_view_settings = {"scene_width": self.uiSceneWidthSpinBox.value(),
|
||||
"scene_height": self.uiSceneHeightSpinBox.value(),
|
||||
"draw_rectangle_selected_item": self.uiRectangleSelectedItemCheckBox.isChecked(),
|
||||
"draw_link_status_points": self.uiDrawLinkStatusPointsCheckBox.isChecked(),
|
||||
"show_interface_labels_on_new_project": self.uiShowInterfaceLabelsOnNewProject.isChecked(),
|
||||
"limit_size_node_symbols": self.uiLimitSizeNodeSymbolCheckBox.isChecked(),
|
||||
"show_grid_on_new_project": self.uiShowGridOnNewProject.isChecked(),
|
||||
"snap_to_grid_on_new_project": self.uiSnapToGridOnNewProject.isChecked(),
|
||||
"default_label_font": self.uiDefaultLabelStylePlainTextEdit.font().toString(),
|
||||
"default_label_color": self._default_label_color.name(),
|
||||
"default_note_font": self.uiDefaultNoteStylePlainTextEdit.font().toString(),
|
||||
"default_note_color": self._default_note_color.name()}
|
||||
new_graphics_view_settings = {
|
||||
"scene_width": self.uiSceneWidthSpinBox.value(),
|
||||
"scene_height": self.uiSceneHeightSpinBox.value(),
|
||||
"draw_rectangle_selected_item": self.uiRectangleSelectedItemCheckBox.isChecked(),
|
||||
"draw_link_status_points": self.uiDrawLinkStatusPointsCheckBox.isChecked(),
|
||||
"show_interface_labels_on_new_project": self.uiShowInterfaceLabelsOnNewProject.isChecked(),
|
||||
"limit_size_node_symbols": self.uiLimitSizeNodeSymbolCheckBox.isChecked(),
|
||||
"show_grid_on_new_project": self.uiShowGridOnNewProject.isChecked(),
|
||||
"snap_to_grid_on_new_project": self.uiSnapToGridOnNewProject.isChecked(),
|
||||
"default_label_font": self.uiDefaultLabelStylePlainTextEdit.font().toString(),
|
||||
"default_label_color": self._default_label_color.name(),
|
||||
"default_note_font": self.uiDefaultNoteStylePlainTextEdit.font().toString(),
|
||||
"default_note_color": self._default_note_color.name(),
|
||||
"default_link_color": self._default_link_color.name(),
|
||||
"default_link_width": self.uiDefaultLinkWidthSpinBox.value(),
|
||||
"default_link_type": self.uiDefaultLinkStyleComboBox.currentData().value
|
||||
}
|
||||
|
||||
node_grid_size = self.uiNodeGridSizeSpinBox.value()
|
||||
drawing_grid_size = self.uiDrawingGridSizeSpinBox.value()
|
||||
|
||||
@@ -318,7 +318,7 @@ class Project(QtCore.QObject):
|
||||
if self._id is None:
|
||||
return
|
||||
|
||||
Controller.instance().post("/projects/{project_id}/nodes/start".format(project_id=self._id), None, body={}, timeout=None)
|
||||
Controller.instance().post("/projects/{project_id}/nodes/start".format(project_id=self._id), None, timeout=None)
|
||||
|
||||
def duplicate(self, name=None, path=None, callback=None):
|
||||
"""
|
||||
@@ -345,7 +345,7 @@ class Project(QtCore.QObject):
|
||||
if self._id is None:
|
||||
return
|
||||
|
||||
Controller.instance().post("/projects/{project_id}/nodes/stop".format(project_id=self._id), None, body={}, timeout=None)
|
||||
Controller.instance().post("/projects/{project_id}/nodes/stop".format(project_id=self._id), None, timeout=None)
|
||||
|
||||
def suspend_all_nodes(self):
|
||||
"""Suspend all nodes belonging to this project"""
|
||||
@@ -354,7 +354,7 @@ class Project(QtCore.QObject):
|
||||
if self._id is None:
|
||||
return
|
||||
|
||||
Controller.instance().post("/projects/{project_id}/nodes/suspend".format(project_id=self._id), None, body={}, timeout=None)
|
||||
Controller.instance().post("/projects/{project_id}/nodes/suspend".format(project_id=self._id), None, timeout=None)
|
||||
|
||||
def reload_all_nodes(self):
|
||||
"""Reload all nodes belonging to this project"""
|
||||
@@ -363,7 +363,7 @@ class Project(QtCore.QObject):
|
||||
if self._id is None:
|
||||
return
|
||||
|
||||
Controller.instance().post("/projects/{project_id}/nodes/reload".format(project_id=self._id), None, body={}, timeout=None)
|
||||
Controller.instance().post("/projects/{project_id}/nodes/reload".format(project_id=self._id), None, timeout=None)
|
||||
|
||||
def reset_console_all_nodes(self):
|
||||
"""Reset console for all nodes belonging to this project"""
|
||||
@@ -372,7 +372,7 @@ class Project(QtCore.QObject):
|
||||
if self._id is None:
|
||||
return
|
||||
|
||||
Controller.instance().post("/projects/{project_id}/nodes/console/reset".format(project_id=self._id), None, body={}, timeout=None)
|
||||
Controller.instance().post("/projects/{project_id}/nodes/console/reset".format(project_id=self._id), None, timeout=None)
|
||||
|
||||
def get(self, path, callback, **kwargs):
|
||||
"""
|
||||
@@ -386,7 +386,7 @@ class Project(QtCore.QObject):
|
||||
"""
|
||||
self._projectHTTPQuery("GET", path, callback, **kwargs)
|
||||
|
||||
def post(self, path, callback, body={}, **kwargs):
|
||||
def post(self, path, callback, body=None, **kwargs):
|
||||
"""
|
||||
HTTP POST on the remote server
|
||||
|
||||
@@ -398,7 +398,7 @@ class Project(QtCore.QObject):
|
||||
"""
|
||||
self._projectHTTPQuery("POST", path, callback, body=body, **kwargs)
|
||||
|
||||
def put(self, path, callback, body={}, **kwargs):
|
||||
def put(self, path, callback, body=None, **kwargs):
|
||||
"""
|
||||
HTTP PUT on the remote server
|
||||
|
||||
@@ -410,7 +410,7 @@ class Project(QtCore.QObject):
|
||||
"""
|
||||
self._projectHTTPQuery("PUT", path, callback, body=body, **kwargs)
|
||||
|
||||
def delete(self, path, callback, body={}, **kwargs):
|
||||
def delete(self, path, callback, **kwargs):
|
||||
"""
|
||||
HTTP DELETE on the remote server
|
||||
|
||||
@@ -420,9 +420,9 @@ class Project(QtCore.QObject):
|
||||
|
||||
Full arg list in createHTTPQuery
|
||||
"""
|
||||
self._projectHTTPQuery("DELETE", path, callback, body=body, **kwargs)
|
||||
self._projectHTTPQuery("DELETE", path, callback, **kwargs)
|
||||
|
||||
def _projectHTTPQuery(self, method, path, callback, body={}, **kwargs):
|
||||
def _projectHTTPQuery(self, method, path, callback, body=None, **kwargs):
|
||||
"""
|
||||
HTTP query on the remote server
|
||||
|
||||
@@ -588,7 +588,7 @@ class Project(QtCore.QObject):
|
||||
self._closing = True
|
||||
if self._id:
|
||||
self.project_about_to_close_signal.emit()
|
||||
Controller.instance().post("/projects/{project_id}/close".format(project_id=self._id), self._projectClosedCallback, body={}, progressText="Close the project")
|
||||
Controller.instance().post("/projects/{project_id}/close".format(project_id=self._id), self._projectClosedCallback, progressText="Close the project")
|
||||
else:
|
||||
# The project is not initialized when we close it
|
||||
self._closed = True
|
||||
@@ -600,7 +600,7 @@ class Project(QtCore.QObject):
|
||||
Delete the project from all servers
|
||||
"""
|
||||
self.project_about_to_close_signal.emit()
|
||||
Controller.instance().delete("/projects/{project_id}".format(project_id=self._id), self._projectClosedCallback, body={}, progressText="Delete the project")
|
||||
Controller.instance().delete("/projects/{project_id}".format(project_id=self._id), self._projectClosedCallback, progressText="Delete the project")
|
||||
|
||||
def _projectClosedCallback(self, result, error=False, server=None, **kwargs):
|
||||
|
||||
|
||||
@@ -375,8 +375,7 @@
|
||||
"high",
|
||||
"normal",
|
||||
"low",
|
||||
"very low",
|
||||
"null"]
|
||||
"very low"]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -308,13 +308,15 @@
|
||||
"qemu_disk_interfaces": {
|
||||
"enum": [
|
||||
"ide",
|
||||
"sata",
|
||||
"nvme",
|
||||
"scsi",
|
||||
"sd",
|
||||
"mtd",
|
||||
"floppy",
|
||||
"pflash",
|
||||
"virtio",
|
||||
"sata"
|
||||
"none"
|
||||
]
|
||||
},
|
||||
"qemu_properties": {
|
||||
@@ -561,8 +563,7 @@
|
||||
"high",
|
||||
"normal",
|
||||
"low",
|
||||
"very low",
|
||||
"null"
|
||||
"very low"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,6 +329,9 @@ GRAPHICS_VIEW_SETTINGS = {
|
||||
"default_label_color": "#000000",
|
||||
"default_note_font": "TypeWriter,10,-1,5,75,0,0,0,0,0",
|
||||
"default_note_color": "#000000",
|
||||
"default_link_color": "#000000",
|
||||
"default_link_type": 1,
|
||||
"default_link_width": 2,
|
||||
"zoom": None,
|
||||
"show_layers": False,
|
||||
"snap_to_grid": False,
|
||||
|
||||
@@ -103,6 +103,7 @@ class Style:
|
||||
self._mw.setStyleSheet("")
|
||||
QtGui.QGuiApplication.setPalette(QtWidgets.QApplication.style().standardPalette())
|
||||
self._mw.uiConsoleTextEdit.setDefaultTextColor(QtGui.QColor(0, 0, 0))
|
||||
self._resetDefaultColors()
|
||||
self._setLegacyIcons()
|
||||
|
||||
def _setClassicIcons(self):
|
||||
@@ -172,6 +173,7 @@ class Style:
|
||||
self._mw.setStyleSheet("")
|
||||
QtGui.QGuiApplication.setPalette(QtWidgets.QApplication.style().standardPalette())
|
||||
self._mw.uiConsoleTextEdit.setDefaultTextColor(QtGui.QColor(0, 0, 0))
|
||||
self._resetDefaultColors()
|
||||
self._setClassicIcons()
|
||||
|
||||
def _setCharcoalIcons(self):
|
||||
@@ -229,6 +231,22 @@ class Style:
|
||||
icon.addPixmap(QtGui.QPixmap(":/charcoal_icons/unlock-hover.svg"), QtGui.QIcon.Mode.Active, QtGui.QIcon.State.Off)
|
||||
self._mw.uiLockAllAction.setIcon(icon)
|
||||
|
||||
def _resetDefaultColors(self):
|
||||
"""
|
||||
Reset the default colors if switching from the Dark style.
|
||||
"""
|
||||
|
||||
# set the default colors to black if they are still set to light gray (set by the dark style)
|
||||
graphics_view = self._mw.uiGraphicsView
|
||||
topology_view_settings = graphics_view.settings()
|
||||
if topology_view_settings["default_note_color"] == "#dfe1e2":
|
||||
topology_view_settings["default_note_color"] = "#000000"
|
||||
if topology_view_settings["default_label_color"] == "#dfe1e2":
|
||||
topology_view_settings["default_label_color"] = "#000000"
|
||||
if topology_view_settings["default_link_color"] == "#dfe1e2":
|
||||
topology_view_settings["default_link_color"] = "#000000"
|
||||
graphics_view.setSettings(topology_view_settings)
|
||||
|
||||
def setCharcoalStyle(self):
|
||||
"""
|
||||
Sets the charcoal GUI style.
|
||||
@@ -247,6 +265,7 @@ class Style:
|
||||
self._mw.setStyleSheet(style)
|
||||
QtWidgets.QApplication.setPalette(QtWidgets.QApplication.style().standardPalette())
|
||||
self._mw.uiConsoleTextEdit.setDefaultTextColor(QtGui.QColor(0, 0, 0))
|
||||
self._resetDefaultColors()
|
||||
self._setCharcoalIcons()
|
||||
|
||||
def setDarkStyle(self):
|
||||
@@ -254,7 +273,6 @@ class Style:
|
||||
Sets the dark GUI style.
|
||||
"""
|
||||
|
||||
|
||||
graphics_view = self._mw.uiGraphicsView
|
||||
if hasattr(graphics_view, 'resetGridColors'):
|
||||
graphics_view.resetGridColors()
|
||||
@@ -263,9 +281,19 @@ class Style:
|
||||
style = qdarkstyle.load_stylesheet(qt_api='pyqt6')
|
||||
style += "QMenu::item { padding: 5px; }"
|
||||
self._mw.setStyleSheet(style)
|
||||
text_color = QtGui.QColor(0xdf, 0xe1, 0xe2) # light gray
|
||||
color = QtGui.QColor(0xdf, 0xe1, 0xe2) # light gray
|
||||
palette = QtGui.QPalette()
|
||||
palette.setColor(QtGui.QPalette.ColorRole.Text, text_color)
|
||||
palette.setColor(QtGui.QPalette.ColorRole.Text, color)
|
||||
QtGui.QGuiApplication.setPalette(palette)
|
||||
self._mw.uiConsoleTextEdit.setDefaultTextColor(text_color)
|
||||
self._mw.uiConsoleTextEdit.setDefaultTextColor(color)
|
||||
# set the default colors to the light gray if they are still set to black
|
||||
# (i.e. not customized by the user) to be visible in the dark style
|
||||
topology_view_settings = graphics_view.settings()
|
||||
if topology_view_settings["default_note_color"] == "#000000":
|
||||
topology_view_settings["default_note_color"] = color.name()
|
||||
if topology_view_settings["default_label_color"] == "#000000":
|
||||
topology_view_settings["default_label_color"] = color.name()
|
||||
if topology_view_settings["default_link_color"] == "#000000":
|
||||
topology_view_settings["default_link_color"] = color.name()
|
||||
graphics_view.setSettings(topology_view_settings)
|
||||
self._setCharcoalIcons() # use the charcoal icons for the dark style
|
||||
|
||||
@@ -81,7 +81,7 @@ class TemplateManager(QtCore.QObject):
|
||||
if template_id in self._templates and not self._templates[template_id].builtin():
|
||||
template = self._templates[template_id]
|
||||
log.debug("Delete template '{}' (ID={})".format(template.name(), template_id))
|
||||
self._controller.delete("/templates/{template_id}".format(template_id=template_id), None)
|
||||
self._controller.delete("/templates/{template_id}".format(template_id=template_id))
|
||||
|
||||
def deleteTemplateCallback(self, result, error=False, **kwargs):
|
||||
"""
|
||||
|
||||
@@ -641,25 +641,43 @@
|
||||
<attribute name="title">
|
||||
<string>Topology view</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="uiSceneWidthLabel">
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="uiDrawingGridSizeLabel">
|
||||
<property name="text">
|
||||
<string>Default width:</string>
|
||||
<string>Default drawing grid size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="uiNotePreviewLabel">
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="uiNodeGridSizeLabel">
|
||||
<property name="text">
|
||||
<string>Default note style:</string>
|
||||
<string>Default node grid size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="uiShowInterfaceLabelsOnNewProject">
|
||||
<property name="text">
|
||||
<string>Show interface labels on new project</string>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="uiNodeGridSizeSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>150</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>75</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -670,122 +688,298 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0" colspan="3">
|
||||
<widget class="QPlainTextEdit" name="uiDefaultNoteStylePlainTextEdit">
|
||||
<item row="10" column="0" colspan="2">
|
||||
<widget class="QToolBox" name="toolBox">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>472</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
<string>Default label style</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="uiDefaultLabelFontPushButton">
|
||||
<property name="text">
|
||||
<string>&Select default font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="uiDefaultLabelColorPushButton">
|
||||
<property name="text">
|
||||
<string>&Select default color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QPlainTextEdit" name="uiDefaultLabelStylePlainTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>AaBbYyZz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>309</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
<string>Default note style</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPlainTextEdit" name="uiDefaultNoteStylePlainTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>AaBbYyZz</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||
<item>
|
||||
<widget class="QPushButton" name="uiDefaultNoteFontPushButton">
|
||||
<property name="text">
|
||||
<string>&Select default font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="uiDefaultNoteColorPushButton">
|
||||
<property name="text">
|
||||
<string>&Select default color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<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>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>472</width>
|
||||
<height>106</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="label">
|
||||
<string>Default link style</string>
|
||||
</attribute>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="uiDefaultLinkColorLabel">
|
||||
<property name="text">
|
||||
<string>Color:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="uiDefaultLinkColorPushButton">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="uiDefaultLinkWidthLabel">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="uiDefaultLinkWidthSpinBox">
|
||||
<property name="suffix">
|
||||
<string> px</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="uiDefaultLinkStyleLabel">
|
||||
<property name="text">
|
||||
<string>Style:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="uiDefaultLinkStyleComboBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="uiSceneWidthSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
<property name="suffix">
|
||||
<string> pixels</string>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>AaBbYyZz</string>
|
||||
<property name="minimum">
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>2000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="15" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_14">
|
||||
<item>
|
||||
<widget class="QPushButton" name="uiDefaultNoteFontPushButton">
|
||||
<property name="text">
|
||||
<string>&Select default font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="uiDefaultNoteColorPushButton">
|
||||
<property name="text">
|
||||
<string>&Select default color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<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 row="3" column="1">
|
||||
<widget class="QSpinBox" name="uiDrawingGridSizeSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>25</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="uiLimitSizeNodeSymbolCheckBox">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="uiSceneWidthLabel">
|
||||
<property name="text">
|
||||
<string>Limit the size of node symbols</string>
|
||||
<string>Default width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QPushButton" name="uiDefaultLabelFontPushButton">
|
||||
<property name="text">
|
||||
<string>&Select default font</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="uiDefaultLabelColorPushButton">
|
||||
<property name="text">
|
||||
<string>&Select default color</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<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>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="11" column="0" colspan="3">
|
||||
<widget class="QPlainTextEdit" name="uiDefaultLabelStylePlainTextEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="uiDrawLinkStatusPointsCheckBox">
|
||||
<property name="text">
|
||||
<string>Draw link status points</string>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="plainText">
|
||||
<string>AaBbYyZz</string>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="uiShowInterfaceLabelsOnNewProject">
|
||||
<property name="text">
|
||||
<string>Show interface labels on new project</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="uiShowGridOnNewProject">
|
||||
<property name="text">
|
||||
<string>Show grid on new project</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -817,120 +1011,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="uiSceneWidthSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> pixels</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>500</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>2000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="uiSnapToGridOnNewProject">
|
||||
<property name="text">
|
||||
<string>Snap to grid on new project</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="uiDrawingGridSizeLabel">
|
||||
<property name="text">
|
||||
<string>Default drawing grid size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="uiLabelPreviewLabel">
|
||||
<property name="text">
|
||||
<string>Default label style:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="uiNodeGridSizeLabel">
|
||||
<property name="text">
|
||||
<string>Default node grid size:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="uiDrawingGridSizeSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>25</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="uiNodeGridSizeSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::StrongFocus</enum>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>150</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>75</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="uiShowGridOnNewProject">
|
||||
<property name="text">
|
||||
<string>Show grid on new project</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="uiRectangleSelectedItemCheckBox">
|
||||
<property name="text">
|
||||
<string>Draw a rectangle when an item is selected</string>
|
||||
@@ -940,7 +1021,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<item row="13" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -953,16 +1034,33 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="uiDrawLinkStatusPointsCheckBox">
|
||||
<item row="9" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="uiLimitSizeNodeSymbolCheckBox">
|
||||
<property name="text">
|
||||
<string>Draw link status points</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<string>Limit the size of node symbols</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="uiSnapToGridOnNewProject">
|
||||
<property name="text">
|
||||
<string>Snap to grid on new project</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="uiMiscTab">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/ui/general_preferences_page.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.10.1
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
@@ -293,118 +293,14 @@ class Ui_GeneralPreferencesPageWidget(object):
|
||||
self.uiMiscTabWidget.addTab(self.uiSPICETab, "")
|
||||
self.uiSceneTab = QtWidgets.QWidget()
|
||||
self.uiSceneTab.setObjectName("uiSceneTab")
|
||||
self.gridLayout_3 = QtWidgets.QGridLayout(self.uiSceneTab)
|
||||
self.gridLayout_3.setObjectName("gridLayout_3")
|
||||
self.uiSceneWidthLabel = QtWidgets.QLabel(parent=self.uiSceneTab)
|
||||
self.uiSceneWidthLabel.setObjectName("uiSceneWidthLabel")
|
||||
self.gridLayout_3.addWidget(self.uiSceneWidthLabel, 0, 0, 1, 1)
|
||||
self.uiNotePreviewLabel = QtWidgets.QLabel(parent=self.uiSceneTab)
|
||||
self.uiNotePreviewLabel.setObjectName("uiNotePreviewLabel")
|
||||
self.gridLayout_3.addWidget(self.uiNotePreviewLabel, 13, 0, 1, 1)
|
||||
self.uiShowInterfaceLabelsOnNewProject = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiShowInterfaceLabelsOnNewProject.setObjectName("uiShowInterfaceLabelsOnNewProject")
|
||||
self.gridLayout_3.addWidget(self.uiShowInterfaceLabelsOnNewProject, 6, 0, 1, 2)
|
||||
self.uiSceneHeightLabel = QtWidgets.QLabel(parent=self.uiSceneTab)
|
||||
self.uiSceneHeightLabel.setObjectName("uiSceneHeightLabel")
|
||||
self.gridLayout_3.addWidget(self.uiSceneHeightLabel, 1, 0, 1, 1)
|
||||
self.uiDefaultNoteStylePlainTextEdit = QtWidgets.QPlainTextEdit(parent=self.uiSceneTab)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiDefaultNoteStylePlainTextEdit.sizePolicy().hasHeightForWidth())
|
||||
self.uiDefaultNoteStylePlainTextEdit.setSizePolicy(sizePolicy)
|
||||
self.uiDefaultNoteStylePlainTextEdit.setMaximumSize(QtCore.QSize(16777215, 50))
|
||||
self.uiDefaultNoteStylePlainTextEdit.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.uiDefaultNoteStylePlainTextEdit.setReadOnly(True)
|
||||
self.uiDefaultNoteStylePlainTextEdit.setObjectName("uiDefaultNoteStylePlainTextEdit")
|
||||
self.gridLayout_3.addWidget(self.uiDefaultNoteStylePlainTextEdit, 14, 0, 1, 3)
|
||||
self.horizontalLayout_14 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_14.setObjectName("horizontalLayout_14")
|
||||
self.uiDefaultNoteFontPushButton = QtWidgets.QPushButton(parent=self.uiSceneTab)
|
||||
self.uiDefaultNoteFontPushButton.setObjectName("uiDefaultNoteFontPushButton")
|
||||
self.horizontalLayout_14.addWidget(self.uiDefaultNoteFontPushButton)
|
||||
self.uiDefaultNoteColorPushButton = QtWidgets.QPushButton(parent=self.uiSceneTab)
|
||||
self.uiDefaultNoteColorPushButton.setObjectName("uiDefaultNoteColorPushButton")
|
||||
self.horizontalLayout_14.addWidget(self.uiDefaultNoteColorPushButton)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_14.addItem(spacerItem7)
|
||||
self.gridLayout_3.addLayout(self.horizontalLayout_14, 15, 0, 1, 3)
|
||||
self.uiLimitSizeNodeSymbolCheckBox = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiLimitSizeNodeSymbolCheckBox.setObjectName("uiLimitSizeNodeSymbolCheckBox")
|
||||
self.gridLayout_3.addWidget(self.uiLimitSizeNodeSymbolCheckBox, 9, 0, 1, 2)
|
||||
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
||||
self.uiDefaultLabelFontPushButton = QtWidgets.QPushButton(parent=self.uiSceneTab)
|
||||
self.uiDefaultLabelFontPushButton.setObjectName("uiDefaultLabelFontPushButton")
|
||||
self.horizontalLayout_5.addWidget(self.uiDefaultLabelFontPushButton)
|
||||
self.uiDefaultLabelColorPushButton = QtWidgets.QPushButton(parent=self.uiSceneTab)
|
||||
self.uiDefaultLabelColorPushButton.setObjectName("uiDefaultLabelColorPushButton")
|
||||
self.horizontalLayout_5.addWidget(self.uiDefaultLabelColorPushButton)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_5.addItem(spacerItem8)
|
||||
self.gridLayout_3.addLayout(self.horizontalLayout_5, 12, 0, 1, 3)
|
||||
self.uiDefaultLabelStylePlainTextEdit = QtWidgets.QPlainTextEdit(parent=self.uiSceneTab)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiDefaultLabelStylePlainTextEdit.sizePolicy().hasHeightForWidth())
|
||||
self.uiDefaultLabelStylePlainTextEdit.setSizePolicy(sizePolicy)
|
||||
self.uiDefaultLabelStylePlainTextEdit.setMaximumSize(QtCore.QSize(16777215, 50))
|
||||
self.uiDefaultLabelStylePlainTextEdit.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.uiDefaultLabelStylePlainTextEdit.setReadOnly(True)
|
||||
self.uiDefaultLabelStylePlainTextEdit.setObjectName("uiDefaultLabelStylePlainTextEdit")
|
||||
self.gridLayout_3.addWidget(self.uiDefaultLabelStylePlainTextEdit, 11, 0, 1, 3)
|
||||
self.uiSceneHeightSpinBox = QtWidgets.QSpinBox(parent=self.uiSceneTab)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiSceneHeightSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.uiSceneHeightSpinBox.setSizePolicy(sizePolicy)
|
||||
self.uiSceneHeightSpinBox.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.uiSceneHeightSpinBox.setMinimum(500)
|
||||
self.uiSceneHeightSpinBox.setMaximum(1000000)
|
||||
self.uiSceneHeightSpinBox.setSingleStep(100)
|
||||
self.uiSceneHeightSpinBox.setProperty("value", 1000)
|
||||
self.uiSceneHeightSpinBox.setObjectName("uiSceneHeightSpinBox")
|
||||
self.gridLayout_3.addWidget(self.uiSceneHeightSpinBox, 1, 1, 1, 1)
|
||||
self.uiSceneWidthSpinBox = QtWidgets.QSpinBox(parent=self.uiSceneTab)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiSceneWidthSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.uiSceneWidthSpinBox.setSizePolicy(sizePolicy)
|
||||
self.uiSceneWidthSpinBox.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.uiSceneWidthSpinBox.setMinimum(500)
|
||||
self.uiSceneWidthSpinBox.setMaximum(1000000)
|
||||
self.uiSceneWidthSpinBox.setSingleStep(100)
|
||||
self.uiSceneWidthSpinBox.setProperty("value", 2000)
|
||||
self.uiSceneWidthSpinBox.setObjectName("uiSceneWidthSpinBox")
|
||||
self.gridLayout_3.addWidget(self.uiSceneWidthSpinBox, 0, 1, 1, 1)
|
||||
self.uiSnapToGridOnNewProject = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiSnapToGridOnNewProject.setObjectName("uiSnapToGridOnNewProject")
|
||||
self.gridLayout_3.addWidget(self.uiSnapToGridOnNewProject, 8, 0, 1, 2)
|
||||
self.gridLayout_6 = QtWidgets.QGridLayout(self.uiSceneTab)
|
||||
self.gridLayout_6.setObjectName("gridLayout_6")
|
||||
self.uiDrawingGridSizeLabel = QtWidgets.QLabel(parent=self.uiSceneTab)
|
||||
self.uiDrawingGridSizeLabel.setObjectName("uiDrawingGridSizeLabel")
|
||||
self.gridLayout_3.addWidget(self.uiDrawingGridSizeLabel, 3, 0, 1, 1)
|
||||
self.uiLabelPreviewLabel = QtWidgets.QLabel(parent=self.uiSceneTab)
|
||||
self.uiLabelPreviewLabel.setObjectName("uiLabelPreviewLabel")
|
||||
self.gridLayout_3.addWidget(self.uiLabelPreviewLabel, 10, 0, 1, 1)
|
||||
self.gridLayout_6.addWidget(self.uiDrawingGridSizeLabel, 3, 0, 1, 1)
|
||||
self.uiNodeGridSizeLabel = QtWidgets.QLabel(parent=self.uiSceneTab)
|
||||
self.uiNodeGridSizeLabel.setObjectName("uiNodeGridSizeLabel")
|
||||
self.gridLayout_3.addWidget(self.uiNodeGridSizeLabel, 2, 0, 1, 1)
|
||||
self.uiDrawingGridSizeSpinBox = QtWidgets.QSpinBox(parent=self.uiSceneTab)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiDrawingGridSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.uiDrawingGridSizeSpinBox.setSizePolicy(sizePolicy)
|
||||
self.uiDrawingGridSizeSpinBox.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.uiDrawingGridSizeSpinBox.setMinimum(5)
|
||||
self.uiDrawingGridSizeSpinBox.setMaximum(100)
|
||||
self.uiDrawingGridSizeSpinBox.setSingleStep(5)
|
||||
self.uiDrawingGridSizeSpinBox.setProperty("value", 25)
|
||||
self.uiDrawingGridSizeSpinBox.setObjectName("uiDrawingGridSizeSpinBox")
|
||||
self.gridLayout_3.addWidget(self.uiDrawingGridSizeSpinBox, 3, 1, 1, 1)
|
||||
self.gridLayout_6.addWidget(self.uiNodeGridSizeLabel, 2, 0, 1, 1)
|
||||
self.uiNodeGridSizeSpinBox = QtWidgets.QSpinBox(parent=self.uiSceneTab)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
@@ -417,20 +313,163 @@ class Ui_GeneralPreferencesPageWidget(object):
|
||||
self.uiNodeGridSizeSpinBox.setSingleStep(5)
|
||||
self.uiNodeGridSizeSpinBox.setProperty("value", 75)
|
||||
self.uiNodeGridSizeSpinBox.setObjectName("uiNodeGridSizeSpinBox")
|
||||
self.gridLayout_3.addWidget(self.uiNodeGridSizeSpinBox, 2, 1, 1, 1)
|
||||
self.uiShowGridOnNewProject = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiShowGridOnNewProject.setObjectName("uiShowGridOnNewProject")
|
||||
self.gridLayout_3.addWidget(self.uiShowGridOnNewProject, 7, 0, 1, 2)
|
||||
self.uiRectangleSelectedItemCheckBox = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiRectangleSelectedItemCheckBox.setChecked(True)
|
||||
self.uiRectangleSelectedItemCheckBox.setObjectName("uiRectangleSelectedItemCheckBox")
|
||||
self.gridLayout_3.addWidget(self.uiRectangleSelectedItemCheckBox, 4, 0, 1, 3)
|
||||
spacerItem9 = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.gridLayout_3.addItem(spacerItem9, 16, 0, 1, 1)
|
||||
self.gridLayout_6.addWidget(self.uiNodeGridSizeSpinBox, 2, 1, 1, 1)
|
||||
self.uiSceneHeightLabel = QtWidgets.QLabel(parent=self.uiSceneTab)
|
||||
self.uiSceneHeightLabel.setObjectName("uiSceneHeightLabel")
|
||||
self.gridLayout_6.addWidget(self.uiSceneHeightLabel, 1, 0, 1, 1)
|
||||
self.toolBox = QtWidgets.QToolBox(parent=self.uiSceneTab)
|
||||
self.toolBox.setObjectName("toolBox")
|
||||
self.page = QtWidgets.QWidget()
|
||||
self.page.setGeometry(QtCore.QRect(0, 0, 472, 101))
|
||||
self.page.setObjectName("page")
|
||||
self.gridLayout_3 = QtWidgets.QGridLayout(self.page)
|
||||
self.gridLayout_3.setObjectName("gridLayout_3")
|
||||
self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
||||
self.uiDefaultLabelFontPushButton = QtWidgets.QPushButton(parent=self.page)
|
||||
self.uiDefaultLabelFontPushButton.setObjectName("uiDefaultLabelFontPushButton")
|
||||
self.horizontalLayout_5.addWidget(self.uiDefaultLabelFontPushButton)
|
||||
self.uiDefaultLabelColorPushButton = QtWidgets.QPushButton(parent=self.page)
|
||||
self.uiDefaultLabelColorPushButton.setObjectName("uiDefaultLabelColorPushButton")
|
||||
self.horizontalLayout_5.addWidget(self.uiDefaultLabelColorPushButton)
|
||||
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_5.addItem(spacerItem7)
|
||||
self.gridLayout_3.addLayout(self.horizontalLayout_5, 1, 0, 1, 1)
|
||||
self.uiDefaultLabelStylePlainTextEdit = QtWidgets.QPlainTextEdit(parent=self.page)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiDefaultLabelStylePlainTextEdit.sizePolicy().hasHeightForWidth())
|
||||
self.uiDefaultLabelStylePlainTextEdit.setSizePolicy(sizePolicy)
|
||||
self.uiDefaultLabelStylePlainTextEdit.setMaximumSize(QtCore.QSize(16777215, 50))
|
||||
self.uiDefaultLabelStylePlainTextEdit.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.uiDefaultLabelStylePlainTextEdit.setReadOnly(True)
|
||||
self.uiDefaultLabelStylePlainTextEdit.setObjectName("uiDefaultLabelStylePlainTextEdit")
|
||||
self.gridLayout_3.addWidget(self.uiDefaultLabelStylePlainTextEdit, 0, 0, 1, 1)
|
||||
self.toolBox.addItem(self.page, "")
|
||||
self.page_2 = QtWidgets.QWidget()
|
||||
self.page_2.setGeometry(QtCore.QRect(0, 0, 309, 101))
|
||||
self.page_2.setObjectName("page_2")
|
||||
self.gridLayout_5 = QtWidgets.QGridLayout(self.page_2)
|
||||
self.gridLayout_5.setObjectName("gridLayout_5")
|
||||
self.uiDefaultNoteStylePlainTextEdit = QtWidgets.QPlainTextEdit(parent=self.page_2)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.MinimumExpanding, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiDefaultNoteStylePlainTextEdit.sizePolicy().hasHeightForWidth())
|
||||
self.uiDefaultNoteStylePlainTextEdit.setSizePolicy(sizePolicy)
|
||||
self.uiDefaultNoteStylePlainTextEdit.setMaximumSize(QtCore.QSize(16777215, 50))
|
||||
self.uiDefaultNoteStylePlainTextEdit.setFocusPolicy(QtCore.Qt.FocusPolicy.NoFocus)
|
||||
self.uiDefaultNoteStylePlainTextEdit.setReadOnly(True)
|
||||
self.uiDefaultNoteStylePlainTextEdit.setObjectName("uiDefaultNoteStylePlainTextEdit")
|
||||
self.gridLayout_5.addWidget(self.uiDefaultNoteStylePlainTextEdit, 0, 0, 1, 1)
|
||||
self.horizontalLayout_14 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_14.setObjectName("horizontalLayout_14")
|
||||
self.uiDefaultNoteFontPushButton = QtWidgets.QPushButton(parent=self.page_2)
|
||||
self.uiDefaultNoteFontPushButton.setObjectName("uiDefaultNoteFontPushButton")
|
||||
self.horizontalLayout_14.addWidget(self.uiDefaultNoteFontPushButton)
|
||||
self.uiDefaultNoteColorPushButton = QtWidgets.QPushButton(parent=self.page_2)
|
||||
self.uiDefaultNoteColorPushButton.setObjectName("uiDefaultNoteColorPushButton")
|
||||
self.horizontalLayout_14.addWidget(self.uiDefaultNoteColorPushButton)
|
||||
spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_14.addItem(spacerItem8)
|
||||
self.gridLayout_5.addLayout(self.horizontalLayout_14, 1, 0, 1, 1)
|
||||
self.toolBox.addItem(self.page_2, "")
|
||||
self.page_3 = QtWidgets.QWidget()
|
||||
self.page_3.setGeometry(QtCore.QRect(0, 0, 472, 106))
|
||||
self.page_3.setObjectName("page_3")
|
||||
self.formLayout = QtWidgets.QFormLayout(self.page_3)
|
||||
self.formLayout.setObjectName("formLayout")
|
||||
self.uiDefaultLinkColorLabel = QtWidgets.QLabel(parent=self.page_3)
|
||||
self.uiDefaultLinkColorLabel.setObjectName("uiDefaultLinkColorLabel")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.uiDefaultLinkColorLabel)
|
||||
self.uiDefaultLinkColorPushButton = QtWidgets.QPushButton(parent=self.page_3)
|
||||
self.uiDefaultLinkColorPushButton.setText("")
|
||||
self.uiDefaultLinkColorPushButton.setObjectName("uiDefaultLinkColorPushButton")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.uiDefaultLinkColorPushButton)
|
||||
self.uiDefaultLinkWidthLabel = QtWidgets.QLabel(parent=self.page_3)
|
||||
self.uiDefaultLinkWidthLabel.setObjectName("uiDefaultLinkWidthLabel")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.uiDefaultLinkWidthLabel)
|
||||
self.uiDefaultLinkWidthSpinBox = QtWidgets.QSpinBox(parent=self.page_3)
|
||||
self.uiDefaultLinkWidthSpinBox.setMinimum(1)
|
||||
self.uiDefaultLinkWidthSpinBox.setMaximum(100)
|
||||
self.uiDefaultLinkWidthSpinBox.setProperty("value", 2)
|
||||
self.uiDefaultLinkWidthSpinBox.setObjectName("uiDefaultLinkWidthSpinBox")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.uiDefaultLinkWidthSpinBox)
|
||||
self.uiDefaultLinkStyleLabel = QtWidgets.QLabel(parent=self.page_3)
|
||||
self.uiDefaultLinkStyleLabel.setObjectName("uiDefaultLinkStyleLabel")
|
||||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.uiDefaultLinkStyleLabel)
|
||||
self.uiDefaultLinkStyleComboBox = QtWidgets.QComboBox(parent=self.page_3)
|
||||
self.uiDefaultLinkStyleComboBox.setObjectName("uiDefaultLinkStyleComboBox")
|
||||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.uiDefaultLinkStyleComboBox)
|
||||
self.toolBox.addItem(self.page_3, "")
|
||||
self.gridLayout_6.addWidget(self.toolBox, 10, 0, 1, 2)
|
||||
self.uiSceneWidthSpinBox = QtWidgets.QSpinBox(parent=self.uiSceneTab)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiSceneWidthSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.uiSceneWidthSpinBox.setSizePolicy(sizePolicy)
|
||||
self.uiSceneWidthSpinBox.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.uiSceneWidthSpinBox.setMinimum(500)
|
||||
self.uiSceneWidthSpinBox.setMaximum(1000000)
|
||||
self.uiSceneWidthSpinBox.setSingleStep(100)
|
||||
self.uiSceneWidthSpinBox.setProperty("value", 2000)
|
||||
self.uiSceneWidthSpinBox.setObjectName("uiSceneWidthSpinBox")
|
||||
self.gridLayout_6.addWidget(self.uiSceneWidthSpinBox, 0, 1, 1, 1)
|
||||
self.uiDrawingGridSizeSpinBox = QtWidgets.QSpinBox(parent=self.uiSceneTab)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiDrawingGridSizeSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.uiDrawingGridSizeSpinBox.setSizePolicy(sizePolicy)
|
||||
self.uiDrawingGridSizeSpinBox.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.uiDrawingGridSizeSpinBox.setMinimum(5)
|
||||
self.uiDrawingGridSizeSpinBox.setMaximum(100)
|
||||
self.uiDrawingGridSizeSpinBox.setSingleStep(5)
|
||||
self.uiDrawingGridSizeSpinBox.setProperty("value", 25)
|
||||
self.uiDrawingGridSizeSpinBox.setObjectName("uiDrawingGridSizeSpinBox")
|
||||
self.gridLayout_6.addWidget(self.uiDrawingGridSizeSpinBox, 3, 1, 1, 1)
|
||||
self.uiSceneWidthLabel = QtWidgets.QLabel(parent=self.uiSceneTab)
|
||||
self.uiSceneWidthLabel.setObjectName("uiSceneWidthLabel")
|
||||
self.gridLayout_6.addWidget(self.uiSceneWidthLabel, 0, 0, 1, 1)
|
||||
self.uiDrawLinkStatusPointsCheckBox = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiDrawLinkStatusPointsCheckBox.setChecked(True)
|
||||
self.uiDrawLinkStatusPointsCheckBox.setObjectName("uiDrawLinkStatusPointsCheckBox")
|
||||
self.gridLayout_3.addWidget(self.uiDrawLinkStatusPointsCheckBox, 5, 0, 1, 2)
|
||||
self.gridLayout_6.addWidget(self.uiDrawLinkStatusPointsCheckBox, 5, 0, 1, 1)
|
||||
self.uiShowInterfaceLabelsOnNewProject = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiShowInterfaceLabelsOnNewProject.setObjectName("uiShowInterfaceLabelsOnNewProject")
|
||||
self.gridLayout_6.addWidget(self.uiShowInterfaceLabelsOnNewProject, 6, 0, 1, 2)
|
||||
self.uiShowGridOnNewProject = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiShowGridOnNewProject.setObjectName("uiShowGridOnNewProject")
|
||||
self.gridLayout_6.addWidget(self.uiShowGridOnNewProject, 7, 0, 1, 1)
|
||||
self.uiSceneHeightSpinBox = QtWidgets.QSpinBox(parent=self.uiSceneTab)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.uiSceneHeightSpinBox.sizePolicy().hasHeightForWidth())
|
||||
self.uiSceneHeightSpinBox.setSizePolicy(sizePolicy)
|
||||
self.uiSceneHeightSpinBox.setFocusPolicy(QtCore.Qt.FocusPolicy.StrongFocus)
|
||||
self.uiSceneHeightSpinBox.setMinimum(500)
|
||||
self.uiSceneHeightSpinBox.setMaximum(1000000)
|
||||
self.uiSceneHeightSpinBox.setSingleStep(100)
|
||||
self.uiSceneHeightSpinBox.setProperty("value", 1000)
|
||||
self.uiSceneHeightSpinBox.setObjectName("uiSceneHeightSpinBox")
|
||||
self.gridLayout_6.addWidget(self.uiSceneHeightSpinBox, 1, 1, 1, 1)
|
||||
self.uiRectangleSelectedItemCheckBox = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiRectangleSelectedItemCheckBox.setChecked(True)
|
||||
self.uiRectangleSelectedItemCheckBox.setObjectName("uiRectangleSelectedItemCheckBox")
|
||||
self.gridLayout_6.addWidget(self.uiRectangleSelectedItemCheckBox, 4, 0, 1, 2)
|
||||
spacerItem9 = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.gridLayout_6.addItem(spacerItem9, 13, 0, 1, 1)
|
||||
self.uiLimitSizeNodeSymbolCheckBox = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiLimitSizeNodeSymbolCheckBox.setObjectName("uiLimitSizeNodeSymbolCheckBox")
|
||||
self.gridLayout_6.addWidget(self.uiLimitSizeNodeSymbolCheckBox, 9, 0, 1, 2)
|
||||
self.uiSnapToGridOnNewProject = QtWidgets.QCheckBox(parent=self.uiSceneTab)
|
||||
self.uiSnapToGridOnNewProject.setObjectName("uiSnapToGridOnNewProject")
|
||||
self.gridLayout_6.addWidget(self.uiSnapToGridOnNewProject, 8, 0, 1, 2)
|
||||
spacerItem10 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.gridLayout_6.addItem(spacerItem10, 11, 0, 1, 1)
|
||||
self.uiMiscTabWidget.addTab(self.uiSceneTab, "")
|
||||
self.uiMiscTab = QtWidgets.QWidget()
|
||||
self.uiMiscTab.setObjectName("uiMiscTab")
|
||||
@@ -457,14 +496,14 @@ class Ui_GeneralPreferencesPageWidget(object):
|
||||
self.uiDirectFileUpload = QtWidgets.QCheckBox(parent=self.uiMiscTab)
|
||||
self.uiDirectFileUpload.setObjectName("uiDirectFileUpload")
|
||||
self.verticalLayout_2.addWidget(self.uiDirectFileUpload)
|
||||
spacerItem10 = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.verticalLayout_2.addItem(spacerItem10)
|
||||
spacerItem11 = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding)
|
||||
self.verticalLayout_2.addItem(spacerItem11)
|
||||
self.uiMiscTabWidget.addTab(self.uiMiscTab, "")
|
||||
self.verticalLayout.addWidget(self.uiMiscTabWidget)
|
||||
self.horizontalLayout_6 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
|
||||
spacerItem11 = QtWidgets.QSpacerItem(324, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_6.addItem(spacerItem11)
|
||||
spacerItem12 = QtWidgets.QSpacerItem(324, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum)
|
||||
self.horizontalLayout_6.addItem(spacerItem12)
|
||||
self.uiRestoreDefaultsPushButton = QtWidgets.QPushButton(parent=GeneralPreferencesPageWidget)
|
||||
self.uiRestoreDefaultsPushButton.setObjectName("uiRestoreDefaultsPushButton")
|
||||
self.horizontalLayout_6.addWidget(self.uiRestoreDefaultsPushButton)
|
||||
@@ -472,6 +511,7 @@ class Ui_GeneralPreferencesPageWidget(object):
|
||||
|
||||
self.retranslateUi(GeneralPreferencesPageWidget)
|
||||
self.uiMiscTabWidget.setCurrentIndex(0)
|
||||
self.toolBox.setCurrentIndex(0)
|
||||
QtCore.QMetaObject.connectSlotsByName(GeneralPreferencesPageWidget)
|
||||
GeneralPreferencesPageWidget.setTabOrder(self.uiProjectsPathLineEdit, self.uiProjectsPathToolButton)
|
||||
GeneralPreferencesPageWidget.setTabOrder(self.uiProjectsPathToolButton, self.uiSymbolsPathLineEdit)
|
||||
@@ -568,26 +608,31 @@ class Ui_GeneralPreferencesPageWidget(object):
|
||||
self.uiSPICEConsoleCommandLineEdit.setToolTip(_translate("GeneralPreferencesPageWidget", "<html><head/><body><p>Command line replacements:</p><ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">%h or {host} = console IP or hostname</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">%p or {port} = console port</li><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">%d or {name} = node name</li><ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">%P or {project} = project name</li></ul><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">%i or {project_id} = project UUID</li><ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">%n or {node_id} = node UUID</li></ul><li style=\" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">%c or {url} = server URL</li></ul></body></html>"))
|
||||
self.uiSPICEConsolePreconfiguredCommandPushButton.setText(_translate("GeneralPreferencesPageWidget", "&Edit"))
|
||||
self.uiMiscTabWidget.setTabText(self.uiMiscTabWidget.indexOf(self.uiSPICETab), _translate("GeneralPreferencesPageWidget", "SPICE"))
|
||||
self.uiSceneWidthLabel.setText(_translate("GeneralPreferencesPageWidget", "Default width:"))
|
||||
self.uiNotePreviewLabel.setText(_translate("GeneralPreferencesPageWidget", "Default note style:"))
|
||||
self.uiShowInterfaceLabelsOnNewProject.setText(_translate("GeneralPreferencesPageWidget", "Show interface labels on new project"))
|
||||
self.uiDrawingGridSizeLabel.setText(_translate("GeneralPreferencesPageWidget", "Default drawing grid size:"))
|
||||
self.uiNodeGridSizeLabel.setText(_translate("GeneralPreferencesPageWidget", "Default node grid size:"))
|
||||
self.uiSceneHeightLabel.setText(_translate("GeneralPreferencesPageWidget", "Default height:"))
|
||||
self.uiDefaultNoteStylePlainTextEdit.setPlainText(_translate("GeneralPreferencesPageWidget", "AaBbYyZz"))
|
||||
self.uiDefaultNoteFontPushButton.setText(_translate("GeneralPreferencesPageWidget", "&Select default font"))
|
||||
self.uiDefaultNoteColorPushButton.setText(_translate("GeneralPreferencesPageWidget", "&Select default color"))
|
||||
self.uiLimitSizeNodeSymbolCheckBox.setText(_translate("GeneralPreferencesPageWidget", "Limit the size of node symbols"))
|
||||
self.uiDefaultLabelFontPushButton.setText(_translate("GeneralPreferencesPageWidget", "&Select default font"))
|
||||
self.uiDefaultLabelColorPushButton.setText(_translate("GeneralPreferencesPageWidget", "&Select default color"))
|
||||
self.uiDefaultLabelStylePlainTextEdit.setPlainText(_translate("GeneralPreferencesPageWidget", "AaBbYyZz"))
|
||||
self.uiSceneHeightSpinBox.setSuffix(_translate("GeneralPreferencesPageWidget", " pixels"))
|
||||
self.toolBox.setItemText(self.toolBox.indexOf(self.page), _translate("GeneralPreferencesPageWidget", "Default label style"))
|
||||
self.uiDefaultNoteStylePlainTextEdit.setPlainText(_translate("GeneralPreferencesPageWidget", "AaBbYyZz"))
|
||||
self.uiDefaultNoteFontPushButton.setText(_translate("GeneralPreferencesPageWidget", "&Select default font"))
|
||||
self.uiDefaultNoteColorPushButton.setText(_translate("GeneralPreferencesPageWidget", "&Select default color"))
|
||||
self.toolBox.setItemText(self.toolBox.indexOf(self.page_2), _translate("GeneralPreferencesPageWidget", "Default note style"))
|
||||
self.uiDefaultLinkColorLabel.setText(_translate("GeneralPreferencesPageWidget", "Color:"))
|
||||
self.uiDefaultLinkWidthLabel.setText(_translate("GeneralPreferencesPageWidget", "Width:"))
|
||||
self.uiDefaultLinkWidthSpinBox.setSuffix(_translate("GeneralPreferencesPageWidget", " px"))
|
||||
self.uiDefaultLinkStyleLabel.setText(_translate("GeneralPreferencesPageWidget", "Style:"))
|
||||
self.toolBox.setItemText(self.toolBox.indexOf(self.page_3), _translate("GeneralPreferencesPageWidget", "Default link style"))
|
||||
self.uiSceneWidthSpinBox.setSuffix(_translate("GeneralPreferencesPageWidget", " pixels"))
|
||||
self.uiSnapToGridOnNewProject.setText(_translate("GeneralPreferencesPageWidget", "Snap to grid on new project"))
|
||||
self.uiDrawingGridSizeLabel.setText(_translate("GeneralPreferencesPageWidget", "Default drawing grid size:"))
|
||||
self.uiLabelPreviewLabel.setText(_translate("GeneralPreferencesPageWidget", "Default label style:"))
|
||||
self.uiNodeGridSizeLabel.setText(_translate("GeneralPreferencesPageWidget", "Default node grid size:"))
|
||||
self.uiShowGridOnNewProject.setText(_translate("GeneralPreferencesPageWidget", "Show grid on new project"))
|
||||
self.uiRectangleSelectedItemCheckBox.setText(_translate("GeneralPreferencesPageWidget", "Draw a rectangle when an item is selected"))
|
||||
self.uiSceneWidthLabel.setText(_translate("GeneralPreferencesPageWidget", "Default width:"))
|
||||
self.uiDrawLinkStatusPointsCheckBox.setText(_translate("GeneralPreferencesPageWidget", "Draw link status points"))
|
||||
self.uiShowInterfaceLabelsOnNewProject.setText(_translate("GeneralPreferencesPageWidget", "Show interface labels on new project"))
|
||||
self.uiShowGridOnNewProject.setText(_translate("GeneralPreferencesPageWidget", "Show grid on new project"))
|
||||
self.uiSceneHeightSpinBox.setSuffix(_translate("GeneralPreferencesPageWidget", " pixels"))
|
||||
self.uiRectangleSelectedItemCheckBox.setText(_translate("GeneralPreferencesPageWidget", "Draw a rectangle when an item is selected"))
|
||||
self.uiLimitSizeNodeSymbolCheckBox.setText(_translate("GeneralPreferencesPageWidget", "Limit the size of node symbols"))
|
||||
self.uiSnapToGridOnNewProject.setText(_translate("GeneralPreferencesPageWidget", "Snap to grid on new project"))
|
||||
self.uiMiscTabWidget.setTabText(self.uiMiscTabWidget.indexOf(self.uiSceneTab), _translate("GeneralPreferencesPageWidget", "Topology view"))
|
||||
self.uiCheckForUpdateCheckBox.setText(_translate("GeneralPreferencesPageWidget", "Automatically check for update"))
|
||||
self.uiCrashReportCheckBox.setText(_translate("GeneralPreferencesPageWidget", "Send anonymous crash reports"))
|
||||
|
||||
228599
gns3/ui/resources_rc.py
228599
gns3/ui/resources_rc.py
File diff suppressed because it is too large
Load Diff
@@ -23,8 +23,8 @@
|
||||
# or negative for a release candidate or beta (after the base version
|
||||
# number has been incremented)
|
||||
|
||||
__version__ = "2.2.57"
|
||||
__version_info__ = (2, 2, 57, 0)
|
||||
__version__ = "2.2.58"
|
||||
__version_info__ = (2, 2, 58, 0)
|
||||
|
||||
if "dev" in __version__:
|
||||
try:
|
||||
|
||||
@@ -16,6 +16,11 @@ QLabel, QMenu, QStatusBar {
|
||||
color: #dedede;
|
||||
}
|
||||
|
||||
QToolBox::tab {
|
||||
color: #dedede;
|
||||
font: bold 12px;
|
||||
}
|
||||
|
||||
QMenuBar::item {
|
||||
background-color: #535353;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ def test_deleteCompute(controller):
|
||||
cm.deleteCompute("test")
|
||||
assert "test" not in cm._computes
|
||||
assert callback_delete.called
|
||||
controller._http_client.createHTTPQuery.assert_called_with("DELETE", "/computes/test", None)
|
||||
controller._http_client.createHTTPQuery.assert_called_with("DELETE", "/computes/test")
|
||||
|
||||
|
||||
def test_listComputesCallback():
|
||||
|
||||
@@ -66,7 +66,6 @@ def test_get_connected(http_client, http_request, network_manager, response):
|
||||
|
||||
http_client.createHTTPQuery("GET", "/test", callback)
|
||||
http_request.assert_called_with(QtCore.QUrl("http://127.0.0.1:3080/v2/test"))
|
||||
http_request.setRawHeader.assert_any_call(b"Content-Type", b"application/json")
|
||||
http_request.setRawHeader.assert_any_call(b"User-Agent", "GNS3 QT Client v{version}".format(version=__version__).encode())
|
||||
assert network_manager.sendCustomRequest.called
|
||||
args, kwargs = network_manager.sendCustomRequest.call_args
|
||||
@@ -80,7 +79,7 @@ def test_get_connected(http_client, http_request, network_manager, response):
|
||||
|
||||
|
||||
def test_paramsToQueryString(http_client):
|
||||
assert http_client._paramsToQueryString({}) == ""
|
||||
assert http_client._paramsToQueryString(None) == ""
|
||||
res = http_client._paramsToQueryString({"a": 1, "b": 2})
|
||||
assert res == "?a=1&b=2" or res == "?b=2&a=1"
|
||||
res = http_client._paramsToQueryString({"a": 1, "b": 2, "c": None})
|
||||
@@ -96,7 +95,6 @@ def test_get_connected_auth(http_client, http_request, network_manager, response
|
||||
|
||||
http_client.createHTTPQuery("GET", "/test", callback)
|
||||
http_request.assert_called_with(QtCore.QUrl("http://gns3@127.0.0.1:3080/v2/test"))
|
||||
http_request.setRawHeader.assert_any_call(b"Content-Type", b"application/json")
|
||||
http_request.setRawHeader.assert_any_call(b"Authorization", b"Basic Z25zMzozc25n")
|
||||
http_request.setRawHeader.assert_any_call(b"User-Agent", "GNS3 QT Client v{version}".format(version=__version__).encode())
|
||||
assert network_manager.sendCustomRequest.called
|
||||
@@ -115,7 +113,7 @@ def test_post_not_connected(http_client, http_request, network_manager, response
|
||||
http_client._connected = False
|
||||
callback = unittest.mock.MagicMock()
|
||||
|
||||
http_client.createHTTPQuery("POST", "/test", callback, context={"toto": 42})
|
||||
http_client.createHTTPQuery("POST", "/test", callback, context={"query_id": 42})
|
||||
|
||||
args, kwargs = network_manager.sendCustomRequest.call_args
|
||||
assert args[0] == http_request
|
||||
@@ -138,7 +136,7 @@ def test_post_not_connected(http_client, http_request, network_manager, response
|
||||
assert callback.called
|
||||
|
||||
args, kwargs = callback.call_args
|
||||
assert kwargs["context"]["toto"] == 42
|
||||
assert kwargs["context"]["query_id"] == 42
|
||||
|
||||
|
||||
def test_post_not_connected_connection_failed(http_client, http_request, network_manager, response):
|
||||
|
||||
@@ -65,7 +65,7 @@ def link(devices, controller, project):
|
||||
{"node_id": devices[0].node_id(), "adapter_number": 0, "port_number": 0},
|
||||
{"node_id": devices[1].node_id(), "adapter_number": 0, "port_number": 0}
|
||||
],
|
||||
"link_style": {},
|
||||
"link_style": {'color': '#000000', 'width': 2, 'type': 1},
|
||||
"filters": {},
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ def test_create_link(devices, project, controller):
|
||||
{"node_id": devices[0].node_id(), "adapter_number": 0, "port_number": 0},
|
||||
{"node_id": devices[1].node_id(), "adapter_number": 0, "port_number": 0},
|
||||
],
|
||||
"link_style": {},
|
||||
"link_style": {'color': '#000000', 'width': 2, 'type': 1},
|
||||
"filters": {},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user