summaryrefslogtreecommitdiffstats
path: root/src/H5B2.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-02-19 17:46:33 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-02-19 17:46:33 (GMT)
commite03fe7a647d650a2dfd8ab1546272d610709ddc9 (patch)
tree9e2439dfc0f9b73e7e94614649ab153e14eda683 /src/H5B2.c
parentb5b1d7f71385719a6a08154f80a0505b9474caf3 (diff)
downloadhdf5-e03fe7a647d650a2dfd8ab1546272d610709ddc9.zip
hdf5-e03fe7a647d650a2dfd8ab1546272d610709ddc9.tar.gz
hdf5-e03fe7a647d650a2dfd8ab1546272d610709ddc9.tar.bz2
[svn-r10047] Purpose:
New feature Description: Allow internal nodes to perform 3->4 splits. Inserting records should now be feature complete. Platforms tested: FreeBSD 4.11 (sleipnir) Solaris 2.9 (shanti)
Diffstat (limited to 'src/H5B2.c')
-rw-r--r--src/H5B2.c138
1 files changed, 131 insertions, 7 deletions
diff --git a/src/H5B2.c b/src/H5B2.c
index ebe0348..6baf502 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -1296,6 +1296,12 @@ H5B2_split3(H5F_t *f, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_
uint8_t *middle_native; /* Pointer to middle child's native records */
uint8_t *new_native; /* Pointer to new child's native records */
H5B2_shared_t *shared; /* B-tree's shared info */
+ H5B2_node_ptr_t *left_node_ptrs=NULL, *right_node_ptrs=NULL;/* Pointers to childs' node pointer info */
+ H5B2_node_ptr_t *middle_node_ptrs=NULL;/* Pointers to childs' node pointer info */
+ H5B2_node_ptr_t *new_node_ptrs=NULL;/* Pointers to childs' node pointer info */
+ int left_moved_nrec=0, right_moved_nrec=0; /* Number of records moved, for internal split */
+ int middle_moved_nrec=0; /* Number of records moved, for internal split */
+ int new_moved_nrec=0; /* Number of records moved, for internal split */
herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5B2_split3)
@@ -1313,8 +1319,60 @@ H5B2_split3(H5F_t *f, hid_t dxpl_id, unsigned depth, H5B2_node_ptr_t *curr_node_
/* Check for the kind of B-tree node to split */
if(depth>1) {
-HDfprintf(stderr,"%s: splitting internal node! (need to handle node_ptrs)\n",FUNC);
-HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split nodes")
+ H5B2_internal_t *left_internal; /* Pointer to left internal node */
+ H5B2_internal_t *right_internal; /* Pointer to right internal node */
+ H5B2_internal_t *middle_internal; /* Pointer to middle internal node */
+ H5B2_internal_t *new_internal; /* Pointer to new internal node */
+
+ /* Setup information for unlocking child nodes */
+ child_class = H5AC_BT2_INT;
+ left_addr = internal->node_ptrs[idx-1].addr;
+ middle_addr = internal->node_ptrs[idx].addr;
+ right_addr = internal->node_ptrs[idx+2].addr;
+
+ /* Lock left & right B-tree child nodes */
+ if (NULL == (left_internal = H5AC_protect(f, dxpl_id, child_class, left_addr, &(internal->node_ptrs[idx-1].node_nrec), internal->shared, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
+ if (NULL == (middle_internal = H5AC_protect(f, dxpl_id, child_class, middle_addr, &(internal->node_ptrs[idx].node_nrec), internal->shared, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
+ if (NULL == (right_internal = H5AC_protect(f, dxpl_id, child_class, right_addr, &(internal->node_ptrs[idx+2].node_nrec), internal->shared, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
+
+ /* Create new empty internal node */
+ internal->node_ptrs[idx+1].all_nrec=internal->node_ptrs[idx+1].node_nrec=0;
+ if(H5B2_create_internal(f, dxpl_id, internal->shared, &(internal->node_ptrs[idx+1]))<0)
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTINIT, FAIL, "unable to create new internal node")
+
+ /* Setup information for unlocking middle child node */
+ new_addr = internal->node_ptrs[idx+1].addr;
+
+ /* Lock "new" internal node */
+ if (NULL == (new_internal = H5AC_protect(f, dxpl_id, child_class, new_addr, &(internal->node_ptrs[idx+1].node_nrec), internal->shared, H5AC_WRITE)))
+ HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
+
+ /* More setup for accessing child node information */
+ left_child = left_internal;
+ middle_child = middle_internal;
+ new_child = new_internal;
+ right_child = right_internal;
+ left_nrec = &(left_internal->nrec);
+ middle_nrec = &(middle_internal->nrec);
+ new_nrec = &(new_internal->nrec);
+ right_nrec = &(right_internal->nrec);
+ left_native = left_internal->int_native;
+ middle_native = middle_internal->int_native;
+ new_native = new_internal->int_native;
+ right_native = right_internal->int_native;
+ left_node_ptrs = left_internal->node_ptrs;
+ middle_node_ptrs = middle_internal->node_ptrs;
+ right_node_ptrs = right_internal->node_ptrs;
+ new_node_ptrs = new_internal->node_ptrs;
+
+ /* Mark child nodes as dirty now */
+ left_internal->cache_info.is_dirty = TRUE;
+ middle_internal->cache_info.is_dirty = TRUE;
+ new_internal->cache_info.is_dirty = TRUE;
+ right_internal->cache_info.is_dirty = TRUE;
} /* end if */
else {
H5B2_leaf_t *left_leaf; /* Pointer to left leaf node */
@@ -1397,6 +1455,24 @@ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split nodes")
/* Slide records in right node down */
HDmemmove(H5B2_NAT_NREC(right_native,shared,0),H5B2_NAT_NREC(right_native,shared,right_nrec_move),shared->type->nrec_size*new_right_nrec);
+
+ /* Move node pointers also if this is an internal node */
+ if(depth>1) {
+ int moved_nrec; /* Total number of records moved, for internal redistrib */
+ unsigned u; /* Local index variable */
+
+ /* Move right node pointers into new node */
+ HDmemcpy(&(new_node_ptrs[(new_new_nrec-right_nrec_move)+1]),&(right_node_ptrs[0]),sizeof(H5B2_node_ptr_t)*right_nrec_move);
+
+ /* Count the number of records being moved into the new node */
+ for(u=0, moved_nrec=0; u<right_nrec_move; u++)
+ moved_nrec += right_node_ptrs[u].all_nrec;
+ right_moved_nrec = -(moved_nrec+right_nrec_move);
+ new_moved_nrec += (moved_nrec+right_nrec_move);
+
+ /* Slide the node pointers in right node down */
+ HDmemmove(&(right_node_ptrs[0]),&(right_node_ptrs[right_nrec_move]),sizeof(H5B2_node_ptr_t)*(new_right_nrec+1));
+ } /* end if */
} /* end block */
/* Finish filling new node from middle node */
@@ -1411,6 +1487,24 @@ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split nodes")
/* Slide records in middle node up */
HDmemmove(H5B2_NAT_NREC(middle_native,shared,(new_middle_nrec-((*middle_nrec-new_nrec_move)-1))),H5B2_NAT_NREC(middle_native,shared,0),shared->type->nrec_size*(*middle_nrec-(new_nrec_move+1)));
+
+ /* Move node pointers also if this is an internal node */
+ if(depth>1) {
+ int moved_nrec; /* Total number of records moved, for internal redistrib */
+ unsigned u; /* Local index variable */
+
+ /* Move middle node pointers into new node */
+ HDmemcpy(&(new_node_ptrs[0]),&(middle_node_ptrs[(*middle_nrec-new_nrec_move)]),sizeof(H5B2_node_ptr_t)*(new_nrec_move+1));
+
+ /* Count the number of records being moved into the new node */
+ for(u=0, moved_nrec=0; u<new_nrec_move+1; u++)
+ moved_nrec += new_node_ptrs[u].all_nrec;
+ middle_moved_nrec = -(moved_nrec+new_nrec_move);
+ new_moved_nrec += (moved_nrec+new_nrec_move);
+
+ /* Slide the node pointers in middle node up */
+ HDmemmove(&(middle_node_ptrs[(new_middle_nrec-((*middle_nrec-new_nrec_move)-1))]),&(middle_node_ptrs[0]),sizeof(H5B2_node_ptr_t)*(*middle_nrec-new_nrec_move));
+ } /* end if */
} /* end block */
/* Fill middle node from left node */
@@ -1422,6 +1516,21 @@ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split nodes")
/* Move records from left node to middle node */
HDmemcpy(H5B2_NAT_NREC(middle_native,shared,0),H5B2_NAT_NREC(left_native,shared,(new_left_nrec+1)),shared->type->nrec_size*(left_nrec_move-1));
+
+ /* Move node pointers also if this is an internal node */
+ if(depth>1) {
+ int moved_nrec; /* Total number of records moved, for internal redistrib */
+ unsigned u; /* Local index variable */
+
+ /* Move left node pointers into middle node */
+ HDmemcpy(&(middle_node_ptrs[0]),&(left_node_ptrs[new_left_nrec+1]),sizeof(H5B2_node_ptr_t)*left_nrec_move);
+
+ /* Count the number of records being moved into the middle node */
+ for(u=0, moved_nrec=0; u<left_nrec_move; u++)
+ moved_nrec += middle_node_ptrs[u].all_nrec;
+ left_moved_nrec = -(moved_nrec+left_nrec_move);
+ middle_moved_nrec += (moved_nrec+left_nrec_move);
+ } /* end if */
}
/* Move record from left node to parent node */
@@ -1434,12 +1543,27 @@ HGOTO_ERROR(H5E_BTREE, H5E_CANTSPLIT, FAIL, "unable to split nodes")
*right_nrec = new_right_nrec;
} /* end block */
+ /* Update # of records in child nodes */
+ internal->node_ptrs[idx-1].node_nrec = *left_nrec;
+ internal->node_ptrs[idx].node_nrec = *middle_nrec;
+ internal->node_ptrs[idx+1].node_nrec = *new_nrec;
+ internal->node_ptrs[idx+2].node_nrec = *right_nrec;
+
+ /* Update total # of records in child B-trees */
+ if(depth>1) {
+ internal->node_ptrs[idx-1].all_nrec += left_moved_nrec;
+ internal->node_ptrs[idx].all_nrec += middle_moved_nrec;
+ internal->node_ptrs[idx+1].all_nrec = new_moved_nrec;
+ internal->node_ptrs[idx+2].all_nrec += right_moved_nrec;
+ } /* end if */
+ else {
+ internal->node_ptrs[idx-1].all_nrec = internal->node_ptrs[idx-1].node_nrec;
+ internal->node_ptrs[idx].all_nrec = internal->node_ptrs[idx].node_nrec;
+ internal->node_ptrs[idx+1].all_nrec = internal->node_ptrs[idx+1].node_nrec;
+ internal->node_ptrs[idx+2].all_nrec = internal->node_ptrs[idx+2].node_nrec;
+ } /* end else */
+
/* Update # of records in parent node */
-/* Hmm, this value for 'all_rec' wont' be right for internal nodes... */
- internal->node_ptrs[idx-1].all_nrec = internal->node_ptrs[idx-1].node_nrec = *left_nrec;
- internal->node_ptrs[idx].all_nrec = internal->node_ptrs[idx].node_nrec = *middle_nrec;
- internal->node_ptrs[idx+1].all_nrec = internal->node_ptrs[idx+1].node_nrec = *new_nrec;
- internal->node_ptrs[idx+2].all_nrec = internal->node_ptrs[idx+2].node_nrec = *right_nrec;
internal->nrec++;
/* Mark parent as dirty */
mples/activeqt/qutlook/addressview.h79
-rw-r--r--examples/activeqt/qutlook/fileopen.xpm22
-rw-r--r--examples/activeqt/qutlook/fileprint.xpm24
-rw-r--r--examples/activeqt/qutlook/filesave.xpm22
-rw-r--r--examples/activeqt/qutlook/main.cpp56
-rw-r--r--examples/activeqt/qutlook/qutlook.pro23
-rw-r--r--examples/activeqt/simple/main.cpp137
-rw-r--r--examples/activeqt/simple/simple.inf11
-rw-r--r--examples/activeqt/simple/simple.pro13
-rw-r--r--examples/activeqt/webbrowser/main.cpp189
-rw-r--r--examples/activeqt/webbrowser/mainwindow.ui306
-rw-r--r--examples/activeqt/webbrowser/webaxwidget.h67
-rw-r--r--examples/activeqt/webbrowser/webbrowser.pro17
-rw-r--r--examples/activeqt/webbrowser/wincemainwindow.ui299
-rw-r--r--examples/activeqt/wrapper/main.cpp161
-rw-r--r--examples/activeqt/wrapper/wrapper.inf9
-rw-r--r--examples/activeqt/wrapper/wrapper.pro15
-rw-r--r--examples/activeqt/wrapper/wrapperax.rc32
-rw-r--r--examples/assistant/README38
-rw-r--r--examples/assistant/assistant.pro8
-rw-r--r--examples/assistant/simpletextviewer/documentation/about.txt9
-rw-r--r--examples/assistant/simpletextviewer/documentation/browse.html34
-rw-r--r--examples/assistant/simpletextviewer/documentation/filedialog.html48
-rw-r--r--examples/assistant/simpletextviewer/documentation/findfile.html32
-rw-r--r--examples/assistant/simpletextviewer/documentation/images/browse.pngbin0 -> 21553 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.pngbin0 -> 9589 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/filedialog.pngbin0 -> 12318 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/handbook.pngbin0 -> 1060 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/mainwindow.pngbin0 -> 12769 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/open.pngbin0 -> 11697 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/images/wildcard.pngbin0 -> 11266 bytes-rw-r--r--examples/assistant/simpletextviewer/documentation/index.html41
-rw-r--r--examples/assistant/simpletextviewer/documentation/intro.html28
-rw-r--r--examples/assistant/simpletextviewer/documentation/openfile.html36
-rw-r--r--examples/assistant/simpletextviewer/documentation/simpletextviewer.adp40
-rw-r--r--examples/assistant/simpletextviewer/documentation/wildcardmatching.html57
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.cpp221
-rw-r--r--examples/assistant/simpletextviewer/findfiledialog.h99
-rw-r--r--examples/assistant/simpletextviewer/main.cpp52
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.cpp154
-rw-r--r--examples/assistant/simpletextviewer/mainwindow.h91
-rw-r--r--examples/assistant/simpletextviewer/simpletextviewer.pro16
-rw-r--r--examples/dbus/complexpingpong/complexping.cpp118
-rw-r--r--examples/dbus/complexpingpong/complexping.h59
-rw-r--r--examples/dbus/complexpingpong/complexping.pro16
-rw-r--r--examples/dbus/complexpingpong/complexpingpong.pro4
-rw-r--r--examples/dbus/complexpingpong/complexpong.cpp105
-rw-r--r--examples/dbus/complexpingpong/complexpong.h68
-rw-r--r--examples/dbus/complexpingpong/complexpong.pro16
-rw-r--r--examples/dbus/complexpingpong/ping-common.h42
-rw-r--r--examples/dbus/dbus-chat/chat.cpp164
-rw-r--r--examples/dbus/dbus-chat/chat.h82
-rw-r--r--examples/dbus/dbus-chat/chat_adaptor.cpp35
-rw-r--r--examples/dbus/dbus-chat/chat_adaptor.h57
-rw-r--r--examples/dbus/dbus-chat/chat_interface.cpp25
-rw-r--r--examples/dbus/dbus-chat/chat_interface.h49
-rw-r--r--examples/dbus/dbus-chat/chatmainwindow.ui185
-rw-r--r--examples/dbus/dbus-chat/chatsetnickname.ui149
-rw-r--r--examples/dbus/dbus-chat/com.trolltech.chat.xml15
-rw-r--r--examples/dbus/dbus-chat/dbus-chat.pro19
-rw-r--r--examples/dbus/dbus.pro12
-rw-r--r--examples/dbus/listnames/listnames.cpp92
-rw-r--r--examples/dbus/listnames/listnames.pro17
-rw-r--r--examples/dbus/pingpong/ping-common.h42
-rw-r--r--examples/dbus/pingpong/ping.cpp75
-rw-r--r--examples/dbus/pingpong/ping.pro16
-rw-r--r--examples/dbus/pingpong/pingpong.pro4
-rw-r--r--examples/dbus/pingpong/pong.cpp80
-rw-r--r--examples/dbus/pingpong/pong.h54
-rw-r--r--examples/dbus/pingpong/pong.pro16
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.cpp138
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.h76
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.pro20
-rw-r--r--examples/dbus/remotecontrolledcar/car/car.xml11
-rw-r--r--examples/dbus/remotecontrolledcar/car/car_adaptor.cpp59
-rw-r--r--examples/dbus/remotecontrolledcar/car/car_adaptor_p.h57
-rw-r--r--examples/dbus/remotecontrolledcar/car/main.cpp73
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car.xml11
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car_interface.cpp26
-rw-r--r--examples/dbus/remotecontrolledcar/controller/car_interface_p.h74
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.cpp83
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.h71
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.pro21
-rw-r--r--examples/dbus/remotecontrolledcar/controller/controller.ui64
-rw-r--r--examples/dbus/remotecontrolledcar/controller/main.cpp53
-rw-r--r--examples/dbus/remotecontrolledcar/remotecontrolledcar.pro8
-rw-r--r--examples/designer/README37
-rw-r--r--examples/designer/calculatorbuilder/calculatorbuilder.pro14
-rw-r--r--examples/designer/calculatorbuilder/calculatorbuilder.qrc5
-rw-r--r--examples/designer/calculatorbuilder/calculatorform.cpp92
-rw-r--r--examples/designer/calculatorbuilder/calculatorform.h71
-rw-r--r--examples/designer/calculatorbuilder/calculatorform.ui303
-rw-r--r--examples/designer/calculatorbuilder/main.cpp54
-rw-r--r--examples/designer/calculatorform/calculatorform.cpp66
-rw-r--r--examples/designer/calculatorform/calculatorform.h66
-rw-r--r--examples/designer/calculatorform/calculatorform.pro13
-rw-r--r--examples/designer/calculatorform/calculatorform.ui284
-rw-r--r--examples/designer/calculatorform/main.cpp53
-rw-r--r--examples/designer/containerextension/containerextension.pro26
-rw-r--r--examples/designer/containerextension/multipagewidget.cpp131
-rw-r--r--examples/designer/containerextension/multipagewidget.h88
-rw-r--r--examples/designer/containerextension/multipagewidgetcontainerextension.cpp101
-rw-r--r--examples/designer/containerextension/multipagewidgetcontainerextension.h75
-rw-r--r--examples/designer/containerextension/multipagewidgetextensionfactory.cpp65
-rw-r--r--examples/designer/containerextension/multipagewidgetextensionfactory.h64
-rw-r--r--examples/designer/containerextension/multipagewidgetplugin.cpp197
-rw-r--r--examples/designer/containerextension/multipagewidgetplugin.h81
-rw-r--r--examples/designer/customwidgetplugin/analogclock.cpp111
-rw-r--r--examples/designer/customwidgetplugin/analogclock.h59
-rw-r--r--examples/designer/customwidgetplugin/customwidgetplugin.cpp156
-rw-r--r--examples/designer/customwidgetplugin/customwidgetplugin.h73
-rw-r--r--examples/designer/customwidgetplugin/customwidgetplugin.pro21
-rw-r--r--examples/designer/designer.pro19
-rw-r--r--examples/designer/taskmenuextension/taskmenuextension.pro25
-rw-r--r--examples/designer/taskmenuextension/tictactoe.cpp176
-rw-r--r--examples/designer/taskmenuextension/tictactoe.h83
-rw-r--r--examples/designer/taskmenuextension/tictactoedialog.cpp99
-rw-r--r--examples/designer/taskmenuextension/tictactoedialog.h73
-rw-r--r--examples/designer/taskmenuextension/tictactoeplugin.cpp142
-rw-r--r--examples/designer/taskmenuextension/tictactoeplugin.h78
-rw-r--r--examples/designer/taskmenuextension/tictactoetaskmenu.cpp104
-rw-r--r--examples/designer/taskmenuextension/tictactoetaskmenu.h88
-rw-r--r--examples/designer/worldtimeclockbuilder/form.ui162
-rw-r--r--examples/designer/worldtimeclockbuilder/main.cpp70
-rw-r--r--examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro11
-rw-r--r--examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.qrc5
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclock.cpp122
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclock.h73
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp124
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclockplugin.h74
-rw-r--r--examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro21
-rw-r--r--examples/desktop/README41
-rw-r--r--examples/desktop/desktop.pro11
-rw-r--r--examples/desktop/screenshot/main.cpp52
-rw-r--r--examples/desktop/screenshot/screenshot.cpp198
-rw-r--r--examples/desktop/screenshot/screenshot.h100
-rw-r--r--examples/desktop/screenshot/screenshot.pro9
-rw-r--r--examples/desktop/systray/images/bad.svg64
-rw-r--r--examples/desktop/systray/images/heart.svg55
-rw-r--r--examples/desktop/systray/images/trash.svg58
-rw-r--r--examples/desktop/systray/main.cpp63
-rw-r--r--examples/desktop/systray/systray.pro22
-rw-r--r--examples/desktop/systray/systray.qrc7
-rw-r--r--examples/desktop/systray/window.cpp259
-rw-r--r--examples/desktop/systray/window.h113
-rw-r--r--examples/dialogs/README40
-rw-r--r--examples/dialogs/classwizard/classwizard.cpp431
-rw-r--r--examples/dialogs/classwizard/classwizard.h157
-rw-r--r--examples/dialogs/classwizard/classwizard.pro10
-rw-r--r--examples/dialogs/classwizard/classwizard.qrc11
-rw-r--r--examples/dialogs/classwizard/images/background.pngbin0 -> 22578 bytes-rw-r--r--examples/dialogs/classwizard/images/banner.pngbin0 -> 3947 bytes-rw-r--r--examples/dialogs/classwizard/images/logo1.pngbin0 -> 1619 bytes-rw-r--r--examples/dialogs/classwizard/images/logo2.pngbin0 -> 1619 bytes-rw-r--r--examples/dialogs/classwizard/images/logo3.pngbin0 -> 1619 bytes-rw-r--r--examples/dialogs/classwizard/images/watermark1.pngbin0 -> 14516 bytes-rw-r--r--examples/dialogs/classwizard/images/watermark2.pngbin0 -> 14912 bytes-rw-r--r--examples/dialogs/classwizard/main.cpp64
-rw-r--r--examples/dialogs/configdialog/configdialog.cpp117
-rw-r--r--examples/dialogs/configdialog/configdialog.h70
-rw-r--r--examples/dialogs/configdialog/configdialog.pro14
-rw-r--r--examples/dialogs/configdialog/configdialog.qrc7
-rw-r--r--examples/dialogs/configdialog/images/config.pngbin0 -> 6758 bytes-rw-r--r--examples/dialogs/configdialog/images/query.pngbin0 -> 2116 bytes-rw-r--r--examples/dialogs/configdialog/images/update.pngbin0 -> 7890 bytes-rw-r--r--examples/dialogs/configdialog/main.cpp53
-rw-r--r--examples/dialogs/configdialog/pages.cpp152
-rw-r--r--examples/dialogs/configdialog/pages.h65
-rw-r--r--examples/dialogs/dialogs.pro17
-rw-r--r--examples/dialogs/extension/extension.pro9
-rw-r--r--examples/dialogs/extension/finddialog.cpp113
-rw-r--r--examples/dialogs/extension/finddialog.h79
-rw-r--r--examples/dialogs/extension/main.cpp51
-rw-r--r--examples/dialogs/findfiles/findfiles.pro9
-rw-r--r--examples/dialogs/findfiles/main.cpp52
-rw-r--r--examples/dialogs/findfiles/window.cpp250
-rw-r--r--examples/dialogs/findfiles/window.h91
-rw-r--r--examples/dialogs/licensewizard/images/logo.pngbin0 -> 1810 bytes-rw-r--r--examples/dialogs/licensewizard/images/watermark.pngbin0 -> 34998 bytes-rw-r--r--examples/dialogs/licensewizard/licensewizard.cpp360
-rw-r--r--examples/dialogs/licensewizard/licensewizard.h164
-rw-r--r--examples/dialogs/licensewizard/licensewizard.pro10
-rw-r--r--examples/dialogs/licensewizard/licensewizard.qrc6
-rw-r--r--examples/dialogs/licensewizard/main.cpp64
-rw-r--r--examples/dialogs/sipdialog/dialog.cpp124
-rw-r--r--examples/dialogs/sipdialog/dialog.h64
-rw-r--r--examples/dialogs/sipdialog/main.cpp53
-rw-r--r--examples/dialogs/sipdialog/sipdialog.pro12
-rw-r--r--examples/dialogs/standarddialogs/dialog.cpp390
-rw-r--r--examples/dialogs/standarddialogs/dialog.h99
-rw-r--r--examples/dialogs/standarddialogs/main.cpp61
-rw-r--r--examples/dialogs/standarddialogs/standarddialogs.pro11
-rw-r--r--examples/dialogs/tabdialog/main.cpp58
-rw-r--r--examples/dialogs/tabdialog/tabdialog.cpp196
-rw-r--r--examples/dialogs/tabdialog/tabdialog.h100
-rw-r--r--examples/dialogs/tabdialog/tabdialog.pro10
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.cpp136
-rw-r--r--examples/dialogs/trivialwizard/trivialwizard.pro7
-rw-r--r--examples/draganddrop/README40
-rw-r--r--examples/draganddrop/delayedencoding/delayedencoding.pro14
-rw-r--r--examples/draganddrop/delayedencoding/delayedencoding.qrc6
-rw-r--r--examples/draganddrop/delayedencoding/images/drag.pngbin0 -> 977 bytes-rw-r--r--examples/draganddrop/delayedencoding/images/example.svg59
-rw-r--r--examples/draganddrop/delayedencoding/main.cpp52
-rw-r--r--examples/draganddrop/delayedencoding/mimedata.cpp66
-rw-r--r--examples/draganddrop/delayedencoding/mimedata.h64
-rw-r--r--examples/draganddrop/delayedencoding/sourcewidget.cpp115
-rw-r--r--examples/draganddrop/delayedencoding/sourcewidget.h71
-rw-r--r--examples/draganddrop/draganddrop.pro15
-rw-r--r--examples/draganddrop/draggableicons/draggableicons.pro10
-rw-r--r--examples/draganddrop/draggableicons/draggableicons.qrc7
-rw-r--r--examples/draganddrop/draggableicons/dragwidget.cpp169
-rw-r--r--examples/draganddrop/draggableicons/dragwidget.h66
-rw-r--r--examples/draganddrop/draggableicons/images/boat.pngbin0 -> 2772 bytes-rw-r--r--examples/draganddrop/draggableicons/images/car.pngbin0 -> 2963 bytes-rw-r--r--examples/draganddrop/draggableicons/images/house.pngbin0 -> 3292 bytes-rw-r--r--examples/draganddrop/draggableicons/main.cpp62
-rw-r--r--examples/draganddrop/draggabletext/draggabletext.pro12
-rw-r--r--examples/draganddrop/draggabletext/draggabletext.qrc5
-rw-r--r--examples/draganddrop/draggabletext/draglabel.cpp52
-rw-r--r--examples/draganddrop/draggabletext/draglabel.h59
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.cpp164
-rw-r--r--examples/draganddrop/draggabletext/dragwidget.h63
-rw-r--r--examples/draganddrop/draggabletext/main.cpp53
-rw-r--r--examples/draganddrop/draggabletext/words.txt41
-rw-r--r--examples/draganddrop/dropsite/droparea.cpp127
-rw-r--r--examples/draganddrop/dropsite/droparea.h78
-rw-r--r--examples/draganddrop/dropsite/dropsite.pro12
-rw-r--r--examples/draganddrop/dropsite/dropsitewindow.cpp144
-rw-r--r--examples/draganddrop/dropsite/dropsitewindow.h78
-rw-r--r--examples/draganddrop/dropsite/main.cpp54
-rw-r--r--examples/draganddrop/fridgemagnets/draglabel.cpp90
-rw-r--r--examples/draganddrop/fridgemagnets/draglabel.h65
-rw-r--r--examples/draganddrop/fridgemagnets/dragwidget.cpp212
-rw-r--r--examples/draganddrop/fridgemagnets/dragwidget.h66
-rw-r--r--examples/draganddrop/fridgemagnets/fridgemagnets.pro12
-rw-r--r--examples/draganddrop/fridgemagnets/fridgemagnets.qrc5
-rw-r--r--examples/draganddrop/fridgemagnets/main.cpp53
-rw-r--r--examples/draganddrop/fridgemagnets/words.txt48
-rw-r--r--examples/draganddrop/puzzle/example.jpgbin0 -> 42654 bytes-rw-r--r--examples/draganddrop/puzzle/main.cpp55
-rw-r--r--examples/draganddrop/puzzle/mainwindow.cpp151
-rw-r--r--examples/draganddrop/puzzle/mainwindow.h77
-rw-r--r--examples/draganddrop/puzzle/pieceslist.cpp122
-rw-r--r--examples/draganddrop/puzzle/pieceslist.h62
-rw-r--r--examples/draganddrop/puzzle/puzzle.pro20
-rw-r--r--examples/draganddrop/puzzle/puzzle.qrc5
-rw-r--r--examples/draganddrop/puzzle/puzzlewidget.cpp205
-rw-r--r--examples/draganddrop/puzzle/puzzlewidget.h86
-rw-r--r--examples/examples.pro43
-rw-r--r--examples/graphicsview/README40
-rw-r--r--examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.pro12
-rw-r--r--examples/graphicsview/basicgraphicslayouts/basicgraphicslayouts.qrc5
-rw-r--r--examples/graphicsview/basicgraphicslayouts/images/block.pngbin0 -> 2146 bytes-rw-r--r--examples/graphicsview/basicgraphicslayouts/layoutitem.cpp99
-rw-r--r--examples/graphicsview/basicgraphicslayouts/layoutitem.h62
-rw-r--r--examples/graphicsview/basicgraphicslayouts/main.cpp59
-rw-r--r--examples/graphicsview/basicgraphicslayouts/window.cpp91
-rw-r--r--examples/graphicsview/basicgraphicslayouts/window.h58
-rw-r--r--examples/graphicsview/collidingmice/collidingmice.pro14
-rw-r--r--examples/graphicsview/collidingmice/images/cheese.jpgbin0 -> 3029 bytes-rw-r--r--examples/graphicsview/collidingmice/main.cpp88
-rw-r--r--examples/graphicsview/collidingmice/mice.qrc5
-rw-r--r--examples/graphicsview/collidingmice/mouse.cpp200
-rw-r--r--examples/graphicsview/collidingmice/mouse.h72
-rw-r--r--examples/graphicsview/diagramscene/arrow.cpp147
-rw-r--r--examples/graphicsview/diagramscene/arrow.h94
-rw-r--r--examples/graphicsview/diagramscene/diagramitem.cpp152
-rw-r--r--examples/graphicsview/diagramscene/diagramitem.h97
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.cpp241
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.h113
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.pro20
-rw-r--r--examples/graphicsview/diagramscene/diagramscene.qrc20
-rw-r--r--examples/graphicsview/diagramscene/diagramtextitem.cpp82
-rw-r--r--examples/graphicsview/diagramscene/diagramtextitem.h79
-rw-r--r--examples/graphicsview/diagramscene/images/background1.pngbin0 -> 112 bytes-rw-r--r--examples/graphicsview/diagramscene/images/background2.pngbin0 -> 114 bytes-rw-r--r--examples/graphicsview/diagramscene/images/background3.pngbin0 -> 116 bytes-rw-r--r--examples/graphicsview/diagramscene/images/background4.pngbin0 -> 96 bytes-rw-r--r--examples/graphicsview/diagramscene/images/bold.pngbin0 -> 274 bytes-rw-r--r--examples/graphicsview/diagramscene/images/bringtofront.pngbin0 -> 293 bytes-rw-r--r--examples/graphicsview/diagramscene/images/delete.pngbin0 -> 831 bytes-rw-r--r--examples/graphicsview/diagramscene/images/floodfill.pngbin0 -> 282 bytes-rw-r--r--examples/graphicsview/diagramscene/images/italic.pngbin0 -> 247 bytes-rw-r--r--examples/graphicsview/diagramscene/images/linecolor.pngbin0 -> 145 bytes-rw-r--r--examples/graphicsview/diagramscene/images/linepointer.pngbin0 -> 141 bytes-rw-r--r--examples/graphicsview/diagramscene/images/pointer.pngbin0 -> 173 bytes-rw-r--r--examples/graphicsview/diagramscene/images/sendtoback.pngbin0 -> 318 bytes-rw-r--r--examples/graphicsview/diagramscene/images/textpointer.pngbin0 -> 753 bytes-rw-r--r--examples/graphicsview/diagramscene/images/underline.pngbin0 -> 250 bytes-rw-r--r--examples/graphicsview/diagramscene/main.cpp56
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.cpp651
-rw-r--r--examples/graphicsview/diagramscene/mainwindow.h151
-rw-r--r--examples/graphicsview/dragdroprobot/coloritem.cpp129
-rw-r--r--examples/graphicsview/dragdroprobot/coloritem.h64
-rw-r--r--examples/graphicsview/dragdroprobot/dragdroprobot.pro18
-rw-r--r--examples/graphicsview/dragdroprobot/images/head.pngbin0 -> 14972 bytes-rw-r--r--examples/graphicsview/dragdroprobot/main.cpp78
-rw-r--r--examples/graphicsview/dragdroprobot/robot.cpp273
-rw-r--r--examples/graphicsview/dragdroprobot/robot.h110
-rw-r--r--examples/graphicsview/dragdroprobot/robot.qrc5
-rw-r--r--examples/graphicsview/elasticnodes/edge.cpp144
-rw-r--r--examples/graphicsview/elasticnodes/edge.h78
-rw-r--r--examples/graphicsview/elasticnodes/elasticnodes.pro16
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.cpp224
-rw-r--r--examples/graphicsview/elasticnodes/graphwidget.h71
-rw-r--r--examples/graphicsview/elasticnodes/main.cpp54
-rw-r--r--examples/graphicsview/elasticnodes/node.cpp185
-rw-r--r--examples/graphicsview/elasticnodes/node.h84
-rw-r--r--examples/graphicsview/graphicsview.pro18
-rw-r--r--examples/graphicsview/padnavigator/backside.ui208
-rw-r--r--examples/graphicsview/padnavigator/images/artsfftscope.pngbin0 -> 1291 bytes-rw-r--r--examples/graphicsview/padnavigator/images/blue_angle_swirl.jpgbin0 -> 11826 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kontact_contacts.pngbin0 -> 4382 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kontact_journal.pngbin0 -> 3261 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kontact_mail.pngbin0 -> 3202 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kontact_notes.pngbin0 -> 3893 bytes-rw-r--r--examples/graphicsview/padnavigator/images/kopeteavailable.pngbin0 -> 2380 bytes-rw-r--r--examples/graphicsview/padnavigator/images/metacontact_online.pngbin0 -> 2545 bytes-rw-r--r--examples/graphicsview/padnavigator/images/minitools.pngbin0 -> 2087 bytes-rw-r--r--examples/graphicsview/padnavigator/main.cpp59
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.pro24
-rw-r--r--examples/graphicsview/padnavigator/padnavigator.qrc14
-rw-r--r--examples/graphicsview/padnavigator/panel.cpp238
-rw-r--r--examples/graphicsview/padnavigator/panel.h92
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.cpp164
-rw-r--r--examples/graphicsview/padnavigator/roundrectitem.h83
-rw-r--r--examples/graphicsview/padnavigator/splashitem.cpp92
-rw-r--r--examples/graphicsview/padnavigator/splashitem.h63
-rw-r--r--examples/graphicsview/portedasteroids/animateditem.cpp95
-rw-r--r--examples/graphicsview/portedasteroids/animateditem.h84
-rw-r--r--examples/graphicsview/portedasteroids/bg.pngbin0 -> 3793 bytes-rw-r--r--examples/graphicsview/portedasteroids/ledmeter.cpp161
-rw-r--r--examples/graphicsview/portedasteroids/ledmeter.h96
-rw-r--r--examples/graphicsview/portedasteroids/main.cpp60
-rw-r--r--examples/graphicsview/portedasteroids/portedasteroids.pro19
-rw-r--r--examples/graphicsview/portedasteroids/portedasteroids.qrc163
-rw-r--r--examples/graphicsview/portedasteroids/sounds/Explosion.wavbin0 -> 18427 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites.h170
-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits.pov31
-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0000.pngbin0 -> 215 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0001.pngbin0 -> 236 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0002.pngbin0 -> 244 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0003.pngbin0 -> 277 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0004.pngbin0 -> 259 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0005.pngbin0 -> 251 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0006.pngbin0 -> 214 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0007.pngbin0 -> 177 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0008.pngbin0 -> 175 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0009.pngbin0 -> 221 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0010.pngbin0 -> 243 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0011.pngbin0 -> 272 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0012.pngbin0 -> 265 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0013.pngbin0 -> 253 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0014.pngbin0 -> 214 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/bits/bits0015.pngbin0 -> 196 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/exhaust/exhaust.pngbin0 -> 92 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/missile/missile.pngbin0 -> 89 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/brake.pngbin0 -> 151 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/energy.pngbin0 -> 134 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/shield.pngbin0 -> 171 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/shoot.pngbin0 -> 181 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/powerups/teleport.pngbin0 -> 160 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock1.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock1.pov26
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10000.pngbin0 -> 2502 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10001.pngbin0 -> 2483 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10002.pngbin0 -> 2519 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10003.pngbin0 -> 2460 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10004.pngbin0 -> 2486 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10005.pngbin0 -> 2416 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10006.pngbin0 -> 2419 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10007.pngbin0 -> 2374 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10008.pngbin0 -> 2329 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10009.pngbin0 -> 2227 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10010.pngbin0 -> 2218 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10011.pngbin0 -> 2178 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10012.pngbin0 -> 2172 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10013.pngbin0 -> 2229 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10014.pngbin0 -> 2270 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10015.pngbin0 -> 2348 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10016.pngbin0 -> 2402 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10017.pngbin0 -> 2489 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10018.pngbin0 -> 2530 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10019.pngbin0 -> 2591 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10020.pngbin0 -> 2540 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10021.pngbin0 -> 2606 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10022.pngbin0 -> 2591 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10023.pngbin0 -> 2566 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10024.pngbin0 -> 2512 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10025.pngbin0 -> 2456 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10026.pngbin0 -> 2420 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10027.pngbin0 -> 2557 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10028.pngbin0 -> 2567 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10029.pngbin0 -> 2572 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10030.pngbin0 -> 2620 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock1/rock10031.pngbin0 -> 2558 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock2.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock2.pov26
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20000.pngbin0 -> 1338 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20001.pngbin0 -> 1363 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20002.pngbin0 -> 1385 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20003.pngbin0 -> 1389 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20004.pngbin0 -> 1361 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20005.pngbin0 -> 1393 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20006.pngbin0 -> 1361 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20007.pngbin0 -> 1369 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20008.pngbin0 -> 1368 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20009.pngbin0 -> 1311 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20010.pngbin0 -> 1340 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20011.pngbin0 -> 1322 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20012.pngbin0 -> 1350 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20013.pngbin0 -> 1337 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20014.pngbin0 -> 1341 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20015.pngbin0 -> 1373 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20016.pngbin0 -> 1357 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20017.pngbin0 -> 1354 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20018.pngbin0 -> 1320 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20019.pngbin0 -> 1356 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20020.pngbin0 -> 1379 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20021.pngbin0 -> 1401 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20022.pngbin0 -> 1418 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20023.pngbin0 -> 1401 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20024.pngbin0 -> 1383 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20025.pngbin0 -> 1360 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20026.pngbin0 -> 1376 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20027.pngbin0 -> 1331 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20028.pngbin0 -> 1353 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20029.pngbin0 -> 1376 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20030.pngbin0 -> 1290 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock2/rock20031.pngbin0 -> 1313 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock3.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock3.pov26
-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30000.pngbin0 -> 738 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30001.pngbin0 -> 730 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30002.pngbin0 -> 769 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30003.pngbin0 -> 766 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30004.pngbin0 -> 770 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30005.pngbin0 -> 756 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30006.pngbin0 -> 760 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30007.pngbin0 -> 750 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30008.pngbin0 -> 747 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30009.pngbin0 -> 752 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30010.pngbin0 -> 727 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30011.pngbin0 -> 737 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30012.pngbin0 -> 724 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30013.pngbin0 -> 751 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30014.pngbin0 -> 720 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30015.pngbin0 -> 741 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30016.pngbin0 -> 723 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30017.pngbin0 -> 722 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30018.pngbin0 -> 716 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30019.pngbin0 -> 735 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30020.pngbin0 -> 735 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30021.pngbin0 -> 731 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30022.pngbin0 -> 735 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30023.pngbin0 -> 732 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30024.pngbin0 -> 727 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30025.pngbin0 -> 721 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30026.pngbin0 -> 716 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30027.pngbin0 -> 721 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30028.pngbin0 -> 739 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30029.pngbin0 -> 740 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30030.pngbin0 -> 725 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/rock3/rock30031.pngbin0 -> 715 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0000.pngbin0 -> 1702 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0001.pngbin0 -> 1690 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0002.pngbin0 -> 1849 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0003.pngbin0 -> 1858 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0004.pngbin0 -> 1725 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0005.pngbin0 -> 1876 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/shield/shield0006.pngbin0 -> 1848 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship.ini9
-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship.pov128
-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0000.pngbin0 -> 1772 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0001.pngbin0 -> 1893 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0002.pngbin0 -> 1899 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0003.pngbin0 -> 1878 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0004.pngbin0 -> 1979 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0005.pngbin0 -> 2054 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0006.pngbin0 -> 1956 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0007.pngbin0 -> 1929 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0008.pngbin0 -> 1790 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0009.pngbin0 -> 1913 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0010.pngbin0 -> 1954 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0011.pngbin0 -> 1975 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0012.pngbin0 -> 1953 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0013.pngbin0 -> 1924 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0014.pngbin0 -> 1900 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0015.pngbin0 -> 1799 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0016.pngbin0 -> 1738 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0017.pngbin0 -> 1868 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0018.pngbin0 -> 1945 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0019.pngbin0 -> 1972 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0020.pngbin0 -> 2014 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0021.pngbin0 -> 2002 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0022.pngbin0 -> 1920 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0023.pngbin0 -> 1840 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0024.pngbin0 -> 1733 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0025.pngbin0 -> 1880 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0026.pngbin0 -> 1951 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0027.pngbin0 -> 2014 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0028.pngbin0 -> 2019 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0029.pngbin0 -> 2022 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0030.pngbin0 -> 1969 bytes-rw-r--r--examples/graphicsview/portedasteroids/sprites/ship/ship0031.pngbin0 -> 1880 bytes-rw-r--r--examples/graphicsview/portedasteroids/toplevel.cpp543
-rw-r--r--examples/graphicsview/portedasteroids/toplevel.h126
-rw-r--r--examples/graphicsview/portedasteroids/view.cpp967
-rw-r--r--examples/graphicsview/portedasteroids/view.h184
-rw-r--r--examples/graphicsview/portedcanvas/blendshadow.cpp94
-rw-r--r--examples/graphicsview/portedcanvas/butterfly.pngbin0 -> 36868 bytes-rw-r--r--examples/graphicsview/portedcanvas/canvas.cpp733
-rw-r--r--examples/graphicsview/portedcanvas/canvas.doc29
-rw-r--r--examples/graphicsview/portedcanvas/canvas.h131
-rw-r--r--examples/graphicsview/portedcanvas/main.cpp92
-rw-r--r--examples/graphicsview/portedcanvas/makeimg.cpp133
-rw-r--r--examples/graphicsview/portedcanvas/portedcanvas.pro16
-rw-r--r--examples/graphicsview/portedcanvas/portedcanvas.qrc7
-rw-r--r--examples/graphicsview/portedcanvas/qt-trans.xpm54
-rw-r--r--examples/graphicsview/portedcanvas/qtlogo.pngbin0 -> 21921 bytes-rw-r--r--examples/help/README38
-rw-r--r--examples/help/contextsensitivehelp/contextsensitivehelp.pro18
-rw-r--r--examples/help/contextsensitivehelp/doc/amount.html11
-rw-r--r--examples/help/contextsensitivehelp/doc/filter.html12
-rw-r--r--examples/help/contextsensitivehelp/doc/plants.html44
-rw-r--r--examples/help/contextsensitivehelp/doc/rain.html11
-rw-r--r--examples/help/contextsensitivehelp/doc/source.html33
-rw-r--r--examples/help/contextsensitivehelp/doc/temperature.html13
-rw-r--r--examples/help/contextsensitivehelp/doc/time.html11
-rw-r--r--examples/help/contextsensitivehelp/doc/wateringmachine.qchbin0 -> 27648 bytes-rw-r--r--examples/help/contextsensitivehelp/doc/wateringmachine.qhcbin0 -> 10240 bytes-rw-r--r--examples/help/contextsensitivehelp/doc/wateringmachine.qhcp14
-rw-r--r--examples/help/contextsensitivehelp/doc/wateringmachine.qhp25
-rw-r--r--examples/help/contextsensitivehelp/helpbrowser.cpp81
-rw-r--r--examples/help/contextsensitivehelp/helpbrowser.h65
-rw-r--r--examples/help/contextsensitivehelp/main.cpp51
-rw-r--r--examples/help/contextsensitivehelp/wateringconfigdialog.cpp69
-rw-r--r--examples/help/contextsensitivehelp/wateringconfigdialog.h62
-rw-r--r--examples/help/contextsensitivehelp/wateringconfigdialog.ui446
-rw-r--r--examples/help/help.pro11
-rw-r--r--examples/help/remotecontrol/enter.pngbin0 -> 315 bytes-rw-r--r--examples/help/remotecontrol/main.cpp54
-rw-r--r--examples/help/remotecontrol/remotecontrol.cpp175
-rw-r--r--examples/help/remotecontrol/remotecontrol.h79
-rw-r--r--examples/help/remotecontrol/remotecontrol.pro13
-rw-r--r--examples/help/remotecontrol/remotecontrol.qrc5
-rw-r--r--examples/help/remotecontrol/remotecontrol.ui228
-rw-r--r--examples/help/simpletextviewer/assistant.cpp110
-rw-r--r--examples/help/simpletextviewer/assistant.h63
-rw-r--r--examples/help/simpletextviewer/documentation/about.txt9
-rw-r--r--examples/help/simpletextviewer/documentation/browse.html34
-rw-r--r--examples/help/simpletextviewer/documentation/filedialog.html48
-rw-r--r--examples/help/simpletextviewer/documentation/findfile.html32
-rw-r--r--examples/help/simpletextviewer/documentation/images/browse.pngbin0 -> 21553 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/fadedfilemenu.pngbin0 -> 9589 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/filedialog.pngbin0 -> 12318 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/handbook.pngbin0 -> 1060 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/icon.pngbin0 -> 5513 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/mainwindow.pngbin0 -> 12769 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/open.pngbin0 -> 11697 bytes-rw-r--r--examples/help/simpletextviewer/documentation/images/wildcard.pngbin0 -> 11266 bytes-rw-r--r--examples/help/simpletextviewer/documentation/index.html41
-rw-r--r--examples/help/simpletextviewer/documentation/intro.html28
-rw-r--r--examples/help/simpletextviewer/documentation/openfile.html36
-rw-r--r--examples/help/simpletextviewer/documentation/simpletextviewer.qchbin0 -> 108544 bytes-rw-r--r--examples/help/simpletextviewer/documentation/simpletextviewer.qhcbin0 -> 18432 bytes-rw-r--r--examples/help/simpletextviewer/documentation/simpletextviewer.qhcp30
-rw-r--r--examples/help/simpletextviewer/documentation/simpletextviewer.qhp49
-rw-r--r--examples/help/simpletextviewer/documentation/wildcardmatching.html57
-rw-r--r--examples/help/simpletextviewer/findfiledialog.cpp222
-rw-r--r--examples/help/simpletextviewer/findfiledialog.h99
-rw-r--r--examples/help/simpletextviewer/main.cpp52
-rw-r--r--examples/help/simpletextviewer/mainwindow.cpp147
-rw-r--r--examples/help/simpletextviewer/mainwindow.h84
-rw-r--r--examples/help/simpletextviewer/simpletextviewer.pro16
-rw-r--r--examples/help/simpletextviewer/textedit.cpp75
-rw-r--r--examples/help/simpletextviewer/textedit.h61
-rw-r--r--examples/ipc/README35
-rw-r--r--examples/ipc/ipc.pro8
-rw-r--r--examples/ipc/localfortuneclient/client.cpp153
-rw-r--r--examples/ipc/localfortuneclient/client.h82
-rw-r--r--examples/ipc/localfortuneclient/localfortuneclient.pro12
-rw-r--r--examples/ipc/localfortuneclient/main.cpp52
-rw-r--r--examples/ipc/localfortuneserver/localfortuneserver.pro12
-rw-r--r--examples/ipc/localfortuneserver/main.cpp56
-rw-r--r--examples/ipc/localfortuneserver/server.cpp111
-rw-r--r--examples/ipc/localfortuneserver/server.h70
-rw-r--r--examples/ipc/sharedmemory/dialog.cpp189
-rw-r--r--examples/ipc/sharedmemory/dialog.h71
-rw-r--r--examples/ipc/sharedmemory/dialog.ui47
-rw-r--r--examples/ipc/sharedmemory/image.pngbin0 -> 10199 bytes-rw-r--r--examples/ipc/sharedmemory/main.cpp54
-rw-r--r--examples/ipc/sharedmemory/qt.pngbin0 -> 2383 bytes-rw-r--r--examples/ipc/sharedmemory/sharedmemory.pro13
-rw-r--r--examples/itemviews/README39
-rw-r--r--examples/itemviews/addressbook/adddialog.cpp83
-rw-r--r--examples/itemviews/addressbook/adddialog.h72
-rw-r--r--examples/itemviews/addressbook/addressbook.pro17
-rw-r--r--examples/itemviews/addressbook/addresswidget.cpp238
-rw-r--r--examples/itemviews/addressbook/addresswidget.h83
-rw-r--r--examples/itemviews/addressbook/main.cpp53
-rw-r--r--examples/itemviews/addressbook/mainwindow.cpp138
-rw-r--r--examples/itemviews/addressbook/mainwindow.h76
-rw-r--r--examples/itemviews/addressbook/newaddresstab.cpp78
-rw-r--r--examples/itemviews/addressbook/newaddresstab.h75
-rw-r--r--examples/itemviews/addressbook/tablemodel.cpp185
-rw-r--r--examples/itemviews/addressbook/tablemodel.h73
-rw-r--r--examples/itemviews/basicsortfiltermodel/basicsortfiltermodel.pro10
-rw-r--r--examples/itemviews/basicsortfiltermodel/main.cpp94
-rw-r--r--examples/itemviews/basicsortfiltermodel/window.cpp157
-rw-r--r--examples/itemviews/basicsortfiltermodel/window.h89
-rw-r--r--examples/itemviews/chart/chart.pro13
-rw-r--r--examples/itemviews/chart/chart.qrc5
-rw-r--r--examples/itemviews/chart/main.cpp54
-rw-r--r--examples/itemviews/chart/mainwindow.cpp173
-rw-r--r--examples/itemviews/chart/mainwindow.h73
-rw-r--r--examples/itemviews/chart/mydata.cht8
-rw-r--r--examples/itemviews/chart/pieview.cpp562
-rw-r--r--examples/itemviews/chart/pieview.h115
-rw-r--r--examples/itemviews/chart/qtdata.cht14
-rw-r--r--examples/itemviews/coloreditorfactory/coloreditorfactory.pro11
-rw-r--r--examples/itemviews/coloreditorfactory/colorlisteditor.cpp77
-rw-r--r--examples/itemviews/coloreditorfactory/colorlisteditor.h70
-rw-r--r--examples/itemviews/coloreditorfactory/main.cpp54
-rw-r--r--examples/itemviews/coloreditorfactory/window.cpp95
-rw-r--r--examples/itemviews/coloreditorfactory/window.h58
-rw-r--r--examples/itemviews/combowidgetmapper/combowidgetmapper.pro9
-rw-r--r--examples/itemviews/combowidgetmapper/main.cpp52
-rw-r--r--examples/itemviews/combowidgetmapper/window.cpp137
-rw-r--r--examples/itemviews/combowidgetmapper/window.h87
-rw-r--r--examples/itemviews/customsortfiltermodel/customsortfiltermodel.pro12
-rw-r--r--examples/itemviews/customsortfiltermodel/main.cpp96
-rw-r--r--examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp116
-rw-r--r--examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.h74
-rw-r--r--examples/itemviews/customsortfiltermodel/window.cpp168
-rw-r--r--examples/itemviews/customsortfiltermodel/window.h91
-rw-r--r--examples/itemviews/dirview/dirview.pro7
-rw-r--r--examples/itemviews/dirview/main.cpp62
-rw-r--r--examples/itemviews/editabletreemodel/default.txt40
-rw-r--r--examples/itemviews/editabletreemodel/editabletreemodel.pro16
-rw-r--r--examples/itemviews/editabletreemodel/editabletreemodel.qrc5
-rw-r--r--examples/itemviews/editabletreemodel/main.cpp54
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.cpp181
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.h72
-rw-r--r--examples/itemviews/editabletreemodel/mainwindow.ui128
-rw-r--r--examples/itemviews/editabletreemodel/treeitem.cpp180
-rw-r--r--examples/itemviews/editabletreemodel/treeitem.h75
-rw-r--r--examples/itemviews/editabletreemodel/treemodel.cpp289
-rw-r--r--examples/itemviews/editabletreemodel/treemodel.h98
-rw-r--r--examples/itemviews/fetchmore/fetchmore.pro12
-rw-r--r--examples/itemviews/fetchmore/filelistmodel.cpp116
-rw-r--r--examples/itemviews/fetchmore/filelistmodel.h76
-rw-r--r--examples/itemviews/fetchmore/main.cpp51
-rw-r--r--examples/itemviews/fetchmore/window.cpp82
-rw-r--r--examples/itemviews/fetchmore/window.h65
-rw-r--r--examples/itemviews/itemviews.pro22
-rw-r--r--examples/itemviews/pixelator/imagemodel.cpp92
-rw-r--r--examples/itemviews/pixelator/imagemodel.h69
-rw-r--r--examples/itemviews/pixelator/images.qrc5
-rw-r--r--examples/itemviews/pixelator/images/qt.pngbin0 -> 656 bytes-rw-r--r--examples/itemviews/pixelator/main.cpp55
-rw-r--r--examples/itemviews/pixelator/mainwindow.cpp245
-rw-r--r--examples/itemviews/pixelator/mainwindow.h75
-rw-r--r--examples/itemviews/pixelator/pixelator.pro14
-rw-r--r--examples/itemviews/pixelator/pixeldelegate.cpp108
-rw-r--r--examples/itemviews/pixelator/pixeldelegate.h80
-rw-r--r--examples/itemviews/puzzle/example.jpgbin0 -> 42654 bytes-rw-r--r--examples/itemviews/puzzle/main.cpp55
-rw-r--r--examples/itemviews/puzzle/mainwindow.cpp150
-rw-r--r--examples/itemviews/puzzle/mainwindow.h78
-rw-r--r--examples/itemviews/puzzle/piecesmodel.cpp204
-rw-r--r--examples/itemviews/puzzle/piecesmodel.h81
-rw-r--r--examples/itemviews/puzzle/puzzle.pro14
-rw-r--r--examples/itemviews/puzzle/puzzle.qrc5
-rw-r--r--examples/itemviews/puzzle/puzzlewidget.cpp205
-rw-r--r--examples/itemviews/puzzle/puzzlewidget.h86
-rw-r--r--examples/itemviews/simpledommodel/domitem.cpp102
-rw-r--r--examples/itemviews/simpledommodel/domitem.h67
-rw-r--r--examples/itemviews/simpledommodel/dommodel.cpp190
-rw-r--r--examples/itemviews/simpledommodel/dommodel.h77
-rw-r--r--examples/itemviews/simpledommodel/main.cpp53
-rw-r--r--examples/itemviews/simpledommodel/mainwindow.cpp85
-rw-r--r--examples/itemviews/simpledommodel/mainwindow.h71
-rw-r--r--examples/itemviews/simpledommodel/simpledommodel.pro15
-rw-r--r--examples/itemviews/simpletreemodel/default.txt40
-rw-r--r--examples/itemviews/simpletreemodel/main.cpp62
-rw-r--r--examples/itemviews/simpletreemodel/simpletreemodel.pro13
-rw-r--r--examples/itemviews/simpletreemodel/simpletreemodel.qrc5
-rw-r--r--examples/itemviews/simpletreemodel/treeitem.cpp117
-rw-r--r--examples/itemviews/simpletreemodel/treeitem.h71
-rw-r--r--examples/itemviews/simpletreemodel/treemodel.cpp219
-rw-r--r--examples/itemviews/simpletreemodel/treemodel.h77
-rw-r--r--examples/itemviews/simplewidgetmapper/main.cpp52
-rw-r--r--examples/itemviews/simplewidgetmapper/simplewidgetmapper.pro9
-rw-r--r--examples/itemviews/simplewidgetmapper/window.cpp134
-rw-r--r--examples/itemviews/simplewidgetmapper/window.h85
-rw-r--r--examples/itemviews/spinboxdelegate/delegate.cpp103
-rw-r--r--examples/itemviews/spinboxdelegate/delegate.h71
-rw-r--r--examples/itemviews/spinboxdelegate/main.cpp87
-rw-r--r--examples/itemviews/spinboxdelegate/spinboxdelegate.pro9
-rw-r--r--examples/itemviews/stardelegate/main.cpp108
-rw-r--r--examples/itemviews/stardelegate/stardelegate.cpp130
-rw-r--r--examples/itemviews/stardelegate/stardelegate.h70
-rw-r--r--examples/itemviews/stardelegate/stardelegate.pro14
-rw-r--r--examples/itemviews/stardelegate/stareditor.cpp99
-rw-r--r--examples/itemviews/stardelegate/stareditor.h78
-rw-r--r--examples/itemviews/stardelegate/starrating.cpp103
-rw-r--r--examples/itemviews/stardelegate/starrating.h77
-rw-r--r--examples/layouts/README41
-rw-r--r--examples/layouts/basiclayouts/basiclayouts.pro9
-rw-r--r--examples/layouts/basiclayouts/dialog.cpp150
-rw-r--r--examples/layouts/basiclayouts/dialog.h91
-rw-r--r--examples/layouts/basiclayouts/main.cpp51
-rw-r--r--examples/layouts/borderlayout/borderlayout.cpp214
-rw-r--r--examples/layouts/borderlayout/borderlayout.h89
-rw-r--r--examples/layouts/borderlayout/borderlayout.pro11
-rw-r--r--examples/layouts/borderlayout/main.cpp52
-rw-r--r--examples/layouts/borderlayout/window.cpp69
-rw-r--r--examples/layouts/borderlayout/window.h62
-rw-r--r--examples/layouts/dynamiclayouts/dialog.cpp170
-rw-r--r--examples/layouts/dynamiclayouts/dialog.h91
-rw-r--r--examples/layouts/dynamiclayouts/dynamiclayouts.pro9
-rw-r--r--examples/layouts/dynamiclayouts/main.cpp51
-rw-r--r--examples/layouts/flowlayout/flowlayout.cpp154
-rw-r--r--examples/layouts/flowlayout/flowlayout.h73
-rw-r--r--examples/layouts/flowlayout/flowlayout.pro11
-rw-r--r--examples/layouts/flowlayout/main.cpp52
-rw-r--r--examples/layouts/flowlayout/window.cpp59
-rw-r--r--examples/layouts/flowlayout/window.h59
-rw-r--r--examples/layouts/layouts.pro10
-rw-r--r--examples/linguist/README37
-rw-r--r--examples/linguist/arrowpad/arrowpad.cpp65
-rw-r--r--examples/linguist/arrowpad/arrowpad.h69
-rw-r--r--examples/linguist/arrowpad/arrowpad.pro16
-rw-r--r--examples/linguist/arrowpad/main.cpp64
-rw-r--r--examples/linguist/arrowpad/mainwindow.cpp62
-rw-r--r--examples/linguist/arrowpad/mainwindow.h69
-rw-r--r--examples/linguist/hellotr/hellotr.pro11
-rw-r--r--examples/linguist/hellotr/main.cpp71
-rw-r--r--examples/linguist/linguist.pro9
-rw-r--r--examples/linguist/trollprint/main.cpp61
-rw-r--r--examples/linguist/trollprint/mainwindow.cpp96
-rw-r--r--examples/linguist/trollprint/mainwindow.h75
-rw-r--r--examples/linguist/trollprint/printpanel.cpp86
-rw-r--r--examples/linguist/trollprint/printpanel.h70
-rw-r--r--examples/linguist/trollprint/trollprint.pro12
-rw-r--r--examples/linguist/trollprint/trollprint_pt.ts65
-rw-r--r--examples/mainwindows/README40
-rw-r--r--examples/mainwindows/application/application.pro12
-rw-r--r--examples/mainwindows/application/application.qrc10
-rw-r--r--examples/mainwindows/application/images/copy.pngbin0 -> 1338 bytes-rw-r--r--examples/mainwindows/application/images/cut.pngbin0 -> 1323 bytes-rw-r--r--examples/mainwindows/application/images/new.pngbin0 -> 852 bytes-rw-r--r--examples/mainwindows/application/images/open.pngbin0 -> 2073 bytes-rw-r--r--examples/mainwindows/application/images/paste.pngbin0 -> 1645 bytes-rw-r--r--examples/mainwindows/application/images/save.pngbin0 -> 1187 bytes-rw-r--r--examples/mainwindows/application/main.cpp56
-rw-r--r--examples/mainwindows/application/mainwindow.cpp388
-rw-r--r--examples/mainwindows/application/mainwindow.h106
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.pro10
-rw-r--r--examples/mainwindows/dockwidgets/dockwidgets.qrc8
-rw-r--r--examples/mainwindows/dockwidgets/images/new.pngbin0 -> 977 bytes-rw-r--r--examples/mainwindows/dockwidgets/images/print.pngbin0 -> 1732 bytes-rw-r--r--examples/mainwindows/dockwidgets/images/save.pngbin0 -> 1894 bytes-rw-r--r--examples/mainwindows/dockwidgets/images/undo.pngbin0 -> 1768 bytes-rw-r--r--examples/mainwindows/dockwidgets/main.cpp53
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.cpp343
-rw-r--r--examples/mainwindows/dockwidgets/mainwindow.h98
-rw-r--r--examples/mainwindows/mainwindows.pro13
-rw-r--r--examples/mainwindows/mdi/images/copy.pngbin0 -> 1338 bytes-rw-r--r--examples/mainwindows/mdi/images/cut.pngbin0 -> 1323 bytes-rw-r--r--examples/mainwindows/mdi/images/new.pngbin0 -> 852 bytes-rw-r--r--examples/mainwindows/mdi/images/open.pngbin0 -> 2073 bytes-rw-r--r--examples/mainwindows/mdi/images/paste.pngbin0 -> 1645 bytes-rw-r--r--examples/mainwindows/mdi/images/save.pngbin0 -> 1187 bytes-rw-r--r--examples/mainwindows/mdi/main.cpp54
-rw-r--r--examples/mainwindows/mdi/mainwindow.cpp399
-rw-r--r--examples/mainwindows/mdi/mainwindow.h119
-rw-r--r--examples/mainwindows/mdi/mdi.pro12
-rw-r--r--examples/mainwindows/mdi/mdi.qrc10
-rw-r--r--examples/mainwindows/mdi/mdichild.cpp176
-rw-r--r--examples/mainwindows/mdi/mdichild.h77
-rw-r--r--examples/mainwindows/menus/main.cpp52
-rw-r--r--examples/mainwindows/menus/mainwindow.cpp371
-rw-r--r--examples/mainwindows/menus/mainwindow.h125
-rw-r--r--examples/mainwindows/menus/menus.pro9
-rw-r--r--examples/mainwindows/recentfiles/main.cpp52
-rw-r--r--examples/mainwindows/recentfiles/mainwindow.cpp256
-rw-r--r--examples/mainwindows/recentfiles/mainwindow.h97
-rw-r--r--examples/mainwindows/recentfiles/recentfiles.pro9
-rw-r--r--examples/mainwindows/sdi/images/copy.pngbin0 -> 1338 bytes-rw-r--r--examples/mainwindows/sdi/images/cut.pngbin0 -> 1323 bytes-rw-r--r--examples/mainwindows/sdi/images/new.pngbin0 -> 852 bytes-rw-r--r--examples/mainwindows/sdi/images/open.pngbin0 -> 2073 bytes-rw-r--r--examples/mainwindows/sdi/images/paste.pngbin0 -> 1645 bytes-rw-r--r--examples/mainwindows/sdi/images/save.pngbin0 -> 1187 bytes-rw-r--r--examples/mainwindows/sdi/main.cpp53
-rw-r--r--examples/mainwindows/sdi/mainwindow.cpp375
-rw-r--r--examples/mainwindows/sdi/mainwindow.h109
-rw-r--r--examples/mainwindows/sdi/sdi.pro10
-rw-r--r--examples/mainwindows/sdi/sdi.qrc10
-rw-r--r--examples/network/README40
-rw-r--r--examples/network/blockingfortuneclient/blockingclient.cpp154
-rw-r--r--examples/network/blockingfortuneclient/blockingclient.h85
-rw-r--r--examples/network/blockingfortuneclient/blockingfortuneclient.pro12
-rw-r--r--examples/network/blockingfortuneclient/fortunethread.cpp138
-rw-r--r--examples/network/blockingfortuneclient/fortunethread.h74
-rw-r--r--examples/network/blockingfortuneclient/main.cpp52
-rw-r--r--examples/network/broadcastreceiver/broadcastreceiver.pro10
-rw-r--r--examples/network/broadcastreceiver/main.cpp52
-rw-r--r--examples/network/broadcastreceiver/receiver.cpp88
-rw-r--r--examples/network/broadcastreceiver/receiver.h69
-rw-r--r--examples/network/broadcastsender/broadcastsender.pro10
-rw-r--r--examples/network/broadcastsender/main.cpp52
-rw-r--r--examples/network/broadcastsender/sender.cpp92
-rw-r--r--examples/network/broadcastsender/sender.h76
-rw-r--r--examples/network/download/download.pro19
-rw-r--r--examples/network/download/main.cpp176
-rw-r--r--examples/network/downloadmanager/downloadmanager.cpp173
-rw-r--r--examples/network/downloadmanager/downloadmanager.h85
-rw-r--r--examples/network/downloadmanager/downloadmanager.pro20
-rw-r--r--examples/network/downloadmanager/main.cpp68
-rw-r--r--examples/network/downloadmanager/textprogressbar.cpp99
-rw-r--r--examples/network/downloadmanager/textprogressbar.h64
-rw-r--r--examples/network/fortuneclient/client.cpp191
-rw-r--r--examples/network/fortuneclient/client.h86
-rw-r--r--examples/network/fortuneclient/fortuneclient.pro10
-rw-r--r--examples/network/fortuneclient/main.cpp52
-rw-r--r--examples/network/fortuneserver/fortuneserver.pro10
-rw-r--r--examples/network/fortuneserver/main.cpp56
-rw-r--r--examples/network/fortuneserver/server.cpp123
-rw-r--r--examples/network/fortuneserver/server.h72
-rw-r--r--examples/network/ftp/ftp.pro11
-rw-r--r--examples/network/ftp/ftp.qrc7
-rw-r--r--examples/network/ftp/ftpwindow.cpp349
-rw-r--r--examples/network/ftp/ftpwindow.h104
-rw-r--r--examples/network/ftp/images/cdtoparent.pngbin0 -> 139 bytes-rw-r--r--examples/network/ftp/images/dir.pngbin0 -> 154 bytes-rw-r--r--examples/network/ftp/images/file.pngbin0 -> 129 bytes-rw-r--r--examples/network/ftp/main.cpp54
-rw-r--r--examples/network/http/authenticationdialog.ui129
-rw-r--r--examples/network/http/http.pro11
-rw-r--r--examples/network/http/httpwindow.cpp262
-rw-r--r--examples/network/http/httpwindow.h94
-rw-r--r--examples/network/http/main.cpp52
-rw-r--r--examples/network/loopback/dialog.cpp187
-rw-r--r--examples/network/loopback/dialog.h90
-rw-r--r--examples/network/loopback/loopback.pro10
-rw-r--r--examples/network/loopback/main.cpp52
-rw-r--r--examples/network/network-chat/chatdialog.cpp141
-rw-r--r--examples/network/network-chat/chatdialog.h70
-rw-r--r--examples/network/network-chat/chatdialog.ui79
-rw-r--r--examples/network/network-chat/client.cpp140
-rw-r--r--examples/network/network-chat/client.h83
-rw-r--r--examples/network/network-chat/connection.cpp276
-rw-r--r--examples/network/network-chat/connection.h108
-rw-r--r--examples/network/network-chat/main.cpp52
-rw-r--r--examples/network/network-chat/network-chat.pro19
-rw-r--r--examples/network/network-chat/peermanager.cpp170
-rw-r--r--examples/network/network-chat/peermanager.h85
-rw-r--r--examples/network/network-chat/server.cpp58
-rw-r--r--examples/network/network-chat/server.h63
-rw-r--r--examples/network/network.pro21
-rw-r--r--examples/network/securesocketclient/certificateinfo.cpp100
-rw-r--r--examples/network/securesocketclient/certificateinfo.h69
-rw-r--r--examples/network/securesocketclient/certificateinfo.ui85
-rw-r--r--examples/network/securesocketclient/encrypted.pngbin0 -> 750 bytes-rw-r--r--examples/network/securesocketclient/main.cpp63
-rw-r--r--examples/network/securesocketclient/securesocketclient.pro16
-rw-r--r--examples/network/securesocketclient/securesocketclient.qrc5
-rw-r--r--examples/network/securesocketclient/sslclient.cpp218
-rw-r--r--examples/network/securesocketclient/sslclient.h81
-rw-r--r--examples/network/securesocketclient/sslclient.ui190
-rw-r--r--examples/network/securesocketclient/sslerrors.ui110
-rw-r--r--examples/network/threadedfortuneserver/dialog.cpp82
-rw-r--r--examples/network/threadedfortuneserver/dialog.h66
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.cpp69
-rw-r--r--examples/network/threadedfortuneserver/fortuneserver.h64
-rw-r--r--examples/network/threadedfortuneserver/fortunethread.cpp77
-rw-r--r--examples/network/threadedfortuneserver/fortunethread.h67
-rw-r--r--examples/network/threadedfortuneserver/main.cpp56
-rw-r--r--examples/network/threadedfortuneserver/threadedfortuneserver.pro14
-rw-r--r--examples/network/torrent/addtorrentdialog.cpp170
-rw-r--r--examples/network/torrent/addtorrentdialog.h74
-rw-r--r--examples/network/torrent/bencodeparser.cpp235
-rw-r--r--examples/network/torrent/bencodeparser.h81
-rw-r--r--examples/network/torrent/connectionmanager.cpp89
-rw-r--r--examples/network/torrent/connectionmanager.h66
-rw-r--r--examples/network/torrent/filemanager.cpp447
-rw-r--r--examples/network/torrent/filemanager.h144
-rw-r--r--examples/network/torrent/forms/addtorrentform.ui266
-rw-r--r--examples/network/torrent/icons.qrc12
-rw-r--r--examples/network/torrent/icons/1downarrow.pngbin0 -> 895 bytes-rw-r--r--examples/network/torrent/icons/1uparrow.pngbin0 -> 822 bytes-rw-r--r--examples/network/torrent/icons/bottom.pngbin0 -> 1632 bytes-rw-r--r--examples/network/torrent/icons/edit_add.pngbin0 -> 394 bytes-rw-r--r--examples/network/torrent/icons/edit_remove.pngbin0 -> 368 bytes-rw-r--r--examples/network/torrent/icons/exit.pngbin0 -> 1426 bytes-rw-r--r--examples/network/torrent/icons/peertopeer.pngbin0 -> 10072 bytes-rw-r--r--examples/network/torrent/icons/player_pause.pngbin0 -> 690 bytes-rw-r--r--examples/network/torrent/icons/player_play.pngbin0 -> 900 bytes-rw-r--r--examples/network/torrent/icons/player_stop.pngbin0 -> 627 bytes-rw-r--r--examples/network/torrent/icons/stop.pngbin0 -> 1252 bytes-rw-r--r--examples/network/torrent/main.cpp57
-rw-r--r--examples/network/torrent/mainwindow.cpp713
-rw-r--r--examples/network/torrent/mainwindow.h132
-rw-r--r--examples/network/torrent/metainfo.cpp218
-rw-r--r--examples/network/torrent/metainfo.h122
-rw-r--r--examples/network/torrent/peerwireclient.cpp665
-rw-r--r--examples/network/torrent/peerwireclient.h210
-rw-r--r--examples/network/torrent/ratecontroller.cpp156
-rw-r--r--examples/network/torrent/ratecontroller.h80
-rw-r--r--examples/network/torrent/torrent.pro37
-rw-r--r--examples/network/torrent/torrentclient.cpp1529
-rw-r--r--examples/network/torrent/torrentclient.h205
-rw-r--r--examples/network/torrent/torrentserver.cpp104
-rw-r--r--examples/network/torrent/torrentserver.h72
-rw-r--r--examples/network/torrent/trackerclient.cpp237
-rw-r--r--examples/network/torrent/trackerclient.h104
-rw-r--r--examples/opengl/2dpainting/2dpainting.pro17
-rw-r--r--examples/opengl/2dpainting/glwidget.cpp73
-rw-r--r--examples/opengl/2dpainting/glwidget.h73
-rw-r--r--examples/opengl/2dpainting/helper.cpp91
-rw-r--r--examples/opengl/2dpainting/helper.h72
-rw-r--r--examples/opengl/2dpainting/main.cpp51
-rw-r--r--examples/opengl/2dpainting/widget.cpp73
-rw-r--r--examples/opengl/2dpainting/widget.h72
-rw-r--r--examples/opengl/2dpainting/window.cpp72
-rw-r--r--examples/opengl/2dpainting/window.h67
-rw-r--r--examples/opengl/README41
-rw-r--r--examples/opengl/framebufferobject/bubbles.svg215
-rw-r--r--examples/opengl/framebufferobject/designer.pngbin0 -> 2810 bytes-rw-r--r--examples/opengl/framebufferobject/framebufferobject.pro22
-rw-r--r--examples/opengl/framebufferobject/framebufferobject.qrc6
-rw-r--r--examples/opengl/framebufferobject/glwidget.cpp309
-rw-r--r--examples/opengl/framebufferobject/glwidget.h82
-rw-r--r--examples/opengl/framebufferobject/main.cpp62
-rw-r--r--examples/opengl/framebufferobject2/cubelogo.pngbin0 -> 5920 bytes-rw-r--r--examples/opengl/framebufferobject2/framebufferobject2.pro11
-rw-r--r--examples/opengl/framebufferobject2/framebufferobject2.qrc5
-rw-r--r--examples/opengl/framebufferobject2/glwidget.cpp249
-rw-r--r--examples/opengl/framebufferobject2/glwidget.h66
-rw-r--r--examples/opengl/framebufferobject2/main.cpp62
-rw-r--r--examples/opengl/grabber/glwidget.cpp284
-rw-r--r--examples/opengl/grabber/glwidget.h98
-rw-r--r--examples/opengl/grabber/grabber.pro12
-rw-r--r--examples/opengl/grabber/main.cpp52
-rw-r--r--examples/opengl/grabber/mainwindow.cpp207
-rw-r--r--examples/opengl/grabber/mainwindow.h95
-rw-r--r--examples/opengl/hellogl/glwidget.cpp266
-rw-r--r--examples/opengl/hellogl/glwidget.h99
-rw-r--r--examples/opengl/hellogl/hellogl.pro12
-rw-r--r--examples/opengl/hellogl/main.cpp52
-rw-r--r--examples/opengl/hellogl/window.cpp90
-rw-r--r--examples/opengl/hellogl/window.h70
-rw-r--r--examples/opengl/hellogl_es/bubble.cpp140
-rw-r--r--examples/opengl/hellogl_es/bubble.h77
-rw-r--r--examples/opengl/hellogl_es/cl_helper.h133
-rw-r--r--examples/opengl/hellogl_es/glwidget.cpp457
-rw-r--r--examples/opengl/hellogl_es/glwidget.h87
-rw-r--r--examples/opengl/hellogl_es/hellogl_es.pro34
-rw-r--r--examples/opengl/hellogl_es/main.cpp53
-rw-r--r--examples/opengl/hellogl_es/mainwindow.cpp108
-rw-r--r--examples/opengl/hellogl_es/mainwindow.h60
-rw-r--r--examples/opengl/hellogl_es/qt.pngbin0 -> 5174 bytes-rw-r--r--examples/opengl/hellogl_es/texture.qrc5
-rw-r--r--examples/opengl/hellogl_es2/bubble.cpp140
-rw-r--r--examples/opengl/hellogl_es2/bubble.h77
-rw-r--r--examples/opengl/hellogl_es2/glwidget.cpp642
-rw-r--r--examples/opengl/hellogl_es2/glwidget.h94
-rw-r--r--examples/opengl/hellogl_es2/hellogl_es2.pro27
-rw-r--r--examples/opengl/hellogl_es2/main.cpp53
-rw-r--r--examples/opengl/hellogl_es2/mainwindow.cpp108
-rw-r--r--examples/opengl/hellogl_es2/mainwindow.h60
-rw-r--r--examples/opengl/hellogl_es2/qt.pngbin0 -> 5174 bytes-rw-r--r--examples/opengl/hellogl_es2/texture.qrc5
-rw-r--r--examples/opengl/opengl.pro29
-rw-r--r--examples/opengl/overpainting/bubble.cpp113
-rw-r--r--examples/opengl/overpainting/bubble.h76
-rw-r--r--examples/opengl/overpainting/glwidget.cpp360
-rw-r--r--examples/opengl/overpainting/glwidget.h114
-rw-r--r--examples/opengl/overpainting/main.cpp51
-rw-r--r--examples/opengl/overpainting/overpainting.pro13
-rw-r--r--examples/opengl/pbuffers/cubelogo.pngbin0 -> 5920 bytes-rw-r--r--examples/opengl/pbuffers/glwidget.cpp260
-rw-r--r--examples/opengl/pbuffers/glwidget.h70
-rw-r--r--examples/opengl/pbuffers/main.cpp62
-rw-r--r--examples/opengl/pbuffers/pbuffers.pro11
-rw-r--r--examples/opengl/pbuffers/pbuffers.qrc5
-rw-r--r--examples/opengl/pbuffers2/bubbles.svg215
-rw-r--r--examples/opengl/pbuffers2/designer.pngbin0 -> 2810 bytes-rw-r--r--examples/opengl/pbuffers2/glwidget.cpp326
-rw-r--r--examples/opengl/pbuffers2/glwidget.h85
-rw-r--r--examples/opengl/pbuffers2/main.cpp62
-rw-r--r--examples/opengl/pbuffers2/pbuffers2.pro21
-rw-r--r--examples/opengl/pbuffers2/pbuffers2.qrc6
-rw-r--r--examples/opengl/samplebuffers/glwidget.cpp165
-rw-r--r--examples/opengl/samplebuffers/glwidget.h62
-rw-r--r--examples/opengl/samplebuffers/main.cpp72
-rw-r--r--examples/opengl/samplebuffers/samplebuffers.pro10
-rw-r--r--examples/opengl/textures/glwidget.cpp182
-rw-r--r--examples/opengl/textures/glwidget.h84
-rw-r--r--examples/opengl/textures/images/side1.pngbin0 -> 935 bytes-rw-r--r--examples/opengl/textures/images/side2.pngbin0 -> 1622 bytes-rw-r--r--examples/opengl/textures/images/side3.pngbin0 -> 2117 bytes-rw-r--r--examples/opengl/textures/images/side4.pngbin0 -> 1222 bytes-rw-r--r--examples/opengl/textures/images/side5.pngbin0 -> 1806 bytes-rw-r--r--examples/opengl/textures/images/side6.pngbin0 -> 2215 bytes-rw-r--r--examples/opengl/textures/main.cpp54
-rw-r--r--examples/opengl/textures/textures.pro13
-rw-r--r--examples/opengl/textures/textures.qrc10
-rw-r--r--examples/opengl/textures/window.cpp89
-rw-r--r--examples/opengl/textures/window.h67
-rw-r--r--examples/painting/README42
-rw-r--r--examples/painting/basicdrawing/basicdrawing.pro12
-rw-r--r--examples/painting/basicdrawing/basicdrawing.qrc6
-rw-r--r--examples/painting/basicdrawing/images/brick.pngbin0 -> 767 bytes-rw-r--r--examples/painting/basicdrawing/images/qt-logo.pngbin0 -> 3696 bytes-rw-r--r--examples/painting/basicdrawing/main.cpp54
-rw-r--r--examples/painting/basicdrawing/renderarea.cpp209
-rw-r--r--examples/painting/basicdrawing/renderarea.h84
-rw-r--r--examples/painting/basicdrawing/window.cpp262
-rw-r--r--examples/painting/basicdrawing/window.h88
-rw-r--r--examples/painting/concentriccircles/circlewidget.cpp125
-rw-r--r--examples/painting/concentriccircles/circlewidget.h74
-rw-r--r--examples/painting/concentriccircles/concentriccircles.pro11
-rw-r--r--examples/painting/concentriccircles/main.cpp52
-rw-r--r--examples/painting/concentriccircles/window.cpp94
-rw-r--r--examples/painting/concentriccircles/window.h71
-rw-r--r--examples/painting/fontsampler/fontsampler.pro10
-rw-r--r--examples/painting/fontsampler/main.cpp52
-rw-r--r--examples/painting/fontsampler/mainwindow.cpp373
-rw-r--r--examples/painting/fontsampler/mainwindow.h83
-rw-r--r--examples/painting/fontsampler/mainwindowbase.ui140
-rw-r--r--examples/painting/imagecomposition/imagecomposer.cpp209
-rw-r--r--examples/painting/imagecomposition/imagecomposer.h88
-rw-r--r--examples/painting/imagecomposition/imagecomposition.pro11
-rw-r--r--examples/painting/imagecomposition/imagecomposition.qrc6
-rw-r--r--examples/painting/imagecomposition/images/background.pngbin0 -> 18579 bytes-rw-r--r--examples/painting/imagecomposition/images/blackrectangle.pngbin0 -> 90 bytes-rw-r--r--examples/painting/imagecomposition/images/butterfly.pngbin0 -> 36868 bytes-rw-r--r--examples/painting/imagecomposition/images/checker.pngbin0 -> 10384 bytes-rw-r--r--examples/painting/imagecomposition/main.cpp56
-rw-r--r--examples/painting/painterpaths/main.cpp52
-rw-r--r--examples/painting/painterpaths/painterpaths.pro12
-rw-r--r--examples/painting/painterpaths/renderarea.cpp131
-rw-r--r--examples/painting/painterpaths/renderarea.h81
-rw-r--r--examples/painting/painterpaths/window.cpp289
-rw-r--r--examples/painting/painterpaths/window.h93
-rw-r--r--examples/painting/painting.pro16
-rw-r--r--examples/painting/svgviewer/files/bubbles.svg215
-rw-r--r--examples/painting/svgviewer/files/cubic.svg77
-rw-r--r--examples/painting/svgviewer/files/spheres.svg72
-rw-r--r--examples/painting/svgviewer/main.cpp63
-rw-r--r--examples/painting/svgviewer/mainwindow.cpp164
-rw-r--r--examples/painting/svgviewer/mainwindow.h81
-rw-r--r--examples/painting/svgviewer/svgview.cpp188
-rw-r--r--examples/painting/svgviewer/svgview.h84
-rw-r--r--examples/painting/svgviewer/svgviewer.pro23
-rw-r--r--examples/painting/svgviewer/svgviewer.qrc6
-rw-r--r--examples/painting/transformations/main.cpp52
-rw-r--r--examples/painting/transformations/renderarea.cpp173
-rw-r--r--examples/painting/transformations/renderarea.h91
-rw-r--r--examples/painting/transformations/transformations.pro11
-rw-r--r--examples/painting/transformations/window.cpp181
-rw-r--r--examples/painting/transformations/window.h81
-rw-r--r--examples/phonon/README39
-rw-r--r--examples/phonon/capabilities/capabilities.pro16
-rw-r--r--examples/phonon/capabilities/main.cpp58
-rw-r--r--examples/phonon/capabilities/window.cpp166
-rw-r--r--examples/phonon/capabilities/window.h97
-rw-r--r--examples/phonon/musicplayer/main.cpp57
-rw-r--r--examples/phonon/musicplayer/mainwindow.cpp352
-rw-r--r--examples/phonon/musicplayer/mainwindow.h112
-rw-r--r--examples/phonon/musicplayer/musicplayer.pro16
-rw-r--r--examples/phonon/phonon.pro10
-rw-r--r--examples/qmake/precompile/main.cpp61
-rw-r--r--examples/qmake/precompile/mydialog.cpp48
-rw-r--r--examples/qmake/precompile/mydialog.h55
-rw-r--r--examples/qmake/precompile/mydialog.ui47
-rw-r--r--examples/qmake/precompile/myobject.cpp58
-rw-r--r--examples/qmake/precompile/myobject.h56
-rw-r--r--examples/qmake/precompile/precompile.pro22
-rw-r--r--examples/qmake/precompile/stable.h53
-rw-r--r--examples/qmake/precompile/util.cpp50
-rw-r--r--examples/qmake/tutorial/hello.cpp50
-rw-r--r--examples/qmake/tutorial/hello.h48
-rw-r--r--examples/qmake/tutorial/hellounix.cpp43
-rw-r--r--examples/qmake/tutorial/hellowin.cpp43
-rw-r--r--examples/qmake/tutorial/main.cpp54
-rw-r--r--examples/qtconcurrent/README38
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.cpp147
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.h82
-rw-r--r--examples/qtconcurrent/imagescaling/imagescaling.pro13
-rw-r--r--examples/qtconcurrent/imagescaling/main.cpp64
-rw-r--r--examples/qtconcurrent/map/main.cpp82
-rw-r--r--examples/qtconcurrent/map/map.pro14
-rw-r--r--examples/qtconcurrent/progressdialog/main.cpp100
-rw-r--r--examples/qtconcurrent/progressdialog/progressdialog.pro14
-rw-r--r--examples/qtconcurrent/qtconcurrent.pro12
-rw-r--r--examples/qtconcurrent/runfunction/main.cpp73
-rw-r--r--examples/qtconcurrent/runfunction/runfunction.pro14
-rw-r--r--examples/qtconcurrent/wordcount/main.cpp167
-rw-r--r--examples/qtconcurrent/wordcount/wordcount.pro14
-rw-r--r--examples/qtestlib/README38
-rw-r--r--examples/qtestlib/qtestlib.pro8
-rw-r--r--examples/qtestlib/tutorial1/testqstring.cpp65
-rw-r--r--examples/qtestlib/tutorial1/tutorial1.pro8
-rw-r--r--examples/qtestlib/tutorial2/testqstring.cpp81
-rw-r--r--examples/qtestlib/tutorial2/tutorial2.pro8
-rw-r--r--examples/qtestlib/tutorial3/testgui.cpp71
-rw-r--r--examples/qtestlib/tutorial3/tutorial3.pro8
-rw-r--r--examples/qtestlib/tutorial4/testgui.cpp91
-rw-r--r--examples/qtestlib/tutorial4/tutorial4.pro8
-rw-r--r--examples/qtestlib/tutorial5/benchmarking.cpp135
-rw-r--r--examples/qtestlib/tutorial5/tutorial5.pro8
-rw-r--r--examples/qws/README38
-rw-r--r--examples/qws/ahigl/ahigl.pro16
-rw-r--r--examples/qws/ahigl/qscreenahigl_qws.cpp963
-rw-r--r--examples/qws/ahigl/qscreenahigl_qws.h91
-rw-r--r--examples/qws/ahigl/qscreenahiglplugin.cpp97
-rw-r--r--examples/qws/ahigl/qwindowsurface_ahigl.cpp349
-rw-r--r--examples/qws/ahigl/qwindowsurface_ahigl_p.h92
-rw-r--r--examples/qws/dbscreen/dbscreen.cpp99
-rw-r--r--examples/qws/dbscreen/dbscreen.h70
-rw-r--r--examples/qws/dbscreen/dbscreen.pro11
-rw-r--r--examples/qws/dbscreen/dbscreendriverplugin.cpp80
-rw-r--r--examples/qws/framebuffer/framebuffer.pro11
-rw-r--r--examples/qws/framebuffer/main.c586
-rw-r--r--examples/qws/mousecalibration/calibration.cpp145
-rw-r--r--examples/qws/mousecalibration/calibration.h68
-rw-r--r--examples/qws/mousecalibration/main.cpp93
-rw-r--r--examples/qws/mousecalibration/mousecalibration.pro11
-rw-r--r--examples/qws/mousecalibration/scribblewidget.cpp93
-rw-r--r--examples/qws/mousecalibration/scribblewidget.h71
-rw-r--r--examples/qws/qws.pro7
-rw-r--r--examples/qws/simpledecoration/analogclock.cpp111
-rw-r--r--examples/qws/simpledecoration/analogclock.h58
-rw-r--r--examples/qws/simpledecoration/main.cpp60
-rw-r--r--examples/qws/simpledecoration/mydecoration.cpp375
-rw-r--r--examples/qws/simpledecoration/mydecoration.h73
-rw-r--r--examples/qws/simpledecoration/simpledecoration.pro12
-rw-r--r--examples/qws/svgalib/README5
-rw-r--r--examples/qws/svgalib/svgalib.pro19
-rw-r--r--examples/qws/svgalib/svgalibpaintdevice.cpp67
-rw-r--r--examples/qws/svgalib/svgalibpaintdevice.h66
-rw-r--r--examples/qws/svgalib/svgalibpaintengine.cpp192
-rw-r--r--examples/qws/svgalib/svgalibpaintengine.h79
-rw-r--r--examples/qws/svgalib/svgalibplugin.cpp75
-rw-r--r--examples/qws/svgalib/svgalibscreen.cpp354
-rw-r--r--examples/qws/svgalib/svgalibscreen.h84
-rw-r--r--examples/qws/svgalib/svgalibsurface.cpp87
-rw-r--r--examples/qws/svgalib/svgalibsurface.h76
-rw-r--r--examples/richtext/README42
-rw-r--r--examples/richtext/calendar/calendar.pro9
-rw-r--r--examples/richtext/calendar/main.cpp53
-rw-r--r--examples/richtext/calendar/mainwindow.cpp215
-rw-r--r--examples/richtext/calendar/mainwindow.h74
-rw-r--r--examples/richtext/orderform/detailsdialog.cpp157
-rw-r--r--examples/richtext/orderform/detailsdialog.h91
-rw-r--r--examples/richtext/orderform/main.cpp56
-rw-r--r--examples/richtext/orderform/mainwindow.cpp250
-rw-r--r--examples/richtext/orderform/mainwindow.h77
-rw-r--r--examples/richtext/orderform/orderform.pro11
-rw-r--r--examples/richtext/richtext.pro12
-rw-r--r--examples/richtext/syntaxhighlighter/highlighter.cpp148
-rw-r--r--examples/richtext/syntaxhighlighter/highlighter.h85
-rw-r--r--examples/richtext/syntaxhighlighter/main.cpp53
-rw-r--r--examples/richtext/syntaxhighlighter/mainwindow.cpp130
-rw-r--r--examples/richtext/syntaxhighlighter/mainwindow.h76
-rw-r--r--examples/richtext/syntaxhighlighter/syntaxhighlighter.pro17
-rw-r--r--examples/richtext/textobject/files/heart.svg55
-rw-r--r--examples/richtext/textobject/main.cpp55
-rw-r--r--examples/richtext/textobject/svgtextobject.cpp72
-rw-r--r--examples/richtext/textobject/svgtextobject.h70
-rw-r--r--examples/richtext/textobject/textobject.pro14
-rw-r--r--examples/richtext/textobject/window.cpp117
-rw-r--r--examples/richtext/textobject/window.h81
-rw-r--r--examples/script/README40
-rw-r--r--examples/script/calculator/calculator.js264
-rw-r--r--examples/script/calculator/calculator.pro12
-rw-r--r--examples/script/calculator/calculator.qrc6
-rw-r--r--examples/script/calculator/calculator.ui406
-rw-r--r--examples/script/calculator/main.cpp101
-rw-r--r--examples/script/context2d/context2d.cpp825
-rw-r--r--examples/script/context2d/context2d.h261
-rw-r--r--examples/script/context2d/context2d.pro23
-rw-r--r--examples/script/context2d/context2d.qrc5
-rw-r--r--examples/script/context2d/domimage.cpp157
-rw-r--r--examples/script/context2d/domimage.h87
-rw-r--r--examples/script/context2d/environment.cpp561
-rw-r--r--examples/script/context2d/environment.h145
-rw-r--r--examples/script/context2d/main.cpp53
-rw-r--r--examples/script/context2d/qcontext2dcanvas.cpp143
-rw-r--r--examples/script/context2d/qcontext2dcanvas.h98
-rw-r--r--examples/script/context2d/scripts/alpha.js21
-rw-r--r--examples/script/context2d/scripts/arc.js30
-rw-r--r--examples/script/context2d/scripts/bezier.js26
-rw-r--r--examples/script/context2d/scripts/clock.js99
-rw-r--r--examples/script/context2d/scripts/fill1.js8
-rw-r--r--examples/script/context2d/scripts/grad.js20
-rw-r--r--examples/script/context2d/scripts/linecap.js24
-rw-r--r--examples/script/context2d/scripts/linestye.js10
-rw-r--r--examples/script/context2d/scripts/moveto.js20
-rw-r--r--examples/script/context2d/scripts/moveto2.js24
-rw-r--r--examples/script/context2d/scripts/pacman.js83
-rw-r--r--examples/script/context2d/scripts/plasma.js58
-rw-r--r--examples/script/context2d/scripts/pong.js235
-rw-r--r--examples/script/context2d/scripts/quad.js21
-rw-r--r--examples/script/context2d/scripts/rgba.js19
-rw-r--r--examples/script/context2d/scripts/rotate.js16
-rw-r--r--examples/script/context2d/scripts/scale.js67
-rw-r--r--examples/script/context2d/scripts/stroke1.js10
-rw-r--r--examples/script/context2d/scripts/translate.js29
-rw-r--r--examples/script/context2d/window.cpp174
-rw-r--r--examples/script/context2d/window.h81
-rw-r--r--examples/script/customclass/bytearrayclass.cpp304
-rw-r--r--examples/script/customclass/bytearrayclass.h90
-rw-r--r--examples/script/customclass/bytearrayclass.pri6
-rw-r--r--examples/script/customclass/bytearrayprototype.cpp136
-rw-r--r--examples/script/customclass/bytearrayprototype.h80
-rw-r--r--examples/script/customclass/customclass.pro13
-rw-r--r--examples/script/customclass/main.cpp70
-rw-r--r--examples/script/defaultprototypes/code.js20
-rw-r--r--examples/script/defaultprototypes/defaultprototypes.pro10
-rw-r--r--examples/script/defaultprototypes/defaultprototypes.qrc5
-rw-r--r--examples/script/defaultprototypes/main.cpp84
-rw-r--r--examples/script/defaultprototypes/prototypes.cpp110
-rw-r--r--examples/script/defaultprototypes/prototypes.h78
-rw-r--r--examples/script/helloscript/helloscript.pro9
-rw-r--r--examples/script/helloscript/helloscript.qrc5
-rw-r--r--examples/script/helloscript/helloscript.qs5
-rw-r--r--examples/script/helloscript/main.cpp97
-rw-r--r--examples/script/marshal/main.cpp106
-rw-r--r--examples/script/marshal/marshal.pro9
-rw-r--r--examples/script/qscript/main.cpp221
-rw-r--r--examples/script/qscript/qscript.pro14
-rw-r--r--examples/script/qsdbg/example.qs17
-rw-r--r--examples/script/qsdbg/main.cpp74
-rw-r--r--examples/script/qsdbg/qsdbg.pri9
-rw-r--r--examples/script/qsdbg/qsdbg.pro19
-rw-r--r--examples/script/qsdbg/scriptbreakpointmanager.cpp159
-rw-r--r--examples/script/qsdbg/scriptbreakpointmanager.h122
-rw-r--r--examples/script/qsdbg/scriptdebugger.cpp737
-rw-r--r--examples/script/qsdbg/scriptdebugger.h85
-rw-r--r--examples/script/qstetrix/main.cpp142
-rw-r--r--examples/script/qstetrix/qstetrix.pro17
-rw-r--r--examples/script/qstetrix/tetrix.qrc8
-rw-r--r--examples/script/qstetrix/tetrixboard.cpp139
-rw-r--r--examples/script/qstetrix/tetrixboard.h102
-rw-r--r--examples/script/qstetrix/tetrixboard.js261
-rw-r--r--examples/script/qstetrix/tetrixpiece.js131
-rw-r--r--examples/script/qstetrix/tetrixwindow.js16
-rw-r--r--examples/script/qstetrix/tetrixwindow.ui175
-rw-r--r--examples/script/script.pro11
-rw-r--r--examples/sql/README40
-rw-r--r--examples/sql/cachedtable/cachedtable.pro11
-rw-r--r--examples/sql/cachedtable/main.cpp58
-rw-r--r--examples/sql/cachedtable/tableeditor.cpp106
-rw-r--r--examples/sql/cachedtable/tableeditor.h73
-rw-r--r--examples/sql/connection.h136
-rw-r--r--examples/sql/drilldown/drilldown.pro16
-rw-r--r--examples/sql/drilldown/drilldown.qrc11
-rw-r--r--examples/sql/drilldown/imageitem.cpp124
-rw-r--r--examples/sql/drilldown/imageitem.h75
-rw-r--r--examples/sql/drilldown/images/beijing.pngbin0 -> 99093 bytes-rw-r--r--examples/sql/drilldown/images/berlin.pngbin0 -> 81944 bytes-rw-r--r--examples/sql/drilldown/images/brisbane.pngbin0 -> 57785 bytes-rw-r--r--examples/sql/drilldown/images/munich.pngbin0 -> 59769 bytes-rw-r--r--examples/sql/drilldown/images/oslo.pngbin0 -> 41781 bytes-rw-r--r--examples/sql/drilldown/images/redwood.pngbin0 -> 39050 bytes-rw-r--r--examples/sql/drilldown/informationwindow.cpp170
-rw-r--r--examples/sql/drilldown/informationwindow.h91
-rw-r--r--examples/sql/drilldown/logo.pngbin0 -> 13378 bytes-rw-r--r--examples/sql/drilldown/main.cpp59
-rw-r--r--examples/sql/drilldown/view.cpp179
-rw-r--r--examples/sql/drilldown/view.h81
-rw-r--r--examples/sql/masterdetail/albumdetails.xml98
-rw-r--r--examples/sql/masterdetail/database.h97
-rw-r--r--examples/sql/masterdetail/dialog.cpp283
-rw-r--r--examples/sql/masterdetail/dialog.h83
-rw-r--r--examples/sql/masterdetail/images/icon.pngbin0 -> 30095 bytes-rw-r--r--examples/sql/masterdetail/images/image.pngbin0 -> 166692 bytes-rw-r--r--examples/sql/masterdetail/main.cpp60
-rw-r--r--examples/sql/masterdetail/mainwindow.cpp430
-rw-r--r--examples/sql/masterdetail/mainwindow.h104
-rw-r--r--examples/sql/masterdetail/masterdetail.pro16
-rw-r--r--examples/sql/masterdetail/masterdetail.qrc6
-rw-r--r--examples/sql/querymodel/customsqlmodel.cpp65
-rw-r--r--examples/sql/querymodel/customsqlmodel.h59
-rw-r--r--examples/sql/querymodel/editablesqlmodel.cpp110
-rw-r--r--examples/sql/querymodel/editablesqlmodel.h63
-rw-r--r--examples/sql/querymodel/main.cpp87
-rw-r--r--examples/sql/querymodel/querymodel.pro13
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.cpp115
-rw-r--r--examples/sql/relationaltablemodel/relationaltablemodel.pro9
-rw-r--r--examples/sql/sql.pro12
-rw-r--r--examples/sql/sqlwidgetmapper/main.cpp52
-rw-r--r--examples/sql/sqlwidgetmapper/sqlwidgetmapper.pro10
-rw-r--r--examples/sql/sqlwidgetmapper/window.cpp159
-rw-r--r--examples/sql/sqlwidgetmapper/window.h90
-rw-r--r--examples/sql/tablemodel/tablemodel.cpp84
-rw-r--r--examples/sql/tablemodel/tablemodel.pro9
-rw-r--r--examples/threads/README40
-rw-r--r--examples/threads/mandelbrot/main.cpp54
-rw-r--r--examples/threads/mandelbrot/mandelbrot.pro13
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.cpp240
-rw-r--r--examples/threads/mandelbrot/mandelbrotwidget.h85
-rw-r--r--examples/threads/mandelbrot/renderthread.cpp216
-rw-r--r--examples/threads/mandelbrot/renderthread.h89
-rw-r--r--examples/threads/queuedcustomtype/block.cpp74
-rw-r--r--examples/threads/queuedcustomtype/block.h71
-rw-r--r--examples/threads/queuedcustomtype/main.cpp129
-rw-r--r--examples/threads/queuedcustomtype/queuedcustomtype.pro7
-rw-r--r--examples/threads/queuedcustomtype/renderthread.cpp110
-rw-r--r--examples/threads/queuedcustomtype/renderthread.h77
-rw-r--r--examples/threads/queuedcustomtype/window.cpp137
-rw-r--r--examples/threads/queuedcustomtype/window.h77
-rw-r--r--examples/threads/semaphores/semaphores.cpp107
-rw-r--r--examples/threads/semaphores/semaphores.pro10
-rw-r--r--examples/threads/threads.pro10
-rw-r--r--examples/threads/waitconditions/waitconditions.cpp126
-rw-r--r--examples/threads/waitconditions/waitconditions.pro20
-rw-r--r--examples/tools/README40
-rw-r--r--examples/tools/codecs/codecs.pro11
-rw-r--r--examples/tools/codecs/encodedfiles/.gitattributes2
-rw-r--r--examples/tools/codecs/encodedfiles/iso-8859-1.txt6
-rw-r--r--examples/tools/codecs/encodedfiles/iso-8859-15.txt8
-rw-r--r--examples/tools/codecs/encodedfiles/utf-16.txtbin0 -> 162 bytes-rw-r--r--examples/tools/codecs/encodedfiles/utf-16be.txtbin0 -> 160 bytes-rw-r--r--examples/tools/codecs/encodedfiles/utf-16le.txtbin0 -> 160 bytes-rw-r--r--examples/tools/codecs/encodedfiles/utf-8.txt6
-rw-r--r--examples/tools/codecs/main.cpp52
-rw-r--r--examples/tools/codecs/mainwindow.cpp203
-rw-r--r--examples/tools/codecs/mainwindow.h88
-rw-r--r--examples/tools/codecs/previewform.cpp102
-rw-r--r--examples/tools/codecs/previewform.h80
-rw-r--r--examples/tools/completer/completer.pro12
-rw-r--r--examples/tools/completer/completer.qrc6
-rw-r--r--examples/tools/completer/dirmodel.cpp63
-rw-r--r--examples/tools/completer/dirmodel.h61
-rw-r--r--examples/tools/completer/main.cpp55
-rw-r--r--examples/tools/completer/mainwindow.cpp264
-rw-r--r--examples/tools/completer/mainwindow.h87
-rw-r--r--examples/tools/completer/resources/countries.txt241
-rw-r--r--examples/tools/completer/resources/wordlist.txt1486
-rw-r--r--examples/tools/customcompleter/customcompleter.pro12
-rw-r--r--examples/tools/customcompleter/customcompleter.qrc5
-rw-r--r--examples/tools/customcompleter/main.cpp55
-rw-r--r--examples/tools/customcompleter/mainwindow.cpp118
-rw-r--r--examples/tools/customcompleter/mainwindow.h77
-rw-r--r--examples/tools/customcompleter/resources/wordlist.txt1455
-rw-r--r--examples/tools/customcompleter/textedit.cpp174
-rw-r--r--examples/tools/customcompleter/textedit.h79
-rw-r--r--examples/tools/customtype/customtype.pro3
-rw-r--r--examples/tools/customtype/main.cpp74
-rw-r--r--examples/tools/customtype/message.cpp90
-rw-r--r--examples/tools/customtype/message.h76
-rw-r--r--examples/tools/customtypesending/customtypesending.pro5
-rw-r--r--examples/tools/customtypesending/main.cpp68
-rw-r--r--examples/tools/customtypesending/message.cpp72
-rw-r--r--examples/tools/customtypesending/message.h72
-rw-r--r--examples/tools/customtypesending/window.cpp80
-rw-r--r--examples/tools/customtypesending/window.h73
-rw-r--r--examples/tools/echoplugin/echoplugin.pro11
-rw-r--r--examples/tools/echoplugin/echowindow/echointerface.h62
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.cpp119
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.h80
-rw-r--r--examples/tools/echoplugin/echowindow/echowindow.pro18
-rw-r--r--examples/tools/echoplugin/echowindow/main.cpp57
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.cpp55
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.h60
-rw-r--r--examples/tools/echoplugin/plugin/plugin.pro15
-rw-r--r--examples/tools/i18n/i18n.pro26
-rw-r--r--examples/tools/i18n/i18n.qrc18
-rw-r--r--examples/tools/i18n/languagechooser.cpp167
-rw-r--r--examples/tools/i18n/languagechooser.h86
-rw-r--r--examples/tools/i18n/main.cpp55
-rw-r--r--examples/tools/i18n/mainwindow.cpp96
-rw-r--r--examples/tools/i18n/mainwindow.h77
-rw-r--r--examples/tools/i18n/translations/i18n_ar.qmbin0 -> 736 bytes-rw-r--r--examples/tools/i18n/translations/i18n_ar.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_cs.qmbin0 -> 796 bytes-rw-r--r--examples/tools/i18n/translations/i18n_cs.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_de.qmbin0 -> 848 bytes-rw-r--r--examples/tools/i18n/translations/i18n_de.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_el.qmbin0 -> 804 bytes-rw-r--r--examples/tools/i18n/translations/i18n_el.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_en.qmbin0 -> 810 bytes-rw-r--r--examples/tools/i18n/translations/i18n_en.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_eo.qmbin0 -> 806 bytes-rw-r--r--examples/tools/i18n/translations/i18n_eo.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_fr.qmbin0 -> 844 bytes-rw-r--r--examples/tools/i18n/translations/i18n_fr.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_it.qmbin0 -> 808 bytes-rw-r--r--examples/tools/i18n/translations/i18n_it.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_jp.qmbin0 -> 722 bytes-rw-r--r--examples/tools/i18n/translations/i18n_jp.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_ko.qmbin0 -> 690 bytes-rw-r--r--examples/tools/i18n/translations/i18n_ko.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_no.qmbin0 -> 804 bytes-rw-r--r--examples/tools/i18n/translations/i18n_no.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_ru.qmbin0 -> 806 bytes-rw-r--r--examples/tools/i18n/translations/i18n_ru.ts59
-rw-r--r--examples/tools/i18n/translations/i18n_sv.qmbin0 -> 814 bytes-rw-r--r--examples/tools/i18n/translations/i18n_sv.ts57
-rw-r--r--examples/tools/i18n/translations/i18n_zh.qmbin0 -> 700 bytes-rw-r--r--examples/tools/i18n/translations/i18n_zh.ts57
-rw-r--r--examples/tools/plugandpaint/interfaces.h111
-rw-r--r--examples/tools/plugandpaint/main.cpp58
-rw-r--r--examples/tools/plugandpaint/mainwindow.cpp310
-rw-r--r--examples/tools/plugandpaint/mainwindow.h104
-rw-r--r--examples/tools/plugandpaint/paintarea.cpp196
-rw-r--r--examples/tools/plugandpaint/paintarea.h92
-rw-r--r--examples/tools/plugandpaint/plugandpaint.pro22
-rw-r--r--examples/tools/plugandpaint/plugindialog.cpp157
-rw-r--r--examples/tools/plugandpaint/plugindialog.h77
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictools.pro15
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictoolsplugin.cpp198
-rw-r--r--examples/tools/plugandpaintplugins/basictools/basictoolsplugin.h88
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafilters.pro15
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.cpp125
-rw-r--r--examples/tools/plugandpaintplugins/extrafilters/extrafiltersplugin.h64
-rw-r--r--examples/tools/plugandpaintplugins/plugandpaintplugins.pro9
-rw-r--r--examples/tools/regexp/main.cpp52
-rw-r--r--examples/tools/regexp/regexp.pro9
-rw-r--r--examples/tools/regexp/regexpdialog.cpp188
-rw-r--r--examples/tools/regexp/regexpdialog.h86
-rw-r--r--examples/tools/settingseditor/inifiles/licensepage.ini46
-rw-r--r--examples/tools/settingseditor/inifiles/qsa.ini26
-rw-r--r--examples/tools/settingseditor/locationdialog.cpp217
-rw-r--r--examples/tools/settingseditor/locationdialog.h85
-rw-r--r--examples/tools/settingseditor/main.cpp52
-rw-r--r--examples/tools/settingseditor/mainwindow.cpp223
-rw-r--r--examples/tools/settingseditor/mainwindow.h92
-rw-r--r--examples/tools/settingseditor/settingseditor.pro15
-rw-r--r--examples/tools/settingseditor/settingstree.cpp263
-rw-r--r--examples/tools/settingseditor/settingstree.h91
-rw-r--r--examples/tools/settingseditor/variantdelegate.cpp317
-rw-r--r--examples/tools/settingseditor/variantdelegate.h82
-rw-r--r--examples/tools/styleplugin/plugin/plugin.pro21
-rw-r--r--examples/tools/styleplugin/plugin/simplestyle.cpp49
-rw-r--r--examples/tools/styleplugin/plugin/simplestyle.h61
-rw-r--r--examples/tools/styleplugin/plugin/simplestyleplugin.cpp65
-rw-r--r--examples/tools/styleplugin/plugin/simplestyleplugin.h65
-rw-r--r--examples/tools/styleplugin/styleplugin.pro9
-rw-r--r--examples/tools/styleplugin/stylewindow/main.cpp58
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.cpp61
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.h55
-rw-r--r--examples/tools/styleplugin/stylewindow/stylewindow.pro17
-rw-r--r--examples/tools/tools.pro22
-rw-r--r--examples/tools/treemodelcompleter/main.cpp55
-rw-r--r--examples/tools/treemodelcompleter/mainwindow.cpp247
-rw-r--r--examples/tools/treemodelcompleter/mainwindow.h89
-rw-r--r--examples/tools/treemodelcompleter/resources/treemodel.txt20
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.cpp98
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.h71
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.pro12
-rw-r--r--examples/tools/treemodelcompleter/treemodelcompleter.qrc5
-rw-r--r--examples/tools/undoframework/commands.cpp163
-rw-r--r--examples/tools/undoframework/commands.h104
-rw-r--r--examples/tools/undoframework/diagramitem.cpp66
-rw-r--r--examples/tools/undoframework/diagramitem.h73
-rw-r--r--examples/tools/undoframework/diagramscene.cpp76
-rw-r--r--examples/tools/undoframework/diagramscene.h75
-rw-r--r--examples/tools/undoframework/images/cross.pngbin0 -> 114 bytes-rw-r--r--examples/tools/undoframework/main.cpp58
-rw-r--r--examples/tools/undoframework/mainwindow.cpp209
-rw-r--r--examples/tools/undoframework/mainwindow.h100
-rw-r--r--examples/tools/undoframework/undoframework.pro16
-rw-r--r--examples/tools/undoframework/undoframework.qrc6
-rw-r--r--examples/tutorials/README37
-rw-r--r--examples/tutorials/addressbook-fr/README42
-rw-r--r--examples/tutorials/addressbook-fr/addressbook-fr.pro8
-rw-r--r--examples/tutorials/addressbook-fr/part1/addressbook.cpp68
-rw-r--r--examples/tutorials/addressbook-fr/part1/addressbook.h67
-rw-r--r--examples/tutorials/addressbook-fr/part1/main.cpp55
-rw-r--r--examples/tutorials/addressbook-fr/part1/part1.pro9
-rw-r--r--examples/tutorials/addressbook-fr/part2/addressbook.cpp158
-rw-r--r--examples/tutorials/addressbook-fr/part2/addressbook.h85
-rw-r--r--examples/tutorials/addressbook-fr/part2/main.cpp55
-rw-r--r--examples/tutorials/addressbook-fr/part2/part2.pro9
-rw-r--r--examples/tutorials/addressbook-fr/part3/addressbook.cpp217
-rw-r--r--examples/tutorials/addressbook-fr/part3/addressbook.h87
-rw-r--r--examples/tutorials/addressbook-fr/part3/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part3/part3.pro9
-rw-r--r--examples/tutorials/addressbook-fr/part4/addressbook.cpp291
-rw-r--r--examples/tutorials/addressbook-fr/part4/addressbook.h100
-rw-r--r--examples/tutorials/addressbook-fr/part4/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part4/part4.pro9
-rw-r--r--examples/tutorials/addressbook-fr/part5/addressbook.cpp315
-rw-r--r--examples/tutorials/addressbook-fr/part5/addressbook.h103
-rw-r--r--examples/tutorials/addressbook-fr/part5/finddialog.cpp87
-rw-r--r--examples/tutorials/addressbook-fr/part5/finddialog.h69
-rw-r--r--examples/tutorials/addressbook-fr/part5/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part5/part5.pro11
-rw-r--r--examples/tutorials/addressbook-fr/part6/addressbook.cpp396
-rw-r--r--examples/tutorials/addressbook-fr/part6/addressbook.h104
-rw-r--r--examples/tutorials/addressbook-fr/part6/finddialog.cpp83
-rw-r--r--examples/tutorials/addressbook-fr/part6/finddialog.h69
-rw-r--r--examples/tutorials/addressbook-fr/part6/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part6/part6.pro11
-rw-r--r--examples/tutorials/addressbook-fr/part7/addressbook.cpp449
-rw-r--r--examples/tutorials/addressbook-fr/part7/addressbook.h106
-rw-r--r--examples/tutorials/addressbook-fr/part7/finddialog.cpp83
-rw-r--r--examples/tutorials/addressbook-fr/part7/finddialog.h69
-rw-r--r--examples/tutorials/addressbook-fr/part7/main.cpp53
-rw-r--r--examples/tutorials/addressbook-fr/part7/part7.pro11
-rw-r--r--examples/tutorials/addressbook/README42
-rw-r--r--examples/tutorials/addressbook/addressbook.pro8
-rw-r--r--examples/tutorials/addressbook/part1/addressbook.cpp68
-rw-r--r--examples/tutorials/addressbook/part1/addressbook.h67
-rw-r--r--examples/tutorials/addressbook/part1/main.cpp55
-rw-r--r--examples/tutorials/addressbook/part1/part1.pro9
-rw-r--r--examples/tutorials/addressbook/part2/addressbook.cpp158
-rw-r--r--examples/tutorials/addressbook/part2/addressbook.h85
-rw-r--r--examples/tutorials/addressbook/part2/main.cpp55
-rw-r--r--examples/tutorials/addressbook/part2/part2.pro9
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.cpp217
-rw-r--r--examples/tutorials/addressbook/part3/addressbook.h87
-rw-r--r--examples/tutorials/addressbook/part3/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part3/part3.pro9
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.cpp291
-rw-r--r--examples/tutorials/addressbook/part4/addressbook.h100
-rw-r--r--examples/tutorials/addressbook/part4/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part4/part4.pro9
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.cpp315
-rw-r--r--examples/tutorials/addressbook/part5/addressbook.h103
-rw-r--r--examples/tutorials/addressbook/part5/finddialog.cpp87
-rw-r--r--examples/tutorials/addressbook/part5/finddialog.h69
-rw-r--r--examples/tutorials/addressbook/part5/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part5/part5.pro11
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.cpp396
-rw-r--r--examples/tutorials/addressbook/part6/addressbook.h104
-rw-r--r--examples/tutorials/addressbook/part6/finddialog.cpp83
-rw-r--r--examples/tutorials/addressbook/part6/finddialog.h69
-rw-r--r--examples/tutorials/addressbook/part6/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part6/part6.pro11
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.cpp449
-rw-r--r--examples/tutorials/addressbook/part7/addressbook.h106
-rw-r--r--examples/tutorials/addressbook/part7/finddialog.cpp83
-rw-r--r--examples/tutorials/addressbook/part7/finddialog.h69
-rw-r--r--examples/tutorials/addressbook/part7/main.cpp53
-rw-r--r--examples/tutorials/addressbook/part7/part7.pro11
-rw-r--r--examples/tutorials/tutorials.pro8
-rw-r--r--examples/uitools/multipleinheritance/calculatorform.cpp66
-rw-r--r--examples/uitools/multipleinheritance/calculatorform.h63
-rw-r--r--examples/uitools/multipleinheritance/calculatorform.ui303
-rw-r--r--examples/uitools/multipleinheritance/main.cpp53
-rw-r--r--examples/uitools/multipleinheritance/multipleinheritance.pro11
-rw-r--r--examples/uitools/textfinder/forms/input.txt9
-rw-r--r--examples/uitools/textfinder/forms/textfinder.ui89
-rw-r--r--examples/uitools/textfinder/main.cpp56
-rw-r--r--examples/uitools/textfinder/textfinder.cpp156
-rw-r--r--examples/uitools/textfinder/textfinder.h75
-rw-r--r--examples/uitools/textfinder/textfinder.pro10
-rw-r--r--examples/uitools/textfinder/textfinder.qrc6
-rw-r--r--examples/uitools/uitools.pro10
-rwxr-xr-xexamples/webkit/formextractor/form.html64
-rw-r--r--examples/webkit/formextractor/formextractor.cpp74
-rw-r--r--examples/webkit/formextractor/formextractor.h67
-rw-r--r--examples/webkit/formextractor/formextractor.pro16
-rw-r--r--examples/webkit/formextractor/formextractor.qrc5
-rw-r--r--examples/webkit/formextractor/formextractor.ui159
-rw-r--r--examples/webkit/formextractor/main.cpp53
-rw-r--r--examples/webkit/formextractor/mainwindow.cpp87
-rw-r--r--examples/webkit/formextractor/mainwindow.h75
-rw-r--r--examples/webkit/previewer/main.cpp53
-rw-r--r--examples/webkit/previewer/mainwindow.cpp197
-rw-r--r--examples/webkit/previewer/mainwindow.h87
-rw-r--r--examples/webkit/previewer/previewer.cpp65
-rw-r--r--examples/webkit/previewer/previewer.h65
-rw-r--r--examples/webkit/previewer/previewer.pro13
-rw-r--r--examples/webkit/previewer/previewer.ui99
-rw-r--r--examples/webkit/webkit.pro9
-rw-r--r--examples/widgets/README44
-rw-r--r--examples/widgets/analogclock/analogclock.cpp146
-rw-r--r--examples/widgets/analogclock/analogclock.h60
-rw-r--r--examples/widgets/analogclock/analogclock.pro9
-rw-r--r--examples/widgets/analogclock/main.cpp52
-rw-r--r--examples/widgets/calculator/button.cpp64
-rw-r--r--examples/widgets/calculator/button.h59
-rw-r--r--examples/widgets/calculator/calculator.cpp398
-rw-r--r--examples/widgets/calculator/calculator.h108
-rw-r--r--examples/widgets/calculator/calculator.pro11
-rw-r--r--examples/widgets/calculator/main.cpp52
-rw-r--r--examples/widgets/calendarwidget/calendarwidget.pro9
-rw-r--r--examples/widgets/calendarwidget/main.cpp52
-rw-r--r--examples/widgets/calendarwidget/window.cpp462
-rw-r--r--examples/widgets/calendarwidget/window.h128
-rw-r--r--examples/widgets/charactermap/charactermap.pro11
-rw-r--r--examples/widgets/charactermap/characterwidget.cpp178
-rw-r--r--examples/widgets/charactermap/characterwidget.h87
-rw-r--r--examples/widgets/charactermap/main.cpp52
-rw-r--r--examples/widgets/charactermap/mainwindow.cpp196
-rw-r--r--examples/widgets/charactermap/mainwindow.h84
-rw-r--r--examples/widgets/codeeditor/codeeditor.cpp171
-rw-r--r--examples/widgets/codeeditor/codeeditor.h106
-rw-r--r--examples/widgets/codeeditor/codeeditor.pro9
-rw-r--r--examples/widgets/codeeditor/main.cpp56
-rw-r--r--examples/widgets/digitalclock/digitalclock.cpp73
-rw-r--r--examples/widgets/digitalclock/digitalclock.h60
-rw-r--r--examples/widgets/digitalclock/digitalclock.pro9
-rw-r--r--examples/widgets/digitalclock/main.cpp52
-rw-r--r--examples/widgets/groupbox/groupbox.pro9
-rw-r--r--examples/widgets/groupbox/main.cpp52
-rw-r--r--examples/widgets/groupbox/window.cpp190
-rw-r--r--examples/widgets/groupbox/window.h67
-rw-r--r--examples/widgets/icons/iconpreviewarea.cpp142
-rw-r--r--examples/widgets/icons/iconpreviewarea.h78
-rw-r--r--examples/widgets/icons/icons.pro25
-rw-r--r--examples/widgets/icons/iconsizespinbox.cpp71
-rw-r--r--examples/widgets/icons/iconsizespinbox.h60
-rw-r--r--examples/widgets/icons/imagedelegate.cpp106
-rw-r--r--examples/widgets/icons/imagedelegate.h69
-rw-r--r--examples/widgets/icons/images/designer.pngbin0 -> 4205 bytes-rw-r--r--examples/widgets/icons/images/find_disabled.pngbin0 -> 501 bytes-rw-r--r--examples/widgets/icons/images/find_normal.pngbin0 -> 838 bytes-rw-r--r--examples/widgets/icons/images/monkey_off_128x128.pngbin0 -> 7045 bytes-rw-r--r--examples/widgets/icons/images/monkey_off_16x16.pngbin0 -> 683 bytes-rw-r--r--examples/widgets/icons/images/monkey_off_32x32.pngbin0 -> 1609 bytes-rw-r--r--examples/widgets/icons/images/monkey_off_64x64.pngbin0 -> 3533 bytes-rw-r--r--examples/widgets/icons/images/monkey_on_128x128.pngbin0 -> 6909 bytes-rw-r--r--examples/widgets/icons/images/monkey_on_16x16.pngbin0 -> 681 bytes-rw-r--r--examples/widgets/icons/images/monkey_on_32x32.pngbin0 -> 1577 bytes-rw-r--r--examples/widgets/icons/images/monkey_on_64x64.pngbin0 -> 3479 bytes-rw-r--r--examples/widgets/icons/images/qt_extended_16x16.pngbin0 -> 834 bytes-rw-r--r--examples/widgets/icons/images/qt_extended_32x32.pngbin0 -> 1892 bytes-rw-r--r--examples/widgets/icons/images/qt_extended_48x48.pngbin0 -> 3672 bytes-rw-r--r--examples/widgets/icons/main.cpp52
-rw-r--r--examples/widgets/icons/mainwindow.cpp443
-rw-r--r--examples/widgets/icons/mainwindow.h117
-rw-r--r--examples/widgets/imageviewer/imageviewer.cpp278
-rw-r--r--examples/widgets/imageviewer/imageviewer.h104
-rw-r--r--examples/widgets/imageviewer/imageviewer.pro13
-rw-r--r--examples/widgets/imageviewer/main.cpp52
-rw-r--r--examples/widgets/lineedits/lineedits.pro9
-rw-r--r--examples/widgets/lineedits/main.cpp52
-rw-r--r--examples/widgets/lineedits/window.cpp257
-rw-r--r--examples/widgets/lineedits/window.h76
-rw-r--r--examples/widgets/movie/animation.mngbin0 -> 5464 bytes-rw-r--r--examples/widgets/movie/main.cpp52
-rw-r--r--examples/widgets/movie/movie.pro9
-rw-r--r--examples/widgets/movie/movieplayer.cpp211
-rw-r--r--examples/widgets/movie/movieplayer.h97
-rw-r--r--examples/widgets/scribble/main.cpp52
-rw-r--r--examples/widgets/scribble/mainwindow.cpp251
-rw-r--r--examples/widgets/scribble/mainwindow.h93
-rw-r--r--examples/widgets/scribble/scribble.pro11
-rw-r--r--examples/widgets/scribble/scribblearea.cpp215
-rw-r--r--examples/widgets/scribble/scribblearea.h91
-rw-r--r--examples/widgets/shapedclock/main.cpp52
-rw-r--r--examples/widgets/shapedclock/shapedclock.cpp159
-rw-r--r--examples/widgets/shapedclock/shapedclock.h67
-rw-r--r--examples/widgets/shapedclock/shapedclock.pro9
-rw-r--r--examples/widgets/sliders/main.cpp52
-rw-r--r--examples/widgets/sliders/sliders.pro11
-rw-r--r--examples/widgets/sliders/slidersgroup.cpp133
-rw-r--r--examples/widgets/sliders/slidersgroup.h79
-rw-r--r--examples/widgets/sliders/window.cpp146
-rw-r--r--examples/widgets/sliders/window.h85
-rw-r--r--examples/widgets/spinboxes/main.cpp52
-rw-r--r--examples/widgets/spinboxes/spinboxes.pro9
-rw-r--r--examples/widgets/spinboxes/window.cpp252
-rw-r--r--examples/widgets/spinboxes/window.h82
-rw-r--r--examples/widgets/styles/images/woodbackground.pngbin0 -> 7691 bytes-rw-r--r--examples/widgets/styles/images/woodbutton.pngbin0 -> 7689 bytes-rw-r--r--examples/widgets/styles/main.cpp54
-rw-r--r--examples/widgets/styles/norwegianwoodstyle.cpp331
-rw-r--r--examples/widgets/styles/norwegianwoodstyle.h79
-rw-r--r--examples/widgets/styles/styles.pro14
-rw-r--r--examples/widgets/styles/styles.qrc6
-rw-r--r--examples/widgets/styles/widgetgallery.cpp276
-rw-r--r--examples/widgets/styles/widgetgallery.h122
-rw-r--r--examples/widgets/stylesheet/images/checkbox_checked.pngbin0 -> 263 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_checked_hover.pngbin0 -> 266 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_checked_pressed.pngbin0 -> 425 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_unchecked.pngbin0 -> 159 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_unchecked_hover.pngbin0 -> 159 bytes-rw-r--r--examples/widgets/stylesheet/images/checkbox_unchecked_pressed.pngbin0 -> 320 bytes-rw-r--r--examples/widgets/stylesheet/images/down_arrow.pngbin0 -> 175 bytes-rw-r--r--examples/widgets/stylesheet/images/down_arrow_disabled.pngbin0 -> 174 bytes-rw-r--r--examples/widgets/stylesheet/images/frame.pngbin0 -> 253 bytes-rw-r--r--examples/widgets/stylesheet/images/pagefold.pngbin0 -> 1545 bytes-rw-r--r--examples/widgets/stylesheet/images/pushbutton.pngbin0 -> 533 bytes-rw-r--r--examples/widgets/stylesheet/images/pushbutton_hover.pngbin0 -> 525 bytes-rw-r--r--examples/widgets/stylesheet/images/pushbutton_pressed.pngbin0 -> 513 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_checked.pngbin0 -> 355 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_checked_hover.pngbin0 -> 532 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_checked_pressed.pngbin0 -> 599 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_unchecked.pngbin0 -> 240 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_unchecked_hover.pngbin0 -> 492 bytes-rw-r--r--examples/widgets/stylesheet/images/radiobutton_unchecked_pressed.pngbin0 -> 556 bytes-rw-r--r--examples/widgets/stylesheet/images/sizegrip.pngbin0 -> 129 bytes-rw-r--r--examples/widgets/stylesheet/images/spindown.pngbin0 -> 276 bytes-rw-r--r--examples/widgets/stylesheet/images/spindown_hover.pngbin0 -> 268 bytes-rw-r--r--examples/widgets/stylesheet/images/spindown_off.pngbin0 -> 249 bytes-rw-r--r--examples/widgets/stylesheet/images/spindown_pressed.pngbin0 -> 264 bytes-rw-r--r--examples/widgets/stylesheet/images/spinup.pngbin0 -> 283 bytes-rw-r--r--examples/widgets/stylesheet/images/spinup_hover.pngbin0 -> 277 bytes-rw-r--r--examples/widgets/stylesheet/images/spinup_off.pngbin0 -> 274 bytes-rw-r--r--examples/widgets/stylesheet/images/spinup_pressed.pngbin0 -> 277 bytes-rw-r--r--examples/widgets/stylesheet/images/up_arrow.pngbin0 -> 197 bytes-rw-r--r--examples/widgets/stylesheet/images/up_arrow_disabled.pngbin0 -> 172 bytes-rw-r--r--examples/widgets/stylesheet/layouts/default.ui329
-rw-r--r--examples/widgets/stylesheet/layouts/pagefold.ui349
-rw-r--r--examples/widgets/stylesheet/main.cpp54
-rw-r--r--examples/widgets/stylesheet/mainwindow.cpp75
-rw-r--r--examples/widgets/stylesheet/mainwindow.h67
-rw-r--r--examples/widgets/stylesheet/mainwindow.ui356
-rw-r--r--examples/widgets/stylesheet/qss/coffee.qss112
-rw-r--r--examples/widgets/stylesheet/qss/default.qss1
-rw-r--r--examples/widgets/stylesheet/qss/pagefold.qss299
-rw-r--r--examples/widgets/stylesheet/stylesheet.pro14
-rw-r--r--examples/widgets/stylesheet/stylesheet.qrc39
-rw-r--r--examples/widgets/stylesheet/stylesheeteditor.cpp94
-rw-r--r--examples/widgets/stylesheet/stylesheeteditor.h68
-rw-r--r--examples/widgets/stylesheet/stylesheeteditor.ui171
-rw-r--r--examples/widgets/tablet/main.cpp61
-rw-r--r--examples/widgets/tablet/mainwindow.cpp275
-rw-r--r--examples/widgets/tablet/mainwindow.h114
-rw-r--r--examples/widgets/tablet/tablet.pro13
-rw-r--r--examples/widgets/tablet/tabletapplication.cpp57
-rw-r--r--examples/widgets/tablet/tabletapplication.h67
-rw-r--r--examples/widgets/tablet/tabletcanvas.cpp257
-rw-r--r--examples/widgets/tablet/tabletcanvas.h115
-rw-r--r--examples/widgets/tetrix/main.cpp55
-rw-r--r--examples/widgets/tetrix/tetrix.pro13
-rw-r--r--examples/widgets/tetrix/tetrixboard.cpp409
-rw-r--r--examples/widgets/tetrix/tetrixboard.h117
-rw-r--r--examples/widgets/tetrix/tetrixpiece.cpp146
-rw-r--r--examples/widgets/tetrix/tetrixpiece.h76
-rw-r--r--examples/widgets/tetrix/tetrixwindow.cpp116
-rw-r--r--examples/widgets/tetrix/tetrixwindow.h77
-rw-r--r--examples/widgets/tooltips/images/circle.pngbin0 -> 165 bytes-rw-r--r--examples/widgets/tooltips/images/square.pngbin0 -> 94 bytes-rw-r--r--examples/widgets/tooltips/images/triangle.pngbin0 -> 170 bytes-rw-r--r--examples/widgets/tooltips/main.cpp55
-rw-r--r--examples/widgets/tooltips/shapeitem.cpp100
-rw-r--r--examples/widgets/tooltips/shapeitem.h71
-rw-r--r--examples/widgets/tooltips/sortingbox.cpp302
-rw-r--r--examples/widgets/tooltips/sortingbox.h107
-rw-r--r--examples/widgets/tooltips/tooltips.pro12
-rw-r--r--examples/widgets/tooltips/tooltips.qrc7
-rw-r--r--examples/widgets/validators/ledoff.pngbin0 -> 562 bytes-rw-r--r--examples/widgets/validators/ledon.pngbin0 -> 486 bytes-rw-r--r--examples/widgets/validators/ledwidget.cpp63
-rw-r--r--examples/widgets/validators/ledwidget.h65
-rw-r--r--examples/widgets/validators/localeselector.cpp313
-rw-r--r--examples/widgets/validators/localeselector.h61
-rw-r--r--examples/widgets/validators/main.cpp137
-rw-r--r--examples/widgets/validators/validators.pro21
-rw-r--r--examples/widgets/validators/validators.qrc6
-rw-r--r--examples/widgets/validators/validators.ui467
-rw-r--r--examples/widgets/widgets.pro31
-rw-r--r--examples/widgets/wiggly/dialog.cpp67
-rw-r--r--examples/widgets/wiggly/dialog.h57
-rw-r--r--examples/widgets/wiggly/main.cpp53
-rw-r--r--examples/widgets/wiggly/wiggly.pro11
-rw-r--r--examples/widgets/wiggly/wigglywidget.cpp101
-rw-r--r--examples/widgets/wiggly/wigglywidget.h70
-rw-r--r--examples/widgets/windowflags/controllerwindow.cpp221
-rw-r--r--examples/widgets/windowflags/controllerwindow.h105
-rw-r--r--examples/widgets/windowflags/main.cpp52
-rw-r--r--examples/widgets/windowflags/previewwindow.cpp119
-rw-r--r--examples/widgets/windowflags/previewwindow.h68
-rw-r--r--examples/widgets/windowflags/windowflags.pro11
-rw-r--r--examples/xml/README40
-rw-r--r--examples/xml/dombookmarks/dombookmarks.pro18
-rw-r--r--examples/xml/dombookmarks/frank.xbel230
-rw-r--r--examples/xml/dombookmarks/jennifer.xbel93
-rw-r--r--examples/xml/dombookmarks/main.cpp53
-rw-r--r--examples/xml/dombookmarks/mainwindow.cpp146
-rw-r--r--examples/xml/dombookmarks/mainwindow.h76
-rw-r--r--examples/xml/dombookmarks/xbeltree.cpp187
-rw-r--r--examples/xml/dombookmarks/xbeltree.h75
-rw-r--r--examples/xml/rsslisting/main.cpp64
-rw-r--r--examples/xml/rsslisting/rsslisting.cpp239
-rw-r--r--examples/xml/rsslisting/rsslisting.h87
-rw-r--r--examples/xml/rsslisting/rsslisting.pro10
-rw-r--r--examples/xml/saxbookmarks/frank.xbel230
-rw-r--r--examples/xml/saxbookmarks/jennifer.xbel93
-rw-r--r--examples/xml/saxbookmarks/main.cpp53
-rw-r--r--examples/xml/saxbookmarks/mainwindow.cpp161
-rw-r--r--examples/xml/saxbookmarks/mainwindow.h78
-rw-r--r--examples/xml/saxbookmarks/saxbookmarks.pro20
-rw-r--r--examples/xml/saxbookmarks/xbelgenerator.cpp115
-rw-r--r--examples/xml/saxbookmarks/xbelgenerator.h69
-rw-r--r--examples/xml/saxbookmarks/xbelhandler.cpp147
-rw-r--r--examples/xml/saxbookmarks/xbelhandler.h79
-rw-r--r--examples/xml/streambookmarks/frank.xbel230
-rw-r--r--examples/xml/streambookmarks/jennifer.xbel93
-rw-r--r--examples/xml/streambookmarks/main.cpp55
-rw-r--r--examples/xml/streambookmarks/mainwindow.cpp177
-rw-r--r--examples/xml/streambookmarks/mainwindow.h80
-rw-r--r--examples/xml/streambookmarks/streambookmarks.pro14
-rw-r--r--examples/xml/streambookmarks/xbelreader.cpp205
-rw-r--r--examples/xml/streambookmarks/xbelreader.h82
-rw-r--r--examples/xml/streambookmarks/xbelwriter.cpp93
-rw-r--r--examples/xml/streambookmarks/xbelwriter.h65
-rw-r--r--examples/xml/xml.pro12
-rw-r--r--examples/xml/xmlstreamlint/main.cpp128
-rw-r--r--examples/xml/xmlstreamlint/xmlstreamlint.pro10
-rw-r--r--examples/xmlpatterns/README38
-rw-r--r--examples/xmlpatterns/filetree/filetree.cpp372
-rw-r--r--examples/xmlpatterns/filetree/filetree.h103
-rw-r--r--examples/xmlpatterns/filetree/filetree.pro13
-rw-r--r--examples/xmlpatterns/filetree/forms/mainwindow.ui200
-rw-r--r--examples/xmlpatterns/filetree/main.cpp54
-rw-r--r--examples/xmlpatterns/filetree/mainwindow.cpp166
-rw-r--r--examples/xmlpatterns/filetree/mainwindow.h73
-rw-r--r--examples/xmlpatterns/filetree/queries.qrc7
-rw-r--r--examples/xmlpatterns/filetree/queries/listCPPFiles.xq19
-rw-r--r--examples/xmlpatterns/filetree/queries/wholeTree.xq1
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/forms/mainwindow.ui196
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/main.cpp53
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/mainwindow.cpp135
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/mainwindow.h64
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp459
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h139
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro13
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/queries.qrc7
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/queries/statisticsInHTML.xq58
-rw-r--r--examples/xmlpatterns/qobjectxmlmodel/queries/wholeTree.xq3
-rw-r--r--examples/xmlpatterns/recipes/files/allRecipes.xq4
-rw-r--r--examples/xmlpatterns/recipes/files/cookbook.xml62
-rw-r--r--examples/xmlpatterns/recipes/files/liquidIngredientsInSoup.xq5
-rw-r--r--examples/xmlpatterns/recipes/files/mushroomSoup.xq5
-rw-r--r--examples/xmlpatterns/recipes/files/preparationLessThan30.xq9
-rw-r--r--examples/xmlpatterns/recipes/files/preparationTimes.xq5
-rw-r--r--examples/xmlpatterns/recipes/forms/querywidget.ui151
-rw-r--r--examples/xmlpatterns/recipes/main.cpp54
-rw-r--r--examples/xmlpatterns/recipes/querymainwindow.cpp124
-rw-r--r--examples/xmlpatterns/recipes/querymainwindow.h72
-rw-r--r--examples/xmlpatterns/recipes/recipes.pro11
-rw-r--r--examples/xmlpatterns/recipes/recipes.qrc11
-rw-r--r--examples/xmlpatterns/shared/xmlsyntaxhighlighter.cpp106
-rw-r--r--examples/xmlpatterns/shared/xmlsyntaxhighlighter.h72
-rw-r--r--examples/xmlpatterns/trafficinfo/main.cpp54
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.cpp181
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.h77
-rw-r--r--examples/xmlpatterns/trafficinfo/station_example.wml31
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.cpp164
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.h70
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.ui104
-rw-r--r--examples/xmlpatterns/trafficinfo/stationquery.cpp94
-rw-r--r--examples/xmlpatterns/trafficinfo/stationquery.h74
-rw-r--r--examples/xmlpatterns/trafficinfo/time_example.wml56
-rw-r--r--examples/xmlpatterns/trafficinfo/timequery.cpp116
-rw-r--r--examples/xmlpatterns/trafficinfo/timequery.h74
-rw-r--r--examples/xmlpatterns/trafficinfo/trafficinfo.pro9
-rw-r--r--examples/xmlpatterns/xmlpatterns.pro14
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/globalVariables.pro9
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/globals.cpp67
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/globals.gccxml33
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/globals.html40
-rw-r--r--examples/xmlpatterns/xquery/globalVariables/reportGlobals.xq110
-rw-r--r--examples/xmlpatterns/xquery/xquery.pro8
1907 files changed, 142213 insertions, 0 deletions
diff --git a/examples/README b/examples/README
new file mode 100644
index 0000000..10e14ce
--- /dev/null
+++ b/examples/README
@@ -0,0 +1,39 @@
+Qt is supplied with a number of example applications and demonstrations that
+have been written to provide developers with examples of the Qt API in use,
+highlight good programming practice, and showcase features found in each of
+Qt's core technologies.
+
+The example and demo launcher can be used to explore the different categories
+available. It provides an overview of each example, lets you view the
+documentation in Qt Assistant, and is able to launch examples and demos.
+
+Documentation for examples can be found in the Tutorials and Examples section
+of the Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/activeqt/README b/examples/activeqt/README
new file mode 100644
index 0000000..24be2de
--- /dev/null
+++ b/examples/activeqt/README
@@ -0,0 +1,39 @@
+Qt is supplied with a number of example applications and demonstrations that
+have been written to provide developers with examples of the Qt API in use,
+highlight good programming practice, and showcase features found in each of
+Qt's core technologies.
+
+The example and demo launcher can be used to explore the different categories
+available. It provides an overview of each example, lets you view the
+documentation in Qt Assistant, and is able to launch examples and demos.
+
+Documentation for examples can be found in the Tutorial and Examples section
+of the Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/activeqt/activeqt.pro b/examples/activeqt/activeqt.pro
new file mode 100644
index 0000000..262e1a1
--- /dev/null
+++ b/examples/activeqt/activeqt.pro
@@ -0,0 +1,20 @@
+TEMPLATE = subdirs
+SUBDIRS += comapp \
+ hierarchy \
+ menus \
+ multiple \
+ simple \
+ webbrowser \
+ wrapper
+
+contains(QT_CONFIG, opengl):SUBDIRS += opengl
+
+# For now only the contain examples with mingw, for the others you need
+# an IDL compiler
+win32-g++|wince*:SUBDIRS = webbrowser
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS activeqt.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt
+INSTALLS += target sources
diff --git a/examples/activeqt/comapp/comapp.pro b/examples/activeqt/comapp/comapp.pro
new file mode 100644
index 0000000..84ce072
--- /dev/null
+++ b/examples/activeqt/comapp/comapp.pro
@@ -0,0 +1,13 @@
+TEMPLATE = app
+CONFIG += qaxserver
+
+# Input
+SOURCES += main.cpp
+
+RC_FILE = comapp.rc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/comapp
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS comapp.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/comapp
+INSTALLS += target sources
diff --git a/examples/activeqt/comapp/comapp.rc b/examples/activeqt/comapp/comapp.rc
new file mode 100644
index 0000000..24e339a
--- /dev/null
+++ b/examples/activeqt/comapp/comapp.rc
@@ -0,0 +1 @@
+1 TYPELIB "comapp.rc"
diff --git a/examples/activeqt/comapp/main.cpp b/examples/activeqt/comapp/main.cpp
new file mode 100644
index 0000000..95caaa3
--- /dev/null
+++ b/examples/activeqt/comapp/main.cpp
@@ -0,0 +1,272 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QAxFactory>
+#include <QTabWidget>
+#include <QTimer>
+
+class Application;
+class DocumentList;
+
+//! [0]
+class Document : public QObject
+{
+ Q_OBJECT
+
+ Q_CLASSINFO("ClassID", "{2b5775cd-72c2-43da-bc3b-b0e8d1e1c4f7}")
+ Q_CLASSINFO("InterfaceID", "{2ce1761e-07a3-415c-bd11-0eab2c7283de}")
+
+ Q_PROPERTY(Application *application READ application)
+ Q_PROPERTY(QString title READ title WRITE setTitle)
+
+public:
+ Document(DocumentList *list);
+ ~Document();
+
+ Application *application() const;
+
+ QString title() const;
+ void setTitle(const QString &title);
+
+private:
+ QWidget *page;
+};
+//! [0]
+
+//! [1]
+class DocumentList : public QObject
+{
+ Q_OBJECT
+
+ Q_CLASSINFO("ClassID", "{496b761d-924b-4554-a18a-8f3704d2a9a6}")
+ Q_CLASSINFO("InterfaceID", "{6c9e30e8-3ff6-4e6a-9edc-d219d074a148}")
+
+ Q_PROPERTY(Application* application READ application)
+ Q_PROPERTY(int count READ count)
+
+public:
+ DocumentList(Application *application);
+
+ int count() const;
+ Application *application() const;
+
+public slots:
+ Document *addDocument();
+ Document *item(int index) const;
+
+private:
+ QList<Document*> list;
+};
+//! [1]
+
+//! [2]
+class Application : public QObject
+{
+ Q_OBJECT
+
+ Q_CLASSINFO("ClassID", "{b50a71db-c4a7-4551-8d14-49983566afee}")
+ Q_CLASSINFO("InterfaceID", "{4a427759-16ef-4ed8-be79-59ffe5789042}")
+ Q_CLASSINFO("RegisterObject", "yes")
+
+ Q_PROPERTY(DocumentList* documents READ documents)
+ Q_PROPERTY(QString id READ id)
+ Q_PROPERTY(bool visible READ isVisible WRITE setVisible)
+
+public:
+ Application(QObject *parent = 0);
+ DocumentList *documents() const;
+
+ QString id() const { return objectName(); }
+
+ void setVisible(bool on);
+ bool isVisible() const;
+
+ QTabWidget *window() const { return ui; }
+
+public slots:
+ void quit();
+
+private:
+ DocumentList *docs;
+
+ QTabWidget *ui;
+};
+//! [2]
+
+//! [3]
+Document::Document(DocumentList *list)
+: QObject(list)
+{
+ QTabWidget *tabs = list->application()->window();
+ page = new QWidget(tabs);
+ page->setWindowTitle("Unnamed");
+ tabs->addTab(page, page->windowTitle());
+
+ page->show();
+}
+
+Document::~Document()
+{
+ delete page;
+}
+
+Application *Document::application() const
+{
+ return qobject_cast<DocumentList*>(parent())->application();
+}
+
+QString Document::title() const
+{
+ return page->windowTitle();
+}
+
+void Document::setTitle(const QString &t)
+{
+ page->setWindowTitle(t);
+
+ QTabWidget *tabs = application()->window();
+ int index = tabs->indexOf(page);
+ tabs->setTabText(index, page->windowTitle());
+}
+
+//! [3] //! [4]
+DocumentList::DocumentList(Application *application)
+: QObject(application)
+{
+}
+
+Application *DocumentList::application() const
+{
+ return qobject_cast<Application*>(parent());
+}
+
+int DocumentList::count() const
+{
+ return list.count();
+}
+
+Document *DocumentList::item(int index) const
+{
+ if (index >= list.count())
+ return 0;
+
+ return list.at(index);
+}
+
+Document *DocumentList::addDocument()
+{
+ Document *document = new Document(this);
+ list.append(document);
+
+ return document;
+}
+
+
+//! [4] //! [5]
+Application::Application(QObject *parent)
+: QObject(parent), ui(0)
+{
+ ui = new QTabWidget;
+
+ setObjectName("From QAxFactory");
+ docs = new DocumentList(this);
+}
+
+DocumentList *Application::documents() const
+{
+ return docs;
+}
+
+void Application::setVisible(bool on)
+{
+ ui->setShown(on);
+}
+
+bool Application::isVisible() const
+{
+ return ui->isVisible();
+}
+
+void Application::quit()
+{
+ delete docs;
+ docs = 0;
+
+ delete ui;
+ ui = 0;
+ QTimer::singleShot(0, qApp, SLOT(quit()));
+}
+
+#include "main.moc"
+//! [5] //! [6]
+
+
+QAXFACTORY_BEGIN("{edd3e836-f537-4c6f-be7d-6014c155cc7a}", "{b7da3de8-83bb-4bbe-9ab7-99a05819e201}")
+ QAXCLASS(Application)
+ QAXTYPE(Document)
+ QAXTYPE(DocumentList)
+QAXFACTORY_END()
+
+//! [6] //! [7]
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ app.setQuitOnLastWindowClosed(false);
+
+ // started by COM - don't do anything
+ if (QAxFactory::isServer())
+ return app.exec();
+
+ // started by user
+ Application appobject(0);
+ appobject.setObjectName("From Application");
+
+ QAxFactory::startServer();
+ QAxFactory::registerActiveObject(&appobject);
+
+ appobject.setVisible(true);
+
+ QObject::connect(qApp, SIGNAL(lastWindowClosed()), &appobject, SLOT(quit()));
+
+ return app.exec();
+}
+//! [7]
diff --git a/examples/activeqt/dotnet/walkthrough/Form1.cs b/examples/activeqt/dotnet/walkthrough/Form1.cs
new file mode 100644
index 0000000..9fb572a
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/Form1.cs
@@ -0,0 +1,127 @@
+using System;
+using System.Drawing;
+using System.Collections;
+using System.ComponentModel;
+using System.Windows.Forms;
+using System.Data;
+
+namespace csharp
+{
+ /// <summary>
+ /// Summary description for Form1.
+ /// </summary>
+ public class Form1 : System.Windows.Forms.Form
+ {
+ private AxwrapperaxLib.AxQPushButton resetButton;
+ private AxmultipleaxLib.AxQAxWidget2 circleWidget;
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.Container components = null;
+
+ public Form1()
+ {
+ //
+ // Required for Windows Form Designer support
+ //
+ InitializeComponent();
+
+ //
+ // TODO: Add any constructor code after InitializeComponent call
+ //
+ }
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing )
+ {
+ if (components != null)
+ {
+ components.Dispose();
+ }
+ }
+ base.Dispose( disposing );
+ }
+
+ #region Windows Form Designer generated code
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
+ this.resetButton = new AxwrapperaxLib.AxQPushButton();
+ this.circleWidget = new AxmultipleaxLib.AxQAxWidget2();
+ ((System.ComponentModel.ISupportInitialize)(this.resetButton)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.circleWidget)).BeginInit();
+ this.SuspendLayout();
+ //
+ // resetButton
+ //
+ this.resetButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
+ this.resetButton.Enabled = true;
+ this.resetButton.Location = new System.Drawing.Point(160, 296);
+ this.resetButton.Name = "resetButton";
+ this.resetButton.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("resetButton.OcxState")));
+ this.resetButton.Size = new System.Drawing.Size(168, 32);
+ this.resetButton.TabIndex = 1;
+ this.resetButton.clicked += new System.EventHandler(this.resetLineWidth);
+ //
+ // circleWidget
+ //
+ this.circleWidget.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right);
+ this.circleWidget.Enabled = true;
+ this.circleWidget.Location = new System.Drawing.Point(8, 8);
+ this.circleWidget.Name = "circleWidget";
+ this.circleWidget.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("circleWidget.OcxState")));
+ this.circleWidget.Size = new System.Drawing.Size(320, 264);
+ this.circleWidget.TabIndex = 2;
+ this.circleWidget.ClickEvent += new System.EventHandler(this.circleClicked);
+ //
+ // Form1
+ //
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
+ this.ClientSize = new System.Drawing.Size(336, 333);
+ this.Controls.AddRange(new System.Windows.Forms.Control[] {
+ this.circleWidget,
+ this.resetButton});
+ this.Name = "Form1";
+ this.Text = "Form1";
+ ((System.ComponentModel.ISupportInitialize)(this.resetButton)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.circleWidget)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+ #endregion
+
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ Application.Run(new Form1());
+ }
+
+//! [0]
+ private void circleClicked(object sender, System.EventArgs e)
+ {
+ this.circleWidget.lineWidth++;
+ }
+//! [0]
+
+//! [1]
+ private void resetLineWidth(object sender, System.EventArgs e)
+ {
+ this.circleWidget.lineWidth = 1;
+ this.resetButton.setFocus();
+ }
+//! [1]
+ }
+}
diff --git a/examples/activeqt/dotnet/walkthrough/Form1.resx b/examples/activeqt/dotnet/walkthrough/Form1.resx
new file mode 100644
index 0000000..6353f82
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/Form1.resx
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 1.3
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">1.3</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1">this is my long string</data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ [base64 mime encoded serialized .NET Framework object]
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ [base64 mime encoded string representing a byte array form of the .NET Framework object]
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>1.3</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="resetButton.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>
+ AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuMzMw
+ MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFT
+ eXN0ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAGwMA
+ AAIBAAAAAQAAAAAAAAAAAAAAAAYDAAAAAAAFAAAACGVuYWJsZWQAAAAAEgEAAAACeAAAAAAQAAAAAAAA
+ AAJ5AAAAABAAAAAAAAAABndpZHRoAAAAABAAAACoAAAAB2hlaWdodAAAAAAQAAAAGgAAAA1taW5pbXVt
+ V2lkdGgAAAAAEAAAAAAAAAAObWluaW11bUhlaWdodAAAAAAQAAAAAAAAAA1tYXhpbXVtV2lkdGgAAAAA
+ EAAAf/8AAAAObWF4aW11bUhlaWdodAAAAAAQAAB//wAAAA9iYWNrZ3JvdW5kTW9kZQAAAAAQAAAABAAA
+ ABdwYWxldHRlRm9yZWdyb3VuZENvbG9yAAAAAAr/AAAAAAAAF3BhbGV0dGVCYWNrZ3JvdW5kQ29sb3IA
+ AAAACv/U0MgAAAARYmFja2dyb3VuZE9yaWdpbgAAAAAQAAAAAAAAAAVmb250AAAAAAUAAAAYAE0AUwAg
+ AFMAaABlAGwAbAAgAEQAbABnAFP//wUBADIAAAAACGNhcHRpb24AAAAAA/////8AAAAJaWNvblRleHQA
+ AAAAA/////8AAAAObW91c2VUcmFja2luZwAAAAASAAAAAAxmb2N1c1BvbGljeQAAAAAQAAAAAQAAAA91
+ cGRhdGVzRW5hYmxlZAAAAAASAQAAAAptYXhpbWl6ZWQAAAAAEgAAAAALZnVsbFNjcmVlbgAAAAASAAAA
+ AAxhY2NlcHREcm9wcwAAAAASAAAAABNpbnB1dE1ldGhvZEVuYWJsZWQAAAAAEgAAAAAFdGV4dAAAAAAD
+ AAAADAAmAFIAZQBzAGUAdAAAAAt0b2dnbGVUeXBlAAAAABAAAAAAAAAABWRvd24AAAAAEgAAAAAMdG9n
+ Z2xlU3RhdGUAAAAAEAAAAAAAAAALYXV0b1Jlc2l6ZQAAAAASAAAAAAthdXRvUmVwZWF0AAAAABIAAAAA
+ EGV4Y2x1c2l2ZVRvZ2dsZQAAAAASAAAAAAxhdXRvRGVmYXVsdAAAAAASAQAAAAttZW51QnV0dG9uAAAA
+ ABIAAAAABWZsYXQAAAAAEgAL
+</value>
+ </data>
+ <data name="circleWidget.OcxState" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>
+ AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuMzMw
+ MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACFT
+ eXN0ZW0uV2luZG93cy5Gb3Jtcy5BeEhvc3QrU3RhdGUBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAALwAA
+ AAIBAAAAAQAAAAAAAAAAAAAAABoAAAAAAAAFAAAACmxpbmVXaWR0aAAAAAAQAAAAAAs=
+</value>
+ </data>
+ <data name="$this.Name">
+ <value>Form1</value>
+ </data>
+</root> \ No newline at end of file
diff --git a/examples/activeqt/dotnet/walkthrough/Form1.vb b/examples/activeqt/dotnet/walkthrough/Form1.vb
new file mode 100644
index 0000000..f5f241b
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/Form1.vb
@@ -0,0 +1,88 @@
+Public Class Form1
+ Inherits System.Windows.Forms.Form
+
+#Region " Windows Form Designer generated code "
+
+ Public Sub New()
+ MyBase.New()
+
+ 'This call is required by the Windows Form Designer.
+ InitializeComponent()
+
+ 'Add any initialization after the InitializeComponent() call
+
+ End Sub
+
+ 'Form overrides dispose to clean up the component list.
+ Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
+ If disposing Then
+ If Not (components Is Nothing) Then
+ components.Dispose()
+ End If
+ End If
+ MyBase.Dispose(disposing)
+ End Sub
+
+ 'Required by the Windows Form Designer
+ Private components As System.ComponentModel.IContainer
+
+ 'NOTE: The following procedure is required by the Windows Form Designer
+ 'It can be modified using the Windows Form Designer.
+ 'Do not modify it using the code editor.
+ Friend WithEvents circleWidget As AxmultipleaxLib.AxQAxWidget2
+ Friend WithEvents resetButton As AxwrapperaxLib.AxQPushButton
+ <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
+ Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
+ Me.circleWidget = New AxmultipleaxLib.AxQAxWidget2()
+ Me.resetButton = New AxwrapperaxLib.AxQPushButton()
+ CType(Me.circleWidget, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.resetButton, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'circleWidget
+ '
+ Me.circleWidget.Anchor = (((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
+ Or System.Windows.Forms.AnchorStyles.Left) _
+ Or System.Windows.Forms.AnchorStyles.Right)
+ Me.circleWidget.Enabled = True
+ Me.circleWidget.Location = New System.Drawing.Point(8, 8)
+ Me.circleWidget.Name = "circleWidget"
+ Me.circleWidget.OcxState = CType(resources.GetObject("circleWidget.OcxState"), System.Windows.Forms.AxHost.State)
+ Me.circleWidget.Size = New System.Drawing.Size(280, 216)
+ Me.circleWidget.TabIndex = 0
+ '
+ 'resetButton
+ '
+ Me.resetButton.Anchor = (System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right)
+ ' VB is case insensitive, but our C++ controls are not.
+ ' Me.resetButton.enabled = True
+ Me.resetButton.Location = New System.Drawing.Point(184, 240)
+ Me.resetButton.Name = "resetButton"
+ Me.resetButton.OcxState = CType(resources.GetObject("resetButton.OcxState"), System.Windows.Forms.AxHost.State)
+ Me.resetButton.Size = New System.Drawing.Size(104, 24)
+ Me.resetButton.TabIndex = 1
+ '
+ 'Form1
+ '
+ Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
+ Me.ClientSize = New System.Drawing.Size(292, 273)
+ Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.resetButton, Me.circleWidget})
+ Me.Name = "Form1"
+ Me.Text = "Form1"
+ CType(Me.circleWidget, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.resetButton, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+
+ End Sub
+
+#End Region
+
+ Private Sub circleWidget_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles circleWidget.ClickEvent
+ Me.circleWidget.lineWidth = Me.circleWidget.lineWidth + 1
+ End Sub
+
+ Private Sub resetButton_clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles resetButton.clicked
+ Me.circleWidget.lineWidth = 1
+ Me.resetButton.setFocus()
+ End Sub
+End Class
diff --git a/examples/activeqt/dotnet/walkthrough/csharp.csproj b/examples/activeqt/dotnet/walkthrough/csharp.csproj
new file mode 100644
index 0000000..4c5502b
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/csharp.csproj
@@ -0,0 +1,143 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.0.9466"
+ SchemaVersion = "1.0"
+ ProjectGuid = "{F15600FD-7677-4C01-B98A-6776CE500617}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "csharp"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "WinExe"
+ RootNamespace = "csharp"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "true"
+ Optimize = "false"
+ OutputPath = "bin\Debug\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ Optimize = "true"
+ OutputPath = "bin\Release\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
+ />
+ <Reference
+ Name = "System.Drawing"
+ AssemblyName = "System.Drawing"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Drawing.dll"
+ />
+ <Reference
+ Name = "System.Windows.Forms"
+ AssemblyName = "System.Windows.Forms"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Windows.Forms.dll"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
+ />
+ <Reference
+ Name = "stdole"
+ Guid = "{00020430-0000-0000-C000-000000000046}"
+ VersionMajor = "2"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "primary"
+ />
+ <Reference
+ Name = "wrapperaxLib"
+ Guid = "{3B756301-0075-4E40-8BE8-5A81DE2426B7}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "tlbimp"
+ />
+ <Reference
+ Name = "AxwrapperaxLib"
+ Guid = "{3B756301-0075-4E40-8BE8-5A81DE2426B7}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "aximp"
+ />
+ <Reference
+ Name = "multipleaxLib"
+ Guid = "{05828915-AD1C-47AB-AB96-D6AD1E25F0E2}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "tlbimp"
+ />
+ <Reference
+ Name = "AxmultipleaxLib"
+ Guid = "{05828915-AD1C-47AB-AB96-D6AD1E25F0E2}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "aximp"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "Form1.cs"
+ SubType = "Form"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Form1.resx"
+ DependentUpon = "Form1.cs"
+ BuildAction = "EmbeddedResource"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/examples/activeqt/dotnet/walkthrough/vb.vbproj b/examples/activeqt/dotnet/walkthrough/vb.vbproj
new file mode 100644
index 0000000..eb0a9d6
--- /dev/null
+++ b/examples/activeqt/dotnet/walkthrough/vb.vbproj
@@ -0,0 +1,147 @@
+<VisualStudioProject>
+ <VisualBasic
+ ProjectType = "Local"
+ ProductVersion = "7.0.9466"
+ SchemaVersion = "1.0"
+ ProjectGuid = "{BFF242A6-967C-4F73-BEBE-DED2D9C395C6}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "vb"
+ AssemblyOriginatorKeyFile = ""
+ AssemblyOriginatorKeyMode = "None"
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "WinExe"
+ OptionCompare = "Binary"
+ OptionExplicit = "On"
+ OptionStrict = "Off"
+ RootNamespace = "vb"
+ StartupObject = "vb.Form1"
+ >
+ <Config
+ Name = "Debug"
+ BaseAddress = "285212672"
+ ConfigurationOverrideFile = ""
+ DefineConstants = ""
+ DefineDebug = "true"
+ DefineTrace = "true"
+ DebugSymbols = "true"
+ IncrementalBuild = "true"
+ Optimize = "false"
+ OutputPath = "bin\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "1"
+ />
+ <Config
+ Name = "Release"
+ BaseAddress = "285212672"
+ ConfigurationOverrideFile = ""
+ DefineConstants = ""
+ DefineDebug = "false"
+ DefineTrace = "true"
+ DebugSymbols = "false"
+ IncrementalBuild = "false"
+ Optimize = "true"
+ OutputPath = "bin\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "1"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ />
+ <Reference
+ Name = "System.Drawing"
+ AssemblyName = "System.Drawing"
+ />
+ <Reference
+ Name = "System.Windows.Forms"
+ AssemblyName = "System.Windows.Forms"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ />
+ <Reference
+ Name = "stdole"
+ Guid = "{00020430-0000-0000-C000-000000000046}"
+ VersionMajor = "2"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "primary"
+ />
+ <Reference
+ Name = "wrapperaxLib"
+ Guid = "{3B756301-0075-4E40-8BE8-5A81DE2426B7}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "tlbimp"
+ />
+ <Reference
+ Name = "multipleaxLib"
+ Guid = "{05828915-AD1C-47AB-AB96-D6AD1E25F0E2}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "tlbimp"
+ />
+ <Reference
+ Name = "AxwrapperaxLib"
+ Guid = "{3B756301-0075-4E40-8BE8-5A81DE2426B7}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "aximp"
+ />
+ <Reference
+ Name = "AxmultipleaxLib"
+ Guid = "{05828915-AD1C-47AB-AB96-D6AD1E25F0E2}"
+ VersionMajor = "1"
+ VersionMinor = "0"
+ Lcid = "0"
+ WrapperTool = "aximp"
+ />
+ </References>
+ <Imports>
+ <Import Namespace = "Microsoft.VisualBasic" />
+ <Import Namespace = "System" />
+ <Import Namespace = "System.Collections" />
+ <Import Namespace = "System.Data" />
+ <Import Namespace = "System.Drawing" />
+ <Import Namespace = "System.Diagnostics" />
+ <Import Namespace = "System.Windows.Forms" />
+ </Imports>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "Form1.vb"
+ SubType = "Form"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Form1.resx"
+ DependentUpon = "Form1.vb"
+ BuildAction = "EmbeddedResource"
+ />
+ </Include>
+ </Files>
+ </VisualBasic>
+</VisualStudioProject>
+
diff --git a/examples/activeqt/dotnet/wrapper/app.csproj b/examples/activeqt/dotnet/wrapper/app.csproj
new file mode 100644
index 0000000..dce4bf0
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/app.csproj
@@ -0,0 +1,93 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.0.9466"
+ SchemaVersion = "1.0"
+ ProjectGuid = "{334C8F04-E034-4082-9380-43906DDE71AB}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "wrapper"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Exe"
+ RootNamespace = "wrapper"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "true"
+ Optimize = "false"
+ OutputPath = "bin\Debug\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ Optimize = "true"
+ OutputPath = "bin\Release\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "D:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.dll"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "D:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ HintPath = "D:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\System.XML.dll"
+ />
+ <Reference
+ Name = "lib"
+ AssemblyName = "lib"
+ HintPath = "lib\lib.dll"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "main.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/examples/activeqt/dotnet/wrapper/lib/lib.vcproj b/examples/activeqt/dotnet/wrapper/lib/lib.vcproj
new file mode 100644
index 0000000..f49c35d
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/lib.vcproj
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="lib"
+ ProjectGUID="{2E94A303-45A2-47AC-B87A-7C3519E9D6D8}"
+ Keyword="ManagedCProj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ CharacterSet="2"
+ ManagedExtensions="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtCore&quot;"
+ PreprocessorDefinitions="WIN32;_DEBUG"
+ IgnoreStandardIncludePath="FALSE"
+ MinimalRebuild="FALSE"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="1"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="QtCored4.lib"
+ OutputFile="lib.dll"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="$(QTDIR)/lib"
+ GenerateDebugInformation="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ CharacterSet="2"
+ ManagedExtensions="TRUE">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories="&quot;$(QTDIR)\include&quot;;&quot;$(QTDIR)\include\QtCore&quot;"
+ InlineFunctionExpansion="1"
+ PreprocessorDefinitions="WIN32;NDEBUG"
+ MinimalRebuild="FALSE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="QtCore4.lib"
+ OutputFile="$(OutDir)/lib.dll"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="$(QTDIR)/lib"
+ GenerateDebugInformation="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
+ <File
+ RelativePath="networker.cpp">
+ </File>
+ <File
+ RelativePath="tools.cpp">
+ </File>
+ <File
+ RelativePath="worker.cpp">
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc">
+ <File
+ RelativePath="networker.h">
+ </File>
+ <File
+ RelativePath="tools.h">
+ </File>
+ <File
+ RelativePath="worker.h">
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="$(QTDIR)\bin\moc.exe $(InputName).h -o moc_$(InputName).cpp"
+ Outputs="moc_$(InputName).cpp"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ CommandLine="$(QTDIR)\bin\moc.exe $(InputName).h -o moc_$(InputName).cpp"
+ Outputs="moc_$(InputName).cpp"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Generated MOC"
+ Filter="">
+ <File
+ RelativePath="moc_worker.cpp">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/examples/activeqt/dotnet/wrapper/lib/networker.cpp b/examples/activeqt/dotnet/wrapper/lib/networker.cpp
new file mode 100644
index 0000000..54e862b
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/networker.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "networker.h"
+#include "worker.h"
+#include "tools.h"
+
+netWorker::netWorker()
+{
+ workerObject = new Worker();
+}
+//! [0] //! [1]
+
+netWorker::~netWorker()
+{
+ delete workerObject;
+}
+//! [1] //! [2]
+
+String *netWorker::get_StatusString()
+{
+ return QStringToString(workerObject->statusString());
+}
+//! [2] //! [3]
+
+void netWorker::set_StatusString(String *string)
+{
+ workerObject->setStatusString(StringToQString(string));
+ __raise statusStringChanged(string);
+}
+//! [3]
diff --git a/examples/activeqt/dotnet/wrapper/lib/networker.h b/examples/activeqt/dotnet/wrapper/lib/networker.h
new file mode 100644
index 0000000..583c6c4
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/networker.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+// lib.h
+
+#pragma once
+
+#using <mscorlib.dll>
+using namespace System;
+
+//! [0]
+class Worker;
+
+// .NET class
+public __gc class netWorker
+{
+public:
+ netWorker();
+ ~netWorker();
+
+ __property String *get_StatusString();
+ __property void set_StatusString(String *string);
+
+ __event void statusStringChanged(String *args);
+
+private:
+ Worker *workerObject;
+};
+//! [0]
diff --git a/examples/activeqt/dotnet/wrapper/lib/tools.cpp b/examples/activeqt/dotnet/wrapper/lib/tools.cpp
new file mode 100644
index 0000000..aa67aea
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/tools.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QString>
+
+#using <mscorlib.dll>
+#include <vcclr.h>
+
+using namespace System;
+
+String *QStringToString(const QString &qstring)
+{
+ return new String((const wchar_t *)qstring.utf16());
+}
+//! [0] //! [1]
+
+QString StringToQString(String *string)
+{
+ const wchar_t __pin *chars = PtrToStringChars(string);
+ return QString::fromUtf16((const ushort *)chars);
+}
+//! [1]
diff --git a/examples/activeqt/dotnet/wrapper/lib/tools.h b/examples/activeqt/dotnet/wrapper/lib/tools.h
new file mode 100644
index 0000000..8569eca
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/tools.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TOOLS_H
+#define TOOLS_H
+
+#using <mscorlib.dll>
+
+QT_BEGIN_NAMESPACE
+class QString;
+QT_END_NAMESPACE
+
+System::String *QStringToString(const QString &qstring);
+QString StringToQString(System::String *string);
+
+#endif // TOOLS_H
diff --git a/examples/activeqt/dotnet/wrapper/lib/worker.cpp b/examples/activeqt/dotnet/wrapper/lib/worker.cpp
new file mode 100644
index 0000000..695db57
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/worker.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "worker.h"
+#include "tools.h"
+
+Worker::Worker()
+{
+ status = "Idle";
+}
+
+void Worker::setStatusString(const QString &string)
+{
+ status = string;
+ emit statusStringChanged(status);
+}
+
+QString Worker::statusString() const
+{
+ return status;
+}
diff --git a/examples/activeqt/dotnet/wrapper/lib/worker.h b/examples/activeqt/dotnet/wrapper/lib/worker.h
new file mode 100644
index 0000000..8bab9ed
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/lib/worker.h
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WORKER_H
+#define WORKER_H
+
+#include <QObject>
+
+// native Qt/C++ class
+//! [0]
+class Worker : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QString statusString READ statusString WRITE setStatusString)
+public:
+ Worker();
+
+ QString statusString() const;
+
+public slots:
+ void setStatusString(const QString &string);
+
+signals:
+ void statusStringChanged(const QString &string);
+
+private:
+ QString status;
+};
+//! [0]
+
+#endif // WORKER_H
diff --git a/examples/activeqt/dotnet/wrapper/main.cs b/examples/activeqt/dotnet/wrapper/main.cs
new file mode 100644
index 0000000..1d43029
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/main.cs
@@ -0,0 +1,40 @@
+//! [0]
+using System;
+
+namespace WrapperApp
+{
+ class App
+ {
+ void Run()
+ {
+ netWorker worker = new netWorker();
+
+ worker.statusStringChanged += new netWorker.__Delegate_statusStringChanged(onStatusStringChanged);
+
+ System.Console.Out.WriteLine(worker.StatusString);
+
+ System.Console.Out.WriteLine("Working cycle begins...");
+ worker.StatusString = "Working";
+ worker.StatusString = "Lunch Break";
+ worker.StatusString = "Working";
+ worker.StatusString = "Idle";
+ System.Console.Out.WriteLine("Working cycle ends...");
+ }
+
+ private void onStatusStringChanged(string str)
+ {
+ System.Console.Out.WriteLine(str);
+ }
+
+ [STAThread]
+//! [0] //! [1]
+ static void Main(string[] args)
+ {
+ App app = new App();
+ app.Run();
+ }
+//! [1] //! [2]
+ }
+//! [2] //! [3]
+}
+//! [3]
diff --git a/examples/activeqt/dotnet/wrapper/wrapper.sln b/examples/activeqt/dotnet/wrapper/wrapper.sln
new file mode 100644
index 0000000..e25e6bd
--- /dev/null
+++ b/examples/activeqt/dotnet/wrapper/wrapper.sln
@@ -0,0 +1,28 @@
+Microsoft Visual Studio Solution File, Format Version 7.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "app", "app.csproj", "{334C8F04-E034-4082-9380-43906DDE71AB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib", "lib\lib.vcproj", "{2E94A303-45A2-47AC-B87A-7C3519E9D6D8}"
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ ConfigName.0 = Debug
+ ConfigName.1 = Release
+ EndGlobalSection
+ GlobalSection(ProjectDependencies) = postSolution
+ {334C8F04-E034-4082-9380-43906DDE71AB}.0 = {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {334C8F04-E034-4082-9380-43906DDE71AB}.Debug.ActiveCfg = Debug|.NET
+ {334C8F04-E034-4082-9380-43906DDE71AB}.Debug.Build.0 = Debug|.NET
+ {334C8F04-E034-4082-9380-43906DDE71AB}.Release.ActiveCfg = Release|.NET
+ {334C8F04-E034-4082-9380-43906DDE71AB}.Release.Build.0 = Release|.NET
+ {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}.Debug.ActiveCfg = Debug|Win32
+ {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}.Debug.Build.0 = Debug|Win32
+ {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}.Release.ActiveCfg = Release|Win32
+ {2E94A303-45A2-47AC-B87A-7C3519E9D6D8}.Release.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/examples/activeqt/hierarchy/hierarchy.inf b/examples/activeqt/hierarchy/hierarchy.inf
new file mode 100644
index 0000000..cb7e90f
--- /dev/null
+++ b/examples/activeqt/hierarchy/hierarchy.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ hierarchyax.dll=hierarchyax.dll
+ [hierarchyax.dll]
+ file-win32-x86=thiscab
+ clsid={d574a747-8016-46db-a07c-b2b4854ee75c}
+ RegisterServer=yes
diff --git a/examples/activeqt/hierarchy/hierarchy.pro b/examples/activeqt/hierarchy/hierarchy.pro
new file mode 100644
index 0000000..abe5f1b
--- /dev/null
+++ b/examples/activeqt/hierarchy/hierarchy.pro
@@ -0,0 +1,16 @@
+TEMPLATE = lib
+TARGET = hierarchyax
+
+CONFIG += qt warn_off qaxserver dll
+contains(CONFIG, static):DEFINES += QT_NODLL
+
+SOURCES = objects.cpp main.cpp
+HEADERS = objects.h
+RC_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.rc
+DEF_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.def
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/hierarchy
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hierarchy.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/hierarchy
+INSTALLS += target sources
diff --git a/examples/activeqt/hierarchy/main.cpp b/examples/activeqt/hierarchy/main.cpp
new file mode 100644
index 0000000..e817635
--- /dev/null
+++ b/examples/activeqt/hierarchy/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "objects.h"
+#include <QAxFactory>
+
+QAXFACTORY_BEGIN("{9e626211-be62-4d18-9483-9419358fbb03}", "{75c276de-1df5-451f-a004-e4fa1a587df1}")
+ QAXCLASS(QParentWidget)
+ QAXTYPE(QSubWidget)
+QAXFACTORY_END()
+//! [0]
diff --git a/examples/activeqt/hierarchy/objects.cpp b/examples/activeqt/hierarchy/objects.cpp
new file mode 100644
index 0000000..c3928b5
--- /dev/null
+++ b/examples/activeqt/hierarchy/objects.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "objects.h"
+#include <QLayout>
+#include <QPainter>
+
+/* Implementation of QParentWidget */
+//! [0]
+QParentWidget::QParentWidget(QWidget *parent)
+: QWidget(parent)
+{
+ vbox = new QVBoxLayout(this);
+}
+
+//! [0] //! [1]
+void QParentWidget::createSubWidget(const QString &name)
+{
+ QSubWidget *sw = new QSubWidget(this, name);
+ vbox->addWidget(sw);
+ sw->setLabel(name);
+ sw->show();
+}
+
+//! [1] //! [2]
+QSubWidget *QParentWidget::subWidget(const QString &name)
+{
+ return qFindChild<QSubWidget*>(this, name);
+}
+
+//! [2]
+QSize QParentWidget::sizeHint() const
+{
+ return QWidget::sizeHint().expandedTo(QSize(100, 100));
+}
+
+/* Implementation of QSubWidget */
+//! [3]
+QSubWidget::QSubWidget(QWidget *parent, const QString &name)
+: QWidget(parent)
+{
+ setObjectName(name);
+}
+
+void QSubWidget::setLabel(const QString &text)
+{
+ lbl = text;
+ setObjectName(text);
+ update();
+}
+
+QString QSubWidget::label() const
+{
+ return lbl;
+}
+
+QSize QSubWidget::sizeHint() const
+{
+ QFontMetrics fm(font());
+ return QSize(fm.width(lbl), fm.height());
+}
+
+void QSubWidget::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+ painter.setPen(palette().text().color());
+ painter.drawText(rect(), Qt::AlignCenter, lbl);
+//! [3] //! [4]
+}
+//! [4]
diff --git a/examples/activeqt/hierarchy/objects.h b/examples/activeqt/hierarchy/objects.h
new file mode 100644
index 0000000..e719e6d
--- /dev/null
+++ b/examples/activeqt/hierarchy/objects.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef OBJECTS_H
+#define OBJECTS_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QVBoxLayout;
+QT_END_NAMESPACE
+class QSubWidget;
+
+//! [0]
+class QParentWidget : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("ClassID", "{d574a747-8016-46db-a07c-b2b4854ee75c}");
+ Q_CLASSINFO("InterfaceID", "{4a30719d-d9c2-4659-9d16-67378209f822}");
+ Q_CLASSINFO("EventsID", "{4a30719d-d9c2-4659-9d16-67378209f823}");
+public:
+ QParentWidget(QWidget *parent = 0);
+
+ QSize sizeHint() const;
+
+public slots:
+ void createSubWidget( const QString &name );
+
+ QSubWidget *subWidget( const QString &name );
+
+private:
+ QVBoxLayout *vbox;
+};
+//! [0]
+
+//! [1]
+class QSubWidget : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY( QString label READ label WRITE setLabel )
+
+ Q_CLASSINFO("ClassID", "{850652f4-8f71-4f69-b745-bce241ccdc30}");
+ Q_CLASSINFO("InterfaceID", "{2d76cc2f-3488-417a-83d6-debff88b3c3f}");
+ Q_CLASSINFO("ToSuperClass", "QSubWidget");
+
+public:
+ QSubWidget(QWidget *parent = 0, const QString &name = QString());
+
+ void setLabel( const QString &text );
+ QString label() const;
+
+ QSize sizeHint() const;
+
+protected:
+ void paintEvent( QPaintEvent *e );
+
+private:
+ QString lbl;
+};
+//! [1]
+
+#endif // OBJECTS_H
diff --git a/examples/activeqt/menus/fileopen.xpm b/examples/activeqt/menus/fileopen.xpm
new file mode 100644
index 0000000..880417e
--- /dev/null
+++ b/examples/activeqt/menus/fileopen.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *fileopen[] = {
+" 16 13 5 1",
+". c #040404",
+"# c #808304",
+"a c None",
+"b c #f3f704",
+"c c #f3f7f3",
+"aaaaaaaaa...aaaa",
+"aaaaaaaa.aaa.a.a",
+"aaaaaaaaaaaaa..a",
+"a...aaaaaaaa...a",
+".bcb.......aaaaa",
+".cbcbcbcbc.aaaaa",
+".bcbcbcbcb.aaaaa",
+".cbcb...........",
+".bcb.#########.a",
+".cb.#########.aa",
+".b.#########.aaa",
+"..#########.aaaa",
+"...........aaaaa"
+};
diff --git a/examples/activeqt/menus/filesave.xpm b/examples/activeqt/menus/filesave.xpm
new file mode 100644
index 0000000..bd6870f
--- /dev/null
+++ b/examples/activeqt/menus/filesave.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *filesave[] = {
+" 14 14 4 1",
+". c #040404",
+"# c #808304",
+"a c #bfc2bf",
+"b c None",
+"..............",
+".#.aaaaaaaa.a.",
+".#.aaaaaaaa...",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".##........##.",
+".############.",
+".##.........#.",
+".##......aa.#.",
+".##......aa.#.",
+".##......aa.#.",
+"b............."
+};
diff --git a/examples/activeqt/menus/main.cpp b/examples/activeqt/menus/main.cpp
new file mode 100644
index 0000000..56f8a9f
--- /dev/null
+++ b/examples/activeqt/menus/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "menus.h"
+#include <QApplication>
+#include <QAxFactory>
+
+QAXFACTORY_DEFAULT(QMenus,
+ "{4dc3f340-a6f7-44e4-a79b-3e9217695fbd}",
+ "{9ee49617-7d5c-441a-b833-4b068d40d751}",
+ "{13eca64b-ee2a-4f3c-aa04-5d9d975979a7}",
+ "{ce947ee3-0403-4fdc-895a-4fe779394b46}",
+ "{8de435ce-8d2a-46ac-b3b3-cb800d0847c7}");
+
+int main( int argc, char **argv )
+{
+ QApplication a( argc, argv );
+
+ QWidget *window = 0;
+ if ( !QAxFactory::isServer() ) {
+ window = new QMenus();
+ window->show();
+ }
+
+ return a.exec();
+}
diff --git a/examples/activeqt/menus/menus.cpp b/examples/activeqt/menus/menus.cpp
new file mode 100644
index 0000000..27f064e
--- /dev/null
+++ b/examples/activeqt/menus/menus.cpp
@@ -0,0 +1,178 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "menus.h"
+#include <QAction>
+#include <QAxFactory>
+#include <QMenuBar>
+#include <QMessageBox>
+#include <QTextEdit>
+#include <QPixmap>
+
+#include "fileopen.xpm"
+#include "filesave.xpm"
+
+QMenus::QMenus(QWidget *parent)
+ : QMainWindow(parent, 0) // QMainWindow's default flag is WType_TopLevel
+{
+ QAction *action;
+
+ QMenu *file = new QMenu(this);
+
+ action = new QAction(QPixmap((const char**)fileopen), "&Open", this);
+ action->setShortcut(tr("CTRL+O"));
+ connect(action, SIGNAL(triggered()), this, SLOT(fileOpen()));
+ file->addAction(action);
+
+ action = new QAction(QPixmap((const char**)filesave),"&Save", this);
+ action->setShortcut(tr("CTRL+S"));
+ connect(action, SIGNAL(triggered()), this, SLOT(fileSave()));
+ file->addAction(action);
+
+ QMenu *edit = new QMenu(this);
+
+ action = new QAction("&Normal", this);
+ action->setShortcut(tr("CTRL+N"));
+ action->setToolTip("Normal");
+ action->setStatusTip("Toggles Normal");
+ action->setCheckable(true);
+ connect(action, SIGNAL(triggered()), this, SLOT(editNormal()));
+ edit->addAction(action);
+
+ action = new QAction("&Bold", this);
+ action->setShortcut(tr("CTRL+B"));
+ action->setCheckable(true);
+ connect(action, SIGNAL(triggered()), this, SLOT(editBold()));
+ edit->addAction(action);
+
+ action = new QAction("&Underline", this);
+ action->setShortcut(tr("CTRL+U"));
+ action->setCheckable(true);
+ connect(action, SIGNAL(triggered()), this, SLOT(editUnderline()));
+ edit->addAction(action);
+
+ QMenu *advanced = new QMenu(this);
+ action = new QAction("&Font...", this);
+ connect(action, SIGNAL(triggered()), this, SLOT(editAdvancedFont()));
+ advanced->addAction(action);
+
+ action = new QAction("&Style...", this);
+ connect(action, SIGNAL(triggered()), this, SLOT(editAdvancedStyle()));
+ advanced->addAction(action);
+
+ edit->addMenu(advanced)->setText("&Advanced");
+
+ edit->addSeparator();
+
+ action = new QAction("Una&vailable", this);
+ action->setShortcut(tr("CTRL+V"));
+ action->setCheckable(true);
+ action->setEnabled(false);
+ connect(action, SIGNAL(triggered()), this, SLOT(editUnderline()));
+ edit->addAction(action);
+
+ QMenu *help = new QMenu(this);
+
+ action = new QAction("&About...", this);
+ action->setShortcut(tr("F1"));
+ connect(action, SIGNAL(triggered()), this, SLOT(helpAbout()));
+ help->addAction(action);
+
+ action = new QAction("&About Qt...", this);
+ connect(action, SIGNAL(triggered()), this, SLOT(helpAboutQt()));
+ help->addAction(action);
+
+ if (!QAxFactory::isServer())
+ menuBar()->addMenu(file)->setText("&File");
+ menuBar()->addMenu(edit)->setText("&Edit");
+ menuBar()->addMenu(help)->setText("&Help");
+
+ editor = new QTextEdit(this);
+ setCentralWidget(editor);
+
+ statusBar();
+}
+
+void QMenus::fileOpen()
+{
+ editor->append("File Open selected.");
+}
+
+void QMenus::fileSave()
+{
+ editor->append("File Save selected.");
+}
+
+void QMenus::editNormal()
+{
+ editor->append("Edit Normal selected.");
+}
+
+void QMenus::editBold()
+{
+ editor->append("Edit Bold selected.");
+}
+
+void QMenus::editUnderline()
+{
+ editor->append("Edit Underline selected.");
+}
+
+void QMenus::editAdvancedFont()
+{
+ editor->append("Edit Advanced Font selected.");
+}
+
+void QMenus::editAdvancedStyle()
+{
+ editor->append("Edit Advanced Style selected.");
+}
+
+void QMenus::helpAbout()
+{
+ QMessageBox::about(this, "About QMenus",
+ "This example implements an in-place ActiveX control with menus and status messages.");
+}
+
+void QMenus::helpAboutQt()
+{
+ QMessageBox::aboutQt(this);
+}
diff --git a/examples/activeqt/menus/menus.h b/examples/activeqt/menus/menus.h
new file mode 100644
index 0000000..c961cd5
--- /dev/null
+++ b/examples/activeqt/menus/menus.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MENUS_H
+#define MENUS_H
+
+#include <QMainWindow>
+
+QT_BEGIN_NAMESPACE
+class QTextEdit;
+QT_END_NAMESPACE
+
+class QMenus : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ QMenus(QWidget *parent = 0);
+
+public slots:
+ void fileOpen();
+ void fileSave();
+
+ void editNormal();
+ void editBold();
+ void editUnderline();
+
+ void editAdvancedFont();
+ void editAdvancedStyle();
+
+ void helpAbout();
+ void helpAboutQt();
+
+private:
+ QTextEdit *editor;
+};
+
+#endif // MENUS_H
diff --git a/examples/activeqt/menus/menus.inf b/examples/activeqt/menus/menus.inf
new file mode 100644
index 0000000..f97efe8
--- /dev/null
+++ b/examples/activeqt/menus/menus.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ menusax.exe=menusax.exe
+ [menusax.exe]
+ file-win32-x86=thiscab
+ clsid={4dc3f340-a6f7-44e4-a79b-3e9217695fbd}
+ RegisterServer=yes
diff --git a/examples/activeqt/menus/menus.pro b/examples/activeqt/menus/menus.pro
new file mode 100644
index 0000000..c962b6b
--- /dev/null
+++ b/examples/activeqt/menus/menus.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+TARGET = menusax
+
+CONFIG += qt warn_off qaxserver
+
+SOURCES = main.cpp menus.cpp
+HEADERS = menus.h
+RC_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.rc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/menus
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS menus.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/menus
+INSTALLS += target sources
diff --git a/examples/activeqt/multiple/ax1.h b/examples/activeqt/multiple/ax1.h
new file mode 100644
index 0000000..a53e4f4
--- /dev/null
+++ b/examples/activeqt/multiple/ax1.h
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef AX1_H
+#define AX1_H
+
+#include <QWidget>
+#include <QPainter>
+
+//! [0]
+class QAxWidget1 : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("ClassID", "{1D9928BD-4453-4bdd-903D-E525ED17FDE5}")
+ Q_CLASSINFO("InterfaceID", "{99F6860E-2C5A-42ec-87F2-43396F4BE389}")
+ Q_CLASSINFO("EventsID", "{0A3E9F27-E4F1-45bb-9E47-63099BCCD0E3}")
+
+ Q_PROPERTY(QColor fillColor READ fillColor WRITE setFillColor)
+public:
+ QAxWidget1(QWidget *parent = 0)
+ : QWidget(parent), fill_color(Qt::red)
+ {
+ }
+
+ QColor fillColor() const
+ {
+ return fill_color;
+ }
+ void setFillColor(const QColor &fc)
+ {
+ fill_color = fc;
+ repaint();
+ }
+
+protected:
+ void paintEvent(QPaintEvent *e)
+ {
+ QPainter paint(this);
+ QRect r = rect();
+ r.adjust(10, 10, -10, -10);
+ paint.fillRect(r, fill_color);
+ }
+
+private:
+ QColor fill_color;
+};
+//! [0]
+
+#endif // AX1_H
diff --git a/examples/activeqt/multiple/ax2.h b/examples/activeqt/multiple/ax2.h
new file mode 100644
index 0000000..b6b50f3
--- /dev/null
+++ b/examples/activeqt/multiple/ax2.h
@@ -0,0 +1,94 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef AX2_H
+#define AX2_H
+
+#include <QWidget>
+#include <QPainter>
+
+//! [0]
+class QAxWidget2 : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("ClassID", "{58139D56-6BE9-4b17-937D-1B1EDEDD5B71}")
+ Q_CLASSINFO("InterfaceID", "{B66280AB-08CC-4dcc-924F-58E6D7975B7D}")
+ Q_CLASSINFO("EventsID", "{D72BACBA-03C4-4480-B4BB-DE4FE3AA14A0}")
+ Q_CLASSINFO("ToSuperClass", "QAxWidget2")
+ Q_CLASSINFO("StockEvents", "yes")
+ Q_CLASSINFO("Insertable", "yes")
+
+ Q_PROPERTY( int lineWidth READ lineWidth WRITE setLineWidth )
+public:
+ QAxWidget2(QWidget *parent = 0)
+ : QWidget(parent), line_width( 1 )
+ {
+ }
+
+ int lineWidth() const
+ {
+ return line_width;
+ }
+ void setLineWidth( int lw )
+ {
+ line_width = lw;
+ repaint();
+ }
+
+protected:
+ void paintEvent( QPaintEvent *e )
+ {
+ QPainter paint( this );
+ QPen pen = paint.pen();
+ pen.setWidth( line_width );
+ paint.setPen( pen );
+
+ QRect r = rect();
+ r.adjust( 10, 10, -10, -10 );
+ paint.drawEllipse( r );
+ }
+
+private:
+ int line_width;
+};
+//! [0]
+
+#endif // AX2_H
diff --git a/examples/activeqt/multiple/main.cpp b/examples/activeqt/multiple/main.cpp
new file mode 100644
index 0000000..612292e
--- /dev/null
+++ b/examples/activeqt/multiple/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "ax1.h"
+#include "ax2.h"
+#include <QAxFactory>
+
+QT_USE_NAMESPACE
+
+QAXFACTORY_BEGIN("{98DE28B6-6CD3-4e08-B9FA-3D1DB43F1D2F}", "{05828915-AD1C-47ab-AB96-D6AD1E25F0E2}")
+ QAXCLASS(QAxWidget1)
+ QAXCLASS(QAxWidget2)
+QAXFACTORY_END()
+//! [0]
diff --git a/examples/activeqt/multiple/multiple.inf b/examples/activeqt/multiple/multiple.inf
new file mode 100644
index 0000000..7f6be76
--- /dev/null
+++ b/examples/activeqt/multiple/multiple.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ multipleax.dll=multipleax.dll
+ [multipleax.dll]
+ file-win32-x86=thiscab
+ clsid={1D9928BD-4453-4bdd-903D-E525ED17FDE5}
+ RegisterServer=yes
diff --git a/examples/activeqt/multiple/multiple.pro b/examples/activeqt/multiple/multiple.pro
new file mode 100644
index 0000000..7b86950
--- /dev/null
+++ b/examples/activeqt/multiple/multiple.pro
@@ -0,0 +1,16 @@
+TEMPLATE = lib
+TARGET = multipleax
+
+CONFIG += qt warn_off qaxserver dll
+contains(CONFIG, static):DEFINES += QT_NODLL
+
+SOURCES = main.cpp
+HEADERS = ax1.h ax2.h
+RC_FILE = multipleax.rc
+DEF_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.def
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/multiple
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS multiple.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/multiple
+INSTALLS += target sources
diff --git a/examples/activeqt/multiple/multipleax.rc b/examples/activeqt/multiple/multipleax.rc
new file mode 100644
index 0000000..1809e0d
--- /dev/null
+++ b/examples/activeqt/multiple/multipleax.rc
@@ -0,0 +1,32 @@
+#include "winver.h"
+
+1 TYPELIB "multipleax.rc"
+1 ICON DISCARDABLE "..\\..\\..\\src\\activeqt\\control\\qaxserver.ico"
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,0
+ PRODUCTVERSION 1,0,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEOS 0x00040000L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "Nokia Corporation and/or its subsidiary(-ies)"
+ VALUE "FileDescription", "Multiple Example (ActiveQt)"
+ VALUE "FileVersion", "1.0.0.0"
+ VALUE "LegalCopyright", "Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)."
+ VALUE "InternalName", "multipleax.dll"
+ VALUE "OriginalFilename", "multipleax.dll"
+ VALUE "ProductName", "Multiple Example (ActiveQt)"
+ VALUE "ProductVersion", "1.0.0.0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
diff --git a/examples/activeqt/opengl/glbox.cpp b/examples/activeqt/opengl/glbox.cpp
new file mode 100644
index 0000000..4cb015b
--- /dev/null
+++ b/examples/activeqt/opengl/glbox.cpp
@@ -0,0 +1,250 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** This is a simple QGLWidget displaying an openGL wireframe box
+**
+** The OpenGL code is mostly borrowed from Brian Pauls "spin" example
+** in the Mesa distribution
+**
+****************************************************************************/
+
+#include "glbox.h"
+#include <QAxAggregated>
+#include <QUuid>
+//! [0]
+#include <objsafe.h>
+//! [0]
+
+#if defined(Q_CC_MSVC)
+#pragma warning(disable:4305) // init: truncation from const double to float
+#endif
+
+/*!
+ Create a GLBox widget
+*/
+
+GLBox::GLBox( QWidget* parent, const char* name )
+ : QGLWidget( parent )
+{
+ xRot = yRot = zRot = 0.0; // default object rotation
+ scale = 1.25; // default object scale
+ object = 0;
+}
+
+
+/*!
+ Release allocated resources
+*/
+
+GLBox::~GLBox()
+{
+ makeCurrent();
+ glDeleteLists( object, 1 );
+}
+
+
+/*!
+ Paint the box. The actual openGL commands for drawing the box are
+ performed here.
+*/
+
+void GLBox::paintGL()
+{
+ glClear( GL_COLOR_BUFFER_BIT );
+
+ glLoadIdentity();
+ glTranslatef( 0.0, 0.0, -10.0 );
+ glScalef( scale, scale, scale );
+
+ glRotatef( xRot, 1.0, 0.0, 0.0 );
+ glRotatef( yRot, 0.0, 1.0, 0.0 );
+ glRotatef( zRot, 0.0, 0.0, 1.0 );
+
+ glCallList( object );
+}
+
+
+/*!
+ Set up the OpenGL rendering state, and define display list
+*/
+
+void GLBox::initializeGL()
+{
+ qglClearColor(Qt::black); // Let OpenGL clear to black
+ object = makeObject(); // Generate an OpenGL display list
+ glShadeModel( GL_FLAT );
+}
+
+
+
+/*!
+ Set up the OpenGL view port, matrix mode, etc.
+*/
+
+void GLBox::resizeGL( int w, int h )
+{
+ glViewport( 0, 0, (GLint)w, (GLint)h );
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ glFrustum( -1.0, 1.0, -1.0, 1.0, 5.0, 15.0 );
+ glMatrixMode( GL_MODELVIEW );
+}
+
+
+/*!
+ Generate an OpenGL display list for the object to be shown, i.e. the box
+*/
+
+GLuint GLBox::makeObject()
+{
+ GLuint list;
+
+ list = glGenLists( 1 );
+
+ glNewList( list, GL_COMPILE );
+
+ qglColor(Qt::white); // Shorthand for glColor3f or glIndex
+
+ glLineWidth( 2.0 );
+
+ glBegin( GL_LINE_LOOP );
+ glVertex3f( 1.0, 0.5, -0.4 );
+ glVertex3f( 1.0, -0.5, -0.4 );
+ glVertex3f( -1.0, -0.5, -0.4 );
+ glVertex3f( -1.0, 0.5, -0.4 );
+ glEnd();
+
+ glBegin( GL_LINE_LOOP );
+ glVertex3f( 1.0, 0.5, 0.4 );
+ glVertex3f( 1.0, -0.5, 0.4 );
+ glVertex3f( -1.0, -0.5, 0.4 );
+ glVertex3f( -1.0, 0.5, 0.4 );
+ glEnd();
+
+ glBegin( GL_LINES );
+ glVertex3f( 1.0, 0.5, -0.4 ); glVertex3f( 1.0, 0.5, 0.4 );
+ glVertex3f( 1.0, -0.5, -0.4 ); glVertex3f( 1.0, -0.5, 0.4 );
+ glVertex3f( -1.0, -0.5, -0.4 ); glVertex3f( -1.0, -0.5, 0.4 );
+ glVertex3f( -1.0, 0.5, -0.4 ); glVertex3f( -1.0, 0.5, 0.4 );
+ glEnd();
+
+ glEndList();
+
+ return list;
+}
+
+
+/*!
+ Set the rotation angle of the object to \e degrees around the X axis.
+*/
+
+void GLBox::setXRotation( int degrees )
+{
+ xRot = (GLfloat)(degrees % 360);
+ updateGL();
+}
+
+
+/*!
+ Set the rotation angle of the object to \e degrees around the Y axis.
+*/
+
+void GLBox::setYRotation( int degrees )
+{
+ yRot = (GLfloat)(degrees % 360);
+ updateGL();
+}
+
+
+/*!
+ Set the rotation angle of the object to \e degrees around the Z axis.
+*/
+
+void GLBox::setZRotation( int degrees )
+{
+ zRot = (GLfloat)(degrees % 360);
+ updateGL();
+}
+
+//! [1]
+class ObjectSafetyImpl : public QAxAggregated,
+ public IObjectSafety
+{
+public:
+//! [1] //! [2]
+ ObjectSafetyImpl() {}
+
+ long queryInterface( const QUuid &iid, void **iface )
+ {
+ *iface = 0;
+ if ( iid == IID_IObjectSafety )
+ *iface = (IObjectSafety*)this;
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+ }
+
+//! [2] //! [3]
+ QAXAGG_IUNKNOWN;
+
+//! [3] //! [4]
+ HRESULT WINAPI GetInterfaceSafetyOptions( REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions )
+ {
+ *pdwSupportedOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+ *pdwEnabledOptions = INTERFACESAFE_FOR_UNTRUSTED_DATA | INTERFACESAFE_FOR_UNTRUSTED_CALLER;
+ return S_OK;
+ }
+ HRESULT WINAPI SetInterfaceSafetyOptions( REFIID riid, DWORD pdwSupportedOptions, DWORD pdwEnabledOptions )
+ {
+ return S_OK;
+ }
+};
+//! [4] //! [5]
+
+QAxAggregated *GLBox::createAggregate()
+{
+ return new ObjectSafetyImpl();
+}
+//! [5]
diff --git a/examples/activeqt/opengl/glbox.h b/examples/activeqt/opengl/glbox.h
new file mode 100644
index 0000000..3ebf818
--- /dev/null
+++ b/examples/activeqt/opengl/glbox.h
@@ -0,0 +1,90 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** This is a simple QGLWidget displaying an openGL wireframe box
+**
+****************************************************************************/
+
+#ifndef GLBOX_H
+#define GLBOX_H
+
+#include <QtOpenGL>
+//! [0]
+#include <QAxBindable>
+
+class GLBox : public QGLWidget,
+ public QAxBindable
+{
+ Q_OBJECT
+//! [0] //! [1]
+
+public:
+
+ GLBox( QWidget* parent, const char* name = 0 );
+ ~GLBox();
+
+ QAxAggregated *createAggregate();
+
+public slots:
+
+ void setXRotation( int degrees );
+//! [1]
+ void setYRotation( int degrees );
+ void setZRotation( int degrees );
+
+protected:
+
+ void initializeGL();
+ void paintGL();
+ void resizeGL( int w, int h );
+
+ virtual GLuint makeObject();
+
+private:
+
+ GLuint object;
+ GLfloat xRot, yRot, zRot, scale;
+
+};
+
+#endif // GLBOX_H
diff --git a/examples/activeqt/opengl/globjwin.cpp b/examples/activeqt/opengl/globjwin.cpp
new file mode 100644
index 0000000..3ac5d78
--- /dev/null
+++ b/examples/activeqt/opengl/globjwin.cpp
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "globjwin.h"
+#include "glbox.h"
+#include <QPushButton>
+#include <QSlider>
+#include <QLayout>
+#include <QFrame>
+#include <QMenuBar>
+#include <QMenu>
+#include <QApplication>
+
+
+GLObjectWindow::GLObjectWindow(QWidget* parent)
+ : QWidget(parent)
+{
+
+ // Create a menu
+ QMenu *file = new QMenu( this );
+ file->addAction( "Exit", qApp, SLOT(quit())/*, CTRL+Key_Q*/);
+
+ // Create a menu bar
+ QMenuBar *m = new QMenuBar( this );
+ m->addMenu(file)->setText("&File");
+
+ // Create a nice frame to put around the OpenGL widget
+ QFrame* f = new QFrame(this);
+ f->setFrameStyle( QFrame::Sunken | QFrame::Panel );
+ f->setLineWidth( 2 );
+
+ // Create our OpenGL widget
+ GLBox* c = new GLBox( f, "glbox");
+
+ // Create the three sliders; one for each rotation axis
+ QSlider* x = new QSlider(Qt::Vertical, this);
+ x->setMaximum(360);
+ x->setPageStep(60);
+ x->setTickPosition( QSlider::TicksLeft );
+ QObject::connect( x, SIGNAL(valueChanged(int)),c,SLOT(setXRotation(int)) );
+
+ QSlider* y = new QSlider(Qt::Vertical, this);
+ y->setMaximum(360);
+ y->setPageStep(60);
+ y->setTickPosition( QSlider::TicksLeft );
+ QObject::connect( y, SIGNAL(valueChanged(int)),c,SLOT(setYRotation(int)) );
+
+ QSlider* z = new QSlider(Qt::Vertical, this);
+ z->setMaximum(360);
+ z->setPageStep(60);
+ z->setTickPosition( QSlider::TicksLeft );
+ QObject::connect( z, SIGNAL(valueChanged(int)),c,SLOT(setZRotation(int)) );
+
+ // Now that we have all the widgets, put them into a nice layout
+
+ // Top level layout, puts the sliders to the left of the frame/GL widget
+ QHBoxLayout* hlayout = new QHBoxLayout(this);
+
+ // Put the sliders on top of each other
+ QVBoxLayout* vlayout = new QVBoxLayout();
+ vlayout->addWidget( x );
+ vlayout->addWidget( y );
+ vlayout->addWidget( z );
+
+ // Put the GL widget inside the frame
+ QHBoxLayout* flayout = new QHBoxLayout(f);
+ flayout->setMargin(0);
+ flayout->addWidget( c, 1 );
+
+ hlayout->setMenuBar( m );
+ hlayout->addLayout( vlayout );
+ hlayout->addWidget( f, 1 );
+}
diff --git a/examples/activeqt/opengl/globjwin.h b/examples/activeqt/opengl/globjwin.h
new file mode 100644
index 0000000..d707aa6
--- /dev/null
+++ b/examples/activeqt/opengl/globjwin.h
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/****************************************************************************
+**
+** The GLObjectWindow contains a GLBox and three sliders connected to
+** the GLBox's rotation slots.
+**
+****************************************************************************/
+
+#ifndef GLOBJWIN_H
+#define GLOBJWIN_H
+
+#include <qwidget.h>
+
+class GLObjectWindow : public QWidget
+{
+ Q_OBJECT
+
+public:
+ GLObjectWindow(QWidget *parent = 0);
+};
+
+#endif
diff --git a/examples/activeqt/opengl/main.cpp b/examples/activeqt/opengl/main.cpp
new file mode 100644
index 0000000..469bdfb
--- /dev/null
+++ b/examples/activeqt/opengl/main.cpp
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//
+// Qt OpenGL example: Box
+//
+// A small example showing how a GLWidget can be used just as any Qt widget
+//
+// File: main.cpp
+//
+// The main() function
+//
+
+#include "globjwin.h"
+#include "glbox.h"
+#include <QApplication>
+#include <QtOpenGL>
+//! [0]
+#include <QAxFactory>
+
+QAXFACTORY_DEFAULT( GLBox,
+ "{5fd9c22e-ed45-43fa-ba13-1530bb6b03e0}",
+ "{33b051af-bb25-47cf-a390-5cfd2987d26a}",
+ "{8c996c29-eafa-46ac-a6f9-901951e765b5}",
+ "{2c3c183a-eeda-41a4-896e-3d9c12c3577d}",
+ "{83e16271-6480-45d5-aaf1-3f40b7661ae4}"
+ )
+
+//! [0] //! [1]
+/*
+ The main program is here.
+*/
+
+int main( int argc, char **argv )
+{
+ QApplication::setColorSpec( QApplication::CustomColor );
+ QApplication a(argc,argv);
+
+ if ( !QGLFormat::hasOpenGL() ) {
+ qWarning( "This system has no OpenGL support. Exiting." );
+ return -1;
+ }
+
+ if ( !QAxFactory::isServer() ) {
+ GLObjectWindow w;
+ w.resize( 400, 350 );
+ w.show();
+ return a.exec();
+//! [1] //! [2]
+ }
+ return a.exec();
+//! [2] //! [3]
+}
+//! [3]
diff --git a/examples/activeqt/opengl/opengl.inf b/examples/activeqt/opengl/opengl.inf
new file mode 100644
index 0000000..4a79e67
--- /dev/null
+++ b/examples/activeqt/opengl/opengl.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ openglax.exe=openglax.exe
+ [openglax.exe]
+ file-win32-x86=thiscab
+ clsid={5fd9c22e-ed45-43fa-ba13-1530bb6b03e0}
+ RegisterServer=yes
diff --git a/examples/activeqt/opengl/opengl.pro b/examples/activeqt/opengl/opengl.pro
new file mode 100644
index 0000000..8eb81be
--- /dev/null
+++ b/examples/activeqt/opengl/opengl.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+TARGET = openglax
+
+CONFIG += qt warn_off qaxserver
+
+QT += opengl
+
+HEADERS = glbox.h \
+ globjwin.h
+SOURCES = glbox.cpp \
+ globjwin.cpp \
+ main.cpp
+RC_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.rc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/opengl
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS opengl.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/opengl
+INSTALLS += target sources
diff --git a/examples/activeqt/qutlook/addressview.cpp b/examples/activeqt/qutlook/addressview.cpp
new file mode 100644
index 0000000..281fe6a
--- /dev/null
+++ b/examples/activeqt/qutlook/addressview.cpp
@@ -0,0 +1,289 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "addressview.h"
+#include "msoutl.h"
+#include <QtGui>
+
+class AddressBookModel : public QAbstractListModel
+{
+public:
+ AddressBookModel(AddressView *parent);
+ ~AddressBookModel();
+
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ int columnCount(const QModelIndex &parent) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+ QVariant data(const QModelIndex &index, int role) const;
+
+ void changeItem(const QModelIndex &index, const QString &firstName, const QString &lastName, const QString &address, const QString &email);
+ void addItem(const QString &firstName, const QString &lastName, const QString &address, const QString &email);
+ void update();
+
+private:
+ Outlook::Application outlook;
+ Outlook::Items * contactItems;
+
+ mutable QHash<QModelIndex, QStringList> cache;
+};
+//! [0] //! [1]
+
+AddressBookModel::AddressBookModel(AddressView *parent)
+: QAbstractListModel(parent)
+{
+ if (!outlook.isNull()) {
+ Outlook::NameSpace session(outlook.Session());
+ session.Logon();
+ Outlook::MAPIFolder *folder = session.GetDefaultFolder(Outlook::olFolderContacts);
+ contactItems = new Outlook::Items(folder->Items());
+ connect(contactItems, SIGNAL(ItemAdd(IDispatch*)), parent, SLOT(updateOutlook()));
+ connect(contactItems, SIGNAL(ItemChange(IDispatch*)), parent, SLOT(updateOutlook()));
+ connect(contactItems, SIGNAL(ItemRemove()), parent, SLOT(updateOutlook()));
+
+ delete folder;
+ }
+}
+
+//! [1] //! [2]
+AddressBookModel::~AddressBookModel()
+{
+ delete contactItems;
+
+ if (!outlook.isNull())
+ Outlook::NameSpace(outlook.Session()).Logoff();
+}
+
+//! [2] //! [3]
+int AddressBookModel::rowCount(const QModelIndex &) const
+{
+ return contactItems ? contactItems->Count() : 0;
+}
+
+int AddressBookModel::columnCount(const QModelIndex &parent) const
+{
+ return 4;
+}
+
+//! [3] //! [4]
+QVariant AddressBookModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ switch (section) {
+ case 0:
+ return tr("First Name");
+ case 1:
+ return tr("Last Name");
+ case 2:
+ return tr("Address");
+ case 3:
+ return tr("Email");
+ default:
+ break;
+ }
+
+ return QVariant();
+}
+
+//! [4] //! [5]
+QVariant AddressBookModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid() || role != Qt::DisplayRole)
+ return QVariant();
+
+ QStringList data;
+ if (cache.contains(index)) {
+ data = cache.value(index);
+ } else {
+ Outlook::ContactItem contact(contactItems->Item(index.row() + 1));
+ data << contact.FirstName() << contact.LastName() << contact.HomeAddress() << contact.Email1Address();
+ cache.insert(index, data);
+ }
+
+ if (index.column() < data.count())
+ return data.at(index.column());
+
+ return QVariant();
+}
+
+//! [5] //! [6]
+void AddressBookModel::changeItem(const QModelIndex &index, const QString &firstName, const QString &lastName, const QString &address, const QString &email)
+{
+ Outlook::ContactItem item(contactItems->Item(index.row() + 1));
+
+ item.SetFirstName(firstName);
+ item.SetLastName(lastName);
+ item.SetHomeAddress(address);
+ item.SetEmail1Address(email);
+
+ item.Save();
+
+ cache.take(index);
+}
+
+//! [6] //! [7]
+void AddressBookModel::addItem(const QString &firstName, const QString &lastName, const QString &address, const QString &email)
+{
+ Outlook::ContactItem item(outlook.CreateItem(Outlook::olContactItem));
+ if (!item.isNull()) {
+ item.SetFirstName(firstName);
+ item.SetLastName(lastName);
+ item.SetHomeAddress(address);
+ item.SetEmail1Address(email);
+
+ item.Save();
+ }
+}
+
+//! [7] //! [8]
+void AddressBookModel::update()
+{
+ cache.clear();
+
+ emit reset();
+}
+
+
+//! [8] //! [9]
+AddressView::AddressView(QWidget *parent)
+: QWidget(parent)
+{
+ QGridLayout *mainGrid = new QGridLayout(this);
+
+ QLabel *liFirstName = new QLabel("First &Name", this);
+ liFirstName->resize(liFirstName->sizeHint());
+ mainGrid->addWidget(liFirstName, 0, 0);
+
+ QLabel *liLastName = new QLabel("&Last Name", this);
+ liLastName->resize(liLastName->sizeHint());
+ mainGrid->addWidget(liLastName, 0, 1);
+
+ QLabel *liAddress = new QLabel("Add&ress", this);
+ liAddress->resize(liAddress->sizeHint());
+ mainGrid->addWidget(liAddress, 0, 2);
+
+ QLabel *liEMail = new QLabel("&E-Mail", this);
+ liEMail->resize(liEMail->sizeHint());
+ mainGrid->addWidget(liEMail, 0, 3);
+
+ add = new QPushButton("A&dd", this);
+ add->resize(add->sizeHint());
+ mainGrid->addWidget(add, 0, 4);
+ connect(add, SIGNAL(clicked()), this, SLOT(addEntry()));
+
+ iFirstName = new QLineEdit(this);
+ iFirstName->resize(iFirstName->sizeHint());
+ mainGrid->addWidget(iFirstName, 1, 0);
+ liFirstName->setBuddy(iFirstName);
+
+ iLastName = new QLineEdit(this);
+ iLastName->resize(iLastName->sizeHint());
+ mainGrid->addWidget(iLastName, 1, 1);
+ liLastName->setBuddy(iLastName);
+
+ iAddress = new QLineEdit(this);
+ iAddress->resize(iAddress->sizeHint());
+ mainGrid->addWidget(iAddress, 1, 2);
+ liAddress->setBuddy(iAddress);
+
+ iEMail = new QLineEdit(this);
+ iEMail->resize(iEMail->sizeHint());
+ mainGrid->addWidget(iEMail, 1, 3);
+ liEMail->setBuddy(iEMail);
+
+ change = new QPushButton("&Change", this);
+ change->resize(change->sizeHint());
+ mainGrid->addWidget(change, 1, 4);
+ connect(change, SIGNAL(clicked()), this, SLOT(changeEntry()));
+
+ treeView = new QTreeView(this);
+ treeView->setSelectionMode(QTreeView::SingleSelection);
+ treeView->setRootIsDecorated(false);
+
+ model = new AddressBookModel(this);
+ treeView->setModel(model);
+
+ connect(treeView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), this, SLOT(itemSelected(QModelIndex)));
+
+ mainGrid->addWidget(treeView, 2, 0, 1, 5);
+}
+
+void AddressView::updateOutlook()
+{
+ model->update();
+}
+
+void AddressView::addEntry()
+{
+ if (!iFirstName->text().isEmpty() || !iLastName->text().isEmpty() ||
+ !iAddress->text().isEmpty() || !iEMail->text().isEmpty()) {
+ model->addItem(iFirstName->text(), iFirstName->text(), iAddress->text(), iEMail->text());
+ }
+
+ iFirstName->setText("");
+ iLastName->setText("");
+ iAddress->setText("");
+ iEMail->setText("");
+}
+
+void AddressView::changeEntry()
+{
+ QModelIndex current = treeView->currentIndex();
+
+ if (current.isValid())
+ model->changeItem(current, iFirstName->text(), iLastName->text(), iAddress->text(), iEMail->text());
+}
+
+//! [9] //! [10]
+void AddressView::itemSelected(const QModelIndex &index)
+{
+ if (!index.isValid())
+ return;
+
+ QAbstractItemModel *model = treeView->model();
+ iFirstName->setText(model->data(model->index(index.row(), 0)).toString());
+ iLastName->setText(model->data(model->index(index.row(), 1)).toString());
+ iAddress->setText(model->data(model->index(index.row(), 2)).toString());
+ iEMail->setText(model->data(model->index(index.row(), 3)).toString());
+}
+//! [10]
diff --git a/examples/activeqt/qutlook/addressview.h b/examples/activeqt/qutlook/addressview.h
new file mode 100644
index 0000000..5363cc1
--- /dev/null
+++ b/examples/activeqt/qutlook/addressview.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ADDRESSVIEW_H
+#define ADDRESSVIEW_H
+
+#include <QWidget>
+
+class AddressBookModel;
+QT_BEGIN_NAMESPACE
+class QLineEdit;
+class QModelIndex;
+class QPushButton;
+class QTreeView;
+QT_END_NAMESPACE
+
+//! [0]
+class AddressView : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AddressView(QWidget *parent = 0);
+
+protected slots:
+ void addEntry();
+ void changeEntry();
+ void itemSelected(const QModelIndex &index);
+
+ void updateOutlook();
+
+protected:
+ AddressBookModel *model;
+
+ QTreeView *treeView;
+ QPushButton *add, *change;
+ QLineEdit *iFirstName, *iLastName, *iAddress, *iEMail;
+};
+//! [0]
+
+#endif // ADDRESSVIEW_H
diff --git a/examples/activeqt/qutlook/fileopen.xpm b/examples/activeqt/qutlook/fileopen.xpm
new file mode 100644
index 0000000..880417e
--- /dev/null
+++ b/examples/activeqt/qutlook/fileopen.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *fileopen[] = {
+" 16 13 5 1",
+". c #040404",
+"# c #808304",
+"a c None",
+"b c #f3f704",
+"c c #f3f7f3",
+"aaaaaaaaa...aaaa",
+"aaaaaaaa.aaa.a.a",
+"aaaaaaaaaaaaa..a",
+"a...aaaaaaaa...a",
+".bcb.......aaaaa",
+".cbcbcbcbc.aaaaa",
+".bcbcbcbcb.aaaaa",
+".cbcb...........",
+".bcb.#########.a",
+".cb.#########.aa",
+".b.#########.aaa",
+"..#########.aaaa",
+"...........aaaaa"
+};
diff --git a/examples/activeqt/qutlook/fileprint.xpm b/examples/activeqt/qutlook/fileprint.xpm
new file mode 100644
index 0000000..6ada912
--- /dev/null
+++ b/examples/activeqt/qutlook/fileprint.xpm
@@ -0,0 +1,24 @@
+/* XPM */
+static const char *fileprint[] = {
+" 16 14 6 1",
+". c #000000",
+"# c #848284",
+"a c #c6c3c6",
+"b c #ffff00",
+"c c #ffffff",
+"d c None",
+"ddddd.........dd",
+"dddd.cccccccc.dd",
+"dddd.c.....c.ddd",
+"ddd.cccccccc.ddd",
+"ddd.c.....c....d",
+"dd.cccccccc.a.a.",
+"d..........a.a..",
+".aaaaaaaaaa.a.a.",
+".............aa.",
+".aaaaaa###aa.a.d",
+".aaaaaabbbaa...d",
+".............a.d",
+"d.aaaaaaaaa.a.dd",
+"dd...........ddd"
+};
diff --git a/examples/activeqt/qutlook/filesave.xpm b/examples/activeqt/qutlook/filesave.xpm
new file mode 100644
index 0000000..bd6870f
--- /dev/null
+++ b/examples/activeqt/qutlook/filesave.xpm
@@ -0,0 +1,22 @@
+/* XPM */
+static const char *filesave[] = {
+" 14 14 4 1",
+". c #040404",
+"# c #808304",
+"a c #bfc2bf",
+"b c None",
+"..............",
+".#.aaaaaaaa.a.",
+".#.aaaaaaaa...",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".#.aaaaaaaa.#.",
+".##........##.",
+".############.",
+".##.........#.",
+".##......aa.#.",
+".##......aa.#.",
+".##......aa.#.",
+"b............."
+};
diff --git a/examples/activeqt/qutlook/main.cpp b/examples/activeqt/qutlook/main.cpp
new file mode 100644
index 0000000..b015d8a
--- /dev/null
+++ b/examples/activeqt/qutlook/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include "addressview.h"
+#include <QApplication>
+
+int main(int argc, char ** argv)
+{
+ QApplication a(argc, argv);
+
+ AddressView view;
+ view.setWindowTitle("Qt Example - Looking at Outlook");
+ view.show();
+
+ return a.exec();
+}
+//! [0]
diff --git a/examples/activeqt/qutlook/qutlook.pro b/examples/activeqt/qutlook/qutlook.pro
new file mode 100644
index 0000000..c1154e0
--- /dev/null
+++ b/examples/activeqt/qutlook/qutlook.pro
@@ -0,0 +1,23 @@
+#! [0] #! [1]
+TEMPLATE = app
+TARGET = qutlook
+CONFIG += qaxcontainer
+
+TYPELIBS = $$system(dumpcpp -getfile {00062FFF-0000-0000-C000-000000000046})
+#! [0]
+
+isEmpty(TYPELIBS) {
+ message("Microsoft Outlook type library not found!")
+ REQUIRES += Outlook
+} else {
+#! [1] #! [2]
+ HEADERS = addressview.h
+ SOURCES = addressview.cpp main.cpp
+}
+#! [2]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/qutlook
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qutlook.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/qutlook
+INSTALLS += target sources
diff --git a/examples/activeqt/simple/main.cpp b/examples/activeqt/simple/main.cpp
new file mode 100644
index 0000000..7f939e4
--- /dev/null
+++ b/examples/activeqt/simple/main.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QAxBindable>
+#include <QAxFactory>
+#include <QApplication>
+#include <QLayout>
+#include <QSlider>
+#include <QLCDNumber>
+#include <QLineEdit>
+#include <QMessageBox>
+
+//! [0]
+class QSimpleAX : public QWidget, public QAxBindable
+{
+ Q_OBJECT
+ Q_PROPERTY( QString text READ text WRITE setText )
+ Q_PROPERTY( int value READ value WRITE setValue )
+public:
+ QSimpleAX(QWidget *parent = 0)
+ : QWidget(parent)
+ {
+ QVBoxLayout *vbox = new QVBoxLayout( this );
+
+ slider = new QSlider( Qt::Horizontal, this );
+ LCD = new QLCDNumber( 3, this );
+ edit = new QLineEdit( this );
+
+ connect( slider, SIGNAL( valueChanged( int ) ), this, SLOT( setValue(int) ) );
+ connect( edit, SIGNAL(textChanged(const QString&)), this, SLOT(setText(const QString&)) );
+
+ vbox->addWidget( slider );
+ vbox->addWidget( LCD );
+ vbox->addWidget( edit );
+ }
+
+ QString text() const
+ {
+ return edit->text();
+ }
+ int value() const
+ {
+ return slider->value();
+ }
+
+signals:
+ void someSignal();
+ void valueChanged(int);
+ void textChanged(const QString&);
+
+public slots:
+ void setText( const QString &string )
+ {
+ if ( !requestPropertyChange( "text" ) )
+ return;
+
+ edit->blockSignals( true );
+ edit->setText( string );
+ edit->blockSignals( false );
+ emit someSignal();
+ emit textChanged( string );
+
+ propertyChanged( "text" );
+ }
+ void about()
+ {
+ QMessageBox::information( this, "About QSimpleAX", "This is a Qt widget, and this slot has been\n"
+ "called through ActiveX/OLE automation!" );
+ }
+ void setValue( int i )
+ {
+ if ( !requestPropertyChange( "value" ) )
+ return;
+ slider->blockSignals( true );
+ slider->setValue( i );
+ slider->blockSignals( false );
+ LCD->display( i );
+ emit valueChanged( i );
+
+ propertyChanged( "value" );
+ }
+
+private:
+ QSlider *slider;
+ QLCDNumber *LCD;
+ QLineEdit *edit;
+};
+
+//! [0]
+#include "main.moc"
+
+//! [1]
+QAXFACTORY_DEFAULT(QSimpleAX,
+ "{DF16845C-92CD-4AAB-A982-EB9840E74669}",
+ "{616F620B-91C5-4410-A74E-6B81C76FFFE0}",
+ "{E1816BBA-BF5D-4A31-9855-D6BA432055FF}",
+ "{EC08F8FC-2754-47AB-8EFE-56A54057F34E}",
+ "{A095BA0C-224F-4933-A458-2DD7F6B85D8F}")
+//! [1]
diff --git a/examples/activeqt/simple/simple.inf b/examples/activeqt/simple/simple.inf
new file mode 100644
index 0000000..3657e9f
--- /dev/null
+++ b/examples/activeqt/simple/simple.inf
@@ -0,0 +1,11 @@
+//! [0]
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ simpleax.exe=simpleax.exe
+ [simpleax.exe]
+ file-win32-x86=thiscab
+ clsid={DF16845C-92CD-4AAB-A982-EB9840E74669}
+ RegisterServer=yes
+//! [0]
diff --git a/examples/activeqt/simple/simple.pro b/examples/activeqt/simple/simple.pro
new file mode 100644
index 0000000..d0f2019
--- /dev/null
+++ b/examples/activeqt/simple/simple.pro
@@ -0,0 +1,13 @@
+TEMPLATE = app
+TARGET = simpleax
+
+CONFIG += qt warn_off qaxserver
+
+SOURCES = main.cpp
+RC_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.rc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/simple
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS simple.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/simple
+INSTALLS += target sources
diff --git a/examples/activeqt/webbrowser/main.cpp b/examples/activeqt/webbrowser/main.cpp
new file mode 100644
index 0000000..fe93eab
--- /dev/null
+++ b/examples/activeqt/webbrowser/main.cpp
@@ -0,0 +1,189 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+#include <QMessageBox>
+#include <QProgressBar>
+#include <QStatusBar>
+#include <QMainWindow>
+#include <QAbstractEventDispatcher>
+
+#if defined(Q_OS_WINCE)
+#include "ui_wincemainwindow.h"
+#include <windows.h>
+#else
+#include "ui_mainwindow.h"
+#endif
+
+//! [0]
+class MainWindow : public QMainWindow, public Ui::MainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow();
+
+public slots:
+ void on_WebBrowser_TitleChange(const QString &title);
+ void on_WebBrowser_ProgressChange(int a, int b);
+ void on_WebBrowser_CommandStateChange(int cmd, bool on);
+ void on_WebBrowser_BeforeNavigate();
+ void on_WebBrowser_NavigateComplete(QString);
+
+ void on_actionGo_triggered();
+ void on_actionNewWindow_triggered();
+ void on_actionAbout_triggered();
+ void on_actionAboutQt_triggered();
+ void on_actionFileClose_triggered();
+
+private:
+ QProgressBar *pb;
+};
+//! [0] //! [1]
+
+MainWindow::MainWindow()
+{
+ setupUi(this);
+
+ connect(addressEdit, SIGNAL(returnPressed()), actionGo, SLOT(trigger()));
+ connect(actionBack, SIGNAL(triggered()), WebBrowser, SLOT(GoBack()));
+ connect(actionForward, SIGNAL(triggered()), WebBrowser, SLOT(GoForward()));
+ connect(actionStop, SIGNAL(triggered()), WebBrowser, SLOT(Stop()));
+ connect(actionRefresh, SIGNAL(triggered()), WebBrowser, SLOT(Refresh()));
+ connect(actionHome, SIGNAL(triggered()), WebBrowser, SLOT(GoHome()));
+ connect(actionSearch, SIGNAL(triggered()), WebBrowser, SLOT(GoSearch()));
+
+ pb = new QProgressBar(statusBar());
+ pb->setTextVisible(false);
+ pb->hide();
+ statusBar()->addPermanentWidget(pb);
+
+ WebBrowser->dynamicCall("GoHome()");
+}
+
+//! [1] //! [2]
+void MainWindow::on_WebBrowser_TitleChange(const QString &title)
+{
+ setWindowTitle("Qt WebBrowser - " + title);
+}
+
+void MainWindow::on_WebBrowser_ProgressChange(int a, int b)
+{
+ if (a <= 0 || b <= 0) {
+ pb->hide();
+ return;
+ }
+ pb->show();
+ pb->setRange(0, b);
+ pb->setValue(a);
+}
+
+void MainWindow::on_WebBrowser_CommandStateChange(int cmd, bool on)
+{
+ switch (cmd) {
+ case 1:
+ actionForward->setEnabled(on);
+ break;
+ case 2:
+ actionBack->setEnabled(on);
+ break;
+ }
+}
+
+void MainWindow::on_WebBrowser_BeforeNavigate()
+{
+ actionStop->setEnabled(true);
+}
+
+void MainWindow::on_WebBrowser_NavigateComplete(QString)
+{
+ actionStop->setEnabled(false);
+}
+
+//! [2] //! [3]
+void MainWindow::on_actionGo_triggered()
+{
+ WebBrowser->dynamicCall("Navigate(const QString&)", addressEdit->text());
+}
+
+void MainWindow::on_actionNewWindow_triggered()
+{
+ MainWindow *window = new MainWindow;
+ window->show();
+ if (addressEdit->text().isEmpty())
+ return;
+ window->addressEdit->setText(addressEdit->text());
+ window->actionStop->setEnabled(true);
+ window->on_actionGo_triggered();
+}
+
+void MainWindow::on_actionAbout_triggered()
+{
+ QMessageBox::about(this, tr("About WebBrowser"),
+ tr("This Example has been created using the ActiveQt integration into Qt Designer.\n"
+ "It demonstrates the use of QAxWidget to embed the Internet Explorer ActiveX\n"
+ "control into a Qt application."));
+}
+
+void MainWindow::on_actionAboutQt_triggered()
+{
+ QMessageBox::aboutQt(this, tr("About Qt"));
+}
+
+void MainWindow::on_actionFileClose_triggered()
+{
+ close();
+}
+
+#include "main.moc"
+
+//! [3] //! [4]
+int main(int argc, char ** argv)
+{
+ QApplication a(argc, argv);
+ MainWindow w;
+#if defined(Q_OS_WINCE)
+ w.showMaximized();
+#else
+ w.show();
+#endif
+ return a.exec();
+}
+//! [4]
diff --git a/examples/activeqt/webbrowser/mainwindow.ui b/examples/activeqt/webbrowser/mainwindow.ui
new file mode 100644
index 0000000..12a0a32
--- /dev/null
+++ b/examples/activeqt/webbrowser/mainwindow.ui
@@ -0,0 +1,306 @@
+<ui version="4.0" stdsetdef="1" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="objectName" >
+ <string notr="true" >MainWindow</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>812</width>
+ <height>605</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Qt WebBrowser</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QFrame" name="Frame3" >
+ <property name="objectName" >
+ <string notr="true" >Frame3</string>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="WebAxWidget" name="WebBrowser" >
+ <property name="objectName" >
+ <string notr="true" >WebBrowser</string>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="control" >
+ <string>{8856F961-340A-11D0-A96B-00C04FD705A2}</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QToolBar" name="tbNavigate" >
+ <property name="objectName" >
+ <string notr="true" >tbNavigate</string>
+ </property>
+ <property name="windowTitle" >
+ <string>Navigation</string>
+ </property>
+ <addaction name="actionBack" />
+ <addaction name="actionForward" />
+ <addaction name="actionStop" />
+ <addaction name="actionRefresh" />
+ <addaction name="actionHome" />
+ <addaction name="separator" />
+ <addaction name="actionSearch" />
+ </widget>
+ <widget class="QToolBar" name="tbAddress" >
+ <property name="objectName" >
+ <string notr="true" >tbAddress</string>
+ </property>
+ <property name="windowTitle" >
+ <string>Address</string>
+ </property>
+ <widget class="QLabel" name="lblAddress" >
+ <property name="objectName" >
+ <string notr="true" >lblAddress</string>
+ </property>
+ <property name="text" >
+ <string>Address</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="addressEdit" >
+ <property name="objectName" >
+ <string notr="true" >addressEdit</string>
+ </property>
+ </widget>
+ <addaction name="actionGo" />
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="objectName" >
+ <string notr="true" >menubar</string>
+ </property>
+ <widget class="QMenu" name="PopupMenu" >
+ <property name="objectName" >
+ <string notr="true" >PopupMenu</string>
+ </property>
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <widget class="QMenu" name="FileNewGroup_2" >
+ <property name="objectName" >
+ <string notr="true" >FileNewGroup_2</string>
+ </property>
+ <property name="title" >
+ <string>New</string>
+ </property>
+ <addaction name="actionNewWindow" />
+ </widget>
+ <addaction name="FileNewGroup" />
+ <addaction name="FileNewGroup_2" />
+ <addaction name="separator" />
+ <addaction name="actionFileClose" />
+ </widget>
+ <widget class="QMenu" name="unnamed" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="title" >
+ <string>&amp;Help</string>
+ </property>
+ <addaction name="actionAbout" />
+ <addaction name="actionAboutQt" />
+ </widget>
+ <addaction name="PopupMenu" />
+ <addaction name="unnamed" />
+ </widget>
+ <action name="actionGo" >
+ <property name="objectName" >
+ <string>actionGo</string>
+ </property>
+ <property name="icon" >
+ <iconset>image0</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Go</string>
+ </property>
+ </action>
+ <action name="actionBack" >
+ <property name="objectName" >
+ <string>actionBack</string>
+ </property>
+ <property name="icon" >
+ <iconset>image1</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Back</string>
+ </property>
+ <property name="shortcut" >
+ <string>Backspace</string>
+ </property>
+ </action>
+ <action name="actionForward" >
+ <property name="objectName" >
+ <string>actionForward</string>
+ </property>
+ <property name="icon" >
+ <iconset>image2</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Forward</string>
+ </property>
+ </action>
+ <action name="actionStop" >
+ <property name="objectName" >
+ <string>actionStop</string>
+ </property>
+ <property name="icon" >
+ <iconset>image3</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Stop</string>
+ </property>
+ </action>
+ <action name="actionRefresh" >
+ <property name="objectName" >
+ <string>actionRefresh</string>
+ </property>
+ <property name="icon" >
+ <iconset>image4</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Refresh</string>
+ </property>
+ </action>
+ <action name="actionHome" >
+ <property name="objectName" >
+ <string>actionHome</string>
+ </property>
+ <property name="icon" >
+ <iconset>image5</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Home</string>
+ </property>
+ </action>
+ <action name="actionFileClose" >
+ <property name="objectName" >
+ <string>actionFileClose</string>
+ </property>
+ <property name="iconText" >
+ <string>Close</string>
+ </property>
+ <property name="text" >
+ <string>C&amp;lose</string>
+ </property>
+ </action>
+ <action name="actionSearch" >
+ <property name="objectName" >
+ <string>actionSearch</string>
+ </property>
+ <property name="icon" >
+ <iconset>image6</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Search</string>
+ </property>
+ </action>
+ <action name="actionAbout" >
+ <property name="objectName" >
+ <string>actionAbout</string>
+ </property>
+ <property name="iconText" >
+ <string>About</string>
+ </property>
+ </action>
+ <action name="actionAboutQt" >
+ <property name="objectName" >
+ <string>actionAboutQt</string>
+ </property>
+ <property name="iconText" >
+ <string>About Qt</string>
+ </property>
+ </action>
+ <actiongroup name="FileNewGroup" >
+ <action name="actionNewWindow" >
+ <property name="objectName" >
+ <string>actionNewWindow</string>
+ </property>
+ <property name="iconText" >
+ <string>Window</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+N</string>
+ </property>
+ </action>
+ <property name="objectName" >
+ <string>FileNewGroup</string>
+ </property>
+ </actiongroup>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>WebAxWidget</class>
+ <extends>QAxWidget</extends>
+ <header>webaxwidget.h</header>
+ </customwidget>
+ </customwidgets>
+ <connections>
+ <connection>
+ <sender>addressEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>actionGo</receiver>
+ <slot>trigger()</slot>
+ </connection>
+ </connections>
+ <layoutdefault spacing="6" margin="11" />
+ <images>
+ <image name="image0" >
+ <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54103b11c8563600020b03105719c4b530b08072f50880513560a09c080338d5209420294a4451a38c90426621ab5146d10de524a2aa417505445122861a547722bb0c971a3d2aa921c2ae446c6a9431fc85a9064551220e354009653dec00294e712a1ac4e97078a9a9b5e6020013b3f563</data>
+ </image>
+ <image name="image1" >
+ <data format="XPM.GZ" length="4494" >789ce596497332470c86effe15947573a5f4c1cc30cc542a07ef60bc808dd7540e3d9b6df006186c93ca7f8fba2535ce57be98dc9292313c487a2575f7ccf063a376d53baa6dfc589bbe9ad7fbbc96df99496da3983d3e7efcfec76f7faead87418dfe1a51500bd67f595befbfd6f2daf1f35369014e08a05e6fd4ab96e31e73d0282bc7a7cae23ff3ccfe8170ca6cee9843f51f3b4ec8cff9efccdebf2d2cf9b06bb9417a25c74f98bdff99390a84fb8e49af70f39891b2e40bfbf8b6b0917e87968346a8f5a6cc51c07ab02f2cf1983237552f709c86691e3bbd5be5821998a32067bd1765d13f67563d530a4b3df8b01c523d8ec74059faed086bfc82390e851b8ed3c86485e34365a9bfc5ece3df8433e10bcb5140f5dd3cf0e099f32f99e350cecb5858f2b1c1dc52fda663d334a277c0ecfd5d61c9373973120967969b548fd71b079e797d8e985b21eb63aecceb85e7c299f4ffaa2ce7739359ebc195631387c6ad1f5e302791ccbba72cf173e15cfa2d2cc7619cf1fa63c9dccaa4ff4bcfdc7fa82cfdf7999348f6bf299c4bfd4c59ea0f99535dafca71d60a65ffebca52ff8c3989e47cce98351fb785759e7bcbad65bf0be624ca9a8e87caac0fb1702ef191b2cc9731a7b9ec4f87d934659e27e142f8c671e6eb9d0ae7b2be07cc6924ccf999698a7e4f58f572e64cebb9f393444994e68e4365d9ff7be15caef70766ad678cb0f8f18359ebe109b3af27f199fadd794cf254eb196599774758e77d5496f5dd64a67959af122ef87c639b59eb81d34ba97fe3f4215196f3922acbbc28acf527cc792c7a857029ecf63bcded05efb8a52cf3cc9833ed2f66563dac0b8b1ebe3317ea77f73352173db8f6ccf54a66df0f30fb7c777d9bc214d2cf88d9cf73cfece3ddf3296b66da7fe199d7a32b5cc8feef31fbfe8f99bdde96b0faddf3272bac390665b99e90d9e7ef33972de9d73d7ff3d873255c49fc1b73257ee4f8d2eb5d336b3e8e8535ff86d9e7bbf35f2cf51366ef77cfeb6299df62563f3c0a8b1fdcf3d3569778773f756e66f7fcac967e175f797ffff5dfd9ff4103010d6698a35955030b2cb1c25bbcc3fbd5344861882352b8c5077c5c45836678c267ca7fc1314ebeaf81537cc599eb608e6ff88e1f2b682c705314b6486182dbb8f31d0ddca529f644619ff2db641d3cf82a8bfa9d62d7da670d3cc4233c760a63eaa08d2734478fac8f87ffc833788a6738c073bc20ebe3255eb1069d863e5e3b851bacfb7c6b0d0c30c488f24a3a2d4ddaf1986a3d600b13179be280ef597809e876e206000c69d8ec0e590f32c8a18012b7a0825b9799e018eee0de4e0b4318c103ff2ea2985b78c47d28a487ce276b634cca40356d1655801c3bf044af2136e0195ef8b711be4045ab50ff42e16bdbb6463d8e610253fe3d4855ec3ed80abd9f62397ef9c9e6cee835249bc31bbc731ff0010beacbcdbfaca29f2836a3e839fd1f3acb5cb6fd6e13b6605b34766097d6664cdf0d7faad9813dd827df08daf4de812ddaa7061c4017baf43ea6daef70c8fb0247704c932dc897b94e67da09553a811ef4a94a0f4ee10c069435216b630ae7a43b800b7fc6164ea543ea73ea75663b22a50e5cc215ec50956beaf606ead08080147b64c76403d20ebdc6142268528d3655ee3a1db6f88b535ee015b42081d4205ee1f4f335878501ea7644331dc81acecdb7ef63b86b32eae59956cff63237f92af7319c9a82669c989256bd0b6fa6fabe86bbfe0ecdadb9a399ce61b49a86355adfbedd45736756bc27b30afd161a9a9179585de33bf69fd2f8ebd7b5bf014644b906</data>
+ </image>
+ <image name="image2" >
+ <data format="XPM.GZ" length="4494" >789ce5965b4f23471085dff915d6d6db2aaac5e3b92aca037703cbc55c8c21ca43cf8c8d0dd85c6c307694ff9eeaaed3bd68771f968d14298a0a109fabebd4e99a9ef17cfad8e81d1f343e7e5a99cecc6c5435aaa1796a7cac9fc7e3c5ef7ffcf6e7ca8756d4909f661c35a20fbfac7ce8cc1a55e3f07ed2b7409702b4badaccfb996563020f5c7ecbf340b9a31c3591dff7ac7943e002cc8e73cf74acdcc27a8a2d37a5be4e1d9f04567f9fc105f25dcfea9726caad62a07c1158f58f94e3087e868ea57fa5fa0be590bfb11c3525affd4e03ebfa25b8507fbcaa1c47ca66e459fdf10c6c30af4dcfda8f5f9513dfffce71e1f5a956967adddfaeb25f4f7b60e8d199e596f42f6bc787ca213f554e5be06dc7a28ffdee282791cedb5c83d19fd795a55ecf4b3fb0ee07ebd312fae796e3283665e238524e2265de031bcc774d396d61be25b8c4fe1f02abfeab67f49f2867decfbd6393b6a03f03438f3bca19fa51cb33fc6f80fd7eae2c27e257e7cb4de5b4045f78d679f24960ddcfb172e6f73357ce63e88fc115ce43e558fcabbeb905fb7e47cae24ff5daca41af007bbd81e5b425f53aff6160d52f95f318f37d01a39ee7ca05f4790a469e0e1c97590bfa1b81f53c3e2bfbf5ecf697b532efe754398f31af437085eb65948b18e723f70cbf9e2bcc633db0f65b533609fcbafb372bf318fdcfc015e65b281731ee0ff6acf70767ca5e8f7be01abcab5cfa7e89e53cce2ba3fd1681b5df8172013f44e00acfbf4a39e8ef287b7dbe02234feefce795d727a36c12ccf75239d4b7c1bede9def42fcc0ef7960d5cbc05ebf543635aed752b94aa1ff02ee83ddf3b6a87c3d3f2b9b047a4fcaa17e0cf6f5eef928ab13f5476960d5eb7ac6f5dd07d7e04839e83d29d7be9ffbfe31b50dc723cfa87f08acf947e51a7ad457ee6760773ecaa4f47e36036bfd96673c3fb6c13578a01cf41f9505d5af3b2f655dc28fa93da33e550ef523e5e06f08861eb9e7b94cdfe7ddf753d50feb6f94437e00f67edcf3aa4e831ed8afe73bb05fefe655f7c37edcfd62bb81ddfb82935776cfeb41c87766ff2cfe7f1a4c6cb8e48ae91f68d4dce7015ff390473fad71c3b77cc7639ef03d3ffcb48f013ff293a84c79c6d54f693c8bc28b28589539bff2e2ed647e586389184bacf13a6ff0e6d71a32f92dde96bfdf9dbccc6387dba2d086caae4c668ff7bf68f0673ee0433ee263eef0099ff2199f8b62d0e32e5f704fea2fe5b70d3f57729556b91b349a1c718b634e64faa9fc7fc919e772220a91213254ca273b884bf72b4a54f1846ad925e93b1af56940d734a4110fe4efb5c40dddda907311734c7752d10b3a1ae289c634a17b7dafe331e995b3b124fbdfd25d85471763596fab7aa2a4f53d444653ded3773bb96e8faeae1de2ea8dff9da0b0ebfcd858e3357aa667bb1f68b4a5e7d256853559e8f56d64aefe85e6f44a0b5aea3bac5c2bebf74b8775fb6bfbb858771e7a6f1df09c36f89a36698bb6f53d5c4ef08ee4e6a2dd269b9d488729ed4a171b7bd40ece3228cce5d305edd3673ed7773139bd133a14d5233a96cff7a9237142a77446e7125dba900e70681564f5a6acdc1285ae9e0feaf150d675e8d2d59dd315ad52931fec2973d1a5489c6698e29c5a508829797bd629a52665bcf9fdd32ed95c1d50217b5c18b67390f34befb8e78873a9b6b39ad285216328a2de3bef5b32a59db5ccec42a6b565aaf7dffba6e663d3972b211ea86b065f3cbccbc7b53890399a21a55f677f5863e4f670c337df667f58e3d6dc99dbef3dd5ff6bdf73ff82c65fbfaefc0d4fb5b868</data>
+ </image>
+ <image name="image3" >
+ <data format="XPM.GZ" length="802" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232325500210543251d2e25658564056503300071f540dc3430007371012a492a830156496538c094848922c9c2259134c099304914e3604c8424aa5e6449b0044216ca824ba2da8b4512218b4d122e8b55520fee5974072164511da487ea490c7f22cba249e20d3efc018f3fcae0d2702eb5d2106992b5d65c00b9a48974</data>
+ </image>
+ <image name="image4" >
+ <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54105b19c8563600020b03103711c4b530b08072f50880513524ab518681443435ca984ae08ae06a94114a10ac443435ca3043904d4c4453a38ca604ae11590d9a0ab80bd0d46078914c35c4d885a608871a547f61f81d5d117a1862018930e5b8d5c0950c741a1b1e6a6aadb90086a9d853</data>
+ </image>
+ <image name="image5" >
+ <data format="XPM.GZ" length="5598" >789ca5985973db480ec7dff3295cc15b6a0b2351a428d6d63ef83e255bbe647b6a1fd02465dd872d9f53f3dd076c005dc926ce6a32eed8553f37fadf7fa0c1a69cdfbe6cdc9cb537befcf6e97145ab61be910fe861e34bf1349dbefdfedffffcf1e97323dae07f51bdbe117dfed7a7cfddd546bed199cfca0ae888016afeab62e8796ef110ee545caf05be16ae5bfc6ee096e7b6e756983f51b6f53b81257ecfb8eee7e9b162f66af1c78125fe48987f23f3fb81657e691cd5bddecc7316d555efd058f7eb2867aa771058f4de8c55cffb6dd4a34cf5b68d357e681c6515634db81a7e3ef59c35cccf5560bf9ef6953389c77660af074f15c751e05c38a6d81f2ef9f3a848f4e9d658f2c36b635dbfa54cc2383556bd33e12492fc70df38f1f3f8ae4cc2745a711285fda7caa4f95e06967a2d8c63f27a8fc2a60fa4acfa980a371b898f0767dc6cf8fdbc9f84c27e4de124d2fabe186b3dee8c75ff1365dbef2db0ccef0987fd2f2a6632fd576552fd2b63d57b08ecd7d39d70b321fd0560acfb6d1a4b7e3050764de7d79f08a70de937ea7b7689e68f4de1e0776e2c7ab8abecb47eb170aa7ee822b0e89f1b4b7fd24dc529abe9794f02cbf99e2b3badc7a5b1ee97089b3e0e8d253f3c364e253e5576120ff7c63a9f7966d2e771d358e75bca4ef3bb0e2cf9758db5fe47c6b21eeb81bd3f07c2ad58ebd130d67e6a194b3cf97e62b2fa24c67a1f5d2aab3f8781a53e17c6eaa7082cfa3de156acf9d5034b7e3563f1eb96c6eaf7c0b815fbf8d2739e3aedefb1b1de9723618b77a49cebf946c6e20f5f8d251e753e8b5bb9e74c980a4afc7a7fbf66b1ed8fb7c67a9ec7c2ad5cfd74038bdfa6b1f6cbd458fd2e84b358efbb0363f5b71358fccd8c33596f9c4bfddcc458fac78d8cf5797b3296f5f82c4c49e6f5c9bf9fb23ce41307967e3935d6f36c0b67b1ce3f188b5f3757367f5363b98fdc38b0cc0f8cf5f90bf3ea97028bfe50981289777d63edcf81b1c4439897f3c52d615738cfe0df371c1deb7db265acf98d8d253f7a50d67a60c758cfcbf4cc7f2fb0f8bf1736bfae30d6f35f1a4b3ce6c6e2df95ca85f6f7dc58f3db0e5c783e14e6ebc533e87e963fbe0873f9fd3cc97c91693fd028b0d4e3c558f3eb0b9b5f972bab3fe78c353f3056bfabc0e2371636bfe4cf9b29d1e76b69acfdb863accfd33cb0dc2fa7c6e2179e03cb79ae940b7dffbf1b6bfd1363f53b12367f581a6b3d1bca56df6e60a9bfc6e765def4ecef6bc7eafaf9e8d558fbb7a15ce87d7263acf7ffbdb1e40f33e1e0cf29ebfea8eb6d7ff29f17f8f4137dfe51d8fa0117ca65ee3fbfe3bd705116b2de9f775e3af50313e1a229f1f0682cf1b052e6e1d9dfbf1cddd4fd2363cdcfef5fb05b7d1f0c944bed4f67ac9f5f27c265bf4c3d9f07eefb787f1f96695eaa1e0a174d7d7f81b1ee4f81a5fe75e552d9bf1fca7e617e9e8d556f33b0c4fbcf5ffdb44c956bc6a2d75dfd6c2020fd3ce2ff69a0c31c0b2cff91461fef71804374bfaa81231ce3044b9ce2ecd734380fc2392e70890ff888bfa6f184cff8c24e5ef10ddf71f3a37c3ed6c015afdec26dfeb983bbb887fb78f0f734380fe031c7437f3247788c27d8fe713e1f6a1076f014cfb08be7ac7481977885d75c951fe4f3630dcea3c3eb7b9cc70d6b9ce12d9fee26de610debeb69b0fb578cb89a0d8c399711e794609373d9c39455f2b53466d8c20c17809c45cc7a3c00f011081cffccff379fef35388f1d0428a0c401f459e58c3d45700f0003cee71d8678fc730d7430e2557d3c8331f7568c37308129cc7006733e9d262c6008cb6ff3f94ea3c72bc678ca3f1fb80a637884154c71c974c55d72c91a4feca4fdf553f8ad46554d8e9ee30a9eb1efab31611f2ff0ca346427bb9c11e114debe7e7ebed328318702e7f0ce9dbee47a1c724655b745b0c94ea6b0c55519f059b98f73d19a6cc30eecc21eecfb7100877004c770026de8e070bdfe805338832e9cc3055cc2955f7b0d3de8f0cfebb5356ee016eea0c6a30e11342086049a907aadcd35355a90111250f5e5288706bfdb4bea572a78b49e06ddd3a0d2807a2502110d6944639ad09466ebf9e8ae684e0bf5b1a4075ab28f11ffa1df678dc7f57cb0c68a9ee899355e7c2ddbf40a31bdb1c63bcdfe86c6803669cb9f4555c76b38a76dcee57d5d1f5c8f1d5af0b9745581bb029a5c8f3eedd21eed73b70ebe56fa91061dd061f05139e9d1116b1cfb9aee55c4fcf6330d5cd289d778a6b65fdd831dea702e256b9cf2b974a84367d4fd580347744e17744957acc13e7cfc095d538f356ed8cd2ddd518dea147da4c1956890ffcf295ed5e4c83b4a59f182b9455935e3b801ab791c7fa4e188d7a4bcbee66353feaef9df8852ca2f3e9ee3ef73840f359cabfec22979f4ddbd1bf018ba118f318f899bf298b9b95bb8e537cffe9ffffef4171c39a0bf</data>
+ </image>
+ <image name="image6" >
+ <data format="XPM.GZ" length="3742" >789c8d96c9521c490c86ef3c458775734cc8ddd5b5c6c41c303b180cc60b66620eaacc2c9aa5599b7562de7da45fc5180c8e98fa39f091522e4a49c9bbb783bdedcdc1db77735733991d864198c8e5e06dbc9e4eeffffceb8fbfe7de64d9407f466531c8defc36f76667360883adb3d364c013051ae2039f8147266359068f4dc6740a2e4db05f05d726f0253898c017c6a3cc04ffafce79aa3af0143c36c17e055caa0aacbf06aeb2203e5f09ae4d185f75ce472de6e7737063c2fcb57356b702fed673e32c473d4bcf3760198f02e69325706b022f3a676df0f567e05035d1ed273dc79883e7c1d1045e70ae2456d84fd9738a589f0b703261bc72ae25e17ee4b0e7d8f3b5733374e603e32c37c11ff36970db12f193f7e07c1c6bec87c6e0c604ff0e1c4db03f36cec7e3a6f4fd2e38e779eee7bd05e7e350fa7e4fc0455ee6b84fb9eab913bfdf1c5ce5758efba54fffb1e75302d726f8af3817a5f8f922584cf06fc0211f951ebfd0b30afe07ce4510dfdf1e38e665e9f9f1e01c32cf1fda06a73c2f7c7eac5f8c8b61eef582f315b909dc82f1c17e07dc1459e5f1c77d953abb787e0ab832611cf957366dd9c707f556762a3fcf8673ddd6d8afdc1957b909fe98af2a65d4c787c08d09e3c8bfaad504f378de83a309e35fc049d9d747bda19c7dbe8f602d88d6fd11af3a33c1ffde398e02ec69178c0b04bb7fa12be03e08e7ab4b895e2f74ec1ca2e73f6d811b2d37df1feaa9969082f71ff4a73a98c01f9cdb3678fde27eea58f7f9cdc8bfba33c11efda2199ac01bcead048fd72678a4e9e3f6a86f6d172acc87fc69f290f9386f3d72f478a1bf348509fea8b7a66c9b80fec1a8b7a66a53f47cc2fe9b5ae77346fe35ad09e761703081d12f9b68c2fc57ce6d0c1e6fe463934ce0efc63234c11ffd5b4a13c66f9cb53d79fded832bcd27f47f5aeb59055e744eb1df3fe2251aeee4e7453f9264c27aa847b44f7f4f909fda3efb7ae30c5c84b65f1fef435b9a608ff7a4ad4c981ffb6b6b13d8fda5edfb37eff4dcb65e2f787f5a7cb0f7fd0413ecf13eb49d09f6783ff07cf97d8ec0a3f8d8df516f483faf07c45b1f27e9f30ff989e9fdbe11ff1034fd3c9eebe068c238fa9f6677f2fb27ac1f475dd3f97da25fc6c204be755673ef3f8db3360c1f1f824b13c651df2877c44fd0df511efe5ea39f44318151cf9a4e2ab0af870d63fee4dc55fdfe109f880ff3fb788a8ff98df733762630fa471aa6febda2839e5b3f0fe1bef4f18bc9fb01fa7dca4ce0bb9e5b671ef69c3cff18f99cc626d853cf551f3fe453ca531bbdde979cbb2c793e207f536102a39fa5ca0446bf4279f97b89feaabb5181511f38bedf2ffa47373461bdcfe0dc8471d46387860fc6fbaad155c11ef7a5d953747ede69cf2a30fe3fd06c5121fe88572726f8a37f68720ffbfdadf7ac02fb7e82098c7e85ebf2fde37dea92098cf7acc367bc33fbff7a6ecfc4c22d078eaac41d1ff0e4d7f66a7df84293e71ecfec858f9ee8d1fef8a9c733fb139ef2299ff1395ff0255fc167c233befee1f1cc3ef10ddff21ddff303cfabe77bd584177891971e3d7ed8db4e7b2df30aaff29a7aac3ff9ebe4a9bdf2067fe04ddee28ffafb36eff027de558fcfbaab2ffc95bf3db5578b3dfecefb3ce411673c56ceb9e0b23f47a5fbac7fb26f889988742f2a129e504b81a246e0c8ec293cb7a7441d0b1dd0840ee9883486744253bea4533a7bd5fe9c2ed4feb29fff4aff32a36b8dd5e92fe6bfa15bddcf1dddd303cd93c6911668aa2b5cbc363f3c16799f9630fbb2d20aadd21aadeb3d547a8617f6f0d8a00fb4495bfadb47daa61dfa84f977e933c597f64f6e6c9fbed057fa467bf49df669c8bb34a2eca53d8d35576ef88e722aa8a48a6a6a448320a20fd36bf3eb7f407c2c89efb5500f6422877224c77222533915e6b397fbd117f54ccee54275295732936bb9915bb9937b797869ff34e7649ecfe4bd2ce81a8bbc2a4bb2fc5a3dfe2c59915559fb75fdfe8f7affe7f7b97f011cdd9635</data>
+ </image>
+ </images>
+</ui>
diff --git a/examples/activeqt/webbrowser/webaxwidget.h b/examples/activeqt/webbrowser/webaxwidget.h
new file mode 100644
index 0000000..0e82311
--- /dev/null
+++ b/examples/activeqt/webbrowser/webaxwidget.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WEBAXWIDGET_H
+#define WEBAXWIDGET_H
+
+#include <ActiveQt/QAxWidget>
+#include "windows.h"
+
+class WebAxWidget : public QAxWidget
+{
+public:
+
+ WebAxWidget(QWidget* parent = 0, Qt::WindowFlags f = 0)
+ : QAxWidget(parent, f)
+ {
+ }
+protected:
+ virtual bool translateKeyEvent(int message, int keycode) const
+ {
+ if (message >= WM_KEYFIRST && message <= WM_KEYLAST)
+ return true;
+ else
+ return QAxWidget::translateKeyEvent(message, keycode);
+ }
+
+};
+
+#endif // WEBAXWIDGET_H
diff --git a/examples/activeqt/webbrowser/webbrowser.pro b/examples/activeqt/webbrowser/webbrowser.pro
new file mode 100644
index 0000000..992d871
--- /dev/null
+++ b/examples/activeqt/webbrowser/webbrowser.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+
+CONFIG += qaxcontainer
+
+QTDIR_build:REQUIRES = shared
+
+HEADERS = webaxwidget.h
+SOURCES = main.cpp
+FORMS = mainwindow.ui
+wince*: FORMS = wincemainwindow.ui
+
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS webbrowser.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/webbrowser
+INSTALLS += target sources
diff --git a/examples/activeqt/webbrowser/wincemainwindow.ui b/examples/activeqt/webbrowser/wincemainwindow.ui
new file mode 100644
index 0000000..98a9ddb
--- /dev/null
+++ b/examples/activeqt/webbrowser/wincemainwindow.ui
@@ -0,0 +1,299 @@
+<ui version="4.0" stdsetdef="1" >
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow" >
+ <property name="objectName" >
+ <string notr="true" >MainWindow</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>812</width>
+ <height>605</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Qt WebBrowser</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QFrame" name="Frame3" >
+ <property name="objectName" >
+ <string notr="true" >Frame3</string>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QAxWidget" name="WebBrowser" >
+ <property name="objectName" >
+ <string notr="true" >WebBrowser</string>
+ </property>
+ <property name="focusPolicy" >
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="control" >
+ <string>{F5AFC7EF-1571-48B6-A69C-F1833F4C3A44}</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QToolBar" name="tbNavigate" >
+ <property name="objectName" >
+ <string notr="true" >tbNavigate</string>
+ </property>
+ <property name="windowTitle" >
+ <string>Navigation</string>
+ </property>
+ <addaction name="actionBack" />
+ <addaction name="actionForward" />
+ <addaction name="actionStop" />
+ <addaction name="actionRefresh" />
+ <addaction name="actionHome" />
+ <addaction name="separator" />
+ <addaction name="actionSearch" />
+ </widget>
+ <widget class="QToolBar" name="tbAddress" >
+ <property name="objectName" >
+ <string notr="true" >tbAddress</string>
+ </property>
+ <property name="windowTitle" >
+ <string>Address</string>
+ </property>
+ <widget class="QLabel" name="lblAddress" >
+ <property name="objectName" >
+ <string notr="true" >lblAddress</string>
+ </property>
+ <property name="text" >
+ <string>Address</string>
+ </property>
+ </widget>
+ <widget class="QLineEdit" name="addressEdit" >
+ <property name="objectName" >
+ <string notr="true" >addressEdit</string>
+ </property>
+ </widget>
+ <addaction name="actionGo" />
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="objectName" >
+ <string notr="true" >menubar</string>
+ </property>
+ <widget class="QMenu" name="PopupMenu" >
+ <property name="objectName" >
+ <string notr="true" >PopupMenu</string>
+ </property>
+ <property name="title" >
+ <string>&amp;File</string>
+ </property>
+ <widget class="QMenu" name="FileNewGroup_2" >
+ <property name="objectName" >
+ <string notr="true" >FileNewGroup_2</string>
+ </property>
+ <property name="title" >
+ <string>New</string>
+ </property>
+ <addaction name="actionNewWindow" />
+ </widget>
+ <addaction name="FileNewGroup" />
+ <addaction name="FileNewGroup_2" />
+ <addaction name="separator" />
+ <addaction name="actionFileClose" />
+ </widget>
+ <widget class="QMenu" name="unnamed" >
+ <property name="objectName" >
+ <string notr="true" >unnamed</string>
+ </property>
+ <property name="title" >
+ <string>&amp;Help</string>
+ </property>
+ <addaction name="actionAbout" />
+ <addaction name="actionAboutQt" />
+ </widget>
+ <addaction name="PopupMenu" />
+ <addaction name="unnamed" />
+ </widget>
+ <action name="actionGo" >
+ <property name="objectName" >
+ <string>actionGo</string>
+ </property>
+ <property name="icon" >
+ <iconset>image0</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Go</string>
+ </property>
+ </action>
+ <action name="actionBack" >
+ <property name="objectName" >
+ <string>actionBack</string>
+ </property>
+ <property name="icon" >
+ <iconset>image1</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Back</string>
+ </property>
+ <property name="shortcut" >
+ <string>Backspace</string>
+ </property>
+ </action>
+ <action name="actionForward" >
+ <property name="objectName" >
+ <string>actionForward</string>
+ </property>
+ <property name="icon" >
+ <iconset>image2</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Forward</string>
+ </property>
+ </action>
+ <action name="actionStop" >
+ <property name="objectName" >
+ <string>actionStop</string>
+ </property>
+ <property name="icon" >
+ <iconset>image3</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Stop</string>
+ </property>
+ </action>
+ <action name="actionRefresh" >
+ <property name="objectName" >
+ <string>actionRefresh</string>
+ </property>
+ <property name="icon" >
+ <iconset>image4</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Refresh</string>
+ </property>
+ </action>
+ <action name="actionHome" >
+ <property name="objectName" >
+ <string>actionHome</string>
+ </property>
+ <property name="icon" >
+ <iconset>image5</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Home</string>
+ </property>
+ </action>
+ <action name="actionFileClose" >
+ <property name="objectName" >
+ <string>actionFileClose</string>
+ </property>
+ <property name="iconText" >
+ <string>Close</string>
+ </property>
+ <property name="text" >
+ <string>C&amp;lose</string>
+ </property>
+ </action>
+ <action name="actionSearch" >
+ <property name="objectName" >
+ <string>actionSearch</string>
+ </property>
+ <property name="icon" >
+ <iconset>image6</iconset>
+ </property>
+ <property name="iconText" >
+ <string>Search</string>
+ </property>
+ </action>
+ <action name="actionAbout" >
+ <property name="objectName" >
+ <string>actionAbout</string>
+ </property>
+ <property name="iconText" >
+ <string>About</string>
+ </property>
+ </action>
+ <action name="actionAboutQt" >
+ <property name="objectName" >
+ <string>actionAboutQt</string>
+ </property>
+ <property name="iconText" >
+ <string>About Qt</string>
+ </property>
+ </action>
+ <actiongroup name="FileNewGroup" >
+ <action name="actionNewWindow" >
+ <property name="objectName" >
+ <string>actionNewWindow</string>
+ </property>
+ <property name="iconText" >
+ <string>Window</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+N</string>
+ </property>
+ </action>
+ <property name="objectName" >
+ <string>FileNewGroup</string>
+ </property>
+ </actiongroup>
+ </widget>
+ <connections>
+ <connection>
+ <sender>addressEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>actionGo</receiver>
+ <slot>trigger()</slot>
+ </connection>
+ </connections>
+ <layoutdefault spacing="6" margin="11" />
+ <images>
+ <image name="image0" >
+ <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54103b11c8563600020b03105719c4b530b08072f50880513560a09c080338d5209420294a4451a38c90426621ab5146d10de524a2aa417505445122861a547722bb0c971a3d2aa921c2ae446c6a9431fc85a9064551220e354009653dec00294e712a1ac4e97078a9a9b5e6020013b3f563</data>
+ </image>
+ <image name="image1" >
+ <data format="XPM.GZ" length="4494" >789ce596497332470c86effe15947573a5f4c1cc30cc542a07ef60bc808dd7540e3d9b6df006186c93ca7f8fba2535ce57be98dc9292313c487a2575f7ccf063a376d53baa6dfc589bbe9ad7fbbc96df99496da3983d3e7efcfec76f7faead87418dfe1a51500bd67f595befbfd6f2daf1f35369014e08a05e6fd4ab96e31e73d0282bc7a7cae23ff3ccfe8170ca6cee9843f51f3b4ec8cff9efccdebf2d2cf9b06bb9417a25c74f98bdff99390a84fb8e49af70f39891b2e40bfbf8b6b0917e87968346a8f5a6cc51c07ab02f2cf1983237552f709c86691e3bbd5be5821998a32067bd1765d13f67563d530a4b3df8b01c523d8ec74059faed086bfc82390e851b8ed3c86485e34365a9bfc5ece3df8433e10bcb5140f5dd3cf0e099f32f99e350cecb5858f2b1c1dc52fda663d334a277c0ecfd5d61c9373973120967969b548fd71b079e797d8e985b21eb63aecceb85e7c299f4ffaa2ce7739359ebc195631387c6ad1f5e302791ccbba72cf173e15cfa2d2cc7619cf1fa63c9dccaa4ff4bcfdc7fa82cfdf7999348f6bf299c4bfd4c59ea0f99535dafca71d60a65ffebca52ff8c3989e47cce98351fb785759e7bcbad65bf0be624ca9a8e87caac0fb1702ef191b2cc9731a7b9ec4f87d934659e27e142f8c671e6eb9d0ae7b2be07cc6924ccf999698a7e4f58f572e64cebb9f393444994e68e4365d9ff7be15caef70766ad678cb0f8f18359ebe109b3af27f199fadd794cf254eb196599774758e77d5496f5dd64a67959af122ef87c639b59eb81d34ba97fe3f4215196f3922acbbc28acf527cc792c7a857029ecf63bcded05efb8a52cf3cc9833ed2f66563dac0b8b1ebe3317ea77f73352173db8f6ccf54a66df0f30fb7c777d9bc214d2cf88d9cf73cfece3ddf3296b66da7fe199d7a32b5cc8feef31fbfe8f99bdde96b0faddf3272bac390665b99e90d9e7ef33972de9d73d7ff3d873255c49fc1b73257ee4f8d2eb5d336b3e8e8535ff86d9e7bbf35f2cf51366ef77cfeb6299df62563f3c0a8b1fdcf3d3569778773f756e66f7fcac967e175f797ffff5dfd9ff4103010d6698a35955030b2cb1c25bbcc3fbd5344861882352b8c5077c5c45836678c267ca7fc1314ebeaf81537cc599eb608e6ff88e1f2b682c705314b6486182dbb8f31d0ddca529f644619ff2db641d3cf82a8bfa9d62d7da670d3cc4233c760a63eaa08d2734478fac8f87ffc833788a6738c073bc20ebe3255eb1069d863e5e3b851bacfb7c6b0d0c30c488f24a3a2d4ddaf1986a3d600b13179be280ef597809e876e206000c69d8ec0e590f32c8a18012b7a0825b9799e018eee0de4e0b4318c103ff2ea2985b78c47d28a487ce276b634cca40356d1655801c3bf044af2136e0195ef8b711be4045ab50ff42e16bdbb6463d8e610253fe3d4855ec3ed80abd9f62397ef9c9e6cee835249bc31bbc731ff0010beacbcdbfaca29f2836a3e839fd1f3acb5cb6fd6e13b6605b34766097d6664cdf0d7faad9813dd827df08daf4de812ddaa7061c4017baf43ea6daef70c8fb0247704c932dc897b94e67da09553a811ef4a94a0f4ee10c069435216b630ae7a43b800b7fc6164ea543ea73ea75663b22a50e5cc215ec50956beaf606ead08080147b64c76403d20ebdc6142268528d3655ee3a1db6f88b535ee015b42081d4205ee1f4f335878501ea7644331dc81acecdb7ef63b86b32eae59956cff63237f92af7319c9a82669c989256bd0b6fa6fabe86bbfe0ecdadb9a399ce61b49a86355adfbedd45736756bc27b30afd161a9a9179585de33bf69fd2f8ebd7b5bf014644b906</data>
+ </image>
+ <image name="image2" >
+ <data format="XPM.GZ" length="4494" >789ce5965b4f23471085dff915d6d6db2aaac5e3b92aca037703cbc55c8c21ca43cf8c8d0dd85c6c307694ff9eeaaed3bd68771f968d14298a0a109fabebd4e99a9ef17cfad8e81d1f343e7e5a99cecc6c5435aaa1796a7cac9fc7e3c5ef7ffcf6e7ca8756d4909f661c35a20fbfac7ce8cc1a55e3f07ed2b7409702b4badaccfb996563020f5c7ecbf340b9a31c3591dff7ac7943e002cc8e73cf74acdcc27a8a2d37a5be4e1d9f04567f9fc105f25dcfea9726caad62a07c1158f58f94e3087e868ea57fa5fa0be590bfb11c3525affd4e03ebfa25b8507fbcaa1c47ca66e459fdf10c6c30af4dcfda8f5f9513dfffce71e1f5a956967adddfaeb25f4f7b60e8d199e596f42f6bc787ca213f554e5be06dc7a28ffdee282791cedb5c83d19fd795a55ecf4b3fb0ee07ebd312fae796e3283665e238524e2265de031bcc774d396d61be25b8c4fe1f02abfeab67f49f2867decfbd6393b6a03f03438f3bca19fa51cb33fc6f80fd7eae2c27e257e7cb4de5b4045f78d679f24960ddcfb172e6f73357ce63e88fc115ce43e558fcabbeb905fb7e47cae24ff5daca41af007bbd81e5b425f53aff6160d52f95f318f37d01a39ee7ca05f4790a469e0e1c97590bfa1b81f53c3e2bfbf5ecf697b532efe754398f31af437085eb65948b18e723f70cbf9e2bcc633db0f65b533609fcbafb372bf318fdcfc015e65b281731ee0ff6acf70767ca5e8f7be01abcab5cfa7e89e53cce2ba3fd1681b5df8172013f44e00acfbf4a39e8ef287b7dbe02234feefce795d727a36c12ccf75239d4b7c1bede9def42fcc0ef7960d5cbc05ebf543635aed752b94aa1ff02ee83ddf3b6a87c3d3f2b9b047a4fcaa17e0cf6f5eef928ab13f5476960d5eb7ac6f5dd07d7e04839e83d29d7be9ffbfe31b50dc723cfa87f08acf947e51a7ad457ee6760773ecaa4f47e36036bfd96673c3fb6c13578a01cf41f9505d5af3b2f655dc28fa93da33e550ef523e5e06f08861eb9e7b94cdfe7ddf753d50feb6f94437e00f67edcf3aa4e831ed8afe73bb05fefe655f7c37edcfd62bb81ddfb82935776cfeb41c87766ff2cfe7f1a4c6cb8e48ae91f68d4dce7015ff390473fad71c3b77cc7639ef03d3ffcb48f013ff293a84c79c6d54f693c8bc28b28589539bff2e2ed647e586389184bacf13a6ff0e6d71a32f92dde96bfdf9dbccc6387dba2d086caae4c668ff7bf68f0673ee0433ee263eef0099ff2199f8b62d0e32e5f704fea2fe5b70d3f57729556b91b349a1c718b634e64faa9fc7fc919e772220a91213254ca273b884bf72b4a54f1846ad925e93b1af56940d734a4110fe4efb5c40dddda907311734c7752d10b3a1ae289c634a17b7dafe331e995b3b124fbdfd25d85471763596fab7aa2a4f53d444653ded3773bb96e8faeae1de2ea8dff9da0b0ebfcd858e3357aa667bb1f68b4a5e7d256853559e8f56d64aefe85e6f44a0b5aea3bac5c2bebf74b8775fb6bfbb858771e7a6f1df09c36f89a36698bb6f53d5c4ef08ee4e6a2dd269b9d488729ed4a171b7bd40ece3228cce5d305edd3673ed7773139bd133a14d5233a96cff7a9237142a77446e7125dba900e70681564f5a6acdc1285ae9e0feaf150d675e8d2d59dd315ad52931fec2973d1a5489c6698e29c5a508829797bd629a52665bcf9fdd32ed95c1d50217b5c18b67390f34befb8e78873a9b6b39ad285216328a2de3bef5b32a59db5ccec42a6b565aaf7dffba6e663d3972b211ea86b065f3cbccbc7b53890399a21a55f677f5863e4f670c337df667f58e3d6dc99dbef3dd5ff6bdf73ff82c65fbfaefc0d4fb5b868</data>
+ </image>
+ <image name="image3" >
+ <data format="XPM.GZ" length="802" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232325500210543251d2e25658564056503300071f540dc3430007371012a492a830156496538c094848922c9c2259134c099304914e3604c8424aa5e6449b0044216ca824ba2da8b4512218b4d122e8b55520fee5974072164511da487ea490c7f22cba249e20d3efc018f3fcae0d2702eb5d2106992b5d65c00b9a48974</data>
+ </image>
+ <image name="image4" >
+ <data format="XPM.GZ" length="1241" >789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade65232365200210543251d2e253d856405bffcbc54105b19c8563600020b03103711c4b530b08072f50880513524ab518681443435ca984ae08ae06a94114a10ac443435ca3043904d4c4453a38ca604ae11590d9a0ab80bd0d46078914c35c4d885a608871a547f61f81d5d117a1862018930e5b8d5c0950c741a1b1e6a6aadb90086a9d853</data>
+ </image>
+ <image name="image5" >
+ <data format="XPM.GZ" length="5598" >789ca5985973db480ec7dff3295cc15b6a0b2351a428d6d63ef83e255bbe647b6a1fd02465dd872d9f53f3dd076c005dc926ce6a32eed8553f37fadf7fa0c1a69cdfbe6cdc9cb537befcf6e97145ab61be910fe861e34bf1349dbefdfedffffcf1e97323dae07f51bdbe117dfed7a7cfddd546bed199cfca0ae888016afeab62e8796ef110ee545caf05be16ae5bfc6ee096e7b6e756983f51b6f53b81257ecfb8eee7e9b162f66af1c78125fe48987f23f3fb81657e691cd5bddecc7316d555efd058f7eb2867aa771058f4de8c55cffb6dd4a34cf5b68d357e681c6515634db81a7e3ef59c35cccf5560bf9ef6953389c77660af074f15c751e05c38a6d81f2ef9f3a848f4e9d658f2c36b635dbfa54cc2383556bd33e12492fc70df38f1f3f8ae4cc2745a711285fda7caa4f95e06967a2d8c63f27a8fc2a60fa4acfa980a371b898f0767dc6cf8fdbc9f84c27e4de124d2fabe186b3dee8c75ff1365dbef2db0ccef0987fd2f2a6632fd576552fd2b63d57b08ecd7d39d70b321fd0560acfb6d1a4b7e3050764de7d79f08a70de937ea7b7689e68f4de1e0776e2c7ab8abecb47eb170aa7ee822b0e89f1b4b7fd24dc529abe9794f02cbf99e2b3badc7a5b1ee97089b3e0e8d253f3c364e253e5576120ff7c63a9f7966d2e771d358e75bca4ef3bb0e2cf9758db5fe47c6b21eeb81bd3f07c2ad58ebd130d67e6a194b3cf97e62b2fa24c67a1f5d2aab3f8781a53e17c6eaa7082cfa3de156acf9d5034b7e3563f1eb96c6eaf7c0b815fbf8d2739e3aedefb1b1de9723618b77a49cebf946c6e20f5f8d251e753e8b5bb9e74c980a4afc7a7fbf66b1ed8fb7c67a9ec7c2ad5cfd74038bdfa6b1f6cbd458fd2e84b358efbb0363f5b71358fccd8c33596f9c4bfddcc458fac78d8cf5797b3296f5f82c4c49e6f5c9bf9fb23ce41307967e3935d6f36c0b67b1ce3f188b5f3757367f5363b98fdc38b0cc0f8cf5f90bf3ea97028bfe50981289777d63edcf81b1c4439897f3c52d615738cfe0df371c1deb7db265acf98d8d253f7a50d67a60c758cfcbf4cc7f2fb0f8bf1736bfae30d6f35f1a4b3ce6c6e2df95ca85f6f7dc58f3db0e5c783e14e6ebc533e87e963fbe0873f9fd3cc97c91693fd028b0d4e3c558f3eb0b9b5f972bab3fe78c353f3056bfabc0e2371636bfe4cf9b29d1e76b69acfdb863accfd33cb0dc2fa7c6e2179e03cb79ae940b7dffbf1b6bfd1363f53b12367f581a6b3d1bca56df6e60a9bfc6e765def4ecef6bc7eafaf9e8d558fbb7a15ce87d7263acf7ffbdb1e40f33e1e0cf29ebfea8eb6d7ff29f17f8f4137dfe51d8fa0117ca65ee3fbfe3bd705116b2de9f775e3af50313e1a229f1f0682cf1b052e6e1d9dfbf1cddd4fd2363cdcfef5fb05b7d1f0c944bed4f67ac9f5f27c265bf4c3d9f07eefb787f1f96695eaa1e0a174d7d7f81b1ee4f81a5fe75e552d9bf1fca7e617e9e8d556f33b0c4fbcf5ffdb44c956bc6a2d75dfd6c2020fd3ce2ff69a0c31c0b2cff91461fef71804374bfaa81231ce3044b9ce2ecd734380fc2392e70890ff888bfa6f184cff8c24e5ef10ddf71f3a37c3ed6c015afdec26dfeb983bbb887fb78f0f734380fe031c7437f3247788c27d8fe713e1f6a1076f014cfb08be7ac7481977885d75c951fe4f3630dcea3c3eb7b9cc70d6b9ce12d9fee26de610debeb69b0fb578cb89a0d8c399711e794609373d9c39455f2b53466d8c20c17809c45cc7a3c00f011081cffccff379fef35388f1d0428a0c401f459e58c3d45700f0003cee71d8678fc730d7430e2557d3c8331f7568c37308129cc7006733e9d262c6008cb6ff3f94ea3c72bc678ca3f1fb80a637884154c71c974c55d72c91a4feca4fdf553f8ad46554d8e9ee30a9eb1efab31611f2ff0ca346427bb9c11e114debe7e7ebed328318702e7f0ce9dbee47a1c724655b745b0c94ea6b0c55519f059b98f73d19a6cc30eecc21eecfb7100877004c770026de8e070bdfe805338832e9cc3055cc2955f7b0d3de8f0cfebb5356ee016eea0c6a30e11342086049a907aadcd35355a90111250f5e5288706bfdb4bea572a78b49e06ddd3a0d2807a2502110d6944639ad09466ebf9e8ae684e0bf5b1a4075ab28f11ffa1df678dc7f57cb0c68a9ee899355e7c2ddbf40a31bdb1c63bcdfe86c6803669cb9f4555c76b38a76dcee57d5d1f5c8f1d5af0b9745581bb029a5c8f3eedd21eed73b70ebe56fa91061dd061f05139e9d1116b1cfb9aee55c4fcf6330d5cd289d778a6b65fdd831dea702e256b9cf2b974a84367d4fd580347744e17744957acc13e7cfc095d538f356ed8cd2ddd518dea147da4c1956890ffcf295ed5e4c83b4a59f182b9455935e3b801ab791c7fa4e188d7a4bcbee66353feaef9df8852ca2f3e9ee3ef73840f359cabfec22979f4ddbd1bf018ba118f318f899bf298b9b95bb8e537cffe9ffffef4171c39a0bf</data>
+ </image>
+ <image name="image6" >
+ <data format="XPM.GZ" length="3742" >789c8d96c9521c490c86ef3c458775734cc8ddd5b5c6c41c303b180cc60b66620eaacc2c9aa5599b7562de7da45fc5180c8e98fa39f091522e4a49c9bbb783bdedcdc1db77735733991d864198c8e5e06dbc9e4eeffffceb8fbfe7de64d9407f466531c8defc36f76667360883adb3d364c013051ae2039f8147266359068f4dc6740a2e4db05f05d726f0253898c017c6a3cc04ffafce79aa3af0143c36c17e055caa0aacbf06aeb2203e5f09ae4d185f75ce472de6e7737063c2fcb57356b702fed673e32c473d4bcf3760198f02e69325706b022f3a676df0f567e05035d1ed273dc79883e7c1d1045e70ae2456d84fd9738a589f0b703261bc72ae25e17ee4b0e7d8f3b5733374e603e32c37c11ff36970db12f193f7e07c1c6bec87c6e0c604ff0e1c4db03f36cec7e3a6f4fd2e38e779eee7bd05e7e350fa7e4fc0455ee6b84fb9eab913bfdf1c5ce5758efba54fffb1e75302d726f8af3817a5f8f922584cf06fc0211f951ebfd0b30afe07ce4510dfdf1e38e665e9f9f1e01c32cf1fda06a73c2f7c7eac5f8c8b61eef582f315b909dc82f1c17e07dc1459e5f1c77d953abb787e0ab832611cf957366dd9c707f556762a3fcf8673ddd6d8afdc1957b909fe98af2a65d4c787c08d09e3c8bfaad504f378de83a309e35fc049d9d747bda19c7dbe8f602d88d6fd11af3a33c1ffde398e02ec69178c0b04bb7fa12be03e08e7ab4b895e2f74ec1ca2e73f6d811b2d37df1feaa9969082f71ff4a73a98c01f9cdb3678fde27eea58f7f9cdc8bfba33c11efda2199ac01bcead048fd72678a4e9e3f6a86f6d172acc87fc69f290f9386f3d72f478a1bf348509fea8b7a66c9b80fec1a8b7a66a53f47cc2fe9b5ae77346fe35ad09e761703081d12f9b68c2fc57ce6d0c1e6fe463934ce0efc63234c11ffd5b4a13c66f9cb53d79fded832bcd27f47f5aeb59055e744eb1df3fe2251aeee4e7453f9264c27aa847b44f7f4f909fda3efb7ae30c5c84b65f1fef435b9a608ff7a4ad4c981ffb6b6b13d8fda5edfb37eff4dcb65e2f787f5a7cb0f7fd0413ecf13eb49d09f6783ff07cf97d8ec0a3f8d8df516f483faf07c45b1f27e9f30ff989e9fdbe11ff1034fd3c9eebe068c238fa9f6677f2fb27ac1f475dd3f97da25fc6c204be755673ef3f8db3360c1f1f824b13c651df2877c44fd0df511efe5ea39f44318151cf9a4e2ab0af870d63fee4dc55fdfe109f880ff3fb788a8ff98df733762630fa471aa6febda2839e5b3f0fe1bef4f18bc9fb01fa7dca4ce0bb9e5b671ef69c3cff18f99cc626d853cf551f3fe453ca531bbdde979cbb2c793e207f536102a39fa5ca0446bf4279f97b89feaabb5181511f38bedf2ffa47373461bdcfe0dc8471d46387860fc6fbaad155c11ef7a5d953747ede69cf2a30fe3fd06c5121fe88572726f8a37f68720ffbfdadf7ac02fb7e82098c7e85ebf2fde37dea92098cf7acc367bc33fbff7a6ecfc4c22d078eaac41d1ff0e4d7f66a7df84293e71ecfec858f9ee8d1fef8a9c733fb139ef2299ff1395ff0255fc167c233befee1f1cc3ef10ddff21ddff303cfabe77bd584177891971e3d7ed8db4e7b2df30aaff29a7aac3ff9ebe4a9bdf2067fe04ddee28ffafb36eff027de558fcfbaab2ffc95bf3db5578b3dfecefb3ce411673c56ceb9e0b23f47a5fbac7fb26f889988742f2a129e504b81a246e0c8ec293cb7a7441d0b1dd0840ee9883486744253bea4533a7bd5fe9c2ed4feb29fff4aff32a36b8dd5e92fe6bfa15bddcf1dddd303cd93c6911668aa2b5cbc363f3c16799f9630fbb2d20aadd21aadeb3d547a8617f6f0d8a00fb4495bfadb47daa61dfa84f977e933c597f64f6e6c9fbed057fa467bf49df669c8bb34a2eca53d8d35576ef88e722aa8a48a6a6a448320a20fd36bf3eb7f407c2c89efb5500f6422877224c77222533915e6b397fbd117f54ccee54275295732936bb9915bb9937b797869ff34e7649ecfe4bd2ce81a8bbc2a4bb2fc5a3dfe2c59915559fb75fdfe8f7affe7f7b97f011cdd9635</data>
+ </image>
+ </images>
+</ui>
diff --git a/examples/activeqt/wrapper/main.cpp b/examples/activeqt/wrapper/main.cpp
new file mode 100644
index 0000000..a403084
--- /dev/null
+++ b/examples/activeqt/wrapper/main.cpp
@@ -0,0 +1,161 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QAxFactory>
+#include <QCheckBox>
+#include <QRadioButton>
+#include <QPushButton>
+#include <QToolButton>
+#include <QPixmap>
+
+/* XPM */
+static const char *fileopen[] = {
+" 16 13 5 1",
+". c #040404",
+"# c #808304",
+"a c None",
+"b c #f3f704",
+"c c #f3f7f3",
+"aaaaaaaaa...aaaa",
+"aaaaaaaa.aaa.a.a",
+"aaaaaaaaaaaaa..a",
+"a...aaaaaaaa...a",
+".bcb.......aaaaa",
+".cbcbcbcbc.aaaaa",
+".bcbcbcbcb.aaaaa",
+".cbcb...........",
+".bcb.#########.a",
+".cb.#########.aa",
+".b.#########.aaa",
+"..#########.aaaa",
+"...........aaaaa"
+};
+
+
+//! [0]
+class ActiveQtFactory : public QAxFactory
+{
+public:
+ ActiveQtFactory( const QUuid &lib, const QUuid &app )
+ : QAxFactory( lib, app )
+ {}
+ QStringList featureList() const
+ {
+ QStringList list;
+ list << "QCheckBox";
+ list << "QRadioButton";
+ list << "QPushButton";
+ list << "QToolButton";
+ return list;
+ }
+ QObject *createObject(const QString &key)
+ {
+ if ( key == "QCheckBox" )
+ return new QCheckBox(0);
+ if ( key == "QRadioButton" )
+ return new QRadioButton(0);
+ if ( key == "QPushButton" )
+ return new QPushButton(0 );
+ if ( key == "QToolButton" ) {
+ QToolButton *tb = new QToolButton(0);
+// tb->setIcon( QPixmap(fileopen) );
+ return tb;
+ }
+
+ return 0;
+ }
+ const QMetaObject *metaObject( const QString &key ) const
+ {
+ if ( key == "QCheckBox" )
+ return &QCheckBox::staticMetaObject;
+ if ( key == "QRadioButton" )
+ return &QRadioButton::staticMetaObject;
+ if ( key == "QPushButton" )
+ return &QPushButton::staticMetaObject;
+ if ( key == "QToolButton" )
+ return &QToolButton::staticMetaObject;
+
+ return 0;
+ }
+ QUuid classID( const QString &key ) const
+ {
+ if ( key == "QCheckBox" )
+ return "{6E795DE9-872D-43CF-A831-496EF9D86C68}";
+ if ( key == "QRadioButton" )
+ return "{AFCF78C8-446C-409A-93B3-BA2959039189}";
+ if ( key == "QPushButton" )
+ return "{2B262458-A4B6-468B-B7D4-CF5FEE0A7092}";
+ if ( key == "QToolButton" )
+ return "{7c0ffe7a-60c3-4666-bde2-5cf2b54390a1}";
+
+ return QUuid();
+ }
+ QUuid interfaceID( const QString &key ) const
+ {
+ if ( key == "QCheckBox" )
+ return "{4FD39DD7-2DE0-43C1-A8C2-27C51A052810}";
+ if ( key == "QRadioButton" )
+ return "{7CC8AE30-206C-48A3-A009-B0A088026C2F}";
+ if ( key == "QPushButton" )
+ return "{06831CC9-59B6-436A-9578-6D53E5AD03D3}";
+ if ( key == "QToolButton" )
+ return "{6726080f-d63d-4950-a366-9bf33e5cdf84}";
+
+ return QUuid();
+ }
+ QUuid eventsID( const QString &key ) const
+ {
+ if ( key == "QCheckBox" )
+ return "{FDB6FFBE-56A3-4E90-8F4D-198488418B3A}";
+ if ( key == "QRadioButton" )
+ return "{73EE4860-684C-4A66-BF63-9B9EFFA0CBE5}";
+ if ( key == "QPushButton" )
+ return "{3CC3F17F-EA59-4B58-BBD3-842D467131DD}";
+ if ( key == "QToolButton" )
+ return "{f4d421fd-4ead-4fd9-8a25-440766939639}";
+
+ return QUuid();
+ }
+};
+//! [0] //! [1]
+
+QAXFACTORY_EXPORT( ActiveQtFactory, "{3B756301-0075-4E40-8BE8-5A81DE2426B7}", "{AB068077-4924-406a-BBAF-42D91C8727DD}" )
+//! [1]
diff --git a/examples/activeqt/wrapper/wrapper.inf b/examples/activeqt/wrapper/wrapper.inf
new file mode 100644
index 0000000..fc17a3d
--- /dev/null
+++ b/examples/activeqt/wrapper/wrapper.inf
@@ -0,0 +1,9 @@
+[version]
+ signature="$CHICAGO$"
+ AdvancedINF=2.0
+ [Add.Code]
+ wrapperax.dll=wrapperax.dll
+ [wrapperax.dll]
+ file-win32-x86=thiscab
+ clsid={23F5012A-7333-43D3-BCA8-836AABC61B4A}
+ RegisterServer=yes
diff --git a/examples/activeqt/wrapper/wrapper.pro b/examples/activeqt/wrapper/wrapper.pro
new file mode 100644
index 0000000..4eb6baf
--- /dev/null
+++ b/examples/activeqt/wrapper/wrapper.pro
@@ -0,0 +1,15 @@
+TEMPLATE = lib
+TARGET = wrapperax
+
+CONFIG += qt warn_off qaxserver dll
+contains(CONFIG, static):DEFINES += QT_NODLL
+
+SOURCES = main.cpp
+RC_FILE = wrapperax.rc
+DEF_FILE = $$QT_SOURCE_TREE/src/activeqt/control/qaxserver.def
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/activeqt/wrapper
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS wrapper.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/activeqt/wrapper
+INSTALLS += target sources
diff --git a/examples/activeqt/wrapper/wrapperax.rc b/examples/activeqt/wrapper/wrapperax.rc
new file mode 100644
index 0000000..453688d
--- /dev/null
+++ b/examples/activeqt/wrapper/wrapperax.rc
@@ -0,0 +1,32 @@
+#include "winver.h"
+
+1 TYPELIB "wrapperax.rc"
+1 ICON DISCARDABLE "..\\..\\..\\src\\activeqt\\control\\qaxserver.ico"
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,0
+ PRODUCTVERSION 1,0,0,0
+ FILEFLAGSMASK 0x3fL
+ FILEOS 0x00040000L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "Nokia Corporation and/or its subsidiary(-ies)"
+ VALUE "FileDescription", "Wrapper Example (ActiveQt)"
+ VALUE "FileVersion", "1.0.0.0"
+ VALUE "LegalCopyright", "Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)."
+ VALUE "InternalName", "wrapperax.dll"
+ VALUE "OriginalFilename", "wrapperax.dll"
+ VALUE "ProductName", "Wrapper Example (ActiveQt)"
+ VALUE "ProductVersion", "1.0.0.0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
diff --git a/examples/assistant/README b/examples/assistant/README
new file mode 100644
index 0000000..85f5a43
--- /dev/null
+++ b/examples/assistant/README
@@ -0,0 +1,38 @@
+Support for interactive help is provided by the Qt Assistant application.
+Developers can take advantages of the facilities it offers to display
+specially-prepared documentation to users of their applications.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/assistant/assistant.pro b/examples/assistant/assistant.pro
new file mode 100644
index 0000000..1477178
--- /dev/null
+++ b/examples/assistant/assistant.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = simpletextviewer
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/assistant
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS assistant.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/assistant
+INSTALLS += target sources
diff --git a/examples/assistant/simpletextviewer/documentation/about.txt b/examples/assistant/simpletextviewer/documentation/about.txt
new file mode 100644
index 0000000..eeab35f
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/about.txt
@@ -0,0 +1,9 @@
+The Simple Text Viewer enables the user to select and view existing
+files.
+
+HTML files is displayed using rich text, while other files are
+presented as plain text. The application provides a file dialog
+allowing the user to search for files using wildcard matching. The
+search is performed within in the specified directory, and the user is
+given an option to browse the existing file system to find the
+relevant directory.
diff --git a/examples/assistant/simpletextviewer/documentation/browse.html b/examples/assistant/simpletextviewer/documentation/browse.html
new file mode 100644
index 0000000..987abf3
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/browse.html
@@ -0,0 +1,34 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Browse</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Browse</h2></center></p>
+
+ <p>
+ The file dialog let you browse the current file system to
+ specify the directory in which the file you want to open
+ resides.
+ Note that only the specified directory will be searched, any
+ subdirectories will simply be ignored.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/browse.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="filedialog.html">File Dialog</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
+ <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
+
diff --git a/examples/assistant/simpletextviewer/documentation/filedialog.html b/examples/assistant/simpletextviewer/documentation/filedialog.html
new file mode 100644
index 0000000..afa65ed
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/filedialog.html
@@ -0,0 +1,48 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>File Dialog</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>File Dialog</h2></center></p>
+
+ <p>
+ In the file dialog you can name a particular file name, or
+ search for files using wildcard matching, i.e. specify a
+ file name containing wildcards. In addition you must specify
+ the directory in which the file you search for resides.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/filedialog.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ By default the dialog will search for all files (*) in the
+ current directory (the directory the application is run from).
+ </p>
+
+ <p>
+ When editing the file name and directory parameters, an
+ overview of the matching files are displayed in the
+ dialog. The overview is updated whenever the parameters
+ change.
+ </p>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="browse.html">Browse</a>, <a href="wildcardmatching.html">Wildcard Matching</a>,
+ <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
+
+
diff --git a/examples/assistant/simpletextviewer/documentation/findfile.html b/examples/assistant/simpletextviewer/documentation/findfile.html
new file mode 100644
index 0000000..32e0147
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/findfile.html
@@ -0,0 +1,32 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Find File</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Find File</h2></center></p>
+
+ <p>
+ To open and view a file in the Simple Text Viewer, select the
+ 'Open...' option in the 'File' menu. The application will then
+ provide you with a file dialog that you can use to search for
+ any existing file.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/fadedfilemenu.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="openfile.html">Open File</a>, <a href="filedialog.html">File Dialog</a>
+ </p>
+ </body>
+</html>
+
diff --git a/examples/assistant/simpletextviewer/documentation/images/browse.png b/examples/assistant/simpletextviewer/documentation/images/browse.png
new file mode 100644
index 0000000..86db6b1
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/browse.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png b/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
new file mode 100644
index 0000000..fde0e43
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/fadedfilemenu.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/filedialog.png b/examples/assistant/simpletextviewer/documentation/images/filedialog.png
new file mode 100644
index 0000000..883a33a
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/filedialog.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/handbook.png b/examples/assistant/simpletextviewer/documentation/images/handbook.png
new file mode 100644
index 0000000..3bd2b92
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/handbook.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/mainwindow.png b/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
new file mode 100644
index 0000000..c28d5e9
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/mainwindow.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/open.png b/examples/assistant/simpletextviewer/documentation/images/open.png
new file mode 100644
index 0000000..1e5bba3
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/open.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/images/wildcard.png b/examples/assistant/simpletextviewer/documentation/images/wildcard.png
new file mode 100644
index 0000000..6e83a56
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/images/wildcard.png
Binary files differ
diff --git a/examples/assistant/simpletextviewer/documentation/index.html b/examples/assistant/simpletextviewer/documentation/index.html
new file mode 100644
index 0000000..5a7b1d5
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/index.html
@@ -0,0 +1,41 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Manual</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Simple Text Viewer</h2></center></p>
+
+ <p>
+ The Simple Text Viewer enables the user to select and view
+ existing files.
+ </p>
+
+ <p><center>
+ <img src="images/mainwindow.png" />
+ </center></p>
+
+ <p>
+ HTML files is displayed using rich text, while
+ other files are presented as plain text. The application
+ provides a file dialog allowing the user to search for files
+ using wildcard matching. The search is performed within in the
+ specified directory, and the user is given an option to browse
+ the existing file system to find the relevant directory.
+ </p>
+
+ <ul>
+ <li><a href="findfile.html">Find File</a></li>
+ <ul>
+ <li><a href="filedialog.html">File Dialog</a></li>
+ <li><a href="wildcardmatching.html">WildCard Matching</a></li>
+ <li><a href="browse.html">Browse</a></li>
+ </ul>
+ <li><a href="openfile.html">Open File</a></li>
+ </ul>
+ </body>
+</html>
+
+
+
diff --git a/examples/assistant/simpletextviewer/documentation/intro.html b/examples/assistant/simpletextviewer/documentation/intro.html
new file mode 100644
index 0000000..2e2aa40
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/intro.html
@@ -0,0 +1,28 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Manual</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Simple Text Viewer</h2></center></p>
+
+ <p>
+ The Simple Text Viewer enables the user to select and view
+ existing files.
+ </p>
+
+ <p><center>
+ <img src="images/mainwindow.png" />
+ </center></p>
+
+ <p>
+ The application provides its own custom documentation that is
+ available through the <b>Help</b> menu in the main window's menubar
+ and through the <b>Help</b> button in the application's find file
+ dialog.
+ </p>
+
+ </body>
+</html>
+
diff --git a/examples/assistant/simpletextviewer/documentation/openfile.html b/examples/assistant/simpletextviewer/documentation/openfile.html
new file mode 100644
index 0000000..e172de9
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/openfile.html
@@ -0,0 +1,36 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Open File</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Open File</h2></center></p>
+
+ <p>
+ Once the file you want to view appears in the dialog's
+ display, you can open it in two different ways.
+ </p>
+
+ <p>
+ By pressing the 'Open' button the currently selected file will
+ be opened. By default, the first file in the list of matching
+ files is selected. Another way of opening a file is to simply
+ double click the displayed file name.
+ </p>
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/open.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
diff --git a/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp b/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
new file mode 100644
index 0000000..660df4f
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/simpletextviewer.adp
@@ -0,0 +1,40 @@
+<!DOCTYPE DCF>
+
+<assistantconfig version="3.2.0">
+
+<profile>
+ <property name="name">simpletextviewer</property>
+ <property name="title">Simple Text Viewer</property>
+ <property name="applicationicon">images/handbook.png</property>
+ <property name="startpage">index.html</property>
+ <property name="aboutmenutext">About Simple Text Viewer</property>
+ <property name="abouturl">about.txt</property>
+ <property name="assistantdocs">.</property>
+</profile>
+
+<DCF ref="index.html" icon="images/handbook.png" title="Simple Text Viewer">
+ <section ref="./findfile.html" title="Find File">
+ <keyword ref="./index.html">Display</keyword>
+ <keyword ref="./index.html">Rich text</keyword>
+ <keyword ref="./index.html">Plain text</keyword>
+ <keyword ref="./findfile.html">Find</keyword>
+ <keyword ref="./findfile.html">File menu</keyword>
+ <keyword ref="./filedialog.html">File name</keyword>
+ <keyword ref="./filedialog.html">File dialog</keyword>
+ <keyword ref="./wildcardmatching.html">File globbing</keyword>
+ <keyword ref="./wildcardmatching.html">Wildcard matching</keyword>
+ <keyword ref="./wildcardmatching.html">Wildcard syntax</keyword>
+ <keyword ref="./browse.html">Browse</keyword>
+ <keyword ref="./browse.html">Directory</keyword>
+ <keyword ref="./openfile.html">Open</keyword>
+ <keyword ref="./openfile.html">Select</keyword>
+
+ <section ref="./filedialog.html" title="File Dialog" />
+ <section ref="./wildcardmatching.html" title="Wildcard Matching" />
+ <section ref="./browse.html" title="Browse" />
+ </section>
+ <section ref="./openfile.html" title="Open File" />
+</DCF>
+
+</assistantconfig>
+
diff --git a/examples/assistant/simpletextviewer/documentation/wildcardmatching.html b/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
new file mode 100644
index 0000000..eb1839a
--- /dev/null
+++ b/examples/assistant/simpletextviewer/documentation/wildcardmatching.html
@@ -0,0 +1,57 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>Wildcard Matching</title>
+ </head>
+ <body style="font-size:12pt;font-family:helvetica">
+
+ <p><center><h2>Wildcard Matching</h2></center></p>
+
+ <p>
+ Most command shells such as bash or cmd.exe support "file
+ globbing", the ability to identify a group of files by using
+ wildcards.
+
+ <br />
+ <br />
+ <table align="center" cellpadding="2" cellspacing="1" border="0" width="100%">
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><center><img src="images/wildcard.png" /></center></td>
+ </tr>
+ </table>
+
+ <br />
+ <br />
+ <p>
+ Wildcard matching provides four features:
+ </p>
+
+ <ul>
+ <li>Any character represents itself apart from those
+ mentioned below. Thus 'c' matches the character 'c'.
+ </li>
+ <li>The '?' character matches any single character.</li>
+ <li>The '*' matches zero or more of any characters.</li>
+ <li>Sets of characters can be represented in square brackets.
+ Within the character class, like outside, backslash
+ has no special meaning.
+ </li>
+ </ul>
+
+ <p>
+ For example we could identify HTML files with
+ <code>*.html</code>. This will match zero or more characters
+ followed by a dot followed by 'h', 't', 'm' and 'l'.
+ </p>
+
+ <br />
+ <br />
+ <p>
+ See also: <a href="browse.html">Browse</a>, <a href="filedialog.html">File Dialog</a>,
+ <a href="findfile.html">Find File</a>
+ </p>
+ </body>
+</html>
+
+
+
diff --git a/examples/assistant/simpletextviewer/findfiledialog.cpp b/examples/assistant/simpletextviewer/findfiledialog.cpp
new file mode 100644
index 0000000..f73657e
--- /dev/null
+++ b/examples/assistant/simpletextviewer/findfiledialog.cpp
@@ -0,0 +1,221 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "findfiledialog.h"
+
+//! [0]
+FindFileDialog::FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
+ QWidget *parent)
+ : QDialog(parent)
+{
+ currentAssistantClient = assistant;
+ currentEditor = editor;
+//! [0]
+
+ createButtons();
+ createComboBoxes();
+ createFilesTree();
+ createLabels();
+ createLayout();
+
+ directoryComboBox->addItem(QDir::toNativeSeparators(QDir::currentPath()));
+ fileNameComboBox->addItem("*");
+ findFiles();
+
+ setWindowTitle(tr("Find File"));
+//! [1]
+}
+//! [1]
+
+void FindFileDialog::browse()
+{
+ QString currentDirectory = directoryComboBox->currentText();
+ QString newDirectory = QFileDialog::getExistingDirectory(this,
+ tr("Select Directory"), currentDirectory);
+ if (!newDirectory.isEmpty()) {
+ directoryComboBox->addItem(QDir::toNativeSeparators(newDirectory));
+ directoryComboBox->setCurrentIndex(directoryComboBox->count() - 1);
+ update();
+ }
+}
+
+//! [2]
+void FindFileDialog::help()
+{
+ currentAssistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
+ QDir::separator() + "assistant/simpletextviewer/documentation/filedialog.html");
+}
+//! [2]
+
+void FindFileDialog::openFile(QTreeWidgetItem *item)
+{
+ if (!item) {
+ item = foundFilesTree->currentItem();
+ if (!item)
+ return;
+ }
+
+ QString fileName = item->text(0);
+ QString path = directoryComboBox->currentText() + QDir::separator();
+
+ QFile file(path + fileName);
+ if (file.open(QIODevice::ReadOnly)) {
+ QString data(file.readAll());
+
+ if (fileName.endsWith(".html"))
+ currentEditor->setHtml(data);
+ else
+ currentEditor->setPlainText(data);
+ }
+ close();
+}
+
+void FindFileDialog::update()
+{
+ findFiles();
+ buttonBox->button(QDialogButtonBox::Open)->setEnabled(
+ foundFilesTree->topLevelItemCount() > 0);
+}
+
+void FindFileDialog::findFiles()
+{
+ QRegExp filePattern(fileNameComboBox->currentText() + "*");
+ filePattern.setPatternSyntax(QRegExp::Wildcard);
+
+ QDir directory(directoryComboBox->currentText());
+
+ QStringList allFiles = directory.entryList(QDir::Files | QDir::NoSymLinks);
+ QStringList matchingFiles;
+
+ foreach (QString file, allFiles) {
+ if (filePattern.exactMatch(file))
+ matchingFiles << file;
+ }
+ showFiles(matchingFiles);
+}
+
+void FindFileDialog::showFiles(const QStringList &files)
+{
+ foundFilesTree->clear();
+
+ for (int i = 0; i < files.count(); ++i) {
+ QTreeWidgetItem *item = new QTreeWidgetItem(foundFilesTree);
+ item->setText(0, files[i]);
+ }
+
+ if (files.count() > 0)
+ foundFilesTree->setCurrentItem(foundFilesTree->topLevelItem(0));
+}
+
+void FindFileDialog::createButtons()
+{
+ browseButton = new QToolButton;
+ browseButton->setText(tr("..."));
+ connect(browseButton, SIGNAL(clicked()), this, SLOT(browse()));
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Open
+ | QDialogButtonBox::Cancel
+ | QDialogButtonBox::Help);
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(openFile()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(help()));
+}
+
+void FindFileDialog::createComboBoxes()
+{
+ directoryComboBox = new QComboBox;
+ fileNameComboBox = new QComboBox;
+
+ fileNameComboBox->setEditable(true);
+ fileNameComboBox->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Preferred);
+
+ directoryComboBox->setMinimumContentsLength(30);
+ directoryComboBox->setSizeAdjustPolicy(
+ QComboBox::AdjustToMinimumContentsLength);
+ directoryComboBox->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Preferred);
+
+ connect(fileNameComboBox, SIGNAL(editTextChanged(const QString &)),
+ this, SLOT(update()));
+ connect(directoryComboBox, SIGNAL(currentIndexChanged(const QString &)),
+ this, SLOT(update()));
+}
+
+void FindFileDialog::createFilesTree()
+{
+ foundFilesTree = new QTreeWidget;
+ foundFilesTree->setColumnCount(1);
+ foundFilesTree->setHeaderLabels(QStringList(tr("Matching Files")));
+ foundFilesTree->setRootIsDecorated(false);
+ foundFilesTree->setSelectionMode(QAbstractItemView::SingleSelection);
+
+ connect(foundFilesTree, SIGNAL(itemActivated(QTreeWidgetItem *, int)),
+ this, SLOT(openFile(QTreeWidgetItem *)));
+}
+
+void FindFileDialog::createLabels()
+{
+ directoryLabel = new QLabel(tr("Search in:"));
+ fileNameLabel = new QLabel(tr("File name (including wildcards):"));
+}
+
+void FindFileDialog::createLayout()
+{
+ QHBoxLayout *fileLayout = new QHBoxLayout;
+ fileLayout->addWidget(fileNameLabel);
+ fileLayout->addWidget(fileNameComboBox);
+
+ QHBoxLayout *directoryLayout = new QHBoxLayout;
+ directoryLayout->addWidget(directoryLabel);
+ directoryLayout->addWidget(directoryComboBox);
+ directoryLayout->addWidget(browseButton);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addLayout(fileLayout);
+ mainLayout->addLayout(directoryLayout);
+ mainLayout->addWidget(foundFilesTree);
+ mainLayout->addStretch();
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+}
diff --git a/examples/assistant/simpletextviewer/findfiledialog.h b/examples/assistant/simpletextviewer/findfiledialog.h
new file mode 100644
index 0000000..0c89fda
--- /dev/null
+++ b/examples/assistant/simpletextviewer/findfiledialog.h
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FINDFILEDIALOG_H
+#define FINDFILEDIALOG_H
+
+#include <QAssistantClient>
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QDialogButtonBox;
+class QLabel;
+class QTextEdit;
+class QToolButton;
+class QTreeWidget;
+class QTreeWidgetItem;
+QT_END_NAMESPACE
+
+//! [0]
+class FindFileDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ FindFileDialog(QTextEdit *editor, QAssistantClient *assistant,
+ QWidget *parent = 0);
+
+private slots:
+ void browse();
+ void help();
+ void openFile(QTreeWidgetItem *item = 0);
+ void update();
+
+private:
+ void findFiles();
+ void showFiles(const QStringList &files);
+
+ void createButtons();
+ void createComboBoxes();
+ void createFilesTree();
+ void createLabels();
+ void createLayout();
+
+ QAssistantClient *currentAssistantClient;
+ QTextEdit *currentEditor;
+ QTreeWidget *foundFilesTree;
+
+ QComboBox *directoryComboBox;
+ QComboBox *fileNameComboBox;
+
+ QLabel *directoryLabel;
+ QLabel *fileNameLabel;
+
+ QDialogButtonBox *buttonBox;
+
+ QToolButton *browseButton;
+};
+//! [0]
+
+#endif
diff --git a/examples/assistant/simpletextviewer/main.cpp b/examples/assistant/simpletextviewer/main.cpp
new file mode 100644
index 0000000..1d51376
--- /dev/null
+++ b/examples/assistant/simpletextviewer/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ MainWindow window;
+ window.show();
+ return app.exec();
+}
diff --git a/examples/assistant/simpletextviewer/mainwindow.cpp b/examples/assistant/simpletextviewer/mainwindow.cpp
new file mode 100644
index 0000000..cc2f3c0
--- /dev/null
+++ b/examples/assistant/simpletextviewer/mainwindow.cpp
@@ -0,0 +1,154 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "mainwindow.h"
+#include "findfiledialog.h"
+
+//! [0]
+MainWindow::MainWindow()
+{
+ textViewer = new QTextEdit;
+ textViewer->setReadOnly(true);
+ QFile file("documentation/intro.html");
+ if (file.open(QIODevice::ReadOnly))
+ textViewer->setHtml(file.readAll());
+
+ setCentralWidget(textViewer);
+
+ createActions();
+ createMenus();
+
+ initializeAssistant();
+
+ setWindowTitle(tr("Simple Text Viewer"));
+ resize(750, 400);
+}
+//! [0]
+
+//! [1]
+void MainWindow::closeEvent(QCloseEvent *)
+{
+ if (assistantClient)
+ assistantClient->closeAssistant();
+}
+//! [1]
+
+void MainWindow::about()
+{
+ QMessageBox::about(this, tr("About Simple Text Viewer"),
+ tr("This example demonstrates how to use\n" \
+ "Qt Assistant as help system for your\n" \
+ "own application."));
+}
+
+//! [2]
+void MainWindow::assistant()
+{
+ assistantClient->showPage(QLibraryInfo::location(QLibraryInfo::ExamplesPath) +
+ QDir::separator() +
+ "assistant/simpletextviewer/documentation/index.html");
+}
+//! [2]
+
+//! [3]
+void MainWindow::open()
+{
+ FindFileDialog dialog(textViewer, assistantClient);
+ dialog.exec();
+}
+//! [3]
+
+void MainWindow::createActions()
+{
+ assistantAct = new QAction(tr("Help Contents"), this);
+ assistantAct->setShortcut(tr("F1"));
+ connect(assistantAct, SIGNAL(triggered()), this, SLOT(assistant()));
+
+ openAct = new QAction(tr("&Open..."), this);
+ openAct->setShortcut(tr("Ctrl+O"));
+ connect(openAct, SIGNAL(triggered()), this, SLOT(open()));
+
+ clearAct = new QAction(tr("&Clear"), this);
+ clearAct->setShortcut(tr("Ctrl+C"));
+ connect(clearAct, SIGNAL(triggered()), textViewer, SLOT(clear()));
+
+ exitAct = new QAction(tr("E&xit"), this);
+ exitAct->setShortcut(tr("Ctrl+Q"));
+ connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
+
+ aboutAct = new QAction(tr("&About"), this);
+ connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
+
+ aboutQtAct = new QAction(tr("About &Qt"), this);
+ connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+}
+
+void MainWindow::createMenus()
+{
+ fileMenu = new QMenu(tr("&File"), this);
+ fileMenu->addAction(openAct);
+ fileMenu->addAction(clearAct);
+ fileMenu->addSeparator();
+ fileMenu->addAction(exitAct);
+
+ helpMenu = new QMenu(tr("&Help"), this);
+ helpMenu->addAction(assistantAct);
+ helpMenu->addSeparator();
+ helpMenu->addAction(aboutAct);
+ helpMenu->addAction(aboutQtAct);
+
+
+ menuBar()->addMenu(fileMenu);
+ menuBar()->addMenu(helpMenu);
+}
+
+//! [4]
+void MainWindow::initializeAssistant()
+{
+ assistantClient = new QAssistantClient(QLibraryInfo::location(QLibraryInfo::BinariesPath), this);
+
+ QStringList arguments;
+ arguments << "-profile" << QString("documentation") + QDir::separator() + QString("simpletextviewer.adp");
+ assistantClient->setArguments(arguments);
+}
+//! [4]
diff --git a/examples/assistant/simpletextviewer/mainwindow.h b/examples/assistant/simpletextviewer/mainwindow.h
new file mode 100644
index 0000000..b56d201
--- /dev/null
+++ b/examples/assistant/simpletextviewer/mainwindow.h
@@ -0,0 +1,91 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QAssistantClient>
+#include <QMainWindow>
+#include <QTextEdit>
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ MainWindow();
+
+private slots:
+ void about();
+//! [0]
+ void assistant();
+//! [0]
+ void open();
+
+protected:
+//! [1]
+ void closeEvent(QCloseEvent *event);
+//! [1]
+
+private:
+ void createActions();
+ void createMenus();
+//! [2]
+ void initializeAssistant();
+//! [2]
+
+//! [3]
+ QAssistantClient *assistantClient;
+//! [3]
+ QTextEdit *textViewer;
+
+ QMenu *fileMenu;
+ QMenu *helpMenu;
+
+ QAction *assistantAct;
+ QAction *clearAct;
+ QAction *openAct;
+ QAction *exitAct;
+ QAction *aboutAct;
+ QAction *aboutQtAct;
+};
+
+#endif
diff --git a/examples/assistant/simpletextviewer/simpletextviewer.pro b/examples/assistant/simpletextviewer/simpletextviewer.pro
new file mode 100644
index 0000000..4b66edb
--- /dev/null
+++ b/examples/assistant/simpletextviewer/simpletextviewer.pro
@@ -0,0 +1,16 @@
+CONFIG += assistant
+
+QT += network
+
+HEADERS = mainwindow.h \
+ findfiledialog.h
+SOURCES = main.cpp \
+ mainwindow.cpp \
+ findfiledialog.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
+sources.files = $$SOURCES $$HEADERS $$RESOURCES documentation *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/assistant/simpletextviewer
+INSTALLS += target sources
+
diff --git a/examples/dbus/complexpingpong/complexping.cpp b/examples/dbus/complexpingpong/complexping.cpp
new file mode 100644
index 0000000..18fa66d
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexping.cpp
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdio.h>
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QFile>
+#include <QtCore/QDebug>
+#include <QtCore/QProcess>
+#include <QtDBus/QtDBus>
+
+#include "ping-common.h"
+#include "complexping.h"
+
+void Ping::start(const QString &name, const QString &oldValue, const QString &newValue)
+{
+ Q_UNUSED(oldValue);
+
+ if (name != SERVICE_NAME || newValue.isEmpty())
+ return;
+
+ // open stdin for reading
+ qstdin.open(stdin, QIODevice::ReadOnly);
+
+ // find our remote
+ iface = new QDBusInterface(SERVICE_NAME, "/", "com.trolltech.QtDBus.ComplexPong.Pong",
+ QDBusConnection::sessionBus(), this);
+ if (!iface->isValid()) {
+ fprintf(stderr, "%s\n",
+ qPrintable(QDBusConnection::sessionBus().lastError().message()));
+ QCoreApplication::instance()->quit();
+ }
+
+ connect(iface, SIGNAL(aboutToQuit()), QCoreApplication::instance(), SLOT(quit()));
+
+ while (true) {
+ printf("Ask your question: ");
+
+ QString line = QString::fromLocal8Bit(qstdin.readLine()).trimmed();
+ if (line.isEmpty()) {
+ iface->call("quit");
+ return;
+ } else if (line == "value") {
+ QVariant reply = iface->property("value");
+ if (!reply.isNull())
+ printf("value = %s\n", qPrintable(reply.toString()));
+ } else if (line.startsWith("value=")) {
+ iface->setProperty("value", line.mid(6));
+ } else {
+ QDBusReply<QDBusVariant> reply = iface->call("query", line);
+ if (reply.isValid())
+ printf("Reply was: %s\n", qPrintable(reply.value().variant().toString()));
+ }
+
+ if (iface->lastError().isValid())
+ fprintf(stderr, "Call failed: %s\n", qPrintable(iface->lastError().message()));
+ }
+}
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ fprintf(stderr, "Cannot connect to the D-Bus session bus.\n"
+ "To start it, run:\n"
+ "\teval `dbus-launch --auto-syntax`\n");
+ return 1;
+ }
+
+ Ping ping;
+ ping.connect(QDBusConnection::sessionBus().interface(),
+ SIGNAL(serviceOwnerChanged(QString,QString,QString)),
+ SLOT(start(QString,QString,QString)));
+
+ QProcess pong;
+ pong.start("./complexpong");
+
+ app.exec();
+}
diff --git a/examples/dbus/complexpingpong/complexping.h b/examples/dbus/complexpingpong/complexping.h
new file mode 100644
index 0000000..4c2a473
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexping.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COMPLEXPING_H
+#define COMPLEXPING_H
+
+#include <QtCore/QObject>
+#include <QtCore/QFile>
+#include <QtDBus/QDBusInterface>
+
+class Ping: public QObject
+{
+ Q_OBJECT
+public slots:
+ void start(const QString &, const QString &, const QString &);
+public:
+ QFile qstdin;
+ QDBusInterface *iface;
+};
+
+#endif
diff --git a/examples/dbus/complexpingpong/complexping.pro b/examples/dbus/complexpingpong/complexping.pro
new file mode 100644
index 0000000..4b37b03
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexping.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+
+# Input
+HEADERS += complexping.h ping-common.h
+SOURCES += complexping.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong
+INSTALLS += target sources
diff --git a/examples/dbus/complexpingpong/complexpingpong.pro b/examples/dbus/complexpingpong/complexpingpong.pro
new file mode 100644
index 0000000..cd618d5
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexpingpong.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+win32:CONFIG += console
+SUBDIRS = complexping.pro complexpong.pro
diff --git a/examples/dbus/complexpingpong/complexpong.cpp b/examples/dbus/complexpingpong/complexpong.cpp
new file mode 100644
index 0000000..283e440
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexpong.cpp
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QTimer>
+#include <QtDBus/QtDBus>
+
+#include "ping-common.h"
+#include "complexpong.h"
+
+// the property
+QString Pong::value() const
+{
+ return m_value;
+}
+
+void Pong::setValue(const QString &newValue)
+{
+ m_value = newValue;
+}
+
+void Pong::quit()
+{
+ QTimer::singleShot(0, QCoreApplication::instance(), SLOT(quit()));
+}
+
+QDBusVariant Pong::query(const QString &query)
+{
+ QString q = query.toLower();
+ if (q == "hello")
+ return QDBusVariant("World");
+ if (q == "ping")
+ return QDBusVariant("Pong");
+ if (q.indexOf("the answer to life, the universe and everything") != -1)
+ return QDBusVariant(42);
+ if (q.indexOf("unladen swallow") != -1) {
+ if (q.indexOf("european") != -1)
+ return QDBusVariant(11.0);
+ return QDBusVariant(QByteArray("african or european?"));
+ }
+
+ return QDBusVariant("Sorry, I don't know the answer");
+}
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ QObject obj;
+ Pong *pong = new Pong(&obj);
+ pong->connect(&app, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit()));
+ pong->setProperty("value", "initial value");
+ QDBusConnection::sessionBus().registerObject("/", &obj);
+
+ if (!QDBusConnection::sessionBus().registerService(SERVICE_NAME)) {
+ fprintf(stderr, "%s\n",
+ qPrintable(QDBusConnection::sessionBus().lastError().message()));
+ exit(1);
+ }
+
+ app.exec();
+ return 0;
+}
+
diff --git a/examples/dbus/complexpingpong/complexpong.h b/examples/dbus/complexpingpong/complexpong.h
new file mode 100644
index 0000000..5682e99
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexpong.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef COMPLEXPONG_H
+#define COMPLEXPONG_H
+
+#include <QtCore/QObject>
+#include <QtDBus/QDBusAbstractAdaptor>
+#include <QtDBus/QDBusVariant>
+
+class Pong: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "com.trolltech.QtDBus.ComplexPong.Pong")
+ Q_PROPERTY(QString value READ value WRITE setValue)
+public:
+ QString m_value;
+ QString value() const;
+ void setValue(const QString &newValue);
+
+ Pong(QObject *obj) : QDBusAbstractAdaptor(obj)
+ { }
+signals:
+ void aboutToQuit();
+public slots:
+ QDBusVariant query(const QString &query);
+ Q_NOREPLY void quit();
+};
+
+#endif
diff --git a/examples/dbus/complexpingpong/complexpong.pro b/examples/dbus/complexpingpong/complexpong.pro
new file mode 100644
index 0000000..e62fb85
--- /dev/null
+++ b/examples/dbus/complexpingpong/complexpong.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+
+# Input
+HEADERS += complexpong.h
+SOURCES += complexpong.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/complexpingpong
+INSTALLS += target sources
diff --git a/examples/dbus/complexpingpong/ping-common.h b/examples/dbus/complexpingpong/ping-common.h
new file mode 100644
index 0000000..06228a9
--- /dev/null
+++ b/examples/dbus/complexpingpong/ping-common.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#define SERVICE_NAME "com.trolltech.QtDBus.PingExample"
diff --git a/examples/dbus/dbus-chat/chat.cpp b/examples/dbus/dbus-chat/chat.cpp
new file mode 100644
index 0000000..1dbc764
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat.cpp
@@ -0,0 +1,164 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "chat.h"
+#include <QtGui/QApplication>
+#include <QtGui/QMessageBox>
+
+#include "chat_adaptor.h"
+#include "chat_interface.h"
+
+ChatMainWindow::ChatMainWindow()
+ : m_nickname(QLatin1String("nickname"))
+{
+ setupUi(this);
+ sendButton->setEnabled(false);
+
+ connect(messageLineEdit, SIGNAL(textChanged(QString)),
+ this, SLOT(textChangedSlot(QString)));
+ connect(sendButton, SIGNAL(clicked(bool)), this, SLOT(sendClickedSlot()));
+ connect(actionChangeNickname, SIGNAL(triggered(bool)), this, SLOT(changeNickname()));
+ connect(actionAboutQt, SIGNAL(triggered(bool)), this, SLOT(aboutQt()));
+ connect(qApp, SIGNAL(lastWindowClosed()), this, SLOT(exiting()));
+
+ // add our D-Bus interface and connect to D-Bus
+ new ChatAdaptor(this);
+ QDBusConnection::sessionBus().registerObject("/", this);
+
+ com::trolltech::chat *iface;
+ iface = new com::trolltech::chat(QString(), QString(), QDBusConnection::sessionBus(), this);
+ //connect(iface, SIGNAL(message(QString,QString)), this, SLOT(messageSlot(QString,QString)));
+ QDBusConnection::sessionBus().connect(QString(), QString(), "com.trolltech.chat", "message", this, SLOT(messageSlot(QString,QString)));
+ connect(iface, SIGNAL(action(QString,QString)), this, SLOT(actionSlot(QString,QString)));
+
+ NicknameDialog dialog;
+ dialog.cancelButton->setVisible(false);
+ dialog.exec();
+ m_nickname = dialog.nickname->text().trimmed();
+ emit action(m_nickname, QLatin1String("joins the chat"));
+}
+
+ChatMainWindow::~ChatMainWindow()
+{
+}
+
+void ChatMainWindow::rebuildHistory()
+{
+ QString history = m_messages.join( QLatin1String("\n" ) );
+ chatHistory->setPlainText(history);
+}
+
+void ChatMainWindow::messageSlot(const QString &nickname, const QString &text)
+{
+ QString msg( QLatin1String("<%1> %2") );
+ msg = msg.arg(nickname, text);
+ m_messages.append(msg);
+
+ if (m_messages.count() > 100)
+ m_messages.removeFirst();
+ rebuildHistory();
+}
+
+void ChatMainWindow::actionSlot(const QString &nickname, const QString &text)
+{
+ QString msg( QLatin1String("* %1 %2") );
+ msg = msg.arg(nickname, text);
+ m_messages.append(msg);
+
+ if (m_messages.count() > 100)
+ m_messages.removeFirst();
+ rebuildHistory();
+}
+
+void ChatMainWindow::textChangedSlot(const QString &newText)
+{
+ sendButton->setEnabled(!newText.isEmpty());
+}
+
+void ChatMainWindow::sendClickedSlot()
+{
+ //emit message(m_nickname, messageLineEdit->text());
+ QDBusMessage msg = QDBusMessage::createSignal("/", "com.trolltech.chat", "message");
+ msg << m_nickname << messageLineEdit->text();
+ QDBusConnection::sessionBus().send(msg);
+ messageLineEdit->setText(QString());
+}
+
+void ChatMainWindow::changeNickname()
+{
+ NicknameDialog dialog(this);
+ if (dialog.exec() == QDialog::Accepted) {
+ QString old = m_nickname;
+ m_nickname = dialog.nickname->text().trimmed();
+ emit action(old, QString("is now known as %1").arg(m_nickname));
+ }
+}
+
+void ChatMainWindow::aboutQt()
+{
+ QMessageBox::aboutQt(this);
+}
+
+void ChatMainWindow::exiting()
+{
+ emit action(m_nickname, QLatin1String("leaves the chat"));
+}
+
+NicknameDialog::NicknameDialog(QWidget *parent)
+ : QDialog(parent)
+{
+ setupUi(this);
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ qWarning("Cannot connect to the D-Bus session bus.\n"
+ "Please check your system settings and try again.\n");
+ return 1;
+ }
+
+ ChatMainWindow chat;
+ chat.show();
+ return app.exec();
+}
diff --git a/examples/dbus/dbus-chat/chat.h b/examples/dbus/dbus-chat/chat.h
new file mode 100644
index 0000000..48b549e
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat.h
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CHAT_H
+#define CHAT_H
+
+#include <QtCore/QStringList>
+#include <QtDBus/QtDBus>
+#include "ui_chatmainwindow.h"
+#include "ui_chatsetnickname.h"
+
+class ChatMainWindow: public QMainWindow, Ui::ChatMainWindow
+{
+ Q_OBJECT
+ QString m_nickname;
+ QStringList m_messages;
+public:
+ ChatMainWindow();
+ ~ChatMainWindow();
+
+ void rebuildHistory();
+
+signals:
+ void message(const QString &nickname, const QString &text);
+ void action(const QString &nickname, const QString &text);
+
+private slots:
+ void messageSlot(const QString &nickname, const QString &text);
+ void actionSlot(const QString &nickname, const QString &text);
+ void textChangedSlot(const QString &newText);
+ void sendClickedSlot();
+ void changeNickname();
+ void aboutQt();
+ void exiting();
+};
+
+class NicknameDialog: public QDialog, public Ui::NicknameDialog
+{
+ Q_OBJECT
+public:
+ NicknameDialog(QWidget *parent = 0);
+};
+
+#endif
diff --git a/examples/dbus/dbus-chat/chat_adaptor.cpp b/examples/dbus/dbus-chat/chat_adaptor.cpp
new file mode 100644
index 0000000..4292a58
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat_adaptor.cpp
@@ -0,0 +1,35 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -i chat_adaptor.h -a :chat_adaptor.cpp com.trolltech.chat.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#include "chat_adaptor.h"
+#include <QtCore/QMetaObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+
+/*
+ * Implementation of adaptor class ChatAdaptor
+ */
+
+ChatAdaptor::ChatAdaptor(QObject *parent)
+ : QDBusAbstractAdaptor(parent)
+{
+ // constructor
+ setAutoRelaySignals(true);
+}
+
+ChatAdaptor::~ChatAdaptor()
+{
+ // destructor
+}
+
diff --git a/examples/dbus/dbus-chat/chat_adaptor.h b/examples/dbus/dbus-chat/chat_adaptor.h
new file mode 100644
index 0000000..9d8e7a6
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat_adaptor.h
@@ -0,0 +1,57 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -a chat_adaptor.h: com.trolltech.chat.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#ifndef CHAT_ADAPTOR_H_142741156243605
+#define CHAT_ADAPTOR_H_142741156243605
+
+#include <QtCore/QObject>
+#include <QtDBus/QtDBus>
+
+QT_BEGIN_NAMESPACE
+class QByteArray;
+template<class T> class QList;
+template<class Key, class Value> class QMap;
+class QString;
+class QStringList;
+class QVariant;
+QT_END_NAMESPACE
+
+/*
+ * Adaptor class for interface com.trolltech.chat
+ */
+class ChatAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "com.trolltech.chat")
+ Q_CLASSINFO("D-Bus Introspection", ""
+" <interface name=\"com.trolltech.chat\" >\n"
+" <signal name=\"message\" >\n"
+" <arg direction=\"out\" type=\"s\" name=\"nickname\" />\n"
+" <arg direction=\"out\" type=\"s\" name=\"text\" />\n"
+" </signal>\n"
+" <signal name=\"action\" >\n"
+" <arg direction=\"out\" type=\"s\" name=\"nickname\" />\n"
+" <arg direction=\"out\" type=\"s\" name=\"text\" />\n"
+" </signal>\n"
+" </interface>\n"
+ "")
+public:
+ ChatAdaptor(QObject *parent);
+ virtual ~ChatAdaptor();
+
+public: // PROPERTIES
+public Q_SLOTS: // METHODS
+Q_SIGNALS: // SIGNALS
+ void action(const QString &nickname, const QString &text);
+ void message(const QString &nickname, const QString &text);
+};
+
+#endif
diff --git a/examples/dbus/dbus-chat/chat_interface.cpp b/examples/dbus/dbus-chat/chat_interface.cpp
new file mode 100644
index 0000000..5e2d2a7
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat_interface.cpp
@@ -0,0 +1,25 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -i chat_interface.h -p :chat_interface.cpp chat/com.trolltech.chat.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "chat_interface.h"
+/*
+ * Implementation of interface class ComTrolltechChatInterface
+ */
+
+ComTrolltechChatInterface::ComTrolltechChatInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
+{
+}
+
+ComTrolltechChatInterface::~ComTrolltechChatInterface()
+{
+}
+
diff --git a/examples/dbus/dbus-chat/chat_interface.h b/examples/dbus/dbus-chat/chat_interface.h
new file mode 100644
index 0000000..75140cc
--- /dev/null
+++ b/examples/dbus/dbus-chat/chat_interface.h
@@ -0,0 +1,49 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -p chat_interface.h: com.trolltech.chat.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef CHAT_INTERFACE_H_143021156243606
+#define CHAT_INTERFACE_H_143021156243606
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+
+/*
+ * Proxy class for interface com.trolltech.chat
+ */
+class ComTrolltechChatInterface: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "com.trolltech.chat"; }
+
+public:
+ ComTrolltechChatInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~ComTrolltechChatInterface();
+
+public Q_SLOTS: // METHODS
+Q_SIGNALS: // SIGNALS
+ void action(const QString &nickname, const QString &text);
+ void message(const QString &nickname, const QString &text);
+};
+
+namespace com {
+ namespace trolltech {
+ typedef ::ComTrolltechChatInterface chat;
+ }
+}
+#endif
diff --git a/examples/dbus/dbus-chat/chatmainwindow.ui b/examples/dbus/dbus-chat/chatmainwindow.ui
new file mode 100644
index 0000000..0616dcb
--- /dev/null
+++ b/examples/dbus/dbus-chat/chatmainwindow.ui
@@ -0,0 +1,185 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>ChatMainWindow</class>
+ <widget class="QMainWindow" name="ChatMainWindow" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>QtDBus Chat</string>
+ </property>
+ <widget class="QWidget" name="centralwidget" >
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QTextBrowser" name="chatHistory" >
+ <property name="acceptDrops" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Messages sent and received from other users</string>
+ </property>
+ <property name="acceptRichText" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Message:</string>
+ </property>
+ <property name="buddy" >
+ <cstring>messageLineEdit</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="messageLineEdit" />
+ </item>
+ <item>
+ <widget class="QPushButton" name="sendButton" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>0</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Sends a message to other people</string>
+ </property>
+ <property name="whatsThis" >
+ <string/>
+ </property>
+ <property name="text" >
+ <string>Send</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuQuit" >
+ <property name="title" >
+ <string>Help</string>
+ </property>
+ <addaction name="actionAboutQt" />
+ </widget>
+ <widget class="QMenu" name="menuFile" >
+ <property name="title" >
+ <string>File</string>
+ </property>
+ <addaction name="actionChangeNickname" />
+ <addaction name="separator" />
+ <addaction name="actionQuit" />
+ </widget>
+ <addaction name="menuFile" />
+ <addaction name="menuQuit" />
+ </widget>
+ <widget class="QStatusBar" name="statusbar" />
+ <action name="actionQuit" >
+ <property name="text" >
+ <string>Quit</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+Q</string>
+ </property>
+ </action>
+ <action name="actionAboutQt" >
+ <property name="text" >
+ <string>About Qt...</string>
+ </property>
+ </action>
+ <action name="actionChangeNickname" >
+ <property name="text" >
+ <string>Change nickname...</string>
+ </property>
+ <property name="shortcut" >
+ <string>Ctrl+N</string>
+ </property>
+ </action>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <tabstops>
+ <tabstop>chatHistory</tabstop>
+ <tabstop>messageLineEdit</tabstop>
+ <tabstop>sendButton</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>messageLineEdit</sender>
+ <signal>returnPressed()</signal>
+ <receiver>sendButton</receiver>
+ <slot>animateClick()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>299</x>
+ <y>554</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>744</x>
+ <y>551</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>actionQuit</sender>
+ <signal>triggered(bool)</signal>
+ <receiver>ChatMainWindow</receiver>
+ <slot>close()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>-1</x>
+ <y>-1</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>399</x>
+ <y>299</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/dbus/dbus-chat/chatsetnickname.ui b/examples/dbus/dbus-chat/chatsetnickname.ui
new file mode 100644
index 0000000..fb9894e
--- /dev/null
+++ b/examples/dbus/dbus-chat/chatsetnickname.ui
@@ -0,0 +1,149 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>NicknameDialog</class>
+ <widget class="QDialog" name="NicknameDialog" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>396</width>
+ <height>105</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Set nickname</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>1</hsizetype>
+ <vsizetype>1</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text" >
+ <string>New nickname:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="nickname" />
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>131</width>
+ <height>31</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="okButton" >
+ <property name="text" >
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton" >
+ <property name="text" >
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>okButton</sender>
+ <signal>clicked()</signal>
+ <receiver>NicknameDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>278</x>
+ <y>253</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>96</x>
+ <y>254</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>NicknameDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>369</x>
+ <y>253</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>179</x>
+ <y>282</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/dbus/dbus-chat/com.trolltech.chat.xml b/examples/dbus/dbus-chat/com.trolltech.chat.xml
new file mode 100644
index 0000000..618c8c4
--- /dev/null
+++ b/examples/dbus/dbus-chat/com.trolltech.chat.xml
@@ -0,0 +1,15 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="com.trolltech.chat">
+ <signal name="message">
+ <arg name="nickname" type="s" direction="out"/>
+ <arg name="text" type="s" direction="out"/>
+ </signal>
+ <signal name="action">
+ <arg name="nickname" type="s" direction="out"/>
+ <arg name="text" type="s" direction="out"/>
+ </signal>
+ </interface>
+</node>
+
diff --git a/examples/dbus/dbus-chat/dbus-chat.pro b/examples/dbus/dbus-chat/dbus-chat.pro
new file mode 100644
index 0000000..a094048
--- /dev/null
+++ b/examples/dbus/dbus-chat/dbus-chat.pro
@@ -0,0 +1,19 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += qdbus
+
+# Input
+HEADERS += chat.h chat_adaptor.h chat_interface.h
+SOURCES += chat.cpp chat_adaptor.cpp chat_interface.cpp
+FORMS += chatmainwindow.ui chatsetnickname.ui
+
+#DBUS_ADAPTORS += com.trolltech.chat.xml
+#DBUS_INTERFACES += com.trolltech.chat.xml
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/chat
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xml
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/chat
+INSTALLS += target sources
diff --git a/examples/dbus/dbus.pro b/examples/dbus/dbus.pro
new file mode 100644
index 0000000..36bdc1a
--- /dev/null
+++ b/examples/dbus/dbus.pro
@@ -0,0 +1,12 @@
+TEMPLATE = subdirs
+SUBDIRS = listnames \
+ pingpong \
+ complexpingpong \
+ dbus-chat \
+ remotecontrolledcar
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus
+sources.files = *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus
+INSTALLS += sources
diff --git a/examples/dbus/listnames/listnames.cpp b/examples/dbus/listnames/listnames.cpp
new file mode 100644
index 0000000..dca32e6
--- /dev/null
+++ b/examples/dbus/listnames/listnames.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDebug>
+#include <QtCore/QStringList>
+#include <QtDBus/QtDBus>
+
+void method1()
+{
+ qDebug() << "Method 1:";
+
+ QDBusReply<QStringList> reply = QDBusConnection::sessionBus().interface()->registeredServiceNames();
+ if (!reply.isValid()) {
+ qDebug() << "Error:" << reply.error().message();
+ exit(1);
+ }
+ foreach (QString name, reply.value())
+ qDebug() << name;
+}
+
+void method2()
+{
+ qDebug() << "Method 2:";
+
+ QDBusConnection bus = QDBusConnection::sessionBus();
+ QDBusInterface dbus_iface("org.freedesktop.DBus", "/org/freedesktop/DBus",
+ "org.freedesktop.DBus", bus);
+ qDebug() << dbus_iface.call("ListNames").arguments().at(0);
+}
+
+void method3()
+{
+ qDebug() << "Method 3:";
+ qDebug() << QDBusConnection::sessionBus().interface()->registeredServiceNames().value();
+}
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ fprintf(stderr, "Cannot connect to the D-Bus session bus.\n"
+ "To start it, run:\n"
+ "\teval `dbus-launch --auto-syntax`\n");
+ return 1;
+ }
+
+ method1();
+ method2();
+ method3();
+
+ return 0;
+}
diff --git a/examples/dbus/listnames/listnames.pro b/examples/dbus/listnames/listnames.pro
new file mode 100644
index 0000000..e2096a7
--- /dev/null
+++ b/examples/dbus/listnames/listnames.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+win32:CONFIG += console
+
+# Input
+SOURCES += listnames.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/listnames
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/listnames
+INSTALLS += target sources
+
diff --git a/examples/dbus/pingpong/ping-common.h b/examples/dbus/pingpong/ping-common.h
new file mode 100644
index 0000000..06228a9
--- /dev/null
+++ b/examples/dbus/pingpong/ping-common.h
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#define SERVICE_NAME "com.trolltech.QtDBus.PingExample"
diff --git a/examples/dbus/pingpong/ping.cpp b/examples/dbus/pingpong/ping.cpp
new file mode 100644
index 0000000..d773be4
--- /dev/null
+++ b/examples/dbus/pingpong/ping.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdio.h>
+
+#include <QtCore/QCoreApplication>
+#include <QtDBus/QtDBus>
+
+#include "ping-common.h"
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ fprintf(stderr, "Cannot connect to the D-Bus session bus.\n"
+ "To start it, run:\n"
+ "\teval `dbus-launch --auto-syntax`\n");
+ return 1;
+ }
+
+ QDBusInterface iface(SERVICE_NAME, "/", "", QDBusConnection::sessionBus());
+ if (iface.isValid()) {
+ QDBusReply<QString> reply = iface.call("ping", argc > 1 ? argv[1] : "");
+ if (reply.isValid()) {
+ printf("Reply was: %s\n", qPrintable(reply.value()));
+ return 0;
+ }
+
+ fprintf(stderr, "Call failed: %s\n", qPrintable(reply.error().message()));
+ return 1;
+ }
+
+ fprintf(stderr, "%s\n",
+ qPrintable(QDBusConnection::sessionBus().lastError().message()));
+ return 1;
+}
diff --git a/examples/dbus/pingpong/ping.pro b/examples/dbus/pingpong/ping.pro
new file mode 100644
index 0000000..5e5f07a
--- /dev/null
+++ b/examples/dbus/pingpong/ping.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET = ping
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+
+# Input
+HEADERS += ping-common.h
+SOURCES += ping.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong
+INSTALLS += target sources
diff --git a/examples/dbus/pingpong/pingpong.pro b/examples/dbus/pingpong/pingpong.pro
new file mode 100644
index 0000000..07fca74
--- /dev/null
+++ b/examples/dbus/pingpong/pingpong.pro
@@ -0,0 +1,4 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+win32:CONFIG += console
+SUBDIRS = ping.pro pong.pro
diff --git a/examples/dbus/pingpong/pong.cpp b/examples/dbus/pingpong/pong.cpp
new file mode 100644
index 0000000..fc7800c
--- /dev/null
+++ b/examples/dbus/pingpong/pong.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QTimer>
+#include <QtDBus/QtDBus>
+
+#include "ping-common.h"
+#include "pong.h"
+
+QString Pong::ping(const QString &arg)
+{
+ QMetaObject::invokeMethod(QCoreApplication::instance(), "quit");
+ return QString("ping(\"%1\") got called").arg(arg);
+}
+
+int main(int argc, char **argv)
+{
+ QCoreApplication app(argc, argv);
+
+ if (!QDBusConnection::sessionBus().isConnected()) {
+ fprintf(stderr, "Cannot connect to the D-Bus session bus.\n"
+ "To start it, run:\n"
+ "\teval `dbus-launch --auto-syntax`\n");
+ return 1;
+ }
+
+ if (!QDBusConnection::sessionBus().registerService(SERVICE_NAME)) {
+ fprintf(stderr, "%s\n",
+ qPrintable(QDBusConnection::sessionBus().lastError().message()));
+ exit(1);
+ }
+
+ Pong pong;
+ QDBusConnection::sessionBus().registerObject("/", &pong, QDBusConnection::ExportAllSlots);
+
+ app.exec();
+ return 0;
+}
diff --git a/examples/dbus/pingpong/pong.h b/examples/dbus/pingpong/pong.h
new file mode 100644
index 0000000..4bc45d8
--- /dev/null
+++ b/examples/dbus/pingpong/pong.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PONG_H
+#define PONG_H
+
+#include <QtCore/QObject>
+
+class Pong: public QObject
+{
+ Q_OBJECT
+public slots:
+ Q_SCRIPTABLE QString ping(const QString &arg);
+};
+
+#endif
diff --git a/examples/dbus/pingpong/pong.pro b/examples/dbus/pingpong/pong.pro
new file mode 100644
index 0000000..f377a71
--- /dev/null
+++ b/examples/dbus/pingpong/pong.pro
@@ -0,0 +1,16 @@
+TEMPLATE = app
+TARGET = pong
+DEPENDPATH += .
+INCLUDEPATH += .
+QT -= gui
+CONFIG += qdbus
+
+# Input
+HEADERS += ping-common.h pong.h
+SOURCES += pong.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/pingpong
+INSTALLS += target sources
diff --git a/examples/dbus/remotecontrolledcar/car/car.cpp b/examples/dbus/remotecontrolledcar/car/car.cpp
new file mode 100644
index 0000000..5f3bef9
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car.cpp
@@ -0,0 +1,138 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "car.h"
+#include <QtGui/QtGui>
+#include <math.h>
+
+static const double Pi = 3.14159265358979323846264338327950288419717;
+
+QRectF Car::boundingRect() const
+{
+ return QRectF(-35, -81, 70, 115);
+}
+
+Car::Car() : color(Qt::green), wheelsAngle(0), speed(0)
+{
+ startTimer(1000 / 33);
+ setFlag(QGraphicsItem::ItemIsMovable, true);
+ setFlag(QGraphicsItem::ItemIsFocusable, true);
+}
+
+void Car::accelerate()
+{
+ if (speed < 10)
+ ++speed;
+}
+
+void Car::decelerate()
+{
+ if (speed > -10)
+ --speed;
+}
+
+void Car::turnLeft()
+{
+ if (wheelsAngle > -30)
+ wheelsAngle -= 5;
+}
+
+void Car::turnRight()
+{
+ if (wheelsAngle < 30)
+ wheelsAngle += 5;
+}
+
+void Car::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ painter->setBrush(Qt::gray);
+ painter->drawRect(-20, -58, 40, 2); // front axel
+ painter->drawRect(-20, 7, 40, 2); // rear axel
+
+ painter->setBrush(color);
+ painter->drawRect(-25, -79, 50, 10); // front wing
+
+ painter->drawEllipse(-25, -48, 50, 20); // side pods
+ painter->drawRect(-25, -38, 50, 35); // side pods
+ painter->drawRect(-5, 9, 10, 10); // back pod
+
+ painter->drawEllipse(-10, -81, 20, 100); // main body
+
+ painter->drawRect(-17, 19, 34, 15); // rear wing
+
+ painter->setBrush(Qt::black);
+ painter->drawPie(-5, -51, 10, 15, 0, 180 * 16);
+ painter->drawRect(-5, -44, 10, 10); // cocpit
+
+ painter->save();
+ painter->translate(-20, -58);
+ painter->rotate(wheelsAngle);
+ painter->drawRect(-10, -7, 10, 15); // front left
+ painter->restore();
+
+ painter->save();
+ painter->translate(20, -58);
+ painter->rotate(wheelsAngle);
+ painter->drawRect(0, -7, 10, 15); // front left
+ painter->restore();
+
+ painter->drawRect(-30, 0, 12, 17); // rear left
+ painter->drawRect(19, 0, 12, 17); // rear right
+}
+
+void Car::timerEvent(QTimerEvent *event)
+{
+ Q_UNUSED(event);
+
+ const qreal axelDistance = 54;
+ qreal wheelsAngleRads = (wheelsAngle * Pi) / 180;
+ qreal turnDistance = ::cos(wheelsAngleRads) * axelDistance * 2;
+ qreal turnRateRads = wheelsAngleRads / turnDistance; // rough estimate
+ qreal turnRate = (turnRateRads * 180) / Pi;
+ qreal rotation = speed * turnRate;
+
+ rotate(rotation);
+ translate(0, -speed);
+ update();
+}
diff --git a/examples/dbus/remotecontrolledcar/car/car.h b/examples/dbus/remotecontrolledcar/car/car.h
new file mode 100644
index 0000000..609bc03
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CAR_H
+#define CAR_H
+
+#include <QGraphicsItem>
+#include <QObject>
+#include <QBrush>
+
+class Car : public QObject, public QGraphicsItem
+{
+ Q_OBJECT
+
+public:
+ Car();
+ QRectF boundingRect() const;
+
+public Q_SLOTS:
+ void accelerate();
+ void decelerate();
+ void turnLeft();
+ void turnRight();
+
+Q_SIGNALS:
+ void crashed();
+
+protected:
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ void timerEvent(QTimerEvent *event);
+
+private:
+ QBrush color;
+ qreal wheelsAngle; // used when applying rotation
+ qreal speed; // delta movement along the body axis
+};
+
+#endif // CAR_H
diff --git a/examples/dbus/remotecontrolledcar/car/car.pro b/examples/dbus/remotecontrolledcar/car/car.pro
new file mode 100644
index 0000000..d4a97fa
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car.pro
@@ -0,0 +1,20 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Mon Aug 28 19:50:14 2006
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += qdbus
+
+# Input
+# DBUS_ADAPTORS += car.xml
+HEADERS += car.h car_adaptor_p.h
+SOURCES += car.cpp main.cpp car_adaptor.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/car
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.pro *.xml
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/car
+INSTALLS += target sources
diff --git a/examples/dbus/remotecontrolledcar/car/car.xml b/examples/dbus/remotecontrolledcar/car/car.xml
new file mode 100644
index 0000000..641c698
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car.xml
@@ -0,0 +1,11 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/com/trollech/examples/car">
+ <interface name="com.trolltech.Examples.CarInterface">
+ <method name="accelerate"/>
+ <method name="decelerate"/>
+ <method name="turnLeft"/>
+ <method name="turnRight"/>
+ <signal name="crashed"/>
+ </interface>
+</node> \ No newline at end of file
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
new file mode 100644
index 0000000..f0c9aa0
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor.cpp
@@ -0,0 +1,59 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#include "car_adaptor_p.h"
+#include <QtCore/QMetaObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+
+/*
+ * Implementation of adaptor class CarAdaptor
+ */
+
+CarAdaptor::CarAdaptor(QObject *parent)
+ : QDBusAbstractAdaptor(parent)
+{
+ // constructor
+ setAutoRelaySignals(true);
+}
+
+CarAdaptor::~CarAdaptor()
+{
+ // destructor
+}
+
+void CarAdaptor::accelerate()
+{
+ // handle method call com.trolltech.Examples.CarInterface.accelerate
+ QMetaObject::invokeMethod(parent(), "accelerate");
+}
+
+void CarAdaptor::decelerate()
+{
+ // handle method call com.trolltech.Examples.CarInterface.decelerate
+ QMetaObject::invokeMethod(parent(), "decelerate");
+}
+
+void CarAdaptor::turnLeft()
+{
+ // handle method call com.trolltech.Examples.CarInterface.turnLeft
+ QMetaObject::invokeMethod(parent(), "turnLeft");
+}
+
+void CarAdaptor::turnRight()
+{
+ // handle method call com.trolltech.Examples.CarInterface.turnRight
+ QMetaObject::invokeMethod(parent(), "turnRight");
+}
+
diff --git a/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h b/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h
new file mode 100644
index 0000000..39782f5
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/car_adaptor_p.h
@@ -0,0 +1,57 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -c CarAdaptor -a car_adaptor_p.h:car_adaptor.cpp car.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#ifndef CAR_ADAPTOR_P_H_1157030132
+#define CAR_ADAPTOR_P_H_1157030132
+
+#include <QtCore/QObject>
+#include <QtDBus/QtDBus>
+
+QT_BEGIN_NAMESPACE
+class QByteArray;
+template<class T> class QList;
+template<class Key, class Value> class QMap;
+class QString;
+class QStringList;
+class QVariant;
+QT_END_NAMESPACE
+
+/*
+ * Adaptor class for interface com.trolltech.Examples.CarInterface
+ */
+class CarAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "com.trolltech.Examples.CarInterface")
+ Q_CLASSINFO("D-Bus Introspection", ""
+" <interface name=\"com.trolltech.Examples.CarInterface\" >\n"
+" <method name=\"accelerate\" />\n"
+" <method name=\"decelerate\" />\n"
+" <method name=\"turnLeft\" />\n"
+" <method name=\"turnRight\" />\n"
+" <signal name=\"crashed\" />\n"
+" </interface>\n"
+ "")
+public:
+ CarAdaptor(QObject *parent);
+ virtual ~CarAdaptor();
+
+public: // PROPERTIES
+public Q_SLOTS: // METHODS
+ void accelerate();
+ void decelerate();
+ void turnLeft();
+ void turnRight();
+Q_SIGNALS: // SIGNALS
+ void crashed();
+};
+
+#endif
diff --git a/examples/dbus/remotecontrolledcar/car/main.cpp b/examples/dbus/remotecontrolledcar/car/main.cpp
new file mode 100644
index 0000000..13a191a
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/main.cpp
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "car.h"
+#include "car_adaptor_p.h"
+#include <QtGui/QApplication>
+#include <QtGui/QGraphicsView>
+#include <QtGui/QGraphicsScene>
+#include <QtDBus/QDBusConnection>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QGraphicsScene scene;
+ scene.setSceneRect(-500, -500, 1000, 1000);
+ scene.setItemIndexMethod(QGraphicsScene::NoIndex);
+
+ Car *car = new Car();
+ scene.addItem(car);
+
+ QGraphicsView view(&scene);
+ view.setRenderHint(QPainter::Antialiasing);
+ view.setBackgroundBrush(Qt::darkGray);
+ view.setWindowTitle(QT_TRANSLATE_NOOP(QGraphicsView, "Qt DBus Controlled Car"));
+ view.resize(400, 300);
+ view.show();
+
+ new CarAdaptor(car);
+ QDBusConnection connection = QDBusConnection::sessionBus();
+ connection.registerObject("/Car", car);
+ connection.registerService("com.trolltech.CarExample");
+
+ return app.exec();
+}
diff --git a/examples/dbus/remotecontrolledcar/controller/car.xml b/examples/dbus/remotecontrolledcar/controller/car.xml
new file mode 100644
index 0000000..641c698
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/car.xml
@@ -0,0 +1,11 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node name="/com/trollech/examples/car">
+ <interface name="com.trolltech.Examples.CarInterface">
+ <method name="accelerate"/>
+ <method name="decelerate"/>
+ <method name="turnLeft"/>
+ <method name="turnRight"/>
+ <signal name="crashed"/>
+ </interface>
+</node> \ No newline at end of file
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface.cpp b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
new file mode 100644
index 0000000..daa9467
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface.cpp
@@ -0,0 +1,26 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * This file may have been hand-edited. Look for HAND-EDIT comments
+ * before re-generating it.
+ */
+
+#include "car_interface_p.h"
+
+/*
+ * Implementation of interface class CarInterface
+ */
+
+CarInterface::CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent)
+ : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
+{
+}
+
+CarInterface::~CarInterface()
+{
+}
+
diff --git a/examples/dbus/remotecontrolledcar/controller/car_interface_p.h b/examples/dbus/remotecontrolledcar/controller/car_interface_p.h
new file mode 100644
index 0000000..3373312
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/car_interface_p.h
@@ -0,0 +1,74 @@
+/*
+ * This file was generated by dbusxml2cpp version 0.6
+ * Command line was: dbusxml2cpp -c CarInterface -p car_interface_p.h:car_interface.cpp car.xml
+ *
+ * dbusxml2cpp is Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * This is an auto-generated file.
+ * Do not edit! All changes made to it will be lost.
+ */
+
+#ifndef CAR_INTERFACE_P_H_1156853585
+#define CAR_INTERFACE_P_H_1156853585
+
+#include <QtCore/QObject>
+#include <QtCore/QByteArray>
+#include <QtCore/QList>
+#include <QtCore/QMap>
+#include <QtCore/QString>
+#include <QtCore/QStringList>
+#include <QtCore/QVariant>
+#include <QtDBus/QtDBus>
+
+/*
+ * Proxy class for interface com.trolltech.Examples.CarInterface
+ */
+class CarInterface: public QDBusAbstractInterface
+{
+ Q_OBJECT
+public:
+ static inline const char *staticInterfaceName()
+ { return "com.trolltech.Examples.CarInterface"; }
+
+public:
+ CarInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
+
+ ~CarInterface();
+
+public Q_SLOTS: // METHODS
+ inline QDBusReply<void> accelerate()
+ {
+ QList<QVariant> argumentList;
+ return callWithArgumentList(QDBus::Block, QLatin1String("accelerate"), argumentList);
+ }
+
+ inline QDBusReply<void> decelerate()
+ {
+ QList<QVariant> argumentList;
+ return callWithArgumentList(QDBus::Block, QLatin1String("decelerate"), argumentList);
+ }
+
+ inline QDBusReply<void> turnLeft()
+ {
+ QList<QVariant> argumentList;
+ return callWithArgumentList(QDBus::Block, QLatin1String("turnLeft"), argumentList);
+ }
+
+ inline QDBusReply<void> turnRight()
+ {
+ QList<QVariant> argumentList;
+ return callWithArgumentList(QDBus::Block, QLatin1String("turnRight"), argumentList);
+ }
+
+Q_SIGNALS: // SIGNALS
+ void crashed();
+};
+
+namespace com {
+ namespace trolltech {
+ namespace Examples {
+ typedef ::CarInterface CarInterface;
+ }
+ }
+}
+#endif
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.cpp b/examples/dbus/remotecontrolledcar/controller/controller.cpp
new file mode 100644
index 0000000..7d27bd3
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/controller.cpp
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "controller.h"
+#include "car_interface_p.h"
+
+Controller::Controller(QWidget *parent)
+ : QWidget(parent)
+{
+ ui.setupUi(this);
+ car = new CarInterface("com.trolltech.CarExample", "/Car",
+ QDBusConnection::sessionBus(), this);
+ startTimer(1000);
+}
+
+void Controller::timerEvent(QTimerEvent *event)
+{
+ Q_UNUSED(event);
+ if (car->isValid())
+ ui.label->setText("connected");
+ else
+ ui.label->setText("disconnected");
+}
+
+void Controller::on_accelerate_clicked()
+{
+ car->accelerate();
+}
+
+void Controller::on_decelerate_clicked()
+{
+ car->decelerate();
+}
+
+void Controller::on_left_clicked()
+{
+ car->turnLeft();
+}
+
+void Controller::on_right_clicked()
+{
+ car->turnRight();
+}
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.h b/examples/dbus/remotecontrolledcar/controller/controller.h
new file mode 100644
index 0000000..200ef3c
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/controller.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CONTROLLER_H
+#define CONTROLLER_H
+
+#include "ui_controller.h"
+
+class CarInterface;
+
+class Controller : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Controller(QWidget *parent = 0);
+
+protected:
+ void timerEvent(QTimerEvent *event);
+
+private slots:
+ void on_accelerate_clicked();
+ void on_decelerate_clicked();
+ void on_left_clicked();
+ void on_right_clicked();
+
+private:
+ Ui::Controller ui;
+ CarInterface *car;
+};
+
+#endif
+
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.pro b/examples/dbus/remotecontrolledcar/controller/controller.pro
new file mode 100644
index 0000000..3015127
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/controller.pro
@@ -0,0 +1,21 @@
+######################################################################
+# Automatically generated by qmake (2.01a) Tue Aug 29 12:28:05 2006
+######################################################################
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += qdbus
+
+# Input
+# DBUS_INTERFACES += car.xml
+FORMS += controller.ui
+HEADERS += car_interface_p.h controller.h
+SOURCES += main.cpp car_interface.cpp controller.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/controller
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro *.xml
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar/controller
+INSTALLS += target sources
diff --git a/examples/dbus/remotecontrolledcar/controller/controller.ui b/examples/dbus/remotecontrolledcar/controller/controller.ui
new file mode 100644
index 0000000..379015b
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/controller.ui
@@ -0,0 +1,64 @@
+<ui version="4.0" >
+ <class>Controller</class>
+ <widget class="QWidget" name="Controller" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>255</width>
+ <height>111</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Controller</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="1" column="1" >
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Controller</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QPushButton" name="decelerate" >
+ <property name="text" >
+ <string>Decelerate</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QPushButton" name="accelerate" >
+ <property name="text" >
+ <string>Accelerate</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" >
+ <widget class="QPushButton" name="right" >
+ <property name="text" >
+ <string>Right</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QPushButton" name="left" >
+ <property name="text" >
+ <string>Left</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/dbus/remotecontrolledcar/controller/main.cpp b/examples/dbus/remotecontrolledcar/controller/main.cpp
new file mode 100644
index 0000000..f28661e
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtDBus>
+
+#include "controller.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Controller controller;
+ controller.show();
+ return app.exec();
+}
diff --git a/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
new file mode 100644
index 0000000..73bfa37
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/remotecontrolledcar.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = car \
+ controller
+
+# install
+sources.files = *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/dbus/remotecontrolledcar
+INSTALLS += sources
diff --git a/examples/designer/README b/examples/designer/README
new file mode 100644
index 0000000..fb9443c
--- /dev/null
+++ b/examples/designer/README
@@ -0,0 +1,37 @@
+Qt Designer is a capable graphical user interface designer that lets you
+create and configure forms without writing code. GUIs created with
+Qt Designer can be compiled into an application or created at run-time.
+
+
+Some of the examples in this directory can be run from the example launcher;
+others can only be used from within Qt Designer.
+
+Documentation for these examples can be found via the "Tutorial and Examples"
+link in the main Qt documentation.
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/designer/calculatorbuilder/calculatorbuilder.pro b/examples/designer/calculatorbuilder/calculatorbuilder.pro
new file mode 100644
index 0000000..1d69cc8
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorbuilder.pro
@@ -0,0 +1,14 @@
+#! [0]
+CONFIG += uitools
+
+HEADERS = calculatorform.h
+RESOURCES = calculatorbuilder.qrc
+SOURCES = calculatorform.cpp \
+ main.cpp
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorbuilder
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.ui *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorbuilder
+INSTALLS += target sources
diff --git a/examples/designer/calculatorbuilder/calculatorbuilder.qrc b/examples/designer/calculatorbuilder/calculatorbuilder.qrc
new file mode 100644
index 0000000..19b3905
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorbuilder.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/forms">
+ <file>calculatorform.ui</file>
+</qresource>
+</RCC>
diff --git a/examples/designer/calculatorbuilder/calculatorform.cpp b/examples/designer/calculatorbuilder/calculatorform.cpp
new file mode 100644
index 0000000..92d75c5
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorform.cpp
@@ -0,0 +1,92 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtUiTools>
+//! [0]
+#include <QtGui>
+
+#include "calculatorform.h"
+
+//! [1]
+CalculatorForm::CalculatorForm(QWidget *parent)
+ : QWidget(parent)
+{
+ QUiLoader loader;
+
+ QFile file(":/forms/calculatorform.ui");
+ file.open(QFile::ReadOnly);
+ QWidget *formWidget = loader.load(&file, this);
+ file.close();
+//! [1]
+
+//! [2]
+ ui_inputSpinBox1 = qFindChild<QSpinBox*>(this, "inputSpinBox1");
+ ui_inputSpinBox2 = qFindChild<QSpinBox*>(this, "inputSpinBox2");
+ ui_outputWidget = qFindChild<QLabel*>(this, "outputWidget");
+//! [2]
+
+//! [3]
+ QMetaObject::connectSlotsByName(this);
+//! [3]
+
+//! [4]
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->addWidget(formWidget);
+ setLayout(layout);
+
+ setWindowTitle(tr("Calculator Builder"));
+}
+//! [4]
+
+//! [5]
+void CalculatorForm::on_inputSpinBox1_valueChanged(int value)
+{
+ ui_outputWidget->setText(QString::number(value + ui_inputSpinBox2->value()));
+}
+//! [5] //! [6]
+
+//! [6] //! [7]
+void CalculatorForm::on_inputSpinBox2_valueChanged(int value)
+{
+ ui_outputWidget->setText(QString::number(value + ui_inputSpinBox1->value()));
+}
+//! [7]
diff --git a/examples/designer/calculatorbuilder/calculatorform.h b/examples/designer/calculatorbuilder/calculatorform.h
new file mode 100644
index 0000000..8b322b7
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorform.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CALCULATORFORM_H
+#define CALCULATORFORM_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QLabel;
+class QSpinBox;
+QT_END_NAMESPACE
+
+//! [0]
+class CalculatorForm : public QWidget
+{
+ Q_OBJECT
+
+public:
+ CalculatorForm(QWidget *parent = 0);
+
+private slots:
+ void on_inputSpinBox1_valueChanged(int value);
+ void on_inputSpinBox2_valueChanged(int value);
+
+private:
+ QSpinBox *ui_inputSpinBox1;
+ QSpinBox *ui_inputSpinBox2;
+ QLabel *ui_outputWidget;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/calculatorbuilder/calculatorform.ui b/examples/designer/calculatorbuilder/calculatorform.ui
new file mode 100644
index 0000000..dda0e62
--- /dev/null
+++ b/examples/designer/calculatorbuilder/calculatorform.ui
@@ -0,0 +1,303 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>CalculatorForm</class>
+ <widget class="QWidget" name="CalculatorForm" >
+ <property name="objectName" >
+ <string notr="true" >CalculatorForm</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>276</width>
+ <height>98</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Calculator Builder</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="0" >
+ <layout class="QHBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="objectName" >
+ <string notr="true" >label</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>45</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 1</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox1" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox1</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>45</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="mouseTracking" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3" >
+ <property name="objectName" >
+ <string notr="true" >label_3</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>54</x>
+ <y>1</y>
+ <width>7</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>+</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>45</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 2</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox2" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>45</width>
+ <height>25</height>
+ </rect>
+ </property>
+ <property name="mouseTracking" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3_2" >
+ <property name="objectName" >
+ <string notr="true" >label_3_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>120</x>
+ <y>1</y>
+ <width>7</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>=</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2_2_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2_2_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>37</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="outputWidget" >
+ <property name="objectName" >
+ <string notr="true" >outputWidget</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>24</y>
+ <width>37</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >verticalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>85</x>
+ <y>69</y>
+ <width>20</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="1" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >horizontalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>188</x>
+ <y>26</y>
+ <width>79</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/designer/calculatorbuilder/main.cpp b/examples/designer/calculatorbuilder/main.cpp
new file mode 100644
index 0000000..56358b8
--- /dev/null
+++ b/examples/designer/calculatorbuilder/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "calculatorform.h"
+
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(calculatorbuilder);
+
+ QApplication app(argc, argv);
+ CalculatorForm calculator;
+ calculator.show();
+ return app.exec();
+}
diff --git a/examples/designer/calculatorform/calculatorform.cpp b/examples/designer/calculatorform/calculatorform.cpp
new file mode 100644
index 0000000..3de2852
--- /dev/null
+++ b/examples/designer/calculatorform/calculatorform.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "calculatorform.h"
+
+//! [0]
+CalculatorForm::CalculatorForm(QWidget *parent)
+ : QWidget(parent)
+{
+ ui.setupUi(this);
+}
+//! [0]
+
+//! [1]
+void CalculatorForm::on_inputSpinBox1_valueChanged(int value)
+{
+ ui.outputWidget->setText(QString::number(value + ui.inputSpinBox2->value()));
+}
+//! [1]
+
+//! [2]
+void CalculatorForm::on_inputSpinBox2_valueChanged(int value)
+{
+ ui.outputWidget->setText(QString::number(value + ui.inputSpinBox1->value()));
+}
+//! [2]
diff --git a/examples/designer/calculatorform/calculatorform.h b/examples/designer/calculatorform/calculatorform.h
new file mode 100644
index 0000000..37f0a18
--- /dev/null
+++ b/examples/designer/calculatorform/calculatorform.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CALCULATORFORM_H
+#define CALCULATORFORM_H
+
+//! [0]
+#include "ui_calculatorform.h"
+//! [0]
+
+//! [1]
+class CalculatorForm : public QWidget
+{
+ Q_OBJECT
+
+public:
+ CalculatorForm(QWidget *parent = 0);
+
+private slots:
+ void on_inputSpinBox1_valueChanged(int value);
+ void on_inputSpinBox2_valueChanged(int value);
+
+private:
+ Ui::CalculatorForm ui;
+};
+//! [1]
+
+#endif
diff --git a/examples/designer/calculatorform/calculatorform.pro b/examples/designer/calculatorform/calculatorform.pro
new file mode 100644
index 0000000..73f4351
--- /dev/null
+++ b/examples/designer/calculatorform/calculatorform.pro
@@ -0,0 +1,13 @@
+#! [0]
+HEADERS = calculatorform.h
+#! [0] #! [1]
+FORMS = calculatorform.ui
+#! [1]
+SOURCES = calculatorform.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorform
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/calculatorform
+INSTALLS += target sources
diff --git a/examples/designer/calculatorform/calculatorform.ui b/examples/designer/calculatorform/calculatorform.ui
new file mode 100644
index 0000000..3a95639
--- /dev/null
+++ b/examples/designer/calculatorform/calculatorform.ui
@@ -0,0 +1,284 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>CalculatorForm</class>
+ <widget class="QWidget" name="CalculatorForm" >
+ <property name="objectName" >
+ <string notr="true" >CalculatorForm</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy>
+ <hsizetype>5</hsizetype>
+ <vsizetype>5</vsizetype>
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Calculator Form</string>
+ </property>
+ <layout class="QGridLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item row="0" column="6" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >horizontalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>239</x>
+ <y>9</y>
+ <width>152</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="4" >
+ <widget class="QLabel" name="label_3_2" >
+ <property name="objectName" >
+ <string notr="true" >label_3_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>169</x>
+ <y>9</y>
+ <width>20</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>=</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="5" >
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2_2_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2_2_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>36</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="outputWidget" >
+ <property name="objectName" >
+ <string notr="true" >outputWidget</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>24</y>
+ <width>36</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="frameShape" >
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow" >
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <property name="text" >
+ <string>0</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignAbsolute|Qt::AlignBottom|Qt::AlignCenter|Qt::AlignHCenter|Qt::AlignHorizontal_Mask|Qt::AlignJustify|Qt::AlignLeading|Qt::AlignLeft|Qt::AlignRight|Qt::AlignTop|Qt::AlignTrailing|Qt::AlignVCenter|Qt::AlignVertical_Mask</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="2" >
+ <spacer>
+ <property name="objectName" >
+ <string notr="true" >verticalSpacer</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>89</x>
+ <y>67</y>
+ <width>20</width>
+ <height>224</height>
+ </rect>
+ </property>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="0" column="3" >
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="objectName" >
+ <string notr="true" >label_2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>46</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 2</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox2" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox2</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>46</width>
+ <height>25</height>
+ </rect>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLabel" name="label_3" >
+ <property name="objectName" >
+ <string notr="true" >label_3</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>63</x>
+ <y>9</y>
+ <width>20</width>
+ <height>52</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>+</string>
+ </property>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <layout class="QVBoxLayout" >
+ <property name="objectName" >
+ <string notr="true" />
+ </property>
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="objectName" >
+ <string notr="true" >label</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>1</y>
+ <width>46</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <property name="text" >
+ <string>Input 1</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="inputSpinBox1" >
+ <property name="objectName" >
+ <string notr="true" >inputSpinBox1</string>
+ </property>
+ <property name="geometry" >
+ <rect>
+ <x>1</x>
+ <y>26</y>
+ <width>46</width>
+ <height>25</height>
+ </rect>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/examples/designer/calculatorform/main.cpp b/examples/designer/calculatorform/main.cpp
new file mode 100644
index 0000000..dcb7366
--- /dev/null
+++ b/examples/designer/calculatorform/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "calculatorform.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ CalculatorForm calculator;
+ calculator.show();
+ return app.exec();
+}
+
diff --git a/examples/designer/containerextension/containerextension.pro b/examples/designer/containerextension/containerextension.pro
new file mode 100644
index 0000000..6a2cb58
--- /dev/null
+++ b/examples/designer/containerextension/containerextension.pro
@@ -0,0 +1,26 @@
+#! [0]
+TEMPLATE = lib
+#! [0]
+TARGET = $$qtLibraryTarget($$TARGET)
+#! [1]
+CONFIG += designer plugin
+#! [1]
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+
+#! [2]
+HEADERS += multipagewidget.h \
+ multipagewidgetplugin.h \
+ multipagewidgetcontainerextension.h \
+ multipagewidgetextensionfactory.h
+
+SOURCES += multipagewidget.cpp \
+ multipagewidgetplugin.cpp \
+ multipagewidgetcontainerextension.cpp \
+ multipagewidgetextensionfactory.cpp
+#! [2]
+
+# install
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/containerextension
+INSTALLS += target sources
diff --git a/examples/designer/containerextension/multipagewidget.cpp b/examples/designer/containerextension/multipagewidget.cpp
new file mode 100644
index 0000000..5a3697b
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidget.cpp
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "multipagewidget.h"
+
+MultiPageWidget::MultiPageWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ comboBox = new QComboBox();
+ comboBox->setObjectName("__qt__passive_comboBox");
+ stackWidget = new QStackedWidget();
+
+ connect(comboBox, SIGNAL(activated(int)),
+ this, SLOT(setCurrentIndex(int)));
+
+ layout = new QVBoxLayout();
+ layout->addWidget(comboBox);
+ layout->addWidget(stackWidget);
+ setLayout(layout);
+}
+
+QSize MultiPageWidget::sizeHint() const
+{
+ return QSize(200, 150);
+}
+
+void MultiPageWidget::addPage(QWidget *page)
+{
+ insertPage(count(), page);
+}
+
+void MultiPageWidget::removePage(int index)
+{
+ QWidget *widget = stackWidget->widget(index);
+ stackWidget->removeWidget(widget);
+
+ comboBox->removeItem(index);
+}
+
+int MultiPageWidget::count() const
+{
+ return stackWidget->count();
+}
+
+int MultiPageWidget::currentIndex() const
+{
+ return stackWidget->currentIndex();
+}
+
+void MultiPageWidget::insertPage(int index, QWidget *page)
+{
+ page->setParent(stackWidget);
+
+ stackWidget->insertWidget(index, page);
+
+ QString title = page->windowTitle();
+ if (title.isEmpty()) {
+ title = tr("Page %1").arg(comboBox->count() + 1);
+ page->setWindowTitle(title);
+ }
+ comboBox->insertItem(index, title);
+}
+
+void MultiPageWidget::setCurrentIndex(int index)
+{
+ if (index != currentIndex()) {
+ stackWidget->setCurrentIndex(index);
+ comboBox->setCurrentIndex(index);
+ emit currentIndexChanged(index);
+ }
+}
+
+QWidget* MultiPageWidget::widget(int index)
+{
+ return stackWidget->widget(index);
+}
+
+QString MultiPageWidget::pageTitle() const
+{
+ if (const QWidget *currentWidget = stackWidget->currentWidget())
+ return currentWidget->windowTitle();
+ return QString();
+}
+
+void MultiPageWidget::setPageTitle(QString const &newTitle)
+{
+ comboBox->setItemText(currentIndex(), newTitle);
+ if (QWidget *currentWidget = stackWidget->currentWidget())
+ currentWidget->setWindowTitle(newTitle);
+ emit pageTitleChanged(newTitle);
+}
diff --git a/examples/designer/containerextension/multipagewidget.h b/examples/designer/containerextension/multipagewidget.h
new file mode 100644
index 0000000..77a09c5
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidget.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MULTIPAGEWIDGET_H
+#define MULTIPAGEWIDGET_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QComboBox;
+class QStackedWidget;
+class QVBoxLayout;
+QT_END_NAMESPACE
+
+//! [0]
+class MultiPageWidget : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(int currentIndex READ currentIndex WRITE setCurrentIndex)
+ Q_PROPERTY(QString pageTitle READ pageTitle WRITE setPageTitle STORED false)
+
+public:
+ MultiPageWidget(QWidget *parent = 0);
+
+ QSize sizeHint() const;
+
+ int count() const;
+ int currentIndex() const;
+ QWidget *widget(int index);
+ QString pageTitle() const;
+
+public slots:
+ void addPage(QWidget *page);
+ void insertPage(int index, QWidget *page);
+ void removePage(int index);
+ void setPageTitle(QString const &newTitle);
+ void setCurrentIndex(int index);
+
+signals:
+ void currentIndexChanged(int index);
+ void pageTitleChanged(const QString &title);
+
+private:
+ QStackedWidget *stackWidget;
+ QComboBox *comboBox;
+ QVBoxLayout *layout;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/containerextension/multipagewidgetcontainerextension.cpp b/examples/designer/containerextension/multipagewidgetcontainerextension.cpp
new file mode 100644
index 0000000..b61da3d
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetcontainerextension.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "multipagewidgetcontainerextension.h"
+#include "multipagewidget.h"
+
+//! [0]
+MultiPageWidgetContainerExtension::MultiPageWidgetContainerExtension(MultiPageWidget *widget,
+ QObject *parent)
+ :QObject(parent)
+{
+ myWidget = widget;
+}
+//! [0]
+
+//! [1]
+void MultiPageWidgetContainerExtension::addWidget(QWidget *widget)
+{
+ myWidget->addPage(widget);
+}
+//! [1]
+
+//! [2]
+int MultiPageWidgetContainerExtension::count() const
+{
+ return myWidget->count();
+}
+//! [2]
+
+//! [3]
+int MultiPageWidgetContainerExtension::currentIndex() const
+{
+ return myWidget->currentIndex();
+}
+//! [3]
+
+//! [4]
+void MultiPageWidgetContainerExtension::insertWidget(int index, QWidget *widget)
+{
+ myWidget->insertPage(index, widget);
+}
+//! [4]
+
+//! [5]
+void MultiPageWidgetContainerExtension::remove(int index)
+{
+ myWidget->removePage(index);
+}
+//! [5]
+
+//! [6]
+void MultiPageWidgetContainerExtension::setCurrentIndex(int index)
+{
+ myWidget->setCurrentIndex(index);
+}
+//! [6]
+
+//! [7]
+QWidget* MultiPageWidgetContainerExtension::widget(int index) const
+{
+ return myWidget->widget(index);
+}
+//! [7]
diff --git a/examples/designer/containerextension/multipagewidgetcontainerextension.h b/examples/designer/containerextension/multipagewidgetcontainerextension.h
new file mode 100644
index 0000000..661146e
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetcontainerextension.h
@@ -0,0 +1,75 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MULTIPAGEWIDGETCONTAINEREXTENSION_H
+#define MULTIPAGEWIDGETCONTAINEREXTENSION_H
+
+#include <QtDesigner/QDesignerContainerExtension>
+
+QT_BEGIN_NAMESPACE
+class QExtensionManager;
+QT_END_NAMESPACE
+class MultiPageWidget;
+
+//! [0]
+class MultiPageWidgetContainerExtension: public QObject,
+ public QDesignerContainerExtension
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerContainerExtension)
+
+public:
+ MultiPageWidgetContainerExtension(MultiPageWidget *widget, QObject *parent);
+
+ void addWidget(QWidget *widget);
+ int count() const;
+ int currentIndex() const;
+ void insertWidget(int index, QWidget *widget);
+ void remove(int index);
+ void setCurrentIndex(int index);
+ QWidget *widget(int index) const;
+
+private:
+ MultiPageWidget *myWidget;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/containerextension/multipagewidgetextensionfactory.cpp b/examples/designer/containerextension/multipagewidgetextensionfactory.cpp
new file mode 100644
index 0000000..4a1e81b
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetextensionfactory.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "multipagewidgetextensionfactory.h"
+#include "multipagewidgetcontainerextension.h"
+#include "multipagewidget.h"
+
+//! [0]
+MultiPageWidgetExtensionFactory::MultiPageWidgetExtensionFactory(QExtensionManager *parent)
+ : QExtensionFactory(parent)
+{}
+//! [0]
+
+//! [1]
+QObject *MultiPageWidgetExtensionFactory::createExtension(QObject *object,
+ const QString &iid,
+ QObject *parent) const
+{
+ MultiPageWidget *widget = qobject_cast<MultiPageWidget*>(object);
+
+ if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
+ return new MultiPageWidgetContainerExtension(widget, parent);
+ } else {
+ return 0;
+ }
+}
+//! [1]
diff --git a/examples/designer/containerextension/multipagewidgetextensionfactory.h b/examples/designer/containerextension/multipagewidgetextensionfactory.h
new file mode 100644
index 0000000..9a96b37
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetextensionfactory.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MULTIPAGEWIDGETEXTENSIONFACTORY_H
+#define MULTIPAGEWIDGETEXTENSIONFACTORY_H
+
+#include <QtDesigner/QExtensionFactory>
+
+QT_BEGIN_NAMESPACE
+class QExtensionManager;
+QT_END_NAMESPACE
+
+//! [0]
+class MultiPageWidgetExtensionFactory: public QExtensionFactory
+{
+ Q_OBJECT
+
+public:
+ MultiPageWidgetExtensionFactory(QExtensionManager *parent = 0);
+
+protected:
+ QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/containerextension/multipagewidgetplugin.cpp b/examples/designer/containerextension/multipagewidgetplugin.cpp
new file mode 100644
index 0000000..c09ed3a
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetplugin.cpp
@@ -0,0 +1,197 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDesigner/QExtensionFactory>
+#include <QtDesigner/QExtensionManager>
+#include <QtDesigner/QDesignerFormEditorInterface>
+#include <QtDesigner/QDesignerFormWindowInterface>
+#include <QtDesigner/QDesignerContainerExtension>
+#include <QtDesigner/QDesignerPropertySheetExtension>
+
+#include <QIcon>
+#include <QtPlugin>
+
+#include "multipagewidget.h"
+#include "multipagewidgetplugin.h"
+#include "multipagewidgetextensionfactory.h"
+
+//! [0]
+MultiPageWidgetPlugin::MultiPageWidgetPlugin(QObject *parent)
+ :QObject(parent)
+{
+ initialized = false;
+}
+
+QString MultiPageWidgetPlugin::name() const
+{
+ return QLatin1String("MultiPageWidget");
+}
+
+QString MultiPageWidgetPlugin::group() const
+{
+ return QLatin1String("Display Widgets [Examples]");
+}
+
+QString MultiPageWidgetPlugin::toolTip() const
+{
+ return QString();
+}
+
+QString MultiPageWidgetPlugin::whatsThis() const
+{
+ return QString();
+}
+
+QString MultiPageWidgetPlugin::includeFile() const
+{
+ return QLatin1String("multipagewidget.h");
+}
+
+QIcon MultiPageWidgetPlugin::icon() const
+{
+ return QIcon();
+}
+
+//! [0] //! [1]
+bool MultiPageWidgetPlugin::isContainer() const
+{
+ return true;
+}
+
+//! [1] //! [2]
+QWidget *MultiPageWidgetPlugin::createWidget(QWidget *parent)
+{
+ MultiPageWidget *widget = new MultiPageWidget(parent);
+ connect(widget, SIGNAL(currentIndexChanged(int)),
+ this, SLOT(currentIndexChanged(int)));
+ connect(widget, SIGNAL(pageTitleChanged(const QString &)),
+ this, SLOT(pageTitleChanged(const QString &)));
+ return widget;
+}
+
+//! [2] //! [3]
+bool MultiPageWidgetPlugin::isInitialized() const
+{
+ return initialized;
+}
+//! [3]
+
+//! [4]
+void MultiPageWidgetPlugin::initialize(QDesignerFormEditorInterface *formEditor)
+{
+ if (initialized)
+ return;
+//! [4]
+
+//! [5]
+ QExtensionManager *manager = formEditor->extensionManager();
+//! [5] //! [6]
+ QExtensionFactory *factory = new MultiPageWidgetExtensionFactory(manager);
+
+ Q_ASSERT(manager != 0);
+ manager->registerExtensions(factory, Q_TYPEID(QDesignerContainerExtension));
+
+ initialized = true;
+}
+//! [6]
+
+//! [7]
+QString MultiPageWidgetPlugin::domXml() const
+{
+ return QLatin1String("\
+<ui language=\"c++\">\
+ <widget class=\"MultiPageWidget\" name=\"multipagewidget\">\
+ <widget class=\"QWidget\" name=\"page\" />\
+ </widget>\
+ <customwidgets>\
+ <customwidget>\
+ <class>MultiPageWidget</class>\
+ <extends>QWidget</extends>\
+ <addpagemethod>addPage</addpagemethod>\
+ </customwidget>\
+ </customwidgets>\
+</ui>");
+}
+//! [7]
+
+//! [8]
+void MultiPageWidgetPlugin::currentIndexChanged(int index)
+{
+ Q_UNUSED(index);
+ MultiPageWidget *widget = qobject_cast<MultiPageWidget*>(sender());
+//! [8] //! [9]
+ if (widget) {
+ QDesignerFormWindowInterface *form = QDesignerFormWindowInterface::findFormWindow(widget);
+ if (form)
+ form->emitSelectionChanged();
+ }
+}
+//! [9]
+
+//! [10]
+void MultiPageWidgetPlugin::pageTitleChanged(const QString &title)
+{
+ Q_UNUSED(title);
+ MultiPageWidget *widget = qobject_cast<MultiPageWidget*>(sender());
+//! [10] //! [11]
+ if (widget) {
+ QWidget *page = widget->widget(widget->currentIndex());
+ QDesignerFormWindowInterface *form;
+ form = QDesignerFormWindowInterface::findFormWindow(widget);
+//! [11]
+ if (form) {
+//! [12]
+ QDesignerFormEditorInterface *editor = form->core();
+ QExtensionManager *manager = editor->extensionManager();
+//! [12] //! [13]
+ QDesignerPropertySheetExtension *sheet;
+ sheet = qt_extension<QDesignerPropertySheetExtension*>(manager, page);
+ const int propertyIndex = sheet->indexOf(QLatin1String("windowTitle"));
+ sheet->setChanged(propertyIndex, true);
+ }
+ }
+}
+
+//! [13]
+
+//! [14]
+Q_EXPORT_PLUGIN2(containerextension, MultiPageWidgetPlugin)
+//! [14]
diff --git a/examples/designer/containerextension/multipagewidgetplugin.h b/examples/designer/containerextension/multipagewidgetplugin.h
new file mode 100644
index 0000000..1431c8a
--- /dev/null
+++ b/examples/designer/containerextension/multipagewidgetplugin.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#ifndef MULTIPAGEWIDGETPLUGIN_H
+#define MULTIPAGEWIDGETPLUGIN_H
+
+#include <QtDesigner/QDesignerCustomWidgetInterface>
+
+QT_BEGIN_NAMESPACE
+class QIcon;
+class QWidget;
+QT_END_NAMESPACE
+
+class MultiPageWidgetPlugin: public QObject, public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+public:
+ MultiPageWidgetPlugin(QObject *parent = 0);
+
+ QString name() const;
+ QString group() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QString includeFile() const;
+ QIcon icon() const;
+ bool isContainer() const;
+ QWidget *createWidget(QWidget *parent);
+ bool isInitialized() const;
+ void initialize(QDesignerFormEditorInterface *formEditor);
+ QString domXml() const;
+
+private slots:
+ void currentIndexChanged(int index);
+ void pageTitleChanged(const QString &title);
+
+private:
+ bool initialized;
+};
+
+#endif
+//! [0]
diff --git a/examples/designer/customwidgetplugin/analogclock.cpp b/examples/designer/customwidgetplugin/analogclock.cpp
new file mode 100644
index 0000000..28155ba
--- /dev/null
+++ b/examples/designer/customwidgetplugin/analogclock.cpp
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "analogclock.h"
+
+AnalogClock::AnalogClock(QWidget *parent)
+ : QWidget(parent)
+{
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(update()));
+ timer->start(1000);
+
+ setWindowTitle(tr("Analog Clock"));
+ resize(200, 200);
+}
+
+void AnalogClock::paintEvent(QPaintEvent *)
+{
+ static const QPoint hourHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -40)
+ };
+ static const QPoint minuteHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -70)
+ };
+
+ QColor hourColor(127, 0, 127);
+ QColor minuteColor(0, 127, 127, 191);
+
+ int side = qMin(width(), height());
+ QTime time = QTime::currentTime();
+
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.translate(width() / 2, height() / 2);
+ painter.scale(side / 200.0, side / 200.0);
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(hourColor);
+
+ painter.save();
+ painter.rotate(30.0 * ((time.hour() + time.minute() / 60.0)));
+ painter.drawConvexPolygon(hourHand, 3);
+ painter.restore();
+
+ painter.setPen(hourColor);
+
+ for (int i = 0; i < 12; ++i) {
+ painter.drawLine(88, 0, 96, 0);
+ painter.rotate(30.0);
+ }
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(minuteColor);
+
+ painter.save();
+ painter.rotate(6.0 * (time.minute() + time.second() / 60.0));
+ painter.drawConvexPolygon(minuteHand, 3);
+ painter.restore();
+
+ painter.setPen(minuteColor);
+
+ for (int j = 0; j < 60; ++j) {
+ if ((j % 5) != 0)
+ painter.drawLine(92, 0, 96, 0);
+ painter.rotate(6.0);
+ }
+}
diff --git a/examples/designer/customwidgetplugin/analogclock.h b/examples/designer/customwidgetplugin/analogclock.h
new file mode 100644
index 0000000..4d843ad
--- /dev/null
+++ b/examples/designer/customwidgetplugin/analogclock.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef ANALOGCLOCK_H
+#define ANALOGCLOCK_H
+
+#include <QWidget>
+#include <QtDesigner/QDesignerExportWidget>
+
+class QDESIGNER_WIDGET_EXPORT AnalogClock : public QWidget
+{
+ Q_OBJECT
+
+public:
+ AnalogClock(QWidget *parent = 0);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+};
+
+#endif
diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.cpp b/examples/designer/customwidgetplugin/customwidgetplugin.cpp
new file mode 100644
index 0000000..bcea3b8
--- /dev/null
+++ b/examples/designer/customwidgetplugin/customwidgetplugin.cpp
@@ -0,0 +1,156 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "analogclock.h"
+#include "customwidgetplugin.h"
+
+#include <QtPlugin>
+
+//! [0]
+AnalogClockPlugin::AnalogClockPlugin(QObject *parent)
+ : QObject(parent)
+{
+ initialized = false;
+}
+//! [0]
+
+//! [1]
+void AnalogClockPlugin::initialize(QDesignerFormEditorInterface * /* core */)
+{
+ if (initialized)
+ return;
+
+ initialized = true;
+}
+//! [1]
+
+//! [2]
+bool AnalogClockPlugin::isInitialized() const
+{
+ return initialized;
+}
+//! [2]
+
+//! [3]
+QWidget *AnalogClockPlugin::createWidget(QWidget *parent)
+{
+ return new AnalogClock(parent);
+}
+//! [3]
+
+//! [4]
+QString AnalogClockPlugin::name() const
+{
+ return "AnalogClock";
+}
+//! [4]
+
+//! [5]
+QString AnalogClockPlugin::group() const
+{
+ return "Display Widgets [Examples]";
+}
+//! [5]
+
+//! [6]
+QIcon AnalogClockPlugin::icon() const
+{
+ return QIcon();
+}
+//! [6]
+
+//! [7]
+QString AnalogClockPlugin::toolTip() const
+{
+ return "";
+}
+//! [7]
+
+//! [8]
+QString AnalogClockPlugin::whatsThis() const
+{
+ return "";
+}
+//! [8]
+
+//! [9]
+bool AnalogClockPlugin::isContainer() const
+{
+ return false;
+}
+//! [9]
+
+//! [10]
+QString AnalogClockPlugin::domXml() const
+{
+ return "<ui language=\"c++\">\n"
+ " <widget class=\"AnalogClock\" name=\"analogClock\">\n"
+//! [11]
+ " <property name=\"geometry\">\n"
+ " <rect>\n"
+ " <x>0</x>\n"
+ " <y>0</y>\n"
+ " <width>100</width>\n"
+ " <height>100</height>\n"
+ " </rect>\n"
+ " </property>\n"
+//! [11]
+ " <property name=\"toolTip\" >\n"
+ " <string>The current time</string>\n"
+ " </property>\n"
+ " <property name=\"whatsThis\" >\n"
+ " <string>The analog clock widget displays the current time.</string>\n"
+ " </property>\n"
+ " </widget>\n"
+ "</ui>\n";
+}
+//! [10]
+
+//! [12]
+QString AnalogClockPlugin::includeFile() const
+{
+ return "analogclock.h";
+}
+//! [12]
+
+//! [13]
+Q_EXPORT_PLUGIN2(customwidgetplugin, AnalogClockPlugin)
+//! [13]
diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.h b/examples/designer/customwidgetplugin/customwidgetplugin.h
new file mode 100644
index 0000000..4438690
--- /dev/null
+++ b/examples/designer/customwidgetplugin/customwidgetplugin.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CUSTOMWIDGETPLUGIN_H
+#define CUSTOMWIDGETPLUGIN_H
+
+#include <QDesignerCustomWidgetInterface>
+
+//! [0]
+class AnalogClockPlugin : public QObject, public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+
+public:
+ AnalogClockPlugin(QObject *parent = 0);
+
+ bool isContainer() const;
+ bool isInitialized() const;
+ QIcon icon() const;
+ QString domXml() const;
+ QString group() const;
+ QString includeFile() const;
+ QString name() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QWidget *createWidget(QWidget *parent);
+ void initialize(QDesignerFormEditorInterface *core);
+
+private:
+ bool initialized;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.pro b/examples/designer/customwidgetplugin/customwidgetplugin.pro
new file mode 100644
index 0000000..4feee59
--- /dev/null
+++ b/examples/designer/customwidgetplugin/customwidgetplugin.pro
@@ -0,0 +1,21 @@
+#! [0] #! [1]
+CONFIG += designer plugin
+#! [0]
+TARGET = $$qtLibraryTarget($$TARGET)
+#! [2]
+TEMPLATE = lib
+#! [1] #! [2]
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+
+#! [3]
+HEADERS = analogclock.h \
+ customwidgetplugin.h
+SOURCES = analogclock.cpp \
+ customwidgetplugin.cpp
+#! [3]
+
+# install
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/customwidgetplugin
+INSTALLS += target sources
diff --git a/examples/designer/designer.pro b/examples/designer/designer.pro
new file mode 100644
index 0000000..0f30421
--- /dev/null
+++ b/examples/designer/designer.pro
@@ -0,0 +1,19 @@
+TEMPLATE = subdirs
+SUBDIRS = calculatorform
+
+!static:SUBDIRS += calculatorbuilder \
+ containerextension \
+ customwidgetplugin \
+ taskmenuextension \
+ worldtimeclockbuilder \
+ worldtimeclockplugin
+
+# the sun cc compiler has a problem with the include lines for the form.prf
+solaris-cc*:SUBDIRS -= calculatorbuilder \
+ worldtimeclockbuilder
+
+
+# install
+sources.files = README *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer
+INSTALLS += sources
diff --git a/examples/designer/taskmenuextension/taskmenuextension.pro b/examples/designer/taskmenuextension/taskmenuextension.pro
new file mode 100644
index 0000000..83dd878
--- /dev/null
+++ b/examples/designer/taskmenuextension/taskmenuextension.pro
@@ -0,0 +1,25 @@
+#! [0]
+TEMPLATE = lib
+#! [0]
+TARGET = $$qtLibraryTarget($$TARGET)
+#! [1]
+CONFIG += designer plugin
+#! [1]
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+
+#! [2]
+HEADERS += tictactoe.h \
+ tictactoedialog.h \
+ tictactoeplugin.h \
+ tictactoetaskmenu.h
+SOURCES += tictactoe.cpp \
+ tictactoedialog.cpp \
+ tictactoeplugin.cpp \
+ tictactoetaskmenu.cpp
+#! [2]
+
+# install
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/taskmenuextension
+INSTALLS += target sources
diff --git a/examples/designer/taskmenuextension/tictactoe.cpp b/examples/designer/taskmenuextension/tictactoe.cpp
new file mode 100644
index 0000000..ba766ccd
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoe.cpp
@@ -0,0 +1,176 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "tictactoe.h"
+
+TicTacToe::TicTacToe(QWidget *parent)
+ : QWidget(parent)
+{
+}
+
+QSize TicTacToe::minimumSizeHint() const
+{
+ return QSize(200, 200);
+}
+
+QSize TicTacToe::sizeHint() const
+{
+ return QSize(200, 200);
+}
+
+void TicTacToe::setState(const QString &newState)
+{
+ turnNumber = 0;
+ myState = "---------";
+ int position = 0;
+ while (position < 9 && position < newState.length()) {
+ QChar mark = newState.at(position);
+ if (mark == Cross || mark == Nought) {
+ ++turnNumber;
+ myState.replace(position, 1, mark);
+ }
+ position++;
+ }
+ update();
+}
+
+QString TicTacToe::state() const
+{
+ return myState;
+}
+
+void TicTacToe::clearBoard()
+{
+ myState = "---------";
+ turnNumber = 0;
+ update();
+}
+
+void TicTacToe::mousePressEvent(QMouseEvent *event)
+{
+ if (turnNumber == 9) {
+ clearBoard();
+ update();
+ } else {
+ for (int position = 0; position < 9; ++position) {
+ QRect cell = cellRect(position / 3, position % 3);
+ if (cell.contains(event->pos())) {
+ if (myState.at(position) == Empty) {
+ if (turnNumber % 2 == 0)
+ myState.replace(position, 1, Cross);
+ else
+ myState.replace(position, 1, Nought);
+ ++turnNumber;
+ update();
+ }
+ }
+ }
+ }
+}
+
+void TicTacToe::paintEvent(QPaintEvent * /* event */)
+{
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+
+ painter.setPen(QPen(Qt::darkGreen, 1));
+ painter.drawLine(cellWidth(), 0, cellWidth(), height());
+ painter.drawLine(2 * cellWidth(), 0, 2 * cellWidth(), height());
+ painter.drawLine(0, cellHeight(), width(), cellHeight());
+ painter.drawLine(0, 2 * cellHeight(), width(), 2 * cellHeight());
+
+ painter.setPen(QPen(Qt::darkBlue, 2));
+
+ for (int position = 0; position < 9; ++position) {
+ QRect cell = cellRect(position / 3, position % 3);
+
+ if (myState.at(position) == Cross) {
+ painter.drawLine(cell.topLeft(), cell.bottomRight());
+ painter.drawLine(cell.topRight(), cell.bottomLeft());
+ } else if (myState.at(position) == Nought) {
+ painter.drawEllipse(cell);
+ }
+ }
+
+ painter.setPen(QPen(Qt::yellow, 3));
+
+ for (int position = 0; position < 9; position = position + 3) {
+ if (myState.at(position) != Empty
+ && myState.at(position + 1) == myState.at(position)
+ && myState.at(position + 2) == myState.at(position)) {
+ int y = cellRect((position / 3), 0).center().y();
+ painter.drawLine(0, y, width(), y);
+ turnNumber = 9;
+ }
+ }
+
+ for (int position = 0; position < 3; ++position) {
+ if (myState.at(position) != Empty
+ && myState.at(position + 3) == myState.at(position)
+ && myState.at(position + 6) == myState.at(position)) {
+ int x = cellRect(0, position).center().x();
+ painter.drawLine(x, 0, x, height());
+ turnNumber = 9;
+ }
+ }
+ if (myState.at(0) != Empty && myState.at(4) == myState.at(0)
+ && myState.at(8) == myState.at(0)) {
+ painter.drawLine(0, 0, width(), height());
+ turnNumber = 9;
+ }
+ if (myState.at(2) != Empty && myState.at(4) == myState.at(2)
+ && myState.at(6) == myState.at(2)) {
+ painter.drawLine(0, height(), width(), 0);
+ turnNumber = 9;
+ }
+}
+
+QRect TicTacToe::cellRect(int row, int column) const
+{
+ const int HMargin = width() / 30;
+ const int VMargin = height() / 30;
+ return QRect(column * cellWidth() + HMargin,
+ row * cellHeight() + VMargin,
+ cellWidth() - 2 * HMargin,
+ cellHeight() - 2 * VMargin);
+}
diff --git a/examples/designer/taskmenuextension/tictactoe.h b/examples/designer/taskmenuextension/tictactoe.h
new file mode 100644
index 0000000..ef3c533
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoe.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TICTACTOE_H
+#define TICTACTOE_H
+
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QRect;
+class QSize;
+QT_END_NAMESPACE
+
+//! [0]
+class TicTacToe : public QWidget
+{
+ Q_OBJECT
+ Q_PROPERTY(QString state READ state WRITE setState)
+
+public:
+ TicTacToe(QWidget *parent = 0);
+
+ QSize minimumSizeHint() const;
+ QSize sizeHint() const;
+ void setState(const QString &newState);
+ QString state() const;
+ void clearBoard();
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+ void paintEvent(QPaintEvent *event);
+
+private:
+ enum { Empty = '-', Cross = 'X', Nought = 'O' };
+
+ QRect cellRect(int row, int col) const;
+ int cellWidth() const { return width() / 3; }
+ int cellHeight() const { return height() / 3; }
+
+ QString myState;
+ int turnNumber;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/taskmenuextension/tictactoedialog.cpp b/examples/designer/taskmenuextension/tictactoedialog.cpp
new file mode 100644
index 0000000..a9bd16a
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoedialog.cpp
@@ -0,0 +1,99 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include <QtDesigner>
+
+#include "tictactoe.h"
+#include "tictactoedialog.h"
+
+//! [0]
+TicTacToeDialog::TicTacToeDialog(TicTacToe *tic, QWidget *parent)
+ : QDialog(parent)
+{
+ ticTacToe = tic;
+ editor = new TicTacToe;
+ editor->setState(ticTacToe->state());
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
+ | QDialogButtonBox::Cancel
+ | QDialogButtonBox::Reset);
+
+ connect(buttonBox->button(QDialogButtonBox::Reset), SIGNAL(clicked()),
+ this, SLOT(resetState()));
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(saveState()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+ QVBoxLayout *mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(editor);
+ mainLayout->addWidget(buttonBox);
+
+ setLayout(mainLayout);
+ setWindowTitle(tr("Edit State"));
+}
+//! [0]
+
+//! [1]
+QSize TicTacToeDialog::sizeHint() const
+{
+ return QSize(250, 250);
+}
+//! [1]
+
+//! [2]
+void TicTacToeDialog::resetState()
+{
+ editor->clearBoard();
+}
+//! [2]
+
+//! [3]
+void TicTacToeDialog::saveState()
+{
+//! [3] //! [4]
+ if (QDesignerFormWindowInterface *formWindow
+ = QDesignerFormWindowInterface::findFormWindow(ticTacToe)) {
+ formWindow->cursor()->setProperty("state", editor->state());
+ }
+//! [4] //! [5]
+ accept();
+}
+//! [5]
diff --git a/examples/designer/taskmenuextension/tictactoedialog.h b/examples/designer/taskmenuextension/tictactoedialog.h
new file mode 100644
index 0000000..55b25d2
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoedialog.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TICTACTOEDIALOG_H
+#define TICTACTOEDIALOG_H
+
+#include <QDialog>
+
+QT_BEGIN_NAMESPACE
+class QDialogButtonBox;
+QT_END_NAMESPACE
+class TicTacToe;
+
+//! [0]
+class TicTacToeDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ TicTacToeDialog(TicTacToe *plugin = 0, QWidget *parent = 0);
+
+ QSize sizeHint() const;
+
+private slots:
+ void resetState();
+ void saveState();
+
+private:
+ TicTacToe *editor;
+ TicTacToe *ticTacToe;
+ QDialogButtonBox *buttonBox;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/taskmenuextension/tictactoeplugin.cpp b/examples/designer/taskmenuextension/tictactoeplugin.cpp
new file mode 100644
index 0000000..0a2d13b
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoeplugin.cpp
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDesigner>
+#include <QtGui>
+#include <QtPlugin>
+
+#include "tictactoe.h"
+#include "tictactoeplugin.h"
+#include "tictactoetaskmenu.h"
+
+//! [0]
+TicTacToePlugin::TicTacToePlugin(QObject *parent)
+ : QObject(parent)
+{
+ initialized = false;
+}
+
+QString TicTacToePlugin::name() const
+{
+ return "TicTacToe";
+}
+
+QString TicTacToePlugin::group() const
+{
+ return "Display Widgets [Examples]";
+}
+
+QString TicTacToePlugin::toolTip() const
+{
+ return "";
+}
+
+QString TicTacToePlugin::whatsThis() const
+{
+ return "";
+}
+
+QString TicTacToePlugin::includeFile() const
+{
+ return "tictactoe.h";
+}
+
+QIcon TicTacToePlugin::icon() const
+{
+ return QIcon();
+}
+
+bool TicTacToePlugin::isContainer() const
+{
+ return false;
+}
+
+QWidget *TicTacToePlugin::createWidget(QWidget *parent)
+{
+ TicTacToe *ticTacToe = new TicTacToe(parent);
+ ticTacToe->setState("-X-XO----");
+ return ticTacToe;
+}
+
+bool TicTacToePlugin::isInitialized() const
+{
+ return initialized;
+}
+
+//! [0] //! [1]
+void TicTacToePlugin::initialize(QDesignerFormEditorInterface *formEditor)
+{
+//! [1] //! [2]
+ if (initialized)
+ return;
+
+ QExtensionManager *manager = formEditor->extensionManager();
+ Q_ASSERT(manager != 0);
+//! [2]
+
+//! [3]
+ manager->registerExtensions(new TicTacToeTaskMenuFactory(manager),
+ Q_TYPEID(QDesignerTaskMenuExtension));
+
+ initialized = true;
+}
+
+QString TicTacToePlugin::domXml() const
+{
+ return QLatin1String("\
+<ui language=\"c++\">\
+ <widget class=\"TicTacToe\" name=\"ticTacToe\"/>\
+ <customwidgets>\
+ <customwidget>\
+ <class>TicTacToe</class>\
+ <propertyspecifications>\
+ <stringpropertyspecification name=\"state\" notr=\"true\" type=\"singleline\"/>\
+ </propertyspecifications>\
+ </customwidget>\
+ </customwidgets>\
+</ui>");
+}
+
+//! [3]
+
+//! [4]
+Q_EXPORT_PLUGIN2(taskmenuextension, TicTacToePlugin)
+//! [4]
diff --git a/examples/designer/taskmenuextension/tictactoeplugin.h b/examples/designer/taskmenuextension/tictactoeplugin.h
new file mode 100644
index 0000000..b51540e
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoeplugin.h
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#ifndef TICTACTOEPLUGIN_H
+#define TICTACTOEPLUGIN_H
+
+#include <QDesignerCustomWidgetInterface>
+
+QT_BEGIN_NAMESPACE
+class QIcon;
+class QWidget;
+QT_END_NAMESPACE
+
+class TicTacToePlugin : public QObject, public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+
+public:
+ TicTacToePlugin(QObject *parent = 0);
+
+ QString name() const;
+ QString group() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QString includeFile() const;
+ QIcon icon() const;
+ bool isContainer() const;
+ QWidget *createWidget(QWidget *parent);
+ bool isInitialized() const;
+ void initialize(QDesignerFormEditorInterface *formEditor);
+ QString domXml() const;
+
+private:
+ bool initialized;
+};
+
+#endif
+//! [0]
diff --git a/examples/designer/taskmenuextension/tictactoetaskmenu.cpp b/examples/designer/taskmenuextension/tictactoetaskmenu.cpp
new file mode 100644
index 0000000..af5401a
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoetaskmenu.cpp
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtDesigner>
+#include <QtGui>
+
+#include "tictactoe.h"
+#include "tictactoedialog.h"
+#include "tictactoetaskmenu.h"
+
+//! [0]
+TicTacToeTaskMenu::TicTacToeTaskMenu(TicTacToe *tic, QObject *parent)
+ : QObject(parent)
+{
+ ticTacToe = tic;
+
+ editStateAction = new QAction(tr("Edit State..."), this);
+ connect(editStateAction, SIGNAL(triggered()), this, SLOT(editState()));
+}
+//! [0]
+
+//! [1]
+void TicTacToeTaskMenu::editState()
+{
+ TicTacToeDialog dialog(ticTacToe);
+ dialog.exec();
+}
+//! [1]
+
+//! [2]
+QAction *TicTacToeTaskMenu::preferredEditAction() const
+{
+ return editStateAction;
+}
+//! [2]
+
+//! [3]
+QList<QAction *> TicTacToeTaskMenu::taskActions() const
+{
+ QList<QAction *> list;
+ list.append(editStateAction);
+ return list;
+}
+//! [3]
+
+//! [4]
+TicTacToeTaskMenuFactory::TicTacToeTaskMenuFactory(QExtensionManager *parent)
+ : QExtensionFactory(parent)
+{
+}
+//! [4]
+
+//! [5]
+QObject *TicTacToeTaskMenuFactory::createExtension(QObject *object,
+ const QString &iid,
+ QObject *parent) const
+{
+ if (iid != Q_TYPEID(QDesignerTaskMenuExtension))
+ return 0;
+
+ if (TicTacToe *tic = qobject_cast<TicTacToe*>(object))
+ return new TicTacToeTaskMenu(tic, parent);
+
+ return 0;
+}
+//! [5]
diff --git a/examples/designer/taskmenuextension/tictactoetaskmenu.h b/examples/designer/taskmenuextension/tictactoetaskmenu.h
new file mode 100644
index 0000000..4bd3170
--- /dev/null
+++ b/examples/designer/taskmenuextension/tictactoetaskmenu.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef TICTACTOETASKMENU_H
+#define TICTACTOETASKMENU_H
+
+#include <QDesignerTaskMenuExtension>
+#include <QExtensionFactory>
+
+QT_BEGIN_NAMESPACE
+class QAction;
+class QExtensionManager;
+QT_END_NAMESPACE
+class TicTacToe;
+
+//! [0]
+class TicTacToeTaskMenu : public QObject, public QDesignerTaskMenuExtension
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerTaskMenuExtension)
+
+public:
+ TicTacToeTaskMenu(TicTacToe *tic, QObject *parent);
+
+ QAction *preferredEditAction() const;
+ QList<QAction *> taskActions() const;
+
+private slots:
+ void editState();
+
+private:
+ QAction *editStateAction;
+ TicTacToe *ticTacToe;
+};
+//! [0]
+
+//! [1]
+class TicTacToeTaskMenuFactory : public QExtensionFactory
+{
+ Q_OBJECT
+
+public:
+ TicTacToeTaskMenuFactory(QExtensionManager *parent = 0);
+
+protected:
+ QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const;
+};
+//! [1]
+
+#endif
diff --git a/examples/designer/worldtimeclockbuilder/form.ui b/examples/designer/worldtimeclockbuilder/form.ui
new file mode 100644
index 0000000..e5be1d9
--- /dev/null
+++ b/examples/designer/worldtimeclockbuilder/form.ui
@@ -0,0 +1,162 @@
+<ui version="4.0" >
+ <author></author>
+ <comment></comment>
+ <exportmacro></exportmacro>
+ <class>WorldTimeForm</class>
+ <widget class="QWidget" name="WorldTimeForm" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>World Time Clock</string>
+ </property>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>9</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="WorldTimeClock" name="worldTimeClock" />
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Current time:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTimeEdit" name="timeEdit" >
+ <property name="readOnly" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <property name="margin" >
+ <number>1</number>
+ </property>
+ <property name="spacing" >
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Set time zone:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="spinBox" >
+ <property name="maximum" >
+ <number>12</number>
+ </property>
+ <property name="minimum" >
+ <number>-12</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <pixmapfunction></pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>WorldTimeClock</class>
+ <extends></extends>
+ <header>worldtimeclock.h</header>
+ <container>0</container>
+ <pixmap></pixmap>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>spinBox</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>worldTimeClock</receiver>
+ <slot>setTimeZone(int)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>339</x>
+ <y>166</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>157</x>
+ <y>230</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>worldTimeClock</sender>
+ <signal>updated(QTime)</signal>
+ <receiver>timeEdit</receiver>
+ <slot>setTime(QTime)</slot>
+ <hints>
+ <hint type="sourcelabel" >
+ <x>141</x>
+ <y>59</y>
+ </hint>
+ <hint type="destinationlabel" >
+ <x>291</x>
+ <y>133</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/examples/designer/worldtimeclockbuilder/main.cpp b/examples/designer/worldtimeclockbuilder/main.cpp
new file mode 100644
index 0000000..35f7dc0
--- /dev/null
+++ b/examples/designer/worldtimeclockbuilder/main.cpp
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtUiTools>
+//! [0]
+#include <QtGui>
+
+//! [1]
+int main(int argc, char *argv[])
+{
+ Q_INIT_RESOURCE(worldtimeclockbuilder);
+
+ QApplication app(argc, argv);
+
+ QUiLoader loader;
+//! [1]
+
+//! [2]
+ QFile file(":/forms/form.ui");
+ file.open(QFile::ReadOnly);
+
+ QWidget *widget = loader.load(&file);
+
+ file.close();
+ widget->show();
+//! [2]
+
+//! [3]
+ return app.exec();
+}
+//! [3]
diff --git a/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro
new file mode 100644
index 0000000..2690921
--- /dev/null
+++ b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.pro
@@ -0,0 +1,11 @@
+#! [0]
+CONFIG += uitools
+SOURCES = main.cpp
+RESOURCES = worldtimeclockbuilder.qrc
+#! [0]
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/designer/worldtimeclockbuilder
+sources.files = $$SOURCES $$HEADERS $$RESOURCES *.ui *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/worldtimeclockbuilder
+INSTALLS += target sources
diff --git a/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.qrc b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.qrc
new file mode 100644
index 0000000..89d5ac3
--- /dev/null
+++ b/examples/designer/worldtimeclockbuilder/worldtimeclockbuilder.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource prefix="/forms">
+ <file>form.ui</file>
+</qresource>
+</RCC>
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclock.cpp b/examples/designer/worldtimeclockplugin/worldtimeclock.cpp
new file mode 100644
index 0000000..77eff54
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclock.cpp
@@ -0,0 +1,122 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "worldtimeclock.h"
+
+WorldTimeClock::WorldTimeClock(QWidget *parent)
+ : QWidget(parent)
+{
+ timeZoneOffset = 0;
+
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(update()));
+ timer->start(1000);
+
+ setWindowTitle(tr("World Time Clock"));
+ resize(200, 200);
+}
+
+void WorldTimeClock::paintEvent(QPaintEvent *)
+{
+ static const QPoint hourHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -40)
+ };
+ static const QPoint minuteHand[3] = {
+ QPoint(7, 8),
+ QPoint(-7, 8),
+ QPoint(0, -70)
+ };
+
+ QColor hourColor(127, 0, 127);
+ QColor minuteColor(0, 127, 127, 191);
+
+ int side = qMin(width(), height());
+ QTime time = QTime::currentTime();
+ time = time.addSecs(timeZoneOffset);
+
+ QPainter painter(this);
+ painter.setRenderHint(QPainter::Antialiasing);
+ painter.translate(width() / 2, height() / 2);
+ painter.scale(side / 200.0, side / 200.0);
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(hourColor);
+
+ painter.save();
+ painter.rotate(30.0 * ((time.hour() + time.minute() / 60.0)));
+ painter.drawConvexPolygon(hourHand, 3);
+ painter.restore();
+
+ painter.setPen(hourColor);
+
+ for (int i = 0; i < 12; ++i) {
+ painter.drawLine(88, 0, 96, 0);
+ painter.rotate(30.0);
+ }
+
+ painter.setPen(Qt::NoPen);
+ painter.setBrush(minuteColor);
+
+ painter.save();
+ painter.rotate(6.0 * (time.minute() + time.second() / 60.0));
+ painter.drawConvexPolygon(minuteHand, 3);
+ painter.restore();
+
+ painter.setPen(minuteColor);
+
+ for (int j = 0; j < 60; ++j) {
+ if ((j % 5) != 0)
+ painter.drawLine(92, 0, 96, 0);
+ painter.rotate(6.0);
+ }
+
+ emit updated(time);
+}
+
+void WorldTimeClock::setTimeZone(int hourOffset)
+{
+ timeZoneOffset = qMin(qMax(-12, hourOffset), 12) * 3600;
+ update();
+}
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclock.h b/examples/designer/worldtimeclockplugin/worldtimeclock.h
new file mode 100644
index 0000000..7bfe8c5
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclock.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WORLDTIMECLOCK_H
+#define WORLDTIMECLOCK_H
+
+#include <QTime>
+#include <QWidget>
+#include <QtDesigner/QDesignerExportWidget>
+
+//! [0] //! [1]
+class QDESIGNER_WIDGET_EXPORT WorldTimeClock : public QWidget
+{
+ Q_OBJECT
+//! [0]
+
+public:
+ WorldTimeClock(QWidget *parent = 0);
+
+public slots:
+ void setTimeZone(int hourOffset);
+
+signals:
+ void updated(QTime currentTime);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private:
+ int timeZoneOffset;
+//! [2]
+};
+//! [1] //! [2]
+
+#endif
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp
new file mode 100644
index 0000000..e73c45b
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "worldtimeclock.h"
+#include "worldtimeclockplugin.h"
+
+#include <QtPlugin>
+
+WorldTimeClockPlugin::WorldTimeClockPlugin(QObject *parent)
+ : QObject(parent)
+{
+ initialized = false;
+}
+
+void WorldTimeClockPlugin::initialize(QDesignerFormEditorInterface * /* core */)
+{
+ if (initialized)
+ return;
+
+ initialized = true;
+}
+
+bool WorldTimeClockPlugin::isInitialized() const
+{
+ return initialized;
+}
+
+QWidget *WorldTimeClockPlugin::createWidget(QWidget *parent)
+{
+ return new WorldTimeClock(parent);
+}
+
+QString WorldTimeClockPlugin::name() const
+{
+ return "WorldTimeClock";
+}
+
+QString WorldTimeClockPlugin::group() const
+{
+ return "Display Widgets [Examples]";
+}
+
+QIcon WorldTimeClockPlugin::icon() const
+{
+ return QIcon();
+}
+
+QString WorldTimeClockPlugin::toolTip() const
+{
+ return "";
+}
+
+QString WorldTimeClockPlugin::whatsThis() const
+{
+ return "";
+}
+
+bool WorldTimeClockPlugin::isContainer() const
+{
+ return false;
+}
+
+QString WorldTimeClockPlugin::domXml() const
+{
+ return "<ui language=\"c++\">\n"
+ " <widget class=\"WorldTimeClock\" name=\"worldTimeClock\">\n"
+ " <property name=\"geometry\">\n"
+ " <rect>\n"
+ " <x>0</x>\n"
+ " <y>0</y>\n"
+ " <width>100</width>\n"
+ " <height>100</height>\n"
+ " </rect>\n"
+ " </property>\n"
+ " </widget>\n"
+ "</ui>";
+}
+
+QString WorldTimeClockPlugin::includeFile() const
+{
+ return "worldtimeclock.h";
+}
+
+//! [0]
+Q_EXPORT_PLUGIN2(worldtimeclockplugin, WorldTimeClockPlugin)
+//! [0]
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h
new file mode 100644
index 0000000..87d797a
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WORLDTIMECLOCKPLUGIN_H
+#define WORLDTIMECLOCKPLUGIN_H
+
+#include <QDesignerCustomWidgetInterface>
+
+//! [0]
+class WorldTimeClockPlugin : public QObject,
+ public QDesignerCustomWidgetInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QDesignerCustomWidgetInterface)
+
+public:
+ WorldTimeClockPlugin(QObject *parent = 0);
+
+ bool isContainer() const;
+ bool isInitialized() const;
+ QIcon icon() const;
+ QString domXml() const;
+ QString group() const;
+ QString includeFile() const;
+ QString name() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QWidget *createWidget(QWidget *parent);
+ void initialize(QDesignerFormEditorInterface *core);
+
+private:
+ bool initialized;
+};
+//! [0]
+
+#endif
diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro
new file mode 100644
index 0000000..cd117dc
--- /dev/null
+++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.pro
@@ -0,0 +1,21 @@
+#! [0]
+CONFIG += designer plugin
+#! [0]
+TARGET = $$qtLibraryTarget($$TARGET)
+#! [1]
+TEMPLATE = lib
+#! [1]
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/designer
+
+#! [2]
+HEADERS = worldtimeclock.h \
+ worldtimeclockplugin.h
+SOURCES = worldtimeclock.cpp \
+ worldtimeclockplugin.cpp
+#! [2]
+
+# install
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/designer/worldtimeclockplugin
+INSTALLS += target sources
diff --git a/examples/desktop/README b/examples/desktop/README
new file mode 100644
index 0000000..efe569a
--- /dev/null
+++ b/examples/desktop/README
@@ -0,0 +1,41 @@
+Qt provides features to enable applications to integrate with the user's
+preferred desktop environment.
+
+Features such as system tray icons, access to the desktop widget, and
+support for desktop services can be used to improve the appearance of
+applications and take advantage of underlying desktop facilities.
+
+
+The example launcher provided with Qt can be used to explore each of the
+examples in this directory.
+
+Documentation for these examples can be found via the Tutorial and Examples
+link in the main Qt documentation.
+
+
+Finding the Qt Examples and Demos launcher
+==========================================
+
+On Windows:
+
+The launcher can be accessed via the Windows Start menu. Select the menu
+entry entitled "Qt Examples and Demos" entry in the submenu containing
+the Qt tools.
+
+On Mac OS X:
+
+For the binary distribution, the qtdemo executable is installed in the
+/Developer/Applications/Qt directory. For the source distribution, it is
+installed alongside the other Qt tools on the path specified when Qt is
+configured.
+
+On Unix/Linux:
+
+The qtdemo executable is installed alongside the other Qt tools on the path
+specified when Qt is configured.
+
+On all platforms:
+
+The source code for the launcher can be found in the demos/qtdemo directory
+in the Qt package. This example is built at the same time as the Qt libraries,
+tools, examples, and demonstrations.
diff --git a/examples/desktop/desktop.pro b/examples/desktop/desktop.pro
new file mode 100644
index 0000000..b65f4f2
--- /dev/null
+++ b/examples/desktop/desktop.pro
@@ -0,0 +1,11 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+SUBDIRS = screenshot
+
+contains(QT_CONFIG, svg): SUBDIRS += systray
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/desktop
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS desktop.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/desktop
+INSTALLS += target sources
diff --git a/examples/desktop/screenshot/main.cpp b/examples/desktop/screenshot/main.cpp
new file mode 100644
index 0000000..59e8674
--- /dev/null
+++ b/examples/desktop/screenshot/main.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "screenshot.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Screenshot screenshot;
+ screenshot.show();
+ return app.exec();
+}
diff --git a/examples/desktop/screenshot/screenshot.cpp b/examples/desktop/screenshot/screenshot.cpp
new file mode 100644
index 0000000..7d9545e
--- /dev/null
+++ b/examples/desktop/screenshot/screenshot.cpp
@@ -0,0 +1,198 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+
+#include "screenshot.h"
+
+//! [0]
+Screenshot::Screenshot()
+{
+ screenshotLabel = new QLabel;
+ screenshotLabel->setSizePolicy(QSizePolicy::Expanding,
+ QSizePolicy::Expanding);
+ screenshotLabel->setAlignment(Qt::AlignCenter);
+ screenshotLabel->setMinimumSize(240, 160);
+
+ createOptionsGroupBox();
+ createButtonsLayout();
+
+ mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(screenshotLabel);
+ mainLayout->addWidget(optionsGroupBox);
+ mainLayout->addLayout(buttonsLayout);
+ setLayout(mainLayout);
+
+ shootScreen();
+ delaySpinBox->setValue(5);
+
+ setWindowTitle(tr("Screenshot"));
+ resize(300, 200);
+}
+//! [0]
+
+//! [1]
+void Screenshot::resizeEvent(QResizeEvent * /* event */)
+{
+ QSize scaledSize = originalPixmap.size();
+ scaledSize.scale(screenshotLabel->size(), Qt::KeepAspectRatio);
+ if (!screenshotLabel->pixmap()
+ || scaledSize != screenshotLabel->pixmap()->size())
+ updateScreenshotLabel();
+}
+//! [1]
+
+//! [2]
+void Screenshot::newScreenshot()
+{
+ if (hideThisWindowCheckBox->isChecked())
+ hide();
+ newScreenshotButton->setDisabled(true);
+
+ QTimer::singleShot(delaySpinBox->value() * 1000, this, SLOT(shootScreen()));
+}
+//! [2]
+
+//! [3]
+void Screenshot::saveScreenshot()
+{
+ QString format = "png";
+ QString initialPath = QDir::currentPath() + tr("/untitled.") + format;
+
+ QString fileName = QFileDialog::getSaveFileName(this, tr("Save As"),
+ initialPath,
+ tr("%1 Files (*.%2);;All Files (*)")
+ .arg(format.toUpper())
+ .arg(format));
+ if (!fileName.isEmpty())
+ originalPixmap.save(fileName, format.toAscii());
+}
+//! [3]
+
+//! [4]
+void Screenshot::shootScreen()
+{
+ if (delaySpinBox->value() != 0)
+ qApp->beep();
+//! [4]
+ originalPixmap = QPixmap(); // clear image for low memory situations
+ // on embedded devices.
+//! [5]
+ originalPixmap = QPixmap::grabWindow(QApplication::desktop()->winId());
+ updateScreenshotLabel();
+
+ newScreenshotButton->setDisabled(false);
+ if (hideThisWindowCheckBox->isChecked())
+ show();
+}
+//! [5]
+
+//! [6]
+void Screenshot::updateCheckBox()
+{
+ if (delaySpinBox->value() == 0) {
+ hideThisWindowCheckBox->setDisabled(true);
+ hideThisWindowCheckBox->setChecked(false);
+ }
+ else
+ hideThisWindowCheckBox->setDisabled(false);
+}
+//! [6]
+
+//! [7]
+void Screenshot::createOptionsGroupBox()
+{
+ optionsGroupBox = new QGroupBox(tr("Options"));
+
+ delaySpinBox = new QSpinBox;
+ delaySpinBox->setSuffix(tr(" s"));
+ delaySpinBox->setMaximum(60);
+ connect(delaySpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateCheckBox()));
+
+ delaySpinBoxLabel = new QLabel(tr("Screenshot Delay:"));
+
+ hideThisWindowCheckBox = new QCheckBox(tr("Hide This Window"));
+
+ optionsGroupBoxLayout = new QGridLayout;
+ optionsGroupBoxLayout->addWidget(delaySpinBoxLabel, 0, 0);
+ optionsGroupBoxLayout->addWidget(delaySpinBox, 0, 1);
+ optionsGroupBoxLayout->addWidget(hideThisWindowCheckBox, 1, 0, 1, 2);
+ optionsGroupBox->setLayout(optionsGroupBoxLayout);
+}
+//! [7]
+
+//! [8]
+void Screenshot::createButtonsLayout()
+{
+ newScreenshotButton = createButton(tr("New Screenshot"),
+ this, SLOT(newScreenshot()));
+
+ saveScreenshotButton = createButton(tr("Save Screenshot"),
+ this, SLOT(saveScreenshot()));
+
+ quitScreenshotButton = createButton(tr("Quit"), this, SLOT(close()));
+
+ buttonsLayout = new QHBoxLayout;
+ buttonsLayout->addStretch();
+ buttonsLayout->addWidget(newScreenshotButton);
+ buttonsLayout->addWidget(saveScreenshotButton);
+ buttonsLayout->addWidget(quitScreenshotButton);
+}
+//! [8]
+
+//! [9]
+QPushButton *Screenshot::createButton(const QString &text, QWidget *receiver,
+ const char *member)
+{
+ QPushButton *button = new QPushButton(text);
+ button->connect(button, SIGNAL(clicked()), receiver, member);
+ return button;
+}
+//! [9]
+
+//! [10]
+void Screenshot::updateScreenshotLabel()
+{
+ screenshotLabel->setPixmap(originalPixmap.scaled(screenshotLabel->size(),
+ Qt::KeepAspectRatio,
+ Qt::SmoothTransformation));
+}
+//! [10]
diff --git a/examples/desktop/screenshot/screenshot.h b/examples/desktop/screenshot/screenshot.h
new file mode 100644
index 0000000..ecc7724
--- /dev/null
+++ b/examples/desktop/screenshot/screenshot.h
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef SCREENSHOT_H
+#define SCREENSHOT_H
+
+#include <QPixmap>
+#include <QWidget>
+
+QT_BEGIN_NAMESPACE
+class QCheckBox;
+class QGridLayout;
+class QGroupBox;
+class QHBoxLayout;
+class QLabel;
+class QPushButton;
+class QSpinBox;
+class QVBoxLayout;
+QT_END_NAMESPACE
+
+//! [0]
+class Screenshot : public QWidget
+{
+ Q_OBJECT
+
+public:
+ Screenshot();
+
+protected:
+ void resizeEvent(QResizeEvent *event);
+
+private slots:
+ void newScreenshot();
+ void saveScreenshot();
+ void shootScreen();
+ void updateCheckBox();
+
+private:
+ void createOptionsGroupBox();
+ void createButtonsLayout();
+ QPushButton *createButton(const QString &text, QWidget *receiver,
+ const char *member);
+ void updateScreenshotLabel();
+
+ QPixmap originalPixmap;
+
+ QLabel *screenshotLabel;
+ QGroupBox *optionsGroupBox;
+ QSpinBox *delaySpinBox;
+ QLabel *delaySpinBoxLabel;
+ QCheckBox *hideThisWindowCheckBox;
+ QPushButton *newScreenshotButton;
+ QPushButton *saveScreenshotButton;
+ QPushButton *quitScreenshotButton;
+
+ QVBoxLayout *mainLayout;
+ QGridLayout *optionsGroupBoxLayout;
+ QHBoxLayout *buttonsLayout;
+};
+//! [0]
+
+#endif
diff --git a/examples/desktop/screenshot/screenshot.pro b/examples/desktop/screenshot/screenshot.pro
new file mode 100644
index 0000000..3ecbf8f
--- /dev/null
+++ b/examples/desktop/screenshot/screenshot.pro
@@ -0,0 +1,9 @@
+HEADERS = screenshot.h
+SOURCES = main.cpp \
+ screenshot.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/desktop/screenshot
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS screenshot.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/desktop/screenshot
+INSTALLS += target sources
diff --git a/examples/desktop/systray/images/bad.svg b/examples/desktop/systray/images/bad.svg
new file mode 100644
index 0000000..186dba9
--- /dev/null
+++ b/examples/desktop/systray/images/bad.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg viewBox="-10 -10 178 178" height="177.523" id="svg1" inkscape:version="0.40" sodipodi:docbase="/mnt/donnees/09-Mes_images/Travaux/Travaux vectoriel/pictogrammes/sécu SVG/produits chimiques" sodipodi:docname="XiIrritant.svg" sodipodi:version="0.32" width="155.932" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink">
+<metadata>
+<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<cc:Work rdf:about="">
+<dc:title>Irritant</dc:title>
+<dc:description>produit chimique</dc:description>
+<dc:subject>
+<rdf:Bag>
+<rdf:li></rdf:li>
+<rdf:li>symbol</rdf:li>
+<rdf:li>signs_and_symbols</rdf:li>
+</rdf:Bag>
+</dc:subject>
+<dc:publisher>
+<cc:Agent rdf:about="http://www.openclipart.org">
+<dc:title>yves GUILLOU</dc:title>
+</cc:Agent>
+</dc:publisher>
+<dc:creator>
+<cc:Agent>
+<dc:title>yves GUILLOU</dc:title>
+</cc:Agent>
+</dc:creator>
+<dc:rights>
+<cc:Agent>
+<dc:title>yves GUILLOU</dc:title>
+</cc:Agent>
+</dc:rights>
+<dc:date></dc:date>
+<dc:format>image/svg+xml</dc:format>
+<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
+<dc:language>en</dc:language>
+</cc:Work>
+<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
+<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+</cc:License>
+</rdf:RDF>
+</metadata>
+<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="svg1" inkscape:cx="62.372805" inkscape:cy="34.864537" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="1121" inkscape:window-width="1590" inkscape:window-x="200" inkscape:window-y="0" inkscape:zoom="6.6399849" pagecolor="#ffffff"/>
+<defs id="defs2">
+<marker id="ArrowEnd" markerHeight="3" markerUnits="strokeWidth" markerWidth="4" orient="auto" refX="0" refY="5" viewBox="0 0 10 10">
+<path d="M 0 0 L 10 5 L 0 10 z" id="path4"/>
+</marker>
+<marker id="ArrowStart" markerHeight="3" markerUnits="strokeWidth" markerWidth="4" orient="auto" refX="10" refY="5" viewBox="0 0 10 10">
+<path d="M 10 0 L 0 5 L 10 10 z" id="path6"/>
+</marker>
+</defs>
+<g id="g7">
+<g id="g8">
+<path d="M 155.932 155.932L 155.932 0L 0 0L 0 155.932L 155.932 155.932z" id="path9" style="stroke:none; fill:#000000"/>
+<path d="M 150.83 150.83L 150.83 5.1011L 5.1011 5.1011L 5.1011 150.83L 150.83 150.83z" id="path10" style="stroke:none; fill:#ff9900"/>
+</g>
+<g id="g11">
+<path d="M 140.823 111.783L 44.3677 14.0771L 15.1084 44.1489L 111.564 141.854L 140.823 111.783z" id="path12" style="stroke:none; fill:#000000"/>
+<path d="M 111.783 15.1084L 14.0771 111.564L 44.1489 140.823L 141.855 44.3677L 111.783 15.1084z" id="path13" style="stroke:none; fill:#000000"/>
+</g>
+</g>
+</svg>
diff --git a/examples/desktop/systray/images/heart.svg b/examples/desktop/systray/images/heart.svg
new file mode 100644
index 0000000..ba5f050
--- /dev/null
+++ b/examples/desktop/systray/images/heart.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) --><svg viewBox="100 200 550 500" height="595.27559pt" id="svg1" inkscape:version="0.40+cvs" sodipodi:docbase="C:\Documents and Settings\Jon Phillips\My Documents\projects\clipart-project\submissions" sodipodi:docname="heart-left-highlight.svg" sodipodi:version="0.32" width="595.27559pt" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:svg="http://www.w3.org/2000/svg">
+<metadata>
+<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<cc:Work rdf:about="">
+<dc:title>Heart Left-Highlight</dc:title>
+<dc:description>This is a normal valentines day heart.</dc:description>
+<dc:subject>
+<rdf:Bag>
+<rdf:li>holiday</rdf:li>
+<rdf:li>valentines</rdf:li>
+<rdf:li></rdf:li>
+<rdf:li>valentine</rdf:li>
+<rdf:li>hash(0x8a091c0)</rdf:li>
+<rdf:li>hash(0x8a0916c)</rdf:li>
+<rdf:li>signs_and_symbols</rdf:li>
+<rdf:li>hash(0x8a091f0)</rdf:li>
+<rdf:li>day</rdf:li>
+</rdf:Bag>
+</dc:subject>
+<dc:publisher>
+<cc:Agent rdf:about="http://www.openclipart.org">
+<dc:title>Jon Phillips</dc:title>
+</cc:Agent>
+</dc:publisher>
+<dc:creator>
+<cc:Agent>
+<dc:title>Jon Phillips</dc:title>
+</cc:Agent>
+</dc:creator>
+<dc:rights>
+<cc:Agent>
+<dc:title>Jon Phillips</dc:title>
+</cc:Agent>
+</dc:rights>
+<dc:date></dc:date>
+<dc:format>image/svg+xml</dc:format>
+<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
+<dc:language>en</dc:language>
+</cc:Work>
+<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
+<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+</cc:License>
+</rdf:RDF>
+</metadata>
+<defs id="defs3"/>
+<sodipodi:namedview bordercolor="#666666" borderopacity="1.0" id="base" inkscape:current-layer="layer1" inkscape:cx="549.40674" inkscape:cy="596.00159" inkscape:document-units="px" inkscape:guide-bbox="true" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:window-height="615" inkscape:window-width="866" inkscape:window-x="88" inkscape:window-y="116" inkscape:zoom="0.35000000" pagecolor="#ffffff" showguides="true"/>
+<g id="layer1" inkscape:groupmode="layer" inkscape:label="Layer 1">
+<path d="M 263.41570,235.14588 C 197.17570,235.14588 143.41575,288.90587 143.41575,355.14588 C 143.41575,489.90139 279.34890,525.23318 371.97820,658.45392 C 459.55244,526.05056 600.54070,485.59932 600.54070,355.14588 C 600.54070,288.90588 546.78080,235.14587 480.54070,235.14588 C 432.49280,235.14588 391.13910,263.51631 371.97820,304.33338 C 352.81740,263.51630 311.46370,235.14587 263.41570,235.14588 z " id="path7" sodipodi:nodetypes="ccccccc" style="fill:#e60000;fill-opacity:1.0000000;stroke:#000000;stroke-width:18.700001;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
+<path d="M 265.00000,253.59375 C 207.04033,253.59375 160.00000,300.63407 160.00000,358.59375 C 160.00000,476.50415 278.91857,507.43251 359.96875,624.00000 C 366.52868,614.08205 220.00000,478.47309 220.00000,378.59375 C 220.00000,320.63407 267.04033,273.59375 325.00000,273.59375 C 325.50453,273.59375 325.99718,273.64912 326.50000,273.65625 C 309.22436,261.07286 288.00557,253.59374 265.00000,253.59375 z " id="path220" sodipodi:nodetypes="ccccccc" style="fill:#e6e6e6;fill-opacity:0.64556962;stroke:none;stroke-width:18.700001;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"/>
+</g>
+</svg>
diff --git a/examples/desktop/systray/images/trash.svg b/examples/desktop/systray/images/trash.svg
new file mode 100644
index 0000000..c44e4c7
--- /dev/null
+++ b/examples/desktop/systray/images/trash.svg
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 10, SVG Export Plug-In . SVG Version: 3.0.0 Build 76) --><svg enable-background="new 0 0 347 348" height="348" i:pageBounds="0 792 612 0" i:rulerOrigin="0 0" i:viewOrigin="131 567" overflow="visible" space="preserve" viewBox="-20 -20 387 388" width="347" xmlns="http://www.w3.org/2000/svg" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" xmlns:graph="http://ns.adobe.com/Graphs/1.0/" xmlns:i="http://ns.adobe.com/AdobeIllustrator/10.0/" xmlns:x="http://ns.adobe.com/Extensibility/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink">
+<metadata>
+<rdf:RDF xmlns:cc="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
+<cc:Work rdf:about="">
+<dc:title>Keep Tidy Inside</dc:title>
+<dc:description></dc:description>
+<dc:subject>
+<rdf:Bag>
+<rdf:li></rdf:li>
+<rdf:li>symbol</rdf:li>
+<rdf:li>bin</rdf:li>
+<rdf:li>signs_and_symbols</rdf:li>
+<rdf:li>clean</rdf:li>
+<rdf:li>rubish</rdf:li>
+<rdf:li>trash</rdf:li>
+<rdf:li>inside</rdf:li>
+<rdf:li>garbage</rdf:li>
+<rdf:li>sign</rdf:li>
+</rdf:Bag>
+</dc:subject>
+<dc:publisher>
+<cc:Agent rdf:about="http://www.openclipart.org">
+<dc:title>Martin Owens</dc:title>
+</cc:Agent>
+</dc:publisher>
+<dc:creator>
+<cc:Agent>
+<dc:title>Martin Owens</dc:title>
+</cc:Agent>
+</dc:creator>
+<dc:rights>
+<cc:Agent>
+<dc:title>Martin Owens</dc:title>
+</cc:Agent>
+</dc:rights>
+<dc:date></dc:date>
+<dc:format>image/svg+xml</dc:format>
+<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+<cc:license rdf:resource="http://web.resource.org/cc/PublicDomain"/>
+<dc:language>en</dc:language>
+</cc:Work>
+<cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
+<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+</cc:License>
+</rdf:RDF>
+</metadata>
+<g i:dimmedPercent="50" i:knockout="Off" i:layer="yes" i:rgbTrio="#4F008000FFFF" id="Layer_1">
+<path d="M347,174c0,96.098-77.679,174-173.5,174C77.679,348,0,270.098,0,174 C0,77.902,77.679,0,173.5,0C269.321,0,347,77.902,347,174z" fill="#10A040" i:knockout="Off"/>
+<path d="M238,53c0,13.807-11.864,25-26.5,25S185,66.807,185,53s11.864-25,26.5-25 S238,39.193,238,53z" fill="#FFFFFF" i:knockout="Off"/>
+<path d="M66,175c1.055,6.355,19.333,126.417,19.333,126.417h68.333 c0,0,14.105-122.524,14.333-126.417c6.224-0.622,6.667-13-2-13c-12.164,0-89.205-0.059-98,0S61.167,174.487,66,175z" fill="#FFFFFF" i:knockout="Off"/>
+<path d="M78,141c17.292-5.325,24.179-23.532,27-31c14.513,6.596,40.333,12.265,59,8 c3.683,19.419-28.043,19.31-23,37C132.577,145.705,89.404,167.292,78,141z" fill="#FFFFFF" i:knockout="Off"/>
+<path d="M103,82l139-1c-0.6,3.421,33.633,57.497,29,67c-4.089,0.418-67,5-67,5 c6.109-9.379-13-43-13-43L103,82z" fill="#FFFFFF" i:knockout="Off"/>
+<path d="M270,156l-66-3c0,0-23.565,143.355-24,145s1.855,2.536,3,1s51-82,51-82 s19.754,80.701,20,82s3.721,1.209,4,0S270,156,270,156z" fill="#FFFFFF" i:knockout="Off"/>
+</g>
+</svg>
diff --git a/examples/desktop/systray/main.cpp b/examples/desktop/systray/main.cpp
new file mode 100644
index 0000000..d406d16
--- /dev/null
+++ b/examples/desktop/systray/main.cpp