# Path: DataPlotly/gui/dock.py
# class DataPlotlyDock(QgsDockWidget):  # pylint: disable=too-few-public-methods
#     """
#     Plot settings dock widget
#     """
# 
#     def __init__(self, parent=None, message_bar=None):
#         super().__init__(parent)
#         self.setWindowTitle(self.tr('DataPlotly'))
#         self.setObjectName('DataPlotlyDock')
# 
#         self.panel_stack = QgsPanelWidgetStack()
#         self.setWidget(self.panel_stack)
# 
#         self.main_panel = DataPlotlyPanelWidget(message_bar=message_bar)
#         self.panel_stack.setMainPanel(self.main_panel)
#         self.main_panel.setDockMode(True)
# 
# Path: DataPlotly/gui/gui_utils.py
# class GuiUtils:
#     """
#     Utilities for GUI plugin components
#     """
# 
#     @staticmethod
#     def get_icon(icon: str) -> QIcon:
#         """
#         Returns a plugin icon
#         :param icon: icon name (svg file name)
#         :return: QIcon
#         """
#         path = GuiUtils.get_icon_svg(icon)
#         if not path:
#             return QIcon()
# 
#         return QIcon(path)
# 
#     @staticmethod
#     def get_icon_svg(icon: str) -> str:
#         """
#         Returns a plugin icon's SVG file path
#         :param icon: icon name (svg file name)
#         :return: icon svg path
#         """
#         path = os.path.join(
#             os.path.dirname(__file__),
#             '..',
#             'icons',
#             icon)
#         if not os.path.exists(path):
#             return ''
# 
#         return path
# 
#     @staticmethod
#     def get_ui_file_path(file: str) -> str:
#         """
#         Returns a UI file's path
#         :param file: file name (uifile name)
#         :return: ui file path
#         """
#         path = os.path.join(
#             os.path.dirname(__file__),
#             '..',
#             'ui',
#             file)
#         if not os.path.exists(path):
#             return ''
# 
#         return path
# 
# Path: DataPlotly/processing/dataplotly_provider.py
# class DataPlotlyProvider(QgsProcessingProvider):
#     MY_DUMMY_SETTING = 'MY_DUMMY_SETTING'
# 
#     def __init__(self, plugin_version):
#         super().__init__()
#         self.plugin_version = plugin_version
# 
#     def load(self):
#         """In this method we add settings needed to configure our
#         provider.
#         """
#         self.refreshAlgorithms()
#         return True
# 
#     def id(self):
#         """This is the name that will appear on the toolbox group.
# 
#         It is also used to create the command line name of all the
#         algorithms from this provider.
#         """
#         return 'DataPlotly'
# 
#     def name(self):
#         """This is the localised full name.
#         """
#         return 'DataPlotly'
# 
#     def longName(self):
#         return 'DataPlotly'
# 
#     def icon(self):
#         return GuiUtils.get_icon('dataplotly.svg')
# 
#     def svgIconPath(self) -> str:
#         return GuiUtils.get_icon_svg('dataplotly.svg')
# 
#     def versionInfo(self) -> str:
#         return self.plugin_version
# 
#     def loadAlgorithms(self):
#         """Here we fill the list of algorithms in self.algs.
# 
#         This method is called whenever the list of algorithms should
#         be updated. If the list of algorithms can change (for instance,
#         if it contains algorithms from user-defined scripts and a new
#         script might have been added), you should create the list again
#         here.
# 
#         In this case, since the list is always the same, we assign from
#         the pre-made list. This assignment has to be done in this method
#         even if the list does not change, since the self.algs list is
#         cleared before calling this method.
#         """
#         self.addAlgorithm(DataPlotlyProcessingPlot())
# 
# Path: DataPlotly/layouts/plot_layout_item.py
# class PlotLayoutItemMetadata(QgsLayoutItemAbstractMetadata):
# 
#     def __init__(self):
#         super().__init__(ITEM_TYPE, QCoreApplication.translate('DataPlotly', 'Plot Item'))
# 
#     def createItem(self, layout):
#         return PlotLayoutItem(layout)
# 
# Path: DataPlotly/gui/layout_item_gui.py
# class PlotLayoutItemGuiMetadata(QgsLayoutItemAbstractGuiMetadata):
#     """
#     Metadata for plot item GUI classes
#     """
# 
#     def __init__(self):
#         super().__init__(ITEM_TYPE, QCoreApplication.translate('DataPlotly', 'Plot Item'))
# 
#     def creationIcon(self):  # pylint: disable=missing-docstring, no-self-use
#         return GuiUtils.get_icon('dataplotly.svg')
# 
#     def createItemWidget(self, item):  # pylint: disable=missing-docstring, no-self-use
#         return PlotLayoutItemWidget(None, item)


import os.path
from qgis.PyQt.QtCore import QSettings, QTranslator, qVersion, QCoreApplication, Qt, QUrl
from qgis.PyQt.QtGui import QDesktopServices
from qgis.PyQt.QtWidgets import QAction
from qgis.core import Qgis, QgsApplication
from qgis.gui import QgsGui
from DataPlotly.gui.dock import DataPlotlyDock
from DataPlotly.gui.gui_utils import GuiUtils
from DataPlotly.processing.dataplotly_provider import DataPlotlyProvider
from DataPlotly.layouts.plot_layout_item import PlotLayoutItemMetadata
from DataPlotly.gui.layout_item_gui import PlotLayoutItemGuiMetadata
"""


# Import the code for the dialog

# import processing provider

# import layout classes


class DataPlotly:  # pylint: disable=too-many-instance-attributes
    """QGIS Plugin Implementation."""

    VERSION = '2.3'

    def __init__(self, iface):
        """Constructor.

        :param iface: An interface instance that will be passed to this class
            which provides the hook by which you can manipulate the QGIS
            application at run time.
        :type iface: QgsInterface
        """
        # Save reference to the QGIS interface
        self.iface = iface

        # initialize plugin directory
        self.plugin_dir = os.path.dirname(__file__)

        # initialize processing provider

# Path: DataPlotly/gui/dock.py
# class DataPlotlyDock(QgsDockWidget):  # pylint: disable=too-few-public-methods
#     """
#     Plot settings dock widget
#     """
# 
#     def __init__(self, parent=None, message_bar=None):
#         super().__init__(parent)
#         self.setWindowTitle(self.tr('DataPlotly'))
#         self.setObjectName('DataPlotlyDock')
# 
#         self.panel_stack = QgsPanelWidgetStack()
#         self.setWidget(self.panel_stack)
# 
#         self.main_panel = DataPlotlyPanelWidget(message_bar=message_bar)
#         self.panel_stack.setMainPanel(self.main_panel)
#         self.main_panel.setDockMode(True)
# 
# Path: DataPlotly/gui/gui_utils.py
# class GuiUtils:
#     """
#     Utilities for GUI plugin components
#     """
# 
#     @staticmethod
#     def get_icon(icon: str) -> QIcon:
#         """
#         Returns a plugin icon
#         :param icon: icon name (svg file name)
#         :return: QIcon
#         """
#         path = GuiUtils.get_icon_svg(icon)
#         if not path:
#             return QIcon()
# 
#         return QIcon(path)
# 
#     @staticmethod
#     def get_icon_svg(icon: str) -> str:
#         """
#         Returns a plugin icon's SVG file path
#         :param icon: icon name (svg file name)
#         :return: icon svg path
#         """
#         path = os.path.join(
#             os.path.dirname(__file__),
#             '..',
#             'icons',
#             icon)
#         if not os.path.exists(path):
#             return ''
# 
#         return path
# 
#     @staticmethod
#     def get_ui_file_path(file: str) -> str:
#         """
#         Returns a UI file's path
#         :param file: file name (uifile name)
#         :return: ui file path
#         """
#         path = os.path.join(
#             os.path.dirname(__file__),
#             '..',
#             'ui',
#             file)
#         if not os.path.exists(path):
#             return ''
# 
#         return path
# 
# Path: DataPlotly/processing/dataplotly_provider.py
# class DataPlotlyProvider(QgsProcessingProvider):
#     MY_DUMMY_SETTING = 'MY_DUMMY_SETTING'
# 
#     def __init__(self, plugin_version):
#         super().__init__()
#         self.plugin_version = plugin_version
# 
#     def load(self):
#         """In this method we add settings needed to configure our
#         provider.
#         """
#         self.refreshAlgorithms()
#         return True
# 
#     def id(self):
#         """This is the name that will appear on the toolbox group.
# 
#         It is also used to create the command line name of all the
#         algorithms from this provider.
#         """
#         return 'DataPlotly'
# 
#     def name(self):
#         """This is the localised full name.
#         """
#         return 'DataPlotly'
# 
#     def longName(self):
#         return 'DataPlotly'
# 
#     def icon(self):
#         return GuiUtils.get_icon('dataplotly.svg')
# 
#     def svgIconPath(self) -> str:
#         return GuiUtils.get_icon_svg('dataplotly.svg')
# 
#     def versionInfo(self) -> str:
#         return self.plugin_version
# 
#     def loadAlgorithms(self):
#         """Here we fill the list of algorithms in self.algs.
# 
#         This method is called whenever the list of algorithms should
#         be updated. If the list of algorithms can change (for instance,
#         if it contains algorithms from user-defined scripts and a new
#         script might have been added), you should create the list again
#         here.
# 
#         In this case, since the list is always the same, we assign from
#         the pre-made list. This assignment has to be done in this method
#         even if the list does not change, since the self.algs list is
#         cleared before calling this method.
#         """
#         self.addAlgorithm(DataPlotlyProcessingPlot())
# 
# Path: DataPlotly/layouts/plot_layout_item.py
# class PlotLayoutItemMetadata(QgsLayoutItemAbstractMetadata):
# 
#     def __init__(self):
#         super().__init__(ITEM_TYPE, QCoreApplication.translate('DataPlotly', 'Plot Item'))
# 
#     def createItem(self, layout):
#         return PlotLayoutItem(layout)
# 
# Path: DataPlotly/gui/layout_item_gui.py
# class PlotLayoutItemGuiMetadata(QgsLayoutItemAbstractGuiMetadata):
#     """
#     Metadata for plot item GUI classes
#     """
# 
#     def __init__(self):
#         super().__init__(ITEM_TYPE, QCoreApplication.translate('DataPlotly', 'Plot Item'))
# 
#     def creationIcon(self):  # pylint: disable=missing-docstring, no-self-use
#         return GuiUtils.get_icon('dataplotly.svg')
# 
#     def createItemWidget(self, item):  # pylint: disable=missing-docstring, no-self-use
#         return PlotLayoutItemWidget(None, item)


# Path: DataPlotly/data_plotly.py
import os.path
from qgis.PyQt.QtCore import QSettings, QTranslator, qVersion, QCoreApplication, Qt, QUrl
from qgis.PyQt.QtGui import QDesktopServices
from qgis.PyQt.QtWidgets import QAction
from qgis.core import Qgis, QgsApplication
from qgis.gui import QgsGui
from DataPlotly.gui.dock import DataPlotlyDock
from DataPlotly.gui.gui_utils import GuiUtils
from DataPlotly.processing.dataplotly_provider import DataPlotlyProvider
from DataPlotly.layouts.plot_layout_item import PlotLayoutItemMetadata
from DataPlotly.gui.layout_item_gui import PlotLayoutItemGuiMetadata

"""


# Import the code for the dialog

# import processing provider

# import layout classes


class DataPlotly:  # pylint: disable=too-many-instance-attributes
    """QGIS Plugin Implementation."""

    VERSION = '2.3'

    def __init__(self, iface):
        """Constructor.

        :param iface: An interface instance that will be passed to this class
            which provides the hook by which you can manipulate the QGIS
            application at run time.
        :type iface: QgsInterface
        """
        # Save reference to the QGIS interface
        self.iface = iface

        # initialize plugin directory
        self.plugin_dir = os.path.dirname(__file__)

        # initialize processing provider

        self.provider = DataPlotlyProvider(plugin_version=DataPlotly.VERSION)