diff options
Diffstat (limited to 'doc/html/qaxcontainer-example-qutlook.html')
-rw-r--r-- | doc/html/qaxcontainer-example-qutlook.html | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/doc/html/qaxcontainer-example-qutlook.html b/doc/html/qaxcontainer-example-qutlook.html index b3ca43ca6..e7261e350 100644 --- a/doc/html/qaxcontainer-example-qutlook.html +++ b/doc/html/qaxcontainer-example-qutlook.html @@ -51,7 +51,7 @@ constructor and a destructor and has a member <tt>contact_item</tt> of type class ABListViewItem : public <a href="qlistviewitem.html">TQListViewItem</a> { public: - ABListViewItem( <a href="qlistview.html">TQListView</a> *listview, TQString firstName, TQString lastName, TQString address, TQString eMail, TQAxObject *contact ); + ABListViewItem( <a href="ntqlistview.html">TQListView</a> *listview, TQString firstName, TQString lastName, TQString address, TQString eMail, TQAxObject *contact ); ~ABListViewItem(); <a href="qaxobject.html">TQAxObject</a> *contactItem() const; @@ -78,11 +78,11 @@ a new protected slot <tt>updateOutlook</tt>, and also three members of type <a h <p> The implementation of the ABListViewItem class is trivial: -<pre> ABListViewItem::ABListViewItem( <a href="qlistview.html">TQListView</a> *listview, - <a href="qstring.html">TQString</a> firstName, - <a href="qstring.html">TQString</a> lastName, - <a href="qstring.html">TQString</a> address, - <a href="qstring.html">TQString</a> eMail, +<pre> ABListViewItem::ABListViewItem( <a href="ntqlistview.html">TQListView</a> *listview, + <a href="ntqstring.html">TQString</a> firstName, + <a href="ntqstring.html">TQString</a> lastName, + <a href="ntqstring.html">TQString</a> address, + <a href="ntqstring.html">TQString</a> eMail, <a href="qaxobject.html">TQAxObject</a> *contact ) : <a href="qlistviewitem.html">TQListViewItem</a>( listview, firstName, lastName, address, eMail ), contact_item( contact ) { @@ -100,8 +100,8 @@ The implementation of the ABListViewItem class is trivial: </pre>The ABCentralWidget constructor initializes the <a href="qaxobject.html">TQAxObject</a> pointers to zero and calls the <tt>setupOutlook</tt> function. The ABCentralWidget destructor calls the Logoff method of the outlookSession object. -<pre> ABCentralWidget::ABCentralWidget( <a href="qwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="qwidget.html">TQWidget</a>( parent, name ), outlook( 0 ), outlookSession( 0 ), contactItems( 0 ) +<pre> ABCentralWidget::ABCentralWidget( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="ntqwidget.html">TQWidget</a>( parent, name ), outlook( 0 ), outlookSession( 0 ), contactItems( 0 ) { mainGrid = new <a href="qgridlayout.html">TQGridLayout</a>( this, 2, 1, 5, 5 ); @@ -144,9 +144,9 @@ to the signals provided by the "Items" COM object. Finally, it calls the <pre> // Get all items if ( defFolder ) { contactItems = defFolder-><a href="qaxbase.html#querySubObject">querySubObject</a>( "Items" ); - <a href="qobject.html#connect">connect</a>( contactItems, SIGNAL(ItemAdd(IDispatch*)), this, SLOT(updateOutlook()) ); - <a href="qobject.html#connect">connect</a>( contactItems, SIGNAL(ItemChange(IDispatch*)), this, SLOT(updateOutlook()) ); - <a href="qobject.html#connect">connect</a>( contactItems, SIGNAL(ItemRemove()), this, SLOT(updateOutlook()) ); + <a href="ntqobject.html#connect">connect</a>( contactItems, SIGNAL(ItemAdd(IDispatch*)), this, SLOT(updateOutlook()) ); + <a href="ntqobject.html#connect">connect</a>( contactItems, SIGNAL(ItemChange(IDispatch*)), this, SLOT(updateOutlook()) ); + <a href="ntqobject.html#connect">connect</a>( contactItems, SIGNAL(ItemRemove()), this, SLOT(updateOutlook()) ); } updateOutlook(); @@ -160,16 +160,16 @@ but the list view item should take ownership to provide a cleaner relation betwe entries, so the item has to be removed from its parent object. <pre> void ABCentralWidget::updateOutlook() { - <a name="x2725"></a> listView-><a href="qlistview.html#clear">clear</a>(); + <a name="x2725"></a> listView-><a href="ntqlistview.html#clear">clear</a>(); if ( !contactItems ) return; <a href="qaxobject.html">TQAxObject</a> *item = contactItems->querySubObject( "GetFirst()" ); while ( item ) { - <a name="x2729"></a> <a href="qstring.html">TQString</a> firstName = item-><a href="qobject.html#property">property</a>( "FirstName" ).toString(); - <a href="qstring.html">TQString</a> lastName = item-><a href="qobject.html#property">property</a>( "LastName" ).toString(); - <a href="qstring.html">TQString</a> address = item-><a href="qobject.html#property">property</a>( "HomeAddress" ).toString(); - <a href="qstring.html">TQString</a> email = item-><a href="qobject.html#property">property</a>( "Email1Address" ).toString(); + <a name="x2729"></a> <a href="ntqstring.html">TQString</a> firstName = item-><a href="ntqobject.html#property">property</a>( "FirstName" ).toString(); + <a href="ntqstring.html">TQString</a> lastName = item-><a href="ntqobject.html#property">property</a>( "LastName" ).toString(); + <a href="ntqstring.html">TQString</a> address = item-><a href="ntqobject.html#property">property</a>( "HomeAddress" ).toString(); + <a href="ntqstring.html">TQString</a> email = item-><a href="ntqobject.html#property">property</a>( "Email1Address" ).toString(); (void)new ABListViewItem( listView, firstName, lastName, address, email, item ); // the listviewitem takes ownership @@ -184,48 +184,48 @@ object to create a new contact item, and creates a new ABListViewItem if the cal succeeds. <pre> void ABCentralWidget::addEntry() { - <a name="x2724"></a> if ( !iFirstName-><a href="qlineedit.html#text">text</a>().isEmpty() || !iLastName-><a href="qlineedit.html#text">text</a>().isEmpty() || - !iAddress-><a href="qlineedit.html#text">text</a>().isEmpty() || !iEMail-><a href="qlineedit.html#text">text</a>().isEmpty() ) { + <a name="x2724"></a> if ( !iFirstName-><a href="ntqlineedit.html#text">text</a>().isEmpty() || !iLastName-><a href="ntqlineedit.html#text">text</a>().isEmpty() || + !iAddress-><a href="ntqlineedit.html#text">text</a>().isEmpty() || !iEMail-><a href="ntqlineedit.html#text">text</a>().isEmpty() ) { <a href="qaxobject.html">TQAxObject</a> *contactItem = outlook-><a href="qaxbase.html#querySubObject">querySubObject</a>( "CreateItem(OlItemType)", "olContactItem" ); if ( contactItem ) { - <a name="x2730"></a> contactItem-><a href="qobject.html#setProperty">setProperty</a>( "FirstName", iFirstName-><a href="qlineedit.html#text">text</a>() ); - contactItem-><a href="qobject.html#setProperty">setProperty</a>( "LastName", iLastName-><a href="qlineedit.html#text">text</a>() ); - contactItem-><a href="qobject.html#setProperty">setProperty</a>( "HomeAddress", iAddress-><a href="qlineedit.html#text">text</a>() ); - contactItem-><a href="qobject.html#setProperty">setProperty</a>( "Email1Address", iEMail-><a href="qlineedit.html#text">text</a>() ); + <a name="x2730"></a> contactItem-><a href="ntqobject.html#setProperty">setProperty</a>( "FirstName", iFirstName-><a href="ntqlineedit.html#text">text</a>() ); + contactItem-><a href="ntqobject.html#setProperty">setProperty</a>( "LastName", iLastName-><a href="ntqlineedit.html#text">text</a>() ); + contactItem-><a href="ntqobject.html#setProperty">setProperty</a>( "HomeAddress", iAddress-><a href="ntqlineedit.html#text">text</a>() ); + contactItem-><a href="ntqobject.html#setProperty">setProperty</a>( "Email1Address", iEMail-><a href="ntqlineedit.html#text">text</a>() ); <a name="x2720"></a> contactItem-><a href="qaxbase.html#dynamicCall">dynamicCall</a>( "Save()" ); - new ABListViewItem( listView, iFirstName-><a href="qlineedit.html#text">text</a>(), - iLastName-><a href="qlineedit.html#text">text</a>(), iAddress-><a href="qlineedit.html#text">text</a>(), iEMail-><a href="qlineedit.html#text">text</a>(), contactItem ); + new ABListViewItem( listView, iFirstName-><a href="ntqlineedit.html#text">text</a>(), + iLastName-><a href="ntqlineedit.html#text">text</a>(), iAddress-><a href="ntqlineedit.html#text">text</a>(), iEMail-><a href="ntqlineedit.html#text">text</a>(), contactItem ); } } - <a name="x2723"></a> iFirstName-><a href="qlineedit.html#setText">setText</a>( "" ); - iLastName-><a href="qlineedit.html#setText">setText</a>( "" ); - iAddress-><a href="qlineedit.html#setText">setText</a>( "" ); - iEMail-><a href="qlineedit.html#setText">setText</a>( "" ); + <a name="x2723"></a> iFirstName-><a href="ntqlineedit.html#setText">setText</a>( "" ); + iLastName-><a href="ntqlineedit.html#setText">setText</a>( "" ); + iAddress-><a href="ntqlineedit.html#setText">setText</a>( "" ); + iEMail-><a href="ntqlineedit.html#setText">setText</a>( "" ); } </pre> <p> The <tt>changeEntry</tt> implementation updates the values in the contact item of the current listview item as well as the values of the listview item itself. <pre> void ABCentralWidget::changeEntry() { - <a name="x2726"></a> ABListViewItem *item = (ABListViewItem*)listView-><a href="qlistview.html#currentItem">currentItem</a>(); + <a name="x2726"></a> ABListViewItem *item = (ABListViewItem*)listView-><a href="ntqlistview.html#currentItem">currentItem</a>(); if ( item && - ( !iFirstName-><a href="qlineedit.html#text">text</a>().isEmpty() || !iLastName-><a href="qlineedit.html#text">text</a>().isEmpty() || - !iAddress-><a href="qlineedit.html#text">text</a>().isEmpty() || !iEMail-><a href="qlineedit.html#text">text</a>().isEmpty() ) ) { + ( !iFirstName-><a href="ntqlineedit.html#text">text</a>().isEmpty() || !iLastName-><a href="ntqlineedit.html#text">text</a>().isEmpty() || + !iAddress-><a href="ntqlineedit.html#text">text</a>().isEmpty() || !iEMail-><a href="ntqlineedit.html#text">text</a>().isEmpty() ) ) { <a href="qaxobject.html">TQAxObject</a> *contactItem = item->contactItem(); - contactItem-><a href="qobject.html#setProperty">setProperty</a>( "FirstName", iFirstName-><a href="qlineedit.html#text">text</a>() ); - contactItem-><a href="qobject.html#setProperty">setProperty</a>( "LastName", iLastName-><a href="qlineedit.html#text">text</a>() ); - contactItem-><a href="qobject.html#setProperty">setProperty</a>( "HomeAddress", iAddress-><a href="qlineedit.html#text">text</a>() ); - contactItem-><a href="qobject.html#setProperty">setProperty</a>( "Email1Address", iEMail-><a href="qlineedit.html#text">text</a>() ); + contactItem-><a href="ntqobject.html#setProperty">setProperty</a>( "FirstName", iFirstName-><a href="ntqlineedit.html#text">text</a>() ); + contactItem-><a href="ntqobject.html#setProperty">setProperty</a>( "LastName", iLastName-><a href="ntqlineedit.html#text">text</a>() ); + contactItem-><a href="ntqobject.html#setProperty">setProperty</a>( "HomeAddress", iAddress-><a href="ntqlineedit.html#text">text</a>() ); + contactItem-><a href="ntqobject.html#setProperty">setProperty</a>( "Email1Address", iEMail-><a href="ntqlineedit.html#text">text</a>() ); contactItem-><a href="qaxbase.html#dynamicCall">dynamicCall</a>( "Save()" ); - <a name="x2728"></a> item-><a href="qlistviewitem.html#setText">setText</a>( 0, iFirstName-><a href="qlineedit.html#text">text</a>() ); - item-><a href="qlistviewitem.html#setText">setText</a>( 1, iLastName-><a href="qlineedit.html#text">text</a>() ); - item-><a href="qlistviewitem.html#setText">setText</a>( 2, iAddress-><a href="qlineedit.html#text">text</a>() ); - item-><a href="qlistviewitem.html#setText">setText</a>( 3, iEMail-><a href="qlineedit.html#text">text</a>() ); + <a name="x2728"></a> item-><a href="qlistviewitem.html#setText">setText</a>( 0, iFirstName-><a href="ntqlineedit.html#text">text</a>() ); + item-><a href="qlistviewitem.html#setText">setText</a>( 1, iLastName-><a href="ntqlineedit.html#text">text</a>() ); + item-><a href="qlistviewitem.html#setText">setText</a>( 2, iAddress-><a href="ntqlineedit.html#text">text</a>() ); + item-><a href="qlistviewitem.html#setText">setText</a>( 3, iEMail-><a href="ntqlineedit.html#text">text</a>() ); } } </pre> |