In this work, we focus on the integration of two problems arising in the management of transshipment container terminals: the problem of assigning and scheduling incoming ships to berthing positions (berth allocation problem), and the problem of assigning quay cranes to incoming ships (quay crane assignment problem). In particular, motivated by the practice in the negotiation process between the terminal management and the shipping liner, the model is based on the concept of quay-crane assignment profile, i.e., the sequence of the number of cranes assigned to the ship along each operating work shift. Two mixed integer formulations are considered with a quadratic and a linearized objective function, respectively. Both models have been validated on instances based on real data. Computation confirms that the problem is hardly solvable via exact methods, hence we introduce heuristic methods for finding good feasible solutions in a reasonable amount of time and present computational results obtained on the same set of instances.