Qx v0.5.8
Qt Extensions Library
|
The FileDetails class acts as a user-friendly container for holding a file's Version Info as defined by the Windows API, which largely consists of the fields within a given file's Details pane. More...
#include <qx/windows/qx-filedetails.h>
Classes | |
struct | StringTable |
A structure that contains all of the translation dependent optional fields of a file's details. More... | |
struct | Translation |
A structure used to represent a particular translation of the string table section of a file's details. It encapsulates a language and code page identifier pair. More... | |
Public Member Functions | |
FileDetails () | |
QList< Translation > | availableTranslations () |
QDateTime | fileDate () |
DWORD | fileFlags () |
DWORD | fileOs () |
DWORD | fileSubType () |
DWORD | fileType () |
VersionNumber | fileVersion () |
bool | hasTranslation (Translation translation) |
bool | isNull () |
VersionNumber | metaStructVersion () |
VersionNumber | productVersion () |
const StringTable | stringTable (int index=0) |
const StringTable | stringTable (Translation translation) |
int | stringTableCount () |
Static Public Member Functions | |
static FileDetails | readFileDetails (QString filePath) |
File details are composed of two major sections:
The fixed portion of a file's details are accessible via the various named accessor functions of this class, while the string table portion is accessible via stringTable(). As the arguments for said function suggest, a file can contain multiple string tables, each representative of a specific translation, though most often files only contain one.
This class also features the static member function readFileDetails() that can be used to acquire the details of a given file.
Qx::FileDetails::FileDetails | ( | ) |
Creates a null FileDetails object.
QList< FileDetails::Translation > Qx::FileDetails::availableTranslations | ( | ) |
Returns the translations for which there are string tables available.
QDateTime Qx::FileDetails::fileDate | ( | ) |
Returns the file's binary creation date and time stamp.
DWORD Qx::FileDetails::fileFlags | ( | ) |
Returns the flags set on the file.
See the dwFileFlags section of the VS_FIXEDFILEINFO documentation for this values associated macros and their descriptions.
DWORD Qx::FileDetails::fileOs | ( | ) |
Returns the target operating system for the file.
See the dwFileOS section of the VS_FIXEDFILEINFO documentation for this values associated macros and their descriptions.
DWORD Qx::FileDetails::fileSubType | ( | ) |
Returns the subtype of file.
See the dwFileSubtype section of the VS_FIXEDFILEINFO documentation for this values associated macros and their descriptions.
DWORD Qx::FileDetails::fileType | ( | ) |
Returns the type of file.
See the dwFileType section of the VS_FIXEDFILEINFO documentation for this values associated macros and their descriptions.
VersionNumber Qx::FileDetails::fileVersion | ( | ) |
Returns the version of the file.
bool Qx::FileDetails::hasTranslation | ( | Translation | translation | ) |
Returns true
if a string table with the given translation is available; otherwise returns false
.
bool Qx::FileDetails::isNull | ( | ) |
Returns true
if the file details are null; otherwise returns false
.
VersionNumber Qx::FileDetails::metaStructVersion | ( | ) |
Returns the internal version of the VS_FIXEDFILEINFO structure that was read from the file.
VersionNumber Qx::FileDetails::productVersion | ( | ) |
Returns the version of the product the file is associated with.
|
static |
Returns the file details of the file pointed to by filePath, or a null FileDetails object if the file doesn't exist.
const FileDetails::StringTable Qx::FileDetails::stringTable | ( | int | index = 0 | ) |
Returns the string table at index index.
The order of string tables within a file's version info is simply the order in which they were added when the file was authored.
const FileDetails::StringTable Qx::FileDetails::stringTable | ( | Translation | translation | ) |
Returns the string table associated with the given translation, or a string table with all null fields if one with that translation is not available.
int Qx::FileDetails::stringTableCount | ( | ) |
Returns the number of string tables present within the file details.