void TaxonomyCreator :: generalTwoPhaseClassification ( void ) { // Top-Down phase // setup TD phase (ie, identify parent candidates) setupTopDown(); // run TD phase if necessary (ie, entry is completely defined) if ( needTopDown() ) { setValue ( pTax->getTopVertex(), true ); // C [= TOP == true setValue ( pTax->getBottomVertex(), false ); // C [= BOT == false (catched by UNSAT) upDirection = false; runTopDown(); } clearLabels(); // Bottom-Up phase // run BU if necessary if ( needBottomUp() ) { setValue ( pTax->getBottomVertex(), true ); // BOT [= C == true upDirection = true; runBottomUp(); } clearLabels(); }
void Spectrogram::createLabels() { clearLabels(); QwtValueList levels = contourLevels(); const int numLevels = levels.size(); for (int l = 0; l < numLevels; l++){ PlotMarker *m = new PlotMarker(l, d_labels_angle); QwtText t = QwtText(QString::number(levels[l])); t.setColor(d_labels_color); t.setFont(d_labels_font); if (d_white_out_labels) t.setBackgroundBrush(QBrush(Qt::white)); else t.setBackgroundBrush(QBrush(Qt::transparent)); m->setLabel(t); int x_axis = xAxis(); int y_axis = yAxis(); m->setAxis(x_axis, y_axis); if (d_graph && d_show_labels) m->attach(d_graph); d_labels_list << m; } }
void FormJoinGame::show(QByteArray data) { clearLabels(); updateData(data); updateListOfGames(); show(); }
void FormJoinGame::gameStarted(UserProperties creator) { for(int i = 0; i< _games_data.size(); ++i) if(creator == _games_data.at(i)._creator) { _games_data.removeAt(i); clearLabels(); updateListOfGames(); i = _games_data.size(); } }
void FormJoinGame::closeGame(QList<UserProperties> users) { for(int i = 0; i< _games_data.size(); ++i) if(users.contains(_games_data.at(i)._creator)) { _games_data.removeAt(i); clearLabels(); updateListOfGames(); i = _games_data.size(); } }
void QwtHistogram::loadLabels() { clearLabels(); int size = this->dataSize(); if (!size) return; QwtPlot *d_plot = plot(); if (!d_plot) return; int index = 0; for (int i = 0; i < size; i++){ PlotMarker *m = new PlotMarker(index, d_labels_angle); QwtText t = QwtText(QString::number(y(i))); t.setColor(d_labels_color); t.setFont(d_labels_font); if (d_white_out_labels) t.setBackgroundBrush(QBrush(Qt::white)); else t.setBackgroundBrush(QBrush(Qt::transparent)); m->setLabel(t); int x_axis = xAxis(); int y_axis = yAxis(); m->setAxis(x_axis, y_axis); QSize size = t.textSize(); int dx = int(d_labels_x_offset*0.01*size.height()); int dy = -int((d_labels_y_offset*0.01 + 0.5)*size.height()); int x2 = d_plot->transform(x_axis, x(index)) + dx; int y2 = d_plot->transform(y_axis, y(index)) + dy; switch(d_labels_align){ case Qt::AlignLeft: break; case Qt::AlignHCenter: x2 -= size.width()/2; break; case Qt::AlignRight: x2 -= size.width(); break; } m->setXValue(d_plot->invTransform(x_axis, x2)); m->setYValue(d_plot->invTransform(y_axis, y2)); m->attach(d_plot); d_labels_list << m; index++; } d_show_labels = true; }
void manager::genMove() { std::cout << "genMove()" << std::endl; if (game_.nowWinner()==Player::None()) { clearLabels(); Player current_ = game_.CurrentPlayer(); generated[game_.GenMove().GetLocation()] ++; showLabels(); } else { std::cout << "Game has already finished." << std::endl; } }
void RostersView::setRostersModel(IRostersModel *AModel) { if (FRostersModel != AModel) { LOG_INFO(QString("Changing rosters model, class=%1").arg(AModel->instance()->metaObject()->className())); emit modelAboutToBeSeted(AModel); if (selectionModel()) selectionModel()->clear(); if (FRostersModel) { disconnect(FRostersModel->instance(),SIGNAL(indexDestroyed(IRosterIndex *)),this,SLOT(onIndexDestroyed(IRosterIndex *))); FRostersModel->removeRosterDataHolder(RDHO_ROSTERSVIEW,this); FRostersModel->removeRosterDataHolder(RDHO_ROSTERSVIEW_NOTIFY,this); clearLabels(); } FRostersModel = AModel; if (FRostersModel) { FRostersModel->insertRosterDataHolder(RDHO_ROSTERSVIEW,this); FRostersModel->insertRosterDataHolder(RDHO_ROSTERSVIEW_NOTIFY,this); connect(FRostersModel->instance(),SIGNAL(indexDestroyed(IRosterIndex *)), SLOT(onIndexDestroyed(IRosterIndex *))); } if (FProxyModels.isEmpty()) { emit viewModelAboutToBeChanged(FRostersModel!=NULL ? FRostersModel->instance() : NULL); QTreeView::setModel(FRostersModel!=NULL ? FRostersModel->instance() : NULL); emit viewModelChanged(FRostersModel!=NULL ? FRostersModel->instance() : NULL); } else { FProxyModels.values().first()->setSourceModel(FRostersModel!=NULL ? FRostersModel->instance() : NULL); } if (selectionModel()) { connect(selectionModel(),SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)), SLOT(onSelectionChanged(const QItemSelection &, const QItemSelection &))); } emit modelSeted(FRostersModel); }
void manager::searchMove() { std::cout << "searchMove()" << std::endl; if (game_.nowWinner()==Player::None()) { clearLabels(); Player current_ = game_.CurrentPlayer(); for (size_t i=0; i<20; i++) { (std::cout << ".").flush(); generated[game_.GenMove().GetLocation()] ++; } std::cout << std::endl; showLabels(); } else { std::cout << "Game has already finished." << std::endl; } }
bool manager::putStone(const Move& m) { if (game_.IsValidMove(m)) { clearLabels(); boost::shared_ptr<Move> last_move = tree_.GetLastMove(); if (last_move.get()) { m_boardScene->removeBGMark( last_move->GetLocation().GetX(), last_move->GetLocation().GetY() ); } game_.Play(m); tree_.AppendMove(m); // tree_.Print(); if (m.GetPlayer()==Player::First()) m_boardScene->addBlackStone(m.GetLocation().GetX(), m.GetLocation().GetY()); else m_boardScene->addWhiteStone(m.GetLocation().GetX(), m.GetLocation().GetY()); last_move = tree_.GetLastMove(); if (last_move.get()) { m_boardScene->addBGMark( last_move->GetLocation().GetX(), last_move->GetLocation().GetY(), QColor(0,255,0,80) ); } std::cout << "Put stone on: " << m.GetLocation().ToCoords() << std::endl; Player winner = game_.nowWinner(); if (winner!=Player::None()) { emit stateChanged(winner); } emit movePlayed(); return true; } std::cout << "Not a valid move." << std::endl; return false; }
/** * MosaicTrackTool constructor * * * @param parent */ MosaicTrackTool::MosaicTrackTool(MosaicSceneWidget *scene, QStatusBar *status) : MosaicTool(scene) { p_sbar = status; p_latLabel = new QLabel(getWidget()); p_latLabel->setText(""); p_latLabel->setMinimumSize(p_latLabel->sizeHint()); p_latLabel->setToolTip("Latitude"); p_sbar->addPermanentWidget(p_latLabel); connect(p_latLabel, SIGNAL(destroyed(QObject *)), this, SLOT(labelDestroyed(QObject *))); p_lonLabel = new QLabel(getWidget()); p_lonLabel->setText(""); p_lonLabel->setMinimumSize(p_lonLabel->sizeHint()); p_lonLabel->setToolTip("Longitude"); p_sbar->addPermanentWidget(p_lonLabel); connect(p_lonLabel, SIGNAL(destroyed(QObject *)), this, SLOT(labelDestroyed(QObject *))); p_xLabel = new QLabel(getWidget()); p_xLabel->setText("X"); p_xLabel->setMinimumSize(p_lonLabel->sizeHint()); p_xLabel->setToolTip("Longitude"); p_sbar->addPermanentWidget(p_xLabel); connect(p_xLabel, SIGNAL(destroyed(QObject *)), this, SLOT(labelDestroyed(QObject *))); p_yLabel = new QLabel(getWidget()); p_yLabel->setText("Y"); p_yLabel->setMinimumSize(p_lonLabel->sizeHint()); p_yLabel->setToolTip("Longitude"); p_sbar->addPermanentWidget(p_yLabel); connect(p_yLabel, SIGNAL(destroyed(QObject *)), this, SLOT(labelDestroyed(QObject *))); clearLabels(); }
/** * Updates the tracking labels. * Displays the Planetocentric Latitude and 360 Positive East * Longitude in the lower right corner of the window. * * * @param p */ void MosaicTrackTool::updateLabels(QPointF p) { //---------------------------------------------------------------------- // we need to find out if the point given is over an item, if not, call // clearLables() if so, then we need to get the item and figure out the // lat/lon that corresponds with the given point. //---------------------------------------------------------------------- Projection *proj = getWidget()->getProjection(); TProjection *tproj = (TProjection *) proj; if (!proj || proj->projectionType() != Projection::Triaxial) { clearLabels(); return; } proj->SetCoordinate(p.x(), -1 * p.y()); if(p_lonLabel) { p_lonLabel->setVisible(true); p_lonLabel->setText("LON " + QString::number(tproj->Longitude())); } if(p_latLabel) { p_latLabel->setVisible(true); p_latLabel->setText("LAT " + QString::number(tproj->Latitude())); } if(p_xLabel) { p_xLabel->setVisible(true); p_xLabel->setText("X " + QString::number(p.x())); } if(p_yLabel) { p_yLabel->setVisible(true); p_yLabel->setText("Y " + QString::number(-1 * p.y())); } }
void TaxonomyCreator :: performClassification ( void ) { // do something before classification (tunable) preClassificationActions(); ++nEntries; if ( LLM.isWritable(llStartCfyEntry) && needLogging() ) LL << "\n\nTAX: start classifying entry " << curEntry->getName(); // if no classification needed -- nothing to do if ( immediatelyClassified() ) return; // perform main classification generalTwoPhaseClassification(); // create new vertex pTax->finishCurrentNode(); // clear all labels clearLabels(); }
/** * Clears the labels if the mouse leaves the application. * */ void TrackTool::mouseLeave() { clearLabels(); }
/** * Clears the labels if the mouse leaves the application. * */ void MosaicTrackTool::mouseLeave() { clearLabels(); }
Local void analyzeParagraph(struct LOC_paragraphSetup *LINK) { paragraph_index i, FORLIM; *LINK->voice = 0; bottom = 0; top = nvoices + 1; clearLabels(); clearTags(); clearUptext(); FORLIM = para_len; for (i = 1; i <= FORLIM; i++) { /* ----- Paragraph analysis main loop ----- */ if (*P[i-1] != '\0' && P[i-1][0] != comment) { NextWord(LINK->w, P[i-1], blank, colon); line_no = orig_line_no[i-1]; LINK->l = strlen(LINK->w); LINK->is_labelled = (LINK->w[LINK->l-1] == colon && LINK->w[LINK->l-2] != barsym); if (LINK->is_labelled) { strcpy(LINK->P_keep, P[i-1]); predelete(P[i-1], LINK->l); shorten(LINK->w, LINK->l - 1); LINK->k = findVoice(LINK->w); /* First look for a voice label */ if (LINK->k > 0) { *LINK->voice = LINK->k; setMusicLineNo(*LINK->voice, i); } else if (LINK->w[0] == 'L') maybeLyrics(*LINK->voice, i, LINK->w); else if (LINK->w[0] == 'C') maybeChords(i, LINK); else if (LINK->w[0] == 'U') maybeUptext(i, LINK); else { if (startsWithIgnoreCase(LINK->w, "SPACE")) { setSpace(P[i-1]); must_respace = true; } else { if (startsWithIgnoreCase(LINK->w, "VOICES")) { selectVoices(P[i-1]); must_restyle = true; } else { strcpy(P[i-1], LINK->P_keep); LINK->is_labelled = false; if (!isNoteOrRest(LINK->w)) { error("Unknown line label", print); /** ------------ Maybe Space command ------------ */ /** ------------ Maybe Voices command ------------ */ /** Could be sticky attribute **/ } } } } } if (!LINK->is_labelled) { (*LINK->voice)++; setMusicLineNo(*LINK->voice, i); } if (*LINK->voice > bottom) bottom = *LINK->voice; if (*LINK->voice > 0 && *LINK->voice < top) top = *LINK->voice; } } }
void GameLayer::ccTouchesEnded(cocos2d::CCSet* touches, cocos2d::CCEvent* event) { CCTouch *touch = (CCTouch *) touches->anyObject(); if (touch) { CCPoint tap = touch->getLocation(); if (_gameState == kGameStatePlay) { int line_count = _manager->getLines()->count(); //don't bother creating new lines if 10 on stage already, or if no power if (line_count > 10 || _manager->getLineEnergy() <= 0) { _drawLayer->setStartPoint(ccp(0,0)); _drawLayer->setTouchPoint(ccp(0,0)); return; } //don't bother with line if points aren't set on screen //and if start and end points are the same if (!pointEqualsPoint(_drawLayer->getStartPoint(), ccp(0,0)) && !pointEqualsPoint(_drawLayer->getStartPoint(), tap)) { Line * line = _manager->lineFromPool(); line->setValues(_drawLayer->getStartPoint(), tap); //check length of the line, if too short, get rid of it if (line->getLength() < 40) { _drawLayer->setStartPoint(ccp(0,0)); _drawLayer->setTouchPoint(ccp(0,0)); return; } _manager->getLines()->addObject(line); if (_manager->getBoosting()) { _manager->setBoosting(false); _moon->turnOnOff(_manager->getLineEnergy() > 0); } _drawLayer->setBlinking(true); //calculate the energy cost of the created line float cost = line->getLength() * _manager->getLineDecrement(); //if more than one line on screen, then add that to the cost if (line_count > 1) cost *= line_count; _manager->setLineEnergy( _manager->getLineEnergy() - 0.005 * cost ); } _drawLayer->setStartPoint(ccp(0,0)); _drawLayer->setTouchPoint(ccp(0,0)); } else if (_gameState == kGameStateNewLevel) { //if showing New Level message, with TOUCH END, start new level CCRect bounds = _btnStart->boundingBox(); if (bounds.containsPoint(tap)) { clearLabels(); reset(); } //if showing Game Over message, with TOUCH END, track buttons } else if (_gameState == kGameStateGameOver){ CCRect try_bounds = _btnTryAgain->boundingBox(); CCRect menu_bounds = _btnMenu->boundingBox(); if (try_bounds.containsPoint(tap)) { SimpleAudioEngine::sharedEngine()->stopBackgroundMusic(); SimpleAudioEngine::sharedEngine()->playBackgroundMusic("bg.mp3", true); clearLabels(); _manager->reset(); reset(); } else if (menu_bounds.containsPoint(tap)) { //clearLabels(); //show menu CCScene* newScene = CCTransitionFlipY::create(0.5f, MenuLayer::scene(), kOrientationDownOver); CCDirector::sharedDirector()->replaceScene(newScene); } } } }
// Clear atom labelling void Model::clearAllLabels() { for (Atom* i = atoms_.first(); i != NULL; i = i->next) clearLabels(i); logChange(Log::Labels); }
void DataCurve::loadLabels() { if (!validCurveType()) return; clearLabels(); int xcol = d_table->colIndex(d_x_column); int ycol = d_table->colIndex(title().text()); int labelsCol = d_table->colIndex(d_labels_column); int cols = d_table->numCols(); if (xcol < 0 || ycol < 0 || labelsCol < 0 || xcol >= cols || ycol >= cols || labelsCol >= cols) return; QwtPlot *d_plot = plot(); if (!d_plot) return; int index = 0; for (int i = d_start_row; i <= d_end_row; i++) { if (d_table->text(i, xcol).isEmpty() || d_table->text(i, ycol).isEmpty()) continue; PlotMarker *m = new PlotMarker(index, d_labels_angle); QwtText t = QwtText(d_table->text(i, labelsCol)); t.setColor(d_labels_color); t.setFont(d_labels_font); if (d_white_out_labels) t.setBackgroundBrush(QBrush(Qt::white)); else t.setBackgroundBrush(QBrush(Qt::transparent)); m->setLabel(t); int x_axis = xAxis(); int y_axis = yAxis(); m->setAxis(x_axis, y_axis); QSize size = t.textSize(); int dx = int(d_labels_x_offset*0.01*size.height()); int dy = -int((d_labels_y_offset*0.01 + 0.5)*size.height()); int x2 = d_plot->transform(x_axis, x(index)) + dx; int y2 = d_plot->transform(y_axis, y(index)) + dy; switch(d_labels_align) { case Qt::AlignLeft: break; case Qt::AlignHCenter: x2 -= size.width()/2; break; case Qt::AlignRight: x2 -= size.width(); break; } m->setXValue(d_plot->invTransform(x_axis, x2)); m->setYValue(d_plot->invTransform(y_axis, y2)); m->attach(d_plot); d_labels_list << m; index++; } d_show_labels = true; }
/** * TrackTool constructor * * * @param parent */ TrackTool::TrackTool(QStatusBar *parent) : Tool(parent) { p_sbar = parent; p_sampLabel = new QLabel(p_sbar); p_sampLabel->setText("W 999999"); p_sampLabel->setMinimumSize(p_sampLabel->sizeHint()); p_sampLabel->setToolTip("Sample Position"); p_sbar->addPermanentWidget(p_sampLabel); p_lineLabel = new QLabel(p_sbar); p_lineLabel->setText("W 999999"); p_lineLabel->setMinimumSize(p_lineLabel->sizeHint()); p_lineLabel->setToolTip("Line Position"); p_sbar->addPermanentWidget(p_lineLabel); p_latLabel = new QLabel(p_sbar); p_latLabel->setText("9.999999E-99"); p_latLabel->setMinimumSize(p_latLabel->sizeHint()); p_latLabel->hide(); p_latLabel->setToolTip("Latitude Position"); p_sbar->addPermanentWidget(p_latLabel); p_lonLabel = new QLabel(p_sbar); p_lonLabel->setText("9.999999E-99"); p_lonLabel->setMinimumSize(p_lonLabel->sizeHint()); p_lonLabel->hide(); p_lonLabel->setToolTip("Longitude Position"); p_sbar->addPermanentWidget(p_lonLabel); p_grayLabel = new QLabel(p_sbar); p_grayLabel->setText("9.999999E-99"); p_grayLabel->setMinimumSize(p_grayLabel->sizeHint()); p_grayLabel->setToolTip("Gray Pixel Value"); p_sbar->addPermanentWidget(p_grayLabel); p_redLabel = new QLabel(p_sbar); p_redLabel->setText("W 9.999999E-99"); p_redLabel->setMinimumSize(p_redLabel->sizeHint()); p_redLabel->hide(); p_redLabel->setToolTip("Red Pixel Value"); p_sbar->addPermanentWidget(p_redLabel); p_grnLabel = new QLabel(p_sbar); p_grnLabel->setText("W 9.999999E-99"); p_grnLabel->setMinimumSize(p_grnLabel->sizeHint()); p_grnLabel->hide(); p_grnLabel->setToolTip("Green Pixel Value"); p_sbar->addPermanentWidget(p_grnLabel); p_bluLabel = new QLabel(p_sbar); p_bluLabel->setText("W 9.999999E-99"); p_bluLabel->setMinimumSize(p_bluLabel->sizeHint()); p_bluLabel->hide(); p_bluLabel->setToolTip("Blue Pixel Value"); p_sbar->addPermanentWidget(p_bluLabel); mWarningWidget = new WarningWidget(p_sbar); connect(p_sbar, SIGNAL(messageChanged(const QString &)), mWarningWidget, SLOT(checkMessage())); clearLabels(); activate(true); }
// Clear all labels in selection void Model::selectionClearLabels() { for (Atom* i = atoms_.first(); i != NULL; i = i->next) if (i->isSelected()) clearLabels(i); logChange(Log::Labels); }
/** * Updates the tracking labels. * * * @param p */ void TrackTool::updateLabels(QPoint p) { MdiCubeViewport *cvp = cubeViewport(); clearLabels(); if(cvp == NULL) { return; } double sample, line; cvp->viewportToCube(p.x(), p.y(), sample, line); if((sample < 0.5) || (line < 0.5) || (sample > cvp->cubeSamples() + 0.5) || (line > cvp->cubeLines() + 0.5)) { return; } int isamp = (int)(sample + 0.5); QString text; text.setNum(isamp); text = "S " + text; p_sampLabel->setText(text); int iline = (int)(line + 0.5); text.setNum(iline); text = "L " + text; p_lineLabel->setText(text); // Do we have a projection? if(cvp->projection() != NULL) { // Set up for projection types Projection::ProjectionType projType = cvp->projection()->projectionType(); p_latLabel->show(); p_lonLabel->show(); if(cvp->projection()->SetWorld(sample, line)) { if (projType == Projection::Triaxial) { TProjection *tproj = (TProjection *) cvp->projection(); double lat = tproj->Latitude(); double lon = tproj->Longitude(); p_latLabel->setText(QString("Lat %1").arg(lat)); p_lonLabel->setText(QString("Lon %1").arg(lon)); } else { // RingPlane TODO write out radius azimuth instead of lat/lon RingPlaneProjection *rproj = (RingPlaneProjection *) cvp->projection(); double rad = rproj->RingRadius(); double lon = rproj->RingLongitude(); //??? p_latLabel->setToolTip("Radius Position"); p_latLabel->setText(QString("Rad %1").arg(rad)); p_lonLabel->setText(QString("Lon %1").arg(lon)); } } else { p_latLabel->setText("Lat N/A"); p_lonLabel->setText("Lon N/A"); } } // Do we have a camera model? else if(cvp->camera() != NULL) { p_latLabel->show(); p_lonLabel->show(); if(cvp->camera()->SetImage(sample, line)) { if (cvp->camera()->target()->shape()->name() != "Plane") { double lat = cvp->camera()->UniversalLatitude(); double lon = cvp->camera()->UniversalLongitude(); p_latLabel->setText(QString("Lat %1").arg(lat)); p_lonLabel->setText(QString("Lon %1").arg(lon)); } else { double rad = cvp->camera()->LocalRadius().meters(); double lon = cvp->camera()->UniversalLongitude(); //??? p_latLabel->setToolTip("Radius Position"); p_latLabel->setText(QString("Rad %1").arg(rad)); p_lonLabel->setText(QString("Lon %1").arg(lon)); } } else { p_latLabel->setText("Lat N/A"); p_lonLabel->setText("Lon N/A"); } } else { p_latLabel->hide(); p_lonLabel->hide(); } if(cvp->isGray()) { p_grayLabel->show(); p_redLabel->hide(); p_grnLabel->hide(); p_bluLabel->hide(); ViewportBuffer *grayBuf = cvp->grayBuffer(); if(grayBuf->working()) { p_grayLabel->setText("BUSY"); } else { const QRect rect(grayBuf->bufferXYRect()); if(p.x() >= rect.left() && p.x() <= rect.right() && p.y() >= rect.top() && p.y() <= rect.bottom()) { const int bufX = p.x() - rect.left(); const int bufY = p.y() - rect.top(); QString pixelString = IString(PixelToString( grayBuf->getLine(bufY)[bufX])).ToQt(); p_grayLabel->setText(pixelString); } } } else { p_grayLabel->hide(); p_redLabel->show(); p_grnLabel->show(); p_bluLabel->show(); ViewportBuffer *redBuf = cvp->redBuffer(); if(redBuf->working()) { p_grayLabel->setText("BUSY"); } else { const QRect rRect = redBuf->bufferXYRect(); if(p.x() >= rRect.left() && p.x() < rRect.right() && p.y() >= rRect.top() && p.y() < rRect.bottom()) { const int rBufX = p.x() - rRect.left(); const int rBufY = p.y() - rRect.top(); QString rLab = "R "; rLab += IString(PixelToString( redBuf->getLine(rBufY)[rBufX])).ToQt(); p_redLabel->setText(rLab); } } ViewportBuffer *greenBuf = cvp->greenBuffer(); if(greenBuf->working()) { p_grayLabel->setText("BUSY"); } else { const QRect gRect = greenBuf->bufferXYRect(); if(p.x() >= gRect.left() && p.x() < gRect.right() && p.y() >= gRect.top() && p.y() < gRect.bottom()) { const int gBufX = p.x() - gRect.left(); const int gBufY = p.y() - gRect.top(); QString gLab = "G "; gLab += IString(PixelToString( greenBuf->getLine(gBufY)[gBufX])).ToQt(); p_grnLabel->setText(gLab); } } ViewportBuffer *blueBuf = cvp->blueBuffer(); if(blueBuf->working()) { p_grayLabel->setText("BUSY"); } else { const QRect bRect = blueBuf->bufferXYRect(); if(p.x() >= bRect.left() && p.x() < bRect.right() && p.y() >= bRect.top() && p.y() < bRect.bottom()) { const int bBufX = p.x() - bRect.left(); const int bBufY = p.y() - bRect.top(); QString bLab = "B "; bLab += IString(PixelToString( blueBuf->getLine(bBufY)[bBufX])).ToQt(); p_bluLabel->setText(bLab); } } } }