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
|
||||
|
||||
View solutions of qml for quasarapp projects
|
||||
|
||||
## QML classes:
|
||||
|
||||
QML classes:
|
||||
#### ImageView
|
||||
|
||||
This is animate image viewer
|
||||
|
||||
##### Example:
|
||||
``` qml
|
||||
ImageView {
|
||||
anchors.fill: parent
|
||||
soucre: "qrc:/img/images/example.png"
|
||||
text: "exampele"
|
||||
anchors.margins: 100
|
||||
borderColor: "red"
|
||||
}
|
||||
```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 {
|
||||
id: viewPort
|
||||
property real globalPos: 0
|
||||
anchors.fill: parent
|
||||
delegate: Component {
|
||||
ViewPortPage {
|
||||
viewPortDelegatH: 500 // base size of content item
|
||||
scrollPos: viewPort.globalPos // due to qml limitations, this field will have to be tied to updating the location of the scroll
|
||||
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>"
|
||||
}
|
||||
|
||||
```qml
|
||||
import ViewSolutionsModule 1.0
|
||||
|
||||
ListView {
|
||||
id: viewPort
|
||||
property real globalPos: 0
|
||||
anchors.fill: parent
|
||||
delegate: Component {
|
||||
ViewPortPage {
|
||||
viewPortDelegatH: 500 // base size of content item
|
||||
scrollPos: viewPort.globalPos // due to qml limitations, this field will have to be tied to updating the location of the scroll
|
||||
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.
|
||||
*/
|
||||
class LOGINVIEW_EXPORT ColorPicker
|
||||
class VIEWSOLUTION_EXPORT ColorPicker
|
||||
{
|
||||
public:
|
||||
explicit ColorPicker();
|
||||
|
@ -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 {
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user