move #define to include file and overload resizeEvent