# Path: flexlay/gui/generic_dialog.py
# class GenericDialog(PropertiesWidget):
#     """A PropertiesWidget in a QDialog."""
# 
#     def __init__(self, title, parent=None):
#         super().__init__(parent)
# 
#         self.ok_callback = None
# 
#         self.dialog = QDialog(parent)
# 
#         self.dialog.setModal(True)
#         self.dialog.setWindowTitle(title)
#         self.buttonbox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
# 
#         vbox = QVBoxLayout()
#         self.layout = QFormLayout()
#         vbox.addLayout(self.layout)
#         vbox.addWidget(self)
#         vbox.addWidget(self.buttonbox)
# 
#         self.dialog.setLayout(vbox)
#         self.dialog.setMinimumWidth(300)
#         self.dialog.show()
# 
#         # "Ok" and "Cancel" signals
# 
#         def on_accept():
#             self.call()
#             self.dialog.hide()
# 
#         def on_rejected():
#             self.dialog.hide()
# 
#         self.buttonbox.accepted.connect(on_accept)
#         self.buttonbox.rejected.connect(on_rejected)


import sys
import unittest
from PyQt5.QtWidgets import QApplication
from flexlay.gui.generic_dialog import GenericDialog
        test_dialog = GenericDialog("Generic Dialog Float Test")
        test_dialog.add_float("Float Label", 1.0)
        test_dialog.add_float("Limit Test",
                              9.9999999999999999)
        test_dialog.add_callback(print)
        # test_app.exec()

    def test_enum(self):
        test_app = QApplication(sys.argv)  # noqa: F841
        test_dialog = GenericDialog("Generic Dialog Enum Test")
        test_dialog.add_enum("Enum Label", ("Value 1", "Value 2", "Value 3"), 0)
        test_dialog.add_callback(print)
        # test_app.exec()

    def test_bool(self):
        test_app = QApplication(sys.argv)  # noqa: F841
        test_dialog = GenericDialog("Generic Dialog Boolean Test")
        test_dialog.add_bool("Bool Label", True)
        test_dialog.add_callback(print)
        # test_app.exec()

    def test_file(self):
        test_app = QApplication(sys.argv)  # noqa: F841
        test_dialog = GenericDialog("Generic Dialog File Path Test")
        test_dialog.add_file("File Path", "")
        test_dialog.add_callback(print)
        # test_app.exec()

    def test_radio(self):
        test_app = QApplication(sys.argv)  # noqa: F841

# Path: flexlay/gui/generic_dialog.py
# class GenericDialog(PropertiesWidget):
#     """A PropertiesWidget in a QDialog."""
# 
#     def __init__(self, title, parent=None):
#         super().__init__(parent)
# 
#         self.ok_callback = None
# 
#         self.dialog = QDialog(parent)
# 
#         self.dialog.setModal(True)
#         self.dialog.setWindowTitle(title)
#         self.buttonbox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
# 
#         vbox = QVBoxLayout()
#         self.layout = QFormLayout()
#         vbox.addLayout(self.layout)
#         vbox.addWidget(self)
#         vbox.addWidget(self.buttonbox)
# 
#         self.dialog.setLayout(vbox)
#         self.dialog.setMinimumWidth(300)
#         self.dialog.show()
# 
#         # "Ok" and "Cancel" signals
# 
#         def on_accept():
#             self.call()
#             self.dialog.hide()
# 
#         def on_rejected():
#             self.dialog.hide()
# 
#         self.buttonbox.accepted.connect(on_accept)
#         self.buttonbox.rejected.connect(on_rejected)


# Path: tests/test_generic_dialog.py
import sys
import unittest
from PyQt5.QtWidgets import QApplication
from flexlay.gui.generic_dialog import GenericDialog

        test_dialog = GenericDialog("Generic Dialog Float Test")
        test_dialog.add_float("Float Label", 1.0)
        test_dialog.add_float("Limit Test",
                              9.9999999999999999)
        test_dialog.add_callback(print)
        # test_app.exec()

    def test_enum(self):
        test_app = QApplication(sys.argv)  # noqa: F841
        test_dialog = GenericDialog("Generic Dialog Enum Test")
        test_dialog.add_enum("Enum Label", ("Value 1", "Value 2", "Value 3"), 0)
        test_dialog.add_callback(print)
        # test_app.exec()

    def test_bool(self):
        test_app = QApplication(sys.argv)  # noqa: F841
        test_dialog = GenericDialog("Generic Dialog Boolean Test")
        test_dialog.add_bool("Bool Label", True)
        test_dialog.add_callback(print)
        # test_app.exec()

    def test_file(self):
        test_app = QApplication(sys.argv)  # noqa: F841
        test_dialog = GenericDialog("Generic Dialog File Path Test")
        test_dialog.add_file("File Path", "")
        test_dialog.add_callback(print)
        # test_app.exec()

    def test_radio(self):
        test_app = QApplication(sys.argv)  # noqa: F841

        test_dialog = GenericDialog("Generic Dialog Radio Buttons Test")