<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
  <!ENTITY kappname "&ksnapshot;">
  <!ENTITY package "kdegraphics">
  <!ENTITY % addindex "IGNORE">
  <!ENTITY % Brazilian-Portuguese "INCLUDE"
> <!-- change language only here -->
]>

<book lang="&language;">

<bookinfo>
<title
>Manual do &ksnapshot;</title>

<authorgroup>
<author
><firstname
>Richard</firstname
> <othername
>J.</othername
> <surname
>Moore</surname
> <affiliation
> <address
><email
>rich@kde.org</email
></address>
</affiliation>
</author>

<author
><firstname
>Robert</firstname
> <othername
>L.</othername
> <surname
>McCormick</surname
> <affiliation
> <address
><email
>c0029131@airmail.net</email
></address>
</affiliation>
</author>

<author
><firstname
>Brad</firstname
> <surname
>Hards</surname
> <affiliation
> <address
><email
>bradh@frogmouth.net</email
></address>
</affiliation>
</author>

<othercredit role="reviewer"
><firstname
>Lauri</firstname
> <surname
>Watts</surname
> <affiliation
> <address
><email
>lauri@kde.org</email
></address>
</affiliation>
<contrib
>Revisão</contrib>
</othercredit>

<othercredit role="developer"
><firstname
>Richard</firstname
> <othername
>J</othername
> <surname
>Moore</surname
> <affiliation
> <address
><email
>rich@kde.org</email
></address>
</affiliation>
<contrib
>Desenvolvimento</contrib>
</othercredit>

<othercredit role="developer"
><firstname
>Matthias</firstname
> <surname
>Ettrich</surname
> <affiliation
> <address
><email
>ettrich@kde.org</email
></address>
</affiliation>
<contrib
>Desenvolvimento</contrib>
</othercredit>

<othercredit role="translator"
><firstname
>Marcus</firstname
><surname
>Gama</surname
><affiliation
><address
><email
>marcus_gama@uol.com.br</email
></address
></affiliation
><contrib
>Tradução</contrib
></othercredit
> 
</authorgroup>

<copyright>
<year
>1997-2000</year>
<holder
>Richard J. Moore</holder>
</copyright>

<copyright>
<year
>2000</year>
<holder
>Matthias Ettrich</holder>
</copyright>

<legalnotice
>&FDLNotice;</legalnotice>

<date
>2005-02-02</date>
<releaseinfo
>1.02.00</releaseinfo>

<abstract>
<para
>&ksnapshot; is a simple applet for taking screenshots. It is capable of capturing images of the whole desktop, a single window or a selected region. The images can then be saved in a variety of formats.</para>
</abstract>

<keywordset>
<keyword
>KDE</keyword>
<keyword
>KSnapshot</keyword>
<keyword
>kdegraphics</keyword>
<keyword
>screen capture</keyword>
<keyword
>screen grab</keyword>
</keywordset>

</bookinfo>

<chapter id="introduction">
<title
>Introdução</title>

<para
>&ksnapshot; is a simple applet for taking screenshots. It is capable of capturing images of the whole desktop, a single window or a selected region. The images can then be saved in a variety of formats.</para>

<para
>Please report any problems or feature requests to the <ulink url="http://bugs.kde.org/wizard.cgi"
>KDE Bug Tracking System</ulink
></para>

</chapter>

<chapter id="using-ksapshot">
<title
>Usando o &ksnapshot;</title>

<para
>Este capítulo descreve a utilização do &ksnapshot; para capturar imagens da tela.</para>

<sect1 id="starting">
<title
>Iniciando o &ksnapshot;</title>

<para
>O &ksnapshot; pode ser iniciado por uma das várias maneiras descritas abaixo.</para>

<itemizedlist>
<listitem>
<para
>Você pode iniciar o &ksnapshot; selecionando-o a partir do sub-menu <guisubmenu
>Gráficos</guisubmenu
> do painel.</para
></listitem>
<listitem>
<para
>Você pode iniciar o &ksnapshot; inserindo o seguinte comando numa linha de comando:</para>
<screen width="40"
><prompt
>%</prompt
> <command
>ksnapshot &amp;</command
>
</screen>
</listitem>
<listitem
><para
>A mini linha de comando (invocada com <keycombo action="simul"
>&Alt;<keycap
>F2</keycap
></keycombo
>) também pode ser usada para iniciar o &ksnapshot;</para
></listitem>
</itemizedlist>

<para
>Logo que o &ksnapshot; inicie, você verá uma janela como a seguinte: <mediaobject>
<imageobject>
<imagedata fileref="window.png" format="PNG"/>
</imageobject>
<textobject
><phrase
>Janela do &ksnapshot;</phrase>
</textobject>
</mediaobject>
</para>

</sect1>

<sect1 id="taking-snapshot">
<title
>Capturando Uma Imagem</title>

<para
>O &ksnapshot; captura uma imagem de todo o seu ambiente de trabalho imediatamente após ter sido iniciado, mas antes de aparecer na tela. Isto permite-lhe criar rapidamente imagens de toda tela.</para>

<para
>A imagem capturada pelo &ksnapshot; é mostrada na janela de pré-visualização, que está localizada na parte central superior da janela do &ksnapshot; Abaixo está um exemplo da janela de pré-visualização do &ksnapshot;. A sua imagem será diferente dependendo do que está na sua tela.</para>

<mediaobject>
<imageobject>
<imagedata fileref="preview.png" format="PNG"/>
</imageobject>
<textobject
><phrase
>Janela do &ksnapshot;</phrase>
</textobject>
</mediaobject>

<para
>A captura pode ser salva clicando no botão <guibutton
>Salvar Como...</guibutton
>. Se forem capturadas múltiplas imagens, o nome do arquivo é automaticamente incrementado para evitar que não escreva por cima de imagens anteriores. Você pode no entanto, editar o nome do arquivo para qualquer valor que deseje, incluindo o nome de uma imagem previamente salva. </para>

<para
>To take a snapshot of a single window, select the <guilabel
>Window Under Cursor</guilabel
> combo box entry (next to the <guilabel
>Capture mode:</guilabel
> label), and then click on the <guibutton
>New Snapshot</guibutton
> button.</para>

<para
>Depending on your <guilabel
>Snapshot delay:</guilabel
> settings you get either a cross as the mouse pointer (for <guilabel
>No delay</guilabel
>), or a standard mouse cursor which you can use to work with a program until the delay is over and a snapshot is taken.</para>

<para
>Com o <guilabel
>Sem atraso</guilabel
>, a imagem é capturada imediatamente logo que você clicar numa janela.</para>

<para
>O &ksnapshot; irá mostrar a nova imagem na área de pré-visualização, e nesse momento você poderá optar por salvar a nova imagem (pressionando em <guibutton
>Salvar Como ...</guibutton
>) ou por capturar uma nova, clicando no botão <guibutton
>Nova Captura de Tela</guibutton
>.</para>

<para
>To take a new snapshot of the entire desktop, select the <guilabel
>Full Screen</guilabel
> combo box entry (next to the <guilabel
>Capture mode:</guilabel
> label), and then click on the <guibutton
>New Snapshot</guibutton
> button. &ksnapshot; will now capture the entire desktop if you press <guibutton
>New Snapshot</guibutton
>.</para>

<para
>Similarly, to take a snapshot of a region, select the <guilabel
>Region</guilabel
> combo box entry (next to the <guilabel
>Capture mode:</guilabel
> label) and set the <guilabel
>Snapshot delay</guilabel
> to <guilabel
>No delay</guilabel
>, and then click on the <guibutton
>New Snapshot</guibutton
> button. The mouse cursor will then change into a cross, and you can then use the mouse to select the region you want to capture. </para>

</sect1>

<sect1 id="additional-features">
<title
>Recursos Adicionais</title>

<sect2 id="delay">
<title
>Atraso da Captura de Tela</title>

<para
>O campo de <guilabel
>Atraso da Captura de Tela:</guilabel
> permite-lhe introduzir uma espera de tempo, em segundos, entre o momento em que pressiona o botão <guibutton
>Nova Captura de Tela</guibutton
> e o momento em que a imagem é capturada.</para>

<para
>Quando um tempo de espera é definido, você não precisa clicar o mouse para capturar a imagem. Isto permite-lhe, por exemplo, abrir um menu, e capturar uma imagem dele.</para>

</sect2>

<sect2 id="window-decoration">
<title
>Excluir as decorações da Janela</title>

<para
><guilabel
>Incluir as decorações da janela</guilabel
> está ativo por padrão.</para>

<para
>Quando você só quiser capturar a aplicação em si sem a decoração envolvente da janela, desative esta opção e tire uma nova fotografia.</para>

</sect2>

<sect2 id="print-snapshot">
<title
>Imprimir</title>

<para
>Quando você quiser imprimir a sua imagem a partir da pré-visualização, basta clicar em <guibutton
>Imprimir...</guibutton
> e você obterá o diálogo de impressão padrão do KDE, onde você poderá imprimir a sua captura de tela diretamente.</para>

</sect2>


<sect2 id="bottom-buttons">
<title
>Botões</title>

<para
>Há ainda mais dois botões localizados no fundo da janela do &ksnapshot;. As suas funções estão descritas abaixo.</para>

<variablelist>
<varlistentry>
<term
><guibutton
>Ajuda</guibutton
></term>
<listitem
><para
>Fornece-lhe um menu onde você poderá abrir o <guimenuitem
>Manual do &ksnapshot;</guimenuitem
>, relatar um erro ou obter algumas informações sobre o &kde; e o &ksnapshot;. </para
></listitem>
</varlistentry>

<varlistentry>
<term
><guibutton
>Sair</guibutton
></term>
<listitem
><para
>Fecha a aplicação &ksnapshot;.</para
></listitem>
</varlistentry>
</variablelist>

</sect2>
</sect1>
</chapter>

<chapter id="dcop">

<title
>&DCOP; Interface</title>

<para
>&ksnapshot; can be scripted using its &DCOP; interface. This chapter explains the various &DCOP; calls that you can use, and provides some examples of how you can use them.</para>

<para
>As with all DCOP calls, you need to specify the application you want to interace with, and the particular interface. With &ksnapshot; you need to identify which particular application, which is <literal
>ksnapshot-</literal
> followed by the process number.</para>

<para
>To start &ksnapshot; and obtain the right argument, use <command
>dcopstart ksnapshot</command
>, which returns the argument (such as <computeroutput
>ksnapshot-20594</computeroutput
>) on standard output.</para>

<para
>You can get a list of the available &DCOP; interfaces, use the right arguments, as shown in this example: <screen width="60"
><prompt
>$</prompt
> <command
>dcop `dcopstart ksnapshot` interface</command
><computeroutput>
QCStringList interfaces()
QCStringList functions()
QString url()
void slotGrab()
void slotPrint()
void slotSave()
bool save(QString filename)
void slotSaveAs()
void slotCopy()
void setTime(int newTime)
int timeout()
void setURL(QString newURL)
void setGrabMode(int grab)
int grabMode()
void slotMovePointer(int x,int y)
void exit()
</computeroutput
>
</screen>
</para>

<para
>In the examples following, the process is always <computeroutput
>ksnapshot-23151</computeroutput
>. </para>

<sect1 id="dcop-settings">

<title
>&DCOP; Access to Settings</title>

<para
>For each of the settings that you can control with the GUI, you can both obtain the current status of that setting, and modify the setting, using &DCOP;. </para>

<para
>You can obtain the current capture mode using the <literal
>grabMode</literal
> call, as shown below: <screen width="60">
<prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface grabMode</command>
</screen
> This will return <computeroutput
>0</computeroutput
> for full-screen capture, <computeroutput
>1</computeroutput
> for window capture, and <computeroutput
>2</computeroutput
> for region capture. </para>

<para
>You can set the capture mode using the <literal
>setGrabMode</literal
>, which requires an argument to identify the mode required (as for the <literal
>grabMode</literal
> call). So you can set window capture mode (<command
>1</command
>), using: <screen width="60"
><prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface setGrabMode 1</command
>
</screen>
</para>

<para
>You can obtain the current timeout setting (the <guilabel
>Snapshot delay:</guilabel
> GUI item) using the <literal
>timeout</literal
> call, as shown below: <screen width="60">
<prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface timeout</command>
</screen
> This will return the timeout setting in seconds, or zero if there is no delay (click on capture). </para>

<para
>You can set the timeout using the <literal
>setTime</literal
>, which requires an argument to identify the timeout duration. So you can set a delay of 4 seconds using: <screen width="60"
><prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface setTime 4</command
>
</screen>
</para>

<para
>You can obtain the path that the snapshot will be saved to using the <literal
>url</literal
> call, as shown below: <screen width="60">
<prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface url</command>
</screen
> This will return the filename, as a URL (eg as <computeroutput
>file:///home/bradh/test2.png</computeroutput
>). </para>

<para
>You can set the path using the <literal
>setURL</literal
> command, which requires a string argument to identify the new path. So you can set the path to <literal
>file:///home/bradh/snapshot4.jpg</literal
> using: <screen width="60"
><prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface setURL file:///home/bradh/snapshot.jpg</command
>
</screen>
</para>

</sect1>

<sect1 id="dcop-snapshot">
<title
>Taking Screenshots with &DCOP;</title>

<para
>The key to taking screenshots with &DCOP; is use of the <literal
>slotGrab</literal
> command, as shown below: <screen width="60"
><prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface slotGrab</command
>
</screen>
</para>

<para
>This will take a snapshot using the current snapshot mode and timeout settings (as described above). If you want to save the snapshot image, there are a number of calls you can use. If you just want to save the image to the current path (as returned by <literal
>url</literal
>) or changed by <literal
>setURL</literal
>), you can call <literal
>slotSave</literal
>, as shown below: <screen width="60"
><prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface slotSave</command
>
</screen>
</para>

<para
>If you want the user to be able to specify a filename (and path), you can use <literal
>slotSaveAs</literal
>, which will bring up a standard &kde; file save dialog.</para>

<para
>If you want to save the image to a different name (or path) without changing the path with <literal
>setURL</literal
>, you can use <literal
>save</literal
>, providing the URL to save to as an argument. So if you want to save the snapshot to <filename
>file:///tmp/tempshot.png</filename
>, you can do the following: <screen width="60">
<prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface save file:///tmp/tempshot.png</command>
</screen
> Note that this will return true if the snapshot was successfully saved, and false otherwise. Also, you should be aware that if the file already exists, the user will get a standard &kde; dialog that requires the user to decide whether to overwrite or not. </para>

<para
>In addition to saving the snapshot, you can also copy it to the clipboard, using the <literal
>slotCopy</literal
> command, as shown below: <screen width="60"
><prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface slotCopy</command
>
</screen>
</para>

<para
>If you need to select a window that may not be under the mouse cursor, you can use the <literal
>slotMovePointer</literal
> call, passing the x position (in screen pixels) and the y position (also in screen pixels) as arguments. So to move the mouse to the top left hand corner of the screen (0,0), you can do the following: <screen width="60"
><prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface slotMoveMouse 0 0</command
>
</screen>
</para>
</sect1>

<sect1 id="dcop-print">
<title
>Printing Screenshots with &DCOP;</title>

<para
>You can print the current screenshot (which may or may not have been saved) using the <literal
>printSlot</literal
> command, as shown below: <screen width="60"
><prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface slotPrint</command
>
</screen>
</para>

<para
>Note that this will bring up the normal &kde; print dialog, which may require user interaction. </para>

</sect1>

<sect1 id="dcop-exit">
<title
>&DCOP; Application control</title>

<para
>You can cause &ksnapshot; to exit by using the <literal
>exit</literal
> command, as shown below. <screen width="60"
><prompt
>$</prompt
> <command
>dcop ksnapshot-23151 interface exit</command
>
</screen>
</para>

</sect1>

</chapter>

<chapter id="credits">

<title
>Créditos e Licença</title>

<para
>Direitos autorais do programa</para>
<itemizedlist>
<listitem
><para
>1997-2000 Richard J. Moore <email
>rich@kde.org</email
></para
></listitem>
<listitem
><para
>2000 Matthias Ettrich <email
>ettrich@kde.org</email
></para
></listitem>
</itemizedlist>

<para
>Documentação baseada no original, direitos autorais 1997-2000 Richard J. Moore <email
>rich@kde.org</email
></para>
<para
>Tradução de Marcus Gama<email
>marcus_gama@uol.com.br</email
></para
> 
&underFDL; &underGPL; </chapter>

&documentation.index;
</book>

<!--
Local Variables:
sgml-minimize-attributes: nil
sgml-general-insert-case: lower
End:
-->




