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

# Form implementation generated from reading ui file 'plot_window_dock.ui'
#
# Created by: PyQt5 UI code generator 5.15.11
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from qgis.PyQt import QtCore, QtGui, QtWidgets
from qgis.core import QgsApplication

from .tab_widget import CustomTabWidget
from .tv_plot_widget.time_series_plot_widget import TimeSeriesPlotWidget
if not QtCore.QSettings().value('TUFLOW/TestCase', False, type=bool):
    from ...compatibility_routines import (QT_HORIZONTAL, QT_TAB_WIDGET_TRIANGULAR, QT_RICH_TEXT, QT_DOCK_WIDGET_AREA_NONE,
                                           QT_SIZE_POLICY_EXPANDING, QT_SIZE_POLICY_MINIMUM)
else:
    from tuflow.compatibility_routines import (QT_HORIZONTAL, QT_TAB_WIDGET_TRIANGULAR, QT_RICH_TEXT, QT_DOCK_WIDGET_AREA_NONE,
                                               QT_SIZE_POLICY_EXPANDING, QT_SIZE_POLICY_MINIMUM)


class Ui_PlotWindow(object):
    def setupUi(self, PlotWindow):
        PlotWindow.setObjectName("PlotWindow")
        PlotWindow.resize(552, 432)
        PlotWindow.setAllowedAreas(QT_DOCK_WIDGET_AREA_NONE)
        self.dockWidgetContents = QtWidgets.QWidget()
        self.dockWidgetContents.setObjectName("dockWidgetContents")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.dockWidgetContents)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setContentsMargins(3, 3, 3, -1)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.help_text_label = QtWidgets.QLabel(self.dockWidgetContents)
        self.help_text_label.setTextFormat(QT_RICH_TEXT)
        self.help_text_label.setOpenExternalLinks(True)
        self.help_text_label.setObjectName("help_text_label")
        self.horizontalLayout.addWidget(self.help_text_label)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QT_SIZE_POLICY_EXPANDING, QT_SIZE_POLICY_MINIMUM)
        self.horizontalLayout.addItem(spacerItem)
        self.btn_is_dockable = QtWidgets.QToolButton(self.dockWidgetContents)
        self.btn_is_dockable.setObjectName("btn_is_dockable")
        self.horizontalLayout.addWidget(self.btn_is_dockable)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.splitter = QtWidgets.QSplitter(self.dockWidgetContents)
        self.splitter.setOrientation(QT_HORIZONTAL)
        self.splitter.setObjectName("splitter")
        self.tabWidget_view1 = CustomTabWidget(self.splitter)
        self.tabWidget_view1.setTabShape(QT_TAB_WIDGET_TRIANGULAR)
        self.tabWidget_view1.setTabsClosable(True)
        self.tabWidget_view1.setMovable(True)
        self.tabWidget_view1.setObjectName("tabWidget_view1")
        self.tab_0 = QtWidgets.QWidget()
        self.tab_0.setObjectName("tab_0")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab_0)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.widget = TimeSeriesPlotWidget(self.tab_0)
        self.widget.setObjectName("widget")
        self.verticalLayout_2.addWidget(self.widget)
        self.tabWidget_view1.addTab(self.tab_0, "")
        self.tabWidget_view2 = CustomTabWidget(self.splitter)
        self.tabWidget_view2.setTabShape(QT_TAB_WIDGET_TRIANGULAR)
        self.tabWidget_view2.setTabsClosable(True)
        self.tabWidget_view2.setMovable(True)
        self.tabWidget_view2.setObjectName("tabWidget_view2")
        self.tab = QtWidgets.QWidget()
        self.tab.setObjectName("tab")
        self.tabWidget_view2.addTab(self.tab, "")
        self.verticalLayout.addWidget(self.splitter)
        PlotWindow.setWidget(self.dockWidgetContents)

        self.retranslateUi(PlotWindow)
        self.tabWidget_view1.setCurrentIndex(0)
        self.tabWidget_view2.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(PlotWindow)

    def retranslateUi(self, PlotWindow):
        _translate = QtCore.QCoreApplication.translate
        PlotWindow.setWindowTitle(_translate("PlotWindow", "TUFLOW Viewer"))
        self.help_text_label.setText(_translate("PlotWindow", f"<html><head/><body><p><a href=\"https://docs.tuflow.com/\"><span style=\" text-decoration: underline; color:{QgsApplication.instance().palette().link().color().name()};\">Documentation</span></a></p></body></html>"))
        self.btn_is_dockable.setToolTip(_translate("PlotWindow", "Allow window to be docked"))
        self.btn_is_dockable.setText(_translate("PlotWindow", "..."))
        self.tabWidget_view1.setTabText(self.tabWidget_view1.indexOf(self.tab_0), _translate("PlotWindow", "Time Series"))
        self.tabWidget_view2.setTabText(self.tabWidget_view2.indexOf(self.tab), _translate("PlotWindow", "Time Series"))
