summaryrefslogtreecommitdiff
path: root/src/frontend/cinfodisplay.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/cinfodisplay.h')
-rw-r--r--src/frontend/cinfodisplay.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/frontend/cinfodisplay.h b/src/frontend/cinfodisplay.h
new file mode 100644
index 0000000..040667f
--- /dev/null
+++ b/src/frontend/cinfodisplay.h
@@ -0,0 +1,71 @@
+/*********
+*
+* 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 CINFODISPLAY_H
+#define CINFODISPLAY_H
+
+//Backend
+#include "backend/rendering/ctextrendering.h"
+
+//Qt includes
+#include <QWidget>
+#include <QPair>
+#include <QList>
+
+//class forward declarations
+class CReadDisplay;
+class QAction;
+class QSize;
+
+namespace InfoDisplay {
+
+class CInfoDisplay : public QWidget {
+ Q_OBJECT
+public:
+ enum InfoType {
+ Abbreviation,
+ CrossReference,
+ Footnote,
+ Lemma,
+ Morph,
+ WordTranslation,
+ WordGloss,
+ Text
+ };
+
+ typedef QPair<InfoType, QString> InfoData;
+ typedef QList<InfoData> ListInfoData;
+
+ CInfoDisplay(QWidget *parent = 0);
+ virtual ~CInfoDisplay();
+
+ void setInfo(const InfoType, const QString& data);
+ void setInfo(const ListInfoData&);
+ void clearInfo();
+ QSize sizeHint() const;
+
+protected:
+ const QString decodeAbbreviation( const QString& data );
+ const QString decodeCrossReference( const QString& data );
+ const QString decodeFootnote( const QString& data );
+ const QString decodeStrongs( const QString& data );
+ const QString decodeMorph( const QString& data );
+ const QString getWordTranslation( const QString& data );
+
+protected slots:
+ void lookupInfo(const QString &, const QString &);
+
+private:
+ CReadDisplay* m_htmlPart;
+ QAction* m_copyAction;
+};
+
+} //end of InfoDisplay namespace
+
+#endif