CCIMXDesktop
 
Loading...
Searching...
No Matches
UiTools Namespace Reference

Tools for Ui Sessions. More...

Functions

QString toMediaTypicalTimeStr (const qint64 time)
 toMediaTypicalTimeStr convert the time to typical format
 
std::pair< qint64, qint64 > downcast_to_sliderable_period (qint64 min, qint64 max)
 downcast_to_sliderable_period downcast the period to sliderable, this is seconds level
 
qint64 downcast_to_sliderable_position (qint64 position)
 downcast_to_sliderable_position downcast the position to sliderable, this is seconds level
 
qint64 upcast_to_mseconds (qint64 position)
 upcast_to_mseconds upcast the position to mseconds, this is mseconds level
 
QString toScrollLabelText (const QString &src_path)
 toScrollLabelText convert the path to scroll label text
 
void addWidgetToGridTail (QGridLayout *layout, QWidget *newWidget, int columnCount)
 append to a gridlayout
 
template<typename WindowType >
void openIfUnvisible (WindowType *window, const QString &windowName)
 openIfUnvisible
 

Detailed Description

Tools for Ui Sessions.

supports the Ui sessions

Function Documentation

◆ addWidgetToGridTail()

void UiTools::addWidgetToGridTail ( QGridLayout *  layout,
QWidget *  newWidget,
int  columnCount 
)

append to a gridlayout

Parameters
layoutgridlayout
newWidgetwidget waiting added
columnCountmaxCount

◆ downcast_to_sliderable_period()

std::pair< qint64, qint64 > UiTools::downcast_to_sliderable_period ( qint64  min,
qint64  max 
)

downcast_to_sliderable_period downcast the period to sliderable, this is seconds level

Parameters
minthe first places
maxthe final places
Returns
the pair of the period that can be direct install to the QSilder

◆ downcast_to_sliderable_position()

qint64 UiTools::downcast_to_sliderable_position ( qint64  position)
inline

downcast_to_sliderable_position downcast the position to sliderable, this is seconds level

Parameters
positionthe position to convert
Returns
the position that can be direct install to the QSilder

◆ openIfUnvisible()

template<typename WindowType >
void UiTools::openIfUnvisible ( WindowType *  window,
const QString &  windowName 
)

openIfUnvisible

Parameters
window
windowName

◆ toMediaTypicalTimeStr()

QString UiTools::toMediaTypicalTimeStr ( const qint64  time)

toMediaTypicalTimeStr convert the time to typical format

Parameters
timethe time to convert
Returns
the typical format string
Note
the format we use is TYPICAL_FORMAT
See also
TYPICAL_FORMAT for details

◆ toScrollLabelText()

QString UiTools::toScrollLabelText ( const QString &  src_path)

toScrollLabelText convert the path to scroll label text

Parameters
src_paththe source path to convert
Returns
the scroll label text
Note
this will be used in the scroll label

◆ upcast_to_mseconds()

qint64 UiTools::upcast_to_mseconds ( qint64  position)
inline

upcast_to_mseconds upcast the position to mseconds, this is mseconds level

Parameters
positionthe position to convert
Returns
the position that can be direct install to the QSilder