For a complex finite-dimensional simple Lie algebra g, we introduce the notion of Q-datum, which generalizes the notion of a Dynkin quiver with a height function from the viewpoint of Weyl group combinatorics. Using this notion, we develop a unified theory describing the twisted Auslander–Reiten quivers and the twisted adapted classes introduced in Oh and Suh (J Algebra 535(1):53–132, 2019) with an appropriate notion of the generalized Coxeter elements. As a consequence, we obtain a combinatorial formula expressing the inverse of the quantum Cartan matrix of g, which generalizes the result of Hernandez and Leclerc (J Reine Angew Math 701:77–126, 2015) in the simply-laced case. We also find several applications of our combinatorial theory of Q-data to the finite-dimensional representation theory of the untwisted quantum affine algebra of g. In particular, in terms of Q-data and the inverse of the quantum Cartan matrix, (i) we give an alternative description of the block decomposition results due to Chari and Moura (Int Math Res Not 5:257–298, 2005) and Kashiwara et al. (Block decomposition for quantum affine algebras by the associated simply-laced root system, 2020. arXiv:2003.03265), (ii) we present a unified (partially conjectural) formula of the denominators of the normalized R-matrices between all the Kirillov–Reshetikhin modules, and (iii) we compute the invariants Λ (V, W) and Λ ∞(V, W) introduced in Kashiwara et al. (Compos Math 156(5):1039–1077, 2020) for each pair of simple modules V and W.