sublime
example2.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <kaboutdata.h>
00020 #include <kapplication.h>
00021 #include <kcmdlineargs.h>
00022 #include <klocale.h>
00023 #include <kurl.h>
00024
00025 #include <sublime/area.h>
00026 #include <sublime/urldocument.h>
00027 #include <sublime/controller.h>
00028
00029 #include "example2main.h"
00030
00031 int main(int argc, char **argv)
00032 {
00033 static const char description[] = "Sublime UI Library: Splitting Example";
00034 KAboutData aboutData("example2", 0, ki18n("Example 2"),
00035 "1.0", ki18n(description), KAboutData::License_LGPL,
00036 ki18n("(c) 2007, Alexander Dymo"), KLocalizedString(), "http://www.kdevelop.org" );
00037
00038 KCmdLineArgs::init(argc, argv, &aboutData);
00039 KApplication app;
00040
00041 Sublime::Controller *controller = new Sublime::Controller(&app);
00042 Sublime::Area *area = new Sublime::Area(controller, "Area");
00043 Sublime::Document *doc = new Sublime::UrlDocument(controller, KUrl::fromPath("~/foo.cpp"));
00044 area->addView(doc->createView());
00045 Example2Main *window = new Example2Main(controller);
00046 controller->showArea(area, window);
00047 window->resize(800, 600);
00048 window->show();
00049
00050 return app.exec();
00051 }
00052