463
518
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
464
519
method QString org.freedesktop.DBus.Introspectable.Introspect()
467
>&DBus;i liides võimaldab juhtida &ksnapshot;ti skriptidega. Käesolevas osas selgitatakse, milliseid &DCOP;-väljakutseid saab kasutada, ning tuuakse mõned näited nende kasutamise kohta.</para>
470
>Nagu &DBus;i väljakutsetega ikka, tuleb määrata rakendus, mida soovid kasutada, ja konkreetne liides. &ksnapshot;i korral tuvastab rakenduse <literal
472
>, kus kriipsule järgneb protsessinumber.</para>
473
521
<!-- dbus-launch ksnapshot-->
474
522
<!-- ksnapshot qdbus org.kde.ksnapshot-20985-->
476
>&ksnapshot;i käivitamiseks ja vajaliku argumendi leidmiseks anna käsk <command
525
>To start &ksnapshot; and obtain the right argument, use
477
527
>dcopstart ksnapshot</command
478
>, mis tagastab standardväljundis argumendi (näiteks <computeroutput
529
argument (such as <computeroutput
479
530
>ksnapshot-20594</computeroutput
532
standard output.</para>
483
>Saadaolevate &DCOP;-liideste nimekirja õigete argumentide leidmiseks saab nii: <screen width="60"
487
>dcop `dcopstart ksnapshot` interface</command
535
>You can get a list of the available &DCOP; interfaces, use
536
the right arguments, as shown in this example:
539
<prompt>$</prompt> <command>dcop `dcopstart ksnapshot` interface</command><computeroutput>
489
540
QCStringList interfaces()
490
541
QCStringList functions()
503
554
void slotMovePointer(int x,int y)
511
>Järgnevates näidetes on protsessiks alati <computeroutput
561
In the examples following, the process is always
512
563
>ksnapshot-23151</computeroutput
515
567
<sect1 id="dcop-settings">
518
>&DCOP; seadistuste kasutamiseks</title>
521
>Kõigi graafilises kasutajaliideses (&GUI;) juhitavate seadistuste puhul on võimalik &DCOP;-i abil nii teada saada antud seadistuse hetkestaatus kui ka seda muuta. </para>
524
>Pildistamise režiimi staatuse saab teada väljakutsega <literal
570
>&DCOP; Access to Settings</title>
573
>For each of the settings that you can control with the
574
&GUI;, you can both obtain the current status of that setting,
575
and modify the setting, using &DCOP;.
579
>You can obtain the current capture mode using
525
581
>grabMode</literal
526
>, nagu allpool näha: <screen width="60">
530
>dcop ksnapshot-23151 interface grabMode</command>
532
> See tagastab <computeroutput
585
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface grabMode</command>
587
This will return <computeroutput
533
588
>0</computeroutput
534
> täisekraani, <computeroutput
589
> for full-screen capture,
535
591
>1</computeroutput
536
> akna ja <computeroutput
538
> piirkonna puhul. </para>
592
> for window capture, and <computeroutput
541
>Pildistamise režiimi saab määrata väljakutsega <literal
598
>You can set the capture mode using <literal
542
599
>setGrabMode</literal
543
>, millele tuleb argumendina lisada vajalik režiim (parajasti kehtiva väärtuse saab leida väljakutsega <literal
601
which requires an argument to identify the mode required (as for <literal
544
602
>grabMode</literal
545
>). Niisiis saab näiteks akna pildistamise (<command
604
So you can set window capture mode (<command
547
>) määrata nii: <screen width="60"
551
>dcop ksnapshot-23151 interface setGrabMode 1</command
609
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface setGrabMode 1</command>
557
>Viivituse kehtiva staatuse (graafilise kasutajaliidese valik <guilabel
558
>Pildistamise viivitus</guilabel
559
>) saab teada väljakutsega <literal
614
>You can obtain the current timeout setting (the <guilabel
615
>Snapshot delay:</guilabel>
616
&GUI; item) using <literal
560
617
>timeout</literal
561
>, nagu allpool näha: <screen width="60">
565
>dcop ksnapshot-23151 interface timeout</command>
567
> See tagastab viivituse sekundites või nulli, kui viivitus puudub (klõpsuga tehakse pilt). </para>
621
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface timeout</command>
623
This will return the timeout setting in seconds, or zero if there is no delay
570
>Viivituse saab määrata väljakutsega <literal
628
>You can set the timeout using <literal
571
629
>setTime</literal
572
>, mis vajab argumendiks viivituse aega. Nii saab näiteks neljasekundilise viivituse määrata järgmiselt: <screen width="60"
576
>dcop ksnapshot-23151 interface setTime 4</command
631
which requires an argument to identify the timeout duration. So you can
632
set a delay of 4 seconds using:
635
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface setTime 4</command>
582
>Asukoha, kuhu tehtud pilt parajasti salvestatakse, saab teada väljakutsega <literal
640
>You can obtain the path that the snapshot will be saved to using
584
>, nagu allpool näha: <screen width="60">
588
>dcop ksnapshot-23151 interface url</command>
590
> See tagastab failinime &URL;-ina (nt. <computeroutput
646
<prompt>$</prompt><command>dcop ksnapshot-23151 interface url</command>
648
This will return the filename, as a &URL; (eg as
591
650
>file:///home/bradh/test2.png</computeroutput
595
>Salvestamise asukoha saab määrata väljakutsega <literal
655
>You can set the path using <literal
597
>, mis nõuab argumendina uut asukohta tuvastavat stringi. Nii saab asukohaks määrata <literal
598
>file:///home/bradh/snapshot4.jpg</literal
599
> järgmisel viisil: <screen width="60"
603
>dcop ksnapshot-23151 interface setURL file:///home/bradh/snapshot.jpg</command
658
which requires a string argument to identify the new path. So you can
659
set the path to <literal
660
>file:///home/bradh/snapshot.jpg</literal>
664
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface setURL file:///home/bradh/snapshot.jpg</command>
610
670
<sect1 id="dcop-snapshot">
612
>&DCOP; ekraanipiltide võtmiseks</title>
672
>Taking Screenshots with &DCOP;</title>
615
>&DCOP; võimaldab ekraanipilte teha väljakutsega <literal
675
The key to taking screenshots with &DCOP; is use of <literal
616
676
>slotGrab</literal
617
>, nagu allpool näha: <screen width="60"
621
>dcop ksnapshot-23151 interface slotGrab</command
681
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface slotGrab</command>
627
>Sellega saab teha pildi parajasti kehtivat režiimi ja viivitust kasutades (neist oli juttu eespool). Tehtud pildi salvestamiseks saab kasutada mitut väljakutset. Kui tahad salvestada pildi lihtsalt parajasti kehtivasse asukohta (nagu selle tagastab <literal
686
This will take a snapshot using the current snapshot mode and timeout settings
687
(as described above). If you want to save the snapshot image, there are a
688
number of calls you can use. If you just want to save the image to the current
689
path (as returned by <literal
629
>; seda saab muuta väljakutsega <literal
631
>), võid kasutada väljakutset <literal
694
>), you can use <literal
632
695
>slotSave</literal
633
>, nagu allpool näha: <screen width="60"
637
>dcop ksnapshot-23151 interface slotSave</command
700
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface slotSave</command>
643
>Kui soovid, et kasutaja saaks määrata failinime (ja asukoha), kasuta väljakutset <literal
705
If you want the user to be able to specify a filename (and path), you can use
644
707
>slotSaveAs</literal
645
>, mis avab &kde; tavapärase faili salvestamise dialoogi.</para>
708
>, which will bring up a standard &kde; file
648
>Kui soovid salvestada pildi teise nimega (või teise asukohta) ilma asukohta väljakutsega <literal
712
If you want to save the image to a different name (or path) without
713
changing the path with <literal
650
> muutmata, saab kasutada väljakutset <literal
652
>, millele tuleb argumendina lisada salvestamise asukoht &URL;-ina. Niisiis, kui soovid näiteks salvestada pildi asukohta <filename
718
>, providing the &URL; to save to as an argument. So if you
719
want to save the snapshot to <filename
653
720
>file:///tmp/tempshot.png</filename
654
>, talita järgmiselt: <screen width="60">
658
>dcop ksnapshot-23151 interface save file:///tmp/tempshot.png</command>
660
> Pane tähele, et see tagastab tõese väärtuse, kui salvestamine õnnestus, vastasel juhul aga väära väärtuse. Samuti tuleks tähele panna, et kui selline fail on juba olemas, avatakse tavapärane &kde; dialoog, kus kasutajal tuleb määrata, kas kirjutada varasem fail üle või mitte. </para>
722
can do the following:
725
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface save file:///tmp/tempshot.png</command>
727
Note that this will return true if the snapshot was successfully saved, and false
728
otherwise. Also, you should be aware that if the file already exists, the user
729
will get a standard &kde; dialog that requires the user to decide whether to overwrite
663
>Lisaks pildi salvestamisele saab selle ka lõikepuhvrisse kopeerida, milleks on mõeldud allpool nähaolev väljakutse <literal
734
In addition to saving the snapshot, you can also copy it to the clipboard, using
664
736
>slotCopy</literal
665
>: <screen width="60"
669
>dcop ksnapshot-23151 interface slotCopy</command
740
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface slotCopy</command>
675
>Kui soovid valida akna, mis ei asu hiirekursori all, saab kasutada väljakutset <literal
745
If you need to select a window that may not be under the mouse cursor, you
676
747
>slotMovePointer</literal
677
>, millele tuleb argumentidena anda X-positsioon (ekraani pikslites) ja Y-positsioon (samuti ekraani pikslites). Niisiis tuleb hiire liigutamiseks ekraani ülemisse vasakusse nurka (0,0) talitada järgmiselt: <screen width="60"
681
>dcop ksnapshot-23151 interface slotMoveMouse 0 0</command
748
>, passing the x position
749
(in screen pixels) and the y position (also in screen pixels) as arguments.
750
So to move the mouse to the top left hand corner of the screen (0,0), you
751
can do the following:
754
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface slotMoveMouse 0 0</command>
687
759
<sect1 id="dcop-print">
689
>&DCOP; ekraanipiltide trükkimiseks</title>
761
>Printing Screenshots with &DCOP;</title>
692
>Aktiivse ekraanipildi (olgu see salvestatud või salvestamata) saab trükkida väljakutsega <literal
764
You can print the current screenshot (which may or may not have been saved)
693
766
>printSlot</literal
694
>, nagu allpool näha: <screen width="60"
698
>dcop ksnapshot-23151 interface slotPrint</command
770
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface slotPrint</command>
704
>Arvestage, et see avab &kde; tavapärase trükkimisdialoogi, mis võib vajada kasutajapoolset tegevust. </para>
775
Note that this will bring up the normal &kde; print dialog, which may require
708
781
<sect1 id="dcop-exit">
710
>&DCOP; rakenduse juhtimiseks</title>
783
>&DCOP; Application control</title>
713
>&ksnapshot;i saab panna ennast sulgema käsuga <literal
786
You can cause &ksnapshot; to exit by using <literal
715
>, nagu allpool näha. <screen width="60"
719
>dcop ksnapshot-23151 interface exit</command
792
<prompt>$</prompt> <command>dcop ksnapshot-23151 interface exit</command>
728
800
<chapter id="credits">