[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Tue Jan 27 07:54:41 CET 2004
CVS commit by staikos:
some polishing
M +15 -2 variableeditor.cpp 1.2
--- kdeextragear-2/kst/kst/variableeditor.cpp #1.1:1.2
@@ -33,8 +33,9 @@ class Helper : public QFrame {
: QFrame(parent, name.latin1()) {
QHBoxLayout *l = new QHBoxLayout(this);
- _name = new QLabel(this);
+ _name = new QLabel(this, (name + " label").latin1());
_name->setText(name);
- _value = new QLineEdit(this);
+ _value = new QLineEdit(this, (name + " entry").latin1());
_value->setText(value);
+
l->addWidget(_name);
l->addWidget(_value);
@@ -39,4 +40,9 @@ class Helper : public QFrame {
l->addWidget(_name);
l->addWidget(_value);
+
+ l->setMargin(4);
+ l->setSpacing(20);
+
+ _name->setFocusProxy(_value);
}
@@ -52,4 +58,7 @@ VariableEditor::VariableEditor(QWidget *
: QScrollView(parent, name) {
_layout = new QVBoxLayout(this);
+ _layout->setMargin(0);
+ _layout->setSpacing(0);
+
_spacer = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -74,4 +83,8 @@ bool VariableEditor::addVariable(const Q
_layout->addItem(_spacer);
+ if (_variables.isEmpty()) {
+ h->_value->setFocus();
+ }
+
_variables.append(var);
More information about the Kst
mailing list