Merge pull request #1382 from marcofernandezheras/Customizable-shortcuts
Customizable shortcuts
This commit is contained in:
commit
b2ab2c6eba
31 changed files with 2858 additions and 428 deletions
|
@ -94,6 +94,9 @@ SET(cockatrice_SOURCES
|
|||
src/qt-json/json.cpp
|
||||
src/soundengine.cpp
|
||||
src/pending_command.cpp
|
||||
src/shortcutssettings.cpp
|
||||
src/sequenceEdit/sequenceedit.cpp
|
||||
src/sequenceEdit/shortcutstab.cpp
|
||||
${VERSION_STRING_CPP}
|
||||
)
|
||||
|
||||
|
|
|
@ -1,337 +1,329 @@
|
|||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<file alias="back.svg" >resources/back.svg</file>
|
||||
<file>resources/lock.svg</file>
|
||||
<file>resources/icon_delete.svg</file>
|
||||
<file>resources/icon_tab_changed.svg</file>
|
||||
<file>resources/icon_config_general.svg</file>
|
||||
<file>resources/icon_config_appearance.svg</file>
|
||||
<file>resources/icon_config_interface.svg</file>
|
||||
<file>resources/icon_config_messages.svg</file>
|
||||
<file>resources/icon_config_deckeditor.svg</file>
|
||||
<file>resources/icon_config_sound.svg</file>
|
||||
<file>resources/phases/icon_phase_untap.svg</file>
|
||||
<file>resources/phases/icon_phase_upkeep.svg</file>
|
||||
<file>resources/phases/icon_phase_draw.svg</file>
|
||||
<file>resources/phases/icon_phase_main1.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_start.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_attackers.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_blockers.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_damage.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_end.svg</file>
|
||||
<file>resources/phases/icon_phase_main2.svg</file>
|
||||
<file>resources/phases/icon_phase_cleanup.svg</file>
|
||||
<file>resources/phases/icon_phase_nextturn.svg</file>
|
||||
<file>resources/icon_settings.svg</file>
|
||||
<file>resources/hand.svg</file>
|
||||
<file>resources/pencil.svg</file>
|
||||
<file>resources/icon_search_black.svg</file>
|
||||
<file>resources/icon_clearsearch.svg</file>
|
||||
<file>resources/icon_update.png</file>
|
||||
<file>resources/icon_view.svg</file>
|
||||
<file>resources/hr.jpg</file>
|
||||
<file alias="resources/appicon.svg">resources/cockatrice.svg</file>
|
||||
|
||||
<file>resources/add_to_sideboard.svg</file>
|
||||
<file>resources/decrement.svg</file>
|
||||
<file>resources/increment.svg</file>
|
||||
<file>resources/remove_row.svg</file>
|
||||
<file>resources/arrow_left_green.svg</file>
|
||||
<file>resources/arrow_right_green.svg</file>
|
||||
|
||||
<file>resources/arrow_top_green.svg</file>
|
||||
<file>resources/arrow_up_green.svg</file>
|
||||
<file>resources/arrow_down_green.svg</file>
|
||||
<file>resources/arrow_bottom_green.svg</file>
|
||||
|
||||
<file>resources/icon_ready_start.svg</file>
|
||||
<file>resources/icon_not_ready_start.svg</file>
|
||||
<file>resources/icon_conceded.svg</file>
|
||||
<file>resources/icon_player.svg</file>
|
||||
<file>resources/icon_spectator.svg</file>
|
||||
|
||||
<file>resources/replay_start.svg</file>
|
||||
<file>resources/replay_fastforward.svg</file>
|
||||
<file>resources/replay_pause.svg</file>
|
||||
|
||||
<file>resources/genders/male.svg</file>
|
||||
<file>resources/genders/female.svg</file>
|
||||
<file>resources/genders/unknown.svg</file>
|
||||
|
||||
<file>resources/countries/ad.svg</file>
|
||||
<file>resources/countries/ae.svg</file>
|
||||
<file>resources/countries/af.svg</file>
|
||||
<file>resources/countries/ag.svg</file>
|
||||
<file>resources/countries/ai.svg</file>
|
||||
<file>resources/countries/al.svg</file>
|
||||
<file>resources/countries/am.svg</file>
|
||||
<file>resources/countries/ao.svg</file>
|
||||
<file>resources/countries/aq.svg</file>
|
||||
<file>resources/countries/ar.svg</file>
|
||||
<file>resources/countries/as.svg</file>
|
||||
<file>resources/countries/at.svg</file>
|
||||
<file>resources/countries/au.svg</file>
|
||||
<file>resources/countries/aw.svg</file>
|
||||
<file>resources/countries/ax.svg</file>
|
||||
<file>resources/countries/az.svg</file>
|
||||
<file>resources/countries/ba.svg</file>
|
||||
<file>resources/countries/bb.svg</file>
|
||||
<file>resources/countries/bd.svg</file>
|
||||
<file>resources/countries/be.svg</file>
|
||||
<file>resources/countries/bf.svg</file>
|
||||
<file>resources/countries/bg.svg</file>
|
||||
<file>resources/countries/bh.svg</file>
|
||||
<file>resources/countries/bi.svg</file>
|
||||
<file>resources/countries/bj.svg</file>
|
||||
<file>resources/countries/bl.svg</file>
|
||||
<file>resources/countries/bm.svg</file>
|
||||
<file>resources/countries/bn.svg</file>
|
||||
<file>resources/countries/bo.svg</file>
|
||||
<file>resources/countries/bq.svg</file>
|
||||
<file>resources/countries/br.svg</file>
|
||||
<file>resources/countries/bs.svg</file>
|
||||
<file>resources/countries/bt.svg</file>
|
||||
<file>resources/countries/bv.svg</file>
|
||||
<file>resources/countries/bw.svg</file>
|
||||
<file>resources/countries/by.svg</file>
|
||||
<file>resources/countries/bz.svg</file>
|
||||
<file>resources/countries/ca.svg</file>
|
||||
<file>resources/countries/cc.svg</file>
|
||||
<file>resources/countries/cd.svg</file>
|
||||
<file>resources/countries/cf.svg</file>
|
||||
<file>resources/countries/cg.svg</file>
|
||||
<file>resources/countries/ch.svg</file>
|
||||
<file>resources/countries/ci.svg</file>
|
||||
<file>resources/countries/ck.svg</file>
|
||||
<file>resources/countries/cl.svg</file>
|
||||
<file>resources/countries/cm.svg</file>
|
||||
<file>resources/countries/cn.svg</file>
|
||||
<file>resources/countries/co.svg</file>
|
||||
<file>resources/countries/cr.svg</file>
|
||||
<file>resources/countries/cu.svg</file>
|
||||
<file>resources/countries/cv.svg</file>
|
||||
<file>resources/countries/cw.svg</file>
|
||||
<file>resources/countries/cx.svg</file>
|
||||
<file>resources/countries/cy.svg</file>
|
||||
<file>resources/countries/cz.svg</file>
|
||||
<file>resources/countries/de.svg</file>
|
||||
<file>resources/countries/dj.svg</file>
|
||||
<file>resources/countries/dk.svg</file>
|
||||
<file>resources/countries/dm.svg</file>
|
||||
<file>resources/countries/do.svg</file>
|
||||
<file>resources/countries/dz.svg</file>
|
||||
<file>resources/countries/ec.svg</file>
|
||||
<file>resources/countries/ee.svg</file>
|
||||
<file>resources/countries/eg.svg</file>
|
||||
<file>resources/countries/eh.svg</file>
|
||||
<file>resources/countries/er.svg</file>
|
||||
<file>resources/countries/es.svg</file>
|
||||
<file>resources/countries/et.svg</file>
|
||||
<file>resources/countries/fi.svg</file>
|
||||
<file>resources/countries/fj.svg</file>
|
||||
<file>resources/countries/fk.svg</file>
|
||||
<file>resources/countries/fm.svg</file>
|
||||
<file>resources/countries/fo.svg</file>
|
||||
<file>resources/countries/fr.svg</file>
|
||||
<file>resources/countries/ga.svg</file>
|
||||
<file>resources/countries/gb.svg</file>
|
||||
<file>resources/countries/gd.svg</file>
|
||||
<file>resources/countries/ge.svg</file>
|
||||
<file>resources/countries/gf.svg</file>
|
||||
<file>resources/countries/gg.svg</file>
|
||||
<file>resources/countries/gh.svg</file>
|
||||
<file>resources/countries/gi.svg</file>
|
||||
<file>resources/countries/gl.svg</file>
|
||||
<file>resources/countries/gm.svg</file>
|
||||
<file>resources/countries/gn.svg</file>
|
||||
<file>resources/countries/gp.svg</file>
|
||||
<file>resources/countries/gq.svg</file>
|
||||
<file>resources/countries/gr.svg</file>
|
||||
<file>resources/countries/gs.svg</file>
|
||||
<file>resources/countries/gt.svg</file>
|
||||
<file>resources/countries/gu.svg</file>
|
||||
<file>resources/countries/gw.svg</file>
|
||||
<file>resources/countries/gy.svg</file>
|
||||
<file>resources/countries/hk.svg</file>
|
||||
<file>resources/countries/hm.svg</file>
|
||||
<file>resources/countries/hn.svg</file>
|
||||
<file>resources/countries/hr.svg</file>
|
||||
<file>resources/countries/ht.svg</file>
|
||||
<file>resources/countries/hu.svg</file>
|
||||
<file>resources/countries/id.svg</file>
|
||||
<file>resources/countries/ie.svg</file>
|
||||
<file>resources/countries/il.svg</file>
|
||||
<file>resources/countries/im.svg</file>
|
||||
<file>resources/countries/in.svg</file>
|
||||
<file>resources/countries/io.svg</file>
|
||||
<file>resources/countries/iq.svg</file>
|
||||
<file>resources/countries/ir.svg</file>
|
||||
<file>resources/countries/is.svg</file>
|
||||
<file>resources/countries/it.svg</file>
|
||||
<file>resources/countries/je.svg</file>
|
||||
<file>resources/countries/jm.svg</file>
|
||||
<file>resources/countries/jo.svg</file>
|
||||
<file>resources/countries/jp.svg</file>
|
||||
<file>resources/countries/ke.svg</file>
|
||||
<file>resources/countries/kg.svg</file>
|
||||
<file>resources/countries/kh.svg</file>
|
||||
<file>resources/countries/ki.svg</file>
|
||||
<file>resources/countries/km.svg</file>
|
||||
<file>resources/countries/kn.svg</file>
|
||||
<file>resources/countries/kp.svg</file>
|
||||
<file>resources/countries/kr.svg</file>
|
||||
<file>resources/countries/kw.svg</file>
|
||||
<file>resources/countries/ky.svg</file>
|
||||
<file>resources/countries/kz.svg</file>
|
||||
<file>resources/countries/la.svg</file>
|
||||
<file>resources/countries/lb.svg</file>
|
||||
<file>resources/countries/lc.svg</file>
|
||||
<file>resources/countries/li.svg</file>
|
||||
<file>resources/countries/lk.svg</file>
|
||||
<file>resources/countries/lr.svg</file>
|
||||
<file>resources/countries/ls.svg</file>
|
||||
<file>resources/countries/lt.svg</file>
|
||||
<file>resources/countries/lu.svg</file>
|
||||
<file>resources/countries/lv.svg</file>
|
||||
<file>resources/countries/ly.svg</file>
|
||||
<file>resources/countries/ma.svg</file>
|
||||
<file>resources/countries/mc.svg</file>
|
||||
<file>resources/countries/md.svg</file>
|
||||
<file>resources/countries/me.svg</file>
|
||||
<file>resources/countries/mf.svg</file>
|
||||
<file>resources/countries/mg.svg</file>
|
||||
<file>resources/countries/mh.svg</file>
|
||||
<file>resources/countries/mk.svg</file>
|
||||
<file>resources/countries/ml.svg</file>
|
||||
<file>resources/countries/mm.svg</file>
|
||||
<file>resources/countries/mn.svg</file>
|
||||
<file>resources/countries/mo.svg</file>
|
||||
<file>resources/countries/mp.svg</file>
|
||||
<file>resources/countries/mq.svg</file>
|
||||
<file>resources/countries/mr.svg</file>
|
||||
<file>resources/countries/ms.svg</file>
|
||||
<file>resources/countries/mt.svg</file>
|
||||
<file>resources/countries/mu.svg</file>
|
||||
<file>resources/countries/mv.svg</file>
|
||||
<file>resources/countries/mw.svg</file>
|
||||
<file>resources/countries/mx.svg</file>
|
||||
<file>resources/countries/my.svg</file>
|
||||
<file>resources/countries/mz.svg</file>
|
||||
<file>resources/countries/na.svg</file>
|
||||
<file>resources/countries/nc.svg</file>
|
||||
<file>resources/countries/ne.svg</file>
|
||||
<file>resources/countries/nf.svg</file>
|
||||
<file>resources/countries/ng.svg</file>
|
||||
<file>resources/countries/ni.svg</file>
|
||||
<file>resources/countries/nl.svg</file>
|
||||
<file>resources/countries/no.svg</file>
|
||||
<file>resources/countries/np.svg</file>
|
||||
<file>resources/countries/nr.svg</file>
|
||||
<file>resources/countries/nu.svg</file>
|
||||
<file>resources/countries/nz.svg</file>
|
||||
<file>resources/countries/om.svg</file>
|
||||
<file>resources/countries/pa.svg</file>
|
||||
<file>resources/countries/pe.svg</file>
|
||||
<file>resources/countries/pf.svg</file>
|
||||
<file>resources/countries/pg.svg</file>
|
||||
<file>resources/countries/ph.svg</file>
|
||||
<file>resources/countries/pk.svg</file>
|
||||
<file>resources/countries/pl.svg</file>
|
||||
<file>resources/countries/pm.svg</file>
|
||||
<file>resources/countries/pn.svg</file>
|
||||
<file>resources/countries/pr.svg</file>
|
||||
<file>resources/countries/ps.svg</file>
|
||||
<file>resources/countries/pt.svg</file>
|
||||
<file>resources/countries/pw.svg</file>
|
||||
<file>resources/countries/py.svg</file>
|
||||
<file>resources/countries/qa.svg</file>
|
||||
<file>resources/countries/re.svg</file>
|
||||
<file>resources/countries/ro.svg</file>
|
||||
<file>resources/countries/rs.svg</file>
|
||||
<file>resources/countries/ru.svg</file>
|
||||
<file>resources/countries/rw.svg</file>
|
||||
<file>resources/countries/sa.svg</file>
|
||||
<file>resources/countries/sb.svg</file>
|
||||
<file>resources/countries/sc.svg</file>
|
||||
<file>resources/countries/sd.svg</file>
|
||||
<file>resources/countries/se.svg</file>
|
||||
<file>resources/countries/sg.svg</file>
|
||||
<file>resources/countries/sh.svg</file>
|
||||
<file>resources/countries/si.svg</file>
|
||||
<file>resources/countries/sj.svg</file>
|
||||
<file>resources/countries/sk.svg</file>
|
||||
<file>resources/countries/sl.svg</file>
|
||||
<file>resources/countries/sm.svg</file>
|
||||
<file>resources/countries/sn.svg</file>
|
||||
<file>resources/countries/so.svg</file>
|
||||
<file>resources/countries/sr.svg</file>
|
||||
<file>resources/countries/ss.svg</file>
|
||||
<file>resources/countries/st.svg</file>
|
||||
<file>resources/countries/sv.svg</file>
|
||||
<file>resources/countries/sx.svg</file>
|
||||
<file>resources/countries/sy.svg</file>
|
||||
<file>resources/countries/sz.svg</file>
|
||||
<file>resources/countries/tc.svg</file>
|
||||
<file>resources/countries/td.svg</file>
|
||||
<file>resources/countries/tf.svg</file>
|
||||
<file>resources/countries/tg.svg</file>
|
||||
<file>resources/countries/th.svg</file>
|
||||
<file>resources/countries/tj.svg</file>
|
||||
<file>resources/countries/tk.svg</file>
|
||||
<file>resources/countries/tl.svg</file>
|
||||
<file>resources/countries/tm.svg</file>
|
||||
<file>resources/countries/tn.svg</file>
|
||||
<file>resources/countries/to.svg</file>
|
||||
<file>resources/countries/tr.svg</file>
|
||||
<file>resources/countries/tt.svg</file>
|
||||
<file>resources/countries/tv.svg</file>
|
||||
<file>resources/countries/tw.svg</file>
|
||||
<file>resources/countries/tz.svg</file>
|
||||
<file>resources/countries/ua.svg</file>
|
||||
<file>resources/countries/ug.svg</file>
|
||||
<file>resources/countries/um.svg</file>
|
||||
<file>resources/countries/us.svg</file>
|
||||
<file>resources/countries/uy.svg</file>
|
||||
<file>resources/countries/uz.svg</file>
|
||||
<file>resources/countries/va.svg</file>
|
||||
<file>resources/countries/vc.svg</file>
|
||||
<file>resources/countries/ve.svg</file>
|
||||
<file>resources/countries/vg.svg</file>
|
||||
<file>resources/countries/vi.svg</file>
|
||||
<file>resources/countries/vn.svg</file>
|
||||
<file>resources/countries/vu.svg</file>
|
||||
<file>resources/countries/wf.svg</file>
|
||||
<file>resources/countries/ws.svg</file>
|
||||
<file>resources/countries/ye.svg</file>
|
||||
<file>resources/countries/yt.svg</file>
|
||||
<file>resources/countries/za.svg</file>
|
||||
<file>resources/countries/zm.svg</file>
|
||||
<file>resources/countries/zw.svg</file>
|
||||
|
||||
<file>resources/counters/w.svg</file>
|
||||
<file>resources/counters/w_highlight.svg</file>
|
||||
<file>resources/counters/u.svg</file>
|
||||
<file>resources/counters/u_highlight.svg</file>
|
||||
<file>resources/counters/b.svg</file>
|
||||
<file>resources/counters/b_highlight.svg</file>
|
||||
<file>resources/counters/r.svg</file>
|
||||
<file>resources/counters/r_highlight.svg</file>
|
||||
<file>resources/counters/g.svg</file>
|
||||
<file>resources/counters/g_highlight.svg</file>
|
||||
<file>resources/counters/storm.svg</file>
|
||||
<file>resources/counters/storm_highlight.svg</file>
|
||||
<file>resources/counters/general.svg</file>
|
||||
<file>resources/counters/general_highlight.svg</file>
|
||||
|
||||
<file>resources/userlevels/normal.svg</file>
|
||||
<file>resources/userlevels/registered.svg</file>
|
||||
<file>resources/userlevels/registered_buddy.svg</file>
|
||||
<file>resources/userlevels/moderator.svg</file>
|
||||
<file>resources/userlevels/moderator_buddy.svg</file>
|
||||
<file>resources/userlevels/admin.svg</file>
|
||||
<file>resources/userlevels/admin_buddy.svg</file>
|
||||
|
||||
<file>resources/news/exclamation_mark.svg</file>
|
||||
<file>resources/news/question_mark.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/">
|
||||
<file alias="back.svg">resources/back.svg</file>
|
||||
<file>resources/lock.svg</file>
|
||||
<file>resources/icon_delete.svg</file>
|
||||
<file>resources/icon_tab_changed.svg</file>
|
||||
<file>resources/icon_config_general.svg</file>
|
||||
<file>resources/icon_config_appearance.svg</file>
|
||||
<file>resources/icon_config_interface.svg</file>
|
||||
<file>resources/icon_config_messages.svg</file>
|
||||
<file>resources/icon_config_deckeditor.svg</file>
|
||||
<file>resources/icon_config_sound.svg</file>
|
||||
<file>resources/phases/icon_phase_untap.svg</file>
|
||||
<file>resources/phases/icon_phase_upkeep.svg</file>
|
||||
<file>resources/phases/icon_phase_draw.svg</file>
|
||||
<file>resources/phases/icon_phase_main1.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_start.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_attackers.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_blockers.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_damage.svg</file>
|
||||
<file>resources/phases/icon_phase_combat_end.svg</file>
|
||||
<file>resources/phases/icon_phase_main2.svg</file>
|
||||
<file>resources/phases/icon_phase_cleanup.svg</file>
|
||||
<file>resources/phases/icon_phase_nextturn.svg</file>
|
||||
<file>resources/icon_settings.svg</file>
|
||||
<file>resources/hand.svg</file>
|
||||
<file>resources/pencil.svg</file>
|
||||
<file>resources/icon_search_black.svg</file>
|
||||
<file>resources/icon_clearsearch.svg</file>
|
||||
<file>resources/icon_update.png</file>
|
||||
<file>resources/icon_view.svg</file>
|
||||
<file>resources/hr.jpg</file>
|
||||
<file alias="resources/appicon.svg">resources/cockatrice.svg</file>
|
||||
<file>resources/add_to_sideboard.svg</file>
|
||||
<file>resources/decrement.svg</file>
|
||||
<file>resources/increment.svg</file>
|
||||
<file>resources/remove_row.svg</file>
|
||||
<file>resources/arrow_left_green.svg</file>
|
||||
<file>resources/arrow_right_green.svg</file>
|
||||
<file>resources/arrow_top_green.svg</file>
|
||||
<file>resources/arrow_up_green.svg</file>
|
||||
<file>resources/arrow_down_green.svg</file>
|
||||
<file>resources/arrow_bottom_green.svg</file>
|
||||
<file>resources/icon_ready_start.svg</file>
|
||||
<file>resources/icon_not_ready_start.svg</file>
|
||||
<file>resources/icon_conceded.svg</file>
|
||||
<file>resources/icon_player.svg</file>
|
||||
<file>resources/icon_spectator.svg</file>
|
||||
<file>resources/replay_start.svg</file>
|
||||
<file>resources/replay_fastforward.svg</file>
|
||||
<file>resources/replay_pause.svg</file>
|
||||
<file>resources/genders/male.svg</file>
|
||||
<file>resources/genders/female.svg</file>
|
||||
<file>resources/genders/unknown.svg</file>
|
||||
<file>resources/countries/ad.svg</file>
|
||||
<file>resources/countries/ae.svg</file>
|
||||
<file>resources/countries/af.svg</file>
|
||||
<file>resources/countries/ag.svg</file>
|
||||
<file>resources/countries/ai.svg</file>
|
||||
<file>resources/countries/al.svg</file>
|
||||
<file>resources/countries/am.svg</file>
|
||||
<file>resources/countries/ao.svg</file>
|
||||
<file>resources/countries/aq.svg</file>
|
||||
<file>resources/countries/ar.svg</file>
|
||||
<file>resources/countries/as.svg</file>
|
||||
<file>resources/countries/at.svg</file>
|
||||
<file>resources/countries/au.svg</file>
|
||||
<file>resources/countries/aw.svg</file>
|
||||
<file>resources/countries/ax.svg</file>
|
||||
<file>resources/countries/az.svg</file>
|
||||
<file>resources/countries/ba.svg</file>
|
||||
<file>resources/countries/bb.svg</file>
|
||||
<file>resources/countries/bd.svg</file>
|
||||
<file>resources/countries/be.svg</file>
|
||||
<file>resources/countries/bf.svg</file>
|
||||
<file>resources/countries/bg.svg</file>
|
||||
<file>resources/countries/bh.svg</file>
|
||||
<file>resources/countries/bi.svg</file>
|
||||
<file>resources/countries/bj.svg</file>
|
||||
<file>resources/countries/bl.svg</file>
|
||||
<file>resources/countries/bm.svg</file>
|
||||
<file>resources/countries/bn.svg</file>
|
||||
<file>resources/countries/bo.svg</file>
|
||||
<file>resources/countries/bq.svg</file>
|
||||
<file>resources/countries/br.svg</file>
|
||||
<file>resources/countries/bs.svg</file>
|
||||
<file>resources/countries/bt.svg</file>
|
||||
<file>resources/countries/bv.svg</file>
|
||||
<file>resources/countries/bw.svg</file>
|
||||
<file>resources/countries/by.svg</file>
|
||||
<file>resources/countries/bz.svg</file>
|
||||
<file>resources/countries/ca.svg</file>
|
||||
<file>resources/countries/cc.svg</file>
|
||||
<file>resources/countries/cd.svg</file>
|
||||
<file>resources/countries/cf.svg</file>
|
||||
<file>resources/countries/cg.svg</file>
|
||||
<file>resources/countries/ch.svg</file>
|
||||
<file>resources/countries/ci.svg</file>
|
||||
<file>resources/countries/ck.svg</file>
|
||||
<file>resources/countries/cl.svg</file>
|
||||
<file>resources/countries/cm.svg</file>
|
||||
<file>resources/countries/cn.svg</file>
|
||||
<file>resources/countries/co.svg</file>
|
||||
<file>resources/countries/cr.svg</file>
|
||||
<file>resources/countries/cu.svg</file>
|
||||
<file>resources/countries/cv.svg</file>
|
||||
<file>resources/countries/cw.svg</file>
|
||||
<file>resources/countries/cx.svg</file>
|
||||
<file>resources/countries/cy.svg</file>
|
||||
<file>resources/countries/cz.svg</file>
|
||||
<file>resources/countries/de.svg</file>
|
||||
<file>resources/countries/dj.svg</file>
|
||||
<file>resources/countries/dk.svg</file>
|
||||
<file>resources/countries/dm.svg</file>
|
||||
<file>resources/countries/do.svg</file>
|
||||
<file>resources/countries/dz.svg</file>
|
||||
<file>resources/countries/ec.svg</file>
|
||||
<file>resources/countries/ee.svg</file>
|
||||
<file>resources/countries/eg.svg</file>
|
||||
<file>resources/countries/eh.svg</file>
|
||||
<file>resources/countries/er.svg</file>
|
||||
<file>resources/countries/es.svg</file>
|
||||
<file>resources/countries/et.svg</file>
|
||||
<file>resources/countries/fi.svg</file>
|
||||
<file>resources/countries/fj.svg</file>
|
||||
<file>resources/countries/fk.svg</file>
|
||||
<file>resources/countries/fm.svg</file>
|
||||
<file>resources/countries/fo.svg</file>
|
||||
<file>resources/countries/fr.svg</file>
|
||||
<file>resources/countries/ga.svg</file>
|
||||
<file>resources/countries/gb.svg</file>
|
||||
<file>resources/countries/gd.svg</file>
|
||||
<file>resources/countries/ge.svg</file>
|
||||
<file>resources/countries/gf.svg</file>
|
||||
<file>resources/countries/gg.svg</file>
|
||||
<file>resources/countries/gh.svg</file>
|
||||
<file>resources/countries/gi.svg</file>
|
||||
<file>resources/countries/gl.svg</file>
|
||||
<file>resources/countries/gm.svg</file>
|
||||
<file>resources/countries/gn.svg</file>
|
||||
<file>resources/countries/gp.svg</file>
|
||||
<file>resources/countries/gq.svg</file>
|
||||
<file>resources/countries/gr.svg</file>
|
||||
<file>resources/countries/gs.svg</file>
|
||||
<file>resources/countries/gt.svg</file>
|
||||
<file>resources/countries/gu.svg</file>
|
||||
<file>resources/countries/gw.svg</file>
|
||||
<file>resources/countries/gy.svg</file>
|
||||
<file>resources/countries/hk.svg</file>
|
||||
<file>resources/countries/hm.svg</file>
|
||||
<file>resources/countries/hn.svg</file>
|
||||
<file>resources/countries/hr.svg</file>
|
||||
<file>resources/countries/ht.svg</file>
|
||||
<file>resources/countries/hu.svg</file>
|
||||
<file>resources/countries/id.svg</file>
|
||||
<file>resources/countries/ie.svg</file>
|
||||
<file>resources/countries/il.svg</file>
|
||||
<file>resources/countries/im.svg</file>
|
||||
<file>resources/countries/in.svg</file>
|
||||
<file>resources/countries/io.svg</file>
|
||||
<file>resources/countries/iq.svg</file>
|
||||
<file>resources/countries/ir.svg</file>
|
||||
<file>resources/countries/is.svg</file>
|
||||
<file>resources/countries/it.svg</file>
|
||||
<file>resources/countries/je.svg</file>
|
||||
<file>resources/countries/jm.svg</file>
|
||||
<file>resources/countries/jo.svg</file>
|
||||
<file>resources/countries/jp.svg</file>
|
||||
<file>resources/countries/ke.svg</file>
|
||||
<file>resources/countries/kg.svg</file>
|
||||
<file>resources/countries/kh.svg</file>
|
||||
<file>resources/countries/ki.svg</file>
|
||||
<file>resources/countries/km.svg</file>
|
||||
<file>resources/countries/kn.svg</file>
|
||||
<file>resources/countries/kp.svg</file>
|
||||
<file>resources/countries/kr.svg</file>
|
||||
<file>resources/countries/kw.svg</file>
|
||||
<file>resources/countries/ky.svg</file>
|
||||
<file>resources/countries/kz.svg</file>
|
||||
<file>resources/countries/la.svg</file>
|
||||
<file>resources/countries/lb.svg</file>
|
||||
<file>resources/countries/lc.svg</file>
|
||||
<file>resources/countries/li.svg</file>
|
||||
<file>resources/countries/lk.svg</file>
|
||||
<file>resources/countries/lr.svg</file>
|
||||
<file>resources/countries/ls.svg</file>
|
||||
<file>resources/countries/lt.svg</file>
|
||||
<file>resources/countries/lu.svg</file>
|
||||
<file>resources/countries/lv.svg</file>
|
||||
<file>resources/countries/ly.svg</file>
|
||||
<file>resources/countries/ma.svg</file>
|
||||
<file>resources/countries/mc.svg</file>
|
||||
<file>resources/countries/md.svg</file>
|
||||
<file>resources/countries/me.svg</file>
|
||||
<file>resources/countries/mf.svg</file>
|
||||
<file>resources/countries/mg.svg</file>
|
||||
<file>resources/countries/mh.svg</file>
|
||||
<file>resources/countries/mk.svg</file>
|
||||
<file>resources/countries/ml.svg</file>
|
||||
<file>resources/countries/mm.svg</file>
|
||||
<file>resources/countries/mn.svg</file>
|
||||
<file>resources/countries/mo.svg</file>
|
||||
<file>resources/countries/mp.svg</file>
|
||||
<file>resources/countries/mq.svg</file>
|
||||
<file>resources/countries/mr.svg</file>
|
||||
<file>resources/countries/ms.svg</file>
|
||||
<file>resources/countries/mt.svg</file>
|
||||
<file>resources/countries/mu.svg</file>
|
||||
<file>resources/countries/mv.svg</file>
|
||||
<file>resources/countries/mw.svg</file>
|
||||
<file>resources/countries/mx.svg</file>
|
||||
<file>resources/countries/my.svg</file>
|
||||
<file>resources/countries/mz.svg</file>
|
||||
<file>resources/countries/na.svg</file>
|
||||
<file>resources/countries/nc.svg</file>
|
||||
<file>resources/countries/ne.svg</file>
|
||||
<file>resources/countries/nf.svg</file>
|
||||
<file>resources/countries/ng.svg</file>
|
||||
<file>resources/countries/ni.svg</file>
|
||||
<file>resources/countries/nl.svg</file>
|
||||
<file>resources/countries/no.svg</file>
|
||||
<file>resources/countries/np.svg</file>
|
||||
<file>resources/countries/nr.svg</file>
|
||||
<file>resources/countries/nu.svg</file>
|
||||
<file>resources/countries/nz.svg</file>
|
||||
<file>resources/countries/om.svg</file>
|
||||
<file>resources/countries/pa.svg</file>
|
||||
<file>resources/countries/pe.svg</file>
|
||||
<file>resources/countries/pf.svg</file>
|
||||
<file>resources/countries/pg.svg</file>
|
||||
<file>resources/countries/ph.svg</file>
|
||||
<file>resources/countries/pk.svg</file>
|
||||
<file>resources/countries/pl.svg</file>
|
||||
<file>resources/countries/pm.svg</file>
|
||||
<file>resources/countries/pn.svg</file>
|
||||
<file>resources/countries/pr.svg</file>
|
||||
<file>resources/countries/ps.svg</file>
|
||||
<file>resources/countries/pt.svg</file>
|
||||
<file>resources/countries/pw.svg</file>
|
||||
<file>resources/countries/py.svg</file>
|
||||
<file>resources/countries/qa.svg</file>
|
||||
<file>resources/countries/re.svg</file>
|
||||
<file>resources/countries/ro.svg</file>
|
||||
<file>resources/countries/rs.svg</file>
|
||||
<file>resources/countries/ru.svg</file>
|
||||
<file>resources/countries/rw.svg</file>
|
||||
<file>resources/countries/sa.svg</file>
|
||||
<file>resources/countries/sb.svg</file>
|
||||
<file>resources/countries/sc.svg</file>
|
||||
<file>resources/countries/sd.svg</file>
|
||||
<file>resources/countries/se.svg</file>
|
||||
<file>resources/countries/sg.svg</file>
|
||||
<file>resources/countries/sh.svg</file>
|
||||
<file>resources/countries/si.svg</file>
|
||||
<file>resources/countries/sj.svg</file>
|
||||
<file>resources/countries/sk.svg</file>
|
||||
<file>resources/countries/sl.svg</file>
|
||||
<file>resources/countries/sm.svg</file>
|
||||
<file>resources/countries/sn.svg</file>
|
||||
<file>resources/countries/so.svg</file>
|
||||
<file>resources/countries/sr.svg</file>
|
||||
<file>resources/countries/ss.svg</file>
|
||||
<file>resources/countries/st.svg</file>
|
||||
<file>resources/countries/sv.svg</file>
|
||||
<file>resources/countries/sx.svg</file>
|
||||
<file>resources/countries/sy.svg</file>
|
||||
<file>resources/countries/sz.svg</file>
|
||||
<file>resources/countries/tc.svg</file>
|
||||
<file>resources/countries/td.svg</file>
|
||||
<file>resources/countries/tf.svg</file>
|
||||
<file>resources/countries/tg.svg</file>
|
||||
<file>resources/countries/th.svg</file>
|
||||
<file>resources/countries/tj.svg</file>
|
||||
<file>resources/countries/tk.svg</file>
|
||||
<file>resources/countries/tl.svg</file>
|
||||
<file>resources/countries/tm.svg</file>
|
||||
<file>resources/countries/tn.svg</file>
|
||||
<file>resources/countries/to.svg</file>
|
||||
<file>resources/countries/tr.svg</file>
|
||||
<file>resources/countries/tt.svg</file>
|
||||
<file>resources/countries/tv.svg</file>
|
||||
<file>resources/countries/tw.svg</file>
|
||||
<file>resources/countries/tz.svg</file>
|
||||
<file>resources/countries/ua.svg</file>
|
||||
<file>resources/countries/ug.svg</file>
|
||||
<file>resources/countries/um.svg</file>
|
||||
<file>resources/countries/us.svg</file>
|
||||
<file>resources/countries/uy.svg</file>
|
||||
<file>resources/countries/uz.svg</file>
|
||||
<file>resources/countries/va.svg</file>
|
||||
<file>resources/countries/vc.svg</file>
|
||||
<file>resources/countries/ve.svg</file>
|
||||
<file>resources/countries/vg.svg</file>
|
||||
<file>resources/countries/vi.svg</file>
|
||||
<file>resources/countries/vn.svg</file>
|
||||
<file>resources/countries/vu.svg</file>
|
||||
<file>resources/countries/wf.svg</file>
|
||||
<file>resources/countries/ws.svg</file>
|
||||
<file>resources/countries/ye.svg</file>
|
||||
<file>resources/countries/yt.svg</file>
|
||||
<file>resources/countries/za.svg</file>
|
||||
<file>resources/countries/zm.svg</file>
|
||||
<file>resources/countries/zw.svg</file>
|
||||
<file>resources/counters/w.svg</file>
|
||||
<file>resources/counters/w_highlight.svg</file>
|
||||
<file>resources/counters/u.svg</file>
|
||||
<file>resources/counters/u_highlight.svg</file>
|
||||
<file>resources/counters/b.svg</file>
|
||||
<file>resources/counters/b_highlight.svg</file>
|
||||
<file>resources/counters/r.svg</file>
|
||||
<file>resources/counters/r_highlight.svg</file>
|
||||
<file>resources/counters/g.svg</file>
|
||||
<file>resources/counters/g_highlight.svg</file>
|
||||
<file>resources/counters/storm.svg</file>
|
||||
<file>resources/counters/storm_highlight.svg</file>
|
||||
<file>resources/counters/general.svg</file>
|
||||
<file>resources/counters/general_highlight.svg</file>
|
||||
<file>resources/userlevels/normal.svg</file>
|
||||
<file>resources/userlevels/registered.svg</file>
|
||||
<file>resources/userlevels/registered_buddy.svg</file>
|
||||
<file>resources/userlevels/moderator.svg</file>
|
||||
<file>resources/userlevels/moderator_buddy.svg</file>
|
||||
<file>resources/userlevels/admin.svg</file>
|
||||
<file>resources/userlevels/admin_buddy.svg</file>
|
||||
<file>resources/news/exclamation_mark.svg</file>
|
||||
<file>resources/news/question_mark.svg</file>
|
||||
<file>resources/icon_config_shorcuts.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
161
cockatrice/resources/icon_config_shorcuts.svg
Normal file
161
cockatrice/resources/icon_config_shorcuts.svg
Normal file
|
@ -0,0 +1,161 @@
|
|||
<?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:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="500"
|
||||
height="500"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="icon_config_shorcuts.svg">
|
||||
<defs
|
||||
id="defs4">
|
||||
<inkscape:path-effect
|
||||
effect="bend_path"
|
||||
id="path-effect3618"
|
||||
is_visible="true"
|
||||
bendpath="m 142.49072,814.69439 c 81.91729,17.90777 153.31508,14.77655 218.89021,0"
|
||||
prop_scale="1"
|
||||
scale_y_rel="false"
|
||||
vertical="false"
|
||||
bendpath-nodetypes="cc" />
|
||||
<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="perspective4226"
|
||||
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" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient6464"
|
||||
id="linearGradient6470"
|
||||
x1="32.090908"
|
||||
y1="1.8181819"
|
||||
x2="31.09091"
|
||||
y2="62.909088"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(0,-0.1818182)" />
|
||||
<linearGradient
|
||||
id="linearGradient6464">
|
||||
<stop
|
||||
style="stop-color:#0061ff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop6466" />
|
||||
<stop
|
||||
style="stop-color:#001c4c;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop6468" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient6482"
|
||||
id="linearGradient6488"
|
||||
x1="32.18182"
|
||||
y1="3.2835093"
|
||||
x2="32.18182"
|
||||
y2="13.02554"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0281354,0,0,1.0429299,-0.9963584,-0.6864152)" />
|
||||
<linearGradient
|
||||
id="linearGradient6482">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop6484" />
|
||||
<stop
|
||||
style="stop-color:#00ff00;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop6486" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
y2="13.02554"
|
||||
x2="32.18182"
|
||||
y1="3.2835093"
|
||||
x1="32.18182"
|
||||
gradientTransform="matrix(1.0281354,0,0,1.0429299,-0.9963584,-0.6864152)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient4241"
|
||||
xlink:href="#linearGradient6482"
|
||||
inkscape:collect="always" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.42293617"
|
||||
inkscape:cx="401.93458"
|
||||
inkscape:cy="251.13063"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="745"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1" />
|
||||
<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="Ebene 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-552.36218)">
|
||||
<g
|
||||
transform="matrix(7.8163235,0,0,7.8163235,-0.83292805,550.81868)"
|
||||
id="g4214">
|
||||
<rect
|
||||
ry="5.6363635"
|
||||
y="1.6363637"
|
||||
x="1.2727273"
|
||||
height="61.090908"
|
||||
width="61.636364"
|
||||
id="rect6462"
|
||||
style="fill:url(#linearGradient6470);fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-opacity:1" />
|
||||
<rect
|
||||
ry="4.7325583"
|
||||
y="2.7380548"
|
||||
x="2.1926003"
|
||||
height="13.251164"
|
||||
width="59.796619"
|
||||
id="rect6472"
|
||||
style="fill:url(#linearGradient4241);fill-opacity:1;fill-rule:nonzero;stroke:none" />
|
||||
</g>
|
||||
<image
|
||||
width="330.20697"
|
||||
height="335.80368"
|
||||
preserveAspectRatio="none"
|
||||
xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHYAAAB4CAYAAAAnrQZhAAAABmJLR0QA/wD/AP+gvaeTAAALCklE QVR4nO2dbWgcZR7Af/Oyu91umlfTNtFYxabVbg4xGmkqGAiUXoViWq4UvFMOPxz4wfOoekhR6CEn fqig/eCHgyLY3kXxgzmLePZDvdpcyhlSriW2tmI0TXurl43ZtG422ezO3Ic44+xm9mWyEyedPD94 2Hl2Zp59dn77f55nXleiPCLANmAtUAtUlbmewD2mgQQwAZwBJhdbUAD4LfBPYBbQRVo2KQP8G/gD sNpenz17gG+WwRcQqXT6H/A7QLIKzMkwH6V/YT5SF6AoCqtWrUKWZbvZBZFlGVVVkWXZ8bp26Lpe cRlLUZZd2Zqmoes62Wy24s9KpVJkMplCs/8B7AOuQ65YFegFfmVduq6ujnvuuYeWlhaqq6vLroQs y2zfvp27774bVVWd1N8WYwOVSj/Hck4IhUI0NDSwbt06rl27xuDgIMPDwyXLURQFVVXNFAgEUFWV VCrF119/zeDgIFeuXMlfrR/4JZC0iv0zcMBaoW3btrFx40ZHXwSgra2NHTt2OF6vGDerWANJkmhq auKuu+7i22+/5Z133iEWi5nzDZGGwPxXu+mLFy/y1ltvMTExYf2ovwK/McT+AhhivikmEomwa9cu 1qxZ4/gLdHV10dHR4XoTd7OLNaiurqatrQ1d1+nt7WV0dLSkwPxp6+v09DQvvPACIyMj1o/ZaYg9 Bvwa5pvQ3bt3U19f77jSnZ2dPPTQQ0vSb/lFLEBVVRXt7e1omsb7779PPB4vKdCuWTZeJycn2bt3 L9evXzc+4l8KsAY4wo/RGo1G2bRpk+PK1tbWsnv37iWRCuUPcrxazgnpdJq5uTkaGxu58847icVi rF69mqqqKqqqqohEIkQiEXO60HvhcJhgMEhNTQ3BYJD+/n7jI1pUoB3LvtDmzZsXVdk9e/agaVrF X3qlEIvFuPXWW4lEIrS3tzM6Olq0Xw0EAkhS/k7MTzz66KMcOnTIGDVLKrDBmCnLMnV1dY4rGQqF qK+vX7Jo9SO6rnPt2jU2bdpES0sLyWQSRVFypBYTmU9NTQ1NTU2MjY0BIAM1xsxQKOSoMIOtW7cK qYsgHo+j6zqqqrJ+/Xqqq6sJh8Mlo7MQDQ0N5nTlRwuADRs2lF5IsIB0Os3s7CwAwWCw4vKsPwZX xK5e7ehwpcCCIVZRFFfLdUWsG0eWVipzc3MArhxqteJuaYJlgxDrU4RYnyLE+hQh1qcsq+Gspmmc Pn2agYEBhoaGiMfjfP/99yiKQm1tLa2trdx3333s3LmT5uZmr6u7rFk2Yk+cOMHrr7+ef/rJJJVK EYvF+PTTTzl8+DAPP/wwzz77LLfffvvPXNObA8/FZrNZXn31VY4ePZrzfnV1NdFo1Dx9GI/HuXTp EolEAl3XOXXqFAMDA3z88ceLOr7tdzwXe/DgQd577z0z39HRwdNPP80DDzyQs9OuaRrZbJbz58/z 9ttvc+LECebm5swdfEEung6e+vr6cqQ+9dRTHD16lAcffND2SIwsy9x7770cOnSI3t5eWlpafs7q 3lR4FrHpdJrXXnvNzPf09PDMM8+Uvf6WLVt49913XT/G6hc8E9vX18f4+DgA4XCYAwcOlFhjIZFI xLXLVfyGZ03xyZMnzeldu3Y5urRVUBpPxGqaxtDQkJnv7Oz0ohq+xhOx4+Pj3Lhxw8xHo1EvquFr PBGbSCRy8rW1tV5Uw9d4IjaZTObkI5GIF9XwNZ6IzReZL1pQOZ6IzW9685tmQeV4IraxsTHnvqDP P//ci2r4Gk/EyrLM/fffb+bPnDnjRTV8jWcHKLq7u83p48ePW28oEriAZ2J7enq45ZZbgPlzra+8 8orjMpLJpHldriAXz8QGg0Gee+45M9/X18fhw4fLXv/ChQvs27dPDLwK4Olpu56eHvbu3Wvm33zz TZ544gkGBwdt79zTNI1z587x/PPP89hjj5k3IAkWsixOtIdCIY4dOwbAZ599xuOPP05NTQ3RaNS8 OmJiYoIvvvgiJ0JDoZAr97z4Ec/FKorCiy++SEdHB2+88YZ5zdPU1BQDAwO268iyTHd3N/v376eu rk6ctrPBc7EGO3bsYPv27Zw+fZr+/n7Onj3L+Pg4iUTCvG+3tbWV9vZ2HnnkEdavXy/OxRZh2YiF +Ujs6uqiq6trwbyleBaEnxEXjPsUIdanCLE+RYj1KUKsTxFifYoQ61OEWJ8ixPoUIdanCLE+RYj1 KUKsTxFifYoQ61OEWJ8ixPoUIdanCLE+RYj1KUKsTxFifYoQ61OEWJ8ixPoUIdanCLE+RYj1KUKs TxFifYoQ61OEWJ8ixPoUIdanCLE+RYj1KUKsTxFifYorYiVJcqMYgYu4InZmZsaNYlYkoVAImP/z RjdxRewPP/zgRjErkmUtdnh42I1iVhxVVVXmQz7dbvUqFitJEpcuXRL97CIwHsS9FH+XWrFY4+9A L1++XHFlVhLBYND8m9R4PE4mk3G1/IrEyrJsplOnTokHVzrgjjvuQFEUkskkU1NTZLNZV+UuWqwk STliNU2jr69PNMll0NTURHNzM7Ozs4yMjJhSs9msa4OoRYu1SjVSIpHgk08+EXKL0NzcTGtrK8lk kosXL5JOp02pmUyGTCZj+9h8pyxKrKIotmJlWebq1at88MEHpFIpIdhCKBRiy5YtbNy4katXr3L2 7FmSyWSOVCNis9lsxd2a4wdR5zfBdml6epoPP/yQ2267jba2NtasWbMi+99AIEBNTQ21tbWEw2HG x8cZHh4mnU4TCARQVRVJknISYE6r6uKfE+5oTUmSikZrfvruu++Ix+MoioKiKKxatcocRS8li/0R uf3j03WdK1eukMlkUFXVlBkIBBYItUvAouU6WssQ5lSwIXOlHXq0dkXZbLakRGve2M7GtnZK2WKt kpxKlWV5RTbFVjRNKyk3X7Lxaoh2Qlli7fpVJ1ErmKccsdZILSS9HMoSayerXKliZJxLJpNxFKnW 5KS/LblkKXGlBIP7g5KbBV3XbX/YxeSWSuX2t0XFltq1KTVfYI+u6zlyofDAqVBzXYqiYsuNVruo FU3wPIWiVtO0HLnWbVasOZYkydxdKkZBseWOdgtFreAnCsktd5RcSG4xbMWWamJL9bH5X0pQGEMu 5EZqqea41GDKdo7TfVTrrk/+L1OSJCG3CLquF4xcKNwclxpMLRDrVGp+1NpVXFAca39bTqTmi7fb 7q6IFf1qaQr1swZWuVA6Uu1G0FZcEyuonEoGU/n9bU7OyaBJ7No4p1TUgnO5YH/BvisRK3CPYoOp Us2x9coLFbhuZGZnZx1HrcAZ5URtOWeCYOGBjMnJSbMMFRgzMtlslqmpKRobG0UT7DFOzwRNT08T i8XM9WXgLGCeAb9w4YKI1mVC/vVQ+Re9Wa+T+uijj3IuOpeBBHDceGNoaIhEIuGKVLEPa4+T7VJI rlXwxMQER44csa42aBy2+AZ4EpA1TWNkZIRoNEo4HDavV7ImEa3uUG5Xlt8vW5vjmZkZXnrpJcbG xqyr/N4Q+1+gHtgKkEqlGB4eZt26daxdu3aBWIE7OBFrLG8dPH355Ze8/PLLjIyMWBfvAw5aSw4B fwd2WJfasGEDnZ2dbN68mYaGBkcDJtEUF8fp4FNVVVKpFF999RX9/f2cP38+fxv/B+gGJvNLDgN/ A3rsCg6Hw0QikbIqIaSWhxO5MzMzxe5FHmDe23ixMp78cQFdpGWfbgB/BMruIyPAfuAcoC2DLyBS broM/AlosJNXbjuwDugC1jIvXOANKWAC6AdGiy34f92AFnOZ6uyjAAAAAElFTkSuQmCC "
|
||||
id="image4221"
|
||||
x="89.958641"
|
||||
y="628.24109" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 8.6 KiB |
|
@ -1,5 +1,6 @@
|
|||
#include "abstractcounter.h"
|
||||
#include "player.h"
|
||||
#include "settingscache.h"
|
||||
#include <QPainter>
|
||||
#include <QMenu>
|
||||
#include <QAction>
|
||||
|
@ -17,6 +18,8 @@ AbstractCounter::AbstractCounter(Player *_player, int _id, const QString &_name,
|
|||
setAcceptHoverEvents(true);
|
||||
#endif
|
||||
|
||||
shortcutActive = false;
|
||||
|
||||
if (player->getLocal()) {
|
||||
menu = new QMenu(name);
|
||||
aSet = new QAction(this);
|
||||
|
@ -39,6 +42,8 @@ AbstractCounter::AbstractCounter(Player *_player, int _id, const QString &_name,
|
|||
} else
|
||||
menu = 0;
|
||||
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
retranslateUi();
|
||||
}
|
||||
|
||||
|
@ -65,14 +70,16 @@ void AbstractCounter::retranslateUi()
|
|||
void AbstractCounter::setShortcutsActive()
|
||||
{
|
||||
if (name == "life") {
|
||||
aSet->setShortcut(QKeySequence("Ctrl+L"));
|
||||
aDec->setShortcut(QKeySequence("F11"));
|
||||
aInc->setShortcut(QKeySequence("F12"));
|
||||
shortcutActive = true;
|
||||
aSet->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aSet"));
|
||||
aDec->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aDec"));
|
||||
aInc->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aInc"));
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractCounter::setShortcutsInactive()
|
||||
{
|
||||
shortcutActive = false;
|
||||
if (name == "life") {
|
||||
aSet->setShortcut(QKeySequence());
|
||||
aDec->setShortcut(QKeySequence());
|
||||
|
@ -80,6 +87,12 @@ void AbstractCounter::setShortcutsInactive()
|
|||
}
|
||||
}
|
||||
|
||||
void AbstractCounter::refreshShortcuts()
|
||||
{
|
||||
if(shortcutActive)
|
||||
setShortcutsActive();
|
||||
}
|
||||
|
||||
void AbstractCounter::setValue(int _value)
|
||||
{
|
||||
value = _value;
|
||||
|
|
|
@ -26,6 +26,7 @@ private:
|
|||
bool dialogSemaphore, deleteAfterDialog;
|
||||
bool shownInCounterArea;
|
||||
private slots:
|
||||
void refreshShortcuts();
|
||||
void incrementCounter();
|
||||
void setCounter();
|
||||
public:
|
||||
|
@ -44,6 +45,7 @@ public:
|
|||
|
||||
void setShortcutsActive();
|
||||
void setShortcutsInactive();
|
||||
bool shortcutActive;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <QMessageBox>
|
||||
#include "dlg_load_deck_from_clipboard.h"
|
||||
#include "deck_loader.h"
|
||||
#include "settingscache.h"
|
||||
|
||||
DlgLoadDeckFromClipboard::DlgLoadDeckFromClipboard(QWidget *parent)
|
||||
: QDialog(parent), deckList(0)
|
||||
|
@ -17,7 +18,6 @@ DlgLoadDeckFromClipboard::DlgLoadDeckFromClipboard(QWidget *parent)
|
|||
contentsEdit = new QPlainTextEdit;
|
||||
|
||||
refreshButton = new QPushButton(tr("&Refresh"));
|
||||
refreshButton->setShortcut(QKeySequence("F5"));
|
||||
connect(refreshButton, SIGNAL(clicked()), this, SLOT(actRefresh()));
|
||||
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
|
@ -35,6 +35,8 @@ DlgLoadDeckFromClipboard::DlgLoadDeckFromClipboard(QWidget *parent)
|
|||
resize(500, 500);
|
||||
|
||||
actRefresh();
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
}
|
||||
|
||||
void DlgLoadDeckFromClipboard::actRefresh()
|
||||
|
@ -42,6 +44,11 @@ void DlgLoadDeckFromClipboard::actRefresh()
|
|||
contentsEdit->setPlainText(QApplication::clipboard()->text());
|
||||
}
|
||||
|
||||
void DlgLoadDeckFromClipboard::refreshShortcuts()
|
||||
{
|
||||
refreshButton->setShortcut(settingsCache->shortcuts().getSingleShortcut("DlgLoadDeckFromClipboard/refreshButton"));
|
||||
}
|
||||
|
||||
void DlgLoadDeckFromClipboard::actOK()
|
||||
{
|
||||
QString buffer = contentsEdit->toPlainText();
|
||||
|
|
|
@ -12,6 +12,7 @@ class DlgLoadDeckFromClipboard : public QDialog {
|
|||
private slots:
|
||||
void actOK();
|
||||
void actRefresh();
|
||||
void refreshShortcuts();
|
||||
private:
|
||||
DeckLoader *deckList;
|
||||
public:
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "settingscache.h"
|
||||
#include "priceupdater.h"
|
||||
#include "soundengine.h"
|
||||
#include "sequenceEdit/shortcutstab.h"
|
||||
|
||||
#define LINKING_FAQ_URL "https://github.com/Cockatrice/Cockatrice/wiki/Custom-Download-URLs"
|
||||
|
||||
|
@ -863,6 +864,7 @@ DlgSettings::DlgSettings(QWidget *parent)
|
|||
pagesWidget->addWidget(new DeckEditorSettingsPage);
|
||||
pagesWidget->addWidget(new MessagesSettingsPage);
|
||||
pagesWidget->addWidget(new SoundSettingsPage);
|
||||
pagesWidget->addWidget(new ShortcutsTab);
|
||||
|
||||
createIcons();
|
||||
contentsWidget->setCurrentRow(0);
|
||||
|
@ -917,6 +919,11 @@ void DlgSettings::createIcons()
|
|||
soundButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
soundButton->setIcon(QIcon(":/resources/icon_config_sound.svg"));
|
||||
|
||||
shortcutsButton = new QListWidgetItem(contentsWidget);
|
||||
shortcutsButton->setTextAlignment(Qt::AlignHCenter);
|
||||
shortcutsButton->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled);
|
||||
shortcutsButton->setIcon(QIcon(":/resources/icon_config_shorcuts.svg"));
|
||||
|
||||
connect(contentsWidget, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWidgetItem *)));
|
||||
}
|
||||
|
||||
|
@ -1026,6 +1033,7 @@ void DlgSettings::retranslateUi()
|
|||
deckEditorButton->setText(tr("Deck Editor"));
|
||||
messagesButton->setText(tr("Chat"));
|
||||
soundButton->setText(tr("Sound"));
|
||||
shortcutsButton->setText(tr("Shortcuts"));
|
||||
|
||||
for (int i = 0; i < pagesWidget->count(); i++)
|
||||
dynamic_cast<AbstractSettingsPage *>(pagesWidget->widget(i))->retranslateUi();
|
||||
|
|
|
@ -224,6 +224,7 @@ private:
|
|||
QListWidget *contentsWidget;
|
||||
QStackedWidget *pagesWidget;
|
||||
QListWidgetItem *generalButton, *appearanceButton, *userInterfaceButton, *deckEditorButton, *messagesButton, *soundButton;
|
||||
QListWidgetItem *shortcutsButton;
|
||||
void createIcons();
|
||||
void retranslateUi();
|
||||
protected:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "gameview.h"
|
||||
#include "gamescene.h"
|
||||
#include "settingscache.h"
|
||||
#include <QResizeEvent>
|
||||
#include <QAction>
|
||||
#include <QRubberBand>
|
||||
|
@ -19,10 +20,11 @@ GameView::GameView(QGraphicsScene *scene, QWidget *parent)
|
|||
connect(scene, SIGNAL(sigStopRubberBand()), this, SLOT(stopRubberBand()));
|
||||
|
||||
aCloseMostRecentZoneView = new QAction(this);
|
||||
aCloseMostRecentZoneView->setShortcut(QKeySequence("Esc"));
|
||||
|
||||
connect(aCloseMostRecentZoneView, SIGNAL(triggered()), scene, SLOT(closeMostRecentZoneView()));
|
||||
addAction(aCloseMostRecentZoneView);
|
||||
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
rubberBand = new QRubberBand(QRubberBand::Rectangle, this);
|
||||
}
|
||||
|
||||
|
@ -59,3 +61,8 @@ void GameView::stopRubberBand()
|
|||
{
|
||||
rubberBand->hide();
|
||||
}
|
||||
|
||||
void GameView::refreshShortcuts()
|
||||
{
|
||||
aCloseMostRecentZoneView->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aCloseMostRecentZoneView"));
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ private slots:
|
|||
void startRubberBand(const QPointF &selectionOrigin);
|
||||
void resizeRubberBand(const QPointF &cursorPoint);
|
||||
void stopRubberBand();
|
||||
void refreshShortcuts();
|
||||
public slots:
|
||||
void updateSceneRect(const QRectF &rect);
|
||||
public:
|
||||
|
|
|
@ -454,6 +454,8 @@ Player::Player(const ServerInfo_User &info, int _id, bool _local, TabGame *_pare
|
|||
|
||||
rearrangeZones();
|
||||
retranslateUi();
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
}
|
||||
|
||||
Player::~Player()
|
||||
|
@ -616,6 +618,7 @@ void Player::retranslateUi()
|
|||
{
|
||||
aViewGraveyard->setText(tr("&View graveyard"));
|
||||
aViewRfg->setText(tr("&View exile"));
|
||||
|
||||
playerMenu->setTitle(tr("Player \"%1\"").arg(QString::fromStdString(userInfo->name())));
|
||||
graveMenu->setTitle(tr("&Graveyard"));
|
||||
rfgMenu->setTitle(tr("&Exile"));
|
||||
|
@ -684,50 +687,45 @@ void Player::retranslateUi()
|
|||
aPlay->setText(tr("&Play"));
|
||||
aHide->setText(tr("&Hide"));
|
||||
aPlayFacedown->setText(tr("Play &Face Down"));
|
||||
|
||||
aTap->setText(tr("&Tap"));
|
||||
aUntap->setText(tr("&Untap"));
|
||||
aDoesntUntap->setText(tr("Toggle &normal untapping"));
|
||||
aFlip->setText(tr("&Flip"));
|
||||
aPeek->setText(tr("&Peek at card face"));
|
||||
aClone->setText(tr("&Clone"));
|
||||
aClone->setShortcut(QKeySequence("Ctrl+J"));
|
||||
aAttach->setText(tr("Attac&h to card..."));
|
||||
aAttach->setShortcut(QKeySequence("Ctrl+A"));
|
||||
aUnattach->setText(tr("Unattac&h"));
|
||||
aDrawArrow->setText(tr("&Draw arrow..."));
|
||||
aIncP->setText(tr("&Increase power"));
|
||||
aIncP->setShortcut(QKeySequence("Ctrl++"));
|
||||
aDecP->setText(tr("&Decrease power"));
|
||||
aDecP->setShortcut(QKeySequence("Ctrl+-"));
|
||||
aIncT->setText(tr("I&ncrease toughness"));
|
||||
aIncT->setShortcut(QKeySequence("Alt++"));
|
||||
aDecT->setText(tr("D&ecrease toughness"));
|
||||
aDecT->setShortcut(QKeySequence("Alt+-"));
|
||||
aIncPT->setText(tr("In&crease power and toughness"));
|
||||
aIncPT->setShortcut(QKeySequence("Ctrl+Alt++"));
|
||||
aDecPT->setText(tr("Dec&rease power and toughness"));
|
||||
aDecPT->setShortcut(QKeySequence("Ctrl+Alt+-"));
|
||||
aSetPT->setText(tr("Set &power and toughness..."));
|
||||
aSetPT->setShortcut(QKeySequence("Ctrl+P"));
|
||||
aSetAnnotation->setText(tr("&Set annotation..."));
|
||||
|
||||
QStringList counterColors;
|
||||
counterColors.append(tr("Red"));
|
||||
counterColors.append(tr("Yellow"));
|
||||
counterColors.append(tr("Green"));
|
||||
for (int i = 0; i < aAddCounter.size(); ++i)
|
||||
|
||||
for (int i = 0; i < aAddCounter.size(); ++i){
|
||||
aAddCounter[i]->setText(tr("&Add counter (%1)").arg(counterColors[i]));
|
||||
for (int i = 0; i < aRemoveCounter.size(); ++i)
|
||||
}
|
||||
for (int i = 0; i < aRemoveCounter.size(); ++i){
|
||||
aRemoveCounter[i]->setText(tr("&Remove counter (%1)").arg(counterColors[i]));
|
||||
for (int i = 0; i < aSetCounter.size(); ++i)
|
||||
}
|
||||
for (int i = 0; i < aSetCounter.size(); ++i){
|
||||
aSetCounter[i]->setText(tr("&Set counters (%1)...").arg(counterColors[i]));
|
||||
}
|
||||
|
||||
aMoveToTopLibrary->setText(tr("&Top of library"));
|
||||
aMoveToBottomLibrary->setText(tr("&Bottom of library"));
|
||||
aMoveToHand->setText(tr("&Hand"));
|
||||
aMoveToGraveyard->setText(tr("&Graveyard"));
|
||||
aMoveToGraveyard->setShortcut(QKeySequence("Ctrl+Del"));
|
||||
aMoveToExile->setText(tr("&Exile"));
|
||||
|
||||
|
||||
QMapIterator<QString, CardZone *> zoneIterator(zones);
|
||||
while (zoneIterator.hasNext())
|
||||
zoneIterator.next().value()->retranslateUi();
|
||||
|
@ -737,24 +735,73 @@ void Player::setShortcutsActive()
|
|||
{
|
||||
shortcutsActive = true;
|
||||
|
||||
aViewSideboard->setShortcut(QKeySequence("Ctrl+F3"));
|
||||
aViewLibrary->setShortcut(QKeySequence("F3"));
|
||||
aViewTopCards->setShortcut(QKeySequence("Ctrl+W"));
|
||||
aViewGraveyard->setShortcut(QKeySequence("F4"));
|
||||
aDrawCard->setShortcut(QKeySequence("Ctrl+D"));
|
||||
aDrawCards->setShortcut(QKeySequence("Ctrl+E"));
|
||||
aUndoDraw->setShortcut(QKeySequence("Ctrl+Shift+D"));
|
||||
aMulligan->setShortcut(QKeySequence("Ctrl+M"));
|
||||
aShuffle->setShortcut(QKeySequence("Ctrl+S"));
|
||||
aUntapAll->setShortcut(QKeySequence("Ctrl+U"));
|
||||
aRollDie->setShortcut(QKeySequence("Ctrl+I"));
|
||||
aCreateToken->setShortcut(QKeySequence("Ctrl+T"));
|
||||
aCreateAnotherToken->setShortcut(QKeySequence("Ctrl+G"));
|
||||
aAlwaysRevealTopCard->setShortcut(QKeySequence("Ctrl+N"));
|
||||
aPlay->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aPlay"));
|
||||
aTap->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aTap"));
|
||||
aUntap->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aUntap"));
|
||||
aDoesntUntap->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aDoesntUntap"));
|
||||
aFlip->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aFlip"));
|
||||
aPeek->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aPeek"));
|
||||
aClone->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aClone"));
|
||||
aAttach->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aAttach"));
|
||||
aUnattach->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aUnattach"));
|
||||
aDrawArrow->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aDrawArrow"));
|
||||
aIncP->setShortcuts(settingsCache->shortcuts().getShortcut("Player/IncP"));
|
||||
aDecP->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aDecP"));
|
||||
aIncT->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aIncT"));
|
||||
aDecT->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aDecT"));
|
||||
aIncPT->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aIncPT"));
|
||||
aDecPT->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aDecPT"));
|
||||
aSetPT->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aSetPT"));
|
||||
aSetAnnotation->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aSetAnnotation"));
|
||||
aMoveToTopLibrary->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aMoveToTopLibrary"));
|
||||
aMoveToBottomLibrary->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aMoveToBottomLibrary"));
|
||||
aMoveToHand->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aMoveToHand"));
|
||||
aMoveToGraveyard->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aMoveToGraveyard"));
|
||||
aMoveToExile->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aMoveToExile"));
|
||||
|
||||
QList<QKeySequence> addCCShortCuts;
|
||||
addCCShortCuts.append(settingsCache->shortcuts().getSingleShortcut("Player/aCCRed"));
|
||||
addCCShortCuts.append(settingsCache->shortcuts().getSingleShortcut("Player/aCCYellow"));
|
||||
addCCShortCuts.append(settingsCache->shortcuts().getSingleShortcut("Player/aCCGreen"));
|
||||
|
||||
QList<QKeySequence> removeCCShortCuts;
|
||||
removeCCShortCuts.append(settingsCache->shortcuts().getSingleShortcut("Player/aRCRed"));
|
||||
removeCCShortCuts.append(settingsCache->shortcuts().getSingleShortcut("Player/aRCYellow"));
|
||||
removeCCShortCuts.append(settingsCache->shortcuts().getSingleShortcut("Player/aRCGreen"));
|
||||
|
||||
QList<QKeySequence> setCCShortCuts;
|
||||
setCCShortCuts.append(settingsCache->shortcuts().getSingleShortcut("Player/aSCRed"));
|
||||
setCCShortCuts.append(settingsCache->shortcuts().getSingleShortcut("Player/aSCYellow"));
|
||||
setCCShortCuts.append(settingsCache->shortcuts().getSingleShortcut("Player/aSCGreen"));
|
||||
|
||||
for (int i = 0; i < aAddCounter.size(); ++i){
|
||||
aAddCounter[i]->setShortcut(addCCShortCuts.at(i));
|
||||
}
|
||||
for (int i = 0; i < aRemoveCounter.size(); ++i){
|
||||
aRemoveCounter[i]->setShortcut(removeCCShortCuts.at(i));
|
||||
}
|
||||
for (int i = 0; i < aSetCounter.size(); ++i){
|
||||
aSetCounter[i]->setShortcut(setCCShortCuts.at(i));
|
||||
}
|
||||
|
||||
QMapIterator<int, AbstractCounter *> counterIterator(counters);
|
||||
while (counterIterator.hasNext())
|
||||
counterIterator.next().value()->setShortcutsActive();
|
||||
|
||||
aViewSideboard->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aViewSideboard"));
|
||||
aViewLibrary->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aViewLibrary"));
|
||||
aViewTopCards->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aViewTopCards"));
|
||||
aViewGraveyard->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aViewGraveyard"));
|
||||
aDrawCard->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aDrawCard"));
|
||||
aDrawCards->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aDrawCards"));
|
||||
aUndoDraw->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aUndoDraw"));
|
||||
aMulligan->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aMulligan"));
|
||||
aShuffle->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aShuffle"));
|
||||
aUntapAll->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aUntapAll"));
|
||||
aRollDie->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aRollDie"));
|
||||
aCreateToken->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aCreateToken"));
|
||||
aCreateAnotherToken->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aCreateAnotherToken"));
|
||||
aAlwaysRevealTopCard->setShortcut(settingsCache->shortcuts().getSingleShortcut("Player/aAlwaysRevealTopCard"));
|
||||
}
|
||||
|
||||
void Player::setShortcutsInactive()
|
||||
|
@ -788,10 +835,12 @@ void Player::initSayMenu()
|
|||
QSettings settings;
|
||||
settings.beginGroup("messages");
|
||||
int count = settings.value("count", 0).toInt();
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
QAction *newAction = new QAction(settings.value(QString("msg%1").arg(i)).toString(), this);
|
||||
if (i <= 10)
|
||||
newAction->setShortcut(QKeySequence(QString("Ctrl+%1").arg((i + 1) % 10)));
|
||||
if (i <= 10){
|
||||
newAction->setShortcut(QKeySequence("Ctrl+" + QString::number((i + 1) % 10)));
|
||||
}
|
||||
connect(newAction, SIGNAL(triggered()), this, SLOT(actSayMessage()));
|
||||
sayMenu->addAction(newAction);
|
||||
}
|
||||
|
@ -805,13 +854,16 @@ void Player::setDeck(const DeckLoader &_deck)
|
|||
createPredefinedTokenMenu->clear();
|
||||
predefinedTokens.clear();
|
||||
InnerDecklistNode *tokenZone = dynamic_cast<InnerDecklistNode *>(deck->getRoot()->findChild("tokens"));
|
||||
|
||||
if (tokenZone)
|
||||
for (int i = 0; i < tokenZone->size(); ++i) {
|
||||
const QString tokenName = tokenZone->at(i)->getName();
|
||||
predefinedTokens.append(tokenName);
|
||||
QAction *a = createPredefinedTokenMenu->addAction(tokenName);
|
||||
if (i < 10)
|
||||
{
|
||||
a->setShortcut(QKeySequence("Alt+" + QString::number((i + 1) % 10)));
|
||||
}
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(actCreatePredefinedToken()));
|
||||
}
|
||||
}
|
||||
|
@ -2238,6 +2290,12 @@ void Player::actPlayFacedown()
|
|||
playCard(game->getActiveCard(), true, false);
|
||||
}
|
||||
|
||||
void Player::refreshShortcuts()
|
||||
{
|
||||
if(shortcutsActive)
|
||||
setShortcutsActive();
|
||||
}
|
||||
|
||||
void Player::updateCardMenu(CardItem *card)
|
||||
{
|
||||
QMenu *cardMenu = card->getCardMenu();
|
||||
|
|
|
@ -159,6 +159,7 @@ private slots:
|
|||
void actPlay();
|
||||
void actHide();
|
||||
void actPlayFacedown();
|
||||
void refreshShortcuts();
|
||||
|
||||
private:
|
||||
TabGame *game;
|
||||
|
|
155
cockatrice/src/sequenceEdit/sequenceedit.cpp
Normal file
155
cockatrice/src/sequenceEdit/sequenceedit.cpp
Normal file
|
@ -0,0 +1,155 @@
|
|||
#include "sequenceedit.h"
|
||||
#include "../settingscache.h"
|
||||
#include <QLineEdit>
|
||||
#include <QPushButton>
|
||||
#include <QHBoxLayout>
|
||||
#include <QEvent>
|
||||
#include <QKeyEvent>
|
||||
#include <QToolTip>
|
||||
|
||||
SequenceEdit::SequenceEdit(QString _shorcutName, QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
shorcutName = _shorcutName;
|
||||
currentKey = 0;
|
||||
maxKeys = 4;
|
||||
keys = 0;
|
||||
valid = false;
|
||||
|
||||
lineEdit = new QLineEdit(this);
|
||||
clearButton = new QPushButton("", this);
|
||||
defaultButton = new QPushButton("", this);
|
||||
|
||||
lineEdit->setMinimumWidth(70);
|
||||
clearButton->setMaximumWidth(lineEdit->height());
|
||||
defaultButton->setMaximumWidth(lineEdit->height());
|
||||
clearButton->setMaximumHeight(lineEdit->height());
|
||||
defaultButton->setMaximumHeight(lineEdit->height());
|
||||
|
||||
clearButton->setIcon(QIcon(":/resources/icon_clearsearch.svg"));
|
||||
defaultButton->setIcon(QIcon(":/resources/icon_update.png"));
|
||||
|
||||
clearButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
defaultButton->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||
|
||||
QHBoxLayout *layout = new QHBoxLayout(this);
|
||||
layout->setContentsMargins(0,0,0,0);
|
||||
layout->setSpacing(1);
|
||||
layout->addWidget(lineEdit);
|
||||
layout->addWidget(clearButton);
|
||||
layout->addWidget(defaultButton);
|
||||
|
||||
connect(clearButton,SIGNAL(clicked()),this,SLOT(removeLastShortcut()));
|
||||
connect(defaultButton,SIGNAL(clicked()),this,SLOT(restoreDefault()));
|
||||
lineEdit->installEventFilter(this);
|
||||
|
||||
lineEdit->setText(settingsCache->shortcuts().getShortcutString(shorcutName));
|
||||
}
|
||||
|
||||
QString SequenceEdit::getSecuence()
|
||||
{
|
||||
return lineEdit->text();
|
||||
}
|
||||
|
||||
void SequenceEdit::removeLastShortcut()
|
||||
{
|
||||
QString secuences = lineEdit->text();
|
||||
if(!secuences.isEmpty())
|
||||
{
|
||||
if(secuences.lastIndexOf(";") > 0){
|
||||
QString valid = secuences.left(secuences.lastIndexOf(";"));
|
||||
lineEdit->setText(valid);
|
||||
}
|
||||
else
|
||||
lineEdit->clear();
|
||||
updateSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void SequenceEdit::restoreDefault()
|
||||
{
|
||||
lineEdit->setText(settingsCache->shortcuts().getDefaultShortcutString(shorcutName));
|
||||
updateSettings();
|
||||
}
|
||||
|
||||
bool SequenceEdit::eventFilter(QObject *, QEvent * event)
|
||||
{
|
||||
if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease)
|
||||
{
|
||||
QKeyEvent * keyEvent = (QKeyEvent *) event;
|
||||
|
||||
if(event->type() == QEvent::KeyPress && !keyEvent->isAutoRepeat())
|
||||
processKey(keyEvent);
|
||||
else if (event->type() == QEvent::KeyRelease && !keyEvent->isAutoRepeat())
|
||||
finishShortcut();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void SequenceEdit::processKey(QKeyEvent* e)
|
||||
{
|
||||
int key = e->key();
|
||||
if(key != Qt::Key_Control && key != Qt::Key_Shift
|
||||
&& key != Qt::Key_Meta && key != Qt::Key_Alt)
|
||||
{
|
||||
valid = true;
|
||||
key |= translateModifiers(e->modifiers(), e->text());
|
||||
}
|
||||
keys = key;
|
||||
currentKey++;
|
||||
if(currentKey >= key)
|
||||
finishShortcut();
|
||||
}
|
||||
|
||||
int SequenceEdit::translateModifiers(Qt::KeyboardModifiers state, const QString &text)
|
||||
{
|
||||
int result = 0;
|
||||
// The shift modifier only counts when it is not used to type a symbol
|
||||
// that is only reachable using the shift key anyway
|
||||
if ((state & Qt::ShiftModifier) && (text.isEmpty() ||
|
||||
!text.at(0).isPrint() ||
|
||||
text.at(0).isLetterOrNumber() ||
|
||||
text.at(0).isSpace()))
|
||||
result |= Qt::SHIFT;
|
||||
|
||||
if (state & Qt::ControlModifier)
|
||||
result |= Qt::CTRL;
|
||||
if (state & Qt::MetaModifier)
|
||||
result |= Qt::META;
|
||||
if (state & Qt::AltModifier)
|
||||
result |= Qt::ALT;
|
||||
return result;
|
||||
}
|
||||
|
||||
void SequenceEdit::finishShortcut()
|
||||
{
|
||||
QKeySequence secuence(keys);
|
||||
if(!secuence.isEmpty() && valid)
|
||||
{
|
||||
QString secuenceString = secuence.toString();
|
||||
if(settingsCache->shortcuts().isValid(shorcutName,secuenceString))
|
||||
{
|
||||
if(!lineEdit->text().isEmpty())
|
||||
{
|
||||
if(lineEdit->text().contains(secuenceString))
|
||||
return;
|
||||
lineEdit->setText(lineEdit->text() + ";");
|
||||
}
|
||||
lineEdit->setText(lineEdit->text() + secuenceString);
|
||||
}
|
||||
else
|
||||
{
|
||||
QToolTip::showText(lineEdit->mapToGlobal(QPoint()), tr("Shortcut already in use"));
|
||||
}
|
||||
}
|
||||
currentKey = 0;
|
||||
keys = 0;
|
||||
valid = false;
|
||||
updateSettings();
|
||||
}
|
||||
|
||||
void SequenceEdit::updateSettings()
|
||||
{
|
||||
settingsCache->shortcuts().setShortcuts(shorcutName,lineEdit->text());
|
||||
}
|
||||
|
40
cockatrice/src/sequenceEdit/sequenceedit.h
Normal file
40
cockatrice/src/sequenceEdit/sequenceedit.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef SECUENCEEDIT_H
|
||||
#define SECUENCEEDIT_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QKeySequence>
|
||||
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class QEvent;
|
||||
|
||||
class SequenceEdit : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SequenceEdit(QString _shorcutName, QWidget *parent = 0);
|
||||
QString getSecuence();
|
||||
signals:
|
||||
|
||||
private slots:
|
||||
void removeLastShortcut();
|
||||
void restoreDefault();
|
||||
protected:
|
||||
bool eventFilter(QObject *, QEvent *event);
|
||||
private:
|
||||
QString shorcutName;
|
||||
QLineEdit *lineEdit;
|
||||
QPushButton *clearButton;
|
||||
QPushButton *defaultButton;
|
||||
int keys;
|
||||
int currentKey;
|
||||
int maxKeys;
|
||||
bool valid;
|
||||
|
||||
void processKey(QKeyEvent *e);
|
||||
int translateModifiers(Qt::KeyboardModifiers state, const QString &text);
|
||||
void finishShortcut();
|
||||
void updateSettings();
|
||||
};
|
||||
|
||||
#endif // SECUENCEEDIT_H
|
18
cockatrice/src/sequenceEdit/shortcutstab.cpp
Normal file
18
cockatrice/src/sequenceEdit/shortcutstab.cpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "shortcutstab.h"
|
||||
#include "ui_shortcutstab.h"
|
||||
|
||||
ShortcutsTab::ShortcutsTab() :
|
||||
ui(new Ui::shortcutsTab)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
void ShortcutsTab::retranslateUi()
|
||||
{
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
|
||||
ShortcutsTab::~ShortcutsTab()
|
||||
{
|
||||
delete ui;
|
||||
}
|
25
cockatrice/src/sequenceEdit/shortcutstab.h
Normal file
25
cockatrice/src/sequenceEdit/shortcutstab.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef SHORTCUTSTAB_H
|
||||
#define SHORTCUTSTAB_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
#include "../dlg_settings.h"
|
||||
|
||||
namespace Ui {
|
||||
class shortcutsTab;
|
||||
}
|
||||
|
||||
class ShortcutsTab : public AbstractSettingsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ShortcutsTab();
|
||||
void retranslateUi();
|
||||
~ShortcutsTab();
|
||||
|
||||
private:
|
||||
Ui::shortcutsTab *ui;
|
||||
};
|
||||
|
||||
#endif // SHORTCUTSTAB_H
|
1570
cockatrice/src/sequenceEdit/ui_shortcutstab.h
Normal file
1570
cockatrice/src/sequenceEdit/ui_shortcutstab.h
Normal file
File diff suppressed because it is too large
Load diff
|
@ -6,17 +6,17 @@
|
|||
#include <QDesktopServices>
|
||||
#endif
|
||||
|
||||
QString SettingsCache::getLayoutsSettingsPath()
|
||||
QString SettingsCache::getSettingsPath()
|
||||
{
|
||||
QString file = "";
|
||||
|
||||
#ifndef PORTABLE_BUILD
|
||||
#if QT_VERSION >= 0x050000
|
||||
#if QT_VERSION >= 0x050000
|
||||
file = QStandardPaths::writableLocation(QStandardPaths::DataLocation);
|
||||
#else
|
||||
file = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
|
||||
#endif
|
||||
file.append("/settings/layouts/");
|
||||
file.append("/settings/");
|
||||
#endif
|
||||
|
||||
return file;
|
||||
|
@ -25,6 +25,7 @@ QString SettingsCache::getLayoutsSettingsPath()
|
|||
SettingsCache::SettingsCache()
|
||||
{
|
||||
settings = new QSettings(this);
|
||||
shortcutsSettings = new ShortcutsSettings(getSettingsPath(),this);
|
||||
|
||||
lang = settings->value("personal/lang").toString();
|
||||
keepalive = settings->value("personal/keepalive", 5).toInt();
|
||||
|
@ -119,8 +120,8 @@ SettingsCache::SettingsCache()
|
|||
spectatorsCanSeeEverything = settings->value("game/spectatorscanseeeverything", false).toBool();
|
||||
clientID = settings->value("personal/clientid", "notset").toString();
|
||||
|
||||
QString file = getLayoutsSettingsPath();
|
||||
file.append("deckLayout.ini");
|
||||
QString file = getSettingsPath();
|
||||
file.append("layouts/deckLayout.ini");
|
||||
|
||||
QSettings layout_settings(file , QSettings::IniFormat);
|
||||
deckEditorLayoutState = layout_settings.value("layouts/deckEditor_state").toByteArray();
|
||||
|
@ -505,8 +506,8 @@ void SettingsCache::setDeckEditorLayoutState(const QByteArray &value)
|
|||
{
|
||||
deckEditorLayoutState = value;
|
||||
|
||||
QString file = getLayoutsSettingsPath();
|
||||
file.append("deckLayout.ini");
|
||||
QString file = getSettingsPath();
|
||||
file.append("layouts/deckLayout.ini");
|
||||
QSettings layout_settings(file , QSettings::IniFormat);
|
||||
layout_settings.setValue("layouts/deckEditor_state",value);
|
||||
}
|
||||
|
@ -515,8 +516,8 @@ void SettingsCache::setDeckEditorGeometry(const QByteArray &value)
|
|||
{
|
||||
deckEditorGeometry = value;
|
||||
|
||||
QString file = getLayoutsSettingsPath();
|
||||
file.append("deckLayout.ini");
|
||||
QString file = getSettingsPath();
|
||||
file.append("layouts/deckLayout.ini");
|
||||
QSettings layout_settings(file , QSettings::IniFormat);
|
||||
layout_settings.setValue("layouts/deckEditor_geometry",value);
|
||||
}
|
||||
|
@ -525,8 +526,8 @@ void SettingsCache::setDeckEditorCardSize(const QSize &value)
|
|||
{
|
||||
deckEditorCardSize = value;
|
||||
|
||||
QString file = getLayoutsSettingsPath();
|
||||
file.append("deckLayout.ini");
|
||||
QString file = getSettingsPath();
|
||||
file.append("layouts/deckLayout.ini");
|
||||
QSettings layout_settings(file , QSettings::IniFormat);
|
||||
layout_settings.setValue("layouts/deckEditor_CardSize",value);
|
||||
}
|
||||
|
@ -535,8 +536,8 @@ void SettingsCache::setDeckEditorDeckSize(const QSize &value)
|
|||
{
|
||||
deckEditorDeckSize = value;
|
||||
|
||||
QString file = getLayoutsSettingsPath();
|
||||
file.append("deckLayout.ini");
|
||||
QString file = getSettingsPath();
|
||||
file.append("layouts/deckLayout.ini");
|
||||
QSettings layout_settings(file , QSettings::IniFormat);
|
||||
layout_settings.setValue("layouts/deckEditor_DeckSize",value);
|
||||
}
|
||||
|
@ -545,8 +546,8 @@ void SettingsCache::setDeckEditorFilterSize(const QSize &value)
|
|||
{
|
||||
deckEditorFilterSize = value;
|
||||
|
||||
QString file = getLayoutsSettingsPath();
|
||||
file.append("deckLayout.ini");
|
||||
QString file = getSettingsPath();
|
||||
file.append("layouts/deckLayout.ini");
|
||||
QSettings layout_settings(file , QSettings::IniFormat);
|
||||
layout_settings.setValue("layouts/deckEditor_FilterSize",value);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include <QObject>
|
||||
#include <QSize>
|
||||
#include <QStringList>
|
||||
#include "shortcutssettings.h"
|
||||
|
||||
// the falbacks are used for cards without a muid
|
||||
#define PIC_URL_DEFAULT "http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=!cardid!&type=card"
|
||||
|
@ -46,7 +47,7 @@ signals:
|
|||
void chatMentionCompleterChanged();
|
||||
private:
|
||||
QSettings *settings;
|
||||
|
||||
ShortcutsSettings *shortcutsSettings;
|
||||
QByteArray mainWindowGeometry;
|
||||
QString lang;
|
||||
QString deckPath, replaysPath, picsPath, cardDatabasePath, tokenDatabasePath;
|
||||
|
@ -104,7 +105,7 @@ private:
|
|||
int keepalive;
|
||||
QByteArray deckEditorLayoutState, deckEditorGeometry;
|
||||
QSize deckEditorFilterSize, deckEditorDeckSize, deckEditorCardSize;
|
||||
QString getLayoutsSettingsPath();
|
||||
QString getSettingsPath();
|
||||
|
||||
public:
|
||||
SettingsCache();
|
||||
|
@ -190,6 +191,7 @@ public:
|
|||
void setDeckEditorDeckSize(const QSize &value);
|
||||
QSize getDeckEditorFilterSize() const { return deckEditorFilterSize; }
|
||||
void setDeckEditorFilterSize(const QSize &value);
|
||||
ShortcutsSettings& shortcuts() const { return *shortcutsSettings; }
|
||||
|
||||
public slots:
|
||||
void setMainWindowGeometry(const QByteArray &_mainWindowGeometry);
|
||||
|
|
228
cockatrice/src/shortcutssettings.cpp
Normal file
228
cockatrice/src/shortcutssettings.cpp
Normal file
|
@ -0,0 +1,228 @@
|
|||
#include "shortcutssettings.h"
|
||||
#include <QFile>
|
||||
#include <QStringList>
|
||||
|
||||
ShortcutsSettings::ShortcutsSettings(QString settingsPath, QObject *parent) : QObject(parent)
|
||||
{
|
||||
this->settingsFilePath = settingsPath;
|
||||
this->settingsFilePath.append("shortcuts.ini");
|
||||
fillDefaultShorcuts();
|
||||
shortCuts = QMap<QString,QList<QKeySequence> >(defaultShortCuts);
|
||||
|
||||
bool exists = QFile(settingsFilePath).exists();
|
||||
|
||||
QSettings shortCutsFile(settingsFilePath, QSettings::IniFormat);
|
||||
|
||||
if(exists){
|
||||
shortCutsFile.beginGroup("Custom");
|
||||
const QStringList customKeys = shortCutsFile.allKeys();
|
||||
for(QStringList::const_iterator it = customKeys.constBegin(); it != customKeys.constEnd(); ++it)
|
||||
{
|
||||
QString stringSecuence = shortCutsFile.value(*it).toString();
|
||||
QList<QKeySequence> secuenceList = parseSecuenceString(stringSecuence);
|
||||
shortCuts.insert(*it, secuenceList);
|
||||
}
|
||||
shortCutsFile.endGroup();
|
||||
}
|
||||
}
|
||||
|
||||
QList<QKeySequence> ShortcutsSettings::getShortcut(QString name)
|
||||
{
|
||||
if(shortCuts.contains(name))
|
||||
return shortCuts.value(name);
|
||||
|
||||
return defaultShortCuts.value(name, QList<QKeySequence>());
|
||||
}
|
||||
|
||||
QKeySequence ShortcutsSettings::getSingleShortcut(QString name)
|
||||
{
|
||||
return getShortcut(name).at(0);
|
||||
}
|
||||
|
||||
QString ShortcutsSettings::getDefaultShortcutString(QString name)
|
||||
{
|
||||
return stringifySecuence(defaultShortCuts.value(name));
|
||||
}
|
||||
|
||||
QString ShortcutsSettings::getShortcutString(QString name)
|
||||
{
|
||||
return stringifySecuence(shortCuts.value(name));
|
||||
}
|
||||
|
||||
QString ShortcutsSettings::stringifySecuence(QList<QKeySequence> secuence) const
|
||||
{
|
||||
QString stringSecuence;
|
||||
for(int i=0; i < secuence.size(); ++i)
|
||||
{
|
||||
stringSecuence.append(secuence.at(i).toString(QKeySequence::PortableText));
|
||||
if(i < secuence.size() - 1)
|
||||
stringSecuence.append(";");
|
||||
}
|
||||
|
||||
return stringSecuence;
|
||||
}
|
||||
|
||||
QList<QKeySequence> ShortcutsSettings::parseSecuenceString(QString stringSecuence)
|
||||
{
|
||||
QStringList secuences = stringSecuence.split(";");
|
||||
QList<QKeySequence> secuenceList;
|
||||
for(QStringList::const_iterator ss = secuences.constBegin(); ss != secuences.constEnd(); ++ss)
|
||||
{
|
||||
secuenceList.append(QKeySequence(*ss, QKeySequence::PortableText));
|
||||
}
|
||||
|
||||
return secuenceList;
|
||||
}
|
||||
|
||||
void ShortcutsSettings::setShortcuts(QString name, QList<QKeySequence> secuence)
|
||||
{
|
||||
shortCuts[name] = secuence;
|
||||
|
||||
QSettings shortCutsFile(settingsFilePath, QSettings::IniFormat);
|
||||
shortCutsFile.beginGroup("Custom");
|
||||
QString stringSecuence = stringifySecuence(secuence);
|
||||
shortCutsFile.setValue(name, stringSecuence);
|
||||
shortCutsFile.endGroup();
|
||||
emit shortCutchanged();
|
||||
}
|
||||
|
||||
void ShortcutsSettings::setShortcuts(QString name, QKeySequence secuence)
|
||||
{
|
||||
setShortcuts(name, QList<QKeySequence>() << secuence);
|
||||
}
|
||||
|
||||
void ShortcutsSettings::setShortcuts(QString name, QString secuences)
|
||||
{
|
||||
setShortcuts(name,parseSecuenceString(secuences));
|
||||
}
|
||||
|
||||
bool ShortcutsSettings::isValid(QString name, QString secuences)
|
||||
{
|
||||
QString checkKey = name.left(name.indexOf("/"));
|
||||
|
||||
QStringList stringSecuences = secuences.split(";");
|
||||
|
||||
QList<QString> allKeys = shortCuts.keys();
|
||||
for(int i=0; i < allKeys.size(); i++){
|
||||
QString key = allKeys.at(i);
|
||||
if(key.startsWith(checkKey) || key.startsWith("MainWindow") || checkKey.startsWith("MainWindow"))
|
||||
{
|
||||
QString storedSecuence = stringifySecuence(shortCuts.value(key));
|
||||
for(int j = 0; j < stringSecuences.size(); j++)
|
||||
{
|
||||
if(storedSecuence.contains(stringSecuences.at(j)))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void ShortcutsSettings::fillDefaultShorcuts()
|
||||
{
|
||||
defaultShortCuts["MainWindow/aCheckCardUpdates"] = parseSecuenceString("");
|
||||
defaultShortCuts["MainWindow/aConnect"] = parseSecuenceString("");
|
||||
defaultShortCuts["MainWindow/aDeckEditor"] = parseSecuenceString("");
|
||||
defaultShortCuts["MainWindow/aDisconnect"] = parseSecuenceString("");
|
||||
defaultShortCuts["MainWindow/aExit"] = parseSecuenceString("");
|
||||
defaultShortCuts["MainWindow/aFullScreen"] = parseSecuenceString("Ctrl+F");
|
||||
defaultShortCuts["MainWindow/aRegister"] = parseSecuenceString("");
|
||||
defaultShortCuts["MainWindow/aSettings"] = parseSecuenceString("");
|
||||
defaultShortCuts["MainWindow/aSinglePlayer"] = parseSecuenceString("");
|
||||
defaultShortCuts["MainWindow/aWatchReplay"] = parseSecuenceString("");
|
||||
|
||||
defaultShortCuts["TabDeckEditor/aAnalyzeDeck"] = parseSecuenceString("");
|
||||
defaultShortCuts["TabDeckEditor/aClearFilterAll"] = parseSecuenceString("");
|
||||
defaultShortCuts["TabDeckEditor/aClearFilterOne"] = parseSecuenceString("");
|
||||
defaultShortCuts["TabDeckEditor/aClose"] = parseSecuenceString("");
|
||||
defaultShortCuts["TabDeckEditor/aDecrement"] = parseSecuenceString("-");
|
||||
defaultShortCuts["TabDeckEditor/aEditSets"] = parseSecuenceString("");
|
||||
defaultShortCuts["TabDeckEditor/aEditTokens"] = parseSecuenceString("");
|
||||
defaultShortCuts["TabDeckEditor/aIncrement"] = parseSecuenceString("+");
|
||||
defaultShortCuts["TabDeckEditor/aLoadDeck"] = parseSecuenceString("Ctrl+O");
|
||||
defaultShortCuts["TabDeckEditor/aLoadDeckFromClipboard"] = parseSecuenceString("Ctrl+V");
|
||||
defaultShortCuts["TabDeckEditor/aNewDeck"] = parseSecuenceString("Ctrl+N");
|
||||
defaultShortCuts["TabDeckEditor/aOpenCustomFolder"] = parseSecuenceString("");
|
||||
defaultShortCuts["TabDeckEditor/aPrintDeck"] = parseSecuenceString("Ctrl+P");
|
||||
defaultShortCuts["TabDeckEditor/aRemoveCard"] = parseSecuenceString("Del");
|
||||
defaultShortCuts["TabDeckEditor/aResetLayout"] = parseSecuenceString("");
|
||||
defaultShortCuts["TabDeckEditor/aSaveDeck"] = parseSecuenceString("Ctrl+S");
|
||||
defaultShortCuts["TabDeckEditor/aSaveDeckAs"] = parseSecuenceString("");
|
||||
defaultShortCuts["TabDeckEditor/aSaveDeckToClipboard"] = parseSecuenceString("Ctrl+C");
|
||||
|
||||
defaultShortCuts["DeckViewContainer/loadLocalButton"] = parseSecuenceString("Ctrl+O");
|
||||
defaultShortCuts["DeckViewContainer/loadRemoteButton"] = parseSecuenceString("Ctrl+Alt+O");
|
||||
|
||||
defaultShortCuts["Player/aDec"] = parseSecuenceString("F11");
|
||||
defaultShortCuts["Player/aInc"] = parseSecuenceString("F12");
|
||||
defaultShortCuts["Player/aSet"] = parseSecuenceString("Ctrl+L");
|
||||
defaultShortCuts["Player/aCloseMostRecentZoneView"] = parseSecuenceString("Esc");
|
||||
defaultShortCuts["Player/IncP"] = parseSecuenceString("Ctrl++");
|
||||
defaultShortCuts["Player/aAlwaysRevealTopCard"] = parseSecuenceString("Ctrl+N");
|
||||
defaultShortCuts["Player/aAttach"] = parseSecuenceString("Ctrl+A");
|
||||
defaultShortCuts["Player/aCCGreen"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aCCRed"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aCCYellow"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aClone"] = parseSecuenceString("Ctrl+J");
|
||||
defaultShortCuts["Player/aCreateAnotherToken"] = parseSecuenceString("Ctrl+G");
|
||||
defaultShortCuts["Player/aCreateToken"] = parseSecuenceString("Ctrl+T");
|
||||
defaultShortCuts["Player/aDecP"] = parseSecuenceString("Ctrl+-");
|
||||
defaultShortCuts["Player/aDecPT"] = parseSecuenceString("Ctrl+Alt+-");
|
||||
defaultShortCuts["Player/aDecT"] = parseSecuenceString("Alt+-");
|
||||
defaultShortCuts["Player/aDoesntUntap"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aDrawArrow"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aDrawCard"] = parseSecuenceString("Ctrl+D");
|
||||
defaultShortCuts["Player/aDrawCards"] = parseSecuenceString("Ctrl+E");
|
||||
defaultShortCuts["Player/aFlip"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aIncPT"] = parseSecuenceString("Ctrl+Alt++");
|
||||
defaultShortCuts["Player/aIncT"] = parseSecuenceString("Alt++");
|
||||
defaultShortCuts["Player/aMoveToBottomLibrary"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aMoveToExile"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aMoveToGraveyard"] = parseSecuenceString("Ctrl+Del");
|
||||
defaultShortCuts["Player/aMoveToHand"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aMoveToTopLibrary"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aMulligan"] = parseSecuenceString("Ctrl+M");
|
||||
defaultShortCuts["Player/aPeek"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aPlay"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aRCGreen"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aRCRed"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aRCYellow"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aRollDie"] = parseSecuenceString("Ctrl+I");
|
||||
defaultShortCuts["Player/aSCGreen"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aSCRed"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aSCYellow"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aSetAnnotation"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aSetPT"] = parseSecuenceString("Ctrl+P");
|
||||
defaultShortCuts["Player/aShuffle"] = parseSecuenceString("Ctrl+S");
|
||||
defaultShortCuts["Player/aTap"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aUnattach"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aUndoDraw"] = parseSecuenceString("Ctrl+Shift+D");
|
||||
defaultShortCuts["Player/aUntap"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aUntapAll"] = parseSecuenceString("Ctrl+U");
|
||||
defaultShortCuts["Player/aViewGraveyard"] = parseSecuenceString("F4");
|
||||
defaultShortCuts["Player/aViewLibrary"] = parseSecuenceString("F3");
|
||||
defaultShortCuts["Player/aViewRfg"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/aViewSideboard"] = parseSecuenceString("Ctrl+F3");
|
||||
defaultShortCuts["Player/aViewTopCards"] = parseSecuenceString("Ctrl+W");
|
||||
defaultShortCuts["Player/aConcede"] = parseSecuenceString("F2");
|
||||
defaultShortCuts["Player/aLeaveGame"] = parseSecuenceString("Ctrl+Q");
|
||||
defaultShortCuts["Player/aNextPhase"] = parseSecuenceString("Ctrl+Space;Tab");
|
||||
defaultShortCuts["Player/aNextTurn"] = parseSecuenceString("Ctrl+Return;Ctrl+Enter");
|
||||
defaultShortCuts["Player/aRemoveLocalArrows"] = parseSecuenceString("Ctrl+R");
|
||||
defaultShortCuts["Player/aRotateViewCCW"] = parseSecuenceString("Ctrl+[");
|
||||
defaultShortCuts["Player/aRotateViewCW"] = parseSecuenceString("Ctrl+]");
|
||||
defaultShortCuts["Player/phase0"] = parseSecuenceString("F5");
|
||||
defaultShortCuts["Player/phase1"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/phase10"] = parseSecuenceString("F10");
|
||||
defaultShortCuts["Player/phase2"] = parseSecuenceString("F6");
|
||||
defaultShortCuts["Player/phase3"] = parseSecuenceString("F7");
|
||||
defaultShortCuts["Player/phase4"] = parseSecuenceString("F8");
|
||||
defaultShortCuts["Player/phase5"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/phase6"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/phase7"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/phase8"] = parseSecuenceString("");
|
||||
defaultShortCuts["Player/phase9"] = parseSecuenceString("F9");
|
||||
defaultShortCuts["tab_room/aClearChat"] = parseSecuenceString("F12");
|
||||
defaultShortCuts["DlgLoadDeckFromClipboard/refreshButton"] = parseSecuenceString("F5");
|
||||
}
|
||||
|
40
cockatrice/src/shortcutssettings.h
Normal file
40
cockatrice/src/shortcutssettings.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef SHORTCUTSSETTINGS_H
|
||||
#define SHORTCUTSSETTINGS_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QSettings>
|
||||
#include <QMap>
|
||||
#include <QKeySequence>
|
||||
|
||||
class ShortcutsSettings : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ShortcutsSettings(QString settingsFilePath, QObject *parent = 0);
|
||||
~ShortcutsSettings() { }
|
||||
|
||||
QList<QKeySequence> getShortcut(QString name);
|
||||
QKeySequence getSingleShortcut(QString name);
|
||||
|
||||
QString getDefaultShortcutString(QString name);
|
||||
QString getShortcutString(QString name);
|
||||
|
||||
void setShortcuts(QString name, QList<QKeySequence> secuence);
|
||||
void setShortcuts(QString name, QKeySequence secuence);
|
||||
void setShortcuts(QString name, QString secuences);
|
||||
|
||||
bool isValid(QString name, QString secuences);
|
||||
signals:
|
||||
void shortCutchanged();
|
||||
|
||||
private:
|
||||
QString settingsFilePath;
|
||||
QMap<QString,QList<QKeySequence> > shortCuts;
|
||||
QMap<QString,QList<QKeySequence> > defaultShortCuts;
|
||||
void fillDefaultShorcuts();
|
||||
|
||||
QString stringifySecuence(QList<QKeySequence> secuence) const;
|
||||
QList<QKeySequence> parseSecuenceString(QString stringSecuence);
|
||||
};
|
||||
|
||||
#endif // SHORTCUTSSETTINGS_H
|
|
@ -256,37 +256,41 @@ void TabDeckEditor::createFiltersDock()
|
|||
void TabDeckEditor::createMenus()
|
||||
{
|
||||
aNewDeck = new QAction(QString(), this);
|
||||
aNewDeck->setShortcuts(QKeySequence::New);
|
||||
connect(aNewDeck, SIGNAL(triggered()), this, SLOT(actNewDeck()));
|
||||
|
||||
aLoadDeck = new QAction(QString(), this);
|
||||
aLoadDeck->setShortcuts(QKeySequence::Open);
|
||||
connect(aLoadDeck, SIGNAL(triggered()), this, SLOT(actLoadDeck()));
|
||||
|
||||
aSaveDeck = new QAction(QString(), this);
|
||||
aSaveDeck->setShortcuts(QKeySequence::Save);
|
||||
connect(aSaveDeck, SIGNAL(triggered()), this, SLOT(actSaveDeck()));
|
||||
|
||||
aSaveDeckAs = new QAction(QString(), this);
|
||||
// aSaveDeckAs->setShortcuts(QKeySequence::SaveAs);
|
||||
connect(aSaveDeckAs, SIGNAL(triggered()), this, SLOT(actSaveDeckAs()));
|
||||
|
||||
aOpenCustomsetsFolder = new QAction(QString(), this);
|
||||
connect(aOpenCustomsetsFolder, SIGNAL(triggered()), this, SLOT(actOpenCustomsetsFolder()));
|
||||
|
||||
aLoadDeckFromClipboard = new QAction(QString(), this);
|
||||
connect(aLoadDeckFromClipboard, SIGNAL(triggered()), this, SLOT(actLoadDeckFromClipboard()));
|
||||
aLoadDeckFromClipboard->setShortcuts(QKeySequence::Paste);
|
||||
|
||||
aSaveDeckToClipboard = new QAction(QString(), this);
|
||||
connect(aSaveDeckToClipboard, SIGNAL(triggered()), this, SLOT(actSaveDeckToClipboard()));
|
||||
aSaveDeckToClipboard->setShortcuts(QKeySequence::Copy);
|
||||
|
||||
aPrintDeck = new QAction(QString(), this);
|
||||
aPrintDeck->setShortcuts(QKeySequence::Print);
|
||||
connect(aPrintDeck, SIGNAL(triggered()), this, SLOT(actPrintDeck()));
|
||||
|
||||
aAnalyzeDeck = new QAction(QString(), this);
|
||||
connect(aAnalyzeDeck, SIGNAL(triggered()), this, SLOT(actAnalyzeDeck()));
|
||||
|
||||
aClose = new QAction(QString(), this);
|
||||
connect(aClose, SIGNAL(triggered()), this, SLOT(closeRequest()));
|
||||
|
||||
aOpenCustomFolder = new QAction(QString(), this);
|
||||
connect(aOpenCustomFolder, SIGNAL(triggered()), this, SLOT(actOpenCustomFolder()));
|
||||
aOpenCustomsetsFolder = new QAction(QString(), this);
|
||||
connect(aOpenCustomsetsFolder, SIGNAL(triggered()), this, SLOT(actOpenCustomsetsFolder()));
|
||||
|
||||
aEditSets = new QAction(QString(), this);
|
||||
connect(aEditSets, SIGNAL(triggered()), this, SLOT(actEditSets()));
|
||||
|
||||
aEditTokens = new QAction(QString(), this);
|
||||
connect(aEditTokens, SIGNAL(triggered()), this, SLOT(actEditTokens()));
|
||||
|
||||
|
@ -424,7 +428,7 @@ void TabDeckEditor::createCentralFrame()
|
|||
QHBoxLayout *mainLayout = new QHBoxLayout;
|
||||
mainLayout->setObjectName("mainLayout");
|
||||
mainLayout->addWidget(MainWindow);
|
||||
setLayout(mainLayout);
|
||||
setLayout(mainLayout);
|
||||
}
|
||||
|
||||
void TabDeckEditor::restartLayout()
|
||||
|
@ -464,6 +468,30 @@ void TabDeckEditor::freeDocksSize()
|
|||
filterDock->setMaximumSize(5000,5000);
|
||||
}
|
||||
|
||||
void TabDeckEditor::refreshShortcuts()
|
||||
{
|
||||
aNewDeck->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aNewDeck"));
|
||||
aLoadDeck->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aLoadDeck"));
|
||||
aSaveDeck->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aSaveDeck"));
|
||||
aSaveDeckAs->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aSaveDeckAs"));
|
||||
aLoadDeckFromClipboard->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aLoadDeckFromClipboard"));
|
||||
aPrintDeck->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aPrintDeck"));
|
||||
aAnalyzeDeck->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aAnalyzeDeck"));
|
||||
aClose->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aClose"));
|
||||
aOpenCustomFolder->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aOpenCustomFolder"));
|
||||
aEditSets->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aEditSets"));
|
||||
aEditTokens->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aEditTokens"));
|
||||
aResetLayout->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aResetLayout"));
|
||||
aClearFilterAll->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aClearFilterAll"));
|
||||
aClearFilterOne->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aClearFilterOne"));
|
||||
aSaveDeckToClipboard->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aSaveDeckToClipboard"));
|
||||
aClearFilterOne->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aClearFilterOne"));
|
||||
aClose->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aClose"));
|
||||
aRemoveCard->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aRemoveCard"));
|
||||
aIncrement->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aIncrement"));
|
||||
aDecrement->setShortcuts(settingsCache->shortcuts().getShortcut("TabDeckEditor/aDecrement"));
|
||||
}
|
||||
|
||||
void TabDeckEditor::loadLayout()
|
||||
{
|
||||
MainWindow->restoreState(settingsCache->getDeckEditorLayoutState());
|
||||
|
@ -504,6 +532,9 @@ TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor, QWidget *parent)
|
|||
this->installEventFilter(this);
|
||||
|
||||
retranslateUi();
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
|
||||
QTimer::singleShot(0, this, SLOT(checkFirstRunDetected()));
|
||||
QTimer::singleShot(0, this, SLOT(loadLayout()));
|
||||
}
|
||||
|
@ -519,7 +550,6 @@ void TabDeckEditor::retranslateUi()
|
|||
|
||||
aClearFilterAll->setText(tr("&Clear all filters"));
|
||||
aClearFilterOne->setText(tr("Delete selected"));
|
||||
aClearFilterOne->setShortcut(QKeySequence("Backspace"));
|
||||
|
||||
nameLabel->setText(tr("Deck &name:"));
|
||||
commentsLabel->setText(tr("&Comments:"));
|
||||
|
@ -537,19 +567,17 @@ void TabDeckEditor::retranslateUi()
|
|||
aPrintDeck->setText(tr("&Print deck..."));
|
||||
aAnalyzeDeck->setText(tr("&Analyze deck on deckstats.net"));
|
||||
aOpenCustomFolder->setText(tr("Open custom image folder"));
|
||||
aOpenCustomsetsFolder->setText(tr("Open custom sets folder"));
|
||||
aOpenCustomsetsFolder->setText(tr("Open custom sets folder"));
|
||||
aClose->setText(tr("&Close"));
|
||||
aClose->setShortcut(QKeySequence("Ctrl+Q"));
|
||||
|
||||
aAddCard->setText(tr("Add card to &maindeck"));
|
||||
aAddCardToSideboard->setText(tr("Add card to &sideboard"));
|
||||
|
||||
aRemoveCard->setText(tr("&Remove row"));
|
||||
aRemoveCard->setShortcut(QKeySequence("Del"));
|
||||
|
||||
aIncrement->setText(tr("&Increment number"));
|
||||
aIncrement->setShortcut(QKeySequence("+"));
|
||||
|
||||
aDecrement->setText(tr("&Decrement number"));
|
||||
aDecrement->setShortcut(QKeySequence("-"));
|
||||
|
||||
deckMenu->setTitle(tr("&Deck Editor"));
|
||||
dbMenu->setTitle(tr("C&ard Database"));
|
||||
|
|
|
@ -83,6 +83,7 @@ class TabDeckEditor : public Tab {
|
|||
void loadLayout();
|
||||
void restartLayout();
|
||||
void freeDocksSize();
|
||||
void refreshShortcuts();
|
||||
|
||||
private:
|
||||
CardInfo *currentCardInfo() const;
|
||||
|
|
|
@ -120,14 +120,14 @@ DeckViewContainer::DeckViewContainer(int _playerId, TabGame *parent)
|
|||
setLayout(deckViewLayout);
|
||||
|
||||
retranslateUi();
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
}
|
||||
|
||||
void DeckViewContainer::retranslateUi()
|
||||
{
|
||||
loadLocalButton->setText(tr("Load local deck"));
|
||||
loadLocalButton->setShortcut(QKeySequence("Ctrl+O"));
|
||||
loadRemoteButton->setText(tr("Load deck from server"));
|
||||
loadRemoteButton->setShortcut(QKeySequence("Ctrl+Alt+O"));
|
||||
readyStartButton->setText(tr("Ready to s&tart"));
|
||||
updateSideboardLockButtonText();
|
||||
}
|
||||
|
@ -148,6 +148,58 @@ void DeckViewContainer::updateSideboardLockButtonText()
|
|||
sideboardLockButton->setText(tr("S&ideboard locked"));
|
||||
}
|
||||
|
||||
void DeckViewContainer::refreshShortcuts()
|
||||
{
|
||||
loadLocalButton->setShortcut(settingsCache->shortcuts().getSingleShortcut("DeckViewContainer/loadLocalButton"));
|
||||
loadRemoteButton->setShortcut(settingsCache->shortcuts().getSingleShortcut("DeckViewContainer/loadRemoteButton"));
|
||||
}
|
||||
|
||||
void TabGame::refreshShortcuts()
|
||||
{
|
||||
for (int i = 0; i < phaseActions.size(); ++i) {
|
||||
QAction *temp = phaseActions.at(i);
|
||||
switch (i) {
|
||||
case 0: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase0")); break;
|
||||
case 1: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase1")); break;
|
||||
case 2: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase2")); break;
|
||||
case 3: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase3")); break;
|
||||
case 4: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase4")); break;
|
||||
case 5: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase5")); break;
|
||||
case 6: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase6")); break;
|
||||
case 7: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase7")); break;
|
||||
case 8: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase8")); break;
|
||||
case 9: temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase9")); break;
|
||||
case 10:temp->setShortcuts(settingsCache->shortcuts().getShortcut("Player/phase10")); break;
|
||||
default: ;
|
||||
}
|
||||
}
|
||||
|
||||
if (aNextPhase) {
|
||||
aNextPhase->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aNextPhase"));
|
||||
}
|
||||
if (aNextTurn) {
|
||||
aNextTurn->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aNextTurn"));
|
||||
}
|
||||
if (aRemoveLocalArrows) {
|
||||
aRemoveLocalArrows->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aRemoveLocalArrows"));
|
||||
}
|
||||
if (aRotateViewCW) {
|
||||
aRotateViewCW->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aRotateViewCW"));
|
||||
}
|
||||
if (aRotateViewCCW) {
|
||||
aRotateViewCCW->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aRotateViewCCW"));
|
||||
}
|
||||
if (aConcede) {
|
||||
aConcede->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aConcede"));
|
||||
}
|
||||
if (aLeaveGame) {
|
||||
aLeaveGame->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aLeaveGame"));
|
||||
}
|
||||
if (aCloseReplay) {
|
||||
aCloseReplay->setShortcuts(settingsCache->shortcuts().getShortcut("Player/aCloseReplay"));
|
||||
}
|
||||
}
|
||||
|
||||
void DeckViewContainer::loadLocalDeck()
|
||||
{
|
||||
QFileDialog dialog(this, tr("Load deck"));
|
||||
|
@ -359,6 +411,8 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, GameReplay *_replay)
|
|||
addTabMenu(gameMenu);
|
||||
|
||||
retranslateUi();
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
setLayout(superMainLayout);
|
||||
|
||||
splitter->restoreState(settingsCache->getTabGameSplitterSizes());
|
||||
|
@ -468,18 +522,10 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
|
|||
for (int i = 0; i < phasesToolbar->phaseCount(); ++i) {
|
||||
QAction *temp = new QAction(QString(), this);
|
||||
connect(temp, SIGNAL(triggered()), this, SLOT(actPhaseAction()));
|
||||
switch (i) {
|
||||
case 0: temp->setShortcut(QKeySequence("F5")); break;
|
||||
case 2: temp->setShortcut(QKeySequence("F6")); break;
|
||||
case 3: temp->setShortcut(QKeySequence("F7")); break;
|
||||
case 4: temp->setShortcut(QKeySequence("F8")); break;
|
||||
case 9: temp->setShortcut(QKeySequence("F9")); break;
|
||||
case 10: temp->setShortcut(QKeySequence("F10")); break;
|
||||
default: ;
|
||||
}
|
||||
phasesMenu->addAction(temp);
|
||||
phaseActions.append(temp);
|
||||
}
|
||||
|
||||
phasesMenu->addSeparator();
|
||||
phasesMenu->addAction(aNextPhase);
|
||||
|
||||
|
@ -498,6 +544,8 @@ TabGame::TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_client
|
|||
addTabMenu(gameMenu);
|
||||
|
||||
retranslateUi();
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
setLayout(mainLayout);
|
||||
|
||||
splitter->restoreState(settingsCache->getTabGameSplitterSizes());
|
||||
|
@ -545,37 +593,29 @@ void TabGame::retranslateUi()
|
|||
gameMenu->setTitle(tr("&Game"));
|
||||
if (aNextPhase) {
|
||||
aNextPhase->setText(tr("Next &phase"));
|
||||
aNextPhase->setShortcuts(QList<QKeySequence>() << QKeySequence("Ctrl+Space") << QKeySequence("Tab"));
|
||||
}
|
||||
if (aNextTurn) {
|
||||
aNextTurn->setText(tr("Next &turn"));
|
||||
aNextTurn->setShortcuts(QList<QKeySequence>() << QKeySequence("Ctrl+Return") << QKeySequence("Ctrl+Enter"));
|
||||
}
|
||||
if (aRemoveLocalArrows) {
|
||||
aRemoveLocalArrows->setText(tr("&Remove all local arrows"));
|
||||
aRemoveLocalArrows->setShortcut(QKeySequence("Ctrl+R"));
|
||||
}
|
||||
if (aRotateViewCW) {
|
||||
aRotateViewCW->setText(tr("Rotate View Cl&ockwise"));
|
||||
aRotateViewCW->setShortcut(QKeySequence("Ctrl+]"));
|
||||
}
|
||||
if (aRotateViewCCW) {
|
||||
aRotateViewCCW->setText(tr("Rotate View Co&unterclockwise"));
|
||||
aRotateViewCCW->setShortcut(QKeySequence("Ctrl+["));
|
||||
}
|
||||
if (aGameInfo)
|
||||
aGameInfo->setText(tr("Game &information"));
|
||||
if (aConcede) {
|
||||
aConcede->setText(tr("&Concede"));
|
||||
aConcede->setShortcut(QKeySequence("F2"));
|
||||
}
|
||||
if (aLeaveGame) {
|
||||
aLeaveGame->setText(tr("&Leave game"));
|
||||
aLeaveGame->setShortcut(QKeySequence("Ctrl+Q"));
|
||||
}
|
||||
if (aCloseReplay) {
|
||||
aCloseReplay->setText(tr("C&lose replay"));
|
||||
aCloseReplay->setShortcut(QKeySequence("Ctrl+Q"));
|
||||
}
|
||||
|
||||
if (sayLabel)
|
||||
|
|
|
@ -84,6 +84,7 @@ private slots:
|
|||
void sideboardPlanChanged();
|
||||
void sideboardLockButtonClicked();
|
||||
void updateSideboardLockButtonText();
|
||||
void refreshShortcuts();
|
||||
signals:
|
||||
void newCardAdded(AbstractCardItem *card);
|
||||
public:
|
||||
|
@ -199,6 +200,7 @@ private slots:
|
|||
|
||||
void addMentionTag(QString value);
|
||||
void commandFinished(const Response &response);
|
||||
void refreshShortcuts();
|
||||
public:
|
||||
TabGame(TabSupervisor *_tabSupervisor, QList<AbstractClient *> &_clients, const Event_GameJoined &event, const QMap<int, QString> &_roomGameTypes);
|
||||
TabGame(TabSupervisor *_tabSupervisor, GameReplay *replay);
|
||||
|
|
|
@ -68,7 +68,6 @@ TabRoom::TabRoom(TabSupervisor *_tabSupervisor, AbstractClient *_client, ServerI
|
|||
QMenu *chatSettingsMenu = new QMenu(this);
|
||||
|
||||
aClearChat = chatSettingsMenu->addAction(QString());
|
||||
aClearChat->setShortcut(QKeySequence("F12"));
|
||||
connect(aClearChat, SIGNAL(triggered()), this, SLOT(actClearChat()));
|
||||
|
||||
chatSettingsMenu->addSeparator();
|
||||
|
@ -132,6 +131,8 @@ TabRoom::TabRoom(TabSupervisor *_tabSupervisor, AbstractClient *_client, ServerI
|
|||
|
||||
sayEdit->setCompleter(completer);
|
||||
actCompleterChanged();
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
}
|
||||
|
||||
TabRoom::~TabRoom()
|
||||
|
@ -282,6 +283,11 @@ void TabRoom::processRoomSayEvent(const Event_RoomSay &event)
|
|||
emit userEvent(false);
|
||||
}
|
||||
|
||||
void TabRoom::refreshShortcuts()
|
||||
{
|
||||
aClearChat->setShortcuts(settingsCache->shortcuts().getShortcut("tab_room/aClearChat"));
|
||||
}
|
||||
|
||||
void TabRoom::addMentionTag(QString mentionTag) {
|
||||
sayEdit->insert(mentionTag + " ");
|
||||
sayEdit->setFocus();
|
||||
|
@ -416,4 +422,4 @@ void CustomLineEdit::updateCompleterModel(QStringList completionList)
|
|||
model = new QStringListModel();
|
||||
QStringList updatedList = completionList;
|
||||
model->setStringList(updatedList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ private slots:
|
|||
void processJoinRoomEvent(const Event_JoinRoom &event);
|
||||
void processLeaveRoomEvent(const Event_LeaveRoom &event);
|
||||
void processRoomSayEvent(const Event_RoomSay &event);
|
||||
void refreshShortcuts();
|
||||
public:
|
||||
TabRoom(TabSupervisor *_tabSupervisor, AbstractClient *_client, ServerInfo_User *_ownUser, const ServerInfo_Room &info);
|
||||
~TabRoom();
|
||||
|
|
|
@ -461,7 +461,6 @@ void MainWindow::retranslateUi()
|
|||
aWatchReplay->setText(tr("&Watch replay..."));
|
||||
aDeckEditor->setText(tr("&Deck editor"));
|
||||
aFullScreen->setText(tr("&Full screen"));
|
||||
aFullScreen->setShortcut(QKeySequence("Ctrl+F"));
|
||||
aRegister->setText(tr("&Register to server..."));
|
||||
aSettings->setText(tr("&Settings..."));
|
||||
aExit->setText(tr("&Exit"));
|
||||
|
@ -471,10 +470,10 @@ void MainWindow::retranslateUi()
|
|||
#else
|
||||
cockatriceMenu->setTitle(tr("&Cockatrice"));
|
||||
#endif
|
||||
|
||||
aAbout->setText(tr("&About Cockatrice"));
|
||||
helpMenu->setTitle(tr("&Help"));
|
||||
aCheckCardUpdates->setText(tr("Check for card updates..."));
|
||||
|
||||
tabSupervisor->retranslateUi();
|
||||
}
|
||||
|
||||
|
@ -593,6 +592,9 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
createTrayActions();
|
||||
createTrayIcon();
|
||||
}
|
||||
|
||||
connect(&settingsCache->shortcuts(), SIGNAL(shortCutchanged()),this,SLOT(refreshShortcuts()));
|
||||
refreshShortcuts();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
|
@ -772,3 +774,17 @@ void MainWindow::cardUpdateFinished(int, QProcess::ExitStatus)
|
|||
// this will force a database reload
|
||||
settingsCache->setCardDatabasePath(settingsCache->getCardDatabasePath());
|
||||
}
|
||||
|
||||
void MainWindow::refreshShortcuts()
|
||||
{
|
||||
aConnect->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aConnect"));
|
||||
aDisconnect->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aDisconnect"));
|
||||
aSinglePlayer->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aSinglePlayer"));
|
||||
aWatchReplay->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aWatchReplay"));
|
||||
aDeckEditor->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aDeckEditor"));
|
||||
aFullScreen->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aFullScreen"));
|
||||
aRegister->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aRegister"));
|
||||
aSettings->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aSettings"));
|
||||
aExit->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aExit"));
|
||||
aCheckCardUpdates->setShortcuts(settingsCache->shortcuts().getShortcut("MainWindow/aCheckCardUpdates"));
|
||||
}
|
||||
|
|
|
@ -73,6 +73,7 @@ private slots:
|
|||
void actCheckCardUpdates();
|
||||
void cardUpdateError(QProcess::ProcessError err);
|
||||
void cardUpdateFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void refreshShortcuts();
|
||||
private:
|
||||
static const QString appName;
|
||||
void setClientStatusTitle();
|
||||
|
|
|
@ -13,6 +13,7 @@ SET(oracle_SOURCES
|
|||
src/oracleimporter.cpp
|
||||
../cockatrice/src/carddatabase.cpp
|
||||
../cockatrice/src/settingscache.cpp
|
||||
../cockatrice/src/shortcutssettings.cpp
|
||||
../cockatrice/src/qt-json/json.cpp
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue