本文整理汇总了C++中MyApp::exec方法的典型用法代码示例。如果您正苦于以下问题:C++ MyApp::exec方法的具体用法?C++ MyApp::exec怎么用?C++ MyApp::exec使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyApp
的用法示例。
在下文中一共展示了MyApp::exec方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: 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 ();
}