Hi SpiderMack,
Not 100% sure if there is a tutorial for creating Plugins, but basically, the UI is created in Qt and then Skyline has heaps of functions (all starting with "qt.") for accessing the various buttons etc.
The basic idea is to create the UI in Qt (I use Qt Creator) and then put the ".ui" file, the ".qrc" file (if required) and the ".lua" file in a folder which is then placed in the "Skyline\Editor Plugins" folder. The main caveats to this are:
1) the folder and all relevant files MUST have the same name
2) the ".lua" file MUST have a "main ( )" function, which runs the Plugin - one gotcha is that Plugins run on Skyline boot, so be careful what goes in this function as it will run automatically and there isn't currently a way to turn Plugins on and off!
3) the ".lua" file MUST have "sky.include ( "SkyQt.lua" )" at the top of the file
Your best bet is to take a look at the samples provided with Skyline as most of them are relatively simple
At my last count, there was well over 70 functions for interacting with Qt:
- Code: Select all
qt.addComboItem ( thisEditor, thisCombo, text, icon, pos )
qt.clear ( thisEditor, thisWidget )
qt.closeEditor ( thisEditor, thisEditor2 )
qt.deselectAllItems ( thisEditor, thisWidget )
int = qt.getChecked ( thisEditor, thisWidget )
string = qt.getComboItemText ( thisEditor, thisCombo, row )
int = qt.getCurrentIndex ( thisEditor, thisCombo )
string = qt.getHTMLText ( thisEditor, thisWidget )
int = qt.getListItemCount ( thisEditor, thisList )
string = qt.getListItemText ( thisEditor, thisList, row )
int = qt.getListSelectedItem ( thisEditor, thisList, row )
int = qt.getNumTableColumns ( thisEditor, thisTable )
int = qt.getNumTableRows ( thisEditor, thisTable )
string = qt.getOpen_FileDialog ( thisEditor, headerText, directory, fileType(s) )
string = qt.getSave_FileDialog ( thisEditor, headerText, directory, fileType(s) )
table = qt.getSelectedItems ( thisEditor, thisWidget )
int = qt.getSelectionMode ( thisEditor, thisWidget )
string = qt.getTableItemText ( thisEditor, thisTable, row,column)
int = qt.getTableSelectedItem ( thisEditor, thisTable, row, column, )
string = qt.getText ( thisEditor, thisLabel / thisTextEdit / thisPlainTextEdit )
string = qt.getTreeItemText ( thisEditor, thisTree, row, column )
int = qt.getTreeSelectedItem ( thisEditor, thisTree, row )
int / float = qt.getValue ( thisEditor, thisSpinBox etc. )
qt.hideWidget ( thisEditor, thisWidget )
int = qt.insertListItem ( thisEditor, thisList, row )
int = qt.insertTableColumn ( thisEditor, thisTable, column )
int = qt.insertTableRow ( thisEditor, thisTable, row )
int = qt.insertTreeItem ( thisEditor, thisTree, row )
qt.openEditor ( thisEditor, thisEditor2, mode )
qt.removeComboItem ( thisEditor, thisCombo, row )
qt.removeListItem ( thisEditor, thisList, row )
qt.removeTableColumn ( thisEditor, thisTable, column )
qt.removeTableRow ( thisEditor, thisTable, row )
qt.removeTreeItem ( thisEditor, thisTree, row )
qt.setChecked ( thisEditor, thisWidget )
qt.setComboItemText ( thisEditor, thisCombo, text, row )
qt.setCurrentIndex ( thisEditor, thisWidget, row )
qt.setDisabled ( thisEditor, thisWidget )
qt.setEnabled ( thisEditor, thisWidget )
qt.setFocus ( thisEditor, thisWidget )
qt.setIconSize ( thisEditor, thisWidget, sizeX, sizeY )
qt.setItemWidgetChecked ( thisEditor, thisWidget, state )
qt.setItemWidgetImage ( thisEditor, thisWidget, image (as String) )
qt.setItemWidgetSize ( thisEditor, thisWidget, sizeX, sizeY )
qt.setItemWidgetText ( thisEditor, thisWidget, text )
qt.setListItemIcon ( thisEditor, thisList, row, image (as String) )
qt.setListItemText ( thisEditor, thisList, row, text )
qt.setListItemTextAlign ( thisEditor, thisList, row, alignment )
qt.setListItemWidget ( thisEditor, thisList, widgetInfo, callback, row )
qt.setListSelectedItem ( thisEditor, thisList, row, selected )
qt.setMaximumValue ( thisEditor, thisSpinBox etc. value )
qt.setMaxSize ( thisEditor, thisWidget, sizeX, sizeY )
qt.setMinimumValue ( thisEditor, thisSpinBox etc. value )
qt.setMinSize ( thisEditor, thisWidget, sizeX, sizeY )
qt.setPixmap ( thisEditor, thisLabel / thisTextEdit / thisPlainTextEdit image (as String) )
qt.setSelectionMode ( thisEditor, thisWidget, mode )
qt.setTableItemIcon ( thisEditor, thisTable, row, column, image (as String) )
qt.setTableItemText ( thisEditor, thisTable, row, column, text )
qt.setTableItemTextAlign ( thisEditor, thisTable, row, column, alignment )
qt.setTableItemWidget ( thisEditor, thisTable, widgetInfo, callback, row, column )
qt.setTableSelectedItem ( thisEditor, thisTable, row, column, selected )
qt.setText ( thisEditor, thisLabel / thisTextEdit / thisPlainTextEdit, text )
qt.setTreeCollapseAll ( thisEditor, thisTree )
qt.setTreeExpandAll ( thisEditor, thisTree )
qt.setTreeItemExpanded ( thisEditor, thisTree, column )
qt.setTreeItemIcon ( thisEditor, thisTree, column, image (as String) )
qt.setTreeItemText ( thisEditor, thisTree, column, row, text )
qt.setTreeItemTextAlign ( thisEditor, thisTree, column, row, alignment )
int = qt.setTreeItemWidget ( thisEditor, thisTree, widgetInfo, column, row )
qt.setTreeSelectedItem ( thisEditor, column, row,selected)
qt.setValue ( thisEditor, thisSpinBox etc. value )
qt.showWidget ( thisEditor, thisWidget )
HTH
Shando