~ubuntu-branches/ubuntu/saucy/kde-l10n-pt/saucy

« back to all changes in this revision

Viewing changes to docs/kdeedu/rocs/index.docbook

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2012-01-24 20:43:54 UTC
  • mfrom: (1.1.46)
  • Revision ID: package-import@ubuntu.com-20120124204354-abq2elrb64oyyxxy
Tags: 4:4.8.0-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
<abstract>
58
58
<para
59
 
>O &rocs; é uma ferramenta de visualização da teoria dos grafos para o KDE. </para>
 
59
>&rocs; is a graph theory viewer tool for KDE. </para>
60
60
</abstract>
61
61
 
62
62
<keywordset>
82
82
<title
83
83
>Introdução</title>
84
84
<para
85
 
>O &rocs; pretende ser um IDE da Teoria dos Grafos para ajudar os professores a mostrar os resultados de um algoritmo de grafos e também para ajudar os alunos a criar os algoritmos.</para>
 
85
>&rocs; aims to be a Graph Theory IDE for helping professors to show the results of a graph algorithm and also helping students to do the algorithms.</para>
86
86
 
87
87
<para
88
 
>O &rocs; tem um módulo de programação, feito em Qt Script, que interage com o grafo desenhado, sendo que todas as alterações no grafo com o programa são reflectidas no grafo desenhado.</para>
 
88
>&rocs; has a scripting module, done in Qt Script, that interacts with the drawn graph and every change in the graph with the script is reflected on the drawn one.</para>
89
89
</chapter>
90
90
 
91
91
<chapter id="using-rocs">
92
92
<title
93
93
>Usar o &rocs;</title>
94
94
<para
95
 
>A interface do utilizador está dividida em duas partes: </para
 
95
>The user interface is divided in two parts: </para
96
96
97
97
 
98
98
<itemizedlist>
99
99
<listitem
100
100
><para
101
 
>a parte superior-direita é onde desenha os seus grafos, enquanto a inferior-direita é onde cria os seus algoritmos, </para
 
101
>the top right part is where you draw your graphs, and the bottom right one is where you create your algorithms, </para
102
102
></listitem>
103
103
<listitem
104
104
><para
105
 
>a barra lateral esquerda é onde ficam todos os seus grafos abertos, sendo que poderá abrir vários grafos por cada ficheiro. </para
 
105
>the left sidebar is where all your open graphs stay, you can open multiple graphs per file. </para
106
106
></listitem>
107
107
</itemizedlist>
108
108
 
109
109
 
110
110
<sect1 id="rocs-features">
111
111
<title
112
 
>Configuração global do &rocs;</title>
 
112
>&rocs; global settings</title>
113
113
<para
114
 
>Na barra lateral, poderá encontrar as opções para cada grafo aberto, sendo que estas opções são globais por cada grafo, podendo ser alteradas para cada nó e aresta nas Propriedades dos Nós e das janelas de Propriedades das Arestas.</para>
 
114
>On the left sidebar you can find the options for each opened graph, all these options are global per graph and can be changed per node and edge with the Node Properties and the Edge Properties dialogs.</para>
115
115
<itemizedlist>
116
116
<listitem
117
117
><para>
118
118
<guilabel
119
 
>Nome do Grafo</guilabel>
 
119
>Graph Name</guilabel>
120
120
</para
121
121
></listitem>
122
122
<listitem
123
123
><para
124
 
>A <guilabel
125
 
>Cor dos Nós</guilabel
126
 
>, para os nós acabados de criar, poderá alterar a cor do nó para todos os nós actuais, carregando no botão <guilabel
127
 
>Tudo</guilabel
128
 
> </para
 
124
><guilabel
 
125
>Node Color</guilabel
 
126
> for new created nodes, you can change the node color for all current nodes by clicking the <guilabel
 
127
>All</guilabel
 
128
> button </para
129
129
></listitem>
130
130
<listitem
131
131
><para>
132
132
<guilabel
133
 
>Cor das Arestas</guilabel>
 
133
>Edge Color</guilabel>
134
134
</para
135
135
></listitem>
136
136
</itemizedlist>
137
137
<para
138
 
>A última fila de opções consiste em botões de comutação:</para>
 
138
>The last row of options consists in toggled buttons:</para>
139
139
<itemizedlist>
140
140
<listitem
141
141
><para
142
142
><guilabel
143
 
>Mostrar os nomes em:</guilabel
 
143
>Show names in:</guilabel
144
144
> <guilabel
145
 
>Nós</guilabel
146
 
> ou <guilabel
147
 
>Arestas</guilabel
 
145
>Nodes</guilabel
 
146
> or <guilabel
 
147
>Edges</guilabel
148
148
>. </para
149
149
></listitem>
150
150
<listitem
174
174
 
175
175
<sect1 id="rocs-toolbars">
176
176
<title
177
 
>Barras de Ferramentas do &rocs;</title>
 
177
>&rocs; toolbars</title>
178
178
<para
179
 
>Existem duas barras de ferramentas no topo. A principal tem as seguintes ferramentas:</para>
 
179
>There are two toolbars, on the top. The main one has the following tools:</para>
180
180
<itemizedlist>
181
181
<listitem
182
182
><para
183
183
><guilabel
184
 
>Mover o Nó</guilabel
185
 
>: move um nó pela área de desenho.</para
186
 
></listitem>
187
 
<listitem
188
 
><para
189
 
><guilabel
190
 
>Adicionar um Nó</guilabel
191
 
>: cria um novo nó na posição da área de desenho onde carregou.</para
192
 
></listitem>
193
 
<listitem
194
 
><para
195
 
><guilabel
196
 
>Adicionar uma Aresta</guilabel
197
 
>: cria uma nova aresta entre os dois nós.</para
198
 
></listitem>
199
 
<listitem
200
 
><para
201
 
><guilabel
202
 
>Seleccionar</guilabel
203
 
>: selecciona os itens, carregando para tal nos mesmos.</para
204
 
></listitem>
205
 
<listitem
206
 
><para
207
 
><guilabel
208
 
>Apagar</guilabel
209
 
>: apaga os itens, carregando para tal neles.</para
210
 
></listitem>
211
 
<listitem
212
 
><para
213
 
>Usar as ferramentas de alinhamento para colocar os nós seleccionados.</para
 
184
>Move Node</guilabel
 
185
>: moves a node around the drawing area.</para
 
186
></listitem>
 
187
<listitem
 
188
><para
 
189
><guilabel
 
190
>Add Node</guilabel
 
191
>: creates a new node at the clicked position on the drawing area.</para
 
192
></listitem>
 
193
<listitem
 
194
><para
 
195
><guilabel
 
196
>Add Edge</guilabel
 
197
>: creates a new edge between two nodes.</para
 
198
></listitem>
 
199
<listitem
 
200
><para
 
201
><guilabel
 
202
>Select</guilabel
 
203
>: select items by clicking on them.</para
 
204
></listitem>
 
205
<listitem
 
206
><para
 
207
><guilabel
 
208
>Delete</guilabel
 
209
>: delete items by clicking on them.</para
 
210
></listitem>
 
211
<listitem
 
212
><para
 
213
>Use the align tools to place selected nodes.</para
214
214
></listitem>
215
215
</itemizedlist>
216
216
 
217
217
<para
218
 
>Se carregar com o botão direito do rato num nó ou aresta, irá invocar a janela de propriedades para esse item.</para>
 
218
>A right mouse click on a node or edge brings you the property dialog for that node or edge.</para>
219
219
<para
220
 
>A barra de disposição consiste em vários ícones de alinhamento.</para>
 
220
>The layout toolbar consists in various aligns icons.</para>
221
221
 
222
222
<para
223
 
>Para alinhar os nós, escolha a ferramenta <guiicon
224
 
>Seleccionar</guiicon
225
 
>, carregue e arraste um rectângulo e escolha o alinhamento desejado. </para>
 
223
>To align nodes, choose the <guiicon
 
224
>Select</guiicon
 
225
> tool, click and drag a rectangle, then choose the alignement that you want. </para>
226
226
</sect1>
227
227
</chapter>
228
228
 
229
229
<chapter id="scripting-rocs">
230
230
<title
231
 
>Programar no &rocs;</title>
 
231
>Scripting &rocs;</title>
232
232
<para
233
 
>Depois de o grafo estar no ecrã, poderá começar a criar o programa para ele. A linguagem usa uma sintaxe de JavaScript e consiste nos objectos Graph, Node e Edge.</para>
 
233
>After the graph is on screen, you can start creating the script for it. The language uses a Javascript syntax and following are the Graph, Node and Edge objects.</para>
234
234
 
235
235
<sect1 id="script-graph">
236
236
<title
237
 
>Grafo</title>
 
237
>Graph</title>
238
238
<programlisting
239
239
>array list_nodes();
240
240
     array list_edges();
241
 
     node add_node(nome);
242
 
     edge add_edge(de, para);
243
 
     node node_byname(QString&amp; nome);
 
241
     node add_node(name);
 
242
     edge add_edge(from, to);
 
243
     node node_byname(QString&amp; name);
244
244
     node begin_node();
245
245
     array end_nodes();
246
246
</programlisting
247
247
248
248
<para
249
 
>As variáveis do grafo podem ser alteradas:</para>
 
249
>Graph variables that can be changed:</para>
250
250
<programlisting
251
251
>bool directed
252
252
     bool automate
253
253
     string name
254
 
     string nodeDefaultColor // em HEXADECIMAL
255
 
     string edgeDefaultColor  // em HEXADECIMAL 
 
254
     string nodeDefaultColor // in HEXA
 
255
     string edgeDefaultColor  // in HEXA 
256
256
</programlisting>
257
257
</sect1>
258
258
 
259
259
<sect1 id="script-nodes">
260
260
<title
261
 
>Nós</title>
 
261
>Nodes</title>
262
262
<programlisting
263
263
>array adj_nodes();
264
264
     array adj_edges();
270
270
</programlisting
271
271
272
272
<para
273
 
>Variáveis do Nó:</para>
 
273
>Node Variables:</para>
274
274
<programlisting
275
275
>double x
276
276
    double y
277
277
    double width
278
278
    string value
279
279
    string name
280
 
    string color  // em HEXADECIMAL
 
280
    string color  // in HEXA
281
281
    bool begin
282
282
    bool end
283
283
</programlisting>
285
285
 
286
286
<sect1 id="script-edges">
287
287
<title
288
 
>Arestas</title>
 
288
>Edges</title>
289
289
<programlisting
290
290
>string color ( em hexa )
291
291
    string value
307
307
<para
308
308
>Aqui está um programa simples de exemplo que altera a cor dos 4 primeiros nós do primeiro grafo:</para>
309
309
<programlisting
310
 
>/* Um exemplo simples que altera a cor dos 4 primeiros nós do primeiro grafo: */
 
310
>/* A simple example that sets the color of the 4 first nodes in the first 
 
311
graph: */
311
312
 
312
 
var cores = new Array("red", "green", "blue", "yellow");
 
313
var colours = new Array("red", "green", "blue", "yellow");
313
314
 
314
 
/* 'grafos' é uma lista de grafos, onde poderá aceder a um grafo pelo seu índice
315
 
   na lista ou pelo seu nome, pelo que, se o nome do primeiro grafo for 'SemTitulo0',
316
 
   ambas as instruções seguintes são correctas */
317
 
var lista1= graphs[0].list_nodes(); //  1a forma
318
 
var lista2=SemTitulo0.list_nodes();              // 2a forma
 
315
/* graphs is an array of graphs, you can access a graph by its index in the 
 
316
array or by its name, so if the first graph's name is Untitled0, the following 
 
317
sentence are right  */
 
318
var list1= graphs[0].list_nodes(); //  1st form.
 
319
var list2=Untitled0.list_nodes();              // 2nd form
319
320
 
320
 
 for ( var i = 0; i &le; cores.length; i++){
 
321
 for ( var i = 0; i &lt; colours.length; i++){
321
322
        if (i 
322
 
> lista2.length) break;
323
 
        lista2[i].color = cores[i]
 
323
> list2.length) break;
 
324
        list2[i].color = colours[i]
324
325
 }
325
326
</programlisting>
326
327
</sect1>
329
330
 
330
331
<chapter id="commands">
331
332
<title
332
 
>Referência de Comandos</title>
 
333
>Command Reference</title>
333
334
 
334
335
<sect1 id="rocs-mainwindow">
335
336
<title
336
 
>Menus e Teclas de Atalho</title>
 
337
>Menus and Shortcut Keys</title>
337
338
 
338
339
<sect2>
339
340
<title
340
 
>O Menu <guimenu
341
 
>Ficheiro</guimenu
342
 
></title>
 
341
>The <guimenu
 
342
>File</guimenu
 
343
> Menu</title>
343
344
<variablelist>
344
345
<varlistentry>
345
346
<term
351
352
></keycombo
352
353
> </shortcut
353
354
> <guimenu
354
 
>Ficheiro</guimenu
 
355
>File</guimenu
355
356
> <guimenuitem
356
 
>Sair</guimenuitem
 
357
>Quit</guimenuitem
357
358
> </menuchoice
358
359
></term>
359
360
<listitem
360
361
><para
361
362
><action
362
 
>Sai</action
363
 
> do &rocs;</para
 
363
>Quits</action
 
364
> &rocs;</para
364
365
></listitem>
365
366
</varlistentry>
366
367
</variablelist>
370
371
 
371
372
<sect2>
372
373
<title
373
 
>O Menu <guimenu
374
 
>Configuração</guimenu
375
 
></title>
 
374
>The <guimenu
 
375
>Settings</guimenu
 
376
> Menu</title>
376
377
 
377
378
<variablelist>
378
379
<varlistentry>
379
380
<term
380
381
><menuchoice
381
382
><guimenu
382
 
>Configuração</guimenu
 
383
>Settings</guimenu
383
384
> <guisubmenu
384
 
>Barras de Ferramentas Visíveis</guisubmenu
385
 
> </menuchoice
386
 
></term>
387
 
<listitem
388
 
><para
389
 
><action
390
 
>Activa ou desactiva</action
391
 
> as barras de ferramentas <guimenuitem
392
 
>Principal</guimenuitem
393
 
> e de <guimenuitem
394
 
>Disposição</guimenuitem
395
 
>.</para
396
 
></listitem>
397
 
</varlistentry>
398
 
 
399
 
 
400
 
<varlistentry>
401
 
<term
402
 
><menuchoice
403
 
><guimenu
404
 
>Configuração</guimenu
405
 
> <guimenuitem
406
 
>Mostrar a Barra de Estado</guimenuitem
407
 
> </menuchoice
408
 
></term>
409
 
<listitem
410
 
><para
411
 
><action
412
 
>Activa ou desactiva</action
413
 
> a barra de estado.</para
414
 
></listitem>
415
 
</varlistentry>
416
 
 
417
 
<varlistentry>
418
 
<term
419
 
><menuchoice
420
 
><guimenu
421
 
>Configuração</guimenu
422
 
> <guimenuitem
423
 
>Configurar os Atalhos...</guimenuitem
424
 
> </menuchoice
425
 
></term>
426
 
<listitem
427
 
><para
428
 
><action
429
 
>Abre</action
430
 
> a janela de configuração normal do &kde; que lhe permite escolher teclas de atalho diferentes para as acções diferentes. </para
431
 
></listitem>
432
 
</varlistentry>
433
 
 
434
 
<varlistentry>
435
 
<term
436
 
><menuchoice
437
 
><guimenu
438
 
>Configuração</guimenu
439
 
> <guimenuitem
440
 
>Configurar as Barras de Ferramentas...</guimenuitem
441
 
> </menuchoice
442
 
></term>
443
 
<listitem
444
 
><para
445
 
><action
446
 
>Configura</action
447
 
> os itens que você deseja colocar na barra de ferramentas. </para
 
385
>Toolbars Shown</guisubmenu
 
386
> </menuchoice
 
387
></term>
 
388
<listitem
 
389
><para
 
390
><action
 
391
>Toggle</action
 
392
> the <guimenuitem
 
393
>Main</guimenuitem
 
394
>, and <guimenuitem
 
395
>Layout</guimenuitem
 
396
> toolbars.</para
 
397
></listitem>
 
398
</varlistentry>
 
399
 
 
400
 
 
401
<varlistentry>
 
402
<term
 
403
><menuchoice
 
404
><guimenu
 
405
>Settings</guimenu
 
406
> <guimenuitem
 
407
>Show Statusbar</guimenuitem
 
408
> </menuchoice
 
409
></term>
 
410
<listitem
 
411
><para
 
412
><action
 
413
>Toggle</action
 
414
> the statusbar.</para
 
415
></listitem>
 
416
</varlistentry>
 
417
 
 
418
<varlistentry>
 
419
<term
 
420
><menuchoice
 
421
><guimenu
 
422
>Settings</guimenu
 
423
> <guimenuitem
 
424
>Configure Shortcuts...</guimenuitem
 
425
> </menuchoice
 
426
></term>
 
427
<listitem
 
428
><para
 
429
><action
 
430
>Open</action
 
431
> standard &kde; setting dialog that allows you to choose different shortcut keys for different actions. </para
 
432
></listitem>
 
433
</varlistentry>
 
434
 
 
435
<varlistentry>
 
436
<term
 
437
><menuchoice
 
438
><guimenu
 
439
>Settings</guimenu
 
440
> <guimenuitem
 
441
>Configure Toolbars...</guimenuitem
 
442
> </menuchoice
 
443
></term>
 
444
<listitem
 
445
><para
 
446
><action
 
447
>Configure</action
 
448
> the items you want to put in the toolbar. </para
448
449
></listitem>
449
450
</varlistentry>
450
451
 
454
455
 
455
456
<sect2>
456
457
<title
457
 
>O Menu <guimenu
458
 
>Ajuda</guimenu
459
 
></title>
 
458
>The <guimenu
 
459
>Help</guimenu
 
460
> Menu</title>
460
461
&help.menu.documentation; </sect2>
461
462
</sect1>
462
463
</chapter>
470
471
<para
471
472
>&rocs; </para>
472
473
<para
473
 
>Programa com 'copyright' 2009 de Tomaz Canabrava tcanabrava at kde dot org </para>
 
474
>Program copyright 2009 Tomaz Canabrava tcanabrava at kde dot org </para>
474
475
 
475
476
<para
476
 
>Documentação com 'copyright' 2009 de &Anne-Marie.Mahfouf; &Anne-Marie.Mahfouf.mail; e Tomaz Canabrava tcanabrava at kde dot org </para>
 
477
>Documentation copyright 2009 &Anne-Marie.Mahfouf; &Anne-Marie.Mahfouf.mail; and Tomaz Canabrava tcanabrava at kde dot org </para>
477
478
 
478
479
<para
479
480
>Tradução de José Nuno Pires <email