TreeNote is written in the most beautiful programming language available: Python. It pays off to learn it. So start with one of these great books.
TreeNote uses the GUI library PyQt, which is a Python wrapper for the popular Qt library. Qt has a really good documentation. If you want to know what a particular class is able to to, just google it, e.g. ‘qtreeview 5’ (the 5 is for Qt version 5) and it will give you http://doc.qt.io/qt-5/qtreeview.html.
If you don’t know how to do something:
QTreeView interacts with the underlying data structure through the class
TreeModel, a subclass of the
QAbstractItemModel. The overwritten methods can be divided into two categories:
QModelIndexcontains a pointer to a
Tree_item. It can be retrieved with
parent(index)return a specific
rowCount(index)returns not just the row count of the
Tree_itemto the given
index, but calls
Tree_item : init_childsto get the children from the database and insert them as new
Tree_itemobjects into the local data instance.
insertRows(), removeRows(), move_left()and
setData()are called. They edit the underlying data model.
Filtering is done with the
QSortFilterProxyModel very easily. It is
inserted between the regular model and the view and passes through only
the desired items, for example the ones which match to a search string.
resources/locales/from the current code by executing
lrelease resources/locales/*.ts. This creates .qm files which are used by application.
pip3 install pyinstallerin cmd.exe / terminal
git clone https://github.com/pyinstaller/pyinstaller.git
Xcodefrom the AppStore
Download the SIP source package. Unarchive it and run:
> python3 configure.py > make > sudo make install
Download the PyQt source package. Unarchive it and run (takes several minutes):
> python3 configure.py --qmake=/Users/YourUsername/Qt/5.7/clang_64/bin/qmake > make > sudo make install
pyinstaller --path=C:\Users\YourUsername\AppData\Local\Programs\Python\Python35\Lib\site-packages\PyQt5\Qt\bin --noconsole --icon=treenote\resources\images\treenote.ico TreeNote.py(the –path option is needed until this bug is fixed)
python3 /path/to/pyinstaller.py --noconsole --icon=treenote/resources/images/treenote.icns TreeNote.py
python setup.py sdist
twine upload dist/*
python setup.py bdist_wheel
pip3 install dist/TreeNote-1.7.0-py3-none-any.whlfor testing
twine upload dist/*
makepkg --printsrcinfo > .SRCINFO