旅程dbhrscom.blog.chinaunix.net
杜比环绕声
全部博文(121)
2011年(3)
2010年(100)
2008年(18)
dyli2000
jlccwss
c1035660
wang2kk
fruitfly
ning_lia
dragonfl
obsd178
tntcheng
cynthia
格伯纳
浪花小雨
vcdtwo
whoami_r
小蚂蚁_
webmaste
anacan
Snow_Fox
分类: BSD
2008-04-26 17:08:50
#include "simple.h" #include <kapplication.h> #include <kaboutdata.h> #include <kcmdlineargs.h> #include <KDE/KLocale> static const char description[] = I18N_NOOP("A KDE 4 Application"); static const char version[] = "0.1"; int main(int argc, char **argv) { KAboutData about("simple", 0, ki18n("simple"), version, ki18n(description), KAboutData::License_GPL, ki18n("(C) 2007 dbhrscom"), KLocalizedString(), 0, "dbhrscom@gmail.com"); about.addAuthor( ki18n("dbhrscom"), KLocalizedString(), "dbhrscom@gmail.com" ); KCmdLineArgs::init(argc, argv, &about); KCmdLineOptions options; options.add("+[URL]", ki18n( "Document to open" )); KCmdLineArgs::addCmdLineOptions(options); KApplication app; simple *widget = new simple; // see if we are starting with session management if (app.isSessionRestored()) { RESTORE(simple); } else { // no session.. just start up normally KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args->count() == 0) { //simple *widget = new simple; widget->show(); } else { int i = 0; for (; i < args->count(); i++) { //simple *widget = new simple; widget->show(); } } args->clear(); } return app.exec(); }
上一篇:使用FreeType库显示汉字
下一篇:kde4的一些窗口部件(一)
登录 注册