Catalysis of the transfer of a methyl group from S-adenosylmethionine during the synthesis of quinone cofactors such as ubiquinone (coenzyme Q), menaquinone (vitamin K2), plastoquinone and phylloquinone (vitamin K1).