CCIMXDesktop
 
Loading...
Searching...
No Matches
ImageBrowser Class Reference

The ImageBrowser class. More...

#include <ImageBrowser.h>

Inheritance diagram for ImageBrowser:

Public Types

enum class  ErrorType { IMAGEREQ_OVERFLOW , IMAGEREQ_UNDERFLOW , IMAGEREQ_LOST , IMAGEREQ_EMPTY }
 The ErrorType enum. More...
 

Public Slots

void oppose_fileview_visible ()
 Toggles the visibility of the file view.
 
void show_next ()
 Shows the next image.
 
void show_start ()
 Shows the first image.
 
void show_end ()
 Shows the last image.
 
void show_prev ()
 Shows the previous image.
 
void show_infoWindow ()
 Displays the image information window.
 
void remove_select ()
 Removes the currently selected image.
 
void clear ()
 Clears the image list.
 

Signals

void errorOccur (const ImageBrowser::ErrorType e)
 Signal emitted when an error occurs.
 

Public Member Functions

 ImageBrowser (QWidget *parent=nullptr)
 Constructs an ImageBrowser object.
 
void enDirSupports (const QString &where)
 Enables directory supports.
 
void enDirSupports (const QString &where, const QStringList &prefixs)
 Enables directory supports with file prefixes.
 
void remove_from_name (const QStringList &names)
 Removes images from the browser based on their names.
 
bool is_fileview_visible () const
 Checks if the file view is visible.
 
void show_from_name (const QString &name)
 Shows an image based on its name.
 
void show_from_index (const int index)
 Shows an image based on its index.
 
QStringList from_name (const QStringList &names)
 Converts names to paths.
 
 ~ImageBrowser ()
 Destructor.
 

Detailed Description

The ImageBrowser class.

Holds the basic interface in UI Level for browsing images.

Member Enumeration Documentation

◆ ErrorType

enum class ImageBrowser::ErrorType
strong

The ErrorType enum.

Defines the types of errors that can occur in the image browser.

Enumerator
IMAGEREQ_OVERFLOW 

Overflow request.

IMAGEREQ_UNDERFLOW 

Underflow request.

IMAGEREQ_LOST 

Image is lost.

IMAGEREQ_EMPTY 

Images are empty.

Constructor & Destructor Documentation

◆ ImageBrowser()

ImageBrowser::ImageBrowser ( QWidget *  parent = nullptr)
explicit

Constructs an ImageBrowser object.

Parameters
parentThe parent widget

Member Function Documentation

◆ enDirSupports() [1/2]

void ImageBrowser::enDirSupports ( const QString &  where)

Enables directory supports.

Parameters
whereThe path of the directory to support

◆ enDirSupports() [2/2]

void ImageBrowser::enDirSupports ( const QString &  where,
const QStringList &  prefixs 
)

Enables directory supports with file prefixes.

Parameters
whereThe path of the directory to support
prefixsThe list of file prefixes to consider

◆ errorOccur

void ImageBrowser::errorOccur ( const ImageBrowser::ErrorType  e)
signal

Signal emitted when an error occurs.

Parameters
eThe type of error that occurred

◆ from_name()

QStringList ImageBrowser::from_name ( const QStringList &  names)

Converts names to paths.

Parameters
namesThe list of names
Returns
The list of corresponding paths

◆ is_fileview_visible()

bool ImageBrowser::is_fileview_visible ( ) const

Checks if the file view is visible.

Returns
true if visible, false otherwise

◆ remove_from_name()

void ImageBrowser::remove_from_name ( const QStringList &  names)

Removes images from the browser based on their names.

Parameters
namesThe list of image names to remove

◆ show_from_index()

void ImageBrowser::show_from_index ( const int  index)

Shows an image based on its index.

Parameters
indexThe index of the image to show

◆ show_from_name()

void ImageBrowser::show_from_name ( const QString &  name)

Shows an image based on its name.

Parameters
nameThe name of the image to show

The documentation for this class was generated from the following files: