Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Signals | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
CALCDNumber Class Reference

#include <lcdnumber.h>

Inheritance diagram for CALCDNumber:
Inheritance graph
[legend]

Signals

void valChanged (int iVal)
 

Public Member Functions

 CALCDNumber (int iMin, int iMax, QWidget *poParent=0, QString oText="")
 
void setRealValue (int val)
 
int getRealValue ()
 
void setMin (int iMin)
 
void setMax (int iMax)
 
bool isZero ()
 

Protected Member Functions

virtual void mousePressEvent (QMouseEvent *poEvt)
 
virtual void wheelEvent (QWheelEvent *poEvt)
 
virtual void contextMenuEvent (QContextMenuEvent *poEvt)
 

Private Attributes

int min_
 
int max_
 
QActionnumDisplay_
 
int realValue_
 
QString toolTipText_
 

Constructor & Destructor Documentation

CALCDNumber::CALCDNumber ( int  iMin,
int  iMax,
QWidget poParent = 0,
QString  oText = "" 
)

Constructs the number display

Parameters
iMinminimal number
iMaxmaximal number
oToolTipTexttext to be displayed as tool tip
oShortCutshortcut for a quick change of the number
poParentparent widget
oTextname of the widget

References max_, min_, and setRealValue().

Here is the call graph for this function:

Member Function Documentation

virtual void CALCDNumber::contextMenuEvent ( QContextMenuEvent *  poEvt)
inlineprotectedvirtual

Overrides QMainWindow::contextMenuEvent() to prevent showing the context menu when the LCD widget is right-clicked (in a toolbar).

Parameters
poEvtPointer to event info.
int CALCDNumber::getRealValue ( )
bool CALCDNumber::isZero ( )

Checks if the value is 0 (or false if LCD number wasn't plugged)

References getRealValue().

Here is the call graph for this function:

void CALCDNumber::mousePressEvent ( QMouseEvent *  poEvt)
protectedvirtual

Event being performed when a mouse button was pressed

Parameters
poEvtNecessary information about the event

References getRealValue(), max_, min_, and setRealValue().

Here is the call graph for this function:

void CALCDNumber::setMax ( int  iMax)

Sets the maximum value of the number display

Parameters
iMaxnew maximum value to be set

References getRealValue(), max_, min_, and setRealValue().

Referenced by CAMainWin::scoreViewPortMousePress(), and CAMainWin::updateVoiceToolBar().

Here is the call graph for this function:

Here is the caller graph for this function:

void CALCDNumber::setMin ( int  iMin)

Sets the minimum value of the number display

Parameters
iMinnew minimum value to be set

References getRealValue(), max_, min_, and setRealValue().

Here is the call graph for this function:

void CALCDNumber::setRealValue ( int  val)

Sets the current value of the number display

Parameters
iValnew value to be set

References max_, realValue_, and valChanged().

Referenced by CALCDNumber(), mousePressEvent(), CAMainWin::on_uiInsertPlayable_toggled(), CAMainWin::on_uiNewVoice_triggered(), CAMainWin::on_uiRemoveVoice_triggered(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), setMax(), setMin(), CAMainWin::setMode(), CAMainWin::updatePlayableToolBar(), and wheelEvent().

Here is the call graph for this function:

Here is the caller graph for this function:

void CALCDNumber::valChanged ( int  iVal)
signal

Actually sends out the changed value if triggered via mouse press event

Parameters
iValnew value

Referenced by setRealValue().

Here is the caller graph for this function:

void CALCDNumber::wheelEvent ( QWheelEvent *  poEvt)
protectedvirtual

Event being performed when a wheel was moved

Parameters
poEvtNecessary information about the event

References getRealValue(), max_, min_, and setRealValue().

Here is the call graph for this function:

Member Data Documentation

int CALCDNumber::max_
private
int CALCDNumber::min_
private
QAction* CALCDNumber::numDisplay_
private
int CALCDNumber::realValue_
private

Referenced by getRealValue(), and setRealValue().

QString CALCDNumber::toolTipText_
private

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