You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
619 B
Python
24 lines
619 B
Python
3 years ago
|
from PyQt5 import QtWidgets
|
||
|
|
||
|
from ArtNet.gui.dialogs.link_input_dialog.link_input_dialog import Ui_Dialog
|
||
|
|
||
|
|
||
|
class LinkInputDialog(QtWidgets.QDialog):
|
||
|
|
||
|
def __init__(self, parent=None, link: str = None):
|
||
|
super().__init__(parent)
|
||
|
self.ui = Ui_Dialog()
|
||
|
self.ui.setupUi(self)
|
||
|
|
||
|
if link is not None:
|
||
|
self.ui.link_line.setText(link)
|
||
|
|
||
|
def get_link_text(self) -> str:
|
||
|
return self.ui.link_line.text()
|
||
|
|
||
|
def exec_(self) -> str:
|
||
|
if super(LinkInputDialog, self).exec_() == QtWidgets.QDialog.Rejected:
|
||
|
return None
|
||
|
return self.get_link_text()
|
||
|
|