aboutsummaryrefslogtreecommitdiffstats
path: root/src/winextras/doc/src/qtwinextras-overview.qdoc
blob: 39bdcd49e0dc613bbbd78c27ef30fd3f7420fd22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/****************************************************************************
**
** Copyright (C) 2013 Ivan Vizir <define-true-false@yandex.com>
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \page qtwinextras-Overview.html
    \title Qt Windows Extras Overview
    \brief Qt Windows Extras provides classes and functions for using some
    Windows APIs in a Qt way

    Qt Windows Extras provide classes and functions that enable you to use
    miscellaneous Windows-specific functions. For example, you can convert Qt
    objects to Windows object handles and manipulate DWM glass frames.

    In addition, you can use features introduced with Windows 7, such as Aero
    Peek, Jump Lists, a progress indicator on a taskbar button, or a thumbnail
    toolbar.

    \section1 Type Conversion

    The QtWin namespace provides functions to convert Qt objects of classes
    such as QPixmap or QImage to Windows HBITMAP or HICON handles, and vice
    versa.

    \section1 DWM and Glass Frame

    You can determine whether a window is included in the DWM Flip3D rendering.

    The glass frame that was first introduced with Windows Vista can be easily
    manipulated using the QtWin::extendFrameIntoClientArea() and
    QtWin::enableBlurBehindWindow() functions. Windows 8 lost the glass
    effect, but applications can still integrate their windows into the system
    frame to visually separate window controls from the rest of the window or to
    focus the user's attention on window content.

    \image glass.png "Glass frame extended into client area of a window"

    \section1 Aero Peek

    The Windows 7 \b {Aero Peek} feature gives the users the powers of X-ray
    vision that enable them to peek past all open windows straight at the
    desktop and the gadgets placed there. They can view the contents of a window
    without actually switching to it. You can enable Aero Peek for a
    gadget-like window or for a window that constantly displays monitoring data.

    You can use the QtWin::setWindowExcludedFromPeek() function to exclude
    an application window from Aero Peek.

    \note Aero Peek is disabled in Windows 8 by default but can be enabled
    by the user.

    \image peek-on.png "A window excluded from Aero Peek"

    \section1 Taskbar

    The taskbar provides users with access to applications that are open on the
    desktop. Windows automatically creates buttons on the taskbar for accessing
    application windows. Windows 7 adds new features to the taskbar buttons
    that are discussed in the following sections.

    \section2 Overlay Icons and Progress Indicators

    You can use the QWinTaskbarButton class to set an overlay icon and the
    QWinTaskbarProgress class to display a progress indicator on a taskbar button.
    An overlay icon indicates change in the state of the application. A progress
    indicator shows how time-consuming tasks are progressing.

    \image taskbar-button.png Taskbar Button

    \section3 Taskbar Example

    The following example code illustrates how to use the QWinTaskbarButton
    and QWinTaskbarProgress classes to adjust the look of the taskbar button:

    \snippet code/taskbar.cpp taskbar_cpp

    \section2 Jump Lists

    An application can use Jump Lists to provide users with faster access to
    files or to display shortcuts to tasks or commands.

    \image jumplist.png Jump List

    \list

        \li \b Destinations — categorized shortcuts to files and URLs that the
            application can handle and even links to other applications.
            Windows provides two standard categories that can be added to the
            custom Jump List, in addition to the ones that the application can
            create itself.
        \li \b Recent and \b Frequent — so called \e known categories that are
            populated automatically by Windows when the application uses the
            QFileDialog::getOpenFileName() function or when the application is
            launched to open a file from the Windows shell.

        \li \b Tasks — shortcuts to application functionality. An application
            can display its most frequently used context-independent functions
            on task lists.

    \endlist

    \note To be able to add destinations to its Jump Lists, the application
    should associate itself with the file types it can handle.

    \section3 Jump List Example

    The following example code illustrates how to use the classes in the
    QWinJumpList and QWinJumpListItem classes to implement Jump Lists:

    \snippet code/jumplist.cpp jumplist

    \section2 Thumbnail Toolbar

    Applications can embed a toolbar in the thumbnail of a window, which is
    shown when hovering over its taskbar icon. A thumbnail toolbar may provide
    quick access to the window's commands without requiring the user to restore
    or activate the window.

    \image thumbbar.png Media player thumbnail toolbar

    \section3 Thumbnail Toolbar Example

    The following example code illustrates how to use the functions in the
    QWinThumbnailToolBar and QWinThumbnailToolButton class to implement a
    thumbnail toolbar:

    \snippet code/thumbbar.cpp thumbbar_cpp

*/