summaryrefslogtreecommitdiff
path: root/tizen/src/ui/xmllayoutparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tizen/src/ui/xmllayoutparser.cpp')
-rw-r--r--tizen/src/ui/xmllayoutparser.cpp32
1 files changed, 29 insertions, 3 deletions
diff --git a/tizen/src/ui/xmllayoutparser.cpp b/tizen/src/ui/xmllayoutparser.cpp
index d7e82ced2b..59e81b1c99 100644
--- a/tizen/src/ui/xmllayoutparser.cpp
+++ b/tizen/src/ui/xmllayoutparser.cpp
@@ -720,6 +720,13 @@ ControllerForm *XmlLayoutParser::parseControllerForm(
} else if (xml.name() == HOVER_KEYWORD) {
/* hover */
form->setHoverType(parseHover(xml, depth + 1));
+ } else if (xml.name() == FORM_KEYWORD) {
+ /* sub form */
+ QWARN_INDENT(depth + 1) << "undefined element: " << xml.name();
+ ControllerForm *subform = parseControllerForm(xml, depth + 1);
+ if (subform != NULL) {
+ form->getSubFormList().append(subform);
+ }
} else {
QWARN_INDENT(depth + 1) << "undefined element: " << xml.name();
}
@@ -788,14 +795,33 @@ QString XmlLayoutParser::parseControllerUI(QXmlStreamReader &xml)
void XmlLayoutParser::makeGeneralCon(ControllerForm *form)
{
- const int keyCount = form->getKeyList().count();
+ int keyCount = form->getKeyList().count();
int width = GPC_KEYBUTTON_WIDTH + GPC_KEYBUTTON_HSPACING;
int height = GPC_HEAD_SPACING;
height += (GPC_KEYBUTTON_HEIGHT * keyCount) +
- (GPC_KEYBUTTON_VSPACING * (keyCount - 1)) + GPC_TAIL_SPACING;
+ (GPC_KEYBUTTON_VSPACING * (keyCount - 1));
+
+ // add sub form
+ QList<Separator *> sList;
+ QPen pen(QColor(205, 205, 205), 1, Qt::SolidLine);
+ for (int i = 0; i < form->getSubFormList().count(); i++) {
+ // for separator
+ Separator *s = new Separator();
+ s->pen = pen;
+ s->hOffset = height + GPC_KEYBUTTON_VSPACING / 2;
+ sList.append(s);
+
+ ControllerForm *subForm = form->getSubFormList().at(i);
+ keyCount = subForm->getKeyList().count();
+
+ height += (GPC_KEYBUTTON_HEIGHT * keyCount) +
+ (GPC_KEYBUTTON_VSPACING * keyCount);
+ }
+
+ height += GPC_TAIL_SPACING;
- SkinPainter painter(QSize(width, qMax(height, QT_LAYOUT_MINIMUM - 20)), 0);
+ SkinPainter painter(QSize(width, qMax(height, QT_LAYOUT_MINIMUM - 20)), 0, sList);
form->skinImg[LayoutForm::normal] = painter.getSkinImage();
form->setCenteralRect(painter.getCenteralRect());