6
SysUtils, Types, Classes, Variants, QGraphics, QControls, QForms, QDialogs,
7
QStdCtrls, QComCtrls, QExtCtrls, Sword;
18
TextBrowser1: TTextBrowser;
19
procedure Edit1Change(Sender: TObject);
20
procedure TreeView1Change(Sender: TObject; Node: TTreeNode);
21
procedure Button1Click(Sender: TObject);
22
procedure FormCreate(Sender: TObject);
23
procedure FormShow(Sender: TObject);
27
{ Public declarations }
38
procedure TForm1.Edit1Change(Sender: TObject);
43
procedure TForm1.lookup();
49
node := TreeView1.Selected;
52
module := mgr.getModuleByName(node.Text);
53
if (module <> nil) then
55
module.setKeyText(Edit1.Text);
59
'<small><b>' + module.getKeyText() + '<b></small> ' +
60
module.getRenderText() +
63
Label1.Caption := ': ' + module.getKeyText();
68
procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode);
73
procedure TForm1.Button1Click(Sender: TObject);
75
Application.Terminate;
78
procedure TForm1.FormCreate(Sender: TObject);
83
procedure TForm1.FormShow(Sender: TObject);
85
root, node : TTreeNode;
91
// root := TreeView1.TopItem;
92
// root := TreeView1.Items.AddChild(TreeView1.TopItem, 'Modules');
94
modIt := mgr.getModulesIterator;
95
module := modIt.getValue;
96
while (module <> nil) do
98
node := TreeView1.Items.GetFirstNode;
100
while ((node <> nil) AND (NOT found)) do
102
if (node.Text = module.getType) then
104
else node := node.getNextSibling;
107
node := TreeView1.Items.AddChild(TreeView1.TopItem, module.GetType());
109
TreeView1.Items.AddChild(node, module.GetName());
112
module := modIt.getValue;