We propose a model to describe wetting of a solid in the presence of gravity. The Hamiltonian allows one to include heterogeneities in the wetting angle along the surface of the solid and therefore is able to deal with the question of wetting on a heterogeneous surface. The ground state is computed using Monte Carlo simulation. The model is shown to be in agreement with results from capillary theory of homogeneous surfaces. For the case of a heterogeneous surface we have investigated the influence of the distance between line pinning centers on the averaged height of the triple line.