ToolBarItem::ToolBarItem( QWidget *parent, QWidget *toolBar,
			  const QString &label, const QString &tagstr,
			  const QIconSet &icon, const QKeySequence &key )
    : QAction( parent )
{
    setIconSet( icon );
    setText( label );
    setAccel( key );
    addTo( toolBar );
    tag = tagstr;
    connect( this, SIGNAL( activated() ), this, SLOT( wasActivated() ) );
}
Пример #2
0
void SamplesManagerModel::updateActiveRow(int iRemovedSamples)
{
    beginResetModel();
    if(iRemovedSamples <= activeRow){
        --activeRow;
        if(activeRow >= 0){
            emit wasActivated(activeRow);
        }else{
            emit wasCleaned();
        }
    }
    endResetModel();
}