GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
|
29 #ifndef __EDITORPAGE_H__
30 #define __EDITORPAGE_H__
34 #include "core/GpgConstants.h"
35 #include "ui/GpgFrontendUI.h"
37 class Ui_PlainTextEditor;
55 QWidget* parent =
nullptr);
101 [[nodiscard]]
bool ReadDone()
const {
return this->read_done_; }
124 std::shared_ptr<Ui_PlainTextEditor> ui_;
127 bool read_done_ =
false;
128 bool binary_mode_ =
false;
129 size_t read_bytes_ = 0;
130 std::string charset_name_;
131 std::string language_name_;
132 int32_t charset_confidence_{};
133 bool is_crlf_ =
false;
166 #endif // __EDITORPAGE_H__
void SetFilePath(const QString &filePath)
Definition: PlainTextEditorPage.cpp:110
Definition: FileReadTask.cpp:31
const QString & GetFilePath() const
Definition: PlainTextEditorPage.cpp:84
void ShowNotificationWidget(QWidget *widget, const char *className)
Definition: PlainTextEditorPage.cpp:114
void SignalUIBytesDisplayed()
this signal is emitted when the bytes has been append in texteditor.
PlainTextEditorPage(QString file_path={}, QWidget *parent=nullptr)
Definition: PlainTextEditorPage.cpp:42
static TaskRunnerGetter & GetInstance(int channel=GpgFrontend::GPGFRONTEND_DEFAULT_CHANNEL)
Get the Instance object.
Definition: GpgFunctionObject.h:170
void detect_cr_lf(const std::string &data)
Definition: PlainTextEditorPage.cpp:290
void CloseNoteByClass(const char *className)
Definition: PlainTextEditorPage.cpp:120
Definition: FileReadTask.h:39
bool sign_marked_
true, if the signed header is marked, false if not
Definition: PlainTextEditorPage.h:126
Class for handling a single tab of the tabwidget.
Definition: PlainTextEditorPage.h:45
void detect_encoding(const std::string &data)
Definition: PlainTextEditorPage.cpp:266
nlohmann::json & Check(const std::string &key, const nlohmann::json &default_value)
Definition: SettingsObject.cpp:31
static CharsetInfo Detect(const std::string &buffer)
Definition: CharsetOperator.cpp:42
The SettingsObject class This class is used to store settings for the application securely.
Definition: SettingsObject.h:43
void slot_format_gpg_header()
Definition: PlainTextEditorPage.cpp:129
QPlainTextEdit * GetTextPage()
Definition: PlainTextEditorPage.cpp:88
bool WillCharsetChange() const
detect if the charset of the file will change
Definition: PlainTextEditorPage.cpp:90
QString full_file_path_
The path to the file handled in the tab.
Definition: PlainTextEditorPage.h:125
bool ReadDone() const
Definition: PlainTextEditorPage.h:101
void slot_insert_text(QByteArray bytes_data)
Definition: PlainTextEditorPage.cpp:213
void NotifyFileSaved()
notify the user that the file has been saved.
Definition: PlainTextEditorPage.cpp:101