fix readme

This commit is contained in:
Andrei Yankovich 2021-06-08 17:15:38 +03:00
parent 347ec84af1
commit be361dcf94
7 changed files with 54 additions and 43 deletions

View File

@ -1,26 +1,37 @@
# ViewSolutions
View solutions of qml for quasarapp projects
## QML classes:
QML classes:
#### ImageView
This is animate image viewer
##### Example:
``` qml
ImageView {
```qml
import ViewSolutionsModule 1.0
ImageView {
anchors.fill: parent
soucre: "qrc:/img/images/example.png"
text: "exampele"
anchors.margins: 100
borderColor: "red"
}
}
```
#### ViewPortPage
This is animate Delegate viewer for ListView
##### Example:
``` qml
ListView {
```qml
import ViewSolutionsModule 1.0
ListView {
id: viewPort
property real globalPos: 0
anchors.fill: parent
@ -46,5 +57,5 @@ This is animate Delegate viewer for ListView
"qrc:/img/res/LOGO.png",
"qrc:/img/res/LOGO-GREAN.png",
]
}
}
```

View File

@ -9,7 +9,7 @@ namespace ViewSolutions {
/**
* @brief The ColorPicker class - This class provide methods of get generals colors from images.
*/
class LOGINVIEW_EXPORT ColorPicker
class VIEWSOLUTION_EXPORT ColorPicker
{
public:
explicit ColorPicker();

View File

@ -77,7 +77,7 @@ void ListViewModel::addSource(QObject* data) {
}
void ListViewModel::clear(bool fast) {
for (auto i : _data) {
for (auto i : qAsConst(_data)) {
if (fast) {
i->deleteLater();
} else {

View File

@ -9,7 +9,7 @@ enum class ListViewModelRoles {
ModelData = Qt::UserRole
};
class LOGINVIEW_EXPORT ListViewModel: public QAbstractListModel
class VIEWSOLUTION_EXPORT ListViewModel: public QAbstractListModel
{
Q_OBJECT
public:

View File

@ -10,7 +10,7 @@ namespace ViewSolutions {
/**
* @brief The QMLColorPicker class - Qml wrapper for ColorPicker class.
*/
class LOGINVIEW_EXPORT QMLColorPicker : public QObject, private ColorPicker
class VIEWSOLUTION_EXPORT QMLColorPicker : public QObject, private ColorPicker
{
Q_OBJECT
public:

View File

@ -18,7 +18,7 @@ namespace ViewSolutions {
/**
* @brief init this method import all qml resources to your project.
*/
bool LOGINVIEW_EXPORT init(QQmlApplicationEngine *engine);
bool VIEWSOLUTION_EXPORT init(QQmlApplicationEngine *engine);
}
#endif // VIEWSOLUTIONS_H

View File

@ -11,9 +11,9 @@
#include <QtCore/qglobal.h>
#if defined(VIEW_SOLUTIONS_LIBRARY)
# define LOGINVIEW_EXPORT Q_DECL_EXPORT
# define VIEWSOLUTION_EXPORT Q_DECL_EXPORT
#else
# define LOGINVIEW_EXPORT Q_DECL_IMPORT
# define VIEWSOLUTION_EXPORT Q_DECL_IMPORT
#endif