2018-09-02 10:30:30 +00:00
|
|
|
|
#ifndef CUSTOMDATAROLE_H
|
|
|
|
|
|
#define CUSTOMDATAROLE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <Qt>
|
|
|
|
|
|
|
2018-12-15 11:24:58 +01:00
|
|
|
|
/// Returned by a model when asked for CustomReferencedTypeRole
|
|
|
|
|
|
///
|
|
|
|
|
|
/// Models will probably only be asked this for columns for which they returned
|
|
|
|
|
|
/// Oid_Oid for the CustomDataTypeRole
|
|
|
|
|
|
enum class ReferencedType {
|
|
|
|
|
|
PgType,
|
|
|
|
|
|
PgNamespace,
|
|
|
|
|
|
PgRole
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2021-03-10 19:06:40 +01:00
|
|
|
|
///
|
2024-04-12 06:29:57 +02:00
|
|
|
|
enum class DataMeaning {
|
|
|
|
|
|
Normal,
|
|
|
|
|
|
Bytes ///< the value represents bytes pretty print in KiB, MiB, GiB, TiB, PiB, EiB
|
2021-03-10 19:06:40 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
2018-09-02 10:30:30 +00:00
|
|
|
|
enum CustomDataRole {
|
2018-12-15 11:24:58 +01:00
|
|
|
|
CustomDataTypeRole = Qt::UserRole, ///< Requist the basic type of the value
|
|
|
|
|
|
CustomReferencedTypeRole, ///<
|
2021-03-10 19:06:40 +01:00
|
|
|
|
CustomDataMeaningRole,
|
2022-04-02 08:33:48 +02:00
|
|
|
|
CustomSortRole, // return data in a form that will sort correctly
|
2021-03-10 19:06:40 +01:00
|
|
|
|
// Add other enum before this one as we might want to have multiple hidden values
|
2018-12-15 11:24:58 +01:00
|
|
|
|
FirstHiddenValue, ///< Used to request value from a model which is not handed to the view
|
2018-09-02 10:30:30 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CUSTOMDATAROLE_H
|