JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches

Specifies how a fill-color is derived from a given color. More...

#include <jkqtptools.h>

Public Types

enum  ColorChangeMode {
  SameColor ,
  ReplaceColorAndTransparency ,
  ReplaceColorNotTransparency ,
  DarkerColor ,
  LighterColor ,
  InvertColor
}
 
enum  PredefinedModes {
  JKQTPFFCMFullyTransparentColor ,
  JKQTPFFCMNoColor =JKQTPFFCMFullyTransparentColor ,
  JKQTPFFCMBlack ,
  JKQTPFFCMGrey75 ,
  JKQTPFFCMGrey50 ,
  JKQTPFFCMGrey25 ,
  JKQTPFFCMWhite ,
  JKQTPFFCMBlackTransparent ,
  JKQTPFFCMGrey75Transparent ,
  JKQTPFFCMGrey50Transparent ,
  JKQTPFFCMGrey25Transparent ,
  JKQTPFFCMWhiteTransparent ,
  JKQTPFFCMSameColor ,
  JKQTPFFCMSameNonTransparentColor ,
  JKQTPFFCMSameMoreTransparentColor ,
  JKQTPFFCMSameEvenMoreTransparentColor ,
  JKQTPFFCMSameLessTransparentColor ,
  JKQTPFFCMSameEvenLessTransparentColor ,
  JKQTPFFCMInvertedColor ,
  JKQTPFFCMInvertedTransparentColor ,
  JKQTPFFCMInvertedNonTransparentColor ,
  JKQTPFFCMLighterColor ,
  JKQTPFFCMEvenLighterColor ,
  JKQTPFFCMDarkerColor ,
  JKQTPFFCMEvenDarkerColor ,
  JKQTPFFCMLighterAndTransparentColor ,
  JKQTPFFCMEvenLighterAndTransparentColor ,
  JKQTPFFCMDarkerAndTransparentColor ,
  JKQTPFFCMEvenDarkerAndTransparentColor ,
  JKQTPFFCMLighterAndNonTransparentColor ,
  JKQTPFFCMEvenLighterAndNonTransparentColor ,
  JKQTPFFCMDarkerAndNonTransparentColor ,
  JKQTPFFCMEvenDarkerAndNonTransparentColor ,
  JKQTPFFCMmax =JKQTPFFCMEvenDarkerAndNonTransparentColor
}
 
enum  TransparencyChangeMode {
  SameTransparency ,
  ReplaceTransparency ,
  MoreTransparent ,
  LessTransparent
}
 

Public Member Functions

 JKQTPColorDerivationMode (const QString &mode)
 initialize object from a string (calls fromString() )
 
 JKQTPColorDerivationMode (PredefinedModes mode=JKQTPFFCMSameColor)
 for compatibility: use one of several predefined settings to iitialize object
 
QColor apply (const QColor &basecolor) const
 apply the modifications encoded in this object to a given color
 
bool operator== (const JKQTPColorDerivationMode &other) const
 compares two objects for equality
 
bool operator== (const PredefinedModes &other) const
 determines whether the current object equals a default-initialized object with the given parameter, i.e. this is equivalent to calling
 
QString toString () const
 convert object contents into a string
 

Static Public Member Functions

static JKQTPColorDerivationMode fromString (const QString &mode)
 read values from a string
 

Public Attributes

ColorChangeMode colorModification
 specifies how the color should change
 
float colorModificationStrength
 strength of colorModification-settings, such as ColorChangeMode::DarkerColor or ColorChangeMode::LighterColor
 
QColor targetColor
 replacement color when colorModification==ColorChangeMode::ReplaceColor
 
float targetTransparency
 target transparency (0:non-transparennt .. 1:fully-transparent, i.e. 1-alphaF!!!) for TransparencyChangeMode::ReplaceTransparency
 
float transparencyModficationStrength
 strength of transparencyModification-settings, such as TransparencyChangeMode::MoreTransparent or TransparencyChangeMode::LessTransparent
 
TransparencyChangeMode transparencyModification
 specifies how the transparency of the color chould change
 

Detailed Description

Specifies how a fill-color is derived from a given color.

Member Enumeration Documentation

◆ ColorChangeMode

Enumerator
SameColor 
ReplaceColorAndTransparency 
ReplaceColorNotTransparency 
DarkerColor 
LighterColor 
InvertColor 

◆ PredefinedModes

Enumerator
JKQTPFFCMFullyTransparentColor 

fully transparent color

JKQTPFFCMNoColor 

fully transparent color

JKQTPFFCMBlack 

fill with black

JKQTPFFCMGrey75 

fill with 75% grey

JKQTPFFCMGrey50 

fill with 50% grey

JKQTPFFCMGrey25 

fill with 25% grey

JKQTPFFCMWhite 

fill with white

JKQTPFFCMBlackTransparent 

fill with black, slightly transparent

JKQTPFFCMGrey75Transparent 

fill with 75% grey, slightly transparent

JKQTPFFCMGrey50Transparent 

fill with 50% grey, slightly transparent

JKQTPFFCMGrey25Transparent 

fill with 25% grey, slightly transparent

JKQTPFFCMWhiteTransparent 

fill with white, slightly transparent

JKQTPFFCMSameColor 

fill with the same color

JKQTPFFCMSameNonTransparentColor 

fill with the same color, but remove any transparency (if any)

JKQTPFFCMSameMoreTransparentColor 

fill with the a partly transparent color

JKQTPFFCMSameEvenMoreTransparentColor 

fill with the a more transparent color than JKQTPFFCMMoreTransparentColor

JKQTPFFCMSameLessTransparentColor 

fill with the a partly transparent color

JKQTPFFCMSameEvenLessTransparentColor 

fill with the a more transparent color than JKQTPFFCMLessTransparentColor

JKQTPFFCMInvertedColor 

fill with the inverted color

JKQTPFFCMInvertedTransparentColor 

fill with the inverted color, slightly transparent

JKQTPFFCMInvertedNonTransparentColor 

fill with the inverted color, non-transparent (even if the basecolor had some transparency)

JKQTPFFCMLighterColor 

fill with the a lighter color

JKQTPFFCMEvenLighterColor 

fill with the an even lighter color than JKQTPFFCMLighterColor

JKQTPFFCMDarkerColor 

fill with the a darker color

JKQTPFFCMEvenDarkerColor 

fill with the an even darker color than JKQTPFFCMDarkerColor

JKQTPFFCMLighterAndTransparentColor 

fill with the a lighter color, that is in addition a bit transparent

JKQTPFFCMEvenLighterAndTransparentColor 

fill with the an even lighter color than JKQTPFFCMLighterColor, that is in addition a bit transparent

JKQTPFFCMDarkerAndTransparentColor 

fill with the a darker color, that is in addition a bit transparent

JKQTPFFCMEvenDarkerAndTransparentColor 

fill with the an even darker color than JKQTPFFCMDarkerColor, that is in addition a bit transparent

JKQTPFFCMLighterAndNonTransparentColor 

fill with the a lighter color, that is non-transparent (even if the basecolor had some transparency)

JKQTPFFCMEvenLighterAndNonTransparentColor 

fill with the an even lighter color than JKQTPFFCMLighterColor, that is non-transparent (even if the basecolor had some transparency)

JKQTPFFCMDarkerAndNonTransparentColor 

fill with the a darker color, that is non-transparent (even if the basecolor had some transparency)

JKQTPFFCMEvenDarkerAndNonTransparentColor 

fill with the an even darker color than JKQTPFFCMDarkerColor, that is non-transparent (even if the basecolor had some transparency)

JKQTPFFCMmax 

◆ TransparencyChangeMode

Enumerator
SameTransparency 
ReplaceTransparency 
MoreTransparent 
LessTransparent 

Constructor & Destructor Documentation

◆ JKQTPColorDerivationMode() [1/2]

JKQTPColorDerivationMode::JKQTPColorDerivationMode ( PredefinedModes  mode = JKQTPFFCMSameColor)

for compatibility: use one of several predefined settings to iitialize object

◆ JKQTPColorDerivationMode() [2/2]

JKQTPColorDerivationMode::JKQTPColorDerivationMode ( const QString &  mode)

initialize object from a string (calls fromString() )

Member Function Documentation

◆ apply()

QColor JKQTPColorDerivationMode::apply ( const QColor &  basecolor) const

apply the modifications encoded in this object to a given color

◆ fromString()

static JKQTPColorDerivationMode JKQTPColorDerivationMode::fromString ( const QString &  mode)
static

read values from a string

◆ operator==() [1/2]

bool JKQTPColorDerivationMode::operator== ( const JKQTPColorDerivationMode other) const

compares two objects for equality

◆ operator==() [2/2]

bool JKQTPColorDerivationMode::operator== ( const PredefinedModes other) const

determines whether the current object equals a default-initialized object with the given parameter, i.e. this is equivalent to calling

operato==(JKQTPColorDerivationMode(other))
Specifies how a fill-color is derived from a given color.
Definition jkqtptools.h:262

◆ toString()

QString JKQTPColorDerivationMode::toString ( ) const

convert object contents into a string

Member Data Documentation

◆ colorModification

ColorChangeMode JKQTPColorDerivationMode::colorModification

specifies how the color should change

◆ colorModificationStrength

float JKQTPColorDerivationMode::colorModificationStrength

strength of colorModification-settings, such as ColorChangeMode::DarkerColor or ColorChangeMode::LighterColor

◆ targetColor

QColor JKQTPColorDerivationMode::targetColor

replacement color when colorModification==ColorChangeMode::ReplaceColor

◆ targetTransparency

float JKQTPColorDerivationMode::targetTransparency

target transparency (0:non-transparennt .. 1:fully-transparent, i.e. 1-alphaF!!!) for TransparencyChangeMode::ReplaceTransparency

◆ transparencyModficationStrength

float JKQTPColorDerivationMode::transparencyModficationStrength

strength of transparencyModification-settings, such as TransparencyChangeMode::MoreTransparent or TransparencyChangeMode::LessTransparent

◆ transparencyModification

TransparencyChangeMode JKQTPColorDerivationMode::transparencyModification

specifies how the transparency of the color chould change


The documentation for this struct was generated from the following file: