lmms
Cross-platform music production software
Loading...
Searching...
No Matches
lmms::gui::TabWidget Class Reference

#include <TabWidget.h>

Inheritance diagram for lmms::gui::TabWidget:

Classes

struct  widgetDesc

Public Member Functions

 TabWidget (const QString &caption, QWidget *parent, bool usePixmap=false, bool resizable=false)
 ~TabWidget () override=default
void addTab (QWidget *w, const QString &name, const char *pixmap=nullptr, int idx=-1)
void setActiveTab (int idx)
int findTabAtPos (const QPoint &pos)
int activeTab () const
QColor tabText () const
void setTabText (const QColor &c)
QColor tabTitleText () const
void setTabTitleText (const QColor &c)
QColor tabSelected () const
void setTabSelected (const QColor &c)
QColor tabTextSelected () const
void setTabTextSelected (const QColor &c)
QColor tabBackground () const
void setTabBackground (const QColor &c)
QColor tabBorder () const
void setTabBorder (const QColor &c)

Protected Member Functions

bool event (QEvent *event) override
void mousePressEvent (QMouseEvent *me) override
void paintEvent (QPaintEvent *pe) override
void resizeEvent (QResizeEvent *re) override
void wheelEvent (QWheelEvent *we) override
QSize minimumSizeHint () const override
QSize sizeHint () const override

Properties

QColor tabText
QColor tabTitleText
QColor tabSelected
QColor tabTextSelected
QColor tabBackground
QColor tabBorder

Private Types

using widgetStack = QMap<int, widgetDesc>

Private Attributes

widgetStack m_widgets
bool m_resizable
int m_activeTab
QString m_caption
quint8 m_tabbarHeight
quint8 m_tabheight
bool m_usePixmap
QColor m_tabText
QColor m_tabTitleText
QColor m_tabSelected
QColor m_tabTextSelected
QColor m_tabBackground
QColor m_tabBorder

Member Typedef Documentation

◆ widgetStack

using lmms::gui::TabWidget::widgetStack = QMap<int, widgetDesc>
private

Constructor & Destructor Documentation

◆ TabWidget()

lmms::gui::TabWidget::TabWidget ( const QString & caption,
QWidget * parent,
bool usePixmap = false,
bool resizable = false )
Parameters
captionText describing the tab group as a whole
parentThe parent widget
usePixmapWhether to enable use of pixmap icons in tabs
resizableIf true, the widget resizes to fit the size of all tabs. If false, all child widget will be cut down to the TabWidget's size.

◆ ~TabWidget()

lmms::gui::TabWidget::~TabWidget ( )
overridedefault

Member Function Documentation

◆ activeTab()

int lmms::gui::TabWidget::activeTab ( ) const
inline

◆ addTab()

void lmms::gui::TabWidget::addTab ( QWidget * w,
const QString & name,
const char * pixmap = nullptr,
int idx = -1 )

◆ event()

bool lmms::gui::TabWidget::event ( QEvent * event)
overrideprotected

◆ findTabAtPos()

int lmms::gui::TabWidget::findTabAtPos ( const QPoint & pos)

◆ minimumSizeHint()

QSize lmms::gui::TabWidget::minimumSizeHint ( ) const
overrideprotected

◆ mousePressEvent()

void lmms::gui::TabWidget::mousePressEvent ( QMouseEvent * me)
overrideprotected

◆ paintEvent()

void lmms::gui::TabWidget::paintEvent ( QPaintEvent * pe)
overrideprotected

◆ resizeEvent()

void lmms::gui::TabWidget::resizeEvent ( QResizeEvent * re)
overrideprotected

◆ setActiveTab()

void lmms::gui::TabWidget::setActiveTab ( int idx)

◆ setTabBackground()

void lmms::gui::TabWidget::setTabBackground ( const QColor & c)

◆ setTabBorder()

void lmms::gui::TabWidget::setTabBorder ( const QColor & c)

◆ setTabSelected()

void lmms::gui::TabWidget::setTabSelected ( const QColor & c)

◆ setTabText()

void lmms::gui::TabWidget::setTabText ( const QColor & c)

◆ setTabTextSelected()

void lmms::gui::TabWidget::setTabTextSelected ( const QColor & c)

◆ setTabTitleText()

void lmms::gui::TabWidget::setTabTitleText ( const QColor & c)

◆ sizeHint()

QSize lmms::gui::TabWidget::sizeHint ( ) const
overrideprotected

◆ tabBackground()

QColor lmms::gui::TabWidget::tabBackground ( ) const

◆ tabBorder()

QColor lmms::gui::TabWidget::tabBorder ( ) const

◆ tabSelected()

QColor lmms::gui::TabWidget::tabSelected ( ) const

◆ tabText()

QColor lmms::gui::TabWidget::tabText ( ) const

◆ tabTextSelected()

QColor lmms::gui::TabWidget::tabTextSelected ( ) const

◆ tabTitleText()

QColor lmms::gui::TabWidget::tabTitleText ( ) const

◆ wheelEvent()

void lmms::gui::TabWidget::wheelEvent ( QWheelEvent * we)
overrideprotected

Member Data Documentation

◆ m_activeTab

int lmms::gui::TabWidget::m_activeTab
private

◆ m_caption

QString lmms::gui::TabWidget::m_caption
private

◆ m_resizable

bool lmms::gui::TabWidget::m_resizable
private

◆ m_tabBackground

QColor lmms::gui::TabWidget::m_tabBackground
private

◆ m_tabbarHeight

quint8 lmms::gui::TabWidget::m_tabbarHeight
private

◆ m_tabBorder

QColor lmms::gui::TabWidget::m_tabBorder
private

◆ m_tabheight

quint8 lmms::gui::TabWidget::m_tabheight
private

◆ m_tabSelected

QColor lmms::gui::TabWidget::m_tabSelected
private

◆ m_tabText

QColor lmms::gui::TabWidget::m_tabText
private

◆ m_tabTextSelected

QColor lmms::gui::TabWidget::m_tabTextSelected
private

◆ m_tabTitleText

QColor lmms::gui::TabWidget::m_tabTitleText
private

◆ m_usePixmap

bool lmms::gui::TabWidget::m_usePixmap
private

◆ m_widgets

widgetStack lmms::gui::TabWidget::m_widgets
private

Property Documentation

◆ tabBackground

QColor lmms::gui::TabWidget::tabBackground
readwrite

◆ tabBorder

QColor lmms::gui::TabWidget::tabBorder
readwrite

◆ tabSelected

QColor lmms::gui::TabWidget::tabSelected
readwrite

◆ tabText

QColor lmms::gui::TabWidget::tabText
readwrite

◆ tabTextSelected

QColor lmms::gui::TabWidget::tabTextSelected
readwrite

◆ tabTitleText

QColor lmms::gui::TabWidget::tabTitleText
readwrite

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