File: AttachmentEdit_8h_source.html

package info (click to toggle)
witty 3.2.1-2%2Bdeb7u1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 70,436 kB
  • sloc: cpp: 117,095; ansic: 77,999; xml: 7,564; sh: 1,037; perl: 208; makefile: 144; java: 86; sql: 14
file content (139 lines) | stat: -rw-r--r-- 11,838 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 XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Wt examples: /home/koen/project/wt/public-git/wt/examples/composer/AttachmentEdit.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Wt examples
   &#160;<span id="projectnumber">3.2.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;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>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">/home/koen/project/wt/public-git/wt/examples/composer/AttachmentEdit.h</div>  </div>
</div>
<div class="contents">
<a href="AttachmentEdit_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&#39;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 ATTACHMENT_EDIT_H_</span>
<a name="l00008"></a>00008 <span class="preprocessor"></span><span class="preprocessor">#define ATTACHMENT_EDIT_H_</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &lt;Wt/WContainerWidget&gt;</span>
<a name="l00011"></a>00011 
<a name="l00012"></a>00012 <span class="keyword">namespace </span>Wt {
<a name="l00013"></a>00013   <span class="keyword">class </span><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WFileUpload.html">WFileUpload</a>;
<a name="l00014"></a>00014   <span class="keyword">class </span><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a>;
<a name="l00015"></a>00015   <span class="keyword">class </span><a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WCheckBox.html">WCheckBox</a>;
<a name="l00016"></a>00016 }
<a name="l00017"></a>00017 
<a name="l00018"></a>00018 <span class="keyword">class </span><a class="code" href="classAttachment.html" title="An email attachment.">Attachment</a>;
<a name="l00019"></a>00019 <span class="keyword">class </span><a class="code" href="classComposer.html" title="An E-mail composer widget.">Composer</a>;
<a name="l00020"></a>00020 <span class="keyword">class </span><a class="code" href="classOption.html" title="A clickable option.">Option</a>;
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="keyword">using namespace </span>Wt;
<a name="l00023"></a>00023 
<a name="l00028"></a>00028 
<a name="l00037"></a><a class="code" href="classAttachmentEdit.html">00037</a> <span class="keyword">class </span><a class="code" href="classAttachmentEdit.html" title="An edit field for an email attachment.">AttachmentEdit</a> : <span class="keyword">public</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a>
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039 <span class="keyword">public</span>:
<a name="l00042"></a>00042   <a class="code" href="classAttachmentEdit.html" title="An edit field for an email attachment.">AttachmentEdit</a>(<a class="code" href="classComposer.html" title="An E-mail composer widget.">Composer</a> *composer, <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent = 0);
<a name="l00043"></a>00043 
<a name="l00050"></a>00050   <span class="keywordtype">bool</span> uploadNow();
<a name="l00051"></a>00051 
<a name="l00054"></a><a class="code" href="classAttachmentEdit.html#adc4314df22d6fa1598acebe62726a464">00054</a>   <span class="keywordtype">bool</span> <a class="code" href="classAttachmentEdit.html#adc4314df22d6fa1598acebe62726a464" title="Returns whether the upload failed.">uploadFailed</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> uploadFailed_; }
<a name="l00055"></a>00055 
<a name="l00058"></a>00058   std::vector&lt;Attachment&gt; attachments();
<a name="l00059"></a>00059 
<a name="l00063"></a><a class="code" href="classAttachmentEdit.html#a8e8ec2b62906eb6137b1a505a6ba0306">00063</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1Signal.html">Signal&lt;void&gt;</a>&amp; <a class="code" href="classAttachmentEdit.html#a8e8ec2b62906eb6137b1a505a6ba0306" title="Signal emitted when new attachment(s) have been uploaded (or failed to upload.">uploadDone</a>() { <span class="keywordflow">return</span> uploadDone_; }
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 <span class="keyword">private</span>:
<a name="l00066"></a><a class="code" href="classAttachmentEdit.html#a403927978e9c841e64b62421458790e8">00066</a>   <a class="code" href="classComposer.html" title="An E-mail composer widget.">Composer</a>    *<a class="code" href="classAttachmentEdit.html#a403927978e9c841e64b62421458790e8">composer_</a>;
<a name="l00067"></a>00067 
<a name="l00068"></a><a class="code" href="classAttachmentEdit.html#a24ee0aca670036a7491a1c0114188cc7">00068</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1Signal.html">Signal&lt;void&gt;</a> <a class="code" href="classAttachmentEdit.html#a24ee0aca670036a7491a1c0114188cc7">uploadDone_</a>;
<a name="l00069"></a>00069 
<a name="l00071"></a><a class="code" href="classAttachmentEdit.html#aa9a3945293cf0a30d35e8bc56312d430">00071</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WFileUpload.html">WFileUpload</a> *<a class="code" href="classAttachmentEdit.html#aa9a3945293cf0a30d35e8bc56312d430" title="The WFileUpload control.">upload_</a>;
<a name="l00072"></a>00072 
<a name="l00073"></a><a class="code" href="classAttachmentEdit_1_1UploadInfo.html">00073</a>   <span class="keyword">class </span><a class="code" href="classAttachmentEdit_1_1UploadInfo.html">UploadInfo</a> : <span class="keyword">public</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a>
<a name="l00074"></a>00074   {
<a name="l00075"></a>00075   <span class="keyword">public</span>:
<a name="l00076"></a>00076     <a class="code" href="classAttachmentEdit_1_1UploadInfo.html">UploadInfo</a>(<span class="keyword">const</span> <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1Http_1_1UploadedFile.html">Http::UploadedFile</a>&amp; f, <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WContainerWidget.html">WContainerWidget</a> *parent = 0);
<a name="l00077"></a>00077 
<a name="l00078"></a><a class="code" href="classAttachmentEdit_1_1UploadInfo.html#acc43ca5ce401f8320154638602f3b536">00078</a>     <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1Http_1_1UploadedFile.html">Http::UploadedFile</a> <a class="code" href="classAttachmentEdit_1_1UploadInfo.html#acc43ca5ce401f8320154638602f3b536">info_</a>;
<a name="l00079"></a>00079 
<a name="l00081"></a><a class="code" href="classAttachmentEdit_1_1UploadInfo.html#ab7eba6ca0f514142e96fe3a4845f0361">00081</a>     <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WAnchor.html">WAnchor</a>   *<a class="code" href="classAttachmentEdit_1_1UploadInfo.html#ab7eba6ca0f514142e96fe3a4845f0361" title="Anchor referencing the file.">downloadLink_</a>;
<a name="l00082"></a>00082 
<a name="l00084"></a><a class="code" href="classAttachmentEdit_1_1UploadInfo.html#a2bdc455790096d63d594a0dd7fe47a6f">00084</a>     <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WCheckBox.html">WCheckBox</a> *<a class="code" href="classAttachmentEdit_1_1UploadInfo.html#a2bdc455790096d63d594a0dd7fe47a6f" title="The check box to keep or discard the uploaded file.">keep_</a>;
<a name="l00085"></a>00085   };
<a name="l00086"></a>00086 
<a name="l00087"></a><a class="code" href="classAttachmentEdit.html#ad3f98e98d3e5502fc275446dc5c6b762">00087</a>   std::vector&lt;UploadInfo *&gt; <a class="code" href="classAttachmentEdit.html#ad3f98e98d3e5502fc275446dc5c6b762">uploadInfo_</a>;
<a name="l00088"></a>00088 
<a name="l00090"></a><a class="code" href="classAttachmentEdit.html#a2c3fa5d63ec5feedc63f95295989cd4d">00090</a>   <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WText.html">WText</a> *<a class="code" href="classAttachmentEdit.html#a2c3fa5d63ec5feedc63f95295989cd4d" title="The text box to display an error (empty or too big file)">error_</a>;
<a name="l00091"></a>00091 
<a name="l00093"></a><a class="code" href="classAttachmentEdit.html#a55484424d37b196d07035e245399ffae">00093</a>   <a class="code" href="classOption.html" title="A clickable option.">Option</a> *<a class="code" href="classAttachmentEdit.html#a55484424d37b196d07035e245399ffae" title="The option to cancel the file upload.">remove_</a>;
<a name="l00094"></a>00094 
<a name="l00096"></a><a class="code" href="classAttachmentEdit.html#a6a19f364e7a82797bc5c18adb6a01530">00096</a>   <span class="keywordtype">bool</span> <a class="code" href="classAttachmentEdit.html#a6a19f364e7a82797bc5c18adb6a01530" title="The state of the last upload process.">uploadFailed_</a>;
<a name="l00097"></a>00097 
<a name="l00099"></a>00099   <span class="keywordtype">void</span> uploaded();
<a name="l00100"></a>00100 
<a name="l00102"></a>00102   <span class="keywordtype">void</span> fileTooLarge(::int64_t size);
<a name="l00103"></a>00103 
<a name="l00105"></a>00105   <span class="keywordtype">void</span> <span class="keyword">remove</span>();
<a name="l00106"></a>00106 };
<a name="l00107"></a>00107 
<a name="l00110"></a>00110 <span class="preprocessor">#endif // ATTACHMENT_EDIT_H_</span>
</pre></div></div>
</div>
<hr size="1"><address style="text-align: right; margin: 3px"><small>
Generated on Fri Mar 30 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by&nbsp;<a
href="http://www.doxygen.org/index.html"><img src="doxygen.png"
alt="doxygen" border="0" style="vertical-align: middle; display:
inline-block; height: 2em"></a> 1.7.5.1</small></address>
</body>
</html>