QtBase  v6.3.1
Public Member Functions | List of all members
QConicalGradient Class Reference

The QConicalGradient class is used in combination with QBrush to specify a conical gradient brush. More...

#include <qbrush.h>

Inheritance diagram for QConicalGradient:
Inheritance graph
[legend]
Collaboration diagram for QConicalGradient:
Collaboration graph
[legend]

Public Member Functions

 QConicalGradient ()
 
 QConicalGradient (const QPointF &center, qreal startAngle)
 
 QConicalGradient (qreal cx, qreal cy, qreal startAngle)
 
 ~QConicalGradient ()
 
QPointF center () const
 
void setCenter (const QPointF &center)
 
void setCenter (qreal x, qreal y)
 
qreal angle () const
 
void setAngle (qreal angle)
 
- Public Member Functions inherited from QGradient
 QGradient ()
 
 QGradient (Preset)
 
 ~QGradient ()
 
Type type () const
 
void setSpread (Spread spread)
 
Spread spread () const
 
void setColorAt (qreal pos, const QColor &color)
 
void setStops (const QGradientStops &stops)
 
QGradientStops stops () const
 
CoordinateMode coordinateMode () const
 
void setCoordinateMode (CoordinateMode mode)
 
InterpolationMode interpolationMode () const
 
void setInterpolationMode (InterpolationMode mode)
 
bool operator== (const QGradient &gradient) const
 
bool operator!= (const QGradient &other) const
 

Additional Inherited Members

- Public Types inherited from QGradient
enum  Type { LinearGradient , RadialGradient , ConicalGradient , NoGradient }
 
enum  Spread { PadSpread , ReflectSpread , RepeatSpread }
 
enum  CoordinateMode { LogicalMode , StretchToDeviceMode , ObjectBoundingMode , ObjectMode }
 
enum  InterpolationMode { ColorInterpolation , ComponentInterpolation }
 
enum  Preset {
  WarmFlame = 1 , NightFade = 2 , SpringWarmth = 3 , JuicyPeach = 4 ,
  YoungPassion = 5 , LadyLips = 6 , SunnyMorning = 7 , RainyAshville = 8 ,
  FrozenDreams = 9 , WinterNeva = 10 , DustyGrass = 11 , TemptingAzure = 12 ,
  HeavyRain = 13 , AmyCrisp = 14 , MeanFruit = 15 , DeepBlue = 16 ,
  RipeMalinka = 17 , CloudyKnoxville = 18 , MalibuBeach = 19 , NewLife = 20 ,
  TrueSunset = 21 , MorpheusDen = 22 , RareWind = 23 , NearMoon = 24 ,
  WildApple = 25 , SaintPetersburg = 26 , PlumPlate = 28 , EverlastingSky = 29 ,
  HappyFisher = 30 , Blessing = 31 , SharpeyeEagle = 32 , LadogaBottom = 33 ,
  LemonGate = 34 , ItmeoBranding = 35 , ZeusMiracle = 36 , OldHat = 37 ,
  StarWine = 38 , HappyAcid = 41 , AwesomePine = 42 , NewYork = 43 ,
  ShyRainbow = 44 , MixedHopes = 46 , FlyHigh = 47 , StrongBliss = 48 ,
  FreshMilk = 49 , SnowAgain = 50 , FebruaryInk = 51 , KindSteel = 52 ,
  SoftGrass = 53 , GrownEarly = 54 , SharpBlues = 55 , ShadyWater = 56 ,
  DirtyBeauty = 57 , GreatWhale = 58 , TeenNotebook = 59 , PoliteRumors = 60 ,
  SweetPeriod = 61 , WideMatrix = 62 , SoftCherish = 63 , RedSalvation = 64 ,
  BurningSpring = 65 , NightParty = 66 , SkyGlider = 67 , HeavenPeach = 68 ,
  PurpleDivision = 69 , AquaSplash = 70 , SpikyNaga = 72 , LoveKiss = 73 ,
  CleanMirror = 75 , PremiumDark = 76 , ColdEvening = 77 , CochitiLake = 78 ,
  SummerGames = 79 , PassionateBed = 80 , MountainRock = 81 , DesertHump = 82 ,
  JungleDay = 83 , PhoenixStart = 84 , OctoberSilence = 85 , FarawayRiver = 86 ,
  AlchemistLab = 87 , OverSun = 88 , PremiumWhite = 89 , MarsParty = 90 ,
  EternalConstance = 91 , JapanBlush = 92 , SmilingRain = 93 , CloudyApple = 94 ,
  BigMango = 95 , HealthyWater = 96 , AmourAmour = 97 , RiskyConcrete = 98 ,
  StrongStick = 99 , ViciousStance = 100 , PaloAlto = 101 , HappyMemories = 102 ,
  MidnightBloom = 103 , Crystalline = 104 , PartyBliss = 106 , ConfidentCloud = 107 ,
  LeCocktail = 108 , RiverCity = 109 , FrozenBerry = 110 , ChildCare = 112 ,
  FlyingLemon = 113 , NewRetrowave = 114 , HiddenJaguar = 115 , AboveTheSky = 116 ,
  Nega = 117 , DenseWater = 118 , Seashore = 120 , MarbleWall = 121 ,
  CheerfulCaramel = 122 , NightSky = 123 , MagicLake = 124 , YoungGrass = 125 ,
  ColorfulPeach = 126 , GentleCare = 127 , PlumBath = 128 , HappyUnicorn = 129 ,
  AfricanField = 131 , SolidStone = 132 , OrangeJuice = 133 , GlassWater = 134 ,
  NorthMiracle = 136 , FruitBlend = 137 , MillenniumPine = 138 , HighFlight = 139 ,
  MoleHall = 140 , SpaceShift = 142 , ForestInei = 143 , RoyalGarden = 144 ,
  RichMetal = 145 , JuicyCake = 146 , SmartIndigo = 147 , SandStrike = 148 ,
  NorseBeauty = 149 , AquaGuidance = 150 , SunVeggie = 151 , SeaLord = 152 ,
  BlackSea = 153 , GrassShampoo = 154 , LandingAircraft = 155 , WitchDance = 156 ,
  SleeplessNight = 157 , AngelCare = 158 , CrystalRiver = 159 , SoftLipstick = 160 ,
  SaltMountain = 161 , PerfectWhite = 162 , FreshOasis = 163 , StrictNovember = 164 ,
  MorningSalad = 165 , DeepRelief = 166 , SeaStrike = 167 , NightCall = 168 ,
  SupremeSky = 169 , LightBlue = 170 , MindCrawl = 171 , LilyMeadow = 172 ,
  SugarLollipop = 173 , SweetDessert = 174 , MagicRay = 175 , TeenParty = 176 ,
  FrozenHeat = 177 , GagarinView = 178 , FabledSunset = 179 , PerfectBlue = 180 ,
  NumPresets
}
 

Detailed Description

The QConicalGradient class is used in combination with QBrush to specify a conical gradient brush.

\inmodule QtGui

Conical gradients interpolate interpolate colors counter-clockwise around a center point.

The colors in a gradient is defined using stop points of the QGradientStop type, i.e. a position and a color. Use the QGradient::setColorAt() or the QGradient::setStops() function to define the stop points. It is the gradient's complete set of stop points that describes how the gradient area should be filled. If no stop points have been specified, a gradient of black at 0 to white at 1 is used.

In addition to the functions inherited from QGradient, the QConicalGradient class provides the angle() and center() functions returning the start angle and center of the gradient.

Note that the setSpread() function has no effect for conical gradients. The reason is that the conical gradient is closed by definition, i.e. the conical gradient fills the entire circle from 0 - 360 degrees, while the boundary of a radial or a linear gradient can be specified through its radius or final stop points, respectively.

See also
QLinearGradient, QRadialGradient, {painting/gradients}{The Gradients Example}

Definition at line 481 of file qbrush.h.

Constructor & Destructor Documentation

◆ QConicalGradient() [1/3]

QConicalGradient::QConicalGradient ( )

Constructs a conical with center at (0, 0) starting the interpolation at angle 0.

See also
QGradient::setColorAt(), setCenter(), setAngle()

Definition at line 2430 of file qbrush.cpp.

◆ QConicalGradient() [2/3]

QConicalGradient::QConicalGradient ( const QPointF center,
qreal  angle 
)

Constructs a conical gradient with the given center, starting the interpolation at the given angle. The angle must be specified in degrees between 0 and 360.

See also
QGradient::setColorAt(), QGradient::setStops()

Definition at line 2392 of file qbrush.cpp.

Here is the call graph for this function:

◆ QConicalGradient() [3/3]

QConicalGradient::QConicalGradient ( qreal  cx,
qreal  cy,
qreal  angle 
)

Constructs a conical gradient with the given center (cx, cy), starting the interpolation at the given angle. The angle must be specified in degrees between 0 and 360.

See also
QGradient::setColorAt(), QGradient::setStops()

Definition at line 2410 of file qbrush.cpp.

◆ ~QConicalGradient()

QConicalGradient::~QConicalGradient ( )

Definition at line 2418 of file qbrush.cpp.

Member Function Documentation

◆ angle()

qreal QConicalGradient::angle ( ) const

Returns the start angle of the conical gradient in logical coordinates.

See also
stops()

Definition at line 2486 of file qbrush.cpp.

Here is the caller graph for this function:

◆ center()

QPointF QConicalGradient::center ( ) const

Returns the center of the conical gradient in logical coordinates.

See also
stops()

Definition at line 2447 of file qbrush.cpp.

Here is the caller graph for this function:

◆ setAngle()

void QConicalGradient::setAngle ( qreal  angle)
Since
4.2

Sets angle to be the start angle for this conical gradient in logical coordinates.

See also
angle()

Definition at line 2502 of file qbrush.cpp.

Here is the call graph for this function:

◆ setCenter() [1/2]

void QConicalGradient::setCenter ( const QPointF center)

Sets the center of this conical gradient in logical coordinates to center.

See also
center()

Definition at line 2472 of file qbrush.cpp.

Here is the call graph for this function:

◆ setCenter() [2/2]

void QConicalGradient::setCenter ( qreal  x,
qreal  y 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Sets the center of this conical gradient in logical coordinates to (x, y).

See also
center()

Definition at line 491 of file qbrush.h.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: