OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
CSVWidget::SceneToolToggle2 Class Reference

Multi-Toggle tool. More...

#include <scenetooltoggle2.hpp>

Inheritance diagram for CSVWidget::SceneToolToggle2:
Collaboration diagram for CSVWidget::SceneToolToggle2:

Classes

struct  ButtonDesc
 

Signals

void selectionChanged ()
 

Public Member Functions

 SceneToolToggle2 (SceneToolbar *parent, const QString &toolTip, const std::string &compositeIcon, const std::string &singleIcon)
 
virtual void showPanel (const QPoint &position)
 
void addButton (unsigned int buttonId, unsigned int mask, const QString &name, const QString &tooltip="", bool disabled=false)
 
unsigned int getSelectionMask () const
 
void setSelectionMask (unsigned int selection)
 
- Public Member Functions inherited from CSVWidget::SceneTool
 SceneTool (SceneToolbar *parent, Type type=Type_TopMode)
 
virtual void activate ()
 
- Public Member Functions inherited from CSVWidget::PushButton
 PushButton (const QIcon &icon, Type type, const QString &tooltip="", QWidget *parent=0)
 
 PushButton (Type type, const QString &tooltip="", QWidget *parent=0)
 
bool hasKeepOpen () const
 
QString getBaseToolTip () const
 Return tooltip used at construction (without any button-specific modifications) More...
 
Type getType () const
 

Private Slots

void selected ()
 

Private Member Functions

void adjustToolTip ()
 
void adjustIcon ()
 

Private Attributes

std::string mCompositeIcon
 
std::string mSingleIcon
 
QWidgetmPanel
 
QHBoxLayout * mLayout
 
std::map< PushButton
*, ButtonDesc
mButtons
 
int mButtonSize
 
int mIconSize
 
QString mToolTip
 
PushButtonmFirst
 

Additional Inherited Members

- Public Types inherited from CSVWidget::PushButton
enum  Type { Type_TopMode, Type_TopAction, Type_Mode, Type_Toggle }
 
- Protected Member Functions inherited from CSVWidget::SceneTool
void mouseReleaseEvent (QMouseEvent *event)
 
- Protected Member Functions inherited from CSVWidget::PushButton
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 

Detailed Description

Multi-Toggle tool.

Top level button is using predefined icons instead building a composite icon.

Constructor & Destructor Documentation

CSVWidget::SceneToolToggle2::SceneToolToggle2 ( SceneToolbar parent,
const QString &  toolTip,
const std::string &  compositeIcon,
const std::string &  singleIcon 
)

The top level icon is compositeIcon + sum of bitpatterns for active buttons (in decimal)

The icon for individual toggle buttons is signleIcon + bitmask for button (in decimal)

Member Function Documentation

void CSVWidget::SceneToolToggle2::addButton ( unsigned int  buttonId,
unsigned int  mask,
const QString &  name,
const QString &  tooltip = "",
bool  disabled = false 
)
Parameters
buttonIdused to compose the icon filename
maskused for the reported getSelectionMask() / setSelectionMask()
Attention
After the last button has been added, setSelection must be called at least once to finalise the layout.

Here is the caller graph for this function:

void CSVWidget::SceneToolToggle2::adjustIcon ( )
private
void CSVWidget::SceneToolToggle2::adjustToolTip ( )
private
unsigned int CSVWidget::SceneToolToggle2::getSelectionMask ( ) const
void CSVWidget::SceneToolToggle2::selected ( )
privateslot
void CSVWidget::SceneToolToggle2::selectionChanged ( )
signal
void CSVWidget::SceneToolToggle2::setSelectionMask ( unsigned int  selection)
Parameters
or'edbutton masks. buttons that do not exist will be ignored.
void CSVWidget::SceneToolToggle2::showPanel ( const QPoint &  position)
virtual

Implements CSVWidget::SceneTool.

Member Data Documentation

std::map<PushButton *, ButtonDesc> CSVWidget::SceneToolToggle2::mButtons
private
int CSVWidget::SceneToolToggle2::mButtonSize
private
std::string CSVWidget::SceneToolToggle2::mCompositeIcon
private
PushButton* CSVWidget::SceneToolToggle2::mFirst
private
int CSVWidget::SceneToolToggle2::mIconSize
private
QHBoxLayout* CSVWidget::SceneToolToggle2::mLayout
private
QWidget* CSVWidget::SceneToolToggle2::mPanel
private
std::string CSVWidget::SceneToolToggle2::mSingleIcon
private
QString CSVWidget::SceneToolToggle2::mToolTip
private

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