src/gui/kernel/qapplication.cpp
changeset 30 5dc02b23752f
parent 25 e24348a560a6
child 33 3e2da88830cd
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   120 //#define ALIEN_DEBUG
   120 //#define ALIEN_DEBUG
   121 
   121 
   122 static void initResources()
   122 static void initResources()
   123 {
   123 {
   124 #if defined(Q_WS_WINCE)
   124 #if defined(Q_WS_WINCE)
       
   125     Q_INIT_RESOURCE_EXTERN(qstyle_wince)
   125     Q_INIT_RESOURCE(qstyle_wince);
   126     Q_INIT_RESOURCE(qstyle_wince);
   126 #elif defined(Q_OS_SYMBIAN)
   127 #elif defined(Q_OS_SYMBIAN)
       
   128     Q_INIT_RESOURCE_EXTERN(qstyle_s60)
   127     Q_INIT_RESOURCE(qstyle_s60);
   129     Q_INIT_RESOURCE(qstyle_s60);
   128 #else
   130 #else
       
   131     Q_INIT_RESOURCE_EXTERN(qstyle)
   129     Q_INIT_RESOURCE(qstyle);
   132     Q_INIT_RESOURCE(qstyle);
   130 #endif
   133 #endif
   131 
   134     Q_INIT_RESOURCE_EXTERN(qmessagebox)
   132     Q_INIT_RESOURCE(qmessagebox);
   135     Q_INIT_RESOURCE(qmessagebox);
   133 #if !defined(QT_NO_PRINTDIALOG)
   136 #if !defined(QT_NO_PRINTDIALOG)
       
   137     Q_INIT_RESOURCE_EXTERN(qprintdialog)
   134     Q_INIT_RESOURCE(qprintdialog);
   138     Q_INIT_RESOURCE(qprintdialog);
   135 #endif
   139 #endif
   136 
   140 
   137 }
   141 }
   138 
   142 
   179     directPainters = 0;
   183     directPainters = 0;
   180 #endif
   184 #endif
   181 
   185 
   182     gestureManager = 0;
   186     gestureManager = 0;
   183     gestureWidget = 0;
   187     gestureWidget = 0;
       
   188 
       
   189 #if defined(Q_WS_X11) || defined(Q_WS_WIN)
       
   190     move_cursor = 0;
       
   191     copy_cursor = 0;
       
   192     link_cursor = 0;
       
   193 #endif
       
   194 #if defined(Q_WS_WIN)
       
   195     ignore_cursor = 0;
       
   196 #endif
   184 
   197 
   185     if (!self)
   198     if (!self)
   186         self = this;
   199         self = this;
   187 }
   200 }
   188 
   201 
   483 
   496 
   484 inline bool QApplicationPrivate::isAlien(QWidget *widget)
   497 inline bool QApplicationPrivate::isAlien(QWidget *widget)
   485 {
   498 {
   486     if (!widget)
   499     if (!widget)
   487         return false;
   500         return false;
   488 #if defined(Q_WS_MAC) // Fake alien behavior on the Mac :)
   501 #if defined(Q_WS_QWS)
   489     return !widget->isWindow() && widget->window()->testAttribute(Qt::WA_DontShowOnScreen);
       
   490 #elif defined(Q_WS_QWS)
       
   491     return !widget->isWindow()
   502     return !widget->isWindow()
   492 # ifdef Q_BACKINGSTORE_SUBSURFACES
   503 # ifdef Q_BACKINGSTORE_SUBSURFACES
   493         && !(widget->d_func()->maybeTopData() && widget->d_func()->maybeTopData()->windowSurface)
   504         && !(widget->d_func()->maybeTopData() && widget->d_func()->maybeTopData()->windowSurface)
   494 # endif
   505 # endif
   495         ;
   506         ;
   775 #ifdef QT_EVAL
   786 #ifdef QT_EVAL
   776     extern void qt_gui_eval_init(uint);
   787     extern void qt_gui_eval_init(uint);
   777     qt_gui_eval_init(application_type);
   788     qt_gui_eval_init(application_type);
   778 #endif
   789 #endif
   779 
   790 
       
   791 #if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SYSTEMLOCALE)
       
   792     symbianInit();
       
   793 #endif
       
   794 
   780 #ifndef QT_NO_LIBRARY
   795 #ifndef QT_NO_LIBRARY
   781     if(load_testability) {
   796     if(load_testability) {
   782         QLibrary testLib(QLatin1String("qttestability"));
   797         QLibrary testLib(QLatin1String("qttestability"));
   783         if (testLib.load()) {
   798         if (testLib.load()) {
   784             typedef void (*TasInitialize)(void);
   799             typedef void (*TasInitialize)(void);
   891 void QApplicationPrivate::initialize()
   906 void QApplicationPrivate::initialize()
   892 {
   907 {
   893     QWidgetPrivate::mapper = new QWidgetMapper;
   908     QWidgetPrivate::mapper = new QWidgetMapper;
   894     QWidgetPrivate::allWidgets = new QWidgetSet;
   909     QWidgetPrivate::allWidgets = new QWidgetSet;
   895 
   910 
   896 #if !defined(Q_WS_X11) && !defined(Q_WS_QWS) && !defined(Q_CC_NOKIAX86)
   911 #if !defined(Q_WS_X11) && !defined(Q_WS_QWS)
   897     // initialize the graphics system - on X11 this is initialized inside
   912     // initialize the graphics system - on X11 this is initialized inside
   898     // qt_init() in qapplication_x11.cpp because of several reasons.
   913     // qt_init() in qapplication_x11.cpp because of several reasons.
   899     // On QWS, the graphics system is set by the QScreen plugin.
   914     // On QWS, the graphics system is set by the QScreen plugin.
   900     graphics_system = QGraphicsSystemFactory::create(graphics_system_name);
   915     graphics_system = QGraphicsSystemFactory::create(graphics_system_name);
   901 #endif
   916 #endif
   932 #endif //Q_WS_WINCE
   947 #endif //Q_WS_WINCE
   933 
   948 
   934     // Set up which span functions should be used in raster engine...
   949     // Set up which span functions should be used in raster engine...
   935     qInitDrawhelperAsm();
   950     qInitDrawhelperAsm();
   936 
   951 
   937 #if defined(Q_CC_NOKIAX86)
       
   938     // initialize the graphics system - For symbian emulator, we create graphics system here, since
       
   939     // there is some unknown error launching the emulator with openVg when 
       
   940     // graphics system is created before style instance.
       
   941     graphics_system = QGraphicsSystemFactory::create(graphics_system_name);
       
   942 #endif
       
   943 
       
   944 #ifndef QT_NO_WHEELEVENT
   952 #ifndef QT_NO_WHEELEVENT
   945     QApplicationPrivate::wheel_scroll_lines = 3;
   953     QApplicationPrivate::wheel_scroll_lines = 3;
   946 #endif
   954 #endif
   947 
   955 
   948     if (qt_is_gui_used)
   956     if (qt_is_gui_used)
  1037     qt_desktopWidget = 0;
  1045     qt_desktopWidget = 0;
  1038 
  1046 
  1039 #ifndef QT_NO_CLIPBOARD
  1047 #ifndef QT_NO_CLIPBOARD
  1040     delete qt_clipboard;
  1048     delete qt_clipboard;
  1041     qt_clipboard = 0;
  1049     qt_clipboard = 0;
       
  1050 #endif
       
  1051 
       
  1052 #if defined(Q_WS_X11) || defined(Q_WS_WIN)
       
  1053     delete d->move_cursor; d->move_cursor = 0;
       
  1054     delete d->copy_cursor; d->copy_cursor = 0;
       
  1055     delete d->link_cursor; d->link_cursor = 0;
       
  1056 #endif
       
  1057 #if defined(Q_WS_WIN)
       
  1058     delete d->ignore_cursor; d->ignore_cursor = 0;
  1042 #endif
  1059 #endif
  1043 
  1060 
  1044     delete QWidgetPrivate::mapper;
  1061     delete QWidgetPrivate::mapper;
  1045     QWidgetPrivate::mapper = 0;
  1062     QWidgetPrivate::mapper = 0;
  1046 
  1063 
  2296         (QApplication::tr("QT_LAYOUT_DIRECTION",
  2313         (QApplication::tr("QT_LAYOUT_DIRECTION",
  2297                          "Translate this string to the string 'LTR' in left-to-right"
  2314                          "Translate this string to the string 'LTR' in left-to-right"
  2298                          " languages or to 'RTL' in right-to-left languages (such as Hebrew"
  2315                          " languages or to 'RTL' in right-to-left languages (such as Hebrew"
  2299                          " and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
  2316                          " and Arabic) to get proper widget layout.") == QLatin1String("RTL"));
  2300 }
  2317 }
       
  2318 #if defined(Q_WS_MAC)
       
  2319 static const char *application_menu_strings[] = {
       
  2320     QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Services"),
       
  2321     QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide %1"),
       
  2322     QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide Others"),
       
  2323     QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Show All"),
       
  2324     QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Preferences..."),
       
  2325     QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Quit %1"),
       
  2326     QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","About %1")
       
  2327     };
       
  2328 QString qt_mac_applicationmenu_string(int type)
       
  2329 {
       
  2330     return qApp->translate("MAC_APPLICATION_MENU",
       
  2331                            application_menu_strings[type]);
       
  2332 }
       
  2333 #endif
  2301 #endif
  2334 #endif
  2302 
  2335 
  2303 /*!\reimp
  2336 /*!\reimp
  2304 
  2337 
  2305 */
  2338 */
  2324             return true;
  2357             return true;
  2325     } else if(e->type() == QEvent::LanguageChange) {
  2358     } else if(e->type() == QEvent::LanguageChange) {
  2326 #ifndef QT_NO_TRANSLATION
  2359 #ifndef QT_NO_TRANSLATION
  2327         setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight);
  2360         setLayoutDirection(qt_detectRTLLanguage()?Qt::RightToLeft:Qt::LeftToRight);
  2328 #endif
  2361 #endif
       
  2362 #if defined(QT_MAC_USE_COCOA)
       
  2363         qt_mac_post_retranslateAppMenu();
       
  2364 #endif
  2329         QWidgetList list = topLevelWidgets();
  2365         QWidgetList list = topLevelWidgets();
  2330         for (int i = 0; i < list.size(); ++i) {
  2366         for (int i = 0; i < list.size(); ++i) {
  2331             QWidget *w = list.at(i);
  2367             QWidget *w = list.at(i);
  2332             if (!(w->windowType() == Qt::Desktop))
  2368             if (!(w->windowType() == Qt::Desktop))
  2333                 postEvent(w, new QEvent(QEvent::LanguageChange));
  2369                 postEvent(w, new QEvent(QEvent::LanguageChange));
  2334         }
  2370         }
       
  2371 #ifndef Q_OS_WIN
       
  2372     } else if (e->type() == QEvent::LocaleChange) {
       
  2373         // on Windows the event propagation is taken care by the
       
  2374         // WM_SETTINGCHANGE event handler.
       
  2375         QWidgetList list = topLevelWidgets();
       
  2376         for (int i = 0; i < list.size(); ++i) {
       
  2377             QWidget *w = list.at(i);
       
  2378             if (!(w->windowType() == Qt::Desktop)) {
       
  2379                 if (!w->testAttribute(Qt::WA_SetLocale))
       
  2380                     w->d_func()->setLocale_helper(QLocale(), true);
       
  2381             }
       
  2382         }
       
  2383 #endif
  2335     } else if (e->type() == QEvent::Timer) {
  2384     } else if (e->type() == QEvent::Timer) {
  2336         QTimerEvent *te = static_cast<QTimerEvent*>(e);
  2385         QTimerEvent *te = static_cast<QTimerEvent*>(e);
  2337         Q_ASSERT(te != 0);
  2386         Q_ASSERT(te != 0);
  2338         if (te->timerId() == d->toolTipWakeUp.timerId()) {
  2387         if (te->timerId() == d->toolTipWakeUp.timerId()) {
  2339             d->toolTipWakeUp.stop();
  2388             d->toolTipWakeUp.stop();
  2998     }
  3047     }
  2999 
  3048 
  3000     return result;
  3049     return result;
  3001 }
  3050 }
  3002 
  3051 
  3003 #if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS)
  3052 #if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_WS_MAC)
  3004 /*
  3053 /*
  3005     This function should only be called when the widget changes visibility, i.e.
  3054     This function should only be called when the widget changes visibility, i.e.
  3006     when the \a widget is shown, hidden or deleted. This function does nothing
  3055     when the \a widget is shown, hidden or deleted. This function does nothing
  3007     if the widget is a top-level or native, i.e. not an alien widget. In that
  3056     if the widget is a top-level or native, i.e. not an alien widget. In that
  3008     case enter/leave events are genereated by the underlying windowing system.
  3057     case enter/leave events are genereated by the underlying windowing system.
  3058     // Send enter/leave events followed by a mouse move on the entered widget.
  3107     // Send enter/leave events followed by a mouse move on the entered widget.
  3059     QMouseEvent e(QEvent::MouseMove, pos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
  3108     QMouseEvent e(QEvent::MouseMove, pos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
  3060     sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver);
  3109     sendMouseEvent(widgetUnderCursor, &e, widgetUnderCursor, tlw, &qt_button_down, qt_last_mouse_receiver);
  3061 #endif // QT_NO_CURSOR
  3110 #endif // QT_NO_CURSOR
  3062 }
  3111 }
  3063 #endif // Q_WS_WIN || Q_WS_X11
  3112 #endif // Q_WS_WIN || Q_WS_X11 || Q_WS_MAC
  3064 
  3113 
  3065 /*!
  3114 /*!
  3066     Returns the desktop widget (also called the root window).
  3115     Returns the desktop widget (also called the root window).
  3067 
  3116 
  3068     The desktop may be composed of multiple screens, so it would be incorrect,
  3117     The desktop may be composed of multiple screens, so it would be incorrect,
  5258 #elif defined(Q_OS_SYMBIAN)
  5307 #elif defined(Q_OS_SYMBIAN)
  5259     if (!d->inputContext) {
  5308     if (!d->inputContext) {
  5260         QApplication *that = const_cast<QApplication *>(this);
  5309         QApplication *that = const_cast<QApplication *>(this);
  5261         const QStringList keys = QInputContextFactory::keys();
  5310         const QStringList keys = QInputContextFactory::keys();
  5262         // Try hbim and coefep first, then try others.
  5311         // Try hbim and coefep first, then try others.
  5263         if (keys.contains("hbim")) {
  5312         if (keys.contains(QLatin1String("hbim"))) {
  5264             that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("hbim"), that);
  5313             that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("hbim"), that);
  5265         } else if (keys.contains("coefep")) {
  5314         } else if (keys.contains(QLatin1String("coefep"))) {
  5266             that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
  5315             that->d_func()->inputContext = QInputContextFactory::create(QLatin1String("coefep"), that);
  5267         } else {
  5316         } else {
  5268             for (int c = 0; c < keys.size() && !d->inputContext; ++c) {
  5317             for (int c = 0; c < keys.size() && !d->inputContext; ++c) {
  5269                 that->d_func()->inputContext = QInputContextFactory::create(keys[c], that);
  5318                 that->d_func()->inputContext = QInputContextFactory::create(keys[c], that);
  5270             }
  5319             }
  5706     if (!qAppPriv->gestureManager)
  5755     if (!qAppPriv->gestureManager)
  5707         qAppPriv->gestureManager = new QGestureManager(qApp);
  5756         qAppPriv->gestureManager = new QGestureManager(qApp);
  5708     return qAppPriv->gestureManager;
  5757     return qAppPriv->gestureManager;
  5709 }
  5758 }
  5710 
  5759 
       
  5760 // These pixmaps approximate the images in the Windows User Interface Guidelines.
       
  5761 
       
  5762 // XPM
       
  5763 
       
  5764 static const char * const move_xpm[] = {
       
  5765 "11 20 3 1",
       
  5766 ".        c None",
       
  5767 #if defined(Q_WS_WIN)
       
  5768 "a        c #000000",
       
  5769 "X        c #FFFFFF", // Windows cursor is traditionally white
       
  5770 #else
       
  5771 "a        c #FFFFFF",
       
  5772 "X        c #000000", // X11 cursor is traditionally black
       
  5773 #endif
       
  5774 "aa.........",
       
  5775 "aXa........",
       
  5776 "aXXa.......",
       
  5777 "aXXXa......",
       
  5778 "aXXXXa.....",
       
  5779 "aXXXXXa....",
       
  5780 "aXXXXXXa...",
       
  5781 "aXXXXXXXa..",
       
  5782 "aXXXXXXXXa.",
       
  5783 "aXXXXXXXXXa",
       
  5784 "aXXXXXXaaaa",
       
  5785 "aXXXaXXa...",
       
  5786 "aXXaaXXa...",
       
  5787 "aXa..aXXa..",
       
  5788 "aa...aXXa..",
       
  5789 "a.....aXXa.",
       
  5790 "......aXXa.",
       
  5791 ".......aXXa",
       
  5792 ".......aXXa",
       
  5793 "........aa."};
       
  5794 
       
  5795 #ifdef Q_WS_WIN
       
  5796 /* XPM */
       
  5797 static const char * const ignore_xpm[] = {
       
  5798 "24 30 3 1",
       
  5799 ".        c None",
       
  5800 "a        c #000000",
       
  5801 "X        c #FFFFFF",
       
  5802 "aa......................",
       
  5803 "aXa.....................",
       
  5804 "aXXa....................",
       
  5805 "aXXXa...................",
       
  5806 "aXXXXa..................",
       
  5807 "aXXXXXa.................",
       
  5808 "aXXXXXXa................",
       
  5809 "aXXXXXXXa...............",
       
  5810 "aXXXXXXXXa..............",
       
  5811 "aXXXXXXXXXa.............",
       
  5812 "aXXXXXXaaaa.............",
       
  5813 "aXXXaXXa................",
       
  5814 "aXXaaXXa................",
       
  5815 "aXa..aXXa...............",
       
  5816 "aa...aXXa...............",
       
  5817 "a.....aXXa..............",
       
  5818 "......aXXa.....XXXX.....",
       
  5819 ".......aXXa..XXaaaaXX...",
       
  5820 ".......aXXa.XaaaaaaaaX..",
       
  5821 "........aa.XaaaXXXXaaaX.",
       
  5822 "...........XaaaaX..XaaX.",
       
  5823 "..........XaaXaaaX..XaaX",
       
  5824 "..........XaaXXaaaX.XaaX",
       
  5825 "..........XaaX.XaaaXXaaX",
       
  5826 "..........XaaX..XaaaXaaX",
       
  5827 "...........XaaX..XaaaaX.",
       
  5828 "...........XaaaXXXXaaaX.",
       
  5829 "............XaaaaaaaaX..",
       
  5830 ".............XXaaaaXX...",
       
  5831 "...............XXXX....."};
       
  5832 #endif
       
  5833 
       
  5834 /* XPM */
       
  5835 static const char * const copy_xpm[] = {
       
  5836 "24 30 3 1",
       
  5837 ".        c None",
       
  5838 "a        c #000000",
       
  5839 "X        c #FFFFFF",
       
  5840 #if defined(Q_WS_WIN) // Windows cursor is traditionally white
       
  5841 "aa......................",
       
  5842 "aXa.....................",
       
  5843 "aXXa....................",
       
  5844 "aXXXa...................",
       
  5845 "aXXXXa..................",
       
  5846 "aXXXXXa.................",
       
  5847 "aXXXXXXa................",
       
  5848 "aXXXXXXXa...............",
       
  5849 "aXXXXXXXXa..............",
       
  5850 "aXXXXXXXXXa.............",
       
  5851 "aXXXXXXaaaa.............",
       
  5852 "aXXXaXXa................",
       
  5853 "aXXaaXXa................",
       
  5854 "aXa..aXXa...............",
       
  5855 "aa...aXXa...............",
       
  5856 "a.....aXXa..............",
       
  5857 "......aXXa..............",
       
  5858 ".......aXXa.............",
       
  5859 ".......aXXa.............",
       
  5860 "........aa...aaaaaaaaaaa",
       
  5861 #else
       
  5862 "XX......................",
       
  5863 "XaX.....................",
       
  5864 "XaaX....................",
       
  5865 "XaaaX...................",
       
  5866 "XaaaaX..................",
       
  5867 "XaaaaaX.................",
       
  5868 "XaaaaaaX................",
       
  5869 "XaaaaaaaX...............",
       
  5870 "XaaaaaaaaX..............",
       
  5871 "XaaaaaaaaaX.............",
       
  5872 "XaaaaaaXXXX.............",
       
  5873 "XaaaXaaX................",
       
  5874 "XaaXXaaX................",
       
  5875 "XaX..XaaX...............",
       
  5876 "XX...XaaX...............",
       
  5877 "X.....XaaX..............",
       
  5878 "......XaaX..............",
       
  5879 ".......XaaX.............",
       
  5880 ".......XaaX.............",
       
  5881 "........XX...aaaaaaaaaaa",
       
  5882 #endif
       
  5883 ".............aXXXXXXXXXa",
       
  5884 ".............aXXXXXXXXXa",
       
  5885 ".............aXXXXaXXXXa",
       
  5886 ".............aXXXXaXXXXa",
       
  5887 ".............aXXaaaaaXXa",
       
  5888 ".............aXXXXaXXXXa",
       
  5889 ".............aXXXXaXXXXa",
       
  5890 ".............aXXXXXXXXXa",
       
  5891 ".............aXXXXXXXXXa",
       
  5892 ".............aaaaaaaaaaa"};
       
  5893 
       
  5894 /* XPM */
       
  5895 static const char * const link_xpm[] = {
       
  5896 "24 30 3 1",
       
  5897 ".        c None",
       
  5898 "a        c #000000",
       
  5899 "X        c #FFFFFF",
       
  5900 #if defined(Q_WS_WIN) // Windows cursor is traditionally white
       
  5901 "aa......................",
       
  5902 "aXa.....................",
       
  5903 "aXXa....................",
       
  5904 "aXXXa...................",
       
  5905 "aXXXXa..................",
       
  5906 "aXXXXXa.................",
       
  5907 "aXXXXXXa................",
       
  5908 "aXXXXXXXa...............",
       
  5909 "aXXXXXXXXa..............",
       
  5910 "aXXXXXXXXXa.............",
       
  5911 "aXXXXXXaaaa.............",
       
  5912 "aXXXaXXa................",
       
  5913 "aXXaaXXa................",
       
  5914 "aXa..aXXa...............",
       
  5915 "aa...aXXa...............",
       
  5916 "a.....aXXa..............",
       
  5917 "......aXXa..............",
       
  5918 ".......aXXa.............",
       
  5919 ".......aXXa.............",
       
  5920 "........aa...aaaaaaaaaaa",
       
  5921 #else
       
  5922 "XX......................",
       
  5923 "XaX.....................",
       
  5924 "XaaX....................",
       
  5925 "XaaaX...................",
       
  5926 "XaaaaX..................",
       
  5927 "XaaaaaX.................",
       
  5928 "XaaaaaaX................",
       
  5929 "XaaaaaaaX...............",
       
  5930 "XaaaaaaaaX..............",
       
  5931 "XaaaaaaaaaX.............",
       
  5932 "XaaaaaaXXXX.............",
       
  5933 "XaaaXaaX................",
       
  5934 "XaaXXaaX................",
       
  5935 "XaX..XaaX...............",
       
  5936 "XX...XaaX...............",
       
  5937 "X.....XaaX..............",
       
  5938 "......XaaX..............",
       
  5939 ".......XaaX.............",
       
  5940 ".......XaaX.............",
       
  5941 "........XX...aaaaaaaaaaa",
       
  5942 #endif
       
  5943 ".............aXXXXXXXXXa",
       
  5944 ".............aXXXaaaaXXa",
       
  5945 ".............aXXXXaaaXXa",
       
  5946 ".............aXXXaaaaXXa",
       
  5947 ".............aXXaaaXaXXa",
       
  5948 ".............aXXaaXXXXXa",
       
  5949 ".............aXXaXXXXXXa",
       
  5950 ".............aXXXaXXXXXa",
       
  5951 ".............aXXXXXXXXXa",
       
  5952 ".............aaaaaaaaaaa"};
       
  5953 
       
  5954 QPixmap QApplicationPrivate::getPixmapCursor(Qt::CursorShape cshape)
       
  5955 {
       
  5956 #if defined(Q_WS_X11) || defined(Q_WS_WIN)
       
  5957     if (!move_cursor) {
       
  5958         move_cursor = new QPixmap((const char **)move_xpm);
       
  5959         copy_cursor = new QPixmap((const char **)copy_xpm);
       
  5960         link_cursor = new QPixmap((const char **)link_xpm);
       
  5961 #ifdef Q_WS_WIN
       
  5962         ignore_cursor = new QPixmap((const char **)ignore_xpm);
       
  5963 #endif
       
  5964     }
       
  5965 
       
  5966     switch (cshape) {
       
  5967     case Qt::DragMoveCursor:
       
  5968         return *move_cursor;
       
  5969     case Qt::DragCopyCursor:
       
  5970         return *copy_cursor;
       
  5971     case Qt::DragLinkCursor:
       
  5972         return *link_cursor;
       
  5973 #ifdef Q_WS_WIN
       
  5974     case Qt::ForbiddenCursor:
       
  5975         return *ignore_cursor;
       
  5976 #endif
       
  5977     default:
       
  5978         break;
       
  5979     }
       
  5980 #endif
       
  5981     return QPixmap();
       
  5982 }
       
  5983 
  5711 QT_END_NAMESPACE
  5984 QT_END_NAMESPACE
  5712 
  5985 
  5713 #include "moc_qapplication.cpp"
  5986 #include "moc_qapplication.cpp"