本文整理汇总了C++中KApplication::name方法的典型用法代码示例。如果您正苦于以下问题:C++ KApplication::name方法的具体用法?C++ KApplication::name怎么用?C++ KApplication::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KApplication
的用法示例。
在下文中一共展示了KApplication::name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[])
{
KAboutData aboutData( "kimagemapeditor", I18N_NOOP("KImageMapEditor"),
VERSION, description, KAboutData::License_GPL,
"(C) 2001-2008 Jan Schaefer", 0, "http://www.nongnu.org/kimagemap/", "[email protected]");
aboutData.addAuthor("Jan Schaefer",0, "[email protected]");
aboutData.addCredit("Joerg Jaspert",I18N_NOOP("For helping me with the Makefiles, and creating the Debian package"));
aboutData.addCredit("Aaron Seigo and Michael",I18N_NOOP("For helping me fixing --enable-final mode"));
aboutData.addCredit("Antonio Crevillen",I18N_NOOP("For the Spanish translation"));
aboutData.addCredit("Fabrice Mous",I18N_NOOP("For the Dutch translation"));
aboutData.addCredit("Germain Chazot",I18N_NOOP("For the French translation"));
KCmdLineArgs::init( argc, argv, &aboutData );
KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KApplication a;
a.dcopClient()->registerAs(a.name());
if (a.isRestored())
{
RESTORE(KimeShell);
}
else
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if ( args->count() == 0 )
{
KimeShell *kimeShell = new KimeShell();
kimeShell->setStdout(args->isSet("stdout"));
kimeShell->readConfig();
kimeShell->show();
kimeShell->openLastFile();
}
else
{
int i = 0;
for (; i < args->count(); i++ )
{
KimeShell *kimeShell = new KimeShell();
kimeShell->setStdout(args->isSet("stdout"));
kimeShell->readConfig();
kimeShell->show();
kimeShell->openFile(args->url(i));
}
}
args->clear();
}
return a.exec();
}
示例2: main
int main(int argc, char **argv)
{
KLocale::setMainCatalogue("kasablanca");
KAboutData about("kasablanca", I18N_NOOP("kasablanca"), version, description,
KAboutData::License_GPL, "(C) 2004 Magnus Kulke", 0, 0,
"[email protected]");
about.addAuthor( "Magnus Kulke", 0, "[email protected]" );
about.addAuthor( "Big Biff", 0, "[email protected]" );
about.addCredit( "Stefan Bogner", 0, "[email protected]" );
about.addCredit( "Christoph Thielecke", 0, "[email protected]" );
about.addCredit( "Richard Stellingwerf", 0, "[email protected]" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
KApplication app;
// register ourselves as a dcop client
app.dcopClient()->registerAs(app.name(), false);
// see if we are starting with session management
if (app.isRestored())
{
RESTORE(Kasablanca);
}
else
{
// no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (args->count() == 0)
{
Kasablanca *widget = new Kasablanca;
widget->show();
}
else
{
int i = 0;
for (; i < args->count(); i++)
{
Kasablanca *widget = new Kasablanca;
widget->show();
// TODO: Load the ftp url passed on the command line.
// widget->load(args->url(i));
}
}
args->clear();
}
return app.exec();
}
示例3: main
int main(int argc, char **argv)
{
KAboutData about("composer", I18N_NOOP("Composer"), version, description,
KAboutData::License_GPL, "(C) 2007 sebastian", 0, 0, "[email protected]");
about.addAuthor( "sebastian", 0, "[email protected]" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
KApplication app;
// register ourselves as a dcop client
app.dcopClient()->registerAs(app.name(), false);
// see if we are starting with session management
if (app.isRestored())
{
RESTORE(Composer);
}
else
{
// no session.. just start up normally
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (args->count() == 0)
{
Composer *widget = new Composer;
widget->show();
}
else
{
int i = 0;
for (; i < args->count(); i++)
{
Composer *widget = new Composer;
widget->show();
widget->load(args->url(i));
}
}
args->clear();
}
return app.exec();
}
示例4: main
int main(int argc, char **argv)
{
KAboutData about("konjue", I18N_NOOP("Konjue"), version, description,
KAboutData::License_GPL, "(C) 2005 Pieter Pareit", 0, 0, "[email protected]");
about.addAuthor( "Pieter Pareit", 0, "[email protected]" );
about.addCredit( "Pierre Sarrazin", I18N_NOOP("Programmer of Verbiste, backend used by Konjue."),
"sarrazip AT sarrazip DOT com", "http://sarrazip.com" );
about.addCredit( "Sebastian Sariego Benitez", I18N_NOOP("Artist that created the icon for Konjue."),
"segfault AT kde DOT cl", "http://segfault.kde.cl" );
KCmdLineArgs::init(argc, argv, &about);
KCmdLineArgs::addCmdLineOptions(options);
KApplication app;
// register ourselves as a dcop client
app.dcopClient()->registerAs(app.name(), false);
// see if we are starting with session management
if (app.isRestored())
{
RESTORE(Konjue);
}
else
{
// no session.. just start up normally, create window
Konjue *widget = new Konjue;
widget->show();
// load all verbs that were give as arguments
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
for (int i = 0; i < args->count(); i++)
{
widget->displayVerb( args->arg( i ) );
}
args->clear();
}
return app.exec();
}