Qx v0.5.8
Qt Extensions Library
|
The Qx
namespace is the main namespace through which all non-global functionality of the Qx library is accessed.
More...
Classes | |
class | AbstractError |
The AbstractError template class completes the Error interface and acts as the base class from which specific error types are implemented. More... | |
class | ApplicationDesktopEntry |
The ApplicationDesktopEntry class represents an Application type desktop entry. More... | |
class | ApplicationLogger |
The ApplicationLogger class acts as a convenient means of producing an execution log for an application. More... | |
class | Array |
The Array class is a collection of static functions pertaining to C-style arrays. More... | |
class | AsyncDownloadManager |
The AsyncDownloadManager class is used to queue and process one or more downloads in an asynchronous manner using signals and slots. More... | |
class | Base85 |
The Base85 class provides a Base85 encoded string. More... | |
class | Base85Encoding |
The Base85Encoding class provides the parameters of a particular Base85 string encoding. More... | |
class | Base85ParseError |
The Base85ParseError class is used to report errors while parsing a Base85 encoded string. More... | |
class | BitArray |
The BitArray class is a more robust variant of QBitArray, which provides an array of bits. More... | |
class | ByteArray |
The ByteArray class is a collection of static functions pertaining to QByteArray. More... | |
class | Char |
The Char class is a collection of static functions pertaining to character types. More... | |
class | Color |
The Color class is a collection of static functions pertaining to colors. More... | |
class | Cumulation |
The Cumulation template class tracks the sum of multiple key-value components that can be changed independently. More... | |
class | DateTime |
The DateTime class is a collection of static functions pertaining to date and time. More... | |
class | DesktopAction |
The DesktopAction class contains the details of a ApplicationDesktopEntry action. More... | |
class | DesktopEntry |
The DesktopEntry class provides the base functionality common to all Linux desktop entry files. More... | |
class | DirectoryDesktopEntry |
The DirectoryDesktopEntry class represents the a Directory type desktop entry. More... | |
class | DownloadManagerReport |
The DownloadManagerReport class details the outcome of processing an AsyncDownloadManager or SyncDownloadManager queue. More... | |
class | DownloadOpReport |
The DownloadOpReport class details the result of a single file download. More... | |
struct | DownloadTask |
The DownloadTask struct contains the information necessary to download a file from a URL. More... | |
class | DsvParseError |
The DsvParseError class is used to report errors while parsing an array of delimiter separated values. More... | |
class | DsvTable |
The DsvTable class provides a mutable representation of delimiter-separated values. More... | |
class | Error |
The Error class acts as an interface for an extensible variety of error objects. More... | |
class | ExclusiveAccess |
The ExclusiveAccess template class is a convenience class that simplifies access to resources secured by a mutex. More... | |
class | FileDetails |
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... | |
class | FileStreamReader |
The FileStreamReader class is a specialized wrapper for QDataStream that narrows and simplifies its usage for reading files. More... | |
class | FileStreamWriter |
The FileStreamWriter class is a specialized wrapper for QDataStream that narrows and simplifies its usage for writing files. More... | |
class | FreeIndexTracker |
The FreeIndexTracker class tracks which slots from a given range of indices are in use and which are available. More... | |
class | GenericError |
The GenericError class is multi-purpose container for storing error information. More... | |
class | GroupedProgressManager |
The GroupedProgressManager class produces an overall progress value from a collection of progress groups. More... | |
class | IError |
IError defines the baseline inheritance interface for Qx error types. More... | |
class | Index |
The Index template class provides a wrapper for integers with the notion of 'first', 'last' and 'null'. More... | |
class | Integrity |
The Integrity class is a collection of static functions pertaining to data completeness. More... | |
class | IoOpReport |
The IoOpReport class is a container for details regarding the outcome of an IO operation. More... | |
class | JsonError |
The JsonError class is used to report errors related to JSON manipulation. More... | |
class | LinkDesktopEntry |
The LinkDesktopEntry class represents the a Link type desktop entry. More... | |
class | List |
The List class is a collection of static functions pertaining to lists. More... | |
class | LoginDialog |
The LoginDialog class provides a modal dialog that prompts a user for a username and password. More... | |
class | NetworkReplyError |
The NetworkReplyError class provides a full error object for QNetworkReply, similar to other Qt classes, that can be more convenient for processing errors than just QNetworkReply::NetworkError. More... | |
class | ProcessBider |
The ProcessBider class monitors the presence of a process and signals when that process ends. More... | |
class | ProcessBiderError |
The ProcessBiderError class describes errors than can occur during process biding. More... | |
class | ProgressGroup |
The ProgressGroup class represents a distinct portion of overall progress to be mediated by GroupedProgressManager. More... | |
class | QJsonParseErrorAdapter |
Allows QJsonParseError to be used via the Qx::Error interface. More... | |
class | RegularExpression |
The RegularExpression class is a collection of convenient regular expression statements. More... | |
class | SetOnce |
The SetOnce template class acts as a container for a value that can only be set once. More... | |
struct | ShortcutProperties |
The ShortcutProperties struct acts as a user-friendly container for holding IShellLink data, which are the varies properties of a Windows .lnk shortcut. More... | |
class | StandardItemModel |
The StandardItemModel class is a more robust variant of QStandardItemModel, which is a generic model for storing custom data. More... | |
class | String |
The String class is a collection of static functions pertaining to string types. More... | |
struct | StringLiteral |
The StringLiteral template struct acts as a literal class type wrapper around a C-style string that effectively allows the string to be used as a non-type template parameter. More... | |
class | SyncDownloadManager |
The SyncDownloadManager class is used to queue and process one or more downloads in a synchronous manner. More... | |
class | SystemError |
The SystemError class encapsulates system generated errors as an Qx::Error interface compatible object. More... | |
class | Table |
The Table class is a template class that provides a dynamic two-dimensional array. More... | |
class | TaskbarButton |
The TaskbarButton class represents the Windows taskbar button for a top-level window. More... | |
class | TextPos |
The TextPos class is used to represent an offset within a text file in terms of lines and characters. More... | |
class | TextQuery |
The TextQuery class contains rules for conducting a search of text. More... | |
class | TextStream |
The TextStream class is a more robust variant of QTextStream, which provides a convenient interface for reading and writing text. More... | |
class | TextStreamReader |
The TextStreamReader class is a specialized wrapper for QTextStream that narrows and simplifies its usage for reading text files. More... | |
class | TextStreamWriter |
The TextStreamWriter class is a specialized wrapper for QTextStream that narrows and simplifies its usage for writing text files. More... | |
class | Traverser |
The Traverser template class provides a const_iterator wrapper for an alternate approach to iterating over a type. More... | |
class | TreeInputDialog |
The TreeInputDialog class provides a simple tree-based dialog from which the user can select one or more items. More... | |
class | VersionNumber |
The VersionNumber class extends QVersionNumber to include a dedicated constructor and getter for the fourth version segment. More... | |
class | WinGuiEvent |
The WinGuiEvent class encapsulates messages that are sent directly to an application window by the system on the Windows platform. More... | |
class | XmlStreamReaderError |
The XmlStreamReaderError class provides a full error object for QXmlStreamReader, similar to other Qt classes, that can be more convenient for processing errors than just QXmlStreamReader::Error. More... | |
class | XmlStreamWriterError |
The XmlStreamWriterError class provides a full error object for QXmlStreamWriterError, similar to other Qt classes. QXmlStreamWriter doesn't have an intrinsic error type, but this class can be useful for passing contextual error information when writing XML data so that intent is more clear. More... | |
Concepts | |
concept | error_type |
Specifies that a type is a Qx error type. | |
concept | error_adapter |
Specifies that a type is a Qx error adapter. | |
concept | error_adaptation |
Specifies that two types form a Qx error adaptation. | |
concept | json_root |
Specifies that a type is a valid analogue for a JSON document root element. | |
concept | defines_assign_for_s |
Specifies that a type defines a simple assignment operator for another type (with strict return). | |
concept | defines_assign_for |
Specifies that a type defines a simple assignment operator for another type. | |
concept | defines_assign_s |
Specifies that a type defines a simple assignment operator for itself (with strict return). | |
concept | defines_assign |
Specifies that a type defines a simple assignment operator for itself. | |
concept | defines_add_assign_for_s |
Specifies that a type defines an addition assignment operator for another type (with strict return). | |
concept | defines_add_assign_for |
Specifies that a type defines an addition assignment operator for another type. | |
concept | defines_add_assign_s |
Specifies that a type defines an addition assignment operator for itself (with strict return). | |
concept | defines_add_assign |
Specifies that a type defines an addition assignment operator for itself. | |
concept | defines_sub_assign_for_s |
Specifies that a type defines a subtraction assignment operator for another type (with strict return). | |
concept | defines_sub_assign_for |
Specifies that a type defines a subtraction assignment operator for another type. | |
concept | defines_sub_assign_s |
Specifies that a type defines a subtraction assignment operator for itself (with strict return). | |
concept | defines_sub_assign |
Specifies that a type defines a subtraction assignment operator for itself. | |
concept | defines_mult_assign_for_s |
Specifies that a type defines a multiplication assignment operator for another type (with strict return). | |
concept | defines_mult_assign_for |
Specifies that a type defines a multiplication assignment operator for another type. | |
concept | defines_mult_assign_s |
Specifies that a type defines a multiplication assignment operator for itself (with strict return). | |
concept | defines_mult_assign |
Specifies that a type defines a multiplication assignment operator for itself. | |
concept | defines_div_assign_for_s |
Specifies that a type defines a division assignment operator for another type (with strict return). | |
concept | defines_div_assign_for |
Specifies that a type defines a division assignment operator for another type. | |
concept | defines_div_assign_s |
Specifies that a type defines a division assignment operator for itself (with strict return). | |
concept | defines_div_assign |
Specifies that a type defines a division assignment operator for itself. | |
concept | defines_mod_assign_for_s |
Specifies that a type defines a modulo assignment operator for another type (with strict return). | |
concept | defines_mod_assign_for |
Specifies that a type defines a modulo assignment operator for another type. | |
concept | defines_mod_assign_s |
Specifies that a type defines a modulo assignment operator for itself (with strict return). | |
concept | defines_mod_assign |
Specifies that a type defines a modulo assignment operator for itself. | |
concept | defines_bit_and_assign_for_s |
Specifies that a type defines a bitwise AND assignment operator for another type (with strict return). | |
concept | defines_bit_and_assign_for |
Specifies that a type defines a bitwise AND assignment operator for another type. | |
concept | defines_bit_and_assign_s |
Specifies that a type defines a bitwise AND assignment operator for itself (with strict return). | |
concept | defines_bit_and_assign |
Specifies that a type defines a bitwise AND assignment operator for itself. | |
concept | defines_bit_or_assign_for_s |
Specifies that a type defines a bitwise OR assignment operator for another type (with strict return). | |
concept | defines_bit_or_assign_for |
Specifies that a type defines a bitwise OR assignment operator for another type. | |
concept | defines_bit_or_assign_s |
Specifies that a type defines a bitwise OR assignment operator for itself (with strict return). | |
concept | defines_bit_or_assign |
Specifies that a type defines a bitwise OR assignment operator for itself. | |
concept | defines_bit_xor_assign_for_s |
Specifies that a type defines a bitwise XOR assignment operator for another type (with strict return). | |
concept | defines_bit_xor_assign_for |
Specifies that a type defines a bitwise XOR assignment operator for another type. | |
concept | defines_bit_xor_assign_s |
Specifies that a type defines a bitwise XOR assignment operator for itself (with strict return). | |
concept | defines_bit_xor_assign |
Specifies that a type defines a bitwise XOR assignment operator for itself. | |
concept | defines_left_shift_assign_for_s |
Specifies that a type defines a left shift assignment operator for another type (with strict return). | |
concept | defines_left_shift_assign_for |
Specifies that a type defines a left shift assignment operator for another type. | |
concept | defines_left_shift_assign_s |
Specifies that a type defines a left shift assignment operator for itself (with strict return). | |
concept | defines_left_shift_assign |
Specifies that a type defines a left shift assignment operator for itself. | |
concept | defines_right_shift_assign_for_s |
Specifies that a type defines a right shift assignment operator for another type (with strict return). | |
concept | defines_right_shift_assign_for |
Specifies that a type defines a right shift assignment operator for another type. | |
concept | defines_right_shift_assign_s |
Specifies that a type defines a right shift assignment operator for itself (with strict return). | |
concept | defines_right_shift_assign |
Specifies that a type defines a right shift assignment operator for itself. | |
concept | defines_pre_increment_s |
Specifies that a type defines a pre-increment operator (with strict return). | |
concept | defines_pre_increment |
Specifies that a type defines a pre-increment operator. | |
concept | defines_pre_decrement_s |
Specifies that a type defines a pre-decrement operator (with strict return). | |
concept | defines_pre_decrement |
Specifies that a type defines a pre-decrement operator. | |
concept | defines_post_increment_s |
Specifies that a type defines a post-increment operator (with strict return). | |
concept | defines_post_increment |
Specifies that a type defines a post-increment operator. | |
concept | defines_post_decrement_s |
Specifies that a type defines a post-decrement operator (with strict return). | |
concept | defines_post_decrement |
Specifies that a type defines a post-decrement operator. | |
concept | defines_negation_s |
Specifies that a type defines a negation operator (with strict return). | |
concept | defines_negation |
Specifies that a type defines a negation operator. | |
concept | defines_and_for_s |
Specifies that a type defines a logical AND operator for another type (with strict return). | |
concept | defines_and_for |
Specifies that a type defines a logical AND operator for another type. | |
concept | defines_and_s |
Specifies that a type defines a logical AND operator for itself (with strict return). Satisfied if K has a logical AND operator defined for itself that returns bool . | |
concept | defines_and |
Specifies that a type defines a logical AND operator for itself. | |
concept | defines_or_for_s |
Specifies that a type defines a logical OR operator for another type (with strict return). | |
concept | defines_or_for |
Specifies that a type defines a logical OR operator for another type. | |
concept | defines_or_s |
Specifies that a type defines a logical OR operator for itself (with strict return). | |
concept | defines_or |
Specifies that a type defines a logical OR operator for itself. | |
concept | defines_subscript_for_s |
Specifies that a type defines a subscript operator for another type (with strict return). | |
concept | defines_subscript_for |
Specifies that a type defines a subscript operator for another type. | |
concept | defines_indirection_s |
Specifies that a type defines an indirection operator (with strict return). | |
concept | defines_indirection |
Specifies that a type defines an indirection operator. | |
concept | defines_address_of_s |
Specifies that a type defines an address-of operator (with strict return). | |
concept | defines_address_of |
Specifies that a type defines an address-of operator. | |
concept | defines_ptr_to_member_ptr_for_s |
Specifies that a type defines a pointer to member of pointer operator (with strict return). | |
concept | defines_ptr_to_member_ptr_for |
Specifies that a type defines a pointer to member of pointer operator. | |
concept | defines_call_for_s |
Specifies that a type defines a call operator for the specified argument types (with strict return). | |
concept | defines_call_for |
Specifies that a type defines a call operator for the specified argument types. | |
concept | defines_call_s |
Specifies that a type defines a argumentless call operator (with strict return). | |
concept | defines_call |
Specifies that a type defines a argumentless call operator. | |
concept | defines_comma_for_s |
Specifies that a type defines a comma operator for another type (with strict return). | |
concept | defines_comma_for |
Specifies that a type defines a comma operator for another type. | |
concept | defines_unary_plus_s |
Specifies that a type defines a unary plus operator (with strict return). | |
concept | defines_unary_plus |
Specifies that a type defines a unary plus operator. | |
concept | defines_unary_minus_s |
Specifies that a type defines a unary minus operator (with strict return). | |
concept | defines_unary_minus |
Specifies that a type defines a unary minus operator. | |
concept | defines_add_for_s |
Specifies that a type defines an addition operator for another type (with strict return). | |
concept | defines_add_for |
Specifies that a type defines an addition operator for another type. | |
concept | defines_add_s |
Specifies that a type defines an addition operator for itself (with strict return). | |
concept | defines_add |
Specifies that a type defines an addition operator for itself. | |
concept | defines_sub_for_s |
Specifies that a type defines a subtraction operator for another type (with strict return). | |
concept | defines_sub_for |
Specifies that a type defines a subtraction operator for another type. | |
concept | defines_sub_s |
Specifies that a type defines a subtraction operator for itself (with strict return). | |
concept | defines_sub |
Specifies that a type defines a subtraction operator for itself. | |
concept | defines_mult_for_s |
Specifies that a type defines a multiplication operator for another type (with strict return). | |
concept | defines_mult_for |
Specifies that a type defines a multiplication operator for another type. | |
concept | defines_mult_s |
Specifies that a type defines a multiplication operator for itself (with strict return). | |
concept | defines_mult |
Specifies that a type defines a multiplication operator for itself. | |
concept | defines_div_for_s |
Specifies that a type defines a division operator for another type (with strict return). | |
concept | defines_div_for |
Specifies that a type defines a division operator for another type. | |
concept | defines_div_s |
Specifies that a type defines a division operator for itself (with strict return). | |
concept | defines_div |
Specifies that a type defines a division operator for itself. | |
concept | defines_mod_for_s |
Specifies that a type defines a modulo operator for another type (with strict return). | |
concept | defines_mod_for |
Specifies that a type defines a modulo operator for another type. | |
concept | defines_mod_s |
Specifies that a type defines a modulo operator for itself (with strict return). | |
concept | defines_mod |
Specifies that a type defines a modulo operator for itself. | |
concept | defines_bit_not_s |
Specifies that a type defines a bitwise NOT operator (with strict return). | |
concept | defines_bit_not |
Specifies that a type defines a bitwise NOT operator. | |
concept | defines_bit_and_for_s |
Specifies that a type defines a bitwise AND operator for another type (with strict return). | |
concept | defines_bit_and_for |
Specifies that a type defines a bitwise AND operator for another type. | |
concept | defines_bit_and_s |
Specifies that a type defines a bitwise AND operator for itself (with strict return). | |
concept | defines_bit_and |
Specifies that a type defines a bitwise AND operator for itself. | |
concept | defines_bit_or_for_s |
Specifies that a type defines a bitwise OR operator for another type (with strict return). | |
concept | defines_bit_or_for |
Specifies that a type defines a bitwise OR operator for another type. | |
concept | defines_bit_or_s |
Specifies that a type defines a bitwise OR operator for itself (with strict return). | |
concept | defines_bit_or |
Specifies that a type defines a bitwise OR operator for itself. | |
concept | defines_bit_xor_for_s |
Specifies that a type defines a bitwise XOR operator for another type (with strict return). | |
concept | defines_bit_xor_for |
Specifies that a type defines a bitwise XOR operator for another type. | |
concept | defines_bit_xor_s |
Specifies that a type defines a bitwise XOR operator for itself (with strict return). | |
concept | defines_bit_xor |
Specifies that a type defines a bitwise XOR operator for itself. | |
concept | defines_left_shift_for_s |
Specifies that a type defines a left shift operator for another type (with strict return). | |
concept | defines_left_shift_for |
Specifies that a type defines a left shift operator for another type. | |
concept | defines_left_shift_s |
Specifies that a type defines a left shift operator for itself (with strict return). | |
concept | defines_left_shift |
Specifies that a type defines a left shift operator for itself. | |
concept | defines_right_shift_for_s |
Specifies that a type defines a right shift operator for another type (with strict return). | |
concept | defines_right_shift_for |
Specifies that a type defines a right shift operator for another type. | |
concept | defines_right_shift_s |
Specifies that a type defines a right shift operator for itself (with strict return). | |
concept | defines_right_shift |
Specifies that a type defines a right shift operator for itself. | |
concept | defines_equality_for_s |
Specifies that a type defines an equal to operator for another type (with strict return). | |
concept | defines_equality_for |
Specifies that a type defines an equal to operator for another type. | |
concept | defines_equality_s |
Specifies that a type defines an equal to operator for itself (with strict return). | |
concept | defines_equality |
Specifies that a type defines an equal to operator for itself (with strict return). | |
concept | defines_inequality_for_s |
Specifies that a type defines a not equal to operator for another type (with strict return). | |
concept | defines_inequality_for |
Specifies that a type defines a not equal to operator for another type. | |
concept | defines_inequality_s |
Specifies that a type defines a not equal to operator for itself (with strict return). | |
concept | defines_inequality |
Specifies that a type defines a not equal to operator for itself (with strict return). | |
concept | defines_less_than_for_s |
Specifies that a type defines a less than operator for another type (with strict return). | |
concept | defines_less_than_for |
Specifies that a type defines a less than operator for another type. | |
concept | defines_less_than_s |
Specifies that a type defines a less than operator for itself (with strict return). | |
concept | defines_less_than |
Specifies that a type defines a less than operator for itself. | |
concept | defines_greater_than_for_s |
Specifies that a type defines a greater than operator for another type (with strict return). | |
concept | defines_greater_than_for |
Specifies that a type defines a greater than operator for another type. | |
concept | defines_greater_than_s |
Specifies that a type defines a greater than operator for itself (with strict return). | |
concept | defines_greater_than |
Specifies that a type defines a greater than operator for itself. | |
concept | defines_less_than_equal_for_s |
Specifies that a type defines a less than or equal to operator for another type (with strict return). | |
concept | defines_less_than_equal_for |
Specifies that a type defines a less than or equal to operator for another type. | |
concept | defines_less_than_equal_s |
Specifies that a type defines a less than or equal to operator for itself (with strict return). | |
concept | defines_less_than_equal |
Specifies that a type defines a less than or equal to operator for itself. | |
concept | defines_greater_than_equal_for_s |
Specifies that a type defines a greater than or equal to operator for another type (with strict return). | |
concept | defines_greater_than_equal_for |
Specifies that a type defines a greater than or equal to operator for another type. | |
concept | defines_greater_than_equal_s |
Specifies that a type defines a greater than or equal to operator for itself (with strict return). | |
concept | defines_greater_than_equal |
Specifies that a type defines a greater than or equal to operator for itself. | |
concept | defines_three_way_comp_for_s |
Specifies that a type defines a three-way comparison operator for another type (with strict return). | |
concept | defines_three_way_comp_for |
Specifies that a type defines a three-way comparison operator for another type. | |
concept | defines_three_way_comp_s |
Specifies that a type defines a three-way comparison operator for itself (with strict return). | |
concept | defines_three_way_comp |
Specifies that a type defines a three-way comparison operator for itself. | |
concept | arithmetic |
Specifies that a type is an arithmetic type. | |
concept | fundamental |
Specifies that a type is a fundamental type. | |
concept | traverseable |
Specifies that a type is a valid type for Qx::Traverser. | |
concept | static_castable_to |
Specifies that a type can be statically cast to another type. | |
concept | any_of |
Specifies that a type is one of several types. | |
concept | specializes |
Specifies that a type is a specialization of a template. | |
concept | qassociative |
Specifies that a type is a Qt-based associative container type. | |
concept | qcollective |
Specifies that a type is a Qt-based collection type. | |
Typedefs | |
typedef Index< qint16 > | Index16 |
typedef Index< qint32 > | Index32 |
typedef Index< qint32 > | Index64 |
typedef Index< qint8 > | Index8 |
typedef QFlags< ReadOption > | ReadOptions |
typedef Traverser< QString > | StringTraverser |
typedef QFlags< WriteOption > | WriteOptions |
Functions | |
int | abs (int n) |
long long | abs (long long n) |
long | abs (long n) |
unsigned int | abs (unsigned int n) |
unsigned long long | abs (unsigned long long n) |
unsigned long | abs (unsigned long n) |
QString | asString (const QJsonValue &value) |
IoOpReport | calculateFileChecksum (QString &returnBuffer, QFile &file, QCryptographicHash::Algorithm hashAlgorithm) |
template<typename T > requires std::integral<T> | |
T | ceilNearestMultiple (T num, T mult) |
template<typename T > requires std::integral<T> | |
T | ceilPowOfTwo (T num) |
SystemError | cleanKillProcess (HANDLE processHandle) |
SystemError | cleanKillProcess (quint32 processId) |
template<typename T > requires std::unsigned_integral<T> | |
T | constrainedAdd (T a, T b, T max=std::numeric_limits< T >::max()) |
template<typename T > requires std::signed_integral<T> | |
T | constrainedAdd (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max()) |
template<typename T > requires std::unsigned_integral<T> | |
T | constrainedDiv (T a, T b, T max=std::numeric_limits< T >::max()) |
template<typename T > requires std::signed_integral<T> | |
T | constrainedDiv (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max()) |
template<typename T > requires std::unsigned_integral<T> | |
T | constrainedMult (T a, T b, T max=std::numeric_limits< T >::max()) |
template<typename T > requires std::signed_integral<T> | |
T | constrainedMult (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max()) |
template<typename T > requires std::unsigned_integral<T> | |
T | constrainedSub (T a, T b, T min=0) |
template<typename T > requires std::signed_integral<T> | |
T | constrainedSub (T a, T b, T min=std::numeric_limits< T >::min(), T max=std::numeric_limits< T >::max()) |
template<class InputIt > requires std::input_iterator<InputIt> && std::equality_comparable<InputIt> | |
bool | containsDuplicates (InputIt begin, InputIt end) |
IoOpReport | copyDirectory (const QDir &directory, const QDir &destination, bool recursive, ReplaceMode replaceMode) |
SystemError | createShortcut (QString shortcutPath, ShortcutProperties sp) |
IoOpReport | deleteTextFromFile (QFile &textFile, TextPos startPos, TextPos endPos) |
IoOpReport | dirContainsFiles (bool &returnBuffer, const QDir &directory, QDirIterator::IteratorFlags iteratorFlags) |
bool | dirContainsFiles (const QDir &directory, QDirIterator::IteratorFlags iteratorFlags) |
IoOpReport | dirContentInfoList (QFileInfoList &returnBuffer, const QDir &directory, QStringList nameFilters, QDir::Filters filters, QDirIterator::IteratorFlags flags) |
IoOpReport | dirContentList (QStringList &returnBuffer, const QDir &directory, QStringList nameFilters, QDir::Filters filters, QDirIterator::IteratorFlags flags, PathType pathType) |
template<typename T > requires arithmetic<T> | |
T | distance (T x, T y) |
bool | enforceSingleInstance (QString uniqueAppId) |
IoOpReport | fileContainsString (bool &returnBuffer, QFile &textFile, const QString &query, Qt::CaseSensitivity cs, bool allowSplit) |
IoOpReport | fileIsEmpty (bool &returnBuffer, const QFile &file) |
bool | fileIsEmpty (const QFile &file) |
IoOpReport | fileMatchesChecksum (bool &returnBuffer, QFile &file, QString checksum, QCryptographicHash::Algorithm hashAlgorithm) |
QList< QJsonValue > | findAllValues (const QJsonValue &rootValue, QStringView key) |
IoOpReport | findStringInFile (QList< TextPos > &returnBuffer, QFile &textFile, const TextQuery &query, ReadOptions readOptions) |
template<typename T > requires std::integral<T> | |
T | floorNearestMultiple (T num, T mult) |
template<typename T > requires std::integral<T> | |
T | floorPowOfTwo (T num) |
SystemError | forceKillProcess (HANDLE processHandle) |
SystemError | forceKillProcess (quint32 processId) |
SystemError | getLastError () |
bool | isDefaultProtocolHandler (const QString &scheme, const QString &path) |
template<typename T > requires arithmetic<T> | |
bool | isEven (T num) |
template<typename T > requires arithmetic<T> | |
bool | isOdd (T num) |
QString | kosherizeFileName (QString fileName) |
template<typename T > requires std::integral<T> | |
T | length (T start, T end) |
bool | operator== (const FileDetails::Translation &lhs, const FileDetails::Translation &rhs) noexcept |
template<typename T > requires QxJson::json_containing<T> | |
JsonError | parseJson (T &parsed, const QJsonArray &array) |
template<typename T > requires json_root<T> | |
JsonError | parseJson (T &parsed, const QJsonDocument &doc) |
template<typename T > requires QxJson::json_struct<T> | |
JsonError | parseJson (T &parsed, const QJsonObject &obj) |
template<typename T > requires json_root<T> | |
JsonError | parseJson (T &parsed, const QString &filePath) |
template<typename T > requires json_root<T> | |
JsonError | parseJson (T &parsed, QFile &file) |
int | postBlockingError (const Error &error, QMessageBox::StandardButtons choices, QMessageBox::StandardButton defChoice) |
void | postError (const Error &error) |
QList< quint32 > | processChildren (quint32 processId, bool recursive) |
quint32 | processId (QString processName) |
SystemError | processIsElevated (bool &elevated) |
SystemError | processIsElevated (bool &elevated, DWORD processId) |
SystemError | processIsElevated (bool &elevated, HANDLE processHandle) |
bool | processIsRunning (HANDLE processHandle) |
bool | processIsRunning (QString processName) |
bool | processIsRunning (quint32 processId) |
QString | processName (quint32 processId) |
QList< DWORD > | processThreadIds (DWORD processId) |
size_t | qHash (const DownloadTask &key, size_t seed) noexcept |
size_t | qHash (const FileDetails::Translation &key, size_t seed) noexcept |
IoOpReport | readBytesFromFile (QByteArray &returnBuffer, QFile &file, Index64 startPos, Index64 endPos) |
IoOpReport | readTextFromFile (QString &returnBuffer, QFile &textFile, TextPos startPos, int count, ReadOptions readOptions) |
IoOpReport | readTextFromFile (QString &returnBuffer, QFile &textFile, TextPos startPos, TextPos endPos, ReadOptions readOptions) |
IoOpReport | readTextFromFile (QStringList &returnBuffer, QFile &textFile, Index32 startLine, Index32 endLine, ReadOptions readOptions) |
bool | removeDefaultProtocolHandler (const QString &scheme, const QString &path) |
template<typename T > requires std::integral<T> | |
T | roundPowOfTwo (T num) |
template<typename T > requires std::integral<T> | |
T | roundToNearestMultiple (T num, T mult) |
template<typename T > requires json_root<T> | |
JsonError | serializeJson (const QString &serializedPath, const T &root) |
template<typename T > requires json_root<T> | |
JsonError | serializeJson (QFile &serialized, const T &root) |
template<typename T > requires QxJson::json_containing<T> | |
void | serializeJson (QJsonArray &serialized, const T &container) |
template<typename T > requires json_root<T> | |
void | serializeJson (QJsonDocument &serialized, const T &root) |
template<typename T > requires QxJson::json_struct<T> | |
void | serializeJson (QJsonObject &serialized, const T &struc) |
bool | setDefaultProtocolHandler (const QString &scheme, const QString &name, const QString &path, const QStringList &args) |
void | setUserInputEchoEnabled (bool enabled) |
QString | severityString (Severity sv, bool uc) |
IoOpReport | textFileAbsolutePosition (TextPos &textPos, QFile &textFile, bool ignoreTrailingEmpty) |
IoOpReport | textFileEndsWithNewline (bool &returnBuffer, QFile &textFile) |
IoOpReport | textFileLayout (QList< int > &returnBuffer, QFile &textFile, bool ignoreTrailingEmpty) |
IoOpReport | textFileLineCount (int &returnBuffer, QFile &textFile, bool ignoreTrailingEmpty) |
IoOpReport | writeBytesToFile (QFile &file, const QByteArray &bytes, WriteMode writeMode, Index64 startPos, WriteOptions writeOptions) |
IoOpReport | writeBytesToFile (QSaveFile &file, const QByteArray &bytes, WriteMode writeMode, Index64 startPos, WriteOptions writeOptions) |
IoOpReport | writeStringToFile (QFile &textFile, const QString &text, WriteMode writeMode, TextPos startPos, WriteOptions writeOptions) |
IoOpReport | writeStringToFile (QSaveFile &textFile, const QString &text, WriteMode writeMode, TextPos startPos, WriteOptions writeOptions) |
QSettings::Format | xdgDesktopSettingsFormat () |
QSettings::Format | xdgSettingsFormat () |
QString | xmlSanitized (const QString &string) |
Variables | |
QTextStream | cerr = QTextStream(stderr) |
QTextStream | cin = QTextStream(stdin) |
QTextStream | cout = QTextStream(stdout) |
const QChar | ENDL = '\n' |
const QString | LIST_ITEM_PREFIX = u"- "_s |
Nearly all library features are nested within this namespace in a similar vein as std
with the C++ Standard Library.
See the File Member's Index for all global library elements.
A convenience synonym for Index<qint16>
A convenience synonym for Index<qint32>
A convenience synonym for Index<qint64>
A convenience synonym for Index<qint8>
The ReadOptions type is a typedef for QFlags< ReadOption>. It stores an OR combination of ReadOption values.
A convenience synonym for Qx::Traverser<QString>
The WriteOptions type is a typedef for QFlags< WriteOption>. It stores an OR combination of WriteOption values.
enum Qx::Extent |
enum Qx::IoOpResultType |
This defines type of an IO operation result.
enum Qx::IoOpTargetType |
enum Qx::IoOpType |
This defines the type of an IO operation.
enum Qx::PathType |
enum Qx::ReadOption |
This enum is used to specify various options that affect how data is read from a file.
The exact effects of each value can vary depending on the context in which they are used, with some options being completely useless in some contexts.
enum Qx::ReplaceMode |
enum Qx::Severity |
enum Qx::WriteMode |
This enum is used to describe the mode with which data is written to a file.
The exact effects of its values can vary depending on the context in which they are used.
enum Qx::WriteOption |
This enum is used to specify various options that affect how data is written to a file.
The exact effects of each value can vary depending on the context in which they are used, with some options being completely useless in some contexts.
QX_CORE_EXPORT int Qx::abs | ( | int | n | ) |
Returns the absolute value of n; equivalent to std::abs(n)
.
QX_CORE_EXPORT long long Qx::abs | ( | long long | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns the absolute value of n; equivalent to std::abs(n)
.
QX_CORE_EXPORT long Qx::abs | ( | long | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns the absolute value of n; equivalent to std::abs(n)
.
QX_CORE_EXPORT unsigned int Qx::abs | ( | unsigned int | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns the absolute value of n; equivalent to n
.
This overload allows abs
to be used in templates without the need to specialize solely because of signedness
QX_CORE_EXPORT unsigned long long Qx::abs | ( | unsigned long long | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns the absolute value of n; equivalent to n
.
This overload allows abs
to be used in templates without the need to specialize solely because of signedness
QX_CORE_EXPORT unsigned long Qx::abs | ( | unsigned long | n | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns the absolute value of n; equivalent to n
.
This overload allows abs
to be used in templates without the need to specialize solely because of signedness
QX_CORE_EXPORT QString Qx::asString | ( | const QJsonValue & | value | ) |
Returns the JSON string representation of value regardless of its type.
If value is an object or array, the returned string will be in the compact format.
QX_IO_EXPORT IoOpReport Qx::calculateFileChecksum | ( | QString & | returnBuffer, |
QFile & | file, | ||
QCryptographicHash::Algorithm | hashAlgorithm ) |
Computes a file's checksum.
[out] | returnBuffer | Set to the hexadecimal string representation of the file's checksum. |
[in] | file | The file to hash. |
[in] | hashAlgorithm | The hash algorithm to calculate the checksum with. |
T Qx::ceilNearestMultiple | ( | T | num, |
T | mult ) |
Returns the next (i.e. higher) multiple of mult after num, or num if it is already a multiple of mult.
The sign of the result will always be the same sign as num, regardless of the sign of mult.
T Qx::ceilPowOfTwo | ( | T | num | ) |
Returns the next (i.e. higher) power of two after num, or num if it is already a power of two.
QX_WINDOWS_EXPORT SystemError Qx::cleanKillProcess | ( | HANDLE | processHandle | ) |
Closes the process referenced by processHandle.
QX_CORE_EXPORT SystemError Qx::cleanKillProcess | ( | quint32 | processId | ) |
Attempts to close the process referenced by processId in a manner that allows it to shutdown gracefully.
In general this is not guaranteed to close the process as the target application ultimately decides how to handle the termination request, and may perform alternate actions such as prompting the user to save files.
The closure is performed by signaling all top-level windows of the process to close via WM_CLOSE
.
If the process has no windows (i.e. a console application), is designed to remain running with no windows open, or otherwise doesn't process the WM_CLOSE message it will remain running.
If the operation fails the returned error object will contain the cause.
0
for processId in order to kill the current process. Instead pass the result of QCoreApplication::applicationPid().T Qx::constrainedAdd | ( | T | a, |
T | b, | ||
T | max = std::numeric_limits<T>::max() ) |
Returns the result of adding unsigned integers a and b, bounded between 0 and max inclusive.
The default arguments of this function make it useful for performing addition that is safe from overflow.
T Qx::constrainedAdd | ( | T | a, |
T | b, | ||
T | min = std::numeric_limits<T>::min(), | ||
T | max = std::numeric_limits<T>::max() ) |
Returns the result of adding signed integers a and b, bounded between min and max inclusive.
The default arguments of this function make it useful for performing addition that is safe from underflow and overflow.
T Qx::constrainedDiv | ( | T | a, |
T | b, | ||
T | max = std::numeric_limits<T>::max() ) |
Returns the result of dividing unsigned integer a by signed integer b, bounded between 0 and max inclusive.
T Qx::constrainedDiv | ( | T | a, |
T | b, | ||
T | min = std::numeric_limits<T>::min(), | ||
T | max = std::numeric_limits<T>::max() ) |
Returns the result of dividing signed integer a by signed integer b, bounded between min and max inclusive.
The default arguments of this function make it useful for performing division that is safe from underflow and overflow.
T Qx::constrainedMult | ( | T | a, |
T | b, | ||
T | max = std::numeric_limits<T>::max() ) |
Returns the result of multiplying unsigned integers a and b, bounded between 0 and max inclusive.
The default arguments of this function make it useful for performing multiplication that is safe from overflow.
T Qx::constrainedMult | ( | T | a, |
T | b, | ||
T | min = std::numeric_limits<T>::min(), | ||
T | max = std::numeric_limits<T>::max() ) |
Returns the result of multiplying signed integers a and b, bounded between min and max inclusive.
The default arguments of this function make it useful for performing multiplication that is safe from underflow and overflow.
T Qx::constrainedSub | ( | T | a, |
T | b, | ||
T | min = 0 ) |
Returns the result of subtracting unsigned integers a and b, bounded between min and "std::numeric_limits<T>::max()"
inclusive.
The default arguments of this function make it useful for performing subtraction that is safe from underflow.
T Qx::constrainedSub | ( | T | a, |
T | b, | ||
T | min = std::numeric_limits<T>::min(), | ||
T | max = std::numeric_limits<T>::max() ) |
Returns the result of subtracting signed integers a and b, bounded between min and max inclusive.
The default arguments of this function make it useful for performing subtraction that is safe from underflow and overflow.
bool Qx::containsDuplicates | ( | InputIt | begin, |
InputIt | end ) |
Returns true
if num is even; otherwise returns false
.
QX_IO_EXPORT IoOpReport Qx::copyDirectory | ( | const QDir & | directory, |
const QDir & | destination, | ||
bool | recursive, | ||
ReplaceMode | replaceMode ) |
Copies directory to destination, recursively if recursive is true
. Existing files are overwritten if overwrite is true
.
QX_WINDOWS_EXPORT SystemError Qx::createShortcut | ( | QString | shortcutPath, |
ShortcutProperties | sp ) |
Creates a shortcut on the user's filesystem at the path shortcutPath, with the given shortcut properties sp.
QX_IO_EXPORT IoOpReport Qx::deleteTextFromFile | ( | QFile & | textFile, |
TextPos | startPos, | ||
TextPos | endPos ) |
Removes the given range of text from textFile.
[in] | textFile | The file from which text is to be removed. |
[in] | startPos | The first character to be removed. |
[in] | endPos | The last character to be removed. |
QX_IO_EXPORT IoOpReport Qx::dirContainsFiles | ( | bool & | returnBuffer, |
const QDir & | directory, | ||
QDirIterator::IteratorFlags | iteratorFlags ) |
Sets returnBuffer to true
if directory contains files in accordance with iteratorFlags; otherwise sets it to false
.
If the directory doesn't exist, returnBuffer will be set to false and an operation report noting the directory's absence is returned.
QX_IO_EXPORT bool Qx::dirContainsFiles | ( | const QDir & | directory, |
QDirIterator::IteratorFlags | iteratorFlags ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if directory contains files in accordance with iteratorFlags; otherwise returns false
.
QX_IO_EXPORT IoOpReport Qx::dirContentInfoList | ( | QFileInfoList & | returnBuffer, |
const QDir & | directory, | ||
QStringList | nameFilters, | ||
QDir::Filters | filters, | ||
QDirIterator::IteratorFlags | flags ) |
Fills returnBuffer with a list of QFileInfo objects for all the files and directories in directory, limited according to the name and attribute filters previously set with QDir::setNameFilters() and QDir::setFilter(), while sort flags are ignored.
The name filter and file attribute filter can be overridden using the nameFilters and filters arguments respectively.
Directory traversal rules can be further refined via iteratorFlags.
Returns a report containing details of operation success or failure.
QX_IO_EXPORT IoOpReport Qx::dirContentList | ( | QStringList & | returnBuffer, |
const QDir & | directory, | ||
QStringList | nameFilters, | ||
QDir::Filters | filters, | ||
QDirIterator::IteratorFlags | flags, | ||
PathType | pathType ) |
Fills returnBuffer with a list of names for all the files and directories in directory, limited according to the name and attribute filters previously set with QDir::setNameFilters() and QDir::setFilter(), while sort flags are ignored. The paths will be relative to directory if pathType is PathType::Relative
.
The name filter and file attribute filter can be overridden using the nameFilters and filters arguments respectively.
Directory traversal rules can be further refined via iteratorFlags.
Returns a report containing details of operation success or failure.
T Qx::distance | ( | T | x, |
T | y ) |
Returns the absolute distance between x and y.
QX_CORE_EXPORT bool Qx::enforceSingleInstance | ( | QString | uniqueAppId | ) |
This function is used to limit a particular application such that only one running instance is allowed at one time. Call this function at the point at which you want additional instances to terminate, and check the result:
If the calling instance is the only one running, the function will return true
; otherwise it returns false.
uniqueAppId acts as a universal identifier for the application, intended to work across different versions and builds, and therefore should be a reasonably unique string that typically is never changed in future revisions once set.
QX_IO_EXPORT IoOpReport Qx::fileContainsString | ( | bool & | returnBuffer, |
QFile & | textFile, | ||
const QString & | query, | ||
Qt::CaseSensitivity | cs, | ||
bool | allowSplit ) |
Checks if textFile contains the given query.
[out] | returnBuffer | Set to true if the file contains the query text; otherwise set to false . |
[in] | textFile | The file search. |
[in] | query | The text to search for. |
[in] | cs | Whether or not the search is case sensitive. |
[in] | allowSplit | Whether or not the query text is matched if it's split across a line break. |
QX_IO_EXPORT IoOpReport Qx::fileIsEmpty | ( | bool & | returnBuffer, |
const QFile & | file ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sets returnBuffer to true
if the file is empty; otherwise sets it to false
.
If the file doesn't exist, returnBuffer will be set to true and an operation report noting the file's absence is returned.
QX_IO_EXPORT bool Qx::fileIsEmpty | ( | const QFile & | file | ) |
Returns true
if file is empty; otherwise returns false
.
QX_IO_EXPORT IoOpReport Qx::fileMatchesChecksum | ( | bool & | returnBuffer, |
QFile & | file, | ||
QString | checksum, | ||
QCryptographicHash::Algorithm | hashAlgorithm ) |
Checks if a file's checksum matches a known value.
[out] | returnBuffer | Set to true if the file's checksum matches; otherwise returns false . |
[in] | file | The file to hash. |
[in] | hashAlgorithm | The hash algorithm used to calculate the known checksum. |
[in] | checksum | The known checksum to compare against. |
QX_CORE_EXPORT QList< QJsonValue > Qx::findAllValues | ( | const QJsonValue & | rootValue, |
QStringView | key ) |
Recursively searches rootValue for key and returns the associated value for all matches as a list, or an empty list if the key was not found.
If rootValue is of any type other than QJsonValue::Array or QJsonValue::Object then returned list will always be empty.
QX_IO_EXPORT IoOpReport Qx::findStringInFile | ( | QList< TextPos > & | returnBuffer, |
QFile & | textFile, | ||
const TextQuery & | query, | ||
ReadOptions | readOptions ) |
Searches for the given query within textFile and returns the result(s) if found.
[out] | returnBuffer | A List of positions where the query was found. |
[in] | textFile | The file search. |
[in] | query | The text to search for. |
[in] | readOptions | Options modifying how the file is parsed. |
T Qx::floorNearestMultiple | ( | T | num, |
T | mult ) |
Returns the previous (i.e. lower) multiple of mult after num, or num if it is already a multiple of mult.
The sign of the result will always be the same sign as num, regardless of the sign of mult.
T Qx::floorPowOfTwo | ( | T | num | ) |
Returns the previous (i.e. lower) power of two before num, or num if it is already a power of two.
QX_WINDOWS_EXPORT SystemError Qx::forceKillProcess | ( | HANDLE | processHandle | ) |
Forcefully closes the process referenced by processHandle.
QX_CORE_EXPORT SystemError Qx::forceKillProcess | ( | quint32 | processId | ) |
Forcefully closes the process referenced by processId such that it exists immediately.
TerminateProcess()
on the process, setting its exit code to 0xFFFF
.If the operation fails the returned error object will contain the cause.
0
for processId in order to kill the current process. Instead pass the result of QCoreApplication::applicationPid().QX_WINDOWS_EXPORT SystemError Qx::getLastError | ( | ) |
Returns the calling threads last error code value as a system error.
Returns true
if the application at path is set as the default handler for URI requests of scheme for the current user; otherwise, returns false
.
If path is left empty, it defaults to QCoreApplication::applicationFilePath().
bool Qx::isEven | ( | T | num | ) |
Returns true
if there are duplicate elements in the range [first, last); otherwise returns false
.
bool Qx::isOdd | ( | T | num | ) |
Returns true
if num is odd; otherwise returns false
.
Returns a version of fileName with all illegal filename characters replaced with similar legal characters or outright removed.
T Qx::length | ( | T | start, |
T | end ) |
Computes the length of, or alternatively the number of elements in, the range [start, end].
This is equivalent to: (end - start) + 1
.
|
noexcept |
Returns true
if the target and destination of lhs are the same as in rhs; otherwise returns false
JsonError Qx::parseJson | ( | T & | parsed, |
const QJsonArray & | array ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Parses the JSON array array and stores the result in parsed. T must satisfy the QxJson::json_containing concept.
JsonError Qx::parseJson | ( | T & | parsed, |
const QJsonDocument & | doc ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Parses the entire JSON document doc and stores the result in parsed. T must satisfy the Qx::json_root concept.
JsonError Qx::parseJson | ( | T & | parsed, |
const QJsonObject & | obj ) |
Parses the JSON object obj and stores the result in parsed. T must satisfy the QxJson::json_struct concept.
If parsing fails, a valid JsonError is returned that describes the cause; otherwise, an invalid error is returned.
JsonError Qx::parseJson | ( | T & | parsed, |
const QString & | filePath ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Parses the entire JSON document file at path filePath and stores the result in parsed. T must satisfy the Qx::json_root concept.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Parses the entire JSON document file file and stores the result in parsed. T must satisfy the Qx::json_root concept.
QX_WIDGETS_EXPORT int Qx::postBlockingError | ( | const Error & | error, |
QMessageBox::StandardButtons | choices, | ||
QMessageBox::StandardButton | defChoice ) |
Displays error using a QMessageBox, blocks until it's closed, and finally returns the button that was selected.
error | The error to display. |
choices | The different option buttons to display. |
defChoice | The default button that is selected. |
QX_WIDGETS_EXPORT void Qx::postError | ( | const Error & | error | ) |
Displays error using a QMessageBox with an OK
button.
As an example, this code:
results in the following message box:
QX_CORE_EXPORT QList< quint32 > Qx::processChildren | ( | quint32 | processId, |
bool | recursive ) |
Returns a list of process IDs for all the children of the process specified by processId, or an empty list if the process has no children or an an error occurred.
If recursive is true, the returned list will contain the process ID of every process descended from the specified process, instead of just its immediate children; in other words, the list will represent the entire process tree of processId, excluding itself.
The list is not guaranteed to be in any particular order.
QX_CORE_EXPORT quint32 Qx::processId | ( | QString | processName | ) |
Returns the PID (process ID) of a running process with the name processName, or zero if the process could not be found.
QX_WINDOWS_EXPORT SystemError Qx::processIsElevated | ( | bool & | elevated | ) |
Sets elevated to true if the current process is running with elevated privileges; otherwise, sets it to false.
If the operation fails the returned error object will contain the cause and elevated will be set to false.
QX_WINDOWS_EXPORT SystemError Qx::processIsElevated | ( | bool & | elevated, |
DWORD | processId ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sets elevated to true if the process specified by processId is running with elevated privileges; otherwise, sets it to false.
QX_WINDOWS_EXPORT SystemError Qx::processIsElevated | ( | bool & | elevated, |
HANDLE | processHandle ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Sets elevated to true if the process referenced by processHandle is running with elevated privileges; otherwise, sets it to false.
PROCESS_QUERY_LIMITED_INFORMATION
access permission. QX_WINDOWS_EXPORT bool Qx::processIsRunning | ( | HANDLE | processHandle | ) |
Returns true
if the process referred to by processName is currently running; otherwise returns false
.
PROCESS_QUERY_INFORMATION
or PROCESS_QUERY_LIMITED_INFORMATION
access right. QX_CORE_EXPORT bool Qx::processIsRunning | ( | QString | processName | ) |
Returns true
if the process with the name processName is currently running; otherwise returns false
.
QX_CORE_EXPORT bool Qx::processIsRunning | ( | quint32 | processId | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Returns true
if the process with the PID processID is currently running; otherwise returns false
.
QX_CORE_EXPORT QString Qx::processName | ( | quint32 | processId | ) |
Returns the process name of a running process with the PID processId, or a null string if the process could not be found.
Returns a list of thread IDs, sorted by creation time (oldest to newest), for all threads associated with the process specified by PID processId.
The returned list will be empty in the event of an error.
|
noexcept |
Hashes the download task key with the initial seed.
|
noexcept |
Hashes the download task key with the initial seed.
QX_IO_EXPORT IoOpReport Qx::readBytesFromFile | ( | QByteArray & | returnBuffer, |
QFile & | file, | ||
Index64 | startPos, | ||
Index64 | endPos ) |
Reads the given range of bytes from file.
[out] | returnBuffer | The bytes read from the file. |
[in] | file | The file to read from. |
[in] | startPos | The position to begin reading from. |
[in] | endPos | The position to read until. |
QX_IO_EXPORT IoOpReport Qx::readTextFromFile | ( | QString & | returnBuffer, |
QFile & | textFile, | ||
TextPos | startPos, | ||
int | count, | ||
ReadOptions | readOptions ) |
Reads the given range of text from textFile.
[out] | returnBuffer | The text read from the file. |
[in] | textFile | The file to read from. |
[in] | startPos | The position to begin reading from. |
[in] | count | The number of characters to read. |
[in] | readOptions | Options modifying how the file is parsed. |
QX_IO_EXPORT IoOpReport Qx::readTextFromFile | ( | QString & | returnBuffer, |
QFile & | textFile, | ||
TextPos | startPos, | ||
TextPos | endPos, | ||
ReadOptions | readOptions ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reads the given range of text from textFile.
[out] | returnBuffer | The text read from the file. |
[in] | textFile | The file to read from. |
[in] | startPos | The position to begin reading from. |
[in] | endPos | The position to read until. |
[in] | readOptions | Options modifying how the file is parsed. |
QX_IO_EXPORT IoOpReport Qx::readTextFromFile | ( | QStringList & | returnBuffer, |
QFile & | textFile, | ||
Index32 | startLine, | ||
Index32 | endLine, | ||
ReadOptions | readOptions ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reads the given range of text from textFile.
[out] | returnBuffer | The text read from the file, separated by line. |
[in] | textFile | The file to read from. |
[in] | startLine | The line to begin reading from. |
[in] | endLine | The line to read until. |
[in] | readOptions | Options modifying how the file is parsed. |
QX_CORE_EXPORT bool Qx::removeDefaultProtocolHandler | ( | const QString & | scheme, |
const QString & | path ) |
Removes the application at path as the default handler for UR requests of scheme if it is currently set as such for the current user. This function can only remove the default on a per-user basis, so it can fail if the default is set system-wide on platforms where users cannot override defaults with an unset value.
If path is left empty, it defaults to QCoreApplication::applicationFilePath().
Returns true
if the operation was successful, or the application is not the default; otherwise, returns false
.
T Qx::roundPowOfTwo | ( | T | num | ) |
Returns the power of two that is closest to num.
T Qx::roundToNearestMultiple | ( | T | num, |
T | mult ) |
Returns the multiple of mult that num is closest to.
The sign of the result will always be the same sign as num, regardless of the sign of mult.
JsonError Qx::serializeJson | ( | const QString & | filePath, |
const T & | root ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Serializes the entire JSON root structure root and writes the result to the file at path filePath in indented format, replacing existing contents, if any.
T must satisfy the Qx::json_root concept.
If serialization fails, a valid JsonError is returned that describes the cause; otherwise, an invalid error is returned.
JsonError Qx::serializeJson | ( | QFile & | serialized, |
const T & | root ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Serializes the entire JSON root structure root and writes the result to serialized in indented format, replacing existing contents, if any.
T must satisfy the Qx::json_root concept.
If serialization fails, a valid JsonError is returned that describes the cause; otherwise, an invalid error is returned.
void Qx::serializeJson | ( | QJsonArray & | serialized, |
const T & | container ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Serializes the container container and stores the result in serialized. T must satisfy the QxJson::json_containing concept.
void Qx::serializeJson | ( | QJsonDocument & | serialized, |
const T & | root ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Serializing the entire JSON root structure root and stores the result in serialized. T must satisfy the Qx::json_root concept.
void Qx::serializeJson | ( | QJsonObject & | serialized, |
const T & | struc ) |
Serializes the struct struc and stores the result in serialized. T must satisfy the QxJson::json_struct concept.
QX_CORE_EXPORT bool Qx::setDefaultProtocolHandler | ( | const QString & | scheme, |
const QString & | name, | ||
const QString & | path, | ||
const QStringList & | args ) |
Sets the application at path as the default handler for URI requests of scheme for the current user. The registration is configured so that when a URL that uses the protocol is followed, the program at the given path will be executed with the scheme URL as the last argument. Generally, the user is shown a prompt with the friendly name of the application name when the protocol is used.
scheme cannot contain whitespace. If path is left empty, it defaults to QCoreApplication::applicationFilePath().
Returns true
if the operation was successful; otherwise, returns false
.
Commonly, applications are designed to handle scheme URLs as a singular argument:
as most operating system facilities that allow a user to select a default protocol handler do not for adding additional arguments; however, additional arguments can be provided via args, which are placed before the scheme URL.
QX_CORE_EXPORT void Qx::setUserInputEchoEnabled | ( | bool | enabled | ) |
This function only pertains to console applications.
Enables or disables the echoing of user input (stdin) to the console depending on the value of enabled.
By default echoing is enabled.
Returns the string representation of sv.
If uc is set to true
, the returned string is entirely in uppercase.
QX_IO_EXPORT IoOpReport Qx::textFileAbsolutePosition | ( | TextPos & | textPos, |
QFile & | textFile, | ||
bool | ignoreTrailingEmpty ) |
Converts any relative component of textPos to an absolute one. I.e. determines the actual line and or/character that Index32(Index32::Last) references for the given textFile, if present.
If neither the line or character component of textPos contain the value Index32(Index32::Last), textPos is left unchanged.
[in,out] | textPos | The text position to translate into an absolute position. |
[in] | textFile | The file to evaluate the text position on. |
[in] | ignoreTrailingEmpty | Whether or not to count the last line of the file if it is empty. |
QX_IO_EXPORT IoOpReport Qx::textFileEndsWithNewline | ( | bool & | returnBuffer, |
QFile & | textFile ) |
Tests if textFile has a trailing end-of-line character
[out] | returnBuffer | Set to true if the file's last character(s) are "\\n" or "\\r\\n" ; otherwise set to false . |
[in] | textFile | The file to test. |
QX_IO_EXPORT IoOpReport Qx::textFileLayout | ( | QList< int > & | returnBuffer, |
QFile & | textFile, | ||
bool | ignoreTrailingEmpty ) |
Inspects the structure of textFile in terms of lines and characters.
[out] | returnBuffer | A list containing the character count of all lines in the file, with its size also conveying the line count of the file. |
[in] | textFile | The file to inspect. |
[in] | ignoreTrailingEmpty | Whether or not to include the last line of the file in the list if it is empty. |
QX_IO_EXPORT IoOpReport Qx::textFileLineCount | ( | int & | returnBuffer, |
QFile & | textFile, | ||
bool | ignoreTrailingEmpty ) |
Determines the number of lines in textFile, equivalent to the number of line breaks plus one.
[out] | returnBuffer | The line count of the file. |
[in] | textFile | The file to inspect. |
[in] | ignoreTrailingEmpty | Whether or not to count the last line of the file if it is empty. |
QX_IO_EXPORT IoOpReport Qx::writeBytesToFile | ( | QFile & | file, |
const QByteArray & | bytes, | ||
WriteMode | writeMode, | ||
Index64 | startPos, | ||
WriteOptions | writeOptions ) |
Writes the given bytes to file.
[in] | file | The file to write to. |
[in] | bytes | The bytes to be written. |
[in] | writeMode | The mode to use for writing. |
[in] | startPos | The position from which to begin writing. This argument is ignored if writeMode is WriteMode::Append. |
[in] | writeOptions | Options modifying how the file is written. |
QX_IO_EXPORT IoOpReport Qx::writeBytesToFile | ( | QSaveFile & | file, |
const QByteArray & | bytes, | ||
WriteMode | writeMode, | ||
Index64 | startPos, | ||
WriteOptions | writeOptions ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
QX_IO_EXPORT IoOpReport Qx::writeStringToFile | ( | QFile & | textFile, |
const QString & | text, | ||
WriteMode | writeMode, | ||
TextPos | startPos, | ||
WriteOptions | writeOptions ) |
Writes the given text to textFile.
[in] | textFile | The file to write to. |
[in] | text | The text to be written. |
[in] | writeMode | The mode to use for writing. |
[in] | startPos | The position from which to begin writing. This argument is ignored if writeMode is WriteMode::Append. |
[in] | writeOptions | Options modifying how the file is written. |
QX_IO_EXPORT IoOpReport Qx::writeStringToFile | ( | QSaveFile & | textFile, |
const QString & | text, | ||
WriteMode | writeMode, | ||
TextPos | startPos, | ||
WriteOptions | writeOptions ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
QX_CORE_EXPORT QSettings::Format Qx::xdgDesktopSettingsFormat | ( | ) |
Same as xdgSettingsFormat() but the returned format is better suited for manipulating XDG Desktop Entries specifically. It ensures that the "Desktop Entry" section is always written first and ensures that a given file contains such an entry since it's required.
QX_CORE_EXPORT QSettings::Format Qx::xdgSettingsFormat | ( | ) |
Returns a QSettings::Format type that can be used to construct a QSettings object capable of handling several XDG file formats.
This format is utilized similarly to QSettings::Format::Ini, noteably in that the first section of a key before a separator '/'
corresponds to the group within the XDG file and the rest of the key is the actual key within the file. It also allows for group names with spaces and avoids other behavior imposed by the built-in INI format that breaks XDG file formats.
This format handler is fairly primitive, only being slightly more competant that straight bodge and should be used with caution. Basic checking of key/group name validity is performed and file output is largely conformant by default; however, any escaping and unescaping of parameters must be handled manually, multi-element values are not automatically seperated into a list, comment and blank lines in the original file are not preserved, nor is key order. Generally any value that cannot be converted to another type 'as is' (e.g. true
and false
clearly are booleans) are parsed as plain strings.
Eventually a dedicated and fully conformant parser will be added.
Returns a copy of string with all non-legal XML characters removed
|
inline |
QTextStream equivalent of std::cerr.
|
inline |
QTextStream equivalent of std::cin.
|
inline |
QTextStream equivalent of std::cout.
QChar Qx::ENDL = '\n' |
An alias for the line break character, '\n'
.
QString Qx::LIST_ITEM_PREFIX = u"- "_s |
Equivalent to "- "
Perhaps you want to use this as a marker for a list item, perhaps you don't.