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

#include <Notebook.hpp>

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

Classes

struct  Item
 

Public Member Functions

 Notebook (QWidget *parent)
 
 ~Notebook () override=default
 
NotebookTabaddPage (QWidget *page, QString title=QString(), bool select=false)
 
void removePage (QWidget *page)
 
void removeCurrentPage ()
 
int indexOf (QWidget *page) const
 
virtual void select (QWidget *page, bool focusPage=true)
 
void selectIndex (int index, bool focusPage=true)
 
void selectNextTab (bool focusPage=true)
 
void selectPreviousTab (bool focusPage=true)
 
void selectLastTab (bool focusPage=true)
 
int getPageCount () const
 
QWidget * getPageAt (int index) const
 
int getSelectedIndex () const
 
QWidget * getSelectedPage () const
 
QWidget * tabAt (QPoint point, int &index, int maxWidth=2000000000)
 
void rearrangePage (QWidget *page, int index)
 
bool getAllowUserTabManagement () const
 
void setAllowUserTabManagement (bool value)
 
bool getShowTabs () const
 
void setShowTabs (bool value)
 
bool getShowAddButton () const
 
void setShowAddButton (bool value)
 
void performLayout (bool animate=false)
 
void setTabLocation (NotebookTabLocation location)
 
bool isNotebookLayoutLocked () const
 
void setLockNotebookLayout (bool value)
 
void addNotebookActionsToMenu (QMenu *menu)
 
- 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 resizeEvent (QResizeEvent *) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void paintEvent (QPaintEvent *) override
 
NotebookButtongetAddButton ()
 
NotebookButtonaddCustomButton ()
 
const QList< Itemitems ()
 
- 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

◆ Notebook()

chatterino::Notebook::Notebook ( QWidget *  parent)
explicit
Here is the call graph for this function:

◆ ~Notebook()

chatterino::Notebook::~Notebook ( )
overridedefault

Member Function Documentation

◆ addCustomButton()

NotebookButton * chatterino::Notebook::addCustomButton ( )
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ addNotebookActionsToMenu()

void chatterino::Notebook::addNotebookActionsToMenu ( QMenu *  menu)
Here is the caller graph for this function:

◆ addPage()

NotebookTab * chatterino::Notebook::addPage ( QWidget *  page,
QString  title = QString(),
bool  select = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAddButton()

NotebookButton * chatterino::Notebook::getAddButton ( )
protected
Here is the caller graph for this function:

◆ getAllowUserTabManagement()

bool chatterino::Notebook::getAllowUserTabManagement ( ) const
Here is the caller graph for this function:

◆ getPageAt()

QWidget * chatterino::Notebook::getPageAt ( int  index) const

◆ getPageCount()

int chatterino::Notebook::getPageCount ( ) const
Here is the caller graph for this function:

◆ getSelectedIndex()

int chatterino::Notebook::getSelectedIndex ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSelectedPage()

QWidget * chatterino::Notebook::getSelectedPage ( ) const
Here is the caller graph for this function:

◆ getShowAddButton()

bool chatterino::Notebook::getShowAddButton ( ) const

◆ getShowTabs()

bool chatterino::Notebook::getShowTabs ( ) const
Here is the caller graph for this function:

◆ indexOf()

int chatterino::Notebook::indexOf ( QWidget *  page) const
Here is the caller graph for this function:

◆ isNotebookLayoutLocked()

bool chatterino::Notebook::isNotebookLayoutLocked ( ) const
Here is the caller graph for this function:

◆ items()

const QList<Item> chatterino::Notebook::items ( )
inlineprotected

◆ mousePressEvent()

void chatterino::Notebook::mousePressEvent ( QMouseEvent *  event)
overrideprotectedvirtual

◆ paintEvent()

void chatterino::Notebook::paintEvent ( QPaintEvent *  event)
overrideprotectedvirtual

horizontal line

vertical line

Here is the call graph for this function:

◆ performLayout()

void chatterino::Notebook::performLayout ( bool  animate = false)

Notebook tabs need to know if they are in the last row.

Break line if element doesn't fit.

Layout tab

Update which tabs are in the last row

Increment for the line at the bottom

Layout tab

Layout tab

Notebook tabs need to know if they are in the last row.

Break line if element doesn't fit.

Layout tab

Update which tabs are in the last row

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

◆ rearrangePage()

void chatterino::Notebook::rearrangePage ( QWidget *  page,
int  index 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeCurrentPage()

void chatterino::Notebook::removeCurrentPage ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ removePage()

void chatterino::Notebook::removePage ( QWidget *  page)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resizeEvent()

void chatterino::Notebook::resizeEvent ( QResizeEvent *  )
overrideprotectedvirtual
Here is the call graph for this function:

◆ scaleChangedEvent()

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

Reimplemented from chatterino::BaseWidget.

◆ select()

void chatterino::Notebook::select ( QWidget *  page,
bool  focusPage = true 
)
virtual

Reimplemented in chatterino::SplitNotebook.

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

◆ selectIndex()

void chatterino::Notebook::selectIndex ( int  index,
bool  focusPage = true 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectLastTab()

void chatterino::Notebook::selectLastTab ( bool  focusPage = true)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectNextTab()

void chatterino::Notebook::selectNextTab ( bool  focusPage = true)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectPreviousTab()

void chatterino::Notebook::selectPreviousTab ( bool  focusPage = true)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAllowUserTabManagement()

void chatterino::Notebook::setAllowUserTabManagement ( bool  value)
Here is the caller graph for this function:

◆ setLockNotebookLayout()

void chatterino::Notebook::setLockNotebookLayout ( bool  value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setShowAddButton()

void chatterino::Notebook::setShowAddButton ( bool  value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setShowTabs()

void chatterino::Notebook::setShowTabs ( bool  value)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTabLocation()

void chatterino::Notebook::setTabLocation ( NotebookTabLocation  location)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tabAt()

QWidget * chatterino::Notebook::tabAt ( QPoint  point,
int &  index,
int  maxWidth = 2000000000 
)
Here is the call graph for this function:
Here is the caller graph for this function:

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