Skip to content

Commit 730b87c

Browse files
authored
Update README.md
1 parent 0e6baea commit 730b87c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ When you need to calculate value, call one of the `asyncValueRunXXX` functions:
4141
}, "Loading...", ASYNC_CAN_REQUEST_STOP::YES);
4242
```
4343
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.
4747
See tests for examples.
4848

4949
Somewhere in GUI code declare async widget:
@@ -61,7 +61,7 @@ Somewhere in GUI code declare async widget:
6161
valueWidget->setValue(&value);
6262
```
6363
64-
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:
6565
6666
```C++
6767
// creates widget to show value
@@ -78,7 +78,7 @@ Instead of callbacks you can derive widget class from `AsyncWidgetBase` or `Asyn
7878
```
7979

8080
# 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.
8282

8383
User can initialize `AsyncValue` using value or error, `AsyncInitByValue` and `AsyncInitByError` tag classes are used to distinguish these two cases:
8484
```C++
@@ -170,7 +170,7 @@ Also user has an ability to wait async value for result:
170170
# Runnable values
171171
Usually it's more convinient to hide details how value is calculated.
172172
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.
174174
```C++
175175
using AsyncQPixmap = AsyncValueRunableFn<QPixmap>;
176176
AsyncQPixmap value(AsyncInitByError{}, "Select image file path.");
@@ -264,7 +264,7 @@ class AsyncValueTemplate : public AsyncValueBase
264264
```
265265
So users can override all type parameters to better adopt async values to different environments.
266266

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:
268268
```C++
269269
class AsyncError
270270
{
@@ -279,7 +279,7 @@ private:
279279
QString m_text;
280280
};
281281
```
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:
283283
```C++
284284
// the text describing the current progress
285285
QString message() const;

0 commit comments

Comments
 (0)