~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to lib/kscript/example14.ks

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
main
2
 
{
3
 
        a = QApplication();
4
 
        print( "---- Application ----" );
5
 
        w = QWidget();
6
 
        dlg = QDialog( w );
7
 
        l = QLineEdit( w );
8
 
        l.text = "Edit me";
9
 
        p = QPushButton( w );
10
 
        p.text = "Dialog";
11
 
                bg = QHButtonGroup( w );
12
 
                r1 = QRadioButton( bg );
13
 
                r1.text = "Radio Button";
14
 
                r2 = QRadioButton( bg );
15
 
                r2.text = "Television Button";
16
 
                r3 = QRadioButton( bg );
17
 
                r3.text = "Other";
18
 
                c = QCheckBox( dlg );
19
 
                c.text = "Check";
20
 
                c.checked = TRUE;
21
 
        combo = QComboBox( w );
22
 
        combo.insertItem("Schubidu");
23
 
        combo.insertItem("Schabada");
24
 
        combo.insertItem("Schabadai");
25
 
        la = QLabel( w );
26
 
        la.text = "<b>Hello</b> World";
27
 
        rect = QRect();
28
 
        rect.left = 50;
29
 
        rect.top = 80;
30
 
        rect.right = 120;
31
 
        rect.bottom = 160;
32
 
        dlg.geometry = rect;
33
 
        layout1 = QVBoxLayout( w );
34
 
        layout2 = QHBoxLayout( w );
35
 
        layout1.addWidget( l );
36
 
        layout1.addWidget( p );
37
 
        layout1.addWidget( bg );
38
 
        layout1.addLayout( layout2 );
39
 
        layout2.addWidget( la );
40
 
        layout2.addWidget( combo );
41
 
        w.show();
42
 
        w.caption = "KScript Test";
43
 
        print( w.caption );
44
 
        w.name = "Hello";
45
 
        print( w.name );
46
 
        connect( l.textChanged, p.setText );
47
 
        connect( combo.activated, p.setText );
48
 
        connect( p.clicked, dlg.show );
49
 
        a.exec();
50
 
}