added search popup

This commit is contained in:
fourtf
2018-01-05 13:42:23 +01:00
parent 02b73cfa27
commit 47a813d5d6
9 changed files with 163 additions and 4 deletions
+12
View File
@@ -5,6 +5,7 @@
#include "singletons/windowmanager.hpp"
#include "twitch/twitchmessagebuilder.hpp"
#include "util/urlfetch.hpp"
#include "widgets/helper/searchpopup.hpp"
#include "widgets/qualitypopup.hpp"
#include "widgets/splitcontainer.hpp"
#include "widgets/textinputdialog.hpp"
@@ -76,6 +77,9 @@ Split::Split(SplitContainer *parent, const std::string &_uuid)
// CTRL+R: Change Channel
ezShortcut(this, "CTRL+R", &Split::doChangeChannel);
// CTRL+F: Search
ezShortcut(this, "CTRL+F", &Split::doSearch);
// xd
// ezShortcut(this, "ALT+SHIFT+RIGHT", &Split::doIncFlexX);
// ezShortcut(this, "ALT+SHIFT+LEFT", &Split::doDecFlexX);
@@ -473,6 +477,14 @@ void Split::doCopy()
QApplication::clipboard()->setText(this->view.getSelectedText());
}
void Split::doSearch()
{
SearchPopup *popup = new SearchPopup();
popup->setChannel(this->getChannel());
popup->show();
}
template <typename Iter, typename RandomGenerator>
static Iter select_randomly(Iter start, Iter end, RandomGenerator &g)
{