本文整理汇总了C++中Terms类的典型用法代码示例。如果您正苦于以下问题:C++ Terms类的具体用法?C++ Terms怎么用?C++ Terms使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Terms类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: dropMimeData
bool TableModelVariables::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
{
if (_dragActions == Qt::CopyAction && _dropActions == Qt::MoveAction && action == Qt::MoveAction) // if delete
return true;
if ( ! canDropMimeData(data, action, row, column, parent))
return false;
if (action == Qt::IgnoreAction)
return true;
if (data->hasFormat(_mimeType))
{
QByteArray encodedData = data->data(_mimeType);
Terms variables;
variables.set(encodedData);
beginResetModel();
_variables.add(variables);
endResetModel();
return true;
}
return false;
}
开发者ID:AlexanderLyNL,项目名称:jasp-desktop,代码行数:27,代码来源:tablemodelvariables.cpp
示例2: beginResetModel
void TableModelVariablesAvailable::setVariables(const Terms &variables)
{
beginResetModel();
Terms suggested;
Terms allowed;
Terms forbidden;
foreach (const Term &term, variables)
{
if ( ! isAllowed(term))
forbidden.add(term);
else if (isSuggested(term))
suggested.add(term);
else
allowed.add(term);
}
Terms ordered; // present them in a nice order
ordered.add(suggested);
ordered.add(allowed);
ordered.add(forbidden);
_allVariables.set(ordered);
_variables.set(ordered);
_variables.setSortParent(_allVariables);
endResetModel();
emit variablesChanged();
}
开发者ID:lvanderlinden,项目名称:jasp-desktop,代码行数:33,代码来源:tablemodelvariablesavailable.cpp
示例3: unassign
void TableModelVariablesAssigned::unassign(const Terms &variables)
{
Terms variablesToKeep;
variablesToKeep.set(_variables);
variablesToKeep.remove(variables);
setAssigned(variablesToKeep);
emit unassigned(variables);
}
开发者ID:MaxG87,项目名称:jasp-desktop,代码行数:9,代码来源:tablemodelvariablesassigned.cpp
示例4: variablesChanged
void ReliabilityAnalysisForm::variablesChanged()
{
Terms variablesAvailable;
variablesAvailable.add(_variableListModel->assigned());
ui->reverseScaledItems->setVariables(variablesAvailable);
if (_options != NULL)
_options->blockSignals(false);
}
开发者ID:akashrajkn,项目名称:jasp-desktop,代码行数:12,代码来源:reliabilityanalysisform.cpp
示例5: factorsChanged
void AnovaForm::factorsChanged()
{
Terms factorsAvailable;
factorsAvailable.add(_fixedFactorsListModel->assigned());
factorsAvailable.add(_randomFactorsListModel->assigned());
_anovaModel->setVariables(factorsAvailable);
_contrastsModel->setVariables(factorsAvailable);
ui->postHocTests_variables->setVariables(factorsAvailable);
}
开发者ID:josineverhagen,项目名称:jasp-desktop,代码行数:12,代码来源:anovaform.cpp
示例6: Q_UNUSED
bool TableModelAnovaWithinSubjectCells::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const
{
Q_UNUSED(row);
int colNo = (column == -1 ? parent.column() : column);
int rowNo = (row == -1 ? parent.row() : row);
if (_boundTo == NULL)
return false;
if (action == Qt::IgnoreAction)
return true;
if ( ! data->hasFormat("application/vnd.list.variable"))
return false;
if (action != Qt::MoveAction)
return false;
if (colNo != 0)
return false;
QByteArray encodedData = data->data("application/vnd.list.variable");
Terms dropped;
dropped.set(encodedData);
foreach (const Term &term, dropped)
{
if ( ! isAllowed(term))
return false;
}
if (rowNo == -1)
{
int available = 0;
for (int i = 0; i < _variables.size(); i++)
{
if (_variables.at(i) == "")
available++;
}
return dropped.size() <= available;
}
else
{
return dropped.size() <= _variables.size() - rowNo;
}
return true;
}
开发者ID:AlexanderLyNL,项目名称:jasp-desktop,代码行数:52,代码来源:tablemodelanovawithinsubjectcells.cpp
示例7: bindTo
void AnovaRepeatedMeasuresBayesianForm::bindTo(Options *options, DataSet *dataSet)
{
AnalysisForm::bindTo(options, dataSet);
Terms factorsAvailable;
foreach (const Factor &factor, _designTableModel->design())
factorsAvailable.add(factor.first);
factorsAvailable.add(_betweenSubjectsFactorsListModel->assigned());
_anovaModel->setVariables(factorsAvailable);
}
开发者ID:lvanderlinden,项目名称:jasp-desktop,代码行数:13,代码来源:anovarepeatedmeasuresbayesianform.cpp
示例8: foreach
void AnovaRepeatedMeasuresForm::termsChanged()
{
Terms terms;
terms.add(string("~OVERALL"));
foreach (const Factor &factor, _designTableModel->design())
terms.add(factor.first);
terms.add(_withinSubjectsTermsModel->terms());
ui->marginalMeansTerms->setVariables(terms);
}
开发者ID:FransMeerhoff,项目名称:jasp-desktop,代码行数:13,代码来源:anovarepeatedmeasuresform.cpp
示例9: assignmentsChanging
void TableModelVariablesAssigned::mimeDataMoved(const QModelIndexList &indices)
{
emit assignmentsChanging();
Terms variablesToRemove;
foreach (const QModelIndex &index, indices)
variablesToRemove.add(_variables.at(index.row()));
unassign(variablesToRemove);
emit assignmentsChanged();
}
开发者ID:MaxG87,项目名称:jasp-desktop,代码行数:13,代码来源:tablemodelvariablesassigned.cpp
示例10: setVariables
void TableModelAnovaModel::setVariables(const Terms &fixedFactors, const Terms &randomFactors, const Terms &covariates)
{
_fixedFactors = fixedFactors;
_randomFactors = randomFactors;
_covariates = covariates;
Terms all;
all.add(fixedFactors);
all.add(randomFactors);
all.add(covariates);
_variables.set(all);
emit variablesAvailableChanged();
}
开发者ID:FransMeerhoff,项目名称:jasp-desktop,代码行数:15,代码来源:tablemodelanovamodel.cpp
示例11: canDropMimeData
bool TableModelVariables::canDropMimeData(const QMimeData *data, Qt::DropAction action, int, int, const QModelIndex &) const
{
if (_dragActions == Qt::CopyAction && _dropActions == Qt::MoveAction && action == Qt::MoveAction) // if delete
return true;
if (data->hasFormat(_mimeType))
{
QByteArray encodedData = data->data(_mimeType);
Terms variables;
variables.set(encodedData);
foreach (const Term &variable, variables)
{
if ( ! isAllowed(variable))
return false;
}
return true;
}
开发者ID:AlexanderLyNL,项目名称:jasp-desktop,代码行数:20,代码来源:tablemodelvariables.cpp
示例12: assign
void TableModelVariablesAssigned::assign(const Terms &variables)
{
if (_boundTo == NULL)
return;
Terms v;
if (_boundTo->onlyOneTerm())
{
if (variables.size() > 0)
v.add(variables.at(0));
if (_variables.size() > 0)
{
_toSendBack.set(_variables);
_variables.clear();
QTimer::singleShot(0, this, SLOT(sendBack()));
}
}
else
{
v.set(_variables);
v.add(variables);
}
setAssigned(v);
emit assignedTo(variables);
}
开发者ID:MaxG87,项目名称:jasp-desktop,代码行数:29,代码来源:tablemodelvariablesassigned.cpp
示例13: canDropMimeData
bool TableModelVariablesAssigned::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const
{
if (_boundTo == NULL)
return false;
if (isDroppingToSelf(data))
return false;
if ( ! TableModelVariables::canDropMimeData(data, action, row, column, parent))
return false;
if (_boundTo->onlyOneTerm())
{
QByteArray encodedData = data->data(_mimeType);
Terms variables;
variables.set(encodedData);
if (variables.size() != 1)
return false;
}
return true;
}
开发者ID:MaxG87,项目名称:jasp-desktop,代码行数:24,代码来源:tablemodelvariablesassigned.cpp
示例14: factorsChanged
void AnovaBayesianForm::factorsChanged()
{
Terms factorsAvailable;
factorsAvailable.add(_fixedFactorsListModel->assigned());
factorsAvailable.add(_randomFactorsListModel->assigned());
_plotFactorsAvailableTableModel->setVariables(factorsAvailable);
Terms plotVariablesAssigned;
plotVariablesAssigned.add(_horizontalAxisTableModel->assigned());
plotVariablesAssigned.add(_seperateLinesTableModel->assigned());
plotVariablesAssigned.add(_seperatePlotsTableModel->assigned());
_plotFactorsAvailableTableModel->notifyAlreadyAssigned(plotVariablesAssigned);
ui->postHocTestsVariables->setVariables(factorsAvailable);
if (_options != NULL)
_options->blockSignals(false);
}
开发者ID:akashrajkn,项目名称:jasp-desktop,代码行数:20,代码来源:anovabayesianform.cpp
示例15: termsChanged
void AnovaForm::termsChanged()
{
Terms terms = _anovaModel->terms();
terms.insert(0, string("~OVERALL"));
ui->marginalMeans_terms->setVariables(terms);
}
开发者ID:josineverhagen,项目名称:jasp-desktop,代码行数:6,代码来源:anovaform.cpp
注:本文中的Terms类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论