Ejemplo n.º 1
0
PropertySheetKeySequenceValue ActionModel::actionShortCut(const QDesignerPropertySheetExtension *sheet)
{
    const int index = sheet->indexOf(QLatin1String("shortcut"));
    if (index == -1)
        return PropertySheetKeySequenceValue();
    return qvariant_cast<PropertySheetKeySequenceValue>(sheet->property(index));
}
Ejemplo n.º 2
0
// shortcut is a fake property, need to retrieve it via property sheet.
PropertySheetKeySequenceValue ActionModel::actionShortCut(QDesignerFormEditorInterface *core, QAction *action)
{
    QDesignerPropertySheetExtension *sheet = qt_extension<QDesignerPropertySheetExtension*>(core->extensionManager(), action);
    if (!sheet)
        return PropertySheetKeySequenceValue();
    return actionShortCut(sheet);
}
Ejemplo n.º 3
0
ActionData NewActionDialog::actionData() const
{
    ActionData rc;
    rc.text = actionText();
    rc.name = actionName();
    rc.toolTip = m_ui->tooltipEditor->text();
    rc.icon = m_ui->iconSelector->icon();
    rc.checkable = m_ui->checkableCheckBox->checkState() == Qt::Checked;
    rc.keysequence = PropertySheetKeySequenceValue(m_ui->keySequenceEdit->keySequence());
    return rc;
}