* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#ifndef CHATVIEWSEARCHCONTROLLER_H
#define CHATVIEWSEARCHCONTROLLER_H
***************************************************************************/
#ifndef CHATVIEWSEARCHCONTROLLER_H
#define CHATVIEWSEARCHCONTROLLER_H
- void setSearchString(const QString &searchString);
- void setCaseSensitive(bool caseSensitive);
- void setSearchSenders(bool searchSenders);
- void setSearchMsgs(bool searchMsgs);
- void setSearchOnlyRegularMsgs(bool searchOnlyRegularMsgs);
+ void setSearchString(const QString &searchString);
+ void setCaseSensitive(bool caseSensitive);
+ void setSearchSenders(bool searchSenders);
+ void setSearchMsgs(bool searchMsgs);
+ void setSearchOnlyRegularMsgs(bool searchOnlyRegularMsgs);
- void checkMessagesForHighlight(int start = 0, int end = -1);
- void highlightLine(ChatLine *line);
- void updateHighlights(ChatLine *line);
+ void checkMessagesForHighlight(int start = 0, int end = -1);
+ void highlightLine(ChatLine *line);
+ void updateHighlights(ChatLine *line);
-class SearchHighlightItem : public QObject, public QGraphicsItem {
- Q_OBJECT
+// Apparently, there are broken Qt 4.8.2 mocs around that will fail without this (otherwise useless) #if... looking at you, Wheezy!
+#if QT_VERSION >= 0x040600
+ Q_INTERFACES(QGraphicsItem)
+#endif
-public:
- SearchHighlightItem(QRectF wordRect, QGraphicsItem *parent = 0);
- virtual inline QRectF boundingRect() const { return _boundingRect; }
- void updateGeometry(qreal width, qreal height);
- virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
- enum { Type = ChatScene::SearchHighlightType };
- virtual inline int type() const { return Type; }
+public :
+ SearchHighlightItem(QRectF wordRect, QGraphicsItem *parent = 0);
+ virtual inline QRectF boundingRect() const { return _boundingRect; }
+ void updateGeometry(qreal width, qreal height);
+ virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ enum { Type = ChatScene::SearchHighlightType };
+ virtual inline int type() const { return Type; }