MultiTab


MultiTab is used to create a automatic tabulation system.


How to Initialize the MultiTab ?


The initialization of the MultiTab animation is an one step process, just call the function Init of the class with his three arguments (see above for more details)

Class Details


Functions:


Name

Arguments

Return

Description

Init

  • String: Id - HMTL ID defining the position in the DOM of the viewer
  • String: Name - Define the name of the flip all flip component will be defined by this name (this is to avoid mix if you use different flip so be sure to use different name for each flip).
  • CSSClass: MainCSS - CSS of the main div

VOID

This function Initialized every part of the flip: HMTL and the base CSS. It will generate in the defined ID as ID and all HTML IDs used for this MultiTab will start by the name defined in arguments

AddTab

  • String: Title - Showed title of the tab
  • String: Content - HTML content you want to add to your tab

VOID

Add a new tab with it's content.

ClearTab

  • Integer: TabID - Number of the tab in order starting by 0.

VOID

Remove all the content of a tab.

RemoveTab

  • Integer: TabID - Number of the tab in order starting by 0.

VOID

Completely remove a tab and all it's data.

UpdateData

  • Integer: TabID - Number of the tab in order starting by 0.
  • String: Content - HTML content you want to add to your tab

VOID

Completely delete the content of the tab and replace it by a new content.

AddData

  • Integer: TabID - Number of the tab in order starting by 0.
  • String: Content - HTML content you want to add to your tab

VOID

Add data after the present data, using append method.



Private Details



/!\/!\/!\/!\ All private details are usable but its recommended to not use anythings of those. It might modify the good working of the class. /!\/!\/!\/!\



Variables (Members):


Name

Type

Default Value

Description

basedId

String

null

HTML Id of the viewer parent.

id

String

null

Global HMTL Id of the viewer (# + name).

name

String

null

Name of the viewer used by the class for all HTML IDs

topID

String

null

Define the ID of the title part

bodyID

String

null

Define the ID of the content part

tabList

null

Hold all the tabs.

lastID

Integer

0

Keep the last ID used for the table (all table have a different ID that not based on the position in TabList).



Functions:


Name

Arguments

Return

Description

FlipAnimation (Animation Function)

  • Integer: Percent - Advancement of the animation
  • Integer: X - X based on the advancement
  • Class: data - Data that the function need

None

This function is called to update the flipping animation.

GetContentDivFromID

  • Integer: ID - ID of the tab you want the ID

String - HTML ID of the Content of the selected tab.

Call this function to get the ID of a tab content based on the tab ID.

GetContentDivFromArray

  • Integer: ID - Position of the tab you want the ID

String - HTML ID of the Content of the selected tab.

Call this function to get the ID of a tab content based on the tab position.

GetTitleDivFromID

  • Integer: ID - ID of the tab you want the ID

String - HTML ID of the Content of the selected tab.

Call this function to get the ID of a tab title based on the tab ID.

GetTitleDivFromArray

  • Integer: ID - Position of the tab you want the ID

String - HTML ID of the Content of the selected tab.

Call this function to get the ID of a tab title based on the tab position.

GetTabClassFromID

  • Integer: ID - ID of the tab

Tab - Tab class from selected ID

Call this function to get a class based on a ID.

UpdateStyle

  • None

None

Function called to update the design of the tabs, especially the borders around the status.

InitTabClickEvent

  • Integer: TabID - Number of the tab in order starting by 0

None

Function used initialize the events on a new tab.



Structures:


Name

Data

Default Values

Description

Tab

  • Integer: tabID - ID of the tab based on last id to avoid two tab having the same name.
  • Integer: currentArrayID - Position the holding array of the tab.
  • String: tabTitleRef - HTML String containing the title of the tab.
  • String: tabContentRef - HTML String containing the content of the tab.
  • 0
  • 0
  • null
  • null

Tab structure is used to hold needed data for the system.




Created with the Personal Edition of HelpNDoc: Create help files for the Qt Help Framework