/*! \internal */
void QSoftMenuBarProvider::message(const QString &msg, const QByteArray &data)
{
    QDataStream stream(data);
    if (msg == "setLabelText(int,int,QString)") {
        int btn;
        int win;
        QString label;
        stream >> win;
        bool isActive = win == d->activeWin;
        if(isActive || (d->activeOverride != -1 && d->activeOverride == win)) {
            stream >> btn;
            stream >> label;

            int idx = d->keyToIdx(btn);
            if(-1 != idx) {
                QSoftMenuBarProvider::MenuButtonPrivate *btn = d->buttons[idx].d;
                if (!isActive) {
                    btn = d->overrideButtons[idx].d;
                    btn->index = idx;
                }
                if (btn->text != label || !btn->pixName.isEmpty() || !isActive) {
                    btn->text = label;
                    btn->pix = QPixmap();
                    btn->pixName = QString();
                    btn->pixStale = false;
                    if(!d->blockUpdates) {
                        emit keyChanged(key(idx));
                        emit keyChanged(key(idx).key());
                    }
                }
            }
        }
createvolume::createvolume( QWidget * parent ) :
    QDialog( parent ),
    m_ui( new Ui::createvolume )
{
	m_ui->setupUi( this ) ;
	this->setFixedSize( this->size() ) ;
	this->setFont( parent->font() ) ;

	m_ui->lineEditVolumePath->setEnabled( false ) ;
	m_ui->lineEditPassphrase1->setFocus() ;

	m_isWindowClosable = true ;

	m_keyStrength = new keystrength() ;

	connect( m_ui->pbOpenKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenKeyFile() ) ) ;
	connect( m_ui->pbCreate,SIGNAL( clicked() ),this,SLOT( pbCreateClicked() ) ) ;
	connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancelClicked() ) ) ;
	connect( m_ui->rbPassphrase,SIGNAL( clicked() ),this,SLOT( rbPassphraseClicked() ) ) ;
	connect( m_ui->rbPassphraseFromFile,SIGNAL( clicked() ),this,SLOT( rbPasssphraseFromFileClicked() ) ) ;
	connect( m_ui->rbHiddenKey,SIGNAL( clicked() ),this,SLOT( rbHiddenPassphraseClicked() ) ) ;
	connect( m_ui->rbHiddenKeyFile,SIGNAL( clicked() ),this,SLOT( rbHiddenPasssphraseFromFileClicked() ) ) ;
	connect( m_ui->comboBoxVolumeType,SIGNAL( currentIndexChanged( int ) ),this,SLOT( volumeType( int ) ) ) ;
	connect( m_ui->lineEditPassphrase1,SIGNAL( textChanged( QString ) ),this,SLOT( keyChanged( QString ) ) ) ;
	connect( m_ui->lineEditHiddenKey,SIGNAL( textChanged( QString ) ),this,SLOT( keyChanged( QString ) ) ) ;
	connect( m_ui->pbHiddenKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenHiddenKeyFile() ) ) ;

	m_ui->groupBox->setEnabled( false ) ;

#if TRUECRYPT_CREATE
	m_ui->comboBoxVolumeType->addItem( tr( "normal truecrypt" ) ) ;
	m_ui->comboBoxVolumeType->addItem( tr( "normal+hidden truecrypt" ) ) ;
#endif
	m_ui->comboBoxVolumeType->setCurrentIndex( int( createvolume::luks ) ) ;
}
createvolume::createvolume( QWidget * parent ) :
    QDialog( parent ),
    m_ui( new Ui::createvolume )
{
	m_ui->setupUi( this ) ;
	this->setFixedSize( this->size() ) ;
	this->setFont( parent->font() ) ;

	m_ui->lineEditVolumePath->setEnabled( false ) ;
	m_ui->lineEditPassphrase1->setFocus() ;

	m_isWindowClosable = true ;
	m_warned = false ;

	m_keyStrength = new keystrength() ;

	connect( m_ui->pbOpenKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenKeyFile() ) ) ;
	connect( m_ui->pbCreate,SIGNAL( clicked() ),this,SLOT( pbCreateClicked() ) ) ;
	connect( m_ui->pbCancel,SIGNAL( clicked() ),this,SLOT( pbCancelClicked() ) ) ;
	connect( m_ui->cbNormalVolume,SIGNAL( activated( int ) ),this,SLOT( cbNormalVolume( int ) ) ) ;
	connect( m_ui->cbHiddenVolume,SIGNAL( activated( int ) ),this,SLOT( cbHiddenVolume( int ) ) ) ;
	connect( m_ui->comboBoxVolumeType,SIGNAL( currentIndexChanged( int ) ),this,SLOT( volumeType( int ) ) ) ;
	connect( m_ui->lineEditPassphrase1,SIGNAL( textChanged( QString ) ),this,SLOT( keyChanged( QString ) ) ) ;
	connect( m_ui->lineEditHiddenKey,SIGNAL( textChanged( QString ) ),this,SLOT( keyChanged( QString ) ) ) ;
	connect( m_ui->pbHiddenKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenHiddenKeyFile() ) ) ;
	connect( m_ui->comboBoxVolumeType,SIGNAL( activated( int ) ),this,SLOT( setOptions( int ) ) ) ;

	m_ui->groupBox->setEnabled( false ) ;

	this->setOptions( 1 ) ;

	this->installEventFilter( this ) ;

	m_ui->labelvolumeOptions->setVisible( false ) ;

	QString a = tr( "options are separated by a \".\" character.\n\n" ) ;
	QString b = tr( "multiple algorithms are separated by \":\" character.\n\n" ) ;
	QString c = tr( "options are in a format of \"algorithm.cipher mode.key size in bits.hash\"\n\n") ;
	QString d = tr( "default option is the first entry on the list" ) ;

	m_ui->comboBoxOptions->setToolTip( a + b + c + d ) ;

#if TRUECRYPT_CREATE
	m_ui->comboBoxVolumeType->addItem( tr( "normal truecrypt" ) ) ;
	m_ui->comboBoxVolumeType->addItem( tr( "normal+hidden truecrypt" ) ) ;
#endif
	m_ui->comboBoxVolumeType->setCurrentIndex( int( createvolume::luks ) ) ;
}
Exemple #4
0
void Wizard::showPage( QWidget* page )
{
    if ( page == page1 ) {
    } else if ( page == page2 ) {
    } else if ( page == page3 ) {
        lKey->setText( key->text() );
        lFirstName->setText( firstName->text() );
        lLastName->setText( lastName->text() );
        lAddress->setText( address->text() );
        lPhone->setText( phone->text() );
        lEmail->setText( email->text() );
    }

    QWizard::showPage(page);

    if ( page == page1 ) {
        keyChanged( key->text() );
        key->setFocus();
    } else if ( page == page2 ) {
        dataChanged( firstName->text() );
        firstName->setFocus();
    } else if ( page == page3 ) {
        finishButton()->setEnabled( TRUE );
        finishButton()->setFocus();
    }
}
Exemple #5
0
// Constructor
XYWndManager::XYWndManager() :
	_activeXY(NULL), _globalParentWindow(NULL)
{
	// Connect self to the according registry keys
	GlobalRegistry().addKeyObserver(this, RKEY_CHASE_MOUSE);
	GlobalRegistry().addKeyObserver(this, RKEY_CAMERA_XY_UPDATE);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_CROSSHAIRS);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_GRID);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_SIZE_INFO);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_ENTITY_ANGLES);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_ENTITY_NAMES);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_BLOCKS);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_COORDINATES);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_OUTLINE);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_AXES);
	GlobalRegistry().addKeyObserver(this, RKEY_SHOW_WORKZONE);
	GlobalRegistry().addKeyObserver(this, RKEY_DEFAULT_BLOCKSIZE);
	GlobalRegistry().addKeyObserver(this, RKEY_ALWAYS_CAULK_FOR_NEW_BRUSHES);
	GlobalRegistry().addKeyObserver(this, RKEY_CAULK_TEXTURE);

	// Trigger loading the values of the observed registry keys
	keyChanged("", "");

	// greebo: Register this class in the preference system so that the constructPreferencePage() gets called.
	GlobalPreferenceSystem().addConstructor(this);

	// Add the commands to the EventManager
	registerCommands();
}
Exemple #6
0
void ProxyAction::setKey(const QKeySequence &key)
{
    QKeySequence old(m_currentKey);
    m_currentKey = key;
    handleKeyChange(old);
    emit keyChanged();
}
void MidiNoteInRangeBlock::setKey(int value) {
	m_key = limit(0, value, 127);
	if (m_key > m_key2) {
		setKey2(m_key);
	}
	emit keyChanged();
}
void KeyDetectorWidget::keyPressEvent(QKeyEvent* event) {
    event->accept();

    setText(getStringForKey(event->key(), ignoreModifierKeys_));

    emit keyChanged(event->key());
}
void TelegramFileLocation::setKey(const QByteArray &key)
{
    if(p->key == key)
        return;

    p->key = key;
    Q_EMIT keyChanged();
}
Exemple #10
0
/*!
	\brief Slot used to apply tab width settings
*/
void QEditConfig::on_spnTabWidth_valueChanged(int n)
{
	if ( m_direct )
	{
		QDocument::setTabStop(n);
		emit keyChanged("tab_width", n);
	}
}
Exemple #11
0
void TraktorF1MK2::processButtons(const Transfer& input_)
{
  bool shiftPressed(isButtonPressed(input_, Button::Shift));
  Device::Button changedButton(Device::Button::Unknown);
  bool buttonPressed(false);

  for (int i = 0; i < kF1MK2_buttonsDataSize - 1; i++) // Skip the last byte (encoder value)
  {
    for (int k = 0; k < 8; k++)
    {
      uint8_t btn = (i * 8) + k;
      Button currentButton(static_cast<Button>(btn));
      if (currentButton == Button::Shift)
      {
        continue;
      }
      buttonPressed = isButtonPressed(input_, currentButton);
      if (buttonPressed != m_buttonStates[btn])
      {
        m_buttonStates[btn] = buttonPressed;
        changedButton = deviceButton(currentButton);
        if (changedButton != Device::Button::Unknown)
        {
          if (currentButton >= Button::Pad8 && currentButton <= Button::Pad9)
          {
            keyChanged(btn, buttonPressed ? 1.0 : 0.0, shiftPressed);
          }
          else
          {
            buttonChanged(changedButton, buttonPressed, shiftPressed);
          }
        }
      }
    }
  }

  // encoder
  uint8_t currentValue = input_.data()[kF1MK2_buttonsDataSize];
  if (currentValue != m_encoderValue)
  {
    bool valueIncreased = ((static_cast<uint8_t>(m_encoderValue) < currentValue)
                            || ((m_encoderValue == 0xff) && (currentValue == 0x00)))
                          && (!((m_encoderValue == 0x0) && (currentValue == 0xff)));
    m_encoderValue = currentValue;
    encoderChanged(0, valueIncreased, shiftPressed);
  }

  // pots/faders
  for (uint8_t potIndex = 0, i = kF1MK2_buttonsDataSize + 1; potIndex < 8; i += 2, potIndex++)
  {
    unsigned value = (input_.data()[i]) | (input_.data()[i + 1] << 8);
    if (m_potentiometersValues[potIndex] != value)
    {
      m_potentiometersValues[potIndex] = value;
      controlChanged(potIndex, value / 1024.0, shiftPressed);
    }
  }
}
Exemple #12
0
void Cell::setKey(int key)
{
    if (m_key == key) {
        return;
    }

    m_key = key;
    emit keyChanged(key);
}
void CBibleKeyChooser::setKey(CSwordKey* key) {
    Q_ASSERT(dynamic_cast<CSwordVerseKey*>(key));
    if (dynamic_cast<CSwordVerseKey*>(key) == 0) return;

    emit (beforeKeyChange(m_key->key())); //required to make direct setKey calls work from the outside
    m_key = dynamic_cast<CSwordVerseKey*>(key);
    w_ref->setKey(m_key);
    emit keyChanged(m_key);
}
void MidiNoteInRangeBlock::setTone(int value) {
	value = limit(0, value, 11);
	int octave = m_key / 12;
	int key = octave * 12 + value;
	m_key = limit(0, key, 127);
	if (m_key > m_key2) {
		setKey2(m_key);
	}
	emit keyChanged();
}
void MidiNoteInRangeBlock::setOctave(int value) {
	value = limit(0, value, 10);
	int tone = m_key % 12;
	int key = value * 12 + tone;
	m_key = limit(0, key, 127);
	if (m_key > m_key2) {
		setKey2(m_key);
	}
	emit keyChanged();
}
void CLexiconKeyChooser::setKey(CSwordKey* key) {
    if (!(m_key = dynamic_cast<CSwordLDKey*>(key))) {
        return;
    }

    updateKey(key);

    //   qWarning("setKey end");
    emit keyChanged( m_key);
}
bool Wizard::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: keyChanged((const QString&)static_QUType_QString.get(_o+1)); break;
    case 1: dataChanged((const QString&)static_QUType_QString.get(_o+1)); break;
    default:
	return QWizard::qt_invoke( _id, _o );
    }
    return TRUE;
}
Exemple #18
0
/*!
	\brief Slot used to apply font family settings
*/
void QEditConfig::on_cbFont_currentFontChanged(QFont font)
{
	font.setPointSize(spnFontSize->value());
	lblSampleText->setFont(font);
	
	if ( m_direct )
	{
		QDocument::setFont(font);
		emit keyChanged("font", font);
	}
}
Exemple #19
0
/*!
	\brief Slot used to apply tabs replacement settings
*/
void QEditConfig::on_chkReplaceTabs_toggled(bool y)
{
	if ( m_direct )
	{
        // FIXME:
		foreach ( QEditor *e, QEditor::m_editors )
		{
			e->setFlag(QEditor::ReplaceTabs, y);
		}
		emit keyChanged("replace_tabs", y);
	}
void TelegramMessageSearchModel::setCurrentPeer(InputPeerObject *peer)
{
    if(p->peer == peer)
        return;

    p->peer = peer;
    refresh();
    Q_EMIT currentPeerChanged();
    Q_EMIT keyChanged();
    Q_EMIT megagroupChanged();
    Q_EMIT editableChanged();
}
void CBibleKeyChooser::refChanged(CSwordVerseKey* key) {
    Q_ASSERT(m_key);
    Q_ASSERT(key);

    if (!updatesEnabled())
        return;

    setUpdatesEnabled(false);
    m_key = key;
    emit keyChanged(m_key);

    setUpdatesEnabled(true);
}
Exemple #22
0
/*!
	\brief Slot used to apply font size settings
*/
void QEditConfig::on_spnFontSize_valueChanged(int size)
{
	QFont font = cbFont->currentFont();
	font.setPointSize(size);
	
	lblSampleText->setFont(font);
	
	if ( m_direct )
	{
		QDocument::setFont(font);
		emit keyChanged("font", font);
	}
}
Exemple #23
0
MapCompiler::MapCompiler ()
{
	GlobalRegistry().addKeyObserver(this, RKEY_ERROR_CHECK_PARAMETERS);
	GlobalRegistry().addKeyObserver(this, RKEY_ERROR_FIX_PARAMETERS);
	GlobalRegistry().addKeyObserver(this, RKEY_COMPILER_BINARY);
	GlobalRegistry().addKeyObserver(this, RKEY_COMPILE_PARAMETERS);
	GlobalRegistry().addKeyObserver(this, RKEY_MATERIAL_PARAMETERS);

	// greebo: Register this class in the preference system so that the constructPreferencePage() gets called.
	GlobalPreferenceSystem().addConstructor(this);

	keyChanged("", "");
}
Exemple #24
0
void CardBasePrivate::addEdition(Edition *edition)
{
    if (!edition)
        return;

    if (!edition->key().isEmpty()) {
        if (editions.contains(edition->key()))
            return;
        editions.insert(edition->key(), edition);
    }

    edition->setParent(this);
    connect(edition, SIGNAL(keyChanged(QString)), this, SLOT(onEditionKeyChanged(QString)));
}
void ConfigurationValue::setKey(const QString &key)
{
    QVariant oldValue;

    // don't emit valueChanged unless absolutely necessary
    if (mItem)
        oldValue = mItem->value(mDefaultValue);

    delete mItem;
    mItem = new MGConfItem(key, this);
    connect(mItem, SIGNAL(valueChanged()), this, SIGNAL(valueChanged()));

    emit keyChanged();

    // we deleted the old item, so we must emit ourselves in this case
    if (oldValue != mItem->value(mDefaultValue))
        emit valueChanged();
}
Exemple #26
0
luksaddkey::luksaddkey( QWidget * parent ) :
	QDialog( parent )
{
	m_ui = new Ui::luksaddkey() ;
	m_ui->setupUi( this ) ;

	m_isWindowClosable = true ;

	m_ui->textEditPathToVolume->setText( QString( "" ) ) ;

	m_ui->textEditExistingPassphrase->setEchoMode( QLineEdit::Password ) ;
	m_ui->textEditPassphraseToAdd->setEchoMode( QLineEdit::Password ) ;

	this->setFixedSize( this->size() ) ;
	this->setFont( parent->font() ) ;

	connect( m_ui->pushButtonOpenFile,SIGNAL( clicked() ),this,SLOT( pbOpenFile() ) ) ;
	connect( m_ui->pushButtonOpenExistingKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenExisitingKeyFile() ) ) ;
	connect( m_ui->pushButtonOpenNewKeyFile,SIGNAL( clicked() ),this,SLOT( pbOpenNewKeyFile() ) ) ;
	connect( m_ui->pushButtonOpenPartition,SIGNAL( clicked() ),this,SLOT( pbOpenPartition( void ) ) ) ;
	connect( m_ui->pushButtonAdd,SIGNAL( clicked() ),this,SLOT( pbAdd() ) ) ;
	connect( m_ui->pushButtonCancel,SIGNAL( clicked() ),this,SLOT( pbCancel() ) ) ;
	connect( m_ui->radioButtonNewPassphrase,SIGNAL( toggled( bool ) ),this,SLOT( rbNewPassphrase() ) ) ;
	connect( m_ui->radioButtonNewPassphraseFromFile,SIGNAL( toggled( bool ) ),this,SLOT( rbNewPassphraseFromFile() ) ) ;
	connect( m_ui->radioButtonPassphraseinVolume,SIGNAL( toggled( bool ) ),this,SLOT( rbExistingPassphrase() ) ) ;
	connect( m_ui->radioButtonPassphraseInVolumeFromFile,SIGNAL( toggled( bool ) ),this,SLOT( rbExistingPassphraseFromFile() ) ) ;
	connect( m_ui->textEditPassphraseToAdd,SIGNAL( textChanged( QString ) ),this,SLOT( keyChanged( QString ) ) ) ;

	m_ui->lineEditReEnterPassphrase->setEchoMode( QLineEdit::Password ) ;

	m_ui->radioButtonNewPassphrase->setChecked( true ) ;
	m_ui->radioButtonPassphraseinVolume->setChecked( true ) ;

	m_ui->pushButtonOpenExistingKeyFile->setEnabled( false ) ;
	m_ui->pushButtonOpenNewKeyFile->setEnabled( false ) ;

	m_ui->pushButtonOpenPartition->setIcon( QIcon( QString( ":/partition.png" ) ) ) ;
	m_ui->pushButtonOpenFile->setIcon( QIcon( QString( ":/file.png" ) ) ) ;

	m_keystrength = new keystrength() ;

	this->installEventFilter( this ) ;
}
Exemple #27
0
KeySetup::KeySetup(QWidget *parent)
        : KeySetupBase(parent)
{
    chkSendEnter->setChecked(pMain->SendEnter);
    lstActions->removeColumn(0);
    lstActions->addColumn(i18n("Action"));
    lstActions->addColumn(i18n("Keys"));
    QListViewItem *first = new QListViewItem(lstActions,
                           i18n("Show/Hide main window"),
                           pMain->KeyWindow.c_str(), QString::number(0));
    new QListViewItem(lstActions,
                      i18n("Double click on dock"),
                      pMain->KeyDblClick.c_str(), QString::number(1));
    new QListViewItem(lstActions,
                      i18n("Show search window"),
                      pMain->KeySearch.c_str(), QString::number(2));
    connect(lstActions, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(selectionChanged(QListViewItem*)));
    connect(chkEnable, SIGNAL(toggled(bool)), this, SLOT(enableToggled(bool)));
    connect(btnKey, SIGNAL(changed()), this, SLOT(keyChanged()));
    lstActions->setCurrentItem(first);
    lstActions->setSelected(first, true);
}
Exemple #28
0
uint8_t Keyboard::getPressedWithSpeed()
{
    uint8_t key = BUTTON_NONE;
    for(uint16_t i = 0; i < (BUTTON_DELAY_TIMES / pgm::read(&speedTable[speed_])) + 1; i++) {
        key = getPressed();
        Timer::delayIdle(BUTTON_DELAY);
        if(key == last_key_)
            continue;

        return keyChanged(key);
    }

    if(key != BUTTON_NONE) {
        this_speed_++;
        if(this_speed_ >= pgm::read(&thisSpeedT[speed_])) {
            if(speed_ < sizeof(speedTable) / sizeof(speedTable[0]) - 1)
                speed_ ++;
            this_speed_ = 0;
        }
    }

    return last_key_;
}
Exemple #29
0
ShortcutsConfig::ShortcutsConfig(QWidget *parent, ShortcutsPlugin *plugin)
        : ShortcutsConfigBase(parent)
{
    m_plugin = plugin;
    lstKeys->setSorting(0);
    loadMenu(MenuMain, true);
    loadMenu(MenuGroup, false);
    loadMenu(MenuContact, false);
    loadMenu(MenuStatus, true);
    adjustColumns();
    selectionChanged();
    connect(lstKeys, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
    connect(edtKey, SIGNAL(changed()), this, SLOT(keyChanged()));
    connect(btnClear, SIGNAL(clicked()), this, SLOT(keyClear()));
    connect(chkGlobal, SIGNAL(toggled(bool)), this, SLOT(globalChanged(bool)));
    for (QObject *p = parent; p != NULL; p = p->parent()){
        if (!p->inherits("QTabWidget"))
            continue;
        QTabWidget *tab = static_cast<QTabWidget*>(p);
        mouse_cfg = new MouseConfig(tab, plugin);
        tab->addTab(mouse_cfg, i18n("Mouse"));
        break;
    }
}
/** Sets a new key to this keychooser */
void CBookKeyChooser::setKey(CSwordKey* newKey, const bool emitSignal) {
    if (m_key != newKey) { //set the internal key to the new one
        m_key = dynamic_cast<CSwordTreeKey*>(newKey);
    }

    QString oldKey = m_key->key(); //string backup of key

    if (oldKey.isEmpty()) { //don't set keys equal to "/", always use a key which may have content
        m_key->firstChild();
        oldKey = m_key->key();
    }

    const int oldOffset = m_key->getOffset(); //backup key position

    QStringList siblings; //split up key
    if (m_key && !oldKey.isEmpty()) {
        siblings = oldKey.split('/', QString::SkipEmptyParts);
    }

    int depth = 0;
    int index = 0;

    m_key->root(); //start iteration at root node

    while ( m_key->firstChild() && (depth < siblings.count()) ) {
        QString key = m_key->key();
        index = (depth == 0) ? -1 : 0;

        bool found = false;

        do { //look for matching sibling
            ++index;
            found = (m_key->getLocalNameUnicode() == siblings[depth]);
        }
        while (!found && m_key->nextSibling());

        if (found)
            key = m_key->key(); //found: change key to this level
        else
            m_key->key(key); //not found: restore old key

        setupCombo(key, depth, index);

        //last iteration: check to see if another box can be filled with child entries
        if (depth == siblings.count() - 1 && m_key->hasChildren()) {
            m_key->firstChild();
            setupCombo(m_key->key(), ++depth, 0);
        }

        depth++;
    }

    //clear the combos which were not filled
    for (; depth < m_modules.first()->depth(); ++depth)  {
        CKeyChooserWidget* chooser = m_chooserWidgets.at(depth);
        if (chooser) chooser->reset(0, 0, false);
    }

    if (oldKey.isEmpty()) {
        m_key->root();
    }
    else {
        //m_key->key(oldKey);
        m_key->setOffset(oldOffset);
    }

    if (emitSignal) emit keyChanged(m_key);
}