Creating Tip Pages
Dobit
Posts: 194
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
Moved to the DS SDK forums.
Your plug-in does have its own pane?
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;
Whether you use the
Q_INVOKABLE
macro ongetInfoDivider()
or you use thepublic slots
access modifier/specifier to expose the method to script, that particular method on theDzPane
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