void FixtureBrowser::setSelectedModel(QString selectedModel) { if (m_selectedModel == selectedModel) return; m_selectedModel = selectedModel; setFixtureName(m_selectedModel); m_selectedMode = QString(); emit selectedModelChanged(selectedModel); emit modesListChanged(); emit modeChannelsCountChanged(); emit modeChannelListChanged(); }
void ModelFramesWidget::setModel(ClumpPtr model) { if (framemodel) { delete framemodel; framemodel = nullptr; tree->setModel(nullptr); } gmodel = model; if (model.get() != nullptr) { framemodel = new DFFFramesTreeModel(model, this); tree->setModel(framemodel); tree->setDisabled(false); connect(tree->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), SLOT(selectedModelChanged(QModelIndex, QModelIndex))); } else { tree->setDisabled(true); } }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); m_pOAuth2 = new OAuth2(this); m_API_key = m_pOAuth2->getSimpleAPIKey(); connect(m_pOAuth2, SIGNAL(loginDone()), this, SLOT(loginDone())); m_managerPrediction.setAPIKey(m_API_key); connect(&m_managerPrediction, SIGNAL(replyText(QString)), this, SLOT(addReplyText(QString))); connect(&m_managerPrediction, SIGNAL(recvModelsList(QVariantList)), this, SLOT(recvModelsList(QVariantList))); connect(&m_managerPrediction, SIGNAL(recvModelDescription(QVariant)), this, SLOT(recvModelDescription(QVariant))); connect(&m_managerPrediction, SIGNAL(recvPredictionResult(QVariant)), this, SLOT(recvPredictionResult(QVariant))); connect(&m_managerPrediction, SIGNAL(recvAddToModelComplete(bool)), this, SLOT(recvAddToModelComplete(bool))); connect(ui->lwModelsList, SIGNAL(itemSelectionChanged()), this, SLOT(selectedModelChanged())); connect(ui->actionDeleteModel, SIGNAL(triggered()), this, SLOT(deleteModel())); connect(ui->actionNewModel, SIGNAL(triggered()), this, SLOT(newModel())); connect(ui->actionUpdateModelsList, SIGNAL(triggered()), this, SLOT(updateModelsList())); connect(ui->actionUpdateModelInfo, SIGNAL(triggered()), this, SLOT(updateModelInfo())); connect(ui->actionQuit, SIGNAL(triggered()), this, SLOT(close())); connect(ui->predictButton, SIGNAL(clicked()), this, SLOT(predict())); connect(ui->lineEditTextToPredict, SIGNAL(returnPressed()), this, SLOT(predict())); connect(ui->actionLogin, SIGNAL(triggered()), this, SLOT(login())); connect(&timerTest, SIGNAL(timeout()), this, SLOT(testSendRequest())); startLogin(false); }