From a117d3bd1592bae3b14630c953790a005b3c3a3d Mon Sep 17 00:00:00 2001 From: Marcus Eggenberger Date: Sat, 16 Aug 2008 20:23:56 +0200 Subject: [PATCH] Introducing search in the chatview. See views -> show search bar Known issues: - fixed color - cannot make the view scroll to a result (buttons are disabled) - no shortcuts - doesn't react on newly inserted messages --- src/qtui/CMakeLists.txt | 5 + src/qtui/bufferwidget.cpp | 43 +++++- src/qtui/bufferwidget.h | 8 + src/qtui/chatitem.cpp | 30 ++++ src/qtui/chatitem.h | 4 +- src/qtui/chatlinemodelitem.h | 2 +- src/qtui/chatscene.h | 1 + src/qtui/chatviewsearchbar.cpp | 48 ++++++ src/qtui/chatviewsearchbar.h | 52 +++++++ src/qtui/chatviewsearchcontroller.cpp | 213 ++++++++++++++++++++++++++ src/qtui/chatviewsearchcontroller.h | 86 +++++++++++ src/qtui/mainwin.cpp | 2 + src/qtui/ui/bufferwidget.ui | 20 ++- src/qtui/ui/chatviewsearchbar.ui | 115 ++++++++++++++ 14 files changed, 618 insertions(+), 11 deletions(-) create mode 100644 src/qtui/chatviewsearchbar.cpp create mode 100644 src/qtui/chatviewsearchbar.h create mode 100644 src/qtui/chatviewsearchcontroller.cpp create mode 100644 src/qtui/chatviewsearchcontroller.h create mode 100644 src/qtui/ui/chatviewsearchbar.ui diff --git a/src/qtui/CMakeLists.txt b/src/qtui/CMakeLists.txt index 74db1aa4..1fca8945 100644 --- a/src/qtui/CMakeLists.txt +++ b/src/qtui/CMakeLists.txt @@ -17,6 +17,8 @@ set(SOURCES chatmonitorview.cpp chatscene.cpp chatview.cpp + chatviewsearchbar.cpp + chatviewsearchcontroller.cpp columnhandleitem.cpp coreconfigwizard.cpp coreconnectdlg.cpp @@ -49,6 +51,8 @@ set(MOC_HDRS chatmonitorview.h chatscene.h chatview.h + chatviewsearchbar.h + chatviewsearchcontroller.h columnhandleitem.h coreconfigwizard.h coreconnectdlg.h @@ -81,6 +85,7 @@ set(FORMS bufferviewwidget.ui bufferwidget.ui channellistdlg.ui + chatviewsearchbar.ui coreaccounteditdlg.ui coreconfigwizardintropage.ui coreconfigwizardadminuserpage.ui diff --git a/src/qtui/bufferwidget.cpp b/src/qtui/bufferwidget.cpp index fc063461..a0f71c6c 100644 --- a/src/qtui/bufferwidget.cpp +++ b/src/qtui/bufferwidget.cpp @@ -20,13 +20,44 @@ #include "bufferwidget.h" #include "chatview.h" +#include "chatviewsearchbar.h" +#include "chatviewsearchcontroller.h" #include "settings.h" #include "client.h" #include "global.h" -BufferWidget::BufferWidget(QWidget *parent) : AbstractBufferContainer(parent) { +#include + +BufferWidget::BufferWidget(QWidget *parent) + : AbstractBufferContainer(parent), + _chatViewSearchController(new ChatViewSearchController(this)) +{ ui.setupUi(this); + layout()->setContentsMargins(0, 0, 0, 0); + layout()->setSpacing(0); + // ui.searchBar->hide(); + + _chatViewSearchController->setCaseSensitive(ui.searchBar->caseSensitiveBox()->isChecked()); + _chatViewSearchController->setSearchSenders(ui.searchBar->searchSendersBox()->isChecked()); + _chatViewSearchController->setSearchMsgs(ui.searchBar->searchMsgsBox()->isChecked()); + _chatViewSearchController->setSearchOnlyRegularMsgs(ui.searchBar->searchOnlyRegularMsgsBox()->isChecked()); + + connect(ui.searchBar->searchEditLine(), SIGNAL(textChanged(const QString &)), + _chatViewSearchController, SLOT(setSearchString(const QString &))); + connect(ui.searchBar->caseSensitiveBox(), SIGNAL(toggled(bool)), + _chatViewSearchController, SLOT(setCaseSensitive(bool))); + connect(ui.searchBar->searchSendersBox(), SIGNAL(toggled(bool)), + _chatViewSearchController, SLOT(setSearchSenders(bool))); + connect(ui.searchBar->searchMsgsBox(), SIGNAL(toggled(bool)), + _chatViewSearchController, SLOT(setSearchMsgs(bool))); + connect(ui.searchBar->searchOnlyRegularMsgsBox(), SIGNAL(toggled(bool)), + _chatViewSearchController, SLOT(setSearchOnlyRegularMsgs(bool))); +} + +BufferWidget::~BufferWidget() { + delete _chatViewSearchController; + _chatViewSearchController = 0; } AbstractChatView *BufferWidget::createChatView(BufferId id) { @@ -48,7 +79,13 @@ void BufferWidget::removeChatView(BufferId id) { } void BufferWidget::showChatView(BufferId id) { - if(!id.isValid()) ui.stackedWidget->setCurrentWidget(ui.page); - else ui.stackedWidget->setCurrentWidget(_chatViews.value(id)); + if(!id.isValid()) { + ui.stackedWidget->setCurrentWidget(ui.page); + } else { + ChatView *view = qobject_cast(_chatViews.value(id)); + Q_ASSERT(view); + ui.stackedWidget->setCurrentWidget(view); + _chatViewSearchController->setScene(view->scene()); + } } diff --git a/src/qtui/bufferwidget.h b/src/qtui/bufferwidget.h index e2876ada..6f48f096 100644 --- a/src/qtui/bufferwidget.h +++ b/src/qtui/bufferwidget.h @@ -25,11 +25,17 @@ #include "abstractbuffercontainer.h" +class ChatViewSearchBar; +class ChatViewSearchController; + class BufferWidget : public AbstractBufferContainer { Q_OBJECT public: BufferWidget(QWidget *parent); + ~BufferWidget(); + + inline ChatViewSearchBar *searchBar() const { return ui.searchBar; } protected: virtual AbstractChatView *createChatView(BufferId); @@ -41,6 +47,8 @@ class BufferWidget : public AbstractBufferContainer { private: Ui::BufferWidget ui; QHash _chatViews; + + ChatViewSearchController *_chatViewSearchController; }; #endif diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp index da9bbf54..d7a14ff3 100644 --- a/src/qtui/chatitem.cpp +++ b/src/qtui/chatitem.cpp @@ -209,6 +209,36 @@ void ChatItem::continueSelecting(const QPointF &pos) { update(); } +QList ChatItem::findWords(const QString &searchWord, Qt::CaseSensitivity caseSensitive) { + QList resultList; + const QAbstractItemModel *model_ = model(); + if(!model_) + return resultList; + + QString plainText = model_->data(model_->index(row(), column()), MessageModel::DisplayRole).toString(); + QList indexList; + int searchIdx = plainText.indexOf(searchWord, 0, caseSensitive); + while(searchIdx != -1) { + indexList << searchIdx; + searchIdx = plainText.indexOf(searchWord, searchIdx + 1, caseSensitive); + } + + if(!haveLayout()) + updateLayout(); + + Q_ASSERT(_layout); + foreach(int idx, indexList) { + QTextLine line = _layout->lineForTextPosition(idx); + qreal x = line.cursorToX(idx); + qreal width = line.cursorToX(idx + searchWord.count()) - x; + qreal height = fontMetrics()->lineSpacing(); + qreal y = height * line.lineNumber(); + resultList << QRectF(x, y, width, height); + } + return resultList; +} + + void ChatItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { if(event->buttons() == Qt::LeftButton) { if(_selectionMode == NoSelection) { diff --git a/src/qtui/chatitem.h b/src/qtui/chatitem.h index 678c3c6f..72d1fb62 100644 --- a/src/qtui/chatitem.h +++ b/src/qtui/chatitem.h @@ -62,6 +62,8 @@ class ChatItem : public QGraphicsItem { void setFullSelection(); void continueSelecting(const QPointF &pos); + QList findWords(const QString &searchWord, Qt::CaseSensitivity caseSensitive); + protected: virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event); virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); @@ -90,7 +92,7 @@ class ChatItem : public QGraphicsItem { int _col; quint8 _lines; - QList _wrapPositions; + QTextLayout * _layout; enum SelectionMode { NoSelection, PartialSelection, FullSelection }; SelectionMode _selectionMode; diff --git a/src/qtui/chatlinemodelitem.h b/src/qtui/chatlinemodelitem.h index a2ef9b9a..1e9a8cc4 100644 --- a/src/qtui/chatlinemodelitem.h +++ b/src/qtui/chatlinemodelitem.h @@ -31,7 +31,7 @@ public: ChatLineModelItem(const Message &); virtual QVariant data(int column, int role) const; - virtual inline bool setData(int column, const QVariant &value, int role) { return false; } + virtual inline bool setData(int column, const QVariant &value, int role) { Q_UNUSED(column); Q_UNUSED(value); Q_UNUSED(role); return false; } private: void computeWrapList(); diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h index c0231f76..1b31d1f8 100644 --- a/src/qtui/chatscene.h +++ b/src/qtui/chatscene.h @@ -50,6 +50,7 @@ class ChatScene : public QGraphicsScene { int sectionByScenePos(int x); inline int sectionByScenePos(const QPoint &pos) { return sectionByScenePos(pos.x()); } inline bool isSingleBufferScene() const { return _singleBufferScene; } + inline ChatLine *chatLine(int row) { return (row < _lines.count()) ? _lines[row] : 0; } public slots: void setWidth(qreal); diff --git a/src/qtui/chatviewsearchbar.cpp b/src/qtui/chatviewsearchbar.cpp new file mode 100644 index 00000000..121070d3 --- /dev/null +++ b/src/qtui/chatviewsearchbar.cpp @@ -0,0 +1,48 @@ +/*************************************************************************** + * Copyright (C) 2005-08 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * 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. * + ***************************************************************************/ + +#include "chatviewsearchbar.h" + +#include + +ChatViewSearchBar::ChatViewSearchBar(QWidget *parent) + : QWidget(parent) +{ + ui.setupUi(this); + layout()->setContentsMargins(0, 0, 0, 0); + + ui.searchUpButton->setEnabled(false); + ui.searchDownButton->setEnabled(false); + + _toggleViewAction = new QAction(tr("Show search bar"), this); + _toggleViewAction->setCheckable(true); + _toggleViewAction->setChecked(false); + connect(_toggleViewAction, SIGNAL(toggled(bool)), + this, SLOT(setVisible(bool))); + setVisible(false); + + connect(ui.hideButton, SIGNAL(clicked()), + _toggleViewAction, SLOT(toggle())); +} + +void ChatViewSearchBar::setVisible(bool visible) { + QWidget::setVisible(visible); + ui.searchEditLine->clear(); +} diff --git a/src/qtui/chatviewsearchbar.h b/src/qtui/chatviewsearchbar.h new file mode 100644 index 00000000..043e4bac --- /dev/null +++ b/src/qtui/chatviewsearchbar.h @@ -0,0 +1,52 @@ +/*************************************************************************** + * Copyright (C) 2005-08 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * 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. * + ***************************************************************************/ + +#ifndef CHATVIEWSEARCHBAR_H +#define CHATVIEWSEARCHBAR_H + +#include "ui_chatviewsearchbar.h" + +#include + +class QAction; + +class ChatViewSearchBar : public QWidget { + Q_OBJECT + +public: + ChatViewSearchBar(QWidget *parent = 0); + + inline QLineEdit *searchEditLine() const { return ui.searchEditLine; } + inline QCheckBox *caseSensitiveBox() const { return ui.caseSensitiveBox; } + inline QCheckBox *searchSendersBox() const { return ui.searchSendersBox; } + inline QCheckBox *searchMsgsBox() const { return ui.searchMsgsBox; } + inline QCheckBox *searchOnlyRegularMsgsBox() const { return ui.searchOnlyRegularMsgsBox; } + + inline QAction *toggleViewAction() const { return _toggleViewAction; } + +public slots: + void setVisible(bool visible); + +private: + Ui::ChatViewSearchBar ui; + QAction *_toggleViewAction; +}; + +#endif //CHATVIEWSEARCHBAR_H diff --git a/src/qtui/chatviewsearchcontroller.cpp b/src/qtui/chatviewsearchcontroller.cpp new file mode 100644 index 00000000..44ddc694 --- /dev/null +++ b/src/qtui/chatviewsearchcontroller.cpp @@ -0,0 +1,213 @@ +/*************************************************************************** + * Copyright (C) 2005-08 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * 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. * + ***************************************************************************/ + +#include "chatviewsearchcontroller.h" + +#include +#include + +#include "chatitem.h" +#include "chatlinemodel.h" +#include "chatscene.h" +#include "messagemodel.h" + +ChatViewSearchController::ChatViewSearchController(QObject *parent) + : QObject(parent), + _scene(0), + _caseSensitive(false), + _searchSenders(false), + _searchMsgs(true), + _searchOnlyRegularMsgs(true) +{ +} + +void ChatViewSearchController::setSearchString(const QString &searchString) { + QString oldSearchString = _searchString; + _searchString = searchString; + if(_scene) { + if(!searchString.startsWith(oldSearchString) || oldSearchString.isEmpty()) { + // we can't reuse our all findings... cler the scene and do it all over + updateHighlights(); + } else { + // reuse all findings + updateHighlights(true); + } + } +} + + void ChatViewSearchController::setScene(ChatScene *scene) { + Q_ASSERT(scene); + if(scene == _scene) + return; + + if(_scene) { + disconnect(_scene, 0, this, 0); + qDeleteAll(_highlightItems); + _highlightItems.clear(); + } + + _scene = scene; + if(!scene) + return; + + connect(_scene, SIGNAL(destroyed()), this, SLOT(sceneDestroyed())); + updateHighlights(); + } + + + +void ChatViewSearchController::updateHighlights(bool reuse) { + if(!_scene) + return; + + QAbstractItemModel *model = _scene->model(); + Q_ASSERT(model); + + + QList chatLines; + if(reuse) { + foreach(SearchHighlightItem *highlightItem, _highlightItems) { + ChatLine *line = dynamic_cast(highlightItem->parentItem()); + if(!line || chatLines.contains(line)) + continue; + chatLines << line; + } + } + + qDeleteAll(_highlightItems); + _highlightItems.clear(); + Q_ASSERT(_highlightItems.isEmpty()); + + if(searchString().isEmpty() || !(_searchSenders || _searchMsgs)) + return; + + if(reuse) { + QModelIndex index; + foreach(ChatLine *line, chatLines) { + if(_searchOnlyRegularMsgs) { + index = model->index(line->row(), 0); + if(!checkType((Message::Type)index.data(MessageModel::TypeRole).toInt())) + continue; + } + highlightLine(line); + } + } else { + // we have to crawl through the data + QModelIndex index; + QString plainText; + int rowCount = model->rowCount(); + for(int row = 0; row < rowCount; row++) { + ChatLine *line = _scene->chatLine(row); + + if(_searchOnlyRegularMsgs) { + index = model->index(row, 0); + if(!checkType((Message::Type)index.data(MessageModel::TypeRole).toInt())) + continue; + } + highlightLine(line); + } + } +} + +void ChatViewSearchController::highlightLine(ChatLine *line) { + QList checkItems; + if(_searchSenders) + checkItems << &(line->item(MessageModel::SenderColumn)); + + if(_searchMsgs) + checkItems << &(line->item(MessageModel::ContentsColumn)); + + foreach(ChatItem *item, checkItems) { + foreach(QRectF wordRect, item->findWords(searchString(), caseSensitive())) { + _highlightItems << new SearchHighlightItem(wordRect.adjusted(item->x(), 0, item->x(), 0), line); + } + } +} + +void ChatViewSearchController::sceneDestroyed() { + // WARNING: don't call any methods on scene! + _scene = 0; + // the items will be automatically deleted when the scene is destroyed + // so we just have to clear the list; + _highlightItems.clear(); +} + +void ChatViewSearchController::setCaseSensitive(bool caseSensitive) { + if(_caseSensitive == caseSensitive) + return; + + _caseSensitive = caseSensitive; + + // we can reuse the original search results if the new search + // parameters are a restriction of the original one + updateHighlights(caseSensitive); +} + +void ChatViewSearchController::setSearchSenders(bool searchSenders) { + if(_searchSenders == searchSenders) + return; + + _searchSenders = searchSenders; + // we can reuse the original search results if the new search + // parameters are a restriction of the original one + updateHighlights(!searchSenders); +} + +void ChatViewSearchController::setSearchMsgs(bool searchMsgs) { + if(_searchMsgs == searchMsgs) + return; + + _searchMsgs = searchMsgs; + + // we can reuse the original search results if the new search + // parameters are a restriction of the original one + updateHighlights(!searchMsgs); +} + +void ChatViewSearchController::setSearchOnlyRegularMsgs(bool searchOnlyRegularMsgs) { + if(_searchOnlyRegularMsgs == searchOnlyRegularMsgs) + return; + + _searchOnlyRegularMsgs = searchOnlyRegularMsgs; + + // we can reuse the original search results if the new search + // parameters are a restriction of the original one + updateHighlights(searchOnlyRegularMsgs); +} + + + +SearchHighlightItem::SearchHighlightItem(QRectF wordRect, QGraphicsItem *parent) + : QGraphicsItem(parent), + _boundingRect(QRectF(-wordRect.width() / 2, -wordRect.height() / 2, wordRect.width(), wordRect.height())) +{ + setPos(wordRect.x() + wordRect.width() / 2 , wordRect.y() + wordRect.height() / 2); + scale(1.2, 1.2); +} + +void SearchHighlightItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { + Q_UNUSED(widget); + + painter->setPen(QPen(Qt::black, 1.5)); + //painter->setBrush(QColor(127, 133, 250)); + painter->setBrush(QColor(254, 237, 45)); + painter->setRenderHints(QPainter::Antialiasing); + painter->drawRoundedRect(boundingRect(), 30, 30, Qt::RelativeSize); +} diff --git a/src/qtui/chatviewsearchcontroller.h b/src/qtui/chatviewsearchcontroller.h new file mode 100644 index 00000000..6d8dc2d9 --- /dev/null +++ b/src/qtui/chatviewsearchcontroller.h @@ -0,0 +1,86 @@ +/*************************************************************************** + * Copyright (C) 2005-08 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * 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. * + ***************************************************************************/ + +#ifndef CHATVIEWSEARCHCONTROLLER_H +#define CHATVIEWSEARCHCONTROLLER_H + +#include +#include +#include +#include + +#include "message.h" + +class ChatLine; +class ChatScene; +class SearchHighlightItem; + +class ChatViewSearchController : public QObject { + Q_OBJECT + +public: + ChatViewSearchController(QObject *parent = 0); + + inline const QString &searchString() const { return _searchString; } + + void setScene(ChatScene *scene); + +public slots: + void setSearchString(const QString &searchString); + void setCaseSensitive(bool caseSensitive); + void setSearchSenders(bool searchSenders); + void setSearchMsgs(bool searchMsgs); + void setSearchOnlyRegularMsgs(bool searchOnlyRegularMsgs); + +private slots: + void sceneDestroyed(); + void updateHighlights(bool reuse = false); + +private: + QString _searchString; + ChatScene *_scene; + QList _highlightItems; + + bool _caseSensitive; + bool _searchSenders; + bool _searchMsgs; + bool _searchOnlyRegularMsgs; + + inline Qt::CaseSensitivity caseSensitive() const { return _caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive; } + + inline bool checkType(Message::Type type) const { return type & (Message::Plain | Message::Notice | Message::Action); } + void highlightLine(ChatLine *line); +}; + + +// Highlight Items +#include + +class SearchHighlightItem : public QGraphicsItem { +public: + SearchHighlightItem(QRectF wordRect, QGraphicsItem *parent = 0); + inline virtual QRectF boundingRect() const { return _boundingRect; } + virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); + +private: + QRectF _boundingRect; +}; + +#endif //CHATVIEWSEARCHCONTROLLER_H diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index beba80f5..a7c99ff9 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -29,6 +29,7 @@ #include "chatmonitorfilter.h" #include "chatmonitorview.h" #include "chatview.h" +#include "chatviewsearchbar.h" #include "client.h" #include "clientbacklogmanager.h" #include "coreinfodlg.h" @@ -163,6 +164,7 @@ void MainWin::init() { // attach the BufferWidget to the BufferModel and the default selection ui.bufferWidget->setModel(Client::bufferModel()); ui.bufferWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel()); + ui.menuViews->addAction(ui.bufferWidget->searchBar()->toggleViewAction()); _titleSetter.setModel(Client::bufferModel()); _titleSetter.setSelectionModel(Client::bufferModel()->standardSelectionModel()); diff --git a/src/qtui/ui/bufferwidget.ui b/src/qtui/ui/bufferwidget.ui index b4043149..5593be92 100644 --- a/src/qtui/ui/bufferwidget.ui +++ b/src/qtui/ui/bufferwidget.ui @@ -27,10 +27,7 @@ - - - 0 - + @@ -47,8 +44,8 @@ 0 0 - 782 - 542 + 758 + 498 @@ -94,8 +91,19 @@ p, li { white-space: pre-wrap; } + + + + + + ChatViewSearchBar + QWidget +
chatviewsearchbar.h
+ 1 +
+
diff --git a/src/qtui/ui/chatviewsearchbar.ui b/src/qtui/ui/chatviewsearchbar.ui new file mode 100644 index 00000000..d24b4704 --- /dev/null +++ b/src/qtui/ui/chatviewsearchbar.ui @@ -0,0 +1,115 @@ + + ChatViewSearchBar + + + + 0 + 0 + 727 + 51 + + + + Form + + + + + + ... + + + + :/16x16/actions/oxygen/16x16/actions/application-exit.png:/16x16/actions/oxygen/16x16/actions/application-exit.png + + + + + + + + + + ... + + + + :/16x16/actions/oxygen/16x16/actions/go-down.png:/16x16/actions/oxygen/16x16/actions/go-down.png + + + + + + + ... + + + + :/16x16/actions/oxygen/16x16/actions/go-up.png:/16x16/actions/oxygen/16x16/actions/go-up.png + + + + + + + case sensitive + + + + + + + search nick + + + + + + + search message + + + true + + + true + + + + + + + ignore joins, parts, etc. + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + ClearableLineEdit + QLineEdit +
clearablelineedit.h
+
+
+ + + + +
-- 2.20.1