Skip to content

Commit

Permalink
Github Issue #29: First step to implement faster and dynamic way to s…
Browse files Browse the repository at this point in the history
…ave the file
  • Loading branch information
AngryFender committed Mar 27, 2024
1 parent dbd5bf0 commit e8ccbd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mktextdocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ QString MkTextDocument::getFileName() const
return this->fileName;
}

QTextDocument *MkTextDocument::getRawDocument()
{
return &rawDocument;
}

void MkTextDocument::cursorPosChangedHandle( bool hasSelection, int blockNumber,QRect rect, SelectRange * range)
{
if(range){
Expand Down
2 changes: 2 additions & 0 deletions mktextdocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class MkTextDocument : public QTextDocument
int getCharacterNo()const;
QString getFilePath() const;
QString getFileName() const;
QTextDocument* getRawDocument();

public slots:
void cursorPosChangedHandle(bool hasSelection, int blockNumber,QRect rect, SelectRange * range);
Expand Down Expand Up @@ -142,6 +143,7 @@ public slots:

QTextDocument originalTexts;
QTextDocument formattedTexts;
QTextDocument rawDocument;

QString filePath;
QString fileName;
Expand Down

0 comments on commit e8ccbd6

Please sign in to comment.