int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: programChanged(); break; case 1: configureProgramClicked(); break; case 2: environmentChanged(); break; case 3: createEnvironmentClicked(); break; case 4: configureEnvironmentClicked(); break; case 5: configureSimulationClicked(); break; case 6: exitClicked(); break; case 7: runClicked(); break; default: ; } _id -= 8; } return _id; }
QuestWindow::QuestWindow() { QTextCodec::setCodecForTr (QTextCodec::codecForName("UTF-8")); layout = new QHBoxLayout(); setLayout(layout); label = new QLabel(tr("Treœæ zadania")); //label2 = new QLabel(tr("Typ zadania")); button = new QPushButton(tr("Powrót")); button2 = new QPushButton(tr("Rozwi¹¿")); spacer = new QSpacerItem(100, 1, QSizePolicy::Expanding, QSizePolicy::Minimum); layout->addWidget(label); layout->addSpacerItem(spacer); //layout->addWidget(label2); layout->addWidget(button); layout->addWidget(button2); connect(button, SIGNAL(clicked()), this, SLOT(backClicked())); connect(button2, SIGNAL(clicked()), this, SLOT(runClicked())); }
void TrackerControlWidget::initUi() { // ******************* rasterization tab ************************* primitiveBox->addItem("LinePrimitive" , wombat::LinePrimitive); primitiveBox->addItem("CylinderPrimitve" , wombat::CylinderPrimitve); primitiveBox->addItem("QuadricPrimitive" , wombat::QuadricPrimitive); primitiveBox->setCurrentIndex(1); labelBox->addItem("UniformLabeling", wombat::UniformLabeling); labelBox->addItem("DistanceLabeling", wombat::DistanceLabeling); labelBox->addItem("SquareDistanceLabeling", wombat::SquareDistanceLabeling); labelBox->setCurrentIndex(0); // ******************* weighting tab ************************* weightBox->addItem("default", WeightingSimple); comparisonBox->addItem("overlapping", CompareOverlapping); comparisonBox->addItem("overlapping with mask", CompareOverlappingWithMasking); comparisonBox->addItem("symmetric overlapping", CompareOverlappingWithSymmetry); // ******************* partitioning tab ************************* // ******************* filter tab ************************* diffusionStrategyComboBox->addItem("constant", ConstantDiffusion); diffusionStrategyComboBox->addItem("alpha values", AlphaDiffusion); diffusionStrategyComboBox->addItem("variance based", VarianceDiffusion); diffusionStrategyComboBox->addItem("covariance based", CovarianceDiffusion); particleGeneratorComboBox->addItem("gaussian w. ref. pose", GaussianDiffusion); particleGeneratorComboBox->addItem("iterative (last particle set)", IterativeDiffusion); particleGeneratorComboBox->addItem("random field", RandomFieldDiffusion); modeSelectorComboBox->addItem("peak", PeakMode); modeSelectorComboBox->addItem("average", AverargeMode); modeSelectorComboBox->addItem("weighted average", WeightedAverageMode); // ******************* misc tab ************************* connect(primitiveBox, SIGNAL(activated(int)), this, SLOT(updateProjectData())); connect(labelBox, SIGNAL(activated(int)), this, SLOT(updateProjectData())); connect(weightBox, SIGNAL(activated(int)), this, SLOT(updateProjectData())); connect(comparisonBox, SIGNAL(activated(int)), this, SLOT(updateProjectData())); connect(numVoxelsSlider, SIGNAL(valueChanged(int)), this, SLOT(updateProjectData())); connect(weightBox, SIGNAL(activated(int)), this, SLOT(updateProjectData())); connect(comparisonBox, SIGNAL(activated(int)), this, SLOT(updateProjectData())); connect(numberParticlesSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateProjectData())); connect(numberLayersSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateProjectData())); connect(annealingRateSpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateProjectData())); connect(minAnnealingRateSpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateProjectData())); connect(initialBetaSpinBox, SIGNAL(valueChanged(double)), this, SLOT(updateProjectData())); connect(showResultsCheckBox, SIGNAL(toggled(bool)), this, SLOT(updateProjectData())); connect(rasterizeButton, SIGNAL(clicked()), this, SIGNAL(rasterizeRequested())); connect(weightButton, SIGNAL(clicked()), this, SIGNAL(weightingRequested())); connect(runButton, SIGNAL(clicked()), this, SIGNAL(runClicked())); connect(runStepButton, SIGNAL(clicked()), this, SIGNAL(oneStepClicked())); connect(stopButton, SIGNAL(clicked()), this, SIGNAL(stopClicked())); connect(updateFilterButton, SIGNAL(clicked()), this, SIGNAL(updateParticleFilter())); connect(updateFilterButton, SIGNAL(clicked()), this, SLOT(printProjectMap())); }
PluginCreator::PluginCreator(QWidget* parent) : QMainWindow(parent) { state = S_INIT; item = 0; view = 0; dock = 0; manualDock = 0; helpBrowser = 0; setupUi(this); QToolBar* fileTools = addToolBar(tr("File Operations")); fileTools->setObjectName("FileOperations"); actionNew->setIcon(*icons[fileNew_ICON]); actionNew->setShortcut(QKeySequence(QKeySequence::New)); fileTools->addAction(actionNew); actionOpen->setIcon(*icons[fileOpen_ICON]); actionOpen->setShortcut(QKeySequence(QKeySequence::Open)); fileTools->addAction(actionOpen); actionSave->setIcon(*icons[fileSave_ICON]); actionSave->setShortcut(QKeySequence(QKeySequence::Save)); fileTools->addAction(actionSave); actionQuit->setShortcut(QKeySequence(QKeySequence::Quit)); actionManual->setIcon(QIcon(":/data/help.png")); actionManual->setShortcut(QKeySequence(QKeySequence::HelpContents)); fileTools->addAction(actionManual); QToolBar* editTools = addToolBar(tr("Edit Operations")); editTools->setObjectName("EditOperations"); actionUndo->setIcon(*icons[undo_ICON]); actionUndo->setShortcut(QKeySequence(QKeySequence::Undo)); editTools->addAction(actionUndo); actionRedo->setIcon(*icons[redo_ICON]); actionRedo->setShortcut(QKeySequence(QKeySequence::Redo)); editTools->addAction(actionRedo); actionUndo->setEnabled(false); actionRedo->setEnabled(false); log->setReadOnly(true); log->setMaximumBlockCount(1000); readSettings(); setState(S_EMPTY); connect(run, SIGNAL(clicked()), SLOT(runClicked())); connect(stop, SIGNAL(clicked()), SLOT(stopClicked())); connect(actionOpen, SIGNAL(triggered()), SLOT(loadPlugin())); connect(actionSave, SIGNAL(triggered()), SLOT(savePlugin())); connect(actionNew, SIGNAL(triggered()), SLOT(newPlugin())); connect(actionQuit, SIGNAL(triggered()), SLOT(close())); connect(actionManual, SIGNAL(triggered()), SLOT(showManual())); connect(actionUndo, SIGNAL(triggered()), textEdit, SLOT(undo())); connect(actionRedo, SIGNAL(triggered()), textEdit, SLOT(redo())); connect(textEdit, SIGNAL(undoAvailable(bool)), actionUndo, SLOT(setEnabled(bool))); connect(textEdit, SIGNAL(redoAvailable(bool)), actionRedo, SLOT(setEnabled(bool))); connect(textEdit, SIGNAL(textChanged()), SLOT(textChanged())); }
void ConvFit::setupFitTab() { setDefaultPeakType("Lorentzian"); setConvolveMembers(true); setSampleWSSuffices({"_red", "_sqw"}); setSampleFBSuffices({"_red.nxs", "_sqw.nxs", "_sqw.dave"}); setResolutionWSSuffices({"_res", "_red", "_sqw"}); setResolutionFBSuffices({"_res.nxs", "_red.nxs", "_sqw.nxs", "_sqw.dave"}); // Initialise fitTypeStrings m_fitStrings["None"] = ""; m_fitStrings["One Lorentzian"] = "1L"; m_fitStrings["Two Lorentzians"] = "2L"; m_fitStrings["InelasticDiffSphere"] = "IDS"; m_fitStrings["InelasticDiffRotDiscreteCircle"] = "IDC"; m_fitStrings["ElasticDiffSphere"] = "EDS"; m_fitStrings["ElasticDiffRotDiscreteCircle"] = "EDC"; m_fitStrings["StretchedExpFT"] = "SFT"; m_fitStrings["Teixeira Water"] = "TxWater"; auto &functionFactory = FunctionFactory::Instance(); auto lorentzian = functionFactory.createFunction("Lorentzian"); auto teixeiraWater = functionFactory.createFunction("TeixeiraWaterSQE"); auto elasticDiffSphere = functionFactory.createFunction("ElasticDiffSphere"); auto inelasticDiffSphere = functionFactory.createFunction("InelasticDiffSphere"); auto elasticDiffRotDiscCircle = functionFactory.createFunction("ElasticDiffRotDiscreteCircle"); auto inelasticDiffRotDiscCircle = functionFactory.createFunction("InelasticDiffRotDiscreteCircle"); auto stretchedExpFT = functionFactory.createFunction("StretchedExpFT"); auto deltaFunction = functionFactory.createFunction("DeltaFunction"); addCheckBoxFunctionGroup("Use Delta Function", {deltaFunction}); addComboBoxFunctionGroup("One Lorentzian", {lorentzian}); addComboBoxFunctionGroup("Two Lorentzians", {lorentzian, lorentzian}); addComboBoxFunctionGroup("Teixeira Water", {teixeiraWater}); addComboBoxFunctionGroup("InelasticDiffSphere", {inelasticDiffSphere}); addComboBoxFunctionGroup("InelasticDiffRotDiscreteCircle", {inelasticDiffRotDiscCircle}); addComboBoxFunctionGroup("ElasticDiffSphere", {elasticDiffSphere}); addComboBoxFunctionGroup("ElasticDiffRotDiscreteCircle", {elasticDiffRotDiscCircle}); addComboBoxFunctionGroup("StretchedExpFT", {stretchedExpFT}); // Set available background options setBackgroundOptions({"None", "FlatBackground", "LinearBackground"}); addBoolCustomSetting("ExtractMembers", "Extract Members"); addOptionalDoubleSetting("TempCorrection", "Temp. Correction", "UseTempCorrection", "Use Temp. Correction"); setCustomSettingChangesFunction("TempCorrection", true); setCustomSettingChangesFunction("UseTempCorrection", true); // Instrument resolution m_properties["InstrumentResolution"] = m_dblManager->addProperty("InstrumentResolution"); // Post Plot and Save connect(m_uiForm->pbRun, SIGNAL(clicked()), this, SLOT(runClicked())); connect(this, SIGNAL(functionChanged()), this, SLOT(fitFunctionChanged())); }
void RunButton::onClicked_() { item_->run(); emit runClicked(item_); }
int main(int argc, char *argv[]) { QApplication a(argc, argv); auto keys = QStyleFactory::keys(); for (auto s : keys) { qDebug(s.toStdString().c_str()); } QString ss = load_stylesheet(":/Stylesheets/common.qss"); #ifdef _6IT_UI_MOBILE ss.append(load_stylesheet(":/Stylesheets/common_mobile.qss")); #else ss.append(load_stylesheet(":/Stylesheets/common_desktop.qss")); #endif #ifdef _6IT_QT_WINRT_DESKTOP ss.append(load_stylesheet(":/Stylesheets/winrt_desktop.qss")); #elif defined(_6IT_QT_WINRT_PHONE) a.setStyle(QStyleFactory::create("Fusion")); ss.append(load_stylesheet(":/Stylesheets/winrt_phone.qss")); #elif defined(_6IT_QT_WINRT_DESKTOP) ss.append(load_stylesheet(":/Stylesheets/windows_desktop.qss")); #elif defined(_6IT_QT_IOS) ss.append(load_stylesheet(":/Stylesheets/ios.qss")); #elif defined(_6IT_QT_ANDROID) a.setStyle(QStyleFactory::create("Fusion")); ss.append(load_stylesheet(":/Stylesheets/android.qss")); #elif defined(_6IT_QT_LINUX_DESKTOP) ss.append(load_stylesheet(":/Stylesheets/linux_desktop.qss")); #endif a.setStyleSheet(ss); QThread thread; auto pworker = new RZQtSubCWorker(); auto &worker = *pworker; worker.moveToThread(&thread); thread.start(); FileListWindow fileListWindow; ViewSourceWindow editorWindow; RunWindow runWindow; CompileWindow compileWindow(worker); fileListWindow.show(); QObject::connect(&fileListWindow, SIGNAL(sourceSelected(QString)), &editorWindow, SLOT(show())); QObject::connect(&fileListWindow, SIGNAL(sourceSelected(QString)), &editorWindow, SLOT(loadFile(QString))); QObject::connect(&fileListWindow, SIGNAL(sourceSelected(QString)), &fileListWindow, SLOT(hide())); QObject::connect(&editorWindow, SIGNAL(navigatedBack()), &fileListWindow, SLOT(show())); QObject::connect(&editorWindow, SIGNAL(navigatedBack()), &editorWindow, SLOT(hide())); QObject::connect(&editorWindow, SIGNAL(runCode(QString const &)), &editorWindow, SLOT(hide())); QObject::connect(&editorWindow, SIGNAL(runCode(QString const &)), &compileWindow, SLOT(show())); QObject::connect(&editorWindow, SIGNAL(runCode(QString const &)), &compileWindow, SLOT(clear())); QObject::connect(&editorWindow, SIGNAL(runCode(QString const &)), &worker, SLOT(setSource(QString const &))); QObject::connect(&compileWindow, SIGNAL(navigatedBack()), &editorWindow, SLOT(show())); QObject::connect(&compileWindow, SIGNAL(navigatedBack()), &compileWindow, SLOT(hide())); QObject::connect(&worker, SIGNAL(compilationWillStart()), &compileWindow, SLOT(compileStarted())); QObject::connect(&worker, SIGNAL(compilationDidFinish()), &compileWindow, SLOT(compileFinished())); QObject::connect(&compileWindow, SIGNAL(runClicked()), &compileWindow, SLOT(hide())); QObject::connect(&compileWindow, SIGNAL(runClicked()), &runWindow, SLOT(show())); QObject::connect(&compileWindow, SIGNAL(runClicked()), &worker, SLOT(run())); QObject::connect(&runWindow, SIGNAL(navigatedBack()), &compileWindow, SLOT(show())); QObject::connect(&runWindow, SIGNAL(navigatedBack()), &runWindow, SLOT(hide())); QObject::connect(&worker, SIGNAL(runWillStart()), &runWindow, SLOT(runStarted())); QObject::connect(&worker, SIGNAL(runDidFinish()), &runWindow, SLOT(runFinished())); QObject::connect(&worker, SIGNAL(sourceChanged()), &worker, SLOT(compile())); QObject::connect(&worker, SIGNAL(compilerConsoleOutput(QString const &, int)), &compileWindow, SLOT(printString(QString const &, int))); QObject::connect(&worker, SIGNAL(runConsoleOutput(QString const &, int)), &runWindow, SLOT(printString(QString const &, int))); return a.exec(); }