<?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 % Estonian  "INCLUDE"
> <!-- change language only here -->
]>

<book lang="&language;">

<bookinfo>
<title
>&ksnapshot;i käsiraamat</title>

<authorgroup>
<author
><firstname
>Richard</firstname
> <othername
>J.</othername
> <surname
>Moore</surname
> <affiliation
> <address
>&Richard.J.Moore.mail;</address>
</affiliation>
</author>

<author
><firstname
>Robert</firstname
> <othername
>L.</othername
> <surname
>McCormick</surname
> <affiliation
> <address
>&Robert.L.McCormick.mail;</address>
</affiliation>
</author>

<author
><firstname
>Brad</firstname
> <surname
>Hards</surname
> <affiliation
> <address
>&Brad.Hards.mail;</address>
</affiliation>
</author>

<othercredit role="reviewer"
><firstname
>Lauri</firstname
> <surname
>Watts</surname
> <affiliation
> <address
>&Lauri.Watts.mail;</address>
</affiliation>
<contrib
>Korrigeerija</contrib>
</othercredit>

<othercredit role="developer"
><firstname
>Richard</firstname
> <othername
>J.</othername
> <surname
>Moore</surname
> <affiliation
> <address
>&Richard.J.Moore.mail;</address>
</affiliation>
<contrib
>Arendaja</contrib>
</othercredit>

<othercredit role="developer"
><firstname
>Matthias</firstname
> <surname
>Ettrich</surname
> <affiliation
> <address
>&Matthias.Ettrich.mail;</address>
</affiliation>
<contrib
>Arendaja</contrib>
</othercredit>

<othercredit role="translator"
><firstname
>Marek</firstname
><surname
>Laane</surname
><affiliation
><address
><email
>bald@starman.ee</email
></address
></affiliation
><contrib
>Tõlge eesti keelde</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
>2010-08-26</date>
<releaseinfo
>0.8.1 (&kde; 4.5)</releaseinfo>

<abstract>
<para
>&ksnapshot; on lihtne ekraanipiltide ehk hetktõmmiste võtmise aplett. See suudab "pildistada" nii tervet töölauda, ühtainust akent, akna osa kui ka valitud piirkonda. Pilte on võimalik salvestada paljudesse vormingutesse.</para>
</abstract>

<keywordset>
<keyword
>KDE</keyword>
<keyword
>KSnapshot</keyword>
<keyword
>kdegraphics</keyword>
<keyword
>ekraanipilt</keyword>
<keyword
>hetktõmmis</keyword>
</keywordset>

</bookinfo>

<chapter id="introduction">
<title
>Sissejuhatus</title>

<para
>&ksnapshot; on lihtne ekraanipiltide ehk hetktõmmiste võtmise aplett. See suudab "pildistada" nii tervet töölauda, ühtainust akent, akna osa kui ka valitud piirkonda. Pilte on võimalik salvestada paljudesse vormingutesse.</para>

<para
>Palun anna ükspuha millisest probleemist või soovist teada <ulink url="http://bugs.kde.org/"
>&kde; veajälgimissüsteemis</ulink
>.</para>

</chapter>

<chapter id="using-ksapshot">
<title
>&ksnapshot;i kasutamine</title>

<para
>See peatükk kirjeldab &ksnapshot;i kasutamist ekraanil nähtava pildistamiseks.</para>

<sect1 id="starting">
<title
>&ksnapshot;i käivitamine</title>

<para
>&ksnapshot;i käivitamiseks on olemas mitu võimalust.</para>

<itemizedlist>
<listitem>
<para
>&ksnapshot; on võimalik käivitada rakenduste käivitajast: <menuchoice
> <guisubmenu
>Rakendused</guisubmenu
><guisubmenu
>Graafika</guisubmenu
> <guimenuitem
>Töölaua pildistamine (&ksnapshot;)</guimenuitem
></menuchoice
>. </para
></listitem>
<listitem>
<para
>&ksnapshot; on võimalik käivitada ka järgmise käsurea korraldusega:</para>
<screen width="40"
><prompt
>%</prompt
> <command
>ksnapshot &amp;</command
>
</screen>
</listitem>
<listitem
><para
>&ksnapshot;i käivitamiseks saab kasutada ka mini-käsurida &krunner; (selle käivitab kiirklahv <keycombo action="simul"
>&Alt;<keycap
>F2</keycap
></keycombo
>).</para
></listitem>
</itemizedlist>

<para
>Kui &ksnapshot; on käivitatud, ilmub selline aken: <mediaobject>
<imageobject>
<imagedata fileref="window.png" format="PNG"/>
</imageobject>
<textobject
><phrase
>&ksnapshot;i eelvaatluse aken</phrase>
</textobject>
</mediaobject>
</para>

</sect1>

<sect1 id="taking-snapshot">
<title
>Ekraani pildistamine</title>

<para
>&ksnapshot; võtab kogu töölauast pildi otsekohe käivitamise ajal, kuid enne seda, kui ta ise ennast töölauale seab. See võimaldab kiiresti luua hetktõmmiseid kogu töölauast.</para>

<para
>Pilt, mille &ksnapshot; teeb, on näha eelvaatluse aknas, mis asub &ksnapshot;i rakenduseaknas üleval vasakul. Alltoodu on näide &ksnapshot;i eelvaatluse aknast. Sinu eelvaatlus võib erineda sõltuvalt sellest, mis töölaual parajasti näha on.</para>

<mediaobject>
<imageobject>
<imagedata fileref="preview.png" format="PNG"/>
</imageobject>
<textobject
><phrase
>&ksnapshot;i eelvaatluse aken</phrase>
</textobject>
</mediaobject>

<para
>Tehtud pildi saab salvestada klõpsuga nupule <guibutton
>Salvesta kui...</guibutton
> (<keycombo action="simul"
>&Ctrl;<keycap
>S</keycap
></keycombo
>). Kui teha mitu pilti, lisatakse failinimi automaatselt, et vältida varasemate piltide ülekirjutamist. Sul on siiski võimalik alati anda failile nimi oma tahtmist mööda, sealhulgas ka varem võetud ja salvestatud pildifaili nimi. </para>

<para
>Pildi tegemiseks ühestainsast aknast tuleb valida võimalus <guilabel
>Aken kursori all</guilabel
> (liitkastis <guilabel
>Pildistamise režiim</guilabel
>) ning vajutada nuppu <guibutton
>Uus pilt</guibutton
> (<keycombo action="simul"
>&Ctrl;<keycap
>N</keycap
></keycombo
>).</para>

<para
>Sõltuvalt sellest, milliseks on määratud <guilabel
>Pildistamise viivitus</guilabel
>, tekib hiirekursori asemele rist (valiku <guilabel
>Puudub</guilabel
> korral) või võid rakenduses edasi töötada, kuni viivitus läbi saab ja võetakse pilt.</para>

<para
>Võimaluse <guilabel
>Puudub</guilabel
> valimisel tehakse pilt kohe, kui klõpsad aknal.</para>

<para
>&ksnapshot; näitab uut pilti eelvaatluse aknas ning sul on võimalik valida selle salvestamine (klõpsates nupule <guibutton
>Salvesta kui...</guibutton
>) või võtta uus, klõpsates nupule <guibutton
>Uus pilt</guibutton
>.</para>

<para
>Uue pildi tegemiseks kogu töölauast tuleb liitkastis valida võimalus <guilabel
>Täisekraan</guilabel
> ja klõpsata nupule <guibutton
>Uus pilt</guibutton
>. Seejärel teeb &ksnapshot; pildi kogu töölauast, kui vajutad nuppu <guibutton
>Uus pilt</guibutton
>.</para>

<para
>Teatud töölaua piirkonna pildistamiseks vali liitkastis võimalus <guilabel
>Piirkond</guilabel
>, määra <guilabel
>pildistamise viivitus</guilabel
>e väärtuseks <guilabel
>Puudub</guilabel
> ning klõpsa nupule <guibutton
>Uus pilt</guibutton
>. Hiirekursor võtab risti kuju ning sa võid hiirega valida piirkonna, mida soovid pildistada. Pildistamiseks vajuta &Enter; või tee topeltklõps, väljumiseks vajuta &Esc;.</para>

<para
>Akna teatud osa pildistamiseks vali liitkastis võimalus <guilabel
>Akna osa</guilabel
> ning klõpsa nupule <guibutton
>Uus pilt</guibutton
>. Kui pildistamise viivituseks on määratud <guilabel
>Puudub</guilabel
>, võtab hiirekursor võtab risti kuju ning sul tuleb &HVNga; klõpsata aknasse. Kursori all olev akna osa tõstetakse punase piirdega esile. Vali hiirega vajalik osa ja klõpsa pildistamiseks &HVNga;. </para>

<para
>Mitme ekraani korral pildistatakse <guilabel
>aktiivse ekraani</guilabel
> valimisel seda ekraani, kus asub pildistamise hetkel hiirekursor.</para>
</sect1>

<sect1 id="additional-features">
<title
>Lisavõimalused</title>

<sect2 id="delay">
<title
>Pildistamise viivitus</title>

<para
>Kastis <guilabel
>Pildistamise viivitus</guilabel
> saab sisestada suvalise viivituse (sekundites) ehk aja, mis jääb nupule <guibutton
>Uus pilt</guibutton
> vajutamise ning pildi tegeliku tegemise vahele.</para>

<para
>Kui viivitus on määratud, ei ole vaja klõpsata pildi tegemiseks. See võimaldab avada näiteks hüpikmenüü ja seda pildistada.</para>

</sect2>

<sect2 id="window-decoration">
<title
>Kaasa arvatud akna dekoratsioond</title>

<para
><guilabel
>Kaasa arvatud akna dekoratsioonid</guilabel
> on režiimis <guilabel
>Aken kursori all</guilabel
> vaikimisi sisse lülitatud.</para>

<para
>Kui soovid pildistada ainult rakendust ilma seda ümbritsevate akna dekoratsioonideta, lülita see võimalus välja ja võta uus pilt.</para>

</sect2>

<sect2 id="open-snapshot">
<title
>Pildi avamine</title>

<para
>Kui soovid tehtud pilti näha või muuta, klõpsa nupule <guibutton
>Ava rakendusega...</guibutton
>, vali rippmenüüst vajalik rakendus ning vaata või muuda pilti.</para>
</sect2>

<!-- not in 4.1
<sect2 id="print-snapshot">
<title
>Print</title>

<para
>When you want to print your snapshot from the preview, just click
<guibutton
>Print...</guibutton
> and you get the standard &kde; Print dialog, from
where you can directly print your snapshot.</para>
</sect2>
-->
<sect2 id="copy-snapshot">
<title
>Kopeeri lõikepuhvrisse</title>

<para
>Kui soovid tehtud pilti ilma salvestamata mõnes graafikarakenduses redigeerida, klõpsa nupule <guibutton
>Kopeeri lõikepuhvrisse</guibutton
> (<keycombo action="simul"
>&Ctrl;<keycap
>C</keycap
></keycombo
>) ja aseta pilt mõnda pildinäitajasse või graafikarakendusse.</para>
</sect2>


<sect2 id="bottom-buttons">
<title
>Nupud</title>

<para
>&ksnapshot;i akna allosas on veel kaks nuppu.</para>

<variablelist>
<varlistentry>
<term
><guibutton
>Abi</guibutton
></term>
<listitem
><para
>Avab menüü, kus saab avada <guimenuitem
>&ksnapshot;i käsiraamat</guimenuitem
>u, anda teada veast, lülitada &ksnapshot;i keelt ning näha mõningat infot <guimenuitem
>&ksnapshot;i</guimenuitem
> ja <guimenuitem
>&kde;</guimenuitem
> kohta. </para
></listitem>
</varlistentry>

<varlistentry>
<term
><guibutton
>Välju</guibutton
></term>
<listitem
><para
>Lõpetab &ksnapshot;i töö.</para
></listitem>
</varlistentry>
</variablelist>

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

<chapter id="dcop">

<title
>&DBus;i liides</title>

<para
>&DBus;i liides võimaldab juhtida &ksnapshot;ti skriptidega.</para>

<para
>&DBus;i liidest saab kasutada kahel moel: &Qt; &GUI; <application
>qdbusviewer</application
> ja käsureal <application
>qdbus</application
>. </para>

<para
>Näited: <itemizedlist mark='opencircle'>

<listitem
><para
><prompt
>&percnt;</prompt
> <command
>qdbus</command
> näitab kõiki saadaolevaid teenuseid. </para
></listitem>

<listitem
><para
><prompt
>&percnt;</prompt
> <command
>qdbus</command
> <option
>org.kde.ksnapshot-`pidof -s ksnapshot`</option
> näitab &DBus;i &ksnapshot;i liidest. </para
></listitem>

<listitem
><para
><prompt
>&percnt;</prompt
> <command
>qdbus</command
> <option
>org.kde.ksnapshot-`pidof -s ksnapshot` /KSnapshot</option
> näitab meetodeid, millega juhtida &ksnapshot;ti. </para
></listitem>

</itemizedlist>
</para>

<para
>Täpsemalt kõneleb sellest <ulink url="http://techbase.kde.org/Development/Tutorials/D-Bus/Introduction"
>&DBus;i algtutvustus</ulink
>. </para>

<!--
kdedev@rebutia:~/svn$ qdbus org.kde.ksnapshot-10484
/
/KDebug
/KSnapshot
/MainApplication
kdedev@rebutia:~/svn$ qdbus org.kde.ksnapshot-10484 /
method QString org.freedesktop.DBus.Introspectable.Introspect()

kdedev@rebutia:~/svn$ qdbus org.kde.ksnapshot-10484 /KSnapshot
method void org.kde.ksnapshot.slotGrab()
method void org.kde.ksnapshot.slotOpen(QString application)
method void org.kde.ksnapshot.slotSave()
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()

kdedev@rebutia:~/svn$ qdbus org.kde.ksnapshot-10484 /MainApplication
method void org.kde.KApplication.quit()
method void org.kde.KApplication.reparseConfiguration()
method void org.kde.KApplication.updateUserTimestamp()
method void org.kde.KApplication.updateUserTimestamp(int time)
property readwrite int com.trolltech.Qt.QApplication.cursorFlashTime
property readwrite int com.trolltech.Qt.QApplication.doubleClickInterval
property readwrite QSize com.trolltech.Qt.QApplication.globalStrut
property readwrite int com.trolltech.Qt.QApplication.keyboardInputInterval
property readwrite bool com.trolltech.Qt.QApplication.quitOnLastWindowClosed
property readwrite int com.trolltech.Qt.QApplication.startDragDistance
property readwrite int com.trolltech.Qt.QApplication.startDragTime
property readwrite QString com.trolltech.Qt.QApplication.styleSheet
property readwrite int com.trolltech.Qt.QApplication.wheelScrollLines
property readwrite QString com.trolltech.Qt.QCoreApplication.applicationName
property readwrite QString com.trolltech.Qt.QCoreApplication.applicationVersion
property readwrite QString com.trolltech.Qt.QCoreApplication.organizationDomain
property readwrite QString com.trolltech.Qt.QCoreApplication.organizationName
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()

kdedev@rebutia:~/svn$ qdbus org.kde.ksnapshot-10484 /KDebug
method void org.kde.KDebug.notifyKDebugConfigChanged()
method void org.kde.KDebug.printBacktrace()
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
-->
<!-- dbus-launch ksnapshot-->
<!-- ksnapshot qdbus org.kde.ksnapshot-20985-->
<!--
<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 
<literal
>grabMode</literal
>, 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 <literal
>setGrabMode</literal
>,
which requires an argument to identify the mode required (as for <literal
>grabMode</literal
>).
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 <literal
>timeout</literal
>, 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
(capture on click).
</para>

<para
>You can set the timeout using <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 
<literal
>url</literal
>, 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 <literal
>setURL</literal
>,
which requires a string argument to identify the new path. So you can
set the path to <literal
>file:///home/bradh/snapshot.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 <literal
>slotGrab</literal
>,
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 use <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 
<literal
>slotCopy</literal
>, 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 <literal
>slotMovePointer</literal
>, 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 <literal
>printSlot</literal
>, 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 <literal
>exit</literal
>,
as shown below.
<screen width="60"
>
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface exit</command>
</screen>
</para>

</sect1>
-->
</chapter>

<chapter id="credits">

<title
>Autorid ja litsents</title>

<para
>Rakenduse autoriõigus</para>
<itemizedlist>
<listitem
><para
>1997-2000 &Richard.J.Moore; &Richard.J.Moore.mail;</para
></listitem>
<listitem
><para
>2000 &Matthias.Ettrich; &Matthias.Ettrich.mail;</para
></listitem>
</itemizedlist>

<para
>Dokumentatsiooni aluseks oleva originaali autoriõigus 1997-2000: &Richard.J.Moore; &Richard.J.Moore.mail;</para>
<para
>Tõlge eesti keelde: Marek Laane <email
>bald@starman.ee</email
></para
> 
&underFDL; &underGPL; </chapter>

&documentation.index;
</book>

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




