Beispiel #1
0
CommandWidget::CommandWidget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::CommandWidget)
{
    ui->setupUi(this);

    updateWidgets();

#ifdef NO_GLOBAL_SHORTCUTS
    ui->checkBoxGlobalShortcut->hide();
    ui->shortcutButtonGlobalShortcut->hide();
#else
    ui->checkBoxGlobalShortcut->setIcon(iconShortcut());
    ui->shortcutButtonGlobalShortcut->setExpectModifier(true);
#endif

    ui->groupBoxCommand->setFocusProxy(ui->commandEdit);

    ui->checkBoxAutomatic->setIcon(iconClipboard());
    ui->checkBoxInMenu->setIcon(iconMenu());

    ConfigurationManager *cm = ConfigurationManager::instance();

    // Add tab names to combo boxes.
    cm->initTabComboBox(ui->comboBoxCopyToTab);
    cm->initTabComboBox(ui->comboBoxOutputTab);

    // Add formats to combo boxex.
    QStringList formats = cm->itemFactory()->formatsToSave();
    formats.prepend(mimeText);
    formats.removeDuplicates();

    setComboBoxItems(ui->comboBoxInputFormat, formats);
    setComboBoxItems(ui->comboBoxOutputFormat, formats);
}
medLoadLUTDialog::medLoadLUTDialog(const QStringList & titles, QWidget *parent) :
    QInputDialog(parent)
{
    setModal(Qt::WindowModal);
    setInputMode(QInputDialog::TextInput);
    setLabelText(tr("Choose a transfert Function:"));
    setComboBoxItems(titles);;
    setOkButtonText(tr("Choose"));
}
Beispiel #3
0
void CommandWidget::setFormats(const QStringList &formats)
{
    setComboBoxItems(ui->comboBoxInputFormat, formats);
    setComboBoxItems(ui->comboBoxOutputFormat, formats);
}