Multi diag tools
Public Member Functions | List of all members
Mdt::Translation::QmFileName Class Reference

Representation of a .qm translation file name. More...

#include <QmFileName.h>

Public Member Functions

 QmFileName ()=default
 Construct a null QM file name.
 
 QmFileName (const QString &fullName)
 Construct a from a file name. More...
 
 QmFileName (const QmFileName &)=default
 Copy construct a QM file name from a other.
 
QmFileNameoperator= (const QmFileName &)=default
 Copy assign to this QM file name from a other.
 
 QmFileName (QmFileName &&)=default
 Move construct a QM file name from a other.
 
QmFileNameoperator= (QmFileName &&)=default
 Move assign to this QM file name from a other.
 
QString fullName () const
 Get full name. More...
 
QString baseName () const
 Get base name. More...
 
QString suffix () const
 Get suffix. More...
 
LanguageCode languageCode () const
 Get language code. More...
 
QString languageSuffix () const
 Get language suffix. More...
 
QString countrySuffix () const
 Get country suffix. More...
 
bool isNull () const
 Check if this is a null QM file name.
 

Detailed Description

Representation of a .qm translation file name.

Definition at line 33 of file QmFileName.h.

Constructor & Destructor Documentation

Mdt::Translation::QmFileName::QmFileName ( const QString &  fullName)

Construct a from a file name.

fullName should be the file complete name, for example: Application_Core_fr.qm It could also contain a country, like: foo_fr_ca.qm (French-speaking Canada).

Definition at line 32 of file QmFileName.cpp.

Member Function Documentation

QString Mdt::Translation::QmFileName::baseName ( ) const
inline

Get base name.

Returns the name without any suffix and extention.

For example, for foo_fr.qm, foo is returned.

Definition at line 82 of file QmFileName.h.

QString Mdt::Translation::QmFileName::countrySuffix ( ) const
inline

Get country suffix.

For example, for foo_fr_ca.qm, ca is returned.

Definition at line 121 of file QmFileName.h.

QString Mdt::Translation::QmFileName::fullName ( ) const
inline

Get full name.

Returns the full file name as it was set.

Definition at line 70 of file QmFileName.h.

LanguageCode Mdt::Translation::QmFileName::languageCode ( ) const
inline

Get language code.

For example, for foo_fr.qm, fr is returned. For foo_fr_ca.qm, fr is returned.

Definition at line 103 of file QmFileName.h.

QString Mdt::Translation::QmFileName::languageSuffix ( ) const
inline

Get language suffix.

See also
languageCode()

Definition at line 112 of file QmFileName.h.

QString Mdt::Translation::QmFileName::suffix ( ) const

Get suffix.

The suffix is composed of language code (like fr or de) and maybe a country code (like ca or CN).

For example, for foo_fr.qm, fr is returned. For foo_fr_ca.qm, fr_ca is returned.

Definition at line 75 of file QmFileName.cpp.


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