sshfs-mapper: Added qt-mapper experiment.
git-svn-id: https://websvn.glenux.net/svn/Upoc/sshfs-mapper/trunk@1683 eaee96b3-f302-0410-b096-c6cfd47f7835
This commit is contained in:
parent
80f2efb64b
commit
927979c380
5 changed files with 161 additions and 0 deletions
BIN
qt-mapper/qtsshfsmapper.32.png
Normal file
BIN
qt-mapper/qtsshfsmapper.32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 777 B |
BIN
qt-mapper/qtsshfsmapper.64.png
Normal file
BIN
qt-mapper/qtsshfsmapper.64.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
qt-mapper/qtsshfsmapper.png
Normal file
BIN
qt-mapper/qtsshfsmapper.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
41
qt-mapper/qtsshfsmapper.rb
Executable file
41
qt-mapper/qtsshfsmapper.rb
Executable file
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/ruby
|
||||
|
||||
require 'Qt4'
|
||||
|
||||
app = Qt::Application.new(ARGV)
|
||||
si = Qt::SystemTrayIcon.new
|
||||
|
||||
std_icon = Qt::Icon.new('qtsshfsmapper.32.png')
|
||||
alt_icon = Qt::Icon.new
|
||||
blinking = false
|
||||
|
||||
si.icon = std_icon
|
||||
si.show
|
||||
|
||||
Qt::Timer.new(app) do |timer|
|
||||
timer.connect(SIGNAL('timeout()')) do
|
||||
si.icon = (si.icon.isNull ? std_icon : alt_icon) if blinking
|
||||
end
|
||||
timer.start(500)
|
||||
end
|
||||
|
||||
menu = Qt::Menu.new
|
||||
quit = Qt::Action.new('&Quit', menu)
|
||||
|
||||
quit.connect(SIGNAL(:triggered)) { app.quit }
|
||||
menu.addAction(quit)
|
||||
|
||||
si.contextMenu = menu
|
||||
|
||||
si.connect(SIGNAL('activated(QSystemTrayIcon::ActivationReason)')) do |reason|
|
||||
case reason
|
||||
when Qt::SystemTrayIcon::Trigger
|
||||
blinking = !blinking
|
||||
si.icon = blinking ? alt_icon : std_icon
|
||||
when Qt::SystemTrayIcon::MiddleClick: puts 'Middle Click'
|
||||
when Qt::SystemTrayIcon::Context: puts 'Right Click'
|
||||
when Qt::SystemTrayIcon::DoubleClick: puts 'Double Click'
|
||||
end
|
||||
end
|
||||
|
||||
app.exec
|
120
qt-mapper/qtsshfsmapper.svg
Normal file
120
qt-mapper/qtsshfsmapper.svg
Normal file
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="210mm"
|
||||
height="297mm"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.47 r22583"
|
||||
sodipodi:docname="qtsshfsmapper.svg"
|
||||
inkscape:export-filename="/home/warbrain/qtsshfsmapper.32.png"
|
||||
inkscape:export-xdpi="6.3357625"
|
||||
inkscape:export-ydpi="6.3357625">
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 526.18109 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="744.09448 : 526.18109 : 1"
|
||||
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
|
||||
id="perspective10" />
|
||||
<inkscape:perspective
|
||||
id="perspective2826"
|
||||
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||
inkscape:vp_z="1 : 0.5 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_x="0 : 0.5 : 1"
|
||||
sodipodi:type="inkscape:persp3d" />
|
||||
<inkscape:perspective
|
||||
id="perspective2848"
|
||||
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||
inkscape:vp_z="1 : 0.5 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_x="0 : 0.5 : 1"
|
||||
sodipodi:type="inkscape:persp3d" />
|
||||
<inkscape:perspective
|
||||
id="perspective2870"
|
||||
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||
inkscape:vp_z="1 : 0.5 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_x="0 : 0.5 : 1"
|
||||
sodipodi:type="inkscape:persp3d" />
|
||||
<inkscape:perspective
|
||||
id="perspective2894"
|
||||
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||
inkscape:vp_z="1 : 0.5 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_x="0 : 0.5 : 1"
|
||||
sodipodi:type="inkscape:persp3d" />
|
||||
<inkscape:perspective
|
||||
id="perspective2917"
|
||||
inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
|
||||
inkscape:vp_z="1 : 0.5 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_x="0 : 0.5 : 1"
|
||||
sodipodi:type="inkscape:persp3d" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.7"
|
||||
inkscape:cx="799.43832"
|
||||
inkscape:cy="496.71725"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="976"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1">
|
||||
<sodipodi:guide
|
||||
orientation="1,0"
|
||||
position="348.57143,635.71429"
|
||||
id="guide2933" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#ffff00;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 354.625 277.34375 C 326.23113 299.46176 303.56645 327.89978 293.9375 360.53125 C 268.22322 447.67412 351.0979 506.2527 351 506.3125 C 350.90213 506.37227 443.04546 463.87809 505.65625 529.71875 C 553.03856 579.54534 558.94748 666.83071 538.40625 730.90625 L 576.03125 730.90625 L 576.03125 277.34375 L 354.625 277.34375 z "
|
||||
id="path2816-2-0-5" />
|
||||
<path
|
||||
style="fill:#000080;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 417.21875 492.8125 C 380.56207 492.84018 351.40794 506.25201 351.40625 506.1875 C 351.40343 506.07286 342.10633 607.10404 253.78125 628.40625 C 210.86635 638.75645 163.1174 626.57338 122.46875 603.34375 L 122.46875 730.90625 L 538.90625 730.90625 C 559.46911 666.82553 553.55251 579.49751 506.15625 529.65625 C 478.76403 500.85097 445.7295 492.79097 417.21875 492.8125 z "
|
||||
id="path2931" />
|
||||
<path
|
||||
style="fill:#aa0000;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 122.46875 277.34375 L 122.46875 603.90625 C 163.08325 627.07745 210.73416 639.21186 253.59375 628.875 C 341.91883 607.57279 351.2118 506.53885 351.3125 506.59375 C 351.4132 506.64863 268.56696 448.08036 294.28125 360.9375 C 303.97006 328.1032 326.85807 299.52026 355.5 277.34375 L 122.46875 277.34375 z "
|
||||
id="path2816-2-0" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 4.8 KiB |
Loading…
Reference in a new issue