Changeset 8 for trunk/src/styles/qwindowsstyle.cpp
- Timestamp:
- Nov 16, 2005, 8:36:46 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/styles/qwindowsstyle.cpp
r7 r8 85 85 enum QSliderDirection { SlUp, SlDown, SlLeft, SlRight }; 86 86 87 #ifndef QT_NO_MENUDATA 87 88 // A friendly class providing access to QMenuData's protected member. 88 89 class FriendlyMenuData : public QMenuData … … 90 91 friend class QWindowsStyle; 91 92 }; 93 #endif 92 94 93 95 // Private class … … 158 160 break; 159 161 case QEvent::KeyRelease: 162 #ifndef QT_NO_MENUDATA 160 163 if (((QKeyEvent*)e)->key() == Key_Alt) { 161 164 widget = widget->topLevelWidget(); … … 172 175 } 173 176 } 177 #endif 174 178 break; 175 179 case QEvent::FocusIn: 176 180 case QEvent::FocusOut: 181 #ifndef QT_NO_MENUBAR 177 182 { 178 183 // Menubars toggle based on focus … … 181 186 menuBarTimer = menuBar->startTimer(0); 182 187 } 188 #endif 183 189 break; 184 190 case QEvent::Close: … … 188 194 break; 189 195 case QEvent::Timer: 196 #ifndef QT_NO_MENUBAR 190 197 { 191 198 QMenuBar *menuBar = ::qt_cast<QMenuBar*>(o); … … 198 205 } 199 206 } 207 #endif 200 208 break; 201 209 default: … … 841 849 const QPopupMenu *popupmenu = (const QPopupMenu *) widget; 842 850 QMenuItem *mi = opt.menuItem(); 851 852 // QPopupMenu has WResizeNoErase and WRepaintNoErase flags, so we 853 // must erase areas not covered by menu items (this is requested by 854 // QPopupMenu using 0 as the menu item argument). 855 // [Win32 version feels ok without this, because it doesn't actually 856 // fully obey WResizeNoErase and WRepaintNoErase: WM_ERASEBKGND always 857 // erases the background before WM_PAINT and after every resize]. 858 #if !defined (Q_WS_PM) 843 859 if ( !mi ) 844 860 break; 845 861 #endif 862 846 863 int tab = opt.tabWidth(); 847 864 int maxpmw = opt.maxIconWidth();
Note:
See TracChangeset
for help on using the changeset viewer.