-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring the Processing provider and other plots
- Loading branch information
Showing
4 changed files
with
501 additions
and
336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
""" | ||
/*************************************************************************** | ||
DataPlotly | ||
A QGIS plugin | ||
D3 Plots for QGIS | ||
------------------- | ||
begin : 2024-10-29 | ||
git sha : $Format:%H$ | ||
copyright : (C) 2024 by matteo ghetta | ||
email : [email protected] | ||
***************************************************************************/ | ||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
""" | ||
|
||
from qgis.PyQt.QtGui import QIcon | ||
|
||
import os | ||
|
||
from .dataplotly_generic_plot import DataPlotlyProcessingPlot | ||
|
||
|
||
class DataPlotlyProcessingBarPlot(DataPlotlyProcessingPlot): | ||
""" | ||
Create a bar with DataPlotly plugin | ||
""" | ||
|
||
def __init__(self): | ||
super().__init__(plot_type="bar") | ||
|
||
def name(self): | ||
return "barplot" | ||
|
||
def displayName(self): | ||
return "Bar Plot" | ||
|
||
def icon(self): | ||
return QIcon( | ||
os.path.join( | ||
os.path.dirname(__file__), | ||
"..", | ||
"core", | ||
"plot_types", | ||
"icons", | ||
"barplot.svg", | ||
) | ||
) | ||
|
||
def createInstance(self): | ||
return DataPlotlyProcessingBarPlot() | ||
|
||
def initAlgorithm(self, config=None): | ||
|
||
# create the parameters list | ||
parameters = self.create_parameter_dictionary(self.plot_type) | ||
|
||
# loop and fill the parameters | ||
for param in parameters: | ||
self.addParameter(param) |
Oops, something went wrong.