subsurface Digest, Vol 19, Issue 24

Benjamin nystire at gmail.com
Wed Jun 12 04:22:20 PDT 2013


I hope that this patch is ok.
If not, what must be changed in order to both avoid a public flogging and
to get it accepted? :)


On 12 June 2013 00:04, <subsurface-request at hohndel.org> wrote:

> Send subsurface mailing list submissions to
>         subsurface at hohndel.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
> or, via email, send a message with subject or body 'help' to
>         subsurface-request at hohndel.org
>
> You can reach the person managing the list at
>         subsurface-owner at hohndel.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of subsurface digest..."
>
>
> Today's Topics:
>
>    1. Re: Questions regarding asciidoc requirement to
>       compile/install (Salvador Cu?at)
>    2. Re: Subject: Re: QTreeView setFirstColumnSpanned? (Amit Chaudhuri)
>    3. Re: Subject: Re: QTreeView setFirstColumnSpanned? (Linus Torvalds)
>    4. Re: Questions regarding asciidoc requirement to
>       compile/install (Tomaz Canabrava)
>    5. Re: Subject: Re: QTreeView setFirstColumnSpanned?
>       (Tomaz Canabrava)
>    6. Re: Subject: Re: QTreeView setFirstColumnSpanned?
>       (Tomaz Canabrava)
>    7. Re: Subject: Re: QTreeView setFirstColumnSpanned? (Linus Torvalds)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 11 Jun 2013 21:03:14 +0200
> From: Salvador Cu?at <salvador.cunat at gmail.com>
> To: Dirk Hohndel <dirk at hohndel.org>
> Cc: subsurface at hohndel.org
> Subject: Re: Questions regarding asciidoc requirement to
>         compile/install
> Message-ID: <20130611190314.GA15240 at imladris>
> Content-Type: text/plain; charset=utf-8
>
> On Mon, Jun 10, 2013 at 05:04:19PM -0700, Dirk Hohndel wrote:
> >
> > At this stage the Qt version is not well enough tested (nor is it
> > feature complete) so I don't think this really is useful for anyone
> > except for the people working on the code.
> >
> Moreover, the program is compiling fine for me, it only fails on
> building the documentation as I don't have asciidoc installed either.
>
> ...
>     MSGFMT ru_RU.po
>     MSGFMT sk_SK.po
>     MSGFMT sv_SE.po
>     LINK subsurface
>     make -C Documentation doc
>     make[1]: se ingresa al directorio
> `/home/boret/subsurface/Documentation'
>     asciidoc user-manual.txt
>     make[1]: asciidoc: No se encontr? el programa
>     make[1]: *** [user-manual.html] Error 127
>     make[1]: se sale del directorio `/home/boret/subsurface/Documentation'
> ...
>
> Well, actually I still have a "warning" in
>
> qt-ui/profilegraphics.cpp:201:13: warning: ?void
> plot_set_scale(scale_mode_t)? defined but not used [-Wunused-function]
>
>
> Regards
>
> Salva
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 11 Jun 2013 20:48:33 +0100
> From: Amit Chaudhuri <amit.k.chaudhuri at gmail.com>
> To: Dirk Hohndel <dirk at hohndel.org>
> Cc: Subsurface Mailing List <subsurface at hohndel.org>, Thiago Macieira
>         <thiago at macieira.org>
> Subject: Re: Subject: Re: QTreeView setFirstColumnSpanned?
> Message-ID:
>         <CAH=VbNfhY-Sb7tvx30x5+xtinTRomxQm=
> a0xRkQPA5THh7iYrQ at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> ...drawRow() idea as currently conceived in my mind doesn't work...It's
> because it is a const method. This prevents setting a custom row delegate
> to do the rendering.
>
> QAbstractItemView - from which QTreeView derives - has a method which
> allows us to set a delegate for any given row (specified by an int index
> and giving a pointer to the delegate).
>
> So, I think we can customise the text (etc.) in a given row, through a
> simple custom delegate class, as long as we can specify "this row - index X
> - is a trip row"
>
> A
>
>
>
>
> On Tue, Jun 11, 2013 at 6:51 PM, Amit Chaudhuri
> <amit.k.chaudhuri at gmail.com>wrote:
>
> > No please don't use as is - I may discover my ideas don't work as hoped,
> > or as Linus says, perhaps there's a much better way.
> >
> >
> > On Tue, Jun 11, 2013 at 2:45 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> >
> >> On Tue, 2013-06-11 at 08:13 +0100, Amit Chaudhuri wrote:
> >> > Ok... tiny bit more progress in thinking if not in code.
> >> >
> >> >
> >> > [And Linus - I see what you mean about drawRow]
> >> >
> >> >
> >> > The actual painting probably gets done by a delegate (sub-class of
> >> > QStyledItemDelegate probably). It is possible to set this in a row or
> >> > column basis - row looks like what we need.
> >> >
> >> >
> >> > That sub-class needs a paint method and maybe a private helper to
> >> > compose our text and embellish it.
> >> >
> >> >
> >> > I think we can use Linus' patch to get us to the right place and state
> >> > to set up the relevant delegate.  I ought to have the delegate in
> >> > place this evening UK time.  Anyone with time before then is welcome,
> >> > as ever...
> >>
> >> So you are saying I should apply Linus' patch as is and you'll clean up
> >> from there?
> >>
> >> /D
> >>
> >>
> >>
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.hohndel.org/pipermail/subsurface/attachments/20130611/2a2a19a4/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 11 Jun 2013 12:51:05 -0700
> From: Linus Torvalds <torvalds at linux-foundation.org>
> To: Amit Chaudhuri <amit.k.chaudhuri at gmail.com>
> Cc: Subsurface Mailing List <subsurface at hohndel.org>, Thiago Macieira
>         <thiago at macieira.org>
> Subject: Re: Subject: Re: QTreeView setFirstColumnSpanned?
> Message-ID:
>         <
> CA+55aFy+K_qU-LWKM94mao44_1buR+V5h_dyEt2z9a5sx3N0Lg at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Tue, Jun 11, 2013 at 12:48 PM, Amit Chaudhuri
> <amit.k.chaudhuri at gmail.com> wrote:
> >
> > So, I think we can customise the text (etc.) in a given row, through a
> > simple custom delegate class, as long as we can specify "this row -
> index X
> > - is a trip row"
>
> .. but if we could do that, then we wouldn't need to play any games to
> begin with, because we could just use setFirstColumnSpanned().
>
> The problem is exactly that the "trip row" is a property of the
> *model*, not of the QTreeView.
>
>                    Linus
>
>
> ------------------------------
>
> Message: 4
> Date: Tue, 11 Jun 2013 17:39:54 -0300
> From: Tomaz Canabrava <tcanabrava at kde.org>
> To: Salvador Cu?at <salvador.cunat at gmail.com>
> Cc: subsurface at hohndel.org
> Subject: Re: Questions regarding asciidoc requirement to
>         compile/install
> Message-ID:
>         <CACk01_wCmEr6n0qv4-9ULh+LqNeFM84a-zKk1EhOaN7w=
> RfnhA at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Tue, Jun 11, 2013 at 4:03 PM, Salvador Cu?at
> <salvador.cunat at gmail.com> wrote:
> > On Mon, Jun 10, 2013 at 05:04:19PM -0700, Dirk Hohndel wrote:
> >>
> >> At this stage the Qt version is not well enough tested (nor is it
> >> feature complete) so I don't think this really is useful for anyone
> >> except for the people working on the code.
> >>
> > Moreover, the program is compiling fine for me, it only fails on
> > building the documentation as I don't have asciidoc installed either.
> >
> > ...
> >     MSGFMT ru_RU.po
> >     MSGFMT sk_SK.po
> >     MSGFMT sv_SE.po
> >     LINK subsurface
> >     make -C Documentation doc
> >     make[1]: se ingresa al directorio
> `/home/boret/subsurface/Documentation'
> >     asciidoc user-manual.txt
> >     make[1]: asciidoc: No se encontr? el programa
> >     make[1]: *** [user-manual.html] Error 127
> >     make[1]: se sale del directorio
> `/home/boret/subsurface/Documentation'
> > ...
> >
> > Well, actually I still have a "warning" in
> >
> > qt-ui/profilegraphics.cpp:201:13: warning: ?void
> plot_set_scale(scale_mode_t)? defined but not used [-Wunused-function]
>
> That's because it's not used yet - don't know if it will ever be. we
> are trying to port to Qt, so there's lots of code that can be thrown
> away.
>
> >
> >
> > Regards
> >
> > Salva
> > _______________________________________________
> > subsurface mailing list
> > subsurface at hohndel.org
> > http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 11 Jun 2013 17:41:57 -0300
> From: Tomaz Canabrava <tcanabrava at kde.org>
> To: Linus Torvalds <torvalds at linux-foundation.org>
> Cc: Amit Chaudhuri <amit.k.chaudhuri at gmail.com>, Thiago Macieira
>         <thiago at macieira.org>, Subsurface Mailing List
>         <subsurface at hohndel.org>
> Subject: Re: Subject: Re: QTreeView setFirstColumnSpanned?
> Message-ID:
>         <
> CACk01_yA1sP_wPX33beX0dFUKNJbd1PSeBE3t5hXVL94OqUikw at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Tue, Jun 11, 2013 at 4:51 PM, Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
> > On Tue, Jun 11, 2013 at 12:48 PM, Amit Chaudhuri
> > <amit.k.chaudhuri at gmail.com> wrote:
> >>
> >> So, I think we can customise the text (etc.) in a given row, through a
> >> simple custom delegate class, as long as we can specify "this row -
> index X
> >> - is a trip row"
> >
> > .. but if we could do that, then we wouldn't need to play any games to
> > begin with, because we could just use setFirstColumnSpanned().
> >
> > The problem is exactly that the "trip row" is a property of the
> > *model*, not of the QTreeView.
> >
> >                    Linus
>
> but we can test if index has children, if it does, trip.
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 11 Jun 2013 17:42:53 -0300
> From: Tomaz Canabrava <tcanabrava at kde.org>
> To: Linus Torvalds <torvalds at linux-foundation.org>
> Cc: Amit Chaudhuri <amit.k.chaudhuri at gmail.com>, Thiago Macieira
>         <thiago at macieira.org>, Subsurface Mailing List
>         <subsurface at hohndel.org>
> Subject: Re: Subject: Re: QTreeView setFirstColumnSpanned?
> Message-ID:
>         <
> CACk01_yuMZZARey6s7uS6NBho_j2VwJr-+eXmWOcJ1abWCnmZA at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Tue, Jun 11, 2013 at 5:41 PM, Tomaz Canabrava <tcanabrava at kde.org>
> wrote:
> > On Tue, Jun 11, 2013 at 4:51 PM, Linus Torvalds
> > <torvalds at linux-foundation.org> wrote:
> >> On Tue, Jun 11, 2013 at 12:48 PM, Amit Chaudhuri
> >> <amit.k.chaudhuri at gmail.com> wrote:
> >>>
> >>> So, I think we can customise the text (etc.) in a given row, through a
> >>> simple custom delegate class, as long as we can specify "this row -
> index X
> >>> - is a trip row"
> >>
> >> .. but if we could do that, then we wouldn't need to play any games to
> >> begin with, because we could just use setFirstColumnSpanned().
> >>
> >> The problem is exactly that the "trip row" is a property of the
> >> *model*, not of the QTreeView.
> >>
> >>                    Linus
> >
> > but we can test if index has children, if it does, trip.
>
> Linus,
>
> I'm sorry I didn't had the time to look at this yet - I'm working like
> crazy to implement a kick-ass Profile Planner with real time editing
> on the canvas. I'll try to dig that as soon as I'm finished.
>
> Tomaz
>
>
> ------------------------------
>
> Message: 7
> Date: Tue, 11 Jun 2013 14:04:03 -0700
> From: Linus Torvalds <torvalds at linux-foundation.org>
> To: Tomaz Canabrava <tcanabrava at kde.org>
> Cc: Amit Chaudhuri <amit.k.chaudhuri at gmail.com>, Thiago Macieira
>         <thiago at macieira.org>, Subsurface Mailing List
>         <subsurface at hohndel.org>
> Subject: Re: Subject: Re: QTreeView setFirstColumnSpanned?
> Message-ID:
>         <CA+55aFwcROOcr1WYh=_D=
> sneiJHuSd-8hDxPej5uzwukE5uwrw at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> On Tue, Jun 11, 2013 at 1:41 PM, Tomaz Canabrava <tcanabrava at kde.org>
> wrote:
> >
> > but we can test if index has children, if it does, trip.
>
> Oh, that's not the problem.
>
> The problem is *where*.
>
> Every time we change the model, do we have to iterate over all of the
> QTreeView entries?
>
> *That* is the insane part of the interface.We'd presubaly have to
> intercept "model changed" events, only to then walk all the treeview.
> Ugh. All just because the QTreeView::setFirstColumnSpanned interface
> is badly integrated with the model.
>
> The silly part is, QTreeView already calls down to the model for
> almost everything else. So *if* the interface had been similar to the
> "what font should I use for this model entry" model callbacks (just a
> different role: Qt::FirstColumnSpannedRole) it would have been
> trivial, and worked really well.
>
> I've googled peoples use of setFirstColumnSpanned(), and pretty much
> all I find is complaints and people asking how to use it.
>
>                   Linus
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> subsurface mailing list
> subsurface at hohndel.org
> http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface
>
>
> ------------------------------
>
> End of subsurface Digest, Vol 19, Issue 24
> ******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130612/e6344d9e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Change-title-of-dive-download-form.patch
Type: application/octet-stream
Size: 877 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20130612/e6344d9e/attachment-0001.obj>


More information about the subsurface mailing list