Creating Tip Pages

DobitDobit Posts: 200

We finalize a new plugin for DAZ Studio and would like to offer "tip pages". I found a description of the concept behind tip pages, but not much about how to use the sdk classes DzInfoDivider, DzInfoTabs and DzTipPage. I tried them, but just broke up my plugin UI.  Is there any working example for c++? 

Post edited by Richard Haseltine on

Comments

  • Richard HaseltineRichard Haseltine Posts: 101,482
    edited November 2018

    Moved to the DS SDK forums.

    Your plug-in does have its own pane?

    Post edited by Richard Haseltine on
  • DobitDobit Posts: 200
    edited November 2018

    I think I just solved the issue. It was easier than I thought initialy.

    Step 1: In pane class create a DzInfoDivider. DzInfoDivider *_pInfoDivider = new DzInfoDivider(..)

    Step 2: Set script with _pInfoDivider->getInfoTabs()->setTipUIScript(<path to TipPage>)

    Step 3: Provide "getInfoDivider" function in pane using Q_INVOKABLE keyword. Q_INVOKABLE DzInfoDivider* getInfoDivider() const;

     

    Post edited by Dobit on
  • rbtwhizrbtwhiz Posts: 2,267

    Whether you use the Q_INVOKABLE macro on getInfoDivider() or you use the public slots access modifier/specifier to expose the method to script, that particular method on the DzPane subclass needs to be accessible to script because the standard loading and navigation/paging mechanisms for tips in the Tips page are handled by scripts (to allow them to be used with types provided by plugins, i.e. DzPane subclasses, that are unknown to the core at compile time), and the scripts need to be able to access the Tips page widget to do their work. The scripts doing the work are included with the application in plain text (in ./resources/tip pages/), so you can inspect exactly what they are doing if you feel so inclined.

    Guide pages work very similarly.

    -Rob

Sign In or Register to comment.