[Panel-devel] [PATCH] Plasma Layouts

Matias Valdenegro T. mvaldenegro at informatica.utem.cl
Mon May 21 08:01:45 CEST 2007


Hi:

Attached are :
- Patch against kdebase/workspace/plasma/lib
- 4 New classes :
	- Layout, base class for layouts
	- LayoutItem, base class for layout-manager items
	- VBoxLayout, vertical box layout implementation
	- Container, a round corner rectangle for widget containment

This would be a first look to a layouting system for QGraphicsItems, via 
inheritance from Plasma::Widget so the layout system can manage widgets in 
the same fashion that QWidgets are manager by QLayouts.

Comments expected :)

ScreenShot produced with those classes at :
http://informatica.utem.cl/~mvaldenegro/Fotos/layoutFinal.png

Code for that shot was (adding it to desktop.cpp) :

Plasma::Container *cont = new Plasma::Container(0);
m_graphicsScene->addItem(cont);

Plasma::Layout *lay = new Plasma::VBoxLayout();
cont->setLayout(lay);

Plasma::PushButton *but = new Plasma::PushButton(cont);
but->setText("1");
but = new Plasma::PushButton(cont);
but->setText("2");
but = new Plasma::PushButton(cont);
but->setText("3");
but = new Plasma::PushButton(cont);
but->setText("4");
but = new Plasma::PushButton(cont);
but->setText("5");

-------------- next part --------------
A non-text attachment was scrubbed...
Name: plasma-layout.patch
Type: text/x-diff
Size: 13256 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/0e4fc7d4/attachment-0009.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: container.cpp
Type: text/x-c++src
Size: 1632 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/0e4fc7d4/attachment-0010.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: container.h
Type: text/x-c++hdr
Size: 1184 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/0e4fc7d4/attachment-0011.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layoutitem.h
Type: text/x-c++hdr
Size: 1557 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/0e4fc7d4/attachment-0012.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vboxlayout.cpp
Type: text/x-c++src
Size: 3700 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/0e4fc7d4/attachment-0013.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vboxlayout.h
Type: text/x-c++hdr
Size: 1695 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/0e4fc7d4/attachment-0014.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layout.cpp
Type: text/x-c++src
Size: 1416 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/0e4fc7d4/attachment-0015.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layoutitem.cpp
Type: text/x-c++src
Size: 1255 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/0e4fc7d4/attachment-0016.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: layout.h
Type: text/x-c++hdr
Size: 1581 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070521/0e4fc7d4/attachment-0017.bin 


More information about the Panel-devel mailing list