]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/qt_helpers.h
Generalize starred cite commands
[lyx.git] / src / frontends / qt4 / qt_helpers.h
index 9f239a8131ff594e9a59b92f5c88cddfc9a0347e..9569d90f82e5ae3930567489eff5414c70e4f5b1 100644 (file)
@@ -213,6 +213,29 @@ QString guiName(std::string const & type, BufferParams const & bp);
 QString formatToolTip(QString text, int width = 30);
 
 
+#if QT_VERSION < 0x050300
+// Very partial implementation of QSignalBlocker for archaic qt versions.
+class QSignalBlocker {
+public:
+       explicit QSignalBlocker(QObject * o)
+               : obj(o), init_state(obj && obj->blockSignals(true)) {}
+
+       ~QSignalBlocker() {
+               if (obj)
+                       obj->blockSignals(init_state);
+       }
+private:
+       QObject * obj;
+       bool init_state;
+};
+#endif
+
+
+// Check if qstr is understood as rich text (Qt HTML) and if so, produce a
+// rendering in plain text.
+QString qtHtmlToPlainText(QString const & qstr);
+
+
 } // namespace lyx
 
 #endif // QTHELPERS_H