MT Showcase SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Showcase::FileRepresentation Class Referenceabstract

This is an interface for widgets that can be represented as files. More...

#include <FileRepresentation.hpp>

Public Member Functions

virtual folly::Future< FileData > files ()=0
 A collection of files that represent the widget. More...
 
virtual folly::Future< QString > previewFileName ()=0
 Path to file that is used to create preview of this item. More...
 

Static Public Member Functions

static FileData widgetData (const MultiWidgets::Widget &widget)
 Returns standard FileData for the widget. More...
 
static QString widgetVisibleName (const MultiWidgets::Widget &widget)
 Generate visible name for widget. More...
 
static folly::Future< QString > takeWidgetSnapshot (MultiWidgets::Widget &widget, const QString &name=QString(), int snapshotSize=500.f)
 Take a snapshot of the widget.
 

Detailed Description

This is an interface for widgets that can be represented as files.

Member Function Documentation

virtual folly::Future<FileData> Showcase::FileRepresentation::files ( )
pure virtual

A collection of files that represent the widget.

Can include a source file, Codice URLs and any number of generated files Source can be a local file or an URL

virtual folly::Future<QString> Showcase::FileRepresentation::previewFileName ( )
pure virtual

Path to file that is used to create preview of this item.

Needs to be a local file

FileRepresentation::FileData Showcase::FileRepresentation::widgetData ( const MultiWidgets::Widget &  widget)
static

Returns standard FileData for the widget.

This includes automatically generated visible name, widget's source and any defined codice URLs

QString Showcase::FileRepresentation::widgetVisibleName ( const MultiWidgets::Widget &  widget)
static

Generate visible name for widget.

This is first non-empty value from visible-name, content-name and name attributes