Skip to content

Commit

Permalink
Set icons for plugin processing tools
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishcampbell committed Aug 5, 2024
1 parent 649c57b commit a9311b9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
6 changes: 2 additions & 4 deletions kart/processing/provider.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from qgis.core import QgsProcessingProvider


from kart.gui import icons
from kart.processing.tools import (
RepoClone,
RepoInit,
Expand All @@ -27,6 +27,4 @@ def name(self, *args, **kwargs):
return self.tr("Kart")

def icon(self):
from kart.plugin import kartIcon

return kartIcon
return icons.kartIcon
17 changes: 17 additions & 0 deletions kart/processing/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
QgsProcessingParameterFolderDestination,
)

from kart.gui import icons


class KartAlgorithm(QgsProcessingAlgorithm):
def createInstance(self):
Expand Down Expand Up @@ -32,6 +34,9 @@ def group(self):
def groupId(self):
return "kart_repositories"

def icon(self):
return icons.createRepoIcon

def initAlgorithm(self, config=None):
self.addParameter(
QgsProcessingParameterString(
Expand Down Expand Up @@ -68,6 +73,9 @@ def group(self):
def groupId(self):
return "kart_repositories"

def icon(self):
return icons.cloneRepoIcon

def initAlgorithm(self, config=None):

self.addParameter(
Expand Down Expand Up @@ -123,6 +131,9 @@ def group(self):
def groupId(self):
return "kart_branches"

def icon(self):
return icons.createBranchIcon

def initAlgorithm(self, config=None):

self.addParameter(
Expand Down Expand Up @@ -169,6 +180,9 @@ def group(self):
def groupId(self):
return "kart_branches"

def icon(self):
return icons.checkoutIcon

def initAlgorithm(self, config=None):

self.addParameter(
Expand Down Expand Up @@ -215,6 +229,9 @@ def group(self):
def groupId(self):
return "kart_branches"

def icon(self):
return icons.deleteIcon

def initAlgorithm(self, config=None):

self.addParameter(
Expand Down

0 comments on commit a9311b9

Please sign in to comment.