当前位置: 首页>>代码示例>>C++>>正文


C++ writeText函数代码示例

本文整理汇总了C++中writeText函数的典型用法代码示例。如果您正苦于以下问题:C++ writeText函数的具体用法?C++ writeText怎么用?C++ writeText使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了writeText函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: writeText

// SLOT
void debugDialog::gpsIsConnected_change(bool newState){
    if(newState == true){
        writeText(0, tr("Connected!") );
    }else{
        writeText(0, tr("Disconnected!") );
    }
}
开发者ID:ryandavid,项目名称:RTKdashboard,代码行数:8,代码来源:debugdialog.cpp

示例2: drawBackground

void CommandDialog::draw ()
{
    drawBackground ();
    drawBorder ("HERMIT Commands");
    writeText (2, 2, "Select a command with the cursor and press Enter");
    writeText (2, 3, "to activate it, or press Esc to cancel.");
}
开发者ID:ancientlore,项目名称:hermit,代码行数:7,代码来源:cmddlg.cpp

示例3: writeTextCredits3

static void writeTextCredits3 ()
{
    writeText ( "Thanks to", PAL1, 2 );
    writeText ( "Bruce Rodríguez @emigrantebruce", PAL2, 2 );
    writeText ( "Eduardo Robsy @EduRobsy", PAL2, 2 );
    writeText ( "Jon Cortazar @Jon_Cortazar ", PAL2, 4 );
}
开发者ID:moon-watcher,项目名称:GrielsQuest,代码行数:7,代码来源:credits.c

示例4: main

int main( int argc, char **argv )
{
  QApplication app( argc, argv );
  
  TextDevice device;
  TextThread foo( "Foo" ), bar( "Bar" );
  
  QObject::connect( &foo, SIGNAL(writeText(QString)), &device, SLOT(write(QString)) );
  QObject::connect( &bar, SIGNAL(writeText(QString)), &device, SLOT(write(QString)) );
  
  foo.start();
  bar.start();
  device.start();
  
  QMessageBox::information( 0, "Threading", "Close me to stop!" );
    
  foo.stop();
  bar.stop();
  device.stop();
  
  foo.wait();
  bar.wait();
  device.wait();

  return 0;  
}
开发者ID:KleineKarsten,项目名称:FoundationsOfQtDev,代码行数:26,代码来源:main.cpp

示例5: writeText

void TextManager::refreshCurrentLetter(char letter){
  if(letter){
	writeText(inputLin,inputCol,inputPool+inputPos,false);//erase
	inputPool[inputPos]=letter;
	writeText(inputLin,inputCol,inputPool+inputPos,true);//write
  }
}
开发者ID:0724,项目名称:Arduino,代码行数:7,代码来源:RobotTextManager.cpp

示例6: brl_writeWindow

static int
brl_writeWindow (BrailleDisplay *brl, const wchar_t *text) {
  static unsigned char previousContent[MAX_WINDOW_SIZE];
  static int previousCursor = -1;
  char *previousLocale;

  if (!cellsHaveChanged(previousContent, brl->buffer, brl->textColumns*brl->textRows, NULL, NULL, NULL) &&
      (brl->cursor == previousCursor)) {
    return 1;
  }

  previousCursor = brl->cursor;

  if (classificationLocale) {
    previousLocale = setlocale(LC_CTYPE, NULL);
    setlocale(LC_CTYPE, classificationLocale);
  } else {
    previousLocale = NULL;
  }

#ifdef USE_CURSES
  clear();
#else /* USE_CURSES */
  addstr("\r\n");
#endif /* USE_CURSES */

  {
    int row;
    for (row=0; row<brl->textRows; row++) {
      writeText(&text[row*brl->textColumns], brl->textColumns);
      if (row < brl->textRows-1)
        addstr("\r\n");
    }
  }

#ifdef USE_CURSES
  if ((brl->cursor >= 0) && (brl->cursor < (brl->textColumns * brl->textRows)))
    move(brl->cursor/brl->textColumns, brl->cursor%brl->textColumns);
  else
    move(brl->textRows, 0);
  refresh();
#else /* USE_CURSES */
  if ((brl->textRows == 1) && (brl->cursor >= 0) && (brl->cursor < brl->textColumns)) {
    addch('\r');
    writeText(text, brl->cursor);
  } else {
    addstr("\r\n");
  }
#endif /* USE_CURSES */

  if (previousLocale) setlocale(LC_CTYPE, previousLocale);
  return 1;
}
开发者ID:BaJIeK,项目名称:brltty,代码行数:53,代码来源:braille.c

示例7: assert

void ConsoleDialog::runStatement()
{
	assert(m_console != NULL);
	if (m_console)
	{
		char buffer[1000];
		GetWindowTextA(::GetDlgItem(_hSelf, IDC_INPUT), buffer, 1000);
		historyAdd(buffer);
		writeText(m_prompt.size(), m_prompt.c_str());
		writeText(strlen(buffer), buffer);
		writeText(1, "\n");
		SetWindowTextA(::GetDlgItem(_hSelf, IDC_INPUT), "");
		m_console->runStatement(buffer);
	}
}
开发者ID:Alexsa,项目名称:PythonScript,代码行数:15,代码来源:ConsoleDialog.cpp

示例8: writeText

void MainWindow::mkdirTemp(bool f)
{
    writeText("Directorio temporal ../../temp", msg_notify);
    QString path = QDir::currentPath()+"/temp";

    if(f){
        if(!QDir(path).exists())
            QDir().mkdir(path);
        writeText("^ [OK]", msg_info);
    }else{
        if(QDir(path).exists())
            QDir().rmdir(path);
        writeText("^ [NO]", msg_info);
    }
}
开发者ID:dkmpos89,项目名称:softEMG-updater,代码行数:15,代码来源:mainwindow.cpp

示例9: writeTextCredits2

static void writeTextCredits2 ()
{
    writeText ( "Translators", PAL1, 2 );
    writeText ( "Felipe Monge Corbalán @vakapp", PAL2, 2 ); // ENGLISH
    writeText ( "DaRkHoRaCe @oongamoonga", PAL2, 2 ); // ITALIAN
    writeText ( "KanedaFr @SpritesMind", PAL2, 2 ); // FRENCH
    writeText ( "Jordi Montornés Solé @jordimontornes", PAL2, 2 ); // CATALÀ
    writeText ( "Natsumi", PAL2, 2 ); // FINNISH
    writeText ( "Paspallas @PaspallasDev ", PAL2, 2 ); // GALEGO
    writeText ( "Thiago F. Alves", PAL2, 2 ); // BR-PORTUGUESE
//    writeText ( "teaduckie", PAL2, 2 ); // ESPERANTO & INTERLINGUA
    writeText ( "Clare Eddleston", PAL2, 2 ); // ENGLISH-REVIEWER
    writeText ( "Xavier Bravo", PAL2, 2 ); // ENGLISH-REVIEWER

}
开发者ID:moon-watcher,项目名称:GrielsQuest,代码行数:15,代码来源:credits.c

示例10: processMonitorAjaxRequest

static void processMonitorAjaxRequest(SOCKET fd, int ts, char* ha){
	writeHeadersOk(fd, MIME_JSON, TRUE);

 /* The 'ts' parameter is an offset from the current (server) time rather than an actual timestamp, done like this
    because there may be differences in the clocks on the client and server, if the client was a minute
    or two ahead of the server it would never get any data back. */
    int now = getTime();
    int queryTs = now - ts;

    char* hs = NULL;
    char* ad = NULL;
    struct HostAdapter* hostAdapter = NULL;

    if (ha != NULL) {
        hostAdapter = getHostAdapter(ha);
        hs = hostAdapter->host;
        ad = hostAdapter->adapter;
    }

    struct Data* result = getMonitorValues(queryTs, hs, ad);

    if (ha != NULL) {
        freeHostAdapter(hostAdapter);
    }

 /* The database may contain values with timestamps that lie in the future, relative to the current system time. This
    can happen as a result of changes to/from GMT, or if the system clock is altered manually or accidentally. We don't
    want to return values with future timestamps, so move through the result list until we find a timestamp <= the
    current time. */
    struct Data* resultsFromNow = result;
	while((resultsFromNow != NULL) && (resultsFromNow->ts > now)){
		resultsFromNow = resultsFromNow->next;
	}

 // Change the 'ts' values in the response so that they contain the timestamp offset from the current time
    struct Data* curr = resultsFromNow;
    while(curr != NULL){
        curr->ts = (now - curr->ts);
        curr = curr->next;
    }

    char jsonBuffer[64];
    sprintf(jsonBuffer, "{\"serverTime\" : %d, \"data\" : ", now);
    writeText(fd, jsonBuffer);
    writeDataToJson(fd, resultsFromNow);
    writeText(fd, "}");
    freeData(result);
}
开发者ID:JackWangCUMT,项目名称:bitmeteros,代码行数:48,代码来源:handleMonitor.c

示例11: writeText

 /*--------------------------------------*/
 virtual void writeText(const char *fn, int digits, 
                        bool doSparse=false,
                        bool doAppend=false) const {
   AzIntArr ia; 
   ia.range(0, colNum()); 
   writeText(fn, &ia, digits, doSparse, doAppend); 
 }
开发者ID:AlexInTown,项目名称:santander_2016,代码行数:8,代码来源:AzReadOnlyMatrix.hpp

示例12: main

int
main(int argc, const char ** argv) {

    struct cmdlineInfo cmdline;
    FILE * ifP;
    IPDB * pdbP;
    int status;

    pm_proginit(&argc, argv);

    parseCommandLine(argc, argv, &cmdline);

    ifP = pm_openr(cmdline.inputFileName);

    pdbP = ipdb_alloc(NULL);
    if (pdbP == NULL)
        pm_error("Could not allocate IPDB structure.");

    status = ipdbRead(pdbP, ifP, cmdline.verbose);
    if (status != 0)
        pm_error("Image header read error: %s.", ipdb_err(status));

    writeImgPam(pdbP, stdout);

    writeText(pdbP, cmdline.notefile);

    ipdb_free(pdbP);

    pm_close(ifP);

    return EXIT_SUCCESS;
}
开发者ID:chneukirchen,项目名称:netpbm-mirror,代码行数:32,代码来源:pdbimgtopam.c

示例13: promptReturnObjectToTray

// ######################################################################
// Prompt the user to return the object back to the tray place an object
void promptReturnObjectToTray(SceneSetup const & setup, int objIdx)
{
  LINFO("Placing back object %d into its tray. Follow instructions in User Interactive window...", objIdx);
  const SceneSetup::Object &obj = setup.objects[objIdx];

  Image< PixRGB<byte> > trayImg = Raster::ReadRGB(setup.setupPath + "/" + obj.trayFileName);
  trayImg = rescale(trayImg, trayImg.getDims()/2);

  Point2D<int> objPos(obj.trayX*trayImg.getWidth(), obj.trayY*trayImg.getHeight());

  drawCircle(trayImg, objPos, trayImg.getWidth()/12, PixRGB<byte>(255, 0, 0), 2);
  drawCross(trayImg, objPos, PixRGB<byte>(255, 0, 0), trayImg.getWidth()/8, 2);

  std::ostringstream ss;
  ss << "Place back Obj(" <<
    "row " << obj.trayRow << 
    ", col " << obj.trayColumn << 
    ") into tray " << obj.trayName << 
    " and ENTER";
  writeText(trayImg, Point2D<int>(0, 0), ss.str().c_str());
  
  userInteractiveWindow->drawImage(trayImg, 0, 0, true);

  // eat all previous mouse clicks and key presses, just in case:
  while (userInteractiveWindow->getLastMouseClick() != Point2D<int>(-1, -1)) { }
  while (userInteractiveWindow->getLastKeyPress() != -1) { }

  // wait for ENTER:
  while (userInteractiveWindow->getLastKeyPress() != 36) usleep(100000);

  LINFO("Done placing back object %d into its tray.", objIdx);
}
开发者ID:ulyssesrr,项目名称:carmen_lcad,代码行数:34,代码来源:app-ScorbotMultiGrabImagize.C

示例14: Fixed

void HotCubeCube::paintCountdown (float timeLeft)
{
	String<16> time;
	time << (int)timeLeft << "." << Fixed((int)(timeLeft * 100) % 100, 2, true);

	writeText (time);
}
开发者ID:runjumpdev,项目名称:SifteoGameJam,代码行数:7,代码来源:HotCubeCube.cpp

示例15: QMainWindow

//COnstructor
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    //Server object
    ser = new Server();

    //THread for server
    m_thread = new QThread;

    //Connection to signal the server class to start working and checking for messages
    connect(this, SIGNAL(startServer()), ser, SLOT(doWork()));

    //Connection to notify the GUI to update
    connect(ser, SIGNAL(sendText(QString)), this, SLOT(writeText(QString)));

    //Start the thread
    ser->moveToThread(m_thread);
    m_thread->start();

    //Start the server working to check for messages
    emit startServer();
}
开发者ID:skralick,项目名称:ECE3574HW7,代码行数:26,代码来源:mainwindow.cpp


注:本文中的writeText函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。