From 2644e4accaf7487ad51b205040163e42b76de3a4 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 20 Aug 2017 13:47:22 +0300 Subject: Small style change --- src/QuickSwitcher.cc | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'src/QuickSwitcher.cc') diff --git a/src/QuickSwitcher.cc b/src/QuickSwitcher.cc index 3bdd26ea..76506a5e 100644 --- a/src/QuickSwitcher.cc +++ b/src/QuickSwitcher.cc @@ -23,19 +23,21 @@ #include "QuickSwitcher.h" -RoomSearchInput::RoomSearchInput(QWidget* parent) - : TextField(parent) +RoomSearchInput::RoomSearchInput(QWidget *parent) + : TextField(parent) { } -bool RoomSearchInput::focusNextPrevChild(bool next) +bool +RoomSearchInput::focusNextPrevChild(bool next) { Q_UNUSED(next); return false; } -void RoomSearchInput::keyPressEvent(QKeyEvent* event) +void +RoomSearchInput::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Tab) { auto completer = this->completer(); @@ -55,8 +57,8 @@ void RoomSearchInput::keyPressEvent(QKeyEvent* event) TextField::keyPressEvent(event); } -QuickSwitcher::QuickSwitcher(QWidget* parent) - : QFrame(parent) +QuickSwitcher::QuickSwitcher(QWidget *parent) + : QFrame(parent) { setMaximumWidth(400); setStyleSheet("background-color: #f9f9f9"); @@ -69,7 +71,7 @@ QuickSwitcher::QuickSwitcher(QWidget* parent) roomSearch_->setPlaceholderText(tr("Find a room...")); QStringList wordList; - QCompleter* completer = new QCompleter(wordList, this); + QCompleter *completer = new QCompleter(wordList, this); completer->setCaseSensitivity(Qt::CaseInsensitive); roomSearch_->setCompleter(completer); @@ -87,7 +89,8 @@ QuickSwitcher::QuickSwitcher(QWidget* parent) }); } -void QuickSwitcher::setRoomList(const QMap& rooms) +void +QuickSwitcher::setRoomList(const QMap &rooms) { rooms_ = rooms; @@ -99,12 +102,14 @@ void QuickSwitcher::setRoomList(const QMap& rooms) roomSearch_->completer()->setModel(new QStringListModel(search_items)); } -void QuickSwitcher::showEvent(QShowEvent*) +void +QuickSwitcher::showEvent(QShowEvent *) { roomSearch_->setFocus(); } -void QuickSwitcher::keyPressEvent(QKeyEvent* event) +void +QuickSwitcher::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape) { roomSearch_->clear(); -- cgit 1.5.1