Chatterino
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
chatterino::SplitInput Class Reference

#include <SplitInput.hpp>

Inheritance diagram for chatterino::SplitInput:
[legend]
Collaboration diagram for chatterino::SplitInput:
[legend]

Public Member Functions

 SplitInput (Split *_chatWidget, bool enableInlineReplying=true)
 
 SplitInput (QWidget *parent, Split *_chatWidget, bool enableInlineReplying=true)
 
void clearSelection ()
 
bool isEditFirstWord () const
 
QString getInputText () const
 
void insertText (const QString &text)
 
void setReply (std::shared_ptr< MessageThread > reply, bool showInlineReplying=true)
 
void setPlaceholderText (const QString &text)
 
void hide ()
 Hide the widget. More...
 
void show ()
 Show the widget. More...
 
bool isHidden () const
 Returns the hidden or shown state of the SplitInput. More...
 
- Public Member Functions inherited from chatterino::BaseWidget
 BaseWidget (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
 
virtual float scale () const
 
boost::optional< float > overrideScale () const
 
void setOverrideScale (boost::optional< float >)
 
QSize scaleIndependantSize () const
 
int scaleIndependantWidth () const
 
int scaleIndependantHeight () const
 
void setScaleIndependantSize (int width, int height)
 
void setScaleIndependantSize (QSize)
 
void setScaleIndependantWidth (int value)
 
void setScaleIndependantHeight (int value)
 
float qtFontScale () const
 

Public Attributes

pajlada::Signals::Signal< const QString & > textChanged
 
ResizingTextEdittextEdit
 
QLabel * textEditLength
 
EffectLabelemoteButton
 
QHBoxLayout * hbox
 
QVBoxLayout * vbox
 
QWidget * replyWrapper
 
QHBoxLayout * replyHbox
 
QLabel * replyLabel
 
EffectLabelcancelReplyButton
 
- Public Attributes inherited from chatterino::BaseWidget
pajlada::Signals::Signal< float > scaleChanged
 

Static Public Attributes

static const int TWITCH_MESSAGE_LIMIT = 500
 

Protected Member Functions

void scaleChangedEvent (float scale_) override
 
void themeChangedEvent () override
 
void paintEvent (QPaintEvent *) override
 
void resizeEvent (QResizeEvent *) override
 
virtual void giveFocus (Qt::FocusReason reason)
 
QString handleSendMessage (std::vector< QString > &arguments)
 
void postMessageSend (const QString &message, const std::vector< QString > &arguments)
 
void clearInput ()
 Clears the input box, clears reply thread if inline replies are enabled. More...
 
void addShortcuts () override
 
void initLayout ()
 
bool eventFilter (QObject *obj, QEvent *event) override
 
void installKeyPressedEvent ()
 
void onCursorPositionChanged ()
 
void onTextChanged ()
 
void updateEmoteButton ()
 
void updateCompletionPopup ()
 
void showCompletionPopup (const QString &text, bool emoteCompletion)
 
void hideCompletionPopup ()
 
void insertCompletionText (const QString &text)
 
void openEmotePopup ()
 
void updateCancelReplyButton ()
 
int scaledMaxHeight () const
 
bool shouldPreventInput (const QString &text) const
 
- Protected Member Functions inherited from chatterino::BaseWidget
virtual void childEvent (QChildEvent *) override
 
virtual void showEvent (QShowEvent *) override
 
void setScale (float value)
 
void clearShortcuts ()
 

Protected Attributes

Split *const split_
 
QObjectRef< EmotePopupemotePopup_
 
QObjectRef< InputCompletionPopupinputCompletionPopup_
 
struct {
   ResizingTextEdit *   textEdit
 
   QLabel *   textEditLength
 
   EffectLabel *   emoteButton
 
   QHBoxLayout *   hbox
 
   QVBoxLayout *   vbox
 
   QWidget *   replyWrapper
 
   QHBoxLayout *   replyHbox
 
   QLabel *   replyLabel
 
   EffectLabel *   cancelReplyButton
 
ui_
 
std::shared_ptr< MessageThreadreplyThread_ = nullptr
 
bool enableInlineReplying_
 
pajlada::Signals::SignalHolder managedConnections_
 
QStringList prevMsg_
 
QString currMsg_
 
int prevIndex_ = 0
 
int lastOverflowLength = TWITCH_MESSAGE_LIMIT
 
bool hidden {false}
 
- Protected Attributes inherited from chatterino::BaseWidget
Themetheme
 
std::vector< QShortcut * > shortcuts_
 
pajlada::Signals::SignalHolder signalHolder_
 

Friends

class Split
 
class ReplyThreadPopup
 

Constructor & Destructor Documentation

◆ SplitInput() [1/2]

chatterino::SplitInput::SplitInput ( Split _chatWidget,
bool  enableInlineReplying = true 
)

◆ SplitInput() [2/2]

chatterino::SplitInput::SplitInput ( QWidget *  parent,
Split _chatWidget,
bool  enableInlineReplying = true 
)
Here is the call graph for this function:

Member Function Documentation

◆ addShortcuts()

void chatterino::SplitInput::addShortcuts ( )
overrideprotectedvirtual

Reimplemented from chatterino::BaseWidget.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearInput()

void chatterino::SplitInput::clearInput ( )
protected

Clears the input box, clears reply thread if inline replies are enabled.

Here is the caller graph for this function:

◆ clearSelection()

void chatterino::SplitInput::clearSelection ( )
Here is the caller graph for this function:

◆ eventFilter()

bool chatterino::SplitInput::eventFilter ( QObject *  obj,
QEvent *  event 
)
overrideprotected

◆ getInputText()

QString chatterino::SplitInput::getInputText ( ) const
Here is the caller graph for this function:

◆ giveFocus()

void chatterino::SplitInput::giveFocus ( Qt::FocusReason  reason)
protectedvirtual

◆ handleSendMessage()

QString chatterino::SplitInput::handleSendMessage ( std::vector< QString > &  arguments)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hide()

void chatterino::SplitInput::hide ( )

Hide the widget.

This is a no-op if the SplitInput is already hidden

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hideCompletionPopup()

void chatterino::SplitInput::hideCompletionPopup ( )
protected
Here is the caller graph for this function:

◆ initLayout()

void chatterino::SplitInput::initLayout ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertCompletionText()

void chatterino::SplitInput::insertCompletionText ( const QString &  text)
protected
Here is the call graph for this function:

◆ insertText()

void chatterino::SplitInput::insertText ( const QString &  text)
Here is the caller graph for this function:

◆ installKeyPressedEvent()

void chatterino::SplitInput::installKeyPressedEvent ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isEditFirstWord()

bool chatterino::SplitInput::isEditFirstWord ( ) const

◆ isHidden()

bool chatterino::SplitInput::isHidden ( ) const

Returns the hidden or shown state of the SplitInput.

Hidden in this context means "has 0 height", meaning it won't be visible but Qt still treats the widget as "technically visible" so we receive events as if the widget is visible

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onCursorPositionChanged()

void chatterino::SplitInput::onCursorPositionChanged ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ onTextChanged()

void chatterino::SplitInput::onTextChanged ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ openEmotePopup()

void chatterino::SplitInput::openEmotePopup ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ paintEvent()

void chatterino::SplitInput::paintEvent ( QPaintEvent *  )
overrideprotected
Here is the call graph for this function:

◆ postMessageSend()

void chatterino::SplitInput::postMessageSend ( const QString &  message,
const std::vector< QString > &  arguments 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resizeEvent()

void chatterino::SplitInput::resizeEvent ( QResizeEvent *  )
overrideprotected

◆ scaleChangedEvent()

void chatterino::SplitInput::scaleChangedEvent ( float  scale_)
overrideprotectedvirtual

Reimplemented from chatterino::BaseWidget.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scaledMaxHeight()

int chatterino::SplitInput::scaledMaxHeight ( ) const
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPlaceholderText()

void chatterino::SplitInput::setPlaceholderText ( const QString &  text)

◆ setReply()

void chatterino::SplitInput::setReply ( std::shared_ptr< MessageThread reply,
bool  showInlineReplying = true 
)
Here is the caller graph for this function:

◆ shouldPreventInput()

bool chatterino::SplitInput::shouldPreventInput ( const QString &  text) const
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ show()

void chatterino::SplitInput::show ( )

Show the widget.

This is a no-op if the SplitInput is already shown

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showCompletionPopup()

void chatterino::SplitInput::showCompletionPopup ( const QString &  text,
bool  emoteCompletion 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ themeChangedEvent()

void chatterino::SplitInput::themeChangedEvent ( )
overrideprotectedvirtual

Reimplemented from chatterino::BaseWidget.

Here is the call graph for this function:

◆ updateCancelReplyButton()

void chatterino::SplitInput::updateCancelReplyButton ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateCompletionPopup()

void chatterino::SplitInput::updateCompletionPopup ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateEmoteButton()

void chatterino::SplitInput::updateEmoteButton ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ ReplyThreadPopup

friend class ReplyThreadPopup
friend

◆ Split

friend class Split
friend

Member Data Documentation

◆ cancelReplyButton

EffectLabel* chatterino::SplitInput::cancelReplyButton

◆ currMsg_

QString chatterino::SplitInput::currMsg_
protected

◆ emoteButton

EffectLabel* chatterino::SplitInput::emoteButton

◆ emotePopup_

QObjectRef<EmotePopup> chatterino::SplitInput::emotePopup_
protected

◆ enableInlineReplying_

bool chatterino::SplitInput::enableInlineReplying_
protected

◆ hbox

QHBoxLayout* chatterino::SplitInput::hbox

◆ hidden

bool chatterino::SplitInput::hidden {false}
protected

◆ inputCompletionPopup_

QObjectRef<InputCompletionPopup> chatterino::SplitInput::inputCompletionPopup_
protected

◆ lastOverflowLength

int chatterino::SplitInput::lastOverflowLength = TWITCH_MESSAGE_LIMIT
protected

◆ managedConnections_

pajlada::Signals::SignalHolder chatterino::SplitInput::managedConnections_
protected

◆ prevIndex_

int chatterino::SplitInput::prevIndex_ = 0
protected

◆ prevMsg_

QStringList chatterino::SplitInput::prevMsg_
protected

◆ replyHbox

QHBoxLayout* chatterino::SplitInput::replyHbox

◆ replyLabel

QLabel* chatterino::SplitInput::replyLabel

◆ replyThread_

std::shared_ptr<MessageThread> chatterino::SplitInput::replyThread_ = nullptr
protected

◆ replyWrapper

QWidget* chatterino::SplitInput::replyWrapper

◆ split_

Split* const chatterino::SplitInput::split_
protected

◆ textChanged

pajlada::Signals::Signal<const QString &> chatterino::SplitInput::textChanged

◆ textEdit

ResizingTextEdit* chatterino::SplitInput::textEdit

◆ textEditLength

QLabel* chatterino::SplitInput::textEditLength

◆ TWITCH_MESSAGE_LIMIT

const int chatterino::SplitInput::TWITCH_MESSAGE_LIMIT = 500
static

◆ ui_

struct { ... } chatterino::SplitInput::ui_

◆ vbox

QVBoxLayout* chatterino::SplitInput::vbox

The documentation for this class was generated from the following files: