summaryrefslogtreecommitdiffstats
path: root/kjsembed/docs/embedding/simple-embed/test.js
blob: f954b26a3f405260871ca68d4edf9cbf230df751 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env kjsembed

CustomOptions.orientation = Qt.Vertical;
CustomOptions.columns = 1;

var box = new TQVBox(CustomOptions);
var row1 = new TQHBox(box);
var dateLabel = new TQLabel(row1);
dateLabel.text = "Birthday:";
var birthday = new KDateWidget(row1);

var row2 = new TQHBox(box);
var eyeLabel = new TQLabel(row2);
eyeLabel.text = "Eye color:";
var eyeColor = new KColorButton(row2);

var row3 = new TQHBox(box);
var notes = new KTextEdit(row3);

box.show();

function handleOk()
{
      var personelData = []; // make this an array so it will convert properly
      personelData = {birthday:birthday.date, eyeColor:eyeColor.color, notes:notes.text };
//    personelData[birthday] = birthday.date;
//    personelData[eyeColor] = eyeColor.color;
//    personelData[notes] = notes.text;
    return personelData;
}

function handleCancel()
{
    notes.text = "";
}