BibleTime
Signals | Public Member Functions | Private Attributes | List of all members
BtTextWindowHeaderWidget Class Reference

#include <bttextwindowheaderwidget.h>

Inheritance diagram for BtTextWindowHeaderWidget:

Signals

void sigModuleAdd (int index, CSwordModuleInfo *module)
 
void sigModuleRemove (int index)
 
void sigModuleReplace (int index, CSwordModuleInfo *newModule)
 

Public Member Functions

 BtTextWindowHeaderWidget (CSwordModuleInfo::ModuleType mtype, QWidget *parent=nullptr)
 
void updateWidget (BtModuleList newModulesToUse, CSwordModuleInfo *module, int newIndex, int leftLikeModules)
 

Private Attributes

BtModuleChooserMenum_addMenu
 
QToolButtonm_button
 
QLabel * m_iconLabel
 
int m_id
 
QLabel * m_label
 
QActionm_removeAction
 
BtModuleChooserMenum_replaceMenu
 

Detailed Description

A widget for choosing a module in a window. Consists of a label and a button. When user selects a module, button sends a signal. This widget needs to get a message back after a window module list has been changed. Only then it will be updated. See BtTextWindowHeader.

Definition at line 36 of file bttextwindowheaderwidget.h.

Constructor & Destructor Documentation

◆ BtTextWindowHeaderWidget()

BtTextWindowHeaderWidget::BtTextWindowHeaderWidget ( CSwordModuleInfo::ModuleType  mtype,
QWidget parent = nullptr 
)

Member Function Documentation

◆ sigModuleAdd

void BtTextWindowHeaderWidget::sigModuleAdd ( int  index,
CSwordModuleInfo module 
)
signal

User selected a module from menu to add.

Referenced by BtTextWindowHeader::addWidget(), and BtTextWindowHeaderWidget().

◆ sigModuleRemove

void BtTextWindowHeaderWidget::sigModuleRemove ( int  index)
signal

User selected a module from menu to be removed.

Referenced by BtTextWindowHeader::addWidget(), and BtTextWindowHeaderWidget().

◆ sigModuleReplace

void BtTextWindowHeaderWidget::sigModuleReplace ( int  index,
CSwordModuleInfo newModule 
)
signal

User selected a module from menu to replace an existing module.

Referenced by BtTextWindowHeader::addWidget(), and BtTextWindowHeaderWidget().

◆ updateWidget()

void BtTextWindowHeaderWidget::updateWidget ( BtModuleList  newModulesToUse,
CSwordModuleInfo module,
int  newIndex,
int  leftLikeModules 
)

Called after the window module list has changed. Updates the module name and the existing menu items but doesn't add or remove them if the menu exists. If the menu doesn't exist, creates it first and then updates it.

Definition at line 106 of file bttextwindowheaderwidget.cpp.

References m_addMenu, m_iconLabel, m_id, m_label, m_removeAction, m_replaceMenu, CSwordModuleInfo::moduleIcon(), CSwordModuleInfo::name(), and BtModuleChooserMenu::update().

Member Data Documentation

◆ m_addMenu

BtModuleChooserMenu* BtTextWindowHeaderWidget::m_addMenu
private

Definition at line 71 of file bttextwindowheaderwidget.h.

Referenced by BtTextWindowHeaderWidget(), and updateWidget().

◆ m_button

QToolButton* BtTextWindowHeaderWidget::m_button
private

Definition at line 74 of file bttextwindowheaderwidget.h.

Referenced by BtTextWindowHeaderWidget().

◆ m_iconLabel

QLabel* BtTextWindowHeaderWidget::m_iconLabel
private

Definition at line 72 of file bttextwindowheaderwidget.h.

Referenced by BtTextWindowHeaderWidget(), and updateWidget().

◆ m_id

int BtTextWindowHeaderWidget::m_id
private

Definition at line 68 of file bttextwindowheaderwidget.h.

Referenced by BtTextWindowHeaderWidget(), and updateWidget().

◆ m_label

QLabel* BtTextWindowHeaderWidget::m_label
private

Definition at line 73 of file bttextwindowheaderwidget.h.

Referenced by BtTextWindowHeaderWidget(), and updateWidget().

◆ m_removeAction

QAction* BtTextWindowHeaderWidget::m_removeAction
private

Definition at line 69 of file bttextwindowheaderwidget.h.

Referenced by BtTextWindowHeaderWidget(), and updateWidget().

◆ m_replaceMenu

BtModuleChooserMenu* BtTextWindowHeaderWidget::m_replaceMenu
private

Definition at line 70 of file bttextwindowheaderwidget.h.

Referenced by BtTextWindowHeaderWidget(), and updateWidget().


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