Add custom hotkeys. (#2340)

Co-authored-by: LosFarmosCTL <80157503+LosFarmosCTL@users.noreply.github.com>
Co-authored-by: Paweł <zneix@zneix.eu>
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Mm2PL
2021-11-21 17:46:21 +00:00
committed by GitHub
parent b94e21a600
commit 703f3717e2
54 changed files with 3613 additions and 617 deletions
+24 -1
View File
@@ -1,9 +1,10 @@
#pragma once
#include <QListView>
#include "widgets/listview/GenericItemDelegate.hpp"
#include "widgets/listview/GenericListItem.hpp"
#include <QListView>
namespace chatterino {
class GenericListModel;
@@ -31,6 +32,28 @@ signals:
private:
bool invokeActionOnTab_{};
/**
* @brief Gets the currently selected item (if any) and calls its action
*
* @return true if an action was called on an item, false if no item was selected and thus no action was called
**/
bool acceptCompletion();
/**
* @brief Select the next item in the list. Wraps around if the bottom of the list has been reached.
**/
void focusNextCompletion();
/**
* @brief Select the previous item in the list. Wraps around if the top of the list has been reached.
**/
void focusPreviousCompletion();
/**
* @brief Request for the GUI powering this list view to be closed. Shorthand for emit this->closeRequested()
**/
void requestClose();
};
} // namespace chatterino