You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,9 +41,9 @@ When you need to calculate value, call one of the `asyncValueRunXXX` functions:
41
41
}, "Loading...", ASYNC_CAN_REQUEST_STOP::YES);
42
42
```
43
43
The available functions are:
44
-
*`asyncValueRunThread` - creates QThread, does calculations and deletes QThread (don't use this function)
45
-
*`asyncValueRunThreadPool` - does calculation in a Qt thread pool
46
-
*`asyncValueRunNetwork` - waits QNetworkReply and does calculation from it.
44
+
*[asyncValueRunThread](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/values/AsyncValueRunThread.h#L23) - creates QThread, does calculations and deletes QThread (don't use this function)
45
+
*[asyncValueRunThreadPool](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/values/AsyncValueRunThreadPool.h#L24) - does calculation in a Qt thread pool
46
+
*[asyncValueRunNetwork](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/values/AsyncValueRunNetwork.h#L24) - waits QNetworkReply and does calculation from it.
Instead of callbacks you can derive widget class from `AsyncWidgetBase` or `AsyncWidget` classes and override 4 functions:
64
+
Instead of callbacks you can derive widget class from [AsyncWidgetBase](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/widgets/AsyncWidgetBase.h#L24) or [AsyncWidget](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/widgets/AsyncWidget.h#L27) classes and override 4 functions:
65
65
66
66
```C++
67
67
// creates widget to show value
@@ -78,7 +78,7 @@ Instead of callbacks you can derive widget class from `AsyncWidgetBase` or `Asyn
78
78
```
79
79
80
80
# AsyncValue API
81
-
Most of the `AsyncValue` functions can be found in `AsyncValueTemplate<...>` base class.
81
+
Most of the `AsyncValue` functions can be found in [AsyncValueTemplate<...>](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/values/AsyncValueTemplate.h#L35) base class.
82
82
83
83
User can initialize `AsyncValue` using value or error, `AsyncInitByValue` and `AsyncInitByError` tag classes are used to distinguish these two cases:
84
84
```C++
@@ -170,7 +170,7 @@ Also user has an ability to wait async value for result:
170
170
# Runnable values
171
171
Usually it's more convinient to hide details how value is calculated.
172
172
173
-
`AsyncValueRunableAbstract` and `AsyncValueRunableFn` classes are used in this case.
173
+
[AsyncValueRunableAbstract](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/values/AsyncValueRunable.h#L26) and [AsyncValueRunableFn](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/values/AsyncValueRunable.h#L71) classes are used in this case.
174
174
```C++
175
175
using AsyncQPixmap = AsyncValueRunableFn<QPixmap>;
@@ -264,7 +264,7 @@ class AsyncValueTemplate : public AsyncValueBase
264
264
```
265
265
So users can override all type parameters to better adopt async values to different environments.
266
266
267
-
By default `ErrorType_t` parameter is a `AsyncError` class:
267
+
By default `ErrorType_t` parameter is an [AsyncError](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/values/AsyncError.h#L22) class:
268
268
```C++
269
269
classAsyncError
270
270
{
@@ -279,7 +279,7 @@ private:
279
279
QString m_text;
280
280
};
281
281
```
282
-
The `ProgressType_t` parameter represented by `AsyncProgress` with the following functions:
282
+
The `ProgressType_t` parameter represented by [AsyncProgress](https://github.com/lexxmark/qt-async/blob/0e6baeae83155d37ef7448304c9e170346be3f74/qt-async-lib/values/AsyncProgress.h#L29) with the following functions:
0 commit comments