1. Heat olive oil in a saucepan and gently fry the onion for 3 minutes. Add mushrooms, green pepper and tomatoes and cook until most liquids evaporate and sauce thickens. Season with salt and pepper, add curry powder and stir. Remove from heat.
2. Meanwhile, add pasta to a large saucepan of plenty of salted boiling water and boil, uncovered, until al-dente. Melt butter in a small pan and gently fry the ham for 3 minutes. Drain the cooked pasta, return it to the saucepan and add the fried ham, the fresh cream and 2½ cups of the grated cheeses. Toss well.
3. Empty half the pasta in a square oven-proof dish and top with half the tomato sauce. Continue with the rest of the pasta and the remaining sauce and sprinkle on top the remaining grated cheese.
4. Cook in moderate oven for about 20 minutes, cool slightly and serve.