Chatterino
Public Member Functions | Protected Member Functions | List of all members
chatterino::Label Class Reference

#include <Label.hpp>

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

Public Member Functions

 Label (QString text=QString(), FontStyle style=FontStyle::UiMedium)
 
 Label (BaseWidget *parent, QString text=QString(), FontStyle style=FontStyle::UiMedium)
 
const QString & getText () const
 
void setText (const QString &text)
 
FontStyle getFontStyle () const
 
void setFontStyle (FontStyle style)
 
bool getCentered () const
 
void setCentered (bool centered)
 
bool getHasOffset () const
 
void setHasOffset (bool hasOffset)
 
- 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
 

Protected Member Functions

virtual void scaleChangedEvent (float scale_) override
 
virtual void paintEvent (QPaintEvent *) override
 
virtual QSize sizeHint () const override
 
virtual QSize minimumSizeHint () const override
 
- Protected Member Functions inherited from chatterino::BaseWidget
virtual void childEvent (QChildEvent *) override
 
virtual void showEvent (QShowEvent *) override
 
virtual void themeChangedEvent ()
 
virtual void addShortcuts ()
 
void setScale (float value)
 
void clearShortcuts ()
 

Additional Inherited Members

- Public Attributes inherited from chatterino::BaseWidget
pajlada::Signals::Signal< float > scaleChanged
 
- Protected Attributes inherited from chatterino::BaseWidget
Themetheme
 
std::vector< QShortcut * > shortcuts_
 
pajlada::Signals::SignalHolder signalHolder_
 

Constructor & Destructor Documentation

◆ Label() [1/2]

chatterino::Label::Label ( QString  text = QString(),
FontStyle  style = FontStyle::UiMedium 
)
explicit

◆ Label() [2/2]

chatterino::Label::Label ( BaseWidget parent,
QString  text = QString(),
FontStyle  style = FontStyle::UiMedium 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ getCentered()

bool chatterino::Label::getCentered ( ) const

◆ getFontStyle()

FontStyle chatterino::Label::getFontStyle ( ) const
Here is the caller graph for this function:

◆ getHasOffset()

bool chatterino::Label::getHasOffset ( ) const

◆ getText()

const QString & chatterino::Label::getText ( ) const

◆ minimumSizeHint()

QSize chatterino::Label::minimumSizeHint ( ) const
overrideprotectedvirtual

◆ paintEvent()

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

◆ scaleChangedEvent()

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

Reimplemented from chatterino::BaseWidget.

◆ setCentered()

void chatterino::Label::setCentered ( bool  centered)
Here is the caller graph for this function:

◆ setFontStyle()

void chatterino::Label::setFontStyle ( FontStyle  style)

◆ setHasOffset()

void chatterino::Label::setHasOffset ( bool  hasOffset)
Here is the caller graph for this function:

◆ setText()

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

◆ sizeHint()

QSize chatterino::Label::sizeHint ( ) const
overrideprotectedvirtual

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