1 #ifndef QTMVVM_QQMLQUICKPRESENTER_H 2 #define QTMVVM_QQMLQUICKPRESENTER_H 6 #include <QtCore/QObject> 7 #include <QtCore/QCache> 8 #include <QtCore/QVariant> 9 #include <QtCore/QPointer> 10 #include <QtCore/QUrl> 11 #include <QtCore/QQueue> 12 #include <QtCore/QSharedPointer> 14 #include <QtGui/QColor> 16 #include <QtQml/QQmlComponent> 18 #include <QtMvvmCore/ViewModel> 19 #include <QtMvvmCore/Messages> 21 #include <QtMvvmQuick/InputViewFactory> 40 class QQmlQuickPresenter :
public QObject 55 Q_PROPERTY(
QString currentStyle READ currentStyle CONSTANT)
115 explicit QQmlQuickPresenter(
QQmlEngine *engine);
120 InputViewFactory* inputViewFactory() const;
122 bool isViewLoading() const;
124 qreal loadingProgress() const;
176 void statusChanged(QQmlComponent::Status status);
179 using PresentTuple = std::tuple<QSharedPointer<QQmlComponent>, ViewModel*, QVariantHash,
QPointer<ViewModel>>;
187 void processShowQueue();
193 #endif // QTMVVM_QQMLQUICKPRESENTER_H
void qmlPresenterChanged(QObject *qmlPresenter)
NOTIFY accessor for QuickPresenter::qmlPresenter.
static void toggleDrawer()
Toggles the state of the current drawer, if any is beeing used.
static void popView()
Pops the current top level view.
QObject qmlPresenter
The primary presenter QML object.
A configuration for a simple dialog to be shown from the core code.
bool viewLoading
Specifies whether the presenter is currently loading a new view component.
QTMVVM_REVISION_1 static Q_INVOKABLE QColor accentTextColor(const QColor &accentColor, const QColor &baseColor) const
Calculates the optimal text color based on the background color.
void inputViewFactoryChanged(InputViewFactory *inputViewFactory)
NOTIFY accessor for QuickPresenter::inputViewFactory.
static Q_INVOKABLE QStringList mimeTypeFilters(const QStringList &mimeTypes) const
Converts a list of mimetypes into a list of extension filters, for a file dialog. ...
static void hapticLongPress()
Performs haptic feedback of a long press (Android only)
void viewLoadingChanged(bool viewLoading)
NOTIFY accessor for QuickPresenter::viewLoading.
void loadingProgressChanged(qreal loadingProgress)
NOTIFY accessor for QuickPresenter::loadingProgress.
The QML import for the QtMvvmQuick QML module.
The base class for all viewmodels.
A result watcher to get the result once a dialog has finished.
The primary namespace of the QtMvvm library.
A QML singleton to access common presenter methods globally.