GpgFrontend-Doxygen/docs/html/PlainTextEditorPage_8h_source.html
2022-05-09 03:59:26 +08:00

171 lines
20 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GpgFrontend Project: src/ui/widgets/PlainTextEditorPage.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">GpgFrontend Project
</div>
<div id="projectbrief">A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('PlainTextEditorPage_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle"><div class="title">PlainTextEditorPage.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#ifndef __EDITORPAGE_H__</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#define __EDITORPAGE_H__</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#include &quot;core/GpgConstants.h&quot;</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#include &quot;ui/GpgFrontendUI.h&quot;</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="keyword">class </span>Ui_PlainTextEditor;</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceGpgFrontend_1_1UI.html">GpgFrontend::UI</a> {</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html"> 43</a></span><span class="keyword">class </span><a class="code hl_class" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html">PlainTextEditorPage</a> : <span class="keyword">public</span> QWidget {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> Q_OBJECT</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">public</span>:</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> <span class="keyword">explicit</span> <a class="code hl_function" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a68a9460aabd6cbcb2af9420dd2d96e0c">PlainTextEditorPage</a>(QString file_path = <span class="stringliteral">&quot;&quot;</span>,</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> QWidget* parent = <span class="keyword">nullptr</span>);</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> [[nodiscard]] <span class="keyword">const</span> QString&amp; <a class="code hl_function" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#aff81f0f98a399fa55b6b0ebf2230d4cf">GetFilePath</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#aa9e82690824c82e7628ba4ace9d6e2fe">SetFilePath</a>(<span class="keyword">const</span> QString&amp; filePath);</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> QPlainTextEdit* <a class="code hl_function" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a6218e6e12bdba0228e4ab4276f7fed7a">GetTextPage</a>();</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#af5dfdfd48ef64cc46e524ec70a22fe3a">ShowNotificationWidget</a>(QWidget* widget, <span class="keyword">const</span> <span class="keywordtype">char</span>* className);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#aee4f46e54f29da671838ed232e526700">CloseNoteByClass</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* className);</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">void</span> ReadFile();</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#ac1902b063decfeebe7f0908cbfe618ce"> 99</a></span> [[nodiscard]] <span class="keywordtype">bool</span> <a class="code hl_function" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#ac1902b063decfeebe7f0908cbfe618ce">ReadDone</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> this-&gt;read_done_; }</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> </div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span> <span class="keywordtype">void</span> PrepareToDestroy();</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span> <span class="keyword">private</span>:</div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span> std::shared_ptr&lt;Ui_PlainTextEditor&gt; ui_; </div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#ae867b6329fcb1978479a9d70f7b017db"> 109</a></span> QString <a class="code hl_variable" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#ae867b6329fcb1978479a9d70f7b017db">full_file_path_</a>; </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a4f94e9ef7889a169bda5a47b7f657358"> 110</a></span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a4f94e9ef7889a169bda5a47b7f657358">sign_marked_</a>{}; </div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> <span class="keywordtype">bool</span> read_done_ = <span class="keyword">false</span>; </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span> QThread* read_thread_ = <span class="keyword">nullptr</span>; </div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> <span class="keywordtype">bool</span> binary_mode_ = <span class="keyword">false</span>; </div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span> <span class="keywordtype">size_t</span> read_bytes_ = 0; </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span> </div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a14b7431a786ce59e98576e3680cb9a58">detect_encoding</a>(<span class="keyword">const</span> std::string&amp; data);</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> <span class="keywordtype">void</span> <a class="code hl_function" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a770be847f7d01556a2674972f848e1aa">detect_cr_lf</a>(<span class="keyword">const</span> QString&amp; data);</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> <span class="keyword">private</span> slots:</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span> <span class="keywordtype">void</span> <a class="code hl_slot" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a45267bcfc8fc83851894061c0fe2a9c2">slot_format_gpg_header</a>();</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> </div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span> <span class="keywordtype">void</span> <a class="code hl_slot" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a8ba8f52aa2d1102d3513fdf0f4760b28">slot_insert_text</a>(<span class="keyword">const</span> std::string&amp; data);</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span>};</div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span> </div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span>} <span class="comment">// namespace GpgFrontend::UI</span></div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span> </div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span><span class="preprocessor">#endif </span><span class="comment">// __EDITORPAGE_H__</span></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html">GpgFrontend::UI::PlainTextEditorPage</a></div><div class="ttdoc">Class for handling a single tab of the tabwidget.</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.h:43</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_a14b7431a786ce59e98576e3680cb9a58"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a14b7431a786ce59e98576e3680cb9a58">GpgFrontend::UI::PlainTextEditorPage::detect_encoding</a></div><div class="ttdeci">void detect_encoding(const std::string &amp;data)</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:224</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_a45267bcfc8fc83851894061c0fe2a9c2"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a45267bcfc8fc83851894061c0fe2a9c2">GpgFrontend::UI::PlainTextEditorPage::slot_format_gpg_header</a></div><div class="ttdeci">void slot_format_gpg_header()</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:97</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_a4f94e9ef7889a169bda5a47b7f657358"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a4f94e9ef7889a169bda5a47b7f657358">GpgFrontend::UI::PlainTextEditorPage::sign_marked_</a></div><div class="ttdeci">bool sign_marked_</div><div class="ttdoc">true, if the signed header is marked, false if not</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.h:110</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_a6218e6e12bdba0228e4ab4276f7fed7a"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a6218e6e12bdba0228e4ab4276f7fed7a">GpgFrontend::UI::PlainTextEditorPage::GetTextPage</a></div><div class="ttdeci">QPlainTextEdit * GetTextPage()</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:76</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_a68a9460aabd6cbcb2af9420dd2d96e0c"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a68a9460aabd6cbcb2af9420dd2d96e0c">GpgFrontend::UI::PlainTextEditorPage::PlainTextEditorPage</a></div><div class="ttdeci">PlainTextEditorPage(QString file_path=&quot;&quot;, QWidget *parent=nullptr)</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:39</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_a770be847f7d01556a2674972f848e1aa"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a770be847f7d01556a2674972f848e1aa">GpgFrontend::UI::PlainTextEditorPage::detect_cr_lf</a></div><div class="ttdeci">void detect_cr_lf(const QString &amp;data)</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:248</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_a8ba8f52aa2d1102d3513fdf0f4760b28"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a8ba8f52aa2d1102d3513fdf0f4760b28">GpgFrontend::UI::PlainTextEditorPage::slot_insert_text</a></div><div class="ttdeci">void slot_insert_text(const std::string &amp;data)</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:184</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_aa9e82690824c82e7628ba4ace9d6e2fe"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#aa9e82690824c82e7628ba4ace9d6e2fe">GpgFrontend::UI::PlainTextEditorPage::SetFilePath</a></div><div class="ttdeci">void SetFilePath(const QString &amp;filePath)</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:78</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_ac1902b063decfeebe7f0908cbfe618ce"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#ac1902b063decfeebe7f0908cbfe618ce">GpgFrontend::UI::PlainTextEditorPage::ReadDone</a></div><div class="ttdeci">bool ReadDone() const</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.h:99</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_ae867b6329fcb1978479a9d70f7b017db"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#ae867b6329fcb1978479a9d70f7b017db">GpgFrontend::UI::PlainTextEditorPage::full_file_path_</a></div><div class="ttdeci">QString full_file_path_</div><div class="ttdoc">The path to the file handled in the tab.</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.h:109</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_aee4f46e54f29da671838ed232e526700"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#aee4f46e54f29da671838ed232e526700">GpgFrontend::UI::PlainTextEditorPage::CloseNoteByClass</a></div><div class="ttdeci">void CloseNoteByClass(const char *className)</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:88</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_af5dfdfd48ef64cc46e524ec70a22fe3a"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#af5dfdfd48ef64cc46e524ec70a22fe3a">GpgFrontend::UI::PlainTextEditorPage::ShowNotificationWidget</a></div><div class="ttdeci">void ShowNotificationWidget(QWidget *widget, const char *className)</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:82</div></div>
<div class="ttc" id="aclassGpgFrontend_1_1UI_1_1PlainTextEditorPage_html_aff81f0f98a399fa55b6b0ebf2230d4cf"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#aff81f0f98a399fa55b6b0ebf2230d4cf">GpgFrontend::UI::PlainTextEditorPage::GetFilePath</a></div><div class="ttdeci">const QString &amp; GetFilePath() const</div><div class="ttdef"><b>Definition:</b> PlainTextEditorPage.cpp:72</div></div>
<div class="ttc" id="anamespaceGpgFrontend_1_1UI_html"><div class="ttname"><a href="namespaceGpgFrontend_1_1UI.html">GpgFrontend::UI</a></div><div class="ttdef"><b>Definition:</b> VerifyDetailsDialog.cpp:33</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_da5c6b39c0a2f54e57df6799511cd3ab.html">ui</a></li><li class="navelem"><a class="el" href="dir_f3911b9629b0e27ea480d06d47573cbf.html">widgets</a></li><li class="navelem"><b>PlainTextEditorPage.h</b></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>
</html>