10 Commits
Author | SHA1 | Message | Date |
---|---|---|---|
Ivan Holmes | 70e2d4e7d3 |
remove debug print statements and make bg grey
|
2 years ago |
Ivan Holmes | de4b2bfe3d |
slightly improve pagesetup ui
|
3 years ago |
Ivan Holmes | 6fc46a46b8 |
change style of save warning dialog buttons on Haiku for better integration
|
3 years ago |
Ivan Holmes | 6f3da3b2c4 |
change icons on messageboxes to info rather than warning
|
3 years ago |
Ivan Holmes | 1d313f420e |
merge remote changes
Merge branch 'master' of https://git.radivan.net/ivan/chordsheet |
3 years ago |
Ivan Holmes | 44147406c8 |
fix save warning crash on new document and change save warning dialog icon
|
3 years ago |
Ivan Holmes | 41a67c5e55 |
fix the fix and add vertical scroll position hack
|
3 years ago |
Ivan Holmes | c9a93b5e93 |
fix for flashing/cut off preview and pagesetup ui slimmed
|
3 years ago |
Ivan Holmes | d31a926f92 |
get MDI working properly, fix some longstanding bugs
|
3 years ago |
Ivan Holmes | 699312cb5c |
Update linux.spec to add pyqt5.sip hidden import
|
3 years ago |
25 changed files with 1012 additions and 1891 deletions
-
5.gitignore
-
25chordsheet/document.py
-
11chordsheet/parsers.py
-
11chordsheet/render.py
-
43cli.py
-
0csgui/comboBox.py
-
30csgui/dialogs.py
-
32csgui/messageBox.py
-
14csgui/panels.py
-
36csgui/pdfViewer.py
-
29csgui/tableView.py
-
1027gui.py
-
2linux.spec
-
BINpreview.pdf
-
1requirements.txt
-
17ui/aboutdialog.ui
-
4ui/blocks.ui
-
2ui/chords.ui
-
4ui/document.ui
-
1095ui/mainwindow.ui
-
233ui/new.ui
-
32ui/pdfarea.ui
-
42ui/preview.ui
-
206ui/psetup.ui
-
2ui/sections.ui
@ -0,0 +1,43 @@ |
|||
#!/usr/bin/env python3 |
|||
# -*- coding: utf-8 -*- |
|||
|
|||
import sys |
|||
import os |
|||
import time |
|||
|
|||
from reportlab.lib.units import mm, cm, inch, pica |
|||
from reportlab.lib.pagesizes import A4, A5, LETTER, LEGAL |
|||
from reportlab.pdfbase import pdfmetrics |
|||
from reportlab.pdfbase.ttfonts import TTFont |
|||
|
|||
from chordsheet.common import scriptDir |
|||
from chordsheet.document import Document, Style, Chord, Block, Section |
|||
from chordsheet.render import Renderer |
|||
from chordsheet.parsers import parseFingering, parseName |
|||
|
|||
import _version |
|||
|
|||
pdfmetrics.registerFont( |
|||
TTFont('FreeSans', os.path.join(scriptDir, 'fonts', 'FreeSans.ttf'))) |
|||
if sys.platform == "darwin": |
|||
pdfmetrics.registerFont( |
|||
TTFont('HelveticaNeue', 'HelveticaNeue.ttc', subfontIndex=0)) |
|||
|
|||
if len(sys.argv) == 2: |
|||
inputFilePath = sys.argv[1] |
|||
else: |
|||
print("Please provide a .cml, .xml, or .cma file to process.") |
|||
sys.exit() |
|||
|
|||
doc = Document() |
|||
if inputFilePath[-4:] == ".cma": |
|||
doc.loadCSMacro(inputFilePath) |
|||
else: |
|||
doc.loadXML(inputFilePath) |
|||
|
|||
style = Style() |
|||
|
|||
renderer = Renderer(doc, style) |
|||
|
|||
outputFilePath = ".".join(inputFilePath.split(".")[:-1]) + ".pdf" |
|||
renderer.savePDF(outputFilePath) |
1027
gui.py
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,3 +1,4 @@ |
|||
reportlab>=3.5.67 |
|||
PyMuPDF>=1.18.13 |
|||
PyQt5>=5.15.4 |
|||
PyQt5.Sip |
1095
ui/mainwindow.ui
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,233 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<ui version="4.0"> |
|||
<class>MainWindow</class> |
|||
<widget class="QMainWindow" name="MainWindow"> |
|||
<property name="geometry"> |
|||
<rect> |
|||
<x>0</x> |
|||
<y>0</y> |
|||
<width>1061</width> |
|||
<height>639</height> |
|||
</rect> |
|||
</property> |
|||
<property name="windowTitle"> |
|||
<string>Chordsheet</string> |
|||
</property> |
|||
<property name="documentMode"> |
|||
<bool>false</bool> |
|||
</property> |
|||
<property name="tabShape"> |
|||
<enum>QTabWidget::Rounded</enum> |
|||
</property> |
|||
<widget class="QWidget" name="centralWidget"> |
|||
<layout class="QHBoxLayout" name="horizontalLayout"> |
|||
<property name="leftMargin"> |
|||
<number>0</number> |
|||
</property> |
|||
<property name="topMargin"> |
|||
<number>0</number> |
|||
</property> |
|||
<property name="rightMargin"> |
|||
<number>0</number> |
|||
</property> |
|||
<property name="bottomMargin"> |
|||
<number>0</number> |
|||
</property> |
|||
<item> |
|||
<widget class="QMdiArea" name="mdiArea"> |
|||
<property name="enabled"> |
|||
<bool>true</bool> |
|||
</property> |
|||
<property name="documentMode"> |
|||
<bool>true</bool> |
|||
</property> |
|||
<property name="tabsClosable"> |
|||
<bool>true</bool> |
|||
</property> |
|||
<property name="tabsMovable"> |
|||
<bool>true</bool> |
|||
</property> |
|||
</widget> |
|||
</item> |
|||
</layout> |
|||
</widget> |
|||
<widget class="QMenuBar" name="menuBar"> |
|||
<property name="geometry"> |
|||
<rect> |
|||
<x>0</x> |
|||
<y>0</y> |
|||
<width>1061</width> |
|||
<height>22</height> |
|||
</rect> |
|||
</property> |
|||
<widget class="QMenu" name="menuFile"> |
|||
<property name="title"> |
|||
<string>File</string> |
|||
</property> |
|||
<addaction name="actionNew"/> |
|||
<addaction name="actionOpen"/> |
|||
<addaction name="separator"/> |
|||
<addaction name="actionSave"/> |
|||
<addaction name="actionSave_as"/> |
|||
<addaction name="actionSave_PDF"/> |
|||
<addaction name="separator"/> |
|||
<addaction name="actionPrint"/> |
|||
<addaction name="separator"/> |
|||
<addaction name="actionClose"/> |
|||
</widget> |
|||
<widget class="QMenu" name="menuEdit"> |
|||
<property name="title"> |
|||
<string>Edit</string> |
|||
</property> |
|||
<addaction name="actionUndo"/> |
|||
<addaction name="actionRedo"/> |
|||
<addaction name="separator"/> |
|||
<addaction name="actionCut"/> |
|||
<addaction name="actionCopy"/> |
|||
<addaction name="actionPaste"/> |
|||
<addaction name="separator"/> |
|||
<addaction name="actionAbout"/> |
|||
</widget> |
|||
<widget class="QMenu" name="menuWindow"> |
|||
<property name="title"> |
|||
<string>Window</string> |
|||
</property> |
|||
<addaction name="actionDocument_information"/> |
|||
<addaction name="actionPage_setup"/> |
|||
<addaction name="actionChords"/> |
|||
<addaction name="actionSections"/> |
|||
<addaction name="actionBlocks"/> |
|||
<addaction name="separator"/> |
|||
<addaction name="actionPreview"/> |
|||
</widget> |
|||
<addaction name="menuFile"/> |
|||
<addaction name="menuEdit"/> |
|||
<addaction name="menuWindow"/> |
|||
</widget> |
|||
<action name="actionNew"> |
|||
<property name="text"> |
|||
<string>New...</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionOpen"> |
|||
<property name="text"> |
|||
<string>Open...</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionSave"> |
|||
<property name="text"> |
|||
<string>Save</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionSave_PDF"> |
|||
<property name="text"> |
|||
<string>Save PDF...</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionPrint"> |
|||
<property name="text"> |
|||
<string>Print...</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionClose"> |
|||
<property name="text"> |
|||
<string>Close</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionSave_as"> |
|||
<property name="text"> |
|||
<string>Save as...</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionQuit"> |
|||
<property name="text"> |
|||
<string>Quit</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionUndo"> |
|||
<property name="text"> |
|||
<string>Undo</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionRedo"> |
|||
<property name="text"> |
|||
<string>Redo</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionCut"> |
|||
<property name="text"> |
|||
<string>Cut</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionCopy"> |
|||
<property name="text"> |
|||
<string>Copy</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionPaste"> |
|||
<property name="text"> |
|||
<string>Paste</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionPreferences"> |
|||
<property name="text"> |
|||
<string>Preferences</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionAbout"> |
|||
<property name="text"> |
|||
<string>About</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionDocument_information"> |
|||
<property name="checkable"> |
|||
<bool>true</bool> |
|||
</property> |
|||
<property name="text"> |
|||
<string>Document information</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionPage_setup"> |
|||
<property name="checkable"> |
|||
<bool>true</bool> |
|||
</property> |
|||
<property name="text"> |
|||
<string>Page setup</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionChords"> |
|||
<property name="checkable"> |
|||
<bool>true</bool> |
|||
</property> |
|||
<property name="text"> |
|||
<string>Chords</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionSections"> |
|||
<property name="checkable"> |
|||
<bool>true</bool> |
|||
</property> |
|||
<property name="text"> |
|||
<string>Sections</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionBlocks"> |
|||
<property name="checkable"> |
|||
<bool>true</bool> |
|||
</property> |
|||
<property name="text"> |
|||
<string>Blocks</string> |
|||
</property> |
|||
</action> |
|||
<action name="actionPreview"> |
|||
<property name="checkable"> |
|||
<bool>true</bool> |
|||
</property> |
|||
<property name="text"> |
|||
<string>Preview</string> |
|||
</property> |
|||
</action> |
|||
</widget> |
|||
<resources/> |
|||
<connections/> |
|||
</ui> |
@ -1,32 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<ui version="4.0"> |
|||
<class>Form</class> |
|||
<widget class="QWidget" name="Form"> |
|||
<property name="geometry"> |
|||
<rect> |
|||
<x>0</x> |
|||
<y>0</y> |
|||
<width>400</width> |
|||
<height>300</height> |
|||
</rect> |
|||
</property> |
|||
<property name="windowTitle"> |
|||
<string>PDF Viewer</string> |
|||
</property> |
|||
<layout class="QHBoxLayout" name="horizontalLayout"> |
|||
<item> |
|||
<widget class="PDFViewer" name="pdfArea" native="true"/> |
|||
</item> |
|||
</layout> |
|||
</widget> |
|||
<customwidgets> |
|||
<customwidget> |
|||
<class>PDFViewer</class> |
|||
<extends>QWidget</extends> |
|||
<header>chordsheet/pdfViewer.h</header> |
|||
<container>1</container> |
|||
</customwidget> |
|||
</customwidgets> |
|||
<resources/> |
|||
<connections/> |
|||
</ui> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue