| Line | |
|---|
| 1 |
|
|---|
| 2 | /* -------------------------------------------------------------------------
|
|---|
| 3 | * BKG NTRIP Server
|
|---|
| 4 | * -------------------------------------------------------------------------
|
|---|
| 5 | *
|
|---|
| 6 | * Class: bnsHtml
|
|---|
| 7 | *
|
|---|
| 8 | * Purpose: HTML Browser
|
|---|
| 9 | *
|
|---|
| 10 | * Author: L. Mervart
|
|---|
| 11 | *
|
|---|
| 12 | * Created: 30-Mar-2008
|
|---|
| 13 | *
|
|---|
| 14 | * Changes:
|
|---|
| 15 | *
|
|---|
| 16 | * -----------------------------------------------------------------------*/
|
|---|
| 17 |
|
|---|
| 18 | #include "bnshtml.h"
|
|---|
| 19 |
|
|---|
| 20 | using namespace std;
|
|---|
| 21 |
|
|---|
| 22 | // Constructor
|
|---|
| 23 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 24 | bnsHtml::bnsHtml() : QTextBrowser() {
|
|---|
| 25 |
|
|---|
| 26 | connect(this,SIGNAL(anchorClicked(const QUrl&)),
|
|---|
| 27 | this,SLOT(slotAnchorClicked(const QUrl&)));
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | // Destructor
|
|---|
| 31 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 32 | bnsHtml::~bnsHtml() {
|
|---|
| 33 |
|
|---|
| 34 | }
|
|---|
| 35 |
|
|---|
| 36 | //
|
|---|
| 37 | ////////////////////////////////////////////////////////////////////////////
|
|---|
| 38 | void bnsHtml::slotAnchorClicked(const QUrl& url) {
|
|---|
| 39 |
|
|---|
| 40 |
|
|---|
| 41 | QString href = url.toString();
|
|---|
| 42 | if (href.indexOf(':') != 0) {
|
|---|
| 43 | QUrl urlNew; urlNew.setPath(":bnshelp.html" + href);
|
|---|
| 44 | setSource(url);
|
|---|
| 45 | }
|
|---|
| 46 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.