Toolbox Qt
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
tbq::WidgetHelper Class Reference

Class containing multiple helpful methods related to widgets. More...

Static Public Member Functions

static void labelSetPathDir (QLabel *label, const QDir &dir, bool verifyExist)
 Use to display a directory path inside a label.
 
static void labelSetPathFile (QLabel *label, const QFileInfo &fileInfo, bool verifyExist)
 Use to display a file info path inside a label.
 

Detailed Description

Class containing multiple helpful methods related to widgets.

This class group multiple methods that are simple enough to not have to create an inherited object.

Member Function Documentation

◆ labelSetPathDir()

void tbq::WidgetHelper::labelSetPathDir ( QLabel *  label,
const QDir &  dir,
bool  verifyExist 
)
static

Use to display a directory path inside a label.

Latest directory path part will be displayed, the rest of it will be displayed as a tooltip.

Parameters
[out]labelLabel to use.
Must be not NULL.
[in]dirDirectory to display.
If directory is current working directory ("."), directory will be considered as not selected.
[in]verifyExistIf true, method will verify that directory exist : if not, we will consider that that directory has not been selected.
See also
labelSetPathFile()

◆ labelSetPathFile()

void tbq::WidgetHelper::labelSetPathFile ( QLabel *  label,
const QFileInfo &  fileInfo,
bool  verifyExist 
)
static

Use to display a file info path inside a label.

Filaname will be displayed, the path will be displayed as a tooltip.

Parameters
[out]labelLabel to use.
Must be not NULL.
[in]fileInfoFile informations to use.
If empty, file will be considered as not selected.
[in]verifyExistIf true, method will verify that file exist : if not, we will consider that file has not been selected.
See also
labelSetPathDir()

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