[Ctk-developers] ctkWorkflowWidgetStep API

Miklos Espak espakm at gmail.com
Wed Nov 30 23:20:31 UTC 2011


I found a trivial solution, by arranging my code. I keep a pointer to
the widget (called "ui") that I initialize it with 0 in the
constructor, and assign the real widget instance to it in the
createUserInterface function, so I can decide by a simple null pointer
check whether the user interface has been created. (Until now "ui" was
an ordinary variable, not a pointer, and I called ui.setupUi(this) in
the createUserInterface.)

Sorry for this many mails about this.

However, my other problem is still there. It was that sometimes the
onEntry function is not called at all. I uploaded a test to
reconstruct the situation. Have you checked it eventually?

It is here:
https://github.com/commontk/CTK/issues/61

Thanks,
Miklos

On Wed, Nov 30, 2011 at 11:05 PM, Jean-Christophe Fillion-Robin
<jchris.fillionr at kitware.com> wrote:
> Hi Miklos,
>
> Keep us posted on your progress.
>
> Thanks
> Jc
>
> On Fri, Nov 25, 2011 at 10:52 AM, Miklos Espak <espakm at gmail.com> wrote:
>>
>> On Fri, Nov 25, 2011 at 3:58 PM, Julien Finet <julien.finet at kitware.com>
>> wrote:
>> > Hi Miklos,
>> >
>> > Looking at the code, it seems that the signal is fired:
>> >
>> >
>> > //-----------------------------------------------------------------------------
>> > void
>> > ctkWorkflowWidgetStepPrivate::createUserInterfaceCompleteInternal()const
>> > {
>> >  emit createUserInterfaceComplete();
>> > }
>> >
>> > It is done in the Pimpl though. If you search for
>> > "createUserInterfaceComplete" in CTK, you'll find some use case.
>> > To be honest, I've no idea how it works :-)
>> > Maybe Jc or Danielle can comment on it.
>> >
>> > I am surprised you need to listen for createUserInterfaceComplete, I
>> > would expect to do all the initialization work in
>> > ctkWorkflowWidgetStep::createUserInterface().
>>
>> I have to fill the input widgets with values when I arrive at a
>> workflow step. I would do it in the onEntry, but at the first onEntry
>> call the user interface is not ready.
>>
>> So I have to check in the onEntry if the GUI is created or not. This
>> cannot be queried by the ctkWorkflowStepWidget functions.
>>
>> But no problem, I rearrange my code so I can decide it by a null check.
>>
>> Best,
>> Miklos
>
>
>
> --
> +1 919 869 8849
>
>



More information about the Ctk-developers mailing list