|
Krita Source Code Documentation
|
#include <kis_custom_image_widget.h>
Inheritance diagram for KisCustomImageWidget:Public Member Functions | |
| KisCustomImageWidget (QWidget *parent, qint32 defWidth, qint32 defHeight, double resolution, const QString &defColorModel, const QString &defColorDepth, const QString &defColorProfile, const QString &imageName) | |
| ~KisCustomImageWidget () override | |
Public Member Functions inherited from WdgNewImage | |
| WdgNewImage (QWidget *parent) | |
Protected Member Functions | |
| KisDocument * | createNewImage () |
| void | setNumberOfLayers (int layers) |
| Set the number of layers that will be created. | |
| void | showEvent (QShowEvent *) override |
Protected Attributes | |
| KisOpenPane * | m_openPane |
Private Slots | |
| void | changeDocumentInfoLabel () |
| void | createImage () |
| void | heightChanged (double value) |
| void | heightUnitChanged (int index) |
| void | predefinedClicked (int index) |
| void | resolutionChanged (double value) |
| void | resolutionUnitChanged () |
| void | saveAsPredefined () |
| void | setLandscape () |
| void | setPortrait () |
| void | switchPortraitLandscape () |
| void | switchWidthHeight () |
| void | widthChanged (double value) |
| void | widthUnitChanged (int index) |
Private Member Functions | |
| quint8 | backgroundOpacity () const |
| void | fillPredefined () |
| void | setBackgroundOpacity (quint8 value) |
Private Attributes | |
| double | m_height |
| KoUnit | m_heightUnit |
| QList< KisPropertiesConfigurationSP > | m_predefined |
| double | m_width |
| KoUnit | m_widthUnit |
The 'Custom Document' widget in the Krita startup widget. This class embeds the image size and colorspace to allow the user to select the image properties for a new empty image document.
Definition at line 39 of file kis_custom_image_widget.h.
| KisCustomImageWidget::KisCustomImageWidget | ( | QWidget * | parent, |
| qint32 | defWidth, | ||
| qint32 | defHeight, | ||
| double | resolution, | ||
| const QString & | defColorModel, | ||
| const QString & | defColorDepth, | ||
| const QString & | defColorProfile, | ||
| const QString & | imageName ) |
Constructor. Please note that this class is being used/created by KisDoc.
| parent | the parent widget |
| defWidth | The defined width |
| defHeight | The defined height |
| resolution | The image resolution |
| defColorModel | The defined color model |
| defColorDepth | The defined color depth |
| defColorProfile | The defined color profile |
| imageName | the document that wants to be altered |
Definition at line 64 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), connect(), createImage(), KisConfig::defaultBackgroundColor(), KisConfig::defaultBackgroundOpacity(), KisConfig::defaultBackgroundStyle(), KisConfig::FILL_LAYER, fillPredefined(), KoColor::fromQColor(), KoUnit::fromUserValue(), heightChanged(), heightUnitChanged(), KoUnit::indexInListForUi(), KoColorSpaceRegistry::instance(), KoUnit::ListAll, KoUnit::listOfUnitNameForUi(), KisIconUtils::loadIcon(), m_height, m_heightUnit, m_openPane, m_width, m_widthUnit, KisConfig::numDefaultLayers(), p, KoUnit::Pixel, pixelsCentimeterStr(), pixelsInchStr(), predefinedClicked(), KisConfig::RASTER_LAYER, resolutionChanged(), resolutionUnitChanged(), saveAsPredefined(), setBackgroundOpacity(), setLandscape(), setPortrait(), KisSpinBoxI18nHelper::setText(), switchPortraitLandscape(), widthChanged(), and widthUnitChanged().
|
override |
Definition at line 179 of file kis_custom_image_widget.cc.
References m_predefined.
|
private |
Definition at line 350 of file kis_custom_image_widget.cc.
|
privateslot |
Definition at line 518 of file kis_custom_image_widget.cc.
References m_height, m_width, KoColorSpace::name, KoUnit::Pixel, KoColorSpace::pixelSize(), and KoUnit::toUserValuePrecise().
|
privateslot |
Definition at line 262 of file kis_custom_image_widget.cc.
References createNewImage(), KisOpenPane::documentSelected(), m_openPane, and KisDocument::setModified().
|
protected |
Definition at line 275 of file kis_custom_image_widget.cc.
References backgroundOpacity(), KisConfig::CANVAS_COLOR, KoColorSpace::colorDepthId(), KoColorSpace::colorModelId(), KisPart::createDocument(), dbgKrita, KisConfig::FILL_LAYER, KoColorProfile::info, KisPart::instance(), Integer8BitsColorDepthID, KIS_SAFE_ASSERT_RECOVER, m_height, m_width, KoColorProfile::name, KoColorSpace::name, KisDocument::newImage(), KoUnit::Pixel, pixelsCentimeterStr(), pixelsInchStr(), ppVar, KoColorSpace::profile(), KisConfig::RASTER_LAYER, RGBAColorModelID, KisConfig::setDefaultBackgroundColor(), KisConfig::setDefaultBackgroundOpacity(), KisConfig::setDefaultBackgroundStyle(), KisConfig::setNumDefaultLayers(), and KoUnit::toUserValuePrecise().
|
private |
Definition at line 364 of file kis_custom_image_widget.cc.
References KoResourcePaths::findAllAssets(), m_predefined, and KoResourcePaths::Recursive.
|
privateslot |
Definition at line 256 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), KoUnit::fromUserValue(), m_height, m_heightUnit, and value().
|
privateslot |
Definition at line 238 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), KoUnit::fromListForUi(), KoUnit::ListAll, m_height, m_heightUnit, KoUnit::Pixel, KoUnit::setFactor(), KoUnit::toUserValuePrecise(), and KoUnit::type().
|
privateslot |
Definition at line 401 of file kis_custom_image_widget.cc.
References KoUnit::Centimeter, changeDocumentInfoLabel(), KoUnit::convertFromUnitToUnit(), heightUnitChanged(), KoUnit::Inch, m_predefined, pixelsInchStr(), and widthUnitChanged().
|
privateslot |
Definition at line 184 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), KoUnit::fromUserValue(), m_height, m_heightUnit, m_width, m_widthUnit, KoUnit::Pixel, KoUnit::setFactor(), and KoUnit::type().
|
privateslot |
Definition at line 198 of file kis_custom_image_widget.cc.
References KoUnit::Centimeter, KoUnit::convertFromUnitToUnit(), KoUnit::Inch, and pixelsInchStr().
|
privateslot |
Definition at line 424 of file kis_custom_image_widget.cc.
References m_predefined, and KoResourcePaths::saveLocation().
|
private |
Definition at line 360 of file kis_custom_image_widget.cc.
References value().
|
privateslot |
Definition at line 467 of file kis_custom_image_widget.cc.
References switchWidthHeight().
|
protected |
Set the number of layers that will be created.
Definition at line 345 of file kis_custom_image_widget.cc.
|
privateslot |
Definition at line 474 of file kis_custom_image_widget.cc.
References switchWidthHeight().
|
overrideprotected |
Definition at line 172 of file kis_custom_image_widget.cc.
References fillPredefined().
|
privateslot |
Definition at line 510 of file kis_custom_image_widget.cc.
|
privateslot |
Definition at line 481 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), heightChanged(), KoUnit::indexInListForUi(), KoUnit::ListAll, m_heightUnit, m_widthUnit, switchPortraitLandscape(), and widthChanged().
|
privateslot |
Definition at line 232 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), KoUnit::fromUserValue(), m_width, m_widthUnit, and value().
|
privateslot |
Definition at line 214 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), KoUnit::fromListForUi(), KoUnit::ListAll, m_width, m_widthUnit, KoUnit::Pixel, KoUnit::setFactor(), KoUnit::toUserValuePrecise(), and KoUnit::type().
|
private |
Definition at line 85 of file kis_custom_image_widget.h.
|
private |
Definition at line 92 of file kis_custom_image_widget.h.
|
protected |
Definition at line 82 of file kis_custom_image_widget.h.
|
private |
Definition at line 93 of file kis_custom_image_widget.h.
|
private |
Definition at line 85 of file kis_custom_image_widget.h.
|
private |
Definition at line 92 of file kis_custom_image_widget.h.