本文整理汇总了C++中MyApplication类的典型用法代码示例。如果您正苦于以下问题:C++ MyApplication类的具体用法?C++ MyApplication怎么用?C++ MyApplication使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MyApplication类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main()
{
MyApplication app;
app.Run();
return 0;
}
示例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;
}
示例3: main
int main(void){
MyApplication app;
app.startUp();
while( app.keepRunning() ){
app.renderOneFrame();
}
return 0;
}
示例4: main
int main()
{
MyApplication myApp;
myApp.NewDocument("foo");
myApp.NewDocument("bar");
myApp.ReportDocs();
}
示例5: main
int main()
{
MyApplication *myApp;
myApp = new MyApplication;
myApp->Run();
delete (myApp);
return (0);
}
示例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;
}
示例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();
}
示例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;
}
示例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 );
}
示例10: main
int main()
{
MyApplication* myApp = new MyApplication();
if(myApp->Init() == 1)
{
while(myApp->Update() == true)
myApp->Draw();
myApp->Close();
}
delete myApp;
return 0;
}
示例11: main
int main(int argc, char** argv)
{
MyApplication app;
try{
app.go();
}
catch(Ogre::Exception& e)
{
}
return 0;
}
示例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;
}
示例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;
}
示例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;
}
示例15: main
int main (void) {
MyApplication app;
app.startup();
return 0;
}