Ejemplo n.º 1
0
UIGDetailsElement::UIGDetailsElement(UIGDetailsSet *pParent, DetailsElementType type, bool fOpened)
    : UIGDetailsItem(pParent)
    , m_pSet(pParent)
    , m_type(type)
    , m_iCornerRadius(10)
    , m_fClosed(!fOpened)
    , m_pButton(0)
    , m_iAdditionalHeight(0)
    , m_fAnimationRunning(false)
    , m_fHovered(false)
    , m_fNameHoveringAccessible(false)
    , m_fNameHovered(false)
    , m_pHighlightMachine(0)
    , m_pForwardAnimation(0)
    , m_pBackwardAnimation(0)
    , m_iAnimationDuration(400)
    , m_iDefaultDarkness(103)
    , m_iHighlightDarkness(90)
    , m_iAnimationDarkness(m_iDefaultDarkness)
{
    /* Prepare element: */
    prepareElement();
    /* Prepare button: */
    prepareButton();

    /* Update size-policy/hint: */
    setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
    /* Update: */
    updateHoverAccessibility();

    /* Add item to the parent: */
    parentItem()->addItem(this);
}
Ejemplo n.º 2
0
UIGDetailsElement::UIGDetailsElement(UIGDetailsSet *pParent, DetailsElementType type, bool fOpened)
    : UIGDetailsItem(pParent)
    , m_pSet(pParent)
    , m_type(type)
    , m_iCornerRadius(10)
    , m_iMinimumHeaderWidth(0)
    , m_iMinimumHeaderHeight(0)
    , m_iMinimumTextWidth(0)
    , m_iMinimumTextHeight(0)
    , m_fClosed(!fOpened)
    , m_pButton(0)
    , m_iAdditionalHeight(0)
    , m_fAnimationRunning(false)
    , m_fHovered(false)
    , m_fNameHovered(false)
    , m_pHighlightMachine(0)
    , m_pForwardAnimation(0)
    , m_pBackwardAnimation(0)
    , m_iAnimationDuration(400)
    , m_iDefaultDarkness(100)
    , m_iHighlightDarkness(90)
    , m_iAnimationDarkness(m_iDefaultDarkness)
{
    /* Prepare element: */
    prepareElement();
    /* Prepare button: */
    prepareButton();

    /* Setup size-policy: */
    setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);

    /* Add item to the parent: */
    AssertMsg(parentItem(), ("No parent set for details element!"));
    parentItem()->addItem(this);
}
Ejemplo n.º 3
0
void UIGDetailsSet::sltNextStep(QString strSetId)
{
    /* Was that a requested set? */
    if (strSetId != m_strSetId)
        return;

    /* Prepare next element: */
    ++m_iStep;
    prepareElement(strSetId);
}
Ejemplo n.º 4
0
void UIGDetailsSet::sltFirstStep(QString strSetId)
{
    /* Was that a requested set? */
    if (strSetId != m_strSetId)
        return;

    /* Prepare first element: */
    m_iStep = DetailsElementType_General;
    prepareElement(strSetId);
}
Ejemplo n.º 5
0
UIGInformationElement::UIGInformationElement(UIGInformationSet *pParent, InformationElementType type, bool fOpened)
    : UIGInformationItem(pParent)
    , m_pSet(pParent)
    , m_type(type)
    , m_iCornerRadius(0)
    , m_iMinimumHeaderWidth(0)
    , m_iMinimumHeaderHeight(0)
    , m_pTextPane(0)
{
    /* Prepare element: */
    prepareElement();
    /* Prepare text-pane: */
    prepareTextPane();
    /* Setup size-policy: */
    setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
    /* Add item to the parent: */
    AssertMsg(parentItem(), ("No parent set for details element!"));
    parentItem()->addItem(this);
}