This sentence is from "little witch academia" episode 10 first season. It looks like it's an abbreviated form of something. What is it? The character is clearly asking if one understands what he is saying but I don't get the nuance of 動詞て形+のことか
.
My take is that the construction is emphasizing the expression as in このいいプレゼントを買ったのはあなたを思ってのことだ。