libyui-qt
 
Loading...
Searching...
No Matches
YQBarGraph Class Reference
Inheritance diagram for YQBarGraph:
Collaboration diagram for YQBarGraph:

Public Member Functions

 YQBarGraph (YWidget *parent)
 
virtual ~YQBarGraph ()
 
virtual void doUpdate ()
 
virtual void setEnabled (bool enabled)
 
virtual int preferredWidth ()
 
virtual int preferredHeight ()
 
virtual void setSize (int newWidth, int newHeight)
 

Protected Member Functions

virtual bool event (QEvent *event)
 
virtual void paintEvent (QPaintEvent *painter)
 
YColor defaultSegmentColor (unsigned index)
 
YColor defaultTextColor (unsigned index)
 
QString segmentText (unsigned index) const
 
int findSegment (int xPos) const
 
QString backgroundColors ()
 
void setBackgroundColors (QString colors)
 
QString foregroundColors ()
 
void setForegroundColors (QString colors)
 

Protected Attributes

QString _foregroundColors
 
QString _backgroundColors
 
QVector< int > _segStart
 

Properties

QString BackgroundColors
 
QString ForegroundColors
 

Constructor & Destructor Documentation

◆ YQBarGraph()

YQBarGraph::YQBarGraph ( YWidget * parent)

Constructor.

◆ ~YQBarGraph()

YQBarGraph::~YQBarGraph ( )
virtual

Destructor.

Member Function Documentation

◆ defaultSegmentColor()

YColor YQBarGraph::defaultSegmentColor ( unsigned index)
protected

Return one from a set of default segment background colors.

◆ defaultTextColor()

YColor YQBarGraph::defaultTextColor ( unsigned index)
protected

Return one from a set of default text colors. This text color is guaranteed to contrast with the defaultSegmentColor with the same index.

◆ doUpdate()

void YQBarGraph::doUpdate ( )
virtual

Perform a visual update on the screen.

Implemented from YBarGraph.

◆ event()

bool YQBarGraph::event ( QEvent * event)
protectedvirtual

General event handler. Reimplemented for dynamic tooltips.

◆ findSegment()

int YQBarGraph::findSegment ( int xPos) const
protected

Find a segment index by position. Return -1 if not found.

Notice that this is only meaningful after the first paintEvent() where those positions are initialized.

◆ paintEvent()

void YQBarGraph::paintEvent ( QPaintEvent * painter)
protectedvirtual

Draw the contents.

Reimplemented from QFrame.

◆ preferredHeight()

int YQBarGraph::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

◆ preferredWidth()

int YQBarGraph::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

◆ segmentText()

QString YQBarGraph::segmentText ( unsigned index) const
protected

Return the text for a segment with a '%1' placeholder (if present) expanded with that segment's numerical value.

◆ setEnabled()

void YQBarGraph::setEnabled ( bool enabled)
virtual

Set enabled/disabled state.

Reimplemented from YWidget.

◆ setSize()

void YQBarGraph::setSize ( int newWidth,
int newHeight )
virtual

Set the new size of the widget.

Reimplemented from YWidget.


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