本文整理汇总了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");
}
示例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();
}
示例3: main
int main(){
MyApp app;
app.start();
return 0;
}
示例4: main
int main() {
MyApp app;
while(running){
app.onFrame();
usleep(1);
}
return 0;
}
示例5: main
int main(int argc, char** argv)
{
MyApp app;
if (!app.init(&argc, argv))
return 1;
app.run();
return 0;
}
示例6: main
int main()
{
MyApp *app = new MyApp();
app->Run();
delete app;
return 0;
}
示例7: main
int main( int argc, char** argv )
{
Feel::Environment env( _argc=argc,_argv=argv,_desc=makeOptions(),_about=makeAbout() );
MyApp myapp;
myapp.run();
}
示例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();
}
示例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;
}
示例10: main
int main()
{
MyApp* pcMyApp;
qInstallMsgHandler( print_msg );
pcMyApp = new MyApp( "application/x-vnd.Procton-beabrowse" );
pcMyApp->Run();
return( 0 );
}
示例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;
}
示例12: Run
void TestClearBuffer::Run()
{
MyApp app;
try
{
app.Init(Punk::Config());
System::Mouse::Instance()->LockInWindow(false);
app.Run();
}
catch(...)
{
m_result = false;
}
}
示例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();
}
示例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;
}
示例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 ();
}