Exemple #1
0
Shadows::Shadows(QObject *parent, const QString &prefix)
    : Plasma::Svg(parent),
      d(new Private(this))
{
    setImagePath(prefix);
    connect(this, SIGNAL(repaintNeeded()), this, SLOT(updateShadows()));
}
void DropShadower::componentParentHierarchyChanged (Component& c)
{
    if (owner == &c)
    {
        updateParent();
        updateShadows();
    }
}
Exemple #3
0
void DropShadower::bringShadowWindowsToFront()
{
    if (! reentrant)
    {
        updateShadows();

        const ScopedValueSetter<bool> setter (reentrant, true, false);

        for (int i = shadowWindows.size(); --i >= 0;)
            shadowWindows.getUnchecked(i)->toBehind (owner);
    }
}
void DropShadower::setOwner (Component* componentToFollow)
{
    if (componentToFollow != owner)
    {
        if (owner != nullptr)
            owner->removeComponentListener (this);

        // (the component can't be null)
        jassert (componentToFollow != nullptr);

        owner = componentToFollow;
        jassert (owner != nullptr);

        updateParent();
        owner->addComponentListener (this);

        updateShadows();
    }
}
Exemple #5
0
void DropShadower::setOwner (Component* componentToFollow)
{
    if (componentToFollow != owner)
    {
        if (owner != nullptr)
            owner->removeComponentListener (this);

        // (the component can't be null)
        jassert (componentToFollow != nullptr);

        owner = componentToFollow;

        jassert (owner != nullptr);
        jassert (owner->isOpaque()); // doesn't work properly for semi-transparent comps!

        owner->addComponentListener (this);

        updateShadows();
    }
}
void DropShadower::componentVisibilityChanged (Component& c)
{
    if (owner == &c)
        updateShadows();
}
void DropShadower::componentChildrenChanged (Component&)
{
    updateShadows();
}
void DropShadower::componentBroughtToFront (Component& c)
{
    if (owner == &c)
        updateShadows();
}
void DropShadower::componentMovedOrResized (Component& c, bool /*wasMoved*/, bool /*wasResized*/)
{
    if (owner == &c)
        updateShadows();
}
Exemple #10
0
void DropShadower::componentVisibilityChanged (Component&)
{
    updateShadows();
}
Exemple #11
0
void DropShadower::componentParentHierarchyChanged (Component&)
{
    shadowWindows.clear();
    updateShadows();
}
Exemple #12
0
void DropShadower::componentMovedOrResized (Component&, bool /*wasMoved*/, bool /*wasResized*/)
{
    updateShadows();
}