Custom icons and small fixes for TraceNG integration.

This commit is contained in:
grossmj
2018-03-14 16:56:39 +07:00
parent 63baa2eff0
commit a72ece5c18
12 changed files with 79284 additions and 79602 deletions

View File

@@ -319,7 +319,7 @@ class LocalConfig(QtCore.QObject):
"""
if Controller.instance().connected() and self._settings_retrieved_from_controller:
# We save only non user specific sections
section_to_save_on_controller = ["Builtin", "Docker", "IOU", "Qemu", "VMware", "VPCS", "VirtualBox", "GraphicsView", "Dynamips"]
section_to_save_on_controller = ["Builtin", "Docker", "IOU", "Qemu", "VMware", "VPCS", "TraceNG", "VirtualBox", "GraphicsView", "Dynamips"]
controller_settings = {}
for key, val in self._settings.items():
if key in section_to_save_on_controller:

View File

@@ -77,10 +77,11 @@ class TraceNG(Module):
# save the settings
LocalConfig.instance().saveSectionSettings(self.__class__.__name__, self._settings)
server_settings = copy.copy(self._settings)
if server_settings["traceng_path"]:
server_settings = {}
if self._settings["traceng_path"]:
# save some settings to the server config file
server_settings["traceng_path"] = os.path.normpath(server_settings["traceng_path"])
server_settings["traceng_path"] = os.path.normpath(self._settings["traceng_path"])
config = LocalServerConfig.instance()
config.saveSettings(self.__class__.__name__, server_settings)

View File

@@ -39,7 +39,7 @@ class TraceNGNodeWizard(VMWizard, Ui_TraceNGNodeWizard):
super().__init__(traceng_nodes, parent)
self.setPixmap(QtWidgets.QWizard.LogoPixmap, QtGui.QPixmap(":/symbols/vpcs_guest.svg"))
self.setPixmap(QtWidgets.QWizard.LogoPixmap, QtGui.QPixmap(":/icons/traceng.png"))
self.uiNameWizardPage.registerField("name*", self.uiNameLineEdit)
def getSettings(self):
@@ -50,7 +50,7 @@ class TraceNGNodeWizard(VMWizard, Ui_TraceNGNodeWizard):
"""
settings = {"name": self.uiNameLineEdit.text(),
"symbol": ":/symbols/vpcs_guest.svg",
"symbol": ":/symbols/traceng.svg",
"category": Node.end_devices,
"server": self._compute_id}

View File

@@ -94,8 +94,6 @@ class TraceNGNodeConfigurationPage(QtWidgets.QWidget, Ui_TraceNGNodeConfigPageWi
index = self.uiCategoryComboBox.findData(settings["category"])
if index != -1:
self.uiCategoryComboBox.setCurrentIndex(index)
self.uiScriptFileEdit.setText(settings["base_script_file"])
else:
self.uiDefaultNameFormatLabel.hide()
self.uiDefaultNameFormatLineEdit.hide()

View File

@@ -28,6 +28,6 @@ TRACENG_SETTINGS = {
TRACENG_NODES_SETTINGS = {
"name": "",
"default_name_format": "TraceNG{0}",
"symbol": ":/symbols/vpcs_guest.svg",
"symbol": ":/symbols/traceng.svg",
"category": Node.end_devices,
}

View File

@@ -118,7 +118,7 @@ class TraceNGNode(Node):
:returns: symbol path (or resource).
"""
return ":/symbols/vpcs_guest.svg"
return ":/symbols/traceng.svg"
@staticmethod
def symbolName():

View File

@@ -93,7 +93,7 @@
<string>Name</string>
</property>
<property name="subTitle">
<string>Please choose a descriptive name for the new VPCS node.</string>
<string>Please choose a descriptive name for the new TraceNG node.</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">

View File

@@ -77,6 +77,6 @@ class Ui_TraceNGNodeWizard(object):
self.uiRemoteServersGroupBox.setTitle(_translate("TraceNGNodeWizard", "Remote server"))
self.uiRemoteServersLabel.setText(_translate("TraceNGNodeWizard", "Run on:"))
self.uiNameWizardPage.setTitle(_translate("TraceNGNodeWizard", "Name"))
self.uiNameWizardPage.setSubTitle(_translate("TraceNGNodeWizard", "Please choose a descriptive name for the new VPCS node."))
self.uiNameWizardPage.setSubTitle(_translate("TraceNGNodeWizard", "Please choose a descriptive name for the new TraceNG node."))
self.uiNameLabel.setText(_translate("TraceNGNodeWizard", "Name:"))

View File

@@ -77,10 +77,10 @@ class VPCS(Module):
# save the settings
LocalConfig.instance().saveSectionSettings(self.__class__.__name__, self._settings)
server_settings = copy.copy(self._settings)
if server_settings["vpcs_path"]:
server_settings = {}
if self._settings["vpcs_path"]:
# save some settings to the server config file
server_settings["vpcs_path"] = os.path.normpath(server_settings["vpcs_path"])
server_settings["vpcs_path"] = os.path.normpath(self._settings["vpcs_path"])
config = LocalServerConfig.instance()
config.saveSettings(self.__class__.__name__, server_settings)

File diff suppressed because it is too large Load Diff

BIN
resources/icons/traceng.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -61,6 +61,7 @@
<file>icons/virtualbox.png</file>
<file>icons/qemu.svg</file>
<file>icons/rtv.png</file>
<file>icons/traceng.png</file>
<file>icons/image.svg</file>
<file>icons/node_conception.svg</file>
<file>icons/raise_z_value.svg</file>