GSoC Status - Week 5 (Customizable prints)

Dirk Hohndel dirk at hohndel.org
Wed Jul 1 06:37:34 PDT 2015


On Wed, Jul 01, 2015 at 04:11:39PM +0300, Lubomir I. Ivanov wrote:
> On 1 July 2015 at 15:37, Gehad Elrobey <gehadelrobey at gmail.com> wrote:
> >
> >
> > On Wed, Jul 1, 2015 at 10:20 AM, Lubomir I. Ivanov <neolit123 at gmail.com>
> > wrote:
> >>
> >> how so?
> >> in *all* of the previous implementations both resolution and colorMode
> >> were visible/reflected on the preview!
> >>
> >
> > I tested the color mode selection in the old printing code and it was not
> > working in QPrintPreviewDialog, so this may be a QT5 bug?
> > I tested with both v4.4.2 and commit f8a3a85 and it didn't work in any of
> > them.

So when is the last time this worked?

> i could be a Qt5 bug, indeed.

4.4.2 can still be built with Qt4 IIRC

> the 4.x subsurface b&w print didn't work at all due to profile2.

Yes, that is something that hasn't been addressed, yet.

> >> both PrintDialog::onPaintRequested() and PrintDialog::printClicked()
> >> call the same method Printer::print() which then calls
> >> Printer::render() and greyscale mode becomes optional.
> >>
> >> what am i missing?
> >
> > I am doing exactly the same thing, and I call
> > QPrinter::setColorMode(GrayScale) and I call Profile::setPrintMode(), am I
> > missing something?
> 
> right, so if you confirm that it simply doesn't work, then
> setColorMode() is unreliable for b&w previews and we need to find an
> alternative.
> (and which is used for both the preview and the actual print).

I'm lost here. What exactly isn't working? If you set
QPrinter::setColorMode(GrayScale) and then print to a color printer, you
still get color? Or you get something unusable on a color printer?

> >> > Also as you have mentioned that profile2 is missing grey scale
> >> > capability so
> >> > I think we may need to remove 'print in color' check box which is in my
> >> > opinion useless, because user can still select printing color mode from
> >> > option tab in QPrintDialog which will affect the actual printing and not
> >> > the
> >> > previewDialog.
> >>
> >> i disagree...the Preview should be exactly the same as the Print output.

YES. That's the point of a preview.

> >> the profile2 custom color table is also doable but for now we should
> >> simply use QPrinter::GrayScale.
> >>
> >
> > I thing a solution for this we can use css to turn the whole page to gray
> > scale before rendering also we will need to use the custom color table, what
> > do you think about this?
> 
> i don't understand CSS very well, but if that's a viable solution we
> should definitely give it a go.

Qt has fairly decent support of using CSS to style things. We don't use
that a lot in Subsurface for a number of reasons but if that can be used
to solve some of the printing challenges then I'm all for it.

> the problem i see here is that if the user defines a custom color CSS
> for his template, we then need to override it if the b&w mode is
> selected...messy.
> let me ask Dirk in a separate email about the whole b&w/color print.

Yeah, let's make sure I understand the issues there for real :)

> >> BTW, Gehad we had a short discussions with the other GSoC mentors and
> >> we came to the conclusion that some of the students are not very
> >> responsive.
> >> i know that i'm not on IRC, and i'm not saying that you don't respond
> >> at all, but could you try to be *more* responsive via email i.e. write
> >> immediately after you see an email, cover all questions etc...this is
> >> important for your final GSoC score.
> >
> >
> > Sorry for that I will be more responsive to further emails.

I've made this point elsewhere and most of the students have heard me talk
about this.

GSoC is first and foremost about the students learning how to be
successful contributors in open source projects. And in my mind the
ability to communicate well is the #1 indicator of your likely success in
open source.

Regardless of the code that you write, in the long run, if you can't
communicate effectively with other contributors you will not be
successful.

I really want to encourage ALL of the students to try harder to interact
with the other developers. There are a lot of really smart, really
experienced developers on this mailing list (and on IRC). Ask them
questions. Discuss your ideas with them. Don't be shy - the only stupid
questions are the ones that you don't ask.

And everyone here is really nice (well, you know, with occasional
exceptions... but we don't talk about those in public...) :-)

/D


More information about the subsurface mailing list