QScript PageMaster
(Redirected from QScript SlideLayout)
PageMaster
A page master (a master slide) in the document - the reusable layout that pages are based on, as shown in Page Master. Obtain page masters from project.pageMasters().subItems; a page's current master is the one whose guid matches that page's pageLayout. Note that an actual page's layout can differ from its master if the page has been modified after being created from the master (e.g. the slots of the master can be moved, resized, or deleted on the page).
deleteItem()
Deletes this page master, under the same two rules the Page Master UI applies. Deleting one of the six built-in layouts throws "You may not remove default master pages." Deleting a master that any page uses throws "You may not remove master pages that are in use.", so move those pages onto another master first by setting their pageLayout.
| Example: | var master = project.pageMasters().subItems.find(function (m) { return m.name === 'Layout 1'; });
master.deleteItem();
|
equals(obj)
Whether two objects are the same.
| obj | The object to compare against. |
| Returns: | true or false |
| Example: | data_file.getQuestionByName('Q2').equals(data_file.questions()[0])
|
guid
The page master's GUID. Set a page's pageLayout to this to apply this master to the page.
internalName
The built-in layout identifier — one of 'Title', 'Item', 'ItemAndText', 'TwoItems', 'TitleOnly' or 'Blank' — or null for a custom page master.
name
Get/set the page master's name, as shown in Page Master.
| Example: | // List the page masters by name:
project.pageMasters().subItems.forEach(function (m) { log(m.name); });
// Rename a custom page master:
var master = project.pageMasters().subItems.find(function (m) { return m.name === 'Layout 1'; });
master.name = 'Layout 1 (renamed)';
|
subItems
Every item on this page master: the slots that items can occupy, then the images, text items, controls and shapes the master shows behind every page that uses it. The slots come first, ordered by slotNumber (so subItems[n].slotNumber is n). The remaining items follow the order they are held in under the page master, which is not their front-to-back layer order. Check an item's type to tell them apart. Place an item in a slot by setting the item's slotNumber to a slot's slotNumber.
type
Returns "PageMaster".