ViewSolutions 1.0.100.30ae2aa
View solutions of qml for quasarapp projects
Loading...
Searching...
No Matches
ViewSolutions Namespace Reference

The ViewSolutions namespace. More...

Classes

class  __PrvateBaseListModel
 The __PrvateBaseListModel class is the private QObject base class of the BaseListModel template. More...
class  AvatarGenerator
 The AvatarGenerator class contains function for create default users avatars. More...
class  BaseHashModel
 The BaseHashModel class is the base class of all GUI hash models. More...
class  BaseListModel
 The BaseListModel class is the base class of all GUI list models. More...
class  ColorPicker
 The ColorPicker class - This class provide methods of get generals colors from images. More...
class  HistoryNotificationsModel
 The HistoryNotificationsModel class stores the history of all sent notification messages. More...
class  iGUITokensModel
 The iGUITokensModel class is general global instanse of all QML constans used in the App. More...
class  iModel
 The iModel class is base model for GUI models. Works with ModelStorage. All models after adding can get access to any othe models that located on same storage object. More...
class  ListViewModel
 The ListViewModel class provides a QML list model with QObject data. More...
class  ModelStorage
 The ModelStorage class is the main model storage object. More...
class  NotificationData
 The NotificationData class view data for NotificationServiceView. This class contains a structure with notification data. More...
class  NotificationService
 The NotificationService class. This class used for working with notify. More...
class  QMLColorPicker
 The QMLColorPicker class - Qml wrapper for ColorPicker class. More...
class  VariantListModel
 The VariantListModel class is universal implementation for all atomic types. More...

Typedefs

using Listner = std::function<void(bool accept)>
 Listner This is listner lyambda function of user ansver. This function has next signature: void(bool accept).

Enumerations

enum class  ListViewModelRoles { ModelData = Qt::UserRole }
 The ListViewModelRoles enum defines the data roles of the ListViewModel. More...

Functions

QSharedPointer< ModelStorage > init (QQmlEngine *engine)
 init this method import all qml resources to your project and creates the central model storage of the application.

Detailed Description

The ViewSolutions namespace.

This namespace groups all C++ classes of the ViewSolutions module: the model system (ModelStorage, iModel, BaseListModel, BaseHashModel), the notification system (NotificationService, NotificationData, HistoryNotificationsModel) and helper classes such as ColorPicker, QMLColorPicker and AvatarGenerator.

Example:

#include <viewsolutions.h>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
// Imports all QML resources and creates the central model storage.
auto models = ViewSolutions::init(&engine);
if (!models)
return -1;
engine.load(QUrl("qrc:/main.qml"));
return app.exec();
}
QSharedPointer< ModelStorage > init(QQmlEngine *engine)
init this method import all qml resources to your project and creates the central model storage of th...

After calling init the model storage is available in QML through the modelsStorage context property:

import ViewSolutions
Item {
property var picker: modelsStorage.getModel("ColorPicker")
}

Typedef Documentation

◆ Listner

using ViewSolutions::Listner = std::function<void(bool accept)>

Listner This is listner lyambda function of user ansver. This function has next signature: void(bool accept).

Definition at line 24 of file notificationservice.h.

Enumeration Type Documentation

◆ ListViewModelRoles

The ListViewModelRoles enum defines the data roles of the ListViewModel.

Enumerator
ModelData 

The Qt::UserRole role. Returns the QObject data of the list item.

Definition at line 19 of file listviewmodel.h.

Function Documentation

◆ init()

QSharedPointer< ModelStorage > VIEWSOLUTION_EXPORT ViewSolutions::init ( QQmlEngine * engine)
nodiscard

init this method import all qml resources to your project and creates the central model storage of the application.

The returned ModelStorage object is exposed to QML as the modelsStorage context property.

Parameters
engineis QQmlApplicationEngine object.
Returns
gui model storage object. nullptr is returned if the engine or its root context is invalid.

Example:

QSharedPointer<ViewSolutions::ModelStorage> models = ViewSolutions::init(&engine);
// Access a model from C++ (the color picker is registered by init):
auto picker = models->get<ViewSolutions::QMLColorPicker>("ColorPicker");
The QMLColorPicker class - Qml wrapper for ColorPicker class.

Definition at line 18 of file viewsolutions.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: