Update of /cvsroot/libufo/ufo-0.5/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12980/test
Modified Files:
text.cpp
Log Message:
Beautified layout.
Index: text.cpp
===================================================================
RCS file: /cvsroot/libufo/ufo-0.5/test/text.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** text.cpp 21 May 2005 15:23:48 -0000 1.5
--- text.cpp 15 Sep 2005 16:22:04 -0000 1.6
***************
*** 67,71 ****
createContent(UWidget * content) {
// we are using the flow layout as layout manager
! content->setLayout(new UFlowLayout());
//
--- 67,76 ----
createContent(UWidget * content) {
// we are using the flow layout as layout manager
! //content->setLayout(new UFlowLayout());
! content->setOrientation(Vertical);
!
! UWidget * hbox = new UWidget();
! hbox->setOrientation(Horizontal);
! content->add(hbox);
//
***************
*** 73,77 ****
//
UTextWidget * staticText = new UTextWidget();
! content->add(staticText);
// set the text
--- 78,82 ----
//
UTextWidget * staticText = new UTextWidget();
! hbox->add(staticText);
// set the text
***************
*** 85,89 ****
//
UTextEdit * text = new UTextEdit();
! content->add(text);
// set some size hints
--- 90,94 ----
//
UTextEdit * text = new UTextEdit();
! hbox->add(text);
// set some size hints
***************
*** 95,98 ****
--- 100,110 ----
//
+ // make new line
+ //
+ hbox = new UWidget();
+ hbox->setOrientation(Horizontal);
+ content->add(hbox);
+
+ //
// line edit
//
***************
*** 101,110 ****
lineEdit->sigActivated().connect(slot(&print_action_command));
!
! ULabel * lineEditLabel = new ULabel("&line edit");
! lineEditLabel->setBuddy(lineEdit);
!
! content->add(lineEditLabel);
! content->add(lineEdit);
//
--- 113,118 ----
lineEdit->sigActivated().connect(slot(&print_action_command));
! hbox->add(new ULabel("&line edit", lineEdit));
! hbox->add(lineEdit);
//
***************
*** 114,118 ****
ULineEdit * intField = new ULineEdit();
! content->add(intField);
intField->setValidator(new UIntValidator());
intField->setText("25234134");
--- 122,127 ----
ULineEdit * intField = new ULineEdit();
! hbox->add(new ULabel("&integer edit", intField));
! hbox->add(intField);
intField->setValidator(new UIntValidator());
intField->setText("25234134");
***************
*** 126,130 ****
ULineEdit * doubleField = new ULineEdit();
! content->add(doubleField);
doubleField->setValidator(new UDoubleValidator());
doubleField->setText("25234.234");
--- 135,140 ----
ULineEdit * doubleField = new ULineEdit();
! hbox->add(new ULabel("&double edit", doubleField));
! hbox->add(doubleField);
doubleField->setValidator(new UDoubleValidator());
doubleField->setText("25234.234");
|