22 #include "qcalendarwidget.h" 28 , mDateTimeEdit( nullptr )
45 if ( ! mDateTimeEdit )
48 const bool fieldIsoFormat =
config(
"field_iso_format",
false ).toBool();
78 return fieldName +
" IS NULL";
80 return fieldName +
" IS NOT NULL";
87 return fieldName +
"='" + v.
toString() +
'\'';
89 return fieldName +
"<>'" + v.
toString() +
'\'';
91 return fieldName +
">'" + v.
toString() +
'\'';
93 return fieldName +
"<'" + v.
toString() +
'\'';
95 return fieldName +
">='" + v.
toString() +
'\'';
97 return fieldName +
"<='" + v.
toString() +
'\'';
134 void QgsDateTimeSearchWidgetWrapper::dateTimeChanged(
const QDateTime& dt )
166 const bool calendar =
config(
"calendar_popup",
false ).toBool();
QString toString(Qt::DateFormat format) const
static QString quotedColumnRef(QString name)
Returns a quoted column reference (in double quotes)
#define QGSDATETIMEEDIT_DATEFORMAT
const QgsField & at(int i) const
Get field at particular index (must be in range 0..N-1)
QgsFields fields() const
Returns the list of fields of this layer.
const char * name() const
void setBackground(const QBrush &brush)
void setDateTextFormat(const QDate &date, const QTextCharFormat &format)
QString & replace(int position, int n, QChar after)
void setEmpty()
Resets the widget to show no value (ie, an "unknown" state).
void setAllowNull(bool allowNull)
determines if the widget allows setting null date/time.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Represents a vector layer which manages a vector based data sets.
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QDateTime dateTime() const
dateTime returns the date time which can eventually be a null date/time
The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/reading null date/times...