<!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=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<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 style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <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.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(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 name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifndef __EDITORPAGE_H__</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#define __EDITORPAGE_H__</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160; </div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;core/GpgConstants.h&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;ui/GpgFrontendUI.h&quot;</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">class </span>Ui_PlainTextEditor;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160; </div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceGpgFrontend_1_1UI.html">GpgFrontend::UI</a> {</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html">   43</a></span>&#160;<span class="keyword">class </span><a class="code" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html">PlainTextEditorPage</a> : <span class="keyword">public</span> QWidget {</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;  Q_OBJECT</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160; <span class="keyword">public</span>:</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;  <span class="keyword">explicit</span> <a class="code" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a68a9460aabd6cbcb2af9420dd2d96e0c">PlainTextEditorPage</a>(QString file_path = <span class="stringliteral">&quot;&quot;</span>,</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;                               QWidget* parent = <span class="keyword">nullptr</span>);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;  [[nodiscard]] <span class="keyword">const</span> QString&amp; <a class="code" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#aff81f0f98a399fa55b6b0ebf2230d4cf">GetFilePath</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#aa9e82690824c82e7628ba4ace9d6e2fe">SetFilePath</a>(<span class="keyword">const</span> QString&amp; filePath);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  QPlainTextEdit* <a class="code" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a6218e6e12bdba0228e4ab4276f7fed7a">GetTextPage</a>();</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="keywordtype">void</span> <a class="code" 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 name="l00079"></a><span class="lineno">   79</span>&#160; </div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keywordtype">void</span> <a class="code" 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 name="l00086"></a><span class="lineno">   86</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="keywordtype">void</span> ReadFile();</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160; </div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#ac1902b063decfeebe7f0908cbfe618ce">   99</a></span>&#160;  [[nodiscard]] <span class="keywordtype">bool</span> <a class="code" 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 name="l00100"></a><span class="lineno">  100</span>&#160; </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;  <span class="keywordtype">void</span> PrepareToDestroy();</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160; <span class="keyword">private</span>:</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  std::shared_ptr&lt;Ui_PlainTextEditor&gt; ui_;  </div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#ae867b6329fcb1978479a9d70f7b017db">  109</a></span>&#160;  QString <a class="code" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#ae867b6329fcb1978479a9d70f7b017db">full_file_path_</a>;  </div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a4f94e9ef7889a169bda5a47b7f657358">  110</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a4f94e9ef7889a169bda5a47b7f657358">sign_marked_</a>{};  </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <span class="keywordtype">bool</span> read_done_ = <span class="keyword">false</span>;          </div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;  QThread* read_thread_ = <span class="keyword">nullptr</span>;  </div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;  <span class="keywordtype">bool</span> binary_mode_ = <span class="keyword">false</span>;        </div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <span class="keywordtype">size_t</span> read_bytes_ = 0;           </div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  <span class="keywordtype">void</span> <a class="code" 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 name="l00122"></a><span class="lineno">  122</span>&#160; </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <span class="keywordtype">void</span> <a class="code" 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 name="l00129"></a><span class="lineno">  129</span>&#160; </div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; <span class="keyword">private</span> slots:</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160; </div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classGpgFrontend_1_1UI_1_1PlainTextEditorPage.html#a45267bcfc8fc83851894061c0fe2a9c2">slot_format_gpg_header</a>();</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;  <span class="keywordtype">void</span> <a class="code" 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 name="l00143"></a><span class="lineno">  143</span>&#160;};</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}  <span class="comment">// namespace GpgFrontend::UI</span></div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160; </div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="preprocessor">#endif  // __EDITORPAGE_H__</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<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="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 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="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_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_1FileReadThread_html"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1FileReadThread.html">GpgFrontend::UI::FileReadThread</a></div><div class="ttdef"><b>Definition:</b> FileReadThread.h:38</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_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_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"><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_1FileReadThread_html_a152a32021b66ea7de5aaf8cf6376c9ab"><div class="ttname"><a href="classGpgFrontend_1_1UI_1_1FileReadThread.html#a152a32021b66ea7de5aaf8cf6376c9ab">GpgFrontend::UI::FileReadThread::SignalSendReadBlock</a></div><div class="ttdeci">void SignalSendReadBlock(const std::string &amp;block)</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_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_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_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>
<!-- 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="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>