int main( int argc, char** argv ) { KAboutData aboutData( "test_keylister", "KeyLister Test", "0.1" ); KCmdLineArgs::init( argc, argv, &aboutData ); KApplication app; CertListView * clv = new CertListView( 0, "CertListView top-level" ); app.setMainWidget( clv ); clv->show(); QTimer::singleShot( 5000, clv, SLOT(slotStart()) ); return app.exec(); }
int main(int argc, char *argv[]) { KAboutData aboutData("testaddresseelineedit", "Test AddresseeLineEdit", "0.1"); KCmdLineArgs::init(argc, argv, &aboutData); KApplication app; KPIM::AddresseeLineEdit *kale = new KPIM::AddresseeLineEdit(0); kale->resize(400, 20); kale->show(); return app.exec(); }
static KAboutData createAboutData() { KAboutData aboutData( "okular_djvu", "okular_djvu", ki18n( "DjVu Backend" ), "0.2.3", ki18n( "DjVu backend based on DjVuLibre." ), KAboutData::License_GPL, ki18n( "© 2006-2008 Pino Toscano" ) ); aboutData.addAuthor( ki18n( "Pino Toscano" ), KLocalizedString(), "*****@*****.**" ); return aboutData; }
int main( int argc, char** argv ) { KAboutData aboutData( "tests","Test","0.1" ); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); Q_UNUSED( args ); TestFactory t; return t.runTests(); }
int main (int argc, char *argv[]) { KAboutData aboutData( "kxmlexample", "kxmlexample", ki18n("Example of xml merging"), "1.0", ki18n("Example of KDE XML-GUI"), KAboutData::License_GPL, ki18n("Copyright (c) 2011 Dodon Victor") ); KCmdLineArgs::init( argc, argv, &aboutData ); KApplication app; MainWindow* window = new MainWindow(); window->show(); return app.exec(); }
static KAboutData createAboutData() { KAboutData aboutData( "knpanel_applet_sctasks", "knpanel_applet_sctasks", ki18n( "SC Task Manager" ), "0.1", ki18n( "SC Task Manager" ), KAboutData::License_GPL, ki18n( "Copyright (C) 2010 Ni Hui" ) ); aboutData.addAuthor( ki18n( "Ni Hui" ), KLocalizedString(), "*****@*****.**" ); return aboutData; }
int main(int argc, char *argv[]) { KAboutData aboutData("khtmlindex", I18N_NOOP("KHtmlIndex"), "", I18N_NOOP("KDE Index generator for help files.")); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions(options); KGlobal::locale()->setMainCatalogue("htmlsearch"); KApplication app; HTMLSearch search; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); search.generateIndex(args->getOption("lang")); }
int main(int argc, char *argv[]) { KAboutData aboutData("kwalletnoautoclose", 0, ki18n("kwalletnoautoclose"), "version"); KCmdLineArgs::init(argc, argv, &aboutData); KApplication app; QDBusInterface service("org.kde.kwalletd", "/modules/kwalletd"); if (!service.isValid()) { _out << "Constructed service is invalid!" << endl; return 1; } QDBusReply<bool> r = service.call(QDBus::Block, "isEnabled"); if (!r.isValid() || !r) { _out << "kwalletd is disabled or not running!" << endl; return 1; } QDBusReply<QString> kdewallet = service.call(QDBus::Block, "localWallet"); _kdewallet = kdewallet; _out << "local wallet is " << _kdewallet << endl; QDBusReply<bool> open = service.call(QDBus::Block, "isOpen", _kdewallet); if (open) { _out << "wallet is already open. Please close to run this test." << endl; return 1; } int rc; _out << "Opening and closing the wallet properly." << endl; rc = openAndClose(); if (rc != 0) { _out << "FAILED!" << endl; return rc; } _out << "Opening and exiting." << endl; QDBusReply<int> h = service.call(QDBus::Block, "open", _kdewallet, (qlonglong)0, "kwalletnoautoclose"); if (h < 0) { _out << "Opening the wallet failed!" << endl; return 1; } else { _out << "Wallet opened." << endl; } _out << "Exiting. Wallet should stay open." << endl; return 0; }
void CpuPlugin::showAbout() { TQString version = kapp->aboutData()->version(); TDEAboutData aboutData(instanceName(), I18N_NOOP("KSim CPU Plugin"), version.latin1(), I18N_NOOP("A cpu monitor plugin for KSim"), TDEAboutData::License_GPL, "(C) 2001 Robbie Ward"); aboutData.addAuthor("Robbie Ward", I18N_NOOP("Author"), "*****@*****.**"); TDEAboutApplication(&aboutData).exec(); }
int main(int argc, char *argv[]) { KAboutData aboutData( "rkward", I18N_NOOP ("RKWard"), version, description, KAboutData::License_GPL, "(c) 2002, 2004, 2005, 2006", 0, "http://rkward.sf.net", "*****@*****.**"); aboutData.addAuthor ("Thomas Friedrichsmeier", I18N_NOOP ("Project leader / main developer"), 0); aboutData.addAuthor ("Pierre Ecochard", I18N_NOOP ("C++ coder since 0.2.9"), 0); aboutData.addCredit ("Contributors in alphabetical order", 0, 0); aboutData.addCredit ("Philippe Grosjean", I18N_NOOP ("Several helpful comments and discussions"), 0); aboutData.addCredit ("Adrien d'Hardemare", I18N_NOOP ("Plugins and patches"), 0); aboutData.addCredit ("Yves Jacolin", I18N_NOOP ("New website"), 0); aboutData.addCredit ("Prasenjit Kapat", I18N_NOOP ("Several plugins"), 0); aboutData.addCredit ("Marco Martin", I18N_NOOP ("A cool icon"), 0); aboutData.addCredit ("Daniele Medri", I18N_NOOP ("RKWard logo, many suggestions, help on wording"), 0); aboutData.addCredit ("Stefan Roediger", I18N_NOOP ("Many plugins, suggestions, marketing, translations"), 0); aboutData.addCredit ("David Sibai", I18N_NOOP ("Several valuable comments, hints and patches"), 0); aboutData.addCredit ("Ilias Soumpasis", I18N_NOOP ("Translation, Suggestions, plugins"), 0); aboutData.addCredit ("Ralf Tautenhahn", I18N_NOOP ("Many comments, useful suggestions, and bug reports"), 0); aboutData.addCredit ("Roland Vollgraf", I18N_NOOP ("Some patches"), 0); aboutData.addCredit (I18N_NOOP ("Many more people on [email protected]"), I18N_NOOP ("Sorry, if we forgot to list you. Please contact us to get added"), 0); // before initializing the commandline args, remove the ".bin" from "rkward.bin". // This is so it prints "Usage rkward..." instead of "Usage rkward.bin...", etc. // it seems safest to keep a copy, since the shell still owns argv[0] char *argv_zero_copy = argv[0]; argv[0] = qstrdup (QString (argv_zero_copy).remove (".bin").local8Bit ()); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. RKWardApplication app; if (app.isRestored ()) { RESTORE(RKWardMainWindow); // well, whatever this is supposed to do -> TODO } else { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); RK_Debug_Level = 5 - QString (args->getOption ("debug-level")).toInt (); RK_Debug_Flags = QString (args->getOption ("debug-flags")).toInt (0, 2); qDebug ("Debug-flags as decimal: %d", RK_Debug_Flags); KURL *open_url = 0; if (args->count ()) { open_url = new KURL (args->makeURL (args->arg (0))); } args->clear(); new RKWardMainWindow(open_url); } // do it! int status = app.exec (); // restore old argv[0] so the shell is happy argv[0] = argv_zero_copy; return status; }
void I8KPlugin::showAbout() { TQString version = kapp->aboutData()->version(); TDEAboutData aboutData(instanceName(), I18N_NOOP("KSim I8K Plugin"), version.latin1(), I18N_NOOP("Dell I8K Hardware Monitor plugin"), TDEAboutData::License_GPL, "(C) 2003 Nadeem Hasan"); aboutData.addAuthor("Nadeem Hasan", I18N_NOOP("Author"), "*****@*****.**"); TDEAboutApplication(&aboutData).exec(); }
SE_BEGIN_CXX void KDEInitMainSlot(const char *appname) { //QCoreApplication *app; int argc = 1; static char *argv[] = { const_cast<char *>(appname), NULL }; KAboutData aboutData(// The program name used internally. "syncevolution", // The message catalog name // If null, program name is used instead. 0, // A displayable program name string. ki18n("SyncEvolution"), // The program version string. VERSION, // Short description of what the app does. ki18n("Lets Akonadi synchronize with a SyncML Peer"), // The license this code is released under KAboutData::License_GPL, // Copyright Statement ki18n("(c) 2010-12"), // Optional text shown in the About box. // Can contain any information desired. ki18n(""), // The program homepage string. "http://www.syncevolution.org/", // The bug report email address "*****@*****.**"); KCmdLineArgs::init(argc, argv, &aboutData); if (!kapp) { // Don't allow KApplication to mess with SIGINT/SIGTERM. // Restore current behavior after construction. struct sigaction oldsigint, oldsigterm; sigaction(SIGINT, NULL, &oldsigint); sigaction(SIGTERM, NULL, &oldsigterm); // Explicitly disable GUI mode in the KApplication. Otherwise // the whole binary will fail to run when there is no X11 // display. new KApplication(false); //To stop KApplication from spawning it's own DBus Service ... Will have to patch KApplication about this QDBusConnection::sessionBus().unregisterService("org.syncevolution.syncevolution-"+QString::number(getpid())); sigaction(SIGINT, &oldsigint, NULL); sigaction(SIGTERM, &oldsigterm, NULL); } }
int main(int argc, char **argv) { QDate date; QString calType, option; KAboutData aboutData("kcalendartest", "KCalendarTest", "0.1", description, KAboutData::License_GPL, "(c) 2002, Carlos Moro", 0, 0, "*****@*****.**"); aboutData.addAuthor("Carlos Moro", 0, "*****@*****.**"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions(options); // Add our own options. KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); KApplication app(false, false); QStringList lst = KCalendarSystemFactory::calendarSystems(); kdDebug() << "Supported calendar types: " << endl; for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it) kdDebug() << *it << endl; kdDebug() << endl; if(args->isSet("type")) calType = args->getOption("type"); KGlobal::locale()->setCalendar(calType); /* * If we like to see some date * */ if(args->isSet("date")) { option = args->getOption("date"); date = KGlobal::locale()->readDate(option); } else date = QDate::currentDate(); args->clear(); // Free up some memory. test(date); return 0; }
int main(int argc, char **argv) { KAboutData aboutData("kwriteconfig", I18N_NOOP("KWriteConfig"), "1.0.0", I18N_NOOP("Write KConfig entries - for use in shell scripts"), KAboutData::License_GPL, "(c) 2001 Red Hat, Inc. & Luís Pedro Coelho"); aboutData.addAuthor("Luís Pedro Coelho", 0, "*****@*****.**"); aboutData.addAuthor("Bernhard Rosenkraenzer", "Wrote kreadconfig on which this is based", "*****@*****.**"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs *args=KCmdLineArgs::parsedArgs(); QString group=QString::fromLocal8Bit(args->getOption("group")); QString key=QString::fromLocal8Bit(args->getOption("key")); QString file=QString::fromLocal8Bit(args->getOption("file")); QCString type=args->getOption("type").lower(); if (key.isNull() || !args->count()) { KCmdLineArgs::usage(); return 1; } QCString value = args->arg( 0 ); KInstance inst(&aboutData); KConfig *konfig; if (file.isEmpty()) konfig = new KConfig(QString::fromLatin1("kdeglobals"), false, false); else konfig = new KConfig(file, false, false); konfig->setGroup(group); if ( konfig->getConfigState() != KConfig::ReadWrite || konfig->entryIsImmutable( key ) ) return 2; if(type=="bool") { // For symmetry with kreadconfig we accept a wider range of values as true than Qt bool boolvalue=(value=="true" || value=="on" || value=="yes" || value=="1"); konfig->writeEntry( key, boolvalue ); } else if (type=="path") { konfig->writePathEntry( key, QString::fromLocal8Bit( value ) ); } else { konfig->writeEntry( key, QString::fromLocal8Bit( value ) ); } konfig->sync(); delete konfig; return 0; }
int main(int argc, char **argv) { static const char description[] = "Sublime UI Library: Area Example"; KAboutData aboutData("example1", 0, ki18n("Example 1"), "1.0", ki18n(description), KAboutData::License_LGPL, ki18n("(c) 2007, Alexander Dymo"), KLocalizedString(), "http://www.kdevelop.org" ); KCmdLineArgs::init(argc, argv, &aboutData); KApplication app; Example1Main *m = new Example1Main(); m->show(); return app.exec(); }
int main(int argc, char** argv) { KAboutData aboutData( "astrologic", "astromobile", ki18n("astrologic"), "0.1", ki18n("Astrologic logic module"), KAboutData::License_BSD, ki18n("Copyright (c) 2011-2012 Peter Grasch <*****@*****.**>\n" "Copyright (c) 2011-2012 Scuola Superiore Sant´Anna <*****@*****.**>")); KCmdLineArgs::init(argc, argv, &aboutData); KApplication app(false); AstroLogic al; return app.exec(); }
int main (int argc, char *argv[]) { KAboutData aboutData( "kaveau", 0, ki18n("kaveau"), "0.0.1", ki18n("A simple backup tool"), KAboutData::License_GPL, ki18n("Copyright (c) 2009 Flavio Castelli") ); KCmdLineArgs::init( argc, argv, &aboutData ); KUniqueApplication app; MainWindow* window = new MainWindow(); window->show(); return app.exec(); }
static KAboutData createAboutData() { KAboutData aboutData( "okular_fax", "okular_fax", ki18n( "Fax Backend" ), "0.1.1", ki18n( "A G3/G4 fax document backend" ), KAboutData::License_GPL, ki18n( "© 2008 Tobias Koenig" ) ); aboutData.addAuthor( ki18n( "Tobias Koenig" ), KLocalizedString(), "*****@*****.**" ); return aboutData; }
static KAboutData createAboutData() { KAboutData aboutData( "okular_odp", "okular_odp", ki18n( "ODP Backend" ), "0.1", ki18n( "ODP file renderer" ), KAboutData::License_GPL, ki18n( "© 2010 Sven Langkamp" ) ); // fill the about data return aboutData; }
int main( int argc, char** argv ) { if ( argc == 2 ) { protocol = argv[1]; argc = 1; // hide from KDE } KAboutData aboutData( "test_keygen", 0, ki18n("KeyGenerationJob Test"), "0.1" ); KCmdLineArgs::init( argc, argv, &aboutData ); KApplication app; KeyGenerator * keygen = new KeyGenerator( 0 ); keygen->setObjectName( "KeyGenerator top-level" ); keygen->show(); return app.exec(); }
static KAboutData createAboutData() { KAboutData aboutData( "okular_plucker", "okular_plucker", ki18n( "Plucker Document Backend" ), "0.1.1", ki18n( "A renderer for Plucker eBooks" ), KAboutData::License_GPL, ki18n( "© 2007-2008 Tobias Koenig" ) ); aboutData.addAuthor( ki18n( "Tobias Koenig" ), KLocalizedString(), "*****@*****.**" ); return aboutData; }
int main(int argc, char *argv[]) { KAboutData aboutData("soliddemo", 0, ki18n("Solid Demo"), "1.0", ki18n("Basic Solid (KDE's hardware abstraction layer) demo."), KAboutData::License_GPL, ki18n("Copyright (c) 2011 Jon Ander Peñalba <*****@*****.**>")); KCmdLineArgs::init(argc, argv, &aboutData); KApplication app; MainWindow *window = new MainWindow(); window->show(); return app.exec(); }
int main(int argc, char *argv[]) #endif { KAboutData aboutData( "dialogtest", 0, ki18n("dialogtest"), "1.0", ki18n("bla"), KAboutData::License_GPL, ki18n("(c) 2000 by Christian Esken")); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::parsedArgs(); App *app = new App(); int ret = app->exec(); delete app; return ret; }
int main(int argc, char *argv[]) { KAboutData aboutData("metadatademo", 0, ki18n("Basic Metadata Demo"), "1.0", ki18n("This application shows the metadata from a file an allows you to add tags to it."), KAboutData::License_BSD, ki18n("Copyright (c) 2011 Jon Ander Peñalba <*****@*****.**>")); KCmdLineArgs::init(argc, argv, &aboutData); KApplication app; MainWindow *window = new MainWindow(); window->show(); return app.exec(); }
int main(int argc, char **argv) { KAboutData aboutData("krypt", I18N_NOOP("Krypt"), kryptVersion, I18N_NOOP("Krypt"), KAboutData::License_GPL, "(c) 2007, 2008 Jakub Schmidkte", 0L, ""); aboutData.addAuthor( "Jakub Schmidtke", 0, "*****@*****.**" ); aboutData.setProductName("krypt"); KGlobal::locale()->setMainCatalogue("krypt"); KCmdLineArgs::init(argc,argv,&aboutData); KCmdLineArgs::addCmdLineOptions(options); KApplication::addCmdLineOptions(); KryptApp app; return app.exec(); }
static KAboutData createAboutData() { KAboutData aboutData( "okular_ooo", "okular_ooo", ki18n( "OpenDocument Text Backend" ), "0.2.3", ki18n( "A renderer for OpenDocument Text documents" ), KAboutData::License_GPL, ki18n( "© 2006-2008 Tobias Koenig" ) ); aboutData.addAuthor( ki18n( "Tobias Koenig" ), KLocalizedString(), "*****@*****.**" ); return aboutData; }
extern "C" int kde4_drv_detect(int *argc, char ***argv) { mpdm_t drv; KCmdLineOptions opts; Display *x11_display; int n; for (n = 0; n < *argc; n++) { if (strcmp(argv[0][n], "-txt") == 0 || strcmp(argv[0][n], "-h") == 0) return 0; } /* try connecting directly to the Xserver */ if ((x11_display = XOpenDisplay((char *) NULL)) == NULL) return 0; KAboutData aboutData("mp", 0, ki18n("Minimum Profit"), VERSION, ki18n("A programmer's text editor"), KAboutData::License_GPL, ki18n("Copyright (c) 1991-2009 Angel Ortega"), ki18n(""), "http://triptico.com", "*****@*****.**"); KCmdLineArgs::init(*argc, *argv, &aboutData); /* command line options should be inserted here (I don't like this) */ opts.add("t {tag}", ki18n("Edits the file where tag is defined")); opts.add("e {mpsl_code}", ki18n("Executes MPSL code")); opts.add("f {mpsl_script}", ki18n("Executes MPSL script file")); opts.add("d {directory}", ki18n("Sets working directory")); opts.add("x {file}", ki18n("Open file in the hexadecimal viewer")); opts.add(" +NNN", ki18n("Moves to line number NNN of last file")); opts.add("txt", ki18n("Use text mode instead of GUI")); opts.add("+[file(s)]", ki18n("Documents to open")); KCmdLineArgs::addCmdLineOptions(opts); /* this is where it crashes if no X server */ app = new KApplication(x11_display); drv = mpdm_hset_s(mpdm_root(), L"mp_drv", MPDM_H(0)); mpdm_hset_s(drv, L"id", MPDM_LS(L"kde4")); mpdm_hset_s(drv, L"startup", MPDM_X(kde4_drv_startup)); return 1; }
int main(int argc, char *argv[]) { for (int i = 0; i < argc; i++) { qDebug("argv[%d] = %s", i, argv[i]); } KAboutData aboutData( "testqtargs", 0, ki18n("testqtargs"), "1.0", ki18n("testqtargs"), KAboutData::License_GPL); KCmdLineOptions options; options.add("hello ", ki18n("Says hello")); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt"); for (int i = 0; i < qtargs->count(); i++) { qDebug("qt arg[%d] = %s", i, qtargs->arg(i).toLocal8Bit().data()); } KApplication app; KCmdLineArgs *kdeargs = KCmdLineArgs::parsedArgs("kde"); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); // An arg set by Qt if(qtargs->isSet("background")) { qDebug("arg bg = %s", qtargs->getOption("background").toLocal8Bit().data()); } // An arg set by KDE if(kdeargs->isSet("caption")) { qDebug("arg caption = %s", kdeargs->getOption("caption").toLocal8Bit().data()); } // An arg set by us. if(args->isSet("hello")) { qDebug("arg hello = %s", args->getOption("hello").toLocal8Bit().data()); } args->clear(); QWidget *w = new QWidget(); w->show(); return app.exec(); }
void Application::createAboutData() { KAboutData aboutData(QStringLiteral(KWIN_NAME), // The program name used internally i18n("KWin"), // A displayable program name string QStringLiteral(KWIN_VERSION_STRING), // The program version string i18n(description), // Short description of what the app does KAboutLicense::GPL, // The license this code is released under i18n("(c) 1999-2013, The KDE Developers")); // Copyright Statement aboutData.addAuthor(i18n("Matthias Ettrich"), QString(), QStringLiteral("*****@*****.**")); aboutData.addAuthor(i18n("Cristian Tibirna"), QString(), QStringLiteral("*****@*****.**")); aboutData.addAuthor(i18n("Daniel M. Duley"), QString(), QStringLiteral("*****@*****.**")); aboutData.addAuthor(i18n("Luboš Luňák"), QString(), QStringLiteral("*****@*****.**")); aboutData.addAuthor(i18n("Martin Gräßlin"), i18n("Maintainer"), QStringLiteral("*****@*****.**")); KAboutData::setApplicationData(aboutData); }
int main( int argc, char* argv[] ) { KAboutData aboutData( "dbtest", I18N_NOOP( "dBTest" ), "0.1", "", KAboutData::License_GPL, "(c) 2002, Arnold Krille" ); aboutData.addAuthor( "Arnold Krille", I18N_NOOP( "Creator" ), "*****@*****.**"); KCmdLineArgs::init( argc, argv, &aboutData ); KApplication app; dBTestWidget* w = new dBTestWidget( 0 ); w->show(); app.setMainWidget( w ); return app.exec(); }