diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:19 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:19 -0400 |
commit | 1af3b165c9377702ca62a64112bc089a6f575c30 (patch) | |
tree | 4df9cca5543b2cab5ca56dbb1214d7d3b1f291e3 /src/frontend/display/creaddisplay.h | |
parent | 5b5fd0dce407556f98ed8edee89dc830bf1437b1 (diff) |
Imported Upstream version 2.0~beta2
Diffstat (limited to 'src/frontend/display/creaddisplay.h')
-rw-r--r-- | src/frontend/display/creaddisplay.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/frontend/display/creaddisplay.h b/src/frontend/display/creaddisplay.h new file mode 100644 index 0000000..f4a00c4 --- /dev/null +++ b/src/frontend/display/creaddisplay.h @@ -0,0 +1,73 @@ +/********* +* +* This file is part of BibleTime's source code, http://www.bibletime.info/. +* +* Copyright 1999-2008 by the BibleTime developers. +* The BibleTime source code is licensed under the GNU General Public License version 2.0. +* +**********/ + + + +#ifndef CREADDISPLAY_H +#define CREADDISPLAY_H + +#include "cdisplay.h" +#include "backend/managers/cswordbackend.h" + +#include <QString> + +/**The base class for all read-only widgets like KHTMLView. + *@author The BibleTime team + */ + +class CReadDisplay : public CDisplay { +public: + /** + * Returns true if the display has an active anchor. + */ + bool hasActiveAnchor(); + /** + * Returns the current active anchor. + */ + const QString& activeAnchor(); + /** + * Moves the widget to the given anchor. + */ + virtual void moveToAnchor( const QString& ) = 0; + virtual void print(const CDisplay::TextPart, CSwordBackend::DisplayOptions displayOptions, CSwordBackend::FilterOptions filterOptions); + + void setMouseTracking(const bool trackingEnabled) { + m_useMouseTracking = trackingEnabled; + }; + bool getMouseTracking() const { + return m_useMouseTracking; + }; + +protected: // Protected methods + friend class BtHtmlReadDisplay; + friend class BtHtmlReadDisplayView; + friend class BtHtmlJsObject; + friend class CDisplay; + friend class CHTMLReadDisplay; + friend class CHTMLReadDisplayView; + + CReadDisplay( CReadWindow* readWindow ); + ~CReadDisplay(); + + /** + * Sets the current anchor to the parameter. + */ + void setActiveAnchor( const QString& ); + +private: // Public attributes + /** + * The member which hols the current anchor. + */ + + QString m_activeAnchor; + + bool m_useMouseTracking; +}; + +#endif |