File: Composer_8h-source.html

package info (click to toggle)
witty 3.1.2-3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 45,512 kB
  • ctags: 35,832
  • sloc: cpp: 69,469; ansic: 66,945; xml: 4,383; sh: 594; perl: 108; makefile: 106
file content (139 lines) | stat: -rw-r--r-- 20,316 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Wt examples: /home/koen/project/wt/public-git/wt/examples/composer/Composer.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
<h1>/home/koen/project/wt/public-git/wt/examples/composer/Composer.h</h1><a href="Composer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This may look like C code, but it's really -*- C++ -*-</span>
<a name="l00002"></a>00002 <span class="comment">/*</span>
<a name="l00003"></a>00003 <span class="comment"> * Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.</span>
<a name="l00004"></a>00004 <span class="comment"> *</span>
<a name="l00005"></a>00005 <span class="comment"> * See the LICENSE file for terms of use.</span>
<a name="l00006"></a>00006 <span class="comment"> */</span>
<a name="l00007"></a>00007 <span class="preprocessor">#ifndef COMPOSER_H_</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define COMPOSER_H_</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;Wt/WCompositeWidget&gt;</span>
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="Contact_8h.html">Contact.h</a>"</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="Attachment_8h.html">Attachment.h</a>"</span>
<a name="l00014"></a>00014 
<a name="l00015"></a>00015 <span class="keyword">namespace </span>Wt {
<a name="l00016"></a>00016 <span class="keyword">class </span><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WLineEdit.html">WLineEdit</a>;
<a name="l00017"></a>00017 <span class="keyword">class </span><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WPushButton.html">WPushButton</a>;
<a name="l00018"></a>00018 <span class="keyword">class </span><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html">WTable</a>;
<a name="l00019"></a>00019 <span class="keyword">class </span><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">WText</a>;
<a name="l00020"></a>00020 <span class="keyword">class </span><a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTextArea.html">WTextArea</a>;
<a name="l00021"></a>00021 }
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="keyword">class </span><a class="code" href="classAddresseeEdit.html" title="An edit field for an email addressee.">AddresseeEdit</a>;
<a name="l00024"></a>00024 <span class="keyword">class </span><a class="code" href="classAttachmentEdit.html" title="An edit field for an email attachment.">AttachmentEdit</a>;
<a name="l00025"></a>00025 <span class="keyword">class </span><a class="code" href="classContactSuggestions.html" title="A suggestion popup suggesting contacts from an addressbook.">ContactSuggestions</a>;
<a name="l00026"></a>00026 <span class="keyword">class </span><a class="code" href="classOptionList.html" title="A list of options, separated by &amp;#39;|&amp;#39;.">OptionList</a>;
<a name="l00027"></a>00027 <span class="keyword">class </span><a class="code" href="classOption.html" title="A clickable option.">Option</a>;
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="keyword">using namespace </span>Wt;
<a name="l00030"></a>00030 
<a name="l00035"></a>00035 
<a name="l00040"></a><a class="code" href="classComposer.html">00040</a> <span class="keyword">class </span><a class="code" href="classComposer.html" title="An E-mail composer widget.">Composer</a> : <span class="keyword">public</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WCompositeWidget.html">WCompositeWidget</a>
<a name="l00041"></a>00041 {
<a name="l00042"></a>00042 <span class="keyword">public</span>:
<a name="l00045"></a>00045   <a class="code" href="classComposer.html#084dec0bea86c87db2d711bfea72e47d" title="Construct a new Composer.">Composer</a>(<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a> *<a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WWidget.html#3461e31818c4d2f516641bdaf508312a">parent</a> = 0);
<a name="l00046"></a>00046 
<a name="l00049"></a>00049   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#875c536e6e8cc4c31b8cdb6b17e0c72c" title="Set message To: contacts.">setTo</a>(<span class="keyword">const</span> std::vector&lt;Contact&gt;&amp; <a class="code" href="classComposer.html#8d147821090f6e305111bd82187b929f" title="Get the To: contacts.">to</a>);
<a name="l00050"></a>00050 
<a name="l00053"></a>00053   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#af759051d0b21bcc4a285172f23edaaa" title="Set subject.">setSubject</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WString.html">WString</a>&amp; <a class="code" href="classComposer.html#09023bf88e8d7c566e27d489d28b3d50" title="Get the subject.">subject</a>);
<a name="l00054"></a>00054 
<a name="l00057"></a>00057   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#0b5002a67038461ec6ef3adf37800bf0" title="Set the message.">setMessage</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WString.html">WString</a>&amp; <a class="code" href="classComposer.html#99572a1e5ee69bfbe804318fc28dae1b" title="Get the message.">message</a>);
<a name="l00058"></a>00058 
<a name="l00061"></a>00061   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#c952c4e43c8dfb1ae46e83d84b381728" title="Set the address book, for autocomplete suggestions.">setAddressBook</a>(<span class="keyword">const</span> std::vector&lt;Contact&gt;&amp; addressBook);
<a name="l00062"></a>00062 
<a name="l00065"></a>00065   std::vector&lt;Contact&gt; <a class="code" href="classComposer.html#8d147821090f6e305111bd82187b929f" title="Get the To: contacts.">to</a>() <span class="keyword">const</span>;
<a name="l00066"></a>00066 
<a name="l00069"></a>00069   std::vector&lt;Contact&gt; <a class="code" href="classComposer.html#fbabc511b2d7faf6e789d83e999886d1" title="Get the Cc: contacts.">cc</a>() <span class="keyword">const</span>;
<a name="l00070"></a>00070 
<a name="l00073"></a>00073   std::vector&lt;Contact&gt; <a class="code" href="classComposer.html#d28ae55ec6069a08d86fc0e92387dccb" title="Get the Bc: contacts.">bcc</a>() <span class="keyword">const</span>;
<a name="l00074"></a>00074 
<a name="l00077"></a>00077   <span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WString.html">WString</a>&amp; <a class="code" href="classComposer.html#09023bf88e8d7c566e27d489d28b3d50" title="Get the subject.">subject</a>() <span class="keyword">const</span>;
<a name="l00078"></a>00078 
<a name="l00084"></a>00084   std::vector&lt;Attachment&gt; <a class="code" href="classComposer.html#84ca3fe36eddc04930ce0471de1ba7b8" title="Get the list of attachments.">attachments</a>() <span class="keyword">const</span>;
<a name="l00085"></a>00085 
<a name="l00088"></a>00088   <span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WString.html">WString</a>&amp; <a class="code" href="classComposer.html#99572a1e5ee69bfbe804318fc28dae1b" title="Get the message.">message</a>() <span class="keyword">const</span>;
<a name="l00089"></a>00089 
<a name="l00090"></a>00090 <span class="keyword">public</span>:
<a name="l00093"></a><a class="code" href="classComposer.html#523271b083a60c433f044018f3c0d02a">00093</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1Signal.html">Wt::Signal&lt;void&gt;</a> <a class="code" href="classComposer.html#523271b083a60c433f044018f3c0d02a" title="The message is ready to be sent...">send</a>;
<a name="l00094"></a>00094 
<a name="l00097"></a><a class="code" href="classComposer.html#93eb63c5e90cf794a710348a847b9c0a">00097</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1Signal.html">Wt::Signal&lt;void&gt;</a> <a class="code" href="classComposer.html#93eb63c5e90cf794a710348a847b9c0a" title="The message must be discarded.">discard</a>;
<a name="l00098"></a>00098 
<a name="l00099"></a>00099 <span class="keyword">private</span>:
<a name="l00100"></a><a class="code" href="classComposer.html#af13aa9b960e901cc97270350f4b7990">00100</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a> *<a class="code" href="classComposer.html#af13aa9b960e901cc97270350f4b7990">layout_</a>;
<a name="l00101"></a>00101 
<a name="l00102"></a><a class="code" href="classComposer.html#476ad9498a617ce73199792d4ab727be">00102</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WPushButton.html">WPushButton</a>      *<a class="code" href="classComposer.html#476ad9498a617ce73199792d4ab727be">topSendButton_</a>, *<a class="code" href="classComposer.html#2b4444c47fe4718e03661bb2af36102e">topSaveNowButton_</a>, *<a class="code" href="classComposer.html#7dc86db047a022086d644c825fa9588d">topDiscardButton_</a>;
<a name="l00103"></a><a class="code" href="classComposer.html#66efb6563c5dfd378def156a91531b6b">00103</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WPushButton.html">WPushButton</a>      *<a class="code" href="classComposer.html#66efb6563c5dfd378def156a91531b6b">botSendButton_</a>, *<a class="code" href="classComposer.html#03113e5fe16b19f8108659d30da25a3c">botSaveNowButton_</a>, *<a class="code" href="classComposer.html#8ed76b62de2178118194a6672b18588a">botDiscardButton_</a>;
<a name="l00104"></a><a class="code" href="classComposer.html#09067ffd913810f9d499570609e17674">00104</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WText.html">WText</a>            *<a class="code" href="classComposer.html#09067ffd913810f9d499570609e17674">statusMsg_</a>;
<a name="l00105"></a>00105 
<a name="l00106"></a><a class="code" href="classComposer.html#9bcfcbfc8651cefaaa3c830d64a9ffb3">00106</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTable.html">WTable</a>           *<a class="code" href="classComposer.html#9bcfcbfc8651cefaaa3c830d64a9ffb3">edits_</a>;
<a name="l00107"></a>00107 
<a name="l00109"></a><a class="code" href="classComposer.html#5171d107b535bd670b72d6d3abe4b850">00109</a>   <a class="code" href="classAddresseeEdit.html" title="An edit field for an email addressee.">AddresseeEdit</a>    *<a class="code" href="classComposer.html#5171d107b535bd670b72d6d3abe4b850" title="To: Addressees edit.">toEdit_</a>;
<a name="l00111"></a><a class="code" href="classComposer.html#9d12e4daf1f221a8f387037fbcd147ae">00111</a>   <a class="code" href="classAddresseeEdit.html" title="An edit field for an email addressee.">AddresseeEdit</a>    *<a class="code" href="classComposer.html#9d12e4daf1f221a8f387037fbcd147ae" title="Cc: Addressees edit.">ccEdit_</a>;
<a name="l00113"></a><a class="code" href="classComposer.html#e58f4078c8859022a18f9d4460894289">00113</a>   <a class="code" href="classAddresseeEdit.html" title="An edit field for an email addressee.">AddresseeEdit</a>    *<a class="code" href="classComposer.html#e58f4078c8859022a18f9d4460894289" title="Bcc: Addressees edit.">bccEdit_</a>;
<a name="l00114"></a>00114 
<a name="l00116"></a><a class="code" href="classComposer.html#889f0931ce31c316b89201db6b146814">00116</a>   <a class="code" href="classContactSuggestions.html" title="A suggestion popup suggesting contacts from an addressbook.">ContactSuggestions</a> *<a class="code" href="classComposer.html#889f0931ce31c316b89201db6b146814" title="The suggestions popup for the addressee edits.">contactSuggestions_</a>;
<a name="l00117"></a>00117 
<a name="l00119"></a><a class="code" href="classComposer.html#7bc919d444b2bb9ea8cfb7fd3db689df">00119</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WLineEdit.html">WLineEdit</a>        *<a class="code" href="classComposer.html#7bc919d444b2bb9ea8cfb7fd3db689df" title="The subject line edit.">subject_</a>;
<a name="l00120"></a>00120 
<a name="l00122"></a><a class="code" href="classComposer.html#ea60b95ef9d0053fcffe930e4865a958">00122</a>   <a class="code" href="classOptionList.html" title="A list of options, separated by &amp;#39;|&amp;#39;.">OptionList</a>       *<a class="code" href="classComposer.html#ea60b95ef9d0053fcffe930e4865a958" title="OptionsList for editing Cc or Bcc.">options_</a>;
<a name="l00123"></a>00123 
<a name="l00125"></a><a class="code" href="classComposer.html#c307d36403cab6ff70204c7822d9e149">00125</a>   <a class="code" href="classOption.html" title="A clickable option.">Option</a>           *<a class="code" href="classComposer.html#c307d36403cab6ff70204c7822d9e149" title="Option for editing Cc:.">addcc_</a>;
<a name="l00127"></a><a class="code" href="classComposer.html#9d102646eca2e3081886796cdb15a409">00127</a>   <a class="code" href="classOption.html" title="A clickable option.">Option</a>           *<a class="code" href="classComposer.html#9d102646eca2e3081886796cdb15a409" title="Option for editing Bcc:.">addbcc_</a>;
<a name="l00129"></a><a class="code" href="classComposer.html#8e04ae3dc2b27ea08a803cbbb8ebd031">00129</a>   <a class="code" href="classOption.html" title="A clickable option.">Option</a>           *<a class="code" href="classComposer.html#8e04ae3dc2b27ea08a803cbbb8ebd031" title="Option for attaching a file.">attachFile_</a>;
<a name="l00131"></a><a class="code" href="classComposer.html#0ab2b9453f4787af299e72b4c2a2423d">00131</a>   <a class="code" href="classOption.html" title="A clickable option.">Option</a>           *<a class="code" href="classComposer.html#0ab2b9453f4787af299e72b4c2a2423d" title="Option for attaching another file.">attachOtherFile_</a>;
<a name="l00132"></a>00132 
<a name="l00134"></a><a class="code" href="classComposer.html#9616ef08dd2e3f16b63cec7b1d1cbf2c">00134</a>   std::vector&lt;AttachmentEdit *&gt; <a class="code" href="classComposer.html#9616ef08dd2e3f16b63cec7b1d1cbf2c" title="Array which holds all the attachments, including one extra invisible one.">attachments_</a>;
<a name="l00135"></a>00135 
<a name="l00137"></a><a class="code" href="classComposer.html#17dbbe76abbe0ed57d4c5928bcf24c42">00137</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WTextArea.html">WTextArea</a>        *<a class="code" href="classComposer.html#17dbbe76abbe0ed57d4c5928bcf24c42" title="WTextArea for the main message.">message_</a>;
<a name="l00138"></a>00138 
<a name="l00140"></a><a class="code" href="classComposer.html#a079baf3b2fcec4ceabda3457cf28de4">00140</a>   <span class="keywordtype">bool</span> <a class="code" href="classComposer.html#75988a529863cd5e90138e46056aae9f" title="state when waiting asyncrhonously for attachments to be uploaded">saving_</a>, <a class="code" href="classComposer.html#a079baf3b2fcec4ceabda3457cf28de4">sending_</a>;
<a name="l00141"></a>00141 
<a name="l00143"></a><a class="code" href="classComposer.html#818abbb226340284e5998daa1d10a72c">00143</a>   <span class="keywordtype">int</span> <a class="code" href="classComposer.html#818abbb226340284e5998daa1d10a72c" title="number of attachments waiting to be uploaded during saving">attachmentsPending_</a>;
<a name="l00144"></a>00144 
<a name="l00145"></a>00145 <span class="keyword">private</span> slots:
<a name="l00148"></a>00148   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#5ade97ee657c39f8576c8ca2a98a8731" title="Add an attachment edit.">attachMore</a>();
<a name="l00149"></a>00149 
<a name="l00152"></a>00152   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#b142f49c8de59da0f84185165eb6c1c1" title="Remove the given attachment edit.">removeAttachment</a>(<a class="code" href="classAttachmentEdit.html" title="An edit field for an email attachment.">AttachmentEdit</a> *attachment);
<a name="l00153"></a>00153 
<a name="l00158"></a>00158   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#06e0d72a05418d11d1cfec8a5fcb48b6" title="Slot attached to the Send button.">sendIt</a>();
<a name="l00159"></a>00159 
<a name="l00165"></a>00165   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#5db93f098178964c68c1ecb287ff11ca" title="Slot attached to the Save now button.">saveNow</a>();
<a name="l00166"></a>00166 
<a name="l00171"></a>00171   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#5880788a9a63a938572e6ca7e47a01ab" title="Slot attached to the Discard button.">discardIt</a>();
<a name="l00172"></a>00172 
<a name="l00180"></a>00180   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#aa2db4aef750f6533c53af1189c92144" title="Slotcalled when an attachment has been uploaded.">attachmentDone</a>();
<a name="l00181"></a>00181 
<a name="l00182"></a>00182 <span class="keyword">private</span>:
<a name="l00183"></a>00183   <span class="comment">// create the user-interface</span>
<a name="l00184"></a>00184   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#d949df7a1910929fffb12a67b362508f">createUi</a>();
<a name="l00185"></a>00185 
<a name="l00189"></a>00189   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#1097d72401283f58dfd79dbfb47a30a5" title="All attachments have been processed, determine the result of saving the message.">saved</a>();
<a name="l00190"></a>00190 
<a name="l00193"></a>00193   <span class="keywordtype">void</span> <a class="code" href="classComposer.html#5163d3b98235d9c8d8d5aff82738ca57" title="Set the status, and apply the given style.">setStatus</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WString.html">WString</a>&amp; text, <span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html/" href="../../reference/html/classWt_1_1WString.html">WString</a>&amp; style);
<a name="l00194"></a>00194 
<a name="l00195"></a><a class="code" href="classComposer.html#a4bbd94229aa2788f3dd71177c1b1f34">00195</a>   <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classAttachmentEdit.html" title="An edit field for an email attachment.">AttachmentEdit</a>;
<a name="l00196"></a>00196 };
<a name="l00197"></a>00197 
<a name="l00200"></a>00200 <span class="preprocessor">#endif // COMPOSER_H_</span>
</pre></div></div>
<hr size="1"><address style="align: right;"><small>
Generated on Fri Mar 26 17:12:12 2010 for <a href="http://www.webtoolkit.eu/wt/">Wt</a> by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6</small></address>
</body>
</html>