コード例 #1
0
void SmallDeviceView::setAvailable(bool available, TransfertState)
{
    QString style;

    _available = available;
    setAcceptDrops(available);

    switch (_type)
    {
    case TYPE_ANDROID:
        updateWidgetStyle(ui->borderContainer, "androidContainer");
        break;
    case TYPE_WINDOWS:
        updateWidgetStyle(ui->borderContainer, "windowsContainer");
        break;
    case TYPE_MAC:
        updateWidgetStyle(ui->borderContainer, "macContainer");
        break;
    case TYPE_LINUX:
        updateWidgetStyle(ui->borderContainer, "linuxContainer");
        break;
    }

    if (available)
    {
        loadStyle(QString::number(WIDGET_OPACITY * 255), SettingsManager::availableDeviceColor());

    }
    else
    {
        loadStyle(QString::number(WIDGET_OPACITY * 255), SettingsManager::unavailableDeviceColor());
    }
}
コード例 #2
0
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void PipelineFilterWidget::changeStyle()
{
    QString style;
    QTextStream ss(&style);

    if(m_HasPreflightWarnings)
    {
        ss << "border: 3px solid rgb(172, 168, 0);";
    }
    else if(m_IsSelected == true )
    {
        ss << "border: 3px solid MediumBlue;";
    }
    else
    {
        ss << "border: 1px solid #515151;";
        ss << "margin: 1px;";
    }
    setBorderColorStyle(style);
    updateWidgetStyle();
}