]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/FancyLineEdit.h
On Linux show in crash message box the backtrace
[lyx.git] / src / frontends / qt4 / FancyLineEdit.h
index a3569a8cd0e8e79b61999f67ac0609ac021f9982..ae62c8539ed448ebb174b99d78f7a24da429d456 100644 (file)
 #ifndef FANCYLINEEDIT_H
 #define FANCYLINEEDIT_H
 
-#include <QtGui/QLineEdit>
-#include <QtGui/QAbstractButton>
+#include <QLineEdit>
+#include <QAbstractButton>
 
 namespace lyx {
 namespace frontend {
 
 class FancyLineEditPrivate;
 
+#if QT_VERSION >= 0x040600
 class IconButton: public QAbstractButton
 {
        Q_OBJECT
@@ -44,7 +45,7 @@ private:
     bool m_autoHide;
     QPixmap m_pixmap;
 };
-
+#endif
 
 /* A line edit with an embedded pixmap on one side that is connected to
  * a menu. Additionally, it can display a grayed hintText (like "Type Here to")
@@ -62,6 +63,13 @@ class FancyLineEdit : public QLineEdit
 public:
     enum Side {Left = 0, Right = 1};
 
+Q_SIGNALS:
+    void buttonClicked(Side side);
+    void leftButtonClicked();
+    void rightButtonClicked();
+
+#if QT_VERSION >= 0x040600
+public:
     explicit FancyLineEdit(QWidget *parent = 0);
     ~FancyLineEdit();
 
@@ -85,11 +93,6 @@ public:
     void setAutoHideButton(Side side, bool h);
     bool hasAutoHideButton(Side side) const;
 
-Q_SIGNALS:
-       void buttonClicked(Side side);
-    void leftButtonClicked();
-    void rightButtonClicked();
-
 private Q_SLOTS:
     void checkButtons(const QString &);
     void iconClicked();
@@ -103,6 +106,12 @@ private:
 
     FancyLineEditPrivate *m_d;
     QString m_oldText;
+#else
+public:
+       explicit FancyLineEdit(QWidget *parent = 0) 
+               : QLineEdit(parent) 
+       {}
+#endif // QT_VERSION >= 0x040600*/
 };
 
 }