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


C++ splash函数代码示例

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


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

示例1: ft_play_playlist

/* Start playback of a playlist, checking for bookmark autoload, modified
 * playlists, etc., as required. Returns false if playback wasn't started,
 * or started via bookmark autoload, true otherwise.
 *
 * Pointers to both the full pathname and the separated parts needed to
 * avoid allocating yet another path buffer on the stack (and save some 
 * code; the caller typically needs to create the full pathname anyway)...
 */
bool ft_play_playlist(char* pathname, char* dirname, char* filename)
{
    if (global_settings.party_mode && audio_status()) 
    {
        splash(HZ, ID2P(LANG_PARTY_MODE));
        return false;
    }

    if (bookmark_autoload(pathname))
    {
        return false;
    }

    splash(0, ID2P(LANG_WAIT));

    /* about to create a new current playlist...
       allow user to cancel the operation */
    if (!warn_on_pl_erase())
        return false;

    if (playlist_create(dirname, filename) != -1)
    {
        if (global_settings.playlist_shuffle)
        {
            playlist_shuffle(current_tick, -1);
        }
        
        playlist_start(0, 0);
        return true;
    }
    
    return false;
}
开发者ID:BurntBrunch,项目名称:rockbox-fft,代码行数:41,代码来源:filetree.c

示例2: remove_dir

/* helper function to remove a non-empty directory */
static int remove_dir(char* dirname, int len)
{
    int result = 0;
    DIR* dir;
    int dirlen = strlen(dirname);

    dir = opendir(dirname);
    if (!dir)
        return -1; /* open error */

    while(true)
    {
        struct dirent* entry;
        /* walk through the directory content */
        entry = readdir(dir);
        if (!entry)
            break;
        struct dirinfo info = dir_get_info(dir, entry);
        dirname[dirlen] ='\0';
        /* inform the user which dir we're deleting */
        splash(0, dirname);

        /* append name to current directory */
        snprintf(dirname+dirlen, len-dirlen, "/%s", entry->d_name);
        if (info.attribute & ATTR_DIRECTORY)
        {   /* remove a subdirectory */
            if (!strcmp((char *)entry->d_name, ".") ||
                !strcmp((char *)entry->d_name, ".."))
                continue; /* skip these */

            result = remove_dir(dirname, len); /* recursion */
            if (result)
                break; /* or better continue, delete what we can? */
        }
        else
        {   /* remove a file */
            draw_slider();
            result = remove(dirname);
        }
        if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK))
        {
            splash(HZ, ID2P(LANG_CANCEL));
            result = -1;
            break;
        }
    }
    closedir(dir);

    if (!result)
    {   /* remove the now empty directory */
        dirname[dirlen] = '\0'; /* terminate to original length */

        result = rmdir(dirname);
    }

    return result;
}
开发者ID:realtsiry,项目名称:rockbox4linux,代码行数:58,代码来源:onplay.c

示例3: splash

void levelMap::splash(int x, int y, int rec){
	if( x > 0 && x < (x_dim-1) && y > 0 && y < (y_dim-1) && rec > 0){
		if( Map[y][x].Floor != 0x128){
		     Map[y][x].Floor = 0x128;
		}

		 
			splash(x+1 , y+1 , rec-1 );
			splash(x , y+1 , rec-1 );
			splash(x-1 , y+1 , rec-1 );

			splash(x-1 , y , rec-1 );
			splash(x+1 , y , rec-1 );

			splash(x+1 , y-1 , rec-1 );
			splash(x , y-1 , rec-1 );
			splash(x-1 , y-1 , rec-1 );


	} else if ( x == 0 || x == (x_dim-1) || y == 0 || y == (y_dim-1) || rec == 0){

			if( Map[y][x].Floor != 0x128){
		     Map[y][x].Floor = 0x129;
		}
	}

}
开发者ID:TaylorEllington,项目名称:RougeLike,代码行数:27,代码来源:levelMap.cpp

示例4: settings_save_config

bool settings_save_config(int options)
{
    char filename[MAX_PATH];
    char *folder, *namebase;
    switch (options)
    {
        case SETTINGS_SAVE_THEME:
            folder = THEME_DIR;
            namebase = "theme";
            break;
#ifdef HAVE_RECORDING
        case SETTINGS_SAVE_RECPRESETS:
            folder = RECPRESETS_DIR;
            namebase = "recording";
            break;
#endif
#if CONFIG_CODEC == SWCODEC
        case SETTINGS_SAVE_EQPRESET:
            folder = EQS_DIR;
            namebase = "eq";
            break;
#endif
        case SETTINGS_SAVE_SOUND:
            folder = ROCKBOX_DIR;
            namebase = "sound";
            break;
        default:
            folder = ROCKBOX_DIR;
            namebase = "config";
            break;
    }
    create_numbered_filename(filename, folder, namebase, ".cfg", 2
                             IF_CNFN_NUM_(, NULL));

    /* allow user to modify filename */
    while (true) {
        if (!kbd_input(filename, sizeof filename)) {
            break;
        }
        else {
            return false;
        }
    }

    if (settings_write_config(filename, options))
        splash(HZ, ID2P(LANG_SETTINGS_SAVED));
    else
        splash(HZ, ID2P(LANG_FAILED));
    return true;
}
开发者ID:BurntBrunch,项目名称:rockbox-fft,代码行数:50,代码来源:settings.c

示例5: main

int main(int argc, char **argv)
{
#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
    QCoreApplication::setAttribute(Qt::AA_X11InitThreads);
#endif
    Application a(argc, argv);
    QSplashScreen splash(QPixmap(":/icons/shotcut-logo-640.png"));
    splash.showMessage(QCoreApplication::translate("main", "Loading plugins..."), Qt::AlignHCenter | Qt::AlignBottom);
    splash.show();

    a.setProperty("system-style", a.style()->objectName());
    MainWindow::changeTheme(Settings.theme());

    a.mainWindow = &MAIN;
    a.mainWindow->show();
    a.mainWindow->setFullScreen(a.isFullScreen);
    splash.finish(a.mainWindow);

    if (!a.resourceArg.isEmpty())
        a.mainWindow->open(a.resourceArg);
    else
        a.mainWindow->open(a.mainWindow->untitledFileName());

    int result = a.exec();

    if (EXIT_RESTART == result) {
        qDebug() << "restarting app";
        QProcess* restart = new QProcess;
        restart->start(a.applicationFilePath(), QStringList());
        restart->waitForReadyRead();
        restart->waitForFinished(1000);
        result = EXIT_SUCCESS;
    }
    return result;
}
开发者ID:examyes,项目名称:shotcut,代码行数:35,代码来源:main.cpp

示例6: usage

void 
usage(void)
{
  splash();
  printf("     fileop [-f X ]|[-l # -u #] [-s Y] [-e] [-b] [-w] [-d <dir>] [-t] [-v] [-h]\n");
  printf("\n");
  printf("     -f #      Force factor. X^3 files will be created and removed.\n");
  printf("     -l #      Lower limit on the value of the Force factor.\n");
  printf("     -u #      Upper limit on the value of the Force factor.\n");
  printf("     -s #      Optional. Sets filesize for the create/write. May use suffix 'K' or 'M'.\n");
  printf("     -e        Excel importable format.\n");
  printf("     -b        Output best case results.\n");
  printf("     -w        Output worst case results.\n");
  printf("     -d <dir>  Specify starting directory.\n");
  printf("     -U <dir>  Mount point to remount between tests.\n");
  printf("     -t        Verbose output option.\n");
  printf("     -v        Version information.\n");
  printf("     -h        Help text.\n");
  printf("\n");
  printf("     The structure of the file tree is:\n");
  printf("     X number of Level 1 directories, with X number of\n");
  printf("     level 2 directories, with X number of files in each\n");
  printf("     of the level 2 directories.\n");
  printf("\n");
  printf("     Example:  fileop 2\n");
  printf("\n");
  printf("             dir_1                        dir_2\n");
  printf("            /     \\                      /     \\ \n");
  printf("      sdir_1       sdir_2          sdir_1       sdir_2\n");
  printf("      /     \\     /     \\          /     \\      /     \\ \n");
  printf("   file_1 file_2 file_1 file_2   file_1 file_2 file_1 file_2\n");
  printf("\n");
  printf("   Each file will be created, and then Y bytes is written to the file.\n");
  printf("\n");
}
开发者ID:cleaton,项目名称:android_0xbench,代码行数:35,代码来源:fileop.c

示例7: write_bookmark

/* ------------------------------------------------------------------------*/
static bool write_bookmark(bool create_bookmark_file, const char *bookmark)
{
    bool ret=true;

    if (!bookmark)
    {
       ret = false; /* something didn't happen correctly, do nothing */
    }
    else
    {
        if (global_settings.usemrb)
            ret = add_bookmark(RECENT_BOOKMARK_FILE, bookmark, true);


        /* writing the bookmark */
        if (create_bookmark_file)
        {
            char* name = playlist_get_name(NULL, global_temp_buffer,
                                       sizeof(global_temp_buffer));
            if (generate_bookmark_file_name(name))
            {
                ret = ret & add_bookmark(global_bookmark_file_name, bookmark, false);
            }
            else
            {
                ret = false; /* generating bookmark file failed */
            }
        }
    }

    splash(HZ, ret ? ID2P(LANG_BOOKMARK_CREATE_SUCCESS)
           : ID2P(LANG_BOOKMARK_CREATE_FAILURE));

    return ret;
}
开发者ID:Rockbox,项目名称:rockbox,代码行数:36,代码来源:bookmark.c

示例8: main

/**************************************************************************//**
*
* main
*
* @brief      main function
*
* @param      -
*
* @return     -
*
******************************************************************************/
void main(void)
{
  uint8_t data;

  // source ACLK with internal VLO clock
  BCSCTL3 |= LFXT1S_2;

  // Set DCO register value based on the selected input clock frequency
  BCSCTL1 = BCSCTL1_VAL;
  DCOCTL = DCOCTL_VAL;

  // set GPIO as UART pins - P1.1=UCA0RXD, P1.2=UCA0TXD
  P1SEL = BIT1 + BIT2 ;
  P1SEL2 = BIT1 + BIT2;

  // setup USCI UART registers
  UCA0CTL1 |= UCSSEL_2 + UCSWRST;
  UCA0BR0 = USCI_BR0_VAL;
  UCA0BR1 = USCI_BR1_VAL;
  UCA0MCTL = USCI_BRS_VAL;
  UCA0CTL1 &= ~UCSWRST;

  // do somekind of splash screen
  splash();

  while(1)
  {
    if(rcvByte(&data) == true)
    {
      // echo back the received data
      sendByte(data);
    }
  }
}
开发者ID:Claoo,项目名称:lhend-code-collection,代码行数:45,代码来源:msp430g2553_uart_echo.c

示例9: main

int main()
{
	int seed = 0;
	int state = SPLASH;
	while(1)
	{
		switch(state)
		{
		case SPLASH:
			seed = splash();
			state = GAME;
			break;
		case GAME:
			state = game(seed);
			break;
		case WIN:
			win();
			state = SPLASH;
			break;
		case LOSE:
			lose();
			state = SPLASH;
			break;
		}
	}
}
开发者ID:chongwenguo,项目名称:gba-game-DMA-version,代码行数:26,代码来源:main.c

示例10: clear_start_directory

static int clear_start_directory(void)
{
    strcpy(global_settings.start_directory, "/");
    settings_save();
    splash(HZ, ID2P(LANG_RESET_DONE_CLEAR));
    return false;
}
开发者ID:kugel-,项目名称:rockbox,代码行数:7,代码来源:settings_menu.c

示例11: showOSD

void showOSD(int argc, char **argv, QString message){
  //Setup the application
  QApplication App(argc, argv);
    LUtils::LoadTranslation(&App,"lumina-open");

  //Display the OSD
  QPixmap pix(":/icons/OSD.png");
  QLabel splash(0, Qt::Window | Qt::WindowStaysOnTopHint | Qt::X11BypassWindowManagerHint);
     splash.setWindowTitle("");
     splash.setStyleSheet("QLabel{background: black; color: white; font-weight: bold; font-size: 13pt; margin: 1ex;}");
     splash.setAlignment(Qt::AlignCenter);


  qDebug() << "Display OSD";
  splash.setText(message);
  //Make sure it is centered on the current screen
  QPoint center = App.desktop()->screenGeometry(QCursor::pos()).center();
  splash.move(center.x()-(splash.sizeHint().width()/2), center.y()-(splash.sizeHint().height()/2));
  splash.show();
  //qDebug() << " - show message";
  //qDebug() << " - loop";
  QDateTime end = QDateTime::currentDateTime().addMSecs(800);
  while(QDateTime::currentDateTime() < end){ App.processEvents(); }
  splash.hide();
}
开发者ID:mneumann,项目名称:lumina,代码行数:25,代码来源:main.cpp

示例12: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    settings.setIniCodec("UTF-8");

    a.addLibraryPath(a.applicationDirPath() + "/lib/");

    int loc = QLocale::system().language();
    QString locale = settings.value("Preferences/lang").value<QString>();
    QTranslator translator;
    if(locale.isEmpty())
    {
        translator.load(a.applicationDirPath() + "/language/" + findLocaleN(loc, a.applicationDirPath()));
        a.installTranslator(&translator);
    }
    else
    {
        translator.load(a.applicationDirPath() + "/language/" + findLocaleS(locale, a.applicationDirPath()));
        a.installTranslator(&translator);
    }

    QPixmap pixmap(":icons/splash.png");
    QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint);
    splash.setMask(pixmap.mask());
    splash.show();


    Caesium w;
    QTimer::singleShot(400, &splash, SLOT(close()));
    QTimer::singleShot(400, &w, SLOT(show()));

    return a.exec();
}
开发者ID:dddaisuke,项目名称:Caesium,代码行数:34,代码来源:main.cpp

示例13: main

int main(int argc, char *argv[])
{
    BrowserApplication a(argc, argv);
    //MainWindow w;
    BrowserMainWindow w;
    QRect maxRect;
    {
        QDesktopWidget desktop;
        maxRect = desktop.availableGeometry();
        maxRect.adjust(50,50,-50,-50);
    }
    w.setGeometry(maxRect);

    qDebug() << QApplication::applicationDirPath() << QApplication::applicationFilePath();
    {
        QPixmap splashPixmap(QApplication::applicationDirPath() + "/comm/conf/pics/splash.png");
        QSplashScreen splash(splashPixmap);
        splash.show();

        enum {
            splashTime = 1500
        };
        QTimer timer;
        timer.start(splashTime);
        do {
            a.processEvents();
            splash.showMessage(QString("Loading Process: %1%").arg(timer.remainingTime()*100.0/splashTime),Qt::AlignBottom);
        } while(timer.remainingTime() > 1);

        splash.finish(&w);
    }
    w.show();
    a.processEvents();
    return a.exec();
}
开发者ID:everpan,项目名称:ark,代码行数:35,代码来源:main.cpp

示例14: main

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    QTextCodec* code = QTextCodec::codecForName("UTF-8");
    QTextCodec::setCodecForLocale(code);

    QTranslator translator;
    if(clsUserFunction::getLanguage()==1)
    {

        translator.load(":/WDLR_ZH.qm");
       qDebug()<< a.installTranslator(&translator);
    }

    QPixmap pixmap(":/splashScreen.png");
    QSplashScreen splash(pixmap);
    splash.show();
    splash.setFont(QFont("楷体",12, QFont::Bold));
    splash.showMessage(QObject::tr("INITIALIZING WINDOW, PLEASE WAIT"),Qt::AlignBottom |Qt::AlignRight,QColor::fromRgb(240,81,51));
    a.processEvents();

    clsUserFunction::sleepMs(2000);

    MainWindow w;
    splash.finish(&w);
    w.showMaximized();


    return a.exec();
}
开发者ID:caicaiking,项目名称:WKE6500DataLogReader,代码行数:30,代码来源:main.cpp

示例15: pix

/*
    Test that a message box pops up in front of a QSplashScreen.
*/
void tst_MacGui::splashScreenModality()
{
    QPixmap pix(300, 300);
    QSplashScreen splash(pix);
    splash.show();

    QMessageBox box;
    //box.setWindowFlags(box.windowFlags() | Qt::WindowStaysOnTopHint);
    box.setText("accessible?");
    box.show();

    QSKIP("QTBUG-35169");

    // Find the "OK" button and schedule a press.
    QAccessibleInterface *interface = wn.find(QAccessible::Name, "OK", &box);
    QVERIFY(interface);
    const int delay = 1000;
    clickLater(interface, Qt::LeftButton, delay);

    // Show dialog and enter event loop.
    connect(wn.getWidget(interface), SIGNAL(clicked()), SLOT(exitLoopSlot()));
    const int timeout = 4;
    QTestEventLoop::instance().enterLoop(timeout);
    QVERIFY(QTestEventLoop::instance().timeout() == false);
}
开发者ID:MarianMMX,项目名称:MarianMMX,代码行数:28,代码来源:tst_macgui.cpp


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