예제 #1
0
void Smb4KNetworkSearchItem::update(Smb4KShare *share)
{
  m_share->setMounted(share->isMounted());
  m_share->setPath(share->path());
  m_share->setForeign(share->isForeign());

  setupItem();
}
예제 #2
0
void ConfigBool::setValue(const QString& str) {
    if (str == "true") {
        _value = true;
    } else if (str == "false") {
        _value = false;
    } else {
        // Use what's in the tree in case this was called because the user
        // clicked on it
        _value = (_treeItem->checkState(1) == Qt::Checked);
    }
    setupItem();
}
예제 #3
0
    //_______________________________________________
    AnimationConfigWidget::AnimationConfigWidget( QWidget* parent ):
        BaseAnimationConfigWidget( parent )
    {

        QGridLayout* layout( qobject_cast<QGridLayout*>( BaseAnimationConfigWidget::layout() ) );

        setupItem( layout, _genericAnimations = new GenericAnimationConfigItem( this,
            i18n("Focus, mouseover and widget state transition"),
            i18n("Configure widgets' focus and mouseover highlight animation, as well as widget enabled/disabled state transition") ) );

        setupItem( layout, _toolBarAnimations = new FollowMouseAnimationConfigItem( this,
            i18n("Toolbar highlight" ),
            i18n("Configure toolbars' mouseover highlight animation" ) ) );
        _toolBarAnimations->hideDurationSpinBox();

        setupItem( layout, _menuBarAnimations = new FollowMouseAnimationConfigItem( this,
            i18n("Menu bar highlight" ),
            i18n("Configure menu bars' mouseover highlight animation" ) ) );

        setupItem( layout, _menuAnimations = new FollowMouseAnimationConfigItem( this,
            i18n("Menu highlight" ),
            i18n("Configure menus' mouseover highlight animation" ) ) );

        setupItem( layout, _progressBarAnimations = new GenericAnimationConfigItem( this,
            i18n( "Progress bar animation" ),
            i18n( "Configure progress bars' steps animation" ) ) );

        setupItem( layout, _stackedWidgetAnimations = new GenericAnimationConfigItem( this,
            i18n( "Tab transitions" ), i18n( "Configure fading transition between tabs" ) ) );

        setupItem( layout, _labelAnimations = new GenericAnimationConfigItem( this,
            i18n( "Label transitions" ), i18n( "Configure fading transition when a label's text is changed" ) ) );

        setupItem( layout, _lineEditAnimations = new GenericAnimationConfigItem( this,
            i18n( "Text editor transitions" ), i18n( "Configure fading transition when an editor's text is changed" ) ) );

        setupItem( layout, _comboBoxAnimations = new GenericAnimationConfigItem( this,
            i18n( "Combo box transitions" ), i18n( "Configure fading transition when a combo box's selected choice is changed" ) ) );

        // add a separator
        QFrame* frame = new QFrame( this );
        frame->setFrameStyle( QFrame::HLine|QFrame::Sunken );
        layout->addWidget( frame, _row, 0, 1, 2 );
        ++_row;

        // progress bar busy animation
        setupItem( layout, _progressBarBusyAnimations = new GenericAnimationConfigItem( this,
            i18n( "Progress bar busy indicator" ),
            i18n( "Configure progress bars' busy indicator animation" ) ) );

        // add spacers to the first column, previous row to finalize layout
        layout->addItem( new QSpacerItem( 25, 0 ), _row-1, 0, 1, 1 );

        // add vertical spacer
        layout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ), _row, 1, 1, 1 );
        ++_row;

        connect( animationsEnabled(), SIGNAL(toggled(bool)), SLOT(updateChanged()) );
        foreach( AnimationConfigItem* item, findChildren<AnimationConfigItem*>() )
        {
            if( item != _progressBarBusyAnimations )
            {
                item->QWidget::setEnabled( false );
                connect( animationsEnabled(), SIGNAL(toggled(bool)), item, SLOT(setEnabled(bool)) );
            }
        }

    }
예제 #4
0
Smb4KNetworkSearchItem::Smb4KNetworkSearchItem(QListWidget *listWidget)
: QListWidgetItem(listWidget, Failure)
{
  m_share = 0;
  setupItem();
}
예제 #5
0
Smb4KNetworkSearchItem::Smb4KNetworkSearchItem(QListWidget *listWidget, Smb4KShare *share)
: QListWidgetItem(listWidget, Share)
{
  m_share = new Smb4KShare(*share);
  setupItem();
}