int main(int argc, char *argv[]) { KAboutData aboutData( "klatin", I18N_NOOP("KLatin"), "0.9", description, KAboutData::License_GPL, "(C) 2001-2004, George Wright", 0, "http://edu.kde.org/klatin", "*****@*****.**"); aboutData.addAuthor("George Wright",I18N_NOOP("Author and Maintainer"), "*****@*****.**"); aboutData.addCredit("Anne-Marie Mahfouf",I18N_NOOP("Bug fixes, documentation"), "*****@*****.**"); aboutData.addCredit("Neil Stevens",I18N_NOOP("Vocabulary shuffling code"), "*****@*****.**"); aboutData.addCredit("Danny Allen",I18N_NOOP("SVG icon"), "*****@*****.**"); aboutData.addCredit("Pino Toscano",I18N_NOOP("Bug fixes and code improvement, Italian Vocabulary Data Translation"), "*****@*****.**"); aboutData.addCredit("Mikolaj Machowski",I18N_NOOP("Polish Vocabulary Data Translation"), "*****@*****.**"); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KApplication a; KLatin *klatin = new KLatin(); if (a.isRestored()) { RESTORE(KLatin); } else { a.setMainWidget(klatin); klatin->show(); } return a.exec(); }
int main(int argc, char**argv) { kDebug() << "hello world"; KAboutData ad( "asdf", 0, ki18n("asdf"), "1.0", ki18n("asdf"), KAboutData::License_GPL, ki18n("(c) 2007") ); KCmdLineArgs::init( argc, argv, &ad ); KApplication app; QWidget window; QLabel label("hello world"); QLineEdit edit("edit me"); QVBoxLayout box(&window); box.addWidget(&label); box.addWidget(&edit); window.show(); return app.exec(); }
int main(int argc, char **argv) { KAboutData about("proptest", "KoProperty Test", version, description, KAboutData::License_GPL, "(C) 2005 Cedric Pasteur", 0, 0, "*****@*****.**"); about.addAuthor( "Cedric Pasteur", 0, "*****@*****.**" ); KCmdLineArgs::init(argc, argv, &about); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; Test *mainWin = 0; if (app.isRestored()) { RESTORE(Test); } else { // no session.. just start up normally KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); /// @todo do something with the command line args here mainWin = new Test(); app.setMainWidget( mainWin ); mainWin->show(); args->clear(); } // mainWin has WDestructiveClose flag by default, so it will delete itself. return app.exec(); }
int main(int argc, char **argv) { KAboutData aboutData( "ksnapshot", I18N_NOOP("KSnapshot"), KSNAPVERSION, description, KAboutData::License_GPL, "(c) 1997-2004, Richard J. Moore,\n(c) 2000, Matthias Ettrich,\n(c) 2002-2003 Aaron J. Seigo"); aboutData.addAuthor("Richard J. Moore",0, "*****@*****.**"); aboutData.addAuthor("Matthias Ettrich",0, "*****@*****.**"); aboutData.addAuthor("Aaron J. Seigo", 0, "*****@*****.**"); aboutData.addCredit( "Nadeem Hasan", I18N_NOOP("Region Grabbing\nReworked GUI"), "*****@*****.**" ); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); KApplication app; KImageIO::registerFormats(); // Create top level window KSnapshot *toplevel; if ( args->isSet( "current" ) ) toplevel = new KSnapshot( 0, 0, true ); else toplevel = new KSnapshot(); args->clear(); app.dcopClient()->setDefaultObject( toplevel->objId() ); toplevel->setCaption( app.makeStdCaption("") ); app.setMainWidget(toplevel); toplevel->show(); return app.exec(); }
int main(int argc, char *argv[]) { KAboutData aboutData("photolayoutseditor", 0, ki18n("Photo Layouts Editor"), QString("").toUtf8(), ki18n(""), KAboutData::License_GPL, ki18n(""), ki18n(""), QString("").toUtf8()); KCmdLineArgs::init(argc,argv,&aboutData); KApplication a; PhotoLayoutsEditor * w = PhotoLayoutsEditor::instance(0); w->setAttribute(Qt::WA_DeleteOnClose, true); int height = QApplication::desktop()->height()-500; w->resize(round(height*16.0/9.0),height); QDesktopWidget * d = a.desktop(); w->move(d->rect().center()-w->frameGeometry().center()); w->show(); int result = a.exec(); return result; }
int main( int argc, char *argv[] ) { KAboutData about("kooka", // appName "", // catalogName ki18n("Kooka"), // programName #if VCS_AVAILABLE (VERSION " (" VCS_TYPE " " VCS_REVISION ")"), #else VERSION, // version #endif ki18n(shortDesc), // shortDescription KAboutData::License_GPL_V2, // licenseType ki18n(copyright), // copyrightStatement ki18n(longDesc), // text "http://techbase.kde.org/Projects/Kooka"); about.addAuthor(ki18n("Jonathan Marten"), ki18n("Current maintainer, KDE4 port"), "*****@*****.**"); about.addAuthor(ki18n("Klaas Freitag"), ki18n("Developer"), "*****@*****.**"); about.addCredit(ki18n("Mat Colton"), ki18n("Graphics, web"), "*****@*****.**"); about.addCredit(ki18n("Ivan Shvedunov"), ki18n("Original kscan application"), "*****@*****.**"); about.addCredit(ki18n("Alex Kempshall"), ki18n("Photocopy facility"), "*****@*****.**"); about.addLicenseText(ki18n(addLicense)); KCmdLineArgs::init(argc, argv, &about); KCmdLineOptions options; options.add("d <device>", ki18n("The SANE device specification (e.g. 'umax:/dev/sg0')")); options.add("g", ki18n("Gallery mode - do not connect to scanner")); KCmdLineArgs::addCmdLineOptions(options); // Add my own options KApplication app; KGlobal::locale()->insertCatalog("libkscan"); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); QString devToUse = args->getOption("d"); if (args->isSet("g")) { devToUse = "gallery"; } kDebug() << "DevToUse is" << devToUse; // TODO: not sure what this did // if (args->count()==1) // { // args->usage(); // // exit(-1); // } // TODO: try ScanGlobal::init(), if that fails no point in carrying on // so show an error box and give up (or can we carry on and run in // gallery mode only?) Kooka *kooka = new Kooka(devToUse.toLocal8Bit()); kooka->show(); app.processEvents(); kooka->startup(); args->clear(); return (app.exec()); }
int main(int argc, char *argv[]) { KAboutData aboutData("orario", 0, ki18n("Orario"), "0.1", ki18n("Description"), KAboutData::License_GPL, ki18n("(c) 2008 Riccardo Iaconelli"), KLocalizedString(), "", "*****@*****.**"); aboutData.addAuthor(ki18n("Riccardo Iaconelli"), KLocalizedString(), "*****@*****.**"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineOptions options; KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs::parsedArgs(); KApplication app; KMainWindow *wi = new KMainWindow; QWidget *w = new QWidget; Ui::Form ui; ui.setupUi(w); wi->setCentralWidget(w); wi->show(); return app.exec(); }
/* the main program */ int main(int argc, char * argv[]) { // init random generator srand(time(NULL)); /* fill the about data; the common KDE about dialog will show it to the * user */ KAboutData aboutData( "kbruch", description, KBRUCH_VERSION, I18N_NOOP("Learn calculating with fractions"), KAboutData::License_GPL, "(c) 2002-2005, Sebastian Stein", 0, "http://edu.kde.org/kbruch/", "*****@*****.**"); aboutData.addAuthor("Sebastian Stein",0, "*****@*****.**"); KCmdLineArgs::init( argc, argv, &aboutData ); KApplication kbruch; MainQtWidget * kbruchApp = new MainQtWidget(); kbruch.setMainWidget(kbruchApp); kbruchApp->show(); /* lets execute the Qt GUI; it will handle all cmd options which are left */ return kbruch.exec(); }
int main(int argc, char **argv) { KLocale::setMainCatalogue("kdepimwizards"); KAboutData aboutData("groupwarewizard", I18N_NOOP("KDE-PIM Groupware Configuration Wizard"), "0.1"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineArgs::addCmdLineOptions(options); KApplication app; KGlobal::locale()->insertCatalogue("libkdepim"); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); QString serverType; if(args->isSet("serverType")) serverType = args->getOption("serverType"); GroupwareWizard wizard(0); app.setMainWidget(&wizard); wizard.show(); app.exec(); }
int main(int argc, char **argv) { KAboutData aboutData("liri-control-kde4", 0, ki18n("Liri Control"), //programname ABOUT_VERSION, //version ki18n(ABOUT_SUMMARY), //short Desc KAboutData::License_LGPL_V3, //license ki18n(ABOUT_COPYRIGHT), //copywrite statement ki18n("Status of liri components"), //text "http://cerebro.webhop.net/liri", //homepage ABOUT_AUTHOR_EMAIL); //bugsemail address aboutData.addAuthor(ki18n(ABOUT_AUTHOR), ki18n("Lead developer"), ABOUT_AUTHOR_EMAIL); aboutData.setProgramIconName(QLatin1String("liri-control")); KCmdLineArgs::init( argc, argv, &aboutData ); KApplication app; app.setWindowIcon(KIcon(QLatin1String("liri-control"))); app.setQuitOnLastWindowClosed(true); BusConnection* busconnection = new BusConnection(); /* self freeing object! */ MainWindow* window = new MainWindow(busconnection); window->show(); int res = app.exec(); delete busconnection; return res; }
int main( int argc, char **argv ) { KCmdLineArgs::init(argc, argv, "kurlrequestertest", 0, ki18n("kurlrequestertest"), "0", ki18n("test app")); KApplication app; app.setQuitOnLastWindowClosed(false); KUrl url = KUrlRequesterDialog::getUrl( "ftp://ftp.kde.org" ); qDebug( "Selected url: %s", url.url().toLatin1().constData()); KUrlRequester *req = new KUrlRequester(); #ifndef KDE_NO_DEPRECATED KEditListBox *el = new KEditListBox( QLatin1String("Test"), req->customEditor() ); #else KEditListWidget *el = new KEditListWidget( req->customEditor() ); el->setWindowTitle( QLatin1String("Test") ); #endif el->show(); KUrlRequester *req1 = new KUrlRequester(); req1->fileDialog(); req1->setWindowTitle("AAAAAAAAAAAA"); req1->show(); return app.exec(); }
int main(int argc, char **argv) { KAboutData about("KNetworkStatusTestClient", 0, ki18n("knetworkstatustestclient"), version, ki18n(description), KAboutData::License_GPL, ki18n("(C) 2007 Will Stephenson"), KLocalizedString(), 0, "*****@*****.**"); about.addAuthor( ki18n("Will Stephenson"), KLocalizedString(), "*****@*****.**" ); KCmdLineArgs::init(argc, argv, &about); KCmdLineOptions options; KCmdLineArgs::addCmdLineOptions(options); KApplication app; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args->count() == 0) { TestClient *widget = new TestClient; widget->show(); } else { int i = 0; for (; i < args->count(); i++) { TestClient *widget = new TestClient; widget->show(); } } args->clear(); return app.exec(); }
int main(int argc, char *argv[]) { KAboutData aboutData( "gwenview", /* appname */ 0, /* catalogName */ ki18n("Gwenview"), /* programName */ GWENVIEW_VERSION); /* version */ aboutData.setShortDescription(ki18n("An Image Viewer")); aboutData.setLicense(KAboutData::License_GPL); aboutData.setCopyrightStatement(ki18n("Copyright 2000-2010 Aurélien Gâteau")); aboutData.addAuthor( ki18n("Aurélien Gâteau"), ki18n("Main developer"), "*****@*****.**"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineOptions options; options.add("f", ki18n("Start in fullscreen mode")); options.add("s", ki18n("Start in slideshow mode")); options.add("+[file or folder]", ki18n("A starting file or folder")); KCmdLineArgs::addCmdLineOptions(options); KApplication app; Gwenview::ImageFormats::registerPlugins(); // startHelper must live for the whole live of the application StartHelper startHelper; if (app.isSessionRestored()) { kRestoreMainWindows<Gwenview::MainWindow>(); } else { startHelper.createMainWindow(); } return app.exec(); }
int main(int argc, char **argv) { // Default start-up routine KAboutData about("kmditest", I18N_NOOP("KMDITest"), version, description, KAboutData::License_GPL, "(C) 2004 Andrea Bergia", 0, 0, "*****@*****.**"); about.addAuthor( "Andrea Bergia", 0, "*****@*****.**" ); KCmdLineArgs::init(argc, argv, &about); KApplication app; // Read MDI mode KConfig *c = app.config(); QString strMode = c->readEntry( "MDIMode", "ideal" ); KMdi::MdiMode mode = KMdi::IDEAlMode; if ( strMode == "toplevel" ) { mode = KMdi::ToplevelMode; } else if ( strMode == "childframe" ) { mode = KMdi::ChildframeMode; } else if ( strMode == "tabpage" ) { mode = KMdi::TabPageMode; } // Create main window KMDITest *mainWin = new KMDITest( mode ); app.setMainWidget( mainWin ); mainWin->show(); // mainWin has WDestructiveClose flag by default, so it will delete itself. return app.exec(); }
int main(int argc, char *argv[]) { KAboutData aboutData("itemview-test", 0, ki18n("test for item view"), "0.1", ki18n("test app"), KAboutData::License_GPL, ki18n("(c) 2008 Alessandro Diaferia"), KLocalizedString(), "", "*****@*****.**"); aboutData.addAuthor(ki18n("Alessandro Diaferia"), KLocalizedString(), "*****@*****.**"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineOptions options; KCmdLineArgs::addCmdLineOptions(options); KCmdLineArgs::parsedArgs(); KApplication app; KDialog *window = new KDialog(); RaptorItemsView *itemsView = new RaptorItemsView(window); Kickoff::ApplicationModel *model = new Kickoff::ApplicationModel(); itemsView->setModel(model); RaptorItemDelegate *delegate = new RaptorItemDelegate(); itemsView->setItemDelegate(delegate); window->setMainWidget(itemsView); window->show(); return app.exec(); }
int main( int argc, char** argv ) { QString dbname = "test"; KAboutData aboutData( "tests","Test","0.1" ); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; Classes::setup(); QSqlDatabase *db = QSqlDatabase::addDatabase( "QPSQL7" ); db->setDatabaseName( dbname ); db->setUserName( "ak213" ); db->setPassword( "ak" ); db->setHostName( "localhost" ); if ( ! db->open() ) { kdDebug() << "Failed to open database: " << db->lastError().text() << endl; return 0; } //Notifier *notifier = new Notifier(); DbBackendIface *backend = new SqlDbBackend( db ); //Manager *manager = new Manager( backend, notifier ); Manager *manager = new Manager( backend ); manager->setMaxObjects( 1000 ); /* Collection col( "CustomerOrder" ); CollectionIterator it( col.begin() ); CollectionIterator end( col.end() ); if ( it != end ) {*/ ClassMainWindow *window = new ClassMainWindow(); window->show(); app.setMainWidget( window ); // } return app.exec(); }
int main( int argc, char** argv ) { if ( argc < 3 ) { kDebug(5150) <<"Need at least two arguments"; return 1; } KAboutData aboutData( "test_gnupgprocessbase", 0, ki18n("GnuPGProcessBase Test"), "0.1" ); KCmdLineArgs::init( &aboutData ); KApplication app; Kleo::GnuPGProcessBase gpg; for ( int i = 1 ; i < argc ; ++i ) gpg << argv[i]; gpg.setUseStatusFD( true ); GnuPGViewer * gv = new GnuPGViewer(); gv->setProcess( &gpg ); gv->show(); gpg.setOutputChannelMode(KProcess::SeparateChannels); gpg.start(); return app.exec(); }
int main(int argc, char ** argv) { KCmdLineOptions options; options.add("+URL1", ki18n("The first URL to play")); options.add("+URL2", ki18n("The second URL to play")); KAboutData about("crossfade", 0, ki18n("Phonon Crossfade Example"), "1.0", KLocalizedString(), KAboutData::License_LGPL); about.addAuthor(ki18n("Matthias Kretz"), KLocalizedString(), "*****@*****.**"); KCmdLineArgs::init(argc, argv, &about); KCmdLineArgs::addCmdLineOptions(options); KApplication app; KUrl url1; KUrl url2; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args->count() == 2) { url1 = args->url(0); url2 = args->url(1); if (url1.isValid() && url2.isValid()) { Crossfader xfader(url1, url2); return app.exec(); } } return 1; }
int main(int argc, char *argv[]) { KAboutData aboutData( "poof2", I18N_NOOP("Poof2"), "0.1", description, KAboutData::License_GPL, "(c) 2004, Augusto Beiro", 0, 0, "*****@*****.**"); aboutData.addAuthor("Augusto Beiro",0, "*****@*****.**"); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. KApplication a; pid_t tenedor; mainWin *poof2 = new mainWin(); a.setMainWidget(poof2); int wxx=poof2->width(); int hxx=poof2->height(); QWidget* tmp = QApplication::desktop(); poof2->setGeometry(tmp->width()/2-(wxx/2),tmp->height()/2-(hxx/2),wxx, hxx); //poof2->show(); return a.exec(); }
int main(int argc, char * argv[]) { Q_INIT_RESOURCE(multiplevideoplayer); #ifdef KDE4_FOUND KAboutData aboutData("multiplevideoplayer", 0, ki18n(""), "", ki18n(""), KAboutData::License_GPL, ki18n("")); KCmdLineArgs::init(argc, argv, &aboutData); KApplication app; #else QApplication app(argc, argv); #endif //KDE4_FOUND app.setApplicationName("VideoPlayer"); app.setQuitOnLastWindowClosed(true); MainWindow window(NULL); window.show(); return app.exec(); }
int main(int argc, char **argv) { KAboutData aboutData("kppplogview", 0, ki18n("KPPP Log Viewer"), version, ki18n(description), KAboutData::License_GPL, ki18n("(c) 1999-2002, The KPPP Developers")); aboutData.addAuthor(ki18n("Bernd Wuebben"),KLocalizedString(), "*****@*****.**"); aboutData.addAuthor(ki18n("Mario Weilguni")); aboutData.addAuthor(ki18n("Harri Porten"),KLocalizedString(), "*****@*****.**"); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineOptions option; option.add("kppp", ki18n("Run in KPPP mode")); KCmdLineArgs::addCmdLineOptions( option ); KApplication a; loadLogs(); TopWidget *w = new TopWidget; w->show(); return a.exec(); }
int main(int argc, char *argv[]) { KCmdLineArgs::init(argc, argv, "testkhtml", 0, ki18n("Testkhtml"), "1.0", ki18n("a basic web browser using the KHTML library")); KCmdLineOptions options; options.add("+file", ki18n("url to open")); KCmdLineArgs::addCmdLineOptions(options); KApplication app; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args->count() == 0) { KCmdLineArgs::usage(); ::exit( 1 ); } TestKHTML *test = new TestKHTML; if (args->url(0).url().right(4).toLower() == ".xml") { KParts::OpenUrlArguments args(test->doc()->arguments()); args.setMimeType("text/xml"); test->doc()->setArguments(args); } test->openUrl(args->url(0)); test->show(); return app.exec(); }
int main( int argc, char **argv ) { KAboutData about( "test-kjsembed", I18N_NOOP("KJS Embed Test"), "0.1", I18N_NOOP("Test"), KAboutData::License_LGPL, I18N_NOOP("(c) 2001-2003 Richard Moore") ); KCmdLineArgs::init( argc, argv, &about ); KApplication app; // Setup Interpreter KJS::Interpreter *js = KJSEmbed::JSFactory::defaultJS(); KJS::Object global = js->globalObject(); // Create Console KJSEmbed::JSConsoleWidget *console = new KJSEmbed::JSConsoleWidget( js ); console->addBindings( global ); JSFactory::publish( &app, js, global, "app" ); JSFactory::publish( console, js, global, "console" ); // Setup Window app.setMainWidget( console ); app.connect( &app, SIGNAL( lastWindowClosed() ), SLOT(quit()) ); console->resize( 600, 450 ); console->show(); return app.exec(); }
int main ( int argc, char *argv[] ) { KAboutData aboutData( "aku", 0, ki18n("aKu"), "SVN", ki18n("The RAR application for KDE4"), KAboutData::License_GPL_V3, ki18n("Copyright (c) 2008")); aboutData.addAuthor(ki18n("Alessandro Diaferia aka \"The Speedy Coder\""), ki18n("Main Developer"), "*****@*****.**"); aboutData.addAuthor(ki18n("Francesco Grieco aka \"The Japanese GUI stylist\""), ki18n("Developer"), "*****@*****.**"); // chiamata per disattivare il report dei bugs a kde4 aboutData.setCustomAuthorText(ki18n(0), ki18n(0)); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineOptions options; options.add("+[archive]", ki18n("Makes aKu open the archive specified")); options.add("extracthere", ki18n("Extracts all files in the archive path")); // FIXME: extracthere <destination> options.add("extractto", ki18n("Extracts all files in a selected path")); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; QString loIcon = KIconLoader().iconPath("aku",-KIconLoader::SizeEnormous ); QApplication::setWindowIcon(KIcon(loIcon)); //QApplication::setWindowIcon( KIcon( "utilities-file-archiver" ) ); ///TEMP ICON QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); MainWindow * mw = new MainWindow(); mw->show(); // KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); return app.exec(); }
int main(int argc, char *argv[]) { KAboutData about("kgpg", 0, ki18n("KGpg"), version, ki18n(description), KAboutData::License_GPL, ki18n("(C) 2003 Jean-Baptiste Mardelle"), KLocalizedString(), "http://utils.kde.org/projects/kgpg"); about.addAuthor(ki18n("Jean-Baptiste Mardelle"), ki18n("Author and former maintainer"), "*****@*****.**"); about.addAuthor(ki18n("Jimmy Gilles"), KLocalizedString(), "*****@*****.**"); about.addAuthor(ki18n("Rolf Eike Beer"), ki18n("Maintainer"), "*****@*****.**"); KCmdLineArgs::init(argc, argv, &about); KCmdLineOptions options; options.add("e", ki18n("Encrypt file")); options.add("k", ki18n("Open key manager")); options.add("d", ki18n("Open editor")); options.add("s", ki18n("Show encrypted file")); options.add("S", ki18n("Sign File")); options.add("V", ki18n("Verify signature")); options.add("+[File]", ki18n("File to open")); KCmdLineArgs::addCmdLineOptions(options); KUniqueApplication::addCmdLineOptions(); if (!KUniqueApplication::start()) return 0; KApplication *app = new KGpgApp(); app->setQuitOnLastWindowClosed(false); return app->exec(); }
int main(int argc, char** argv) { // Initialise the program KCmdLineArgs::init(argc, argv, "kexidbcomboboxtest", 0, KLocalizedString(), "", KLocalizedString(), true); KApplication* app = new KApplication(true, true); // Look for installed database drivers KDbDriverManager manager; KDbDriver::InfoHash drvs = manager.driversInfo(); // Set up a combo box and a quit widget in a new container QWidget* vbox = new QWidget(); Q3VBoxLayout* vbLayout = new Q3VBoxLayout(vbox); KexiDBDriverComboBox* all = new KexiDBDriverComboBox(vbox, drvs); KexiDBDriverComboBox* srvOnly = new KexiDBDriverComboBox(vbox, drvs, KexiDBDriverComboBox::ShowServerDrivers); QPushButton* quit = new QPushButton("Quit", vbox); vbLayout->addWidget(all); // Combobox listing all drivers vbLayout->addWidget(srvOnly); // Combobox only drivers for DB servers vbLayout->addWidget(quit); // Show the whole lot QObject::connect(quit, SIGNAL(clicked()), app, SLOT(quit())); vbox->show(); app->exec(); delete app; }
int main(int argc, char *argv[]) { KAboutData aboutData( "kmouth", I18N_NOOP("KMouth"), KMOUTH_VERSION, description, KAboutData::License_GPL, "(c) 2002/2003, Gunnar Schmi Dt", 0, "http://www.schmi-dt.de/kmouth/index.en.html", "*****@*****.**"); aboutData.addAuthor("Gunnar Schmi Dt",0, "*****@*****.**"); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); // Add our own options. aboutData.addCredit("Olaf Schmidt", I18N_NOOP("Tips, extended phrase books"), 0, 0); KApplication app; if (app.isRestored()) { RESTORE(KMouthApp); } else { KMouthApp *kmouth = new KMouthApp(); if (!kmouth->configured()) return 0; kmouth->show(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if (args->count()) { kmouth->openDocumentFile(args->url(0)); } args->clear(); } return app.exec(); }
int main( int argc, char **argv ) { KAboutData aboutData( "example", I18N_NOOP("autoconfig example"), "0.1" ); aboutData.addAuthor( "Cornelius Schumacher", 0, "*****@*****.**" ); KCmdLineArgs::init( argc, argv, &aboutData ); KApplication app; ExamplePrefsBase configSkeleton( "dummy1", "dummy2" ); configSkeleton.readConfig(); KConfigDialog *dialog = new KConfigDialog( 0, "settings", &configSkeleton ); GeneralBase *general = new GeneralBase( 0 ); dialog->addPage( general, i18n("General"), "General", "" ); MyOptionsBase *myOptions = new MyOptionsBase( 0 ); dialog->addPage( myOptions, i18n("MyOptions"), "MyOptions", "" ); app.setMainWidget( dialog ); dialog->show(); return app.exec(); }
int main(int argc, char** argv) { KAboutData aboutData( "fractal-viewer", 0, ki18n("Fractal Viewer"), "1.0", ki18n("Test program."), KAboutData::License_GPL, ki18n("(c) 2014 Jordan Melo"), ki18n("Enables the exploration and rendering of fractals."), "http://jmelo.net/", "*****@*****.**" ); KCmdLineArgs::init(argc, argv, &aboutData); KCmdLineOptions options; options.add("+[file]", ki18n("Document to open")); KCmdLineArgs::addCmdLineOptions(options); KApplication app; MainWindow* window = new MainWindow(); window->show(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); return app.exec(); }
int main( int argc, char **argv ) { KAboutData about("KLedTest", 0, ki18n("KLedTest"), "version"); KCmdLineArgs::init(argc, argv, &about); KApplication a; KLedTest widget; // ----- /* if (argc>1) { // look out for round or circular led command if (strncmp(argv[1],"-c",2)) { // paint circular printf("painting circular led\n"); widget.kled_round = true; } else if (strncmp(argv[1],"-r",2)) { // paint rectangle printf("painting rectangular led\n"); widget.kled_round = false; } } */ widget.show(); return a.exec(); // go }