|
Krita Source Code Documentation
|
#include <kis_custom_image_widget.h>
Inheritance diagram for KisCustomImageWidget:Public Member Functions | |
| KisCustomImageWidget (QWidget *parent, const QString &imageName, const QLatin1String &dialogType) | |
| ~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. | |
| virtual bool | shouldSaveImageDimensions () const |
| void | showEvent (QShowEvent *) override |
Protected Attributes | |
| KisOpenPane * | m_openPane |
Private Slots | |
| void | changeDocumentInfoLabel () |
| virtual 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 | |
| QLatin1String | m_dialogType |
| 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, |
| const QString & | imageName, | ||
| const QLatin1String & | dialogType ) |
Constructor. Please note that this class is being used/created by KisDoc.
| parent | the parent widget |
| imageName | the document that wants to be altered |
| dialogType | is a prefix that will be used for fetching image layout settings |
Definition at line 63 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), createImage(), KisConfig::defaultBackgroundColor(), KisConfig::defaultBackgroundOpacity(), KisConfig::defaultBackgroundStyle(), KisConfig::defaultColorDepth(), KisConfig::defColorModel(), KisConfig::defColorProfile(), KisConfig::defImageHeight(), KisConfig::defImageResolution(), KisConfig::defImageWidth(), KisConfig::FILL_LAYER, fillPredefined(), KoColor::fromQColor(), KoUnit::fromUserValue(), heightChanged(), heightUnitChanged(), KoUnit::indexInListForUi(), KoColorSpaceRegistry::instance(), KoUnit::ListAll, KoUnit::listOfUnitNameForUi(), KisIconUtils::loadIcon(), m_dialogType, 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 186 of file kis_custom_image_widget.cc.
References m_predefined.
|
private |
Definition at line 373 of file kis_custom_image_widget.cc.
|
privateslot |
Definition at line 544 of file kis_custom_image_widget.cc.
References m_height, m_width, KoColorSpace::name, KoUnit::Pixel, KoColorSpace::pixelSize(), and KoUnit::toUserValuePrecise().
|
privatevirtualslot |
Definition at line 269 of file kis_custom_image_widget.cc.
References createNewImage(), KisOpenPane::documentSelected(), m_openPane, and KisDocument::setModified().
|
protected |
Definition at line 282 of file kis_custom_image_widget.cc.
References backgroundOpacity(), KisConfig::CANVAS_COLOR, KoColorSpace::colorDepthId(), KoColorSpace::colorModelId(), KisPart::createDocument(), dbgKrita, KisConfig::defColorModel(), KisConfig::defColorProfile(), KisConfig::defImageHeight(), KisConfig::defImageResolution(), KisConfig::defImageWidth(), KisConfig::FILL_LAYER, KoID::id(), KoColorProfile::info, KisPart::instance(), Integer8BitsColorDepthID, KIS_SAFE_ASSERT_RECOVER, m_dialogType, 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::setDefaultColorDepth(), KisConfig::setNumDefaultLayers(), shouldSaveImageDimensions(), KoUnit::toUserValuePrecise(), and KisConfig::useDefaultColorSpace().
|
private |
Definition at line 387 of file kis_custom_image_widget.cc.
References KoResourcePaths::findAllAssets(), m_predefined, and KoResourcePaths::Recursive.
|
privateslot |
Definition at line 263 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), KoUnit::fromUserValue(), m_height, m_heightUnit, and value().
|
privateslot |
Definition at line 245 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 423 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 191 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 205 of file kis_custom_image_widget.cc.
References KoUnit::Centimeter, KoUnit::convertFromUnitToUnit(), KoUnit::Inch, and pixelsInchStr().
|
privateslot |
Definition at line 446 of file kis_custom_image_widget.cc.
References m_predefined, and KoResourcePaths::saveLocation().
|
private |
Definition at line 383 of file kis_custom_image_widget.cc.
References value().
|
privateslot |
Definition at line 493 of file kis_custom_image_widget.cc.
References switchWidthHeight().
|
protected |
Set the number of layers that will be created.
Definition at line 368 of file kis_custom_image_widget.cc.
|
privateslot |
Definition at line 500 of file kis_custom_image_widget.cc.
References switchWidthHeight().
|
protectedvirtual |
Reimplemented in KisImageFromClipboardWidget.
Definition at line 363 of file kis_custom_image_widget.cc.
|
overrideprotected |
Definition at line 179 of file kis_custom_image_widget.cc.
References fillPredefined().
|
privateslot |
Definition at line 536 of file kis_custom_image_widget.cc.
|
privateslot |
Definition at line 507 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 239 of file kis_custom_image_widget.cc.
References changeDocumentInfoLabel(), KoUnit::fromUserValue(), m_width, m_widthUnit, and value().
|
privateslot |
Definition at line 221 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 90 of file kis_custom_image_widget.h.
|
private |
Definition at line 81 of file kis_custom_image_widget.h.
|
private |
Definition at line 88 of file kis_custom_image_widget.h.
|
protected |
Definition at line 78 of file kis_custom_image_widget.h.
|
private |
Definition at line 89 of file kis_custom_image_widget.h.
|
private |
Definition at line 81 of file kis_custom_image_widget.h.
|
private |
Definition at line 88 of file kis_custom_image_widget.h.