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


C++ MyApplication类代码示例

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


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

示例1: main

int main()
{
	MyApplication app;
	app.Run();

	return 0;
}
开发者ID:Milswanca,项目名称:Iconic2D,代码行数:7,代码来源:main.cpp

示例2: SkinGui

BaseGui * SMPlayer::createGUI(QString gui_name) {
	BaseGui * gui = 0;

#ifdef SKINS
	if (gui_name.toLower() == "skingui")
		gui = new SkinGui(0);
	else
#endif
	if (gui_name.toLower() == "minigui") 
		gui = new MiniGui(0);
	else
#ifdef MPCGUI
	if (gui_name.toLower() == "mpcgui")
		gui = new MpcGui(0);
	else
#endif
		gui = new DefaultGui(0);

	gui->setForceCloseOnFinish(close_at_end);
	gui->setForceStartInFullscreen(start_in_fullscreen);
	connect(gui, SIGNAL(quitSolicited()), qApp, SLOT(quit()));

#ifdef GUI_CHANGE_ON_RUNTIME
	connect(gui, SIGNAL(guiChanged(QString)), this, SLOT(changeGUI(QString)));
#endif

#if SINGLE_INSTANCE
	MyApplication * app = MyApplication::instance();
	connect(app, SIGNAL(messageReceived(const QString&)),
            gui, SLOT(handleMessageFromOtherInstances(const QString&)));
	app->setActivationWindow(gui);
#endif

	return gui;
}
开发者ID:dradetsky,项目名称:smplayer-mirror,代码行数:35,代码来源:smplayer.cpp

示例3: main

int main(void){
    MyApplication app;
    app.startUp();
    while( app.keepRunning() ){
        app.renderOneFrame();
    }
    return 0;
}
开发者ID:TheCodingArt,项目名称:Ogre3D_Particle,代码行数:8,代码来源:main.cpp

示例4: main

int main()
{
	MyApplication myApp;
	
	myApp.NewDocument("foo");
	myApp.NewDocument("bar");
	myApp.ReportDocs();
}
开发者ID:alepapadop,项目名称:design_patterns,代码行数:8,代码来源:FactoryMethod.cpp

示例5: main

int main()
{
	MyApplication	*myApp;
	myApp = new MyApplication;
	myApp->Run();
	
	delete (myApp);
	return (0);
}
开发者ID:BackupTheBerlios,项目名称:beae-svn,代码行数:9,代码来源:main.cpp

示例6: main

int main(int argc, char* argv[] ) 
#endif
{
	MyApplication* App = new MyApplication;
	App->Create(__TEXT("Application"), true, 1280, 720);
	
	while(App->Loop());

	return 0;
}
开发者ID:ongamex,项目名称:old_stuff,代码行数:10,代码来源:main.cpp

示例7: main

//======================================================================================================================
// main                                                                                                                =
//======================================================================================================================
int main(int /*argc*/, char** /*argv*/)
{
	cout << "Starting..." << endl;

	//MyApplication* myApp = new MyApplication(200, 200);
	MyApplication* myApp = new MyApplication(1000, 800);
	app = myApp;
	myApp->initAdditionalPhysics();

	return app->exec();
}
开发者ID:godlikepanos,项目名称:varius,代码行数:14,代码来源:Main.cpp

示例8: main

int main(void) {
	MyApplication app;
	// Load up the application resources and stuff :)
	app.startUp();

	//  Start the rendering loop
	while (app.keepRunning()) {
		app.renderOneFrame();
	}

	return 0;
}
开发者ID:nnesic,项目名称:FabulousParticleCreator,代码行数:12,代码来源:Main.cpp

示例9: main

int main( void )
{
  cout << "sIRC 0.03" << endl;
  cout << "Syllable Internet Relay Chat Client" << endl;
  cout << "By James Coxon 2006" << endl;
  cout << "[email protected]" << endl;
  MyApplication *thisApp;
  thisApp = new MyApplication();
  thisApp->Run();
  cout << "Quitting" << endl;
  return( 0 );
}
开发者ID:peekaye,项目名称:Syllable-sIRC,代码行数:12,代码来源:sIRC32.cpp

示例10: main

int main() 
{
	MyApplication* myApp = new MyApplication();
	if(myApp->Init() == 1)
	{
		while(myApp->Update() == true)
			myApp->Draw();
		myApp->Close();
	}
	
	delete myApp;
	return 0;
}
开发者ID:Platyy,项目名称:OpenGLAIE,代码行数:13,代码来源:main.cpp

示例11: main

int main(int argc, char** argv)
{
    MyApplication app;

    try{
        app.go();
    }
    catch(Ogre::Exception& e)
    {
        
    }

    return 0;
}
开发者ID:cloudstrifegit,项目名称:ogretest,代码行数:14,代码来源:thirdcamera.cpp

示例12: main

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

  MyApplication app (argc, argv);
  
  QPushButton button ("Hello world !");
  button.show();
  
  app.exec();
  
  W_KeyboardHandlerShutDown();
  return 0;
}
开发者ID:dieface,项目名称:radium-1,代码行数:14,代码来源:W_Keyboard.c

示例13: main

int main(void)
{
	MyApplication* app = new MyApplication();
	app->startup();

	MyFrameListener* listener = new MyFrameListener( app->mWindow, app->mLeftCamera, app->mRightCamera, app->mLeftViewport, app->mRightViewport, app->_SinbadNode, app->_SinbadEnt );
	listener->setParent( app );
	app->_root->addFrameListener( listener );

	while( app->keepRunning() )
	{
		app->renderOneFrame();
	}

	delete app;
	delete listener;

	return 0;
}
开发者ID:helgi-leifsson,项目名称:Stereoscopy,代码行数:19,代码来源:main.cpp

示例14: qDebug


//.........这里部分代码省略.........
		}
		else
		if (argument == "-fullscreen") {
			start_in_fullscreen = 1;
		}
		else
		if (argument == "-no-fullscreen") {
			start_in_fullscreen = 0;
		}
		else
		if (argument == "-add-to-playlist") {
			add_to_playlist = true;
		}
		else
		if (argument == "-mini" || argument == "-minigui") {
			gui_to_use = "MiniGUI";
		}
		else
		if (argument == "-mpcgui") {
			gui_to_use = "MpcGUI";
		}
		else
		if (argument == "-defaultgui") {
			gui_to_use = "DefaultGUI";
		}
		else
		if (argument == "-ontop") {
			pref->stay_on_top = Preferences::AlwaysOnTop;
		}
		else
		if (argument == "-no-ontop") {
			pref->stay_on_top = Preferences::NeverOnTop;
		}
#ifdef SKINS
		else
		if (argument == "-skingui") {
			gui_to_use = "SkinGUI";
		}
#endif
		else {
			// File
			#if QT_VERSION >= 0x040600
			QUrl fUrl = QUrl::fromUserInput(argument);
			if (fUrl.isValid() && fUrl.scheme().toLower() == "file") {
			    argument = fUrl.toLocalFile();
			}
			#endif
			if (QFile::exists( argument )) {
				argument = QFileInfo(argument).absoluteFilePath();
			}
			files_to_play.append( argument );
		}
	}

	if (show_help) {
		printf("%s\n", CLHelp::help().toLocal8Bit().data());
		return NoError;
	}

	qDebug("SMPlayer::processArgs: files_to_play: count: %d", files_to_play.count() );
	for (int n=0; n < files_to_play.count(); n++) {
		qDebug("SMPlayer::processArgs: files_to_play[%d]: '%s'", n, files_to_play[n].toUtf8().data());
	}

#ifdef SINGLE_INSTANCE
	if (pref->use_single_instance) {
		// Single instance
		MyApplication * a = MyApplication::instance();
		if (a->isRunning()) {
			a->sendMessage("Hello");

			if (!action.isEmpty()) {
				a->sendMessage("action " + action);
			}
			else {
				if (!subtitle_file.isEmpty()) {
					a->sendMessage("load_sub " + subtitle_file);
				}

				if (!files_to_play.isEmpty()) {
					/* a->sendMessage("open_file " + files_to_play[0]); */
					QString command = "open_files";
					if (add_to_playlist) command = "add_to_playlist";
					a->sendMessage(command +" "+ files_to_play.join(" <<sep>> "));
				}
			}

			return NoError;
		}
	}
#endif

	if (!pref->default_font.isEmpty()) {
		QFont f;
		f.fromString(pref->default_font);
		qApp->setFont(f);
	}

	return SMPlayer::NoExit;
}
开发者ID:dradetsky,项目名称:smplayer-mirror,代码行数:101,代码来源:smplayer.cpp

示例15: main

int main (void) {
	MyApplication app;
	app.startup();
	return 0;
}
开发者ID:agudpp,项目名称:CordobaZombie,代码行数:5,代码来源:main.cpp


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