Main Page | Recent changes | Edit this page | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Sublime UI

From KDevelop

[edit] Modus Operandi


[edit] Brief Architecture Overview

Sublime::Controller is the central point of the whole Sublime infrastructure. It contains areas, documents and controlls mainwindows. Sublime::Controller::showArea() is the only way to show an area in the mainwindow.

Sublime::MainWindow is just a KParts::MainWindow which just knows how to "reconstruct" the area, react on area changes. Additionally it knows which view and toolview is "active" (i.e. last focused).

Sublime::Area is the object that controls views, toolviews and defines their placement inside the mainwindow. Provides various view management (e.g. add/remove/etc.) methods and signals. Also Area is responsible to store/restore view layout (on-disk storage is not implemented currently).

Area is identified by its name. Each KDevelop platform application, for example, has to define a concept of "default area" in ShellExtension so that UiController can load it by default.

While areas operate on views, the Sublime Controller deals with Sublime::Documents only. Sublime::View is only a thin wrapper around actual QWidget.

Document is what provides views. Sublime::Document::createView() is the only way to get a view. When createView() is called, the protected Sublime::Document::createViewWidget() is called to return the actual widget for a view.

There is an abstract Sublime::Document class with no createViewWidget() implementation and there's a convenience class Sublime::ToolDocument that can create widgets of user-specified type.

KDevelop currently uses Sublime::PartDocument which is subclassed by KDevelop::PartDocument. This PartDocument creates a view by loading a part and then asking a part about its widget.

Retrieved from "http://www.kdevelop.org/mediawiki/index.php/Sublime_UI"

This page has been accessed 4,502 times. This page was last modified 18:33, 17 March 2007. Content is available under GNU Free Documentation License 1.2.


[Main Page]
Main Page
Community portal
Current events
Recent changes
Help
Donations

Edit this page
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports