Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pdf support for xoj files #18

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
554ff03
Added pdf support for xoj files and experimental support for moving t…
AlexD97 Feb 22, 2018
b75d36a
removed experimental support for moving the sheets/documnt with finger
AlexD97 Feb 23, 2018
ba8b96f
little fix in cloneWindow()
AlexD97 Feb 23, 2018
9b5ffe0
Added option to write with keyboard in text boxes
AlexD97 Feb 28, 2018
049bdf3
improved PDF rendering performance and memory usage
AlexD97 Mar 5, 2018
06f564d
removed some uncommented and unnecessary code + removed a bug concern…
AlexD97 Mar 5, 2018
a72e9c4
Added highlighter
AlexD97 Mar 6, 2018
c1e6519
little changes for highlighter
AlexD97 Mar 7, 2018
22c00d3
Half bug fix for selecting
AlexD97 Mar 8, 2018
6cd5262
fixed bug (selections were not shown)
AlexD97 Mar 9, 2018
2904fa7
keyboard shortcut for highlighter and text insertion
AlexD97 Mar 13, 2018
0511e02
No need for xoj import to annotate pdfs
AlexD97 Mar 13, 2018
615844c
Added ability to search in a PDF
AlexD97 Mar 15, 2018
1703c51
Updated readme
AlexD97 Mar 15, 2018
d676f3d
Reduced memory usage of strokes
AlexD97 Mar 20, 2018
72d0b1f
reduced memory usage for normal strokes
AlexD97 Mar 20, 2018
152d646
Highlighter is now separately saved
AlexD97 Mar 20, 2018
940160f
Support for different pdf sizes
AlexD97 Mar 21, 2018
02b59fd
Added option to choose font
AlexD97 Mar 21, 2018
0dce243
Merge branch 'fontDialog'
AlexD97 Mar 21, 2018
1217a76
Solved bug
AlexD97 Mar 21, 2018
f749038
Added horizontal view
AlexD97 Mar 22, 2018
28bd929
Improved selection pageChoice
AlexD97 Mar 22, 2018
45cd0f7
Improved pdf export
AlexD97 Mar 23, 2018
a1699d6
fixed bug concerning background colors in pdf export
AlexD97 Mar 23, 2018
19f2f3a
Improved (hopefully) scrolling performance
AlexD97 Mar 24, 2018
d0737da
Solved bug (documents containing pages with different sizes were not …
AlexD97 Mar 25, 2018
4eaae0c
concurrent page rendering
AlexD97 Mar 26, 2018
cc8c4e3
Removed double update after scrolling
AlexD97 Mar 26, 2018
4951e56
Updated README
AlexD97 Mar 26, 2018
b8eb089
nothing
AlexD97 Mar 27, 2018
9856db1
Added wheel zooming
AlexD97 Apr 10, 2018
c31fa9b
Initial click on links (not ready)
AlexD97 Apr 12, 2018
8c799d5
Merg
AlexD97 Apr 12, 2018
ee3c2e6
Solved bug (some pages were not loaded after scrolling
AlexD97 Apr 18, 2018
a73867c
Merge remote-tracking branch 'gitlab/zoomByWheel' into zoomByWheel
AlexD97 Apr 18, 2018
8d693a3
Removed debugging message
AlexD97 Apr 18, 2018
7e1f2ea
Little improvements (xoj support, better pdf import)
AlexD97 Apr 18, 2018
160ca47
Going backward/forward in page history
AlexD97 Apr 19, 2018
7a3ecb1
Display Icon
AlexD97 Apr 22, 2018
7cddaf6
Added a little bit documentation
AlexD97 Apr 23, 2018
aca06d7
Added markdown support
AlexD97 Apr 25, 2018
88a32bf
nothing new
AlexD97 Apr 25, 2018
5533bdb
More efficient visible pages
AlexD97 Apr 25, 2018
6d5285c
Bug solved: non A4 pdf pages were shown wrong
AlexD97 Apr 25, 2018
65cc586
Merge branch 'documentInsertion' into efficientVisiblePages
AlexD97 Apr 25, 2018
bcf1282
Interruptiong necessary page update if new request for updating all p…
AlexD97 May 1, 2018
df545c4
Updated README
AlexD97 May 1, 2018
8997f08
Smoother zooming
AlexD97 May 2, 2018
ee45314
Better timing for clean zooming
AlexD97 May 2, 2018
f2346fe
Clean zoom only after ctrl is released
AlexD97 May 2, 2018
766981f
Interrupt updateNecessaryPages also in dirtyZoom
AlexD97 May 2, 2018
7b08bb8
Updatet documentation
AlexD97 May 3, 2018
ca8317c
First attempt for different background options
AlexD97 May 3, 2018
87a6ff2
Save/load background type in .moj
AlexD97 May 3, 2018
49fdab2
Resolved crash on opening .moj on startup
AlexD97 May 6, 2018
13ad44f
Undo markdown/text should be fixed
AlexD97 May 13, 2018
f689e66
Maybe uninitialized backgroundType fixed
AlexD97 May 13, 2018
59ee434
Support for moving markdown documents
AlexD97 May 22, 2018
ad8591e
Some bugs resolved
AlexD97 May 24, 2018
8fe0cbf
Resolved critical bug (calling update() from outer thread)
AlexD97 Nov 23, 2018
b7849fb
Updated readme
AlexD97 Nov 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion MrWriter.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Type=Application
Name=MrWriter
GenericName=note program
Icon=MyIcon
Icon=MyIcon.png
Exec=MrWriter %F
MimeType=application/x-moj;application/pdf;application/x-xoj
Terminal=false
Categories=Office;
24 changes: 20 additions & 4 deletions MrWriter.pro
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ HEADERS += version.h \
pagesettingsdialog.h \
colorbutton.h \
stroke.h \
mrdoc.h
mrdoc.h \
textbox.h \
searchbar.h \
markdownbox.h \
abstracttextbox.h \
markdownselection.h

#VERSION_MAJOR = MY_MAJOR_VERSION
#VERSION_MINOR = MY_MINOR_VERSION
Expand All @@ -40,7 +45,12 @@ SOURCES += main.cpp\
tabletapplication.cpp \
pagesettingsdialog.cpp \
colorbutton.cpp \
stroke.cpp
stroke.cpp \
textbox.cpp \
searchbar.cpp \
abstracttextbox.cpp \
markdownbox.cpp \
markdownselection.cpp

HEADERS += mainwindow.h \
widget.h \
Expand All @@ -53,12 +63,18 @@ HEADERS += mainwindow.h \
tabletapplication.h \
version.h

FORMS +=
FORMS += \
searchbar.ui

RESOURCES += \
myresource.qrc

INCLUDEPATH += /usr/include/poppler/qt5
LIBS += -L/usr/lib -lpoppler-qt5
LIBS += -lz
LIBS += -lmarkdown

QMAKE_LFLAGS += -lmarkdown

ICON = MyIcon.icns

Expand All @@ -70,7 +86,7 @@ DISTFILES += \
Info.plist \
COPYING

CONFIG += c++11
CONFIG += c++17

#QMAKE_CXXFLAGS_RELEASE -= -O
#QMAKE_CXXFLAGS_RELEASE -= -O1
Expand Down
Empty file modified MrWriter_artwork_Inkscape/Icons/ai2svg.sh
100755 → 100644
Empty file.
Empty file modified MrWriter_artwork_Inkscape/Icons/svg2png.sh
100755 → 100644
Empty file.
13 changes: 11 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@ Notetaking and blackboard replacement application. Inspired by Xournal. Written

See the http://unruhschuh.github.io/MrWriter/[project homepage] for more informations and screenshots.

== Fork
This is a fork of the original MrWriter software. The fork has the ability to annotate PDFs with your stylus.

== Prerequisites
* Qt has to be installed
* Poppler has to be installed
* [Discount](https://www.pell.portland.or.us/~orc/Code/discount/) has to be installed
* _(optional)_ pdftk has to be installed (for proper PDF export)

== Build
* Download and install http://www.qt.io/download/[Qt]
* Run in the terminal
** `git clone https://github.com/unruhschuh/MrWriter.git`
** `git clone https://github.com/AlexD97/MrWriter.git`
** `cd MrWriter`
** `qmake`
** `make`
** `./MrWriter`
* Alternatively: open `MrWriter.pro` in QtCreator, configure, build and run
53 changes: 53 additions & 0 deletions abstracttextbox.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#include "abstracttextbox.h"

AbstractTextBox::AbstractTextBox(QWidget *parent)
: QTextEdit(parent) {
}

void AbstractTextBox::setBoundingRect(const QRectF &rect){
m_textRect = rect;
}

void AbstractTextBox::setPage(MrDoc::Page* page){
m_page = page;
}

void AbstractTextBox::setPageNum(int pageNum){
m_pageNum = pageNum;
}

int AbstractTextBox::getPageNum(){
return m_pageNum;
}

void AbstractTextBox::setPrevText(const QString &text){
m_prevText = text;
}

void AbstractTextBox::setTextIndex(int index){
m_textIndex = index;
}

MrDoc::Page* AbstractTextBox::getPage(){
return m_page;
}

int AbstractTextBox::getTextIndex() const {
return m_textIndex;
}

const QString& AbstractTextBox::getPrevText() const{
return m_prevText;
}

int AbstractTextBox::getTextX() const {
return m_textRect.x();
}

int AbstractTextBox::getTextY() const {
return m_textRect.y();
}

const QRectF& AbstractTextBox::getBoundingRect() const {
return m_textRect;
}
42 changes: 42 additions & 0 deletions abstracttextbox.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#ifndef ABSTRACTTEXTBOX_H
#define ABSTRACTTEXTBOX_H
#include <QTextEdit>
#include "page.h"

class AbstractTextBox : public QTextEdit {
Q_OBJECT
public:
AbstractTextBox(QWidget* parent = nullptr);

void setBoundingRect(const QRectF& rect);
void setPage(MrDoc::Page *page);
void setPageNum(int pageNum);
void setPrevText(const QString& text);
void setTextIndex(int index);

MrDoc::Page* getPage();
int getPageNum();
int getTextIndex() const;
const QString& getPrevText() const;
int getTextX() const;
int getTextY() const;
const QRectF& getBoundingRect() const;

public slots:
/**
* @brief applyText hides the widget (and emits signal @ref updatePage);
*/
virtual void applyText() = 0;

protected:
MrDoc::Page* m_page;
int m_pageNum;
QString m_prevText;
int m_textIndex;
//int x; //x-Coordinate of the text, not of the textBox
//int y;
QRectF m_textRect;

};

#endif // ABSTRACTTEXTBOX_H
Empty file modified check_releases.sh
100755 → 100644
Empty file.
Loading