Commit e45434c9 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[widgets][plottereditor] Add tooltip to buttons

parent 62147e1f
......@@ -30,9 +30,7 @@ from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QComboBox
from PyQt5.QtWidgets import QFormLayout
from PyQt5.QtWidgets import QHBoxLayout
from PyQt5.QtWidgets import QInputDialog
from PyQt5.QtWidgets import QLabel
from PyQt5.QtWidgets import QLineEdit
from PyQt5.QtWidgets import QPushButton
from PyQt5.QtWidgets import QVBoxLayout
from PyQt5.QtWidgets import QWidget
......@@ -41,10 +39,12 @@ from ..backend.asset import AssetType
from ..backend.assetmodel import AssetModel
from ..decorators import frozen
from .dialogs import AssetCreationDialog
from .dialogs import NameInputDialog
from .editor import AbstractAssetEditor
from .libraries import LibrariesWidget
from .parameterwidget import ParameterWidget
from .scrollwidget import ScrollWidget
from .validatedhelpers import NameLineEdit
class ParameterViewer(QWidget):
......@@ -56,13 +56,14 @@ class ParameterViewer(QWidget):
super().__init__(parent)
self.delete_button = QPushButton(self.tr("-"))
self.delete_button.setToolTip(self.tr("Remove parameter"))
self.delete_button.setFixedSize(30, 30)
delete_layout = QHBoxLayout()
delete_layout.addStretch(1)
delete_layout.addWidget(self.delete_button)
self.name_lineedit = QLineEdit()
self.name_lineedit = NameLineEdit()
self.parameter_widget = ParameterWidget()
form_layout = QFormLayout()
......@@ -120,6 +121,7 @@ class PlotterEditor(AbstractAssetEditor):
self.scroll_widget = ScrollWidget()
self.add_parameter_button = QPushButton(self.tr("+"))
self.add_parameter_button.setToolTip(self.tr("Add parameter"))
self.add_parameter_button.setFixedSize(30, 30)
self.dataformat_combobox = QComboBox(parent)
......@@ -170,9 +172,7 @@ class PlotterEditor(AbstractAssetEditor):
parameter_names = [widget.name() for widget in self.parameter_viewers]
while True:
name, ok_pressed = QInputDialog.getText(
self, self.tr("Parameter name"), self.tr("Name")
)
name, ok_pressed = NameInputDialog.getText(self, self.tr("Parameter name"))
if not ok_pressed:
break
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment