ButtonDelegate Class Reference

Manages a button. More...

#include <ArmarXGui/gui-plugins/ScenarioManager/gui/buttondelegate.h>

+ Inheritance diagram for ButtonDelegate:

Signals

void buttonClicked (int row, int column, QModelIndex parent)
 

Public Member Functions

 ButtonDelegate (QWidget *parent=0)
 Constructor which doesn't do anything. More...
 
int getAppIconSize () const
 
int getScenarioIconSize () const
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Sets button style and draws it. More...
 
void setAppIconSize (int value)
 
virtual void setEditorData (QWidget *editor, const QModelIndex &index) const
 
virtual void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 
void setScenarioIconSize (int value)
 
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Calculates and returns the size of the button. More...
 

Protected Member Functions

bool editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
 

Detailed Description

Manages a button.

Definition at line 40 of file buttondelegate.h.

Constructor & Destructor Documentation

◆ ButtonDelegate()

ButtonDelegate ( QWidget *  parent = 0)

Constructor which doesn't do anything.

Definition at line 43 of file buttondelegate.cpp.

Member Function Documentation

◆ buttonClicked

void buttonClicked ( int  row,
int  column,
QModelIndex  parent 
)
signal
+ Here is the caller graph for this function:

◆ editorEvent()

bool editorEvent ( QEvent *  event,
QAbstractItemModel *  model,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
)
overrideprotected

Definition at line 113 of file buttondelegate.cpp.

◆ getAppIconSize()

int getAppIconSize ( ) const

Definition at line 138 of file buttondelegate.cpp.

◆ getScenarioIconSize()

int getScenarioIconSize ( ) const

Definition at line 148 of file buttondelegate.cpp.

◆ paint()

void paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Sets button style and draws it.

Parameters
painterPainter that does the drawing
optionDescribes the parameter used to draw the button
indexUsed to locate the button

Definition at line 60 of file buttondelegate.cpp.

◆ setAppIconSize()

void setAppIconSize ( int  value)

Definition at line 143 of file buttondelegate.cpp.

+ Here is the call graph for this function:

◆ setEditorData()

void setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
virtual

Definition at line 50 of file buttondelegate.cpp.

◆ setModelData()

void setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
virtual

Definition at line 55 of file buttondelegate.cpp.

◆ setScenarioIconSize()

void setScenarioIconSize ( int  value)

Definition at line 153 of file buttondelegate.cpp.

+ Here is the call graph for this function:

◆ sizeHint()

QSize sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Calculates and returns the size of the button.

Parameters
optionUsed to get the height and width of the item
indexUsed to locate the button (not used currently)

Definition at line 158 of file buttondelegate.cpp.


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