[PULL REQUEST] GSoC Printing: part 5

Lubomir I. Ivanov neolit123 at gmail.com
Tue Jul 28 02:18:36 PDT 2015


More from Gehad:
- added a "Table" print template - we had this one before
- added a "Flow" print template - as discussed at GSoC start, this one can span
a dive on multiple pages
- Import|Export|Delete of templates - as Dirk suggested
- another bundled color scheme - a blueish one 
- more fixes/optimizations here and there

Feedback is much appreciated at this point! We are reaching the point where
we need to make the bundled templates pretty and write the docs.

Some comments for Gehad:

1) I'm getting some new warnings when the app runs initially:
QIODevice::write: device not open
QIODevice::write: device not open
QIODevice::write: device not open

Are these from the Printing module?

2) Most templates seem so have some sort of white margins at the top and
right.
For instance, due to the offsets in question, it makes the "Table" print cut
the last dive on the current page and the first dive on the next page.

Do you get these margins on your end? I can send you screenshots if needed.

(BTW, getting the Table print precise in the old code was very tricky and a time
waster; hopefully not the case here.)

3) I know I suggested to have all the template related buttons (import, export,
etc.) one bellow another, but instead I modified your patch:
Printing: add "Import", "Export" and "Delete" buttons for templates

to have them 2x2.

4) Added one commit from me for safer Import|Export handling if the user
presses "Cancel". This probably needs to be even safer, as we may need to check
if the user-selected file exists.

5) Slight commit message edits for some of the patches

6) I was able to solve the cmake/make issue. It could be Windows cmake specific
but to be able to run 'make' after a change without getting an error every
single time, I wrote a script to delete the following folders in the 'build'
folder:
'theme'
'printing_templates'

Otherwise it just throws "Error: theme/printing_templates is a directory.".

7) If you are having problems getting the templates the same as we had them
before just send me updates more often so that I pull, check your progress
and comment.

------

The following changes since commit 75e736a66b4ed5fa502e06a5ed7e02690981165e:

  User Manual: Slight changes on OSTCTools import (2015-07-27 06:37:34 -0700)

are available in the git repository at:

  git at github.com:neolit123/subsurface.git custom-print

for you to fetch changes up to 01645d64b91b29878d6927dcf7cd5c2381e0bfaa:

  Printing: safer Template->Import|Export handling (2015-07-28 11:39:49 +0300)

----------------------------------------------------------------
Gehad elrobey (20):
      Printing: add a "Table" template
      Printing: get the number of pages from the full resolution
      Printing: set the default tab to the correct one
      Printing: search for grantlee templates in the templates directory
      Printing: remove existing values in print template combobox
      Printing: use grantlee templates from the current existing template list
      Printing: save/load selected template by QSettings
      Printing: fix issue with old QSettings group
      Printing: remove "Table" option from print options radio group
      Printing: fix TemplateEdit layout
      Printing: add member function to print options
      Printing: add "Import", "Export" and "Delete" buttons for templates
      Printing: support importing/exporting of templates
      Printing: clear all templates before insterting the new templates
      Printing: add a "Flow" layout
      Printing: add the "Shades of blue" color theme
      Printing: don't name color templates with confusing numbers
      Printing: choose first template if selected template is not found
      Printing: select current template upon importing
      Printing: rename templates to have spaces and capitalization

Lubomir I. Ivanov (1):
      Printing: safer Template->Import|Export handling

 printer.cpp                                        |   7 +-
 printing_templates/{custom.html => Custom.html}    |   0
 printing_templates/Flowlayout.html                 | 204 +++++
 .../{one_dive.html => One Dive.html}               |   0
 printing_templates/Table.html                      |  83 ++
 .../{two_dives.html => Two Dives.html}             |   0
 qt-ui/mainwindow.cpp                               |   3 +
 qt-ui/printdialog.cpp                              |  34 +-
 qt-ui/printoptions.cpp                             |  94 ++-
 qt-ui/printoptions.h                               |  20 +-
 qt-ui/printoptions.ui                              |  98 ++-
 qt-ui/templateedit.cpp                             |  27 +-
 qt-ui/templateedit.ui                              | 895 +++++++++++----------
 templatelayout.cpp                                 |  25 +-
 templatelayout.h                                   |   3 +
 15 files changed, 949 insertions(+), 544 deletions(-)
 rename printing_templates/{custom.html => Custom.html} (100%)
 create mode 100644 printing_templates/Flowlayout.html
 rename printing_templates/{one_dive.html => One Dive.html} (100%)
 create mode 100644 printing_templates/Table.html
 rename printing_templates/{two_dives.html => Two Dives.html} (100%)


More information about the subsurface mailing list