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


C++ MyApp类代码示例

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


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

示例1: TEST_F

TEST_F(TestSceneManager, changeScene) {
    MyApp manager;
    manager.add<Title>("Title");
    manager.add<Game>("Game");
    manager.changeScene("Game");
    EXPECT_EQ(manager.getState(), "Game");
}
开发者ID:odanado,项目名称:oti_oti_fight,代码行数:7,代码来源:TestSceneManager.cpp

示例2: main

int main(int argc, char **argv)
{
    KLocale::setMainCatalogue("korganizer");
    KAboutData aboutData("korgac", I18N_NOOP("KOrganizer Reminder Daemon"),
                         korgacVersion, I18N_NOOP("KOrganizer Reminder Daemon"),
                         KAboutData::License_GPL,
                         "(c) 2003 Cornelius Schumacher",
                         0, "http://pim.kde.org");
    aboutData.addAuthor("Cornelius Schumacher", I18N_NOOP("Maintainer"),
                        "[email protected]");
    aboutData.addAuthor("Reinhold Kainhofer", I18N_NOOP("Maintainer"),
                        "[email protected]");

    KCmdLineArgs::init(argc, argv, &aboutData);
    KCmdLineArgs::addCmdLineOptions(options);
    KUniqueApplication::addCmdLineOptions();

    if(!MyApp::start()) exit(0);

    MyApp app;
    app.disableSessionManagement();
    KGlobal::locale()->insertCatalogue("libkcal");

    return app.exec();
}
开发者ID:serghei,项目名称:kde3-kdepim,代码行数:25,代码来源:korgacmain.cpp

示例3: main

int main(){
                             
  MyApp app;
  app.start();

  return 0;

}
开发者ID:wolftype,项目名称:versor,代码行数:8,代码来源:xAnapole.cpp

示例4: main

int main() {
  MyApp app;
  while(running){
    app.onFrame();
    usleep(1);
  }
  return 0;
}
开发者ID:systemics,项目名称:cuttlefish,代码行数:8,代码来源:xSoundField.cpp

示例5: main

int main(int argc, char** argv)
{
    MyApp app;
    if (!app.init(&argc, argv))
        return 1;
    app.run();
    return 0;
}
开发者ID:TheMrButcher,项目名称:gamebase,代码行数:8,代码来源:main.cpp

示例6: main

int main()
{
	MyApp *app = new MyApp();
	app->Run();
	delete app;

	return 0;
}
开发者ID:Haiku-cn,项目名称:BeCJK,代码行数:8,代码来源:test.cpp

示例7: main

int main( int argc, char** argv )
{
    Feel::Environment env( _argc=argc,_argv=argv,_desc=makeOptions(),_about=makeAbout() );
    MyApp myapp;
    myapp.run();



}
开发者ID:LANTZT,项目名称:feelpp,代码行数:9,代码来源:test_bdf.cpp

示例8: main

int main(int argc, char **argv) {
	static KCmdLineOptions options[] = {
		{"show", I18N_NOOP("Show window on startup"), 0},
		{"kwalletd", I18N_NOOP("For use by kwalletd only"), 0},
		{"+name", I18N_NOOP("A wallet name"), 0},
		KCmdLineLastOption
	};

	KAboutData about("kwalletmanager", I18N_NOOP("KDE Wallet Manager"), "1.1",
		I18N_NOOP("KDE Wallet Management Tool"),
		KAboutData::License_GPL,
		I18N_NOOP("(c) 2003,2004 George Staikos"), 0,
		"http://www.kde.org/");

	about.addAuthor("George Staikos", I18N_NOOP("Primary author and maintainer"), "[email protected]");
	about.addAuthor("Isaac Clerencia", I18N_NOOP("Developer"), "[email protected]");

	KCmdLineArgs::init(argc, argv, &about);
	KCmdLineArgs::addCmdLineOptions(options);

	if (!KUniqueApplication::start()) {
		return 0;
	}

	MyApp a;

	KWalletManager wm;
	wm.setCaption(i18n("KDE Wallet Manager"));

	a.setMainWidget(&wm);

	KGlobal::dirs()->addResourceType("kwallet", "share/apps/kwallet");

	KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

	if (args->isSet("show")) {
		wm.show();
	}

	if (args->isSet("kwalletd")) {
		wm.kwalletdLaunch();
	}

	for (int i = 0; i < args->count(); ++i) {
		QString fn = QFileInfo(args->arg(i)).absFilePath();
		KMimeType::Ptr ptr;
		if (QFile::exists(fn) &&
			(ptr = KMimeType::findByFileContent(fn)) &&
			ptr->is("application/x-kde-wallet")) {
			wm.openWalletFile(fn);
		} else {
			wm.openWallet(args->arg(i));
		}
	}
	args->clear();
	return a.exec();
}
开发者ID:serghei,项目名称:kde3-kdeutils,代码行数:57,代码来源:main.cpp

示例9: main

int main(int argc, char** argv)
{
    MyApp app;
    app.setConfig("config.json");
    app.setDesign("selection/Design.json");
    if (!app.init(&argc, argv))
        return 1;
    app.run();
    return 0;
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例10: main

int main()
{
	MyApp* pcMyApp;

	qInstallMsgHandler( print_msg );

	pcMyApp = new MyApp( "application/x-vnd.Procton-beabrowse" );

	pcMyApp->Run();
	return( 0 ); 
}
开发者ID:BackupTheBerlios,项目名称:nirvana-svn,代码行数:11,代码来源:main.cpp

示例11: main

int main() {
   MyApp app;
   try {
      app.fail();
   }catch(MyApp::Trouble& e) {
      puts("Handled Trouble");
   }catch(MyApp::Small& e) {
      puts("Handled Small");
   }catch(MyApp::Big& e) {
      puts("Handled Big");
   }
   return 0;
} 
开发者ID:hckrtst,项目名称:TICPP,代码行数:13,代码来源:main.cpp

示例12: Run

void TestClearBuffer::Run()
{
    MyApp app;
    try
    {
        app.Init(Punk::Config());
        System::Mouse::Instance()->LockInWindow(false);
        app.Run();
    }
    catch(...)
    {
        m_result = false;
    }
}
开发者ID:Mikalai,项目名称:punk_project_a,代码行数:14,代码来源:test_clear_buffer.cpp

示例13: main

int main( int argc, char ** argv )
{
    int c;

    int nNameLen = strlen( argv[0] );
    if ( nNameLen >= 5 && strcasecmp( argv[0] + nNameLen - 5, "pulse" ) == 0 ) {
	g_bBarView = true;
    }
    while( (c = getopt_long (argc, argv, "hvfgb", long_opts, (int *) 0)) != EOF )
    {
	switch( c )
	{
	    case 0:
		break;
	    case 'h':
		g_nShowHelp = true;
		break;
	    case 'v':
		g_nShowVersion = true;
		break;
	    case 'f':
		sscanf( optarg, "%f,%f,%f,%f",
			&g_cWinRect.left,&g_cWinRect.top,&g_cWinRect.right,&g_cWinRect.bottom );
		g_bWindowRectSet = true;
		break;
	    case 'g':
		g_bBarView = false;
		break;
	    case 'b':
		g_bBarView = true;
		break;
	    default:
		usage( argv[0], false );
		exit( 1 );
		break;
	}
    }
    if ( g_nShowVersion ) {
	printf( "Syllable CPU Monitor 1.0\n" );
	exit( 0 );
    }
    if ( g_nShowHelp ) {
	usage( argv[0], true );
	exit( 0 );
    }
    
    MyApp* pcApp = new MyApp;
    pcApp->Run();
}
开发者ID:PyroOS,项目名称:Pyro,代码行数:49,代码来源:main.cpp

示例14: WinMain

int  WINAPI  WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
	LPSTR lpCmdLine, int nCmdShow) {
	
	//glutInit(&__argc, __argv);
	//glutCreateWindow(__argv[0]);
	//glutDisplayFunc(display);
	//glutMainLoop();
	//return 0;
	
	MyApp app;
	app.Init(hInstance, nCmdShow);

	app.Execute();
	
	return 0;
}
开发者ID:jeronimo34,项目名称:easygame,代码行数:16,代码来源:main.cpp

示例15: main

int main (int argc, char **argv)
{
  KAboutData aboutData( "kfax", I18N_NOOP("KFax"),
      KFAXVERSION, description, KAboutData::License_GPL,
      "(c) 1997-98 Bernd Johannes Wuebben");
  aboutData.addAuthor( "Bernd Johannes Wuebben", 0, "[email protected]" );
  aboutData.addCredit( "Nadeem Hasan", I18N_NOOP( "UI Rewrite, lots of code "
      "cleanups and fixes" ), "[email protected]" );
  aboutData.addCredit( "Helge Deller", I18N_NOOP( "Printing Rewrite, lots of code "
      "cleanups and fixes"), "[email protected]" );

  KCmdLineArgs::init(argc, argv, &aboutData);
  KCmdLineArgs::addCmdLineOptions( options );

  MyApp a;

  qtdisplay = qt_xdisplay();

  viewfaxmain();

  toplevel = new TopLevel();
  toplevel->show();

  startingup = 1;
  a.processEvents();
  a.flushX();

  startingup = 0;

  faxinit();
  if(!have_no_fax){

    thispage = firstpage;

    toplevel->newPage();
    toplevel->resizeView();
    //TODO : I don't think I need this putImage();
    toplevel->putImage();
  }

  toplevel->uiUpdate();

  return a.exec ();
}
开发者ID:serghei,项目名称:kde3-kdegraphics,代码行数:44,代码来源:kfax.cpp


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