本文整理汇总了C++中KstMatrixPtr::maxValue方法的典型用法代码示例。如果您正苦于以下问题:C++ KstMatrixPtr::maxValue方法的具体用法?C++ KstMatrixPtr::maxValue怎么用?C++ KstMatrixPtr::maxValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KstMatrixPtr
的用法示例。
在下文中一共展示了KstMatrixPtr::maxValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: calcAutoThreshold
void KstImageDialogI::calcAutoThreshold() {
//make sure an matrix is selected
if (!_w->_matrix->selectedMatrix().isEmpty()){
KST::matrixList.lock().readLock();
KstMatrixPtr matrix = *KST::matrixList.findTag(_w->_matrix->selectedMatrix());
KST::matrixList.lock().unlock();
if (matrix) {
matrix->readLock();
_w->_lowerZ->setText(QString::number(matrix->minValue()));
_w->_upperZ->setText(QString::number(matrix->maxValue()));
matrix->unlock();
}
}
}
示例2: update
//.........这里部分代码省略.........
found = true;
break;
}
}
if (!found) {
KstObjectItem *item = new KstObjectItem(this, p.data(), _dm);
connect(item, SIGNAL(updated()), this, SIGNAL(updated()));
}
}
}
_removable = x->getUsage() == 1;
x->unlock();
}
break;
}
case RTTI_OBJ_DATA_MATRIX:
{
KST::matrixList.lock().readLock();
KstRMatrixPtr x = kst_cast<KstRMatrix>(*KST::matrixList.findTag(_tag));
KST::matrixList.lock().unlock();
if (x) {
x->readLock();
// getUsage: subtract 1 for KstRMatrixPtr x
bool inUse = (x->getUsage() - 1 - localUseCount) > 0;
if (inUse != _inUse) {
_inUse = inUse;
setPixmap(2, inUse ? _dm->yesPixmap() : QPixmap());
}
QString field = QString::number(x->sampleCount());
if (text(3) != field) {
setText(3, field);
}
field = i18n("%1: %2 (%3 by %4)").arg(x->filename()).arg(x->field())
.arg(x->xNumSteps())
.arg(x->yNumSteps());
if (text(4) != field) {
setText(4, field);
}
_removable = x->getUsage() == 2;
x->unlock();
}
break;
}
case RTTI_OBJ_STATIC_MATRIX:
{
KST::matrixList.lock().readLock();
KstSMatrixPtr x = kst_cast<KstSMatrix>(*KST::matrixList.findTag(_tag));
KST::matrixList.lock().unlock();
if (x) {
x->readLock();
// getUsage: subtract 1 for KstRMatrixPtr x
bool inUse = (x->getUsage() - 1 - localUseCount) > 0;
if (inUse != _inUse) {
_inUse = inUse;
setPixmap(2, inUse ? _dm->yesPixmap() : QPixmap());
}
QString field = QString::number(x->sampleCount());
if (text(3) != field) {
setText(3, field);
}
field = i18n("%1 to %2").arg(x->gradZMin()).arg(x->gradZMax());
if (text(4) != field) {
setText(4, field);
}
_removable = x->getUsage() == 2;
x->unlock();
}
break;
}
case RTTI_OBJ_MATRIX:
{
KST::matrixList.lock().readLock();
KstMatrixPtr x = *KST::matrixList.findTag(_tag);
KST::matrixList.lock().unlock();
if (x) {
x->readLock();
// getUsage:
// subtract 1 for KstVectorPtr x
bool inUse = (x->getUsage() - 1 - localUseCount) > 0;
if (inUse != _inUse) {
_inUse = inUse;
setPixmap(2, inUse ? _dm->yesPixmap() : QPixmap());
}
QString field = QString::number(x->sampleCount());
if (text(3) != field) {
setText(3, field);
}
field = i18n("[%1..%2]").arg(x->minValue()).arg(x->maxValue());
if (text(4) != field) {
setText(4, field);
}
x->unlock();
_removable = false;
}
break;
}
default:
assert(0);
}
}