Esempio n. 1
0
void FrmCatch::beforeShow()
{
    this->groupDetails->setVisible(false);

    setSourceText(lbSource,m_sample->bLogBook);
    initCatchModel();
}
void FrmMinorStrata::beforeShow()
{
    this->groupDetails->setVisible(false);
    setSourceText(lbSource,m_sample->bLogBook);
    //TEMPORARY FRAME ONLY FOR LOGBOOK?
    toolButton->setVisible(m_sample->bLogBook);
}
Esempio n. 3
0
void FrmTrip::beforeShow()
{
    this->groupDetails->setVisible(false);
    if (m_sample->bLogBook)
        m_lWidgets << cmbSite;

    setSourceText(lbSource,m_sample->bLogBook);
    initTripModel();

}
Esempio n. 4
0
void FrmCell::beforeShow()
{
    //The dictionary of SQL relations does *not* respond to filter changes, and therefore
    //we need to initialize a new cell model (and setup the relations) everytime. For this
    //reason, dont bother to initialize it in the beginning.

    initCellModel();
    this->groupDetails->setVisible(false);
    setSourceText(lbSource,m_sample->bLogBook);
}
Esempio n. 5
0
void TranslationInterface::onInvoked(const bb::system::InvokeRequest &request)
{
    if (request.mimeType() != "text/plain")
        return;

    setSourceText(QString::fromUtf8(request.data()));

#ifdef WITH_ANALYTICS
    if (m_privacyLevel == NoPrivacy) {
        QVariantMap props;
        fillTranslationProperties(props);
        m_analytics->trackEvent("Invoked", props, true);
    }
#endif

    retranslate();
}
Esempio n. 6
0
void FrmSampling::onShowForm()
{
    setSourceText(lbSource,m_sample->bLogBook);
    setTips(m_sample->bLogBook);

    if (m_mode==CREATE){

        if (!createRecords()){
            emit showError(tr("Could not initialize records for Sampling Technique!"));
            return;
        }else {
            mapper1->toLast();
            emit addRecord();
            emit showStatus(tr("Records successfully initialized for characterizing the sampling technique used for this frame!"));
        }

        for (int i=0; i < tSampLevels->rowCount(); ++i)
            tableView->hideRow(i);

    }if (m_mode==EDIT){

        bool bError=false;

        tRefSampTec->setFilter("id_fr_time=" + QVariant(m_sample->frameTimeId).toString());

        QModelIndex idx=tRefSampTec->index(0,0);
        if (idx.isValid()){

            tSampLevels->setFilter("id_sampling_technique=" + idx.data().toString());
            tSampLevels->select();

            mapper1->toLast();

        } else {
            emit showError(tr("Could not find a sampling technique for this frame!"));
        }
    }

    m_submitted=false;

    groupTechnique->setEnabled(!m_submitted);
    pushApply->setEnabled(!m_submitted);
    pushApply->setVisible(m_mode==CREATE);

}