本文整理汇总了C++中displayMessage函数的典型用法代码示例。如果您正苦于以下问题:C++ displayMessage函数的具体用法?C++ displayMessage怎么用?C++ displayMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了displayMessage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: removeComponent
/* Purpose: To remove a component according to user input
* Pre: Current layer exists,
* stringstream with x position and y position
* Post: Removes component at given position
* Author: Matthew James Harrison
******************************************************************************/
void removeComponent(Layer &layer, StartingList &startingList, stringstream &ss)
{
string data = "";
int xPos = -1;
int yPos = -1;
/* Get command data */
xPos = readNumber(ss);
yPos = readNumber(ss);
/* If no junk data */
if (!hasJunk(ss))
{
/* If type and position are valid */
if (isPosition(layer, xPos, yPos))
{
removeComponent(layer, startingList, xPos, yPos);
}
else
{
displayMessage(MSG_INV_REMOVE);
}
}
else
{
displayMessage(MSG_INV_REMOVE);
}
}
开发者ID:person124,项目名称:CSI-240-Logic-Gates,代码行数:34,代码来源:functions.cpp
示例2: displayMessage
int CIMEAppDlg::loadProject(string& project)
{
m_ShapeRecognizer.unloadModelData();
if(FAILURE == m_ShapeRecognizer.loadModelData(project))
{
displayMessage(L"Fail to load project!");
return FAILURE;
}
string mapFile;
m_IsMappingFileFound = false;
mapFile = m_lipiRoot + PROJECTS_PATH_STRING +
project + PROFILE_PATH_STRING + MAPPING_PATH_STRING;
if(FAILURE == loadMapping(mapFile))
{
displayMessage(L"Mapping file not found!");
}
string strTitle("Lipi Demo : ");
strTitle += project.c_str();
TCHAR title[MAX_PATH]={0};
mbstowcs(title,strTitle.c_str(),MAX_PATH);
this->SetWindowTextW(title);
displayMessage(L" ");
return SUCCESS;
}
开发者ID:amitdo,项目名称:Lipitk,代码行数:31,代码来源:IMEAppDlg.cpp
示例3: displayMessage
/*
* Translate the MIDI message buffer to a Serial Device Command
*
*/
QString Bridge::translateMIDItoSerialCommand(QByteArray &buf)
{
// uint8_t msg = buf[0];
// uint8_t tag = msg & TAG_MASK;
// uint8_t channel = msg & CHANNEL_MASK;
// const char *desc= 0;
int controlnumber = buf[1];
int controlvalue = buf[2];
emit displayMessage(applyTimeStamp(QString("Buffer 1 is: %1").arg((int) buf[1])));
emit displayMessage(applyTimeStamp(QString("Buffer 2 is: %1").arg((int) buf[2])));
QString translatedcommand;
// Work out what we have
if (controlnumber == 9 && controlvalue > 64 ) {
translatedcommand = "ZZSB;";
}
if (controlnumber == 9 && controlvalue < 64) {
translatedcommand = "ZZSA;";
}
// Format the output and return
return translatedcommand;
}
开发者ID:dalfry,项目名称:hairless-simicat,代码行数:29,代码来源:Bridge.cpp
示例4: sendMidiMessage
void Bridge::onStatusByte(uint8_t byte) {
if(byte == MSG_SYSEX_END && bufferStartsWith(MSG_SYSEX_START)) {
this->msg_data.append(byte); // bookends of a complete SysEx message
sendMidiMessage();
return;
}
if(this->data_expected > 0) {
emit displayMessage(applyTimeStamp(QString("Warning: got a status byte when we were expecting %1 more data bytes, sending possibly incomplete MIDI message 0x%2").arg(this->data_expected).arg((uint8_t)this->msg_data[0], 0, 16)));
sendMidiMessage();
}
if(is_voice_msg(byte))
this->running_status = byte;
if(is_syscommon_msg(byte))
this->running_status = 0;
this->data_expected = get_data_length(byte);
if(this->data_expected == UNKNOWN_MIDI) {
emit displayMessage(applyTimeStamp(QString("Warning: got unexpected status byte %1").arg((uint8_t)byte,0,16)));
this->data_expected = 0;
}
this->msg_data.clear();
this->msg_data.append(byte);
}
开发者ID:dalfry,项目名称:hairless-simicat,代码行数:25,代码来源:Bridge.cpp
示例5: changePlaybackSpeed
void changePlaybackSpeed(int ratioDiff)
{
float ratio = (float)pow(2.0, ratioDiff);
float speed = getPlaybackSpeed() * ratio;
if (speed < 0)
{
speed = 0;
}
openni::Status rc = setPlaybackSpeed(speed);
if (rc == openni::STATUS_OK)
{
if (speed == 0)
{
displayMessage("Playback speed set to fastest");
}
else
{
displayMessage("Playback speed set to x%.2f", speed);
}
}
else if ((rc == openni::STATUS_NOT_IMPLEMENTED) || (rc == openni::STATUS_NOT_SUPPORTED) || (rc == openni::STATUS_BAD_PARAMETER))
{
displayError("Playback speed is not supported");
}
else
{
displayError("Error setting playback speed:\n%s", openni::OpenNI::getExtendedError());
}
}
开发者ID:Arkapravo,项目名称:OpenNI2,代码行数:29,代码来源:Device.cpp
示例6: nextCameraType
void nextCameraType(void) {
int i;
int current_cam_type = getSettingi("camType");
int new_cam_type = (current_cam_type + 1) % CAM_COUNT;
setSettingi("camType", new_cam_type);
/* update the cached setting */
gSettingsCache.camType = new_cam_type;
for (i = 0; i < game->players; i++) {
if (game->player[i].ai->active == AI_HUMAN) {
initCamera(game->player[i].camera, game->player[i].data, new_cam_type);
}
}
if (getSettingi("debug_output")) {
switch (new_cam_type) {
case 0 :
displayMessage(TO_CONSOLE, "[camera] Circling Camera");
break;
case 1 :
displayMessage(TO_CONSOLE, "[camera] Behind Camera");
break;
case 2 :
displayMessage(TO_CONSOLE, "[camera] Cockpit Camera");
break;
case 3 :
displayMessage(TO_CONSOLE, "[camera] Mouse Camera");
break;
}
}
}
开发者ID:BackupTheBerlios,项目名称:gltron-svn,代码行数:33,代码来源:camera.c
示例7: displayMessage
void TetraStuffingDialog::generateTetras()
{
QTime t;
t.start();
QGLTetraMesh* tMesh_ = _viewer->tMesh;
if (tMesh_ == NULL)
{
emit displayMessage(QString("ERROR! No surface mesh loaded..."), 5000);
return;
}
const std::vector<Triangle>& tris = tMesh_->GetTriangleTopology()->GetTriangles();
const std::vector<Vec3f>& verts = tMesh_->GetTriangleTopology()->GetVertices();
if (tMesh_->GetSurface() == NULL)
{
emit displayMessage(QString("ERROR! No surface mesh loaded..."), 5000);
return;
}
SofaTetraStuffing* sts = new SofaTetraStuffing();
emit displayMessage(QString("Generating tetra mesh..."), 1000);
sts->GenerateFromSurface(tris, verts, m_ui->tetraSizeSpinBox->value(), m_ui->alphaShortSpinBox->value(), m_ui->alphaLongSpinBox->value(), m_ui->snapToPointsCheckBox->isChecked(), m_ui->splitTetrasCheckBox->isChecked());
emit displayMessage(QString("Updating visual mesh..."), 2000);
tMesh_->UpdateTetraMesh(sts->GetTetraVertices(), sts->GetTetras());
std::stringstream ss;
ss<<"Generated tetrahedral mesh in "<<t.elapsed()<<"ms. Tetras: "<<sts->GetTetras().size()<<"; Vertices: "<<sts->GetTetraVertices().size();
std::string stdMSG = ss.str();
emit notifyDone(QString::fromStdString(stdMSG), 10000);
delete sts;
}
开发者ID:AlexanderSimonov,项目名称:qtetramesher,代码行数:28,代码来源:tetrastuffingdialog.cpp
示例8: displayMessage
void MainWindow::apply(){
// Display error message if text field is empty
if(ui->txtFilePath->text().isEmpty())
{
displayMessage(WE_ERROR, WE_EMPTY_FILE);
return;
}
// Display error message if file doesn't exist
QFile f(ui->txtFilePath->text());
if(!f.exists())
{
displayMessage(WE_ERROR, WE_FILE_DOESNT_EXIST);
return;
}
// Open the game file and write the value from slider
FileWriter fw(ui->txtFilePath->text().toStdString().c_str());
int power = ui->sldPower->value();
// Display error message if update failed or success message otherwise
if(fw.setPower(power) != FW_ERROR)
{
displayMessage(WE_INFO, WE_FILE_UPDATED);
ui->btnApply->setEnabled(false);
}
else
{
displayMessage(WE_ERROR, WE_UNKNOWN_ERROR);
}
}
开发者ID:plefebvre91,项目名称:WarzoneEasy,代码行数:32,代码来源:mainwindow.cpp
示例9: KillTimer
void CIMEAppDlg::OnTimer(UINT_PTR nIDEvent)
{
if(nIDEvent == IDT_RECOGNIZE_TIMER)
{
KillTimer(IDT_RECOGNIZE_TIMER);
if(m_IsProjectLoaded)
{
displayMessage(L"Recognizing");
recognizeStrokes();
}
else
{
displayMessage(L"Please load project...");
}
InvalidateRect(LPCRECT(&m_DrawAreaRect),TRUE);
m_PrevPenPoint.x = 0;
m_PrevPenPoint.y = 0;
m_PenPointsVec.clear();
m_penstrokes.clear();
displayMessage(L"");
}
CDialog::OnTimer(nIDEvent);
}
开发者ID:amitdo,项目名称:Lipitk,代码行数:30,代码来源:IMEAppDlg.cpp
示例10: loaderSettings
void FreeEMS_Loader::openFile() {
QSettings loaderSettings(settingsFile, QSettings::IniFormat);
loadDirectory = loaderSettings.value("lastDirectory").toString();
QFileDialog fileDialog;
fileDialog.setViewMode(QFileDialog::Detail);
fileDialog.restoreGeometry(loaderSettings.value("lastOpenDialogGeo").toByteArray());
QString qSNum;
loadFileName = fileDialog.getOpenFileName(this, tr("Load s19 file"), loadDirectory, tr("s19 (*.s19)"));
loaderSettings.setValue("lastOpenDialogGeo", fileDialog.saveGeometry());
if (loadFileName.isNull()) {
displayMessage(MESSAGE_ERROR, "no file selected");
return;
} else{
loaderSettings.setValue("lastDirectory", loadFileName);
loaderComms->setLoadFilename(loadFileName);
displayMessage(MESSAGE_INFO,"Attempting to parse " + loadFileName);
loaderComms->parseFile();
if(loaderComms->numLoadableRecords() == 0){
displayMessage(MESSAGE_ERROR, "no load-able records parsed");
}else if(loaderComms->numBadSums()){
displayMessage(MESSAGE_ERROR, "there are " + qSNum.setNum(loaderComms->numBadSums(), 10) + " records with bad checksums or lengths , loading will be disabled");
} else {
displayMessage(MESSAGE_INFO,"found " + qSNum.setNum(loaderComms->numLoadableRecords(), 10) +" load-able records in file");
ui.pushLoad->setEnabled(true);
m_fileLoaded = true;
}
}
}
开发者ID:FreeEMS,项目名称:freeems-loader,代码行数:29,代码来源:freeemsLoader.cpp
示例11: sanitize
//////////////////////////////////////////////////////////////////////////////
///
/// Read the input stream
///
//////////////////////////////////////////////////////////////////////////////
void controller::readInputStream(unsigned char* ptr) {
int position;
sanitize(ptr, &position);
bool isOverflow = false;
// Validate input stream
while (!isValidCommand(ptr) || isDividedByZeroDetected(ptr)) {
// Prevent to have a string with no operation or with invalid operands
if (isLFDetected(ptr)
&& (!isOperationDetected(ptr) || !isOperand1Detected(ptr)
|| !isOperand2Detected(ptr))) {
sanitize(ptr, &position);
displayMessage((char*) "Invalid input string\n");
isOverflow = false;
}
if (isDividedByZeroDetected(ptr)) {
sanitize(ptr, &position);
displayMessage((char*) "Division by zero detected\n");
isOverflow = false;
}
ptr[position++] = (unsigned char) readInput();
// Loop in array
if (position == 20) {
sanitize(ptr, &position);
if (!isOverflow)
displayMessage((char*) "String too long, try again\n");
isOverflow = true;
}
}
}
开发者ID:Marvens,项目名称:inf3610lab4,代码行数:38,代码来源:controller.cpp
示例12: toggleCMOSAutoLoops
void toggleCMOSAutoLoops(int )
{
if (g_colorStream.getCameraSettings() == NULL)
{
displayMessage("Color stream doesn't support camera settings");
return;
}
toggleImageAutoExposure(0);
toggleImageAutoWhiteBalance(0);
displayMessage ("CMOS Auto Loops: %s", g_colorStream.getCameraSettings()->getAutoExposureEnabled()?"On":"Off");
}
开发者ID:Arkapravo,项目名称:OpenNI2,代码行数:12,代码来源:Device.cpp
示例13: seekFrame
void seekFrame(int nDiff)
{
XnStatus nRetVal = XN_STATUS_OK;
if (isPlayerOn())
{
const XnChar* strNodeName = NULL;
if (g_pPrimary != NULL)
{
strNodeName = g_pPrimary->GetName();
}
else if (g_Depth.IsValid())
{
strNodeName = g_Depth.GetName();
}
else if (g_Image.IsValid())
{
strNodeName = g_Image.GetName();
}
else if (g_IR.IsValid())
{
strNodeName = g_IR.GetName();
}
else if (g_Audio.IsValid())
{
strNodeName = g_Audio.GetName();
}
nRetVal = g_Player.SeekToFrame(strNodeName, nDiff, XN_PLAYER_SEEK_CUR);
if (nRetVal != XN_STATUS_OK)
{
displayMessage("Failed to seek: %s", xnGetStatusString(nRetVal));
return;
}
XnUInt32 nFrame = 0;
XnUInt32 nNumFrames = 0;
nRetVal = g_Player.TellFrame(strNodeName, nFrame);
if (nRetVal != XN_STATUS_OK)
{
displayMessage("Failed to tell frame: %s", xnGetStatusString(nRetVal));
return;
}
nRetVal = g_Player.GetNumFrames(strNodeName, nNumFrames);
if (nRetVal != XN_STATUS_OK)
{
displayMessage("Failed to get number of frames: %s", xnGetStatusString(nRetVal));
return;
}
displayMessage("Seeked %s to frame %u/%u", strNodeName, nFrame, nNumFrames);
}
}
开发者ID:mpweinge,项目名称:KinectHandTracker,代码行数:53,代码来源:Device.cpp
示例14: UpdateData
void CBranch_patcherDlg::OnDoPatch()
{
UpdateData( true );
if ( SaveDiff )
{
// Save the diff from the richedit
saveFile( TEMP_DIFF_FILE );
}
// Apply the patch
CString patchCmdLine, concatOutput, delPatchErrors;
patchCmdLine.Format( "%spatch.exe -c -p%u --verbose < %s > %s 2> %s", PatchExeDir, CvsDiffDirLevel, TEMP_DIFF_FILE, PATCH_RESULT, PATCH_ERRORS ); // needs patch.exe in the path
concatOutput.Format( "copy %s+%s %s", PATCH_RESULT, PATCH_ERRORS, PATCH_RESULT );
delPatchErrors.Format( "del %s", PATCH_ERRORS );
CString text;
text.Format( "Patch diff to directory %s?\n\nCommand (choose No to copy it into the clipboard):\n%s", m_DestDir, patchCmdLine );
int result;
if ( (result = ::MessageBox( m_hWnd, text, "Confirmation", MB_YESNOCANCEL | MB_ICONQUESTION )) == IDYES )
{
if ( _chdir( m_DestDir ) == 0 )
{
system( patchCmdLine );
system( concatOutput );
system( delPatchErrors );
displayFile( PATCH_RESULT );
SaveDiff = false;
m_Display->LineScroll( 0 );
if ( (m_Display->GetLineCount() == 0) ||
(m_Display->GetLineCount() == 1 && m_Display->LineLength(0)<2) )
{
CString s;
s.Format( "Nothing was patched.\r\nIf this is not the expected result:\r\n- check if the good patch.exe is in %s\r\n- check if %s exists (generated by previous diff)\r\n- check if C:\\ has enough free space and access rights to write a file.", TEMP_DIFF_FILE );
displayMessage( s );
}
else
{
m_Filename = PATCH_RESULT + ":";
UpdateData( false );
}
}
else
{
displayMessage( "Target directory not found" );
}
}
else if ( result == IDNO )
{
SendTextToClipboard( patchCmdLine );
}
}
开发者ID:CCChaos,项目名称:RyzomCore,代码行数:53,代码来源:branch_patcherDlg.cpp
示例15: disconnect
void ColorPickerWidget::slotGetAverageColor()
{
disconnect(m_grabRectFrame, SIGNAL(getColor()), this, SLOT(slotGetAverageColor()));
m_grabRect = m_grabRect.normalized();
int numPixel = m_grabRect.width() * m_grabRect.height();
int sumR = 0;
int sumG = 0;
int sumB = 0;
// only show message for larger rects because of the overhead displayMessage creates
if (numPixel > 40000)
emit displayMessage(i18n("Requesting color information..."), 0);
/*
Only getting the image once for the whole rect
results in a vast speed improvement.
*/
#ifdef Q_WS_X11
Window root = RootWindow(QX11Info::display(), QX11Info::appScreen());
m_image = XGetImage(QX11Info::display(), root, m_grabRect.x(), m_grabRect.y(), m_grabRect.width(), m_grabRect.height(), -1, ZPixmap);
#else
QWidget *desktop = QApplication::desktop();
m_image = QPixmap::grabWindow(desktop->winId(), m_grabRect.x(), m_grabRect.y(), m_grabRect.width(), m_grabRect.height()).toImage();
#endif
for (int x = 0; x < m_grabRect.width(); ++x) {
for (int y = 0; y < m_grabRect.height(); ++y) {
QColor color = grabColor(QPoint(x, y), false);
sumR += color.red();
sumG += color.green();
sumB += color.blue();
}
// Warning: slows things down, so don't do it for every pixel (the inner for loop)
if (numPixel > 40000)
emit displayMessage(i18n("Requesting color information..."), (int)(x * m_grabRect.height() / (qreal)numPixel * 100));
}
#ifdef Q_WS_X11
XDestroyImage(m_image);
m_image = NULL;
#endif
if (numPixel > 40000)
emit displayMessage(i18n("Calculated average color for rectangle."), -1);
emit colorPicked(QColor(sumR / numPixel, sumG / numPixel, sumB / numPixel));
emit disableCurrentFilter(false);
}
开发者ID:dreamsxin,项目名称:kdenlive,代码行数:51,代码来源:colorpickerwidget.cpp
示例16: abort
void FreeEMS_Loader::connect() {
if (m_loaderState == STATE_WORKING) {
abort();
} else {
if (ui.comboBaud->currentText().compare("115200") || ui.comboDataBits->currentText().compare("8")
|| ui.comboParity->currentText().compare("NONE") || ui.comboStopBits->currentText().compare("1")) {
displayMessage(MESSAGE_INFO, "Warning you are not using default COM port settings");
displayMessage(MESSAGE_INFO, "Defaults are 115200, 8, NONE, 1");
}
loaderComms->setupPort(ui.comboDevice->currentText(), ui.comboBaud->currentText().toUInt(),
ui.comboStopBits->currentText().toUInt(), ui.comboDataBits->currentText().toUInt(),
ui.comboParity->currentText());
}
}
开发者ID:FreeEMS,项目名称:freeems-loader,代码行数:14,代码来源:freeemsLoader.cpp
示例17: connect
void FreeEMS_Loader::load() {
connect();
QSettings loaderSettings(settingsFile, QSettings::IniFormat);
_numBurnsPerformed++;
loaderSettings.setValue("numBurnsPerformed", _numBurnsPerformed);
QDate date = QDate::currentDate();
QTime time = QTime::currentTime();
// QFileDialog fileDialog;
// fileDialog.setViewMode(QFileDialog::Detail);
//
// if (!fileArg) //if no file was specified from the cmdline open browser
// {
// //loadFileName = QFileDialog::getOpenFileName(this, tr("Load s19 file"), loadDirectory, tr("s19 (*.s19)"));
// loadFileName = fileDialog.getOpenFileName(this, tr("Load s19 file"), loadDirectory, tr("s19 (*.s19)"));
// }
if (!m_fileLoaded) {
displayMessage(MESSAGE_INFO, "s19 records have not been loaded or there was a problem parsing the input file");
return;
}
if (ui.chkVerify->isChecked()) {
loaderComms->verifyLastWrite = true; //todo make set function
} else {
loaderComms->verifyLastWrite = false; //todo make set function
}
QString name = loadFileName.section('/', -1);
// ripFileName = QDir::currentPath();
// ripFileName += "/saved/";
if (!QDir(m_autoRipDirectory).exists(m_autoRipDirectory))
QDir(m_autoRipDirectory).mkpath(m_autoRipDirectory);
m_autoRipDirectory += date.toString("MM-dd-yyyy-");
m_autoRipDirectory += time.toString("H-m-s-");
m_autoRipDirectory += "replaced-with-";
m_autoRipDirectory += name;
if(ui.chkRip->isChecked()){
displayMessage(MESSAGE_INFO, "Ripping as '" + m_autoRipDirectory + "'");
}
loaderComms->setLoadFilename(loadFileName);
loaderComms->setRipFilename(m_autoRipDirectory);
if (ui.chkRip->isChecked()) {
loaderComms->setAction("RIP");
loaderComms->setAction("LOAD");
loaderComms->start();
} else {
loaderComms->setAction("LOAD");
loaderComms->start();
}
}
开发者ID:FreeEMS,项目名称:freeems-loader,代码行数:49,代码来源:freeemsLoader.cpp
示例18: Bridge
void MainWindow::onValueChanged()
{
if(bridge) {
bridge->deleteLater();
QThread::yieldCurrentThread(); // Try and get any signals from the bridge sent sooner not later
QCoreApplication::processEvents();
bridge = NULL;
}
Settings::setLastMidiIn(ui->cmbMidiIn->currentText());
Settings::setLastMidiOut(ui->cmbMidiOut->currentText());
Settings::setLastSerialPort(ui->cmbSerial->currentText());
if(!ui->chk_on->isChecked()
|| ( ui->cmbSerial->currentIndex() == 0
&& ui->cmbMidiIn->currentIndex() == 0
&& ui->cmbMidiOut->currentIndex() == 0 )) {
return;
}
ui->lst_debug->clear();
int midiIn =ui->cmbMidiIn->currentIndex()-1;
int midiOut = ui->cmbMidiOut->currentIndex()-1;
ui->lst_debug->addItem("Starting MIDI<->Serial Bridge...");
bridge = new Bridge();
connect(bridge, SIGNAL(debugMessage(QString)), SLOT(onDebugMessage(QString)));
connect(bridge, SIGNAL(displayMessage(QString)), SLOT(onDisplayMessage(QString)));
connect(bridge, SIGNAL(midiReceived()), ui->led_midiin, SLOT(blinkOn()));
connect(bridge, SIGNAL(midiSent()), ui->led_midiout, SLOT(blinkOn()));
connect(bridge, SIGNAL(serialTraffic()), ui->led_serial, SLOT(blinkOn()));
bridge->attach(ui->cmbSerial->itemData(ui->cmbSerial->currentIndex()).toString(), Settings::getPortSettings(), midiIn, midiOut, workerThread);
}
开发者ID:dholth,项目名称:hairless-midiserial,代码行数:29,代码来源:mainwindow.cpp
示例19: disconnect
void HlpFlightPlannerApp::mapToolChanged( QgsMapTool *newTool, QgsMapTool *oldTool )
{
if ( oldTool )
{
disconnect( oldTool, SIGNAL( displayMessage( QString ) ), this, SLOT( displayMapToolMessage( QString ) ) );
disconnect( oldTool, SIGNAL( displayMessage( QString, QgsMessageBar::MessageLevel ) ), this, SLOT( displayMapToolMessage( QString, QgsMessageBar::MessageLevel ) ) );
disconnect( oldTool, SIGNAL( removeMessage() ), this, SLOT( removeMapToolMessage() ) );
}
if ( newTool )
{
connect( newTool, SIGNAL( displayMessage( QString ) ), this, SLOT( displayMapToolMessage( QString ) ) );
connect( newTool, SIGNAL( displayMessage( QString, QgsMessageBar::MessageLevel ) ), this, SLOT( displayMapToolMessage( QString, QgsMessageBar::MessageLevel ) ) );
connect( newTool, SIGNAL( removeMessage() ), this, SLOT( removeMapToolMessage() ) );
}
}
开发者ID:3nids,项目名称:hfp,代码行数:16,代码来源:hlpflightplannerapp.cpp
示例20: displayMessage
void AbstractFriendsManagementState::treatRequests()
{
try
{
const auto& requests{_context.client->getFriendshipRequests()};
if(requests.empty())
displayMessage("You have no incoming request");
else
for(const auto& request : requests)
treatIndividualRequest(request);
}
catch(std::runtime_error& e)
{
displayMessage(e.what());
}
}
开发者ID:RobinPetit,项目名称:WizardPoker,代码行数:16,代码来源:AbstractFriendsManagementState.cpp
注:本文中的displayMessage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论