Documentation ¶
Index ¶
- Constants
- type Carousel
- func (c *Carousel) AddImage(path string)
- func (c *Carousel) Destroy()
- func (c *Carousel) GetAnimationFile() string
- func (c *Carousel) GetEngine() *qml.Engine
- func (c *Carousel) GetHeight() uint
- func (c *Carousel) GetInterval() uint
- func (c *Carousel) GetPosX() uint
- func (c *Carousel) GetPosY() uint
- func (c *Carousel) GetSpeed() uint
- func (c *Carousel) GetWidth() uint
- func (c *Carousel) GetWindow() *qml.Window
- func (c *Carousel) IsResizingImages() bool
- func (c *Carousel) Run()
- func (c *Carousel) SetAnimationFile(file string)
- func (c *Carousel) SetHeight(height uint)
- func (c *Carousel) SetImages(images []string)
- func (c *Carousel) SetInterval(interval uint)
- func (c *Carousel) SetPosX(posX uint)
- func (c *Carousel) SetPosY(posY uint)
- func (c *Carousel) SetResizeImages(resize bool)
- func (c *Carousel) SetRotateRandomly(rotateRandomly bool)
- func (c *Carousel) SetSpeed(speed uint)
- func (c *Carousel) SetWidth(width uint)
Constants ¶
View Source
const ( DEFAULT_INTERVAL uint = 1000 DEFAULT_SPEED = 500 )
Default rotating speed and interval
View Source
const CALCULATE_DIMENSION uint = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Carousel ¶
type Carousel struct {
// contains filtered or unexported fields
}
Main structure
func NewCarousel ¶
Initializes and returns a new carousel by provided qml engine and window
func (*Carousel) AddImage ¶
Add an image by a relative to the application path. You can add images while the carousel is running too.
func (*Carousel) GetAnimationFile ¶
func (*Carousel) GetInterval ¶
func (*Carousel) IsResizingImages ¶
func (*Carousel) SetAnimationFile ¶
Set animation qml file from the animations folder
func (*Carousel) SetImages ¶
Set a new list of images to rotate. Safe to use while carousel is running.
func (*Carousel) SetInterval ¶
func (*Carousel) SetResizeImages ¶
Whether carousel should resize the images or crop them
func (*Carousel) SetRotateRandomly ¶
Whether the images should rotate randomly. Meaning, when image is shown the next images is chosen randomly from one of other images.
Click to show internal directories.
Click to hide internal directories.