1 Each page should have the following in the constructor
2 /* this is the text identifying the page in the tree widget */
5 /* this sets values for the class based on the extern mainWin-> it sets
6 m_parent (the stacked widget),
7 m_console (from current console)
8 creates the page selector tree widget and sets it's name and inserts
9 itself in the double direction hashes */
10 pgInitialize(parentwidgetitem); or
11 pgInitialize(); which will have the director as parent in page selector
13 /* is this window always present or can the user remove it */
16 /* put the page in the stack widget */
18 /* bring the page to the top of the widget by "selecting" the tree widget
19 item in the page selector */
22 Watch out for console not being connected yet gotchya's. The console is not yet
23 connected when the first base set of widgets are created on the stack. Use a
24 function like populate() to place objects in the window. Call populate from
25 virtual function void ClassName::currentStackItem(). Embed inside condition
26 similar to if(!m_populated) {} so as to populate only the first time the page
29 The major features that the pages class provides:
30 dockPage, undockPage and togglePageDocking for docking.
31 closeEvent to redock an undocked page when it is closed.
32 virtual functions PgSeltreeWidgetClicked() and currentStackItem() to give pages
33 the opportunity to have behaviours on events
34 closeStackPage() to delete both the page object and it's page selector widget.
35 consoleCommand(QString &command) to execute a console command
36 setTitle() for setting the title of a window that will display when undocked.
37 setCurrent() for making the page and tree widget item of an object selected and
38 in the front of the stack.
41 Use the function closeDockPage() to close from within the class. Otherwise, if
42 there are pointers which need to be deleted, use a destructor. The m_closeable
43 page member will determine whether the option to close will appear in context
44 menu of page selector.