
%
% anyremote configuration file for digikam/KDE4 (http://www.digikam.org/) management (Server-mode)
%

% STATUS nonstable
% XTEST yes
% SOUND no
% ENV no
% IPC DBUS

GuiAppName=Digikam/KDE4
GuiAppBinary=digikam
GuiAppVersion=echo 'V=`digikam -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`; if [ "x$V" == "x4" ]; then echo OK; else echo NOK; fi'|bash -f -s
GuiAppRun=echo 'A=`qdbus|grep digikam`; if [ "x$A" == "x" ]; then echo NOK; else echo OK; fi'|bash -f -s
GuiAppIcon=digikam.png
GuiAppType=Application
GuiAppProtocols=Server
GuiAppDesc=digiKam is an advanced digital photo management application for KDE

[Protocol]=Server

(Init)=Include($(CfgDir)/Utils/aliases-server.cfg);\
	Exec(echo 'V=`digikam -v|grep KDE|tr -d " "|cut -f 2 -d ":"|cut -f 1 -d "."`;if [ "x$V" == "x3" ]; then $(CfgDir)/Utils/message.sh "ERROR: this configuration file is for KDE4"; fi'|bash -f -s);

(Connect)=Macro(DIGIKAM_SETUP);\
	Exec(echo 'D=`qdbus|grep digikam`; if [ "x$D" == "x" ]; then digikam  2> /dev/null & fi'|bash -f -s);\
	Exec(sleep 3;qdbus `qdbus|grep digikam` /digikam/Digikam com.trolltech.Qt.QWidget.showFullScreen 2> /dev/null);\
	Emulate(sleep,15000,mousemove,200,300,mouse,1);

DIGIKAM_SETUP=Set(status,Normal);\
	Set(icons,Digikam,1,prev,2,up,3,next,4,left,5,default,6,right,7,default,8,down,9,default,0,folder,*,question,#,pause);\

(EnterMode)=Macro(DIGIKAM_SETUP);

Cancel=Exec(echo 'D=`qdbus|grep digikam`; if [ "x$D" != "x" ]; then qdbus $D /MainApplication quit; fi'|bash -f -s);Exit
Back=Set(text,close);

1=Emulate(key,Page_Up)
2=Emulate(key,Up)
3=Emulate(key,Page_Down)

4=Emulate(key,Left)
6=Emulate(key,Right)

8=Emulate(key,Down)

* *=Set(text,replace,Help,2 Up\n 4 Left\n 6 Right\n 7 Previous\n 8 Down\n 9 Next\n 0 Detailed view\n * # Run/Quit\n * * - Help\n # Mouse mode)
* #=Exec(echo 'D=`qdbus|grep digikam`; if [ "x$D" == "x" ]; then digikam 2> /dev/null & else qdbus $D /MainApplication quit; fi'|bash -f -s);\
	Exec(sleep 3;qdbus `qdbus|grep digikam` /digikam/Digikam com.trolltech.Qt.QWidget.showFullScreen 2> /dev/null);\
	Emulate(sleep,15000,mousemove,200,300,mouse,1);
0=Make(mode,Viewer);
#=Make(mode,Mouse);


[Mode]=Viewer

(EnterMode)=Set(status,Viewer);\
	Set(icons,SAME,1,prev,2,default,3,next,4,default,5,default,6,default,7,minus,8,default,9,plus,0,folder,*,question,#,pause);\
	Emulate(sleep,1000,mousemove,500,300,mouse,1,key,Return);

1=Emulate(key,Page_Up)
2=Make(none)
3=Emulate(key,Page_Down)

4=Make(none)
5=Make(none)
6=Make(none)

% Size - / Size +
7=Exec(qdbus `qdbus|grep digikam` /digikam/Digikam/actions/album_zoomout com.trolltech.Qt.QAction.trigger)
8=Make(none)
9=Exec(qdbus `qdbus|grep digikam` /digikam/Digikam/actions/album_zoomin com.trolltech.Qt.QAction.trigger)

* *=Set(text,replace,Help,1 Previous\n 3 Next\n 7 Size -\n 9 Size +\n 0 Album mode\n * * Help\n # Mouse mode)
0=Emulate(key,Escape);\
	Emulate(sleep,1000,mousemove,200,300,mouse,1);\
	Make(mode,default);
#=Make(mode,Mouse);

[ModeEnd]


[Mode]=Mouse

(EnterMode)=Set(status,Mouse);\
	Set(icons,SAME,1,stop,2,up,3,stop,4,left,5,default,6,right,7,default,8,down,9,default,0,folder,*,question,#,pause);
1=Emulate(mousedown,1,sleep,100,mouseup,1)
2=Emulate(mousermove,0,-18)
3=Emulate(mousedown,3,sleep,100,mouseup,3)

4=Emulate(mousermove,-18,0)
5=Make(none)
6=Emulate(mousermove,18,0)

7=Make(none)
8=Emulate(mousermove,0,18)
9=Make(none)

* *=Set(text,replace,Help,1 LMB\n 2 Move up\n 3 RMB\n 4 Move left\n 6 Move right\n 8 Move down\n 0 Detailed view\n * * Help\n # Album view);
0=Make(mode,Viewer);
#=Make(mode,default);

[ModeEnd]

% Aliases for AverMedia IR remote
ZOOM=Macro(5)
TEXT=Macro(*)
POWER=Macro(#)

[End]
