Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/kernel/qguifunctions_wince.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    7777#endif
    7878
     79#ifndef SHDB_HIDE
     80#define SHDB_HIDE 0x0002
     81#endif
     82
    7983#ifndef SHFS_SHOWTASKBAR
    8084#define SHFS_SHOWTASKBAR 0x0001
     
    113117typedef BOOL (*AygFullScreen)(HWND, DWORD);
    114118typedef BOOL (*AygSHSipInfo)(UINT, UINT, PVOID, UINT);
     119typedef BOOL (*AygSHDoneButton)(HWND, DWORD);
    115120
    116121static AygInitDialog ptrAygInitDialog = 0;
    117122static AygFullScreen ptrAygFullScreen = 0;
    118123static AygSHSipInfo  ptrAygSHSipInfo  = 0;
     124static AygSHDoneButton ptrAygSHDoneButton = 0;
    119125static bool aygResolved = false;
    120126
     
    129135        ptrAygFullScreen = (AygFullScreen) ayglib.resolve("SHFullScreen");
    130136        ptrAygSHSipInfo  = (AygSHSipInfo)  ayglib.resolve("SHSipInfo");
    131     }
    132 }
    133 
    134 struct DIBINFO : public BITMAPINFO
    135 {
    136     RGBQUAD arColors[255];
    137 
    138     operator LPBITMAPINFO() { return (LPBITMAPINFO) this; }
    139     operator LPBITMAPINFOHEADER() { return &bmiHeader; }
    140     RGBQUAD* ColorTable() { return bmiColors; }
    141 };
     137        ptrAygSHDoneButton = (AygSHDoneButton) ayglib.resolve("SHDoneButton");
     138    }
     139}
    142140
    143141int qt_wince_GetDIBits(HDC /*hdc*/ , HBITMAP hSourceBitmap, uint, uint, LPVOID lpvBits, LPBITMAPINFO, uint)
     
    324322        if (widget->windowFlags() & Qt::WindowOkButtonHint)
    325323            shidi.dwFlags |= SHIDIF_DONEBUTTON;
     324        if (!(widget->windowFlags() & (Qt::WindowCancelButtonHint | Qt::WindowOkButtonHint)))
     325            shidi.dwFlags |= SHIDIF_CANCELBUTTON;
    326326        resolveAygLibs();
    327327        if (ptrAygInitDialog)
     
    332332        MoveWindow(hwnd, r.top, r.left, r.right - r.left, r.bottom - r.top, true);
    333333        SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong (hwnd, GWL_EXSTYLE) | WS_EX_NODRAG);
     334    }
     335}
     336
     337void qt_wince_unmaximize(QWidget *widget)
     338{
     339    if (ptrAygSHDoneButton && qt_wince_is_mobile()
     340        && !(widget->windowFlags() & (Qt::WindowCancelButtonHint | Qt::WindowOkButtonHint)))
     341    {
     342        // Hide the [X] button, we've added in qt_wince_maximize.
     343        ptrAygSHDoneButton(widget->winId(), SHDB_HIDE);
    334344    }
    335345}
Note: See TracChangeset for help on using the changeset viewer.