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

Mode selector tool. More...

#include <scenetoolmode.hpp>

Inheritance diagram for CSVWidget::SceneToolMode:
Collaboration diagram for CSVWidget::SceneToolMode:

Signals

void modeChanged (const std::string &id)
 

Public Member Functions

 SceneToolMode (SceneToolbar *parent, const QString &toolTip)
 
virtual void showPanel (const QPoint &position)
 
void addButton (const std::string &icon, const std::string &id, const QString &tooltip="")
 
void addButton (ModeButton *button, const std::string &id)
 The ownership of button is transferred to *this. More...
 
ModeButtongetCurrent ()
 Will return a 0-pointer only if the mode does not have any buttons yet. More...
 
std::string getCurrentId () const
 Must not be called if there aren't any buttons yet. More...
 
void setButton (const std::string &id)
 Manually change the current mode. More...
 
- 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
 

Protected Member Functions

bool event (QEvent *event)
 
- 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)
 

Private Slots

void selected ()
 

Private Member Functions

void adjustToolTip (const ModeButton *activeMode)
 
virtual void contextMenuEvent (QContextMenuEvent *event)
 
virtual bool createContextMenu (QMenu *menu)
 
void setButton (std::map< ModeButton *, std::string >::iterator iter)
 

Private Attributes

QWidgetmPanel
 
QHBoxLayout * mLayout
 
std::map< ModeButton
*, std::string > 
mButtons
 
int mButtonSize
 
int mIconSize
 
QString mToolTip
 
PushButtonmFirst
 
ModeButtonmCurrent
 
SceneToolbarmToolbar
 

Additional Inherited Members

- Public Types inherited from CSVWidget::PushButton
enum  Type { Type_TopMode, Type_TopAction, Type_Mode, Type_Toggle }
 

Detailed Description

Mode selector tool.

Constructor & Destructor Documentation

CSVWidget::SceneToolMode::SceneToolMode ( SceneToolbar parent,
const QString &  toolTip 
)

Member Function Documentation

void CSVWidget::SceneToolMode::addButton ( const std::string &  icon,
const std::string &  id,
const QString &  tooltip = "" 
)

Here is the caller graph for this function:

void CSVWidget::SceneToolMode::addButton ( ModeButton button,
const std::string &  id 
)

The ownership of button is transferred to *this.

void CSVWidget::SceneToolMode::adjustToolTip ( const ModeButton activeMode)
private

Here is the call graph for this function:

void CSVWidget::SceneToolMode::contextMenuEvent ( QContextMenuEvent *  event)
privatevirtual

Here is the call graph for this function:

bool CSVWidget::SceneToolMode::createContextMenu ( QMenu menu)
privatevirtual

Add context menu items to menu. Default-implementation: Pass on request to current mode button or return false, if there is no current mode button.

Attention
menu can be a 0-pointer
Returns
Have there been any menu items to be added (if menu is 0 and there items to be added, the function must return true anyway.

Reimplemented in CSVRender::SelectionMode, CSVRender::InstanceSelectionMode, and CSVRender::PathgridSelectionMode.

Here is the caller graph for this function:

bool CSVWidget::SceneToolMode::event ( QEvent *  event)
protected
CSVWidget::ModeButton * CSVWidget::SceneToolMode::getCurrent ( )

Will return a 0-pointer only if the mode does not have any buttons yet.

std::string CSVWidget::SceneToolMode::getCurrentId ( ) const

Must not be called if there aren't any buttons yet.

void CSVWidget::SceneToolMode::modeChanged ( const std::string &  id)
signal
void CSVWidget::SceneToolMode::selected ( )
privateslot
void CSVWidget::SceneToolMode::setButton ( std::map< ModeButton *, std::string >::iterator  iter)
private
void CSVWidget::SceneToolMode::setButton ( const std::string &  id)

Manually change the current mode.

void CSVWidget::SceneToolMode::showPanel ( const QPoint &  position)
virtual

Implements CSVWidget::SceneTool.

Member Data Documentation

std::map<ModeButton *, std::string> CSVWidget::SceneToolMode::mButtons
private
int CSVWidget::SceneToolMode::mButtonSize
private
ModeButton* CSVWidget::SceneToolMode::mCurrent
private
PushButton* CSVWidget::SceneToolMode::mFirst
private
int CSVWidget::SceneToolMode::mIconSize
private
QHBoxLayout* CSVWidget::SceneToolMode::mLayout
private
QWidget* CSVWidget::SceneToolMode::mPanel
private
SceneToolbar* CSVWidget::SceneToolMode::mToolbar
private
QString CSVWidget::SceneToolMode::mToolTip
private

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