////////////////////////////////////////
//MuscleAlignWithExtFileSpecifyDialogController
MuscleAlignWithExtFileSpecifyDialogController::MuscleAlignWithExtFileSpecifyDialogController(QWidget* w, MuscleTaskSettings& _settings)
    : QDialog(w),
      settings(_settings),
      saveController(NULL)
{
    setupUi(this);
    new HelpButton(this, buttonBox, "17468977");

    buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Align"));
    buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));

    initSaveController();

    connect(inputFilePathButton, SIGNAL(clicked()), SLOT(sl_inputPathButtonClicked()));

    //we don`t know length of MA, need check this at task
    rangeStartSB->setValue(0);
    rangeEndSB->setValue(500);

    connect(confBox, SIGNAL(currentIndexChanged(int)), SLOT(sl_onPresetChanged(int)));
    initPresets();
    foreach(const MuscleAlignPreset* p, presets.qlist) {
        confBox->addItem(p->name);
    }
    const DNAAlphabet* al = AppContext::getDNAAlphabetRegistry()->findById(BaseDNAAlphabetIds::NUCL_DNA_DEFAULT());
    DNATranslationRegistry* tr = AppContext::getDNATranslationRegistry();
    QList<DNATranslation*> aminoTs = tr->lookupTranslation(al, DNATranslationType_NUCL_2_AMINO);
    assert(!aminoTs.empty());
    foreach(DNATranslation* t, aminoTs) {
        translationTableBox->addItem(t->getTranslationName());
    }
TPropertyGroup *FullColorBrushTool::getProperties(int targetType)
{
	if (!m_presetsLoaded)
		initPresets();

	return &m_prop;
}
Beispiel #3
0
MainForm::MainForm(QWidget* parent, Qt::WFlags flags) : QMainWindow(parent, flags)
{
    vrLut = 0;
    mprExaminer0 = 0;
    mprExaminer1 = 0;
    mprExaminer2 = 0;
    vrExaminer = 0;
    mprWindowLevelManip = 0;
    vrTexture = 0;
    vrSlicer = 0;

    isUpdatingGui_ = false;
	isDraggingWindow_ = false;

	setupUi(this);
    ViewerCore::get()->createPresetMixerForm(this);
    ViewerCore::get()->createDicomForm(this, ViewerCore::get()->getDicomElementList());

    setWindowFlags(Qt::CustomizeWindowHint);

	initFields();
    initControlValues();
	initConnections();
	initCallbacks();
    initPresets();
}
void FullColorBrushTool::removePreset()
{
	wstring name(m_preset.getValue());
	if (name == CUSTOM_WSTR)
		return;

	m_presetsManager.removePreset(name);
	initPresets();

	//No parameter change, and set the preset value to custom
	m_preset.setValue(CUSTOM_WSTR);
}
void FullColorBrushTool::addPreset(QString name)
{
	//Build the preset
	BrushData preset(name.toStdWString());

	preset.m_min = m_thickness.getValue().first;
	preset.m_max = m_thickness.getValue().second;
	preset.m_hardness = m_hardness.getValue();
	preset.m_opacityMin = m_opacity.getValue().first;
	preset.m_opacityMax = m_opacity.getValue().second;
	preset.m_pressure = m_pressure.getValue();

	//Pass the preset to the manager
	m_presetsManager.addPreset(preset);

	//Reinitialize the associated preset enum
	initPresets();

	//Set the value to the specified one
	m_preset.setValue(preset.m_name);
}