QtMvvm  1.1.0
A mvvm oriented library for Qt, to create Projects for Widgets and Quick in parallel
qqmlcoreapp.h
1 #ifndef QTMVVM_QQMLCOREAPP_H
2 #define QTMVVM_QQMLCOREAPP_H
3 
4 #include <QtCore/QObject>
5 
6 #include <QtMvvmCore/CoreApp>
7 
8 #ifdef DOXYGEN_RUN
10 
18 class CoreApp
19 #else
20 namespace QtMvvm {
21 
22 class QQmlCoreApp : public QObject
23 #endif
24 {
25  Q_OBJECT
26 
27 public:
29  explicit QQmlCoreApp(QObject *parent = nullptr);
30 
32  Q_INVOKABLE QtMvvm::MessageResult *showDialog(const QtMvvm::MessageConfig &config);
34  Q_INVOKABLE QVariant safeCastInputType(const QString &type, const QVariant &value);
35 
36 public Q_SLOTS:
38  void show(const QString &viewModelName, const QVariantHash &params = {}, QtMvvm::ViewModel *parentViewModel = nullptr);
39 
40 Q_SIGNALS:
42  void appStarted();
43 };
44 
45 }
46 
47 #endif // QTMVVM_QQMLCOREAPP_H
void show(const QString &viewModelName, const QVariantHash &params={}, QtMvvm::ViewModel *parentViewModel=nullptr)
Show a new ViewModel by its name.
The QML import for the QtMvvmCore QML module.
Definition: qqmlcoreapp.h:9
Q_INVOKABLE QVariant safeCastInputType(const QString &type, const QVariant &value)
Safely casts a value of the given edit type to the corresponding variant type.
A configuration for a simple dialog to be shown from the core code.
Definition: message.h:20
void appStarted()
Is emitted once the app has successfully started.
The base class for all viewmodels.
Definition: viewmodel.h:21
Q_INVOKABLE QtMvvm::MessageResult * showDialog(const QtMvvm::MessageConfig &config)
Show a basic dialog.
A result watcher to get the result once a dialog has finished.
Definition: message.h:204
The primary namespace of the QtMvvm library.
A QML singleton to access some QtMvvm::CoreApp functionality.
Definition: qqmlcoreapp.h:18