3from .
import colorspacedialog
4from .components
import (
12 QAbstractItemView, QDialogButtonBox,
13 QVBoxLayout, QFrame, QMessageBox, QPushButton,
18 QAbstractItemView, QDialogButtonBox,
19 QVBoxLayout, QFrame, QMessageBox, QPushButton,
21from krita
import Krita
22from builtins
import i18n
23from scripter
import utils
25from .
import resources_rc
36 self.
refreshButton = QPushButton(utils.getThemedIcon(
':/icons/refresh.svg'),
42 colorprofilecombobox.ColorProfileComboBox(self)
44 QDialogButtonBox.StandardButton.Ok | QDialogButtonBox.StandardButton.Cancel)
56 self.
mainDialog.setWindowModality(Qt.WindowModality.NonModal)
57 self.
widgetDocuments.setSelectionMode(QAbstractItemView.SelectionMode.MultiSelection)
59 QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
77 self.
line.setFrameShape(QFrame.Shape.HLine)
78 self.
line.setFrameShadow(QFrame.Shadow.Sunken)
85 self.
mainDialog.setWindowTitle(i18n(
"Color Space"))
119 if document.fileName()
131 selectedDocuments = [
133 for path
in selectedPaths
if path == document.fileName()
137 if selectedDocuments:
140 i18n(
"The selected documents have been converted."))
142 self.
msgBox.setText(i18n(
"Select at least one document."))
146 for document
in documents:
static Krita * instance()
instance retrieve the singleton instance of the Application object.
refreshButtonClicked(self)
convertColorSpace(self, documents)
rgba palette[MAX_PALETTE]