initial commit
This commit is contained in:
BIN
plot_layout/layouts/__pycache__/layout.cpython-38.pyc
Normal file
BIN
plot_layout/layouts/__pycache__/layout.cpython-38.pyc
Normal file
Binary file not shown.
53
plot_layout/layouts/layout.py
Normal file
53
plot_layout/layouts/layout.py
Normal file
@@ -0,0 +1,53 @@
|
||||
from qgis.core import (
|
||||
QgsLayoutItem,
|
||||
QgsLayoutItemRegistry,
|
||||
QgsLayoutItemAbstractMetadata,
|
||||
QgsNetworkAccessManager,
|
||||
QgsMessageLog,
|
||||
QgsGeometry
|
||||
)
|
||||
|
||||
|
||||
ITEM_TYPE = QgsLayoutItemRegistry.PluginItem + 1338
|
||||
|
||||
|
||||
class PlotLayoutItem(QgsLayoutItem):
|
||||
|
||||
def __init__(self, layout):
|
||||
super().__init__(layout)
|
||||
# self.setCacheMode(QGraphicsItem.NoCache)
|
||||
# self.plot_settings = []
|
||||
# self.plot_settings.append(PlotSettings())
|
||||
# self.linked_map_uuid = ''
|
||||
# self.linked_map = None
|
||||
|
||||
# self.filter_by_map = False
|
||||
# self.filter_by_atlas = False
|
||||
|
||||
# self.web_page = LoggingWebPage(self)
|
||||
# self.web_page.setNetworkAccessManager(QgsNetworkAccessManager.instance())
|
||||
|
||||
# # This makes the background transparent. (copied from QgsLayoutItemLabel)
|
||||
# palette = self.web_page.palette()
|
||||
# palette.setBrush(QPalette.Base, Qt.transparent)
|
||||
# self.web_page.setPalette(palette)
|
||||
# self.web_page.mainFrame().setZoomFactor(10.0)
|
||||
# self.web_page.mainFrame().setScrollBarPolicy(Qt.Horizontal, Qt.ScrollBarAlwaysOff)
|
||||
# self.web_page.mainFrame().setScrollBarPolicy(Qt.Vertical, Qt.ScrollBarAlwaysOff)
|
||||
|
||||
# self.web_page.loadFinished.connect(self.loading_html_finished)
|
||||
# self.html_loaded = False
|
||||
# self.html_units_to_layout_units = self.calculate_html_units_to_layout_units()
|
||||
|
||||
# self.sizePositionChanged.connect(self.refresh)
|
||||
|
||||
def type(self):
|
||||
return ITEM_TYPE
|
||||
|
||||
class PlotLayoutItemMetadata(QgsLayoutItemAbstractMetadata):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(ITEM_TYPE, 'test')
|
||||
|
||||
def createItem(self, layout):
|
||||
return PlotLayoutItem(layout)
|
Reference in New Issue
Block a user