Source code for qudi.util.widgets.separator_lines

# -*- coding: utf-8 -*-

"""
Convenience classes to get vertical and horizontal separator lines in a QLayout as one-liner.

Copyright (c) 2021, the qudi developers. See the AUTHORS.md file at the top-level directory of this
distribution and on <https://github.com/Ulm-IQO/qudi-core/>

This file is part of qudi.

Qudi is free software: you can redistribute it and/or modify it under the terms of
the GNU Lesser General Public License as published by the Free Software Foundation,
either version 3 of the License, or (at your option) any later version.

Qudi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with qudi.
If not, see <https://www.gnu.org/licenses/>.
"""

__all__ = ['VerticalLine', 'HorizontalLine']

from PySide2 import QtWidgets
from typing import Optional


[docs] class VerticalLine(QtWidgets.QFrame):
[docs] def __init__(self, parent: Optional[QtWidgets.QWidget] = None) -> None: super().__init__(parent=parent) self.setFrameShape(QtWidgets.QFrame.VLine) self.setFrameShadow(QtWidgets.QFrame.Sunken)
[docs] class HorizontalLine(QtWidgets.QFrame):
[docs] def __init__(self, parent: Optional[QtWidgets.QWidget] = None) -> None: super().__init__(parent=parent) self.setFrameShape(QtWidgets.QFrame.HLine) self.setFrameShadow(QtWidgets.QFrame.Sunken)