mirror of
https://github.com/QuasarApp/ViewSolutions.git
synced 2025-04-26 01:34:39 +00:00
fix readme
This commit is contained in:
parent
347ec84af1
commit
be361dcf94
83
README.md
83
README.md
@ -1,50 +1,61 @@
|
|||||||
# ViewSolutions
|
# ViewSolutions
|
||||||
|
|
||||||
View solutions of qml for quasarapp projects
|
View solutions of qml for quasarapp projects
|
||||||
|
|
||||||
|
## QML classes:
|
||||||
|
|
||||||
QML classes:
|
|
||||||
#### ImageView
|
#### ImageView
|
||||||
|
|
||||||
This is animate image viewer
|
This is animate image viewer
|
||||||
|
|
||||||
##### Example:
|
##### Example:
|
||||||
``` qml
|
```qml
|
||||||
ImageView {
|
import ViewSolutionsModule 1.0
|
||||||
anchors.fill: parent
|
|
||||||
soucre: "qrc:/img/images/example.png"
|
ImageView {
|
||||||
text: "exampele"
|
|
||||||
anchors.margins: 100
|
anchors.fill: parent
|
||||||
borderColor: "red"
|
soucre: "qrc:/img/images/example.png"
|
||||||
}
|
text: "exampele"
|
||||||
|
anchors.margins: 100
|
||||||
|
borderColor: "red"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### ViewPortPage
|
#### ViewPortPage
|
||||||
|
|
||||||
This is animate Delegate viewer for ListView
|
This is animate Delegate viewer for ListView
|
||||||
|
|
||||||
##### Example:
|
##### Example:
|
||||||
``` qml
|
|
||||||
ListView {
|
```qml
|
||||||
id: viewPort
|
import ViewSolutionsModule 1.0
|
||||||
property real globalPos: 0
|
|
||||||
anchors.fill: parent
|
ListView {
|
||||||
delegate: Component {
|
id: viewPort
|
||||||
ViewPortPage {
|
property real globalPos: 0
|
||||||
viewPortDelegatH: 500 // base size of content item
|
anchors.fill: parent
|
||||||
scrollPos: viewPort.globalPos // due to qml limitations, this field will have to be tied to updating the location of the scroll
|
delegate: Component {
|
||||||
source: modelData
|
ViewPortPage {
|
||||||
viewground: root // this is plane to display the main background
|
viewPortDelegatH: 500 // base size of content item
|
||||||
title: "Test ViewPortPage"
|
scrollPos: viewPort.globalPos // due to qml limitations, this field will have to be tied to updating the location of the scroll
|
||||||
text: "Test ViewPortPage. General text and <i>html code</i>"
|
source: modelData
|
||||||
}
|
viewground: root // this is plane to display the main background
|
||||||
|
title: "Test ViewPortPage"
|
||||||
|
text: "Test ViewPortPage. General text and <i>html code</i>"
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollBar.vertical: ScrollBar {
|
|
||||||
onPositionChanged: {
|
|
||||||
viewPort.globalPos = position
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
model: [
|
|
||||||
"qrc:/img/res/LOGO.png",
|
|
||||||
"qrc:/img/res/LOGO-GREAN.png",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
```
|
|
||||||
|
ScrollBar.vertical: ScrollBar {
|
||||||
|
onPositionChanged: {
|
||||||
|
viewPort.globalPos = position
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
model: [
|
||||||
|
"qrc:/img/res/LOGO.png",
|
||||||
|
"qrc:/img/res/LOGO-GREAN.png",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
@ -9,7 +9,7 @@ namespace ViewSolutions {
|
|||||||
/**
|
/**
|
||||||
* @brief The ColorPicker class - This class provide methods of get generals colors from images.
|
* @brief The ColorPicker class - This class provide methods of get generals colors from images.
|
||||||
*/
|
*/
|
||||||
class LOGINVIEW_EXPORT ColorPicker
|
class VIEWSOLUTION_EXPORT ColorPicker
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ColorPicker();
|
explicit ColorPicker();
|
||||||
|
@ -77,7 +77,7 @@ void ListViewModel::addSource(QObject* data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ListViewModel::clear(bool fast) {
|
void ListViewModel::clear(bool fast) {
|
||||||
for (auto i : _data) {
|
for (auto i : qAsConst(_data)) {
|
||||||
if (fast) {
|
if (fast) {
|
||||||
i->deleteLater();
|
i->deleteLater();
|
||||||
} else {
|
} else {
|
||||||
|
@ -9,7 +9,7 @@ enum class ListViewModelRoles {
|
|||||||
ModelData = Qt::UserRole
|
ModelData = Qt::UserRole
|
||||||
};
|
};
|
||||||
|
|
||||||
class LOGINVIEW_EXPORT ListViewModel: public QAbstractListModel
|
class VIEWSOLUTION_EXPORT ListViewModel: public QAbstractListModel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -10,7 +10,7 @@ namespace ViewSolutions {
|
|||||||
/**
|
/**
|
||||||
* @brief The QMLColorPicker class - Qml wrapper for ColorPicker class.
|
* @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
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -18,7 +18,7 @@ namespace ViewSolutions {
|
|||||||
/**
|
/**
|
||||||
* @brief init this method import all qml resources to your project.
|
* @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
|
#endif // VIEWSOLUTIONS_H
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
|
||||||
#if defined(VIEW_SOLUTIONS_LIBRARY)
|
#if defined(VIEW_SOLUTIONS_LIBRARY)
|
||||||
# define LOGINVIEW_EXPORT Q_DECL_EXPORT
|
# define VIEWSOLUTION_EXPORT Q_DECL_EXPORT
|
||||||
#else
|
#else
|
||||||
# define LOGINVIEW_EXPORT Q_DECL_IMPORT
|
# define VIEWSOLUTION_EXPORT Q_DECL_IMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user